diff --git a/browser/account-transfers.module-EE4IYF6L.js b/browser/account-transfers.module-IS46QWMU.js similarity index 99% rename from browser/account-transfers.module-EE4IYF6L.js rename to browser/account-transfers.module-IS46QWMU.js index 8e00557d8..c8fc7c11a 100644 --- a/browser/account-transfers.module-EE4IYF6L.js +++ b/browser/account-transfers.module-IS46QWMU.js @@ -1 +1 @@ -import{a as B}from"./chunk-SJ6K46JC.js";import{$a as he,$d as Pe,Bd as X,Cd as st,Da as P,Dc as Ee,Dd as we,De as Ne,Ea as N,Ee as qe,Fb as q,Fd as ct,G,Ga as w,Gd as Z,H as qt,Hd as Lt,Ia as x,Id as tt,Ja as h,Jd as mt,K as T,Kg as Ue,L as b,Ld as pt,M as S,Mc as V,Na as Dt,Nd as Oe,Oa as At,Oc as De,Od as dt,Pa as Mt,Pd as ut,Qa as M,Qd as ft,Qe as yt,Rc as xt,Sc as Y,Sd as Ct,Ua as r,Ud as Q,Va as c,Wa as u,Wc as J,Xa as g,Xc as I,Xd as _t,Ya as Ie,Yc as K,Zc as it,_ as se,_a as Te,_f as Ve,ab as xe,ad as Bt,ag as Re,bb as Rt,bd as Ae,bg as Le,ca as e,cd as nt,cg as He,dd as bt,de as vt,eb as U,ed as Me,fb as et,fd as at,hb as o,hc as H,hf as Ht,ib as l,id as rt,if as $t,ja as O,jb as kt,jf as Ut,ka as Vt,kc as ht,kd as ke,lc as W,ld as ot,lf as Gt,mf as jt,na as y,nc as ce,nd as Be,of as zt,pb as be,pd as St,pf as Qt,pg as $e,qb as Se,qd as Fe,ra as _,rc as j,rd as R,rf as Wt,sa as v,sd as $,sf as Yt,ta as E,ua as D,uf as Jt,va as A,vd as z,wa as d,xa as n,xd as lt,xf as Ft,ya as i,za as C,zb as ye}from"./chunk-OX7PN44D.js";import{a as Pt,b as Nt}from"./chunk-PHUH23IY.js";var Qe=()=>["../","edit"],We=()=>["../","list-account-transactions"];function Ye(t,m){t&1&&(n(0,"button",1),r(1),o(2,"translate"),i()),t&2&&(d("routerLink",U(4,We)),e(),u(" ",l(2,2,"labels.buttons.View Transactions History")," "))}function Je(t,m){t&1&&(n(0,"span"),r(1),o(2,"translate"),i()),t&2&&(e(),u(" ",l(2,1,"labels.inputs.Within Bank")," "))}function Ke(t,m){t&1&&(n(0,"span"),r(1),o(2,"translate"),i()),t&2&&(e(),u(" ",l(2,1,"labels.inputs.Own Account")," "))}var Xt=(()=>{class t{constructor(){this.route=T(H),this.allowclientedit=!1,this.route.data.subscribe(a=>{this.standingInstructionsData=a.standingInstructionsData,this.standingInstructionsData.fromClient.id===this.standingInstructionsData.toClient.id&&(this.allowclientedit=!1)})}static{this.\u0275fac=function(p){return new(p||t)}}static{this.\u0275cmp=O({type:t,selectors:[["mifosx-view-standing-instructions"]],decls:125,vars:90,consts:[[1,"layout-row","align-end","gap-2px","responsive-column","container","m-b-20"],["mat-raised-button","","color","primary",3,"routerLink"],["icon","edit",1,"m-r-10"],["mat-raised-button","","color","primary",3,"routerLink",4,"mifosxHasPermission"],[1,"container"],[1,"layout-row-wrap","responsive-column"],[1,"mat-h2","flex-fill"],[3,"inset"],[1,"flex-fill"],[1,"flex-40"],[1,"flex-60"]],template:function(p,s){p&1&&(n(0,"div",0)(1,"button",1),C(2,"fa-icon",2),r(3),o(4,"translate"),i(),y(5,Ye,3,5,"button",3),i(),n(6,"div",4)(7,"mat-card")(8,"mat-card-content")(9,"div",5)(10,"h2",6),r(11),i(),C(12,"mat-divider",7),n(13,"div",8)(14,"span",9),r(15),o(16,"translate"),i(),n(17,"span",10),r(18),i()(),n(19,"div",8)(20,"span",9),r(21),o(22,"translate"),i(),n(23,"span",10),r(24),i()(),n(25,"div",8)(26,"span",9),r(27),o(28,"translate"),i(),n(29,"span",10),r(30),i()(),n(31,"div",8)(32,"span",9),r(33),o(34,"translate"),i(),n(35,"span",10),r(36),i()(),n(37,"div",8)(38,"span",9),r(39),o(40,"translate"),i(),n(41,"span",10),r(42),i()(),n(43,"div",8)(44,"span",9),r(45),o(46,"translate"),i(),n(47,"span",10),r(48),i()(),n(49,"div",8)(50,"span",9),r(51),o(52,"translate"),i(),n(53,"span",10),_(54,Je,3,3,"span"),_(55,Ke,3,3,"span"),i()(),n(56,"div",8)(57,"span",9),r(58),o(59,"translate"),i(),n(60,"span",10),r(61),i()(),n(62,"div",8)(63,"span",9),r(64),o(65,"translate"),i(),n(66,"span",10),r(67),i()(),n(68,"div",8)(69,"span",9),r(70),o(71,"translate"),i(),n(72,"span",10),r(73),i()(),n(74,"div",8)(75,"span",9),r(76),o(77,"translate"),i(),n(78,"span",10),r(79),i()(),n(80,"div",8)(81,"span",9),r(82),o(83,"translate"),i(),n(84,"span",10),r(85),i()(),n(86,"div",8)(87,"span",9),r(88),o(89,"translate"),i(),n(90,"span",10),r(91),i()(),n(92,"div",8)(93,"span",9),r(94),o(95,"translate"),i(),n(96,"span",10),r(97),o(98,"dateFormat"),o(99,"dateFormat"),i()(),n(100,"div",8)(101,"span",9),r(102),o(103,"translate"),i(),n(104,"span",10),r(105),i()(),n(106,"div",8)(107,"span",9),r(108),o(109,"translate"),i(),n(110,"span",10),r(111),i()(),n(112,"div",8)(113,"span",9),r(114),o(115,"translate"),i(),n(116,"span",10),r(117),i()(),n(118,"div",8)(119,"span",9),r(120),o(121,"translate"),i(),n(122,"span",10),r(123),o(124,"dateFormat"),i()()()()()()),p&2&&(e(),d("routerLink",U(89,Qe)),e(2),u(" ",l(4,45,"labels.buttons.Edit")," "),e(2),d("mifosxHasPermission","READ_ACCOUNTTRANSFER"),e(6),c(s.standingInstructionsData.name),e(),d("inset",!0),e(3),u("",l(16,47,"labels.inputs.Applicant"),":"),e(3),c(s.standingInstructionsData.fromClient.displayName),e(3),u("",l(22,49,"labels.inputs.Type"),":"),e(3),c(s.standingInstructionsData.transferType.value),e(3),u("",l(28,51,"labels.inputs.Priority"),":"),e(3),c(s.standingInstructionsData.priority.value),e(3),u("",l(34,53,"labels.inputs.Status"),":"),e(3),c(s.standingInstructionsData.status.value),e(3),u("",l(40,55,"labels.inputs.From Account Type"),":"),e(3),c(s.standingInstructionsData.fromAccountType.value),e(3),u("",l(46,57,"labels.inputs.From Account"),":"),e(3),g("",s.standingInstructionsData.fromAccount.productName," - ",s.standingInstructionsData.fromAccount.accountNo),e(3),u("",l(52,59,"labels.inputs.Destination"),":"),e(3),v(s.allowclientedit?54:-1),e(),v(s.allowclientedit?-1:55),e(3),u("",l(59,61,"labels.inputs.To Office"),":"),e(3),c(s.standingInstructionsData.toOffice.name),e(3),u("",l(65,63,"labels.inputs.Beneficiary"),":"),e(3),c(s.standingInstructionsData.toClient.displayName),e(3),u("",l(71,65,"labels.inputs.To Account Type"),":"),e(3),c(s.standingInstructionsData.toAccountType.value),e(3),u("",l(77,67,"labels.inputs.To Account"),":"),e(3),g("",s.standingInstructionsData.toAccount.productName," - ",s.standingInstructionsData.toAccount.accountNo),e(3),u("",l(83,69,"labels.inputs.Standing Instruction Type"),":"),e(3),c(s.standingInstructionsData.instructionType.value),e(3),u("",l(89,71,"labels.inputs.Amount"),":"),e(3),c(s.standingInstructionsData.amount),e(3),u("",l(95,73,"labels.inputs.Validity"),":"),e(3),g("",l(98,75,s.standingInstructionsData.validFrom)," - ",l(99,77,s.standingInstructionsData.validTill)),e(5),u("",l(103,79,"labels.inputs.Recurrence Type"),":"),e(3),c(s.standingInstructionsData.recurrenceType.value),e(3),u("",l(109,81,"labels.inputs.Interval"),":"),e(3),c(s.standingInstructionsData.recurrenceInterval),e(3),u("",l(115,83,"labels.inputs.Recurrence Frequency"),":"),e(3),c(s.standingInstructionsData.recurrenceFrequency.value),e(3),u("",l(121,85,"labels.inputs.On Month Day"),":"),e(3),c(l(124,87,s.standingInstructionsData.recurrenceOnMonthDay)))},dependencies:[q,R,W,$,z,j,Q,_t,vt,Ct,V],styles:[".mat-elevation-z1[_ngcontent-%COMP%]{margin:1em 0 1.5em}h2[_ngcontent-%COMP%], h3[_ngcontent-%COMP%], h4[_ngcontent-%COMP%]{margin:0;font-weight:500}span[_ngcontent-%COMP%]{margin:.5em 0}.margin-t[_ngcontent-%COMP%]{margin-top:1em}mat-divider[_ngcontent-%COMP%]{margin:0 0 1em}"]})}}return t})();var Xe=()=>["../view"];function Ze(t,m){if(t&1&&(n(0,"mat-option",12),r(1),i()),t&2){let a=m.$implicit;d("value",a.id),e(),u(" ",a.value," ")}}function ti(t,m){t&1&&(n(0,"mat-error"),r(1),o(2,"translate"),o(3,"translate"),n(4,"strong"),r(5),o(6,"translate"),i()()),t&2&&(e(),g(" ",l(2,3,"labels.inputs.Priority")," ",l(3,5,"labels.commons.is")," "),e(4),c(l(6,7,"labels.commons.required")))}function ei(t,m){if(t&1&&(n(0,"mat-option",12),r(1),i()),t&2){let a=m.$implicit;d("value",a.id),e(),u(" ",a.value," ")}}function ii(t,m){t&1&&(n(0,"mat-error"),r(1),o(2,"translate"),o(3,"translate"),n(4,"strong"),r(5),o(6,"translate"),i()()),t&2&&(e(),g(" ",l(2,3,"labels.inputs.Status")," ",l(3,5,"labels.commons.is")," "),e(4),c(l(6,7,"labels.commons.required")))}function ni(t,m){if(t&1&&(n(0,"mat-option",12),r(1),i()),t&2){let a=m.$implicit;d("value",a.id),e(),u(" ",a.value," ")}}function ai(t,m){t&1&&(n(0,"mat-error"),r(1),o(2,"translate"),o(3,"translate"),n(4,"strong"),r(5),o(6,"translate"),i()()),t&2&&(e(),g(" ",l(2,3,"labels.inputs.Valid From Date")," ",l(3,5,"labels.commons.is")," "),e(4),c(l(6,7,"labels.commons.required")))}function ri(t,m){t&1&&(n(0,"mat-error"),r(1),o(2,"translate"),o(3,"translate"),n(4,"strong"),r(5),o(6,"translate"),i()()),t&2&&(e(),g(" ",l(2,3,"labels.inputs.Valid Till Date")," ",l(3,5,"labels.commons.is")," "),e(4),c(l(6,7,"labels.commons.required")))}function oi(t,m){if(t&1&&(n(0,"mat-option",12),r(1),i()),t&2){let a=m.$implicit;d("value",a.id),e(),u(" ",a.value," ")}}function li(t,m){t&1&&(n(0,"mat-error"),r(1),o(2,"translate"),o(3,"translate"),n(4,"strong"),r(5),o(6,"translate"),i()()),t&2&&(e(),g(" ",l(2,3,"labels.inputs.Recurrence Type")," ",l(3,5,"labels.commons.is")," "),e(4),c(l(6,7,"labels.commons.required")))}function si(t,m){if(t&1&&(n(0,"mat-option",12),r(1),i()),t&2){let a=m.$implicit;d("value",a.id),e(),u(" ",a.value," ")}}function ci(t,m){if(t&1){let a=w();n(0,"button",33),x("click",function(){b(a);let s=h();return S(s.submit())}),r(1),o(2,"translate"),i()}if(t&2){let a=h();d("disabled",!a.editStandingInstructionsForm.valid),e(),u(" ",l(2,2,"labels.buttons.Submit")," ")}}var ee=(()=>{class t{constructor(){this.formBuilder=T(St),this.route=T(H),this.router=T(ht),this.accountTransfersService=T(B),this.settingsService=T(Y),this.dateUtils=T(xt),this.allowclientedit=!1,this.minDate=new Date(2e3,0,1),this.maxDate=new Date(2100,0,1),this.route.data.subscribe(a=>{this.standingInstructionsData=a.standingInstructionsDataAndTemplate,this.standingInstructionsId=a.standingInstructionsDataAndTemplate.id,this.standingInstructionsData.fromClient.id===this.standingInstructionsData.toClient.id&&(this.allowclientedit=!1),this.setOptions()})}ngOnInit(){this.createEditStandingInstructionsForm();let p=new Date().getFullYear();this.standingInstructionsData.recurrenceOnMonthDay&&this.standingInstructionsData.recurrenceOnMonthDay.push(p),this.editStandingInstructionsForm.patchValue({name:this.standingInstructionsData.name,applicant:this.standingInstructionsData.fromClient.displayName,type:this.standingInstructionsData.transferType.value,priority:this.standingInstructionsData.priority.id,status:this.standingInstructionsData.status.id,fromAccountType:this.standingInstructionsData.fromAccountType.value,fromAccount:this.standingInstructionsData.fromAccount.productName,destination:this.allowclientedit?"Within Bank":"Own Account",toOffice:this.standingInstructionsData.toOffice.name,toClientId:this.standingInstructionsData.toClient.displayName,toAccountType:this.standingInstructionsData.toAccountType.value,toAccount:this.standingInstructionsData.toAccount.productName,instructionType:this.standingInstructionsData.instructionType.id,amount:this.standingInstructionsData.amount,validFrom:this.standingInstructionsData.validFrom&&new Date(this.standingInstructionsData.validFrom),validTill:this.standingInstructionsData.validTill&&new Date(this.standingInstructionsData.validTill),recurrenceType:this.standingInstructionsData.recurrenceType.id,recurrenceInterval:this.standingInstructionsData.recurrenceInterval,recurrenceFrequency:this.standingInstructionsData.recurrenceFrequency.id,recurrenceOnMonthDay:this.standingInstructionsData.recurrenceOnMonthDay&&new Date(this.standingInstructionsData.recurrenceOnMonthDay)})}createEditStandingInstructionsForm(){this.editStandingInstructionsForm=this.formBuilder.group({name:[{value:"",disabled:!0}],applicant:[{value:"",disabled:!0}],type:[{value:"",disabled:!0}],priority:["",I.required],status:["",I.required],fromAccountType:[{value:"",disabled:!0}],fromAccount:[{value:"",disabled:!0}],destination:[{value:"",disabled:!0}],toOffice:[{value:"",disabled:!0}],toClientId:[{value:"",disabled:!0}],toAccountType:[{value:"",disabled:!0}],toAccount:[{value:"",disabled:!0}],instructionType:"",amount:"",validFrom:["",I.required],validTill:["",I.required],recurrenceType:["",I.required],recurrenceInterval:"",recurrenceFrequency:"",recurrenceOnMonthDay:""})}setOptions(){this.priorityTypeData=this.standingInstructionsData.priorityOptions,this.statusTypeData=this.standingInstructionsData.statusOptions,this.instructionTypeData=this.standingInstructionsData.instructionTypeOptions,this.recurrenceTypeData=this.standingInstructionsData.recurrenceTypeOptions,this.recurrenceFrequencyTypeData=this.standingInstructionsData.recurrenceFrequencyOptions}submit(){let a=this.settingsService.dateFormat,p=this.settingsService.language.code,s={amount:this.editStandingInstructionsForm.value.amount,dateFormat:a,instructionType:this.editStandingInstructionsForm.value.instructionType,locale:p,monthDayFormat:"dd MMMM",priority:this.editStandingInstructionsForm.value.priority,recurrenceFrequency:this.editStandingInstructionsForm.value.recurrenceFrequency,recurrenceInterval:this.editStandingInstructionsForm.value.recurrenceInterval,recurrenceOnMonthDay:this.dateUtils.formatDate(this.editStandingInstructionsForm.value.recurrenceOnMonthDay,"dd MMMM"),recurrenceType:this.editStandingInstructionsForm.value.recurrenceType,status:this.editStandingInstructionsForm.value.status,validFrom:this.dateUtils.formatDate(this.editStandingInstructionsForm.value.validFrom,a),validTill:this.dateUtils.formatDate(this.editStandingInstructionsForm.value.validTill,a)};this.accountTransfersService.updateStandingInstructionsData(this.standingInstructionsId,s).subscribe(f=>{this.router.navigate(["../view"],{relativeTo:this.route})})}static{this.\u0275fac=function(p){return new(p||t)}}static{this.\u0275cmp=O({type:t,selectors:[["mifosx-edit-standing-instructions"]],decls:134,vars:84,consts:[["validFromDatePicker",""],["validTillDatePicker",""],["recurrenceOnMonthDayDatePicker",""],[1,"container"],[3,"formGroup"],[1,"layout-row-wrap","gap-2px","responsive-column"],[1,"flex-48"],["matInput","","formControlName","name"],["matInput","","formControlName","applicant"],["matInput","","formControlName","type"],["matInput","","formControlName","fromAccountType"],["required","","formControlName","priority"],[3,"value"],["required","","formControlName","status"],["matInput","","formControlName","fromAccount"],["matInput","","formControlName","destination"],["matInput","","formControlName","toOffice"],["matInput","","formControlName","toClientId"],["matInput","","formControlName","toAccountType"],["matInput","","formControlName","toAccount"],["formControlName","instructionType"],["matInput","","formControlName","amount"],[1,"flex-48",3,"click"],["matInput","","required","","formControlName","validFrom",3,"min","max","matDatepicker"],["matSuffix","",3,"for"],["matInput","","required","","formControlName","validTill",3,"min","max","matDatepicker"],["required","","formControlName","recurrenceType"],["matInput","","formControlName","recurrenceInterval"],["formControlName","recurrenceFrequency"],["matInput","","formControlName","recurrenceOnMonthDay",3,"min","max","matDatepicker"],[1,"layout-row","align-center","gap-5px","responsive-column"],["type","button","mat-raised-button","",3,"routerLink"],["mat-raised-button","","color","primary",3,"disabled","click",4,"mifosxHasPermission"],["mat-raised-button","","color","primary",3,"click","disabled"]],template:function(p,s){if(p&1){let f=w();n(0,"div",3)(1,"mat-card")(2,"form",4)(3,"mat-card-content")(4,"div",5)(5,"mat-form-field",6)(6,"mat-label"),r(7),o(8,"translate"),i(),C(9,"input",7),i(),n(10,"mat-form-field",6)(11,"mat-label"),r(12),o(13,"translate"),i(),C(14,"input",8),i(),n(15,"mat-form-field",6)(16,"mat-label"),r(17),o(18,"translate"),i(),C(19,"input",9),i(),n(20,"mat-form-field",6)(21,"mat-label"),r(22),o(23,"translate"),i(),C(24,"input",10),i(),n(25,"mat-form-field",6)(26,"mat-label"),r(27),o(28,"translate"),i(),n(29,"mat-select",11),D(30,Ze,2,2,"mat-option",12,E),i(),_(32,ti,7,9,"mat-error"),i(),n(33,"mat-form-field",6)(34,"mat-label"),r(35),o(36,"translate"),i(),n(37,"mat-select",13),D(38,ei,2,2,"mat-option",12,E),i(),_(40,ii,7,9,"mat-error"),i(),n(41,"mat-form-field",6)(42,"mat-label"),r(43),o(44,"translate"),i(),C(45,"input",14),i(),n(46,"mat-form-field",6)(47,"mat-label"),r(48),o(49,"translate"),i(),C(50,"input",15),i(),n(51,"mat-form-field",6)(52,"mat-label"),r(53),o(54,"translate"),i(),C(55,"input",16),i(),n(56,"mat-form-field",6)(57,"mat-label"),r(58),o(59,"translate"),i(),C(60,"input",17),i(),n(61,"mat-form-field",6)(62,"mat-label"),r(63),o(64,"translate"),i(),C(65,"input",18),i(),n(66,"mat-form-field",6)(67,"mat-label"),r(68),o(69,"translate"),i(),C(70,"input",19),i(),n(71,"mat-form-field",6)(72,"mat-label"),r(73),o(74,"translate"),i(),n(75,"mat-select",20),D(76,ni,2,2,"mat-option",12,E),i()(),n(78,"mat-form-field",6)(79,"mat-label"),r(80),o(81,"translate"),i(),C(82,"input",21),i(),n(83,"mat-form-field",22),x("click",function(){b(f);let F=M(90);return S(F.open())}),n(84,"mat-label"),r(85),o(86,"translate"),i(),C(87,"input",23)(88,"mat-datepicker-toggle",24)(89,"mat-datepicker",null,0),_(91,ai,7,9,"mat-error"),i(),n(92,"mat-form-field",22),x("click",function(){b(f);let F=M(99);return S(F.open())}),n(93,"mat-label"),r(94),o(95,"translate"),i(),C(96,"input",25)(97,"mat-datepicker-toggle",24)(98,"mat-datepicker",null,1),_(100,ri,7,9,"mat-error"),i(),n(101,"mat-form-field",6)(102,"mat-label"),r(103),o(104,"translate"),i(),n(105,"mat-select",26),D(106,oi,2,2,"mat-option",12,E),i(),_(108,li,7,9,"mat-error"),i(),n(109,"mat-form-field",6)(110,"mat-label"),r(111),o(112,"translate"),i(),C(113,"input",27),i(),n(114,"mat-form-field",6)(115,"mat-label"),r(116),o(117,"translate"),i(),n(118,"mat-select",28),D(119,si,2,2,"mat-option",12,E),i()(),n(121,"mat-form-field",22),x("click",function(){b(f);let F=M(128);return S(F.open())}),n(122,"mat-label"),r(123),o(124,"translate"),i(),C(125,"input",29)(126,"mat-datepicker-toggle",24)(127,"mat-datepicker",null,2),i()()(),n(129,"mat-card-actions",30)(130,"button",31),r(131),o(132,"translate"),i(),y(133,ci,3,4,"button",32),i()()()()}if(p&2){let f=M(90),k=M(99),F=M(128);e(2),d("formGroup",s.editStandingInstructionsForm),e(5),c(l(8,41,"labels.inputs.name")),e(5),c(l(13,43,"labels.inputs.Applicant")),e(5),c(l(18,45,"labels.inputs.Type")),e(5),c(l(23,47,"labels.inputs.From Account Type")),e(5),c(l(28,49,"labels.inputs.Priority")),e(3),A(s.priorityTypeData),e(2),v(s.editStandingInstructionsForm.controls.priority.hasError("required")?32:-1),e(3),c(l(36,51,"labels.inputs.Status")),e(3),A(s.statusTypeData),e(2),v(s.editStandingInstructionsForm.controls.status.hasError("required")?40:-1),e(3),c(l(44,53,"labels.inputs.From Account")),e(5),c(l(49,55,"labels.inputs.Destination")),e(5),c(l(54,57,"labels.inputs.To Office")),e(5),c(l(59,59,"labels.inputs.Beneficiary")),e(5),c(l(64,61,"labels.inputs.To Account Type")),e(5),c(l(69,63,"labels.inputs.To Account")),e(5),c(l(74,65,"labels.inputs.Standing Instruction Type")),e(3),A(s.instructionTypeData),e(4),c(l(81,67,"labels.inputs.Amount")),e(5),c(l(86,69,"labels.inputs.Validity from")),e(2),d("min",s.minDate)("max",s.maxDate)("matDatepicker",f),e(),d("for",f),e(3),v(s.editStandingInstructionsForm.controls.validFrom.hasError("required")?91:-1),e(3),c(l(95,71,"labels.inputs.Validity To")),e(2),d("min",s.minDate)("max",s.maxDate)("matDatepicker",k),e(),d("for",k),e(3),v(s.editStandingInstructionsForm.controls.validTill.hasError("required")?100:-1),e(3),c(l(104,73,"labels.inputs.Recurrence Type")),e(3),A(s.recurrenceTypeData),e(2),v(s.editStandingInstructionsForm.controls.recurrenceType.hasError("required")?108:-1),e(3),c(l(112,75,"labels.inputs.Interval")),e(5),c(l(117,77,"labels.inputs.Recurrence Frequency")),e(3),A(s.recurrenceFrequencyTypeData),e(4),c(l(124,79,"labels.inputs.On Month Day")),e(2),d("min",s.minDate)("max",s.maxDate)("matDatepicker",F),e(),d("for",F),e(4),d("routerLink",U(83,Xe)),e(),u(" ",l(132,81,"labels.buttons.Cancel")," "),e(2),d("mifosxHasPermission","UPDATE_STANDINGINSTRUCTION")}},dependencies:[q,R,nt,J,K,it,ot,at,rt,W,$,z,lt,Z,X,st,ct,tt,pt,mt,ut,ft,dt,j,Q,V],encapsulation:2})}}return t})();var mi=()=>["../"];function pi(t,m){t&1&&(n(0,"mat-error"),r(1),o(2,"translate"),o(3,"translate"),n(4,"strong"),r(5),o(6,"translate"),i()()),t&2&&(e(),g(" ",l(2,3,"labels.inputs.name")," ",l(3,5,"labels.commons.is")," "),e(4),c(l(6,7,"labels.inputs.required")))}function di(t,m){if(t&1&&(n(0,"mat-option",10),r(1),i()),t&2){let a=m.$implicit;d("value",a.id),e(),u(" ",a.value," ")}}function ui(t,m){t&1&&(n(0,"mat-error"),r(1),o(2,"translate"),o(3,"translate"),n(4,"strong"),r(5),o(6,"translate"),i()()),t&2&&(e(),g(" ",l(2,3,"labels.inputs.Transfer Type")," ",l(3,5,"labels.commons.is")," "),e(4),c(l(6,7,"labels.inputs.required")))}function fi(t,m){if(t&1&&(n(0,"mat-option",10),r(1),i()),t&2){let a=m.$implicit;d("value",a.id),e(),u(" ",a.value," ")}}function Ci(t,m){t&1&&(n(0,"mat-error"),r(1),o(2,"translate"),o(3,"translate"),n(4,"strong"),r(5),o(6,"translate"),i()()),t&2&&(e(),g(" ",l(2,3,"labels.inputs.Priority")," ",l(3,5,"labels.commons.is")," "),e(4),c(l(6,7,"labels.commons.required")))}function _i(t,m){if(t&1&&(n(0,"mat-option",10),r(1),i()),t&2){let a=m.$implicit;d("value",a.id),e(),u(" ",a.value," ")}}function vi(t,m){t&1&&(n(0,"mat-error"),r(1),o(2,"translate"),o(3,"translate"),n(4,"strong"),r(5),o(6,"translate"),i()()),t&2&&(e(),g(" ",l(2,3,"labels.inputs.Status")," ",l(3,5,"labels.commons.is")," "),e(4),c(l(6,7,"labels.commons.required")))}function gi(t,m){if(t&1&&(n(0,"mat-option",10),r(1),i()),t&2){let a=m.$implicit;d("value",a.id),e(),u(" ",a.value," ")}}function Ii(t,m){t&1&&(n(0,"mat-error"),r(1),o(2,"translate"),o(3,"translate"),n(4,"strong"),r(5),o(6,"translate"),i()()),t&2&&(e(),g(" ",l(2,3,"labels.inputs.From Account Type")," ",l(3,5,"labels.commons.is")," "),e(4),c(l(6,7,"labels.commons.required")))}function Ti(t,m){if(t&1&&(n(0,"mat-option",10),r(1),i()),t&2){let a=m.$implicit;d("value",a.id),e(),g(" ",a.productName," - ",a.accountNo," ")}}function hi(t,m){t&1&&(n(0,"mat-error"),r(1),o(2,"translate"),o(3,"translate"),n(4,"strong"),r(5),o(6,"translate"),i()()),t&2&&(e(),g(" ",l(2,3,"labels.inputs.From Account")," ",l(3,5,"labels.commons.is")," "),e(4),c(l(6,7,"labels.commons.required")))}function xi(t,m){if(t&1&&(n(0,"mat-option",10),r(1),i()),t&2){let a=m.$implicit;d("value",a.id),e(),u(" ",a.value," ")}}function bi(t,m){t&1&&(n(0,"mat-error"),r(1),o(2,"translate"),o(3,"translate"),n(4,"strong"),r(5),o(6,"translate"),i()()),t&2&&(e(),g(" ",l(2,3,"labels.inputs.Destination")," ",l(3,5,"labels.commons.is")," "),e(4),c(l(6,7,"labels.commons.required")))}function Si(t,m){if(t&1&&(n(0,"mat-option",10),r(1),i()),t&2){let a=m.$implicit;d("value",a.id),e(),u(" ",a.name," ")}}function yi(t,m){t&1&&(n(0,"mat-error"),r(1),o(2,"translate"),o(3,"translate"),n(4,"strong"),r(5),o(6,"translate"),i()()),t&2&&(e(),g(" ",l(2,3,"labels.inputs.To Office")," ",l(3,5,"labels.commons.is")," "),e(4),c(l(6,7,"labels.commons.required")))}function Ei(t,m){if(t&1&&(n(0,"mat-option",10),r(1),i()),t&2){let a=m.$implicit;d("value",a.id),e(),u(" ",a.displayName," ")}}function Di(t,m){t&1&&(n(0,"mat-error"),r(1),o(2,"translate"),o(3,"translate"),n(4,"strong"),r(5),o(6,"translate"),i()()),t&2&&(e(),g(" ",l(2,3,"labels.inputs.Beneficiary")," ",l(3,5,"labels.commons.is")," "),e(4),c(l(6,7,"labels.commons.required")))}function Ai(t,m){if(t&1&&(n(0,"mat-option",10),r(1),i()),t&2){let a=m.$implicit;d("value",a.id),e(),u(" ",a.value," ")}}function Mi(t,m){t&1&&(n(0,"mat-error"),r(1),o(2,"translate"),o(3,"translate"),n(4,"strong"),r(5),o(6,"translate"),i()()),t&2&&(e(),g(" ",l(2,3,"labels.inputs.To Account Type")," ",l(3,5,"labels.commons.is")," "),e(4),c(l(6,7,"labels.commons.required")))}function ki(t,m){if(t&1&&(n(0,"mat-option",10),r(1),i()),t&2){let a=m.$implicit;d("value",a.id),e(),g(" ",a.productName," - ",a.accountNo," ")}}function Bi(t,m){t&1&&(n(0,"mat-error"),r(1),o(2,"translate"),o(3,"translate"),n(4,"strong"),r(5),o(6,"translate"),i()()),t&2&&(e(),g(" ",l(2,3,"labels.inputs.To Account")," ",l(3,5,"labels.commons.is")," "),e(4),c(l(6,7,"labels.commons.required")))}function Fi(t,m){if(t&1&&(n(0,"mat-option",10),r(1),i()),t&2){let a=m.$implicit;d("value",a.id),e(),u(" ",a.value," ")}}function wi(t,m){t&1&&(n(0,"mat-error"),r(1),o(2,"translate"),o(3,"translate"),n(4,"strong"),r(5),o(6,"translate"),i()()),t&2&&(e(),g(" ",l(2,3,"labels.inputs.Standing Instruction Type")," ",l(3,5,"labels.commons.is")," "),e(4),c(l(6,7,"labels.commons.required")))}function Oi(t,m){t&1&&(n(0,"mat-error"),r(1),o(2,"translate"),o(3,"translate"),n(4,"strong"),r(5),o(6,"translate"),i()()),t&2&&(e(),g(" ",l(2,3,"labels.inputs.Amount")," ",l(3,5,"labels.commons.is")," "),e(4),c(l(6,7,"labels.commons.required")))}function Pi(t,m){t&1&&(n(0,"mat-error"),r(1),o(2,"translate"),o(3,"translate"),n(4,"strong"),r(5),o(6,"translate"),i()()),t&2&&(e(),g(" ",l(2,3,"labels.inputs.Valid From Date")," ",l(3,5,"labels.commons.is")," "),e(4),c(l(6,7,"labels.commons.required")))}function Ni(t,m){t&1&&(n(0,"mat-error"),r(1),o(2,"translate"),o(3,"translate"),n(4,"strong"),r(5),o(6,"translate"),i()()),t&2&&(e(),g(" ",l(2,3,"labels.inputs.Valid Till Date")," ",l(3,5,"labels.commons.is")," "),e(4),c(l(6,7,"labels.commons.required")))}function qi(t,m){if(t&1&&(n(0,"mat-option",10),r(1),i()),t&2){let a=m.$implicit;d("value",a.id),e(),u(" ",a.value," ")}}function Vi(t,m){t&1&&(n(0,"mat-error"),r(1),o(2,"translate"),o(3,"translate"),n(4,"strong"),r(5),o(6,"translate"),i()()),t&2&&(e(),g(" ",l(2,3,"labels.inputs.Recurrence Type")," ",l(3,5,"labels.commons.is")," "),e(4),c(l(6,7,"labels.commons.required")))}function Ri(t,m){t&1&&(n(0,"mat-error"),r(1),o(2,"translate"),o(3,"translate"),n(4,"strong"),r(5),o(6,"translate"),i()()),t&2&&(e(),g(" ",l(2,3,"labels.inputs.Recurrence Interval")," ",l(3,5,"labels.commons.is")," "),e(4),c(l(6,7,"labels.commons.required")))}function Li(t,m){if(t&1&&(n(0,"mat-option",10),r(1),i()),t&2){let a=m.$implicit;d("value",a.id),e(),u(" ",a.value," ")}}function Hi(t,m){t&1&&(n(0,"mat-error"),r(1),o(2,"translate"),o(3,"translate"),n(4,"strong"),r(5),o(6,"translate"),i()()),t&2&&(e(),g(" ",l(2,3,"labels.inputs.Recurrence Frequency")," ",l(3,5,"labels.commons.is")," "),e(4),c(l(6,7,"labels.commons.required")))}function $i(t,m){t&1&&(n(0,"mat-error"),r(1),o(2,"translate"),o(3,"translate"),n(4,"strong"),r(5),o(6,"translate"),i()()),t&2&&(e(),g(" ",l(2,3,"labels.inputs.On Month Day")," ",l(3,5,"labels.commons.is")," "),e(4),c(l(6,7,"labels.commons.required")))}function Ui(t,m){if(t&1){let a=w();n(0,"button",33),x("click",function(){b(a);let s=h();return S(s.submit())}),r(1),o(2,"translate"),i()}if(t&2){let a=h();d("disabled",!a.createStandingInstructionsForm.valid),e(),u(" ",l(2,2,"labels.buttons.Submit")," ")}}var ie=(()=>{class t{constructor(){this.formBuilder=T(St),this.route=T(H),this.router=T(ht),this.accountTransfersService=T(B),this.settingsService=T(Y),this.dateUtils=T(xt),this.minDate=new Date(2e3,0,1),this.maxDate=new Date(2100,0,1),this.allowclientedit=!0,this.route.data.subscribe(a=>{this.standingIntructionsTemplate=a.standingIntructionsTemplate,this.setParams(),this.setOptions()})}setParams(){switch(this.officeId=this.route.snapshot.queryParams.officeId,this.accountType=this.route.snapshot.queryParams.accountType,this.clientId=this.route.parent.snapshot.params.clientId,this.accountType){case"fromloans":this.accountTypeId="1";break;case"fromsavings":this.accountTypeId="2";break;default:this.accountTypeId="0"}}ngOnInit(){this.createCreateStandingInstructionsForm(),this.buildDependencies(),this.createStandingInstructionsForm.patchValue({applicant:this.standingIntructionsTemplate.fromClient.displayName})}createCreateStandingInstructionsForm(){this.createStandingInstructionsForm=this.formBuilder.group({name:["",I.required],applicant:[{value:"",disabled:!0}],transferType:["",I.required],priority:["",I.required],status:["",I.required],fromAccountType:["",I.required],fromAccountId:["",I.required],destination:["",I.required],toOfficeId:["",I.required],toClientId:["",I.required],toAccountType:["",I.required],toAccountId:["",I.required],instructionType:["",I.required],amount:["",I.required],validFrom:["",I.required],validTill:["",I.required],recurrenceType:["",I.required],recurrenceInterval:["",I.required],recurrenceFrequency:["",I.required],recurrenceOnMonthDay:["",I.required]})}setOptions(){this.transferTypeData=this.standingIntructionsTemplate.transferTypeOptions,this.priorityTypeData=this.standingIntructionsTemplate.priorityOptions,this.statusTypeData=this.standingIntructionsTemplate.statusOptions,this.fromAccountTypeData=this.standingIntructionsTemplate.fromAccountTypeOptions,this.fromAccountData=this.standingIntructionsTemplate.fromAccountOptions,this.destinationTypeData=[{id:1,value:"own account"},{id:2,value:"with in bank"}],this.toOfficeTypeData=this.standingIntructionsTemplate.toOfficeOptions,this.toClientTypeData=this.standingIntructionsTemplate.toClientOptions,this.toAccountTypeData=this.standingIntructionsTemplate.toAccountTypeOptions,this.toAccountData=this.standingIntructionsTemplate.toAccountOptions,this.instructionTypeData=this.standingIntructionsTemplate.instructionTypeOptions,this.recurrenceTypeData=this.standingIntructionsTemplate.recurrenceTypeOptions,this.recurrenceFrequencyTypeData=this.standingIntructionsTemplate.recurrenceFrequencyOptions}buildDependencies(){this.createStandingInstructionsForm.get("destination").valueChanges.subscribe(a=>{a===1?(this.allowclientedit=!1,this.createStandingInstructionsForm.patchValue({toOfficeId:this.officeId,toClientId:this.clientId}),this.ToOfficeId=!0,this.ToClientId=!0,this.changeEvent()):(this.allowclientedit=!0,this.createStandingInstructionsForm.patchValue({toOfficeId:"",toClientId:""}),this.createStandingInstructionsForm.controls.toOfficeId.enable(),this.createStandingInstructionsForm.controls.toClientId.enable())})}changeEvent(){let a=this.refineObject(this.createStandingInstructionsForm.value);this.accountTransfersService.getStandingInstructionsTemplate(this.clientId,this.officeId,this.accountTypeId,a).subscribe(p=>{this.standingIntructionsTemplate=p,this.setOptions()})}refineObject(a){let p=Object.getOwnPropertyNames(a);for(let s=0;s{this.router.navigate(["../../"],{relativeTo:this.route})})}static{this.\u0275fac=function(p){return new(p||t)}}static{this.\u0275cmp=O({type:t,selectors:[["mifosx-create-standing-instructions"]],decls:164,vars:100,consts:[["validFromDatePicker",""],["validTillDatePicker",""],["recurrenceOnMonthDayDatePicker",""],[1,"container"],[3,"formGroup"],[1,"layout-row-wrap","gap-2px","responsive-column"],[1,"flex-48"],["matInput","","required","","formControlName","name"],["matInput","","formControlName","applicant"],["required","","formControlName","transferType",3,"selectionChange"],[3,"value"],["required","","formControlName","priority"],["required","","formControlName","status"],["required","","formControlName","fromAccountType",3,"selectionChange"],["required","","formControlName","fromAccountId",3,"selectionChange"],["required","","formControlName","destination"],["required","","formControlName","toOfficeId",3,"selectionChange","disabled"],["required","","formControlName","toClientId",3,"selectionChange","disabled"],["required","","formControlName","toAccountType",3,"selectionChange"],["required","","formControlName","toAccountId",3,"selectionChange"],["formControlName","instructionType"],["type","number","matInput","","required","","formControlName","amount"],[1,"flex-48",3,"click"],["matInput","","required","","formControlName","validFrom",3,"min","max","matDatepicker"],["matSuffix","",3,"for"],["matInput","","required","","formControlName","validTill",3,"min","max","matDatepicker"],["required","","formControlName","recurrenceType"],["type","number","matInput","","required","","formControlName","recurrenceInterval"],["required","","formControlName","recurrenceFrequency"],["required","","matInput","","formControlName","recurrenceOnMonthDay",3,"min","max","matDatepicker"],[1,"layout-row","align-center","gap-5px","responsive-column"],["type","button","mat-raised-button","",3,"routerLink"],["mat-raised-button","","color","primary",3,"disabled","click",4,"mifosxHasPermission"],["mat-raised-button","","color","primary",3,"click","disabled"]],template:function(p,s){if(p&1){let f=w();n(0,"div",3)(1,"mat-card")(2,"form",4)(3,"mat-card-content")(4,"div",5)(5,"mat-form-field",6)(6,"mat-label"),r(7),o(8,"translate"),i(),C(9,"input",7),_(10,pi,7,9,"mat-error"),i(),n(11,"mat-form-field",6)(12,"mat-label"),r(13),o(14,"translate"),i(),C(15,"input",8),i(),n(16,"mat-form-field",6)(17,"mat-label"),r(18),o(19,"translate"),i(),n(20,"mat-select",9),x("selectionChange",function(){return b(f),S(s.changeEvent())}),D(21,di,2,2,"mat-option",10,E),i(),_(23,ui,7,9,"mat-error"),i(),n(24,"mat-form-field",6)(25,"mat-label"),r(26),o(27,"translate"),i(),n(28,"mat-select",11),D(29,fi,2,2,"mat-option",10,E),i(),_(31,Ci,7,9,"mat-error"),i(),n(32,"mat-form-field",6)(33,"mat-label"),r(34),o(35,"translate"),i(),n(36,"mat-select",12),D(37,_i,2,2,"mat-option",10,E),i(),_(39,vi,7,9,"mat-error"),i(),n(40,"mat-form-field",6)(41,"mat-label"),r(42),o(43,"translate"),i(),n(44,"mat-select",13),x("selectionChange",function(){return b(f),S(s.changeEvent())}),D(45,gi,2,2,"mat-option",10,E),i(),_(47,Ii,7,9,"mat-error"),i(),n(48,"mat-form-field",6)(49,"mat-label"),r(50),o(51,"translate"),i(),n(52,"mat-select",14),x("selectionChange",function(){return b(f),S(s.changeEvent())}),D(53,Ti,2,3,"mat-option",10,E),i(),_(55,hi,7,9,"mat-error"),i(),n(56,"mat-form-field",6)(57,"mat-label"),r(58),o(59,"translate"),i(),n(60,"mat-select",15),D(61,xi,2,2,"mat-option",10,E),i(),_(63,bi,7,9,"mat-error"),i(),n(64,"mat-form-field",6)(65,"mat-label"),r(66),o(67,"translate"),i(),n(68,"mat-select",16),x("selectionChange",function(){return b(f),S(s.changeEvent())}),D(69,Si,2,2,"mat-option",10,E),i(),_(71,yi,7,9,"mat-error"),i(),n(72,"mat-form-field",6)(73,"mat-label"),r(74),o(75,"translate"),i(),n(76,"mat-select",17),x("selectionChange",function(){return b(f),S(s.changeEvent())}),D(77,Ei,2,2,"mat-option",10,E),i(),_(79,Di,7,9,"mat-error"),i(),n(80,"mat-form-field",6)(81,"mat-label"),r(82),o(83,"translate"),i(),n(84,"mat-select",18),x("selectionChange",function(){return b(f),S(s.changeEvent())}),D(85,Ai,2,2,"mat-option",10,E),i(),_(87,Mi,7,9,"mat-error"),i(),n(88,"mat-form-field",6)(89,"mat-label"),r(90),o(91,"translate"),i(),n(92,"mat-select",19),x("selectionChange",function(){return b(f),S(s.changeEvent())}),D(93,ki,2,3,"mat-option",10,E),i(),_(95,Bi,7,9,"mat-error"),i(),n(96,"mat-form-field",6)(97,"mat-label"),r(98),o(99,"translate"),i(),n(100,"mat-select",20),D(101,Fi,2,2,"mat-option",10,E),i(),_(103,wi,7,9,"mat-error"),i(),n(104,"mat-form-field",6)(105,"mat-label"),r(106),o(107,"translate"),i(),C(108,"input",21),_(109,Oi,7,9,"mat-error"),i(),n(110,"mat-form-field",22),x("click",function(){b(f);let F=M(117);return S(F.open())}),n(111,"mat-label"),r(112),o(113,"translate"),i(),C(114,"input",23)(115,"mat-datepicker-toggle",24)(116,"mat-datepicker",null,0),_(118,Pi,7,9,"mat-error"),i(),n(119,"mat-form-field",22),x("click",function(){b(f);let F=M(126);return S(F.open())}),n(120,"mat-label"),r(121),o(122,"translate"),i(),C(123,"input",25)(124,"mat-datepicker-toggle",24)(125,"mat-datepicker",null,1),_(127,Ni,7,9,"mat-error"),i(),n(128,"mat-form-field",6)(129,"mat-label"),r(130),o(131,"translate"),i(),n(132,"mat-select",26),D(133,qi,2,2,"mat-option",10,E),i(),_(135,Vi,7,9,"mat-error"),i(),n(136,"mat-form-field",6)(137,"mat-label"),r(138),o(139,"translate"),i(),C(140,"input",27),_(141,Ri,7,9,"mat-error"),i(),n(142,"mat-form-field",6)(143,"mat-label"),r(144),o(145,"translate"),i(),n(146,"mat-select",28),D(147,Li,2,2,"mat-option",10,E),i(),_(149,Hi,7,9,"mat-error"),i(),n(150,"mat-form-field",22),x("click",function(){b(f);let F=M(157);return S(F.open())}),n(151,"mat-label"),r(152),o(153,"translate"),i(),C(154,"input",29)(155,"mat-datepicker-toggle",24)(156,"mat-datepicker",null,2),_(158,$i,7,9,"mat-error"),i()()(),n(159,"mat-card-actions",30)(160,"button",31),r(161),o(162,"translate"),i(),y(163,Ui,3,4,"button",32),i()()()()}if(p&2){let f=M(117),k=M(126),F=M(157);e(2),d("formGroup",s.createStandingInstructionsForm),e(5),c(l(8,57,"labels.inputs.name")),e(3),v(s.createStandingInstructionsForm.controls.name.hasError("required")?10:-1),e(3),c(l(14,59,"labels.inputs.Applicant")),e(5),c(l(19,61,"labels.inputs.Type")),e(3),A(s.transferTypeData),e(2),v(s.createStandingInstructionsForm.controls.transferType.hasError("required")?23:-1),e(3),c(l(27,63,"labels.inputs.Priority")),e(3),A(s.priorityTypeData),e(2),v(s.createStandingInstructionsForm.controls.priority.hasError("required")?31:-1),e(3),c(l(35,65,"labels.inputs.Status")),e(3),A(s.statusTypeData),e(2),v(s.createStandingInstructionsForm.controls.status.hasError("required")?39:-1),e(3),c(l(43,67,"labels.inputs.From Account Type")),e(3),A(s.fromAccountTypeData),e(2),v(s.createStandingInstructionsForm.controls.fromAccountType.hasError("required")?47:-1),e(3),c(l(51,69,"labels.inputs.From Account")),e(3),A(s.fromAccountData),e(2),v(s.createStandingInstructionsForm.controls.fromAccountId.hasError("required")?55:-1),e(3),c(l(59,71,"labels.inputs.Destination")),e(3),A(s.destinationTypeData),e(2),v(s.createStandingInstructionsForm.controls.destination.hasError("required")?63:-1),e(3),c(l(67,73,"labels.inputs.To Office")),e(2),d("disabled",s.ToOfficeId),e(),A(s.toOfficeTypeData),e(2),v(s.createStandingInstructionsForm.controls.toOfficeId.hasError("required")?71:-1),e(3),c(l(75,75,"labels.inputs.Beneficiary")),e(2),d("disabled",s.ToClientId),e(),A(s.toClientTypeData),e(2),v(s.createStandingInstructionsForm.controls.toClientId.hasError("required")?79:-1),e(3),c(l(83,77,"labels.inputs.To Account Type")),e(3),A(s.toAccountTypeData),e(2),v(s.createStandingInstructionsForm.controls.toAccountType.hasError("required")?87:-1),e(3),c(l(91,79,"labels.inputs.To Account")),e(3),A(s.toAccountData),e(2),v(s.createStandingInstructionsForm.controls.toAccountId.hasError("required")?95:-1),e(3),c(l(99,81,"labels.inputs.Standing Instruction Type")),e(3),A(s.instructionTypeData),e(2),v(s.createStandingInstructionsForm.controls.instructionType.hasError("required")?103:-1),e(3),c(l(107,83,"labels.inputs.Amount")),e(3),v(s.createStandingInstructionsForm.controls.amount.hasError("required")?109:-1),e(3),c(l(113,85,"labels.inputs.Validity from")),e(2),d("min",s.minDate)("max",s.maxDate)("matDatepicker",f),e(),d("for",f),e(3),v(s.createStandingInstructionsForm.controls.validFrom.hasError("required")?118:-1),e(3),c(l(122,87,"labels.inputs.Validity To")),e(2),d("min",s.minDate)("max",s.maxDate)("matDatepicker",k),e(),d("for",k),e(3),v(s.createStandingInstructionsForm.controls.validTill.hasError("required")?127:-1),e(3),c(l(131,89,"labels.inputs.Recurrence Type")),e(3),A(s.recurrenceTypeData),e(2),v(s.createStandingInstructionsForm.controls.recurrenceType.hasError("required")?135:-1),e(3),c(l(139,91,"labels.inputs.Interval")),e(3),v(s.createStandingInstructionsForm.controls.recurrenceInterval.hasError("required")?141:-1),e(3),c(l(145,93,"labels.inputs.Recurrence Frequency")),e(3),A(s.recurrenceFrequencyTypeData),e(2),v(s.createStandingInstructionsForm.controls.recurrenceFrequency.hasError("required")?149:-1),e(3),c(l(153,95,"labels.inputs.On Month Day")),e(2),d("min",s.minDate)("max",s.maxDate)("matDatepicker",F),e(),d("for",F),e(3),v(s.createStandingInstructionsForm.controls.recurrenceOnMonthDay.hasError("required")?158:-1),e(2),d("routerLink",U(99,mi)),e(),u(" ",l(162,97,"labels.buttons.Cancel")," "),e(2),d("mifosxHasPermission","CREATE_STANDINGINSTRUCTION")}},dependencies:[q,R,nt,J,bt,K,it,ot,at,rt,W,$,z,lt,Z,X,st,ct,tt,pt,mt,ut,ft,dt,j,Q,V],encapsulation:2})}}return t})();var Ge=t=>({balance:t}),Gi=()=>["../.."];function ji(t,m){t&1&&(n(0,"div",4),C(1,"div",6)(2,"div",7)(3,"div",8)(4,"div",9),i())}function zi(t,m){if(t&1){let a=w();P(0),n(1,"button",23),x("click",function(){b(a);let s=h(4);return S(s.searchAccountByNumber())}),r(2),o(3,"translate"),i(),N()}if(t&2){let a=h(4);e(),d("disabled",a.phoneAccount.length!==10),e(),u(" ",l(3,2,"labels.buttons.Search")," ")}}function Qi(t,m){t&1&&(n(0,"mat-card-actions",17),y(1,zi,4,4,"ng-container",22),i()),t&2&&(e(),d("mifosxHasPermission","CREATE_ACCOUNTTRANSFER"))}function Wi(t,m){if(t&1){let a=w();n(0,"div",10)(1,"div",18)(2,"h3",11),r(3),o(4,"translate"),i(),n(5,"mat-form-field",19)(6,"mat-label"),r(7),o(8,"translate"),i(),n(9,"input",20,0),xe("ngModelChange",function(s){b(a);let f=h(2);return he(f.phoneAccount,s)||(f.phoneAccount=s),S(s)}),i(),n(11,"mat-hint",21),r(12),i()()(),_(13,Qi,2,1,"mat-card-actions",17),i()}if(t&2){let a=h(2);e(3),c(l(4,6,"labels.heading.Transferred To")),e(4),c(l(8,8,"labels.inputs.Phone Number")),e(2),d("readonly",a.interbankTransferForm),Te("ngModel",a.phoneAccount),e(3),u("",a.phoneAccount.length||0,"/10"),e(),v(a.interbankTransferForm?-1:13)}}function Yi(t,m){t&1&&C(0,"mat-divider")}function Ji(t,m){t&1&&(n(0,"mat-error"),r(1),o(2,"translate"),o(3,"translate"),n(4,"strong"),r(5),o(6,"translate"),i()()),t&2&&(e(),g(" ",l(2,3,"labels.inputs.Transaction Date")," ",l(3,5,"labels.commons.is")," "),e(4),c(l(6,7,"labels.commons.required")))}function Ki(t,m){if(t&1&&(n(0,"mat-option",30),r(1),i()),t&2){let a=m.$implicit;d("value",a.id),e(),u(" ",a.name," ")}}function Xi(t,m){t&1&&(n(0,"mat-error"),r(1),o(2,"translate"),o(3,"translate"),n(4,"strong"),r(5),o(6,"translate"),i()()),t&2&&(e(),g(" ",l(2,3,"labels.inputs.Office")," ",l(3,5,"labels.commons.is")," "),e(4),c(l(6,7,"labels.commons.required")))}function Zi(t,m){t&1&&(n(0,"mat-error"),r(1),o(2,"translate"),o(3,"translate"),n(4,"strong"),r(5),o(6,"translate"),i()()),t&2&&(e(),g(" ",l(2,3,"labels.inputs.Client")," ",l(3,5,"labels.commons.is")," "),e(4),c(l(6,7,"labels.commons.required")))}function tn(t,m){if(t&1&&(n(0,"mat-option",30),r(1),i()),t&2){let a=m.$implicit;d("value",a),e(),g(" ",a.id," - ",a.displayName," ")}}function en(t,m){if(t&1&&(n(0,"mat-option",30),r(1),i()),t&2){let a=m.$implicit;d("value",a.id),e(),u(" ",a.value," ")}}function nn(t,m){t&1&&(n(0,"mat-error"),r(1),o(2,"translate"),o(3,"translate"),n(4,"strong"),r(5),o(6,"translate"),i()()),t&2&&(e(),g(" ",l(2,3,"labels.inputs.Account Type")," ",l(3,5,"labels.commons.is")," "),e(4),c(l(6,7,"labels.commons.required")))}function an(t,m){if(t&1&&(n(0,"mat-option",30),r(1),i()),t&2){let a=m.$implicit;d("value",a.id),e(),g(" ",a.productName," - ",a.accountNo," ")}}function rn(t,m){t&1&&(n(0,"mat-error"),r(1),o(2,"translate"),o(3,"translate"),n(4,"strong"),r(5),o(6,"translate"),i()()),t&2&&(e(),g(" ",l(2,3,"labels.inputs.Account")," ",l(3,5,"labels.commons.is")," "),e(4),c(l(6,7,"labels.commons.required")))}function on(t,m){t&1&&(n(0,"mat-error"),r(1),o(2,"translate"),o(3,"translate"),n(4,"strong"),r(5),o(6,"translate"),i()()),t&2&&(e(),g(" ",l(2,3,"labels.inputs.Amount")," ",l(3,5,"labels.commons.is")," "),e(4),c(l(6,7,"labels.commons.required")))}function ln(t,m){if(t&1&&(n(0,"mat-error"),C(1,"fa-icon",38),r(2),o(3,"translate"),i()),t&2){let a=h(3);e(2),u(" ",kt(3,1,"errors.validation.msg.savingsproduct.insufficient.balance",et(4,Ge,a.balance))," ")}}function sn(t,m){t&1&&(n(0,"mat-error"),r(1),o(2,"translate"),o(3,"translate"),n(4,"strong"),r(5),o(6,"translate"),i()()),t&2&&(e(),g(" ",l(2,3,"labels.inputs.Transfer Description")," ",l(3,5,"labels.commons.is")," "),e(4),c(l(6,7,"labels.commons.required")))}function cn(t,m){if(t&1){let a=w();n(0,"form",16)(1,"h3",11),r(2),o(3,"translate"),i(),n(4,"div",24)(5,"mat-form-field",25),x("click",function(){b(a);let s=M(12);return S(s.open())}),n(6,"mat-label"),r(7),o(8,"translate"),i(),C(9,"input",26)(10,"mat-datepicker-toggle",27)(11,"mat-datepicker",null,1),_(13,Ji,7,9,"mat-error"),i(),n(14,"mat-form-field",28)(15,"mat-label"),r(16),o(17,"translate"),i(),n(18,"mat-select",29),x("selectionChange",function(){b(a);let s=h(2);return S(s.changeEvent())}),D(19,Ki,2,2,"mat-option",30,E),i(),_(21,Xi,7,9,"mat-error"),i(),n(22,"mat-form-field",28)(23,"mat-label"),r(24),o(25,"translate"),i(),C(26,"input",31),_(27,Zi,7,9,"mat-error"),i(),n(28,"mat-autocomplete",32,2),D(30,tn,2,3,"mat-option",30,E),i(),n(32,"mat-form-field",28)(33,"mat-label"),r(34),o(35,"translate"),i(),n(36,"mat-select",33),x("selectionChange",function(){b(a);let s=h(2);return S(s.changeEvent())}),D(37,en,2,2,"mat-option",30,E),i(),_(39,nn,7,9,"mat-error"),i(),n(40,"mat-form-field",28)(41,"mat-label"),r(42),o(43,"translate"),i(),n(44,"mat-select",34),x("selectionChange",function(){b(a);let s=h(2);return S(s.changeEvent())}),D(45,an,2,3,"mat-option",30,E),i(),_(47,rn,7,9,"mat-error"),i(),n(48,"mat-form-field",28)(49,"mat-label"),r(50),o(51,"translate"),i(),C(52,"input",35),_(53,on,7,9,"mat-error"),_(54,ln,4,6,"mat-error"),i(),n(55,"mat-form-field",36)(56,"mat-label"),r(57),o(58,"translate"),i(),C(59,"textarea",37),_(60,sn,7,9,"mat-error"),i()()()}if(t&2){let a,p=M(12),s=M(29),f=h(2);d("formGroup",f.makeAccountTransferForm),e(2),c(l(3,23,"labels.heading.Transfer Details")),e(5),c(l(8,25,"labels.inputs.Transaction Date")),e(2),d("min",f.minDate)("max",f.maxDate)("matDatepicker",p),e(),d("for",p),e(3),v(f.makeAccountTransferForm.controls.transferDate.hasError("required")?13:-1),e(3),c(l(17,27,"labels.inputs.Office")),e(3),A(f.toOfficeTypeData),e(2),v(f.makeAccountTransferForm.controls.toOfficeId.hasError("required")?21:-1),e(3),c(l(25,29,"labels.inputs.Client")),e(2),d("matAutocomplete",s),e(),v(f.makeAccountTransferForm.controls.toClientId.hasError("required")?27:-1),e(),d("displayWith",f.displayClient),e(2),A(f.clientsData),e(4),c(l(35,31,"labels.inputs.Account Type")),e(3),A(f.toAccountTypeData),e(2),v(f.makeAccountTransferForm.controls.toAccountType.hasError("required")?39:-1),e(3),c(l(43,33,"labels.inputs.Account")),e(3),A(f.toAccountData),e(2),v(f.makeAccountTransferForm.controls.toAccountId.hasError("required")?47:-1),e(3),c(l(51,35,"labels.inputs.Amount")),e(3),v(f.makeAccountTransferForm.controls.transferAmount.hasError("required")?53:-1),e(),v((a=f.makeAccountTransferForm.get("transferAmount"))!=null&&a.hasError("amountExceedsBalance")?54:-1),e(3),c(l(58,37,"labels.inputs.Description")),e(3),v(f.makeAccountTransferForm.controls.transferDescription.hasError("required")?60:-1)}}function mn(t,m){t&1&&(n(0,"mat-error"),r(1),o(2,"translate"),o(3,"translate"),n(4,"strong"),r(5),o(6,"translate"),i()()),t&2&&(e(),g(" ",l(2,3,"labels.inputs.Transaction Date")," ",l(3,5,"labels.commons.is")," "),e(4),c(l(6,7,"labels.commons.required")))}function pn(t,m){t&1&&(n(0,"mat-error"),r(1),o(2,"translate"),o(3,"translate"),n(4,"strong"),r(5),o(6,"translate"),i()()),t&2&&(e(),g(" ",l(2,3,"labels.inputs.Amount")," ",l(3,5,"labels.commons.is")," "),e(4),c(l(6,7,"labels.commons.required")))}function dn(t,m){t&1&&(n(0,"mat-error"),r(1),o(2,"translate"),o(3,"translate"),i()),t&2&&(e(),g(" ",l(2,2,"labels.inputs.Amount")," ",l(3,4,"labels.commons.mustBeAtLeast")," 0.01 "))}function un(t,m){if(t&1&&(n(0,"mat-error"),C(1,"fa-icon",38),r(2),o(3,"translate"),i()),t&2){let a=h(3);e(2),u(" ",kt(3,1,"errors.validation.msg.savingsproduct.insufficient.balance",et(4,Ge,a.balance))," ")}}function fn(t,m){t&1&&(n(0,"mat-error"),r(1),o(2,"translate"),o(3,"translate"),n(4,"strong"),r(5),o(6,"translate"),i()()),t&2&&(e(),g(" ",l(2,3,"labels.inputs.Transfer Description")," ",l(3,5,"labels.commons.is")," "),e(4),c(l(6,7,"labels.commons.required")))}function Cn(t,m){if(t&1){let a=w();n(0,"form",16)(1,"h3",11),r(2),o(3,"translate"),i(),n(4,"div",24)(5,"mat-form-field",25),x("click",function(){b(a);let s=M(12);return S(s.open())}),n(6,"mat-label"),r(7),o(8,"translate"),i(),C(9,"input",26)(10,"mat-datepicker-toggle",27)(11,"mat-datepicker",null,1),_(13,mn,7,9,"mat-error"),i(),n(14,"mat-form-field",28)(15,"mat-label"),r(16),o(17,"translate"),i(),C(18,"input",39),i(),n(19,"mat-form-field",28)(20,"mat-label"),r(21),o(22,"translate"),i(),C(23,"input",40),i(),n(24,"mat-form-field",28)(25,"mat-label"),r(26),o(27,"translate"),i(),C(28,"input",41),i(),n(29,"mat-form-field",28)(30,"mat-label"),r(31),o(32,"translate"),i(),C(33,"input",42),i(),n(34,"mat-form-field",28)(35,"mat-label"),r(36),o(37,"translate"),i(),C(38,"input",35),_(39,pn,7,9,"mat-error"),_(40,dn,4,6,"mat-error"),_(41,un,4,6,"mat-error"),i(),n(42,"mat-form-field",36)(43,"mat-label"),r(44),o(45,"translate"),i(),C(46,"textarea",37),_(47,fn,7,9,"mat-error"),i()()()}if(t&2){let a,p=M(12),s=h(2);d("formGroup",s.makeAccountTransferForm),e(2),c(l(3,22,"labels.heading.Transfer Details")),e(5),c(l(8,24,"labels.inputs.Transaction Date")),e(2),d("min",s.minDate)("max",s.maxDate)("matDatepicker",p),e(),d("for",p),e(3),v(s.makeAccountTransferForm.controls.transferDate.hasError("required")?13:-1),e(3),c(l(17,26,"labels.inputs.Bank")),e(2),d("readonly",!0),e(3),c(l(22,28,"labels.inputs.Client")),e(2),d("readonly",!0),e(3),c(l(27,30,"labels.inputs.Account Type")),e(2),d("readonly",!0),e(3),c(l(32,32,"labels.inputs.Account")),e(2),d("readonly",!0),e(3),c(l(37,34,"labels.inputs.Amount")),e(3),v(s.makeAccountTransferForm.controls.transferAmount.hasError("required")?39:-1),e(),v(s.makeAccountTransferForm.controls.transferAmount.hasError("min")?40:-1),e(),v((a=s.makeAccountTransferForm.get("transferAmount"))!=null&&a.hasError("amountExceedsBalance")?41:-1),e(3),c(l(45,36,"labels.inputs.Description")),e(3),v(s.makeAccountTransferForm.controls.transferDescription.hasError("required")?47:-1)}}function _n(t,m){if(t&1){let a=w();n(0,"button",45),x("click",function(){b(a);let s=h(4);return S(s.submit())}),r(1),o(2,"translate"),i()}if(t&2){let a=h(4);d("disabled",!a.makeAccountTransferForm.valid),e(),u(" ",l(2,2,"labels.buttons.Submit")," ")}}function vn(t,m){if(t&1){let a=w();n(0,"button",45),x("click",function(){b(a);let s=h(4);return S(s.submit())}),r(1),o(2,"translate"),i()}if(t&2){let a=h(4);d("disabled",!a.makeAccountTransferForm.valid),e(),u(" ",l(2,2,"labels.buttons.Submit")," ")}}function gn(t,m){if(t&1&&(P(0),_(1,_n,3,4,"button",44),_(2,vn,3,4,"button",44),N()),t&2){let a=h(3);e(),v(a.interbank&&a.interbankTransferForm?1:-1),e(),v(a.interbank?-1:2)}}function In(t,m){t&1&&(n(0,"mat-card-actions",17)(1,"button",43),r(2),o(3,"translate"),i(),y(4,gn,3,2,"ng-container",22),i()),t&2&&(e(),d("routerLink",U(5,Gi)),e(),u(" ",l(3,3,"labels.buttons.Cancel")," "),e(2),d("mifosxHasPermission","CREATE_ACCOUNTTRANSFER"))}function Tn(t,m){if(t&1&&(n(0,"mat-card",5)(1,"mat-card-content")(2,"div",10)(3,"h3",11),r(4),o(5,"translate"),i(),C(6,"mat-divider"),n(7,"div",12)(8,"div",13)(9,"div",14),r(10),o(11,"translate"),i(),n(12,"div",15),r(13),i()(),n(14,"div",13)(15,"div",14),r(16),o(17,"translate"),i(),n(18,"div",15),r(19),i()(),n(20,"div",13)(21,"div",14),r(22),o(23,"translate"),i(),n(24,"div",15),r(25),i()(),n(26,"div",13)(27,"div",14),r(28),o(29,"translate"),i(),n(30,"div",15),r(31),i()(),n(32,"div",13)(33,"div",14),r(34),o(35,"translate"),i(),n(36,"div",15),r(37),i()()()(),_(38,Wi,14,10,"div",10),_(39,Yi,1,0,"mat-divider"),_(40,cn,61,39,"form",16),_(41,Cn,48,38,"form",16),i(),_(42,In,5,6,"mat-card-actions",17),i()),t&2){let a=h();e(4),c(l(5,17,"labels.heading.Transferring From Details")),e(6),c(l(11,19,"labels.inputs.Applicant")),e(3),c(a.accountTransferTemplateData.fromClient.displayName),e(3),c(l(17,21,"labels.inputs.Office")),e(3),c(a.accountTransferTemplateData.fromOffice.name),e(3),c(l(23,23,"labels.inputs.From Account")),e(3),g(" ",a.accountTransferTemplateData.fromAccount.productName,"\xA0-\xA0#",a.accountTransferTemplateData.fromAccount.accountNo," "),e(3),c(l(29,25,"labels.inputs.From Account Type")),e(3),c(a.accountTransferTemplateData.fromAccountType.value),e(3),c(l(35,27,"labels.inputs.Currency")),e(3),c(a.accountTransferTemplateData.currency.name),e(),v(a.interbank?38:-1),e(),v(a.interbank?-1:39),e(),v(!a.interbank&&a.makeAccountTransferForm?40:-1),e(),v(a.interbank&&a.interbankTransferForm&&a.makeAccountTransferForm?41:-1),e(),v(!a.isLoading&&a.makeAccountTransferForm?42:-1)}}var ne=(()=>{class t{constructor(){this.formBuilder=T(St),this.route=T(H),this.router=T(ht),this.accountTransfersService=T(B),this.dateUtils=T(xt),this.settingsService=T(Y),this.clientsService=T(He),this.minDate=new Date(2e3,0,1),this.maxDate=new Date(2100,0,1),this.interbank=!1,this.phoneAccount="",this.interbankTransferForm=!1,this.balance=0,this.isLoading=!1,this.route.data.subscribe(a=>{this.accountTransferTemplateData=a.accountTransferTemplate,this.setParams(),this.setOptions()})}setParams(){switch(this.accountType=this.route.snapshot.queryParams.accountType,this.accountType){case"fromloans":this.accountTypeId="1",this.id=this.route.snapshot.queryParams.loanId;break;case"fromsavings":case"interbank":this.accountTypeId="2",this.id=this.route.snapshot.queryParams.savingsId,this.interbank=this.route.snapshot.queryParams.interbank==="true";let a=this.router.currentNavigation()?.extras?.state?.balance,p=this.accountTransferTemplateData?.fromAccount?.availableBalance??this.accountTransferTemplateData?.fromAccount?.summary?.accountBalance??this.accountTransferTemplateData?.fromAccount?.balance??0;this.balance=typeof a=="number"?a:p;break;default:this.accountTypeId="0"}}ngOnInit(){this.maxDate=this.settingsService.businessDate,this.interbank?this.createEmptyInterbankForm():this.createMakeAccountTransferForm()}createEmptyInterbankForm(){this.makeAccountTransferForm=this.formBuilder.group({toBank:["",I.required],toClientId:["",I.required],toAccountType:["",I.required],toAccountId:["",I.required],transferAmount:[0,[I.required,I.min(.01),this.amountExceedsBalanceValidator.bind(this)]],transferDate:[this.settingsService.businessDate,I.required],transferDescription:["",I.required]})}createMakeAccountTransferForm(){this.makeAccountTransferForm=this.formBuilder.group({toOfficeId:["",I.required],toClientId:["",I.required],toAccountType:["",I.required],toAccountId:["",I.required],transferAmount:[this.accountTransferTemplateData.transferAmount,[I.required,I.min(.01),this.amountExceedsBalanceValidator.bind(this)]],transferDate:[this.settingsService.businessDate,I.required],transferDescription:["",I.required]})}createMakeAccountInterbankTransferForm(a){if(!a){console.error("Account data is undefined"),this.isLoading=!1;return}let p=this.accountTransferTemplateData?.transferAmount>0?this.accountTransferTemplateData.transferAmount:1;this.makeAccountTransferForm=this.formBuilder.group({toBank:[a.destinationFspId||"",I.required],toClientId:[(a.firstName||a.firsName||"")+" "+(a.lastName||""),I.required],toAccountType:["Saving Account",I.required],toAccountId:[a.partyId||"",I.required],transferAmount:[p,[I.required,I.min(.01),this.amountExceedsBalanceValidator.bind(this)]],transferDate:[this.settingsService.businessDate,I.required],transferDescription:["Transferencia interbancaria",I.required]}),this.isLoading=!1}amountExceedsBalanceValidator(a){return a.value>this.balance?{amountExceedsBalance:!0}:null}setOptions(){this.toOfficeTypeData=this.accountTransferTemplateData.toOfficeOptions,this.toAccountTypeData=this.accountTransferTemplateData.toAccountTypeOptions,this.toAccountData=this.accountTransferTemplateData.toAccountOptions}changeEvent(){let a=this.refineObject(this.makeAccountTransferForm.value);this.accountTransfersService.newAccountTranferResource(this.id,this.accountTypeId,a).subscribe(p=>{this.accountTransferTemplateData=p,this.toClientTypeData=p.toClientOptions,this.setOptions()})}refineObject(a){delete a.transferAmount,delete a.transferDate,delete a.transferDescription,a.toClientId&&typeof a.toClientId=="object"&&(a.toClientId=a.toClientId.id);let p=Object.getOwnPropertyNames(a);for(let s=0;s{typeof a=="string"&&a.length>=2&&(this.clientsService.getFilteredClients("displayName","ASC",!0,a).subscribe(p=>{this.clientsData=p.pageItems}),this.changeEvent())})}displayClient(a){return a?a.displayName:void 0}submit(){this.interbank?this.makeInterbankTransfer():this.makeTransfer()}makeTransfer(){this.isLoading=!0;let a=this.settingsService.dateFormat,p=this.settingsService.language.code,s;typeof this.makeAccountTransferForm.controls.toClientId.value=="object"?s=this.makeAccountTransferForm.controls.toClientId.value.id:s=this.makeAccountTransferForm.controls.toClientId.value;let f=Nt(Pt({},this.makeAccountTransferForm.value),{transferDate:this.dateUtils.formatDate(this.makeAccountTransferForm.value.transferDate,a),dateFormat:a,locale:p,toClientId:s,fromAccountId:this.id,fromAccountType:this.accountTypeId,fromClientId:this.accountTransferTemplateData.fromClient.id,fromOfficeId:this.accountTransferTemplateData.fromClient.officeId});this.accountTransfersService.createAccountTransfer(f).subscribe(()=>{this.isLoading=!1,this.router.navigate(["../../transactions"],{relativeTo:this.route})})}makeInterbankTransfer(){if(this.isLoading=!0,!this.makeAccountTransferForm.valid){console.error("Interbank form is not valid"),this.isLoading=!1;return}let a={homeTransactionId:crypto.randomUUID(),from:{fspId:De.fineractPlatformTenantId,idType:"MSISDN",idValue:this.accountTransferTemplateData.fromAccount.externalId?.trim()||""},to:{fspId:this.makeAccountTransferForm.controls.toBank.value,idType:"MSISDN",idValue:this.makeAccountTransferForm.controls.toAccountId.value},amountType:"SEND",amount:{currencyCode:this.accountTransferTemplateData.currency.code,amount:this.makeAccountTransferForm.controls.transferAmount.value},transactionType:{scenario:"TRANSFER",subScenario:"DOMESTIC",initiator:"PAYER",initiatorType:"CUSTOMER"},note:this.makeAccountTransferForm.controls.transferDescription.value};this.accountTransfersService.sendInterbankTransfer(JSON.stringify(a)).subscribe(p=>{p.systemMessage&&(this.isLoading=!1,this.router.navigate(["../../transactions"],{relativeTo:this.route}))},p=>{console.error("Interbank transfer error:",p),this.isLoading=!1})}searchAccountByNumber(){!this.phoneAccount||this.phoneAccount.length!==10||(this.isLoading=!0,this.accountTransfersService.getAccountByNumber(this.phoneAccount,this.accountTransferTemplateData.currency.code).subscribe(a=>{this.interbankTransferForm=!0,this.createMakeAccountInterbankTransferForm(a)},a=>{console.error("searching account error:",a),this.isLoading=!1}))}static{this.\u0275fac=function(p){return new(p||t)}}static{this.\u0275cmp=O({type:t,selectors:[["mifosx-make-account-transfers"]],decls:3,vars:2,consts:[["input",""],["transferDatePicker",""],["clientsAutocomplete","matAutocomplete"],[1,"container"],[1,"loader-wrapper"],[1,"transfer-card"],[1,"bottom","triangle"],[1,"top","triangle"],[1,"left","triangle"],[1,"right","triangle"],[1,"section-container"],[1,"section-title","transfer-heading"],[1,"info-grid"],[1,"info-row"],[1,"info-label"],[1,"info-value"],[1,"transfer-form",3,"formGroup"],[1,"action-buttons"],[1,"interbank-section"],[1,"full-width"],["matInput","","type","tel","maxlength","10","required","","placeholder","Enter phone number","title","Phone number",3,"ngModelChange","readonly","ngModel"],["align","end"],[4,"mifosxHasPermission"],["mat-raised-button","","color","primary","id","search-button",1,"primary-button",3,"click","disabled"],[1,"form-grid"],[1,"form-field",3,"click"],["matInput","","required","","formControlName","transferDate","placeholder","Select date","title","Transaction Date",3,"min","max","matDatepicker"],["matSuffix","",3,"for"],[1,"form-field"],["required","","formControlName","toOfficeId",3,"selectionChange"],[3,"value"],["matInput","","formControlName","toClientId","placeholder","Select or type client name","title","Client name",3,"matAutocomplete"],["autoActiveFirstOption","",3,"displayWith"],["required","","formControlName","toAccountType",3,"selectionChange"],["required","","formControlName","toAccountId",3,"selectionChange"],["type","number","matInput","","required","","formControlName","transferAmount","placeholder","Enter amount","title","Transfer amount","min","0.01","step","0.01"],[1,"form-field","description-field"],["matInput","","formControlName","transferDescription","cdkTextareaAutosize","","cdkAutosizeMinRows","2","placeholder","Enter transfer description","title","Transfer description"],["icon","exclamation-triangle","size","md"],["matInput","","formControlName","toBank","placeholder","Bank","title","Bank",3,"readonly"],["matInput","","formControlName","toClientId","placeholder","Client","title","Client",3,"readonly"],["matInput","","formControlName","toAccountType","placeholder","Account Type","title","Account Type",3,"readonly"],["matInput","","formControlName","toAccountId","placeholder","Account","title","Account",3,"readonly"],["type","button","mat-raised-button","",1,"cancel-button",3,"routerLink"],["mat-raised-button","","color","primary",1,"primary-button",3,"disabled"],["mat-raised-button","","color","primary",1,"primary-button",3,"click","disabled"]],template:function(p,s){p&1&&(n(0,"div",3),_(1,ji,5,0,"div",4),_(2,Tn,43,29,"mat-card",5),i()),p&2&&(e(),v(s.isLoading?1:-1),e(),v(s.isLoading?-1:2))},dependencies:[q,R,nt,J,bt,K,it,ot,Be,ke,at,rt,W,$,z,lt,Z,X,st,ct,we,tt,pt,mt,ut,ft,dt,j,Q,vt,Fe,Ae,qe,Ne,_t,Lt,V],styles:[".container[_ngcontent-%COMP%]{max-width:42rem;margin:0 auto;padding:1rem}.transfer-card[_ngcontent-%COMP%]{border-radius:8px;box-shadow:0 2px 10px #00000014;margin-bottom:1.5rem;overflow:hidden}.section-container[_ngcontent-%COMP%]{margin-bottom:2rem}.section-title[_ngcontent-%COMP%]{font-size:1.25rem;font-weight:600;color:#333;margin:0 0 1rem;padding-bottom:.5rem;border-bottom:1px solid rgba(0,0,0,.12)}.section-title.transfer-heading[_ngcontent-%COMP%]{font-weight:700}.info-grid[_ngcontent-%COMP%]{display:grid;grid-template-columns:100%;gap:.75rem}@media (width >= 768px){.info-grid[_ngcontent-%COMP%]{grid-template-columns:repeat(2,50%)}}.info-row[_ngcontent-%COMP%]{display:flex;align-items:center;padding:.5rem;background-color:#00000005;border-radius:4px}.info-row[_ngcontent-%COMP%]:hover{background-color:#0000000a}.info-label[_ngcontent-%COMP%]{flex:0 0 40%;color:#000000b3;font-weight:500}.info-value[_ngcontent-%COMP%]{flex:1;color:#000000de}mat-divider[_ngcontent-%COMP%]{margin:1rem 0}.interbank-section[_ngcontent-%COMP%]{margin-bottom:1rem}.transfer-form[_ngcontent-%COMP%]{margin-top:1rem}.form-grid[_ngcontent-%COMP%]{display:grid;grid-template-columns:100%;gap:1rem}@media (width >= 768px){.form-grid[_ngcontent-%COMP%]{grid-template-columns:repeat(2,1fr);gap:1.5rem}}.form-row[_ngcontent-%COMP%]{display:contents}.form-field[_ngcontent-%COMP%]{width:100%;margin-bottom:.5rem}@media (width >= 768px){.form-field[_ngcontent-%COMP%]:nth-child(odd){margin-right:.5rem}}@media (width >= 768px){.form-field[_ngcontent-%COMP%]:nth-child(2n){margin-left:.5rem}}.form-field.description-field[_ngcontent-%COMP%]{grid-column:1/-1}.form-field.description-field[_ngcontent-%COMP%] textarea[_ngcontent-%COMP%]{min-height:80px;resize:vertical} .mat-form-field{width:100%}.action-buttons[_ngcontent-%COMP%]{display:flex;justify-content:flex-end;gap:1rem;padding:1rem 1.5rem;margin-top:1rem}@media (width <= 576px){.action-buttons[_ngcontent-%COMP%]{flex-direction:column}}.action-buttons[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{min-width:120px}@media (width <= 576px){.action-buttons[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{width:100%;margin-bottom:.5rem}}.action-buttons[_ngcontent-%COMP%] .cancel-button[_ngcontent-%COMP%]{background-color:#f5f5f5;color:#000000de;box-shadow:0 1px 3px #0000001f}.action-buttons[_ngcontent-%COMP%] .cancel-button[_ngcontent-%COMP%]:hover{background-color:#e0e0e0;box-shadow:0 2px 5px #0000002e}.action-buttons[_ngcontent-%COMP%] .primary-button[_ngcontent-%COMP%]{background-color:#f5f5f5;color:#000000de;font-weight:400;border:none;box-shadow:none}.action-buttons[_ngcontent-%COMP%] .primary-button[_ngcontent-%COMP%]:hover{background-color:#e0e0e0;box-shadow:0 2px 5px #0000002e}.loader-wrapper[_ngcontent-%COMP%]{display:flex;justify-content:center;align-items:center;height:300px;position:relative}@keyframes _ngcontent-%COMP%_rotate-triangle{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.triangle[_ngcontent-%COMP%]{position:absolute;width:0;height:0;border-left:20px solid transparent;border-right:20px solid transparent;border-bottom:34px solid rgba(0,0,0,.05);animation:_ngcontent-%COMP%_rotate-triangle 1.5s infinite linear}.triangle[_ngcontent-%COMP%]:hover{border-bottom-color:#00000014}.dark-theme[_ngcontent-%COMP%] .info-label[_ngcontent-%COMP%]{color:#ffffffb3}.dark-theme[_ngcontent-%COMP%] .info-value[_ngcontent-%COMP%]{color:#ffffffde}.dark-theme[_ngcontent-%COMP%] .section-title[_ngcontent-%COMP%]{color:#fff;border-bottom-color:#ffffff1f}.dark-theme[_ngcontent-%COMP%] .transfer-heading[_ngcontent-%COMP%]{color:#fff;font-weight:700}.dark-theme[_ngcontent-%COMP%] .action-buttons[_ngcontent-%COMP%] .cancel-button[_ngcontent-%COMP%]{background-color:#424242;color:#ffffffde}.dark-theme[_ngcontent-%COMP%] .action-buttons[_ngcontent-%COMP%] .cancel-button[_ngcontent-%COMP%]:hover{background-color:#505050}.dark-theme[_ngcontent-%COMP%] .action-buttons[_ngcontent-%COMP%] .primary-button[_ngcontent-%COMP%]{background-color:#424242;color:#ffffffde;font-weight:400;border:none;box-shadow:none}.dark-theme[_ngcontent-%COMP%] .action-buttons[_ngcontent-%COMP%] .primary-button[_ngcontent-%COMP%]:hover{background-color:#505050}.dark-theme[_nghost-%COMP%] .transfer-heading[_ngcontent-%COMP%], .dark-theme [_nghost-%COMP%] .transfer-heading[_ngcontent-%COMP%]{color:#fff;font-weight:700}.dark-theme[_nghost-%COMP%] .action-buttons[_ngcontent-%COMP%] .cancel-button[_ngcontent-%COMP%], .dark-theme [_nghost-%COMP%] .action-buttons[_ngcontent-%COMP%] .cancel-button[_ngcontent-%COMP%]{background-color:#424242;color:#ffffffde}.dark-theme[_nghost-%COMP%] .action-buttons[_ngcontent-%COMP%] .primary-button[_ngcontent-%COMP%], .dark-theme [_nghost-%COMP%] .action-buttons[_ngcontent-%COMP%] .primary-button[_ngcontent-%COMP%]{background-color:#424242;color:#ffffffde;font-weight:400;border:none;box-shadow:none}body.dark-theme[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .section-title[_ngcontent-%COMP%]{color:#fff}body.dark-theme[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .transfer-heading[_ngcontent-%COMP%]{color:#fff;font-weight:700}body.dark-theme[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .action-buttons[_ngcontent-%COMP%] .cancel-button[_ngcontent-%COMP%]{background-color:#424242;color:#ffffffde}body.dark-theme[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .action-buttons[_ngcontent-%COMP%] .primary-button[_ngcontent-%COMP%]{background-color:#424242;color:#ffffffde;font-weight:400;border:none;box-shadow:none} mat-form-field.error-warn.mat-form-field-invalid .mat-form-field-ripple{background-color:#000000de!important} mat-form-field.error-warn.mat-form-field-invalid .mat-form-field-label{color:#0009!important} mat-form-field.error-warn.mat-form-field-invalid .mat-form-field-label .mat-form-field-required-marker{color:#0009!important} mat-form-field.error-warn.mat-form-field-invalid .mat-error{color:#0009!important} .mat-form-field-flex{align-items:center}.transfer-form[_ngcontent-%COMP%] .form-field[_ngcontent-%COMP%]{margin-bottom:1rem}.readonly-field[_ngcontent-%COMP%]{background-color:#00000005;cursor:not-allowed} .mat-input-element{font-size:14px}"]})}}return t})();var hn=["instructionsTable"],xn=()=>[10,25,50,100],bn=t=>["../",t,"edit"],Sn=t=>["../",t,"view"];function yn(t,m){if(t&1&&(n(0,"div",3)(1,"span",24)(2,"h3",25),r(3),o(4,"translate"),i()(),n(5,"span",26)(6,"h3",25),r(7),i()()()),t&2){let a=h();e(3),c(l(4,2,"labels.heading.Client Type")),e(4),c(a.clientName)}}function En(t,m){if(t&1&&(n(0,"div",3)(1,"mat-form-field",27),C(2,"input",28),i(),n(3,"mat-form-field",27),C(4,"input",29),i()()),t&2){let a=h();e(2),d("formControl",a.clientNameControl),e(2),d("formControl",a.fromClientId)}}function Dn(t,m){if(t&1&&(n(0,"mat-option",7),r(1),i()),t&2){let a=m.$implicit;d("value",a.id),e(),u(" ",a.value," ")}}function An(t,m){if(t&1){let a=w();n(0,"button",30),x("click",function(){b(a);let s=h();return S(s.filterStandingInstructions())}),r(1),o(2,"translate"),o(3,"titlecase"),i()}t&2&&(e(),u(" ",l(3,3,l(2,1,"labels.buttons.Filter"))," "))}function Mn(t,m){t&1&&(n(0,"th",31),r(1),o(2,"translate"),i()),t&2&&(e(),c(l(2,1,"labels.inputs.Client")))}function kn(t,m){if(t&1&&(n(0,"td",32),r(1),i()),t&2){let a=m.$implicit;e(),g(" ",a.fromClient.displayName,"-",a.fromClient.id," ")}}function Bn(t,m){t&1&&(n(0,"th",31),r(1),o(2,"translate"),i()),t&2&&(e(),c(l(2,1,"labels.inputs.From Account")))}function Fn(t,m){if(t&1&&(n(0,"td",32),r(1),i()),t&2){let a=m.$implicit;e(),g(" ",a.fromAccount.accountNo," (",a.fromAccountType.value,") ")}}function wn(t,m){t&1&&(n(0,"th",31),r(1),o(2,"translate"),i()),t&2&&(e(),c(l(2,1,"labels.inputs.Beneficiary")))}function On(t,m){if(t&1&&(n(0,"td",32),r(1),i()),t&2){let a=m.$implicit;e(),c(a.toClient.displayName)}}function Pn(t,m){t&1&&(n(0,"th",31),r(1),o(2,"translate"),i()),t&2&&(e(),c(l(2,1,"labels.inputs.To Account")))}function Nn(t,m){if(t&1&&(n(0,"td",32),r(1),i()),t&2){let a=m.$implicit;e(),g(" ",a.toAccount.accountNo," (",a.toAccountType.value,") ")}}function qn(t,m){t&1&&(n(0,"th",31),r(1),o(2,"translate"),i()),t&2&&(e(),c(l(2,1,"labels.inputs.Amount")))}function Vn(t,m){if(t&1&&(n(0,"td",32),r(1),i()),t&2){let a=m.$implicit;e(),g("",a.instructionType.value,"/",a.amount)}}function Rn(t,m){t&1&&(n(0,"th",31),r(1),o(2,"translate"),i()),t&2&&(e(),c(l(2,1,"labels.inputs.Validity")))}function Ln(t,m){if(t&1&&(n(0,"td",32),r(1),o(2,"dateFormat"),o(3,"dateFormat"),i()),t&2){let a=m.$implicit;e(),g(" ",l(2,2,a.validFrom)," to ",l(3,4,a.validTill)," ")}}function Hn(t,m){t&1&&(n(0,"th",31),r(1),o(2,"translate"),i()),t&2&&(e(),c(l(2,1,"labels.inputs.Actions")))}function $n(t,m){if(t&1&&(n(0,"button",34),o(1,"translate"),C(2,"i",35),i()),t&2){let a=h(2).$implicit;d("matTooltip",Rt(l(1,3,"tooltips.Edit Standing Instruction")))("routerLink",et(5,bn,a.id))}}function Un(t,m){t&1&&(n(0,"span"),y(1,$n,3,7,"button",33),i()),t&2&&(e(),d("mifosxHasPermission","UPDATE_STANDINGINSTRUCTION"))}function Gn(t,m){if(t&1){let a=w();n(0,"button",37),o(1,"translate"),x("click",function(){b(a);let s=h(2).$implicit,f=h();return S(f.deleteStandingInstruction(s.id))}),C(2,"i",38),i()}t&2&&d("matTooltip",Rt(l(1,2,"tooltips.Delete Standing Instruction")))}function jn(t,m){t&1&&(n(0,"span"),y(1,Gn,3,4,"button",36),i()),t&2&&(e(),d("mifosxHasPermission","DELETE_STANDINGINSTRUCTION"))}function zn(t,m){if(t&1&&(n(0,"button",34),o(1,"translate"),C(2,"i",39),i()),t&2){let a=h().$implicit;d("matTooltip",Rt(l(1,3,"tooltips.View Standing Instruction")))("routerLink",et(5,Sn,a.id))}}function Qn(t,m){if(t&1&&(n(0,"td",32),_(1,Un,2,1,"span"),_(2,jn,2,1,"span"),y(3,zn,3,7,"button",33),i()),t&2){let a=m.$implicit;e(),v(a.status.value!=="Deleted"?1:-1),e(),v(a.status.value!=="Deleted"?2:-1),e(),d("mifosxHasPermission","READ_STANDINGINSTRUCTION")}}function Wn(t,m){t&1&&C(0,"tr",40)}function Yn(t,m){t&1&&C(0,"tr",41)}var ae=(()=>{class t{constructor(){this.route=T(H),this.accountTransfersService=T(B),this.settingsService=T(Y),this.dialog=T(Ee),this.transferType=new Bt,this.fromAccountId=new Bt,this.clientNameControl=new Bt,this.fromClientId=new Bt,this.dataSource=new Ft,this.displayedColumns=["client","fromAccount","beneficiary","toAccount","amount","validity","actions"],this.route.data.subscribe(a=>{this.standingIntructionsTemplateData=a.standingIntructionsTemplate,a.standingIntructionsTemplate.fromClient&&(this.clientName=this.standingIntructionsTemplateData.fromClient.displayName,this.getStandingInstructions()),this.setParams(),this.transferTypeDatas=this.standingIntructionsTemplateData.transferTypeOptions})}setParams(){switch(this.accountType=this.route.snapshot.queryParams.accountType,this.accountType){case"fromloans":this.accountTypeId="1";break;case"fromsavings":this.accountTypeId="2";break;default:this.accountTypeId="0"}this.isFromClient=!!this.route.parent.parent.snapshot.params.clientId}filterStandingInstructions(){this.getStandingInstructions()}getStandingInstructions(){let a=this.settingsService.dateFormat,p=this.settingsService.language.code,s={clientId:this.standingIntructionsTemplateData.fromClient.id||this.fromClientId.value,clientName:this.standingIntructionsTemplateData.fromClient.displayName||this.clientNameControl.value,locale:p,dateFormat:a,limit:14,offset:0,fromAccountType:this.accountTypeId,fromAccountId:this.fromAccountId.value,fromTransferType:this.transferType.value};this.accountTransfersService.getStandingInstructions(s).subscribe(f=>{this.instructionsData=f.pageItems,this.dataSource.data=this.instructionsData,this.instructionTableRef.renderRows()})}deleteStandingInstruction(a){this.dialog.open(Pe,{data:{deleteContext:`standing instruction id: ${a}`}}).afterClosed().subscribe(s=>{s.delete&&this.accountTransfersService.deleteStandingInstrucions(a).subscribe(()=>{})})}static{this.\u0275fac=function(p){return new(p||t)}}static{this.\u0275cmp=O({type:t,selectors:[["mifosx-list-standing-instructions"]],viewQuery:function(p,s){if(p&1&&(Dt(hn,7),Dt(yt,7)),p&2){let f;At(f=Mt())&&(s.instructionTableRef=f.first),At(f=Mt())&&(s.paginator=f.first)}},decls:41,vars:15,consts:[["instructionsTable",""],[1,"container"],[1,"layout-row-wrap","gap-2px","responsive-column"],[1,"flex-fill"],[3,"inset"],[1,"type-field"],[3,"formControl"],[3,"value"],[1,"account-Id-field"],["matInput","","placeholder","From Account Id",3,"formControl"],["mat-raised-button","","color","primary","class","filter-button",3,"click",4,"mifosxHasPermission"],["mat-table","",3,"dataSource"],["matColumnDef","client"],["mat-header-cell","",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","fromAccount"],["matColumnDef","beneficiary"],["matColumnDef","toAccount"],["matColumnDef","amount"],["matColumnDef","validity"],["matColumnDef","actions"],["mat-header-row","",4,"matHeaderRowDef"],["mat-row","",4,"matRowDef","matRowDefColumns"],["showFirstLastButtons","",3,"pageSize","pageSizeOptions"],[1,"flex-40"],[1,"mat-h3"],[1,"client-Name"],[1,"flex-30"],["matInput","","placeholder","ClientName",3,"formControl"],["matInput","","placeholder","From Client Id",3,"formControl"],["mat-raised-button","","color","primary",1,"filter-button",3,"click"],["mat-header-cell",""],["mat-cell",""],["class","account-action-button","mat-raised-button","","color","primary",3,"matTooltip","routerLink",4,"mifosxHasPermission"],["mat-raised-button","","color","primary",1,"account-action-button",3,"matTooltip","routerLink"],[1,"fa","fa-edit"],["class","account-action-button","mat-raised-button","","color","warn",3,"matTooltip","click",4,"mifosxHasPermission"],["mat-raised-button","","color","warn",1,"account-action-button",3,"click","matTooltip"],[1,"fa","fa-times"],[1,"fa","fa-eye"],["mat-header-row",""],["mat-row",""]],template:function(p,s){p&1&&(n(0,"mat-card",1)(1,"div",2),_(2,yn,8,4,"div",3),_(3,En,5,2,"div",3),C(4,"mat-divider",4),n(5,"mat-form-field",5)(6,"mat-label"),r(7),o(8,"translate"),i(),n(9,"mat-select",6),D(10,Dn,2,2,"mat-option",7,E),i()(),n(12,"mat-form-field",8),C(13,"input",9),i(),y(14,An,4,5,"button",10),i(),n(15,"table",11,0),P(17,12),y(18,Mn,3,3,"th",13)(19,kn,2,2,"td",14),N(),P(20,15),y(21,Bn,3,3,"th",13)(22,Fn,2,2,"td",14),N(),P(23,16),y(24,wn,3,3,"th",13)(25,On,2,1,"td",14),N(),P(26,17),y(27,Pn,3,3,"th",13)(28,Nn,2,2,"td",14),N(),P(29,18),y(30,qn,3,3,"th",13)(31,Vn,2,2,"td",14),N(),P(32,19),y(33,Rn,3,3,"th",13)(34,Ln,4,6,"td",14),N(),P(35,20),y(36,Hn,3,3,"th",13)(37,Qn,4,3,"td",14),N(),y(38,Wn,1,0,"tr",21)(39,Yn,1,0,"tr",22),i(),C(40,"mat-paginator",23),i()),p&2&&(e(2),v(s.isFromClient?2:-1),e(),v(s.isFromClient?-1:3),e(),d("inset",!0),e(3),c(l(8,12,"labels.inputs.Type")),e(2),d("formControl",s.transferType),e(),A(s.transferTypeDatas),e(3),d("formControl",s.fromAccountId),e(),d("mifosxHasPermission","READ_STANDINGINSTRUCTION"),e(),d("dataSource",s.dataSource),e(23),d("matHeaderRowDef",s.displayedColumns),e(),d("matRowDefColumns",s.displayedColumns),e(),d("pageSize",10)("pageSizeOptions",U(14,xn)))},dependencies:[q,R,J,K,Me,W,$,Z,X,tt,pt,mt,j,Q,vt,Ht,Gt,Ut,jt,$t,zt,Oe,Qt,Yt,Wt,Jt,yt,ye,Ct,V],styles:[".container[_ngcontent-%COMP%] .filter-button[_ngcontent-%COMP%]{height:2.5rem;margin-top:2rem}table[_ngcontent-%COMP%]{width:100%}table[_ngcontent-%COMP%] .account-action-button[_ngcontent-%COMP%]{min-width:26px;padding:0 6px;margin:4px;line-height:25px}.mat-divider[_ngcontent-%COMP%]{border-top-color:#fff}"]})}}return t})();var Jn=()=>[5,10,25,50,100];function Kn(t,m){t&1&&(n(0,"th",16),r(1),o(2,"translate"),i()),t&2&&(e(),c(l(2,1,"labels.inputs.Transaction Date")))}function Xn(t,m){if(t&1&&(n(0,"td",17),r(1),o(2,"dateFormat"),i()),t&2){let a=m.$implicit;e(),c(l(2,1,a.transferDate))}}function Zn(t,m){t&1&&(n(0,"th",16),r(1),o(2,"translate"),i()),t&2&&(e(),c(l(2,1,"labels.inputs.Amount")))}function ta(t,m){if(t&1&&(n(0,"td",17),r(1),i()),t&2){let a=m.$implicit;e(),c(a.transferAmount)}}function ea(t,m){t&1&&(n(0,"th",16),r(1),o(2,"translate"),i()),t&2&&(e(),c(l(2,1,"labels.inputs.Notes")))}function ia(t,m){if(t&1&&(n(0,"td",17),r(1),i()),t&2){let a=m.$implicit;e(),c(a.transferDescription)}}function na(t,m){t&1&&(n(0,"th",16),r(1),o(2,"translate"),i()),t&2&&(e(),c(l(2,1,"labels.inputs.Reversed")))}function aa(t,m){if(t&1&&(n(0,"td",17),r(1),o(2,"yesNo"),i()),t&2){let a=m.$implicit;e(),c(l(2,1,a.reversed))}}function ra(t,m){t&1&&C(0,"tr",18)}function oa(t,m){t&1&&C(0,"tr",19)}var re=(()=>{class t{constructor(){this.route=T(H),this.dataSource=new Ft,this.displayedColumns=["transactionDate","amount","notes","reversed"],this.route.data.subscribe(a=>{this.listTransactionData=a.listTransactionData,this.dataSource=new Ft(this.listTransactionData.transactions.pageItems),this.dataSource.paginator=this.paginator})}static{this.\u0275fac=function(p){return new(p||t)}}static{this.\u0275cmp=O({type:t,selectors:[["mifosx-list-transactions"]],viewQuery:function(p,s){if(p&1&&Dt(yt,7),p&2){let f;At(f=Mt())&&(s.paginator=f.first)}},decls:36,vars:19,consts:[[1,"container","m-b-20"],[1,"mat-elevation-z8"],[1,"layout-row-wrap"],[1,"flex-25","header"],[1,"flex-25"],[1,"mat-elevation-z8","container"],["mat-table","",3,"dataSource"],["matColumnDef","transactionDate"],["mat-header-cell","",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","amount"],["matColumnDef","notes"],["matColumnDef","reversed"],["mat-header-row","",4,"matHeaderRowDef"],["mat-row","",4,"matRowDef","matRowDefColumns"],["showFirstLastButtons","",3,"pageSizeOptions"],["mat-header-cell",""],["mat-cell",""],["mat-header-row",""],["mat-row",""]],template:function(p,s){p&1&&(n(0,"div",0)(1,"mat-card",1)(2,"mat-card-content")(3,"div",2)(4,"div",3),r(5),o(6,"translate"),i(),n(7,"div",4),r(8),i(),n(9,"div",3),r(10),o(11,"translate"),i(),n(12,"div",4),r(13),i(),n(14,"div",3),r(15),o(16,"translate"),i(),n(17,"div",4),r(18),i()()()()(),n(19,"div",5)(20,"table",6),P(21,7),y(22,Kn,3,3,"th",8)(23,Xn,3,3,"td",9),N(),P(24,10),y(25,Zn,3,3,"th",8)(26,ta,2,1,"td",9),N(),P(27,11),y(28,ea,3,3,"th",8)(29,ia,2,1,"td",9),N(),P(30,12),y(31,na,3,3,"th",8)(32,aa,3,3,"td",9),N(),y(33,ra,1,0,"tr",13)(34,oa,1,0,"tr",14),i(),C(35,"mat-paginator",15),i()),p&2&&(e(5),u(" ",l(6,12,"labels.inputs.From Account")," "),e(3),g(" ",s.listTransactionData.fromAccount.accountNo,"(",s.listTransactionData.fromAccountType.value,") "),e(2),u(" ",l(11,14,"labels.inputs.To Account")," "),e(3),g(" ",s.listTransactionData.toAccount.accountNo,"(",s.listTransactionData.toAccountType.value,") "),e(2),u(" ",l(16,16,"labels.inputs.Destination")," "),e(3),u(" ",s.listTransactionData.toClient.displayName," "),e(2),d("dataSource",s.dataSource),e(13),d("matHeaderRowDef",s.displayedColumns),e(),d("matRowDefColumns",s.displayedColumns),e(),d("pageSizeOptions",U(18,Jn)))},dependencies:[q,R,$,z,Ht,Gt,Ut,jt,$t,zt,Qt,Yt,Wt,Jt,yt,Ct,V,Re],styles:[".content[_ngcontent-%COMP%] div[_ngcontent-%COMP%]{line-height:3rem}.content[_ngcontent-%COMP%] div.header[_ngcontent-%COMP%]{font-weight:500}table[_ngcontent-%COMP%]{width:100%}table[_ngcontent-%COMP%] .select-row[_ngcontent-%COMP%]:hover{cursor:pointer}"]})}}return t})();function la(t,m){t&1&&(n(0,"button",13),C(1,"fa-icon",14),r(2),o(3,"translate"),i()),t&2&&(e(2),u("",l(3,1,"labels.buttons.Undo")," "))}function sa(t,m){t&1&&(n(0,"span"),y(1,la,4,3,"button",12),i()),t&2&&(e(),d("mifosxHasPermission","ADJUST_ACCOUNTTRANSFER"))}var oe=(()=>{class t{constructor(){this.route=T(H),this.location=T(be),this.route.data.subscribe(a=>{this.viewAccountTransferData=a.viewAccountTransferData})}transferToClient(a){return`/#/clients/${a.id}`}transferToAccount(a,p){return`/#/clients/${a.id}/savings-accounts/${p.id}`}goBack(){this.location.back()}transactionColor(){return this.viewAccountTransferData.reversed?"undo":"active"}static{this.\u0275fac=function(p){return new(p||t)}}static{this.\u0275cmp=O({type:t,selectors:[["mifosx-view-account-transfer"]],decls:93,vars:69,consts:[[1,"container"],[1,"container","m-b-20","align-end","gap-2px"],[1,"layout-row-wrap","responsive-column"],[1,"flex-100",3,"ngClass"],[1,"mat-h3","flex-fill"],[3,"inset"],[1,"flex-fill"],[1,"flex-40"],[1,"flex-60"],[3,"href"],[1,"layout-row","align-center","gap-5px","responsive-column"],["type","button","color","primary","mat-raised-button","",3,"click"],["mat-raised-button","","color","warn",4,"mifosxHasPermission"],["mat-raised-button","","color","warn"],["icon","undo",1,"m-r-10"]],template:function(p,s){p&1&&(n(0,"div",0)(1,"div",1),_(2,sa,2,1,"span"),i(),n(3,"mat-card")(4,"mat-card-content")(5,"div",2),C(6,"div",3),n(7,"h3",4),r(8),o(9,"translate"),i(),C(10,"mat-divider",5),n(11,"div",6)(12,"span",7),r(13),o(14,"translate"),i(),n(15,"span",8),r(16),o(17,"formatNumber"),i()(),n(18,"div",6)(19,"span",7),r(20),o(21,"translate"),i(),n(22,"span",8),r(23),o(24,"dateFormat"),i()(),n(25,"div",6)(26,"span",7),r(27),o(28,"translate"),i(),n(29,"span",8),r(30),i()(),n(31,"h3",4),r(32),o(33,"translate"),i(),C(34,"mat-divider",5),n(35,"div",6)(36,"span",7),r(37),o(38,"translate"),i(),n(39,"span",8),r(40),i()(),n(41,"div",6)(42,"span",7),r(43),o(44,"translate"),i(),n(45,"span",8),r(46),i()(),n(47,"div",6)(48,"span",7),r(49),o(50,"translate"),i(),n(51,"span",8),r(52),i()(),n(53,"div",6)(54,"span",7),r(55),o(56,"translate"),i(),n(57,"span",8),r(58),i()(),n(59,"h3",4),r(60),o(61,"translate"),i(),C(62,"mat-divider",5),n(63,"div",6)(64,"span",7),r(65),o(66,"translate"),i(),n(67,"span",8),r(68),i()(),n(69,"div",6)(70,"span",7),r(71),o(72,"translate"),i(),n(73,"span",8)(74,"a",9),r(75),i()()(),n(76,"div",6)(77,"span",7),r(78),o(79,"translate"),i(),n(80,"span",8),r(81),i()(),n(82,"div",6)(83,"span",7),r(84),o(85,"translate"),i(),n(86,"span",8)(87,"a",9),r(88),i()()()()(),n(89,"mat-card-actions",10)(90,"button",11),x("click",function(){return s.goBack()}),r(91),o(92,"translate"),i()()()()),p&2&&(e(2),v(s.viewAccountTransferData.reversed?-1:2),e(4),d("ngClass",s.transactionColor()),e(2),c(l(9,35,"labels.heading.Transaction Details")),e(2),d("inset",!0),e(3),u("",l(14,37,"labels.inputs.Transaction Amount"),":"),e(3),Ie("",s.viewAccountTransferData.currency.displaySymbol," ",l(17,39,s.viewAccountTransferData.transferAmount)," (",s.viewAccountTransferData.currency.code,")"),e(4),u("",l(21,41,"labels.inputs.Transaction Date"),":"),e(3),c(l(24,43,s.viewAccountTransferData.transferDate)),e(4),u("",l(28,45,"labels.inputs.Destination"),":"),e(3),c(s.viewAccountTransferData.transferDescription),e(2),c(l(33,47,"labels.heading.Transferred From")),e(2),d("inset",!0),e(3),u("",l(38,49,"labels.inputs.Office"),":"),e(3),c(s.viewAccountTransferData.fromOffice.name),e(3),u("",l(44,51,"labels.inputs.Client"),":"),e(3),c(s.viewAccountTransferData.fromClient.displayName),e(3),u("",l(50,53,"labels.inputs.Account Type"),":"),e(3),c(s.viewAccountTransferData.fromAccountType.value),e(3),u("",l(56,55,"labels.inputs.Account No"),":"),e(3),c(s.viewAccountTransferData.fromAccount.accountNo),e(2),c(l(61,57,"labels.heading.Transferred To")),e(2),d("inset",!0),e(3),u("",l(66,59,"labels.inputs.Office"),":"),e(3),c(s.viewAccountTransferData.toOffice.name),e(3),u("",l(72,61,"labels.inputs.Client"),":"),e(3),d("href",s.transferToClient(s.viewAccountTransferData.toClient),se),e(),u(" ",s.viewAccountTransferData.toClient.displayName),e(3),u("",l(79,63,"labels.inputs.Account Type"),":"),e(3),c(s.viewAccountTransferData.toAccountType.value),e(3),u("",l(85,65,"labels.inputs.Account No"),":"),e(3),d("href",s.transferToAccount(s.viewAccountTransferData.toClient,s.viewAccountTransferData.toAccount),se),e(),u(" ",s.viewAccountTransferData.toAccount.accountNo),e(3),u(" ",l(92,67,"labels.buttons.Back")," "))},dependencies:[q,Se,R,$,z,lt,j,Q,_t,vt,Ct,V,Ve],styles:["h3[_ngcontent-%COMP%]{margin:0;font-weight:500}span[_ngcontent-%COMP%]{margin:.5em 0}mat-divider[_ngcontent-%COMP%]{margin:0 0 .5em}"]})}}return t})();var fe=(()=>{class t{constructor(){this.accountTransfersService=T(B)}resolve(a){let p=a.parent.paramMap.get("standingInstructionsId");return this.accountTransfersService.getStandingInstructionsData(p)}static{this.\u0275fac=function(p){return new(p||t)}}static{this.\u0275prov=G({token:t,factory:t.\u0275fac})}}return t})();var Ce=(()=>{class t{constructor(){this.accountTransfersService=T(B)}resolve(a){let p=a.parent.paramMap.get("standingInstructionsId");return this.accountTransfersService.getStandingInstructionsDataAndTemplate(p)}static{this.\u0275fac=function(p){return new(p||t)}}static{this.\u0275prov=G({token:t,factory:t.\u0275fac})}}return t})();var le=(()=>{class t{constructor(){this.accountTransfersService=T(B)}resolve(a){let p=a.queryParamMap.get("officeId"),s=a.queryParamMap.get("accountType"),f=a.parent.paramMap.get("clientId");switch(s){case"fromloans":this.accountTypeId="1";break;case"fromsavings":this.accountTypeId="2";break;default:this.accountTypeId="0"}return this.accountTransfersService.getStandingInstructionsTemplate(f,p,this.accountTypeId)}static{this.\u0275fac=function(p){return new(p||t)}}static{this.\u0275prov=G({token:t,factory:t.\u0275fac})}}return t})();var _e=(()=>{class t{constructor(){this.accountTransfersService=T(B)}resolve(a){switch(a.queryParamMap.get("accountType")){case"fromloans":this.accountTypeId="1",this.id=a.queryParamMap.get("loanId");break;case"fromsavings":this.accountTypeId="2",this.id=a.queryParamMap.get("savingsId");break;case"interbank":this.accountTypeId="2",this.id=a.queryParamMap.get("savingsId");break;default:this.accountTypeId="0"}return this.accountTransfersService.newAccountTranferResource(this.id,this.accountTypeId)}static{this.\u0275fac=function(p){return new(p||t)}}static{this.\u0275prov=G({token:t,factory:t.\u0275fac})}}return t})();var ve=(()=>{class t{constructor(){this.accountTransfersService=T(B),this.settingsService=T(Y)}resolve(a){let p=a.parent.paramMap.get("standingInstructionsId"),s=this.settingsService.dateFormat,f=this.settingsService.language.code;return this.accountTransfersService.getStandingInstructionsTransactions(p,s,f)}static{this.\u0275fac=function(p){return new(p||t)}}static{this.\u0275prov=G({token:t,factory:t.\u0275fac})}}return t})();var ge=(()=>{class t{constructor(){this.accountTransfersService=T(B)}resolve(a){let p=a.paramMap.get("transferid");return this.accountTransfersService.getViewAccountTransferDetails(p)}static{this.\u0275fac=function(p){return new(p||t)}}static{this.\u0275prov=G({token:t,factory:t.\u0275fac})}}return t})();var ca=[{path:"",children:[{path:"create-standing-instructions",data:{title:"Create Standing Instructions",breadcrumb:"Create Standing Instructions",routeParamBreadcrumb:"Create Standing Instructions"},component:ie,resolve:{standingIntructionsTemplate:le}},{path:"make-account-transfer",data:{title:"Account Transfer",breadcrumb:"Account Transfer",routeParamBreadcrumb:"Account Transfer"},component:ne,resolve:{accountTransferTemplate:_e}},{path:"list-standing-instructions",data:{title:"List Standing Instructions",breadcrumb:"List Standing Instructions",routeParamBreadcrumb:"List Standing Instructions"},component:ae,resolve:{standingIntructionsTemplate:le}},{path:"account-transfers",data:{title:"View Account Transfer",breadcrumb:"Account Transfers",routeParamBreadcrumb:!1},children:[{path:":transferid",data:{routeParamBreadcrumb:"transferid"},component:oe,resolve:{viewAccountTransferData:ge}}]},{path:":standingInstructionsId",data:{title:"Standing Instructions",routeParamBreadcrumb:"standingInstructionsId"},children:[{path:"view",data:{title:"View Standing Instructions",breadcrumb:"view",routeParamBreadcrumb:!1},component:Xt,resolve:{standingInstructionsData:fe}},{path:"edit",data:{title:"Edit Standing Instructions",breadcrumb:"edit",routeParamBreadcrumb:!1},component:ee,resolve:{standingInstructionsDataAndTemplate:Ce}},{path:"list-account-transactions",data:{title:"List Account Transactions",breadcrumb:"List Account Transactions",routeParamBreadcrumb:"List Account Transactions"},component:re,resolve:{listTransactionData:ve}}]}]}],je=(()=>{class t{static{this.\u0275fac=function(p){return new(p||t)}}static{this.\u0275mod=Vt({type:t})}static{this.\u0275inj=qt({providers:[fe,Ce,le,_e,ve,ge],imports:[ce.forChild(ca),ce]})}}return t})();var ma=t=>({balance:t});function pa(t,m){t&1&&(n(0,"mat-error"),r(1),o(2,"translate"),o(3,"translate"),n(4,"strong"),r(5),o(6,"translate"),i()()),t&2&&(e(),g(" ",l(2,3,"labels.inputs.Transaction Date")," ",l(3,5,"labels.commons.is")," "),e(4),c(l(6,7,"labels.commons.required")))}function da(t,m){t&1&&(n(0,"mat-error"),r(1),o(2,"translate"),o(3,"translate"),n(4,"strong"),r(5),o(6,"translate"),i()()),t&2&&(e(),g(" ",l(2,3,"labels.inputs.Amount")," ",l(3,5,"labels.commons.is")," "),e(4),c(l(6,7,"labels.commons.required")))}function ua(t,m){if(t&1&&(n(0,"mat-error"),C(1,"fa-icon",15),r(2),o(3,"translate"),i()),t&2){let a=h();e(2),u(" ",kt(3,1,"errors.validation.msg.savingsproduct.insufficient.balance",et(4,ma,a.balance))," ")}}function fa(t,m){t&1&&(n(0,"mat-error"),r(1),o(2,"translate"),o(3,"translate"),n(4,"strong"),r(5),o(6,"translate"),i()()),t&2&&(e(),g(" ",l(2,3,"labels.inputs.Transfer Description")," ",l(3,5,"labels.commons.is")," "),e(4),c(l(6,7,"labels.commons.required")))}var ze=(()=>{class t{constructor(){this.minDate=new Date(2e3,0,1),this.maxDate=new Date(2100,0,1)}static{this.\u0275fac=function(p){return new(p||t)}}static{this.\u0275cmp=O({type:t,selectors:[["mifosx-make-account-interbank-transfers"]],inputs:{makeAccountTransferForm:"makeAccountTransferForm",balance:"balance"},decls:45,vars:30,consts:[["transferDatePicker",""],["amntInput",""],[3,"formGroup"],[1,"layout-row-wrap","gap-2px","responsive-column"],[1,"flex-98",3,"click"],["matInput","","required","","formControlName","transferDate",3,"min","max","matDatepicker"],["matSuffix","",3,"for"],[1,"flex-98"],["matInput","","formControlName","toBank"],["matInput","","formControlName","toClientId"],["matInput","","formControlName","toAccountType"],["matInput","","formControlName","toAccountId"],[1,"flex-98","error-warn"],["type","number","matInput","","required","","formControlName","transferAmount"],["matInput","","formControlName","transferDescription","cdkTextareaAutosize","","cdkAutosizeMinRows","2"],["icon","exclamation-triangle","size","md"]],template:function(p,s){if(p&1){let f=w();n(0,"form",2)(1,"div",3)(2,"mat-form-field",4),x("click",function(){b(f);let F=M(9);return S(F.open())}),n(3,"mat-label"),r(4),o(5,"translate"),i(),C(6,"input",5)(7,"mat-datepicker-toggle",6)(8,"mat-datepicker",null,0),_(10,pa,7,9,"mat-error"),i(),n(11,"mat-form-field",7)(12,"mat-label"),r(13),o(14,"translate"),i(),C(15,"input",8),i(),n(16,"mat-form-field",7)(17,"mat-label"),r(18),o(19,"translate"),i(),C(20,"input",9),i(),n(21,"mat-form-field",7)(22,"mat-label"),r(23),o(24,"translate"),i(),C(25,"input",10),i(),n(26,"mat-form-field",7)(27,"mat-label"),r(28),o(29,"translate"),i(),C(30,"input",11),i(),n(31,"mat-form-field",12)(32,"mat-label"),r(33),o(34,"translate"),i(),C(35,"input",13,1),_(37,da,7,9,"mat-error"),_(38,ua,4,6,"mat-error"),i(),n(39,"mat-form-field",7)(40,"mat-label"),r(41),o(42,"translate"),i(),C(43,"textarea",14),_(44,fa,7,9,"mat-error"),i()()()}if(p&2){let f,k=M(9);d("formGroup",s.makeAccountTransferForm),e(4),c(l(5,16,"labels.inputs.Transaction Date")),e(2),d("min",s.minDate)("max",s.maxDate)("matDatepicker",k),e(),d("for",k),e(3),v(s.makeAccountTransferForm.controls.transferDate.hasError("required")?10:-1),e(3),c(l(14,18,"labels.inputs.Bank")),e(5),c(l(19,20,"labels.inputs.Client")),e(5),c(l(24,22,"labels.inputs.Account Type")),e(5),c(l(29,24,"labels.inputs.Account")),e(5),c(l(34,26,"labels.inputs.Amount")),e(4),v(s.makeAccountTransferForm.controls.transferAmount.hasError("required")?37:-1),e(),v((f=s.makeAccountTransferForm.get("transferAmount"))!=null&&f.hasError("amountExceedsBalance")?38:-1),e(3),c(l(42,28,"labels.inputs.Description")),e(3),v(s.makeAccountTransferForm.controls.transferDescription.hasError("required")?44:-1)}},dependencies:[q,R,nt,J,bt,K,it,ot,at,rt,Z,X,st,ct,tt,ut,ft,dt,_t,Lt,V],styles:["h2[_ngcontent-%COMP%], h3[_ngcontent-%COMP%], h4[_ngcontent-%COMP%]{margin:0;font-weight:500}span[_ngcontent-%COMP%]{margin:.5em 0}.margin-t[_ngcontent-%COMP%]{margin-top:1em}mat-divider[_ngcontent-%COMP%]{margin:0 0 .5em}.container[_ngcontent-%COMP%]{max-width:37rem}"]})}}return t})();var il=(()=>{class t{static{this.\u0275fac=function(p){return new(p||t)}}static{this.\u0275mod=Vt({type:t})}static{this.\u0275inj=qt({imports:[Ue,Le,$e,je,Xt,ee,ie,ne,ae,re,oe,ze]})}}return t})();export{il as AccountTransfersModule}; +import{a as B}from"./chunk-JZVD6ANS.js";import{$a as he,$d as Pe,Bd as X,Cd as st,Da as P,Dc as Ee,Dd as we,De as Ne,Ea as N,Ee as qe,Fb as q,Fd as ct,G,Ga as w,Gd as Z,H as qt,Hd as Lt,Ia as x,Id as tt,Ja as h,Jd as mt,K as T,Kg as Ue,L as b,Ld as pt,M as S,Mc as V,Na as Dt,Nd as Oe,Oa as At,Oc as De,Od as dt,Pa as Mt,Pd as ut,Qa as M,Qd as ft,Qe as yt,Rc as xt,Sc as Y,Sd as Ct,Ua as r,Ud as Q,Va as c,Wa as u,Wc as J,Xa as g,Xc as I,Xd as _t,Ya as Ie,Yc as K,Zc as it,_ as se,_a as Te,_f as Ve,ab as xe,ad as Bt,ag as Re,bb as Rt,bd as Ae,bg as Le,ca as e,cd as nt,cg as He,dd as bt,de as vt,eb as U,ed as Me,fb as et,fd as at,hb as o,hc as H,hf as Ht,ib as l,id as rt,if as $t,ja as O,jb as kt,jf as Ut,ka as Vt,kc as ht,kd as ke,lc as W,ld as ot,lf as Gt,mf as jt,na as y,nc as ce,nd as Be,of as zt,pb as be,pd as St,pf as Qt,pg as $e,qb as Se,qd as Fe,ra as _,rc as j,rd as R,rf as Wt,sa as v,sd as $,sf as Yt,ta as E,ua as D,uf as Jt,va as A,vd as z,wa as d,xa as n,xd as lt,xf as Ft,ya as i,za as C,zb as ye}from"./chunk-BQBWZIWL.js";import{a as Pt,b as Nt}from"./chunk-PHUH23IY.js";var Qe=()=>["../","edit"],We=()=>["../","list-account-transactions"];function Ye(t,m){t&1&&(n(0,"button",1),r(1),o(2,"translate"),i()),t&2&&(d("routerLink",U(4,We)),e(),u(" ",l(2,2,"labels.buttons.View Transactions History")," "))}function Je(t,m){t&1&&(n(0,"span"),r(1),o(2,"translate"),i()),t&2&&(e(),u(" ",l(2,1,"labels.inputs.Within Bank")," "))}function Ke(t,m){t&1&&(n(0,"span"),r(1),o(2,"translate"),i()),t&2&&(e(),u(" ",l(2,1,"labels.inputs.Own Account")," "))}var Xt=(()=>{class t{constructor(){this.route=T(H),this.allowclientedit=!1,this.route.data.subscribe(a=>{this.standingInstructionsData=a.standingInstructionsData,this.standingInstructionsData.fromClient.id===this.standingInstructionsData.toClient.id&&(this.allowclientedit=!1)})}static{this.\u0275fac=function(p){return new(p||t)}}static{this.\u0275cmp=O({type:t,selectors:[["mifosx-view-standing-instructions"]],decls:125,vars:90,consts:[[1,"layout-row","align-end","gap-2px","responsive-column","container","m-b-20"],["mat-raised-button","","color","primary",3,"routerLink"],["icon","edit",1,"m-r-10"],["mat-raised-button","","color","primary",3,"routerLink",4,"mifosxHasPermission"],[1,"container"],[1,"layout-row-wrap","responsive-column"],[1,"mat-h2","flex-fill"],[3,"inset"],[1,"flex-fill"],[1,"flex-40"],[1,"flex-60"]],template:function(p,s){p&1&&(n(0,"div",0)(1,"button",1),C(2,"fa-icon",2),r(3),o(4,"translate"),i(),y(5,Ye,3,5,"button",3),i(),n(6,"div",4)(7,"mat-card")(8,"mat-card-content")(9,"div",5)(10,"h2",6),r(11),i(),C(12,"mat-divider",7),n(13,"div",8)(14,"span",9),r(15),o(16,"translate"),i(),n(17,"span",10),r(18),i()(),n(19,"div",8)(20,"span",9),r(21),o(22,"translate"),i(),n(23,"span",10),r(24),i()(),n(25,"div",8)(26,"span",9),r(27),o(28,"translate"),i(),n(29,"span",10),r(30),i()(),n(31,"div",8)(32,"span",9),r(33),o(34,"translate"),i(),n(35,"span",10),r(36),i()(),n(37,"div",8)(38,"span",9),r(39),o(40,"translate"),i(),n(41,"span",10),r(42),i()(),n(43,"div",8)(44,"span",9),r(45),o(46,"translate"),i(),n(47,"span",10),r(48),i()(),n(49,"div",8)(50,"span",9),r(51),o(52,"translate"),i(),n(53,"span",10),_(54,Je,3,3,"span"),_(55,Ke,3,3,"span"),i()(),n(56,"div",8)(57,"span",9),r(58),o(59,"translate"),i(),n(60,"span",10),r(61),i()(),n(62,"div",8)(63,"span",9),r(64),o(65,"translate"),i(),n(66,"span",10),r(67),i()(),n(68,"div",8)(69,"span",9),r(70),o(71,"translate"),i(),n(72,"span",10),r(73),i()(),n(74,"div",8)(75,"span",9),r(76),o(77,"translate"),i(),n(78,"span",10),r(79),i()(),n(80,"div",8)(81,"span",9),r(82),o(83,"translate"),i(),n(84,"span",10),r(85),i()(),n(86,"div",8)(87,"span",9),r(88),o(89,"translate"),i(),n(90,"span",10),r(91),i()(),n(92,"div",8)(93,"span",9),r(94),o(95,"translate"),i(),n(96,"span",10),r(97),o(98,"dateFormat"),o(99,"dateFormat"),i()(),n(100,"div",8)(101,"span",9),r(102),o(103,"translate"),i(),n(104,"span",10),r(105),i()(),n(106,"div",8)(107,"span",9),r(108),o(109,"translate"),i(),n(110,"span",10),r(111),i()(),n(112,"div",8)(113,"span",9),r(114),o(115,"translate"),i(),n(116,"span",10),r(117),i()(),n(118,"div",8)(119,"span",9),r(120),o(121,"translate"),i(),n(122,"span",10),r(123),o(124,"dateFormat"),i()()()()()()),p&2&&(e(),d("routerLink",U(89,Qe)),e(2),u(" ",l(4,45,"labels.buttons.Edit")," "),e(2),d("mifosxHasPermission","READ_ACCOUNTTRANSFER"),e(6),c(s.standingInstructionsData.name),e(),d("inset",!0),e(3),u("",l(16,47,"labels.inputs.Applicant"),":"),e(3),c(s.standingInstructionsData.fromClient.displayName),e(3),u("",l(22,49,"labels.inputs.Type"),":"),e(3),c(s.standingInstructionsData.transferType.value),e(3),u("",l(28,51,"labels.inputs.Priority"),":"),e(3),c(s.standingInstructionsData.priority.value),e(3),u("",l(34,53,"labels.inputs.Status"),":"),e(3),c(s.standingInstructionsData.status.value),e(3),u("",l(40,55,"labels.inputs.From Account Type"),":"),e(3),c(s.standingInstructionsData.fromAccountType.value),e(3),u("",l(46,57,"labels.inputs.From Account"),":"),e(3),g("",s.standingInstructionsData.fromAccount.productName," - ",s.standingInstructionsData.fromAccount.accountNo),e(3),u("",l(52,59,"labels.inputs.Destination"),":"),e(3),v(s.allowclientedit?54:-1),e(),v(s.allowclientedit?-1:55),e(3),u("",l(59,61,"labels.inputs.To Office"),":"),e(3),c(s.standingInstructionsData.toOffice.name),e(3),u("",l(65,63,"labels.inputs.Beneficiary"),":"),e(3),c(s.standingInstructionsData.toClient.displayName),e(3),u("",l(71,65,"labels.inputs.To Account Type"),":"),e(3),c(s.standingInstructionsData.toAccountType.value),e(3),u("",l(77,67,"labels.inputs.To Account"),":"),e(3),g("",s.standingInstructionsData.toAccount.productName," - ",s.standingInstructionsData.toAccount.accountNo),e(3),u("",l(83,69,"labels.inputs.Standing Instruction Type"),":"),e(3),c(s.standingInstructionsData.instructionType.value),e(3),u("",l(89,71,"labels.inputs.Amount"),":"),e(3),c(s.standingInstructionsData.amount),e(3),u("",l(95,73,"labels.inputs.Validity"),":"),e(3),g("",l(98,75,s.standingInstructionsData.validFrom)," - ",l(99,77,s.standingInstructionsData.validTill)),e(5),u("",l(103,79,"labels.inputs.Recurrence Type"),":"),e(3),c(s.standingInstructionsData.recurrenceType.value),e(3),u("",l(109,81,"labels.inputs.Interval"),":"),e(3),c(s.standingInstructionsData.recurrenceInterval),e(3),u("",l(115,83,"labels.inputs.Recurrence Frequency"),":"),e(3),c(s.standingInstructionsData.recurrenceFrequency.value),e(3),u("",l(121,85,"labels.inputs.On Month Day"),":"),e(3),c(l(124,87,s.standingInstructionsData.recurrenceOnMonthDay)))},dependencies:[q,R,W,$,z,j,Q,_t,vt,Ct,V],styles:[".mat-elevation-z1[_ngcontent-%COMP%]{margin:1em 0 1.5em}h2[_ngcontent-%COMP%], h3[_ngcontent-%COMP%], h4[_ngcontent-%COMP%]{margin:0;font-weight:500}span[_ngcontent-%COMP%]{margin:.5em 0}.margin-t[_ngcontent-%COMP%]{margin-top:1em}mat-divider[_ngcontent-%COMP%]{margin:0 0 1em}"]})}}return t})();var Xe=()=>["../view"];function Ze(t,m){if(t&1&&(n(0,"mat-option",12),r(1),i()),t&2){let a=m.$implicit;d("value",a.id),e(),u(" ",a.value," ")}}function ti(t,m){t&1&&(n(0,"mat-error"),r(1),o(2,"translate"),o(3,"translate"),n(4,"strong"),r(5),o(6,"translate"),i()()),t&2&&(e(),g(" ",l(2,3,"labels.inputs.Priority")," ",l(3,5,"labels.commons.is")," "),e(4),c(l(6,7,"labels.commons.required")))}function ei(t,m){if(t&1&&(n(0,"mat-option",12),r(1),i()),t&2){let a=m.$implicit;d("value",a.id),e(),u(" ",a.value," ")}}function ii(t,m){t&1&&(n(0,"mat-error"),r(1),o(2,"translate"),o(3,"translate"),n(4,"strong"),r(5),o(6,"translate"),i()()),t&2&&(e(),g(" ",l(2,3,"labels.inputs.Status")," ",l(3,5,"labels.commons.is")," "),e(4),c(l(6,7,"labels.commons.required")))}function ni(t,m){if(t&1&&(n(0,"mat-option",12),r(1),i()),t&2){let a=m.$implicit;d("value",a.id),e(),u(" ",a.value," ")}}function ai(t,m){t&1&&(n(0,"mat-error"),r(1),o(2,"translate"),o(3,"translate"),n(4,"strong"),r(5),o(6,"translate"),i()()),t&2&&(e(),g(" ",l(2,3,"labels.inputs.Valid From Date")," ",l(3,5,"labels.commons.is")," "),e(4),c(l(6,7,"labels.commons.required")))}function ri(t,m){t&1&&(n(0,"mat-error"),r(1),o(2,"translate"),o(3,"translate"),n(4,"strong"),r(5),o(6,"translate"),i()()),t&2&&(e(),g(" ",l(2,3,"labels.inputs.Valid Till Date")," ",l(3,5,"labels.commons.is")," "),e(4),c(l(6,7,"labels.commons.required")))}function oi(t,m){if(t&1&&(n(0,"mat-option",12),r(1),i()),t&2){let a=m.$implicit;d("value",a.id),e(),u(" ",a.value," ")}}function li(t,m){t&1&&(n(0,"mat-error"),r(1),o(2,"translate"),o(3,"translate"),n(4,"strong"),r(5),o(6,"translate"),i()()),t&2&&(e(),g(" ",l(2,3,"labels.inputs.Recurrence Type")," ",l(3,5,"labels.commons.is")," "),e(4),c(l(6,7,"labels.commons.required")))}function si(t,m){if(t&1&&(n(0,"mat-option",12),r(1),i()),t&2){let a=m.$implicit;d("value",a.id),e(),u(" ",a.value," ")}}function ci(t,m){if(t&1){let a=w();n(0,"button",33),x("click",function(){b(a);let s=h();return S(s.submit())}),r(1),o(2,"translate"),i()}if(t&2){let a=h();d("disabled",!a.editStandingInstructionsForm.valid),e(),u(" ",l(2,2,"labels.buttons.Submit")," ")}}var ee=(()=>{class t{constructor(){this.formBuilder=T(St),this.route=T(H),this.router=T(ht),this.accountTransfersService=T(B),this.settingsService=T(Y),this.dateUtils=T(xt),this.allowclientedit=!1,this.minDate=new Date(2e3,0,1),this.maxDate=new Date(2100,0,1),this.route.data.subscribe(a=>{this.standingInstructionsData=a.standingInstructionsDataAndTemplate,this.standingInstructionsId=a.standingInstructionsDataAndTemplate.id,this.standingInstructionsData.fromClient.id===this.standingInstructionsData.toClient.id&&(this.allowclientedit=!1),this.setOptions()})}ngOnInit(){this.createEditStandingInstructionsForm();let p=new Date().getFullYear();this.standingInstructionsData.recurrenceOnMonthDay&&this.standingInstructionsData.recurrenceOnMonthDay.push(p),this.editStandingInstructionsForm.patchValue({name:this.standingInstructionsData.name,applicant:this.standingInstructionsData.fromClient.displayName,type:this.standingInstructionsData.transferType.value,priority:this.standingInstructionsData.priority.id,status:this.standingInstructionsData.status.id,fromAccountType:this.standingInstructionsData.fromAccountType.value,fromAccount:this.standingInstructionsData.fromAccount.productName,destination:this.allowclientedit?"Within Bank":"Own Account",toOffice:this.standingInstructionsData.toOffice.name,toClientId:this.standingInstructionsData.toClient.displayName,toAccountType:this.standingInstructionsData.toAccountType.value,toAccount:this.standingInstructionsData.toAccount.productName,instructionType:this.standingInstructionsData.instructionType.id,amount:this.standingInstructionsData.amount,validFrom:this.standingInstructionsData.validFrom&&new Date(this.standingInstructionsData.validFrom),validTill:this.standingInstructionsData.validTill&&new Date(this.standingInstructionsData.validTill),recurrenceType:this.standingInstructionsData.recurrenceType.id,recurrenceInterval:this.standingInstructionsData.recurrenceInterval,recurrenceFrequency:this.standingInstructionsData.recurrenceFrequency.id,recurrenceOnMonthDay:this.standingInstructionsData.recurrenceOnMonthDay&&new Date(this.standingInstructionsData.recurrenceOnMonthDay)})}createEditStandingInstructionsForm(){this.editStandingInstructionsForm=this.formBuilder.group({name:[{value:"",disabled:!0}],applicant:[{value:"",disabled:!0}],type:[{value:"",disabled:!0}],priority:["",I.required],status:["",I.required],fromAccountType:[{value:"",disabled:!0}],fromAccount:[{value:"",disabled:!0}],destination:[{value:"",disabled:!0}],toOffice:[{value:"",disabled:!0}],toClientId:[{value:"",disabled:!0}],toAccountType:[{value:"",disabled:!0}],toAccount:[{value:"",disabled:!0}],instructionType:"",amount:"",validFrom:["",I.required],validTill:["",I.required],recurrenceType:["",I.required],recurrenceInterval:"",recurrenceFrequency:"",recurrenceOnMonthDay:""})}setOptions(){this.priorityTypeData=this.standingInstructionsData.priorityOptions,this.statusTypeData=this.standingInstructionsData.statusOptions,this.instructionTypeData=this.standingInstructionsData.instructionTypeOptions,this.recurrenceTypeData=this.standingInstructionsData.recurrenceTypeOptions,this.recurrenceFrequencyTypeData=this.standingInstructionsData.recurrenceFrequencyOptions}submit(){let a=this.settingsService.dateFormat,p=this.settingsService.language.code,s={amount:this.editStandingInstructionsForm.value.amount,dateFormat:a,instructionType:this.editStandingInstructionsForm.value.instructionType,locale:p,monthDayFormat:"dd MMMM",priority:this.editStandingInstructionsForm.value.priority,recurrenceFrequency:this.editStandingInstructionsForm.value.recurrenceFrequency,recurrenceInterval:this.editStandingInstructionsForm.value.recurrenceInterval,recurrenceOnMonthDay:this.dateUtils.formatDate(this.editStandingInstructionsForm.value.recurrenceOnMonthDay,"dd MMMM"),recurrenceType:this.editStandingInstructionsForm.value.recurrenceType,status:this.editStandingInstructionsForm.value.status,validFrom:this.dateUtils.formatDate(this.editStandingInstructionsForm.value.validFrom,a),validTill:this.dateUtils.formatDate(this.editStandingInstructionsForm.value.validTill,a)};this.accountTransfersService.updateStandingInstructionsData(this.standingInstructionsId,s).subscribe(f=>{this.router.navigate(["../view"],{relativeTo:this.route})})}static{this.\u0275fac=function(p){return new(p||t)}}static{this.\u0275cmp=O({type:t,selectors:[["mifosx-edit-standing-instructions"]],decls:134,vars:84,consts:[["validFromDatePicker",""],["validTillDatePicker",""],["recurrenceOnMonthDayDatePicker",""],[1,"container"],[3,"formGroup"],[1,"layout-row-wrap","gap-2px","responsive-column"],[1,"flex-48"],["matInput","","formControlName","name"],["matInput","","formControlName","applicant"],["matInput","","formControlName","type"],["matInput","","formControlName","fromAccountType"],["required","","formControlName","priority"],[3,"value"],["required","","formControlName","status"],["matInput","","formControlName","fromAccount"],["matInput","","formControlName","destination"],["matInput","","formControlName","toOffice"],["matInput","","formControlName","toClientId"],["matInput","","formControlName","toAccountType"],["matInput","","formControlName","toAccount"],["formControlName","instructionType"],["matInput","","formControlName","amount"],[1,"flex-48",3,"click"],["matInput","","required","","formControlName","validFrom",3,"min","max","matDatepicker"],["matSuffix","",3,"for"],["matInput","","required","","formControlName","validTill",3,"min","max","matDatepicker"],["required","","formControlName","recurrenceType"],["matInput","","formControlName","recurrenceInterval"],["formControlName","recurrenceFrequency"],["matInput","","formControlName","recurrenceOnMonthDay",3,"min","max","matDatepicker"],[1,"layout-row","align-center","gap-5px","responsive-column"],["type","button","mat-raised-button","",3,"routerLink"],["mat-raised-button","","color","primary",3,"disabled","click",4,"mifosxHasPermission"],["mat-raised-button","","color","primary",3,"click","disabled"]],template:function(p,s){if(p&1){let f=w();n(0,"div",3)(1,"mat-card")(2,"form",4)(3,"mat-card-content")(4,"div",5)(5,"mat-form-field",6)(6,"mat-label"),r(7),o(8,"translate"),i(),C(9,"input",7),i(),n(10,"mat-form-field",6)(11,"mat-label"),r(12),o(13,"translate"),i(),C(14,"input",8),i(),n(15,"mat-form-field",6)(16,"mat-label"),r(17),o(18,"translate"),i(),C(19,"input",9),i(),n(20,"mat-form-field",6)(21,"mat-label"),r(22),o(23,"translate"),i(),C(24,"input",10),i(),n(25,"mat-form-field",6)(26,"mat-label"),r(27),o(28,"translate"),i(),n(29,"mat-select",11),D(30,Ze,2,2,"mat-option",12,E),i(),_(32,ti,7,9,"mat-error"),i(),n(33,"mat-form-field",6)(34,"mat-label"),r(35),o(36,"translate"),i(),n(37,"mat-select",13),D(38,ei,2,2,"mat-option",12,E),i(),_(40,ii,7,9,"mat-error"),i(),n(41,"mat-form-field",6)(42,"mat-label"),r(43),o(44,"translate"),i(),C(45,"input",14),i(),n(46,"mat-form-field",6)(47,"mat-label"),r(48),o(49,"translate"),i(),C(50,"input",15),i(),n(51,"mat-form-field",6)(52,"mat-label"),r(53),o(54,"translate"),i(),C(55,"input",16),i(),n(56,"mat-form-field",6)(57,"mat-label"),r(58),o(59,"translate"),i(),C(60,"input",17),i(),n(61,"mat-form-field",6)(62,"mat-label"),r(63),o(64,"translate"),i(),C(65,"input",18),i(),n(66,"mat-form-field",6)(67,"mat-label"),r(68),o(69,"translate"),i(),C(70,"input",19),i(),n(71,"mat-form-field",6)(72,"mat-label"),r(73),o(74,"translate"),i(),n(75,"mat-select",20),D(76,ni,2,2,"mat-option",12,E),i()(),n(78,"mat-form-field",6)(79,"mat-label"),r(80),o(81,"translate"),i(),C(82,"input",21),i(),n(83,"mat-form-field",22),x("click",function(){b(f);let F=M(90);return S(F.open())}),n(84,"mat-label"),r(85),o(86,"translate"),i(),C(87,"input",23)(88,"mat-datepicker-toggle",24)(89,"mat-datepicker",null,0),_(91,ai,7,9,"mat-error"),i(),n(92,"mat-form-field",22),x("click",function(){b(f);let F=M(99);return S(F.open())}),n(93,"mat-label"),r(94),o(95,"translate"),i(),C(96,"input",25)(97,"mat-datepicker-toggle",24)(98,"mat-datepicker",null,1),_(100,ri,7,9,"mat-error"),i(),n(101,"mat-form-field",6)(102,"mat-label"),r(103),o(104,"translate"),i(),n(105,"mat-select",26),D(106,oi,2,2,"mat-option",12,E),i(),_(108,li,7,9,"mat-error"),i(),n(109,"mat-form-field",6)(110,"mat-label"),r(111),o(112,"translate"),i(),C(113,"input",27),i(),n(114,"mat-form-field",6)(115,"mat-label"),r(116),o(117,"translate"),i(),n(118,"mat-select",28),D(119,si,2,2,"mat-option",12,E),i()(),n(121,"mat-form-field",22),x("click",function(){b(f);let F=M(128);return S(F.open())}),n(122,"mat-label"),r(123),o(124,"translate"),i(),C(125,"input",29)(126,"mat-datepicker-toggle",24)(127,"mat-datepicker",null,2),i()()(),n(129,"mat-card-actions",30)(130,"button",31),r(131),o(132,"translate"),i(),y(133,ci,3,4,"button",32),i()()()()}if(p&2){let f=M(90),k=M(99),F=M(128);e(2),d("formGroup",s.editStandingInstructionsForm),e(5),c(l(8,41,"labels.inputs.name")),e(5),c(l(13,43,"labels.inputs.Applicant")),e(5),c(l(18,45,"labels.inputs.Type")),e(5),c(l(23,47,"labels.inputs.From Account Type")),e(5),c(l(28,49,"labels.inputs.Priority")),e(3),A(s.priorityTypeData),e(2),v(s.editStandingInstructionsForm.controls.priority.hasError("required")?32:-1),e(3),c(l(36,51,"labels.inputs.Status")),e(3),A(s.statusTypeData),e(2),v(s.editStandingInstructionsForm.controls.status.hasError("required")?40:-1),e(3),c(l(44,53,"labels.inputs.From Account")),e(5),c(l(49,55,"labels.inputs.Destination")),e(5),c(l(54,57,"labels.inputs.To Office")),e(5),c(l(59,59,"labels.inputs.Beneficiary")),e(5),c(l(64,61,"labels.inputs.To Account Type")),e(5),c(l(69,63,"labels.inputs.To Account")),e(5),c(l(74,65,"labels.inputs.Standing Instruction Type")),e(3),A(s.instructionTypeData),e(4),c(l(81,67,"labels.inputs.Amount")),e(5),c(l(86,69,"labels.inputs.Validity from")),e(2),d("min",s.minDate)("max",s.maxDate)("matDatepicker",f),e(),d("for",f),e(3),v(s.editStandingInstructionsForm.controls.validFrom.hasError("required")?91:-1),e(3),c(l(95,71,"labels.inputs.Validity To")),e(2),d("min",s.minDate)("max",s.maxDate)("matDatepicker",k),e(),d("for",k),e(3),v(s.editStandingInstructionsForm.controls.validTill.hasError("required")?100:-1),e(3),c(l(104,73,"labels.inputs.Recurrence Type")),e(3),A(s.recurrenceTypeData),e(2),v(s.editStandingInstructionsForm.controls.recurrenceType.hasError("required")?108:-1),e(3),c(l(112,75,"labels.inputs.Interval")),e(5),c(l(117,77,"labels.inputs.Recurrence Frequency")),e(3),A(s.recurrenceFrequencyTypeData),e(4),c(l(124,79,"labels.inputs.On Month Day")),e(2),d("min",s.minDate)("max",s.maxDate)("matDatepicker",F),e(),d("for",F),e(4),d("routerLink",U(83,Xe)),e(),u(" ",l(132,81,"labels.buttons.Cancel")," "),e(2),d("mifosxHasPermission","UPDATE_STANDINGINSTRUCTION")}},dependencies:[q,R,nt,J,K,it,ot,at,rt,W,$,z,lt,Z,X,st,ct,tt,pt,mt,ut,ft,dt,j,Q,V],encapsulation:2})}}return t})();var mi=()=>["../"];function pi(t,m){t&1&&(n(0,"mat-error"),r(1),o(2,"translate"),o(3,"translate"),n(4,"strong"),r(5),o(6,"translate"),i()()),t&2&&(e(),g(" ",l(2,3,"labels.inputs.name")," ",l(3,5,"labels.commons.is")," "),e(4),c(l(6,7,"labels.inputs.required")))}function di(t,m){if(t&1&&(n(0,"mat-option",10),r(1),i()),t&2){let a=m.$implicit;d("value",a.id),e(),u(" ",a.value," ")}}function ui(t,m){t&1&&(n(0,"mat-error"),r(1),o(2,"translate"),o(3,"translate"),n(4,"strong"),r(5),o(6,"translate"),i()()),t&2&&(e(),g(" ",l(2,3,"labels.inputs.Transfer Type")," ",l(3,5,"labels.commons.is")," "),e(4),c(l(6,7,"labels.inputs.required")))}function fi(t,m){if(t&1&&(n(0,"mat-option",10),r(1),i()),t&2){let a=m.$implicit;d("value",a.id),e(),u(" ",a.value," ")}}function Ci(t,m){t&1&&(n(0,"mat-error"),r(1),o(2,"translate"),o(3,"translate"),n(4,"strong"),r(5),o(6,"translate"),i()()),t&2&&(e(),g(" ",l(2,3,"labels.inputs.Priority")," ",l(3,5,"labels.commons.is")," "),e(4),c(l(6,7,"labels.commons.required")))}function _i(t,m){if(t&1&&(n(0,"mat-option",10),r(1),i()),t&2){let a=m.$implicit;d("value",a.id),e(),u(" ",a.value," ")}}function vi(t,m){t&1&&(n(0,"mat-error"),r(1),o(2,"translate"),o(3,"translate"),n(4,"strong"),r(5),o(6,"translate"),i()()),t&2&&(e(),g(" ",l(2,3,"labels.inputs.Status")," ",l(3,5,"labels.commons.is")," "),e(4),c(l(6,7,"labels.commons.required")))}function gi(t,m){if(t&1&&(n(0,"mat-option",10),r(1),i()),t&2){let a=m.$implicit;d("value",a.id),e(),u(" ",a.value," ")}}function Ii(t,m){t&1&&(n(0,"mat-error"),r(1),o(2,"translate"),o(3,"translate"),n(4,"strong"),r(5),o(6,"translate"),i()()),t&2&&(e(),g(" ",l(2,3,"labels.inputs.From Account Type")," ",l(3,5,"labels.commons.is")," "),e(4),c(l(6,7,"labels.commons.required")))}function Ti(t,m){if(t&1&&(n(0,"mat-option",10),r(1),i()),t&2){let a=m.$implicit;d("value",a.id),e(),g(" ",a.productName," - ",a.accountNo," ")}}function hi(t,m){t&1&&(n(0,"mat-error"),r(1),o(2,"translate"),o(3,"translate"),n(4,"strong"),r(5),o(6,"translate"),i()()),t&2&&(e(),g(" ",l(2,3,"labels.inputs.From Account")," ",l(3,5,"labels.commons.is")," "),e(4),c(l(6,7,"labels.commons.required")))}function xi(t,m){if(t&1&&(n(0,"mat-option",10),r(1),i()),t&2){let a=m.$implicit;d("value",a.id),e(),u(" ",a.value," ")}}function bi(t,m){t&1&&(n(0,"mat-error"),r(1),o(2,"translate"),o(3,"translate"),n(4,"strong"),r(5),o(6,"translate"),i()()),t&2&&(e(),g(" ",l(2,3,"labels.inputs.Destination")," ",l(3,5,"labels.commons.is")," "),e(4),c(l(6,7,"labels.commons.required")))}function Si(t,m){if(t&1&&(n(0,"mat-option",10),r(1),i()),t&2){let a=m.$implicit;d("value",a.id),e(),u(" ",a.name," ")}}function yi(t,m){t&1&&(n(0,"mat-error"),r(1),o(2,"translate"),o(3,"translate"),n(4,"strong"),r(5),o(6,"translate"),i()()),t&2&&(e(),g(" ",l(2,3,"labels.inputs.To Office")," ",l(3,5,"labels.commons.is")," "),e(4),c(l(6,7,"labels.commons.required")))}function Ei(t,m){if(t&1&&(n(0,"mat-option",10),r(1),i()),t&2){let a=m.$implicit;d("value",a.id),e(),u(" ",a.displayName," ")}}function Di(t,m){t&1&&(n(0,"mat-error"),r(1),o(2,"translate"),o(3,"translate"),n(4,"strong"),r(5),o(6,"translate"),i()()),t&2&&(e(),g(" ",l(2,3,"labels.inputs.Beneficiary")," ",l(3,5,"labels.commons.is")," "),e(4),c(l(6,7,"labels.commons.required")))}function Ai(t,m){if(t&1&&(n(0,"mat-option",10),r(1),i()),t&2){let a=m.$implicit;d("value",a.id),e(),u(" ",a.value," ")}}function Mi(t,m){t&1&&(n(0,"mat-error"),r(1),o(2,"translate"),o(3,"translate"),n(4,"strong"),r(5),o(6,"translate"),i()()),t&2&&(e(),g(" ",l(2,3,"labels.inputs.To Account Type")," ",l(3,5,"labels.commons.is")," "),e(4),c(l(6,7,"labels.commons.required")))}function ki(t,m){if(t&1&&(n(0,"mat-option",10),r(1),i()),t&2){let a=m.$implicit;d("value",a.id),e(),g(" ",a.productName," - ",a.accountNo," ")}}function Bi(t,m){t&1&&(n(0,"mat-error"),r(1),o(2,"translate"),o(3,"translate"),n(4,"strong"),r(5),o(6,"translate"),i()()),t&2&&(e(),g(" ",l(2,3,"labels.inputs.To Account")," ",l(3,5,"labels.commons.is")," "),e(4),c(l(6,7,"labels.commons.required")))}function Fi(t,m){if(t&1&&(n(0,"mat-option",10),r(1),i()),t&2){let a=m.$implicit;d("value",a.id),e(),u(" ",a.value," ")}}function wi(t,m){t&1&&(n(0,"mat-error"),r(1),o(2,"translate"),o(3,"translate"),n(4,"strong"),r(5),o(6,"translate"),i()()),t&2&&(e(),g(" ",l(2,3,"labels.inputs.Standing Instruction Type")," ",l(3,5,"labels.commons.is")," "),e(4),c(l(6,7,"labels.commons.required")))}function Oi(t,m){t&1&&(n(0,"mat-error"),r(1),o(2,"translate"),o(3,"translate"),n(4,"strong"),r(5),o(6,"translate"),i()()),t&2&&(e(),g(" ",l(2,3,"labels.inputs.Amount")," ",l(3,5,"labels.commons.is")," "),e(4),c(l(6,7,"labels.commons.required")))}function Pi(t,m){t&1&&(n(0,"mat-error"),r(1),o(2,"translate"),o(3,"translate"),n(4,"strong"),r(5),o(6,"translate"),i()()),t&2&&(e(),g(" ",l(2,3,"labels.inputs.Valid From Date")," ",l(3,5,"labels.commons.is")," "),e(4),c(l(6,7,"labels.commons.required")))}function Ni(t,m){t&1&&(n(0,"mat-error"),r(1),o(2,"translate"),o(3,"translate"),n(4,"strong"),r(5),o(6,"translate"),i()()),t&2&&(e(),g(" ",l(2,3,"labels.inputs.Valid Till Date")," ",l(3,5,"labels.commons.is")," "),e(4),c(l(6,7,"labels.commons.required")))}function qi(t,m){if(t&1&&(n(0,"mat-option",10),r(1),i()),t&2){let a=m.$implicit;d("value",a.id),e(),u(" ",a.value," ")}}function Vi(t,m){t&1&&(n(0,"mat-error"),r(1),o(2,"translate"),o(3,"translate"),n(4,"strong"),r(5),o(6,"translate"),i()()),t&2&&(e(),g(" ",l(2,3,"labels.inputs.Recurrence Type")," ",l(3,5,"labels.commons.is")," "),e(4),c(l(6,7,"labels.commons.required")))}function Ri(t,m){t&1&&(n(0,"mat-error"),r(1),o(2,"translate"),o(3,"translate"),n(4,"strong"),r(5),o(6,"translate"),i()()),t&2&&(e(),g(" ",l(2,3,"labels.inputs.Recurrence Interval")," ",l(3,5,"labels.commons.is")," "),e(4),c(l(6,7,"labels.commons.required")))}function Li(t,m){if(t&1&&(n(0,"mat-option",10),r(1),i()),t&2){let a=m.$implicit;d("value",a.id),e(),u(" ",a.value," ")}}function Hi(t,m){t&1&&(n(0,"mat-error"),r(1),o(2,"translate"),o(3,"translate"),n(4,"strong"),r(5),o(6,"translate"),i()()),t&2&&(e(),g(" ",l(2,3,"labels.inputs.Recurrence Frequency")," ",l(3,5,"labels.commons.is")," "),e(4),c(l(6,7,"labels.commons.required")))}function $i(t,m){t&1&&(n(0,"mat-error"),r(1),o(2,"translate"),o(3,"translate"),n(4,"strong"),r(5),o(6,"translate"),i()()),t&2&&(e(),g(" ",l(2,3,"labels.inputs.On Month Day")," ",l(3,5,"labels.commons.is")," "),e(4),c(l(6,7,"labels.commons.required")))}function Ui(t,m){if(t&1){let a=w();n(0,"button",33),x("click",function(){b(a);let s=h();return S(s.submit())}),r(1),o(2,"translate"),i()}if(t&2){let a=h();d("disabled",!a.createStandingInstructionsForm.valid),e(),u(" ",l(2,2,"labels.buttons.Submit")," ")}}var ie=(()=>{class t{constructor(){this.formBuilder=T(St),this.route=T(H),this.router=T(ht),this.accountTransfersService=T(B),this.settingsService=T(Y),this.dateUtils=T(xt),this.minDate=new Date(2e3,0,1),this.maxDate=new Date(2100,0,1),this.allowclientedit=!0,this.route.data.subscribe(a=>{this.standingIntructionsTemplate=a.standingIntructionsTemplate,this.setParams(),this.setOptions()})}setParams(){switch(this.officeId=this.route.snapshot.queryParams.officeId,this.accountType=this.route.snapshot.queryParams.accountType,this.clientId=this.route.parent.snapshot.params.clientId,this.accountType){case"fromloans":this.accountTypeId="1";break;case"fromsavings":this.accountTypeId="2";break;default:this.accountTypeId="0"}}ngOnInit(){this.createCreateStandingInstructionsForm(),this.buildDependencies(),this.createStandingInstructionsForm.patchValue({applicant:this.standingIntructionsTemplate.fromClient.displayName})}createCreateStandingInstructionsForm(){this.createStandingInstructionsForm=this.formBuilder.group({name:["",I.required],applicant:[{value:"",disabled:!0}],transferType:["",I.required],priority:["",I.required],status:["",I.required],fromAccountType:["",I.required],fromAccountId:["",I.required],destination:["",I.required],toOfficeId:["",I.required],toClientId:["",I.required],toAccountType:["",I.required],toAccountId:["",I.required],instructionType:["",I.required],amount:["",I.required],validFrom:["",I.required],validTill:["",I.required],recurrenceType:["",I.required],recurrenceInterval:["",I.required],recurrenceFrequency:["",I.required],recurrenceOnMonthDay:["",I.required]})}setOptions(){this.transferTypeData=this.standingIntructionsTemplate.transferTypeOptions,this.priorityTypeData=this.standingIntructionsTemplate.priorityOptions,this.statusTypeData=this.standingIntructionsTemplate.statusOptions,this.fromAccountTypeData=this.standingIntructionsTemplate.fromAccountTypeOptions,this.fromAccountData=this.standingIntructionsTemplate.fromAccountOptions,this.destinationTypeData=[{id:1,value:"own account"},{id:2,value:"with in bank"}],this.toOfficeTypeData=this.standingIntructionsTemplate.toOfficeOptions,this.toClientTypeData=this.standingIntructionsTemplate.toClientOptions,this.toAccountTypeData=this.standingIntructionsTemplate.toAccountTypeOptions,this.toAccountData=this.standingIntructionsTemplate.toAccountOptions,this.instructionTypeData=this.standingIntructionsTemplate.instructionTypeOptions,this.recurrenceTypeData=this.standingIntructionsTemplate.recurrenceTypeOptions,this.recurrenceFrequencyTypeData=this.standingIntructionsTemplate.recurrenceFrequencyOptions}buildDependencies(){this.createStandingInstructionsForm.get("destination").valueChanges.subscribe(a=>{a===1?(this.allowclientedit=!1,this.createStandingInstructionsForm.patchValue({toOfficeId:this.officeId,toClientId:this.clientId}),this.ToOfficeId=!0,this.ToClientId=!0,this.changeEvent()):(this.allowclientedit=!0,this.createStandingInstructionsForm.patchValue({toOfficeId:"",toClientId:""}),this.createStandingInstructionsForm.controls.toOfficeId.enable(),this.createStandingInstructionsForm.controls.toClientId.enable())})}changeEvent(){let a=this.refineObject(this.createStandingInstructionsForm.value);this.accountTransfersService.getStandingInstructionsTemplate(this.clientId,this.officeId,this.accountTypeId,a).subscribe(p=>{this.standingIntructionsTemplate=p,this.setOptions()})}refineObject(a){let p=Object.getOwnPropertyNames(a);for(let s=0;s{this.router.navigate(["../../"],{relativeTo:this.route})})}static{this.\u0275fac=function(p){return new(p||t)}}static{this.\u0275cmp=O({type:t,selectors:[["mifosx-create-standing-instructions"]],decls:164,vars:100,consts:[["validFromDatePicker",""],["validTillDatePicker",""],["recurrenceOnMonthDayDatePicker",""],[1,"container"],[3,"formGroup"],[1,"layout-row-wrap","gap-2px","responsive-column"],[1,"flex-48"],["matInput","","required","","formControlName","name"],["matInput","","formControlName","applicant"],["required","","formControlName","transferType",3,"selectionChange"],[3,"value"],["required","","formControlName","priority"],["required","","formControlName","status"],["required","","formControlName","fromAccountType",3,"selectionChange"],["required","","formControlName","fromAccountId",3,"selectionChange"],["required","","formControlName","destination"],["required","","formControlName","toOfficeId",3,"selectionChange","disabled"],["required","","formControlName","toClientId",3,"selectionChange","disabled"],["required","","formControlName","toAccountType",3,"selectionChange"],["required","","formControlName","toAccountId",3,"selectionChange"],["formControlName","instructionType"],["type","number","matInput","","required","","formControlName","amount"],[1,"flex-48",3,"click"],["matInput","","required","","formControlName","validFrom",3,"min","max","matDatepicker"],["matSuffix","",3,"for"],["matInput","","required","","formControlName","validTill",3,"min","max","matDatepicker"],["required","","formControlName","recurrenceType"],["type","number","matInput","","required","","formControlName","recurrenceInterval"],["required","","formControlName","recurrenceFrequency"],["required","","matInput","","formControlName","recurrenceOnMonthDay",3,"min","max","matDatepicker"],[1,"layout-row","align-center","gap-5px","responsive-column"],["type","button","mat-raised-button","",3,"routerLink"],["mat-raised-button","","color","primary",3,"disabled","click",4,"mifosxHasPermission"],["mat-raised-button","","color","primary",3,"click","disabled"]],template:function(p,s){if(p&1){let f=w();n(0,"div",3)(1,"mat-card")(2,"form",4)(3,"mat-card-content")(4,"div",5)(5,"mat-form-field",6)(6,"mat-label"),r(7),o(8,"translate"),i(),C(9,"input",7),_(10,pi,7,9,"mat-error"),i(),n(11,"mat-form-field",6)(12,"mat-label"),r(13),o(14,"translate"),i(),C(15,"input",8),i(),n(16,"mat-form-field",6)(17,"mat-label"),r(18),o(19,"translate"),i(),n(20,"mat-select",9),x("selectionChange",function(){return b(f),S(s.changeEvent())}),D(21,di,2,2,"mat-option",10,E),i(),_(23,ui,7,9,"mat-error"),i(),n(24,"mat-form-field",6)(25,"mat-label"),r(26),o(27,"translate"),i(),n(28,"mat-select",11),D(29,fi,2,2,"mat-option",10,E),i(),_(31,Ci,7,9,"mat-error"),i(),n(32,"mat-form-field",6)(33,"mat-label"),r(34),o(35,"translate"),i(),n(36,"mat-select",12),D(37,_i,2,2,"mat-option",10,E),i(),_(39,vi,7,9,"mat-error"),i(),n(40,"mat-form-field",6)(41,"mat-label"),r(42),o(43,"translate"),i(),n(44,"mat-select",13),x("selectionChange",function(){return b(f),S(s.changeEvent())}),D(45,gi,2,2,"mat-option",10,E),i(),_(47,Ii,7,9,"mat-error"),i(),n(48,"mat-form-field",6)(49,"mat-label"),r(50),o(51,"translate"),i(),n(52,"mat-select",14),x("selectionChange",function(){return b(f),S(s.changeEvent())}),D(53,Ti,2,3,"mat-option",10,E),i(),_(55,hi,7,9,"mat-error"),i(),n(56,"mat-form-field",6)(57,"mat-label"),r(58),o(59,"translate"),i(),n(60,"mat-select",15),D(61,xi,2,2,"mat-option",10,E),i(),_(63,bi,7,9,"mat-error"),i(),n(64,"mat-form-field",6)(65,"mat-label"),r(66),o(67,"translate"),i(),n(68,"mat-select",16),x("selectionChange",function(){return b(f),S(s.changeEvent())}),D(69,Si,2,2,"mat-option",10,E),i(),_(71,yi,7,9,"mat-error"),i(),n(72,"mat-form-field",6)(73,"mat-label"),r(74),o(75,"translate"),i(),n(76,"mat-select",17),x("selectionChange",function(){return b(f),S(s.changeEvent())}),D(77,Ei,2,2,"mat-option",10,E),i(),_(79,Di,7,9,"mat-error"),i(),n(80,"mat-form-field",6)(81,"mat-label"),r(82),o(83,"translate"),i(),n(84,"mat-select",18),x("selectionChange",function(){return b(f),S(s.changeEvent())}),D(85,Ai,2,2,"mat-option",10,E),i(),_(87,Mi,7,9,"mat-error"),i(),n(88,"mat-form-field",6)(89,"mat-label"),r(90),o(91,"translate"),i(),n(92,"mat-select",19),x("selectionChange",function(){return b(f),S(s.changeEvent())}),D(93,ki,2,3,"mat-option",10,E),i(),_(95,Bi,7,9,"mat-error"),i(),n(96,"mat-form-field",6)(97,"mat-label"),r(98),o(99,"translate"),i(),n(100,"mat-select",20),D(101,Fi,2,2,"mat-option",10,E),i(),_(103,wi,7,9,"mat-error"),i(),n(104,"mat-form-field",6)(105,"mat-label"),r(106),o(107,"translate"),i(),C(108,"input",21),_(109,Oi,7,9,"mat-error"),i(),n(110,"mat-form-field",22),x("click",function(){b(f);let F=M(117);return S(F.open())}),n(111,"mat-label"),r(112),o(113,"translate"),i(),C(114,"input",23)(115,"mat-datepicker-toggle",24)(116,"mat-datepicker",null,0),_(118,Pi,7,9,"mat-error"),i(),n(119,"mat-form-field",22),x("click",function(){b(f);let F=M(126);return S(F.open())}),n(120,"mat-label"),r(121),o(122,"translate"),i(),C(123,"input",25)(124,"mat-datepicker-toggle",24)(125,"mat-datepicker",null,1),_(127,Ni,7,9,"mat-error"),i(),n(128,"mat-form-field",6)(129,"mat-label"),r(130),o(131,"translate"),i(),n(132,"mat-select",26),D(133,qi,2,2,"mat-option",10,E),i(),_(135,Vi,7,9,"mat-error"),i(),n(136,"mat-form-field",6)(137,"mat-label"),r(138),o(139,"translate"),i(),C(140,"input",27),_(141,Ri,7,9,"mat-error"),i(),n(142,"mat-form-field",6)(143,"mat-label"),r(144),o(145,"translate"),i(),n(146,"mat-select",28),D(147,Li,2,2,"mat-option",10,E),i(),_(149,Hi,7,9,"mat-error"),i(),n(150,"mat-form-field",22),x("click",function(){b(f);let F=M(157);return S(F.open())}),n(151,"mat-label"),r(152),o(153,"translate"),i(),C(154,"input",29)(155,"mat-datepicker-toggle",24)(156,"mat-datepicker",null,2),_(158,$i,7,9,"mat-error"),i()()(),n(159,"mat-card-actions",30)(160,"button",31),r(161),o(162,"translate"),i(),y(163,Ui,3,4,"button",32),i()()()()}if(p&2){let f=M(117),k=M(126),F=M(157);e(2),d("formGroup",s.createStandingInstructionsForm),e(5),c(l(8,57,"labels.inputs.name")),e(3),v(s.createStandingInstructionsForm.controls.name.hasError("required")?10:-1),e(3),c(l(14,59,"labels.inputs.Applicant")),e(5),c(l(19,61,"labels.inputs.Type")),e(3),A(s.transferTypeData),e(2),v(s.createStandingInstructionsForm.controls.transferType.hasError("required")?23:-1),e(3),c(l(27,63,"labels.inputs.Priority")),e(3),A(s.priorityTypeData),e(2),v(s.createStandingInstructionsForm.controls.priority.hasError("required")?31:-1),e(3),c(l(35,65,"labels.inputs.Status")),e(3),A(s.statusTypeData),e(2),v(s.createStandingInstructionsForm.controls.status.hasError("required")?39:-1),e(3),c(l(43,67,"labels.inputs.From Account Type")),e(3),A(s.fromAccountTypeData),e(2),v(s.createStandingInstructionsForm.controls.fromAccountType.hasError("required")?47:-1),e(3),c(l(51,69,"labels.inputs.From Account")),e(3),A(s.fromAccountData),e(2),v(s.createStandingInstructionsForm.controls.fromAccountId.hasError("required")?55:-1),e(3),c(l(59,71,"labels.inputs.Destination")),e(3),A(s.destinationTypeData),e(2),v(s.createStandingInstructionsForm.controls.destination.hasError("required")?63:-1),e(3),c(l(67,73,"labels.inputs.To Office")),e(2),d("disabled",s.ToOfficeId),e(),A(s.toOfficeTypeData),e(2),v(s.createStandingInstructionsForm.controls.toOfficeId.hasError("required")?71:-1),e(3),c(l(75,75,"labels.inputs.Beneficiary")),e(2),d("disabled",s.ToClientId),e(),A(s.toClientTypeData),e(2),v(s.createStandingInstructionsForm.controls.toClientId.hasError("required")?79:-1),e(3),c(l(83,77,"labels.inputs.To Account Type")),e(3),A(s.toAccountTypeData),e(2),v(s.createStandingInstructionsForm.controls.toAccountType.hasError("required")?87:-1),e(3),c(l(91,79,"labels.inputs.To Account")),e(3),A(s.toAccountData),e(2),v(s.createStandingInstructionsForm.controls.toAccountId.hasError("required")?95:-1),e(3),c(l(99,81,"labels.inputs.Standing Instruction Type")),e(3),A(s.instructionTypeData),e(2),v(s.createStandingInstructionsForm.controls.instructionType.hasError("required")?103:-1),e(3),c(l(107,83,"labels.inputs.Amount")),e(3),v(s.createStandingInstructionsForm.controls.amount.hasError("required")?109:-1),e(3),c(l(113,85,"labels.inputs.Validity from")),e(2),d("min",s.minDate)("max",s.maxDate)("matDatepicker",f),e(),d("for",f),e(3),v(s.createStandingInstructionsForm.controls.validFrom.hasError("required")?118:-1),e(3),c(l(122,87,"labels.inputs.Validity To")),e(2),d("min",s.minDate)("max",s.maxDate)("matDatepicker",k),e(),d("for",k),e(3),v(s.createStandingInstructionsForm.controls.validTill.hasError("required")?127:-1),e(3),c(l(131,89,"labels.inputs.Recurrence Type")),e(3),A(s.recurrenceTypeData),e(2),v(s.createStandingInstructionsForm.controls.recurrenceType.hasError("required")?135:-1),e(3),c(l(139,91,"labels.inputs.Interval")),e(3),v(s.createStandingInstructionsForm.controls.recurrenceInterval.hasError("required")?141:-1),e(3),c(l(145,93,"labels.inputs.Recurrence Frequency")),e(3),A(s.recurrenceFrequencyTypeData),e(2),v(s.createStandingInstructionsForm.controls.recurrenceFrequency.hasError("required")?149:-1),e(3),c(l(153,95,"labels.inputs.On Month Day")),e(2),d("min",s.minDate)("max",s.maxDate)("matDatepicker",F),e(),d("for",F),e(3),v(s.createStandingInstructionsForm.controls.recurrenceOnMonthDay.hasError("required")?158:-1),e(2),d("routerLink",U(99,mi)),e(),u(" ",l(162,97,"labels.buttons.Cancel")," "),e(2),d("mifosxHasPermission","CREATE_STANDINGINSTRUCTION")}},dependencies:[q,R,nt,J,bt,K,it,ot,at,rt,W,$,z,lt,Z,X,st,ct,tt,pt,mt,ut,ft,dt,j,Q,V],encapsulation:2})}}return t})();var Ge=t=>({balance:t}),Gi=()=>["../.."];function ji(t,m){t&1&&(n(0,"div",4),C(1,"div",6)(2,"div",7)(3,"div",8)(4,"div",9),i())}function zi(t,m){if(t&1){let a=w();P(0),n(1,"button",23),x("click",function(){b(a);let s=h(4);return S(s.searchAccountByNumber())}),r(2),o(3,"translate"),i(),N()}if(t&2){let a=h(4);e(),d("disabled",a.phoneAccount.length!==10),e(),u(" ",l(3,2,"labels.buttons.Search")," ")}}function Qi(t,m){t&1&&(n(0,"mat-card-actions",17),y(1,zi,4,4,"ng-container",22),i()),t&2&&(e(),d("mifosxHasPermission","CREATE_ACCOUNTTRANSFER"))}function Wi(t,m){if(t&1){let a=w();n(0,"div",10)(1,"div",18)(2,"h3",11),r(3),o(4,"translate"),i(),n(5,"mat-form-field",19)(6,"mat-label"),r(7),o(8,"translate"),i(),n(9,"input",20,0),xe("ngModelChange",function(s){b(a);let f=h(2);return he(f.phoneAccount,s)||(f.phoneAccount=s),S(s)}),i(),n(11,"mat-hint",21),r(12),i()()(),_(13,Qi,2,1,"mat-card-actions",17),i()}if(t&2){let a=h(2);e(3),c(l(4,6,"labels.heading.Transferred To")),e(4),c(l(8,8,"labels.inputs.Phone Number")),e(2),d("readonly",a.interbankTransferForm),Te("ngModel",a.phoneAccount),e(3),u("",a.phoneAccount.length||0,"/10"),e(),v(a.interbankTransferForm?-1:13)}}function Yi(t,m){t&1&&C(0,"mat-divider")}function Ji(t,m){t&1&&(n(0,"mat-error"),r(1),o(2,"translate"),o(3,"translate"),n(4,"strong"),r(5),o(6,"translate"),i()()),t&2&&(e(),g(" ",l(2,3,"labels.inputs.Transaction Date")," ",l(3,5,"labels.commons.is")," "),e(4),c(l(6,7,"labels.commons.required")))}function Ki(t,m){if(t&1&&(n(0,"mat-option",30),r(1),i()),t&2){let a=m.$implicit;d("value",a.id),e(),u(" ",a.name," ")}}function Xi(t,m){t&1&&(n(0,"mat-error"),r(1),o(2,"translate"),o(3,"translate"),n(4,"strong"),r(5),o(6,"translate"),i()()),t&2&&(e(),g(" ",l(2,3,"labels.inputs.Office")," ",l(3,5,"labels.commons.is")," "),e(4),c(l(6,7,"labels.commons.required")))}function Zi(t,m){t&1&&(n(0,"mat-error"),r(1),o(2,"translate"),o(3,"translate"),n(4,"strong"),r(5),o(6,"translate"),i()()),t&2&&(e(),g(" ",l(2,3,"labels.inputs.Client")," ",l(3,5,"labels.commons.is")," "),e(4),c(l(6,7,"labels.commons.required")))}function tn(t,m){if(t&1&&(n(0,"mat-option",30),r(1),i()),t&2){let a=m.$implicit;d("value",a),e(),g(" ",a.id," - ",a.displayName," ")}}function en(t,m){if(t&1&&(n(0,"mat-option",30),r(1),i()),t&2){let a=m.$implicit;d("value",a.id),e(),u(" ",a.value," ")}}function nn(t,m){t&1&&(n(0,"mat-error"),r(1),o(2,"translate"),o(3,"translate"),n(4,"strong"),r(5),o(6,"translate"),i()()),t&2&&(e(),g(" ",l(2,3,"labels.inputs.Account Type")," ",l(3,5,"labels.commons.is")," "),e(4),c(l(6,7,"labels.commons.required")))}function an(t,m){if(t&1&&(n(0,"mat-option",30),r(1),i()),t&2){let a=m.$implicit;d("value",a.id),e(),g(" ",a.productName," - ",a.accountNo," ")}}function rn(t,m){t&1&&(n(0,"mat-error"),r(1),o(2,"translate"),o(3,"translate"),n(4,"strong"),r(5),o(6,"translate"),i()()),t&2&&(e(),g(" ",l(2,3,"labels.inputs.Account")," ",l(3,5,"labels.commons.is")," "),e(4),c(l(6,7,"labels.commons.required")))}function on(t,m){t&1&&(n(0,"mat-error"),r(1),o(2,"translate"),o(3,"translate"),n(4,"strong"),r(5),o(6,"translate"),i()()),t&2&&(e(),g(" ",l(2,3,"labels.inputs.Amount")," ",l(3,5,"labels.commons.is")," "),e(4),c(l(6,7,"labels.commons.required")))}function ln(t,m){if(t&1&&(n(0,"mat-error"),C(1,"fa-icon",38),r(2),o(3,"translate"),i()),t&2){let a=h(3);e(2),u(" ",kt(3,1,"errors.validation.msg.savingsproduct.insufficient.balance",et(4,Ge,a.balance))," ")}}function sn(t,m){t&1&&(n(0,"mat-error"),r(1),o(2,"translate"),o(3,"translate"),n(4,"strong"),r(5),o(6,"translate"),i()()),t&2&&(e(),g(" ",l(2,3,"labels.inputs.Transfer Description")," ",l(3,5,"labels.commons.is")," "),e(4),c(l(6,7,"labels.commons.required")))}function cn(t,m){if(t&1){let a=w();n(0,"form",16)(1,"h3",11),r(2),o(3,"translate"),i(),n(4,"div",24)(5,"mat-form-field",25),x("click",function(){b(a);let s=M(12);return S(s.open())}),n(6,"mat-label"),r(7),o(8,"translate"),i(),C(9,"input",26)(10,"mat-datepicker-toggle",27)(11,"mat-datepicker",null,1),_(13,Ji,7,9,"mat-error"),i(),n(14,"mat-form-field",28)(15,"mat-label"),r(16),o(17,"translate"),i(),n(18,"mat-select",29),x("selectionChange",function(){b(a);let s=h(2);return S(s.changeEvent())}),D(19,Ki,2,2,"mat-option",30,E),i(),_(21,Xi,7,9,"mat-error"),i(),n(22,"mat-form-field",28)(23,"mat-label"),r(24),o(25,"translate"),i(),C(26,"input",31),_(27,Zi,7,9,"mat-error"),i(),n(28,"mat-autocomplete",32,2),D(30,tn,2,3,"mat-option",30,E),i(),n(32,"mat-form-field",28)(33,"mat-label"),r(34),o(35,"translate"),i(),n(36,"mat-select",33),x("selectionChange",function(){b(a);let s=h(2);return S(s.changeEvent())}),D(37,en,2,2,"mat-option",30,E),i(),_(39,nn,7,9,"mat-error"),i(),n(40,"mat-form-field",28)(41,"mat-label"),r(42),o(43,"translate"),i(),n(44,"mat-select",34),x("selectionChange",function(){b(a);let s=h(2);return S(s.changeEvent())}),D(45,an,2,3,"mat-option",30,E),i(),_(47,rn,7,9,"mat-error"),i(),n(48,"mat-form-field",28)(49,"mat-label"),r(50),o(51,"translate"),i(),C(52,"input",35),_(53,on,7,9,"mat-error"),_(54,ln,4,6,"mat-error"),i(),n(55,"mat-form-field",36)(56,"mat-label"),r(57),o(58,"translate"),i(),C(59,"textarea",37),_(60,sn,7,9,"mat-error"),i()()()}if(t&2){let a,p=M(12),s=M(29),f=h(2);d("formGroup",f.makeAccountTransferForm),e(2),c(l(3,23,"labels.heading.Transfer Details")),e(5),c(l(8,25,"labels.inputs.Transaction Date")),e(2),d("min",f.minDate)("max",f.maxDate)("matDatepicker",p),e(),d("for",p),e(3),v(f.makeAccountTransferForm.controls.transferDate.hasError("required")?13:-1),e(3),c(l(17,27,"labels.inputs.Office")),e(3),A(f.toOfficeTypeData),e(2),v(f.makeAccountTransferForm.controls.toOfficeId.hasError("required")?21:-1),e(3),c(l(25,29,"labels.inputs.Client")),e(2),d("matAutocomplete",s),e(),v(f.makeAccountTransferForm.controls.toClientId.hasError("required")?27:-1),e(),d("displayWith",f.displayClient),e(2),A(f.clientsData),e(4),c(l(35,31,"labels.inputs.Account Type")),e(3),A(f.toAccountTypeData),e(2),v(f.makeAccountTransferForm.controls.toAccountType.hasError("required")?39:-1),e(3),c(l(43,33,"labels.inputs.Account")),e(3),A(f.toAccountData),e(2),v(f.makeAccountTransferForm.controls.toAccountId.hasError("required")?47:-1),e(3),c(l(51,35,"labels.inputs.Amount")),e(3),v(f.makeAccountTransferForm.controls.transferAmount.hasError("required")?53:-1),e(),v((a=f.makeAccountTransferForm.get("transferAmount"))!=null&&a.hasError("amountExceedsBalance")?54:-1),e(3),c(l(58,37,"labels.inputs.Description")),e(3),v(f.makeAccountTransferForm.controls.transferDescription.hasError("required")?60:-1)}}function mn(t,m){t&1&&(n(0,"mat-error"),r(1),o(2,"translate"),o(3,"translate"),n(4,"strong"),r(5),o(6,"translate"),i()()),t&2&&(e(),g(" ",l(2,3,"labels.inputs.Transaction Date")," ",l(3,5,"labels.commons.is")," "),e(4),c(l(6,7,"labels.commons.required")))}function pn(t,m){t&1&&(n(0,"mat-error"),r(1),o(2,"translate"),o(3,"translate"),n(4,"strong"),r(5),o(6,"translate"),i()()),t&2&&(e(),g(" ",l(2,3,"labels.inputs.Amount")," ",l(3,5,"labels.commons.is")," "),e(4),c(l(6,7,"labels.commons.required")))}function dn(t,m){t&1&&(n(0,"mat-error"),r(1),o(2,"translate"),o(3,"translate"),i()),t&2&&(e(),g(" ",l(2,2,"labels.inputs.Amount")," ",l(3,4,"labels.commons.mustBeAtLeast")," 0.01 "))}function un(t,m){if(t&1&&(n(0,"mat-error"),C(1,"fa-icon",38),r(2),o(3,"translate"),i()),t&2){let a=h(3);e(2),u(" ",kt(3,1,"errors.validation.msg.savingsproduct.insufficient.balance",et(4,Ge,a.balance))," ")}}function fn(t,m){t&1&&(n(0,"mat-error"),r(1),o(2,"translate"),o(3,"translate"),n(4,"strong"),r(5),o(6,"translate"),i()()),t&2&&(e(),g(" ",l(2,3,"labels.inputs.Transfer Description")," ",l(3,5,"labels.commons.is")," "),e(4),c(l(6,7,"labels.commons.required")))}function Cn(t,m){if(t&1){let a=w();n(0,"form",16)(1,"h3",11),r(2),o(3,"translate"),i(),n(4,"div",24)(5,"mat-form-field",25),x("click",function(){b(a);let s=M(12);return S(s.open())}),n(6,"mat-label"),r(7),o(8,"translate"),i(),C(9,"input",26)(10,"mat-datepicker-toggle",27)(11,"mat-datepicker",null,1),_(13,mn,7,9,"mat-error"),i(),n(14,"mat-form-field",28)(15,"mat-label"),r(16),o(17,"translate"),i(),C(18,"input",39),i(),n(19,"mat-form-field",28)(20,"mat-label"),r(21),o(22,"translate"),i(),C(23,"input",40),i(),n(24,"mat-form-field",28)(25,"mat-label"),r(26),o(27,"translate"),i(),C(28,"input",41),i(),n(29,"mat-form-field",28)(30,"mat-label"),r(31),o(32,"translate"),i(),C(33,"input",42),i(),n(34,"mat-form-field",28)(35,"mat-label"),r(36),o(37,"translate"),i(),C(38,"input",35),_(39,pn,7,9,"mat-error"),_(40,dn,4,6,"mat-error"),_(41,un,4,6,"mat-error"),i(),n(42,"mat-form-field",36)(43,"mat-label"),r(44),o(45,"translate"),i(),C(46,"textarea",37),_(47,fn,7,9,"mat-error"),i()()()}if(t&2){let a,p=M(12),s=h(2);d("formGroup",s.makeAccountTransferForm),e(2),c(l(3,22,"labels.heading.Transfer Details")),e(5),c(l(8,24,"labels.inputs.Transaction Date")),e(2),d("min",s.minDate)("max",s.maxDate)("matDatepicker",p),e(),d("for",p),e(3),v(s.makeAccountTransferForm.controls.transferDate.hasError("required")?13:-1),e(3),c(l(17,26,"labels.inputs.Bank")),e(2),d("readonly",!0),e(3),c(l(22,28,"labels.inputs.Client")),e(2),d("readonly",!0),e(3),c(l(27,30,"labels.inputs.Account Type")),e(2),d("readonly",!0),e(3),c(l(32,32,"labels.inputs.Account")),e(2),d("readonly",!0),e(3),c(l(37,34,"labels.inputs.Amount")),e(3),v(s.makeAccountTransferForm.controls.transferAmount.hasError("required")?39:-1),e(),v(s.makeAccountTransferForm.controls.transferAmount.hasError("min")?40:-1),e(),v((a=s.makeAccountTransferForm.get("transferAmount"))!=null&&a.hasError("amountExceedsBalance")?41:-1),e(3),c(l(45,36,"labels.inputs.Description")),e(3),v(s.makeAccountTransferForm.controls.transferDescription.hasError("required")?47:-1)}}function _n(t,m){if(t&1){let a=w();n(0,"button",45),x("click",function(){b(a);let s=h(4);return S(s.submit())}),r(1),o(2,"translate"),i()}if(t&2){let a=h(4);d("disabled",!a.makeAccountTransferForm.valid),e(),u(" ",l(2,2,"labels.buttons.Submit")," ")}}function vn(t,m){if(t&1){let a=w();n(0,"button",45),x("click",function(){b(a);let s=h(4);return S(s.submit())}),r(1),o(2,"translate"),i()}if(t&2){let a=h(4);d("disabled",!a.makeAccountTransferForm.valid),e(),u(" ",l(2,2,"labels.buttons.Submit")," ")}}function gn(t,m){if(t&1&&(P(0),_(1,_n,3,4,"button",44),_(2,vn,3,4,"button",44),N()),t&2){let a=h(3);e(),v(a.interbank&&a.interbankTransferForm?1:-1),e(),v(a.interbank?-1:2)}}function In(t,m){t&1&&(n(0,"mat-card-actions",17)(1,"button",43),r(2),o(3,"translate"),i(),y(4,gn,3,2,"ng-container",22),i()),t&2&&(e(),d("routerLink",U(5,Gi)),e(),u(" ",l(3,3,"labels.buttons.Cancel")," "),e(2),d("mifosxHasPermission","CREATE_ACCOUNTTRANSFER"))}function Tn(t,m){if(t&1&&(n(0,"mat-card",5)(1,"mat-card-content")(2,"div",10)(3,"h3",11),r(4),o(5,"translate"),i(),C(6,"mat-divider"),n(7,"div",12)(8,"div",13)(9,"div",14),r(10),o(11,"translate"),i(),n(12,"div",15),r(13),i()(),n(14,"div",13)(15,"div",14),r(16),o(17,"translate"),i(),n(18,"div",15),r(19),i()(),n(20,"div",13)(21,"div",14),r(22),o(23,"translate"),i(),n(24,"div",15),r(25),i()(),n(26,"div",13)(27,"div",14),r(28),o(29,"translate"),i(),n(30,"div",15),r(31),i()(),n(32,"div",13)(33,"div",14),r(34),o(35,"translate"),i(),n(36,"div",15),r(37),i()()()(),_(38,Wi,14,10,"div",10),_(39,Yi,1,0,"mat-divider"),_(40,cn,61,39,"form",16),_(41,Cn,48,38,"form",16),i(),_(42,In,5,6,"mat-card-actions",17),i()),t&2){let a=h();e(4),c(l(5,17,"labels.heading.Transferring From Details")),e(6),c(l(11,19,"labels.inputs.Applicant")),e(3),c(a.accountTransferTemplateData.fromClient.displayName),e(3),c(l(17,21,"labels.inputs.Office")),e(3),c(a.accountTransferTemplateData.fromOffice.name),e(3),c(l(23,23,"labels.inputs.From Account")),e(3),g(" ",a.accountTransferTemplateData.fromAccount.productName,"\xA0-\xA0#",a.accountTransferTemplateData.fromAccount.accountNo," "),e(3),c(l(29,25,"labels.inputs.From Account Type")),e(3),c(a.accountTransferTemplateData.fromAccountType.value),e(3),c(l(35,27,"labels.inputs.Currency")),e(3),c(a.accountTransferTemplateData.currency.name),e(),v(a.interbank?38:-1),e(),v(a.interbank?-1:39),e(),v(!a.interbank&&a.makeAccountTransferForm?40:-1),e(),v(a.interbank&&a.interbankTransferForm&&a.makeAccountTransferForm?41:-1),e(),v(!a.isLoading&&a.makeAccountTransferForm?42:-1)}}var ne=(()=>{class t{constructor(){this.formBuilder=T(St),this.route=T(H),this.router=T(ht),this.accountTransfersService=T(B),this.dateUtils=T(xt),this.settingsService=T(Y),this.clientsService=T(He),this.minDate=new Date(2e3,0,1),this.maxDate=new Date(2100,0,1),this.interbank=!1,this.phoneAccount="",this.interbankTransferForm=!1,this.balance=0,this.isLoading=!1,this.route.data.subscribe(a=>{this.accountTransferTemplateData=a.accountTransferTemplate,this.setParams(),this.setOptions()})}setParams(){switch(this.accountType=this.route.snapshot.queryParams.accountType,this.accountType){case"fromloans":this.accountTypeId="1",this.id=this.route.snapshot.queryParams.loanId;break;case"fromsavings":case"interbank":this.accountTypeId="2",this.id=this.route.snapshot.queryParams.savingsId,this.interbank=this.route.snapshot.queryParams.interbank==="true";let a=this.router.currentNavigation()?.extras?.state?.balance,p=this.accountTransferTemplateData?.fromAccount?.availableBalance??this.accountTransferTemplateData?.fromAccount?.summary?.accountBalance??this.accountTransferTemplateData?.fromAccount?.balance??0;this.balance=typeof a=="number"?a:p;break;default:this.accountTypeId="0"}}ngOnInit(){this.maxDate=this.settingsService.businessDate,this.interbank?this.createEmptyInterbankForm():this.createMakeAccountTransferForm()}createEmptyInterbankForm(){this.makeAccountTransferForm=this.formBuilder.group({toBank:["",I.required],toClientId:["",I.required],toAccountType:["",I.required],toAccountId:["",I.required],transferAmount:[0,[I.required,I.min(.01),this.amountExceedsBalanceValidator.bind(this)]],transferDate:[this.settingsService.businessDate,I.required],transferDescription:["",I.required]})}createMakeAccountTransferForm(){this.makeAccountTransferForm=this.formBuilder.group({toOfficeId:["",I.required],toClientId:["",I.required],toAccountType:["",I.required],toAccountId:["",I.required],transferAmount:[this.accountTransferTemplateData.transferAmount,[I.required,I.min(.01),this.amountExceedsBalanceValidator.bind(this)]],transferDate:[this.settingsService.businessDate,I.required],transferDescription:["",I.required]})}createMakeAccountInterbankTransferForm(a){if(!a){console.error("Account data is undefined"),this.isLoading=!1;return}let p=this.accountTransferTemplateData?.transferAmount>0?this.accountTransferTemplateData.transferAmount:1;this.makeAccountTransferForm=this.formBuilder.group({toBank:[a.destinationFspId||"",I.required],toClientId:[(a.firstName||a.firsName||"")+" "+(a.lastName||""),I.required],toAccountType:["Saving Account",I.required],toAccountId:[a.partyId||"",I.required],transferAmount:[p,[I.required,I.min(.01),this.amountExceedsBalanceValidator.bind(this)]],transferDate:[this.settingsService.businessDate,I.required],transferDescription:["Transferencia interbancaria",I.required]}),this.isLoading=!1}amountExceedsBalanceValidator(a){return a.value>this.balance?{amountExceedsBalance:!0}:null}setOptions(){this.toOfficeTypeData=this.accountTransferTemplateData.toOfficeOptions,this.toAccountTypeData=this.accountTransferTemplateData.toAccountTypeOptions,this.toAccountData=this.accountTransferTemplateData.toAccountOptions}changeEvent(){let a=this.refineObject(this.makeAccountTransferForm.value);this.accountTransfersService.newAccountTranferResource(this.id,this.accountTypeId,a).subscribe(p=>{this.accountTransferTemplateData=p,this.toClientTypeData=p.toClientOptions,this.setOptions()})}refineObject(a){delete a.transferAmount,delete a.transferDate,delete a.transferDescription,a.toClientId&&typeof a.toClientId=="object"&&(a.toClientId=a.toClientId.id);let p=Object.getOwnPropertyNames(a);for(let s=0;s{typeof a=="string"&&a.length>=2&&(this.clientsService.getFilteredClients("displayName","ASC",!0,a).subscribe(p=>{this.clientsData=p.pageItems}),this.changeEvent())})}displayClient(a){return a?a.displayName:void 0}submit(){this.interbank?this.makeInterbankTransfer():this.makeTransfer()}makeTransfer(){this.isLoading=!0;let a=this.settingsService.dateFormat,p=this.settingsService.language.code,s;typeof this.makeAccountTransferForm.controls.toClientId.value=="object"?s=this.makeAccountTransferForm.controls.toClientId.value.id:s=this.makeAccountTransferForm.controls.toClientId.value;let f=Nt(Pt({},this.makeAccountTransferForm.value),{transferDate:this.dateUtils.formatDate(this.makeAccountTransferForm.value.transferDate,a),dateFormat:a,locale:p,toClientId:s,fromAccountId:this.id,fromAccountType:this.accountTypeId,fromClientId:this.accountTransferTemplateData.fromClient.id,fromOfficeId:this.accountTransferTemplateData.fromClient.officeId});this.accountTransfersService.createAccountTransfer(f).subscribe(()=>{this.isLoading=!1,this.router.navigate(["../../transactions"],{relativeTo:this.route})})}makeInterbankTransfer(){if(this.isLoading=!0,!this.makeAccountTransferForm.valid){console.error("Interbank form is not valid"),this.isLoading=!1;return}let a={homeTransactionId:crypto.randomUUID(),from:{fspId:De.fineractPlatformTenantId,idType:"MSISDN",idValue:this.accountTransferTemplateData.fromAccount.externalId?.trim()||""},to:{fspId:this.makeAccountTransferForm.controls.toBank.value,idType:"MSISDN",idValue:this.makeAccountTransferForm.controls.toAccountId.value},amountType:"SEND",amount:{currencyCode:this.accountTransferTemplateData.currency.code,amount:this.makeAccountTransferForm.controls.transferAmount.value},transactionType:{scenario:"TRANSFER",subScenario:"DOMESTIC",initiator:"PAYER",initiatorType:"CUSTOMER"},note:this.makeAccountTransferForm.controls.transferDescription.value};this.accountTransfersService.sendInterbankTransfer(JSON.stringify(a)).subscribe(p=>{p.systemMessage&&(this.isLoading=!1,this.router.navigate(["../../transactions"],{relativeTo:this.route}))},p=>{console.error("Interbank transfer error:",p),this.isLoading=!1})}searchAccountByNumber(){!this.phoneAccount||this.phoneAccount.length!==10||(this.isLoading=!0,this.accountTransfersService.getAccountByNumber(this.phoneAccount,this.accountTransferTemplateData.currency.code).subscribe(a=>{this.interbankTransferForm=!0,this.createMakeAccountInterbankTransferForm(a)},a=>{console.error("searching account error:",a),this.isLoading=!1}))}static{this.\u0275fac=function(p){return new(p||t)}}static{this.\u0275cmp=O({type:t,selectors:[["mifosx-make-account-transfers"]],decls:3,vars:2,consts:[["input",""],["transferDatePicker",""],["clientsAutocomplete","matAutocomplete"],[1,"container"],[1,"loader-wrapper"],[1,"transfer-card"],[1,"bottom","triangle"],[1,"top","triangle"],[1,"left","triangle"],[1,"right","triangle"],[1,"section-container"],[1,"section-title","transfer-heading"],[1,"info-grid"],[1,"info-row"],[1,"info-label"],[1,"info-value"],[1,"transfer-form",3,"formGroup"],[1,"action-buttons"],[1,"interbank-section"],[1,"full-width"],["matInput","","type","tel","maxlength","10","required","","placeholder","Enter phone number","title","Phone number",3,"ngModelChange","readonly","ngModel"],["align","end"],[4,"mifosxHasPermission"],["mat-raised-button","","color","primary","id","search-button",1,"primary-button",3,"click","disabled"],[1,"form-grid"],[1,"form-field",3,"click"],["matInput","","required","","formControlName","transferDate","placeholder","Select date","title","Transaction Date",3,"min","max","matDatepicker"],["matSuffix","",3,"for"],[1,"form-field"],["required","","formControlName","toOfficeId",3,"selectionChange"],[3,"value"],["matInput","","formControlName","toClientId","placeholder","Select or type client name","title","Client name",3,"matAutocomplete"],["autoActiveFirstOption","",3,"displayWith"],["required","","formControlName","toAccountType",3,"selectionChange"],["required","","formControlName","toAccountId",3,"selectionChange"],["type","number","matInput","","required","","formControlName","transferAmount","placeholder","Enter amount","title","Transfer amount","min","0.01","step","0.01"],[1,"form-field","description-field"],["matInput","","formControlName","transferDescription","cdkTextareaAutosize","","cdkAutosizeMinRows","2","placeholder","Enter transfer description","title","Transfer description"],["icon","exclamation-triangle","size","md"],["matInput","","formControlName","toBank","placeholder","Bank","title","Bank",3,"readonly"],["matInput","","formControlName","toClientId","placeholder","Client","title","Client",3,"readonly"],["matInput","","formControlName","toAccountType","placeholder","Account Type","title","Account Type",3,"readonly"],["matInput","","formControlName","toAccountId","placeholder","Account","title","Account",3,"readonly"],["type","button","mat-raised-button","",1,"cancel-button",3,"routerLink"],["mat-raised-button","","color","primary",1,"primary-button",3,"disabled"],["mat-raised-button","","color","primary",1,"primary-button",3,"click","disabled"]],template:function(p,s){p&1&&(n(0,"div",3),_(1,ji,5,0,"div",4),_(2,Tn,43,29,"mat-card",5),i()),p&2&&(e(),v(s.isLoading?1:-1),e(),v(s.isLoading?-1:2))},dependencies:[q,R,nt,J,bt,K,it,ot,Be,ke,at,rt,W,$,z,lt,Z,X,st,ct,we,tt,pt,mt,ut,ft,dt,j,Q,vt,Fe,Ae,qe,Ne,_t,Lt,V],styles:[".container[_ngcontent-%COMP%]{max-width:42rem;margin:0 auto;padding:1rem}.transfer-card[_ngcontent-%COMP%]{border-radius:8px;box-shadow:0 2px 10px #00000014;margin-bottom:1.5rem;overflow:hidden}.section-container[_ngcontent-%COMP%]{margin-bottom:2rem}.section-title[_ngcontent-%COMP%]{font-size:1.25rem;font-weight:600;color:#333;margin:0 0 1rem;padding-bottom:.5rem;border-bottom:1px solid rgba(0,0,0,.12)}.section-title.transfer-heading[_ngcontent-%COMP%]{font-weight:700}.info-grid[_ngcontent-%COMP%]{display:grid;grid-template-columns:100%;gap:.75rem}@media (width >= 768px){.info-grid[_ngcontent-%COMP%]{grid-template-columns:repeat(2,50%)}}.info-row[_ngcontent-%COMP%]{display:flex;align-items:center;padding:.5rem;background-color:#00000005;border-radius:4px}.info-row[_ngcontent-%COMP%]:hover{background-color:#0000000a}.info-label[_ngcontent-%COMP%]{flex:0 0 40%;color:#000000b3;font-weight:500}.info-value[_ngcontent-%COMP%]{flex:1;color:#000000de}mat-divider[_ngcontent-%COMP%]{margin:1rem 0}.interbank-section[_ngcontent-%COMP%]{margin-bottom:1rem}.transfer-form[_ngcontent-%COMP%]{margin-top:1rem}.form-grid[_ngcontent-%COMP%]{display:grid;grid-template-columns:100%;gap:1rem}@media (width >= 768px){.form-grid[_ngcontent-%COMP%]{grid-template-columns:repeat(2,1fr);gap:1.5rem}}.form-row[_ngcontent-%COMP%]{display:contents}.form-field[_ngcontent-%COMP%]{width:100%;margin-bottom:.5rem}@media (width >= 768px){.form-field[_ngcontent-%COMP%]:nth-child(odd){margin-right:.5rem}}@media (width >= 768px){.form-field[_ngcontent-%COMP%]:nth-child(2n){margin-left:.5rem}}.form-field.description-field[_ngcontent-%COMP%]{grid-column:1/-1}.form-field.description-field[_ngcontent-%COMP%] textarea[_ngcontent-%COMP%]{min-height:80px;resize:vertical} .mat-form-field{width:100%}.action-buttons[_ngcontent-%COMP%]{display:flex;justify-content:flex-end;gap:1rem;padding:1rem 1.5rem;margin-top:1rem}@media (width <= 576px){.action-buttons[_ngcontent-%COMP%]{flex-direction:column}}.action-buttons[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{min-width:120px}@media (width <= 576px){.action-buttons[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{width:100%;margin-bottom:.5rem}}.action-buttons[_ngcontent-%COMP%] .cancel-button[_ngcontent-%COMP%]{background-color:#f5f5f5;color:#000000de;box-shadow:0 1px 3px #0000001f}.action-buttons[_ngcontent-%COMP%] .cancel-button[_ngcontent-%COMP%]:hover{background-color:#e0e0e0;box-shadow:0 2px 5px #0000002e}.action-buttons[_ngcontent-%COMP%] .primary-button[_ngcontent-%COMP%]{background-color:#f5f5f5;color:#000000de;font-weight:400;border:none;box-shadow:none}.action-buttons[_ngcontent-%COMP%] .primary-button[_ngcontent-%COMP%]:hover{background-color:#e0e0e0;box-shadow:0 2px 5px #0000002e}.loader-wrapper[_ngcontent-%COMP%]{display:flex;justify-content:center;align-items:center;height:300px;position:relative}@keyframes _ngcontent-%COMP%_rotate-triangle{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.triangle[_ngcontent-%COMP%]{position:absolute;width:0;height:0;border-left:20px solid transparent;border-right:20px solid transparent;border-bottom:34px solid rgba(0,0,0,.05);animation:_ngcontent-%COMP%_rotate-triangle 1.5s infinite linear}.triangle[_ngcontent-%COMP%]:hover{border-bottom-color:#00000014}.dark-theme[_ngcontent-%COMP%] .info-label[_ngcontent-%COMP%]{color:#ffffffb3}.dark-theme[_ngcontent-%COMP%] .info-value[_ngcontent-%COMP%]{color:#ffffffde}.dark-theme[_ngcontent-%COMP%] .section-title[_ngcontent-%COMP%]{color:#fff;border-bottom-color:#ffffff1f}.dark-theme[_ngcontent-%COMP%] .transfer-heading[_ngcontent-%COMP%]{color:#fff;font-weight:700}.dark-theme[_ngcontent-%COMP%] .action-buttons[_ngcontent-%COMP%] .cancel-button[_ngcontent-%COMP%]{background-color:#424242;color:#ffffffde}.dark-theme[_ngcontent-%COMP%] .action-buttons[_ngcontent-%COMP%] .cancel-button[_ngcontent-%COMP%]:hover{background-color:#505050}.dark-theme[_ngcontent-%COMP%] .action-buttons[_ngcontent-%COMP%] .primary-button[_ngcontent-%COMP%]{background-color:#424242;color:#ffffffde;font-weight:400;border:none;box-shadow:none}.dark-theme[_ngcontent-%COMP%] .action-buttons[_ngcontent-%COMP%] .primary-button[_ngcontent-%COMP%]:hover{background-color:#505050}.dark-theme[_nghost-%COMP%] .transfer-heading[_ngcontent-%COMP%], .dark-theme [_nghost-%COMP%] .transfer-heading[_ngcontent-%COMP%]{color:#fff;font-weight:700}.dark-theme[_nghost-%COMP%] .action-buttons[_ngcontent-%COMP%] .cancel-button[_ngcontent-%COMP%], .dark-theme [_nghost-%COMP%] .action-buttons[_ngcontent-%COMP%] .cancel-button[_ngcontent-%COMP%]{background-color:#424242;color:#ffffffde}.dark-theme[_nghost-%COMP%] .action-buttons[_ngcontent-%COMP%] .primary-button[_ngcontent-%COMP%], .dark-theme [_nghost-%COMP%] .action-buttons[_ngcontent-%COMP%] .primary-button[_ngcontent-%COMP%]{background-color:#424242;color:#ffffffde;font-weight:400;border:none;box-shadow:none}body.dark-theme[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .section-title[_ngcontent-%COMP%]{color:#fff}body.dark-theme[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .transfer-heading[_ngcontent-%COMP%]{color:#fff;font-weight:700}body.dark-theme[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .action-buttons[_ngcontent-%COMP%] .cancel-button[_ngcontent-%COMP%]{background-color:#424242;color:#ffffffde}body.dark-theme[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .action-buttons[_ngcontent-%COMP%] .primary-button[_ngcontent-%COMP%]{background-color:#424242;color:#ffffffde;font-weight:400;border:none;box-shadow:none} mat-form-field.error-warn.mat-form-field-invalid .mat-form-field-ripple{background-color:#000000de!important} mat-form-field.error-warn.mat-form-field-invalid .mat-form-field-label{color:#0009!important} mat-form-field.error-warn.mat-form-field-invalid .mat-form-field-label .mat-form-field-required-marker{color:#0009!important} mat-form-field.error-warn.mat-form-field-invalid .mat-error{color:#0009!important} .mat-form-field-flex{align-items:center}.transfer-form[_ngcontent-%COMP%] .form-field[_ngcontent-%COMP%]{margin-bottom:1rem}.readonly-field[_ngcontent-%COMP%]{background-color:#00000005;cursor:not-allowed} .mat-input-element{font-size:14px}"]})}}return t})();var hn=["instructionsTable"],xn=()=>[10,25,50,100],bn=t=>["../",t,"edit"],Sn=t=>["../",t,"view"];function yn(t,m){if(t&1&&(n(0,"div",3)(1,"span",24)(2,"h3",25),r(3),o(4,"translate"),i()(),n(5,"span",26)(6,"h3",25),r(7),i()()()),t&2){let a=h();e(3),c(l(4,2,"labels.heading.Client Type")),e(4),c(a.clientName)}}function En(t,m){if(t&1&&(n(0,"div",3)(1,"mat-form-field",27),C(2,"input",28),i(),n(3,"mat-form-field",27),C(4,"input",29),i()()),t&2){let a=h();e(2),d("formControl",a.clientNameControl),e(2),d("formControl",a.fromClientId)}}function Dn(t,m){if(t&1&&(n(0,"mat-option",7),r(1),i()),t&2){let a=m.$implicit;d("value",a.id),e(),u(" ",a.value," ")}}function An(t,m){if(t&1){let a=w();n(0,"button",30),x("click",function(){b(a);let s=h();return S(s.filterStandingInstructions())}),r(1),o(2,"translate"),o(3,"titlecase"),i()}t&2&&(e(),u(" ",l(3,3,l(2,1,"labels.buttons.Filter"))," "))}function Mn(t,m){t&1&&(n(0,"th",31),r(1),o(2,"translate"),i()),t&2&&(e(),c(l(2,1,"labels.inputs.Client")))}function kn(t,m){if(t&1&&(n(0,"td",32),r(1),i()),t&2){let a=m.$implicit;e(),g(" ",a.fromClient.displayName,"-",a.fromClient.id," ")}}function Bn(t,m){t&1&&(n(0,"th",31),r(1),o(2,"translate"),i()),t&2&&(e(),c(l(2,1,"labels.inputs.From Account")))}function Fn(t,m){if(t&1&&(n(0,"td",32),r(1),i()),t&2){let a=m.$implicit;e(),g(" ",a.fromAccount.accountNo," (",a.fromAccountType.value,") ")}}function wn(t,m){t&1&&(n(0,"th",31),r(1),o(2,"translate"),i()),t&2&&(e(),c(l(2,1,"labels.inputs.Beneficiary")))}function On(t,m){if(t&1&&(n(0,"td",32),r(1),i()),t&2){let a=m.$implicit;e(),c(a.toClient.displayName)}}function Pn(t,m){t&1&&(n(0,"th",31),r(1),o(2,"translate"),i()),t&2&&(e(),c(l(2,1,"labels.inputs.To Account")))}function Nn(t,m){if(t&1&&(n(0,"td",32),r(1),i()),t&2){let a=m.$implicit;e(),g(" ",a.toAccount.accountNo," (",a.toAccountType.value,") ")}}function qn(t,m){t&1&&(n(0,"th",31),r(1),o(2,"translate"),i()),t&2&&(e(),c(l(2,1,"labels.inputs.Amount")))}function Vn(t,m){if(t&1&&(n(0,"td",32),r(1),i()),t&2){let a=m.$implicit;e(),g("",a.instructionType.value,"/",a.amount)}}function Rn(t,m){t&1&&(n(0,"th",31),r(1),o(2,"translate"),i()),t&2&&(e(),c(l(2,1,"labels.inputs.Validity")))}function Ln(t,m){if(t&1&&(n(0,"td",32),r(1),o(2,"dateFormat"),o(3,"dateFormat"),i()),t&2){let a=m.$implicit;e(),g(" ",l(2,2,a.validFrom)," to ",l(3,4,a.validTill)," ")}}function Hn(t,m){t&1&&(n(0,"th",31),r(1),o(2,"translate"),i()),t&2&&(e(),c(l(2,1,"labels.inputs.Actions")))}function $n(t,m){if(t&1&&(n(0,"button",34),o(1,"translate"),C(2,"i",35),i()),t&2){let a=h(2).$implicit;d("matTooltip",Rt(l(1,3,"tooltips.Edit Standing Instruction")))("routerLink",et(5,bn,a.id))}}function Un(t,m){t&1&&(n(0,"span"),y(1,$n,3,7,"button",33),i()),t&2&&(e(),d("mifosxHasPermission","UPDATE_STANDINGINSTRUCTION"))}function Gn(t,m){if(t&1){let a=w();n(0,"button",37),o(1,"translate"),x("click",function(){b(a);let s=h(2).$implicit,f=h();return S(f.deleteStandingInstruction(s.id))}),C(2,"i",38),i()}t&2&&d("matTooltip",Rt(l(1,2,"tooltips.Delete Standing Instruction")))}function jn(t,m){t&1&&(n(0,"span"),y(1,Gn,3,4,"button",36),i()),t&2&&(e(),d("mifosxHasPermission","DELETE_STANDINGINSTRUCTION"))}function zn(t,m){if(t&1&&(n(0,"button",34),o(1,"translate"),C(2,"i",39),i()),t&2){let a=h().$implicit;d("matTooltip",Rt(l(1,3,"tooltips.View Standing Instruction")))("routerLink",et(5,Sn,a.id))}}function Qn(t,m){if(t&1&&(n(0,"td",32),_(1,Un,2,1,"span"),_(2,jn,2,1,"span"),y(3,zn,3,7,"button",33),i()),t&2){let a=m.$implicit;e(),v(a.status.value!=="Deleted"?1:-1),e(),v(a.status.value!=="Deleted"?2:-1),e(),d("mifosxHasPermission","READ_STANDINGINSTRUCTION")}}function Wn(t,m){t&1&&C(0,"tr",40)}function Yn(t,m){t&1&&C(0,"tr",41)}var ae=(()=>{class t{constructor(){this.route=T(H),this.accountTransfersService=T(B),this.settingsService=T(Y),this.dialog=T(Ee),this.transferType=new Bt,this.fromAccountId=new Bt,this.clientNameControl=new Bt,this.fromClientId=new Bt,this.dataSource=new Ft,this.displayedColumns=["client","fromAccount","beneficiary","toAccount","amount","validity","actions"],this.route.data.subscribe(a=>{this.standingIntructionsTemplateData=a.standingIntructionsTemplate,a.standingIntructionsTemplate.fromClient&&(this.clientName=this.standingIntructionsTemplateData.fromClient.displayName,this.getStandingInstructions()),this.setParams(),this.transferTypeDatas=this.standingIntructionsTemplateData.transferTypeOptions})}setParams(){switch(this.accountType=this.route.snapshot.queryParams.accountType,this.accountType){case"fromloans":this.accountTypeId="1";break;case"fromsavings":this.accountTypeId="2";break;default:this.accountTypeId="0"}this.isFromClient=!!this.route.parent.parent.snapshot.params.clientId}filterStandingInstructions(){this.getStandingInstructions()}getStandingInstructions(){let a=this.settingsService.dateFormat,p=this.settingsService.language.code,s={clientId:this.standingIntructionsTemplateData.fromClient.id||this.fromClientId.value,clientName:this.standingIntructionsTemplateData.fromClient.displayName||this.clientNameControl.value,locale:p,dateFormat:a,limit:14,offset:0,fromAccountType:this.accountTypeId,fromAccountId:this.fromAccountId.value,fromTransferType:this.transferType.value};this.accountTransfersService.getStandingInstructions(s).subscribe(f=>{this.instructionsData=f.pageItems,this.dataSource.data=this.instructionsData,this.instructionTableRef.renderRows()})}deleteStandingInstruction(a){this.dialog.open(Pe,{data:{deleteContext:`standing instruction id: ${a}`}}).afterClosed().subscribe(s=>{s.delete&&this.accountTransfersService.deleteStandingInstrucions(a).subscribe(()=>{})})}static{this.\u0275fac=function(p){return new(p||t)}}static{this.\u0275cmp=O({type:t,selectors:[["mifosx-list-standing-instructions"]],viewQuery:function(p,s){if(p&1&&(Dt(hn,7),Dt(yt,7)),p&2){let f;At(f=Mt())&&(s.instructionTableRef=f.first),At(f=Mt())&&(s.paginator=f.first)}},decls:41,vars:15,consts:[["instructionsTable",""],[1,"container"],[1,"layout-row-wrap","gap-2px","responsive-column"],[1,"flex-fill"],[3,"inset"],[1,"type-field"],[3,"formControl"],[3,"value"],[1,"account-Id-field"],["matInput","","placeholder","From Account Id",3,"formControl"],["mat-raised-button","","color","primary","class","filter-button",3,"click",4,"mifosxHasPermission"],["mat-table","",3,"dataSource"],["matColumnDef","client"],["mat-header-cell","",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","fromAccount"],["matColumnDef","beneficiary"],["matColumnDef","toAccount"],["matColumnDef","amount"],["matColumnDef","validity"],["matColumnDef","actions"],["mat-header-row","",4,"matHeaderRowDef"],["mat-row","",4,"matRowDef","matRowDefColumns"],["showFirstLastButtons","",3,"pageSize","pageSizeOptions"],[1,"flex-40"],[1,"mat-h3"],[1,"client-Name"],[1,"flex-30"],["matInput","","placeholder","ClientName",3,"formControl"],["matInput","","placeholder","From Client Id",3,"formControl"],["mat-raised-button","","color","primary",1,"filter-button",3,"click"],["mat-header-cell",""],["mat-cell",""],["class","account-action-button","mat-raised-button","","color","primary",3,"matTooltip","routerLink",4,"mifosxHasPermission"],["mat-raised-button","","color","primary",1,"account-action-button",3,"matTooltip","routerLink"],[1,"fa","fa-edit"],["class","account-action-button","mat-raised-button","","color","warn",3,"matTooltip","click",4,"mifosxHasPermission"],["mat-raised-button","","color","warn",1,"account-action-button",3,"click","matTooltip"],[1,"fa","fa-times"],[1,"fa","fa-eye"],["mat-header-row",""],["mat-row",""]],template:function(p,s){p&1&&(n(0,"mat-card",1)(1,"div",2),_(2,yn,8,4,"div",3),_(3,En,5,2,"div",3),C(4,"mat-divider",4),n(5,"mat-form-field",5)(6,"mat-label"),r(7),o(8,"translate"),i(),n(9,"mat-select",6),D(10,Dn,2,2,"mat-option",7,E),i()(),n(12,"mat-form-field",8),C(13,"input",9),i(),y(14,An,4,5,"button",10),i(),n(15,"table",11,0),P(17,12),y(18,Mn,3,3,"th",13)(19,kn,2,2,"td",14),N(),P(20,15),y(21,Bn,3,3,"th",13)(22,Fn,2,2,"td",14),N(),P(23,16),y(24,wn,3,3,"th",13)(25,On,2,1,"td",14),N(),P(26,17),y(27,Pn,3,3,"th",13)(28,Nn,2,2,"td",14),N(),P(29,18),y(30,qn,3,3,"th",13)(31,Vn,2,2,"td",14),N(),P(32,19),y(33,Rn,3,3,"th",13)(34,Ln,4,6,"td",14),N(),P(35,20),y(36,Hn,3,3,"th",13)(37,Qn,4,3,"td",14),N(),y(38,Wn,1,0,"tr",21)(39,Yn,1,0,"tr",22),i(),C(40,"mat-paginator",23),i()),p&2&&(e(2),v(s.isFromClient?2:-1),e(),v(s.isFromClient?-1:3),e(),d("inset",!0),e(3),c(l(8,12,"labels.inputs.Type")),e(2),d("formControl",s.transferType),e(),A(s.transferTypeDatas),e(3),d("formControl",s.fromAccountId),e(),d("mifosxHasPermission","READ_STANDINGINSTRUCTION"),e(),d("dataSource",s.dataSource),e(23),d("matHeaderRowDef",s.displayedColumns),e(),d("matRowDefColumns",s.displayedColumns),e(),d("pageSize",10)("pageSizeOptions",U(14,xn)))},dependencies:[q,R,J,K,Me,W,$,Z,X,tt,pt,mt,j,Q,vt,Ht,Gt,Ut,jt,$t,zt,Oe,Qt,Yt,Wt,Jt,yt,ye,Ct,V],styles:[".container[_ngcontent-%COMP%] .filter-button[_ngcontent-%COMP%]{height:2.5rem;margin-top:2rem}table[_ngcontent-%COMP%]{width:100%}table[_ngcontent-%COMP%] .account-action-button[_ngcontent-%COMP%]{min-width:26px;padding:0 6px;margin:4px;line-height:25px}.mat-divider[_ngcontent-%COMP%]{border-top-color:#fff}"]})}}return t})();var Jn=()=>[5,10,25,50,100];function Kn(t,m){t&1&&(n(0,"th",16),r(1),o(2,"translate"),i()),t&2&&(e(),c(l(2,1,"labels.inputs.Transaction Date")))}function Xn(t,m){if(t&1&&(n(0,"td",17),r(1),o(2,"dateFormat"),i()),t&2){let a=m.$implicit;e(),c(l(2,1,a.transferDate))}}function Zn(t,m){t&1&&(n(0,"th",16),r(1),o(2,"translate"),i()),t&2&&(e(),c(l(2,1,"labels.inputs.Amount")))}function ta(t,m){if(t&1&&(n(0,"td",17),r(1),i()),t&2){let a=m.$implicit;e(),c(a.transferAmount)}}function ea(t,m){t&1&&(n(0,"th",16),r(1),o(2,"translate"),i()),t&2&&(e(),c(l(2,1,"labels.inputs.Notes")))}function ia(t,m){if(t&1&&(n(0,"td",17),r(1),i()),t&2){let a=m.$implicit;e(),c(a.transferDescription)}}function na(t,m){t&1&&(n(0,"th",16),r(1),o(2,"translate"),i()),t&2&&(e(),c(l(2,1,"labels.inputs.Reversed")))}function aa(t,m){if(t&1&&(n(0,"td",17),r(1),o(2,"yesNo"),i()),t&2){let a=m.$implicit;e(),c(l(2,1,a.reversed))}}function ra(t,m){t&1&&C(0,"tr",18)}function oa(t,m){t&1&&C(0,"tr",19)}var re=(()=>{class t{constructor(){this.route=T(H),this.dataSource=new Ft,this.displayedColumns=["transactionDate","amount","notes","reversed"],this.route.data.subscribe(a=>{this.listTransactionData=a.listTransactionData,this.dataSource=new Ft(this.listTransactionData.transactions.pageItems),this.dataSource.paginator=this.paginator})}static{this.\u0275fac=function(p){return new(p||t)}}static{this.\u0275cmp=O({type:t,selectors:[["mifosx-list-transactions"]],viewQuery:function(p,s){if(p&1&&Dt(yt,7),p&2){let f;At(f=Mt())&&(s.paginator=f.first)}},decls:36,vars:19,consts:[[1,"container","m-b-20"],[1,"mat-elevation-z8"],[1,"layout-row-wrap"],[1,"flex-25","header"],[1,"flex-25"],[1,"mat-elevation-z8","container"],["mat-table","",3,"dataSource"],["matColumnDef","transactionDate"],["mat-header-cell","",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","amount"],["matColumnDef","notes"],["matColumnDef","reversed"],["mat-header-row","",4,"matHeaderRowDef"],["mat-row","",4,"matRowDef","matRowDefColumns"],["showFirstLastButtons","",3,"pageSizeOptions"],["mat-header-cell",""],["mat-cell",""],["mat-header-row",""],["mat-row",""]],template:function(p,s){p&1&&(n(0,"div",0)(1,"mat-card",1)(2,"mat-card-content")(3,"div",2)(4,"div",3),r(5),o(6,"translate"),i(),n(7,"div",4),r(8),i(),n(9,"div",3),r(10),o(11,"translate"),i(),n(12,"div",4),r(13),i(),n(14,"div",3),r(15),o(16,"translate"),i(),n(17,"div",4),r(18),i()()()()(),n(19,"div",5)(20,"table",6),P(21,7),y(22,Kn,3,3,"th",8)(23,Xn,3,3,"td",9),N(),P(24,10),y(25,Zn,3,3,"th",8)(26,ta,2,1,"td",9),N(),P(27,11),y(28,ea,3,3,"th",8)(29,ia,2,1,"td",9),N(),P(30,12),y(31,na,3,3,"th",8)(32,aa,3,3,"td",9),N(),y(33,ra,1,0,"tr",13)(34,oa,1,0,"tr",14),i(),C(35,"mat-paginator",15),i()),p&2&&(e(5),u(" ",l(6,12,"labels.inputs.From Account")," "),e(3),g(" ",s.listTransactionData.fromAccount.accountNo,"(",s.listTransactionData.fromAccountType.value,") "),e(2),u(" ",l(11,14,"labels.inputs.To Account")," "),e(3),g(" ",s.listTransactionData.toAccount.accountNo,"(",s.listTransactionData.toAccountType.value,") "),e(2),u(" ",l(16,16,"labels.inputs.Destination")," "),e(3),u(" ",s.listTransactionData.toClient.displayName," "),e(2),d("dataSource",s.dataSource),e(13),d("matHeaderRowDef",s.displayedColumns),e(),d("matRowDefColumns",s.displayedColumns),e(),d("pageSizeOptions",U(18,Jn)))},dependencies:[q,R,$,z,Ht,Gt,Ut,jt,$t,zt,Qt,Yt,Wt,Jt,yt,Ct,V,Re],styles:[".content[_ngcontent-%COMP%] div[_ngcontent-%COMP%]{line-height:3rem}.content[_ngcontent-%COMP%] div.header[_ngcontent-%COMP%]{font-weight:500}table[_ngcontent-%COMP%]{width:100%}table[_ngcontent-%COMP%] .select-row[_ngcontent-%COMP%]:hover{cursor:pointer}"]})}}return t})();function la(t,m){t&1&&(n(0,"button",13),C(1,"fa-icon",14),r(2),o(3,"translate"),i()),t&2&&(e(2),u("",l(3,1,"labels.buttons.Undo")," "))}function sa(t,m){t&1&&(n(0,"span"),y(1,la,4,3,"button",12),i()),t&2&&(e(),d("mifosxHasPermission","ADJUST_ACCOUNTTRANSFER"))}var oe=(()=>{class t{constructor(){this.route=T(H),this.location=T(be),this.route.data.subscribe(a=>{this.viewAccountTransferData=a.viewAccountTransferData})}transferToClient(a){return`/#/clients/${a.id}`}transferToAccount(a,p){return`/#/clients/${a.id}/savings-accounts/${p.id}`}goBack(){this.location.back()}transactionColor(){return this.viewAccountTransferData.reversed?"undo":"active"}static{this.\u0275fac=function(p){return new(p||t)}}static{this.\u0275cmp=O({type:t,selectors:[["mifosx-view-account-transfer"]],decls:93,vars:69,consts:[[1,"container"],[1,"container","m-b-20","align-end","gap-2px"],[1,"layout-row-wrap","responsive-column"],[1,"flex-100",3,"ngClass"],[1,"mat-h3","flex-fill"],[3,"inset"],[1,"flex-fill"],[1,"flex-40"],[1,"flex-60"],[3,"href"],[1,"layout-row","align-center","gap-5px","responsive-column"],["type","button","color","primary","mat-raised-button","",3,"click"],["mat-raised-button","","color","warn",4,"mifosxHasPermission"],["mat-raised-button","","color","warn"],["icon","undo",1,"m-r-10"]],template:function(p,s){p&1&&(n(0,"div",0)(1,"div",1),_(2,sa,2,1,"span"),i(),n(3,"mat-card")(4,"mat-card-content")(5,"div",2),C(6,"div",3),n(7,"h3",4),r(8),o(9,"translate"),i(),C(10,"mat-divider",5),n(11,"div",6)(12,"span",7),r(13),o(14,"translate"),i(),n(15,"span",8),r(16),o(17,"formatNumber"),i()(),n(18,"div",6)(19,"span",7),r(20),o(21,"translate"),i(),n(22,"span",8),r(23),o(24,"dateFormat"),i()(),n(25,"div",6)(26,"span",7),r(27),o(28,"translate"),i(),n(29,"span",8),r(30),i()(),n(31,"h3",4),r(32),o(33,"translate"),i(),C(34,"mat-divider",5),n(35,"div",6)(36,"span",7),r(37),o(38,"translate"),i(),n(39,"span",8),r(40),i()(),n(41,"div",6)(42,"span",7),r(43),o(44,"translate"),i(),n(45,"span",8),r(46),i()(),n(47,"div",6)(48,"span",7),r(49),o(50,"translate"),i(),n(51,"span",8),r(52),i()(),n(53,"div",6)(54,"span",7),r(55),o(56,"translate"),i(),n(57,"span",8),r(58),i()(),n(59,"h3",4),r(60),o(61,"translate"),i(),C(62,"mat-divider",5),n(63,"div",6)(64,"span",7),r(65),o(66,"translate"),i(),n(67,"span",8),r(68),i()(),n(69,"div",6)(70,"span",7),r(71),o(72,"translate"),i(),n(73,"span",8)(74,"a",9),r(75),i()()(),n(76,"div",6)(77,"span",7),r(78),o(79,"translate"),i(),n(80,"span",8),r(81),i()(),n(82,"div",6)(83,"span",7),r(84),o(85,"translate"),i(),n(86,"span",8)(87,"a",9),r(88),i()()()()(),n(89,"mat-card-actions",10)(90,"button",11),x("click",function(){return s.goBack()}),r(91),o(92,"translate"),i()()()()),p&2&&(e(2),v(s.viewAccountTransferData.reversed?-1:2),e(4),d("ngClass",s.transactionColor()),e(2),c(l(9,35,"labels.heading.Transaction Details")),e(2),d("inset",!0),e(3),u("",l(14,37,"labels.inputs.Transaction Amount"),":"),e(3),Ie("",s.viewAccountTransferData.currency.displaySymbol," ",l(17,39,s.viewAccountTransferData.transferAmount)," (",s.viewAccountTransferData.currency.code,")"),e(4),u("",l(21,41,"labels.inputs.Transaction Date"),":"),e(3),c(l(24,43,s.viewAccountTransferData.transferDate)),e(4),u("",l(28,45,"labels.inputs.Destination"),":"),e(3),c(s.viewAccountTransferData.transferDescription),e(2),c(l(33,47,"labels.heading.Transferred From")),e(2),d("inset",!0),e(3),u("",l(38,49,"labels.inputs.Office"),":"),e(3),c(s.viewAccountTransferData.fromOffice.name),e(3),u("",l(44,51,"labels.inputs.Client"),":"),e(3),c(s.viewAccountTransferData.fromClient.displayName),e(3),u("",l(50,53,"labels.inputs.Account Type"),":"),e(3),c(s.viewAccountTransferData.fromAccountType.value),e(3),u("",l(56,55,"labels.inputs.Account No"),":"),e(3),c(s.viewAccountTransferData.fromAccount.accountNo),e(2),c(l(61,57,"labels.heading.Transferred To")),e(2),d("inset",!0),e(3),u("",l(66,59,"labels.inputs.Office"),":"),e(3),c(s.viewAccountTransferData.toOffice.name),e(3),u("",l(72,61,"labels.inputs.Client"),":"),e(3),d("href",s.transferToClient(s.viewAccountTransferData.toClient),se),e(),u(" ",s.viewAccountTransferData.toClient.displayName),e(3),u("",l(79,63,"labels.inputs.Account Type"),":"),e(3),c(s.viewAccountTransferData.toAccountType.value),e(3),u("",l(85,65,"labels.inputs.Account No"),":"),e(3),d("href",s.transferToAccount(s.viewAccountTransferData.toClient,s.viewAccountTransferData.toAccount),se),e(),u(" ",s.viewAccountTransferData.toAccount.accountNo),e(3),u(" ",l(92,67,"labels.buttons.Back")," "))},dependencies:[q,Se,R,$,z,lt,j,Q,_t,vt,Ct,V,Ve],styles:["h3[_ngcontent-%COMP%]{margin:0;font-weight:500}span[_ngcontent-%COMP%]{margin:.5em 0}mat-divider[_ngcontent-%COMP%]{margin:0 0 .5em}"]})}}return t})();var fe=(()=>{class t{constructor(){this.accountTransfersService=T(B)}resolve(a){let p=a.parent.paramMap.get("standingInstructionsId");return this.accountTransfersService.getStandingInstructionsData(p)}static{this.\u0275fac=function(p){return new(p||t)}}static{this.\u0275prov=G({token:t,factory:t.\u0275fac})}}return t})();var Ce=(()=>{class t{constructor(){this.accountTransfersService=T(B)}resolve(a){let p=a.parent.paramMap.get("standingInstructionsId");return this.accountTransfersService.getStandingInstructionsDataAndTemplate(p)}static{this.\u0275fac=function(p){return new(p||t)}}static{this.\u0275prov=G({token:t,factory:t.\u0275fac})}}return t})();var le=(()=>{class t{constructor(){this.accountTransfersService=T(B)}resolve(a){let p=a.queryParamMap.get("officeId"),s=a.queryParamMap.get("accountType"),f=a.parent.paramMap.get("clientId");switch(s){case"fromloans":this.accountTypeId="1";break;case"fromsavings":this.accountTypeId="2";break;default:this.accountTypeId="0"}return this.accountTransfersService.getStandingInstructionsTemplate(f,p,this.accountTypeId)}static{this.\u0275fac=function(p){return new(p||t)}}static{this.\u0275prov=G({token:t,factory:t.\u0275fac})}}return t})();var _e=(()=>{class t{constructor(){this.accountTransfersService=T(B)}resolve(a){switch(a.queryParamMap.get("accountType")){case"fromloans":this.accountTypeId="1",this.id=a.queryParamMap.get("loanId");break;case"fromsavings":this.accountTypeId="2",this.id=a.queryParamMap.get("savingsId");break;case"interbank":this.accountTypeId="2",this.id=a.queryParamMap.get("savingsId");break;default:this.accountTypeId="0"}return this.accountTransfersService.newAccountTranferResource(this.id,this.accountTypeId)}static{this.\u0275fac=function(p){return new(p||t)}}static{this.\u0275prov=G({token:t,factory:t.\u0275fac})}}return t})();var ve=(()=>{class t{constructor(){this.accountTransfersService=T(B),this.settingsService=T(Y)}resolve(a){let p=a.parent.paramMap.get("standingInstructionsId"),s=this.settingsService.dateFormat,f=this.settingsService.language.code;return this.accountTransfersService.getStandingInstructionsTransactions(p,s,f)}static{this.\u0275fac=function(p){return new(p||t)}}static{this.\u0275prov=G({token:t,factory:t.\u0275fac})}}return t})();var ge=(()=>{class t{constructor(){this.accountTransfersService=T(B)}resolve(a){let p=a.paramMap.get("transferid");return this.accountTransfersService.getViewAccountTransferDetails(p)}static{this.\u0275fac=function(p){return new(p||t)}}static{this.\u0275prov=G({token:t,factory:t.\u0275fac})}}return t})();var ca=[{path:"",children:[{path:"create-standing-instructions",data:{title:"Create Standing Instructions",breadcrumb:"Create Standing Instructions",routeParamBreadcrumb:"Create Standing Instructions"},component:ie,resolve:{standingIntructionsTemplate:le}},{path:"make-account-transfer",data:{title:"Account Transfer",breadcrumb:"Account Transfer",routeParamBreadcrumb:"Account Transfer"},component:ne,resolve:{accountTransferTemplate:_e}},{path:"list-standing-instructions",data:{title:"List Standing Instructions",breadcrumb:"List Standing Instructions",routeParamBreadcrumb:"List Standing Instructions"},component:ae,resolve:{standingIntructionsTemplate:le}},{path:"account-transfers",data:{title:"View Account Transfer",breadcrumb:"Account Transfers",routeParamBreadcrumb:!1},children:[{path:":transferid",data:{routeParamBreadcrumb:"transferid"},component:oe,resolve:{viewAccountTransferData:ge}}]},{path:":standingInstructionsId",data:{title:"Standing Instructions",routeParamBreadcrumb:"standingInstructionsId"},children:[{path:"view",data:{title:"View Standing Instructions",breadcrumb:"view",routeParamBreadcrumb:!1},component:Xt,resolve:{standingInstructionsData:fe}},{path:"edit",data:{title:"Edit Standing Instructions",breadcrumb:"edit",routeParamBreadcrumb:!1},component:ee,resolve:{standingInstructionsDataAndTemplate:Ce}},{path:"list-account-transactions",data:{title:"List Account Transactions",breadcrumb:"List Account Transactions",routeParamBreadcrumb:"List Account Transactions"},component:re,resolve:{listTransactionData:ve}}]}]}],je=(()=>{class t{static{this.\u0275fac=function(p){return new(p||t)}}static{this.\u0275mod=Vt({type:t})}static{this.\u0275inj=qt({providers:[fe,Ce,le,_e,ve,ge],imports:[ce.forChild(ca),ce]})}}return t})();var ma=t=>({balance:t});function pa(t,m){t&1&&(n(0,"mat-error"),r(1),o(2,"translate"),o(3,"translate"),n(4,"strong"),r(5),o(6,"translate"),i()()),t&2&&(e(),g(" ",l(2,3,"labels.inputs.Transaction Date")," ",l(3,5,"labels.commons.is")," "),e(4),c(l(6,7,"labels.commons.required")))}function da(t,m){t&1&&(n(0,"mat-error"),r(1),o(2,"translate"),o(3,"translate"),n(4,"strong"),r(5),o(6,"translate"),i()()),t&2&&(e(),g(" ",l(2,3,"labels.inputs.Amount")," ",l(3,5,"labels.commons.is")," "),e(4),c(l(6,7,"labels.commons.required")))}function ua(t,m){if(t&1&&(n(0,"mat-error"),C(1,"fa-icon",15),r(2),o(3,"translate"),i()),t&2){let a=h();e(2),u(" ",kt(3,1,"errors.validation.msg.savingsproduct.insufficient.balance",et(4,ma,a.balance))," ")}}function fa(t,m){t&1&&(n(0,"mat-error"),r(1),o(2,"translate"),o(3,"translate"),n(4,"strong"),r(5),o(6,"translate"),i()()),t&2&&(e(),g(" ",l(2,3,"labels.inputs.Transfer Description")," ",l(3,5,"labels.commons.is")," "),e(4),c(l(6,7,"labels.commons.required")))}var ze=(()=>{class t{constructor(){this.minDate=new Date(2e3,0,1),this.maxDate=new Date(2100,0,1)}static{this.\u0275fac=function(p){return new(p||t)}}static{this.\u0275cmp=O({type:t,selectors:[["mifosx-make-account-interbank-transfers"]],inputs:{makeAccountTransferForm:"makeAccountTransferForm",balance:"balance"},decls:45,vars:30,consts:[["transferDatePicker",""],["amntInput",""],[3,"formGroup"],[1,"layout-row-wrap","gap-2px","responsive-column"],[1,"flex-98",3,"click"],["matInput","","required","","formControlName","transferDate",3,"min","max","matDatepicker"],["matSuffix","",3,"for"],[1,"flex-98"],["matInput","","formControlName","toBank"],["matInput","","formControlName","toClientId"],["matInput","","formControlName","toAccountType"],["matInput","","formControlName","toAccountId"],[1,"flex-98","error-warn"],["type","number","matInput","","required","","formControlName","transferAmount"],["matInput","","formControlName","transferDescription","cdkTextareaAutosize","","cdkAutosizeMinRows","2"],["icon","exclamation-triangle","size","md"]],template:function(p,s){if(p&1){let f=w();n(0,"form",2)(1,"div",3)(2,"mat-form-field",4),x("click",function(){b(f);let F=M(9);return S(F.open())}),n(3,"mat-label"),r(4),o(5,"translate"),i(),C(6,"input",5)(7,"mat-datepicker-toggle",6)(8,"mat-datepicker",null,0),_(10,pa,7,9,"mat-error"),i(),n(11,"mat-form-field",7)(12,"mat-label"),r(13),o(14,"translate"),i(),C(15,"input",8),i(),n(16,"mat-form-field",7)(17,"mat-label"),r(18),o(19,"translate"),i(),C(20,"input",9),i(),n(21,"mat-form-field",7)(22,"mat-label"),r(23),o(24,"translate"),i(),C(25,"input",10),i(),n(26,"mat-form-field",7)(27,"mat-label"),r(28),o(29,"translate"),i(),C(30,"input",11),i(),n(31,"mat-form-field",12)(32,"mat-label"),r(33),o(34,"translate"),i(),C(35,"input",13,1),_(37,da,7,9,"mat-error"),_(38,ua,4,6,"mat-error"),i(),n(39,"mat-form-field",7)(40,"mat-label"),r(41),o(42,"translate"),i(),C(43,"textarea",14),_(44,fa,7,9,"mat-error"),i()()()}if(p&2){let f,k=M(9);d("formGroup",s.makeAccountTransferForm),e(4),c(l(5,16,"labels.inputs.Transaction Date")),e(2),d("min",s.minDate)("max",s.maxDate)("matDatepicker",k),e(),d("for",k),e(3),v(s.makeAccountTransferForm.controls.transferDate.hasError("required")?10:-1),e(3),c(l(14,18,"labels.inputs.Bank")),e(5),c(l(19,20,"labels.inputs.Client")),e(5),c(l(24,22,"labels.inputs.Account Type")),e(5),c(l(29,24,"labels.inputs.Account")),e(5),c(l(34,26,"labels.inputs.Amount")),e(4),v(s.makeAccountTransferForm.controls.transferAmount.hasError("required")?37:-1),e(),v((f=s.makeAccountTransferForm.get("transferAmount"))!=null&&f.hasError("amountExceedsBalance")?38:-1),e(3),c(l(42,28,"labels.inputs.Description")),e(3),v(s.makeAccountTransferForm.controls.transferDescription.hasError("required")?44:-1)}},dependencies:[q,R,nt,J,bt,K,it,ot,at,rt,Z,X,st,ct,tt,ut,ft,dt,_t,Lt,V],styles:["h2[_ngcontent-%COMP%], h3[_ngcontent-%COMP%], h4[_ngcontent-%COMP%]{margin:0;font-weight:500}span[_ngcontent-%COMP%]{margin:.5em 0}.margin-t[_ngcontent-%COMP%]{margin-top:1em}mat-divider[_ngcontent-%COMP%]{margin:0 0 .5em}.container[_ngcontent-%COMP%]{max-width:37rem}"]})}}return t})();var il=(()=>{class t{static{this.\u0275fac=function(p){return new(p||t)}}static{this.\u0275mod=Vt({type:t})}static{this.\u0275inj=qt({imports:[Ue,Le,$e,je,Xt,ee,ie,ne,ae,re,oe,ze]})}}return t})();export{il as AccountTransfersModule}; diff --git a/browser/chunk-7VHKCFQO.js b/browser/chunk-5UY4RGU3.js similarity index 99% rename from browser/chunk-7VHKCFQO.js rename to browser/chunk-5UY4RGU3.js index 0a2a3dc7a..f852014d6 100644 --- a/browser/chunk-7VHKCFQO.js +++ b/browser/chunk-5UY4RGU3.js @@ -1 +1 @@ -import{C as y,G as o,J as v,K as u,Lc as C,Ob as a,R as b,Rb as h,Sc as l,b as f}from"./chunk-OX7PN44D.js";import{a as m,b as g}from"./chunk-PHUH23IY.js";var D=(()=>{class s{constructor(t){this.translateService=t}translate(t,e){return this.translateService.get(t,e)}static{this.\u0275fac=function(e){return new(e||s)(v(C))}}static{this.\u0275prov=o({token:s,factory:s.\u0275fac})}}return s})();function j(s){s||(s=u(b));let P=new f(t=>{if(s.destroyed){t.next();return}return s.onDestroy(t.next.bind(t))});return t=>t.pipe(y(P))}var q=(()=>{class s{constructor(){this.settingsService=u(l),this.globalConfigurations=[s.DAYS_BEFORE_REPAYMENT_IS_DUE,s.DAYS_AFTER_REPAYMENT_IS_OVERDUE],this.propertyNames=["dueDaysForRepaymentEvent","overDueDaysForRepaymentEvent"]}static{this.LOAN_SCHEDULE_TYPE_CUMULATIVE="CUMULATIVE"}static{this.LOAN_SCHEDULE_TYPE_PROGRESSIVE="PROGRESSIVE"}static{this.LOAN_SCHEDULE_PROCESSING_TYPE_HORIZONTAL="HORIZONTAL"}static{this.LOAN_SCHEDULE_PROCESSING_TYPE_VERTICAL="VERTICAL"}static{this.ADVANCED_PAYMENT_ALLOCATION_STRATEGY="advanced-payment-allocation-strategy"}static{this.DAYS_BEFORE_REPAYMENT_IS_DUE="days-before-repayment-is-due"}static{this.DAYS_AFTER_REPAYMENT_IS_OVERDUE="days-after-repayment-is-overdue"}static isAdvancedPaymentAllocationStrategy(t){return t===this.ADVANCED_PAYMENT_ALLOCATION_STRATEGY}setItemsByDefault(t){let e=[];return t.globalConfiguration.forEach(r=>{this.globalConfigurations.includes(r.name)&&e.push(r)}),e}updateLoanProductDefaults(t,e){return t.itemsByDefault.forEach(n=>{let i=this.resolvePropertyName(n.name);i!==""&&(e?(!t[i]||t[i]==="")&&(t[i]=n.value):t[i]=n.value)}),t}buildPayload(t,e){let r=this.settingsService.dateFormat,n=this.settingsService.language.code,i=g(m({},t),{charges:t.charges.map(p=>({id:p.id})),dateFormat:r,locale:n});return delete i.allowAttributeConfiguration,delete i.advancedAccountingRules,i.allowPartialPeriodInterestCalcualtion=i.allowPartialPeriodInterestCalculation,delete i.allowPartialPeriodInterestCalculation,e.forEach(p=>{let c=this.resolvePropertyName(p.name);c!==""&&(!i[c]||i[c]==="")&&(i[c]=p.value)}),i}isItemByDefault(t){return this.propertyNames.includes(t)}isGlobalConfigurations(t){return this.globalConfigurations.includes(t)}resolvePropertyName(t){if(this.globalConfigurations.includes(t)){let e=this.globalConfigurations.indexOf(t);if(e>-1)return this.propertyNames[e]}return""}static{this.\u0275fac=function(e){return new(e||s)}}static{this.\u0275prov=o({token:s,factory:s.\u0275fac,providedIn:"root"})}}return s})();var Q=(()=>{class s{constructor(){this.http=u(h),this.basePath="/external-asset-owners"}executeExternalAssetOwnerLoanCommand(t,e,r){let n=new a().set("command",r);return this.http.post(`${this.basePath}/transfers/loans/${t}`,e,{params:n})}executeExternalAssetOwnerTransferCommand(t,e,r){let n=new a().set("command",r);return this.http.post(`${this.basePath}/transfers/${t}`,e,{params:n})}retrieveExternalAssetOwnerTransfers(t){let e=new a().set("loanId",t);return this.http.get(`${this.basePath}/transfers`,{params:e})}retrieveExternalAssetOwnerActiveTransfer(t){let e=new a().set("loanId",t);return this.http.get(`${this.basePath}/transfers/active-transfer`,{params:e})}retrieveExternalAssetOwnerTransferJournalEntries(t){return this.http.get(`${this.basePath}/transfers/${t}/journal-entries`)}searchExternalAssetOwnerTransfer(t){return this.http.post(`${this.basePath}/search`,t)}static{this.\u0275fac=function(e){return new(e||s)}}static{this.\u0275prov=o({token:s,factory:s.\u0275fac,providedIn:"root"})}}return s})();var X=(()=>{class s{constructor(){this.http=u(h),this.settingsService=u(l)}getProvisioningCriterias(){return this.http.get("/provisioningcriteria")}getProvisioningCriteriaTemplate(){return this.http.get("/provisioningcriteria/template")}getProvisioningCriteria(t,e=!1){let r=new a().set("template",e.toString());return this.http.get(`/provisioningcriteria/${t}`,{params:r})}createProvisioningCriteria(t){return this.http.post("/provisioningcriteria",t)}updateProvisioningCriteria(t,e){return this.http.put(`/provisioningcriteria/${t}`,e)}deleteProvisioningCriteria(t){return this.http.delete(`/provisioningcriteria/${t}`)}getOffices(){return this.http.get("/offices")}getOfficeTemplate(t){let e=new a().set("officeId",t.toString());return this.http.get("/loans/loanreassignment/template",{params:e})}getOfficerTemplate(t,e){let r=new a().set("fromLoanOfficerId",t.toString()).set("officeId",e.toString());return this.http.get("/loans/loanreassignment/template",{params:r})}createLoanReassignment(t){return this.http.post("/loans/loanreassignment",t)}getOffice(t,e=!1){let r=new a().set("template",e.toString());return this.http.get(`/offices/${t}`,{params:r})}createOffice(t){return this.http.post("/offices",t)}updateOffice(t,e){return this.http.put(`/offices/${t}`,e)}getOfficeDatatables(){let t=new a().set("apptable","m_office");return this.http.get("/datatables",{params:t})}getOfficeDatatable(t,e){let r=new a().set("genericResultSet","true");return this.http.get(`/datatables/${e}/${t}`,{params:r})}addOfficeDatatableEntry(t,e,r){let n=new a().set("genericResultSet","true");return this.http.post(`/datatables/${e}/${t}`,r,{params:n})}editOfficeDatatableEntry(t,e,r){let n=new a().set("genericResultSet","true");return this.http.put(`/datatables/${e}/${t}`,r,{params:n})}deleteDatatableContent(t,e){let r=new a().set("genericResultSet","true");return this.http.delete(`/datatables/${e}/${t}`,{params:r})}getEmployees(){let t=new a().set("status","all");return this.http.get("/staff",{params:t})}createEmployee(t){return this.http.post("/staff",t)}getEmployee(t,e=!0){let r=new a().set("template",e.toString());return this.http.get(`/staff/${t}`,{params:r})}getCurrencies(){return this.http.get("/currencies")}updateCurrencies(t){return this.http.put("/currencies",{currencies:t})}getSmsCampaigns(){return this.http.get("/smscampaigns")}getSmsCampaign(t){return this.http.get(`/smscampaigns/${t}`)}createSmsCampaign(t){return this.http.post("/smscampaigns",t)}updateSmsCampaign(t,e){return this.http.put(`/smscampaigns/${e}`,t)}deleteSmsCampaign(t){return this.http.delete(`/smscampaigns/${t}`)}getSmsCampaignTemplate(){return this.http.get("/smscampaigns/template")}executeSmsCampaignCommand(t,e,r){let n=new a().set("command",r.toString());return this.http.post(`/smscampaigns/${t}`,e,{params:n})}getMessagebyStatus(t){let e=new a().set("status",t.status.toString()).set("locale",t.locale).set("dateFormat",t.dateFormat);return e=t.fromDate?e.set("fromDate",t.fromDate):e,e=t.toDate?e.set("toDate",t.toDate):e,this.http.get(`/sms/${t.id}/messageByStatus`,{params:e})}getAdhocQueries(){return this.http.get("/adhocquery")}getAdhocQuery(t){return this.http.get(`/adhocquery/${t}`)}getAdhocQueryTemplate(){return this.http.get("/adhocquery/template")}getAdhocQueryAndTemplate(t){let e=new a().set("template","true");return this.http.get(`/adhocquery/${t}`,{params:e})}createAdhocQuery(t){return this.http.post("/adhocquery",t)}updateAdhocQuery(t,e){return this.http.put(`/adhocquery/${t}`,e)}deleteAdhocQuery(t){return this.http.delete(`/adhocquery/${t}`)}getTellers(){return this.http.get("/tellers")}getTeller(t){return this.http.get(`/tellers/${t}`)}getCashiers(t){return this.http.get(`/tellers/${t}/cashiers`)}getCashier(t,e){return this.http.get(`/tellers/${t}/cashiers/${e}`)}getCashierSummaryAndTransactions(t,e,r){let n=new a().set("currencyCode",r);return this.http.get(`/tellers/${t}/cashiers/${e}/summaryandtransactions`,{params:n})}getCashierTransactionTemplate(t,e){return this.http.get(`/tellers/${t}/cashiers/${e}/transactions/template`)}createCashier(t,e){return this.http.post(`/tellers/${t}/cashiers`,e)}deleteCashier(t,e){return this.http.delete(`/tellers/${t}/cashiers/${e}`)}settleCash(t,e,r){let n=new a().set("command","settle");return this.http.post(`/tellers/${t}/cashiers/${e}/settle`,r,{params:n})}allocateCash(t,e,r){let n=new a().set("command","allocate");return this.http.post(`/tellers/${t}/cashiers/${e}/allocate`,r,{params:n})}getCashierTemplate(t){return this.http.get(`/tellers/${t}/cashiers/template`)}updateCashier(t,e,r){return this.http.put(`/tellers/${t}/cashiers/${e}`,r)}deleteTeller(t){return this.http.delete(`/tellers/${t}`)}createTeller(t){return this.http.post("/tellers",t)}getPaymentTypes(){return this.http.get("/paymenttypes")}getPaymentTypesWithCode(){return this.http.get("/paymenttypes?onlyWithCode=true")}createPaymentType(t){return this.http.post("/paymenttypes",t)}deletePaymentType(t){return this.http.delete(`/paymenttypes/${t}`)}getPaymentType(t){return this.http.get(`/paymenttypes/${t}`)}updatePaymentType(t,e){return this.http.put(`/paymenttypes/${t}`,e)}getPasswordPreferencesTemplate(){return this.http.get("/passwordpreferences/template")}updatePasswordPreferences(t){return this.http.put("/passwordpreferences",t)}getEntityDataTableChecks(t=0,e=-1){let r=new a().set("offset",t.toString()).set("limit",e.toString());return this.http.get("/entityDatatableChecks",{params:r})}getEntityDataTableChecksTemplate(){return this.http.get("/entityDatatableChecks/template")}createEntityDataTableChecks(t){return this.http.post("/entityDatatableChecks",t)}deleteEntityDataTableCheck(t){return this.http.delete(`/entityDatatableChecks/${t}`)}getWorkingDays(){return this.http.get("/workingdays")}updateWorkingDays(t){return this.http.put("/workingdays",t)}getHolidays(t){let e=new a().set("officeId",t.toString());return this.http.get("/holidays",{params:e})}getHoliday(t){return this.http.get(`/holidays/${t}`)}getHolidayTemplate(){return this.http.get("/holidays/template")}createHoliday(t){return this.http.post("/holidays",t)}updateHoliday(t,e){return this.http.put(`/holidays/${t}`,e)}deleteHoliday(t){return this.http.delete(`/holidays/${t}`)}activateHoliday(t){let e=new a().set("command","activate");return this.http.post(`/holidays/${t}`,null,{params:e})}updateEmployee(t,e){return this.http.put(`/staff/${t}`,e)}updateTeller(t,e){return this.http.put(`/tellers/${t}`,e)}getFunds(){return this.http.get("/funds")}getFund(t){return this.http.get(`/funds/${t}`)}createFund(t){return this.http.post("/funds",t)}editFund(t,e){return this.http.put(`/funds/${t}`,e)}getStaffs(t){let e=new a().set("officeId",t).set("status","all");return this.http.get("/staff",{params:e})}getCenters(t){let e=new a().set("officeId",t).set("status","all");return this.http.get("/centers",{params:e})}getGroups(t){let e=new a().set("officeId",t).set("status","all");return this.http.get("/groups",{params:e})}getStaff(t){let e=new a().set("officeId",t.toString());return this.http.get("/staff",{params:e})}getImports(t){let e=new a().set("entityType",t);return this.http.get("/imports",{params:e})}getAdvanceSearchTemplate(){return this.http.get("/search/template")}retrieveAdvanceSearchResults(t){return this.http.post("/search/advance",t)}getStandingInstructionTemplate(){return this.http.get("/standinginstructions/template")}getStandingInstructions(t){let e=new a;for(let r in t)t[r]!==""&&t[r]!==null&&(e=e.set(r,t[r]));return this.http.get("/standinginstructionrunhistory",{params:e})}getImportTemplate(t,e,r,n){let i=new a().set("tenantIdentifier","default").set("locale",this.settingsService.language.code).set("dateFormat",this.settingsService.dateFormat);return e&&(i=i.set("officeId",e.toString())),r&&(i=i.set("staffId",r.toString())),n.length&&(i=i.set("legalFormType",n)),this.http.get(`${t}/downloadtemplate`,{params:i,responseType:"arraybuffer",observe:"response"})}getImportDocument(t){let e=new a().set("importDocumentId",t).set("tenantIdentifier","default");return this.http.get("/imports/downloadOutputTemplate",{params:e,responseType:"arraybuffer",observe:"response"})}uploadImportDocument(t,e,r){let n=new a;r.length&&(n=n.set("legalFormType",r));let i=new FormData;return i.append("file",t),i.append("locale",this.settingsService.language.code),i.append("dateFormat",this.settingsService.dateFormat),this.http.post(`${e}/uploadtemplate`,i,{params:n})}static{this.\u0275fac=function(e){return new(e||s)}}static{this.\u0275prov=o({token:s,factory:s.\u0275fac,providedIn:"root"})}}return s})();var et=(()=>{class s{constructor(){this.defaultDate="9999-12-31"}validateStatus(t,e){return t!=null?t.status===e:!1}itemCurrentStatus(t){return this.isBuyBackPending(t)?t.status+" PENDING":t.status}itemStatus(t){return"status-"+t.toLowerCase()}isPending(t){return t.status==="PENDING"}isPendingOrCanceled(t){return t.status==="PENDING"||t.status==="CANCELLED"||this.isBuyBackPending(t)}isBuyBackPending(t){return t.status==="BUYBACK"&&t.effectiveTo===this.defaultDate}canBeCancelled(t){return this.validateStatus(t,"PENDING")}canBeSold(t){return t==null?!0:["","CANCELLED"].includes(t.status)||t.status==="BUYBACK"&&t.effectiveTo!==this.defaultDate}canBeBuyed(t){return this.validateStatus(t,"ACTIVE")}static{this.\u0275fac=function(e){return new(e||s)}}static{this.\u0275prov=o({token:s,factory:s.\u0275fac,providedIn:"root"})}}return s})();export{D as a,j as b,q as c,Q as d,X as e,et as f}; +import{C as y,G as o,J as v,K as u,Lc as C,Ob as a,R as b,Rb as h,Sc as l,b as f}from"./chunk-BQBWZIWL.js";import{a as m,b as g}from"./chunk-PHUH23IY.js";var D=(()=>{class s{constructor(t){this.translateService=t}translate(t,e){return this.translateService.get(t,e)}static{this.\u0275fac=function(e){return new(e||s)(v(C))}}static{this.\u0275prov=o({token:s,factory:s.\u0275fac})}}return s})();function j(s){s||(s=u(b));let P=new f(t=>{if(s.destroyed){t.next();return}return s.onDestroy(t.next.bind(t))});return t=>t.pipe(y(P))}var q=(()=>{class s{constructor(){this.settingsService=u(l),this.globalConfigurations=[s.DAYS_BEFORE_REPAYMENT_IS_DUE,s.DAYS_AFTER_REPAYMENT_IS_OVERDUE],this.propertyNames=["dueDaysForRepaymentEvent","overDueDaysForRepaymentEvent"]}static{this.LOAN_SCHEDULE_TYPE_CUMULATIVE="CUMULATIVE"}static{this.LOAN_SCHEDULE_TYPE_PROGRESSIVE="PROGRESSIVE"}static{this.LOAN_SCHEDULE_PROCESSING_TYPE_HORIZONTAL="HORIZONTAL"}static{this.LOAN_SCHEDULE_PROCESSING_TYPE_VERTICAL="VERTICAL"}static{this.ADVANCED_PAYMENT_ALLOCATION_STRATEGY="advanced-payment-allocation-strategy"}static{this.DAYS_BEFORE_REPAYMENT_IS_DUE="days-before-repayment-is-due"}static{this.DAYS_AFTER_REPAYMENT_IS_OVERDUE="days-after-repayment-is-overdue"}static isAdvancedPaymentAllocationStrategy(t){return t===this.ADVANCED_PAYMENT_ALLOCATION_STRATEGY}setItemsByDefault(t){let e=[];return t.globalConfiguration.forEach(r=>{this.globalConfigurations.includes(r.name)&&e.push(r)}),e}updateLoanProductDefaults(t,e){return t.itemsByDefault.forEach(n=>{let i=this.resolvePropertyName(n.name);i!==""&&(e?(!t[i]||t[i]==="")&&(t[i]=n.value):t[i]=n.value)}),t}buildPayload(t,e){let r=this.settingsService.dateFormat,n=this.settingsService.language.code,i=g(m({},t),{charges:t.charges.map(p=>({id:p.id})),dateFormat:r,locale:n});return delete i.allowAttributeConfiguration,delete i.advancedAccountingRules,i.allowPartialPeriodInterestCalcualtion=i.allowPartialPeriodInterestCalculation,delete i.allowPartialPeriodInterestCalculation,e.forEach(p=>{let c=this.resolvePropertyName(p.name);c!==""&&(!i[c]||i[c]==="")&&(i[c]=p.value)}),i}isItemByDefault(t){return this.propertyNames.includes(t)}isGlobalConfigurations(t){return this.globalConfigurations.includes(t)}resolvePropertyName(t){if(this.globalConfigurations.includes(t)){let e=this.globalConfigurations.indexOf(t);if(e>-1)return this.propertyNames[e]}return""}static{this.\u0275fac=function(e){return new(e||s)}}static{this.\u0275prov=o({token:s,factory:s.\u0275fac,providedIn:"root"})}}return s})();var Q=(()=>{class s{constructor(){this.http=u(h),this.basePath="/external-asset-owners"}executeExternalAssetOwnerLoanCommand(t,e,r){let n=new a().set("command",r);return this.http.post(`${this.basePath}/transfers/loans/${t}`,e,{params:n})}executeExternalAssetOwnerTransferCommand(t,e,r){let n=new a().set("command",r);return this.http.post(`${this.basePath}/transfers/${t}`,e,{params:n})}retrieveExternalAssetOwnerTransfers(t){let e=new a().set("loanId",t);return this.http.get(`${this.basePath}/transfers`,{params:e})}retrieveExternalAssetOwnerActiveTransfer(t){let e=new a().set("loanId",t);return this.http.get(`${this.basePath}/transfers/active-transfer`,{params:e})}retrieveExternalAssetOwnerTransferJournalEntries(t){return this.http.get(`${this.basePath}/transfers/${t}/journal-entries`)}searchExternalAssetOwnerTransfer(t){return this.http.post(`${this.basePath}/search`,t)}static{this.\u0275fac=function(e){return new(e||s)}}static{this.\u0275prov=o({token:s,factory:s.\u0275fac,providedIn:"root"})}}return s})();var X=(()=>{class s{constructor(){this.http=u(h),this.settingsService=u(l)}getProvisioningCriterias(){return this.http.get("/provisioningcriteria")}getProvisioningCriteriaTemplate(){return this.http.get("/provisioningcriteria/template")}getProvisioningCriteria(t,e=!1){let r=new a().set("template",e.toString());return this.http.get(`/provisioningcriteria/${t}`,{params:r})}createProvisioningCriteria(t){return this.http.post("/provisioningcriteria",t)}updateProvisioningCriteria(t,e){return this.http.put(`/provisioningcriteria/${t}`,e)}deleteProvisioningCriteria(t){return this.http.delete(`/provisioningcriteria/${t}`)}getOffices(){return this.http.get("/offices")}getOfficeTemplate(t){let e=new a().set("officeId",t.toString());return this.http.get("/loans/loanreassignment/template",{params:e})}getOfficerTemplate(t,e){let r=new a().set("fromLoanOfficerId",t.toString()).set("officeId",e.toString());return this.http.get("/loans/loanreassignment/template",{params:r})}createLoanReassignment(t){return this.http.post("/loans/loanreassignment",t)}getOffice(t,e=!1){let r=new a().set("template",e.toString());return this.http.get(`/offices/${t}`,{params:r})}createOffice(t){return this.http.post("/offices",t)}updateOffice(t,e){return this.http.put(`/offices/${t}`,e)}getOfficeDatatables(){let t=new a().set("apptable","m_office");return this.http.get("/datatables",{params:t})}getOfficeDatatable(t,e){let r=new a().set("genericResultSet","true");return this.http.get(`/datatables/${e}/${t}`,{params:r})}addOfficeDatatableEntry(t,e,r){let n=new a().set("genericResultSet","true");return this.http.post(`/datatables/${e}/${t}`,r,{params:n})}editOfficeDatatableEntry(t,e,r){let n=new a().set("genericResultSet","true");return this.http.put(`/datatables/${e}/${t}`,r,{params:n})}deleteDatatableContent(t,e){let r=new a().set("genericResultSet","true");return this.http.delete(`/datatables/${e}/${t}`,{params:r})}getEmployees(){let t=new a().set("status","all");return this.http.get("/staff",{params:t})}createEmployee(t){return this.http.post("/staff",t)}getEmployee(t,e=!0){let r=new a().set("template",e.toString());return this.http.get(`/staff/${t}`,{params:r})}getCurrencies(){return this.http.get("/currencies")}updateCurrencies(t){return this.http.put("/currencies",{currencies:t})}getSmsCampaigns(){return this.http.get("/smscampaigns")}getSmsCampaign(t){return this.http.get(`/smscampaigns/${t}`)}createSmsCampaign(t){return this.http.post("/smscampaigns",t)}updateSmsCampaign(t,e){return this.http.put(`/smscampaigns/${e}`,t)}deleteSmsCampaign(t){return this.http.delete(`/smscampaigns/${t}`)}getSmsCampaignTemplate(){return this.http.get("/smscampaigns/template")}executeSmsCampaignCommand(t,e,r){let n=new a().set("command",r.toString());return this.http.post(`/smscampaigns/${t}`,e,{params:n})}getMessagebyStatus(t){let e=new a().set("status",t.status.toString()).set("locale",t.locale).set("dateFormat",t.dateFormat);return e=t.fromDate?e.set("fromDate",t.fromDate):e,e=t.toDate?e.set("toDate",t.toDate):e,this.http.get(`/sms/${t.id}/messageByStatus`,{params:e})}getAdhocQueries(){return this.http.get("/adhocquery")}getAdhocQuery(t){return this.http.get(`/adhocquery/${t}`)}getAdhocQueryTemplate(){return this.http.get("/adhocquery/template")}getAdhocQueryAndTemplate(t){let e=new a().set("template","true");return this.http.get(`/adhocquery/${t}`,{params:e})}createAdhocQuery(t){return this.http.post("/adhocquery",t)}updateAdhocQuery(t,e){return this.http.put(`/adhocquery/${t}`,e)}deleteAdhocQuery(t){return this.http.delete(`/adhocquery/${t}`)}getTellers(){return this.http.get("/tellers")}getTeller(t){return this.http.get(`/tellers/${t}`)}getCashiers(t){return this.http.get(`/tellers/${t}/cashiers`)}getCashier(t,e){return this.http.get(`/tellers/${t}/cashiers/${e}`)}getCashierSummaryAndTransactions(t,e,r){let n=new a().set("currencyCode",r);return this.http.get(`/tellers/${t}/cashiers/${e}/summaryandtransactions`,{params:n})}getCashierTransactionTemplate(t,e){return this.http.get(`/tellers/${t}/cashiers/${e}/transactions/template`)}createCashier(t,e){return this.http.post(`/tellers/${t}/cashiers`,e)}deleteCashier(t,e){return this.http.delete(`/tellers/${t}/cashiers/${e}`)}settleCash(t,e,r){let n=new a().set("command","settle");return this.http.post(`/tellers/${t}/cashiers/${e}/settle`,r,{params:n})}allocateCash(t,e,r){let n=new a().set("command","allocate");return this.http.post(`/tellers/${t}/cashiers/${e}/allocate`,r,{params:n})}getCashierTemplate(t){return this.http.get(`/tellers/${t}/cashiers/template`)}updateCashier(t,e,r){return this.http.put(`/tellers/${t}/cashiers/${e}`,r)}deleteTeller(t){return this.http.delete(`/tellers/${t}`)}createTeller(t){return this.http.post("/tellers",t)}getPaymentTypes(){return this.http.get("/paymenttypes")}getPaymentTypesWithCode(){return this.http.get("/paymenttypes?onlyWithCode=true")}createPaymentType(t){return this.http.post("/paymenttypes",t)}deletePaymentType(t){return this.http.delete(`/paymenttypes/${t}`)}getPaymentType(t){return this.http.get(`/paymenttypes/${t}`)}updatePaymentType(t,e){return this.http.put(`/paymenttypes/${t}`,e)}getPasswordPreferencesTemplate(){return this.http.get("/passwordpreferences/template")}updatePasswordPreferences(t){return this.http.put("/passwordpreferences",t)}getEntityDataTableChecks(t=0,e=-1){let r=new a().set("offset",t.toString()).set("limit",e.toString());return this.http.get("/entityDatatableChecks",{params:r})}getEntityDataTableChecksTemplate(){return this.http.get("/entityDatatableChecks/template")}createEntityDataTableChecks(t){return this.http.post("/entityDatatableChecks",t)}deleteEntityDataTableCheck(t){return this.http.delete(`/entityDatatableChecks/${t}`)}getWorkingDays(){return this.http.get("/workingdays")}updateWorkingDays(t){return this.http.put("/workingdays",t)}getHolidays(t){let e=new a().set("officeId",t.toString());return this.http.get("/holidays",{params:e})}getHoliday(t){return this.http.get(`/holidays/${t}`)}getHolidayTemplate(){return this.http.get("/holidays/template")}createHoliday(t){return this.http.post("/holidays",t)}updateHoliday(t,e){return this.http.put(`/holidays/${t}`,e)}deleteHoliday(t){return this.http.delete(`/holidays/${t}`)}activateHoliday(t){let e=new a().set("command","activate");return this.http.post(`/holidays/${t}`,null,{params:e})}updateEmployee(t,e){return this.http.put(`/staff/${t}`,e)}updateTeller(t,e){return this.http.put(`/tellers/${t}`,e)}getFunds(){return this.http.get("/funds")}getFund(t){return this.http.get(`/funds/${t}`)}createFund(t){return this.http.post("/funds",t)}editFund(t,e){return this.http.put(`/funds/${t}`,e)}getStaffs(t){let e=new a().set("officeId",t).set("status","all");return this.http.get("/staff",{params:e})}getCenters(t){let e=new a().set("officeId",t).set("status","all");return this.http.get("/centers",{params:e})}getGroups(t){let e=new a().set("officeId",t).set("status","all");return this.http.get("/groups",{params:e})}getStaff(t){let e=new a().set("officeId",t.toString());return this.http.get("/staff",{params:e})}getImports(t){let e=new a().set("entityType",t);return this.http.get("/imports",{params:e})}getAdvanceSearchTemplate(){return this.http.get("/search/template")}retrieveAdvanceSearchResults(t){return this.http.post("/search/advance",t)}getStandingInstructionTemplate(){return this.http.get("/standinginstructions/template")}getStandingInstructions(t){let e=new a;for(let r in t)t[r]!==""&&t[r]!==null&&(e=e.set(r,t[r]));return this.http.get("/standinginstructionrunhistory",{params:e})}getImportTemplate(t,e,r,n){let i=new a().set("tenantIdentifier","default").set("locale",this.settingsService.language.code).set("dateFormat",this.settingsService.dateFormat);return e&&(i=i.set("officeId",e.toString())),r&&(i=i.set("staffId",r.toString())),n.length&&(i=i.set("legalFormType",n)),this.http.get(`${t}/downloadtemplate`,{params:i,responseType:"arraybuffer",observe:"response"})}getImportDocument(t){let e=new a().set("importDocumentId",t).set("tenantIdentifier","default");return this.http.get("/imports/downloadOutputTemplate",{params:e,responseType:"arraybuffer",observe:"response"})}uploadImportDocument(t,e,r){let n=new a;r.length&&(n=n.set("legalFormType",r));let i=new FormData;return i.append("file",t),i.append("locale",this.settingsService.language.code),i.append("dateFormat",this.settingsService.dateFormat),this.http.post(`${e}/uploadtemplate`,i,{params:n})}static{this.\u0275fac=function(e){return new(e||s)}}static{this.\u0275prov=o({token:s,factory:s.\u0275fac,providedIn:"root"})}}return s})();var et=(()=>{class s{constructor(){this.defaultDate="9999-12-31"}validateStatus(t,e){return t!=null?t.status===e:!1}itemCurrentStatus(t){return this.isBuyBackPending(t)?t.status+" PENDING":t.status}itemStatus(t){return"status-"+t.toLowerCase()}isPending(t){return t.status==="PENDING"}isPendingOrCanceled(t){return t.status==="PENDING"||t.status==="CANCELLED"||this.isBuyBackPending(t)}isBuyBackPending(t){return t.status==="BUYBACK"&&t.effectiveTo===this.defaultDate}canBeCancelled(t){return this.validateStatus(t,"PENDING")}canBeSold(t){return t==null?!0:["","CANCELLED"].includes(t.status)||t.status==="BUYBACK"&&t.effectiveTo!==this.defaultDate}canBeBuyed(t){return this.validateStatus(t,"ACTIVE")}static{this.\u0275fac=function(e){return new(e||s)}}static{this.\u0275prov=o({token:s,factory:s.\u0275fac,providedIn:"root"})}}return s})();export{D as a,j as b,q as c,Q as d,X as e,et as f}; diff --git a/browser/chunk-72WDWMOP.js b/browser/chunk-AZ6SD2G5.js similarity index 89% rename from browser/chunk-72WDWMOP.js rename to browser/chunk-AZ6SD2G5.js index fe63d7f6b..6bd0dc281 100644 --- a/browser/chunk-72WDWMOP.js +++ b/browser/chunk-AZ6SD2G5.js @@ -1 +1 @@ -import{Bc as x,Ec as b,Fb as f,Fc as v,Gc as D,Hc as M,K as m,Mc as C,Ua as o,Va as s,Wa as c,ca as t,eb as u,hb as n,ib as a,ja as p,rc as g,rd as S,wa as d,xa as e,ya as i}from"./chunk-OX7PN44D.js";var h=()=>({confirm:!0}),O=(()=>{class l{constructor(){this.dialogRef=m(x)}static{this.\u0275fac=function(r){return new(r||l)}}static{this.\u0275cmp=p({type:l,selectors:[["mifosx-undo-transaction-dialog"]],decls:14,vars:14,consts:[["mat-dialog-title",""],["mat-dialog-content",""],["align","end"],["mat-raised-button","","mat-dialog-close",""],["mat-raised-button","","color","warn",3,"mat-dialog-close"]],template:function(r,y){r&1&&(e(0,"h1",0),o(1),n(2,"translate"),i(),e(3,"div",1)(4,"p"),o(5),n(6,"translate"),i()(),e(7,"mat-dialog-actions",2)(8,"button",3),o(9),n(10,"translate"),i(),e(11,"button",4),o(12),n(13,"translate"),i()()),r&2&&(t(),s(a(2,5,"labels.heading.Undo Transaction")),t(4),s(a(6,7,"labels.text.Are you sure you want to undo this transaction")),t(4),s(a(10,9,"labels.buttons.Cancel")),t(2),d("mat-dialog-close",u(13,h)),t(),c(" ",a(13,11,"labels.buttons.Confirm")," "))},dependencies:[f,S,g,v,D,M,b,C],encapsulation:2})}}return l})();export{O as a}; +import{Bc as x,Ec as b,Fb as f,Fc as v,Gc as D,Hc as M,K as m,Mc as C,Ua as o,Va as s,Wa as c,ca as t,eb as u,hb as n,ib as a,ja as p,rc as g,rd as S,wa as d,xa as e,ya as i}from"./chunk-BQBWZIWL.js";var h=()=>({confirm:!0}),O=(()=>{class l{constructor(){this.dialogRef=m(x)}static{this.\u0275fac=function(r){return new(r||l)}}static{this.\u0275cmp=p({type:l,selectors:[["mifosx-undo-transaction-dialog"]],decls:14,vars:14,consts:[["mat-dialog-title",""],["mat-dialog-content",""],["align","end"],["mat-raised-button","","mat-dialog-close",""],["mat-raised-button","","color","warn",3,"mat-dialog-close"]],template:function(r,y){r&1&&(e(0,"h1",0),o(1),n(2,"translate"),i(),e(3,"div",1)(4,"p"),o(5),n(6,"translate"),i()(),e(7,"mat-dialog-actions",2)(8,"button",3),o(9),n(10,"translate"),i(),e(11,"button",4),o(12),n(13,"translate"),i()()),r&2&&(t(),s(a(2,5,"labels.heading.Undo Transaction")),t(4),s(a(6,7,"labels.text.Are you sure you want to undo this transaction")),t(4),s(a(10,9,"labels.buttons.Cancel")),t(2),d("mat-dialog-close",u(13,h)),t(),c(" ",a(13,11,"labels.buttons.Confirm")," "))},dependencies:[f,S,g,v,D,M,b,C],encapsulation:2})}}return l})();export{O as a}; diff --git a/browser/chunk-OX7PN44D.js b/browser/chunk-BQBWZIWL.js similarity index 97% rename from browser/chunk-OX7PN44D.js rename to browser/chunk-BQBWZIWL.js index ac60018e2..607571b5f 100644 --- a/browser/chunk-OX7PN44D.js +++ b/browser/chunk-BQBWZIWL.js @@ -10,7 +10,7 @@ Arguments: `+Array.prototype.slice.call(b).join("")+` ${e.map((n,o)=>`${o+1}) ${n.toString()}`).join(` `)}`:"",this.name="UnsubscriptionError",this.errors=e});function gc(t,i){if(t){let e=t.indexOf(i);0<=e&&t.splice(e,1)}}var Se=class t{constructor(i){this.initialTeardown=i,this.closed=!1,this._parentage=null,this._finalizers=null}unsubscribe(){let i;if(!this.closed){this.closed=!0;let{_parentage:e}=this;if(e)if(this._parentage=null,Array.isArray(e))for(let r of e)r.remove(this);else e.remove(this);let{initialTeardown:n}=this;if(qe(n))try{n()}catch(r){i=r instanceof d3?r.errors:[r]}let{_finalizers:o}=this;if(o){this._finalizers=null;for(let r of o)try{ey(r)}catch(a){i=i??[],a instanceof d3?i=[...i,...a.errors]:i.push(a)}}if(i)throw new d3(i)}}add(i){var e;if(i&&i!==this)if(this.closed)ey(i);else{if(i instanceof t){if(i.closed||i._hasParent(this))return;i._addParent(this)}(this._finalizers=(e=this._finalizers)!==null&&e!==void 0?e:[]).push(i)}}_hasParent(i){let{_parentage:e}=this;return e===i||Array.isArray(e)&&e.includes(i)}_addParent(i){let{_parentage:e}=this;this._parentage=Array.isArray(e)?(e.push(i),e):e?[e,i]:i}_removeParent(i){let{_parentage:e}=this;e===i?this._parentage=null:Array.isArray(e)&&gc(e,i)}remove(i){let{_finalizers:e}=this;e&&gc(e,i),i instanceof t&&i._removeParent(this)}};Se.EMPTY=(()=>{let t=new Se;return t.closed=!0,t})();var M6=Se.EMPTY;function u3(t){return t instanceof Se||t&&"closed"in t&&qe(t.remove)&&qe(t.add)&&qe(t.unsubscribe)}function ey(t){qe(t)?t():t.unsubscribe()}var ur={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1};var Al={setTimeout(t,i,...e){let{delegate:n}=Al;return n?.setTimeout?n.setTimeout(t,i,...e):setTimeout(t,i,...e)},clearTimeout(t){let{delegate:i}=Al;return(i?.clearTimeout||clearTimeout)(t)},delegate:void 0};function m3(t){Al.setTimeout(()=>{let{onUnhandledError:i}=ur;if(i)i(t);else throw t})}function _c(){}var ty=w6("C",void 0,void 0);function ny(t){return w6("E",void 0,t)}function iy(t){return w6("N",t,void 0)}function w6(t,i,e){return{kind:t,value:i,error:e}}var bc=null;function zl(t){if(ur.useDeprecatedSynchronousErrorHandling){let i=!bc;if(i&&(bc={errorThrown:!1,error:null}),t(),i){let{errorThrown:e,error:n}=bc;if(bc=null,e)throw n}}else t()}function oy(t){ur.useDeprecatedSynchronousErrorHandling&&bc&&(bc.errorThrown=!0,bc.error=t)}var vc=class extends Se{constructor(i){super(),this.isStopped=!1,i?(this.destination=i,u3(i)&&i.add(this)):this.destination=sj}static create(i,e,n){return new mr(i,e,n)}next(i){this.isStopped?S6(iy(i),this):this._next(i)}error(i){this.isStopped?S6(ny(i),this):(this.isStopped=!0,this._error(i))}complete(){this.isStopped?S6(ty,this):(this.isStopped=!0,this._complete())}unsubscribe(){this.closed||(this.isStopped=!0,super.unsubscribe(),this.destination=null)}_next(i){this.destination.next(i)}_error(i){try{this.destination.error(i)}finally{this.unsubscribe()}}_complete(){try{this.destination.complete()}finally{this.unsubscribe()}}},rj=Function.prototype.bind;function D6(t,i){return rj.call(t,i)}var k6=class{constructor(i){this.partialObserver=i}next(i){let{partialObserver:e}=this;if(e.next)try{e.next(i)}catch(n){p3(n)}}error(i){let{partialObserver:e}=this;if(e.error)try{e.error(i)}catch(n){p3(n)}else p3(i)}complete(){let{partialObserver:i}=this;if(i.complete)try{i.complete()}catch(e){p3(e)}}},mr=class extends vc{constructor(i,e,n){super();let o;if(qe(i)||!i)o={next:i??void 0,error:e??void 0,complete:n??void 0};else{let r;this&&ur.useDeprecatedNextContext?(r=Object.create(i),r.unsubscribe=()=>this.unsubscribe(),o={next:i.next&&D6(i.next,r),error:i.error&&D6(i.error,r),complete:i.complete&&D6(i.complete,r)}):o=i}this.destination=new k6(o)}};function p3(t){ur.useDeprecatedSynchronousErrorHandling?oy(t):m3(t)}function aj(t){throw t}function S6(t,i){let{onStoppedNotification:e}=ur;e&&Al.setTimeout(()=>e(t,i))}var sj={closed:!0,next:_c,error:aj,complete:_c};var Rl=typeof Symbol=="function"&&Symbol.observable||"@@observable";function Yi(t){return t}function E6(...t){return I6(t)}function I6(t){return t.length===0?Yi:t.length===1?t[0]:function(e){return t.reduce((n,o)=>o(n),e)}}var Fe=(()=>{class t{constructor(e){e&&(this._subscribe=e)}lift(e){let n=new t;return n.source=this,n.operator=e,n}subscribe(e,n,o){let r=lj(e)?e:new mr(e,n,o);return zl(()=>{let{operator:a,source:s}=this;r.add(a?a.call(r,s):s?this._subscribe(r):this._trySubscribe(r))}),r}_trySubscribe(e){try{return this._subscribe(e)}catch(n){e.error(n)}}forEach(e,n){return n=ry(n),new n((o,r)=>{let a=new mr({next:s=>{try{e(s)}catch(c){r(c),a.unsubscribe()}},error:r,complete:o});this.subscribe(a)})}_subscribe(e){var n;return(n=this.source)===null||n===void 0?void 0:n.subscribe(e)}[Rl](){return this}pipe(...e){return I6(e)(this)}toPromise(e){return e=ry(e),new e((n,o)=>{let r;this.subscribe(a=>r=a,a=>o(a),()=>n(r))})}}return t.create=i=>new t(i),t})();function ry(t){var i;return(i=t??ur.Promise)!==null&&i!==void 0?i:Promise}function cj(t){return t&&qe(t.next)&&qe(t.error)&&qe(t.complete)}function lj(t){return t&&t instanceof vc||cj(t)&&u3(t)}function O6(t){return qe(t?.lift)}function Qe(t){return i=>{if(O6(i))return i.lift(function(e){try{return t(e,this)}catch(n){this.error(n)}});throw new TypeError("Unable to lift unknown Observable type")}}function et(t,i,e,n,o){return new T6(t,i,e,n,o)}var T6=class extends vc{constructor(i,e,n,o,r,a){super(i),this.onFinalize=r,this.shouldUnsubscribe=a,this._next=e?function(s){try{e(s)}catch(c){i.error(c)}}:super._next,this._error=o?function(s){try{o(s)}catch(c){i.error(c)}finally{this.unsubscribe()}}:super._error,this._complete=n?function(){try{n()}catch(s){i.error(s)}finally{this.unsubscribe()}}:super._complete}unsubscribe(){var i;if(!this.shouldUnsubscribe||this.shouldUnsubscribe()){let{closed:e}=this;super.unsubscribe(),!e&&((i=this.onFinalize)===null||i===void 0||i.call(this))}}};function Nl(){return Qe((t,i)=>{let e=null;t._refCount++;let n=et(i,void 0,void 0,void 0,()=>{if(!t||t._refCount<=0||0<--t._refCount){e=null;return}let o=t._connection,r=e;e=null,o&&(!r||o===r)&&o.unsubscribe(),i.unsubscribe()});t.subscribe(n),n.closed||(e=t.connect())})}var ps=class extends Fe{constructor(i,e){super(),this.source=i,this.subjectFactory=e,this._subject=null,this._refCount=0,this._connection=null,O6(i)&&(this.lift=i.lift)}_subscribe(i){return this.getSubject().subscribe(i)}getSubject(){let i=this._subject;return(!i||i.isStopped)&&(this._subject=this.subjectFactory()),this._subject}_teardown(){this._refCount=0;let{_connection:i}=this;this._subject=this._connection=null,i?.unsubscribe()}connect(){let i=this._connection;if(!i){i=this._connection=new Se;let e=this.getSubject();i.add(this.source.subscribe(et(e,void 0,()=>{this._teardown(),e.complete()},n=>{this._teardown(),e.error(n)},()=>this._teardown()))),i.closed&&(this._connection=null,i=Se.EMPTY)}return i}refCount(){return Nl()(this)}};var Fl={schedule(t){let i=requestAnimationFrame,e=cancelAnimationFrame,{delegate:n}=Fl;n&&(i=n.requestAnimationFrame,e=n.cancelAnimationFrame);let o=i(r=>{e=void 0,t(r)});return new Se(()=>e?.(o))},requestAnimationFrame(...t){let{delegate:i}=Fl;return(i?.requestAnimationFrame||requestAnimationFrame)(...t)},cancelAnimationFrame(...t){let{delegate:i}=Fl;return(i?.cancelAnimationFrame||cancelAnimationFrame)(...t)},delegate:void 0};var ay=Ll(t=>function(){t(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"});var B=(()=>{class t extends Fe{constructor(){super(),this.closed=!1,this.currentObservers=null,this.observers=[],this.isStopped=!1,this.hasError=!1,this.thrownError=null}lift(e){let n=new f3(this,this);return n.operator=e,n}_throwIfClosed(){if(this.closed)throw new ay}next(e){zl(()=>{if(this._throwIfClosed(),!this.isStopped){this.currentObservers||(this.currentObservers=Array.from(this.observers));for(let n of this.currentObservers)n.next(e)}})}error(e){zl(()=>{if(this._throwIfClosed(),!this.isStopped){this.hasError=this.isStopped=!0,this.thrownError=e;let{observers:n}=this;for(;n.length;)n.shift().error(e)}})}complete(){zl(()=>{if(this._throwIfClosed(),!this.isStopped){this.isStopped=!0;let{observers:e}=this;for(;e.length;)e.shift().complete()}})}unsubscribe(){this.isStopped=this.closed=!0,this.observers=this.currentObservers=null}get observed(){var e;return((e=this.observers)===null||e===void 0?void 0:e.length)>0}_trySubscribe(e){return this._throwIfClosed(),super._trySubscribe(e)}_subscribe(e){return this._throwIfClosed(),this._checkFinalizedStatuses(e),this._innerSubscribe(e)}_innerSubscribe(e){let{hasError:n,isStopped:o,observers:r}=this;return n||o?M6:(this.currentObservers=null,r.push(e),new Se(()=>{this.currentObservers=null,gc(r,e)}))}_checkFinalizedStatuses(e){let{hasError:n,thrownError:o,isStopped:r}=this;n?e.error(o):r&&e.complete()}asObservable(){let e=new Fe;return e.source=this,e}}return t.create=(i,e)=>new f3(i,e),t})(),f3=class extends B{constructor(i,e){super(),this.destination=i,this.source=e}next(i){var e,n;(n=(e=this.destination)===null||e===void 0?void 0:e.next)===null||n===void 0||n.call(e,i)}error(i){var e,n;(n=(e=this.destination)===null||e===void 0?void 0:e.error)===null||n===void 0||n.call(e,i)}complete(){var i,e;(e=(i=this.destination)===null||i===void 0?void 0:i.complete)===null||e===void 0||e.call(i)}_subscribe(i){var e,n;return(n=(e=this.source)===null||e===void 0?void 0:e.subscribe(i))!==null&&n!==void 0?n:M6}};var ct=class extends B{constructor(i){super(),this._value=i}get value(){return this.getValue()}_subscribe(i){let e=super._subscribe(i);return!e.closed&&i.next(this._value),e}getValue(){let{hasError:i,thrownError:e,_value:n}=this;if(i)throw e;return this._throwIfClosed(),n}next(i){super.next(this._value=i)}};var Z2={now(){return(Z2.delegate||Date).now()},delegate:void 0};var pr=class extends B{constructor(i=1/0,e=1/0,n=Z2){super(),this._bufferSize=i,this._windowTime=e,this._timestampProvider=n,this._buffer=[],this._infiniteTimeWindow=!0,this._infiniteTimeWindow=e===1/0,this._bufferSize=Math.max(1,i),this._windowTime=Math.max(1,e)}next(i){let{isStopped:e,_buffer:n,_infiniteTimeWindow:o,_timestampProvider:r,_windowTime:a}=this;e||(n.push(i),!o&&n.push(r.now()+a)),this._trimBuffer(),super.next(i)}_subscribe(i){this._throwIfClosed(),this._trimBuffer();let e=this._innerSubscribe(i),{_infiniteTimeWindow:n,_buffer:o}=this,r=o.slice();for(let a=0;a0?super.requestAsyncId(i,e,n):(i.actions.push(this),i._scheduled||(i._scheduled=Fl.requestAnimationFrame(()=>i.flush(void 0))))}recycleAsyncId(i,e,n=0){var o;if(n!=null?n>0:this.delay>0)return super.recycleAsyncId(i,e,n);let{actions:r}=i;e!=null&&e===i._scheduled&&((o=r[r.length-1])===null||o===void 0?void 0:o.id)!==e&&(Fl.cancelAnimationFrame(e),i._scheduled=void 0)}};var _3=class extends jl{flush(i){this._active=!0;let e;i?e=i.id:(e=this._scheduled,this._scheduled=void 0);let{actions:n}=this,o;i=i||n.shift();do if(o=i.execute(i.state,i.delay))break;while((i=n[0])&&i.id===e&&n.shift());if(this._active=!1,o){for(;(i=n[0])&&i.id===e&&n.shift();)i.unsubscribe();throw o}}};var b3=new _3(g3);var Sn=new Fe(t=>t.complete());function v3(t){return t&&qe(t.schedule)}function P6(t){return t[t.length-1]}function y3(t){return qe(P6(t))?t.pop():void 0}function $r(t){return v3(P6(t))?t.pop():void 0}function cy(t,i){return typeof P6(t)=="number"?t.pop():i}function iue(t,i,e,n){var o=arguments.length,r=o<3?i:n===null?n=Object.getOwnPropertyDescriptor(i,e):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(t,i,e,n);else for(var s=t.length-1;s>=0;s--)(a=t[s])&&(r=(o<3?a(r):o>3?a(i,e,r):a(i,e))||r);return o>3&&r&&Object.defineProperty(i,e,r),r}function dy(t,i,e,n){function o(r){return r instanceof e?r:new e(function(a){a(r)})}return new(e||(e=Promise))(function(r,a){function s(f){try{m(n.next(f))}catch(v){a(v)}}function c(f){try{m(n.throw(f))}catch(v){a(v)}}function m(f){f.done?r(f.value):o(f.value).then(s,c)}m((n=n.apply(t,i||[])).next())})}function ly(t){var i=typeof Symbol=="function"&&Symbol.iterator,e=i&&t[i],n=0;if(e)return e.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(i?"Object is not iterable.":"Symbol.iterator is not defined.")}function yc(t){return this instanceof yc?(this.v=t,this):new yc(t)}function uy(t,i,e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var n=e.apply(t,i||[]),o,r=[];return o=Object.create((typeof AsyncIterator=="function"?AsyncIterator:Object).prototype),s("next"),s("throw"),s("return",a),o[Symbol.asyncIterator]=function(){return this},o;function a(w){return function(O){return Promise.resolve(O).then(w,v)}}function s(w,O){n[w]&&(o[w]=function(K){return new Promise(function(Y,Z){r.push([w,K,Y,Z])>1||c(w,K)})},O&&(o[w]=O(o[w])))}function c(w,O){try{m(n[w](O))}catch(K){x(r[0][3],K)}}function m(w){w.value instanceof yc?Promise.resolve(w.value.v).then(f,v):x(r[0][2],w)}function f(w){c("next",w)}function v(w){c("throw",w)}function x(w,O){w(O),r.shift(),r.length&&c(r[0][0],r[0][1])}}function my(t){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var i=t[Symbol.asyncIterator],e;return i?i.call(t):(t=typeof ly=="function"?ly(t):t[Symbol.iterator](),e={},n("next"),n("throw"),n("return"),e[Symbol.asyncIterator]=function(){return this},e);function n(r){e[r]=t[r]&&function(a){return new Promise(function(s,c){a=t[r](a),o(s,c,a.done,a.value)})}}function o(r,a,s,c){Promise.resolve(c).then(function(m){r({value:m,done:s})},a)}}var Hl=t=>t&&typeof t.length=="number"&&typeof t!="function";function C3(t){return qe(t?.then)}function x3(t){return qe(t[Rl])}function M3(t){return Symbol.asyncIterator&&qe(t?.[Symbol.asyncIterator])}function w3(t){return new TypeError(`You provided ${t!==null&&typeof t=="object"?"an invalid object":`'${t}'`} where a stream was expected. You can provide an Observable, Promise, ReadableStream, Array, AsyncIterable, or Iterable.`)}function dj(){return typeof Symbol!="function"||!Symbol.iterator?"@@iterator":Symbol.iterator}var D3=dj();function S3(t){return qe(t?.[D3])}function k3(t){return uy(this,arguments,function*(){let e=t.getReader();try{for(;;){let{value:n,done:o}=yield yc(e.read());if(o)return yield yc(void 0);yield yield yc(n)}}finally{e.releaseLock()}})}function E3(t){return qe(t?.getReader)}function Ut(t){if(t instanceof Fe)return t;if(t!=null){if(x3(t))return uj(t);if(Hl(t))return mj(t);if(C3(t))return pj(t);if(M3(t))return py(t);if(S3(t))return fj(t);if(E3(t))return hj(t)}throw w3(t)}function uj(t){return new Fe(i=>{let e=t[Rl]();if(qe(e.subscribe))return e.subscribe(i);throw new TypeError("Provided object does not correctly implement Symbol.observable")})}function mj(t){return new Fe(i=>{for(let e=0;e{t.then(e=>{i.closed||(i.next(e),i.complete())},e=>i.error(e)).then(null,m3)})}function fj(t){return new Fe(i=>{for(let e of t)if(i.next(e),i.closed)return;i.complete()})}function py(t){return new Fe(i=>{gj(t,i).catch(e=>i.error(e))})}function hj(t){return py(k3(t))}function gj(t,i){var e,n,o,r;return dy(this,void 0,void 0,function*(){try{for(e=my(t);n=yield e.next(),!n.done;){let a=n.value;if(i.next(a),i.closed)return}}catch(a){o={error:a}}finally{try{n&&!n.done&&(r=e.return)&&(yield r.call(e))}finally{if(o)throw o.error}}i.complete()})}function fo(t,i,e,n=0,o=!1){let r=i.schedule(function(){e(),o?t.add(this.schedule(null,n)):this.unsubscribe()},n);if(t.add(r),!o)return r}function I3(t,i=0){return Qe((e,n)=>{e.subscribe(et(n,o=>fo(n,t,()=>n.next(o),i),()=>fo(n,t,()=>n.complete(),i),o=>fo(n,t,()=>n.error(o),i)))})}function O3(t,i=0){return Qe((e,n)=>{n.add(t.schedule(()=>e.subscribe(n),i))})}function fy(t,i){return Ut(t).pipe(O3(i),I3(i))}function hy(t,i){return Ut(t).pipe(O3(i),I3(i))}function gy(t,i){return new Fe(e=>{let n=0;return i.schedule(function(){n===t.length?e.complete():(e.next(t[n++]),e.closed||this.schedule())})})}function _y(t,i){return new Fe(e=>{let n;return fo(e,i,()=>{n=t[D3](),fo(e,i,()=>{let o,r;try{({value:o,done:r}=n.next())}catch(a){e.error(a);return}r?e.complete():e.next(o)},0,!0)}),()=>qe(n?.return)&&n.return()})}function T3(t,i){if(!t)throw new Error("Iterable cannot be null");return new Fe(e=>{fo(e,i,()=>{let n=t[Symbol.asyncIterator]();fo(e,i,()=>{n.next().then(o=>{o.done?e.complete():e.next(o.value)})},0,!0)})})}function by(t,i){return T3(k3(t),i)}function vy(t,i){if(t!=null){if(x3(t))return fy(t,i);if(Hl(t))return gy(t,i);if(C3(t))return hy(t,i);if(M3(t))return T3(t,i);if(S3(t))return _y(t,i);if(E3(t))return by(t,i)}throw w3(t)}function tn(t,i){return i?vy(t,i):Ut(t)}function re(...t){let i=$r(t);return tn(t,i)}function Gr(t,i){let e=qe(t)?t:()=>t,n=o=>o.error(e());return new Fe(i?o=>i.schedule(n,0,o):n)}function ai(t){return!!t&&(t instanceof Fe||qe(t.lift)&&qe(t.subscribe))}var fr=Ll(t=>function(){t(this),this.name="EmptyError",this.message="no elements in sequence"});function L6(t,i){let e=typeof i=="object";return new Promise((n,o)=>{let r=new mr({next:a=>{n(a),r.unsubscribe()},error:o,complete:()=>{e?n(i.defaultValue):o(new fr)}});t.subscribe(r)})}function yy(t){return t instanceof Date&&!isNaN(t)}function me(t,i){return Qe((e,n)=>{let o=0;e.subscribe(et(n,r=>{n.next(t.call(i,r,o++))}))})}var{isArray:_j}=Array;function bj(t,i){return _j(i)?t(...i):t(i)}function Ul(t){return me(i=>bj(t,i))}var{isArray:vj}=Array,{getPrototypeOf:yj,prototype:Cj,keys:xj}=Object;function P3(t){if(t.length===1){let i=t[0];if(vj(i))return{args:i,keys:null};if(Mj(i)){let e=xj(i);return{args:e.map(n=>i[n]),keys:e}}}return{args:t,keys:null}}function Mj(t){return t&&typeof t=="object"&&yj(t)===Cj}function L3(t,i){return t.reduce((e,n,o)=>(e[n]=i[o],e),{})}function gi(...t){let i=$r(t),e=y3(t),{args:n,keys:o}=P3(t);if(n.length===0)return tn([],i);let r=new Fe(wj(n,i,o?a=>L3(o,a):Yi));return e?r.pipe(Ul(e)):r}function wj(t,i,e=Yi){return n=>{Cy(i,()=>{let{length:o}=t,r=new Array(o),a=o,s=o;for(let c=0;c{let m=tn(t[c],i),f=!1;m.subscribe(et(n,v=>{r[c]=v,f||(f=!0,s--),s||n.next(e(r.slice()))},()=>{--a||n.complete()}))},n)},n)}}function Cy(t,i,e){t?fo(e,t,i):i()}function xy(t,i,e,n,o,r,a,s){let c=[],m=0,f=0,v=!1,x=()=>{v&&!c.length&&!m&&i.complete()},w=K=>m{r&&i.next(K),m++;let Y=!1;Ut(e(K,f++)).subscribe(et(i,Z=>{o?.(Z),r?w(Z):i.next(Z)},()=>{Y=!0},void 0,()=>{if(Y)try{for(m--;c.length&&mO(Z)):O(Z)}x()}catch(Z){i.error(Z)}}))};return t.subscribe(et(i,w,()=>{v=!0,x()})),()=>{s?.()}}function _n(t,i,e=1/0){return qe(i)?_n((n,o)=>me((r,a)=>i(n,r,o,a))(Ut(t(n,o))),e):(typeof i=="number"&&(e=i),Qe((n,o)=>xy(n,o,t,e)))}function Wr(t=1/0){return _n(Yi,t)}function My(){return Wr(1)}function Li(...t){return My()(tn(t,$r(t)))}function Ai(t){return new Fe(i=>{Ut(t()).subscribe(i)})}function Oa(...t){let i=y3(t),{args:e,keys:n}=P3(t),o=new Fe(r=>{let{length:a}=e;if(!a){r.complete();return}let s=new Array(a),c=a,m=a;for(let f=0;f{v||(v=!0,m--),s[f]=x},()=>c--,void 0,()=>{(!c||!v)&&(m||r.next(n?L3(n,s):s),r.complete())}))}});return i?o.pipe(Ul(i)):o}var Dj=["addListener","removeListener"],Sj=["addEventListener","removeEventListener"],kj=["on","off"];function ed(t,i,e,n){if(qe(e)&&(n=e,e=void 0),n)return ed(t,i,e).pipe(Ul(n));let[o,r]=Oj(t)?Sj.map(a=>s=>t[a](i,s,e)):Ej(t)?Dj.map(wy(t,i)):Ij(t)?kj.map(wy(t,i)):[];if(!o&&Hl(t))return _n(a=>ed(a,i,e))(Ut(t));if(!o)throw new TypeError("Invalid event target");return new Fe(a=>{let s=(...c)=>a.next(1r(s)})}function wy(t,i){return e=>n=>t[e](i,n)}function Ej(t){return qe(t.addListener)&&qe(t.removeListener)}function Ij(t){return qe(t.on)&&qe(t.off)}function Oj(t){return qe(t.addEventListener)&&qe(t.removeEventListener)}function Ta(t=0,i,e=sy){let n=-1;return i!=null&&(v3(i)?e=i:n=i),new Fe(o=>{let r=yy(t)?+t-e.now():t;r<0&&(r=0);let a=0;return e.schedule(function(){o.closed||(o.next(a++),0<=n?this.schedule(void 0,n):o.complete())},r)})}function A6(t=0,i=Ia){return t<0&&(t=0),Ta(t,t,i)}function ft(...t){let i=$r(t),e=cy(t,1/0),n=t;return n.length?n.length===1?Ut(n[0]):Wr(e)(tn(n,i)):Sn}function Ae(t,i){return Qe((e,n)=>{let o=0;e.subscribe(et(n,r=>t.call(i,r,o++)&&n.next(r)))})}function Dy(t){return Qe((i,e)=>{let n=!1,o=null,r=null,a=!1,s=()=>{if(r?.unsubscribe(),r=null,n){n=!1;let m=o;o=null,e.next(m)}a&&e.complete()},c=()=>{r=null,a&&e.complete()};i.subscribe(et(e,m=>{n=!0,o=m,r||Ut(t(m)).subscribe(r=et(e,s,c))},()=>{a=!0,(!n||!r||r.closed)&&e.complete()}))})}function $l(t,i=Ia){return Dy(()=>Ta(t,i))}function Mo(t){return Qe((i,e)=>{let n=null,o=!1,r;n=i.subscribe(et(e,void 0,void 0,a=>{r=Ut(t(a,Mo(t)(i))),n?(n.unsubscribe(),n=null,r.subscribe(e)):o=!0})),o&&(n.unsubscribe(),n=null,r.subscribe(e))})}function A3(t,i,e,n,o){return(r,a)=>{let s=e,c=i,m=0;r.subscribe(et(a,f=>{let v=m++;c=s?t(c,f,v):(s=!0,f),n&&a.next(c)},o&&(()=>{s&&a.next(c),a.complete()})))}}function z3(t,i){return Qe(A3(t,i,arguments.length>=2,!1,!0))}function Qi(t,i){return qe(i)?_n(t,i,1):_n(t,1)}function hr(t,i=Ia){return Qe((e,n)=>{let o=null,r=null,a=null,s=()=>{if(o){o.unsubscribe(),o=null;let m=r;r=null,n.next(m)}};function c(){let m=a+t,f=i.now();if(f{r=m,a=i.now(),o||(o=i.schedule(c,t),n.add(o))},()=>{s(),n.complete()},void 0,()=>{r=o=null}))})}function fs(t){return Qe((i,e)=>{let n=!1;i.subscribe(et(e,o=>{n=!0,e.next(o)},()=>{n||e.next(t),e.complete()}))})}function Be(t){return t<=0?()=>Sn:Qe((i,e)=>{let n=0;i.subscribe(et(e,o=>{++n<=t&&(e.next(o),t<=n&&e.complete())}))})}function Sy(){return Qe((t,i)=>{t.subscribe(et(i,_c))})}function Gl(t){return me(()=>t)}function z6(t,i){return i?e=>Li(i.pipe(Be(1),Sy()),e.pipe(z6(t))):_n((e,n)=>Ut(t(e,n)).pipe(Be(1),Gl(e)))}function td(t,i=Ia){let e=Ta(t,i);return z6(()=>e)}function Wl(t,i=Yi){return t=t??Tj,Qe((e,n)=>{let o,r=!0;e.subscribe(et(n,a=>{let s=i(a);(r||!t(o,s))&&(r=!1,o=s,n.next(a))}))})}function Tj(t,i){return t===i}function R3(t=Pj){return Qe((i,e)=>{let n=!1;i.subscribe(et(e,o=>{n=!0,e.next(o)},()=>n?e.complete():e.error(t())))})}function Pj(){return new fr}function qr(t){return Qe((i,e)=>{try{i.subscribe(e)}finally{e.add(t)}})}function Yr(t,i){let e=arguments.length>=2;return n=>n.pipe(t?Ae((o,r)=>t(o,r,n)):Yi,Be(1),e?fs(i):R3(()=>new fr))}function ql(t){return t<=0?()=>Sn:Qe((i,e)=>{let n=[];i.subscribe(et(e,o=>{n.push(o),t{for(let o of n)e.next(o);e.complete()},void 0,()=>{n=null}))})}function R6(t,i){let e=arguments.length>=2;return n=>n.pipe(t?Ae((o,r)=>t(o,r,n)):Yi,ql(1),e?fs(i):R3(()=>new fr))}function N3(){return Qe((t,i)=>{let e,n=!1;t.subscribe(et(i,o=>{let r=e;e=o,n&&i.next([r,o]),n=!0}))})}function N6(t,i){return Qe(A3(t,i,arguments.length>=2,!0))}function nd(t={}){let{connector:i=()=>new B,resetOnError:e=!0,resetOnComplete:n=!0,resetOnRefCountZero:o=!0}=t;return r=>{let a,s,c,m=0,f=!1,v=!1,x=()=>{s?.unsubscribe(),s=void 0},w=()=>{x(),a=c=void 0,f=v=!1},O=()=>{let K=a;w(),K?.unsubscribe()};return Qe((K,Y)=>{m++,!v&&!f&&x();let Z=c=c??i();Y.add(()=>{m--,m===0&&!v&&!f&&(s=F6(O,o))}),Z.subscribe(Y),!a&&m>0&&(a=new mr({next:Oe=>Z.next(Oe),error:Oe=>{v=!0,x(),s=F6(w,e,Oe),Z.error(Oe)},complete:()=>{f=!0,x(),s=F6(w,n),Z.complete()}}),Ut(K).subscribe(a))})(r)}}function F6(t,i,...e){if(i===!0){t();return}if(i===!1)return;let n=new mr({next:()=>{n.unsubscribe(),t()}});return Ut(i(...e)).subscribe(n)}function hs(t,i,e){let n,o=!1;return t&&typeof t=="object"?{bufferSize:n=1/0,windowTime:i=1/0,refCount:o=!1,scheduler:e}=t:n=t??1/0,nd({connector:()=>new pr(n,i,e),resetOnError:!0,resetOnComplete:!1,resetOnRefCountZero:o})}function Cc(t){return Ae((i,e)=>t<=e)}function We(...t){let i=$r(t);return Qe((e,n)=>{(i?Li(t,e,i):Li(t,e)).subscribe(n)})}function lt(t,i){return Qe((e,n)=>{let o=null,r=0,a=!1,s=()=>a&&!o&&n.complete();e.subscribe(et(n,c=>{o?.unsubscribe();let m=0,f=r++;Ut(t(c,f)).subscribe(o=et(n,v=>n.next(i?i(c,v,f,m++):v),()=>{o=null,s()}))},()=>{a=!0,s()}))})}function ye(t){return Qe((i,e)=>{Ut(t).subscribe(et(e,()=>e.complete(),_c)),!e.closed&&i.subscribe(e)})}function V6(t,i=!1){return Qe((e,n)=>{let o=0;e.subscribe(et(n,r=>{let a=t(r,o++);(a||i)&&n.next(r),!a&&n.complete()}))})}function Ot(t,i,e){let n=qe(t)||i||e?{next:t,error:i,complete:e}:t;return n?Qe((o,r)=>{var a;(a=n.subscribe)===null||a===void 0||a.call(n);let s=!0;o.subscribe(et(r,c=>{var m;(m=n.next)===null||m===void 0||m.call(n,c),r.next(c)},()=>{var c;s=!1,(c=n.complete)===null||c===void 0||c.call(n),r.complete()},c=>{var m;s=!1,(m=n.error)===null||m===void 0||m.call(n,c),r.error(c)},()=>{var c,m;s&&((c=n.unsubscribe)===null||c===void 0||c.call(n)),(m=n.finalize)===null||m===void 0||m.call(n)}))}):Yi}function ky(t){let i=Je(null);try{return t()}finally{Je(i)}}var Ey=Ne(q({},mc),{consumerIsAlwaysLive:!0,consumerAllowSignalWrites:!0,dirty:!0,kind:"effect"});function Iy(t){if(t.dirty=!1,t.version>0&&!fc(t))return;t.version++;let i=us(t);try{t.cleanup(),t.fn()}finally{pc(t,i)}}var j3="https://angular.dev/best-practices/security#preventing-cross-site-scripting-xss",pe=class extends Error{code;constructor(i,e){super($o(i,e)),this.code=i}};function Lj(t){return`NG0${Math.abs(t)}`}function $o(t,i){return`${Lj(t)}${i?": "+i:""}`}var Qn=globalThis;function Wt(t){for(let i in t)if(t[i]===Wt)return i;throw Error("")}function Py(t,i){for(let e in i)i.hasOwnProperty(e)&&!t.hasOwnProperty(e)&&(t[e]=i[e])}function La(t){if(typeof t=="string")return t;if(Array.isArray(t))return`[${t.map(La).join(", ")}]`;if(t==null)return""+t;let i=t.overriddenName||t.name;if(i)return`${i}`;let e=t.toString();if(e==null)return""+e;let n=e.indexOf(` `);return n>=0?e.slice(0,n):e}function H3(t,i){return t?i?`${t} ${i}`:t:i||""}var Aj=Wt({__forward_ref__:Wt});function kt(t){return t.__forward_ref__=kt,t.toString=function(){return La(this())},t}function si(t){return X6(t)?t():t}function X6(t){return typeof t=="function"&&t.hasOwnProperty(Aj)&&t.__forward_ref__===kt}function R(t){return{token:t.token,providedIn:t.providedIn||null,factory:t.factory,value:void 0}}function X(t){return{providers:t.providers||[],imports:t.imports||[]}}function sd(t){return zj(t,U3)}function Z6(t){return sd(t)!==null}function zj(t,i){return t.hasOwnProperty(i)&&t[i]||null}function Rj(t){let i=t?.[U3]??null;return i||null}function j6(t){return t&&t.hasOwnProperty(V3)?t[V3]:null}var U3=Wt({\u0275prov:Wt}),V3=Wt({\u0275inj:Wt}),L=class{_desc;ngMetadataName="InjectionToken";\u0275prov;constructor(i,e){this._desc=i,this.\u0275prov=void 0,typeof e=="number"?this.__NG_ELEMENT_ID__=e:e!==void 0&&(this.\u0275prov=R({token:this,providedIn:e.providedIn||"root",factory:e.factory}))}get multi(){return this}toString(){return`InjectionToken ${this._desc}`}};function J6(t){return t&&!!t.\u0275providers}var eg=Wt({\u0275cmp:Wt}),tg=Wt({\u0275dir:Wt}),ng=Wt({\u0275pipe:Wt}),ig=Wt({\u0275mod:Wt}),od=Wt({\u0275fac:Wt}),Sc=Wt({__NG_ELEMENT_ID__:Wt}),Oy=Wt({__NG_ENV_ID__:Wt});function Ri(t){return typeof t=="string"?t:t==null?"":String(t)}function Ly(t){return typeof t=="function"?t.name||t.toString():typeof t=="object"&&t!=null&&typeof t.type=="function"?t.type.name||t.type.toString():Ri(t)}var Ay=Wt({ngErrorCode:Wt}),Nj=Wt({ngErrorMessage:Wt}),Fj=Wt({ngTokenPath:Wt});function og(t,i){return zy("",-200,i)}function $3(t,i){throw new pe(-201,!1)}function zy(t,i,e){let n=new pe(i,t);return n[Ay]=i,n[Nj]=t,e&&(n[Fj]=e),n}function Vj(t){return t[Ay]}var H6;function Ry(){return H6}function Ki(t){let i=H6;return H6=t,i}function rg(t,i,e){let n=sd(t);if(n&&n.providedIn=="root")return n.value===void 0?n.value=n.factory():n.value;if(e&8)return null;if(i!==void 0)return i;$3(t,"Injector")}var Bj={},xc=Bj,U6="__NG_DI_FLAG__",$6=class{injector;constructor(i){this.injector=i}retrieve(i,e){let n=Mc(e)||0;try{return this.injector.get(i,n&8?null:xc,n)}catch(o){if(Tl(o))return o;throw o}}};function jj(t,i=0){let e=t3();if(e===void 0)throw new pe(-203,!1);if(e===null)return rg(t,void 0,i);{let n=Hj(i),o=e.retrieve(t,n);if(Tl(o)){if(n.optional)return null;throw o}return o}}function ke(t,i=0){return(Ry()||jj)(si(t),i)}function d(t,i){return ke(t,Mc(i))}function Mc(t){return typeof t>"u"||typeof t=="number"?t:0|(t.optional&&8)|(t.host&&1)|(t.self&&2)|(t.skipSelf&&4)}function Hj(t){return{optional:!!(t&8),host:!!(t&1),self:!!(t&2),skipSelf:!!(t&4)}}function G6(t){let i=[];for(let e=0;eArray.isArray(e)?G3(e,i):i(e))}function sg(t,i,e){i>=t.length?t.push(e):t.splice(i,0,e)}function cd(t,i){return i>=t.length-1?t.pop():t.splice(i,1)[0]}function Vy(t,i){let e=[];for(let n=0;ni;){let r=o-2;t[o]=t[r],o--}t[i]=e,t[i+1]=n}}function W3(t,i,e){let n=Ql(t,i);return n>=0?t[n|1]=e:(n=~n,By(t,n,i,e)),n}function q3(t,i){let e=Ql(t,i);if(e>=0)return t[e|1]}function Ql(t,i){return $j(t,i,1)}function $j(t,i,e){let n=0,o=t.length>>e;for(;o!==n;){let r=n+(o-n>>1),a=t[r<i?o=r:n=r+1}return~(o<{e.push(a)};return G3(i,a=>{let s=a;B3(s,r,[],n)&&(o||=[],o.push(s))}),o!==void 0&&Uy(o,r),e}function Uy(t,i){for(let e=0;e{i(r,n)})}}function B3(t,i,e,n){if(t=si(t),!t)return!1;let o=null,r=j6(t),a=!r&&Qr(t);if(!r&&!a){let c=t.ngModule;if(r=j6(c),r)o=c;else return!1}else{if(a&&!a.standalone)return!1;o=t}let s=n.has(o);if(a){if(s)return!1;if(n.add(o),a.dependencies){let c=typeof a.dependencies=="function"?a.dependencies():a.dependencies;for(let m of c)B3(m,i,e,n)}}else if(r){if(r.imports!=null&&!s){n.add(o);let m;try{G3(r.imports,f=>{B3(f,i,e,n)&&(m||=[],m.push(f))})}finally{}m!==void 0&&Uy(m,i)}if(!s){let m=gs(o)||(()=>new o);i({provide:o,useFactory:m,deps:zi},o),i({provide:lg,useValue:o,multi:!0},o),i({provide:Aa,useValue:()=>ke(o),multi:!0},o)}let c=r.providers;if(c!=null&&!s){let m=t;mg(c,f=>{i(f,m)})}}else return!1;return o!==t&&t.providers!==void 0}function mg(t,i){for(let e of t)J6(e)&&(e=e.\u0275providers),Array.isArray(e)?mg(e,i):i(e)}var Gj=Wt({provide:String,useValue:Wt});function $y(t){return t!==null&&typeof t=="object"&&Gj in t}function Wj(t){return!!(t&&t.useExisting)}function qj(t){return!!(t&&t.useFactory)}function wc(t){return typeof t=="function"}function Gy(t){return!!t.useClass}var ld=new L(""),F3={},Ty={},B6;function Kl(){return B6===void 0&&(B6=new rd),B6}var Qt=class{},Dc=class extends Qt{parent;source;scopes;records=new Map;_ngOnDestroyHooks=new Set;_onDestroyHooks=[];get destroyed(){return this._destroyed}_destroyed=!1;injectorDefTypes;constructor(i,e,n,o){super(),this.parent=e,this.source=n,this.scopes=o,q6(i,a=>this.processProvider(a)),this.records.set(cg,Yl(void 0,this)),o.has("environment")&&this.records.set(Qt,Yl(void 0,this));let r=this.records.get(ld);r!=null&&typeof r.value=="string"&&this.scopes.add(r.value),this.injectorDefTypes=new Set(this.get(lg,zi,{self:!0}))}retrieve(i,e){let n=Mc(e)||0;try{return this.get(i,xc,n)}catch(o){if(Tl(o))return o;throw o}}destroy(){id(this),this._destroyed=!0;let i=Je(null);try{for(let n of this._ngOnDestroyHooks)n.ngOnDestroy();let e=this._onDestroyHooks;this._onDestroyHooks=[];for(let n of e)n()}finally{this.records.clear(),this._ngOnDestroyHooks.clear(),this.injectorDefTypes.clear(),Je(i)}}onDestroy(i){return id(this),this._onDestroyHooks.push(i),()=>this.removeOnDestroy(i)}runInContext(i){id(this);let e=Ur(this),n=Ki(void 0),o;try{return i()}finally{Ur(e),Ki(n)}}get(i,e=xc,n){if(id(this),i.hasOwnProperty(Oy))return i[Oy](this);let o=Mc(n),r,a=Ur(this),s=Ki(void 0);try{if(!(o&4)){let m=this.records.get(i);if(m===void 0){let f=Zj(i)&&sd(i);f&&this.injectableDefInScope(f)?m=Yl(W6(i),F3):m=null,this.records.set(i,m)}if(m!=null)return this.hydrate(i,m,o)}let c=o&2?Kl():this.parent;return e=o&8&&e===xc?null:e,c.get(i,e)}catch(c){let m=Vj(c);throw m===-200||m===-201?new pe(m,null):c}finally{Ki(s),Ur(a)}}resolveInjectorInitializers(){let i=Je(null),e=Ur(this),n=Ki(void 0),o;try{let r=this.get(Aa,zi,{self:!0});for(let a of r)a()}finally{Ur(e),Ki(n),Je(i)}}toString(){let i=[],e=this.records;for(let n of e.keys())i.push(La(n));return`R3Injector[${i.join(", ")}]`}processProvider(i){i=si(i);let e=wc(i)?i:si(i&&i.provide),n=Qj(i);if(!wc(i)&&i.multi===!0){let o=this.records.get(e);o||(o=Yl(void 0,F3,!0),o.factory=()=>G6(o.multi),this.records.set(e,o)),e=i,o.multi.push(i)}this.records.set(e,n)}hydrate(i,e,n){let o=Je(null);try{if(e.value===Ty)throw og(La(i));return e.value===F3&&(e.value=Ty,e.value=e.factory(void 0,n)),typeof e.value=="object"&&e.value&&Xj(e.value)&&this._ngOnDestroyHooks.add(e.value),e.value}finally{Je(o)}}injectableDefInScope(i){if(!i.providedIn)return!1;let e=si(i.providedIn);return typeof e=="string"?e==="any"||this.scopes.has(e):this.injectorDefTypes.has(e)}removeOnDestroy(i){let e=this._onDestroyHooks.indexOf(i);e!==-1&&this._onDestroyHooks.splice(e,1)}};function W6(t){let i=sd(t),e=i!==null?i.factory:gs(t);if(e!==null)return e;if(t instanceof L)throw new pe(204,!1);if(t instanceof Function)return Yj(t);throw new pe(204,!1)}function Yj(t){if(t.length>0)throw new pe(204,!1);let e=Rj(t);return e!==null?()=>e.factory(t):()=>new t}function Qj(t){if($y(t))return Yl(void 0,t.useValue);{let i=pg(t);return Yl(i,F3)}}function pg(t,i,e){let n;if(wc(t)){let o=si(t);return gs(o)||W6(o)}else if($y(t))n=()=>si(t.useValue);else if(qj(t))n=()=>t.useFactory(...G6(t.deps||[]));else if(Wj(t))n=(o,r)=>ke(si(t.useExisting),r!==void 0&&r&8?8:void 0);else{let o=si(t&&(t.useClass||t.provide));if(Kj(t))n=()=>new o(...G6(t.deps));else return gs(o)||W6(o)}return n}function id(t){if(t.destroyed)throw new pe(205,!1)}function Yl(t,i,e=!1){return{factory:t,value:i,multi:e?[]:void 0}}function Kj(t){return!!t.deps}function Xj(t){return t!==null&&typeof t=="object"&&typeof t.ngOnDestroy=="function"}function Zj(t){return typeof t=="function"||typeof t=="object"&&t.ngMetadataName==="InjectionToken"}function q6(t,i){for(let e of t)Array.isArray(e)?q6(e,i):e&&J6(e)?q6(e.\u0275providers,i):i(e)}function bi(t,i){let e;t instanceof Dc?(id(t),e=t):e=new $6(t);let n,o=Ur(e),r=Ki(void 0);try{return i()}finally{Ur(o),Ki(r)}}function fg(){return Ry()!==void 0||t3()!=null}var _r=0,Ge=1,it=2,ci=3,Go=4,Xi=5,kc=6,Xl=7,Rn=8,za=9,Kr=10,Kt=11,Zl=12,hg=13,Ec=14,Ni=15,vs=16,Ic=17,Xr=18,dd=19,gg=20,Pa=21,Q3=22,Ra=23,wo=24,Oc=25,Tc=26,nn=27,Wy=1,_g=6,ys=7,ud=8,Pc=9,Nn=10;function Zr(t){return Array.isArray(t)&&typeof t[Wy]=="object"}function br(t){return Array.isArray(t)&&t[Wy]===!0}function bg(t){return(t.flags&4)!==0}function Na(t){return t.componentOffset>-1}function Jl(t){return(t.flags&1)===1}function vr(t){return!!t.template}function e1(t){return(t[it]&512)!==0}function Lc(t){return(t[it]&256)===256}var vg="svg",qy="math";function Wo(t){for(;Array.isArray(t);)t=t[_r];return t}function yg(t,i){return Wo(i[t])}function qo(t,i){return Wo(i[t.index])}function md(t,i){return t.data[i]}function t1(t,i){return t[i]}function Cg(t,i,e,n){e>=t.data.length&&(t.data[e]=null,t.blueprint[e]=null),i[e]=n}function Yo(t,i){let e=i[t];return Zr(e)?e:e[_r]}function Yy(t){return(t[it]&4)===4}function K3(t){return(t[it]&128)===128}function Qy(t){return br(t[ci])}function Do(t,i){return i==null?null:t[i]}function xg(t){t[Ic]=0}function Mg(t){t[it]&1024||(t[it]|=1024,K3(t)&&Cs(t))}function Ky(t,i){for(;t>0;)i=i[Ec],t--;return i}function pd(t){return!!(t[it]&9216||t[wo]?.dirty)}function X3(t){t[Kr].changeDetectionScheduler?.notify(8),t[it]&64&&(t[it]|=1024),pd(t)&&Cs(t)}function Cs(t){t[Kr].changeDetectionScheduler?.notify(0);let i=_s(t);for(;i!==null&&!(i[it]&8192||(i[it]|=8192,!K3(i)));)i=_s(i)}function wg(t,i){if(Lc(t))throw new pe(911,!1);t[Pa]===null&&(t[Pa]=[]),t[Pa].push(i)}function Xy(t,i){if(t[Pa]===null)return;let e=t[Pa].indexOf(i);e!==-1&&t[Pa].splice(e,1)}function _s(t){let i=t[ci];return br(i)?i[ci]:i}function Dg(t){return t[Xl]??=[]}function Sg(t){return t.cleanup??=[]}function Zy(t,i,e,n){let o=Dg(i);o.push(e),t.firstCreatePass&&Sg(t).push(n,o.length-1)}var yt={lFrame:lC(null),bindingsEnabled:!0,skipHydrationRootTNode:null};var Y6=!1;function Jy(){return yt.lFrame.elementDepthCount}function eC(){yt.lFrame.elementDepthCount++}function kg(){yt.lFrame.elementDepthCount--}function Z3(){return yt.bindingsEnabled}function Eg(){return yt.skipHydrationRootTNode!==null}function Ig(t){return yt.skipHydrationRootTNode===t}function Og(){yt.skipHydrationRootTNode=null}function ze(){return yt.lFrame.lView}function on(){return yt.lFrame.tView}function G(t){return yt.lFrame.contextLView=t,t[Rn]}function W(t){return yt.lFrame.contextLView=null,t}function Kn(){let t=Tg();for(;t!==null&&t.type===64;)t=t.parent;return t}function Tg(){return yt.lFrame.currentTNode}function tC(){let t=yt.lFrame,i=t.currentTNode;return t.isParent?i:i.parent}function n1(t,i){let e=yt.lFrame;e.currentTNode=t,e.isParent=i}function Pg(){return yt.lFrame.isParent}function Lg(){yt.lFrame.isParent=!1}function nC(){return yt.lFrame.contextLView}function Ag(){return Y6}function i1(t){let i=Y6;return Y6=t,i}function Fa(){let t=yt.lFrame,i=t.bindingRootIndex;return i===-1&&(i=t.bindingRootIndex=t.tView.bindingStartIndex),i}function J3(){return yt.lFrame.bindingIndex}function iC(t){return yt.lFrame.bindingIndex=t}function Jr(){return yt.lFrame.bindingIndex++}function o1(t){let i=yt.lFrame,e=i.bindingIndex;return i.bindingIndex=i.bindingIndex+t,e}function oC(){return yt.lFrame.inI18n}function rC(t,i){let e=yt.lFrame;e.bindingIndex=e.bindingRootIndex=t,e4(i)}function aC(){return yt.lFrame.currentDirectiveIndex}function e4(t){yt.lFrame.currentDirectiveIndex=t}function sC(t){let i=yt.lFrame.currentDirectiveIndex;return i===-1?null:t[i]}function t4(){return yt.lFrame.currentQueryIndex}function fd(t){yt.lFrame.currentQueryIndex=t}function Jj(t){let i=t[Ge];return i.type===2?i.declTNode:i.type===1?t[Xi]:null}function zg(t,i,e){if(e&4){let o=i,r=t;for(;o=o.parent,o===null&&!(e&1);)if(o=Jj(r),o===null||(r=r[Ec],o.type&10))break;if(o===null)return!1;i=o,t=r}let n=yt.lFrame=cC();return n.currentTNode=i,n.lView=t,!0}function n4(t){let i=cC(),e=t[Ge];yt.lFrame=i,i.currentTNode=e.firstChild,i.lView=t,i.tView=e,i.contextLView=t,i.bindingIndex=e.bindingStartIndex,i.inI18n=!1}function cC(){let t=yt.lFrame,i=t===null?null:t.child;return i===null?lC(t):i}function lC(t){let i={currentTNode:null,isParent:!0,lView:null,tView:null,selectedIndex:-1,contextLView:null,elementDepthCount:0,currentNamespace:null,currentDirectiveIndex:-1,bindingRootIndex:-1,bindingIndex:-1,currentQueryIndex:0,parent:t,child:null,inI18n:!1};return t!==null&&(t.child=i),i}function dC(){let t=yt.lFrame;return yt.lFrame=t.parent,t.currentTNode=null,t.lView=null,t}var Rg=dC;function i4(){let t=dC();t.isParent=!0,t.tView=null,t.selectedIndex=-1,t.contextLView=null,t.elementDepthCount=0,t.currentDirectiveIndex=-1,t.currentNamespace=null,t.bindingRootIndex=-1,t.bindingIndex=-1,t.currentQueryIndex=0}function uC(t){return(yt.lFrame.contextLView=Ky(t,yt.lFrame.contextLView))[Rn]}function Qo(){return yt.lFrame.selectedIndex}function xs(t){yt.lFrame.selectedIndex=t}function r1(){let t=yt.lFrame;return md(t.tView,t.selectedIndex)}function $t(){yt.lFrame.currentNamespace=vg}function Ko(){eH()}function eH(){yt.lFrame.currentNamespace=null}function mC(){return yt.lFrame.currentNamespace}var pC=!0;function o4(){return pC}function hd(t){pC=t}function Q6(t,i=null,e=null,n){let o=Ng(t,i,e,n);return o.resolveInjectorInitializers(),o}function Ng(t,i=null,e=null,n,o=new Set){let r=[e||zi,Hy(t)];return n=n||(typeof t=="object"?void 0:La(t)),new Dc(r,i||Kl(),n||null,o)}var be=class t{static THROW_IF_NOT_FOUND=xc;static NULL=new rd;static create(i,e){if(Array.isArray(i))return Q6({name:""},e,i,"");{let n=i.name??"";return Q6({name:n},i.parent,i.providers,n)}}static \u0275prov=R({token:t,providedIn:"any",factory:()=>ke(cg)});static __NG_ELEMENT_ID__=-1},Me=new L(""),Fi=(()=>{class t{static __NG_ELEMENT_ID__=tH;static __NG_ENV_ID__=e=>e}return t})(),ad=class extends Fi{_lView;constructor(i){super(),this._lView=i}get destroyed(){return Lc(this._lView)}onDestroy(i){let e=this._lView;return wg(e,i),()=>Xy(e,i)}};function tH(){return new ad(ze())}var _i=class{_console=console;handleError(i){this._console.error("ERROR",i)}},Zi=new L("",{providedIn:"root",factory:()=>{let t=d(Qt),i;return e=>{t.destroyed&&!i?setTimeout(()=>{throw e}):(i??=t.get(_i),i.handleError(e))}}}),fC={provide:Aa,useValue:()=>void d(_i),multi:!0};function ea(t){return typeof t=="function"&&t[Yn]!==void 0}function we(t,i){let[e,n,o]=C6(t,i?.equal),r=e,a=r[Yn];return r.set=n,r.update=o,r.asReadonly=r4.bind(r),r}function r4(){let t=this[Yn];if(t.readonlyFn===void 0){let i=()=>this();i[Yn]=t,t.readonlyFn=i}return t.readonlyFn}function Fg(t){return ea(t)&&typeof t.set=="function"}var Ac=(()=>{class t{view;node;constructor(e,n){this.view=e,this.node=n}static __NG_ELEMENT_ID__=nH}return t})();function nH(){return new Ac(ze(),Kn())}var Uo=class{},gd=new L("",{providedIn:"root",factory:()=>!1});var Vg=new L(""),Bg=new L(""),ta=(()=>{class t{taskId=0;pendingTasks=new Set;destroyed=!1;pendingTask=new ct(!1);get hasPendingTasks(){return this.destroyed?!1:this.pendingTask.value}get hasPendingTasksObservable(){return this.destroyed?new Fe(e=>{e.next(!1),e.complete()}):this.pendingTask}add(){!this.hasPendingTasks&&!this.destroyed&&this.pendingTask.next(!0);let e=this.taskId++;return this.pendingTasks.add(e),e}has(e){return this.pendingTasks.has(e)}remove(e){this.pendingTasks.delete(e),this.pendingTasks.size===0&&this.hasPendingTasks&&this.pendingTask.next(!1)}ngOnDestroy(){this.pendingTasks.clear(),this.hasPendingTasks&&this.pendingTask.next(!1),this.destroyed=!0,this.pendingTask.unsubscribe()}static \u0275prov=R({token:t,providedIn:"root",factory:()=>new t})}return t})(),a1=(()=>{class t{internalPendingTasks=d(ta);scheduler=d(Uo);errorHandler=d(Zi);add(){let e=this.internalPendingTasks.add();return()=>{this.internalPendingTasks.has(e)&&(this.scheduler.notify(11),this.internalPendingTasks.remove(e))}}run(e){let n=this.add();e().catch(this.errorHandler).finally(n)}static \u0275prov=R({token:t,providedIn:"root",factory:()=>new t})}return t})();function zc(...t){}var _d=(()=>{class t{static \u0275prov=R({token:t,providedIn:"root",factory:()=>new K6})}return t})(),K6=class{dirtyEffectCount=0;queues=new Map;add(i){this.enqueue(i),this.schedule(i)}schedule(i){i.dirty&&this.dirtyEffectCount++}remove(i){let e=i.zone,n=this.queues.get(e);n.has(i)&&(n.delete(i),i.dirty&&this.dirtyEffectCount--)}enqueue(i){let e=i.zone;this.queues.has(e)||this.queues.set(e,new Set);let n=this.queues.get(e);n.has(i)||n.add(i)}flush(){for(;this.dirtyEffectCount>0;){let i=!1;for(let[e,n]of this.queues)e===null?i||=this.flushQueue(n):i||=e.run(()=>this.flushQueue(n));i||(this.dirtyEffectCount=0)}}flushQueue(i){let e=!1;for(let n of i)n.dirty&&(this.dirtyEffectCount--,e=!0,n.run());return e}};function f1(t){return{toString:t}.toString()}var a4="__parameters__";function cH(t){return function(...e){if(t){let n=t(...e);for(let o in n)this[o]=n[o]}}}function ZC(t,i,e){return f1(()=>{let n=cH(i);function o(...r){if(this instanceof o)return n.apply(this,r),this;let a=new o(...r);return s.annotation=a,s;function s(c,m,f){let v=c.hasOwnProperty(a4)?c[a4]:Object.defineProperty(c,a4,{value:[]})[a4];for(;v.length<=f;)v.push(null);return(v[f]=v[f]||[]).push(a),c}}return o.prototype.ngMetadataName=t,o.annotationCls=o,o})}var Xo=ag(ZC("Optional"),8);var oa=ag(ZC("SkipSelf"),4);function JC(t){let i=Qn.ng;if(i&&i.\u0275compilerFacade)return i.\u0275compilerFacade;throw new Error("JIT compiler unavailable")}function lH(t){return typeof t=="function"}var b4=class{previousValue;currentValue;firstChange;constructor(i,e,n){this.previousValue=i,this.currentValue=e,this.firstChange=n}isFirstChange(){return this.firstChange}};function ex(t,i,e,n){i!==null?i.applyValueToInputSignal(i,n):t[e]=n}var Re=(()=>{let t=()=>tx;return t.ngInherit=!0,t})();function tx(t){return t.type.prototype.ngOnChanges&&(t.setInput=uH),dH}function dH(){let t=ix(this),i=t?.current;if(i){let e=t.previous;if(e===gr)t.previous=i;else for(let n in i)e[n]=i[n];t.current=null,this.ngOnChanges(i)}}function uH(t,i,e,n,o){let r=this.declaredInputs[n],a=ix(t)||mH(t,{previous:gr,current:null}),s=a.current||(a.current={}),c=a.previous,m=c[r];s[r]=new b4(m&&m.currentValue,e,c===gr),ex(t,i,o,e)}var nx="__ngSimpleChanges__";function ix(t){return t[nx]||null}function mH(t,i){return t[nx]=i}var hC=[];var rn=function(t,i=null,e){for(let n=0;n=n)break}else i[c]<0&&(t[Ic]+=65536),(s>14>16&&(t[it]&3)===i&&(t[it]+=16384,gC(s,r)):gC(s,r)}var c1=-1,Nc=class{factory;name;injectImpl;resolving=!1;canSeeViewProviders;multi;componentProviders;index;providerFactory;constructor(i,e,n,o){this.factory=i,this.name=o,this.canSeeViewProviders=e,this.injectImpl=n}};function hH(t){return(t.flags&8)!==0}function gH(t){return(t.flags&16)!==0}function _H(t,i,e){let n=0;for(;ni){a=r-1;break}}}for(;r>16}function y4(t,i){let e=vH(t),n=i;for(;e>0;)n=n[Ec],e--;return n}var Xg=!0;function C4(t){let i=Xg;return Xg=t,i}var yH=256,cx=yH-1,lx=5,CH=0,na={};function xH(t,i,e){let n;typeof e=="string"?n=e.charCodeAt(0)||0:e.hasOwnProperty(Sc)&&(n=e[Sc]),n==null&&(n=e[Sc]=CH++);let o=n&cx,r=1<>lx)]|=r}function x4(t,i){let e=dx(t,i);if(e!==-1)return e;let n=i[Ge];n.firstCreatePass&&(t.injectorIndex=i.length,Hg(n.data,t),Hg(i,null),Hg(n.blueprint,null));let o=R8(t,i),r=t.injectorIndex;if(sx(o)){let a=v4(o),s=y4(o,i),c=s[Ge].data;for(let m=0;m<8;m++)i[r+m]=s[a+m]|c[a+m]}return i[r+8]=o,r}function Hg(t,i){t.push(0,0,0,0,0,0,0,0,i)}function dx(t,i){return t.injectorIndex===-1||t.parent&&t.parent.injectorIndex===t.injectorIndex||i[t.injectorIndex+8]===null?-1:t.injectorIndex}function R8(t,i){if(t.parent&&t.parent.injectorIndex!==-1)return t.parent.injectorIndex;let e=0,n=null,o=i;for(;o!==null;){if(n=hx(o),n===null)return c1;if(e++,o=o[Ec],n.injectorIndex!==-1)return n.injectorIndex|e<<16}return c1}function Zg(t,i,e){xH(t,i,e)}function MH(t,i){if(i==="class")return t.classes;if(i==="style")return t.styles;let e=t.attrs;if(e){let n=e.length,o=0;for(;o>20,v=n?s:s+f,x=o?s+f:m;for(let w=v;w=c&&O.type===e)return w}if(o){let w=a[c];if(w&&vr(w)&&w.type===e)return c}return null}function Cd(t,i,e,n,o){let r=t[e],a=i.data;if(r instanceof Nc){let s=r;if(s.resolving){let w=Ly(a[e]);throw og(w)}let c=C4(s.canSeeViewProviders);s.resolving=!0;let m=a[e].type||a[e],f,v=s.injectImpl?Ki(s.injectImpl):null,x=zg(t,n,0);try{r=t[e]=s.factory(void 0,o,a,t,n),i.firstCreatePass&&e>=n.directiveStart&&pH(e,a[e],i)}finally{v!==null&&Ki(v),C4(c),s.resolving=!1,Rg()}}return r}function DH(t){if(typeof t=="string")return t.charCodeAt(0)||0;let i=t.hasOwnProperty(Sc)?t[Sc]:void 0;return typeof i=="number"?i>=0?i&cx:SH:i}function bC(t,i,e){let n=1<>lx)]&n)}function vC(t,i){return!(t&2)&&!(t&1&&i)}var Rc=class{_tNode;_lView;constructor(i,e){this._tNode=i,this._lView=e}get(i,e,n){return px(this._tNode,this._lView,i,Mc(n),e)}};function SH(){return new Rc(Kn(),ze())}function Ie(t){return f1(()=>{let i=t.prototype.constructor,e=i[od]||Jg(i),n=Object.prototype,o=Object.getPrototypeOf(t.prototype).constructor;for(;o&&o!==n;){let r=o[od]||Jg(o);if(r&&r!==e)return r;o=Object.getPrototypeOf(o)}return r=>new r})}function Jg(t){return X6(t)?()=>{let i=Jg(si(t));return i&&i()}:gs(t)}function kH(t,i,e,n,o){let r=t,a=i;for(;r!==null&&a!==null&&a[it]&2048&&!e1(a);){let s=fx(r,a,e,n|2,na);if(s!==na)return s;let c=r.parent;if(!c){let m=a[gg];if(m){let f=m.get(e,na,n);if(f!==na)return f}c=hx(a),a=a[Ec]}r=c}return o}function hx(t){let i=t[Ge],e=i.type;return e===2?i.declTNode:e===1?t[Xi]:null}function Od(t){return MH(Kn(),t)}function EH(){return h1(Kn(),ze())}function h1(t,i){return new Q(qo(t,i))}var Q=(()=>{class t{nativeElement;constructor(e){this.nativeElement=e}static __NG_ELEMENT_ID__=EH}return t})();function gx(t){return t instanceof Q?t.nativeElement:t}function IH(){return this._results[Symbol.iterator]()}var In=class{_emitDistinctChangesOnly;dirty=!0;_onDirty=void 0;_results=[];_changesDetected=!1;_changes=void 0;length=0;first=void 0;last=void 0;get changes(){return this._changes??=new B}constructor(i=!1){this._emitDistinctChangesOnly=i}get(i){return this._results[i]}map(i){return this._results.map(i)}filter(i){return this._results.filter(i)}find(i){return this._results.find(i)}reduce(i,e){return this._results.reduce(i,e)}forEach(i){this._results.forEach(i)}some(i){return this._results.some(i)}toArray(){return this._results.slice()}toString(){return this._results.toString()}reset(i,e){this.dirty=!1;let n=Fy(i);(this._changesDetected=!Ny(this._results,n,e))&&(this._results=n,this.length=n.length,this.last=n[this.length-1],this.first=n[0])}notifyOnChanges(){this._changes!==void 0&&(this._changesDetected||!this._emitDistinctChangesOnly)&&this._changes.next(this)}onDirty(i){this._onDirty=i}setDirty(){this.dirty=!0,this._onDirty?.()}destroy(){this._changes!==void 0&&(this._changes.complete(),this._changes.unsubscribe())}[Symbol.iterator]=IH};function _x(t){return(t.flags&128)===128}var N8=(function(t){return t[t.OnPush=0]="OnPush",t[t.Default=1]="Default",t})(N8||{}),bx=new Map,OH=0;function TH(){return OH++}function PH(t){bx.set(t[dd],t)}function e8(t){bx.delete(t[dd])}var yC="__ngContext__";function d1(t,i){Zr(i)?(t[yC]=i[dd],PH(i)):t[yC]=i}function vx(t){return Cx(t[Zl])}function yx(t){return Cx(t[Go])}function Cx(t){for(;t!==null&&!br(t);)t=t[Go];return t}var t8;function F8(t){t8=t}function V8(){if(t8!==void 0)return t8;if(typeof document<"u")return document;throw new pe(210,!1)}var Ds=new L("",{providedIn:"root",factory:()=>LH}),LH="ng",R4=new L(""),Bc=new L("",{providedIn:"platform",factory:()=>"unknown"});var Td=new L(""),g1=new L("",{providedIn:"root",factory:()=>V8().body?.querySelector("[ngCspNonce]")?.getAttribute("ngCspNonce")||null});var AH="h",zH="b";var xx="r";var Mx="di";var wx=!1,Dx=new L("",{providedIn:"root",factory:()=>wx});var N4=new L("");var RH=(t,i,e,n)=>{};function NH(t,i,e,n){RH(t,i,e,n)}function F4(t){return(t.flags&32)===32}var FH=()=>null;function Sx(t,i,e=!1){return FH(t,i,e)}function kx(t,i){let e=t.contentQueries;if(e!==null){let n=Je(null);try{for(let o=0;ot,createScript:t=>t,createScriptURL:t=>t})}catch{}return s4}function V4(t){return VH()?.createHTML(t)||t}var c4;function Ex(){if(c4===void 0&&(c4=null,Qn.trustedTypes))try{c4=Qn.trustedTypes.createPolicy("angular#unsafe-bypass",{createHTML:t=>t,createScript:t=>t,createScriptURL:t=>t})}catch{}return c4}function CC(t){return Ex()?.createHTML(t)||t}function xC(t){return Ex()?.createScriptURL(t)||t}var Ba=class{changingThisBreaksApplicationSecurity;constructor(i){this.changingThisBreaksApplicationSecurity=i}toString(){return`SafeValue must use [property]=binding: ${this.changingThisBreaksApplicationSecurity} (see ${j3})`}},i8=class extends Ba{getTypeName(){return"HTML"}},o8=class extends Ba{getTypeName(){return"Style"}},r8=class extends Ba{getTypeName(){return"Script"}},a8=class extends Ba{getTypeName(){return"URL"}},s8=class extends Ba{getTypeName(){return"ResourceURL"}};function So(t){return t instanceof Ba?t.changingThisBreaksApplicationSecurity:t}function ra(t,i){let e=Ix(t);if(e!=null&&e!==i){if(e==="ResourceURL"&&i==="URL")return!0;throw new Error(`Required a safe ${i}, got a ${e} (see ${j3})`)}return e===i}function Ix(t){return t instanceof Ba&&t.getTypeName()||null}function j8(t){return new i8(t)}function H8(t){return new o8(t)}function U8(t){return new r8(t)}function $8(t){return new a8(t)}function G8(t){return new s8(t)}function BH(t){let i=new l8(t);return jH()?new c8(i):i}var c8=class{inertDocumentHelper;constructor(i){this.inertDocumentHelper=i}getInertBodyElement(i){i=""+i;try{let e=new window.DOMParser().parseFromString(V4(i),"text/html").body;return e===null?this.inertDocumentHelper.getInertBodyElement(i):(e.firstChild?.remove(),e)}catch{return null}}},l8=class{defaultDoc;inertDocument;constructor(i){this.defaultDoc=i,this.inertDocument=this.defaultDoc.implementation.createHTMLDocument("sanitization-inert")}getInertBodyElement(i){let e=this.inertDocument.createElement("template");return e.innerHTML=V4(i),e}};function jH(){try{return!!new window.DOMParser().parseFromString(V4(""),"text/html")}catch{return!1}}var HH=/^(?!javascript:)(?:[a-z0-9+.-]+:|[^&:\/?#]*(?:[\/?#]|$))/i;function Pd(t){return t=String(t),t.match(HH)?t:"unsafe:"+t}function ja(t){let i={};for(let e of t.split(","))i[e]=!0;return i}function Ld(...t){let i={};for(let e of t)for(let n in e)e.hasOwnProperty(n)&&(i[n]=!0);return i}var Ox=ja("area,br,col,hr,img,wbr"),Tx=ja("colgroup,dd,dt,li,p,tbody,td,tfoot,th,thead,tr"),Px=ja("rp,rt"),UH=Ld(Px,Tx),$H=Ld(Tx,ja("address,article,aside,blockquote,caption,center,del,details,dialog,dir,div,dl,figure,figcaption,footer,h1,h2,h3,h4,h5,h6,header,hgroup,hr,ins,main,map,menu,nav,ol,pre,section,summary,table,ul")),GH=Ld(Px,ja("a,abbr,acronym,audio,b,bdi,bdo,big,br,cite,code,del,dfn,em,font,i,img,ins,kbd,label,map,mark,picture,q,ruby,rp,rt,s,samp,small,source,span,strike,strong,sub,sup,time,track,tt,u,var,video")),MC=Ld(Ox,$H,GH,UH),Lx=ja("background,cite,href,itemtype,longdesc,poster,src,xlink:href"),WH=ja("abbr,accesskey,align,alt,autoplay,axis,bgcolor,border,cellpadding,cellspacing,class,clear,color,cols,colspan,compact,controls,coords,datetime,default,dir,download,face,headers,height,hidden,hreflang,hspace,ismap,itemscope,itemprop,kind,label,lang,language,loop,media,muted,nohref,nowrap,open,preload,rel,rev,role,rows,rowspan,rules,scope,scrolling,shape,size,sizes,span,srclang,srcset,start,summary,tabindex,target,title,translate,type,usemap,valign,value,vspace,width"),qH=ja("aria-activedescendant,aria-atomic,aria-autocomplete,aria-busy,aria-checked,aria-colcount,aria-colindex,aria-colspan,aria-controls,aria-current,aria-describedby,aria-details,aria-disabled,aria-dropeffect,aria-errormessage,aria-expanded,aria-flowto,aria-grabbed,aria-haspopup,aria-hidden,aria-invalid,aria-keyshortcuts,aria-label,aria-labelledby,aria-level,aria-live,aria-modal,aria-multiline,aria-multiselectable,aria-orientation,aria-owns,aria-placeholder,aria-posinset,aria-pressed,aria-readonly,aria-relevant,aria-required,aria-roledescription,aria-rowcount,aria-rowindex,aria-rowspan,aria-selected,aria-setsize,aria-sort,aria-valuemax,aria-valuemin,aria-valuenow,aria-valuetext"),YH=Ld(Lx,WH,qH),QH=ja("script,style,template"),d8=class{sanitizedSomething=!1;buf=[];sanitizeChildren(i){let e=i.firstChild,n=!0,o=[];for(;e;){if(e.nodeType===Node.ELEMENT_NODE?n=this.startElement(e):e.nodeType===Node.TEXT_NODE?this.chars(e.nodeValue):this.sanitizedSomething=!0,n&&e.firstChild){o.push(e),e=ZH(e);continue}for(;e;){e.nodeType===Node.ELEMENT_NODE&&this.endElement(e);let r=XH(e);if(r){e=r;break}e=o.pop()}}return this.buf.join("")}startElement(i){let e=wC(i).toLowerCase();if(!MC.hasOwnProperty(e))return this.sanitizedSomething=!0,!QH.hasOwnProperty(e);this.buf.push("<"),this.buf.push(e);let n=i.attributes;for(let o=0;o"),!0}endElement(i){let e=wC(i).toLowerCase();MC.hasOwnProperty(e)&&!Ox.hasOwnProperty(e)&&(this.buf.push(""))}chars(i){this.buf.push(DC(i))}};function KH(t,i){return(t.compareDocumentPosition(i)&Node.DOCUMENT_POSITION_CONTAINED_BY)!==Node.DOCUMENT_POSITION_CONTAINED_BY}function XH(t){let i=t.nextSibling;if(i&&t!==i.previousSibling)throw Ax(i);return i}function ZH(t){let i=t.firstChild;if(i&&KH(t,i))throw Ax(i);return i}function wC(t){let i=t.nodeName;return typeof i=="string"?i:"FORM"}function Ax(t){return new Error(`Failed to sanitize html because the element is clobbered: ${t.outerHTML}`)}var JH=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,eU=/([^\#-~ |!])/g;function DC(t){return t.replace(/&/g,"&").replace(JH,function(i){let e=i.charCodeAt(0),n=i.charCodeAt(1);return"&#"+((e-55296)*1024+(n-56320)+65536)+";"}).replace(eU,function(i){return"&#"+i.charCodeAt(0)+";"}).replace(//g,">")}var l4;function B4(t,i){let e=null;try{l4=l4||BH(t);let n=i?String(i):"";e=l4.getInertBodyElement(n);let o=5,r=n;do{if(o===0)throw new Error("Failed to sanitize html because the input is unstable");o--,n=r,r=e.innerHTML,e=l4.getInertBodyElement(n)}while(n!==r);let s=new d8().sanitizeChildren(SC(e)||e);return V4(s)}finally{if(e){let n=SC(e)||e;for(;n.firstChild;)n.firstChild.remove()}}}function SC(t){return"content"in t&&tU(t)?t.content:null}function tU(t){return t.nodeType===Node.ELEMENT_NODE&&t.nodeName==="TEMPLATE"}var nU=/^>|^->||--!>|)/g,oU="\u200B$1\u200B";function rU(t){return t.replace(nU,i=>i.replace(iU,oU))}function aU(t,i){return t.createText(i)}function sU(t,i,e){t.setValue(i,e)}function cU(t,i){return t.createComment(rU(i))}function zx(t,i,e){return t.createElement(i,e)}function M4(t,i,e,n,o){t.insertBefore(i,e,n,o)}function Rx(t,i,e){t.appendChild(i,e)}function kC(t,i,e,n,o){n!==null?M4(t,i,e,n,o):Rx(t,i,e)}function Nx(t,i,e,n){t.removeChild(null,i,e,n)}function lU(t,i,e){t.setAttribute(i,"style",e)}function dU(t,i,e){e===""?t.removeAttribute(i,"class"):t.setAttribute(i,"class",e)}function Fx(t,i,e){let{mergedAttrs:n,classes:o,styles:r}=e;n!==null&&_H(t,i,n),o!==null&&dU(t,i,o),r!==null&&lU(t,i,r)}var Fn=(function(t){return t[t.NONE=0]="NONE",t[t.HTML=1]="HTML",t[t.STYLE=2]="STYLE",t[t.SCRIPT=3]="SCRIPT",t[t.URL=4]="URL",t[t.RESOURCE_URL=5]="RESOURCE_URL",t})(Fn||{});function jc(t){let i=q8();return i?CC(i.sanitize(Fn.HTML,t)||""):ra(t,"HTML")?CC(So(t)):B4(V8(),Ri(t))}function _1(t){let i=q8();return i?i.sanitize(Fn.URL,t)||"":ra(t,"URL")?So(t):Pd(Ri(t))}function Vx(t){let i=q8();if(i)return xC(i.sanitize(Fn.RESOURCE_URL,t)||"");if(ra(t,"ResourceURL"))return xC(So(t));throw new pe(904,!1)}function uU(t,i){return i==="src"&&(t==="embed"||t==="frame"||t==="iframe"||t==="media"||t==="script")||i==="href"&&(t==="base"||t==="link")?Vx:_1}function W8(t,i,e){return uU(i,e)(t)}function q8(){let t=ze();return t&&t[Kr].sanitizer}function mU(t){return t.ownerDocument.defaultView}function pU(t){return t.ownerDocument}function Bx(t){return t instanceof Function?t():t}function fU(t,i,e){let n=t.length;for(;;){let o=t.indexOf(i,e);if(o===-1)return o;if(o===0||t.charCodeAt(o-1)<=32){let r=i.length;if(o+r===n||t.charCodeAt(o+r)<=32)return o}e=o+1}}var jx="ng-template";function hU(t,i,e,n){let o=0;if(n){for(;o-1){let r;for(;++or?v="":v=o[f+1].toLowerCase(),n&2&&m!==v){if(yr(n))return!1;a=!0}}}}return yr(n)||a}function yr(t){return(t&1)===0}function bU(t,i,e,n){if(i===null)return-1;let o=0;if(n||!e){let r=!1;for(;o-1)for(e++;e0?'="'+s+'"':"")+"]"}else n&8?o+="."+a:n&4&&(o+=" "+a);else o!==""&&!yr(a)&&(i+=EC(r,o),o=""),n=a,r=r||!yr(n);e++}return o!==""&&(i+=EC(r,o)),i}function wU(t){return t.map(MU).join(",")}function DU(t){let i=[],e=[],n=1,o=2;for(;nnull),a=n;if(i&&typeof i=="object"){let c=i;o=c.next?.bind(c),r=c.error?.bind(c),a=c.complete?.bind(c)}this.__isAsync&&(r=this.wrapInTimeout(r),o&&(o=this.wrapInTimeout(o)),a&&(a=this.wrapInTimeout(a)));let s=super.subscribe({next:o,error:r,complete:a});return i instanceof Se&&i.add(s),s}wrapInTimeout(i){return e=>{let n=this.pendingTasks?.add();setTimeout(()=>{try{i(e)}finally{n!==void 0&&this.pendingTasks?.remove(n)}})}}},j=m8;function qx(t){let i,e;function n(){t=zc;try{e!==void 0&&typeof cancelAnimationFrame=="function"&&cancelAnimationFrame(e),i!==void 0&&clearTimeout(i)}catch{}}return i=setTimeout(()=>{t(),n()}),typeof requestAnimationFrame=="function"&&(e=requestAnimationFrame(()=>{t(),n()})),()=>n()}function OC(t){return queueMicrotask(()=>t()),()=>{t=zc}}var J8="isAngularZone",w4=J8+"_ID",OU=0,se=class t{hasPendingMacrotasks=!1;hasPendingMicrotasks=!1;isStable=!0;onUnstable=new j(!1);onMicrotaskEmpty=new j(!1);onStable=new j(!1);onError=new j(!1);constructor(i){let{enableLongStackTrace:e=!1,shouldCoalesceEventChangeDetection:n=!1,shouldCoalesceRunChangeDetection:o=!1,scheduleInRootZone:r=Wx}=i;if(typeof Zone>"u")throw new pe(908,!1);Zone.assertZonePatched();let a=this;a._nesting=0,a._outer=a._inner=Zone.current,Zone.TaskTrackingZoneSpec&&(a._inner=a._inner.fork(new Zone.TaskTrackingZoneSpec)),e&&Zone.longStackTraceZoneSpec&&(a._inner=a._inner.fork(Zone.longStackTraceZoneSpec)),a.shouldCoalesceEventChangeDetection=!o&&n,a.shouldCoalesceRunChangeDetection=o,a.callbackScheduled=!1,a.scheduleInRootZone=r,LU(a)}static isInAngularZone(){return typeof Zone<"u"&&Zone.current.get(J8)===!0}static assertInAngularZone(){if(!t.isInAngularZone())throw new pe(909,!1)}static assertNotInAngularZone(){if(t.isInAngularZone())throw new pe(909,!1)}run(i,e,n){return this._inner.run(i,e,n)}runTask(i,e,n,o){let r=this._inner,a=r.scheduleEventTask("NgZoneEvent: "+o,i,TU,zc,zc);try{return r.runTask(a,e,n)}finally{r.cancelTask(a)}}runGuarded(i,e,n){return this._inner.runGuarded(i,e,n)}runOutsideAngular(i){return this._outer.run(i)}},TU={};function e5(t){if(t._nesting==0&&!t.hasPendingMicrotasks&&!t.isStable)try{t._nesting++,t.onMicrotaskEmpty.emit(null)}finally{if(t._nesting--,!t.hasPendingMicrotasks)try{t.runOutsideAngular(()=>t.onStable.emit(null))}finally{t.isStable=!0}}}function PU(t){if(t.isCheckStableRunning||t.callbackScheduled)return;t.callbackScheduled=!0;function i(){qx(()=>{t.callbackScheduled=!1,p8(t),t.isCheckStableRunning=!0,e5(t),t.isCheckStableRunning=!1})}t.scheduleInRootZone?Zone.root.run(()=>{i()}):t._outer.run(()=>{i()}),p8(t)}function LU(t){let i=()=>{PU(t)},e=OU++;t._inner=t._inner.fork({name:"angular",properties:{[J8]:!0,[w4]:e,[w4+e]:!0},onInvokeTask:(n,o,r,a,s,c)=>{if(AU(c))return n.invokeTask(r,a,s,c);try{return TC(t),n.invokeTask(r,a,s,c)}finally{(t.shouldCoalesceEventChangeDetection&&a.type==="eventTask"||t.shouldCoalesceRunChangeDetection)&&i(),PC(t)}},onInvoke:(n,o,r,a,s,c,m)=>{try{return TC(t),n.invoke(r,a,s,c,m)}finally{t.shouldCoalesceRunChangeDetection&&!t.callbackScheduled&&!zU(c)&&i(),PC(t)}},onHasTask:(n,o,r,a)=>{n.hasTask(r,a),o===r&&(a.change=="microTask"?(t._hasPendingMicrotasks=a.microTask,p8(t),e5(t)):a.change=="macroTask"&&(t.hasPendingMacrotasks=a.macroTask))},onHandleError:(n,o,r,a)=>(n.handleError(r,a),t.runOutsideAngular(()=>t.onError.emit(a)),!1)})}function p8(t){t._hasPendingMicrotasks||(t.shouldCoalesceEventChangeDetection||t.shouldCoalesceRunChangeDetection)&&t.callbackScheduled===!0?t.hasPendingMicrotasks=!0:t.hasPendingMicrotasks=!1}function TC(t){t._nesting++,t.isStable&&(t.isStable=!1,t.onUnstable.emit(null))}function PC(t){t._nesting--,e5(t)}var xd=class{hasPendingMicrotasks=!1;hasPendingMacrotasks=!1;isStable=!0;onUnstable=new j;onMicrotaskEmpty=new j;onStable=new j;onError=new j;run(i,e,n){return i.apply(e,n)}runGuarded(i,e,n){return i.apply(e,n)}runOutsideAngular(i){return i()}runTask(i,e,n,o){return i.apply(e,n)}};function AU(t){return Yx(t,"__ignore_ng_zone__")}function zU(t){return Yx(t,"__scheduler_tick__")}function Yx(t,i){return!Array.isArray(t)||t.length!==1?!1:t[0]?.data?.[i]===!0}function Qx(t="zone.js",i){return t==="noop"?new xd:t==="zone.js"?new se(i):t}var U4=(()=>{class t{impl=null;execute(){this.impl?.execute()}static \u0275prov=R({token:t,providedIn:"root",factory:()=>new t})}return t})(),t5=[0,1,2,3],n5=(()=>{class t{ngZone=d(se);scheduler=d(Uo);errorHandler=d(_i,{optional:!0});sequences=new Set;deferredRegistrations=new Set;executing=!1;constructor(){d(Ss,{optional:!0})}execute(){let e=this.sequences.size>0;e&&rn(16),this.executing=!0;for(let n of t5)for(let o of this.sequences)if(!(o.erroredOrDestroyed||!o.hooks[n]))try{o.pipelinedValue=this.ngZone.runOutsideAngular(()=>this.maybeTrace(()=>{let r=o.hooks[n];return r(o.pipelinedValue)},o.snapshot))}catch(r){o.erroredOrDestroyed=!0,this.errorHandler?.handleError(r)}this.executing=!1;for(let n of this.sequences)n.afterRun(),n.once&&(this.sequences.delete(n),n.destroy());for(let n of this.deferredRegistrations)this.sequences.add(n);this.deferredRegistrations.size>0&&this.scheduler.notify(7),this.deferredRegistrations.clear(),e&&rn(17)}register(e){let{view:n}=e;n!==void 0?((n[Oc]??=[]).push(e),Cs(n),n[it]|=8192):this.executing?this.deferredRegistrations.add(e):this.addSequence(e)}addSequence(e){this.sequences.add(e),this.scheduler.notify(7)}unregister(e){this.executing&&this.sequences.has(e)?(e.erroredOrDestroyed=!0,e.pipelinedValue=void 0,e.once=!0):(this.sequences.delete(e),this.deferredRegistrations.delete(e))}maybeTrace(e,n){return n?n.run(H4.AFTER_NEXT_RENDER,e):e()}static \u0275prov=R({token:t,providedIn:"root",factory:()=>new t})}return t})(),Md=class{impl;hooks;view;once;snapshot;erroredOrDestroyed=!1;pipelinedValue=void 0;unregisterOnDestroy;constructor(i,e,n,o,r,a=null){this.impl=i,this.hooks=e,this.view=n,this.once=o,this.snapshot=a,this.unregisterOnDestroy=r?.onDestroy(()=>this.destroy())}afterRun(){this.erroredOrDestroyed=!1,this.pipelinedValue=void 0,this.snapshot?.dispose(),this.snapshot=null}destroy(){this.impl.unregister(this),this.unregisterOnDestroy?.();let i=this.view?.[Oc];i&&(this.view[Oc]=i.filter(e=>e!==this))}};function Ct(t,i){let e=i?.injector??d(be);return aa("NgAfterNextRender"),NU(t,e,i,!0)}function RU(t){return t instanceof Function?[void 0,void 0,t,void 0]:[t.earlyRead,t.write,t.mixedReadWrite,t.read]}function NU(t,i,e,n){let o=i.get(U4);o.impl??=i.get(n5);let r=i.get(Ss,null,{optional:!0}),a=e?.manualCleanup!==!0?i.get(Fi):null,s=i.get(Ac,null,{optional:!0}),c=new Md(o.impl,RU(t),s?.view,n,a,r?.snapshot(null));return o.impl.register(c),c}var Kx=new L("",{providedIn:"root",factory:()=>({queue:new Set,isScheduled:!1,scheduler:null})});function Xx(t,i,e){let n=t.get(Kx);if(Array.isArray(i))for(let o of i)n.queue.add(o),e?.detachedLeaveAnimationFns?.push(o);else n.queue.add(i),e?.detachedLeaveAnimationFns?.push(i);n.scheduler&&n.scheduler(t)}function FU(t,i){let e=t.get(Kx);if(i.detachedLeaveAnimationFns){for(let n of i.detachedLeaveAnimationFns)e.queue.delete(n);i.detachedLeaveAnimationFns=void 0}}function VU(t,i){for(let[e,n]of i)Xx(t,n.animateFns)}function LC(t,i,e,n){let o=t?.[Tc]?.enter;i!==null&&o&&o.has(e.index)&&VU(n,o)}function s1(t,i,e,n,o,r,a,s){if(o!=null){let c,m=!1;br(o)?c=o:Zr(o)&&(m=!0,o=o[_r]);let f=Wo(o);t===0&&n!==null?(LC(s,n,r,e),a==null?Rx(i,n,f):M4(i,n,f,a||null,!0)):t===1&&n!==null?(LC(s,n,r,e),M4(i,n,f,a||null,!0)):t===2?AC(s,r,e,v=>{Nx(i,f,m,v)}):t===3&&AC(s,r,e,()=>{i.destroyNode(f)}),c!=null&&KU(i,t,e,c,r,n,a)}}function BU(t,i){Zx(t,i),i[_r]=null,i[Xi]=null}function jU(t,i,e,n,o,r){n[_r]=o,n[Xi]=i,G4(t,n,e,1,o,r)}function Zx(t,i){i[Kr].changeDetectionScheduler?.notify(9),G4(t,i,i[Kt],2,null,null)}function HU(t){let i=t[Zl];if(!i)return Ug(t[Ge],t);for(;i;){let e=null;if(Zr(i))e=i[Zl];else{let n=i[Nn];n&&(e=n)}if(!e){for(;i&&!i[Go]&&i!==t;)Zr(i)&&Ug(i[Ge],i),i=i[ci];i===null&&(i=t),Zr(i)&&Ug(i[Ge],i),e=i&&i[Go]}i=e}}function i5(t,i){let e=t[Pc],n=e.indexOf(i);e.splice(n,1)}function $4(t,i){if(Lc(i))return;let e=i[Kt];e.destroyNode&&G4(t,i,e,3,null,null),HU(i)}function Ug(t,i){if(Lc(i))return;let e=Je(null);try{i[it]&=-129,i[it]|=256,i[wo]&&ms(i[wo]),GU(t,i),$U(t,i),i[Ge].type===1&&i[Kt].destroy();let n=i[vs];if(n!==null&&br(i[ci])){n!==i[ci]&&i5(n,i);let o=i[Xr];o!==null&&o.detachView(t)}e8(i)}finally{Je(e)}}function AC(t,i,e,n){let o=t?.[Tc];if(o==null||o.leave==null||!o.leave.has(i.index))return n(!1);t&&Fc.add(t),Xx(e,()=>{if(o.leave&&o.leave.has(i.index)){let a=o.leave.get(i.index),s=[];if(a){for(let c=0;c{t[Tc].running=void 0,Fc.delete(t),i(!0)});return}i(!1)}function $U(t,i){let e=t.cleanup,n=i[Xl];if(e!==null)for(let a=0;a=0?n[s]():n[-s].unsubscribe(),a+=2}else{let s=n[e[a+1]];e[a].call(s)}n!==null&&(i[Xl]=null);let o=i[Pa];if(o!==null){i[Pa]=null;for(let a=0;ann&&Gx(t,i,nn,!1),rn(a?2:0,o,e),e(n,o)}finally{xs(r),rn(a?3:1,o,e)}}function W4(t,i,e){n$(t,i,e),(e.flags&64)===64&&i$(t,i,e)}function Ad(t,i,e=qo){let n=i.localNames;if(n!==null){let o=i.index+1;for(let r=0;rnull;function t$(t){return t==="class"?"className":t==="for"?"htmlFor":t==="formaction"?"formAction":t==="innerHtml"?"innerHTML":t==="readonly"?"readOnly":t==="tabindex"?"tabIndex":t}function oM(t,i,e,n,o,r){let a=i[Ge];if(q4(t,a,i,e,n)){Na(t)&&aM(i,t.index);return}t.type&3&&(e=t$(e)),rM(t,i,e,n,o,r)}function rM(t,i,e,n,o,r){if(t.type&3){let a=qo(t,i);n=r!=null?r(n,t.value||"",e):n,o.setProperty(a,e,n)}else t.type&12}function aM(t,i){let e=Yo(i,t);e[it]&16||(e[it]|=64)}function n$(t,i,e){let n=e.directiveStart,o=e.directiveEnd;Na(e)&&EU(i,e,t.data[n+e.componentOffset]),t.firstCreatePass||x4(e,i);let r=e.initialInputs;for(let a=n;a{Cs(t.lView)},consumerOnSignalRead(){this.lView[wo]=this}});function h$(t){let i=t[wo]??Object.create(g$);return i.lView=t,i}var g$=Ne(q({},mc),{consumerIsAlwaysLive:!0,kind:"template",consumerMarkedDirty:t=>{let i=_s(t.lView);for(;i&&!uM(i[Ge]);)i=_s(i);i&&Mg(i)},consumerOnSignalRead(){this.lView[wo]=this}});function uM(t){return t.type!==2}function mM(t){if(t[Ra]===null)return;let i=!0;for(;i;){let e=!1;for(let n of t[Ra])n.dirty&&(e=!0,n.zone===null||Zone.current===n.zone?n.run():n.zone.run(()=>n.run()));i=e&&!!(t[it]&8192)}}var _$=100;function pM(t,i=0){let n=t[Kr].rendererFactory,o=!1;o||n.begin?.();try{b$(t,i)}finally{o||n.end?.()}}function b$(t,i){let e=Ag();try{i1(!0),h8(t,i);let n=0;for(;pd(t);){if(n===_$)throw new pe(103,!1);n++,h8(t,1)}}finally{i1(e)}}function v$(t,i,e,n){if(Lc(i))return;let o=i[it],r=!1,a=!1;n4(i);let s=!0,c=null,m=null;r||(uM(t)?(m=u$(i),c=us(m)):a3()===null?(s=!1,m=h$(i),c=us(m)):i[wo]&&(ms(i[wo]),i[wo]=null));try{xg(i),iC(t.bindingStartIndex),e!==null&&iM(t,i,e,2,n);let f=(o&3)===3;if(!r)if(f){let w=t.preOrderCheckHooks;w!==null&&p4(i,w,null)}else{let w=t.preOrderHooks;w!==null&&f4(i,w,0,null),jg(i,0)}if(a||y$(i),mM(i),fM(i,0),t.contentQueries!==null&&kx(t,i),!r)if(f){let w=t.contentCheckHooks;w!==null&&p4(i,w)}else{let w=t.contentHooks;w!==null&&f4(i,w,1),jg(i,1)}x$(t,i);let v=t.components;v!==null&&gM(i,v,0);let x=t.viewQuery;if(x!==null&&n8(2,x,n),!r)if(f){let w=t.viewCheckHooks;w!==null&&p4(i,w)}else{let w=t.viewHooks;w!==null&&f4(i,w,2),jg(i,2)}if(t.firstUpdatePass===!0&&(t.firstUpdatePass=!1),i[Q3]){for(let w of i[Q3])w();i[Q3]=null}r||(lM(i),i[it]&=-73)}catch(f){throw r||Cs(i),f}finally{m!==null&&(pc(m,c),s&&p$(m)),i4()}}function fM(t,i){for(let e=vx(t);e!==null;e=yx(e))for(let n=Nn;n0&&(t[e-1][Go]=n[Go]);let r=cd(t,Nn+i);BU(n[Ge],n);let a=r[Xr];a!==null&&a.detachView(r[Ge]),n[ci]=null,n[Go]=null,n[it]&=-129}return n}function M$(t,i,e,n){let o=Nn+n,r=e.length;n>0&&(e[o-1][Go]=i),n-1&&(Dd(i,n),cd(e,n))}this._attachedToViewContainer=!1}$4(this._lView[Ge],this._lView)}onDestroy(i){wg(this._lView,i)}markForCheck(){d5(this._cdRefInjectingView||this._lView,4)}detach(){this._lView[it]&=-129}reattach(){X3(this._lView),this._lView[it]|=128}detectChanges(){this._lView[it]|=1024,pM(this._lView)}checkNoChanges(){}attachToViewContainerRef(){if(this._appRef)throw new pe(902,!1);this._attachedToViewContainer=!0}detachFromAppRef(){this._appRef=null;let i=e1(this._lView),e=this._lView[vs];e!==null&&!i&&i5(e,this._lView),Zx(this._lView[Ge],this._lView)}attachToAppRef(i){if(this._attachedToViewContainer)throw new pe(902,!1);this._appRef=i;let e=e1(this._lView),n=this._lView[vs];n!==null&&!e&&yM(n,this._lView),X3(this._lView)}};var tt=(()=>{class t{_declarationLView;_declarationTContainer;elementRef;static __NG_ELEMENT_ID__=w$;constructor(e,n,o){this._declarationLView=e,this._declarationTContainer=n,this.elementRef=o}get ssrId(){return this._declarationTContainer.tView?.ssrId||null}createEmbeddedView(e,n){return this.createEmbeddedViewImpl(e,n)}createEmbeddedViewImpl(e,n,o){let r=zd(this._declarationLView,this._declarationTContainer,e,{embeddedViewInjector:n,dehydratedView:o});return new Ms(r)}}return t})();function w$(){return Y4(Kn(),ze())}function Y4(t,i){return t.type&4?new tt(i,t,h1(t,i)):null}function b1(t,i,e,n,o){let r=t.data[i];if(r===null)r=D$(t,i,e,n,o),oC()&&(r.flags|=32);else if(r.type&64){r.type=e,r.value=n,r.attrs=o;let a=tC();r.injectorIndex=a===null?-1:a.injectorIndex}return n1(r,!0),r}function D$(t,i,e,n,o){let r=Tg(),a=Pg(),s=a?r:r&&r.parent,c=t.data[i]=k$(t,s,e,i,n,o);return S$(t,c,r,a),c}function S$(t,i,e,n){t.firstChild===null&&(t.firstChild=i),e!==null&&(n?e.child==null&&i.parent!==null&&(e.child=i):e.next===null&&(e.next=i,i.prev=e))}function k$(t,i,e,n,o,r){let a=i?i.injectorIndex:-1,s=0;return Eg()&&(s|=128),{type:e,index:n,insertBeforeIndex:null,injectorIndex:a,directiveStart:-1,directiveEnd:-1,directiveStylingLast:-1,componentOffset:-1,propertyBindings:null,flags:s,providerIndexes:0,value:o,attrs:r,mergedAttrs:null,localNames:null,initialInputs:null,inputs:null,hostDirectiveInputs:null,outputs:null,hostDirectiveOutputs:null,directiveToIndex:null,tView:null,next:null,prev:null,projectionNext:null,child:null,parent:i,projection:null,styles:null,stylesWithoutHost:null,residualStyles:void 0,classes:null,classesWithoutHost:null,residualClasses:void 0,classBindings:0,styleBindings:0}}var q6e=new RegExp(`^(\\d+)*(${zH}|${AH})*(.*)`);function E$(t){let i=t[_g]??[],n=t[ci][Kt],o=[];for(let r of i)r.data[Mx]!==void 0?o.push(r):I$(r,n);t[_g]=o}function I$(t,i){let e=0,n=t.firstChild;if(n){let o=t.data[xx];for(;enull,T$=()=>null;function D4(t,i){return O$(t,i)}function CM(t,i,e){return T$(t,i,e)}var xM=class{},Q4=class{},g8=class{resolveComponentFactory(i){throw new pe(917,!1)}},Nd=class{static NULL=new g8},On=class{},Ke=(()=>{class t{destroyNode=null;static __NG_ELEMENT_ID__=()=>P$()}return t})();function P$(){let t=ze(),i=Kn(),e=Yo(i.index,t);return(Zr(e)?e:t)[Kt]}var MM=(()=>{class t{static \u0275prov=R({token:t,providedIn:"root",factory:()=>null})}return t})();var g4={},_8=class{injector;parentInjector;constructor(i,e){this.injector=i,this.parentInjector=e}get(i,e,n){let o=this.injector.get(i,g4,n);return o!==g4||e===g4?o:this.parentInjector.get(i,e,n)}};function S4(t,i,e){let n=e?t.styles:null,o=e?t.classes:null,r=0;if(i!==null)for(let a=0;a0&&(e.directiveToIndex=new Map);for(let x=0;x0;){let e=t[--i];if(typeof e=="number"&&e<0)return e}return 0}function B$(t,i,e){if(e){if(i.exportAs)for(let n=0;nn(Wo(K[t.index])):t.index;OM(O,i,e,r,s,w,!1)}}return m}function $$(t){return t.startsWith("animation")||t.startsWith("transition")}function G$(t,i,e,n){let o=t.cleanup;if(o!=null)for(let r=0;rc?s[c]:null}typeof a=="string"&&(r+=2)}return null}function OM(t,i,e,n,o,r,a){let s=i.firstCreatePass?Sg(i):null,c=Dg(e),m=c.length;c.push(o,r),s&&s.push(n,t,m,(m+1)*(a?-1:1))}function BC(t,i,e,n,o,r){let a=i[e],s=i[Ge],m=s.data[e].outputs[n],v=a[m].subscribe(r);OM(t.index,s,i,o,r,v,!0)}var b8=Symbol("BINDING");var k4=class extends Nd{ngModule;constructor(i){super(),this.ngModule=i}resolveComponentFactory(i){let e=Qr(i);return new ws(e,this.ngModule)}};function W$(t){return Object.keys(t).map(i=>{let[e,n,o]=t[i],r={propName:e,templateName:i,isSignal:(n&j4.SignalBased)!==0};return o&&(r.transform=o),r})}function q$(t){return Object.keys(t).map(i=>({propName:t[i],templateName:i}))}function Y$(t,i,e){let n=i instanceof Qt?i:i?.injector;return n&&t.getStandaloneInjector!==null&&(n=t.getStandaloneInjector(n)||n),n?new _8(e,n):e}function Q$(t){let i=t.get(On,null);if(i===null)throw new pe(407,!1);let e=t.get(MM,null),n=t.get(Uo,null);return{rendererFactory:i,sanitizer:e,changeDetectionScheduler:n,ngReflect:!1}}function K$(t,i){let e=TM(t);return zx(i,e,e==="svg"?vg:e==="math"?qy:null)}function TM(t){return(t.selectors[0][0]||"div").toLowerCase()}var ws=class extends Q4{componentDef;ngModule;selector;componentType;ngContentSelectors;isBoundToModule;cachedInputs=null;cachedOutputs=null;get inputs(){return this.cachedInputs??=W$(this.componentDef.inputs),this.cachedInputs}get outputs(){return this.cachedOutputs??=q$(this.componentDef.outputs),this.cachedOutputs}constructor(i,e){super(),this.componentDef=i,this.ngModule=e,this.componentType=i.type,this.selector=wU(i.selectors),this.ngContentSelectors=i.ngContentSelectors??[],this.isBoundToModule=!!e}create(i,e,n,o,r,a){rn(22);let s=Je(null);try{let c=this.componentDef,m=X$(n,c,a,r),f=Y$(c,o||this.ngModule,i),v=Q$(f),x=v.rendererFactory.createRenderer(null,c),w=n?ZU(x,n,c.encapsulation,f):K$(c,x),O=a?.some(jC)||r?.some(Z=>typeof Z!="function"&&Z.bindings.some(jC)),K=K8(null,m,null,512|Ux(c),null,null,v,x,f,null,Sx(w,f,!0));K[nn]=w,n4(K);let Y=null;try{let Z=u5(nn,K,2,"#host",()=>m.directiveRegistry,!0,0);Fx(x,w,Z),d1(w,K),W4(m,K,Z),B8(m,Z,K),m5(m,Z),e!==void 0&&J$(Z,this.ngContentSelectors,e),Y=Yo(Z.index,K),K[Rn]=Y[Rn],l5(m,K,null)}catch(Z){throw Y!==null&&e8(Y),e8(K),Z}finally{rn(23),i4()}return new E4(this.componentType,K,!!O)}finally{Je(s)}}};function X$(t,i,e,n){let o=t?["ng-version","20.3.15"]:DU(i.selectors[0]),r=null,a=null,s=0;if(e)for(let f of e)s+=f[b8].requiredVars,f.create&&(f.targetIdx=0,(r??=[]).push(f)),f.update&&(f.targetIdx=0,(a??=[]).push(f));if(n)for(let f=0;f{if(e&1&&t)for(let n of t)n.create();if(e&2&&i)for(let n of i)n.update()}}function jC(t){let i=t[b8].kind;return i==="input"||i==="twoWay"}var E4=class extends xM{_rootLView;_hasInputBindings;instance;hostView;changeDetectorRef;componentType;location;previousInputValues=null;_tNode;constructor(i,e,n){super(),this._rootLView=e,this._hasInputBindings=n,this._tNode=md(e[Ge],nn),this.location=h1(this._tNode,e),this.instance=Yo(this._tNode.index,e)[Rn],this.hostView=this.changeDetectorRef=new Ms(e,void 0),this.componentType=i}setInput(i,e){this._hasInputBindings;let n=this._tNode;if(this.previousInputValues??=new Map,this.previousInputValues.has(i)&&Object.is(this.previousInputValues.get(i),e))return;let o=this._rootLView,r=q4(n,o[Ge],o,i,e);this.previousInputValues.set(i,e);let a=Yo(n.index,o);d5(a,1)}get injector(){return new Rc(this._tNode,this._rootLView)}destroy(){this.hostView.destroy()}onDestroy(i){this.hostView.onDestroy(i)}};function J$(t,i,e){let n=t.projection=[];for(let o=0;o{class t{static __NG_ELEMENT_ID__=eG}return t})();function eG(){let t=Kn();return LM(t,ze())}var tG=dt,PM=class extends tG{_lContainer;_hostTNode;_hostLView;constructor(i,e,n){super(),this._lContainer=i,this._hostTNode=e,this._hostLView=n}get element(){return h1(this._hostTNode,this._hostLView)}get injector(){return new Rc(this._hostTNode,this._hostLView)}get parentInjector(){let i=R8(this._hostTNode,this._hostLView);if(sx(i)){let e=y4(i,this._hostLView),n=v4(i),o=e[Ge].data[n+8];return new Rc(o,e)}else return new Rc(null,this._hostLView)}clear(){for(;this.length>0;)this.remove(this.length-1)}get(i){let e=HC(this._lContainer);return e!==null&&e[i]||null}get length(){return this._lContainer.length-Nn}createEmbeddedView(i,e,n){let o,r;typeof n=="number"?o=n:n!=null&&(o=n.index,r=n.injector);let a=D4(this._lContainer,i.ssrId),s=i.createEmbeddedViewImpl(e||{},r,a);return this.insertImpl(s,o,u1(this._hostTNode,a)),s}createComponent(i,e,n,o,r,a,s){let c=i&&!lH(i),m;if(c)m=e;else{let Y=e||{};m=Y.index,n=Y.injector,o=Y.projectableNodes,r=Y.environmentInjector||Y.ngModuleRef,a=Y.directives,s=Y.bindings}let f=c?i:new ws(Qr(i)),v=n||this.parentInjector;if(!r&&f.ngModule==null){let Z=(c?v:this.parentInjector).get(Qt,null);Z&&(r=Z)}let x=Qr(f.componentType??{}),w=D4(this._lContainer,x?.id??null),O=w?.firstChild??null,K=f.create(v,o,O,r,a,s);return this.insertImpl(K.hostView,m,u1(this._hostTNode,w)),K}insert(i,e){return this.insertImpl(i,e,!0)}insertImpl(i,e,n){let o=i._lView;if(Qy(o)){let s=this.indexOf(i);if(s!==-1)this.detach(s);else{let c=o[ci],m=new PM(c,c[Xi],c[ci]);m.detach(m.indexOf(i))}}let r=this._adjustIndex(e),a=this._lContainer;return Rd(a,o,r,n),i.attachToViewContainerRef(),sg($g(a),r,i),i}move(i,e){return this.insert(i,e)}indexOf(i){let e=HC(this._lContainer);return e!==null?e.indexOf(i):-1}remove(i){let e=this._adjustIndex(i,-1),n=Dd(this._lContainer,e);n&&(cd($g(this._lContainer),e),$4(n[Ge],n))}detach(i){let e=this._adjustIndex(i,-1),n=Dd(this._lContainer,e);return n&&cd($g(this._lContainer),e)!=null?new Ms(n):null}_adjustIndex(i,e=0){return i??this.length+e}};function HC(t){return t[ud]}function $g(t){return t[ud]||(t[ud]=[])}function LM(t,i){let e,n=i[t.index];return br(n)?e=n:(e=_M(n,i,null,t),i[t.index]=e,X8(i,e)),iG(e,i,t,n),new PM(e,t,i)}function nG(t,i){let e=t[Kt],n=e.createComment(""),o=qo(i,t),r=e.parentNode(o);return M4(e,r,n,e.nextSibling(o),!1),n}var iG=aG,oG=()=>!1;function rG(t,i,e){return oG(t,i,e)}function aG(t,i,e,n){if(t[ys])return;let o;e.type&8?o=Wo(n):o=nG(i,e),t[ys]=o}var v8=class t{queryList;matches=null;constructor(i){this.queryList=i}clone(){return new t(this.queryList)}setDirty(){this.queryList.setDirty()}},y8=class t{queries;constructor(i=[]){this.queries=i}createEmbeddedView(i){let e=i.queries;if(e!==null){let n=i.contentQueries!==null?i.contentQueries[0]:e.length,o=[];for(let r=0;r0)n.push(a[s/2]);else{let m=r[s+1],f=i[-c];for(let v=Nn;vi.trim())}function FM(t,i,e){t.queries===null&&(t.queries=new C8),t.queries.track(new x8(i,e))}function mG(t,i){let e=t.contentQueries||(t.contentQueries=[]),n=e.length?e[e.length-1]:-1;i!==n&&e.push(t.queries.length-1,i)}function h5(t,i){return t.queries.getByIndex(i)}function VM(t,i){let e=t[Ge],n=h5(e,i);return n.crossesNgTemplate?M8(e,t,i,[]):AM(e,t,n,i)}function BM(t,i,e){let n,o=K2(()=>{n._dirtyCounter();let r=pG(n,t);if(i&&r===void 0)throw new pe(-951,!1);return r});return n=o[Yn],n._dirtyCounter=we(0),n._flatValue=void 0,o}function g5(t){return BM(!0,!1,t)}function _5(t){return BM(!0,!0,t)}function jM(t,i){let e=t[Yn];e._lView=ze(),e._queryIndex=i,e._queryList=f5(e._lView,i),e._queryList.onDirty(()=>e._dirtyCounter.update(n=>n+1))}function pG(t,i){let e=t._lView,n=t._queryIndex;if(e===void 0||n===void 0||e[it]&4)return i?void 0:zi;let o=f5(e,n),r=VM(e,n);return o.reset(r,gx),i?o.first:o._changesDetected||t._flatValue===void 0?t._flatValue=o.toArray():t._flatValue}function HM(t){let i=[],e=new Map;function n(o){let r=e.get(o);if(!r){let a=t(o);e.set(o,r=a.then(s=>hG(o,s)))}return r}return O4.forEach((o,r)=>{let a=[];o.templateUrl&&a.push(n(o.templateUrl).then(m=>{o.template=m}));let s=typeof o.styles=="string"?[o.styles]:o.styles||[];if(o.styles=s,o.styleUrl&&o.styleUrls?.length)throw new Error("@Component cannot define both `styleUrl` and `styleUrls`. Use `styleUrl` if the component has one stylesheet, or `styleUrls` if it has multiple");if(o.styleUrls?.length){let m=o.styles.length,f=o.styleUrls;o.styleUrls.forEach((v,x)=>{s.push(""),a.push(n(v).then(w=>{s[m+x]=w,f.splice(f.indexOf(v),1),f.length==0&&(o.styleUrls=void 0)}))})}else o.styleUrl&&a.push(n(o.styleUrl).then(m=>{s.push(m),o.styleUrl=void 0}));let c=Promise.all(a).then(()=>gG(r));i.push(c)}),UM(),Promise.all(i).then(()=>{})}var O4=new Map,fG=new Set;function UM(){let t=O4;return O4=new Map,t}function $M(){return O4.size===0}function hG(t,i){return typeof i=="string"?i:i.status!==void 0&&i.status!==200?Promise.reject(new pe(918,!1)):i.text()}function gG(t){fG.delete(t)}var ia=class{},X4=class{};var kd=class extends ia{ngModuleType;_parent;_bootstrapComponents=[];_r3Injector;instance;destroyCbs=[];componentFactoryResolver=new k4(this);constructor(i,e,n,o=!0){super(),this.ngModuleType=i,this._parent=e;let r=dg(i);this._bootstrapComponents=Bx(r.bootstrap),this._r3Injector=Ng(i,e,[{provide:ia,useValue:this},{provide:Nd,useValue:this.componentFactoryResolver},...n],La(i),new Set(["environment"])),o&&this.resolveInjectorInitializers()}resolveInjectorInitializers(){this._r3Injector.resolveInjectorInitializers(),this.instance=this._r3Injector.get(this.ngModuleType)}get injector(){return this._r3Injector}destroy(){let i=this._r3Injector;!i.destroyed&&i.destroy(),this.destroyCbs.forEach(e=>e()),this.destroyCbs=null}onDestroy(i){this.destroyCbs.push(i)}},Ed=class extends X4{moduleType;constructor(i){super(),this.moduleType=i}create(i){return new kd(this.moduleType,i,[])}};function GM(t,i,e){return new kd(t,i,e,!1)}var T4=class extends ia{injector;componentFactoryResolver=new k4(this);instance=null;constructor(i){super();let e=new Dc([...i.providers,{provide:ia,useValue:this},{provide:Nd,useValue:this.componentFactoryResolver}],i.parent||Kl(),i.debugName,new Set(["environment"]));this.injector=e,i.runEnvironmentInitializers&&e.resolveInjectorInitializers()}destroy(){this.injector.destroy()}onDestroy(i){this.injector.onDestroy(i)}};function v1(t,i,e=null){return new T4({providers:t,parent:i,debugName:e,runEnvironmentInitializers:!0}).injector}var _G=(()=>{class t{_injector;cachedInjectors=new Map;constructor(e){this._injector=e}getOrCreateStandaloneInjector(e){if(!e.standalone)return null;if(!this.cachedInjectors.has(e)){let n=ug(!1,e.type),o=n.length>0?v1([n],this._injector,`Standalone[${e.type.name}]`):null;this.cachedInjectors.set(e,o)}return this.cachedInjectors.get(e)}ngOnDestroy(){try{for(let e of this.cachedInjectors.values())e!==null&&e.destroy()}finally{this.cachedInjectors.clear()}}static \u0275prov=R({token:t,providedIn:"environment",factory:()=>new t(ke(Qt))})}return t})();function P(t){return f1(()=>{let i=WM(t),e=Ne(q({},i),{decls:t.decls,vars:t.vars,template:t.template,consts:t.consts||null,ngContentSelectors:t.ngContentSelectors,onPush:t.changeDetection===N8.OnPush,directiveDefs:null,pipeDefs:null,dependencies:i.standalone&&t.dependencies||null,getStandaloneInjector:i.standalone?o=>o.get(_G).getOrCreateStandaloneInjector(e):null,getExternalStyles:null,signals:t.signals??!1,data:t.data||{},encapsulation:t.encapsulation||Va.Emulated,styles:t.styles||zi,_:null,schemas:t.schemas||null,tView:null,id:""});i.standalone&&aa("NgStandalone"),qM(e);let n=t.dependencies;return e.directiveDefs=UC(n,bG),e.pipeDefs=UC(n,jy),e.id=CG(e),e})}function bG(t){return Qr(t)||Y3(t)}function J(t){return f1(()=>({type:t.type,bootstrap:t.bootstrap||zi,declarations:t.declarations||zi,imports:t.imports||zi,exports:t.exports||zi,transitiveCompileScopes:null,schemas:t.schemas||null,id:t.id||null}))}function vG(t,i){if(t==null)return gr;let e={};for(let n in t)if(t.hasOwnProperty(n)){let o=t[n],r,a,s,c;Array.isArray(o)?(s=o[0],r=o[1],a=o[2]??r,c=o[3]||null):(r=o,a=o,s=j4.None,c=null),e[r]=[n,s,c],i[r]=a}return e}function yG(t){if(t==null)return gr;let i={};for(let e in t)t.hasOwnProperty(e)&&(i[t[e]]=e);return i}function z(t){return f1(()=>{let i=WM(t);return qM(i),i})}function wt(t){return{type:t.type,name:t.name,factory:null,pure:t.pure!==!1,standalone:t.standalone??!0,onDestroy:t.type.prototype.ngOnDestroy||null}}function WM(t){let i={};return{type:t.type,providersResolver:null,factory:null,hostBindings:t.hostBindings||null,hostVars:t.hostVars||0,hostAttrs:t.hostAttrs||null,contentQueries:t.contentQueries||null,declaredInputs:i,inputConfig:t.inputs||gr,exportAs:t.exportAs||null,standalone:t.standalone??!0,signals:t.signals===!0,selectors:t.selectors||zi,viewQuery:t.viewQuery||null,features:t.features||null,setInput:null,resolveHostDirectives:null,hostDirectives:null,inputs:vG(t.inputs,i),outputs:yG(t.outputs),debugInfo:null}}function qM(t){t.features?.forEach(i=>i(t))}function UC(t,i){return t?()=>{let e=typeof t=="function"?t():t,n=[];for(let o of e){let r=i(o);r!==null&&n.push(r)}return n}:null}function CG(t){let i=0,e=typeof t.consts=="function"?"":t.consts,n=[t.selectors,t.ngContentSelectors,t.hostVars,t.hostAttrs,e,t.vars,t.decls,t.encapsulation,t.standalone,t.signals,t.exportAs,JSON.stringify(t.inputs),JSON.stringify(t.outputs),Object.getOwnPropertyNames(t.type.prototype),!!t.contentQueries,!!t.viewQuery];for(let r of n.join("|"))i=Math.imul(31,i)+r.charCodeAt(0)<<0;return i+=2147483648,"c"+i}function xG(t){return Object.getPrototypeOf(t.prototype).constructor}function ce(t){let i=xG(t.type),e=!0,n=[t];for(;i;){let o;if(vr(t))o=i.\u0275cmp||i.\u0275dir;else{if(i.\u0275cmp)throw new pe(903,!1);o=i.\u0275dir}if(o){if(e){n.push(o);let a=t;a.inputs=Gg(t.inputs),a.declaredInputs=Gg(t.declaredInputs),a.outputs=Gg(t.outputs);let s=o.hostBindings;s&&kG(t,s);let c=o.viewQuery,m=o.contentQueries;if(c&&DG(t,c),m&&SG(t,m),MG(t,o),Py(t.outputs,o.outputs),vr(o)&&o.data.animation){let f=t.data;f.animation=(f.animation||[]).concat(o.data.animation)}}let r=o.features;if(r)for(let a=0;a=0;n--){let o=t[n];o.hostVars=i+=o.hostVars,o.hostAttrs=l1(o.hostAttrs,e=l1(e,o.hostAttrs))}}function Gg(t){return t===gr?{}:t===zi?[]:t}function DG(t,i){let e=t.viewQuery;e?t.viewQuery=(n,o)=>{i(n,o),e(n,o)}:t.viewQuery=i}function SG(t,i){let e=t.contentQueries;e?t.contentQueries=(n,o,r)=>{i(n,o,r),e(n,o,r)}:t.contentQueries=i}function kG(t,i){let e=t.hostBindings;e?t.hostBindings=(n,o)=>{i(n,o),e(n,o)}:t.hostBindings=i}function b5(t){let i=e=>{let n=Array.isArray(t);e.hostDirectives===null?(e.resolveHostDirectives=EG,e.hostDirectives=n?t.map(w8):[t]):n?e.hostDirectives.unshift(...t.map(w8)):e.hostDirectives.unshift(t)};return i.ngInherit=!0,i}function EG(t){let i=[],e=!1,n=null,o=null;for(let r=0;r{class t{log(e){console.log(e)}warn(e){console.warn(e)}static \u0275fac=function(n){return new(n||t)};static \u0275prov=R({token:t,factory:t.\u0275fac,providedIn:"platform"})}return t})();var J4=new L(""),y1=new L(""),Vd=(()=>{class t{_ngZone;registry;_isZoneStable=!0;_callbacks=[];_taskTrackingZone=null;_destroyRef;constructor(e,n,o){this._ngZone=e,this.registry=n,fg()&&(this._destroyRef=d(Fi,{optional:!0})??void 0),v5||(KM(o),o.addToWindow(n)),this._watchAngularEvents(),e.run(()=>{this._taskTrackingZone=typeof Zone>"u"?null:Zone.current.get("TaskTrackingZone")})}_watchAngularEvents(){let e=this._ngZone.onUnstable.subscribe({next:()=>{this._isZoneStable=!1}}),n=this._ngZone.runOutsideAngular(()=>this._ngZone.onStable.subscribe({next:()=>{se.assertNotInAngularZone(),queueMicrotask(()=>{this._isZoneStable=!0,this._runCallbacksIfReady()})}}));this._destroyRef?.onDestroy(()=>{e.unsubscribe(),n.unsubscribe()})}isStable(){return this._isZoneStable&&!this._ngZone.hasPendingMacrotasks}_runCallbacksIfReady(){if(this.isStable())queueMicrotask(()=>{for(;this._callbacks.length!==0;){let e=this._callbacks.pop();clearTimeout(e.timeoutId),e.doneCb()}});else{let e=this.getPendingTasks();this._callbacks=this._callbacks.filter(n=>n.updateCb&&n.updateCb(e)?(clearTimeout(n.timeoutId),!1):!0)}}getPendingTasks(){return this._taskTrackingZone?this._taskTrackingZone.macroTasks.map(e=>({source:e.source,creationLocation:e.creationLocation,data:e.data})):[]}addCallback(e,n,o){let r=-1;n&&n>0&&(r=setTimeout(()=>{this._callbacks=this._callbacks.filter(a=>a.timeoutId!==r),e()},n)),this._callbacks.push({doneCb:e,timeoutId:r,updateCb:o})}whenStable(e,n,o){if(o&&!this._taskTrackingZone)throw new Error('Task tracking zone is required when passing an update callback to whenStable(). Is "zone.js/plugins/task-tracking" loaded?');this.addCallback(e,n,o),this._runCallbacksIfReady()}registerApplication(e){this.registry.registerApplication(e,this)}unregisterApplication(e){this.registry.unregisterApplication(e)}findProviders(e,n,o){return[]}static \u0275fac=function(n){return new(n||t)(ke(se),ke(Bd),ke(y1))};static \u0275prov=R({token:t,factory:t.\u0275fac})}return t})(),Bd=(()=>{class t{_applications=new Map;registerApplication(e,n){this._applications.set(e,n)}unregisterApplication(e){this._applications.delete(e)}unregisterAllApplications(){this._applications.clear()}getTestability(e){return this._applications.get(e)||null}getAllTestabilities(){return Array.from(this._applications.values())}getAllRootElements(){return Array.from(this._applications.keys())}findTestabilityInTree(e,n=!0){return v5?.findTestabilityInTree(this,e,n)??null}static \u0275fac=function(n){return new(n||t)};static \u0275prov=R({token:t,factory:t.\u0275fac,providedIn:"platform"})}return t})();function KM(t){v5=t}var v5;function Ha(t){return!!t&&typeof t.then=="function"}function em(t){return!!t&&typeof t.subscribe=="function"}var y5=new L("");function tm(t){return bs([{provide:y5,multi:!0,useValue:t}])}var C5=(()=>{class t{resolve;reject;initialized=!1;done=!1;donePromise=new Promise((e,n)=>{this.resolve=e,this.reject=n});appInits=d(y5,{optional:!0})??[];injector=d(be);constructor(){}runInitializers(){if(this.initialized)return;let e=[];for(let o of this.appInits){let r=bi(this.injector,o);if(Ha(r))e.push(r);else if(em(r)){let a=new Promise((s,c)=>{r.subscribe({complete:s,error:c})});e.push(a)}}let n=()=>{this.done=!0,this.resolve()};Promise.all(e).then(()=>{n()}).catch(o=>{this.reject(o)}),e.length===0&&n(),this.initialized=!0}static \u0275fac=function(n){return new(n||t)};static \u0275prov=R({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})(),nm=new L("");function XM(){y6(()=>{let t="";throw new pe(600,t)})}function ZM(t){return t.isBoundToModule}var LG=10;function x5(t,i){return Array.isArray(i)?i.reduce(x5,t):q(q({},t),i)}var li=(()=>{class t{_runningTick=!1;_destroyed=!1;_destroyListeners=[];_views=[];internalErrorHandler=d(Zi);afterRenderManager=d(U4);zonelessEnabled=d(gd);rootEffectScheduler=d(_d);dirtyFlags=0;tracingSnapshot=null;allTestViews=new Set;autoDetectTestViews=new Set;includeAllTestViews=!1;afterTick=new B;get allViews(){return[...(this.includeAllTestViews?this.allTestViews:this.autoDetectTestViews).keys(),...this._views]}get destroyed(){return this._destroyed}componentTypes=[];components=[];internalPendingTask=d(ta);get isStable(){return this.internalPendingTask.hasPendingTasksObservable.pipe(me(e=>!e))}constructor(){d(Ss,{optional:!0})}whenStable(){let e;return new Promise(n=>{e=this.isStable.subscribe({next:o=>{o&&n()}})}).finally(()=>{e.unsubscribe()})}_injector=d(Qt);_rendererFactory=null;get injector(){return this._injector}bootstrap(e,n){return this.bootstrapImpl(e,n)}bootstrapImpl(e,n,o=be.NULL){return this._injector.get(se).run(()=>{rn(10);let a=e instanceof Q4;if(!this._injector.get(C5).done){let O="";throw new pe(405,O)}let c;a?c=e:c=this._injector.get(Nd).resolveComponentFactory(e),this.componentTypes.push(c.componentType);let m=ZM(c)?void 0:this._injector.get(ia),f=n||c.selector,v=c.create(o,[],f,m),x=v.location.nativeElement,w=v.injector.get(J4,null);return w?.registerApplication(x),v.onDestroy(()=>{this.detachView(v.hostView),vd(this.components,v),w?.unregisterApplication(x)}),this._loadComponent(v),rn(11,v),v})}tick(){this.zonelessEnabled||(this.dirtyFlags|=1),this._tick()}_tick(){rn(12),this.tracingSnapshot!==null?this.tracingSnapshot.run(H4.CHANGE_DETECTION,this.tickImpl):this.tickImpl()}tickImpl=()=>{if(this._runningTick)throw new pe(101,!1);let e=Je(null);try{this._runningTick=!0,this.synchronize()}finally{this._runningTick=!1,this.tracingSnapshot?.dispose(),this.tracingSnapshot=null,Je(e),this.afterTick.next(),rn(13)}};synchronize(){this._rendererFactory===null&&!this._injector.destroyed&&(this._rendererFactory=this._injector.get(On,null,{optional:!0}));let e=0;for(;this.dirtyFlags!==0&&e++pd(e))){this.dirtyFlags|=2;return}else this.dirtyFlags&=-8}attachView(e){let n=e;this._views.push(n),n.attachToAppRef(this)}detachView(e){let n=e;vd(this._views,n),n.detachFromAppRef()}_loadComponent(e){this.attachView(e.hostView);try{this.tick()}catch(o){this.internalErrorHandler(o)}this.components.push(e),this._injector.get(nm,[]).forEach(o=>o(e))}ngOnDestroy(){if(!this._destroyed)try{this._destroyListeners.forEach(e=>e()),this._views.slice().forEach(e=>e.destroy())}finally{this._destroyed=!0,this._views=[],this._destroyListeners=[]}}onDestroy(e){return this._destroyListeners.push(e),()=>vd(this._destroyListeners,e)}destroy(){if(this._destroyed)throw new pe(406,!1);let e=this._injector;e.destroy&&!e.destroyed&&e.destroy()}get viewCount(){return this._views.length}static \u0275fac=function(n){return new(n||t)};static \u0275prov=R({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();function vd(t,i){let e=t.indexOf(i);e>-1&&t.splice(e,1)}function C1(t,i){let e=ze(),n=Jr();if(Ji(e,n,i)){let o=on(),r=r1();if(q4(r,o,e,t,i))Na(r)&&aM(e,r.index);else{let s=qo(r,e);sM(e[Kt],s,null,r.value,t,i,null)}}return C1}function ne(t,i,e,n){let o=ze(),r=Jr();if(Ji(o,r,i)){let a=on(),s=r1();r$(s,o,t,i,e,n)}return ne}var ege=typeof document<"u"&&typeof document?.documentElement?.getAnimations=="function";function M5(){return ze()[Ni][Rn]}var D8=class{destroy(i){}updateValue(i,e){}swap(i,e){let n=Math.min(i,e),o=Math.max(i,e),r=this.detach(o);if(o-n>1){let a=this.detach(n);this.attach(n,r),this.attach(o,a)}else this.attach(n,r)}move(i,e){this.attach(e,this.detach(i))}};function Wg(t,i,e,n,o){return t===e&&Object.is(i,n)?1:Object.is(o(t,i),o(e,n))?-1:0}function AG(t,i,e){let n,o,r=0,a=t.length-1,s=void 0;if(Array.isArray(i)){let c=i.length-1;for(;r<=a&&r<=c;){let m=t.at(r),f=i[r],v=Wg(r,m,r,f,e);if(v!==0){v<0&&t.updateValue(r,f),r++;continue}let x=t.at(a),w=i[c],O=Wg(a,x,c,w,e);if(O!==0){O<0&&t.updateValue(a,w),a--,c--;continue}let K=e(r,m),Y=e(a,x),Z=e(r,f);if(Object.is(Z,Y)){let Oe=e(c,w);Object.is(Oe,K)?(t.swap(r,a),t.updateValue(a,w),c--,a--):t.move(a,r),t.updateValue(r,f),r++;continue}if(n??=new P4,o??=qC(t,r,a,e),S8(t,n,r,Z))t.updateValue(r,f),r++,a++;else if(o.has(Z))n.set(K,t.detach(r)),a--;else{let Oe=t.create(r,i[r]);t.attach(r,Oe),r++,a++}}for(;r<=c;)WC(t,n,e,r,i[r]),r++}else if(i!=null){let c=i[Symbol.iterator](),m=c.next();for(;!m.done&&r<=a;){let f=t.at(r),v=m.value,x=Wg(r,f,r,v,e);if(x!==0)x<0&&t.updateValue(r,v),r++,m=c.next();else{n??=new P4,o??=qC(t,r,a,e);let w=e(r,v);if(S8(t,n,r,w))t.updateValue(r,v),r++,a++,m=c.next();else if(!o.has(w))t.attach(r,t.create(r,v)),r++,a++,m=c.next();else{let O=e(r,f);n.set(O,t.detach(r)),a--}}}for(;!m.done;)WC(t,n,e,t.length,m.value),m=c.next()}for(;r<=a;)t.destroy(t.detach(a--));n?.forEach(c=>{t.destroy(c)})}function S8(t,i,e,n){return i!==void 0&&i.has(n)?(t.attach(e,i.get(n)),i.delete(n),!0):!1}function WC(t,i,e,n,o){if(S8(t,i,n,e(n,o)))t.updateValue(n,o);else{let r=t.create(n,o);t.attach(n,r)}}function qC(t,i,e,n){let o=new Set;for(let r=i;r<=e;r++)o.add(n(r,t.at(r)));return o}var P4=class{kvMap=new Map;_vMap=void 0;has(i){return this.kvMap.has(i)}delete(i){if(!this.has(i))return!1;let e=this.kvMap.get(i);return this._vMap!==void 0&&this._vMap.has(e)?(this.kvMap.set(i,this._vMap.get(e)),this._vMap.delete(e)):this.kvMap.delete(i),!0}get(i){return this.kvMap.get(i)}set(i,e){if(this.kvMap.has(i)){let n=this.kvMap.get(i);this._vMap===void 0&&(this._vMap=new Map);let o=this._vMap;for(;o.has(n);)n=o.get(n);o.set(n,e)}else this.kvMap.set(i,e)}forEach(i){for(let[e,n]of this.kvMap)if(i(n,e),this._vMap!==void 0){let o=this._vMap;for(;o.has(n);)n=o.get(n),i(n,e)}}};function E(t,i,e,n,o,r,a,s){aa("NgControlFlow");let c=ze(),m=on(),f=Do(m.consts,r);return m1(c,m,t,i,e,n,o,f,256,a,s),w5}function w5(t,i,e,n,o,r,a,s){aa("NgControlFlow");let c=ze(),m=on(),f=Do(m.consts,r);return m1(c,m,t,i,e,n,o,f,512,a,s),w5}function I(t,i){aa("NgControlFlow");let e=ze(),n=Jr(),o=e[n]!==Xn?e[n]:-1,r=o!==-1?L4(e,nn+o):void 0,a=0;if(Ji(e,n,t)){let s=Je(null);try{if(r!==void 0&&vM(r,a),t!==-1){let c=nn+t,m=L4(e,c),f=O8(e[Ge],c),v=CM(m,f,e),x=zd(e,f,i,{dehydratedView:v});Rd(m,x,a,u1(f,v))}}finally{Je(s)}}else if(r!==void 0){let s=bM(r,a);s!==void 0&&(s[Rn]=i)}}var k8=class{lContainer;$implicit;$index;constructor(i,e,n){this.lContainer=i,this.$implicit=e,this.$index=n}get $count(){return this.lContainer.length-Nn}};function ht(t,i){return i}var E8=class{hasEmptyBlock;trackByFn;liveCollection;constructor(i,e,n){this.hasEmptyBlock=i,this.trackByFn=e,this.liveCollection=n}};function Xe(t,i,e,n,o,r,a,s,c,m,f,v,x){aa("NgControlFlow");let w=ze(),O=on(),K=c!==void 0,Y=ze(),Z=s?a.bind(Y[Ni][Rn]):a,Oe=new E8(K,Z);Y[nn+t]=Oe,m1(w,O,t+1,i,e,n,o,Do(O.consts,r),256),K&&m1(w,O,t+2,c,m,f,v,Do(O.consts,x),512)}var I8=class extends D8{lContainer;hostLView;templateTNode;operationsCounter=void 0;needsIndexUpdate=!1;constructor(i,e,n){super(),this.lContainer=i,this.hostLView=e,this.templateTNode=n}get length(){return this.lContainer.length-Nn}at(i){return this.getLView(i)[Rn].$implicit}attach(i,e){let n=e[kc];this.needsIndexUpdate||=i!==this.length,Rd(this.lContainer,e,i,u1(this.templateTNode,n)),zG(this.lContainer,i)}detach(i){return this.needsIndexUpdate||=i!==this.length-1,RG(this.lContainer,i),NG(this.lContainer,i)}create(i,e){let n=D4(this.lContainer,this.templateTNode.tView.ssrId),o=zd(this.hostLView,this.templateTNode,new k8(this.lContainer,e,i),{dehydratedView:n});return this.operationsCounter?.recordCreate(),o}destroy(i){$4(i[Ge],i),this.operationsCounter?.recordDestroy()}updateValue(i,e){this.getLView(i)[Rn].$implicit=e}reset(){this.needsIndexUpdate=!1,this.operationsCounter?.reset()}updateIndexes(){if(this.needsIndexUpdate)for(let i=0;i0){let r=n[za];FU(r,o),Fc.delete(n),o.detachedLeaveAnimationFns=void 0}}function RG(t,i){if(t.length<=Nn)return;let e=Nn+i,n=t[e],o=n?n[Tc]:void 0;o&&o.leave&&o.leave.size>0&&(o.detachedLeaveAnimationFns=[])}function NG(t,i){return Dd(t,i)}function FG(t,i){return bM(t,i)}function O8(t,i){return md(t,i)}function D(t,i,e){let n=ze(),o=Jr();if(Ji(n,o,i)){let r=on(),a=r1();oM(a,n,t,i,n[Kt],e)}return D}function T8(t,i,e,n,o){q4(i,t,e,o?"class":"style",n)}function h(t,i,e,n){let o=ze(),r=o[Ge],a=t+nn,s=r.firstCreatePass?u5(a,o,2,i,a5,Z3(),e,n):r.data[a];if(s5(s,o,t,i,JM),Jl(s)){let c=o[Ge];W4(c,o,s),B8(c,s,o)}return n!=null&&Ad(o,s),h}function _(){let t=on(),i=Kn(),e=c5(i);return t.firstCreatePass&&m5(t,e),Ig(e)&&Og(),kg(),e.classesWithoutHost!=null&&hH(e)&&T8(t,e,ze(),e.classesWithoutHost,!0),e.stylesWithoutHost!=null&&gH(e)&&T8(t,e,ze(),e.stylesWithoutHost,!1),_}function F(t,i,e,n){return h(t,i,e,n),_(),F}function nt(t,i,e,n){let o=ze(),r=o[Ge],a=t+nn,s=r.firstCreatePass?H$(a,r,2,i,e,n):r.data[a];return s5(s,o,t,i,JM),n!=null&&Ad(o,s),nt}function rt(){let t=Kn(),i=c5(t);return Ig(i)&&Og(),kg(),rt}function Tn(t,i,e,n){return nt(t,i,e,n),rt(),Tn}var JM=(t,i,e,n,o)=>(hd(!0),zx(i[Kt],n,mC()));function Vi(t,i,e){let n=ze(),o=n[Ge],r=t+nn,a=o.firstCreatePass?u5(r,n,8,"ng-container",a5,Z3(),i,e):o.data[r];if(s5(a,n,t,"ng-container",VG),Jl(a)){let s=n[Ge];W4(s,n,a),B8(s,a,n)}return e!=null&&Ad(n,a),Vi}function Bi(){let t=on(),i=Kn(),e=c5(i);return t.firstCreatePass&&m5(t,e),Bi}function Vt(t,i,e){return Vi(t,i,e),Bi(),Vt}var VG=(t,i,e,n,o)=>(hd(!0),cU(i[Kt],""));function le(){return ze()}function Lt(t,i,e){let n=ze(),o=Jr();if(Ji(n,o,i)){let r=on(),a=r1();rM(a,n,t,i,n[Kt],e)}return Lt}var d4=void 0;function BG(t){let i=Math.floor(Math.abs(t)),e=t.toString().replace(/^[^.]*\.?/,"").length;return i===1&&e===0?1:5}var jG=["en",[["a","p"],["AM","PM"]],[["AM","PM"]],[["S","M","T","W","T","F","S"],["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],["Su","Mo","Tu","We","Th","Fr","Sa"]],d4,[["J","F","M","A","M","J","J","A","S","O","N","D"],["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],["January","February","March","April","May","June","July","August","September","October","November","December"]],d4,[["B","A"],["BC","AD"],["Before Christ","Anno Domini"]],0,[6,0],["M/d/yy","MMM d, y","MMMM d, y","EEEE, MMMM d, y"],["h:mm a","h:mm:ss a","h:mm:ss a z","h:mm:ss a zzzz"],["{1}, {0}",d4,"{1} 'at' {0}",d4],[".",",",";","%","+","-","E","\xD7","\u2030","\u221E","NaN",":"],["#,##0.###","#,##0%","\xA4#,##0.00","#E0"],"USD","$","US Dollar",{},"ltr",BG],yd={};function D5(t,i,e){typeof i!="string"&&(e=i,i=t[bn.LocaleId]),i=i.toLowerCase().replace(/_/g,"-"),yd[i]=t,e&&(yd[i][bn.ExtraData]=e)}function eo(t){let i=HG(t),e=YC(i);if(e)return e;let n=i.split("-")[0];if(e=YC(n),e)return e;if(n==="en")return jG;throw new pe(701,!1)}function YC(t){return t in yd||(yd[t]=Qn.ng&&Qn.ng.common&&Qn.ng.common.locales&&Qn.ng.common.locales[t]),yd[t]}var bn=(function(t){return t[t.LocaleId=0]="LocaleId",t[t.DayPeriodsFormat=1]="DayPeriodsFormat",t[t.DayPeriodsStandalone=2]="DayPeriodsStandalone",t[t.DaysFormat=3]="DaysFormat",t[t.DaysStandalone=4]="DaysStandalone",t[t.MonthsFormat=5]="MonthsFormat",t[t.MonthsStandalone=6]="MonthsStandalone",t[t.Eras=7]="Eras",t[t.FirstDayOfWeek=8]="FirstDayOfWeek",t[t.WeekendRange=9]="WeekendRange",t[t.DateFormat=10]="DateFormat",t[t.TimeFormat=11]="TimeFormat",t[t.DateTimeFormat=12]="DateTimeFormat",t[t.NumberSymbols=13]="NumberSymbols",t[t.NumberFormats=14]="NumberFormats",t[t.CurrencyCode=15]="CurrencyCode",t[t.CurrencySymbol=16]="CurrencySymbol",t[t.CurrencyName=17]="CurrencyName",t[t.Currencies=18]="Currencies",t[t.Directionality=19]="Directionality",t[t.PluralCase=20]="PluralCase",t[t.ExtraData=21]="ExtraData",t})(bn||{});function HG(t){return t.toLowerCase().replace(/_/g,"-")}var jd="en-US",UG="USD";var $G=jd;function ew(t){typeof t=="string"&&($G=t.toLowerCase().replace(/_/g,"-"))}function N(t,i,e){let n=ze(),o=on(),r=Kn();return tw(o,n,n[Kt],r,t,i,e),N}function im(t,i,e){let n=ze(),o=on(),r=Kn();return(r.type&3||e)&&IM(r,o,n,e,n[Kt],t,i,_4(r,n,i)),im}function tw(t,i,e,n,o,r,a){let s=!0,c=null;if((n.type&3||a)&&(c??=_4(n,i,r),IM(n,t,i,a,e,o,r,c)&&(s=!1)),s){let m=n.outputs?.[o],f=n.hostDirectiveOutputs?.[o];if(f&&f.length)for(let v=0;v>17&32767}function qG(t){return(t&2)==2}function YG(t,i){return t&131071|i<<17}function P8(t){return t|2}function p1(t){return(t&131068)>>2}function qg(t,i){return t&-131069|i<<2}function QG(t){return(t&1)===1}function L8(t){return t|1}function KG(t,i,e,n,o,r){let a=r?i.classBindings:i.styleBindings,s=Vc(a),c=p1(a);t[n]=e;let m=!1,f;if(Array.isArray(e)){let v=e;f=v[1],(f===null||Ql(v,f)>0)&&(m=!0)}else f=e;if(o)if(c!==0){let x=Vc(t[s+1]);t[n+1]=u4(x,s),x!==0&&(t[x+1]=qg(t[x+1],n)),t[s+1]=YG(t[s+1],n)}else t[n+1]=u4(s,0),s!==0&&(t[s+1]=qg(t[s+1],n)),s=n;else t[n+1]=u4(c,0),s===0?s=n:t[c+1]=qg(t[c+1],n),c=n;m&&(t[n+1]=P8(t[n+1])),QC(t,f,n,!0),QC(t,f,n,!1),XG(i,f,t,n,r),a=u4(s,c),r?i.classBindings=a:i.styleBindings=a}function XG(t,i,e,n,o){let r=o?t.residualClasses:t.residualStyles;r!=null&&typeof i=="string"&&Ql(r,i)>=0&&(e[n+1]=L8(e[n+1]))}function QC(t,i,e,n){let o=t[e+1],r=i===null,a=n?Vc(o):p1(o),s=!1;for(;a!==0&&(s===!1||r);){let c=t[a],m=t[a+1];ZG(c,i)&&(s=!0,t[a+1]=n?L8(m):P8(m)),a=n?Vc(m):p1(m)}s&&(t[e+1]=n?P8(o):L8(o))}function ZG(t,i){return t===null||i==null||(Array.isArray(t)?t[1]:t)===i?!0:Array.isArray(t)&&typeof i=="string"?Ql(t,i)>=0:!1}var Cr={textEnd:0,key:0,keyEnd:0,value:0,valueEnd:0};function JG(t){return t.substring(Cr.key,Cr.keyEnd)}function eW(t){return tW(t),nw(t,iw(t,0,Cr.textEnd))}function nw(t,i){let e=Cr.textEnd;return e===i?-1:(i=Cr.keyEnd=nW(t,Cr.key=i,e),iw(t,i,e))}function tW(t){Cr.key=0,Cr.keyEnd=0,Cr.value=0,Cr.valueEnd=0,Cr.textEnd=t.length}function iw(t,i,e){for(;i32;)i++;return i}function At(t,i,e){return ow(t,i,e,!1),At}function oe(t,i){return ow(t,i,null,!0),oe}function Tt(t){oW(dW,iW,t,!0)}function iW(t,i){for(let e=eW(i);e>=0;e=nw(i,e))W3(t,JG(i),!0)}function ow(t,i,e,n){let o=ze(),r=on(),a=o1(2);if(r.firstUpdatePass&&aw(r,t,a,n),i!==Xn&&Ji(o,a,i)){let s=r.data[Qo()];sw(r,s,o,o[Kt],t,o[a+1]=mW(i,e),n,a)}}function oW(t,i,e,n){let o=on(),r=o1(2);o.firstUpdatePass&&aw(o,null,r,n);let a=ze();if(e!==Xn&&Ji(a,r,e)){let s=o.data[Qo()];if(cw(s,n)&&!rw(o,r)){let c=n?s.classesWithoutHost:s.stylesWithoutHost;c!==null&&(e=H3(c,e||"")),T8(o,s,a,e,n)}else uW(o,s,a,a[Kt],a[r+1],a[r+1]=lW(t,i,e),n,r)}}function rw(t,i){return i>=t.expandoStartIndex}function aw(t,i,e,n){let o=t.data;if(o[e+1]===null){let r=o[Qo()],a=rw(t,e);cw(r,n)&&i===null&&!a&&(i=!1),i=rW(o,r,i,n),KG(o,r,i,e,a,n)}}function rW(t,i,e,n){let o=sC(t),r=n?i.residualClasses:i.residualStyles;if(o===null)(n?i.classBindings:i.styleBindings)===0&&(e=Yg(null,t,i,e,n),e=Id(e,i.attrs,n),r=null);else{let a=i.directiveStylingLast;if(a===-1||t[a]!==o)if(e=Yg(o,t,i,e,n),r===null){let c=aW(t,i,n);c!==void 0&&Array.isArray(c)&&(c=Yg(null,t,i,c[1],n),c=Id(c,i.attrs,n),sW(t,i,n,c))}else r=cW(t,i,n)}return r!==void 0&&(n?i.residualClasses=r:i.residualStyles=r),e}function aW(t,i,e){let n=e?i.classBindings:i.styleBindings;if(p1(n)!==0)return t[Vc(n)]}function sW(t,i,e,n){let o=e?i.classBindings:i.styleBindings;t[Vc(o)]=n}function cW(t,i,e){let n,o=i.directiveEnd;for(let r=1+i.directiveStylingLast;r0;){let c=t[o],m=Array.isArray(c),f=m?c[1]:c,v=f===null,x=e[o+1];x===Xn&&(x=v?zi:void 0);let w=v?q3(x,n):f===n?x:void 0;if(m&&!A4(w)&&(w=q3(c,n)),A4(w)&&(s=w,a))return s;let O=t[o+1];o=a?Vc(O):p1(O)}if(i!==null){let c=r?i.residualClasses:i.residualStyles;c!=null&&(s=q3(c,n))}return s}function A4(t){return t!==void 0}function mW(t,i){return t==null||t===""||(typeof i=="string"?t=t+i:typeof t=="object"&&(t=La(So(t)))),t}function cw(t,i){return(t.flags&(i?8:16))!==0}function y(t,i=""){let e=ze(),n=on(),o=t+nn,r=n.firstCreatePass?b1(n,o,1,i,null):n.data[o],a=pW(n,e,r,i,t);e[o]=a,o4()&&o5(n,e,a,r),n1(r,!1)}var pW=(t,i,e,n,o)=>(hd(!0),aU(i[Kt],n));function lw(t,i,e,n=""){return Ji(t,Jr(),e)?i+Ri(e)+n:Xn}function dw(t,i,e,n,o,r=""){let a=J3(),s=Sd(t,a,e,o);return o1(2),s?i+Ri(e)+n+Ri(o)+r:Xn}function fW(t,i,e,n,o,r,a,s=""){let c=J3(),m=kM(t,c,e,o,a);return o1(3),m?i+Ri(e)+n+Ri(o)+r+Ri(a)+s:Xn}function hW(t,i,e,n,o,r,a,s,c,m=""){let f=J3(),v=EM(t,f,e,o,a,c);return o1(4),v?i+Ri(e)+n+Ri(o)+r+Ri(a)+s+Ri(c)+m:Xn}function T(t){return ee("",t),T}function ee(t,i,e){let n=ze(),o=lw(n,t,i,e);return o!==Xn&&rm(n,Qo(),o),ee}function St(t,i,e,n,o){let r=ze(),a=dw(r,t,i,e,n,o);return a!==Xn&&rm(r,Qo(),a),St}function Ua(t,i,e,n,o,r,a){let s=ze(),c=fW(s,t,i,e,n,o,r,a);return c!==Xn&&rm(s,Qo(),c),Ua}function uw(t,i,e,n,o,r,a,s,c){let m=ze(),f=hW(m,t,i,e,n,o,r,a,s,c);return f!==Xn&&rm(m,Qo(),f),uw}function rm(t,i,e){let n=yg(i,t);sU(t[Kt],n,e)}function M1(t,i,e){Fg(i)&&(i=i());let n=ze(),o=Jr();if(Ji(n,o,i)){let r=on(),a=r1();oM(a,n,t,i,n[Kt],e)}return M1}function Hd(t,i){let e=Fg(t);return e&&t.set(i),e}function w1(t,i){let e=ze(),n=on(),o=Kn();return tw(n,e,e[Kt],o,t,i),w1}function Ft(t){return Ji(ze(),Jr(),t)?Ri(t):Xn}function Uc(t,i,e=""){return lw(ze(),t,i,e)}function am(t,i,e,n,o=""){return dw(ze(),t,i,e,n,o)}function gW(t,i,e){let n=on();if(n.firstCreatePass){let o=vr(t);A8(e,n.data,n.blueprint,o,!0),A8(i,n.data,n.blueprint,o,!1)}}function A8(t,i,e,n,o){if(t=si(t),Array.isArray(t))for(let r=0;r>20;if(wc(t)||!t.multi){let w=new Nc(m,o,Ce,null),O=Kg(c,i,o?f:f+x,v);O===-1?(Zg(x4(s,a),r,c),Qg(r,t,i.length),i.push(c),s.directiveStart++,s.directiveEnd++,o&&(s.providerIndexes+=1048576),e.push(w),a.push(w)):(e[O]=w,a[O]=w)}else{let w=Kg(c,i,f+x,v),O=Kg(c,i,f,f+x),K=w>=0&&e[w],Y=O>=0&&e[O];if(o&&!Y||!o&&!K){Zg(x4(s,a),r,c);let Z=vW(o?bW:_W,e.length,o,n,m,t);!o&&Y&&(e[O].providerFactory=Z),Qg(r,t,i.length,0),i.push(c),s.directiveStart++,s.directiveEnd++,o&&(s.providerIndexes+=1048576),e.push(Z),a.push(Z)}else{let Z=mw(e[o?O:w],m,!o&&n);Qg(r,t,w>-1?w:O,Z)}!o&&n&&Y&&e[O].componentProviders++}}}function Qg(t,i,e,n){let o=wc(i),r=Gy(i);if(o||r){let c=(r?si(i.useClass):i).prototype.ngOnDestroy;if(c){let m=t.destroyHooks||(t.destroyHooks=[]);if(!o&&i.multi){let f=m.indexOf(e);f===-1?m.push(e,[n,c]):m[f+1].push(n,c)}else m.push(e,c)}}}function mw(t,i,e){return e&&t.componentProviders++,t.multi.push(i)-1}function Kg(t,i,e,n){for(let o=e;o{e.providersResolver=(n,o)=>gW(n,o?o(t):t,i)}}function ko(t,i,e){let n=Fa()+t,o=ze();return o[n]===Xn?Fd(o,n,e?i.call(e):i()):U$(o,n)}function Eo(t,i,e,n){return pw(ze(),Fa(),t,i,e,n)}function D1(t,i,e,n,o){return fw(ze(),Fa(),t,i,e,n,o)}function k5(t,i,e,n,o,r){return hw(ze(),Fa(),t,i,e,n,o,r)}function sm(t,i){let e=t[i];return e===Xn?void 0:e}function pw(t,i,e,n,o,r){let a=i+e;return Ji(t,a,o)?Fd(t,a+1,r?n.call(r,o):n(o)):sm(t,a+1)}function fw(t,i,e,n,o,r,a){let s=i+e;return Sd(t,s,o,r)?Fd(t,s+2,a?n.call(a,o,r):n(o,r)):sm(t,s+2)}function hw(t,i,e,n,o,r,a,s){let c=i+e;return kM(t,c,o,r,a)?Fd(t,c+3,s?n.call(s,o,r,a):n(o,r,a)):sm(t,c+3)}function yW(t,i,e,n,o,r,a,s,c){let m=i+e;return EM(t,m,o,r,a,s)?Fd(t,m+4,c?n.call(c,o,r,a,s):n(o,r,a,s)):sm(t,m+4)}function S(t,i){let e=on(),n,o=t+nn;e.firstCreatePass?(n=CW(i,e.pipeRegistry),e.data[o]=n,n.onDestroy&&(e.destroyHooks??=[]).push(o,n.onDestroy)):n=e.data[o];let r=n.factory||(n.factory=gs(n.type,!0)),a,s=Ki(Ce);try{let c=C4(!1),m=r();return C4(c),Cg(e,ze(),o,m),m}finally{Ki(s)}}function CW(t,i){if(i)for(let e=i.length-1;e>=0;e--){let n=i[e];if(t===n.name)return n}}function k(t,i,e){let n=t+nn,o=ze(),r=t1(o,n);return lm(o,n)?pw(o,Fa(),i,r.transform,e,r):r.transform(e)}function Zo(t,i,e,n){let o=t+nn,r=ze(),a=t1(r,o);return lm(r,o)?fw(r,Fa(),i,a.transform,e,n,a):a.transform(e,n)}function xW(t,i,e,n,o){let r=t+nn,a=ze(),s=t1(a,r);return lm(a,r)?hw(a,Fa(),i,s.transform,e,n,o,s):s.transform(e,n,o)}function cm(t,i,e,n,o,r){let a=t+nn,s=ze(),c=t1(s,a);return lm(s,a)?yW(s,Fa(),i,c.transform,e,n,o,r,c):c.transform(e,n,o,r)}function lm(t,i){return t[Ge].data[i].pure}function ks(t,i){return Y4(t,i)}var m4=null;function gw(t){m4!==null&&(t.defaultEncapsulation!==m4.defaultEncapsulation||t.preserveWhitespaces!==m4.preserveWhitespaces)||(m4=t)}var z4=class{ngModuleFactory;componentFactories;constructor(i,e){this.ngModuleFactory=i,this.componentFactories=e}},E5=(()=>{class t{compileModuleSync(e){return new Ed(e)}compileModuleAsync(e){return Promise.resolve(this.compileModuleSync(e))}compileModuleAndAllComponentsSync(e){let n=this.compileModuleSync(e),o=dg(e),r=Bx(o.declarations).reduce((a,s)=>{let c=Qr(s);return c&&a.push(new ws(c)),a},[]);return new z4(n,r)}compileModuleAndAllComponentsAsync(e){return Promise.resolve(this.compileModuleAndAllComponentsSync(e))}clearCache(){}clearCacheFor(e){}getModuleId(e){}static \u0275fac=function(n){return new(n||t)};static \u0275prov=R({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})(),_w=new L("");var MW=(()=>{class t{zone=d(se);changeDetectionScheduler=d(Uo);applicationRef=d(li);applicationErrorHandler=d(Zi);_onMicrotaskEmptySubscription;initialize(){this._onMicrotaskEmptySubscription||(this._onMicrotaskEmptySubscription=this.zone.onMicrotaskEmpty.subscribe({next:()=>{this.changeDetectionScheduler.runningTick||this.zone.run(()=>{try{this.applicationRef.dirtyFlags|=1,this.applicationRef._tick()}catch(e){this.applicationErrorHandler(e)}})}}))}ngOnDestroy(){this._onMicrotaskEmptySubscription?.unsubscribe()}static \u0275fac=function(n){return new(n||t)};static \u0275prov=R({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();function bw({ngZoneFactory:t,ignoreChangesOutsideZone:i,scheduleInRootZone:e}){return t??=()=>new se(Ne(q({},I5()),{scheduleInRootZone:e})),[{provide:se,useFactory:t},{provide:Aa,multi:!0,useFactory:()=>{let n=d(MW,{optional:!0});return()=>n.initialize()}},{provide:Aa,multi:!0,useFactory:()=>{let n=d(wW);return()=>{n.initialize()}}},i===!0?{provide:Vg,useValue:!0}:[],{provide:Bg,useValue:e??Wx},{provide:Zi,useFactory:()=>{let n=d(se),o=d(Qt),r;return a=>{n.runOutsideAngular(()=>{o.destroyed&&!r?setTimeout(()=>{throw a}):(r??=o.get(_i),r.handleError(a))})}}}]}function I5(t){return{enableLongStackTrace:!1,shouldCoalesceEventChangeDetection:t?.eventCoalescing??!1,shouldCoalesceRunChangeDetection:t?.runCoalescing??!1}}var wW=(()=>{class t{subscription=new Se;initialized=!1;zone=d(se);pendingTasks=d(ta);initialize(){if(this.initialized)return;this.initialized=!0;let e=null;!this.zone.isStable&&!this.zone.hasPendingMacrotasks&&!this.zone.hasPendingMicrotasks&&(e=this.pendingTasks.add()),this.zone.runOutsideAngular(()=>{this.subscription.add(this.zone.onStable.subscribe(()=>{se.assertNotInAngularZone(),queueMicrotask(()=>{e!==null&&!this.zone.hasPendingMacrotasks&&!this.zone.hasPendingMicrotasks&&(this.pendingTasks.remove(e),e=null)})}))}),this.subscription.add(this.zone.onUnstable.subscribe(()=>{se.assertInAngularZone(),e??=this.pendingTasks.add()}))}ngOnDestroy(){this.subscription.unsubscribe()}static \u0275fac=function(n){return new(n||t)};static \u0275prov=R({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();var vw=(()=>{class t{applicationErrorHandler=d(Zi);appRef=d(li);taskService=d(ta);ngZone=d(se);zonelessEnabled=d(gd);tracing=d(Ss,{optional:!0});disableScheduling=d(Vg,{optional:!0})??!1;zoneIsDefined=typeof Zone<"u"&&!!Zone.root.run;schedulerTickApplyArgs=[{data:{__scheduler_tick__:!0}}];subscriptions=new Se;angularZoneId=this.zoneIsDefined?this.ngZone._inner?.get(w4):null;scheduleInRootZone=!this.zonelessEnabled&&this.zoneIsDefined&&(d(Bg,{optional:!0})??!1);cancelScheduledCallback=null;useMicrotaskScheduler=!1;runningTick=!1;pendingRenderTaskId=null;constructor(){this.subscriptions.add(this.appRef.afterTick.subscribe(()=>{this.runningTick||this.cleanup()})),this.subscriptions.add(this.ngZone.onUnstable.subscribe(()=>{this.runningTick||this.cleanup()})),this.disableScheduling||=!this.zonelessEnabled&&(this.ngZone instanceof xd||!this.zoneIsDefined)}notify(e){if(!this.zonelessEnabled&&e===5)return;let n=!1;switch(e){case 0:{this.appRef.dirtyFlags|=2;break}case 3:case 2:case 4:case 5:case 1:{this.appRef.dirtyFlags|=4;break}case 6:{this.appRef.dirtyFlags|=2,n=!0;break}case 12:{this.appRef.dirtyFlags|=16,n=!0;break}case 13:{this.appRef.dirtyFlags|=2,n=!0;break}case 11:{n=!0;break}case 9:case 8:case 7:case 10:default:this.appRef.dirtyFlags|=8}if(this.appRef.tracingSnapshot=this.tracing?.snapshot(this.appRef.tracingSnapshot)??null,!this.shouldScheduleTick(n))return;let o=this.useMicrotaskScheduler?OC:qx;this.pendingRenderTaskId=this.taskService.add(),this.scheduleInRootZone?this.cancelScheduledCallback=Zone.root.run(()=>o(()=>this.tick())):this.cancelScheduledCallback=this.ngZone.runOutsideAngular(()=>o(()=>this.tick()))}shouldScheduleTick(e){return!(this.disableScheduling&&!e||this.appRef.destroyed||this.pendingRenderTaskId!==null||this.runningTick||this.appRef._runningTick||!this.zonelessEnabled&&this.zoneIsDefined&&Zone.current.get(w4+this.angularZoneId))}tick(){if(this.runningTick||this.appRef.destroyed)return;if(this.appRef.dirtyFlags===0){this.cleanup();return}!this.zonelessEnabled&&this.appRef.dirtyFlags&7&&(this.appRef.dirtyFlags|=1);let e=this.taskService.add();try{this.ngZone.run(()=>{this.runningTick=!0,this.appRef._tick()},void 0,this.schedulerTickApplyArgs)}catch(n){this.taskService.remove(e),this.applicationErrorHandler(n)}finally{this.cleanup()}this.useMicrotaskScheduler=!0,OC(()=>{this.useMicrotaskScheduler=!1,this.taskService.remove(e)})}ngOnDestroy(){this.subscriptions.unsubscribe(),this.cleanup()}cleanup(){if(this.runningTick=!1,this.cancelScheduledCallback?.(),this.cancelScheduledCallback=null,this.pendingRenderTaskId!==null){let e=this.pendingRenderTaskId;this.pendingRenderTaskId=null,this.taskService.remove(e)}}static \u0275fac=function(n){return new(n||t)};static \u0275prov=R({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();function DW(){return typeof $localize<"u"&&$localize.locale||jd}var wr=new L("",{providedIn:"root",factory:()=>d(wr,{optional:!0,skipSelf:!0})||DW()}),O5=new L("",{providedIn:"root",factory:()=>UG});var dm=class{destroyed=!1;listeners=null;errorHandler=d(_i,{optional:!0});destroyRef=d(Fi);constructor(){this.destroyRef.onDestroy(()=>{this.destroyed=!0,this.listeners=null})}subscribe(i){if(this.destroyed)throw new pe(953,!1);return(this.listeners??=[]).push(i),{unsubscribe:()=>{let e=this.listeners?.indexOf(i);e!==void 0&&e!==-1&&this.listeners?.splice(e,1)}}}emit(i){if(this.destroyed){console.warn($o(953,!1));return}if(this.listeners===null)return;let e=Je(null);try{for(let n of this.listeners)try{n(i)}catch(o){this.errorHandler?.handleError(o)}}finally{Je(e)}}};function Vn(t){return ky(t)}function Zn(t,i){return K2(t,i?.equal)}var T5=class{[Yn];constructor(i){this[Yn]=i}destroy(){this[Yn].destroy()}};function sa(t,i){let e=i?.injector??d(be),n=i?.manualCleanup!==!0?e.get(Fi):null,o,r=e.get(Ac,null,{optional:!0}),a=e.get(Uo);return r!==null?(o=EW(r.view,a,t),n instanceof ad&&n._lView===r.view&&(n=null)):o=IW(t,e.get(_d),a),o.injector=e,n!==null&&(o.onDestroyFn=n.onDestroy(()=>o.destroy())),new T5(o)}var yw=Ne(q({},Ey),{cleanupFns:void 0,zone:null,onDestroyFn:zc,run(){let t=i1(!1);try{Iy(this)}finally{i1(t)}},cleanup(){if(!this.cleanupFns?.length)return;let t=Je(null);try{for(;this.cleanupFns.length;)this.cleanupFns.pop()()}finally{this.cleanupFns=[],Je(t)}}}),SW=Ne(q({},yw),{consumerMarkedDirty(){this.scheduler.schedule(this),this.notifier.notify(12)},destroy(){ms(this),this.onDestroyFn(),this.cleanup(),this.scheduler.remove(this)}}),kW=Ne(q({},yw),{consumerMarkedDirty(){this.view[it]|=8192,Cs(this.view),this.notifier.notify(13)},destroy(){ms(this),this.onDestroyFn(),this.cleanup(),this.view[Ra]?.delete(this)}});function EW(t,i,e){let n=Object.create(kW);return n.view=t,n.zone=typeof Zone<"u"?Zone.current:null,n.notifier=i,n.fn=Cw(n,e),t[Ra]??=new Set,t[Ra].add(n),n.consumerMarkedDirty(n),n}function IW(t,i,e){let n=Object.create(SW);return n.fn=Cw(n,t),n.scheduler=i,n.notifier=e,n.zone=typeof Zone<"u"?Zone.current:null,n.scheduler.add(n),n.notifier.notify(12),n}function Cw(t,i){return()=>{i(e=>(t.cleanupFns??=[]).push(e))}}var fm=Symbol("InputSignalNode#UNSET"),Lw=Ne(q({},X2),{transformFn:void 0,applyValueToInputSignal(t,i){hc(t,i)}});function Aw(t,i){let e=Object.create(Lw);e.value=t,e.transformFn=i?.transform;function n(){if(ds(e),e.value===fm){let o=null;throw new pe(-950,o)}return e.value}return n[Yn]=e,n}var dn=class{attributeName;constructor(i){this.attributeName=i}__NG_ELEMENT_ID__=()=>Od(this.attributeName);toString(){return`HostAttributeToken ${this.attributeName}`}},zw=new L("");zw.__NG_ELEMENT_ID__=t=>{let i=Kn();if(i===null)throw new pe(204,!1);if(i.type&2)return i.value;if(t&8)return null;throw new pe(204,!1)};function xw(t,i){return Aw(t,i)}function FW(t){return Aw(fm,t)}var S1=(xw.required=FW,xw);function Mw(t,i){return g5(i)}function VW(t,i){return _5(i)}var $d=(Mw.required=VW,Mw);function ww(t,i){return g5(i)}function BW(t,i){return _5(i)}var Rw=(ww.required=BW,ww);function Nw(t,i){let e=Object.create(Lw),n=new dm;e.value=t;function o(){return ds(e),Dw(e.value),e.value}return o[Yn]=e,o.asReadonly=r4.bind(o),o.set=r=>{e.equal(e.value,r)||(hc(e,r),n.emit(r))},o.update=r=>{Dw(e.value),o.set(r(e.value))},o.subscribe=n.subscribe.bind(n),o.destroyRef=n.destroyRef,o}function Dw(t){if(t===fm)throw new pe(952,!1)}function Sw(t,i){return Nw(t,i)}function jW(t){return Nw(fm,t)}var to=(Sw.required=jW,Sw);function HW(t,i,e){let n=new Ed(e);return Promise.resolve(n)}function kw(t){for(let i=t.length-1;i>=0;i--)if(t[i]!==void 0)return t[i]}var um=new L(""),UW=new L("");function Ud(t){return!t.moduleRef}function $W(t){let i=Ud(t)?t.r3Injector:t.moduleRef.injector,e=i.get(se);return e.run(()=>{Ud(t)?t.r3Injector.resolveInjectorInitializers():t.moduleRef.resolveInjectorInitializers();let n=i.get(Zi),o;if(e.runOutsideAngular(()=>{o=e.onError.subscribe({next:n})}),Ud(t)){let r=()=>i.destroy(),a=t.platformInjector.get(um);a.add(r),i.onDestroy(()=>{o.unsubscribe(),a.delete(r)})}else{let r=()=>t.moduleRef.destroy(),a=t.platformInjector.get(um);a.add(r),t.moduleRef.onDestroy(()=>{vd(t.allPlatformModules,t.moduleRef),o.unsubscribe(),a.delete(r)})}return WW(n,e,()=>{let r=i.get(ta),a=r.add(),s=i.get(C5);return s.runInitializers(),s.donePromise.then(()=>{let c=i.get(wr,jd);if(ew(c||jd),!i.get(UW,!0))return Ud(t)?i.get(li):(t.allPlatformModules.push(t.moduleRef),t.moduleRef);if(Ud(t)){let f=i.get(li);return t.rootComponent!==void 0&&f.bootstrap(t.rootComponent),f}else return Fw?.(t.moduleRef,t.allPlatformModules),t.moduleRef}).finally(()=>void r.remove(a))})})}var Fw;function Ew(){Fw=GW}function GW(t,i){let e=t.injector.get(li);if(t._bootstrapComponents.length>0)t._bootstrapComponents.forEach(n=>e.bootstrap(n));else if(t.instance.ngDoBootstrap)t.instance.ngDoBootstrap(e);else throw new pe(-403,!1);i.push(t)}function WW(t,i,e){try{let n=e();return Ha(n)?n.catch(o=>{throw i.runOutsideAngular(()=>t(o)),o}):n}catch(n){throw i.runOutsideAngular(()=>t(n)),n}}var Vw=(()=>{class t{_injector;_modules=[];_destroyListeners=[];_destroyed=!1;constructor(e){this._injector=e}bootstrapModuleFactory(e,n){let o=n?.scheduleInRootZone,r=()=>Qx(n?.ngZone,Ne(q({},I5({eventCoalescing:n?.ngZoneEventCoalescing,runCoalescing:n?.ngZoneRunCoalescing})),{scheduleInRootZone:o})),a=n?.ignoreChangesOutsideZone,s=[bw({ngZoneFactory:r,ignoreChangesOutsideZone:a}),{provide:Uo,useExisting:vw},fC],c=GM(e.moduleType,this.injector,s);return Ew(),$W({moduleRef:c,allPlatformModules:this._modules,platformInjector:this.injector})}bootstrapModule(e,n=[]){let o=x5({},n);return Ew(),HW(this.injector,o,e).then(r=>this.bootstrapModuleFactory(r,o))}onDestroy(e){this._destroyListeners.push(e)}get injector(){return this._injector}destroy(){if(this._destroyed)throw new pe(404,!1);this._modules.slice().forEach(n=>n.destroy()),this._destroyListeners.forEach(n=>n());let e=this._injector.get(um,null);e&&(e.forEach(n=>n()),e.clear()),this._destroyed=!0}get destroyed(){return this._destroyed}static \u0275fac=function(n){return new(n||t)(ke(be))};static \u0275prov=R({token:t,factory:t.\u0275fac,providedIn:"platform"})}return t})(),j5=null;function qW(t){if(U5())throw new pe(400,!1);XM(),j5=t;let i=t.get(Vw);return KW(t),i}function H5(t,i,e=[]){let n=`Platform: ${i}`,o=new L(n);return(r=[])=>{let a=U5();if(!a){let s=[...e,...r,{provide:o,useValue:!0}];a=t?.(s)??qW(YW(s,n))}return QW(o)}}function YW(t=[],i){return be.create({name:i,providers:[{provide:ld,useValue:"platform"},{provide:um,useValue:new Set([()=>j5=null])},...t]})}function QW(t){let i=U5();if(!i)throw new pe(-401,!1);return i}function U5(){return j5?.get(Vw)??null}function KW(t){let i=t.get(R4,null);bi(t,()=>{i?.forEach(e=>e())})}var xe=(()=>{class t{static __NG_ELEMENT_ID__=XW}return t})();function XW(t){return ZW(Kn(),ze(),(t&16)===16)}function ZW(t,i,e){if(Na(t)&&!e){let n=Yo(t.index,i);return new Ms(n,n)}else if(t.type&175){let n=i[Ni];return new Ms(n,i)}return null}var L5=class{constructor(){}supports(i){return p5(i)}create(i){return new A5(i)}},JW=(t,i)=>i,A5=class{length=0;collection;_linkedRecords=null;_unlinkedRecords=null;_previousItHead=null;_itHead=null;_itTail=null;_additionsHead=null;_additionsTail=null;_movesHead=null;_movesTail=null;_removalsHead=null;_removalsTail=null;_identityChangesHead=null;_identityChangesTail=null;_trackByFn;constructor(i){this._trackByFn=i||JW}forEachItem(i){let e;for(e=this._itHead;e!==null;e=e._next)i(e)}forEachOperation(i){let e=this._itHead,n=this._removalsHead,o=0,r=null;for(;e||n;){let a=!n||e&&e.currentIndex{a=this._trackByFn(o,s),e===null||!Object.is(e.trackById,a)?(e=this._mismatch(e,s,a,o),n=!0):(n&&(e=this._verifyReinsertion(e,s,a,o)),Object.is(e.item,s)||this._addIdentityChange(e,s)),e=e._next,o++}),this.length=o;return this._truncate(e),this.collection=i,this.isDirty}get isDirty(){return this._additionsHead!==null||this._movesHead!==null||this._removalsHead!==null||this._identityChangesHead!==null}_reset(){if(this.isDirty){let i;for(i=this._previousItHead=this._itHead;i!==null;i=i._next)i._nextPrevious=i._next;for(i=this._additionsHead;i!==null;i=i._nextAdded)i.previousIndex=i.currentIndex;for(this._additionsHead=this._additionsTail=null,i=this._movesHead;i!==null;i=i._nextMoved)i.previousIndex=i.currentIndex;this._movesHead=this._movesTail=null,this._removalsHead=this._removalsTail=null,this._identityChangesHead=this._identityChangesTail=null}}_mismatch(i,e,n,o){let r;return i===null?r=this._itTail:(r=i._prev,this._remove(i)),i=this._unlinkedRecords===null?null:this._unlinkedRecords.get(n,null),i!==null?(Object.is(i.item,e)||this._addIdentityChange(i,e),this._reinsertAfter(i,r,o)):(i=this._linkedRecords===null?null:this._linkedRecords.get(n,o),i!==null?(Object.is(i.item,e)||this._addIdentityChange(i,e),this._moveAfter(i,r,o)):i=this._addAfter(new z5(e,n),r,o)),i}_verifyReinsertion(i,e,n,o){let r=this._unlinkedRecords===null?null:this._unlinkedRecords.get(n,null);return r!==null?i=this._reinsertAfter(r,i._prev,o):i.currentIndex!=o&&(i.currentIndex=o,this._addToMoves(i,o)),i}_truncate(i){for(;i!==null;){let e=i._next;this._addToRemovals(this._unlink(i)),i=e}this._unlinkedRecords!==null&&this._unlinkedRecords.clear(),this._additionsTail!==null&&(this._additionsTail._nextAdded=null),this._movesTail!==null&&(this._movesTail._nextMoved=null),this._itTail!==null&&(this._itTail._next=null),this._removalsTail!==null&&(this._removalsTail._nextRemoved=null),this._identityChangesTail!==null&&(this._identityChangesTail._nextIdentityChange=null)}_reinsertAfter(i,e,n){this._unlinkedRecords!==null&&this._unlinkedRecords.remove(i);let o=i._prevRemoved,r=i._nextRemoved;return o===null?this._removalsHead=r:o._nextRemoved=r,r===null?this._removalsTail=o:r._prevRemoved=o,this._insertAfter(i,e,n),this._addToMoves(i,n),i}_moveAfter(i,e,n){return this._unlink(i),this._insertAfter(i,e,n),this._addToMoves(i,n),i}_addAfter(i,e,n){return this._insertAfter(i,e,n),this._additionsTail===null?this._additionsTail=this._additionsHead=i:this._additionsTail=this._additionsTail._nextAdded=i,i}_insertAfter(i,e,n){let o=e===null?this._itHead:e._next;return i._next=o,i._prev=e,o===null?this._itTail=i:o._prev=i,e===null?this._itHead=i:e._next=i,this._linkedRecords===null&&(this._linkedRecords=new mm),this._linkedRecords.put(i),i.currentIndex=n,i}_remove(i){return this._addToRemovals(this._unlink(i))}_unlink(i){this._linkedRecords!==null&&this._linkedRecords.remove(i);let e=i._prev,n=i._next;return e===null?this._itHead=n:e._next=n,n===null?this._itTail=e:n._prev=e,i}_addToMoves(i,e){return i.previousIndex===e||(this._movesTail===null?this._movesTail=this._movesHead=i:this._movesTail=this._movesTail._nextMoved=i),i}_addToRemovals(i){return this._unlinkedRecords===null&&(this._unlinkedRecords=new mm),this._unlinkedRecords.put(i),i.currentIndex=null,i._nextRemoved=null,this._removalsTail===null?(this._removalsTail=this._removalsHead=i,i._prevRemoved=null):(i._prevRemoved=this._removalsTail,this._removalsTail=this._removalsTail._nextRemoved=i),i}_addIdentityChange(i,e){return i.item=e,this._identityChangesTail===null?this._identityChangesTail=this._identityChangesHead=i:this._identityChangesTail=this._identityChangesTail._nextIdentityChange=i,i}},z5=class{item;trackById;currentIndex=null;previousIndex=null;_nextPrevious=null;_prev=null;_next=null;_prevDup=null;_nextDup=null;_prevRemoved=null;_nextRemoved=null;_nextAdded=null;_nextMoved=null;_nextIdentityChange=null;constructor(i,e){this.item=i,this.trackById=e}},R5=class{_head=null;_tail=null;add(i){this._head===null?(this._head=this._tail=i,i._nextDup=null,i._prevDup=null):(this._tail._nextDup=i,i._prevDup=this._tail,i._nextDup=null,this._tail=i)}get(i,e){let n;for(n=this._head;n!==null;n=n._nextDup)if((e===null||e<=n.currentIndex)&&Object.is(n.trackById,i))return n;return null}remove(i){let e=i._prevDup,n=i._nextDup;return e===null?this._head=n:e._nextDup=n,n===null?this._tail=e:n._prevDup=e,this._head===null}},mm=class{map=new Map;put(i){let e=i.trackById,n=this.map.get(e);n||(n=new R5,this.map.set(e,n)),n.add(i)}get(i,e){let n=i,o=this.map.get(n);return o?o.get(i,e):null}remove(i){let e=i.trackById;return this.map.get(e).remove(i)&&this.map.delete(e),i}get isEmpty(){return this.map.size===0}clear(){this.map.clear()}};function Iw(t,i,e){let n=t.previousIndex;if(n===null)return n;let o=0;return e&&n{if(e&&e.key===o)this._maybeAddToChanges(e,n),this._appendAfter=e,e=e._next;else{let r=this._getOrCreateRecordForKey(o,n);e=this._insertBeforeOrAppend(e,r)}}),e){e._prev&&(e._prev._next=null),this._removalsHead=e;for(let n=e;n!==null;n=n._nextRemoved)n===this._mapHead&&(this._mapHead=null),this._records.delete(n.key),n._nextRemoved=n._next,n.previousValue=n.currentValue,n.currentValue=null,n._prev=null,n._next=null}return this._changesTail&&(this._changesTail._nextChanged=null),this._additionsTail&&(this._additionsTail._nextAdded=null),this.isDirty}_insertBeforeOrAppend(i,e){if(i){let n=i._prev;return e._next=i,e._prev=n,i._prev=e,n&&(n._next=e),i===this._mapHead&&(this._mapHead=e),this._appendAfter=i,i}return this._appendAfter?(this._appendAfter._next=e,e._prev=this._appendAfter):this._mapHead=e,this._appendAfter=e,null}_getOrCreateRecordForKey(i,e){if(this._records.has(i)){let o=this._records.get(i);this._maybeAddToChanges(o,e);let r=o._prev,a=o._next;return r&&(r._next=a),a&&(a._prev=r),o._next=null,o._prev=null,o}let n=new V5(i);return this._records.set(i,n),n.currentValue=e,this._addToAdditions(n),n}_reset(){if(this.isDirty){let i;for(this._previousMapHead=this._mapHead,i=this._previousMapHead;i!==null;i=i._next)i._nextPrevious=i._next;for(i=this._changesHead;i!==null;i=i._nextChanged)i.previousValue=i.currentValue;for(i=this._additionsHead;i!=null;i=i._nextAdded)i.previousValue=i.currentValue;this._changesHead=this._changesTail=null,this._additionsHead=this._additionsTail=null,this._removalsHead=null}}_maybeAddToChanges(i,e){Object.is(e,i.currentValue)||(i.previousValue=i.currentValue,i.currentValue=e,this._addToChanges(i))}_addToAdditions(i){this._additionsHead===null?this._additionsHead=this._additionsTail=i:(this._additionsTail._nextAdded=i,this._additionsTail=i)}_addToChanges(i){this._changesHead===null?this._changesHead=this._changesTail=i:(this._changesTail._nextChanged=i,this._changesTail=i)}_forEach(i,e){i instanceof Map?i.forEach(e):Object.keys(i).forEach(n=>e(i[n],n))}},V5=class{key;previousValue=null;currentValue=null;_nextPrevious=null;_next=null;_prev=null;_nextAdded=null;_nextRemoved=null;_nextChanged=null;constructor(i){this.key=i}};function Ow(){return new Io([new L5])}var Io=(()=>{class t{factories;static \u0275prov=R({token:t,providedIn:"root",factory:Ow});constructor(e){this.factories=e}static create(e,n){if(n!=null){let o=n.factories.slice();e=e.concat(o)}return new t(e)}static extend(e){return{provide:t,useFactory:()=>{let n=d(t,{optional:!0,skipSelf:!0});return t.create(e,n||Ow())}}}find(e){let n=this.factories.find(o=>o.supports(e));if(n!=null)return n;throw new pe(901,!1)}}return t})();function Tw(){return new hm([new N5])}var hm=(()=>{class t{static \u0275prov=R({token:t,providedIn:"root",factory:Tw});factories;constructor(e){this.factories=e}static create(e,n){if(n){let o=n.factories.slice();e=e.concat(o)}return new t(e)}static extend(e){return{provide:t,useFactory:()=>{let n=d(t,{optional:!0,skipSelf:!0});return t.create(e,n||Tw())}}}find(e){let n=this.factories.find(o=>o.supports(e));if(n)return n;throw new pe(901,!1)}}return t})();var Bw=H5(null,"core",[]),jw=(()=>{class t{constructor(e){}static \u0275fac=function(n){return new(n||t)(ke(li))};static \u0275mod=J({type:t});static \u0275inj=X({})}return t})();function H(t){return typeof t=="boolean"?t:t!=null&&t!=="false"}function ut(t,i=NaN){return!isNaN(parseFloat(t))&&!isNaN(Number(t))?Number(t):i}var P5=Symbol("NOT_SET"),Hw=new Set,eq=Ne(q({},X2),{consumerIsAlwaysLive:!0,consumerAllowSignalWrites:!0,value:P5,cleanup:null,consumerMarkedDirty(){if(this.sequence.impl.executing){if(this.sequence.lastPhase===null||this.sequence.lastPhase(ds(m),m.value),m.signal[Yn]=m,m.registerCleanupFn=f=>(m.cleanup??=new Set).add(f),this.nodes[s]=m,this.hooks[s]=f=>m.phaseFn(f)}}afterRun(){super.afterRun(),this.lastPhase=null}destroy(){super.destroy();for(let i of this.nodes)if(i)try{for(let e of i.cleanup??Hw)e()}finally{ms(i)}}};function Uw(t,i){let e=i?.injector??d(be),n=e.get(Uo),o=e.get(U4),r=e.get(Ss,null,{optional:!0});o.impl??=e.get(n5);let a=t;typeof a=="function"&&(a={mixedReadWrite:t});let s=e.get(Ac,null,{optional:!0}),c=new B5(o.impl,[a.earlyRead,a.write,a.mixedReadWrite,a.read],s?.view,n,e,r?.snapshot(null));return o.impl.register(c),c}function gm(t,i){let e=Qr(t),n=i.elementInjector||Kl();return new ws(e).create(n,i.projectableNodes,i.hostElement,i.environmentInjector,i.directives,i.bindings)}function $w(t){let i=Qr(t);if(!i)return null;let e=new ws(i);return{get selector(){return e.selector},get type(){return e.componentType},get inputs(){return e.inputs},get outputs(){return e.outputs},get ngContentSelectors(){return e.ngContentSelectors},get isStandalone(){return i.standalone},get isSignal(){return i.signals}}}var qw=null;function Oo(){return qw}function $5(t){qw??=t}var Gd=class{},Wd=(()=>{class t{historyGo(e){throw new Error("")}static \u0275fac=function(n){return new(n||t)};static \u0275prov=R({token:t,factory:()=>d(Yw),providedIn:"platform"})}return t})(),G5=new L(""),Yw=(()=>{class t extends Wd{_location;_history;_doc=d(Me);constructor(){super(),this._location=window.location,this._history=window.history}getBaseHrefFromDOM(){return Oo().getBaseHref(this._doc)}onPopState(e){let n=Oo().getGlobalEventTarget(this._doc,"window");return n.addEventListener("popstate",e,!1),()=>n.removeEventListener("popstate",e)}onHashChange(e){let n=Oo().getGlobalEventTarget(this._doc,"window");return n.addEventListener("hashchange",e,!1),()=>n.removeEventListener("hashchange",e)}get href(){return this._location.href}get protocol(){return this._location.protocol}get hostname(){return this._location.hostname}get port(){return this._location.port}get pathname(){return this._location.pathname}get search(){return this._location.search}get hash(){return this._location.hash}set pathname(e){this._location.pathname=e}pushState(e,n,o){this._history.pushState(e,n,o)}replaceState(e,n,o){this._history.replaceState(e,n,o)}forward(){this._history.forward()}back(){this._history.back()}historyGo(e=0){this._history.go(e)}getState(){return this._history.state}static \u0275fac=function(n){return new(n||t)};static \u0275prov=R({token:t,factory:()=>new t,providedIn:"platform"})}return t})();function _m(t,i){return t?i?t.endsWith("/")?i.startsWith("/")?t+i.slice(1):t+i:i.startsWith("/")?t+i:`${t}/${i}`:t:i}function Gw(t){let i=t.search(/#|\?|$/);return t[i-1]==="/"?t.slice(0,i-1)+t.slice(i):t}function Dr(t){return t&&t[0]!=="?"?`?${t}`:t}var Sr=(()=>{class t{historyGo(e){throw new Error("")}static \u0275fac=function(n){return new(n||t)};static \u0275prov=R({token:t,factory:()=>d(vm),providedIn:"root"})}return t})(),bm=new L(""),vm=(()=>{class t extends Sr{_platformLocation;_baseHref;_removeListenerFns=[];constructor(e,n){super(),this._platformLocation=e,this._baseHref=n??this._platformLocation.getBaseHrefFromDOM()??d(Me).location?.origin??""}ngOnDestroy(){for(;this._removeListenerFns.length;)this._removeListenerFns.pop()()}onPopState(e){this._removeListenerFns.push(this._platformLocation.onPopState(e),this._platformLocation.onHashChange(e))}getBaseHref(){return this._baseHref}prepareExternalUrl(e){return _m(this._baseHref,e)}path(e=!1){let n=this._platformLocation.pathname+Dr(this._platformLocation.search),o=this._platformLocation.hash;return o&&e?`${n}${o}`:n}pushState(e,n,o,r){let a=this.prepareExternalUrl(o+Dr(r));this._platformLocation.pushState(e,n,a)}replaceState(e,n,o,r){let a=this.prepareExternalUrl(o+Dr(r));this._platformLocation.replaceState(e,n,a)}forward(){this._platformLocation.forward()}back(){this._platformLocation.back()}getState(){return this._platformLocation.getState()}historyGo(e=0){this._platformLocation.historyGo?.(e)}static \u0275fac=function(n){return new(n||t)(ke(Wd),ke(bm,8))};static \u0275prov=R({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})(),Jo=(()=>{class t{_subject=new B;_basePath;_locationStrategy;_urlChangeListeners=[];_urlChangeSubscription=null;constructor(e){this._locationStrategy=e;let n=this._locationStrategy.getBaseHref();this._basePath=iq(Gw(Ww(n))),this._locationStrategy.onPopState(o=>{this._subject.next({url:this.path(!0),pop:!0,state:o.state,type:o.type})})}ngOnDestroy(){this._urlChangeSubscription?.unsubscribe(),this._urlChangeListeners=[]}path(e=!1){return this.normalize(this._locationStrategy.path(e))}getState(){return this._locationStrategy.getState()}isCurrentPathEqualTo(e,n=""){return this.path()==this.normalize(e+Dr(n))}normalize(e){return t.stripTrailingSlash(nq(this._basePath,Ww(e)))}prepareExternalUrl(e){return e&&e[0]!=="/"&&(e="/"+e),this._locationStrategy.prepareExternalUrl(e)}go(e,n="",o=null){this._locationStrategy.pushState(o,"",e,n),this._notifyUrlChangeListeners(this.prepareExternalUrl(e+Dr(n)),o)}replaceState(e,n="",o=null){this._locationStrategy.replaceState(o,"",e,n),this._notifyUrlChangeListeners(this.prepareExternalUrl(e+Dr(n)),o)}forward(){this._locationStrategy.forward()}back(){this._locationStrategy.back()}historyGo(e=0){this._locationStrategy.historyGo?.(e)}onUrlChange(e){return this._urlChangeListeners.push(e),this._urlChangeSubscription??=this.subscribe(n=>{this._notifyUrlChangeListeners(n.url,n.state)}),()=>{let n=this._urlChangeListeners.indexOf(e);this._urlChangeListeners.splice(n,1),this._urlChangeListeners.length===0&&(this._urlChangeSubscription?.unsubscribe(),this._urlChangeSubscription=null)}}_notifyUrlChangeListeners(e="",n){this._urlChangeListeners.forEach(o=>o(e,n))}subscribe(e,n,o){return this._subject.subscribe({next:e,error:n??void 0,complete:o??void 0})}static normalizeQueryParams=Dr;static joinWithSlash=_m;static stripTrailingSlash=Gw;static \u0275fac=function(n){return new(n||t)(ke(Sr))};static \u0275prov=R({token:t,factory:()=>tq(),providedIn:"root"})}return t})();function tq(){return new Jo(ke(Sr))}function nq(t,i){if(!t||!i.startsWith(t))return i;let e=i.substring(t.length);return e===""||["/",";","?","#"].includes(e[0])?e:i}function Ww(t){return t.replace(/\/index.html$/,"")}function iq(t){if(new RegExp("^(https?:)?//").test(t)){let[,e]=t.split(/\/\/[^\/]+/);return e}return t}var t7=(()=>{class t extends Sr{_platformLocation;_baseHref="";_removeListenerFns=[];constructor(e,n){super(),this._platformLocation=e,n!=null&&(this._baseHref=n)}ngOnDestroy(){for(;this._removeListenerFns.length;)this._removeListenerFns.pop()()}onPopState(e){this._removeListenerFns.push(this._platformLocation.onPopState(e),this._platformLocation.onHashChange(e))}getBaseHref(){return this._baseHref}path(e=!1){let n=this._platformLocation.hash??"#";return n.length>0?n.substring(1):n}prepareExternalUrl(e){let n=_m(this._baseHref,e);return n.length>0?"#"+n:n}pushState(e,n,o,r){let a=this.prepareExternalUrl(o+Dr(r))||this._platformLocation.pathname;this._platformLocation.pushState(e,n,a)}replaceState(e,n,o,r){let a=this.prepareExternalUrl(o+Dr(r))||this._platformLocation.pathname;this._platformLocation.replaceState(e,n,a)}forward(){this._platformLocation.forward()}back(){this._platformLocation.back()}getState(){return this._platformLocation.getState()}historyGo(e=0){this._platformLocation.historyGo?.(e)}static \u0275fac=function(n){return new(n||t)(ke(Wd),ke(bm,8))};static \u0275prov=R({token:t,factory:t.\u0275fac})}return t})(),nD={ADP:[void 0,void 0,0],AFN:[void 0,"\u060B",0],ALL:[void 0,void 0,0],AMD:[void 0,"\u058F",2],AOA:[void 0,"Kz"],ARS:[void 0,"$"],AUD:["A$","$"],AZN:[void 0,"\u20BC"],BAM:[void 0,"KM"],BBD:[void 0,"$"],BDT:[void 0,"\u09F3"],BHD:[void 0,void 0,3],BIF:[void 0,void 0,0],BMD:[void 0,"$"],BND:[void 0,"$"],BOB:[void 0,"Bs"],BRL:["R$"],BSD:[void 0,"$"],BWP:[void 0,"P"],BYN:[void 0,void 0,2],BYR:[void 0,void 0,0],BZD:[void 0,"$"],CAD:["CA$","$",2],CHF:[void 0,void 0,2],CLF:[void 0,void 0,4],CLP:[void 0,"$",0],CNY:["CN\xA5","\xA5"],COP:[void 0,"$",2],CRC:[void 0,"\u20A1",2],CUC:[void 0,"$"],CUP:[void 0,"$"],CZK:[void 0,"K\u010D",2],DJF:[void 0,void 0,0],DKK:[void 0,"kr",2],DOP:[void 0,"$"],EGP:[void 0,"E\xA3"],ESP:[void 0,"\u20A7",0],EUR:["\u20AC"],FJD:[void 0,"$"],FKP:[void 0,"\xA3"],GBP:["\xA3"],GEL:[void 0,"\u20BE"],GHS:[void 0,"GH\u20B5"],GIP:[void 0,"\xA3"],GNF:[void 0,"FG",0],GTQ:[void 0,"Q"],GYD:[void 0,"$",2],HKD:["HK$","$"],HNL:[void 0,"L"],HRK:[void 0,"kn"],HUF:[void 0,"Ft",2],IDR:[void 0,"Rp",2],ILS:["\u20AA"],INR:["\u20B9"],IQD:[void 0,void 0,0],IRR:[void 0,void 0,0],ISK:[void 0,"kr",0],ITL:[void 0,void 0,0],JMD:[void 0,"$"],JOD:[void 0,void 0,3],JPY:["\xA5",void 0,0],KHR:[void 0,"\u17DB"],KMF:[void 0,"CF",0],KPW:[void 0,"\u20A9",0],KRW:["\u20A9",void 0,0],KWD:[void 0,void 0,3],KYD:[void 0,"$"],KZT:[void 0,"\u20B8"],LAK:[void 0,"\u20AD",0],LBP:[void 0,"L\xA3",0],LKR:[void 0,"Rs"],LRD:[void 0,"$"],LTL:[void 0,"Lt"],LUF:[void 0,void 0,0],LVL:[void 0,"Ls"],LYD:[void 0,void 0,3],MGA:[void 0,"Ar",0],MGF:[void 0,void 0,0],MMK:[void 0,"K",0],MNT:[void 0,"\u20AE",2],MRO:[void 0,void 0,0],MUR:[void 0,"Rs",2],MXN:["MX$","$"],MYR:[void 0,"RM"],NAD:[void 0,"$"],NGN:[void 0,"\u20A6"],NIO:[void 0,"C$"],NOK:[void 0,"kr",2],NPR:[void 0,"Rs"],NZD:["NZ$","$"],OMR:[void 0,void 0,3],PHP:["\u20B1"],PKR:[void 0,"Rs",2],PLN:[void 0,"z\u0142"],PYG:[void 0,"\u20B2",0],RON:[void 0,"lei"],RSD:[void 0,void 0,0],RUB:[void 0,"\u20BD"],RWF:[void 0,"RF",0],SBD:[void 0,"$"],SEK:[void 0,"kr",2],SGD:[void 0,"$"],SHP:[void 0,"\xA3"],SLE:[void 0,void 0,2],SLL:[void 0,void 0,0],SOS:[void 0,void 0,0],SRD:[void 0,"$"],SSP:[void 0,"\xA3"],STD:[void 0,void 0,0],STN:[void 0,"Db"],SYP:[void 0,"\xA3",0],THB:[void 0,"\u0E3F"],TMM:[void 0,void 0,0],TND:[void 0,void 0,3],TOP:[void 0,"T$"],TRL:[void 0,void 0,0],TRY:[void 0,"\u20BA"],TTD:[void 0,"$"],TWD:["NT$","$",2],TZS:[void 0,void 0,2],UAH:[void 0,"\u20B4"],UGX:[void 0,void 0,0],USD:["$"],UYI:[void 0,void 0,0],UYU:[void 0,"$"],UYW:[void 0,void 0,4],UZS:[void 0,void 0,2],VEF:[void 0,"Bs",2],VND:["\u20AB",void 0,0],VUV:[void 0,void 0,0],XAF:["FCFA",void 0,0],XCD:["EC$","$"],XOF:["F\u202FCFA",void 0,0],XPF:["CFPF",void 0,0],XXX:["\xA4"],YER:[void 0,void 0,0],ZAR:[void 0,"R"],ZMK:[void 0,void 0,0],ZMW:[void 0,"ZK"],ZWD:[void 0,void 0,0]},Im=(function(t){return t[t.Decimal=0]="Decimal",t[t.Percent=1]="Percent",t[t.Currency=2]="Currency",t[t.Scientific=3]="Scientific",t})(Im||{});var ji=(function(t){return t[t.Format=0]="Format",t[t.Standalone=1]="Standalone",t})(ji||{}),Jt=(function(t){return t[t.Narrow=0]="Narrow",t[t.Abbreviated=1]="Abbreviated",t[t.Wide=2]="Wide",t[t.Short=3]="Short",t})(Jt||{}),ho=(function(t){return t[t.Short=0]="Short",t[t.Medium=1]="Medium",t[t.Long=2]="Long",t[t.Full=3]="Full",t})(ho||{}),Di={Decimal:0,Group:1,List:2,PercentSign:3,PlusSign:4,MinusSign:5,Exponential:6,SuperscriptingExponent:7,PerMille:8,Infinity:9,NaN:10,TimeSeparator:11,CurrencyDecimal:12,CurrencyGroup:13};function iD(t){return eo(t)[bn.LocaleId]}function oD(t,i,e){let n=eo(t),o=[n[bn.DayPeriodsFormat],n[bn.DayPeriodsStandalone]],r=er(o,i);return er(r,e)}function rD(t,i,e){let n=eo(t),o=[n[bn.DaysFormat],n[bn.DaysStandalone]],r=er(o,i);return er(r,e)}function aD(t,i,e){let n=eo(t),o=[n[bn.MonthsFormat],n[bn.MonthsStandalone]],r=er(o,i);return er(r,e)}function sD(t,i){let n=eo(t)[bn.Eras];return er(n,i)}function qd(t,i){let e=eo(t);return er(e[bn.DateFormat],i)}function Yd(t,i){let e=eo(t);return er(e[bn.TimeFormat],i)}function Qd(t,i){let n=eo(t)[bn.DateTimeFormat];return er(n,i)}function Er(t,i){let e=eo(t),n=e[bn.NumberSymbols][i];if(typeof n>"u"){if(i===Di.CurrencyDecimal)return e[bn.NumberSymbols][Di.Decimal];if(i===Di.CurrencyGroup)return e[bn.NumberSymbols][Di.Group]}return n}function n7(t,i){return eo(t)[bn.NumberFormats][i]}function oq(t){return eo(t)[bn.Currencies]}function cD(t){if(!t[bn.ExtraData])throw new pe(2303,!1)}function lD(t){let i=eo(t);return cD(i),(i[bn.ExtraData][2]||[]).map(n=>typeof n=="string"?W5(n):[W5(n[0]),W5(n[1])])}function dD(t,i,e){let n=eo(t);cD(n);let o=[n[bn.ExtraData][0],n[bn.ExtraData][1]],r=er(o,i)||[];return er(r,e)||[]}function er(t,i){for(let e=i;e>-1;e--)if(typeof t[e]<"u")return t[e];throw new pe(2304,!1)}function W5(t){let[i,e]=t.split(":");return{hours:+i,minutes:+e}}function uD(t,i,e="en"){let n=oq(e)[t]||nD[t]||[],o=n[1];return i==="narrow"&&typeof o=="string"?o:n[0]||t}var rq=2;function mD(t){let i,e=nD[t];return e&&(i=e[2]),typeof i=="number"?i:rq}var aq=/^(\d{4,})-?(\d\d)-?(\d\d)(?:T(\d\d)(?::?(\d\d)(?::?(\d\d)(?:\.(\d+))?)?)?(Z|([+-])(\d\d):?(\d\d))?)?$/,ym={},sq=/((?:[^BEGHLMOSWYZabcdhmswyz']+)|(?:'(?:[^']|'')*')|(?:G{1,5}|y{1,4}|Y{1,4}|M{1,5}|L{1,5}|w{1,2}|W{1}|d{1,2}|E{1,6}|c{1,6}|a{1,5}|b{1,5}|B{1,5}|h{1,2}|H{1,2}|m{1,2}|s{1,2}|S{1,3}|z{1,4}|Z{1,5}|O{1,4}))([\s\S]*)/;function pD(t,i,e,n){let o=gq(t);i=$a(e,i)||i;let a=[],s;for(;i;)if(s=sq.exec(i),s){a=a.concat(s.slice(1));let f=a.pop();if(!f)break;i=f}else{a.push(i);break}let c=o.getTimezoneOffset();n&&(c=hD(n,c),o=hq(o,n));let m="";return a.forEach(f=>{let v=pq(f);m+=v?v(o,e,c):f==="''"?"'":f.replace(/(^'|'$)/g,"").replace(/''/g,"'")}),m}function Dm(t,i,e){let n=new Date(0);return n.setFullYear(t,i,e),n.setHours(0,0,0),n}function $a(t,i){let e=iD(t);if(ym[e]??={},ym[e][i])return ym[e][i];let n="";switch(i){case"shortDate":n=qd(t,ho.Short);break;case"mediumDate":n=qd(t,ho.Medium);break;case"longDate":n=qd(t,ho.Long);break;case"fullDate":n=qd(t,ho.Full);break;case"shortTime":n=Yd(t,ho.Short);break;case"mediumTime":n=Yd(t,ho.Medium);break;case"longTime":n=Yd(t,ho.Long);break;case"fullTime":n=Yd(t,ho.Full);break;case"short":let o=$a(t,"shortTime"),r=$a(t,"shortDate");n=Cm(Qd(t,ho.Short),[o,r]);break;case"medium":let a=$a(t,"mediumTime"),s=$a(t,"mediumDate");n=Cm(Qd(t,ho.Medium),[a,s]);break;case"long":let c=$a(t,"longTime"),m=$a(t,"longDate");n=Cm(Qd(t,ho.Long),[c,m]);break;case"full":let f=$a(t,"fullTime"),v=$a(t,"fullDate");n=Cm(Qd(t,ho.Full),[f,v]);break}return n&&(ym[e][i]=n),n}function Cm(t,i){return i&&(t=t.replace(/\{([^}]+)}/g,function(e,n){return i!=null&&n in i?i[n]:e})),t}function kr(t,i,e="-",n,o){let r="";(t<0||o&&t<=0)&&(o?t=-t+1:(t=-t,r=e));let a=String(t);for(;a.length0||s>-e)&&(s+=e),t===3)s===0&&e===-12&&(s=12);else if(t===6)return cq(s,i);let c=Er(a,Di.MinusSign);return kr(s,i,c,n,o)}}function lq(t,i){switch(t){case 0:return i.getFullYear();case 1:return i.getMonth();case 2:return i.getDate();case 3:return i.getHours();case 4:return i.getMinutes();case 5:return i.getSeconds();case 6:return i.getMilliseconds();case 7:return i.getDay();default:throw new pe(2301,!1)}}function un(t,i,e=ji.Format,n=!1){return function(o,r){return dq(o,r,t,i,e,n)}}function dq(t,i,e,n,o,r){switch(e){case 2:return aD(i,o,n)[t.getMonth()];case 1:return rD(i,o,n)[t.getDay()];case 0:let a=t.getHours(),s=t.getMinutes();if(r){let m=lD(i),f=dD(i,o,n),v=m.findIndex(x=>{if(Array.isArray(x)){let[w,O]=x,K=a>=w.hours&&s>=w.minutes,Y=a0?Math.floor(o/60):Math.ceil(o/60);switch(t){case 0:return(o>=0?"+":"")+kr(a,2,r)+kr(Math.abs(o%60),2,r);case 1:return"GMT"+(o>=0?"+":"")+kr(a,1,r);case 2:return"GMT"+(o>=0?"+":"")+kr(a,2,r)+":"+kr(Math.abs(o%60),2,r);case 3:return n===0?"Z":(o>=0?"+":"")+kr(a,2,r)+":"+kr(Math.abs(o%60),2,r);default:throw new pe(2310,!1)}}}var uq=0,wm=4;function mq(t){let i=Dm(t,uq,1).getDay();return Dm(t,0,1+(i<=wm?wm:wm+7)-i)}function fD(t){let i=t.getDay(),e=i===0?-3:wm-i;return Dm(t.getFullYear(),t.getMonth(),t.getDate()+e)}function q5(t,i=!1){return function(e,n){let o;if(i){let r=new Date(e.getFullYear(),e.getMonth(),1).getDay()-1,a=e.getDate();o=1+Math.floor((a+r)/7)}else{let r=fD(e),a=mq(r.getFullYear()),s=r.getTime()-a.getTime();o=1+Math.round(s/6048e5)}return kr(o,t,Er(n,Di.MinusSign))}}function Mm(t,i=!1){return function(e,n){let r=fD(e).getFullYear();return kr(r,t,Er(n,Di.MinusSign),i)}}var Y5={};function pq(t){if(Y5[t])return Y5[t];let i;switch(t){case"G":case"GG":case"GGG":i=un(3,Jt.Abbreviated);break;case"GGGG":i=un(3,Jt.Wide);break;case"GGGGG":i=un(3,Jt.Narrow);break;case"y":i=Jn(0,1,0,!1,!0);break;case"yy":i=Jn(0,2,0,!0,!0);break;case"yyy":i=Jn(0,3,0,!1,!0);break;case"yyyy":i=Jn(0,4,0,!1,!0);break;case"Y":i=Mm(1);break;case"YY":i=Mm(2,!0);break;case"YYY":i=Mm(3);break;case"YYYY":i=Mm(4);break;case"M":case"L":i=Jn(1,1,1);break;case"MM":case"LL":i=Jn(1,2,1);break;case"MMM":i=un(2,Jt.Abbreviated);break;case"MMMM":i=un(2,Jt.Wide);break;case"MMMMM":i=un(2,Jt.Narrow);break;case"LLL":i=un(2,Jt.Abbreviated,ji.Standalone);break;case"LLLL":i=un(2,Jt.Wide,ji.Standalone);break;case"LLLLL":i=un(2,Jt.Narrow,ji.Standalone);break;case"w":i=q5(1);break;case"ww":i=q5(2);break;case"W":i=q5(1,!0);break;case"d":i=Jn(2,1);break;case"dd":i=Jn(2,2);break;case"c":case"cc":i=Jn(7,1);break;case"ccc":i=un(1,Jt.Abbreviated,ji.Standalone);break;case"cccc":i=un(1,Jt.Wide,ji.Standalone);break;case"ccccc":i=un(1,Jt.Narrow,ji.Standalone);break;case"cccccc":i=un(1,Jt.Short,ji.Standalone);break;case"E":case"EE":case"EEE":i=un(1,Jt.Abbreviated);break;case"EEEE":i=un(1,Jt.Wide);break;case"EEEEE":i=un(1,Jt.Narrow);break;case"EEEEEE":i=un(1,Jt.Short);break;case"a":case"aa":case"aaa":i=un(0,Jt.Abbreviated);break;case"aaaa":i=un(0,Jt.Wide);break;case"aaaaa":i=un(0,Jt.Narrow);break;case"b":case"bb":case"bbb":i=un(0,Jt.Abbreviated,ji.Standalone,!0);break;case"bbbb":i=un(0,Jt.Wide,ji.Standalone,!0);break;case"bbbbb":i=un(0,Jt.Narrow,ji.Standalone,!0);break;case"B":case"BB":case"BBB":i=un(0,Jt.Abbreviated,ji.Format,!0);break;case"BBBB":i=un(0,Jt.Wide,ji.Format,!0);break;case"BBBBB":i=un(0,Jt.Narrow,ji.Format,!0);break;case"h":i=Jn(3,1,-12);break;case"hh":i=Jn(3,2,-12);break;case"H":i=Jn(3,1);break;case"HH":i=Jn(3,2);break;case"m":i=Jn(4,1);break;case"mm":i=Jn(4,2);break;case"s":i=Jn(5,1);break;case"ss":i=Jn(5,2);break;case"S":i=Jn(6,1);break;case"SS":i=Jn(6,2);break;case"SSS":i=Jn(6,3);break;case"Z":case"ZZ":case"ZZZ":i=xm(0);break;case"ZZZZZ":i=xm(3);break;case"O":case"OO":case"OOO":case"z":case"zz":case"zzz":i=xm(1);break;case"OOOO":case"ZZZZ":case"zzzz":i=xm(2);break;default:return null}return Y5[t]=i,i}function hD(t,i){t=t.replace(/:/g,"");let e=Date.parse("Jan 01, 1970 00:00:00 "+t)/6e4;return isNaN(e)?i:e}function fq(t,i){return t=new Date(t.getTime()),t.setMinutes(t.getMinutes()+i),t}function hq(t,i,e){let o=t.getTimezoneOffset(),r=hD(i,o);return fq(t,-1*(r-o))}function gq(t){if(Qw(t))return t;if(typeof t=="number"&&!isNaN(t))return new Date(t);if(typeof t=="string"){if(t=t.trim(),/^(\d{4}(-\d{1,2}(-\d{1,2})?)?)$/.test(t)){let[o,r=1,a=1]=t.split("-").map(s=>+s);return Dm(o,r-1,a)}let e=parseFloat(t);if(!isNaN(t-e))return new Date(e);let n;if(n=t.match(aq))return _q(n)}let i=new Date(t);if(!Qw(i))throw new pe(2311,!1);return i}function _q(t){let i=new Date(0),e=0,n=0,o=t[8]?i.setUTCFullYear:i.setFullYear,r=t[8]?i.setUTCHours:i.setHours;t[9]&&(e=Number(t[9]+t[10]),n=Number(t[9]+t[11])),o.call(i,Number(t[1]),Number(t[2])-1,Number(t[3]));let a=Number(t[4]||0)-e,s=Number(t[5]||0)-n,c=Number(t[6]||0),m=Math.floor(parseFloat("0."+(t[7]||0))*1e3);return r.call(i,a,s,c,m),i}function Qw(t){return t instanceof Date&&!isNaN(t.valueOf())}var bq=/^(\d+)?\.((\d+)(-(\d+))?)?$/,Kw=22,Sm=".",Kd="0",vq=";",yq=",",Q5="#",Xw="\xA4";function gD(t,i,e,n,o,r,a=!1){let s="",c=!1;if(!isFinite(t))s=Er(e,Di.Infinity);else{let m=xq(t);a&&(m=Cq(m));let f=i.minInt,v=i.minFrac,x=i.maxFrac;if(r){let Oe=r.match(bq);if(Oe===null)throw new pe(2306,!1);let Mt=Oe[1],Et=Oe[3],Ht=Oe[5];Mt!=null&&(f=K5(Mt)),Et!=null&&(v=K5(Et)),Ht!=null?x=K5(Ht):Et!=null&&v>x&&(x=v)}Mq(m,v,x);let w=m.digits,O=m.integerLen,K=m.exponent,Y=[];for(c=w.every(Oe=>!Oe);O0?Y=w.splice(O,w.length):(Y=w,w=[0]);let Z=[];for(w.length>=i.lgSize&&Z.unshift(w.splice(-i.lgSize,w.length).join(""));w.length>i.gSize;)Z.unshift(w.splice(-i.gSize,w.length).join(""));w.length&&Z.unshift(w.join("")),s=Z.join(Er(e,n)),Y.length&&(s+=Er(e,o)+Y.join("")),K&&(s+=Er(e,Di.Exponential)+"+"+K)}return t<0&&!c?s=i.negPre+s+i.negSuf:s=i.posPre+s+i.posSuf,s}function Om(t,i,e,n,o){let r=n7(i,Im.Currency),a=bD(r,Er(i,Di.MinusSign));return a.minFrac=mD(n),a.maxFrac=a.minFrac,gD(t,a,i,Di.CurrencyGroup,Di.CurrencyDecimal,o).replace(Xw,e).replace(Xw,"").trim()}function _D(t,i,e){let n=n7(i,Im.Decimal),o=bD(n,Er(i,Di.MinusSign));return gD(t,o,i,Di.Group,Di.Decimal,e)}function bD(t,i="-"){let e={minInt:1,minFrac:0,maxFrac:0,posPre:"",posSuf:"",negPre:"",negSuf:"",gSize:0,lgSize:0},n=t.split(vq),o=n[0],r=n[1],a=o.indexOf(Sm)!==-1?o.split(Sm):[o.substring(0,o.lastIndexOf(Kd)+1),o.substring(o.lastIndexOf(Kd)+1)],s=a[0],c=a[1]||"";e.posPre=s.substring(0,s.indexOf(Q5));for(let f=0;f-1&&(i=i.replace(Sm,"")),(r=i.search(/e/i))>0?(o<0&&(o=r),o+=+i.slice(r+1),i=i.substring(0,r)):o<0&&(o=i.length),r=0;i.charAt(r)===Kd;r++);if(r===(s=i.length))n=[0],o=1;else{for(s--;i.charAt(s)===Kd;)s--;for(o-=r,n=[],a=0;r<=s;r++,a++)n[a]=Number(i.charAt(r))}return o>Kw&&(n=n.splice(0,Kw-1),e=o-1,o=1),{digits:n,exponent:e,integerLen:o}}function Mq(t,i,e){if(i>e)throw new pe(2307,!1);let n=t.digits,o=n.length-t.integerLen,r=Math.min(Math.max(i,o),e),a=r+t.integerLen,s=n[a];if(a>0){n.splice(Math.max(t.integerLen,a));for(let v=a;v=5)if(a-1<0){for(let v=0;v>a;v--)n.unshift(0),t.integerLen++;n.unshift(1),t.integerLen++}else n[a-1]++;for(;o=m?O.pop():c=!1),x>=10?1:0},0);f&&(n.unshift(f),t.integerLen++)}function K5(t){let i=parseInt(t);if(isNaN(i))throw new pe(2305,!1);return i}var X5=/\s+/,Zw=[],Un=(()=>{class t{_ngEl;_renderer;initialClasses=Zw;rawClass;stateMap=new Map;constructor(e,n){this._ngEl=e,this._renderer=n}set klass(e){this.initialClasses=e!=null?e.trim().split(X5):Zw}set ngClass(e){this.rawClass=typeof e=="string"?e.trim().split(X5):e}ngDoCheck(){for(let n of this.initialClasses)this._updateState(n,!0);let e=this.rawClass;if(Array.isArray(e)||e instanceof Set)for(let n of e)this._updateState(n,!0);else if(e!=null)for(let n of Object.keys(e))this._updateState(n,!!e[n]);this._applyStateDiff()}_updateState(e,n){let o=this.stateMap.get(e);o!==void 0?(o.enabled!==n&&(o.changed=!0,o.enabled=n),o.touched=!0):this.stateMap.set(e,{enabled:n,changed:!0,touched:!0})}_applyStateDiff(){for(let e of this.stateMap){let n=e[0],o=e[1];o.changed?(this._toggleClass(n,o.enabled),o.changed=!1):o.touched||(o.enabled&&this._toggleClass(n,!1),this.stateMap.delete(n)),o.touched=!1}}_toggleClass(e,n){e=e.trim(),e.length>0&&e.split(X5).forEach(o=>{n?this._renderer.addClass(this._ngEl.nativeElement,o):this._renderer.removeClass(this._ngEl.nativeElement,o)})}static \u0275fac=function(n){return new(n||t)(Ce(Q),Ce(Ke))};static \u0275dir=z({type:t,selectors:[["","ngClass",""]],inputs:{klass:[0,"class","klass"],ngClass:"ngClass"}})}return t})();var km=class{$implicit;ngForOf;index;count;constructor(i,e,n,o){this.$implicit=i,this.ngForOf=e,this.index=n,this.count=o}get first(){return this.index===0}get last(){return this.index===this.count-1}get even(){return this.index%2===0}get odd(){return!this.even}},vD=(()=>{class t{_viewContainer;_template;_differs;set ngForOf(e){this._ngForOf=e,this._ngForOfDirty=!0}set ngForTrackBy(e){this._trackByFn=e}get ngForTrackBy(){return this._trackByFn}_ngForOf=null;_ngForOfDirty=!0;_differ=null;_trackByFn;constructor(e,n,o){this._viewContainer=e,this._template=n,this._differs=o}set ngForTemplate(e){e&&(this._template=e)}ngDoCheck(){if(this._ngForOfDirty){this._ngForOfDirty=!1;let e=this._ngForOf;!this._differ&&e&&(this._differ=this._differs.find(e).create(this.ngForTrackBy))}if(this._differ){let e=this._differ.diff(this._ngForOf);e&&this._applyChanges(e)}}_applyChanges(e){let n=this._viewContainer;e.forEachOperation((o,r,a)=>{if(o.previousIndex==null)n.createEmbeddedView(this._template,new km(o.item,this._ngForOf,-1,-1),a===null?void 0:a);else if(a==null)n.remove(r===null?void 0:r);else if(r!==null){let s=n.get(r);n.move(s,a),Jw(s,o)}});for(let o=0,r=n.length;o{let r=n.get(o.currentIndex);Jw(r,o)})}static ngTemplateContextGuard(e,n){return!0}static \u0275fac=function(n){return new(n||t)(Ce(dt),Ce(tt),Ce(Io))};static \u0275dir=z({type:t,selectors:[["","ngFor","","ngForOf",""]],inputs:{ngForOf:"ngForOf",ngForTrackBy:"ngForTrackBy",ngForTemplate:"ngForTemplate"}})}return t})();function Jw(t,i){t.context.$implicit=i.item}var wq=(()=>{class t{_viewContainer;_context=new Em;_thenTemplateRef=null;_elseTemplateRef=null;_thenViewRef=null;_elseViewRef=null;constructor(e,n){this._viewContainer=e,this._thenTemplateRef=n}set ngIf(e){this._context.$implicit=this._context.ngIf=e,this._updateView()}set ngIfThen(e){eD(e,!1),this._thenTemplateRef=e,this._thenViewRef=null,this._updateView()}set ngIfElse(e){eD(e,!1),this._elseTemplateRef=e,this._elseViewRef=null,this._updateView()}_updateView(){this._context.$implicit?this._thenViewRef||(this._viewContainer.clear(),this._elseViewRef=null,this._thenTemplateRef&&(this._thenViewRef=this._viewContainer.createEmbeddedView(this._thenTemplateRef,this._context))):this._elseViewRef||(this._viewContainer.clear(),this._thenViewRef=null,this._elseTemplateRef&&(this._elseViewRef=this._viewContainer.createEmbeddedView(this._elseTemplateRef,this._context)))}static ngIfUseIfTypeGuard;static ngTemplateGuard_ngIf;static ngTemplateContextGuard(e,n){return!0}static \u0275fac=function(n){return new(n||t)(Ce(dt),Ce(tt))};static \u0275dir=z({type:t,selectors:[["","ngIf",""]],inputs:{ngIf:"ngIf",ngIfThen:"ngIfThen",ngIfElse:"ngIfElse"}})}return t})(),Em=class{$implicit=null;ngIf=null};function eD(t,i){if(t&&!t.createEmbeddedView)throw new pe(2020,!1)}var Z5=class{_viewContainerRef;_templateRef;_created=!1;constructor(i,e){this._viewContainerRef=i,this._templateRef=e}create(){this._created=!0,this._viewContainerRef.createEmbeddedView(this._templateRef)}destroy(){this._created=!1,this._viewContainerRef.clear()}enforceState(i){i&&!this._created?this.create():!i&&this._created&&this.destroy()}},yD=(()=>{class t{_defaultViews=[];_defaultUsed=!1;_caseCount=0;_lastCaseCheckIndex=0;_lastCasesMatched=!1;_ngSwitch;set ngSwitch(e){this._ngSwitch=e,this._caseCount===0&&this._updateDefaultCases(!0)}_addCase(){return this._caseCount++}_addDefault(e){this._defaultViews.push(e)}_matchCase(e){let n=e===this._ngSwitch;return this._lastCasesMatched||=n,this._lastCaseCheckIndex++,this._lastCaseCheckIndex===this._caseCount&&(this._updateDefaultCases(!this._lastCasesMatched),this._lastCaseCheckIndex=0,this._lastCasesMatched=!1),n}_updateDefaultCases(e){if(this._defaultViews.length>0&&e!==this._defaultUsed){this._defaultUsed=e;for(let n of this._defaultViews)n.enforceState(e)}}static \u0275fac=function(n){return new(n||t)};static \u0275dir=z({type:t,selectors:[["","ngSwitch",""]],inputs:{ngSwitch:"ngSwitch"}})}return t})(),Dq=(()=>{class t{ngSwitch;_view;ngSwitchCase;constructor(e,n,o){this.ngSwitch=o,o._addCase(),this._view=new Z5(e,n)}ngDoCheck(){this._view.enforceState(this.ngSwitch._matchCase(this.ngSwitchCase))}static \u0275fac=function(n){return new(n||t)(Ce(dt),Ce(tt),Ce(yD,9))};static \u0275dir=z({type:t,selectors:[["","ngSwitchCase",""]],inputs:{ngSwitchCase:"ngSwitchCase"}})}return t})();var i7=(()=>{class t{_ngEl;_differs;_renderer;_ngStyle=null;_differ=null;constructor(e,n,o){this._ngEl=e,this._differs=n,this._renderer=o}set ngStyle(e){this._ngStyle=e,!this._differ&&e&&(this._differ=this._differs.find(e).create())}ngDoCheck(){if(this._differ){let e=this._differ.diff(this._ngStyle);e&&this._applyChanges(e)}}_setStyle(e,n){let[o,r]=e.split("."),a=o.indexOf("-")===-1?void 0:xr.DashCase;n!=null?this._renderer.setStyle(this._ngEl.nativeElement,o,r?`${n}${r}`:n,a):this._renderer.removeStyle(this._ngEl.nativeElement,o,a)}_applyChanges(e){e.forEachRemovedItem(n=>this._setStyle(n.key,null)),e.forEachAddedItem(n=>this._setStyle(n.key,n.currentValue)),e.forEachChangedItem(n=>this._setStyle(n.key,n.currentValue))}static \u0275fac=function(n){return new(n||t)(Ce(Q),Ce(hm),Ce(Ke))};static \u0275dir=z({type:t,selectors:[["","ngStyle",""]],inputs:{ngStyle:"ngStyle"}})}return t})(),Es=(()=>{class t{_viewContainerRef;_viewRef=null;ngTemplateOutletContext=null;ngTemplateOutlet=null;ngTemplateOutletInjector=null;constructor(e){this._viewContainerRef=e}ngOnChanges(e){if(this._shouldRecreateView(e)){let n=this._viewContainerRef;if(this._viewRef&&n.remove(n.indexOf(this._viewRef)),!this.ngTemplateOutlet){this._viewRef=null;return}let o=this._createContextForwardProxy();this._viewRef=n.createEmbeddedView(this.ngTemplateOutlet,o,{injector:this.ngTemplateOutletInjector??void 0})}}_shouldRecreateView(e){return!!e.ngTemplateOutlet||!!e.ngTemplateOutletInjector}_createContextForwardProxy(){return new Proxy({},{set:(e,n,o)=>this.ngTemplateOutletContext?Reflect.set(this.ngTemplateOutletContext,n,o):!1,get:(e,n,o)=>{if(this.ngTemplateOutletContext)return Reflect.get(this.ngTemplateOutletContext,n,o)}})}static \u0275fac=function(n){return new(n||t)(Ce(dt))};static \u0275dir=z({type:t,selectors:[["","ngTemplateOutlet",""]],inputs:{ngTemplateOutletContext:"ngTemplateOutletContext",ngTemplateOutlet:"ngTemplateOutlet",ngTemplateOutletInjector:"ngTemplateOutletInjector"},features:[Re]})}return t})();function k1(t,i){return new pe(2100,!1)}var J5=class{createSubscription(i,e,n){return Vn(()=>i.subscribe({next:e,error:n}))}dispose(i){Vn(()=>i.unsubscribe())}},e7=class{createSubscription(i,e,n){return i.then(o=>e?.(o),o=>n?.(o)),{unsubscribe:()=>{e=null,n=null}}}dispose(i){i.unsubscribe()}},Sq=new e7,kq=new J5,Xd=(()=>{class t{_ref;_latestValue=null;markForCheckOnValueUpdate=!0;_subscription=null;_obj=null;_strategy=null;applicationErrorHandler=d(Zi);constructor(e){this._ref=e}ngOnDestroy(){this._subscription&&this._dispose(),this._ref=null}transform(e){if(!this._obj){if(e)try{this.markForCheckOnValueUpdate=!1,this._subscribe(e)}finally{this.markForCheckOnValueUpdate=!0}return this._latestValue}return e!==this._obj?(this._dispose(),this.transform(e)):this._latestValue}_subscribe(e){this._obj=e,this._strategy=this._selectStrategy(e),this._subscription=this._strategy.createSubscription(e,n=>this._updateLatestValue(e,n),n=>this.applicationErrorHandler(n))}_selectStrategy(e){if(Ha(e))return Sq;if(em(e))return kq;throw k1(t,e)}_dispose(){this._strategy.dispose(this._subscription),this._latestValue=null,this._subscription=null,this._obj=null}_updateLatestValue(e,n){e===this._obj&&(this._latestValue=n,this.markForCheckOnValueUpdate&&this._ref?.markForCheck())}static \u0275fac=function(n){return new(n||t)(Ce(xe,16))};static \u0275pipe=wt({name:"async",type:t,pure:!1})}return t})(),Eq=(()=>{class t{transform(e){if(e==null)return null;if(typeof e!="string")throw k1(t,e);return e.toLowerCase()}static \u0275fac=function(n){return new(n||t)};static \u0275pipe=wt({name:"lowercase",type:t,pure:!0})}return t})(),Iq=/(?:[0-9A-Za-z\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0560-\u0588\u05D0-\u05EA\u05EF-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u0870-\u0887\u0889-\u088E\u08A0-\u08C9\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C5D\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D04-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E86-\u0E8A\u0E8C-\u0EA3\u0EA5\u0EA7-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16F1-\u16F8\u1700-\u1711\u171F-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1878\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4C\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1C90-\u1CBA\u1CBD-\u1CBF\u1CE9-\u1CEC\u1CEE-\u1CF3\u1CF5\u1CF6\u1CFA\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184\u2C00-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312F\u3131-\u318E\u31A0-\u31BF\u31F0-\u31FF\u3400-\u4DBF\u4E00-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788\uA78B-\uA7CA\uA7D0\uA7D1\uA7D3\uA7D5-\uA7D9\uA7F2-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA8FE\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB69\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDE80-\uDE9C\uDEA0-\uDED0\uDF00-\uDF1F\uDF2D-\uDF40\uDF42-\uDF49\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF]|\uD801[\uDC00-\uDC9D\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDD70-\uDD7A\uDD7C-\uDD8A\uDD8C-\uDD92\uDD94\uDD95\uDD97-\uDDA1\uDDA3-\uDDB1\uDDB3-\uDDB9\uDDBB\uDDBC\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67\uDF80-\uDF85\uDF87-\uDFB0\uDFB2-\uDFBA]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE35\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2\uDD00-\uDD23\uDE80-\uDEA9\uDEB0\uDEB1\uDF00-\uDF1C\uDF27\uDF30-\uDF45\uDF70-\uDF81\uDFB0-\uDFC4\uDFE0-\uDFF6]|\uD804[\uDC03-\uDC37\uDC71\uDC72\uDC75\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD44\uDD47\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE2B\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC00-\uDC34\uDC47-\uDC4A\uDC5F-\uDC61\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE80-\uDEAA\uDEB8\uDF00-\uDF1A\uDF40-\uDF46]|\uD806[\uDC00-\uDC2B\uDCA0-\uDCDF\uDCFF-\uDD06\uDD09\uDD0C-\uDD13\uDD15\uDD16\uDD18-\uDD2F\uDD3F\uDD41\uDDA0-\uDDA7\uDDAA-\uDDD0\uDDE1\uDDE3\uDE00\uDE0B-\uDE32\uDE3A\uDE50\uDE5C-\uDE89\uDE9D\uDEB0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC2E\uDC40\uDC72-\uDC8F\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD30\uDD46\uDD60-\uDD65\uDD67\uDD68\uDD6A-\uDD89\uDD98\uDEE0-\uDEF2\uDFB0]|\uD808[\uDC00-\uDF99]|\uD809[\uDC80-\uDD43]|\uD80B[\uDF90-\uDFF0]|[\uD80C\uD81C-\uD820\uD822\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879\uD880-\uD883][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE70-\uDEBE\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDE40-\uDE7F\uDF00-\uDF4A\uDF50\uDF93-\uDF9F\uDFE0\uDFE1\uDFE3]|\uD821[\uDC00-\uDFF7]|\uD823[\uDC00-\uDCD5\uDD00-\uDD08]|\uD82B[\uDFF0-\uDFF3\uDFF5-\uDFFB\uDFFD\uDFFE]|\uD82C[\uDC00-\uDD22\uDD50-\uDD52\uDD64-\uDD67\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB]|\uD837[\uDF00-\uDF1E]|\uD838[\uDD00-\uDD2C\uDD37-\uDD3D\uDD4E\uDE90-\uDEAD\uDEC0-\uDEEB]|\uD839[\uDFE0-\uDFE6\uDFE8-\uDFEB\uDFED\uDFEE\uDFF0-\uDFFE]|\uD83A[\uDC00-\uDCC4\uDD00-\uDD43\uDD4B]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDEDF\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF38\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]|\uD884[\uDC00-\uDF4A])\S*/g,Oq=(()=>{class t{transform(e){if(e==null)return null;if(typeof e!="string")throw k1(t,e);return e.replace(Iq,n=>n[0].toUpperCase()+n.slice(1).toLowerCase())}static \u0275fac=function(n){return new(n||t)};static \u0275pipe=wt({name:"titlecase",type:t,pure:!0})}return t})();var Tq="mediumDate",CD=new L(""),xD=new L(""),E1=(()=>{class t{locale;defaultTimezone;defaultOptions;constructor(e,n,o){this.locale=e,this.defaultTimezone=n,this.defaultOptions=o}transform(e,n,o,r){if(e==null||e===""||e!==e)return null;try{let a=n??this.defaultOptions?.dateFormat??Tq,s=o??this.defaultOptions?.timezone??this.defaultTimezone??void 0;return pD(e,a,r||this.locale,s)}catch(a){throw k1(t,a.message)}}static \u0275fac=function(n){return new(n||t)(Ce(wr,16),Ce(CD,24),Ce(xD,24))};static \u0275pipe=wt({name:"date",type:t,pure:!0})}return t})();var Pq=(()=>{class t{transform(e){return JSON.stringify(e,null,2)}static \u0275fac=function(n){return new(n||t)};static \u0275pipe=wt({name:"json",type:t,pure:!1})}return t})();function Lq(t,i){return{key:t,value:i}}var Aq=(()=>{class t{differs;constructor(e){this.differs=e}differ;keyValues=[];compareFn=tD;transform(e,n=tD){if(!e||!(e instanceof Map)&&typeof e!="object")return null;this.differ??=this.differs.find(e).create();let o=this.differ.diff(e),r=n!==this.compareFn;return o&&(this.keyValues=[],o.forEachItem(a=>{this.keyValues.push(Lq(a.key,a.currentValue))})),(o||r)&&(n&&this.keyValues.sort(n),this.compareFn=n),this.keyValues}static \u0275fac=function(n){return new(n||t)(Ce(hm,16))};static \u0275pipe=wt({name:"keyvalue",type:t,pure:!1})}return t})();function tD(t,i){let e=t.key,n=i.key;if(e===n)return 0;if(e==null)return 1;if(n==null)return-1;if(typeof e=="string"&&typeof n=="string")return e{class t{_locale;constructor(e){this._locale=e}transform(e,n,o){if(!MD(e))return null;o||=this._locale;try{let r=wD(e);return _D(r,o,n)}catch(r){throw k1(t,r.message)}}static \u0275fac=function(n){return new(n||t)(Ce(wr,16))};static \u0275pipe=wt({name:"number",type:t,pure:!0})}return t})();var o7=(()=>{class t{_locale;_defaultCurrencyCode;constructor(e,n="USD"){this._locale=e,this._defaultCurrencyCode=n}transform(e,n=this._defaultCurrencyCode,o="symbol",r,a){if(!MD(e))return null;a||=this._locale,typeof o=="boolean"&&(o=o?"symbol":"code");let s=n||this._defaultCurrencyCode;o!=="code"&&(o==="symbol"||o==="symbol-narrow"?s=uD(s,o==="symbol"?"wide":"narrow",a):s=o);try{let c=wD(e);return Om(c,a,s,n,r)}catch(c){throw k1(t,c.message)}}static \u0275fac=function(n){return new(n||t)(Ce(wr,16),Ce(O5,16))};static \u0275pipe=wt({name:"currency",type:t,pure:!0})}return t})();function MD(t){return!(t==null||t===""||t!==t)}function wD(t){if(typeof t=="string"&&!isNaN(Number(t)-parseFloat(t)))return Number(t);if(typeof t!="number")throw new pe(2309,!1);return t}var he=(()=>{class t{static \u0275fac=function(n){return new(n||t)};static \u0275mod=J({type:t});static \u0275inj=X({})}return t})();function Jd(t,i){i=encodeURIComponent(i);for(let e of t.split(";")){let n=e.indexOf("="),[o,r]=n==-1?[e,""]:[e.slice(0,n),e.slice(n+1)];if(o.trim()===i)return decodeURIComponent(r)}return null}var $c=class{};function _be(t,i,e){return D5(t,i,e)}var a7="browser";function DD(t){return t===a7}var SD=(()=>{class t{static \u0275prov=R({token:t,providedIn:"root",factory:()=>new r7(d(Me),window)})}return t})(),r7=class{document;window;offset=()=>[0,0];constructor(i,e){this.document=i,this.window=e}setOffset(i){Array.isArray(i)?this.offset=()=>i:this.offset=i}getScrollPosition(){return[this.window.scrollX,this.window.scrollY]}scrollToPosition(i,e){this.window.scrollTo(Ne(q({},e),{left:i[0],top:i[1]}))}scrollToAnchor(i,e){let n=zq(this.document,i);n&&(this.scrollToElement(n,e),n.focus())}setHistoryScrollRestoration(i){try{this.window.history.scrollRestoration=i}catch{console.warn($o(2400,!1))}}scrollToElement(i,e){let n=i.getBoundingClientRect(),o=n.left+this.window.pageXOffset,r=n.top+this.window.pageYOffset,a=this.offset();this.window.scrollTo(Ne(q({},e),{left:o-a[0],top:r-a[1]}))}};function zq(t,i){let e=t.getElementById(i)||t.getElementsByName(i)[0];if(e)return e;if(typeof t.createTreeWalker=="function"&&t.body&&typeof t.body.attachShadow=="function"){let n=t.createTreeWalker(t.body,NodeFilter.SHOW_ELEMENT),o=n.currentNode;for(;o;){let r=o.shadowRoot;if(r){let a=r.getElementById(i)||r.querySelector(`[name="${i}"]`);if(a)return a}o=n.nextNode()}}return null}var e0=class{_doc;constructor(i){this._doc=i}manager},Tm=(()=>{class t extends e0{constructor(e){super(e)}supports(e){return!0}addEventListener(e,n,o,r){return e.addEventListener(n,o,r),()=>this.removeEventListener(e,n,o,r)}removeEventListener(e,n,o,r){return e.removeEventListener(n,o,r)}static \u0275fac=function(n){return new(n||t)(ke(Me))};static \u0275prov=R({token:t,factory:t.\u0275fac})}return t})(),Lm=new L(""),u7=(()=>{class t{_zone;_plugins;_eventNameToPlugin=new Map;constructor(e,n){this._zone=n,e.forEach(a=>{a.manager=this});let o=e.filter(a=>!(a instanceof Tm));this._plugins=o.slice().reverse();let r=e.find(a=>a instanceof Tm);r&&this._plugins.push(r)}addEventListener(e,n,o,r){return this._findPluginFor(n).addEventListener(e,n,o,r)}getZone(){return this._zone}_findPluginFor(e){let n=this._eventNameToPlugin.get(e);if(n)return n;if(n=this._plugins.find(r=>r.supports(e)),!n)throw new pe(5101,!1);return this._eventNameToPlugin.set(e,n),n}static \u0275fac=function(n){return new(n||t)(ke(Lm),ke(se))};static \u0275prov=R({token:t,factory:t.\u0275fac})}return t})(),s7="ng-app-id";function kD(t){for(let i of t)i.remove()}function ED(t,i){let e=i.createElement("style");return e.textContent=t,e}function Rq(t,i,e,n){let o=t.head?.querySelectorAll(`style[${s7}="${i}"],link[${s7}="${i}"]`);if(o)for(let r of o)r.removeAttribute(s7),r instanceof HTMLLinkElement?n.set(r.href.slice(r.href.lastIndexOf("/")+1),{usage:0,elements:[r]}):r.textContent&&e.set(r.textContent,{usage:0,elements:[r]})}function l7(t,i){let e=i.createElement("link");return e.setAttribute("rel","stylesheet"),e.setAttribute("href",t),e}var m7=(()=>{class t{doc;appId;nonce;inline=new Map;external=new Map;hosts=new Set;constructor(e,n,o,r={}){this.doc=e,this.appId=n,this.nonce=o,Rq(e,n,this.inline,this.external),this.hosts.add(e.head)}addStyles(e,n){for(let o of e)this.addUsage(o,this.inline,ED);n?.forEach(o=>this.addUsage(o,this.external,l7))}removeStyles(e,n){for(let o of e)this.removeUsage(o,this.inline);n?.forEach(o=>this.removeUsage(o,this.external))}addUsage(e,n,o){let r=n.get(e);r?r.usage++:n.set(e,{usage:1,elements:[...this.hosts].map(a=>this.addElement(a,o(e,this.doc)))})}removeUsage(e,n){let o=n.get(e);o&&(o.usage--,o.usage<=0&&(kD(o.elements),n.delete(e)))}ngOnDestroy(){for(let[,{elements:e}]of[...this.inline,...this.external])kD(e);this.hosts.clear()}addHost(e){this.hosts.add(e);for(let[n,{elements:o}]of this.inline)o.push(this.addElement(e,ED(n,this.doc)));for(let[n,{elements:o}]of this.external)o.push(this.addElement(e,l7(n,this.doc)))}removeHost(e){this.hosts.delete(e)}addElement(e,n){return this.nonce&&n.setAttribute("nonce",this.nonce),e.appendChild(n)}static \u0275fac=function(n){return new(n||t)(ke(Me),ke(Ds),ke(g1,8),ke(Bc))};static \u0275prov=R({token:t,factory:t.\u0275fac})}return t})(),c7={svg:"http://www.w3.org/2000/svg",xhtml:"http://www.w3.org/1999/xhtml",xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/",math:"http://www.w3.org/1998/Math/MathML"},p7=/%COMP%/g;var OD="%COMP%",Nq=`_nghost-${OD}`,Fq=`_ngcontent-${OD}`,Vq=!0,Bq=new L("",{providedIn:"root",factory:()=>Vq});function jq(t){return Fq.replace(p7,t)}function Hq(t){return Nq.replace(p7,t)}function TD(t,i){return i.map(e=>e.replace(p7,t))}var f7=(()=>{class t{eventManager;sharedStylesHost;appId;removeStylesOnCompDestroy;doc;ngZone;nonce;tracingService;rendererByCompId=new Map;defaultRenderer;platformIsServer;constructor(e,n,o,r,a,s,c=null,m=null){this.eventManager=e,this.sharedStylesHost=n,this.appId=o,this.removeStylesOnCompDestroy=r,this.doc=a,this.ngZone=s,this.nonce=c,this.tracingService=m,this.platformIsServer=!1,this.defaultRenderer=new t0(e,a,s,this.platformIsServer,this.tracingService)}createRenderer(e,n){if(!e||!n)return this.defaultRenderer;let o=this.getOrCreateRenderer(e,n);return o instanceof Pm?o.applyToHost(e):o instanceof n0&&o.applyStyles(),o}getOrCreateRenderer(e,n){let o=this.rendererByCompId,r=o.get(n.id);if(!r){let a=this.doc,s=this.ngZone,c=this.eventManager,m=this.sharedStylesHost,f=this.removeStylesOnCompDestroy,v=this.platformIsServer,x=this.tracingService;switch(n.encapsulation){case Va.Emulated:r=new Pm(c,m,n,this.appId,f,a,s,v,x);break;case Va.ShadowDom:return new d7(c,m,e,n,a,s,this.nonce,v,x);default:r=new n0(c,m,n,f,a,s,v,x);break}o.set(n.id,r)}return r}ngOnDestroy(){this.rendererByCompId.clear()}componentReplaced(e){this.rendererByCompId.delete(e)}static \u0275fac=function(n){return new(n||t)(ke(u7),ke(m7),ke(Ds),ke(Bq),ke(Me),ke(se),ke(g1),ke(Ss,8))};static \u0275prov=R({token:t,factory:t.\u0275fac})}return t})(),t0=class{eventManager;doc;ngZone;platformIsServer;tracingService;data=Object.create(null);throwOnSyntheticProps=!0;constructor(i,e,n,o,r){this.eventManager=i,this.doc=e,this.ngZone=n,this.platformIsServer=o,this.tracingService=r}destroy(){}destroyNode=null;createElement(i,e){return e?this.doc.createElementNS(c7[e]||e,i):this.doc.createElement(i)}createComment(i){return this.doc.createComment(i)}createText(i){return this.doc.createTextNode(i)}appendChild(i,e){(ID(i)?i.content:i).appendChild(e)}insertBefore(i,e,n){i&&(ID(i)?i.content:i).insertBefore(e,n)}removeChild(i,e){e.remove()}selectRootElement(i,e){let n=typeof i=="string"?this.doc.querySelector(i):i;if(!n)throw new pe(-5104,!1);return e||(n.textContent=""),n}parentNode(i){return i.parentNode}nextSibling(i){return i.nextSibling}setAttribute(i,e,n,o){if(o){e=o+":"+e;let r=c7[o];r?i.setAttributeNS(r,e,n):i.setAttribute(e,n)}else i.setAttribute(e,n)}removeAttribute(i,e,n){if(n){let o=c7[n];o?i.removeAttributeNS(o,e):i.removeAttribute(`${n}:${e}`)}else i.removeAttribute(e)}addClass(i,e){i.classList.add(e)}removeClass(i,e){i.classList.remove(e)}setStyle(i,e,n,o){o&(xr.DashCase|xr.Important)?i.style.setProperty(e,n,o&xr.Important?"important":""):i.style[e]=n}removeStyle(i,e,n){n&xr.DashCase?i.style.removeProperty(e):i.style[e]=""}setProperty(i,e,n){i!=null&&(i[e]=n)}setValue(i,e){i.nodeValue=e}listen(i,e,n,o){if(typeof i=="string"&&(i=Oo().getGlobalEventTarget(this.doc,i),!i))throw new pe(5102,!1);let r=this.decoratePreventDefault(n);return this.tracingService?.wrapEventListener&&(r=this.tracingService.wrapEventListener(i,e,r)),this.eventManager.addEventListener(i,e,r,o)}decoratePreventDefault(i){return e=>{if(e==="__ngUnwrap__")return i;i(e)===!1&&e.preventDefault()}}};function ID(t){return t.tagName==="TEMPLATE"&&t.content!==void 0}var d7=class extends t0{sharedStylesHost;hostEl;shadowRoot;constructor(i,e,n,o,r,a,s,c,m){super(i,r,a,c,m),this.sharedStylesHost=e,this.hostEl=n,this.shadowRoot=n.attachShadow({mode:"open"}),this.sharedStylesHost.addHost(this.shadowRoot);let f=o.styles;f=TD(o.id,f);for(let x of f){let w=document.createElement("style");s&&w.setAttribute("nonce",s),w.textContent=x,this.shadowRoot.appendChild(w)}let v=o.getExternalStyles?.();if(v)for(let x of v){let w=l7(x,r);s&&w.setAttribute("nonce",s),this.shadowRoot.appendChild(w)}}nodeOrShadowRoot(i){return i===this.hostEl?this.shadowRoot:i}appendChild(i,e){return super.appendChild(this.nodeOrShadowRoot(i),e)}insertBefore(i,e,n){return super.insertBefore(this.nodeOrShadowRoot(i),e,n)}removeChild(i,e){return super.removeChild(null,e)}parentNode(i){return this.nodeOrShadowRoot(super.parentNode(this.nodeOrShadowRoot(i)))}destroy(){this.sharedStylesHost.removeHost(this.shadowRoot)}},n0=class extends t0{sharedStylesHost;removeStylesOnCompDestroy;styles;styleUrls;constructor(i,e,n,o,r,a,s,c,m){super(i,r,a,s,c),this.sharedStylesHost=e,this.removeStylesOnCompDestroy=o;let f=n.styles;this.styles=m?TD(m,f):f,this.styleUrls=n.getExternalStyles?.(m)}applyStyles(){this.sharedStylesHost.addStyles(this.styles,this.styleUrls)}destroy(){this.removeStylesOnCompDestroy&&Fc.size===0&&this.sharedStylesHost.removeStyles(this.styles,this.styleUrls)}},Pm=class extends n0{contentAttr;hostAttr;constructor(i,e,n,o,r,a,s,c,m){let f=o+"-"+n.id;super(i,e,n,r,a,s,c,m,f),this.contentAttr=jq(f),this.hostAttr=Hq(f)}applyToHost(i){this.applyStyles(),this.setAttribute(i,this.hostAttr,"")}createElement(i,e){let n=super.createElement(i,e);return super.setAttribute(n,this.contentAttr,""),n}};var Am=class t extends Gd{supportsDOMEvents=!0;static makeCurrent(){$5(new t)}onAndCancel(i,e,n,o){return i.addEventListener(e,n,o),()=>{i.removeEventListener(e,n,o)}}dispatchEvent(i,e){i.dispatchEvent(e)}remove(i){i.remove()}createElement(i,e){return e=e||this.getDefaultDocument(),e.createElement(i)}createHtmlDocument(){return document.implementation.createHTMLDocument("fakeTitle")}getDefaultDocument(){return document}isElementNode(i){return i.nodeType===Node.ELEMENT_NODE}isShadowRoot(i){return i instanceof DocumentFragment}getGlobalEventTarget(i,e){return e==="window"?window:e==="document"?i:e==="body"?i.body:null}getBaseHref(i){let e=Uq();return e==null?null:$q(e)}resetBaseElement(){i0=null}getUserAgent(){return window.navigator.userAgent}getCookie(i){return Jd(document.cookie,i)}},i0=null;function Uq(){return i0=i0||document.head.querySelector("base"),i0?i0.getAttribute("href"):null}function $q(t){return new URL(t,document.baseURI).pathname}var zm=class{addToWindow(i){Qn.getAngularTestability=(n,o=!0)=>{let r=i.findTestabilityInTree(n,o);if(r==null)throw new pe(5103,!1);return r},Qn.getAllAngularTestabilities=()=>i.getAllTestabilities(),Qn.getAllAngularRootElements=()=>i.getAllRootElements();let e=n=>{let o=Qn.getAllAngularTestabilities(),r=o.length,a=function(){r--,r==0&&n()};o.forEach(s=>{s.whenStable(a)})};Qn.frameworkStabilizers||(Qn.frameworkStabilizers=[]),Qn.frameworkStabilizers.push(e)}findTestabilityInTree(i,e,n){if(e==null)return null;let o=i.getTestability(e);return o??(n?Oo().isShadowRoot(e)?this.findTestabilityInTree(i,e.host,!0):this.findTestabilityInTree(i,e.parentElement,!0):null)}},Gq=(()=>{class t{build(){return new XMLHttpRequest}static \u0275fac=function(n){return new(n||t)};static \u0275prov=R({token:t,factory:t.\u0275fac})}return t})(),PD=["alt","control","meta","shift"],Wq={"\b":"Backspace"," ":"Tab","\x7F":"Delete","\x1B":"Escape",Del:"Delete",Esc:"Escape",Left:"ArrowLeft",Right:"ArrowRight",Up:"ArrowUp",Down:"ArrowDown",Menu:"ContextMenu",Scroll:"ScrollLock",Win:"OS"},qq={alt:t=>t.altKey,control:t=>t.ctrlKey,meta:t=>t.metaKey,shift:t=>t.shiftKey},LD=(()=>{class t extends e0{constructor(e){super(e)}supports(e){return t.parseEventName(e)!=null}addEventListener(e,n,o,r){let a=t.parseEventName(n),s=t.eventCallback(a.fullKey,o,this.manager.getZone());return this.manager.getZone().runOutsideAngular(()=>Oo().onAndCancel(e,a.domEventName,s,r))}static parseEventName(e){let n=e.toLowerCase().split("."),o=n.shift();if(n.length===0||!(o==="keydown"||o==="keyup"))return null;let r=t._normalizeKey(n.pop()),a="",s=n.indexOf("code");if(s>-1&&(n.splice(s,1),a="code."),PD.forEach(m=>{let f=n.indexOf(m);f>-1&&(n.splice(f,1),a+=m+".")}),a+=r,n.length!=0||r.length===0)return null;let c={};return c.domEventName=o,c.fullKey=a,c}static matchEventFullKeyCode(e,n){let o=Wq[e.key]||e.key,r="";return n.indexOf("code.")>-1&&(o=e.code,r="code."),o==null||!o?!1:(o=o.toLowerCase(),o===" "?o="space":o==="."&&(o="dot"),PD.forEach(a=>{if(a!==o){let s=qq[a];s(e)&&(r+=a+".")}}),r+=o,r===n)}static eventCallback(e,n,o){return r=>{t.matchEventFullKeyCode(r,e)&&o.runGuarded(()=>n(r))}}static _normalizeKey(e){return e==="esc"?"escape":e}static \u0275fac=function(n){return new(n||t)(ke(Me))};static \u0275prov=R({token:t,factory:t.\u0275fac})}return t})();function Yq(){Am.makeCurrent()}function Qq(){return new _i}function Kq(){return F8(document),document}var Xq=[{provide:Bc,useValue:a7},{provide:R4,useValue:Yq,multi:!0},{provide:Me,useFactory:Kq}],Zq=H5(Bw,"browser",Xq);var Jq=[{provide:y1,useClass:zm},{provide:J4,useClass:Vd,deps:[se,Bd,y1]},{provide:Vd,useClass:Vd,deps:[se,Bd,y1]}],eY=[{provide:ld,useValue:"root"},{provide:_i,useFactory:Qq},{provide:Lm,useClass:Tm,multi:!0,deps:[Me]},{provide:Lm,useClass:LD,multi:!0,deps:[Me]},f7,m7,u7,{provide:On,useExisting:f7},{provide:$c,useClass:Gq},[]],tY=(()=>{class t{constructor(){}static \u0275fac=function(n){return new(n||t)};static \u0275mod=J({type:t});static \u0275inj=X({providers:[...eY,...Jq],imports:[he,jw]})}return t})();var T1=class{},o0=class{},To=class t{headers;normalizedNames=new Map;lazyInit;lazyUpdate=null;constructor(i){i?typeof i=="string"?this.lazyInit=()=>{this.headers=new Map,i.split(` -`).forEach(e=>{let n=e.indexOf(":");if(n>0){let o=e.slice(0,n),r=e.slice(n+1).trim();this.addHeaderEntry(o,r)}})}:typeof Headers<"u"&&i instanceof Headers?(this.headers=new Map,i.forEach((e,n)=>{this.addHeaderEntry(n,e)})):this.lazyInit=()=>{this.headers=new Map,Object.entries(i).forEach(([e,n])=>{this.setHeaderEntries(e,n)})}:this.headers=new Map}has(i){return this.init(),this.headers.has(i.toLowerCase())}get(i){this.init();let e=this.headers.get(i.toLowerCase());return e&&e.length>0?e[0]:null}keys(){return this.init(),Array.from(this.normalizedNames.values())}getAll(i){return this.init(),this.headers.get(i.toLowerCase())||null}append(i,e){return this.clone({name:i,value:e,op:"a"})}set(i,e){return this.clone({name:i,value:e,op:"s"})}delete(i,e){return this.clone({name:i,value:e,op:"d"})}maybeSetNormalizedName(i,e){this.normalizedNames.has(e)||this.normalizedNames.set(e,i)}init(){this.lazyInit&&(this.lazyInit instanceof t?this.copyFrom(this.lazyInit):this.lazyInit(),this.lazyInit=null,this.lazyUpdate&&(this.lazyUpdate.forEach(i=>this.applyUpdate(i)),this.lazyUpdate=null))}copyFrom(i){i.init(),Array.from(i.headers.keys()).forEach(e=>{this.headers.set(e,i.headers.get(e)),this.normalizedNames.set(e,i.normalizedNames.get(e))})}clone(i){let e=new t;return e.lazyInit=this.lazyInit&&this.lazyInit instanceof t?this.lazyInit:this,e.lazyUpdate=(this.lazyUpdate||[]).concat([i]),e}applyUpdate(i){let e=i.name.toLowerCase();switch(i.op){case"a":case"s":let n=i.value;if(typeof n=="string"&&(n=[n]),n.length===0)return;this.maybeSetNormalizedName(i.name,e);let o=(i.op==="a"?this.headers.get(e):void 0)||[];o.push(...n),this.headers.set(e,o);break;case"d":let r=i.value;if(!r)this.headers.delete(e),this.normalizedNames.delete(e);else{let a=this.headers.get(e);if(!a)return;a=a.filter(s=>r.indexOf(s)===-1),a.length===0?(this.headers.delete(e),this.normalizedNames.delete(e)):this.headers.set(e,a)}break}}addHeaderEntry(i,e){let n=i.toLowerCase();this.maybeSetNormalizedName(i,n),this.headers.has(n)?this.headers.get(n).push(e):this.headers.set(n,[e])}setHeaderEntries(i,e){let n=(Array.isArray(e)?e:[e]).map(r=>r.toString()),o=i.toLowerCase();this.headers.set(o,n),this.maybeSetNormalizedName(i,o)}forEach(i){this.init(),Array.from(this.normalizedNames.keys()).forEach(e=>i(this.normalizedNames.get(e),this.headers.get(e)))}};var Nm=class{encodeKey(i){return AD(i)}encodeValue(i){return AD(i)}decodeKey(i){return decodeURIComponent(i)}decodeValue(i){return decodeURIComponent(i)}};function nY(t,i){let e=new Map;return t.length>0&&t.replace(/^\?/,"").split("&").forEach(o=>{let r=o.indexOf("="),[a,s]=r==-1?[i.decodeKey(o),""]:[i.decodeKey(o.slice(0,r)),i.decodeValue(o.slice(r+1))],c=e.get(a)||[];c.push(s),e.set(a,c)}),e}var iY=/%(\d[a-f0-9])/gi,oY={40:"@","3A":":",24:"$","2C":",","3B":";","3D":"=","3F":"?","2F":"/"};function AD(t){return encodeURIComponent(t).replace(iY,(i,e)=>oY[e]??i)}function Rm(t){return`${t}`}var te=class t{map;encoder;updates=null;cloneFrom=null;constructor(i={}){if(this.encoder=i.encoder||new Nm,i.fromString){if(i.fromObject)throw new pe(2805,!1);this.map=nY(i.fromString,this.encoder)}else i.fromObject?(this.map=new Map,Object.keys(i.fromObject).forEach(e=>{let n=i.fromObject[e],o=Array.isArray(n)?n.map(Rm):[Rm(n)];this.map.set(e,o)})):this.map=null}has(i){return this.init(),this.map.has(i)}get(i){this.init();let e=this.map.get(i);return e?e[0]:null}getAll(i){return this.init(),this.map.get(i)||null}keys(){return this.init(),Array.from(this.map.keys())}append(i,e){return this.clone({param:i,value:e,op:"a"})}appendAll(i){let e=[];return Object.keys(i).forEach(n=>{let o=i[n];Array.isArray(o)?o.forEach(r=>{e.push({param:n,value:r,op:"a"})}):e.push({param:n,value:o,op:"a"})}),this.clone(e)}set(i,e){return this.clone({param:i,value:e,op:"s"})}delete(i,e){return this.clone({param:i,value:e,op:"d"})}toString(){return this.init(),this.keys().map(i=>{let e=this.encoder.encodeKey(i);return this.map.get(i).map(n=>e+"="+this.encoder.encodeValue(n)).join("&")}).filter(i=>i!=="").join("&")}clone(i){let e=new t({encoder:this.encoder});return e.cloneFrom=this.cloneFrom||this,e.updates=(this.updates||[]).concat(i),e}init(){this.map===null&&(this.map=new Map),this.cloneFrom!==null&&(this.cloneFrom.init(),this.cloneFrom.keys().forEach(i=>this.map.set(i,this.cloneFrom.map.get(i))),this.updates.forEach(i=>{switch(i.op){case"a":case"s":let e=(i.op==="a"?this.map.get(i.param):void 0)||[];e.push(Rm(i.value)),this.map.set(i.param,e);break;case"d":if(i.value!==void 0){let n=this.map.get(i.param)||[],o=n.indexOf(Rm(i.value));o!==-1&&n.splice(o,1),n.length>0?this.map.set(i.param,n):this.map.delete(i.param)}else{this.map.delete(i.param);break}}}),this.cloneFrom=this.updates=null)}};var Fm=class{map=new Map;set(i,e){return this.map.set(i,e),this}get(i){return this.map.has(i)||this.map.set(i,i.defaultValue()),this.map.get(i)}delete(i){return this.map.delete(i),this}has(i){return this.map.has(i)}keys(){return this.map.keys()}};function rY(t){switch(t){case"DELETE":case"GET":case"HEAD":case"OPTIONS":case"JSONP":return!1;default:return!0}}function zD(t){return typeof ArrayBuffer<"u"&&t instanceof ArrayBuffer}function RD(t){return typeof Blob<"u"&&t instanceof Blob}function ND(t){return typeof FormData<"u"&&t instanceof FormData}function aY(t){return typeof URLSearchParams<"u"&&t instanceof URLSearchParams}var FD="Content-Type",VD="Accept",jD="X-Request-URL",HD="text/plain",UD="application/json",sY=`${UD}, ${HD}, */*`,I1=class t{url;body=null;headers;context;reportProgress=!1;withCredentials=!1;credentials;keepalive=!1;cache;priority;mode;redirect;referrer;integrity;responseType="json";method;params;urlWithParams;transferCache;timeout;constructor(i,e,n,o){this.url=e,this.method=i.toUpperCase();let r;if(rY(this.method)||o?(this.body=n!==void 0?n:null,r=o):r=n,r){if(this.reportProgress=!!r.reportProgress,this.withCredentials=!!r.withCredentials,this.keepalive=!!r.keepalive,r.responseType&&(this.responseType=r.responseType),r.headers&&(this.headers=r.headers),r.context&&(this.context=r.context),r.params&&(this.params=r.params),r.priority&&(this.priority=r.priority),r.cache&&(this.cache=r.cache),r.credentials&&(this.credentials=r.credentials),typeof r.timeout=="number"){if(r.timeout<1||!Number.isInteger(r.timeout))throw new pe(2822,"");this.timeout=r.timeout}r.mode&&(this.mode=r.mode),r.redirect&&(this.redirect=r.redirect),r.integrity&&(this.integrity=r.integrity),r.referrer&&(this.referrer=r.referrer),this.transferCache=r.transferCache}if(this.headers??=new To,this.context??=new Fm,!this.params)this.params=new te,this.urlWithParams=e;else{let a=this.params.toString();if(a.length===0)this.urlWithParams=e;else{let s=e.indexOf("?"),c=s===-1?"?":sHt.set(fn,i.setHeaders[fn]),Oe)),i.setParams&&(Mt=Object.keys(i.setParams).reduce((Ht,fn)=>Ht.set(fn,i.setParams[fn]),Mt)),new t(e,n,K,{params:Mt,headers:Oe,context:Et,reportProgress:Z,responseType:o,withCredentials:Y,transferCache:w,keepalive:r,cache:s,priority:a,timeout:O,mode:c,redirect:m,credentials:f,referrer:v,integrity:x})}},Gc=(function(t){return t[t.Sent=0]="Sent",t[t.UploadProgress=1]="UploadProgress",t[t.ResponseHeader=2]="ResponseHeader",t[t.DownloadProgress=3]="DownloadProgress",t[t.Response=4]="Response",t[t.User=5]="User",t})(Gc||{}),P1=class{headers;status;statusText;url;ok;type;redirected;constructor(i,e=200,n="OK"){this.headers=i.headers||new To,this.status=i.status!==void 0?i.status:e,this.statusText=i.statusText||n,this.url=i.url||null,this.redirected=i.redirected,this.ok=this.status>=200&&this.status<300}},Vm=class t extends P1{constructor(i={}){super(i)}type=Gc.ResponseHeader;clone(i={}){return new t({headers:i.headers||this.headers,status:i.status!==void 0?i.status:this.status,statusText:i.statusText||this.statusText,url:i.url||this.url||void 0})}},r0=class t extends P1{body;constructor(i={}){super(i),this.body=i.body!==void 0?i.body:null}type=Gc.Response;clone(i={}){return new t({body:i.body!==void 0?i.body:this.body,headers:i.headers||this.headers,status:i.status!==void 0?i.status:this.status,statusText:i.statusText||this.statusText,url:i.url||this.url||void 0,redirected:i.redirected??this.redirected})}},O1=class extends P1{name="HttpErrorResponse";message;error;ok=!1;constructor(i){super(i,0,"Unknown Error"),this.status>=200&&this.status<300?this.message=`Http failure during parsing for ${i.url||"(unknown url)"}`:this.message=`Http failure response for ${i.url||"(unknown url)"}: ${i.status} ${i.statusText}`,this.error=i.error||null}},cY=200,lY=204;function h7(t,i){return{body:i,headers:t.headers,context:t.context,observe:t.observe,params:t.params,reportProgress:t.reportProgress,responseType:t.responseType,withCredentials:t.withCredentials,credentials:t.credentials,transferCache:t.transferCache,timeout:t.timeout,keepalive:t.keepalive,priority:t.priority,cache:t.cache,mode:t.mode,redirect:t.redirect,integrity:t.integrity,referrer:t.referrer}}var Bn=(()=>{class t{handler;constructor(e){this.handler=e}request(e,n,o={}){let r;if(e instanceof I1)r=e;else{let c;o.headers instanceof To?c=o.headers:c=new To(o.headers);let m;o.params&&(o.params instanceof te?m=o.params:m=new te({fromObject:o.params})),r=new I1(e,n,o.body!==void 0?o.body:null,{headers:c,context:o.context,params:m,reportProgress:o.reportProgress,responseType:o.responseType||"json",withCredentials:o.withCredentials,transferCache:o.transferCache,keepalive:o.keepalive,priority:o.priority,cache:o.cache,mode:o.mode,redirect:o.redirect,credentials:o.credentials,referrer:o.referrer,integrity:o.integrity,timeout:o.timeout})}let a=re(r).pipe(Qi(c=>this.handler.handle(c)));if(e instanceof I1||o.observe==="events")return a;let s=a.pipe(Ae(c=>c instanceof r0));switch(o.observe||"body"){case"body":switch(r.responseType){case"arraybuffer":return s.pipe(me(c=>{if(c.body!==null&&!(c.body instanceof ArrayBuffer))throw new pe(2806,!1);return c.body}));case"blob":return s.pipe(me(c=>{if(c.body!==null&&!(c.body instanceof Blob))throw new pe(2807,!1);return c.body}));case"text":return s.pipe(me(c=>{if(c.body!==null&&typeof c.body!="string")throw new pe(2808,!1);return c.body}));case"json":default:return s.pipe(me(c=>c.body))}case"response":return s;default:throw new pe(2809,!1)}}delete(e,n={}){return this.request("DELETE",e,n)}get(e,n={}){return this.request("GET",e,n)}head(e,n={}){return this.request("HEAD",e,n)}jsonp(e,n){return this.request("JSONP",e,{params:new te().append(n,"JSONP_CALLBACK"),observe:"body",responseType:"json"})}options(e,n={}){return this.request("OPTIONS",e,n)}patch(e,n,o={}){return this.request("PATCH",e,h7(o,n))}post(e,n,o={}){return this.request("POST",e,h7(o,n))}put(e,n,o={}){return this.request("PUT",e,h7(o,n))}static \u0275fac=function(n){return new(n||t)(ke(T1))};static \u0275prov=R({token:t,factory:t.\u0275fac})}return t})();var dY=new L("");function $D(t,i){return i(t)}function uY(t,i){return(e,n)=>i.intercept(e,{handle:o=>t(o,n)})}function mY(t,i,e){return(n,o)=>bi(e,()=>i(n,r=>t(r,o)))}var GD=new L(""),_7=new L(""),WD=new L(""),b7=new L("",{providedIn:"root",factory:()=>!0});function pY(){let t=null;return(i,e)=>{t===null&&(t=(d(GD,{optional:!0})??[]).reduceRight(uY,$D));let n=d(a1);if(d(b7)){let r=n.add();return t(i,e).pipe(qr(r))}else return t(i,e)}}var Bm=(()=>{class t extends T1{backend;injector;chain=null;pendingTasks=d(a1);contributeToStability=d(b7);constructor(e,n){super(),this.backend=e,this.injector=n}handle(e){if(this.chain===null){let n=Array.from(new Set([...this.injector.get(_7),...this.injector.get(WD,[])]));this.chain=n.reduceRight((o,r)=>mY(o,r,this.injector),$D)}if(this.contributeToStability){let n=this.pendingTasks.add();return this.chain(e,o=>this.backend.handle(o)).pipe(qr(n))}else return this.chain(e,n=>this.backend.handle(n))}static \u0275fac=function(n){return new(n||t)(ke(o0),ke(Qt))};static \u0275prov=R({token:t,factory:t.\u0275fac})}return t})();var fY=/^\)\]\}',?\n/,hY=RegExp(`^${jD}:`,"m");function gY(t){return"responseURL"in t&&t.responseURL?t.responseURL:hY.test(t.getAllResponseHeaders())?t.getResponseHeader(jD):null}var g7=(()=>{class t{xhrFactory;constructor(e){this.xhrFactory=e}handle(e){if(e.method==="JSONP")throw new pe(-2800,!1);let n=this.xhrFactory;return re(null).pipe(lt(()=>new Fe(r=>{let a=n.build();if(a.open(e.method,e.urlWithParams),e.withCredentials&&(a.withCredentials=!0),e.headers.forEach((Y,Z)=>a.setRequestHeader(Y,Z.join(","))),e.headers.has(VD)||a.setRequestHeader(VD,sY),!e.headers.has(FD)){let Y=e.detectContentTypeHeader();Y!==null&&a.setRequestHeader(FD,Y)}if(e.timeout&&(a.timeout=e.timeout),e.responseType){let Y=e.responseType.toLowerCase();a.responseType=Y!=="json"?Y:"text"}let s=e.serializeBody(),c=null,m=()=>{if(c!==null)return c;let Y=a.statusText||"OK",Z=new To(a.getAllResponseHeaders()),Oe=gY(a)||e.url;return c=new Vm({headers:Z,status:a.status,statusText:Y,url:Oe}),c},f=()=>{let{headers:Y,status:Z,statusText:Oe,url:Mt}=m(),Et=null;Z!==lY&&(Et=typeof a.response>"u"?a.responseText:a.response),Z===0&&(Z=Et?cY:0);let Ht=Z>=200&&Z<300;if(e.responseType==="json"&&typeof Et=="string"){let fn=Et;Et=Et.replace(fY,"");try{Et=Et!==""?JSON.parse(Et):null}catch(Bo){Et=fn,Ht&&(Ht=!1,Et={error:Bo,text:Et})}}Ht?(r.next(new r0({body:Et,headers:Y,status:Z,statusText:Oe,url:Mt||void 0})),r.complete()):r.error(new O1({error:Et,headers:Y,status:Z,statusText:Oe,url:Mt||void 0}))},v=Y=>{let{url:Z}=m(),Oe=new O1({error:Y,status:a.status||0,statusText:a.statusText||"Unknown Error",url:Z||void 0});r.error(Oe)},x=v;e.timeout&&(x=Y=>{let{url:Z}=m(),Oe=new O1({error:new DOMException("Request timed out","TimeoutError"),status:a.status||0,statusText:a.statusText||"Request timeout",url:Z||void 0});r.error(Oe)});let w=!1,O=Y=>{w||(r.next(m()),w=!0);let Z={type:Gc.DownloadProgress,loaded:Y.loaded};Y.lengthComputable&&(Z.total=Y.total),e.responseType==="text"&&a.responseText&&(Z.partialText=a.responseText),r.next(Z)},K=Y=>{let Z={type:Gc.UploadProgress,loaded:Y.loaded};Y.lengthComputable&&(Z.total=Y.total),r.next(Z)};return a.addEventListener("load",f),a.addEventListener("error",v),a.addEventListener("timeout",x),a.addEventListener("abort",v),e.reportProgress&&(a.addEventListener("progress",O),s!==null&&a.upload&&a.upload.addEventListener("progress",K)),a.send(s),r.next({type:Gc.Sent}),()=>{a.removeEventListener("error",v),a.removeEventListener("abort",v),a.removeEventListener("load",f),a.removeEventListener("timeout",x),e.reportProgress&&(a.removeEventListener("progress",O),s!==null&&a.upload&&a.upload.removeEventListener("progress",K)),a.readyState!==a.DONE&&a.abort()}})))}static \u0275fac=function(n){return new(n||t)(ke($c))};static \u0275prov=R({token:t,factory:t.\u0275fac})}return t})(),qD=new L(""),_Y="XSRF-TOKEN",bY=new L("",{providedIn:"root",factory:()=>_Y}),vY="X-XSRF-TOKEN",yY=new L("",{providedIn:"root",factory:()=>vY}),a0=class{},CY=(()=>{class t{doc;cookieName;lastCookieString="";lastToken=null;parseCount=0;constructor(e,n){this.doc=e,this.cookieName=n}getToken(){let e=this.doc.cookie||"";return e!==this.lastCookieString&&(this.parseCount++,this.lastToken=Jd(e,this.cookieName),this.lastCookieString=e),this.lastToken}static \u0275fac=function(n){return new(n||t)(ke(Me),ke(bY))};static \u0275prov=R({token:t,factory:t.\u0275fac})}return t})(),xY=/^(?:https?:)?\/\//i;function MY(t,i){if(!d(qD)||t.method==="GET"||t.method==="HEAD"||xY.test(t.url))return i(t);let e=d(a0).getToken(),n=d(yY);return e!=null&&!t.headers.has(n)&&(t=t.clone({headers:t.headers.set(n,e)})),i(t)}var v7=(function(t){return t[t.Interceptors=0]="Interceptors",t[t.LegacyInterceptors=1]="LegacyInterceptors",t[t.CustomXsrfConfiguration=2]="CustomXsrfConfiguration",t[t.NoXsrfProtection=3]="NoXsrfProtection",t[t.JsonpSupport=4]="JsonpSupport",t[t.RequestsMadeViaParent=5]="RequestsMadeViaParent",t[t.Fetch=6]="Fetch",t})(v7||{});function wY(t,i){return{\u0275kind:t,\u0275providers:i}}function DY(...t){let i=[Bn,g7,Bm,{provide:T1,useExisting:Bm},{provide:o0,useFactory:()=>d(dY,{optional:!0})??d(g7)},{provide:_7,useValue:MY,multi:!0},{provide:qD,useValue:!0},{provide:a0,useClass:CY}];for(let e of t)i.push(...e.\u0275providers);return bs(i)}var BD=new L("");function SY(){return wY(v7.LegacyInterceptors,[{provide:BD,useFactory:pY},{provide:_7,useExisting:BD,multi:!0}])}var YD=(()=>{class t{_doc;constructor(e){this._doc=e}getTitle(){return this._doc.title}setTitle(e){this._doc.title=e||""}static \u0275fac=function(n){return new(n||t)(ke(Me))};static \u0275prov=R({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();var Ga=(()=>{class t{static \u0275fac=function(n){return new(n||t)};static \u0275prov=R({token:t,factory:function(n){let o=null;return n?o=new(n||t):o=ke(EY),o},providedIn:"root"})}return t})(),EY=(()=>{class t extends Ga{_doc;constructor(e){super(),this._doc=e}sanitize(e,n){if(n==null)return null;switch(e){case Fn.NONE:return n;case Fn.HTML:return ra(n,"HTML")?So(n):B4(this._doc,String(n)).toString();case Fn.STYLE:return ra(n,"Style")?So(n):n;case Fn.SCRIPT:if(ra(n,"Script"))return So(n);throw new pe(5200,!1);case Fn.URL:return ra(n,"URL")?So(n):Pd(String(n));case Fn.RESOURCE_URL:if(ra(n,"ResourceURL"))return So(n);throw new pe(5201,!1);default:throw new pe(5202,!1)}}bypassSecurityTrustHtml(e){return j8(e)}bypassSecurityTrustStyle(e){return H8(e)}bypassSecurityTrustScript(e){return U8(e)}bypassSecurityTrustUrl(e){return $8(e)}bypassSecurityTrustResourceUrl(e){return G8(e)}static \u0275fac=function(n){return new(n||t)(ke(Me))};static \u0275prov=R({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();var L1=class{},KD=(()=>{class t extends L1{getTranslation(e){return re({})}static \u0275fac=(()=>{let e;return function(o){return(e||(e=Ie(t)))(o||t)}})();static \u0275prov=R({token:t,factory:t.\u0275fac})}return t})(),c0=class{},XD=(()=>{class t{handle(e){return e.key}static \u0275fac=function(n){return new(n||t)};static \u0275prov=R({token:t,factory:t.\u0275fac})}return t})();function Hm(t,i){if(t===i)return!0;if(t===null||i===null)return!1;if(t!==t&&i!==i)return!0;let e=typeof t,n=typeof i,o,r,a;if(e==n&&e=="object")if(Array.isArray(t)){if(!Array.isArray(i))return!1;if((o=t.length)==i.length){for(r=0;r{d0(i[n])?n in t?e[n]=y7(t[n],i[n]):Object.assign(e,{[n]:i[n]}):Object.assign(e,{[n]:i[n]})}),e):y7({},i)}function C7(t,i){let e=i.split(".");i="";do i+=e.shift(),Is(t)&&Is(t[i])&&(d0(t[i])||S7(t[i])||!e.length)?(t=t[i],i=""):e.length?i+=".":t=void 0;while(e.length);return t}function OY(t,i,e){let n=i.split("."),o=t;for(let r=0;r{class t extends A1{templateMatcher=/{{\s?([^{}\s]*)\s?}}/g;interpolate(e,n){if(k7(e))return this.interpolateString(e,n);if(IY(e))return this.interpolateFunction(e,n)}interpolateFunction(e,n){return e(n)}interpolateString(e,n){return n?e.replace(this.templateMatcher,(o,r)=>{let a=C7(n,r);return Is(a)?a:o}):e}static \u0275fac=(()=>{let e;return function(o){return(e||(e=Ie(t)))(o||t)}})();static \u0275prov=R({token:t,factory:t.\u0275fac})}return t})(),z1=class{},JD=(()=>{class t extends z1{compile(e,n){return e}compileTranslations(e,n){return e}static \u0275fac=(()=>{let e;return function(o){return(e||(e=Ie(t)))(o||t)}})();static \u0275prov=R({token:t,factory:t.\u0275fac})}return t})(),l0=class{defaultLang;currentLang=this.defaultLang;translations={};langs=[];onTranslationChange=new j;onLangChange=new j;onDefaultLangChange=new j},x7=new L("ISOLATE_TRANSLATE_SERVICE"),M7=new L("USE_DEFAULT_LANG"),w7=new L("DEFAULT_LANGUAGE"),D7=new L("USE_EXTEND"),s0=t=>ai(t)?t:re(t),Po=(()=>{class t{store;currentLoader;compiler;parser;missingTranslationHandler;useDefaultLang;extend;loadingTranslations;pending=!1;_translationRequests={};lastUseLanguage=null;get onTranslationChange(){return this.store.onTranslationChange}get onLangChange(){return this.store.onLangChange}get onDefaultLangChange(){return this.store.onDefaultLangChange}get defaultLang(){return this.store.defaultLang}set defaultLang(e){this.store.defaultLang=e}get currentLang(){return this.store.currentLang}set currentLang(e){this.store.currentLang=e}get langs(){return this.store.langs}set langs(e){this.store.langs=e}get translations(){return this.store.translations}set translations(e){this.store.translations=e}constructor(e,n,o,r,a,s=!0,c=!1,m=!1,f){this.store=e,this.currentLoader=n,this.compiler=o,this.parser=r,this.missingTranslationHandler=a,this.useDefaultLang=s,this.extend=m,c&&(this.store=new l0),f&&this.setDefaultLang(f)}setDefaultLang(e){if(e===this.defaultLang)return;let n=this.retrieveTranslations(e);typeof n<"u"?(this.defaultLang==null&&(this.defaultLang=e),n.pipe(Be(1)).subscribe(()=>{this.changeDefaultLang(e)})):this.changeDefaultLang(e)}getDefaultLang(){return this.defaultLang}use(e){if(this.lastUseLanguage=e,e===this.currentLang)return re(this.translations[e]);this.currentLang||(this.currentLang=e);let n=this.retrieveTranslations(e);return ai(n)?(n.pipe(Be(1)).subscribe(()=>{this.changeLang(e)}),n):(this.changeLang(e),re(this.translations[e]))}changeLang(e){e===this.lastUseLanguage&&(this.currentLang=e,this.onLangChange.emit({lang:e,translations:this.translations[e]}),this.defaultLang==null&&this.changeDefaultLang(e))}retrieveTranslations(e){if(typeof this.translations[e]>"u"||this.extend)return this._translationRequests[e]=this._translationRequests[e]||this.loadAndCompileTranslations(e),this._translationRequests[e]}getTranslation(e){return this.loadAndCompileTranslations(e)}loadAndCompileTranslations(e){this.pending=!0;let n=this.currentLoader.getTranslation(e).pipe(hs(1),Be(1));return this.loadingTranslations=n.pipe(me(o=>this.compiler.compileTranslations(o,e)),hs(1),Be(1)),this.loadingTranslations.subscribe({next:o=>{this.translations[e]=this.extend&&this.translations[e]?q(q({},o),this.translations[e]):o,this.updateLangs(),this.pending=!1},error:o=>{this.pending=!1}}),n}setTranslation(e,n,o=!1){let r=this.compiler.compileTranslations(n,e);(o||this.extend)&&this.translations[e]?this.translations[e]=y7(this.translations[e],r):this.translations[e]=r,this.updateLangs(),this.onTranslationChange.emit({lang:e,translations:this.translations[e]})}getLangs(){return this.langs}addLangs(e){let n=e.filter(o=>!this.langs.includes(o));n.length>0&&(this.langs=[...this.langs,...n])}updateLangs(){this.addLangs(Object.keys(this.translations))}getParsedResultForKey(e,n,o){let r;if(e&&(r=this.runInterpolation(C7(e,n),o)),r===void 0&&this.defaultLang!=null&&this.defaultLang!==this.currentLang&&this.useDefaultLang&&(r=this.runInterpolation(C7(this.translations[this.defaultLang],n),o)),r===void 0){let a={key:n,translateService:this};typeof o<"u"&&(a.interpolateParams=o),r=this.missingTranslationHandler.handle(a)}return r!==void 0?r:n}runInterpolation(e,n){if(S7(e))return e.map(o=>this.runInterpolation(o,n));if(d0(e)){let o={};for(let r in e){let a=this.runInterpolation(e[r],n);a!==void 0&&(o[r]=a)}return o}else return this.parser.interpolate(e,n)}getParsedResult(e,n,o){if(n instanceof Array){let r={},a=!1;for(let c of n)r[c]=this.getParsedResultForKey(e,c,o),a=a||ai(r[c]);if(!a)return r;let s=n.map(c=>s0(r[c]));return Oa(s).pipe(me(c=>{let m={};return c.forEach((f,v)=>{m[n[v]]=f}),m}))}return this.getParsedResultForKey(e,n,o)}get(e,n){if(!Is(e)||!e.length)throw new Error('Parameter "key" is required and cannot be empty');return this.pending?this.loadingTranslations.pipe(Qi(o=>s0(this.getParsedResult(o,e,n)))):s0(this.getParsedResult(this.translations[this.currentLang],e,n))}getStreamOnTranslationChange(e,n){if(!Is(e)||!e.length)throw new Error('Parameter "key" is required and cannot be empty');return Li(Ai(()=>this.get(e,n)),this.onTranslationChange.pipe(lt(o=>{let r=this.getParsedResult(o.translations,e,n);return s0(r)})))}stream(e,n){if(!Is(e)||!e.length)throw new Error('Parameter "key" required');return Li(Ai(()=>this.get(e,n)),this.onLangChange.pipe(lt(o=>{let r=this.getParsedResult(o.translations,e,n);return s0(r)})))}instant(e,n){if(!Is(e)||e.length===0)throw new Error('Parameter "key" is required and cannot be empty');let o=this.getParsedResult(this.translations[this.currentLang],e,n);return ai(o)?Array.isArray(e)?e.reduce((r,a)=>(r[a]=a,r),{}):e:o}set(e,n,o=this.currentLang){OY(this.translations[o],e,k7(n)?this.compiler.compile(n,o):this.compiler.compileTranslations(n,o)),this.updateLangs(),this.onTranslationChange.emit({lang:o,translations:this.translations[o]})}changeDefaultLang(e){this.defaultLang=e,this.onDefaultLangChange.emit({lang:e,translations:this.translations[e]})}reloadLang(e){return this.resetLang(e),this.loadAndCompileTranslations(e)}resetLang(e){delete this._translationRequests[e],delete this.translations[e]}getBrowserLang(){if(typeof window>"u"||!window.navigator)return;let e=this.getBrowserCultureLang();return e?e.split(/[-_]/)[0]:void 0}getBrowserCultureLang(){if(!(typeof window>"u"||typeof window.navigator>"u"))return window.navigator.languages?window.navigator.languages[0]:window.navigator.language||window.navigator.browserLanguage||window.navigator.userLanguage}static \u0275fac=function(n){return new(n||t)(ke(l0),ke(L1),ke(z1),ke(A1),ke(c0),ke(M7),ke(x7),ke(D7),ke(w7))};static \u0275prov=R({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();var Te=(()=>{class t{translate;_ref;value="";lastKey=null;lastParams=[];onTranslationChange;onLangChange;onDefaultLangChange;constructor(e,n){this.translate=e,this._ref=n}updateValue(e,n,o){let r=a=>{this.value=a!==void 0?a:e,this.lastKey=e,this._ref.markForCheck()};if(o){let a=this.translate.getParsedResult(o,e,n);ai(a)?a.subscribe(r):r(a)}this.translate.get(e,n).subscribe(r)}transform(e,...n){if(!e||!e.length)return e;if(Hm(e,this.lastKey)&&Hm(n,this.lastParams))return this.value;let o;if(Is(n[0])&&n.length)if(k7(n[0])&&n[0].length){let r=n[0].replace(/(')?([a-zA-Z0-9_]+)(')?(\s)?:/g,'"$2":').replace(/:(\s)?(')(.*?)(')/g,':"$3"');try{o=JSON.parse(r)}catch(a){throw new SyntaxError(`Wrong parameter in TranslatePipe. Expected a valid Object, received: ${n[0]}`)}}else d0(n[0])&&(o=n[0]);return this.lastKey=e,this.lastParams=n,this.updateValue(e,o),this._dispose(),this.onTranslationChange||(this.onTranslationChange=this.translate.onTranslationChange.subscribe(r=>{this.lastKey&&r.lang===this.translate.currentLang&&(this.lastKey=null,this.updateValue(e,o,r.translations))})),this.onLangChange||(this.onLangChange=this.translate.onLangChange.subscribe(r=>{this.lastKey&&(this.lastKey=null,this.updateValue(e,o,r.translations))})),this.onDefaultLangChange||(this.onDefaultLangChange=this.translate.onDefaultLangChange.subscribe(()=>{this.lastKey&&(this.lastKey=null,this.updateValue(e,o))})),this.value}_dispose(){typeof this.onTranslationChange<"u"&&(this.onTranslationChange.unsubscribe(),this.onTranslationChange=void 0),typeof this.onLangChange<"u"&&(this.onLangChange.unsubscribe(),this.onLangChange=void 0),typeof this.onDefaultLangChange<"u"&&(this.onDefaultLangChange.unsubscribe(),this.onDefaultLangChange=void 0)}ngOnDestroy(){this._dispose()}static \u0275fac=function(n){return new(n||t)(Ce(Po,16),Ce(xe,16))};static \u0275pipe=wt({name:"translate",type:t,pure:!1});static \u0275prov=R({token:t,factory:t.\u0275fac})}return t})();var E7=(()=>{class t{static forRoot(e={}){return{ngModule:t,providers:[e.loader||{provide:L1,useClass:KD},e.compiler||{provide:z1,useClass:JD},e.parser||{provide:A1,useClass:ZD},e.missingTranslationHandler||{provide:c0,useClass:XD},l0,{provide:x7,useValue:e.isolate},{provide:M7,useValue:e.useDefaultLang},{provide:D7,useValue:e.extend},{provide:w7,useValue:e.defaultLanguage},Po]}}static forChild(e={}){return{ngModule:t,providers:[e.loader||{provide:L1,useClass:KD},e.compiler||{provide:z1,useClass:JD},e.parser||{provide:A1,useClass:ZD},e.missingTranslationHandler||{provide:c0,useClass:XD},{provide:x7,useValue:e.isolate},{provide:M7,useValue:e.useDefaultLang},{provide:D7,useValue:e.extend},{provide:w7,useValue:e.defaultLanguage},Po]}}static \u0275fac=function(n){return new(n||t)};static \u0275mod=J({type:t});static \u0275inj=X({})}return t})();var I7={mifos_x:{version:"251216",hash:"ec4d16b"},allow_switching_backend_instance:!0};var an=window.env||{},mt={production:!0,version:I7.mifos_x.version,hash:I7.mifos_x.hash,fineractPlatformTenantId:an.fineractPlatformTenantId||"default",fineractPlatformTenantIds:an.fineractPlatformTenantIds||"default",baseApiUrls:an.fineractApiUrls||"https://sandbox.mifos.community,https://demo.mifos.community,https://localhost:8443,"+window.location.origin,baseApiUrl:an.fineractApiUrl||(an.fineractApiUrls?.length>0?an.fineractApiUrls.split(",")[0]:window.location.origin),oauthServerUrl:an.oauthServerUrl||an.fineractApiUrl+an.apiProvider,allowServerSwitch:an.allowServerSwitch||"true",apiProvider:an.apiProvider||"/fineract-provider/api",apiVersion:an.apiVersion||"/v1",apiActuator:an.apiActuator||"/fineract-provider",serverUrl:"",oauth:{enabled:an.oauthServerEnabled||!1,serverUrl:an.oauthServerUrl||"",appId:an.oauthAppId||""},enableRememberMe:!1,warningDialog:{title:"Warning",content:"This system is for authorized use only. Unauthorized access will result in possible legal action. By accessing this system, you acknowledge that you are authorized to do so and that all data stored and processed here is confidential.",buttonText:"Close"},defaultLanguage:an.defaultLanguage||"en-US",supportedLanguages:an.supportedLanguages||"cs-CS,de-DE,en-US,es-MX,fr-FR,it-IT,ko-KO,lt-LT,lv-LV,ne-NE,pt-PT,sw-SW",preloadClients:an.preloadClients||!0,defaultCharDelimiter:an.defaultCharDelimiter||",",displayBackEndInfo:an.displayBackEndInfo||"true",displayTenantSelector:an.displayTenantSelector||"true",waitTimeForNotifications:an.waitTimeForNotifications||60,waitTimeForCOBCatchUp:an.waitTimeForCOBCatchUp||30,session:{timeout:{idleTimeout:an.sessionIdleTimeout||3e5}},httpCacheEnabled:an.httpCacheEnabled||!1,vNextApiUrl:window.env.vNextApiUrl||"https://apis.mifos.community",vNextApiProvider:window.env.vNextApiProvider||"/vnext1",vNextApiVersion:window.env.vNextApiVersion||"/v1.0",interbankTransfers:window.env.interbankTransfers||!1,minPasswordLength:an.minPasswordLength||12,OIDC:{oidcServerEnabled:window.env.oidcServerEnabled||!1,oidcBaseUrl:window.env.oidcBaseUrl||"",oidcClientId:window.env.oidcClientId||"",oidcApiUrl:window.env.oidcApiUrl||"",oidcFrontUrl:window.env.oidcFrontUrl||""}};mt.serverUrl=`${mt.baseApiUrl}${mt.apiProvider}${mt.apiVersion}`;var eS=(()=>{class t{transform(e,n,o,r){if(e){if(n==="loan"&&(o==="closed"?e=e.filter(a=>a.status.code==="loanStatusType.closed.written.off"||a.status.code==="loanStatusType.closed.obligations.met"||a.status.code==="loanStatusType.closed.reschedule.outstanding.amount"||a.status.code==="loanStatusType.withdrawn.by.client"||a.status.code==="loanStatusType.rejected"):e=e.filter(a=>a.status.code!=="loanStatusType.closed.written.off"&&a.status.code!=="loanStatusType.closed.obligations.met"&&a.status.code!=="loanStatusType.closed.reschedule.outstanding.amount"&&a.status.code!=="loanStatusType.withdrawn.by.client"&&a.status.code!=="loanStatusType.rejected")),n==="saving"&&(r==="isFixed"?e=e.filter(a=>a.depositType.value==="Fixed Deposit"):r==="isRecurring"?e=e.filter(a=>a.depositType.value==="Recurring Deposit"):r==="isSavings"&&(e=e.filter(a=>a.depositType.value==="Savings")),o==="closed"?e=e.filter(a=>a.status.code==="savingsAccountStatusType.withdrawn.by.applicant"||a.status.code==="savingsAccountStatusType.closed"||a.status.code==="savingsAccountStatusType.pre.mature.closure"||a.status.code==="savingsAccountStatusType.rejected"):e=e.filter(a=>a.status.code!=="savingsAccountStatusType.withdrawn.by.applicant"&&a.status.code!=="savingsAccountStatusType.closed"&&a.status.code!=="savingsAccountStatusType.pre.mature.closure"&&a.status.code!=="savingsAccountStatusType.rejected")),n==="share"&&(o==="closed"?e=e.filter(a=>a.status.code==="shareAccountStatusType.closed"||a.status.code==="shareAccountStatusType.rejected"):e=e.filter(a=>a.status.code!=="shareAccountStatusType.closed"&&a.status.code!=="shareAccountStatusType.rejected")),n==="guarantor")if(o===!1)e=e.filter(a=>a.status===!0);else return e;return n==="clientApproval"&&(e=e.filter(a=>a.active===!1&&a.status.value==="Pending")),e}}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275pipe=wt({name:"accountsFilter",type:t,pure:!0})}}return t})();var tS=(()=>{class t{transform(e,n,o,r){return e&&(e=e.filter(a=>!(a.currency.code!==o||r&&a.chargeTimeType.id===12||n.filter(s=>s.id===a.id).length))),e}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275pipe=wt({name:"chargesFilter",type:t,pure:!0})}}return t})();var nS=(()=>{class t{transform(e,n){return e&&(e=e.filter(o=>o.penalty===n)),e}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275pipe=wt({name:"chargesPenaltyFilter",type:t,pure:!0})}}return t})();var Os=(()=>{class t{constructor(){this.alertEvent=new j}alert(e){this.alertEvent.emit(e)}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275prov=R({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();var N1=e3(Um());var go=(()=>{class t{constructor(){this.datePipe=d(E1)}static{this.DEFAULT_DATEFORMAT="yyyy-MM-dd"}static{this.DEFAULT_DATETIMEFORMAT="yyyy-MM-dd HH:mm"}getDate(e){return this.datePipe.transform(e,"yyyy-MM-dd")}formatDate(e,n){return new E1(this.language.code).transform(e,n)}formatDateAsString(e,n){return(0,N1.default)(e).format(n)}parseDate(e){return e instanceof Array?(0,N1.default)(e.join("-"),"YYYY-MM-DD").toDate():(0,N1.default)(e).toDate()}parseDatetime(e){return(0,N1.default)(e).toDate()}convertToDate(e,n){return(0,N1.default)(e).toDate()}get language(){return localStorage.getItem("mifosXLanguage")?JSON.parse(localStorage.getItem("mifosXLanguage")):"en"}calculateDiff(e,n){return Math.floor((Date.UTC(n.getFullYear(),n.getMonth(),n.getDate())-Date.UTC(e.getFullYear(),e.getMonth(),e.getDate()))/(1e3*60*60*24))}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275prov=R({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();var Xt=(()=>{class t{constructor(){this.alertService=d(Os),this.dateUtils=d(go),this.minAllowedDate=new Date(1950,0,1),this.maxAllowedDate=new Date(2100,0,1)}static{this.businessDateFormat="yyyy-MM-dd"}static{this.businessDateConfigName="enable-business-date"}static{this.businessDateType="BUSINESS_DATE"}static{this.cobDateType="COB_DATE"}setDateFormat(e){localStorage.setItem("mifosXDateFormat",JSON.stringify(e))}setLanguage(e){localStorage.setItem("mifosXLanguage",JSON.stringify(e))}setDecimalToDisplay(e){localStorage.setItem("mifosXDecimalsToDisplay",e)}setDefaultLanguage(){let e=mt.defaultLanguage?mt.defaultLanguage:"en-US";this.setLanguage({name:e,code:e.substring(0,2)})}setServer(e){localStorage.setItem("mifosXServerURL",e)}setServers(e){localStorage.setItem("mifosXServers",JSON.stringify(e))}setTenantIdentifiers(e){localStorage.setItem("mifosXTenantIdentifiers",JSON.stringify(e))}setTenantIdentifier(e){localStorage.setItem("mifosXTenantIdentifier",e)}setBusinessDate(e){localStorage.setItem("mifosXServerDate",e)}setBusinessDateConfig(e){localStorage.setItem("mifosXServerBusinessDateEnabled",e)}get dateFormat(){return JSON.parse(localStorage.getItem("mifosXDateFormat"))}get language(){return localStorage.getItem("mifosXLanguage")||this.setDefaultLanguage(),JSON.parse(localStorage.getItem("mifosXLanguage"))}get languageCode(){let e=this.language.code;return e==="es"?"es-MX":e==="en"?"en-US":e+"-"+e.toUpperCase()}get decimals(){return localStorage.getItem("mifosXDecimalsToDisplay")?localStorage.getItem("mifosXDecimalsToDisplay"):"2"}get servers(){return JSON.parse(localStorage.getItem("mifosXServers"))}get server(){return localStorage.getItem("mifosXServerURL")?localStorage.getItem("mifosXServerURL"):mt.baseApiUrl&&mt.baseApiUrl!==""?mt.baseApiUrl:this.servers()[0]}get baseServerUrl(){return this.server+mt.apiProvider}get serverUrl(){return this.server+mt.apiProvider+mt.apiVersion}get serverHost(){return this.server}get businessDate(){return this.dateUtils.convertToDate(localStorage.getItem("mifosXServerDate"),t.businessDateFormat)}get businessDateConfig(){return localStorage.getItem("mifosXServerBusinessDateEnabled")}get minPastDate(){return this.minAllowedDate}get maxFutureDate(){return this.maxAllowedDate}get tenantIdentifiers(){return JSON.parse(localStorage.getItem("mifosXTenantIdentifiers"))}get tenantIdentifier(){return localStorage.getItem("mifosXTenantIdentifier")}validateBusinessDateStatus(e){e.some(n=>{if(n.name===t.businessDateConfigName)return n.enabled})}getBusinessDates(e,n){e.some(o=>{if(o.type===n){let r=new Date(o.date);this.setBusinessDate(this.dateUtils.formatDate(r,t.businessDateFormat)),this.alertService.alert({type:n+" Set",message:this.dateUtils.formatDate(r,this.dateFormat)});return}})}setThemeDarkEnabled(e){localStorage.setItem("mifosXThemeDarkEnabled",JSON.stringify(e))}get themeDarkEnabled(){return JSON.parse(localStorage.getItem("mifosXThemeDarkEnabled"))}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275prov=R({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();var $m=e3(Um());var Lo=(()=>{class t{constructor(){this.settingsService=d(Xt)}transform(e,n){let o=this.settingsService.dateFormat.replace("dd","DD");if(typeof e>"u")return"";let r;return $m.default.locale(this.settingsService.language.code),e instanceof Array?r=(0,$m.default)(e.join("-"),"YYYY-MM-DD"):r=(0,$m.default)(e),n==null?r.format(o):r.format(n)}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275pipe=wt({name:"dateFormat",type:t,pure:!0})}}return t})();var u0=e3(Um());var ca=(()=>{class t{transform(e,n){if(e==null||e==="")return"";let o;if(Array.isArray(e)){let[a,s,c,m,f,v]=e;m!=null?o=(0,u0.default)({year:a,month:(s??1)-1,date:c,hour:m,minute:f??0,second:v??0}):o=(0,u0.default)({year:a,month:(s??1)-1,date:c})}else typeof e=="number"&&e<1e12?o=u0.default.unix(e):o=(0,u0.default)(e);let r=n??"yyyy-MM-ddTHH:mm:ssZ";return o.format(r)}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275pipe=wt({name:"datetimeFormat",type:t,pure:!0})}}return t})();var Wm=(()=>{class t{transform(e){if(e){if(/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/gi.test(e))return e.split("-")[4];{let r=e.length;return r>20?e.substring(r-20,r):e}}else return""}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275pipe=wt({name:"externalIdentifier",type:t,pure:!0})}}return t})();var iS=new WeakMap,oS=(()=>{class t{constructor(){this.sanitizer=d(Ga)}transform(e,n,o,r){if(!n||!o||e===null||e===void 0)return"";let a=iS.get(n);a||(a=new Map,iS.set(n,a));let s=a.get(o);if(!s){if(s=new Map,Array.isArray(n))for(let f of n)f&&f[o]!==void 0&&f[o]!==null&&s.set(f[o],f);a.set(o,s)}let c=s.get(e),m=c?c[r]??"":"";return typeof m=="string"?this.sanitizer.sanitize(Fn.HTML,m)||"":String(m||"")}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275pipe=wt({name:"find",type:t,pure:!0})}}return t})();var Ts=(()=>{class t{constructor(){this.decimalFormat=d(Zd),this.settingsService=d(Xt)}transform(e,n){if(e===void 0)return n||"";let o=this.settingsService.decimals,r=`1.${o}-${o}`;return this.decimalFormat.transform(e,r)}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275pipe=wt({name:"formatNumber",type:t,pure:!0})}}return t})();var sS=e3(aS());var Ym=(()=>{class t{transform(e){if(e.charAt(0)==="{"&&e.charAt(e.length-1)==="}")try{return sS.json(e)}catch{return e}return e}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275pipe=wt({name:"prettyPrint",type:t,pure:!0})}}return t})();var cS=(()=>{class t{transform(e){return{true:"status-active",false:"status-deleted",Active:"status-active",Block:"status-block","charges.StatusType.active.true":"status-active","loanStatusType.submitted.and.pending.approval":"status-pending","loanStatusType.approved":"status-approved","loanStatusType.active":"status-active","loanStatusType.overpaid":"status-overpaid","loanStatusType.chargeoff":"status-chargeoff","loanStatusType.activeOverdue":"status-active-overdue","loanSubStatusType.contractTermination":"subStatus-contract-termination","savingsAccountStatusType.submitted.and.pending.approval":"status-pending","savingsAccountStatusType.approved":"status-approved","savingsAccountStatusType.active":"status-active","savingsAccountStatusType.activeInactive":"status-active-overdue","savingsAccountStatusType.activeDormant":"status-active-overdue","savingsAccountStatusType.matured":"status-matured","shareAccountStatusType.submitted.and.pending.approval":"status-pending","shareAccountStatusType.approved":"status-approved","shareAccountStatusType.active":"status-active","shareAccountStatusType.rejected":"status-rejected","loanProduct.active":"status-active","loanProduct.inActive":"status-inactive","clientStatusType.pending":"status-pending","clientStatusType.closed":"status-closed","clientStatusType.rejected":"status-rejected","clientStatusType.withdraw":"status-withdraw","clientStatusType.active":"status-active","clientStatusType.submitted.and.pending.approval":"status-pending","clientStatusTYpe.approved":"status-approved","clientStatusType.transfer.in.progress":"status-transfer-progress","clientStatusType.transfer.on.hold":"status-transfer-hold","groupingStatusType.active":"status-active","groupingStatusType.pending":"status-pending","groupingStatusType.submitted.and.pending.approval":"status-pending","groupingStatusType.approved":"status-approved","smsCampaignStatus.active":"status-active","smsCampaignStatus.pending":"status-pending","smsCampaignStatus.closed":"status-closed","purchasedSharesStatusType.applied":"status-pending"}[e]??"status-unknown"}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275pipe=wt({name:"statusLookup",type:t,pure:!0})}}return t})();var Wc=(()=>{class t{constructor(){this.translateService=d(Po),this.onLangChange=this.translateService.onLangChange.subscribe(()=>{})}ngOnDestroy(){this.onLangChange&&this.onLangChange.unsubscribe()}transform(e,n,o="labels"){if(!e)return e;let r=`${o}.${n}.${e}`;return this.translateService.instant(r)}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275pipe=wt({name:"translateKey",type:t,pure:!1})}}return t})();var Qm=(()=>{class t{transform(e,n){if(e.length<=40)return e;let o=e.substring(0,30);return n&&(o=e.substring(0,n)),o}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275pipe=wt({name:"truncateText",type:t,pure:!0})}}return t})();var dS=(()=>{class t{transform(e){e=decodeURIComponent(e);let n=e.slice(1).split("/");if(e.includes("?")){let r=n.pop(),a=r.slice(0,r.indexOf("?"));n.push(a)}return n.map(r=>r.split("-").map(a=>a.charAt(0).toUpperCase()+a.slice(1)).join(" ")).join(" | ")}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275pipe=wt({name:"urlToString",type:t,pure:!0})}}return t})();var Km=(()=>{class t{constructor(){this.translateService=d(Po)}transform(e,...n){if(e==null)return null;let o=e?"Yes":"No";return this.translateService.instant("labels.buttons."+o)}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275pipe=wt({name:"yesNo",type:t,pure:!0})}}return t})();var uS=(()=>{class t{static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275mod=J({type:t})}static{this.\u0275inj=X({providers:[cS,eS,tS,nS,oS,dS,Lo,ca,Wm,Ts,Km,Ym,Wc,Qm],imports:[he]})}}return t})();var qa={headers:{"Fineract-Platform-TenantId":mt.fineractPlatformTenantId}},Xm="Authorization",LY="Fineract-Platform-TenantId",mS="Fineract-Platform-TFA-Token",pS=(()=>{class t{constructor(){this.settingsService=d(Xt)}intercept(e,n){return this.settingsService.tenantIdentifier&&(qa.headers["Fineract-Platform-TenantId"]=this.settingsService.tenantIdentifier),e=e.clone({setHeaders:qa.headers}),n.handle(e)}setAuthorizationToken(e){mt.oauth.enabled?qa.headers[Xm]=`Bearer ${e}`:qa.headers[Xm]=`Basic ${e}`}setTwoFactorAccessToken(e){qa.headers[mS]=e}removeAuthorization(){delete qa.headers[Xm]}removeAuthorizationTenant(){delete qa.headers[Xm],delete qa.headers[LY]}removeTwoFactorAuthorization(){delete qa.headers[mS]}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275prov=R({token:t,factory:t.\u0275fac})}}return t})();var Zm=(()=>{class t{changePassword(e,n){return this.http.put(`/users/${e}`,n)}constructor(){this.http=d(Bn),this.alertService=d(Os),this.authenticationInterceptor=d(pS),this.userLoggedIn$=new ct(!1),this.isAuthenticated$=this.userLoggedIn$.asObservable(),this.dialogShown=!1,this.credentialsStorageKey="mifosXCredentials",this.oAuthTokenDetailsStorageKey="mifosXOAuthTokenDetails",this.twoFactorAuthenticationTokenStorageKey="mifosXTwoFactorAuthenticationToken";let e=this.authenticationInterceptor;this.userLoggedIn=!1,this.rememberMe=!1,this.storage=sessionStorage;let n=JSON.parse(sessionStorage.getItem(this.credentialsStorageKey)||localStorage.getItem(this.credentialsStorageKey));if(n){n.rememberMe&&(this.rememberMe=!0,this.storage=localStorage);let o=JSON.parse(this.storage.getItem(this.twoFactorAuthenticationTokenStorageKey));mt.oauth.enabled?this.refreshOAuthAccessToken():e.setAuthorizationToken(n.base64EncodedAuthenticationKey),o&&e.setTwoFactorAccessToken(o.token),this.userLoggedIn=!0,this.userLoggedIn$.next(!0)}}login(e){this.alertService.alert({type:"Authentication Start",message:"Please wait..."});let n=mt.enableRememberMe===!0;if(this.rememberMe=n?e.remember:!1,this.storage=this.rememberMe?localStorage:sessionStorage,mt.oauth.enabled){let o=new te;o=o.set("username",e.username),o=o.set("password",e.password),o=o.set("client_id",`${mt.oauth.appId}`),o=o.set("grant_type","password"),o=o.set("remember_me",this.rememberMe?"true":"false");let r=new To;return r=r.set("Content-Type","application/x-www-form-urlencoded"),this.http.post(`${mt.oauth.serverUrl}/token`,o.toString(),{headers:r}).pipe(me(a=>(this.getUserDetails(a),re(!0))))}else return this.http.post("/authentication",{username:e.username,password:e.password,remember:this.rememberMe}).pipe(me(o=>(this.onLoginSuccess(o),re(!0))))}getUserDetails(e){this.refreshTokenOnExpiry(e.expires_in);let n=new To;n=n.set("Authorization","bearer "+e.access_token),this.http.get(`${mt.serverUrl}/userdetails`,{headers:n}).subscribe(o=>{this.onLoginSuccess(o),o.shouldRenewPassword||this.storage.setItem(this.oAuthTokenDetailsStorageKey,JSON.stringify(e))})}refreshTokenOnExpiry(e){setTimeout(()=>this.refreshOAuthAccessToken(),e*1e3)}refreshOAuthAccessToken(){var e=JSON.parse(this.storage.getItem(this.oAuthTokenDetailsStorageKey));if(e==null)return;e=JSON.parse(this.storage.getItem(this.oAuthTokenDetailsStorageKey)).refresh_token,this.authenticationInterceptor.removeAuthorization();let n=JSON.parse(this.storage.getItem(this.credentialsStorageKey)),o=new te;o=o.set("username",n.username),o=o.set("client_id",`${mt.oauth.appId}`),o=o.set("refresh_token",e),o=o.set("grant_type","refresh_token");let r=new To;return r=r.set("Content-Type","application/x-www-form-urlencoded"),this.http.post(`${mt.oauth.serverUrl}/token`,o.toString(),{headers:r}).subscribe(a=>{this.storage.setItem(this.oAuthTokenDetailsStorageKey,JSON.stringify(a)),this.authenticationInterceptor.setAuthorizationToken(a.access_token),this.refreshTokenOnExpiry(a.expires_in);let s=JSON.parse(this.storage.getItem(this.credentialsStorageKey));s.accessToken=a.access_token,this.storage.setItem(this.credentialsStorageKey,JSON.stringify(s))})}onLoginSuccess(e){this.userLoggedIn=!0,this.userLoggedIn$.next(!0),e.rememberMe=this.rememberMe,mt.oauth.enabled?this.authenticationInterceptor.setAuthorizationToken(e.accessToken):this.authenticationInterceptor.setAuthorizationToken(e.base64EncodedAuthenticationKey),e.isTwoFactorAuthenticationRequired?(this.credentials=e,this.alertService.alert({type:"Two Factor Authentication Required",message:"Two Factor Authentication Required"})):e.shouldRenewPassword?(this.credentials=e,this.alertService.alert({type:"Password Expired",message:"Your password has expired, please reset your password!"})):(this.setCredentials(e),this.alertService.alert({type:"Authentication Success",message:`${e.username} successfully logged in!`}),delete this.credentials)}logoutAuthSession(){let e=JSON.parse(this.storage.getItem(this.oAuthTokenDetailsStorageKey)).refresh_token,n=JSON.parse(this.storage.getItem(this.credentialsStorageKey));this.authenticationInterceptor.removeAuthorizationTenant();let o=new te;o=o.set("username",n.username),o=o.set("client_id",`${mt.oauth.appId}`),o=o.set("refresh_token",e);let r=new To;return r=r.set("Content-Type","application/x-www-form-urlencoded"),this.http.post(`${mt.oauth.serverUrl}/logout`,o.toString(),{headers:r}).subscribe()}logout(){let e=JSON.parse(this.storage.getItem(this.twoFactorAuthenticationTokenStorageKey));return e&&(this.http.post("/twofactor/invalidate",{token:e.token}).subscribe(),this.authenticationInterceptor.removeTwoFactorAuthorization()),JSON.parse(this.storage.getItem(this.oAuthTokenDetailsStorageKey))&&this.logoutAuthSession(),this.authenticationInterceptor.removeAuthorization(),this.setCredentials(),this.resetDialog(),this.userLoggedIn=!1,this.userLoggedIn$.next(!1),re(!0)}twoFactorAccessTokenIsValid(){let e=JSON.parse(this.storage.getItem(this.twoFactorAuthenticationTokenStorageKey));return e?new Date().getTime(){this.onOTPValidateSuccess(o)}))}onOTPValidateSuccess(e){this.authenticationInterceptor.setTwoFactorAccessToken(e.token),this.credentials.shouldRenewPassword?this.alertService.alert({type:"Password Expired",message:"Your password has expired, please reset your password!"}):(this.setCredentials(this.credentials),this.alertService.alert({type:"Authentication Success",message:`${this.credentials.username} successfully logged in!`}),delete this.credentials,this.storage.setItem(this.twoFactorAuthenticationTokenStorageKey,JSON.stringify(e)))}resetPassword(e){return this.http.put(`/users/${this.credentials.userId}`,e).pipe(me(()=>{this.alertService.alert({type:"Password Reset Success",message:"Your password was sucessfully reset!"}),this.authenticationInterceptor.removeAuthorization(),this.authenticationInterceptor.removeTwoFactorAuthorization();let n={username:this.credentials.username,password:e.password,remember:this.rememberMe};this.login(n).subscribe()}))}getUserLoggedIn(){return this.userLoggedIn}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275prov=R({token:t,factory:t.\u0275fac})}}return t})();var Ps=(()=>{class t{constructor(){this.templateRef=d(tt),this.viewContainer=d(dt),this.authenticationService=d(Zm);let e=this.authenticationService.getCredentials();this.userPermissions=e.permissions}set mifosxHasPermission(e){if(typeof e!="string")throw new Error("hasPermission value must be a string");this.viewContainer.clear(),this.hasPermission(e)&&this.viewContainer.createEmbeddedView(this.templateRef)}hasPermission(e){return e=e.trim(),this.userPermissions.includes("ALL_FUNCTIONS")?!0:e!==""?e.substring(0,5)==="READ_"&&this.userPermissions.includes("ALL_FUNCTIONS_READ")?!0:!!this.userPermissions.includes(e):!1}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275dir=z({type:t,selectors:[["","mifosxHasPermission",""]],inputs:{mifosxHasPermission:"mifosxHasPermission"}})}}return t})();var CS=(()=>{class t{_renderer;_elementRef;onChange=e=>{};onTouched=()=>{};constructor(e,n){this._renderer=e,this._elementRef=n}setProperty(e,n){this._renderer.setProperty(this._elementRef.nativeElement,e,n)}registerOnTouched(e){this.onTouched=e}registerOnChange(e){this.onChange=e}setDisabledState(e){this.setProperty("disabled",e)}static \u0275fac=function(n){return new(n||t)(Ce(Ke),Ce(Q))};static \u0275dir=z({type:t})}return t})(),xS=(()=>{class t extends CS{static \u0275fac=(()=>{let e;return function(o){return(e||(e=Ie(t)))(o||t)}})();static \u0275dir=z({type:t,features:[ce]})}return t})(),di=new L("");var AY={provide:di,useExisting:kt(()=>yi),multi:!0};function zY(){let t=Oo()?Oo().getUserAgent():"";return/android (\d+)/.test(t.toLowerCase())}var RY=new L(""),yi=(()=>{class t extends CS{_compositionMode;_composing=!1;constructor(e,n,o){super(e,n),this._compositionMode=o,this._compositionMode==null&&(this._compositionMode=!zY())}writeValue(e){let n=e??"";this.setProperty("value",n)}_handleInput(e){(!this._compositionMode||this._compositionMode&&!this._composing)&&this.onChange(e)}_compositionStart(){this._composing=!0}_compositionEnd(e){this._composing=!1,this._compositionMode&&this.onChange(e)}static \u0275fac=function(n){return new(n||t)(Ce(Ke),Ce(Q),Ce(RY,8))};static \u0275dir=z({type:t,selectors:[["input","formControlName","",3,"type","checkbox"],["textarea","formControlName",""],["input","formControl","",3,"type","checkbox"],["textarea","formControl",""],["input","ngModel","",3,"type","checkbox"],["textarea","ngModel",""],["","ngDefaultControl",""]],hostBindings:function(n,o){n&1&&N("input",function(a){return o._handleInput(a.target.value)})("blur",function(){return o.onTouched()})("compositionstart",function(){return o._compositionStart()})("compositionend",function(a){return o._compositionEnd(a.target.value)})},standalone:!1,features:[de([AY]),ce]})}return t})();function A7(t){return t==null||z7(t)===0}function z7(t){return t==null?null:Array.isArray(t)||typeof t=="string"?t.length:t instanceof Set?t.size:null}var Ci=new L(""),Yc=new L(""),NY=/^(?=.{1,254}$)(?=.{1,64}@)[a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+)*@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/,en=class{static min(i){return MS(i)}static max(i){return wS(i)}static required(i){return DS(i)}static requiredTrue(i){return FY(i)}static email(i){return VY(i)}static minLength(i){return SS(i)}static maxLength(i){return kS(i)}static pattern(i){return BY(i)}static nullValidator(i){return ep()}static compose(i){return LS(i)}static composeAsync(i){return AS(i)}};function MS(t){return i=>{if(i.value==null||t==null)return null;let e=parseFloat(i.value);return!isNaN(e)&&e{if(i.value==null||t==null)return null;let e=parseFloat(i.value);return!isNaN(e)&&e>t?{max:{max:t,actual:i.value}}:null}}function DS(t){return A7(t.value)?{required:!0}:null}function FY(t){return t.value===!0?null:{required:!0}}function VY(t){return A7(t.value)||NY.test(t.value)?null:{email:!0}}function SS(t){return i=>{let e=i.value?.length??z7(i.value);return e===null||e===0?null:e{let e=i.value?.length??z7(i.value);return e!==null&&e>t?{maxlength:{requiredLength:t,actualLength:e}}:null}}function BY(t){if(!t)return ep;let i,e;return typeof t=="string"?(e="",t.charAt(0)!=="^"&&(e+="^"),e+=t,t.charAt(t.length-1)!=="$"&&(e+="$"),i=new RegExp(e)):(e=t.toString(),i=t),n=>{if(A7(n.value))return null;let o=n.value;return i.test(o)?null:{pattern:{requiredPattern:e,actualValue:o}}}}function ep(t){return null}function ES(t){return t!=null}function IS(t){return Ha(t)?tn(t):t}function OS(t){let i={};return t.forEach(e=>{i=e!=null?q(q({},i),e):i}),Object.keys(i).length===0?null:i}function TS(t,i){return i.map(e=>e(t))}function jY(t){return!t.validate}function PS(t){return t.map(i=>jY(i)?i:e=>i.validate(e))}function LS(t){if(!t)return null;let i=t.filter(ES);return i.length==0?null:function(e){return OS(TS(e,i))}}function R7(t){return t!=null?LS(PS(t)):null}function AS(t){if(!t)return null;let i=t.filter(ES);return i.length==0?null:function(e){let n=TS(e,i).map(IS);return Oa(n).pipe(me(OS))}}function N7(t){return t!=null?AS(PS(t)):null}function fS(t,i){return t===null?[i]:Array.isArray(t)?[...t,i]:[t,i]}function zS(t){return t._rawValidators}function RS(t){return t._rawAsyncValidators}function T7(t){return t?Array.isArray(t)?t:[t]:[]}function tp(t,i){return Array.isArray(t)?t.includes(i):t===i}function hS(t,i){let e=T7(i);return T7(t).forEach(o=>{tp(e,o)||e.push(o)}),e}function gS(t,i){return T7(i).filter(e=>!tp(t,e))}var np=class{get value(){return this.control?this.control.value:null}get valid(){return this.control?this.control.valid:null}get invalid(){return this.control?this.control.invalid:null}get pending(){return this.control?this.control.pending:null}get disabled(){return this.control?this.control.disabled:null}get enabled(){return this.control?this.control.enabled:null}get errors(){return this.control?this.control.errors:null}get pristine(){return this.control?this.control.pristine:null}get dirty(){return this.control?this.control.dirty:null}get touched(){return this.control?this.control.touched:null}get status(){return this.control?this.control.status:null}get untouched(){return this.control?this.control.untouched:null}get statusChanges(){return this.control?this.control.statusChanges:null}get valueChanges(){return this.control?this.control.valueChanges:null}get path(){return null}_composedValidatorFn;_composedAsyncValidatorFn;_rawValidators=[];_rawAsyncValidators=[];_setValidators(i){this._rawValidators=i||[],this._composedValidatorFn=R7(this._rawValidators)}_setAsyncValidators(i){this._rawAsyncValidators=i||[],this._composedAsyncValidatorFn=N7(this._rawAsyncValidators)}get validator(){return this._composedValidatorFn||null}get asyncValidator(){return this._composedAsyncValidatorFn||null}_onDestroyCallbacks=[];_registerOnDestroy(i){this._onDestroyCallbacks.push(i)}_invokeOnDestroyCallbacks(){this._onDestroyCallbacks.forEach(i=>i()),this._onDestroyCallbacks=[]}reset(i=void 0){this.control&&this.control.reset(i)}hasError(i,e){return this.control?this.control.hasError(i,e):!1}getError(i,e){return this.control?this.control.getError(i,e):null}},vi=class extends np{name;get formDirective(){return null}get path(){return null}},ei=class extends np{_parent=null;name=null;valueAccessor=null},ip=class{_cd;constructor(i){this._cd=i}get isTouched(){return this._cd?.control?._touched?.(),!!this._cd?.control?.touched}get isUntouched(){return!!this._cd?.control?.untouched}get isPristine(){return this._cd?.control?._pristine?.(),!!this._cd?.control?.pristine}get isDirty(){return!!this._cd?.control?.dirty}get isValid(){return this._cd?.control?._status?.(),!!this._cd?.control?.valid}get isInvalid(){return!!this._cd?.control?.invalid}get isPending(){return!!this._cd?.control?.pending}get isSubmitted(){return this._cd?._submitted?.(),!!this._cd?.submitted}},HY={"[class.ng-untouched]":"isUntouched","[class.ng-touched]":"isTouched","[class.ng-pristine]":"isPristine","[class.ng-dirty]":"isDirty","[class.ng-valid]":"isValid","[class.ng-invalid]":"isInvalid","[class.ng-pending]":"isPending"},ICe=Ne(q({},HY),{"[class.ng-submitted]":"isSubmitted"}),mn=(()=>{class t extends ip{constructor(e){super(e)}static \u0275fac=function(n){return new(n||t)(Ce(ei,2))};static \u0275dir=z({type:t,selectors:[["","formControlName",""],["","ngModel",""],["","formControl",""]],hostVars:14,hostBindings:function(n,o){n&2&&oe("ng-untouched",o.isUntouched)("ng-touched",o.isTouched)("ng-pristine",o.isPristine)("ng-dirty",o.isDirty)("ng-valid",o.isValid)("ng-invalid",o.isInvalid)("ng-pending",o.isPending)},standalone:!1,features:[ce]})}return t})(),tr=(()=>{class t extends ip{constructor(e){super(e)}static \u0275fac=function(n){return new(n||t)(Ce(vi,10))};static \u0275dir=z({type:t,selectors:[["","formGroupName",""],["","formArrayName",""],["","ngModelGroup",""],["","formGroup",""],["form",3,"ngNoForm",""],["","ngForm",""]],hostVars:16,hostBindings:function(n,o){n&2&&oe("ng-untouched",o.isUntouched)("ng-touched",o.isTouched)("ng-pristine",o.isPristine)("ng-dirty",o.isDirty)("ng-valid",o.isValid)("ng-invalid",o.isInvalid)("ng-pending",o.isPending)("ng-submitted",o.isSubmitted)},standalone:!1,features:[ce]})}return t})();var m0="VALID",Jm="INVALID",F1="PENDING",p0="DISABLED",As=class{},op=class extends As{value;source;constructor(i,e){super(),this.value=i,this.source=e}},h0=class extends As{pristine;source;constructor(i,e){super(),this.pristine=i,this.source=e}},g0=class extends As{touched;source;constructor(i,e){super(),this.touched=i,this.source=e}},V1=class extends As{status;source;constructor(i,e){super(),this.status=i,this.source=e}},rp=class extends As{source;constructor(i){super(),this.source=i}},_0=class extends As{source;constructor(i){super(),this.source=i}};function F7(t){return(lp(t)?t.validators:t)||null}function UY(t){return Array.isArray(t)?R7(t):t||null}function V7(t,i){return(lp(i)?i.asyncValidators:t)||null}function $Y(t){return Array.isArray(t)?N7(t):t||null}function lp(t){return t!=null&&!Array.isArray(t)&&typeof t=="object"}function NS(t,i,e){let n=t.controls;if(!(i?Object.keys(n):n).length)throw new pe(1e3,"");if(!n[e])throw new pe(1001,"")}function FS(t,i,e){t._forEachChild((n,o)=>{if(e[o]===void 0)throw new pe(1002,"")})}var B1=class{_pendingDirty=!1;_hasOwnPendingAsyncValidator=null;_pendingTouched=!1;_onCollectionChange=()=>{};_updateOn;_parent=null;_asyncValidationSubscription;_composedValidatorFn;_composedAsyncValidatorFn;_rawValidators;_rawAsyncValidators;value;constructor(i,e){this._assignValidators(i),this._assignAsyncValidators(e)}get validator(){return this._composedValidatorFn}set validator(i){this._rawValidators=this._composedValidatorFn=i}get asyncValidator(){return this._composedAsyncValidatorFn}set asyncValidator(i){this._rawAsyncValidators=this._composedAsyncValidatorFn=i}get parent(){return this._parent}get status(){return Vn(this.statusReactive)}set status(i){Vn(()=>this.statusReactive.set(i))}_status=Zn(()=>this.statusReactive());statusReactive=we(void 0);get valid(){return this.status===m0}get invalid(){return this.status===Jm}get pending(){return this.status==F1}get disabled(){return this.status===p0}get enabled(){return this.status!==p0}errors;get pristine(){return Vn(this.pristineReactive)}set pristine(i){Vn(()=>this.pristineReactive.set(i))}_pristine=Zn(()=>this.pristineReactive());pristineReactive=we(!0);get dirty(){return!this.pristine}get touched(){return Vn(this.touchedReactive)}set touched(i){Vn(()=>this.touchedReactive.set(i))}_touched=Zn(()=>this.touchedReactive());touchedReactive=we(!1);get untouched(){return!this.touched}_events=new B;events=this._events.asObservable();valueChanges;statusChanges;get updateOn(){return this._updateOn?this._updateOn:this.parent?this.parent.updateOn:"change"}setValidators(i){this._assignValidators(i)}setAsyncValidators(i){this._assignAsyncValidators(i)}addValidators(i){this.setValidators(hS(i,this._rawValidators))}addAsyncValidators(i){this.setAsyncValidators(hS(i,this._rawAsyncValidators))}removeValidators(i){this.setValidators(gS(i,this._rawValidators))}removeAsyncValidators(i){this.setAsyncValidators(gS(i,this._rawAsyncValidators))}hasValidator(i){return tp(this._rawValidators,i)}hasAsyncValidator(i){return tp(this._rawAsyncValidators,i)}clearValidators(){this.validator=null}clearAsyncValidators(){this.asyncValidator=null}markAsTouched(i={}){let e=this.touched===!1;this.touched=!0;let n=i.sourceControl??this;this._parent&&!i.onlySelf&&this._parent.markAsTouched(Ne(q({},i),{sourceControl:n})),e&&i.emitEvent!==!1&&this._events.next(new g0(!0,n))}markAllAsDirty(i={}){this.markAsDirty({onlySelf:!0,emitEvent:i.emitEvent,sourceControl:this}),this._forEachChild(e=>e.markAllAsDirty(i))}markAllAsTouched(i={}){this.markAsTouched({onlySelf:!0,emitEvent:i.emitEvent,sourceControl:this}),this._forEachChild(e=>e.markAllAsTouched(i))}markAsUntouched(i={}){let e=this.touched===!0;this.touched=!1,this._pendingTouched=!1;let n=i.sourceControl??this;this._forEachChild(o=>{o.markAsUntouched({onlySelf:!0,emitEvent:i.emitEvent,sourceControl:n})}),this._parent&&!i.onlySelf&&this._parent._updateTouched(i,n),e&&i.emitEvent!==!1&&this._events.next(new g0(!1,n))}markAsDirty(i={}){let e=this.pristine===!0;this.pristine=!1;let n=i.sourceControl??this;this._parent&&!i.onlySelf&&this._parent.markAsDirty(Ne(q({},i),{sourceControl:n})),e&&i.emitEvent!==!1&&this._events.next(new h0(!1,n))}markAsPristine(i={}){let e=this.pristine===!1;this.pristine=!0,this._pendingDirty=!1;let n=i.sourceControl??this;this._forEachChild(o=>{o.markAsPristine({onlySelf:!0,emitEvent:i.emitEvent})}),this._parent&&!i.onlySelf&&this._parent._updatePristine(i,n),e&&i.emitEvent!==!1&&this._events.next(new h0(!0,n))}markAsPending(i={}){this.status=F1;let e=i.sourceControl??this;i.emitEvent!==!1&&(this._events.next(new V1(this.status,e)),this.statusChanges.emit(this.status)),this._parent&&!i.onlySelf&&this._parent.markAsPending(Ne(q({},i),{sourceControl:e}))}disable(i={}){let e=this._parentMarkedDirty(i.onlySelf);this.status=p0,this.errors=null,this._forEachChild(o=>{o.disable(Ne(q({},i),{onlySelf:!0}))}),this._updateValue();let n=i.sourceControl??this;i.emitEvent!==!1&&(this._events.next(new op(this.value,n)),this._events.next(new V1(this.status,n)),this.valueChanges.emit(this.value),this.statusChanges.emit(this.status)),this._updateAncestors(Ne(q({},i),{skipPristineCheck:e}),this),this._onDisabledChange.forEach(o=>o(!0))}enable(i={}){let e=this._parentMarkedDirty(i.onlySelf);this.status=m0,this._forEachChild(n=>{n.enable(Ne(q({},i),{onlySelf:!0}))}),this.updateValueAndValidity({onlySelf:!0,emitEvent:i.emitEvent}),this._updateAncestors(Ne(q({},i),{skipPristineCheck:e}),this),this._onDisabledChange.forEach(n=>n(!1))}_updateAncestors(i,e){this._parent&&!i.onlySelf&&(this._parent.updateValueAndValidity(i),i.skipPristineCheck||this._parent._updatePristine({},e),this._parent._updateTouched({},e))}setParent(i){this._parent=i}getRawValue(){return this.value}updateValueAndValidity(i={}){if(this._setInitialStatus(),this._updateValue(),this.enabled){let n=this._cancelExistingSubscription();this.errors=this._runValidator(),this.status=this._calculateStatus(),(this.status===m0||this.status===F1)&&this._runAsyncValidator(n,i.emitEvent)}let e=i.sourceControl??this;i.emitEvent!==!1&&(this._events.next(new op(this.value,e)),this._events.next(new V1(this.status,e)),this.valueChanges.emit(this.value),this.statusChanges.emit(this.status)),this._parent&&!i.onlySelf&&this._parent.updateValueAndValidity(Ne(q({},i),{sourceControl:e}))}_updateTreeValidity(i={emitEvent:!0}){this._forEachChild(e=>e._updateTreeValidity(i)),this.updateValueAndValidity({onlySelf:!0,emitEvent:i.emitEvent})}_setInitialStatus(){this.status=this._allControlsDisabled()?p0:m0}_runValidator(){return this.validator?this.validator(this):null}_runAsyncValidator(i,e){if(this.asyncValidator){this.status=F1,this._hasOwnPendingAsyncValidator={emitEvent:e!==!1,shouldHaveEmitted:i!==!1};let n=IS(this.asyncValidator(this));this._asyncValidationSubscription=n.subscribe(o=>{this._hasOwnPendingAsyncValidator=null,this.setErrors(o,{emitEvent:e,shouldHaveEmitted:i})})}}_cancelExistingSubscription(){if(this._asyncValidationSubscription){this._asyncValidationSubscription.unsubscribe();let i=(this._hasOwnPendingAsyncValidator?.emitEvent||this._hasOwnPendingAsyncValidator?.shouldHaveEmitted)??!1;return this._hasOwnPendingAsyncValidator=null,i}return!1}setErrors(i,e={}){this.errors=i,this._updateControlsErrors(e.emitEvent!==!1,this,e.shouldHaveEmitted)}get(i){let e=i;return e==null||(Array.isArray(e)||(e=e.split(".")),e.length===0)?null:e.reduce((n,o)=>n&&n._find(o),this)}getError(i,e){let n=e?this.get(e):this;return n&&n.errors?n.errors[i]:null}hasError(i,e){return!!this.getError(i,e)}get root(){let i=this;for(;i._parent;)i=i._parent;return i}_updateControlsErrors(i,e,n){this.status=this._calculateStatus(),i&&this.statusChanges.emit(this.status),(i||n)&&this._events.next(new V1(this.status,e)),this._parent&&this._parent._updateControlsErrors(i,e,n)}_initObservables(){this.valueChanges=new j,this.statusChanges=new j}_calculateStatus(){return this._allControlsDisabled()?p0:this.errors?Jm:this._hasOwnPendingAsyncValidator||this._anyControlsHaveStatus(F1)?F1:this._anyControlsHaveStatus(Jm)?Jm:m0}_anyControlsHaveStatus(i){return this._anyControls(e=>e.status===i)}_anyControlsDirty(){return this._anyControls(i=>i.dirty)}_anyControlsTouched(){return this._anyControls(i=>i.touched)}_updatePristine(i,e){let n=!this._anyControlsDirty(),o=this.pristine!==n;this.pristine=n,this._parent&&!i.onlySelf&&this._parent._updatePristine(i,e),o&&this._events.next(new h0(this.pristine,e))}_updateTouched(i={},e){this.touched=this._anyControlsTouched(),this._events.next(new g0(this.touched,e)),this._parent&&!i.onlySelf&&this._parent._updateTouched(i,e)}_onDisabledChange=[];_registerOnCollectionChange(i){this._onCollectionChange=i}_setUpdateStrategy(i){lp(i)&&i.updateOn!=null&&(this._updateOn=i.updateOn)}_parentMarkedDirty(i){let e=this._parent&&this._parent.dirty;return!i&&!!e&&!this._parent._anyControlsDirty()}_find(i){return null}_assignValidators(i){this._rawValidators=Array.isArray(i)?i.slice():i,this._composedValidatorFn=UY(this._rawValidators)}_assignAsyncValidators(i){this._rawAsyncValidators=Array.isArray(i)?i.slice():i,this._composedAsyncValidatorFn=$Y(this._rawAsyncValidators)}},qc=class extends B1{constructor(i,e,n){super(F7(e),V7(n,e)),this.controls=i,this._initObservables(),this._setUpdateStrategy(e),this._setUpControls(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!!this.asyncValidator})}controls;registerControl(i,e){return this.controls[i]?this.controls[i]:(this.controls[i]=e,e.setParent(this),e._registerOnCollectionChange(this._onCollectionChange),e)}addControl(i,e,n={}){this.registerControl(i,e),this.updateValueAndValidity({emitEvent:n.emitEvent}),this._onCollectionChange()}removeControl(i,e={}){this.controls[i]&&this.controls[i]._registerOnCollectionChange(()=>{}),delete this.controls[i],this.updateValueAndValidity({emitEvent:e.emitEvent}),this._onCollectionChange()}setControl(i,e,n={}){this.controls[i]&&this.controls[i]._registerOnCollectionChange(()=>{}),delete this.controls[i],e&&this.registerControl(i,e),this.updateValueAndValidity({emitEvent:n.emitEvent}),this._onCollectionChange()}contains(i){return this.controls.hasOwnProperty(i)&&this.controls[i].enabled}setValue(i,e={}){FS(this,!0,i),Object.keys(i).forEach(n=>{NS(this,!0,n),this.controls[n].setValue(i[n],{onlySelf:!0,emitEvent:e.emitEvent})}),this.updateValueAndValidity(e)}patchValue(i,e={}){i!=null&&(Object.keys(i).forEach(n=>{let o=this.controls[n];o&&o.patchValue(i[n],{onlySelf:!0,emitEvent:e.emitEvent})}),this.updateValueAndValidity(e))}reset(i={},e={}){this._forEachChild((n,o)=>{n.reset(i?i[o]:null,{onlySelf:!0,emitEvent:e.emitEvent})}),this._updatePristine(e,this),this._updateTouched(e,this),this.updateValueAndValidity(e),e?.emitEvent!==!1&&this._events.next(new _0(this))}getRawValue(){return this._reduceChildren({},(i,e,n)=>(i[n]=e.getRawValue(),i))}_syncPendingControls(){let i=this._reduceChildren(!1,(e,n)=>n._syncPendingControls()?!0:e);return i&&this.updateValueAndValidity({onlySelf:!0}),i}_forEachChild(i){Object.keys(this.controls).forEach(e=>{let n=this.controls[e];n&&i(n,e)})}_setUpControls(){this._forEachChild(i=>{i.setParent(this),i._registerOnCollectionChange(this._onCollectionChange)})}_updateValue(){this.value=this._reduceValue()}_anyControls(i){for(let[e,n]of Object.entries(this.controls))if(this.contains(e)&&i(n))return!0;return!1}_reduceValue(){let i={};return this._reduceChildren(i,(e,n,o)=>((n.enabled||this.disabled)&&(e[o]=n.value),e))}_reduceChildren(i,e){let n=i;return this._forEachChild((o,r)=>{n=e(n,o,r)}),n}_allControlsDisabled(){for(let i of Object.keys(this.controls))if(this.controls[i].enabled)return!1;return Object.keys(this.controls).length>0||this.disabled}_find(i){return this.controls.hasOwnProperty(i)?this.controls[i]:null}};var VS=qc;var P7=class extends qc{};var j1=new L("",{providedIn:"root",factory:()=>dp}),dp="always";function up(t,i){return[...i.path,t]}function b0(t,i,e=dp){B7(t,i),i.valueAccessor.writeValue(t.value),(t.disabled||e==="always")&&i.valueAccessor.setDisabledState?.(t.disabled),WY(t,i),YY(t,i),qY(t,i),GY(t,i)}function ap(t,i,e=!0){let n=()=>{};i.valueAccessor&&(i.valueAccessor.registerOnChange(n),i.valueAccessor.registerOnTouched(n)),cp(t,i),t&&(i._invokeOnDestroyCallbacks(),t._registerOnCollectionChange(()=>{}))}function sp(t,i){t.forEach(e=>{e.registerOnValidatorChange&&e.registerOnValidatorChange(i)})}function GY(t,i){if(i.valueAccessor.setDisabledState){let e=n=>{i.valueAccessor.setDisabledState(n)};t.registerOnDisabledChange(e),i._registerOnDestroy(()=>{t._unregisterOnDisabledChange(e)})}}function B7(t,i){let e=zS(t);i.validator!==null?t.setValidators(fS(e,i.validator)):typeof e=="function"&&t.setValidators([e]);let n=RS(t);i.asyncValidator!==null?t.setAsyncValidators(fS(n,i.asyncValidator)):typeof n=="function"&&t.setAsyncValidators([n]);let o=()=>t.updateValueAndValidity();sp(i._rawValidators,o),sp(i._rawAsyncValidators,o)}function cp(t,i){let e=!1;if(t!==null){if(i.validator!==null){let o=zS(t);if(Array.isArray(o)&&o.length>0){let r=o.filter(a=>a!==i.validator);r.length!==o.length&&(e=!0,t.setValidators(r))}}if(i.asyncValidator!==null){let o=RS(t);if(Array.isArray(o)&&o.length>0){let r=o.filter(a=>a!==i.asyncValidator);r.length!==o.length&&(e=!0,t.setAsyncValidators(r))}}}let n=()=>{};return sp(i._rawValidators,n),sp(i._rawAsyncValidators,n),e}function WY(t,i){i.valueAccessor.registerOnChange(e=>{t._pendingValue=e,t._pendingChange=!0,t._pendingDirty=!0,t.updateOn==="change"&&BS(t,i)})}function qY(t,i){i.valueAccessor.registerOnTouched(()=>{t._pendingTouched=!0,t.updateOn==="blur"&&t._pendingChange&&BS(t,i),t.updateOn!=="submit"&&t.markAsTouched()})}function BS(t,i){t._pendingDirty&&t.markAsDirty(),t.setValue(t._pendingValue,{emitModelToViewChange:!1}),i.viewToModelUpdate(t._pendingValue),t._pendingChange=!1}function YY(t,i){let e=(n,o)=>{i.valueAccessor.writeValue(n),o&&i.viewToModelUpdate(n)};t.registerOnChange(e),i._registerOnDestroy(()=>{t._unregisterOnChange(e)})}function jS(t,i){t==null,B7(t,i)}function QY(t,i){return cp(t,i)}function j7(t,i){if(!t.hasOwnProperty("model"))return!1;let e=t.model;return e.isFirstChange()?!0:!Object.is(i,e.currentValue)}function KY(t){return Object.getPrototypeOf(t.constructor)===xS}function HS(t,i){t._syncPendingControls(),i.forEach(e=>{let n=e.control;n.updateOn==="submit"&&n._pendingChange&&(e.viewToModelUpdate(n._pendingValue),n._pendingChange=!1)})}function H7(t,i){if(!i)return null;Array.isArray(i);let e,n,o;return i.forEach(r=>{r.constructor===yi?e=r:KY(r)?n=r:o=r}),o||n||e||null}function XY(t,i){let e=t.indexOf(i);e>-1&&t.splice(e,1)}var ZY={provide:vi,useExisting:kt(()=>H1)},f0=Promise.resolve(),H1=(()=>{class t extends vi{callSetDisabledState;get submitted(){return Vn(this.submittedReactive)}_submitted=Zn(()=>this.submittedReactive());submittedReactive=we(!1);_directives=new Set;form;ngSubmit=new j;options;constructor(e,n,o){super(),this.callSetDisabledState=o,this.form=new qc({},R7(e),N7(n))}ngAfterViewInit(){this._setUpdateStrategy()}get formDirective(){return this}get control(){return this.form}get path(){return[]}get controls(){return this.form.controls}addControl(e){f0.then(()=>{let n=this._findContainer(e.path);e.control=n.registerControl(e.name,e.control),b0(e.control,e,this.callSetDisabledState),e.control.updateValueAndValidity({emitEvent:!1}),this._directives.add(e)})}getControl(e){return this.form.get(e.path)}removeControl(e){f0.then(()=>{let n=this._findContainer(e.path);n&&n.removeControl(e.name),this._directives.delete(e)})}addFormGroup(e){f0.then(()=>{let n=this._findContainer(e.path),o=new qc({});jS(o,e),n.registerControl(e.name,o),o.updateValueAndValidity({emitEvent:!1})})}removeFormGroup(e){f0.then(()=>{let n=this._findContainer(e.path);n&&n.removeControl(e.name)})}getFormGroup(e){return this.form.get(e.path)}updateModel(e,n){f0.then(()=>{this.form.get(e.path).setValue(n)})}setValue(e){this.control.setValue(e)}onSubmit(e){return this.submittedReactive.set(!0),HS(this.form,this._directives),this.ngSubmit.emit(e),this.form._events.next(new rp(this.control)),e?.target?.method==="dialog"}onReset(){this.resetForm()}resetForm(e=void 0){this.form.reset(e),this.submittedReactive.set(!1)}_setUpdateStrategy(){this.options&&this.options.updateOn!=null&&(this.form._updateOn=this.options.updateOn)}_findContainer(e){return e.pop(),e.length?this.form.get(e):this.form}static \u0275fac=function(n){return new(n||t)(Ce(Ci,10),Ce(Yc,10),Ce(j1,8))};static \u0275dir=z({type:t,selectors:[["form",3,"ngNoForm","",3,"formGroup",""],["ng-form"],["","ngForm",""]],hostBindings:function(n,o){n&1&&N("submit",function(a){return o.onSubmit(a)})("reset",function(){return o.onReset()})},inputs:{options:[0,"ngFormOptions","options"]},outputs:{ngSubmit:"ngSubmit"},exportAs:["ngForm"],standalone:!1,features:[de([ZY]),ce]})}return t})();function _S(t,i){let e=t.indexOf(i);e>-1&&t.splice(e,1)}function bS(t){return typeof t=="object"&&t!==null&&Object.keys(t).length===2&&"value"in t&&"disabled"in t}var Ls=class extends B1{defaultValue=null;_onChange=[];_pendingValue;_pendingChange=!1;constructor(i=null,e,n){super(F7(e),V7(n,e)),this._applyFormState(i),this._setUpdateStrategy(e),this._initObservables(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!!this.asyncValidator}),lp(e)&&(e.nonNullable||e.initialValueIsDefault)&&(bS(i)?this.defaultValue=i.value:this.defaultValue=i)}setValue(i,e={}){this.value=this._pendingValue=i,this._onChange.length&&e.emitModelToViewChange!==!1&&this._onChange.forEach(n=>n(this.value,e.emitViewToModelChange!==!1)),this.updateValueAndValidity(e)}patchValue(i,e={}){this.setValue(i,e)}reset(i=this.defaultValue,e={}){this._applyFormState(i),this.markAsPristine(e),this.markAsUntouched(e),this.setValue(this.value,e),this._pendingChange=!1,e?.emitEvent!==!1&&this._events.next(new _0(this))}_updateValue(){}_anyControls(i){return!1}_allControlsDisabled(){return this.disabled}registerOnChange(i){this._onChange.push(i)}_unregisterOnChange(i){_S(this._onChange,i)}registerOnDisabledChange(i){this._onDisabledChange.push(i)}_unregisterOnDisabledChange(i){_S(this._onDisabledChange,i)}_forEachChild(i){}_syncPendingControls(){return this.updateOn==="submit"&&(this._pendingDirty&&this.markAsDirty(),this._pendingTouched&&this.markAsTouched(),this._pendingChange)?(this.setValue(this._pendingValue,{onlySelf:!0,emitModelToViewChange:!1}),!0):!1}_applyFormState(i){bS(i)?(this.value=this._pendingValue=i.value,i.disabled?this.disable({onlySelf:!0,emitEvent:!1}):this.enable({onlySelf:!0,emitEvent:!1})):this.value=this._pendingValue=i}},Hi=Ls,JY=t=>t instanceof Ls,eQ=(()=>{class t extends vi{_parent;ngOnInit(){this._checkParentType(),this.formDirective.addFormGroup(this)}ngOnDestroy(){this.formDirective&&this.formDirective.removeFormGroup(this)}get control(){return this.formDirective.getFormGroup(this)}get path(){return up(this.name==null?this.name:this.name.toString(),this._parent)}get formDirective(){return this._parent?this._parent.formDirective:null}_checkParentType(){}static \u0275fac=(()=>{let e;return function(o){return(e||(e=Ie(t)))(o||t)}})();static \u0275dir=z({type:t,standalone:!1,features:[ce]})}return t})();var tQ={provide:ei,useExisting:kt(()=>nQ)},vS=Promise.resolve(),nQ=(()=>{class t extends ei{_changeDetectorRef;callSetDisabledState;control=new Ls;static ngAcceptInputType_isDisabled;_registered=!1;viewModel;name="";isDisabled;model;options;update=new j;constructor(e,n,o,r,a,s){super(),this._changeDetectorRef=a,this.callSetDisabledState=s,this._parent=e,this._setValidators(n),this._setAsyncValidators(o),this.valueAccessor=H7(this,r)}ngOnChanges(e){if(this._checkForErrors(),!this._registered||"name"in e){if(this._registered&&(this._checkName(),this.formDirective)){let n=e.name.previousValue;this.formDirective.removeControl({name:n,path:this._getPath(n)})}this._setUpControl()}"isDisabled"in e&&this._updateDisabled(e),j7(e,this.viewModel)&&(this._updateValue(this.model),this.viewModel=this.model)}ngOnDestroy(){this.formDirective&&this.formDirective.removeControl(this)}get path(){return this._getPath(this.name)}get formDirective(){return this._parent?this._parent.formDirective:null}viewToModelUpdate(e){this.viewModel=e,this.update.emit(e)}_setUpControl(){this._setUpdateStrategy(),this._isStandalone()?this._setUpStandalone():this.formDirective.addControl(this),this._registered=!0}_setUpdateStrategy(){this.options&&this.options.updateOn!=null&&(this.control._updateOn=this.options.updateOn)}_isStandalone(){return!this._parent||!!(this.options&&this.options.standalone)}_setUpStandalone(){b0(this.control,this,this.callSetDisabledState),this.control.updateValueAndValidity({emitEvent:!1})}_checkForErrors(){this._checkName()}_checkName(){this.options&&this.options.name&&(this.name=this.options.name),!this._isStandalone()&&this.name}_updateValue(e){vS.then(()=>{this.control.setValue(e,{emitViewToModelChange:!1}),this._changeDetectorRef?.markForCheck()})}_updateDisabled(e){let n=e.isDisabled.currentValue,o=n!==0&&H(n);vS.then(()=>{o&&!this.control.disabled?this.control.disable():!o&&this.control.disabled&&this.control.enable(),this._changeDetectorRef?.markForCheck()})}_getPath(e){return this._parent?up(e,this._parent):[e]}static \u0275fac=function(n){return new(n||t)(Ce(vi,9),Ce(Ci,10),Ce(Yc,10),Ce(di,10),Ce(xe,8),Ce(j1,8))};static \u0275dir=z({type:t,selectors:[["","ngModel","",3,"formControlName","",3,"formControl",""]],inputs:{name:"name",isDisabled:[0,"disabled","isDisabled"],model:[0,"ngModel","model"],options:[0,"ngModelOptions","options"]},outputs:{update:"ngModelChange"},exportAs:["ngModel"],standalone:!1,features:[de([tQ]),ce,Re]})}return t})();var zs=(()=>{class t{static \u0275fac=function(n){return new(n||t)};static \u0275dir=z({type:t,selectors:[["form",3,"ngNoForm","",3,"ngNativeValidate",""]],hostAttrs:["novalidate",""],standalone:!1})}return t})(),iQ={provide:di,useExisting:kt(()=>oQ),multi:!0},oQ=(()=>{class t extends xS{writeValue(e){let n=e??"";this.setProperty("value",n)}registerOnChange(e){this.onChange=n=>{e(n==""?null:parseFloat(n))}}static \u0275fac=(()=>{let e;return function(o){return(e||(e=Ie(t)))(o||t)}})();static \u0275dir=z({type:t,selectors:[["input","type","number","formControlName",""],["input","type","number","formControl",""],["input","type","number","ngModel",""]],hostBindings:function(n,o){n&1&&N("input",function(a){return o.onChange(a.target.value)})("blur",function(){return o.onTouched()})},standalone:!1,features:[de([iQ]),ce]})}return t})();var U7=new L(""),rQ={provide:ei,useExisting:kt(()=>Si)},Si=(()=>{class t extends ei{_ngModelWarningConfig;callSetDisabledState;viewModel;form;set isDisabled(e){}model;update=new j;static _ngModelWarningSentOnce=!1;_ngModelWarningSent=!1;constructor(e,n,o,r,a){super(),this._ngModelWarningConfig=r,this.callSetDisabledState=a,this._setValidators(e),this._setAsyncValidators(n),this.valueAccessor=H7(this,o)}ngOnChanges(e){if(this._isControlChanged(e)){let n=e.form.previousValue;n&&ap(n,this,!1),b0(this.form,this,this.callSetDisabledState),this.form.updateValueAndValidity({emitEvent:!1})}j7(e,this.viewModel)&&(this.form.setValue(this.model),this.viewModel=this.model)}ngOnDestroy(){this.form&&ap(this.form,this,!1)}get path(){return[]}get control(){return this.form}viewToModelUpdate(e){this.viewModel=e,this.update.emit(e)}_isControlChanged(e){return e.hasOwnProperty("form")}static \u0275fac=function(n){return new(n||t)(Ce(Ci,10),Ce(Yc,10),Ce(di,10),Ce(U7,8),Ce(j1,8))};static \u0275dir=z({type:t,selectors:[["","formControl",""]],inputs:{form:[0,"formControl","form"],isDisabled:[0,"disabled","isDisabled"],model:[0,"ngModel","model"]},outputs:{update:"ngModelChange"},exportAs:["ngForm"],standalone:!1,features:[de([rQ]),ce,Re]})}return t})(),aQ={provide:vi,useExisting:kt(()=>ui)},ui=(()=>{class t extends vi{callSetDisabledState;get submitted(){return Vn(this._submittedReactive)}set submitted(e){this._submittedReactive.set(e)}_submitted=Zn(()=>this._submittedReactive());_submittedReactive=we(!1);_oldForm;_onCollectionChange=()=>this._updateDomValue();directives=[];form=null;ngSubmit=new j;constructor(e,n,o){super(),this.callSetDisabledState=o,this._setValidators(e),this._setAsyncValidators(n)}ngOnChanges(e){e.hasOwnProperty("form")&&(this._updateValidators(),this._updateDomValue(),this._updateRegistrations(),this._oldForm=this.form)}ngOnDestroy(){this.form&&(cp(this.form,this),this.form._onCollectionChange===this._onCollectionChange&&this.form._registerOnCollectionChange(()=>{}))}get formDirective(){return this}get control(){return this.form}get path(){return[]}addControl(e){let n=this.form.get(e.path);return b0(n,e,this.callSetDisabledState),n.updateValueAndValidity({emitEvent:!1}),this.directives.push(e),n}getControl(e){return this.form.get(e.path)}removeControl(e){ap(e.control||null,e,!1),XY(this.directives,e)}addFormGroup(e){this._setUpFormContainer(e)}removeFormGroup(e){this._cleanUpFormContainer(e)}getFormGroup(e){return this.form.get(e.path)}addFormArray(e){this._setUpFormContainer(e)}removeFormArray(e){this._cleanUpFormContainer(e)}getFormArray(e){return this.form.get(e.path)}updateModel(e,n){this.form.get(e.path).setValue(n)}onSubmit(e){return this._submittedReactive.set(!0),HS(this.form,this.directives),this.ngSubmit.emit(e),this.form._events.next(new rp(this.control)),e?.target?.method==="dialog"}onReset(){this.resetForm()}resetForm(e=void 0,n={}){this.form.reset(e,n),this._submittedReactive.set(!1)}_updateDomValue(){this.directives.forEach(e=>{let n=e.control,o=this.form.get(e.path);n!==o&&(ap(n||null,e),JY(o)&&(b0(o,e,this.callSetDisabledState),e.control=o))}),this.form._updateTreeValidity({emitEvent:!1})}_setUpFormContainer(e){let n=this.form.get(e.path);jS(n,e),n.updateValueAndValidity({emitEvent:!1})}_cleanUpFormContainer(e){if(this.form){let n=this.form.get(e.path);n&&QY(n,e)&&n.updateValueAndValidity({emitEvent:!1})}}_updateRegistrations(){this.form._registerOnCollectionChange(this._onCollectionChange),this._oldForm&&this._oldForm._registerOnCollectionChange(()=>{})}_updateValidators(){B7(this.form,this),this._oldForm&&cp(this._oldForm,this)}static \u0275fac=function(n){return new(n||t)(Ce(Ci,10),Ce(Yc,10),Ce(j1,8))};static \u0275dir=z({type:t,selectors:[["","formGroup",""]],hostBindings:function(n,o){n&1&&N("submit",function(a){return o.onSubmit(a)})("reset",function(){return o.onReset()})},inputs:{form:[0,"formGroup","form"]},outputs:{ngSubmit:"ngSubmit"},exportAs:["ngForm"],standalone:!1,features:[de([aQ]),ce,Re]})}return t})(),sQ={provide:vi,useExisting:kt(()=>US)},US=(()=>{class t extends eQ{name=null;constructor(e,n,o){super(),this._parent=e,this._setValidators(n),this._setAsyncValidators(o)}_checkParentType(){GS(this._parent)}static \u0275fac=function(n){return new(n||t)(Ce(vi,13),Ce(Ci,10),Ce(Yc,10))};static \u0275dir=z({type:t,selectors:[["","formGroupName",""]],inputs:{name:[0,"formGroupName","name"]},standalone:!1,features:[de([sQ]),ce]})}return t})(),cQ={provide:vi,useExisting:kt(()=>$S)},$S=(()=>{class t extends vi{_parent;name=null;constructor(e,n,o){super(),this._parent=e,this._setValidators(n),this._setAsyncValidators(o)}ngOnInit(){GS(this._parent),this.formDirective.addFormArray(this)}ngOnDestroy(){this.formDirective?.removeFormArray(this)}get control(){return this.formDirective.getFormArray(this)}get formDirective(){return this._parent?this._parent.formDirective:null}get path(){return up(this.name==null?this.name:this.name.toString(),this._parent)}static \u0275fac=function(n){return new(n||t)(Ce(vi,13),Ce(Ci,10),Ce(Yc,10))};static \u0275dir=z({type:t,selectors:[["","formArrayName",""]],inputs:{name:[0,"formArrayName","name"]},standalone:!1,features:[de([cQ]),ce]})}return t})();function GS(t){return!(t instanceof US)&&!(t instanceof ui)&&!(t instanceof $S)}var lQ={provide:ei,useExisting:kt(()=>Ao)},Ao=(()=>{class t extends ei{_ngModelWarningConfig;_added=!1;viewModel;control;name=null;set isDisabled(e){}model;update=new j;static _ngModelWarningSentOnce=!1;_ngModelWarningSent=!1;constructor(e,n,o,r,a){super(),this._ngModelWarningConfig=a,this._parent=e,this._setValidators(n),this._setAsyncValidators(o),this.valueAccessor=H7(this,r)}ngOnChanges(e){this._added||this._setUpControl(),j7(e,this.viewModel)&&(this.viewModel=this.model,this.formDirective.updateModel(this,this.model))}ngOnDestroy(){this.formDirective&&this.formDirective.removeControl(this)}viewToModelUpdate(e){this.viewModel=e,this.update.emit(e)}get path(){return up(this.name==null?this.name:this.name.toString(),this._parent)}get formDirective(){return this._parent?this._parent.formDirective:null}_setUpControl(){this.control=this.formDirective.addControl(this),this._added=!0}static \u0275fac=function(n){return new(n||t)(Ce(vi,13),Ce(Ci,10),Ce(Yc,10),Ce(di,10),Ce(U7,8))};static \u0275dir=z({type:t,selectors:[["","formControlName",""]],inputs:{name:[0,"formControlName","name"],isDisabled:[0,"disabled","isDisabled"],model:[0,"ngModel","model"]},outputs:{update:"ngModelChange"},standalone:!1,features:[de([lQ]),ce,Re]})}return t})();function WS(t){return typeof t=="number"?t:parseInt(t,10)}function qS(t){return typeof t=="number"?t:parseFloat(t)}var v0=(()=>{class t{_validator=ep;_onChange;_enabled;ngOnChanges(e){if(this.inputName in e){let n=this.normalizeInput(e[this.inputName].currentValue);this._enabled=this.enabled(n),this._validator=this._enabled?this.createValidator(n):ep,this._onChange&&this._onChange()}}validate(e){return this._validator(e)}registerOnValidatorChange(e){this._onChange=e}enabled(e){return e!=null}static \u0275fac=function(n){return new(n||t)};static \u0275dir=z({type:t,features:[Re]})}return t})(),dQ={provide:Ci,useExisting:kt(()=>uQ),multi:!0},uQ=(()=>{class t extends v0{max;inputName="max";normalizeInput=e=>qS(e);createValidator=e=>wS(e);static \u0275fac=(()=>{let e;return function(o){return(e||(e=Ie(t)))(o||t)}})();static \u0275dir=z({type:t,selectors:[["input","type","number","max","","formControlName",""],["input","type","number","max","","formControl",""],["input","type","number","max","","ngModel",""]],hostVars:1,hostBindings:function(n,o){n&2&&ne("max",o._enabled?o.max:null)},inputs:{max:"max"},standalone:!1,features:[de([dQ]),ce]})}return t})(),mQ={provide:Ci,useExisting:kt(()=>pQ),multi:!0},pQ=(()=>{class t extends v0{min;inputName="min";normalizeInput=e=>qS(e);createValidator=e=>MS(e);static \u0275fac=(()=>{let e;return function(o){return(e||(e=Ie(t)))(o||t)}})();static \u0275dir=z({type:t,selectors:[["input","type","number","min","","formControlName",""],["input","type","number","min","","formControl",""],["input","type","number","min","","ngModel",""]],hostVars:1,hostBindings:function(n,o){n&2&&ne("min",o._enabled?o.min:null)},inputs:{min:"min"},standalone:!1,features:[de([mQ]),ce]})}return t})(),fQ={provide:Ci,useExisting:kt(()=>Ir),multi:!0};var Ir=(()=>{class t extends v0{required;inputName="required";normalizeInput=H;createValidator=e=>DS;enabled(e){return e}static \u0275fac=(()=>{let e;return function(o){return(e||(e=Ie(t)))(o||t)}})();static \u0275dir=z({type:t,selectors:[["","required","","formControlName","",3,"type","checkbox"],["","required","","formControl","",3,"type","checkbox"],["","required","","ngModel","",3,"type","checkbox"]],hostVars:1,hostBindings:function(n,o){n&2&&ne("required",o._enabled?"":null)},inputs:{required:"required"},standalone:!1,features:[de([fQ]),ce]})}return t})();var hQ={provide:Ci,useExisting:kt(()=>gQ),multi:!0},gQ=(()=>{class t extends v0{minlength;inputName="minlength";normalizeInput=e=>WS(e);createValidator=e=>SS(e);static \u0275fac=(()=>{let e;return function(o){return(e||(e=Ie(t)))(o||t)}})();static \u0275dir=z({type:t,selectors:[["","minlength","","formControlName",""],["","minlength","","formControl",""],["","minlength","","ngModel",""]],hostVars:1,hostBindings:function(n,o){n&2&&ne("minlength",o._enabled?o.minlength:null)},inputs:{minlength:"minlength"},standalone:!1,features:[de([hQ]),ce]})}return t})(),_Q={provide:Ci,useExisting:kt(()=>bQ),multi:!0},bQ=(()=>{class t extends v0{maxlength;inputName="maxlength";normalizeInput=e=>WS(e);createValidator=e=>kS(e);static \u0275fac=(()=>{let e;return function(o){return(e||(e=Ie(t)))(o||t)}})();static \u0275dir=z({type:t,selectors:[["","maxlength","","formControlName",""],["","maxlength","","formControl",""],["","maxlength","","ngModel",""]],hostVars:1,hostBindings:function(n,o){n&2&&ne("maxlength",o._enabled?o.maxlength:null)},inputs:{maxlength:"maxlength"},standalone:!1,features:[de([_Q]),ce]})}return t})();var YS=(()=>{class t{static \u0275fac=function(n){return new(n||t)};static \u0275mod=J({type:t});static \u0275inj=X({})}return t})(),L7=class extends B1{constructor(i,e,n){super(F7(e),V7(n,e)),this.controls=i,this._initObservables(),this._setUpdateStrategy(e),this._setUpControls(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!!this.asyncValidator})}controls;at(i){return this.controls[this._adjustIndex(i)]}push(i,e={}){Array.isArray(i)?i.forEach(n=>{this.controls.push(n),this._registerControl(n)}):(this.controls.push(i),this._registerControl(i)),this.updateValueAndValidity({emitEvent:e.emitEvent}),this._onCollectionChange()}insert(i,e,n={}){this.controls.splice(i,0,e),this._registerControl(e),this.updateValueAndValidity({emitEvent:n.emitEvent})}removeAt(i,e={}){let n=this._adjustIndex(i);n<0&&(n=0),this.controls[n]&&this.controls[n]._registerOnCollectionChange(()=>{}),this.controls.splice(n,1),this.updateValueAndValidity({emitEvent:e.emitEvent})}setControl(i,e,n={}){let o=this._adjustIndex(i);o<0&&(o=0),this.controls[o]&&this.controls[o]._registerOnCollectionChange(()=>{}),this.controls.splice(o,1),e&&(this.controls.splice(o,0,e),this._registerControl(e)),this.updateValueAndValidity({emitEvent:n.emitEvent}),this._onCollectionChange()}get length(){return this.controls.length}setValue(i,e={}){FS(this,!1,i),i.forEach((n,o)=>{NS(this,!1,o),this.at(o).setValue(n,{onlySelf:!0,emitEvent:e.emitEvent})}),this.updateValueAndValidity(e)}patchValue(i,e={}){i!=null&&(i.forEach((n,o)=>{this.at(o)&&this.at(o).patchValue(n,{onlySelf:!0,emitEvent:e.emitEvent})}),this.updateValueAndValidity(e))}reset(i=[],e={}){this._forEachChild((n,o)=>{n.reset(i[o],{onlySelf:!0,emitEvent:e.emitEvent})}),this._updatePristine(e,this),this._updateTouched(e,this),this.updateValueAndValidity(e),e?.emitEvent!==!1&&this._events.next(new _0(this))}getRawValue(){return this.controls.map(i=>i.getRawValue())}clear(i={}){this.controls.length<1||(this._forEachChild(e=>e._registerOnCollectionChange(()=>{})),this.controls.splice(0),this.updateValueAndValidity({emitEvent:i.emitEvent}))}_adjustIndex(i){return i<0?i+this.length:i}_syncPendingControls(){let i=this.controls.reduce((e,n)=>n._syncPendingControls()?!0:e,!1);return i&&this.updateValueAndValidity({onlySelf:!0}),i}_forEachChild(i){this.controls.forEach((e,n)=>{i(e,n)})}_updateValue(){this.value=this.controls.filter(i=>i.enabled||this.disabled).map(i=>i.value)}_anyControls(i){return this.controls.some(e=>e.enabled&&i(e))}_setUpControls(){this._forEachChild(i=>this._registerControl(i))}_allControlsDisabled(){for(let i of this.controls)if(i.enabled)return!1;return this.controls.length>0||this.disabled}_registerControl(i){i.setParent(this),i._registerOnCollectionChange(this._onCollectionChange)}_find(i){return this.at(i)??null}};function yS(t){return!!t&&(t.asyncValidators!==void 0||t.validators!==void 0||t.updateOn!==void 0)}var vQ=(()=>{class t{useNonNullable=!1;get nonNullable(){let e=new t;return e.useNonNullable=!0,e}group(e,n=null){let o=this._reduceControls(e),r={};return yS(n)?r=n:n!==null&&(r.validators=n.validator,r.asyncValidators=n.asyncValidator),new qc(o,r)}record(e,n=null){let o=this._reduceControls(e);return new P7(o,n)}control(e,n,o){let r={};return this.useNonNullable?(yS(n)?r=n:(r.validators=n,r.asyncValidators=o),new Ls(e,Ne(q({},r),{nonNullable:!0}))):new Ls(e,n,o)}array(e,n,o){let r=e.map(a=>this._createControl(a));return new L7(r,n,o)}_reduceControls(e){let n={};return Object.keys(e).forEach(o=>{n[o]=this._createControl(e[o])}),n}_createControl(e){if(e instanceof Ls)return e;if(e instanceof B1)return e;if(Array.isArray(e)){let n=e[0],o=e.length>1?e[1]:null,r=e.length>2?e[2]:null;return this.control(n,o,r)}else return this.control(e)}static \u0275fac=function(n){return new(n||t)};static \u0275prov=R({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();var Rs=(()=>{class t extends vQ{group(e,n=null){return super.group(e,n)}control(e,n,o){return super.control(e,n,o)}array(e,n,o){return super.array(e,n,o)}static \u0275fac=(()=>{let e;return function(o){return(e||(e=Ie(t)))(o||t)}})();static \u0275prov=R({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();var QS=(()=>{class t{static withConfig(e){return{ngModule:t,providers:[{provide:j1,useValue:e.callSetDisabledState??dp}]}}static \u0275fac=function(n){return new(n||t)};static \u0275mod=J({type:t});static \u0275inj=X({imports:[YS]})}return t})(),ve=(()=>{class t{static withConfig(e){return{ngModule:t,providers:[{provide:U7,useValue:e.warnOnNgModelWithFormControl??"always"},{provide:j1,useValue:e.callSetDisabledState??dp}]}}static \u0275fac=function(n){return new(n||t)};static \u0275mod=J({type:t});static \u0275inj=X({imports:[YS]})}return t})();var KS=(()=>{class t{constructor(){this.locale=d(wr),this.el=d(Q),this.control=d(ei),this.format="N0",this.digitsInfo="1.0-0",this.sufix=""}set _(e){let n=e.split(":");this.currencyCode=n[0],this.displaySymbol=n.length>1?n[1]:"$",this.digitsInfo=n.length>2?n[2]:"1.2-2"}blur(e){e.value=this.parse(e.value)}focus(e){typeof this.control.value>"u"?e.value="":e.value=this.control.value}ngOnInit(){setTimeout(()=>{this.el.nativeElement.value=this.parse(this.el.nativeElement.value)})}parse(e){return e==""?""+this.sufix:Om(e,this.locale,this.displaySymbol,this.currencyCode,this.digitsInfo)+this.sufix}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275dir=z({type:t,selectors:[["","mifosxFormatAmount",""]],hostBindings:function(n,o){n&1&&N("blur",function(a){return o.blur(a.target)})("focus",function(a){return o.focus(a.target)})},inputs:{sufix:"sufix",_:[0,"mifosxFormatAmount","_"]}})}}return t})();var $Ce=(()=>{class t{constructor(){this.control=d(ei),this.el=d(Q)}onFocus(){this.control.control?.markAsTouched(),this.control.control?.updateValueAndValidity()}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275dir=z({type:t,selectors:[["","mifosxValidateOnFocus",""]],hostBindings:function(n,o){n&1&&N("focus",function(){return o.onFocus()})}})}}return t})();var XS=(()=>{class t{static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275mod=J({type:t})}static{this.\u0275inj=X({imports:[he]})}}return t})();var nr=class{constructor(i={}){this.controlType=i.controlType||"",this.controlName=i.controlName||"",this.label=i.label||"",this.value=i.value===void 0?"":i.value,this.required=!!i.required,this.order=i.order===void 0?1:i.order,this.validators=i.validators===void 0?[]:i.validators,this.min=i.min===void 0?null:i.min,this.max=i.max===void 0?null:i.max}};function Ya(t){return t.buttons===0||t.detail===0}function Qa(t){let i=t.touches&&t.touches[0]||t.changedTouches&&t.changedTouches[0];return!!i&&i.identifier===-1&&(i.radiusX==null||i.radiusX===1)&&(i.radiusY==null||i.radiusY===1)}var $7;function ZS(){if($7==null){let t=typeof document<"u"?document.head:null;$7=!!(t&&(t.createShadowRoot||t.attachShadow))}return $7}function Qc(t){if(ZS()){let i=t.getRootNode?t.getRootNode():null;if(typeof ShadowRoot<"u"&&ShadowRoot&&i instanceof ShadowRoot)return i}return null}function no(){let t=typeof document<"u"&&document?document.activeElement:null;for(;t&&t.shadowRoot;){let i=t.shadowRoot.activeElement;if(i===t)break;t=i}return t}function jn(t){return t.composedPath?t.composedPath()[0]:t.target}var G7;try{G7=typeof Intl<"u"&&Intl.v8BreakIterator}catch{G7=!1}var je=(()=>{class t{_platformId=d(Bc);isBrowser=this._platformId?DD(this._platformId):typeof document=="object"&&!!document;EDGE=this.isBrowser&&/(edge)/i.test(navigator.userAgent);TRIDENT=this.isBrowser&&/(msie|trident)/i.test(navigator.userAgent);BLINK=this.isBrowser&&!!(window.chrome||G7)&&typeof CSS<"u"&&!this.EDGE&&!this.TRIDENT;WEBKIT=this.isBrowser&&/AppleWebKit/i.test(navigator.userAgent)&&!this.BLINK&&!this.EDGE&&!this.TRIDENT;IOS=this.isBrowser&&/iPad|iPhone|iPod/.test(navigator.userAgent)&&!("MSStream"in window);FIREFOX=this.isBrowser&&/(firefox|minefield)/i.test(navigator.userAgent);ANDROID=this.isBrowser&&/android/i.test(navigator.userAgent)&&!this.TRIDENT;SAFARI=this.isBrowser&&/safari/i.test(navigator.userAgent)&&this.WEBKIT;constructor(){}static \u0275fac=function(n){return new(n||t)};static \u0275prov=R({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();var y0;function JS(){if(y0==null&&typeof window<"u")try{window.addEventListener("test",null,Object.defineProperty({},"passive",{get:()=>y0=!0}))}finally{y0=y0||!1}return y0}function Ns(t){return JS()?t:!!t.capture}function vn(t,i=0){return mp(t)?Number(t):arguments.length===2?i:0}function mp(t){return!isNaN(parseFloat(t))&&!isNaN(Number(t))}function kn(t){return t instanceof Q?t.nativeElement:t}var ek=new L("cdk-input-modality-detector-options"),tk={ignoreKeys:[18,17,224,91,16]},nk=650,W7={passive:!0,capture:!0},ik=(()=>{class t{_platform=d(je);_listenerCleanups;modalityDetected;modalityChanged;get mostRecentModality(){return this._modality.value}_mostRecentTarget=null;_modality=new ct(null);_options;_lastTouchMs=0;_onKeydown=e=>{this._options?.ignoreKeys?.some(n=>n===e.keyCode)||(this._modality.next("keyboard"),this._mostRecentTarget=jn(e))};_onMousedown=e=>{Date.now()-this._lastTouchMs{if(Qa(e)){this._modality.next("keyboard");return}this._lastTouchMs=Date.now(),this._modality.next("touch"),this._mostRecentTarget=jn(e)};constructor(){let e=d(se),n=d(Me),o=d(ek,{optional:!0});if(this._options=q(q({},tk),o),this.modalityDetected=this._modality.pipe(Cc(1)),this.modalityChanged=this.modalityDetected.pipe(Wl()),this._platform.isBrowser){let r=d(On).createRenderer(null,null);this._listenerCleanups=e.runOutsideAngular(()=>[r.listen(n,"keydown",this._onKeydown,W7),r.listen(n,"mousedown",this._onMousedown,W7),r.listen(n,"touchstart",this._onTouchstart,W7)])}}ngOnDestroy(){this._modality.complete(),this._listenerCleanups?.forEach(e=>e())}static \u0275fac=function(n){return new(n||t)};static \u0275prov=R({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})(),C0=(function(t){return t[t.IMMEDIATE=0]="IMMEDIATE",t[t.EVENTUAL=1]="EVENTUAL",t})(C0||{}),ok=new L("cdk-focus-monitor-default-options"),pp=Ns({passive:!0,capture:!0}),sn=(()=>{class t{_ngZone=d(se);_platform=d(je);_inputModalityDetector=d(ik);_origin=null;_lastFocusOrigin;_windowFocused=!1;_windowFocusTimeoutId;_originTimeoutId;_originFromTouchInteraction=!1;_elementInfo=new Map;_monitoredElementCount=0;_rootNodeFocusListenerCount=new Map;_detectionMode;_windowFocusListener=()=>{this._windowFocused=!0,this._windowFocusTimeoutId=setTimeout(()=>this._windowFocused=!1)};_document=d(Me);_stopInputModalityDetector=new B;constructor(){let e=d(ok,{optional:!0});this._detectionMode=e?.detectionMode||C0.IMMEDIATE}_rootNodeFocusAndBlurListener=e=>{let n=jn(e);for(let o=n;o;o=o.parentElement)e.type==="focus"?this._onFocus(e,o):this._onBlur(e,o)};monitor(e,n=!1){let o=kn(e);if(!this._platform.isBrowser||o.nodeType!==1)return re();let r=Qc(o)||this._document,a=this._elementInfo.get(o);if(a)return n&&(a.checkChildren=!0),a.subject;let s={checkChildren:n,subject:new B,rootNode:r};return this._elementInfo.set(o,s),this._registerGlobalListeners(s),s.subject}stopMonitoring(e){let n=kn(e),o=this._elementInfo.get(n);o&&(o.subject.complete(),this._setClasses(n),this._elementInfo.delete(n),this._removeGlobalListeners(o))}focusVia(e,n,o){let r=kn(e),a=this._document.activeElement;r===a?this._getClosestElementsInfo(r).forEach(([s,c])=>this._originChanged(s,n,c)):(this._setOrigin(n),typeof r.focus=="function"&&r.focus(o))}ngOnDestroy(){this._elementInfo.forEach((e,n)=>this.stopMonitoring(n))}_getWindow(){return this._document.defaultView||window}_getFocusOrigin(e){return this._origin?this._originFromTouchInteraction?this._shouldBeAttributedToTouch(e)?"touch":"program":this._origin:this._windowFocused&&this._lastFocusOrigin?this._lastFocusOrigin:e&&this._isLastInteractionFromInputLabel(e)?"mouse":"program"}_shouldBeAttributedToTouch(e){return this._detectionMode===C0.EVENTUAL||!!e?.contains(this._inputModalityDetector._mostRecentTarget)}_setClasses(e,n){e.classList.toggle("cdk-focused",!!n),e.classList.toggle("cdk-touch-focused",n==="touch"),e.classList.toggle("cdk-keyboard-focused",n==="keyboard"),e.classList.toggle("cdk-mouse-focused",n==="mouse"),e.classList.toggle("cdk-program-focused",n==="program")}_setOrigin(e,n=!1){this._ngZone.runOutsideAngular(()=>{if(this._origin=e,this._originFromTouchInteraction=e==="touch"&&n,this._detectionMode===C0.IMMEDIATE){clearTimeout(this._originTimeoutId);let o=this._originFromTouchInteraction?nk:1;this._originTimeoutId=setTimeout(()=>this._origin=null,o)}})}_onFocus(e,n){let o=this._elementInfo.get(n),r=jn(e);!o||!o.checkChildren&&n!==r||this._originChanged(n,this._getFocusOrigin(r),o)}_onBlur(e,n){let o=this._elementInfo.get(n);!o||o.checkChildren&&e.relatedTarget instanceof Node&&n.contains(e.relatedTarget)||(this._setClasses(n),this._emitOrigin(o,null))}_emitOrigin(e,n){e.subject.observers.length&&this._ngZone.run(()=>e.subject.next(n))}_registerGlobalListeners(e){if(!this._platform.isBrowser)return;let n=e.rootNode,o=this._rootNodeFocusListenerCount.get(n)||0;o||this._ngZone.runOutsideAngular(()=>{n.addEventListener("focus",this._rootNodeFocusAndBlurListener,pp),n.addEventListener("blur",this._rootNodeFocusAndBlurListener,pp)}),this._rootNodeFocusListenerCount.set(n,o+1),++this._monitoredElementCount===1&&(this._ngZone.runOutsideAngular(()=>{this._getWindow().addEventListener("focus",this._windowFocusListener)}),this._inputModalityDetector.modalityDetected.pipe(ye(this._stopInputModalityDetector)).subscribe(r=>{this._setOrigin(r,!0)}))}_removeGlobalListeners(e){let n=e.rootNode;if(this._rootNodeFocusListenerCount.has(n)){let o=this._rootNodeFocusListenerCount.get(n);o>1?this._rootNodeFocusListenerCount.set(n,o-1):(n.removeEventListener("focus",this._rootNodeFocusAndBlurListener,pp),n.removeEventListener("blur",this._rootNodeFocusAndBlurListener,pp),this._rootNodeFocusListenerCount.delete(n))}--this._monitoredElementCount||(this._getWindow().removeEventListener("focus",this._windowFocusListener),this._stopInputModalityDetector.next(),clearTimeout(this._windowFocusTimeoutId),clearTimeout(this._originTimeoutId))}_originChanged(e,n,o){this._setClasses(e,n),this._emitOrigin(o,n),this._lastFocusOrigin=n}_getClosestElementsInfo(e){let n=[];return this._elementInfo.forEach((o,r)=>{(r===e||o.checkChildren&&r.contains(e))&&n.push([r,o])}),n}_isLastInteractionFromInputLabel(e){let{_mostRecentTarget:n,mostRecentModality:o}=this._inputModalityDetector;if(o!=="mouse"||!n||n===e||e.nodeName!=="INPUT"&&e.nodeName!=="TEXTAREA"||e.disabled)return!1;let r=e.labels;if(r){for(let a=0;a{class t{_elementRef=d(Q);_focusMonitor=d(sn);_monitorSubscription;_focusOrigin=null;cdkFocusChange=new j;constructor(){}get focusOrigin(){return this._focusOrigin}ngAfterViewInit(){let e=this._elementRef.nativeElement;this._monitorSubscription=this._focusMonitor.monitor(e,e.nodeType===1&&e.hasAttribute("cdkMonitorSubtreeFocus")).subscribe(n=>{this._focusOrigin=n,this.cdkFocusChange.emit(n)})}ngOnDestroy(){this._focusMonitor.stopMonitoring(this._elementRef),this._monitorSubscription&&this._monitorSubscription.unsubscribe()}static \u0275fac=function(n){return new(n||t)};static \u0275dir=z({type:t,selectors:[["","cdkMonitorElementFocus",""],["","cdkMonitorSubtreeFocus",""]],outputs:{cdkFocusChange:"cdkFocusChange"},exportAs:["cdkMonitorFocus"]})}return t})();var fp=new WeakMap,at=(()=>{class t{_appRef;_injector=d(be);_environmentInjector=d(Qt);load(e){let n=this._appRef=this._appRef||this._injector.get(li),o=fp.get(n);o||(o={loaders:new Set,refs:[]},fp.set(n,o),n.onDestroy(()=>{fp.get(n)?.refs.forEach(r=>r.destroy()),fp.delete(n)})),o.loaders.has(e)||(o.loaders.add(e),o.refs.push(gm(e,{environmentInjector:this._environmentInjector})))}static \u0275fac=function(n){return new(n||t)};static \u0275prov=R({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();var _o=(()=>{class t{static \u0275fac=function(n){return new(n||t)};static \u0275cmp=P({type:t,selectors:[["ng-component"]],exportAs:["cdkVisuallyHidden"],decls:0,vars:0,template:function(n,o){},styles:[`.cdk-visually-hidden{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px;white-space:nowrap;outline:0;-webkit-appearance:none;-moz-appearance:none;left:0}[dir=rtl] .cdk-visually-hidden{left:auto;right:0} +`).forEach(e=>{let n=e.indexOf(":");if(n>0){let o=e.slice(0,n),r=e.slice(n+1).trim();this.addHeaderEntry(o,r)}})}:typeof Headers<"u"&&i instanceof Headers?(this.headers=new Map,i.forEach((e,n)=>{this.addHeaderEntry(n,e)})):this.lazyInit=()=>{this.headers=new Map,Object.entries(i).forEach(([e,n])=>{this.setHeaderEntries(e,n)})}:this.headers=new Map}has(i){return this.init(),this.headers.has(i.toLowerCase())}get(i){this.init();let e=this.headers.get(i.toLowerCase());return e&&e.length>0?e[0]:null}keys(){return this.init(),Array.from(this.normalizedNames.values())}getAll(i){return this.init(),this.headers.get(i.toLowerCase())||null}append(i,e){return this.clone({name:i,value:e,op:"a"})}set(i,e){return this.clone({name:i,value:e,op:"s"})}delete(i,e){return this.clone({name:i,value:e,op:"d"})}maybeSetNormalizedName(i,e){this.normalizedNames.has(e)||this.normalizedNames.set(e,i)}init(){this.lazyInit&&(this.lazyInit instanceof t?this.copyFrom(this.lazyInit):this.lazyInit(),this.lazyInit=null,this.lazyUpdate&&(this.lazyUpdate.forEach(i=>this.applyUpdate(i)),this.lazyUpdate=null))}copyFrom(i){i.init(),Array.from(i.headers.keys()).forEach(e=>{this.headers.set(e,i.headers.get(e)),this.normalizedNames.set(e,i.normalizedNames.get(e))})}clone(i){let e=new t;return e.lazyInit=this.lazyInit&&this.lazyInit instanceof t?this.lazyInit:this,e.lazyUpdate=(this.lazyUpdate||[]).concat([i]),e}applyUpdate(i){let e=i.name.toLowerCase();switch(i.op){case"a":case"s":let n=i.value;if(typeof n=="string"&&(n=[n]),n.length===0)return;this.maybeSetNormalizedName(i.name,e);let o=(i.op==="a"?this.headers.get(e):void 0)||[];o.push(...n),this.headers.set(e,o);break;case"d":let r=i.value;if(!r)this.headers.delete(e),this.normalizedNames.delete(e);else{let a=this.headers.get(e);if(!a)return;a=a.filter(s=>r.indexOf(s)===-1),a.length===0?(this.headers.delete(e),this.normalizedNames.delete(e)):this.headers.set(e,a)}break}}addHeaderEntry(i,e){let n=i.toLowerCase();this.maybeSetNormalizedName(i,n),this.headers.has(n)?this.headers.get(n).push(e):this.headers.set(n,[e])}setHeaderEntries(i,e){let n=(Array.isArray(e)?e:[e]).map(r=>r.toString()),o=i.toLowerCase();this.headers.set(o,n),this.maybeSetNormalizedName(i,o)}forEach(i){this.init(),Array.from(this.normalizedNames.keys()).forEach(e=>i(this.normalizedNames.get(e),this.headers.get(e)))}};var Nm=class{encodeKey(i){return AD(i)}encodeValue(i){return AD(i)}decodeKey(i){return decodeURIComponent(i)}decodeValue(i){return decodeURIComponent(i)}};function nY(t,i){let e=new Map;return t.length>0&&t.replace(/^\?/,"").split("&").forEach(o=>{let r=o.indexOf("="),[a,s]=r==-1?[i.decodeKey(o),""]:[i.decodeKey(o.slice(0,r)),i.decodeValue(o.slice(r+1))],c=e.get(a)||[];c.push(s),e.set(a,c)}),e}var iY=/%(\d[a-f0-9])/gi,oY={40:"@","3A":":",24:"$","2C":",","3B":";","3D":"=","3F":"?","2F":"/"};function AD(t){return encodeURIComponent(t).replace(iY,(i,e)=>oY[e]??i)}function Rm(t){return`${t}`}var te=class t{map;encoder;updates=null;cloneFrom=null;constructor(i={}){if(this.encoder=i.encoder||new Nm,i.fromString){if(i.fromObject)throw new pe(2805,!1);this.map=nY(i.fromString,this.encoder)}else i.fromObject?(this.map=new Map,Object.keys(i.fromObject).forEach(e=>{let n=i.fromObject[e],o=Array.isArray(n)?n.map(Rm):[Rm(n)];this.map.set(e,o)})):this.map=null}has(i){return this.init(),this.map.has(i)}get(i){this.init();let e=this.map.get(i);return e?e[0]:null}getAll(i){return this.init(),this.map.get(i)||null}keys(){return this.init(),Array.from(this.map.keys())}append(i,e){return this.clone({param:i,value:e,op:"a"})}appendAll(i){let e=[];return Object.keys(i).forEach(n=>{let o=i[n];Array.isArray(o)?o.forEach(r=>{e.push({param:n,value:r,op:"a"})}):e.push({param:n,value:o,op:"a"})}),this.clone(e)}set(i,e){return this.clone({param:i,value:e,op:"s"})}delete(i,e){return this.clone({param:i,value:e,op:"d"})}toString(){return this.init(),this.keys().map(i=>{let e=this.encoder.encodeKey(i);return this.map.get(i).map(n=>e+"="+this.encoder.encodeValue(n)).join("&")}).filter(i=>i!=="").join("&")}clone(i){let e=new t({encoder:this.encoder});return e.cloneFrom=this.cloneFrom||this,e.updates=(this.updates||[]).concat(i),e}init(){this.map===null&&(this.map=new Map),this.cloneFrom!==null&&(this.cloneFrom.init(),this.cloneFrom.keys().forEach(i=>this.map.set(i,this.cloneFrom.map.get(i))),this.updates.forEach(i=>{switch(i.op){case"a":case"s":let e=(i.op==="a"?this.map.get(i.param):void 0)||[];e.push(Rm(i.value)),this.map.set(i.param,e);break;case"d":if(i.value!==void 0){let n=this.map.get(i.param)||[],o=n.indexOf(Rm(i.value));o!==-1&&n.splice(o,1),n.length>0?this.map.set(i.param,n):this.map.delete(i.param)}else{this.map.delete(i.param);break}}}),this.cloneFrom=this.updates=null)}};var Fm=class{map=new Map;set(i,e){return this.map.set(i,e),this}get(i){return this.map.has(i)||this.map.set(i,i.defaultValue()),this.map.get(i)}delete(i){return this.map.delete(i),this}has(i){return this.map.has(i)}keys(){return this.map.keys()}};function rY(t){switch(t){case"DELETE":case"GET":case"HEAD":case"OPTIONS":case"JSONP":return!1;default:return!0}}function zD(t){return typeof ArrayBuffer<"u"&&t instanceof ArrayBuffer}function RD(t){return typeof Blob<"u"&&t instanceof Blob}function ND(t){return typeof FormData<"u"&&t instanceof FormData}function aY(t){return typeof URLSearchParams<"u"&&t instanceof URLSearchParams}var FD="Content-Type",VD="Accept",jD="X-Request-URL",HD="text/plain",UD="application/json",sY=`${UD}, ${HD}, */*`,I1=class t{url;body=null;headers;context;reportProgress=!1;withCredentials=!1;credentials;keepalive=!1;cache;priority;mode;redirect;referrer;integrity;responseType="json";method;params;urlWithParams;transferCache;timeout;constructor(i,e,n,o){this.url=e,this.method=i.toUpperCase();let r;if(rY(this.method)||o?(this.body=n!==void 0?n:null,r=o):r=n,r){if(this.reportProgress=!!r.reportProgress,this.withCredentials=!!r.withCredentials,this.keepalive=!!r.keepalive,r.responseType&&(this.responseType=r.responseType),r.headers&&(this.headers=r.headers),r.context&&(this.context=r.context),r.params&&(this.params=r.params),r.priority&&(this.priority=r.priority),r.cache&&(this.cache=r.cache),r.credentials&&(this.credentials=r.credentials),typeof r.timeout=="number"){if(r.timeout<1||!Number.isInteger(r.timeout))throw new pe(2822,"");this.timeout=r.timeout}r.mode&&(this.mode=r.mode),r.redirect&&(this.redirect=r.redirect),r.integrity&&(this.integrity=r.integrity),r.referrer&&(this.referrer=r.referrer),this.transferCache=r.transferCache}if(this.headers??=new To,this.context??=new Fm,!this.params)this.params=new te,this.urlWithParams=e;else{let a=this.params.toString();if(a.length===0)this.urlWithParams=e;else{let s=e.indexOf("?"),c=s===-1?"?":sHt.set(fn,i.setHeaders[fn]),Oe)),i.setParams&&(Mt=Object.keys(i.setParams).reduce((Ht,fn)=>Ht.set(fn,i.setParams[fn]),Mt)),new t(e,n,K,{params:Mt,headers:Oe,context:Et,reportProgress:Z,responseType:o,withCredentials:Y,transferCache:w,keepalive:r,cache:s,priority:a,timeout:O,mode:c,redirect:m,credentials:f,referrer:v,integrity:x})}},Gc=(function(t){return t[t.Sent=0]="Sent",t[t.UploadProgress=1]="UploadProgress",t[t.ResponseHeader=2]="ResponseHeader",t[t.DownloadProgress=3]="DownloadProgress",t[t.Response=4]="Response",t[t.User=5]="User",t})(Gc||{}),P1=class{headers;status;statusText;url;ok;type;redirected;constructor(i,e=200,n="OK"){this.headers=i.headers||new To,this.status=i.status!==void 0?i.status:e,this.statusText=i.statusText||n,this.url=i.url||null,this.redirected=i.redirected,this.ok=this.status>=200&&this.status<300}},Vm=class t extends P1{constructor(i={}){super(i)}type=Gc.ResponseHeader;clone(i={}){return new t({headers:i.headers||this.headers,status:i.status!==void 0?i.status:this.status,statusText:i.statusText||this.statusText,url:i.url||this.url||void 0})}},r0=class t extends P1{body;constructor(i={}){super(i),this.body=i.body!==void 0?i.body:null}type=Gc.Response;clone(i={}){return new t({body:i.body!==void 0?i.body:this.body,headers:i.headers||this.headers,status:i.status!==void 0?i.status:this.status,statusText:i.statusText||this.statusText,url:i.url||this.url||void 0,redirected:i.redirected??this.redirected})}},O1=class extends P1{name="HttpErrorResponse";message;error;ok=!1;constructor(i){super(i,0,"Unknown Error"),this.status>=200&&this.status<300?this.message=`Http failure during parsing for ${i.url||"(unknown url)"}`:this.message=`Http failure response for ${i.url||"(unknown url)"}: ${i.status} ${i.statusText}`,this.error=i.error||null}},cY=200,lY=204;function h7(t,i){return{body:i,headers:t.headers,context:t.context,observe:t.observe,params:t.params,reportProgress:t.reportProgress,responseType:t.responseType,withCredentials:t.withCredentials,credentials:t.credentials,transferCache:t.transferCache,timeout:t.timeout,keepalive:t.keepalive,priority:t.priority,cache:t.cache,mode:t.mode,redirect:t.redirect,integrity:t.integrity,referrer:t.referrer}}var Bn=(()=>{class t{handler;constructor(e){this.handler=e}request(e,n,o={}){let r;if(e instanceof I1)r=e;else{let c;o.headers instanceof To?c=o.headers:c=new To(o.headers);let m;o.params&&(o.params instanceof te?m=o.params:m=new te({fromObject:o.params})),r=new I1(e,n,o.body!==void 0?o.body:null,{headers:c,context:o.context,params:m,reportProgress:o.reportProgress,responseType:o.responseType||"json",withCredentials:o.withCredentials,transferCache:o.transferCache,keepalive:o.keepalive,priority:o.priority,cache:o.cache,mode:o.mode,redirect:o.redirect,credentials:o.credentials,referrer:o.referrer,integrity:o.integrity,timeout:o.timeout})}let a=re(r).pipe(Qi(c=>this.handler.handle(c)));if(e instanceof I1||o.observe==="events")return a;let s=a.pipe(Ae(c=>c instanceof r0));switch(o.observe||"body"){case"body":switch(r.responseType){case"arraybuffer":return s.pipe(me(c=>{if(c.body!==null&&!(c.body instanceof ArrayBuffer))throw new pe(2806,!1);return c.body}));case"blob":return s.pipe(me(c=>{if(c.body!==null&&!(c.body instanceof Blob))throw new pe(2807,!1);return c.body}));case"text":return s.pipe(me(c=>{if(c.body!==null&&typeof c.body!="string")throw new pe(2808,!1);return c.body}));case"json":default:return s.pipe(me(c=>c.body))}case"response":return s;default:throw new pe(2809,!1)}}delete(e,n={}){return this.request("DELETE",e,n)}get(e,n={}){return this.request("GET",e,n)}head(e,n={}){return this.request("HEAD",e,n)}jsonp(e,n){return this.request("JSONP",e,{params:new te().append(n,"JSONP_CALLBACK"),observe:"body",responseType:"json"})}options(e,n={}){return this.request("OPTIONS",e,n)}patch(e,n,o={}){return this.request("PATCH",e,h7(o,n))}post(e,n,o={}){return this.request("POST",e,h7(o,n))}put(e,n,o={}){return this.request("PUT",e,h7(o,n))}static \u0275fac=function(n){return new(n||t)(ke(T1))};static \u0275prov=R({token:t,factory:t.\u0275fac})}return t})();var dY=new L("");function $D(t,i){return i(t)}function uY(t,i){return(e,n)=>i.intercept(e,{handle:o=>t(o,n)})}function mY(t,i,e){return(n,o)=>bi(e,()=>i(n,r=>t(r,o)))}var GD=new L(""),_7=new L(""),WD=new L(""),b7=new L("",{providedIn:"root",factory:()=>!0});function pY(){let t=null;return(i,e)=>{t===null&&(t=(d(GD,{optional:!0})??[]).reduceRight(uY,$D));let n=d(a1);if(d(b7)){let r=n.add();return t(i,e).pipe(qr(r))}else return t(i,e)}}var Bm=(()=>{class t extends T1{backend;injector;chain=null;pendingTasks=d(a1);contributeToStability=d(b7);constructor(e,n){super(),this.backend=e,this.injector=n}handle(e){if(this.chain===null){let n=Array.from(new Set([...this.injector.get(_7),...this.injector.get(WD,[])]));this.chain=n.reduceRight((o,r)=>mY(o,r,this.injector),$D)}if(this.contributeToStability){let n=this.pendingTasks.add();return this.chain(e,o=>this.backend.handle(o)).pipe(qr(n))}else return this.chain(e,n=>this.backend.handle(n))}static \u0275fac=function(n){return new(n||t)(ke(o0),ke(Qt))};static \u0275prov=R({token:t,factory:t.\u0275fac})}return t})();var fY=/^\)\]\}',?\n/,hY=RegExp(`^${jD}:`,"m");function gY(t){return"responseURL"in t&&t.responseURL?t.responseURL:hY.test(t.getAllResponseHeaders())?t.getResponseHeader(jD):null}var g7=(()=>{class t{xhrFactory;constructor(e){this.xhrFactory=e}handle(e){if(e.method==="JSONP")throw new pe(-2800,!1);let n=this.xhrFactory;return re(null).pipe(lt(()=>new Fe(r=>{let a=n.build();if(a.open(e.method,e.urlWithParams),e.withCredentials&&(a.withCredentials=!0),e.headers.forEach((Y,Z)=>a.setRequestHeader(Y,Z.join(","))),e.headers.has(VD)||a.setRequestHeader(VD,sY),!e.headers.has(FD)){let Y=e.detectContentTypeHeader();Y!==null&&a.setRequestHeader(FD,Y)}if(e.timeout&&(a.timeout=e.timeout),e.responseType){let Y=e.responseType.toLowerCase();a.responseType=Y!=="json"?Y:"text"}let s=e.serializeBody(),c=null,m=()=>{if(c!==null)return c;let Y=a.statusText||"OK",Z=new To(a.getAllResponseHeaders()),Oe=gY(a)||e.url;return c=new Vm({headers:Z,status:a.status,statusText:Y,url:Oe}),c},f=()=>{let{headers:Y,status:Z,statusText:Oe,url:Mt}=m(),Et=null;Z!==lY&&(Et=typeof a.response>"u"?a.responseText:a.response),Z===0&&(Z=Et?cY:0);let Ht=Z>=200&&Z<300;if(e.responseType==="json"&&typeof Et=="string"){let fn=Et;Et=Et.replace(fY,"");try{Et=Et!==""?JSON.parse(Et):null}catch(Bo){Et=fn,Ht&&(Ht=!1,Et={error:Bo,text:Et})}}Ht?(r.next(new r0({body:Et,headers:Y,status:Z,statusText:Oe,url:Mt||void 0})),r.complete()):r.error(new O1({error:Et,headers:Y,status:Z,statusText:Oe,url:Mt||void 0}))},v=Y=>{let{url:Z}=m(),Oe=new O1({error:Y,status:a.status||0,statusText:a.statusText||"Unknown Error",url:Z||void 0});r.error(Oe)},x=v;e.timeout&&(x=Y=>{let{url:Z}=m(),Oe=new O1({error:new DOMException("Request timed out","TimeoutError"),status:a.status||0,statusText:a.statusText||"Request timeout",url:Z||void 0});r.error(Oe)});let w=!1,O=Y=>{w||(r.next(m()),w=!0);let Z={type:Gc.DownloadProgress,loaded:Y.loaded};Y.lengthComputable&&(Z.total=Y.total),e.responseType==="text"&&a.responseText&&(Z.partialText=a.responseText),r.next(Z)},K=Y=>{let Z={type:Gc.UploadProgress,loaded:Y.loaded};Y.lengthComputable&&(Z.total=Y.total),r.next(Z)};return a.addEventListener("load",f),a.addEventListener("error",v),a.addEventListener("timeout",x),a.addEventListener("abort",v),e.reportProgress&&(a.addEventListener("progress",O),s!==null&&a.upload&&a.upload.addEventListener("progress",K)),a.send(s),r.next({type:Gc.Sent}),()=>{a.removeEventListener("error",v),a.removeEventListener("abort",v),a.removeEventListener("load",f),a.removeEventListener("timeout",x),e.reportProgress&&(a.removeEventListener("progress",O),s!==null&&a.upload&&a.upload.removeEventListener("progress",K)),a.readyState!==a.DONE&&a.abort()}})))}static \u0275fac=function(n){return new(n||t)(ke($c))};static \u0275prov=R({token:t,factory:t.\u0275fac})}return t})(),qD=new L(""),_Y="XSRF-TOKEN",bY=new L("",{providedIn:"root",factory:()=>_Y}),vY="X-XSRF-TOKEN",yY=new L("",{providedIn:"root",factory:()=>vY}),a0=class{},CY=(()=>{class t{doc;cookieName;lastCookieString="";lastToken=null;parseCount=0;constructor(e,n){this.doc=e,this.cookieName=n}getToken(){let e=this.doc.cookie||"";return e!==this.lastCookieString&&(this.parseCount++,this.lastToken=Jd(e,this.cookieName),this.lastCookieString=e),this.lastToken}static \u0275fac=function(n){return new(n||t)(ke(Me),ke(bY))};static \u0275prov=R({token:t,factory:t.\u0275fac})}return t})(),xY=/^(?:https?:)?\/\//i;function MY(t,i){if(!d(qD)||t.method==="GET"||t.method==="HEAD"||xY.test(t.url))return i(t);let e=d(a0).getToken(),n=d(yY);return e!=null&&!t.headers.has(n)&&(t=t.clone({headers:t.headers.set(n,e)})),i(t)}var v7=(function(t){return t[t.Interceptors=0]="Interceptors",t[t.LegacyInterceptors=1]="LegacyInterceptors",t[t.CustomXsrfConfiguration=2]="CustomXsrfConfiguration",t[t.NoXsrfProtection=3]="NoXsrfProtection",t[t.JsonpSupport=4]="JsonpSupport",t[t.RequestsMadeViaParent=5]="RequestsMadeViaParent",t[t.Fetch=6]="Fetch",t})(v7||{});function wY(t,i){return{\u0275kind:t,\u0275providers:i}}function DY(...t){let i=[Bn,g7,Bm,{provide:T1,useExisting:Bm},{provide:o0,useFactory:()=>d(dY,{optional:!0})??d(g7)},{provide:_7,useValue:MY,multi:!0},{provide:qD,useValue:!0},{provide:a0,useClass:CY}];for(let e of t)i.push(...e.\u0275providers);return bs(i)}var BD=new L("");function SY(){return wY(v7.LegacyInterceptors,[{provide:BD,useFactory:pY},{provide:_7,useExisting:BD,multi:!0}])}var YD=(()=>{class t{_doc;constructor(e){this._doc=e}getTitle(){return this._doc.title}setTitle(e){this._doc.title=e||""}static \u0275fac=function(n){return new(n||t)(ke(Me))};static \u0275prov=R({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();var Ga=(()=>{class t{static \u0275fac=function(n){return new(n||t)};static \u0275prov=R({token:t,factory:function(n){let o=null;return n?o=new(n||t):o=ke(EY),o},providedIn:"root"})}return t})(),EY=(()=>{class t extends Ga{_doc;constructor(e){super(),this._doc=e}sanitize(e,n){if(n==null)return null;switch(e){case Fn.NONE:return n;case Fn.HTML:return ra(n,"HTML")?So(n):B4(this._doc,String(n)).toString();case Fn.STYLE:return ra(n,"Style")?So(n):n;case Fn.SCRIPT:if(ra(n,"Script"))return So(n);throw new pe(5200,!1);case Fn.URL:return ra(n,"URL")?So(n):Pd(String(n));case Fn.RESOURCE_URL:if(ra(n,"ResourceURL"))return So(n);throw new pe(5201,!1);default:throw new pe(5202,!1)}}bypassSecurityTrustHtml(e){return j8(e)}bypassSecurityTrustStyle(e){return H8(e)}bypassSecurityTrustScript(e){return U8(e)}bypassSecurityTrustUrl(e){return $8(e)}bypassSecurityTrustResourceUrl(e){return G8(e)}static \u0275fac=function(n){return new(n||t)(ke(Me))};static \u0275prov=R({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();var L1=class{},KD=(()=>{class t extends L1{getTranslation(e){return re({})}static \u0275fac=(()=>{let e;return function(o){return(e||(e=Ie(t)))(o||t)}})();static \u0275prov=R({token:t,factory:t.\u0275fac})}return t})(),c0=class{},XD=(()=>{class t{handle(e){return e.key}static \u0275fac=function(n){return new(n||t)};static \u0275prov=R({token:t,factory:t.\u0275fac})}return t})();function Hm(t,i){if(t===i)return!0;if(t===null||i===null)return!1;if(t!==t&&i!==i)return!0;let e=typeof t,n=typeof i,o,r,a;if(e==n&&e=="object")if(Array.isArray(t)){if(!Array.isArray(i))return!1;if((o=t.length)==i.length){for(r=0;r{d0(i[n])?n in t?e[n]=y7(t[n],i[n]):Object.assign(e,{[n]:i[n]}):Object.assign(e,{[n]:i[n]})}),e):y7({},i)}function C7(t,i){let e=i.split(".");i="";do i+=e.shift(),Is(t)&&Is(t[i])&&(d0(t[i])||S7(t[i])||!e.length)?(t=t[i],i=""):e.length?i+=".":t=void 0;while(e.length);return t}function OY(t,i,e){let n=i.split("."),o=t;for(let r=0;r{class t extends A1{templateMatcher=/{{\s?([^{}\s]*)\s?}}/g;interpolate(e,n){if(k7(e))return this.interpolateString(e,n);if(IY(e))return this.interpolateFunction(e,n)}interpolateFunction(e,n){return e(n)}interpolateString(e,n){return n?e.replace(this.templateMatcher,(o,r)=>{let a=C7(n,r);return Is(a)?a:o}):e}static \u0275fac=(()=>{let e;return function(o){return(e||(e=Ie(t)))(o||t)}})();static \u0275prov=R({token:t,factory:t.\u0275fac})}return t})(),z1=class{},JD=(()=>{class t extends z1{compile(e,n){return e}compileTranslations(e,n){return e}static \u0275fac=(()=>{let e;return function(o){return(e||(e=Ie(t)))(o||t)}})();static \u0275prov=R({token:t,factory:t.\u0275fac})}return t})(),l0=class{defaultLang;currentLang=this.defaultLang;translations={};langs=[];onTranslationChange=new j;onLangChange=new j;onDefaultLangChange=new j},x7=new L("ISOLATE_TRANSLATE_SERVICE"),M7=new L("USE_DEFAULT_LANG"),w7=new L("DEFAULT_LANGUAGE"),D7=new L("USE_EXTEND"),s0=t=>ai(t)?t:re(t),Po=(()=>{class t{store;currentLoader;compiler;parser;missingTranslationHandler;useDefaultLang;extend;loadingTranslations;pending=!1;_translationRequests={};lastUseLanguage=null;get onTranslationChange(){return this.store.onTranslationChange}get onLangChange(){return this.store.onLangChange}get onDefaultLangChange(){return this.store.onDefaultLangChange}get defaultLang(){return this.store.defaultLang}set defaultLang(e){this.store.defaultLang=e}get currentLang(){return this.store.currentLang}set currentLang(e){this.store.currentLang=e}get langs(){return this.store.langs}set langs(e){this.store.langs=e}get translations(){return this.store.translations}set translations(e){this.store.translations=e}constructor(e,n,o,r,a,s=!0,c=!1,m=!1,f){this.store=e,this.currentLoader=n,this.compiler=o,this.parser=r,this.missingTranslationHandler=a,this.useDefaultLang=s,this.extend=m,c&&(this.store=new l0),f&&this.setDefaultLang(f)}setDefaultLang(e){if(e===this.defaultLang)return;let n=this.retrieveTranslations(e);typeof n<"u"?(this.defaultLang==null&&(this.defaultLang=e),n.pipe(Be(1)).subscribe(()=>{this.changeDefaultLang(e)})):this.changeDefaultLang(e)}getDefaultLang(){return this.defaultLang}use(e){if(this.lastUseLanguage=e,e===this.currentLang)return re(this.translations[e]);this.currentLang||(this.currentLang=e);let n=this.retrieveTranslations(e);return ai(n)?(n.pipe(Be(1)).subscribe(()=>{this.changeLang(e)}),n):(this.changeLang(e),re(this.translations[e]))}changeLang(e){e===this.lastUseLanguage&&(this.currentLang=e,this.onLangChange.emit({lang:e,translations:this.translations[e]}),this.defaultLang==null&&this.changeDefaultLang(e))}retrieveTranslations(e){if(typeof this.translations[e]>"u"||this.extend)return this._translationRequests[e]=this._translationRequests[e]||this.loadAndCompileTranslations(e),this._translationRequests[e]}getTranslation(e){return this.loadAndCompileTranslations(e)}loadAndCompileTranslations(e){this.pending=!0;let n=this.currentLoader.getTranslation(e).pipe(hs(1),Be(1));return this.loadingTranslations=n.pipe(me(o=>this.compiler.compileTranslations(o,e)),hs(1),Be(1)),this.loadingTranslations.subscribe({next:o=>{this.translations[e]=this.extend&&this.translations[e]?q(q({},o),this.translations[e]):o,this.updateLangs(),this.pending=!1},error:o=>{this.pending=!1}}),n}setTranslation(e,n,o=!1){let r=this.compiler.compileTranslations(n,e);(o||this.extend)&&this.translations[e]?this.translations[e]=y7(this.translations[e],r):this.translations[e]=r,this.updateLangs(),this.onTranslationChange.emit({lang:e,translations:this.translations[e]})}getLangs(){return this.langs}addLangs(e){let n=e.filter(o=>!this.langs.includes(o));n.length>0&&(this.langs=[...this.langs,...n])}updateLangs(){this.addLangs(Object.keys(this.translations))}getParsedResultForKey(e,n,o){let r;if(e&&(r=this.runInterpolation(C7(e,n),o)),r===void 0&&this.defaultLang!=null&&this.defaultLang!==this.currentLang&&this.useDefaultLang&&(r=this.runInterpolation(C7(this.translations[this.defaultLang],n),o)),r===void 0){let a={key:n,translateService:this};typeof o<"u"&&(a.interpolateParams=o),r=this.missingTranslationHandler.handle(a)}return r!==void 0?r:n}runInterpolation(e,n){if(S7(e))return e.map(o=>this.runInterpolation(o,n));if(d0(e)){let o={};for(let r in e){let a=this.runInterpolation(e[r],n);a!==void 0&&(o[r]=a)}return o}else return this.parser.interpolate(e,n)}getParsedResult(e,n,o){if(n instanceof Array){let r={},a=!1;for(let c of n)r[c]=this.getParsedResultForKey(e,c,o),a=a||ai(r[c]);if(!a)return r;let s=n.map(c=>s0(r[c]));return Oa(s).pipe(me(c=>{let m={};return c.forEach((f,v)=>{m[n[v]]=f}),m}))}return this.getParsedResultForKey(e,n,o)}get(e,n){if(!Is(e)||!e.length)throw new Error('Parameter "key" is required and cannot be empty');return this.pending?this.loadingTranslations.pipe(Qi(o=>s0(this.getParsedResult(o,e,n)))):s0(this.getParsedResult(this.translations[this.currentLang],e,n))}getStreamOnTranslationChange(e,n){if(!Is(e)||!e.length)throw new Error('Parameter "key" is required and cannot be empty');return Li(Ai(()=>this.get(e,n)),this.onTranslationChange.pipe(lt(o=>{let r=this.getParsedResult(o.translations,e,n);return s0(r)})))}stream(e,n){if(!Is(e)||!e.length)throw new Error('Parameter "key" required');return Li(Ai(()=>this.get(e,n)),this.onLangChange.pipe(lt(o=>{let r=this.getParsedResult(o.translations,e,n);return s0(r)})))}instant(e,n){if(!Is(e)||e.length===0)throw new Error('Parameter "key" is required and cannot be empty');let o=this.getParsedResult(this.translations[this.currentLang],e,n);return ai(o)?Array.isArray(e)?e.reduce((r,a)=>(r[a]=a,r),{}):e:o}set(e,n,o=this.currentLang){OY(this.translations[o],e,k7(n)?this.compiler.compile(n,o):this.compiler.compileTranslations(n,o)),this.updateLangs(),this.onTranslationChange.emit({lang:o,translations:this.translations[o]})}changeDefaultLang(e){this.defaultLang=e,this.onDefaultLangChange.emit({lang:e,translations:this.translations[e]})}reloadLang(e){return this.resetLang(e),this.loadAndCompileTranslations(e)}resetLang(e){delete this._translationRequests[e],delete this.translations[e]}getBrowserLang(){if(typeof window>"u"||!window.navigator)return;let e=this.getBrowserCultureLang();return e?e.split(/[-_]/)[0]:void 0}getBrowserCultureLang(){if(!(typeof window>"u"||typeof window.navigator>"u"))return window.navigator.languages?window.navigator.languages[0]:window.navigator.language||window.navigator.browserLanguage||window.navigator.userLanguage}static \u0275fac=function(n){return new(n||t)(ke(l0),ke(L1),ke(z1),ke(A1),ke(c0),ke(M7),ke(x7),ke(D7),ke(w7))};static \u0275prov=R({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();var Te=(()=>{class t{translate;_ref;value="";lastKey=null;lastParams=[];onTranslationChange;onLangChange;onDefaultLangChange;constructor(e,n){this.translate=e,this._ref=n}updateValue(e,n,o){let r=a=>{this.value=a!==void 0?a:e,this.lastKey=e,this._ref.markForCheck()};if(o){let a=this.translate.getParsedResult(o,e,n);ai(a)?a.subscribe(r):r(a)}this.translate.get(e,n).subscribe(r)}transform(e,...n){if(!e||!e.length)return e;if(Hm(e,this.lastKey)&&Hm(n,this.lastParams))return this.value;let o;if(Is(n[0])&&n.length)if(k7(n[0])&&n[0].length){let r=n[0].replace(/(')?([a-zA-Z0-9_]+)(')?(\s)?:/g,'"$2":').replace(/:(\s)?(')(.*?)(')/g,':"$3"');try{o=JSON.parse(r)}catch(a){throw new SyntaxError(`Wrong parameter in TranslatePipe. Expected a valid Object, received: ${n[0]}`)}}else d0(n[0])&&(o=n[0]);return this.lastKey=e,this.lastParams=n,this.updateValue(e,o),this._dispose(),this.onTranslationChange||(this.onTranslationChange=this.translate.onTranslationChange.subscribe(r=>{this.lastKey&&r.lang===this.translate.currentLang&&(this.lastKey=null,this.updateValue(e,o,r.translations))})),this.onLangChange||(this.onLangChange=this.translate.onLangChange.subscribe(r=>{this.lastKey&&(this.lastKey=null,this.updateValue(e,o,r.translations))})),this.onDefaultLangChange||(this.onDefaultLangChange=this.translate.onDefaultLangChange.subscribe(()=>{this.lastKey&&(this.lastKey=null,this.updateValue(e,o))})),this.value}_dispose(){typeof this.onTranslationChange<"u"&&(this.onTranslationChange.unsubscribe(),this.onTranslationChange=void 0),typeof this.onLangChange<"u"&&(this.onLangChange.unsubscribe(),this.onLangChange=void 0),typeof this.onDefaultLangChange<"u"&&(this.onDefaultLangChange.unsubscribe(),this.onDefaultLangChange=void 0)}ngOnDestroy(){this._dispose()}static \u0275fac=function(n){return new(n||t)(Ce(Po,16),Ce(xe,16))};static \u0275pipe=wt({name:"translate",type:t,pure:!1});static \u0275prov=R({token:t,factory:t.\u0275fac})}return t})();var E7=(()=>{class t{static forRoot(e={}){return{ngModule:t,providers:[e.loader||{provide:L1,useClass:KD},e.compiler||{provide:z1,useClass:JD},e.parser||{provide:A1,useClass:ZD},e.missingTranslationHandler||{provide:c0,useClass:XD},l0,{provide:x7,useValue:e.isolate},{provide:M7,useValue:e.useDefaultLang},{provide:D7,useValue:e.extend},{provide:w7,useValue:e.defaultLanguage},Po]}}static forChild(e={}){return{ngModule:t,providers:[e.loader||{provide:L1,useClass:KD},e.compiler||{provide:z1,useClass:JD},e.parser||{provide:A1,useClass:ZD},e.missingTranslationHandler||{provide:c0,useClass:XD},{provide:x7,useValue:e.isolate},{provide:M7,useValue:e.useDefaultLang},{provide:D7,useValue:e.extend},{provide:w7,useValue:e.defaultLanguage},Po]}}static \u0275fac=function(n){return new(n||t)};static \u0275mod=J({type:t});static \u0275inj=X({})}return t})();var I7={mifos_x:{version:"251216",hash:"4220abc"},allow_switching_backend_instance:!0};var an=window.env||{},mt={production:!0,version:I7.mifos_x.version,hash:I7.mifos_x.hash,fineractPlatformTenantId:an.fineractPlatformTenantId||"default",fineractPlatformTenantIds:an.fineractPlatformTenantIds||"default",baseApiUrls:an.fineractApiUrls||"https://sandbox.mifos.community,https://demo.mifos.community,https://localhost:8443,"+window.location.origin,baseApiUrl:an.fineractApiUrl||(an.fineractApiUrls?.length>0?an.fineractApiUrls.split(",")[0]:window.location.origin),oauthServerUrl:an.oauthServerUrl||an.fineractApiUrl+an.apiProvider,allowServerSwitch:an.allowServerSwitch||"true",apiProvider:an.apiProvider||"/fineract-provider/api",apiVersion:an.apiVersion||"/v1",apiActuator:an.apiActuator||"/fineract-provider",serverUrl:"",oauth:{enabled:an.oauthServerEnabled||!1,serverUrl:an.oauthServerUrl||"",appId:an.oauthAppId||""},enableRememberMe:!1,warningDialog:{title:"Warning",content:"This system is for authorized use only. Unauthorized access will result in possible legal action. By accessing this system, you acknowledge that you are authorized to do so and that all data stored and processed here is confidential.",buttonText:"Close"},defaultLanguage:an.defaultLanguage||"en-US",supportedLanguages:an.supportedLanguages||"cs-CS,de-DE,en-US,es-MX,fr-FR,it-IT,ko-KO,lt-LT,lv-LV,ne-NE,pt-PT,sw-SW",preloadClients:an.preloadClients||!0,defaultCharDelimiter:an.defaultCharDelimiter||",",displayBackEndInfo:an.displayBackEndInfo||"true",displayTenantSelector:an.displayTenantSelector||"true",waitTimeForNotifications:an.waitTimeForNotifications||60,waitTimeForCOBCatchUp:an.waitTimeForCOBCatchUp||30,session:{timeout:{idleTimeout:an.sessionIdleTimeout||3e5}},httpCacheEnabled:an.httpCacheEnabled||!1,vNextApiUrl:window.env.vNextApiUrl||"https://apis.mifos.community",vNextApiProvider:window.env.vNextApiProvider||"/vnext1",vNextApiVersion:window.env.vNextApiVersion||"/v1.0",interbankTransfers:window.env.interbankTransfers||!1,minPasswordLength:an.minPasswordLength||12,OIDC:{oidcServerEnabled:window.env.oidcServerEnabled||!1,oidcBaseUrl:window.env.oidcBaseUrl||"",oidcClientId:window.env.oidcClientId||"",oidcApiUrl:window.env.oidcApiUrl||"",oidcFrontUrl:window.env.oidcFrontUrl||""}};mt.serverUrl=`${mt.baseApiUrl}${mt.apiProvider}${mt.apiVersion}`;var eS=(()=>{class t{transform(e,n,o,r){if(e){if(n==="loan"&&(o==="closed"?e=e.filter(a=>a.status.code==="loanStatusType.closed.written.off"||a.status.code==="loanStatusType.closed.obligations.met"||a.status.code==="loanStatusType.closed.reschedule.outstanding.amount"||a.status.code==="loanStatusType.withdrawn.by.client"||a.status.code==="loanStatusType.rejected"):e=e.filter(a=>a.status.code!=="loanStatusType.closed.written.off"&&a.status.code!=="loanStatusType.closed.obligations.met"&&a.status.code!=="loanStatusType.closed.reschedule.outstanding.amount"&&a.status.code!=="loanStatusType.withdrawn.by.client"&&a.status.code!=="loanStatusType.rejected")),n==="saving"&&(r==="isFixed"?e=e.filter(a=>a.depositType.value==="Fixed Deposit"):r==="isRecurring"?e=e.filter(a=>a.depositType.value==="Recurring Deposit"):r==="isSavings"&&(e=e.filter(a=>a.depositType.value==="Savings")),o==="closed"?e=e.filter(a=>a.status.code==="savingsAccountStatusType.withdrawn.by.applicant"||a.status.code==="savingsAccountStatusType.closed"||a.status.code==="savingsAccountStatusType.pre.mature.closure"||a.status.code==="savingsAccountStatusType.rejected"):e=e.filter(a=>a.status.code!=="savingsAccountStatusType.withdrawn.by.applicant"&&a.status.code!=="savingsAccountStatusType.closed"&&a.status.code!=="savingsAccountStatusType.pre.mature.closure"&&a.status.code!=="savingsAccountStatusType.rejected")),n==="share"&&(o==="closed"?e=e.filter(a=>a.status.code==="shareAccountStatusType.closed"||a.status.code==="shareAccountStatusType.rejected"):e=e.filter(a=>a.status.code!=="shareAccountStatusType.closed"&&a.status.code!=="shareAccountStatusType.rejected")),n==="guarantor")if(o===!1)e=e.filter(a=>a.status===!0);else return e;return n==="clientApproval"&&(e=e.filter(a=>a.active===!1&&a.status.value==="Pending")),e}}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275pipe=wt({name:"accountsFilter",type:t,pure:!0})}}return t})();var tS=(()=>{class t{transform(e,n,o,r){return e&&(e=e.filter(a=>!(a.currency.code!==o||r&&a.chargeTimeType.id===12||n.filter(s=>s.id===a.id).length))),e}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275pipe=wt({name:"chargesFilter",type:t,pure:!0})}}return t})();var nS=(()=>{class t{transform(e,n){return e&&(e=e.filter(o=>o.penalty===n)),e}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275pipe=wt({name:"chargesPenaltyFilter",type:t,pure:!0})}}return t})();var Os=(()=>{class t{constructor(){this.alertEvent=new j}alert(e){this.alertEvent.emit(e)}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275prov=R({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();var N1=e3(Um());var go=(()=>{class t{constructor(){this.datePipe=d(E1)}static{this.DEFAULT_DATEFORMAT="yyyy-MM-dd"}static{this.DEFAULT_DATETIMEFORMAT="yyyy-MM-dd HH:mm"}getDate(e){return this.datePipe.transform(e,"yyyy-MM-dd")}formatDate(e,n){return new E1(this.language.code).transform(e,n)}formatDateAsString(e,n){return(0,N1.default)(e).format(n)}parseDate(e){return e instanceof Array?(0,N1.default)(e.join("-"),"YYYY-MM-DD").toDate():(0,N1.default)(e).toDate()}parseDatetime(e){return(0,N1.default)(e).toDate()}convertToDate(e,n){return(0,N1.default)(e).toDate()}get language(){return localStorage.getItem("mifosXLanguage")?JSON.parse(localStorage.getItem("mifosXLanguage")):"en"}calculateDiff(e,n){return Math.floor((Date.UTC(n.getFullYear(),n.getMonth(),n.getDate())-Date.UTC(e.getFullYear(),e.getMonth(),e.getDate()))/(1e3*60*60*24))}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275prov=R({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();var Xt=(()=>{class t{constructor(){this.alertService=d(Os),this.dateUtils=d(go),this.minAllowedDate=new Date(1950,0,1),this.maxAllowedDate=new Date(2100,0,1)}static{this.businessDateFormat="yyyy-MM-dd"}static{this.businessDateConfigName="enable-business-date"}static{this.businessDateType="BUSINESS_DATE"}static{this.cobDateType="COB_DATE"}setDateFormat(e){localStorage.setItem("mifosXDateFormat",JSON.stringify(e))}setLanguage(e){localStorage.setItem("mifosXLanguage",JSON.stringify(e))}setDecimalToDisplay(e){localStorage.setItem("mifosXDecimalsToDisplay",e)}setDefaultLanguage(){let e=mt.defaultLanguage?mt.defaultLanguage:"en-US";this.setLanguage({name:e,code:e.substring(0,2)})}setServer(e){localStorage.setItem("mifosXServerURL",e)}setServers(e){localStorage.setItem("mifosXServers",JSON.stringify(e))}setTenantIdentifiers(e){localStorage.setItem("mifosXTenantIdentifiers",JSON.stringify(e))}setTenantIdentifier(e){localStorage.setItem("mifosXTenantIdentifier",e)}setBusinessDate(e){localStorage.setItem("mifosXServerDate",e)}setBusinessDateConfig(e){localStorage.setItem("mifosXServerBusinessDateEnabled",e)}get dateFormat(){return JSON.parse(localStorage.getItem("mifosXDateFormat"))}get language(){return localStorage.getItem("mifosXLanguage")||this.setDefaultLanguage(),JSON.parse(localStorage.getItem("mifosXLanguage"))}get languageCode(){let e=this.language.code;return e==="es"?"es-MX":e==="en"?"en-US":e+"-"+e.toUpperCase()}get decimals(){return localStorage.getItem("mifosXDecimalsToDisplay")?localStorage.getItem("mifosXDecimalsToDisplay"):"2"}get servers(){return JSON.parse(localStorage.getItem("mifosXServers"))}get server(){return localStorage.getItem("mifosXServerURL")?localStorage.getItem("mifosXServerURL"):mt.baseApiUrl&&mt.baseApiUrl!==""?mt.baseApiUrl:this.servers()[0]}get baseServerUrl(){return this.server+mt.apiProvider}get serverUrl(){return this.server+mt.apiProvider+mt.apiVersion}get serverHost(){return this.server}get businessDate(){return this.dateUtils.convertToDate(localStorage.getItem("mifosXServerDate"),t.businessDateFormat)}get businessDateConfig(){return localStorage.getItem("mifosXServerBusinessDateEnabled")}get minPastDate(){return this.minAllowedDate}get maxFutureDate(){return this.maxAllowedDate}get tenantIdentifiers(){return JSON.parse(localStorage.getItem("mifosXTenantIdentifiers"))}get tenantIdentifier(){return localStorage.getItem("mifosXTenantIdentifier")}validateBusinessDateStatus(e){e.some(n=>{if(n.name===t.businessDateConfigName)return n.enabled})}getBusinessDates(e,n){e.some(o=>{if(o.type===n){let r=new Date(o.date);this.setBusinessDate(this.dateUtils.formatDate(r,t.businessDateFormat)),this.alertService.alert({type:n+" Set",message:this.dateUtils.formatDate(r,this.dateFormat)});return}})}setThemeDarkEnabled(e){localStorage.setItem("mifosXThemeDarkEnabled",JSON.stringify(e))}get themeDarkEnabled(){return JSON.parse(localStorage.getItem("mifosXThemeDarkEnabled"))}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275prov=R({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();var $m=e3(Um());var Lo=(()=>{class t{constructor(){this.settingsService=d(Xt)}transform(e,n){let o=this.settingsService.dateFormat.replace("dd","DD");if(typeof e>"u")return"";let r;return $m.default.locale(this.settingsService.language.code),e instanceof Array?r=(0,$m.default)(e.join("-"),"YYYY-MM-DD"):r=(0,$m.default)(e),n==null?r.format(o):r.format(n)}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275pipe=wt({name:"dateFormat",type:t,pure:!0})}}return t})();var u0=e3(Um());var ca=(()=>{class t{transform(e,n){if(e==null||e==="")return"";let o;if(Array.isArray(e)){let[a,s,c,m,f,v]=e;m!=null?o=(0,u0.default)({year:a,month:(s??1)-1,date:c,hour:m,minute:f??0,second:v??0}):o=(0,u0.default)({year:a,month:(s??1)-1,date:c})}else typeof e=="number"&&e<1e12?o=u0.default.unix(e):o=(0,u0.default)(e);let r=n??"yyyy-MM-ddTHH:mm:ssZ";return o.format(r)}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275pipe=wt({name:"datetimeFormat",type:t,pure:!0})}}return t})();var Wm=(()=>{class t{transform(e){if(e){if(/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/gi.test(e))return e.split("-")[4];{let r=e.length;return r>20?e.substring(r-20,r):e}}else return""}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275pipe=wt({name:"externalIdentifier",type:t,pure:!0})}}return t})();var iS=new WeakMap,oS=(()=>{class t{constructor(){this.sanitizer=d(Ga)}transform(e,n,o,r){if(!n||!o||e===null||e===void 0)return"";let a=iS.get(n);a||(a=new Map,iS.set(n,a));let s=a.get(o);if(!s){if(s=new Map,Array.isArray(n))for(let f of n)f&&f[o]!==void 0&&f[o]!==null&&s.set(f[o],f);a.set(o,s)}let c=s.get(e),m=c?c[r]??"":"";return typeof m=="string"?this.sanitizer.sanitize(Fn.HTML,m)||"":String(m||"")}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275pipe=wt({name:"find",type:t,pure:!0})}}return t})();var Ts=(()=>{class t{constructor(){this.decimalFormat=d(Zd),this.settingsService=d(Xt)}transform(e,n){if(e===void 0)return n||"";let o=this.settingsService.decimals,r=`1.${o}-${o}`;return this.decimalFormat.transform(e,r)}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275pipe=wt({name:"formatNumber",type:t,pure:!0})}}return t})();var sS=e3(aS());var Ym=(()=>{class t{transform(e){if(e.charAt(0)==="{"&&e.charAt(e.length-1)==="}")try{return sS.json(e)}catch{return e}return e}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275pipe=wt({name:"prettyPrint",type:t,pure:!0})}}return t})();var cS=(()=>{class t{transform(e){return{true:"status-active",false:"status-deleted",Active:"status-active",Block:"status-block","charges.StatusType.active.true":"status-active","loanStatusType.submitted.and.pending.approval":"status-pending","loanStatusType.approved":"status-approved","loanStatusType.active":"status-active","loanStatusType.overpaid":"status-overpaid","loanStatusType.chargeoff":"status-chargeoff","loanStatusType.activeOverdue":"status-active-overdue","loanSubStatusType.contractTermination":"subStatus-contract-termination","savingsAccountStatusType.submitted.and.pending.approval":"status-pending","savingsAccountStatusType.approved":"status-approved","savingsAccountStatusType.active":"status-active","savingsAccountStatusType.activeInactive":"status-active-overdue","savingsAccountStatusType.activeDormant":"status-active-overdue","savingsAccountStatusType.matured":"status-matured","shareAccountStatusType.submitted.and.pending.approval":"status-pending","shareAccountStatusType.approved":"status-approved","shareAccountStatusType.active":"status-active","shareAccountStatusType.rejected":"status-rejected","loanProduct.active":"status-active","loanProduct.inActive":"status-inactive","clientStatusType.pending":"status-pending","clientStatusType.closed":"status-closed","clientStatusType.rejected":"status-rejected","clientStatusType.withdraw":"status-withdraw","clientStatusType.active":"status-active","clientStatusType.submitted.and.pending.approval":"status-pending","clientStatusTYpe.approved":"status-approved","clientStatusType.transfer.in.progress":"status-transfer-progress","clientStatusType.transfer.on.hold":"status-transfer-hold","groupingStatusType.active":"status-active","groupingStatusType.pending":"status-pending","groupingStatusType.submitted.and.pending.approval":"status-pending","groupingStatusType.approved":"status-approved","smsCampaignStatus.active":"status-active","smsCampaignStatus.pending":"status-pending","smsCampaignStatus.closed":"status-closed","purchasedSharesStatusType.applied":"status-pending"}[e]??"status-unknown"}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275pipe=wt({name:"statusLookup",type:t,pure:!0})}}return t})();var Wc=(()=>{class t{constructor(){this.translateService=d(Po),this.onLangChange=this.translateService.onLangChange.subscribe(()=>{})}ngOnDestroy(){this.onLangChange&&this.onLangChange.unsubscribe()}transform(e,n,o="labels"){if(!e)return e;let r=`${o}.${n}.${e}`;return this.translateService.instant(r)}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275pipe=wt({name:"translateKey",type:t,pure:!1})}}return t})();var Qm=(()=>{class t{transform(e,n){if(e.length<=40)return e;let o=e.substring(0,30);return n&&(o=e.substring(0,n)),o}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275pipe=wt({name:"truncateText",type:t,pure:!0})}}return t})();var dS=(()=>{class t{transform(e){e=decodeURIComponent(e);let n=e.slice(1).split("/");if(e.includes("?")){let r=n.pop(),a=r.slice(0,r.indexOf("?"));n.push(a)}return n.map(r=>r.split("-").map(a=>a.charAt(0).toUpperCase()+a.slice(1)).join(" ")).join(" | ")}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275pipe=wt({name:"urlToString",type:t,pure:!0})}}return t})();var Km=(()=>{class t{constructor(){this.translateService=d(Po)}transform(e,...n){if(e==null)return null;let o=e?"Yes":"No";return this.translateService.instant("labels.buttons."+o)}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275pipe=wt({name:"yesNo",type:t,pure:!0})}}return t})();var uS=(()=>{class t{static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275mod=J({type:t})}static{this.\u0275inj=X({providers:[cS,eS,tS,nS,oS,dS,Lo,ca,Wm,Ts,Km,Ym,Wc,Qm],imports:[he]})}}return t})();var qa={headers:{"Fineract-Platform-TenantId":mt.fineractPlatformTenantId}},Xm="Authorization",LY="Fineract-Platform-TenantId",mS="Fineract-Platform-TFA-Token",pS=(()=>{class t{constructor(){this.settingsService=d(Xt)}intercept(e,n){return this.settingsService.tenantIdentifier&&(qa.headers["Fineract-Platform-TenantId"]=this.settingsService.tenantIdentifier),e=e.clone({setHeaders:qa.headers}),n.handle(e)}setAuthorizationToken(e){mt.oauth.enabled?qa.headers[Xm]=`Bearer ${e}`:qa.headers[Xm]=`Basic ${e}`}setTwoFactorAccessToken(e){qa.headers[mS]=e}removeAuthorization(){delete qa.headers[Xm]}removeAuthorizationTenant(){delete qa.headers[Xm],delete qa.headers[LY]}removeTwoFactorAuthorization(){delete qa.headers[mS]}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275prov=R({token:t,factory:t.\u0275fac})}}return t})();var Zm=(()=>{class t{changePassword(e,n){return this.http.put(`/users/${e}`,n)}constructor(){this.http=d(Bn),this.alertService=d(Os),this.authenticationInterceptor=d(pS),this.userLoggedIn$=new ct(!1),this.isAuthenticated$=this.userLoggedIn$.asObservable(),this.dialogShown=!1,this.credentialsStorageKey="mifosXCredentials",this.oAuthTokenDetailsStorageKey="mifosXOAuthTokenDetails",this.twoFactorAuthenticationTokenStorageKey="mifosXTwoFactorAuthenticationToken";let e=this.authenticationInterceptor;this.userLoggedIn=!1,this.rememberMe=!1,this.storage=sessionStorage;let n=JSON.parse(sessionStorage.getItem(this.credentialsStorageKey)||localStorage.getItem(this.credentialsStorageKey));if(n){n.rememberMe&&(this.rememberMe=!0,this.storage=localStorage);let o=JSON.parse(this.storage.getItem(this.twoFactorAuthenticationTokenStorageKey));mt.oauth.enabled?this.refreshOAuthAccessToken():e.setAuthorizationToken(n.base64EncodedAuthenticationKey),o&&e.setTwoFactorAccessToken(o.token),this.userLoggedIn=!0,this.userLoggedIn$.next(!0)}}login(e){this.alertService.alert({type:"Authentication Start",message:"Please wait..."});let n=mt.enableRememberMe===!0;if(this.rememberMe=n?e.remember:!1,this.storage=this.rememberMe?localStorage:sessionStorage,mt.oauth.enabled){let o=new te;o=o.set("username",e.username),o=o.set("password",e.password),o=o.set("client_id",`${mt.oauth.appId}`),o=o.set("grant_type","password"),o=o.set("remember_me",this.rememberMe?"true":"false");let r=new To;return r=r.set("Content-Type","application/x-www-form-urlencoded"),this.http.post(`${mt.oauth.serverUrl}/token`,o.toString(),{headers:r}).pipe(me(a=>(this.getUserDetails(a),re(!0))))}else return this.http.post("/authentication",{username:e.username,password:e.password,remember:this.rememberMe}).pipe(me(o=>(this.onLoginSuccess(o),re(!0))))}getUserDetails(e){this.refreshTokenOnExpiry(e.expires_in);let n=new To;n=n.set("Authorization","bearer "+e.access_token),this.http.get(`${mt.serverUrl}/userdetails`,{headers:n}).subscribe(o=>{this.onLoginSuccess(o),o.shouldRenewPassword||this.storage.setItem(this.oAuthTokenDetailsStorageKey,JSON.stringify(e))})}refreshTokenOnExpiry(e){setTimeout(()=>this.refreshOAuthAccessToken(),e*1e3)}refreshOAuthAccessToken(){var e=JSON.parse(this.storage.getItem(this.oAuthTokenDetailsStorageKey));if(e==null)return;e=JSON.parse(this.storage.getItem(this.oAuthTokenDetailsStorageKey)).refresh_token,this.authenticationInterceptor.removeAuthorization();let n=JSON.parse(this.storage.getItem(this.credentialsStorageKey)),o=new te;o=o.set("username",n.username),o=o.set("client_id",`${mt.oauth.appId}`),o=o.set("refresh_token",e),o=o.set("grant_type","refresh_token");let r=new To;return r=r.set("Content-Type","application/x-www-form-urlencoded"),this.http.post(`${mt.oauth.serverUrl}/token`,o.toString(),{headers:r}).subscribe(a=>{this.storage.setItem(this.oAuthTokenDetailsStorageKey,JSON.stringify(a)),this.authenticationInterceptor.setAuthorizationToken(a.access_token),this.refreshTokenOnExpiry(a.expires_in);let s=JSON.parse(this.storage.getItem(this.credentialsStorageKey));s.accessToken=a.access_token,this.storage.setItem(this.credentialsStorageKey,JSON.stringify(s))})}onLoginSuccess(e){this.userLoggedIn=!0,this.userLoggedIn$.next(!0),e.rememberMe=this.rememberMe,mt.oauth.enabled?this.authenticationInterceptor.setAuthorizationToken(e.accessToken):this.authenticationInterceptor.setAuthorizationToken(e.base64EncodedAuthenticationKey),e.isTwoFactorAuthenticationRequired?(this.credentials=e,this.alertService.alert({type:"Two Factor Authentication Required",message:"Two Factor Authentication Required"})):e.shouldRenewPassword?(this.credentials=e,this.alertService.alert({type:"Password Expired",message:"Your password has expired, please reset your password!"})):(this.setCredentials(e),this.alertService.alert({type:"Authentication Success",message:`${e.username} successfully logged in!`}),delete this.credentials)}logoutAuthSession(){let e=JSON.parse(this.storage.getItem(this.oAuthTokenDetailsStorageKey)).refresh_token,n=JSON.parse(this.storage.getItem(this.credentialsStorageKey));this.authenticationInterceptor.removeAuthorizationTenant();let o=new te;o=o.set("username",n.username),o=o.set("client_id",`${mt.oauth.appId}`),o=o.set("refresh_token",e);let r=new To;return r=r.set("Content-Type","application/x-www-form-urlencoded"),this.http.post(`${mt.oauth.serverUrl}/logout`,o.toString(),{headers:r}).subscribe()}logout(){let e=JSON.parse(this.storage.getItem(this.twoFactorAuthenticationTokenStorageKey));return e&&(this.http.post("/twofactor/invalidate",{token:e.token}).subscribe(),this.authenticationInterceptor.removeTwoFactorAuthorization()),JSON.parse(this.storage.getItem(this.oAuthTokenDetailsStorageKey))&&this.logoutAuthSession(),this.authenticationInterceptor.removeAuthorization(),this.setCredentials(),this.resetDialog(),this.userLoggedIn=!1,this.userLoggedIn$.next(!1),re(!0)}twoFactorAccessTokenIsValid(){let e=JSON.parse(this.storage.getItem(this.twoFactorAuthenticationTokenStorageKey));return e?new Date().getTime(){this.onOTPValidateSuccess(o)}))}onOTPValidateSuccess(e){this.authenticationInterceptor.setTwoFactorAccessToken(e.token),this.credentials.shouldRenewPassword?this.alertService.alert({type:"Password Expired",message:"Your password has expired, please reset your password!"}):(this.setCredentials(this.credentials),this.alertService.alert({type:"Authentication Success",message:`${this.credentials.username} successfully logged in!`}),delete this.credentials,this.storage.setItem(this.twoFactorAuthenticationTokenStorageKey,JSON.stringify(e)))}resetPassword(e){return this.http.put(`/users/${this.credentials.userId}`,e).pipe(me(()=>{this.alertService.alert({type:"Password Reset Success",message:"Your password was sucessfully reset!"}),this.authenticationInterceptor.removeAuthorization(),this.authenticationInterceptor.removeTwoFactorAuthorization();let n={username:this.credentials.username,password:e.password,remember:this.rememberMe};this.login(n).subscribe()}))}getUserLoggedIn(){return this.userLoggedIn}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275prov=R({token:t,factory:t.\u0275fac})}}return t})();var Ps=(()=>{class t{constructor(){this.templateRef=d(tt),this.viewContainer=d(dt),this.authenticationService=d(Zm);let e=this.authenticationService.getCredentials();this.userPermissions=e.permissions}set mifosxHasPermission(e){if(typeof e!="string")throw new Error("hasPermission value must be a string");this.viewContainer.clear(),this.hasPermission(e)&&this.viewContainer.createEmbeddedView(this.templateRef)}hasPermission(e){return e=e.trim(),this.userPermissions.includes("ALL_FUNCTIONS")?!0:e!==""?e.substring(0,5)==="READ_"&&this.userPermissions.includes("ALL_FUNCTIONS_READ")?!0:!!this.userPermissions.includes(e):!1}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275dir=z({type:t,selectors:[["","mifosxHasPermission",""]],inputs:{mifosxHasPermission:"mifosxHasPermission"}})}}return t})();var CS=(()=>{class t{_renderer;_elementRef;onChange=e=>{};onTouched=()=>{};constructor(e,n){this._renderer=e,this._elementRef=n}setProperty(e,n){this._renderer.setProperty(this._elementRef.nativeElement,e,n)}registerOnTouched(e){this.onTouched=e}registerOnChange(e){this.onChange=e}setDisabledState(e){this.setProperty("disabled",e)}static \u0275fac=function(n){return new(n||t)(Ce(Ke),Ce(Q))};static \u0275dir=z({type:t})}return t})(),xS=(()=>{class t extends CS{static \u0275fac=(()=>{let e;return function(o){return(e||(e=Ie(t)))(o||t)}})();static \u0275dir=z({type:t,features:[ce]})}return t})(),di=new L("");var AY={provide:di,useExisting:kt(()=>yi),multi:!0};function zY(){let t=Oo()?Oo().getUserAgent():"";return/android (\d+)/.test(t.toLowerCase())}var RY=new L(""),yi=(()=>{class t extends CS{_compositionMode;_composing=!1;constructor(e,n,o){super(e,n),this._compositionMode=o,this._compositionMode==null&&(this._compositionMode=!zY())}writeValue(e){let n=e??"";this.setProperty("value",n)}_handleInput(e){(!this._compositionMode||this._compositionMode&&!this._composing)&&this.onChange(e)}_compositionStart(){this._composing=!0}_compositionEnd(e){this._composing=!1,this._compositionMode&&this.onChange(e)}static \u0275fac=function(n){return new(n||t)(Ce(Ke),Ce(Q),Ce(RY,8))};static \u0275dir=z({type:t,selectors:[["input","formControlName","",3,"type","checkbox"],["textarea","formControlName",""],["input","formControl","",3,"type","checkbox"],["textarea","formControl",""],["input","ngModel","",3,"type","checkbox"],["textarea","ngModel",""],["","ngDefaultControl",""]],hostBindings:function(n,o){n&1&&N("input",function(a){return o._handleInput(a.target.value)})("blur",function(){return o.onTouched()})("compositionstart",function(){return o._compositionStart()})("compositionend",function(a){return o._compositionEnd(a.target.value)})},standalone:!1,features:[de([AY]),ce]})}return t})();function A7(t){return t==null||z7(t)===0}function z7(t){return t==null?null:Array.isArray(t)||typeof t=="string"?t.length:t instanceof Set?t.size:null}var Ci=new L(""),Yc=new L(""),NY=/^(?=.{1,254}$)(?=.{1,64}@)[a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+)*@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/,en=class{static min(i){return MS(i)}static max(i){return wS(i)}static required(i){return DS(i)}static requiredTrue(i){return FY(i)}static email(i){return VY(i)}static minLength(i){return SS(i)}static maxLength(i){return kS(i)}static pattern(i){return BY(i)}static nullValidator(i){return ep()}static compose(i){return LS(i)}static composeAsync(i){return AS(i)}};function MS(t){return i=>{if(i.value==null||t==null)return null;let e=parseFloat(i.value);return!isNaN(e)&&e{if(i.value==null||t==null)return null;let e=parseFloat(i.value);return!isNaN(e)&&e>t?{max:{max:t,actual:i.value}}:null}}function DS(t){return A7(t.value)?{required:!0}:null}function FY(t){return t.value===!0?null:{required:!0}}function VY(t){return A7(t.value)||NY.test(t.value)?null:{email:!0}}function SS(t){return i=>{let e=i.value?.length??z7(i.value);return e===null||e===0?null:e{let e=i.value?.length??z7(i.value);return e!==null&&e>t?{maxlength:{requiredLength:t,actualLength:e}}:null}}function BY(t){if(!t)return ep;let i,e;return typeof t=="string"?(e="",t.charAt(0)!=="^"&&(e+="^"),e+=t,t.charAt(t.length-1)!=="$"&&(e+="$"),i=new RegExp(e)):(e=t.toString(),i=t),n=>{if(A7(n.value))return null;let o=n.value;return i.test(o)?null:{pattern:{requiredPattern:e,actualValue:o}}}}function ep(t){return null}function ES(t){return t!=null}function IS(t){return Ha(t)?tn(t):t}function OS(t){let i={};return t.forEach(e=>{i=e!=null?q(q({},i),e):i}),Object.keys(i).length===0?null:i}function TS(t,i){return i.map(e=>e(t))}function jY(t){return!t.validate}function PS(t){return t.map(i=>jY(i)?i:e=>i.validate(e))}function LS(t){if(!t)return null;let i=t.filter(ES);return i.length==0?null:function(e){return OS(TS(e,i))}}function R7(t){return t!=null?LS(PS(t)):null}function AS(t){if(!t)return null;let i=t.filter(ES);return i.length==0?null:function(e){let n=TS(e,i).map(IS);return Oa(n).pipe(me(OS))}}function N7(t){return t!=null?AS(PS(t)):null}function fS(t,i){return t===null?[i]:Array.isArray(t)?[...t,i]:[t,i]}function zS(t){return t._rawValidators}function RS(t){return t._rawAsyncValidators}function T7(t){return t?Array.isArray(t)?t:[t]:[]}function tp(t,i){return Array.isArray(t)?t.includes(i):t===i}function hS(t,i){let e=T7(i);return T7(t).forEach(o=>{tp(e,o)||e.push(o)}),e}function gS(t,i){return T7(i).filter(e=>!tp(t,e))}var np=class{get value(){return this.control?this.control.value:null}get valid(){return this.control?this.control.valid:null}get invalid(){return this.control?this.control.invalid:null}get pending(){return this.control?this.control.pending:null}get disabled(){return this.control?this.control.disabled:null}get enabled(){return this.control?this.control.enabled:null}get errors(){return this.control?this.control.errors:null}get pristine(){return this.control?this.control.pristine:null}get dirty(){return this.control?this.control.dirty:null}get touched(){return this.control?this.control.touched:null}get status(){return this.control?this.control.status:null}get untouched(){return this.control?this.control.untouched:null}get statusChanges(){return this.control?this.control.statusChanges:null}get valueChanges(){return this.control?this.control.valueChanges:null}get path(){return null}_composedValidatorFn;_composedAsyncValidatorFn;_rawValidators=[];_rawAsyncValidators=[];_setValidators(i){this._rawValidators=i||[],this._composedValidatorFn=R7(this._rawValidators)}_setAsyncValidators(i){this._rawAsyncValidators=i||[],this._composedAsyncValidatorFn=N7(this._rawAsyncValidators)}get validator(){return this._composedValidatorFn||null}get asyncValidator(){return this._composedAsyncValidatorFn||null}_onDestroyCallbacks=[];_registerOnDestroy(i){this._onDestroyCallbacks.push(i)}_invokeOnDestroyCallbacks(){this._onDestroyCallbacks.forEach(i=>i()),this._onDestroyCallbacks=[]}reset(i=void 0){this.control&&this.control.reset(i)}hasError(i,e){return this.control?this.control.hasError(i,e):!1}getError(i,e){return this.control?this.control.getError(i,e):null}},vi=class extends np{name;get formDirective(){return null}get path(){return null}},ei=class extends np{_parent=null;name=null;valueAccessor=null},ip=class{_cd;constructor(i){this._cd=i}get isTouched(){return this._cd?.control?._touched?.(),!!this._cd?.control?.touched}get isUntouched(){return!!this._cd?.control?.untouched}get isPristine(){return this._cd?.control?._pristine?.(),!!this._cd?.control?.pristine}get isDirty(){return!!this._cd?.control?.dirty}get isValid(){return this._cd?.control?._status?.(),!!this._cd?.control?.valid}get isInvalid(){return!!this._cd?.control?.invalid}get isPending(){return!!this._cd?.control?.pending}get isSubmitted(){return this._cd?._submitted?.(),!!this._cd?.submitted}},HY={"[class.ng-untouched]":"isUntouched","[class.ng-touched]":"isTouched","[class.ng-pristine]":"isPristine","[class.ng-dirty]":"isDirty","[class.ng-valid]":"isValid","[class.ng-invalid]":"isInvalid","[class.ng-pending]":"isPending"},ICe=Ne(q({},HY),{"[class.ng-submitted]":"isSubmitted"}),mn=(()=>{class t extends ip{constructor(e){super(e)}static \u0275fac=function(n){return new(n||t)(Ce(ei,2))};static \u0275dir=z({type:t,selectors:[["","formControlName",""],["","ngModel",""],["","formControl",""]],hostVars:14,hostBindings:function(n,o){n&2&&oe("ng-untouched",o.isUntouched)("ng-touched",o.isTouched)("ng-pristine",o.isPristine)("ng-dirty",o.isDirty)("ng-valid",o.isValid)("ng-invalid",o.isInvalid)("ng-pending",o.isPending)},standalone:!1,features:[ce]})}return t})(),tr=(()=>{class t extends ip{constructor(e){super(e)}static \u0275fac=function(n){return new(n||t)(Ce(vi,10))};static \u0275dir=z({type:t,selectors:[["","formGroupName",""],["","formArrayName",""],["","ngModelGroup",""],["","formGroup",""],["form",3,"ngNoForm",""],["","ngForm",""]],hostVars:16,hostBindings:function(n,o){n&2&&oe("ng-untouched",o.isUntouched)("ng-touched",o.isTouched)("ng-pristine",o.isPristine)("ng-dirty",o.isDirty)("ng-valid",o.isValid)("ng-invalid",o.isInvalid)("ng-pending",o.isPending)("ng-submitted",o.isSubmitted)},standalone:!1,features:[ce]})}return t})();var m0="VALID",Jm="INVALID",F1="PENDING",p0="DISABLED",As=class{},op=class extends As{value;source;constructor(i,e){super(),this.value=i,this.source=e}},h0=class extends As{pristine;source;constructor(i,e){super(),this.pristine=i,this.source=e}},g0=class extends As{touched;source;constructor(i,e){super(),this.touched=i,this.source=e}},V1=class extends As{status;source;constructor(i,e){super(),this.status=i,this.source=e}},rp=class extends As{source;constructor(i){super(),this.source=i}},_0=class extends As{source;constructor(i){super(),this.source=i}};function F7(t){return(lp(t)?t.validators:t)||null}function UY(t){return Array.isArray(t)?R7(t):t||null}function V7(t,i){return(lp(i)?i.asyncValidators:t)||null}function $Y(t){return Array.isArray(t)?N7(t):t||null}function lp(t){return t!=null&&!Array.isArray(t)&&typeof t=="object"}function NS(t,i,e){let n=t.controls;if(!(i?Object.keys(n):n).length)throw new pe(1e3,"");if(!n[e])throw new pe(1001,"")}function FS(t,i,e){t._forEachChild((n,o)=>{if(e[o]===void 0)throw new pe(1002,"")})}var B1=class{_pendingDirty=!1;_hasOwnPendingAsyncValidator=null;_pendingTouched=!1;_onCollectionChange=()=>{};_updateOn;_parent=null;_asyncValidationSubscription;_composedValidatorFn;_composedAsyncValidatorFn;_rawValidators;_rawAsyncValidators;value;constructor(i,e){this._assignValidators(i),this._assignAsyncValidators(e)}get validator(){return this._composedValidatorFn}set validator(i){this._rawValidators=this._composedValidatorFn=i}get asyncValidator(){return this._composedAsyncValidatorFn}set asyncValidator(i){this._rawAsyncValidators=this._composedAsyncValidatorFn=i}get parent(){return this._parent}get status(){return Vn(this.statusReactive)}set status(i){Vn(()=>this.statusReactive.set(i))}_status=Zn(()=>this.statusReactive());statusReactive=we(void 0);get valid(){return this.status===m0}get invalid(){return this.status===Jm}get pending(){return this.status==F1}get disabled(){return this.status===p0}get enabled(){return this.status!==p0}errors;get pristine(){return Vn(this.pristineReactive)}set pristine(i){Vn(()=>this.pristineReactive.set(i))}_pristine=Zn(()=>this.pristineReactive());pristineReactive=we(!0);get dirty(){return!this.pristine}get touched(){return Vn(this.touchedReactive)}set touched(i){Vn(()=>this.touchedReactive.set(i))}_touched=Zn(()=>this.touchedReactive());touchedReactive=we(!1);get untouched(){return!this.touched}_events=new B;events=this._events.asObservable();valueChanges;statusChanges;get updateOn(){return this._updateOn?this._updateOn:this.parent?this.parent.updateOn:"change"}setValidators(i){this._assignValidators(i)}setAsyncValidators(i){this._assignAsyncValidators(i)}addValidators(i){this.setValidators(hS(i,this._rawValidators))}addAsyncValidators(i){this.setAsyncValidators(hS(i,this._rawAsyncValidators))}removeValidators(i){this.setValidators(gS(i,this._rawValidators))}removeAsyncValidators(i){this.setAsyncValidators(gS(i,this._rawAsyncValidators))}hasValidator(i){return tp(this._rawValidators,i)}hasAsyncValidator(i){return tp(this._rawAsyncValidators,i)}clearValidators(){this.validator=null}clearAsyncValidators(){this.asyncValidator=null}markAsTouched(i={}){let e=this.touched===!1;this.touched=!0;let n=i.sourceControl??this;this._parent&&!i.onlySelf&&this._parent.markAsTouched(Ne(q({},i),{sourceControl:n})),e&&i.emitEvent!==!1&&this._events.next(new g0(!0,n))}markAllAsDirty(i={}){this.markAsDirty({onlySelf:!0,emitEvent:i.emitEvent,sourceControl:this}),this._forEachChild(e=>e.markAllAsDirty(i))}markAllAsTouched(i={}){this.markAsTouched({onlySelf:!0,emitEvent:i.emitEvent,sourceControl:this}),this._forEachChild(e=>e.markAllAsTouched(i))}markAsUntouched(i={}){let e=this.touched===!0;this.touched=!1,this._pendingTouched=!1;let n=i.sourceControl??this;this._forEachChild(o=>{o.markAsUntouched({onlySelf:!0,emitEvent:i.emitEvent,sourceControl:n})}),this._parent&&!i.onlySelf&&this._parent._updateTouched(i,n),e&&i.emitEvent!==!1&&this._events.next(new g0(!1,n))}markAsDirty(i={}){let e=this.pristine===!0;this.pristine=!1;let n=i.sourceControl??this;this._parent&&!i.onlySelf&&this._parent.markAsDirty(Ne(q({},i),{sourceControl:n})),e&&i.emitEvent!==!1&&this._events.next(new h0(!1,n))}markAsPristine(i={}){let e=this.pristine===!1;this.pristine=!0,this._pendingDirty=!1;let n=i.sourceControl??this;this._forEachChild(o=>{o.markAsPristine({onlySelf:!0,emitEvent:i.emitEvent})}),this._parent&&!i.onlySelf&&this._parent._updatePristine(i,n),e&&i.emitEvent!==!1&&this._events.next(new h0(!0,n))}markAsPending(i={}){this.status=F1;let e=i.sourceControl??this;i.emitEvent!==!1&&(this._events.next(new V1(this.status,e)),this.statusChanges.emit(this.status)),this._parent&&!i.onlySelf&&this._parent.markAsPending(Ne(q({},i),{sourceControl:e}))}disable(i={}){let e=this._parentMarkedDirty(i.onlySelf);this.status=p0,this.errors=null,this._forEachChild(o=>{o.disable(Ne(q({},i),{onlySelf:!0}))}),this._updateValue();let n=i.sourceControl??this;i.emitEvent!==!1&&(this._events.next(new op(this.value,n)),this._events.next(new V1(this.status,n)),this.valueChanges.emit(this.value),this.statusChanges.emit(this.status)),this._updateAncestors(Ne(q({},i),{skipPristineCheck:e}),this),this._onDisabledChange.forEach(o=>o(!0))}enable(i={}){let e=this._parentMarkedDirty(i.onlySelf);this.status=m0,this._forEachChild(n=>{n.enable(Ne(q({},i),{onlySelf:!0}))}),this.updateValueAndValidity({onlySelf:!0,emitEvent:i.emitEvent}),this._updateAncestors(Ne(q({},i),{skipPristineCheck:e}),this),this._onDisabledChange.forEach(n=>n(!1))}_updateAncestors(i,e){this._parent&&!i.onlySelf&&(this._parent.updateValueAndValidity(i),i.skipPristineCheck||this._parent._updatePristine({},e),this._parent._updateTouched({},e))}setParent(i){this._parent=i}getRawValue(){return this.value}updateValueAndValidity(i={}){if(this._setInitialStatus(),this._updateValue(),this.enabled){let n=this._cancelExistingSubscription();this.errors=this._runValidator(),this.status=this._calculateStatus(),(this.status===m0||this.status===F1)&&this._runAsyncValidator(n,i.emitEvent)}let e=i.sourceControl??this;i.emitEvent!==!1&&(this._events.next(new op(this.value,e)),this._events.next(new V1(this.status,e)),this.valueChanges.emit(this.value),this.statusChanges.emit(this.status)),this._parent&&!i.onlySelf&&this._parent.updateValueAndValidity(Ne(q({},i),{sourceControl:e}))}_updateTreeValidity(i={emitEvent:!0}){this._forEachChild(e=>e._updateTreeValidity(i)),this.updateValueAndValidity({onlySelf:!0,emitEvent:i.emitEvent})}_setInitialStatus(){this.status=this._allControlsDisabled()?p0:m0}_runValidator(){return this.validator?this.validator(this):null}_runAsyncValidator(i,e){if(this.asyncValidator){this.status=F1,this._hasOwnPendingAsyncValidator={emitEvent:e!==!1,shouldHaveEmitted:i!==!1};let n=IS(this.asyncValidator(this));this._asyncValidationSubscription=n.subscribe(o=>{this._hasOwnPendingAsyncValidator=null,this.setErrors(o,{emitEvent:e,shouldHaveEmitted:i})})}}_cancelExistingSubscription(){if(this._asyncValidationSubscription){this._asyncValidationSubscription.unsubscribe();let i=(this._hasOwnPendingAsyncValidator?.emitEvent||this._hasOwnPendingAsyncValidator?.shouldHaveEmitted)??!1;return this._hasOwnPendingAsyncValidator=null,i}return!1}setErrors(i,e={}){this.errors=i,this._updateControlsErrors(e.emitEvent!==!1,this,e.shouldHaveEmitted)}get(i){let e=i;return e==null||(Array.isArray(e)||(e=e.split(".")),e.length===0)?null:e.reduce((n,o)=>n&&n._find(o),this)}getError(i,e){let n=e?this.get(e):this;return n&&n.errors?n.errors[i]:null}hasError(i,e){return!!this.getError(i,e)}get root(){let i=this;for(;i._parent;)i=i._parent;return i}_updateControlsErrors(i,e,n){this.status=this._calculateStatus(),i&&this.statusChanges.emit(this.status),(i||n)&&this._events.next(new V1(this.status,e)),this._parent&&this._parent._updateControlsErrors(i,e,n)}_initObservables(){this.valueChanges=new j,this.statusChanges=new j}_calculateStatus(){return this._allControlsDisabled()?p0:this.errors?Jm:this._hasOwnPendingAsyncValidator||this._anyControlsHaveStatus(F1)?F1:this._anyControlsHaveStatus(Jm)?Jm:m0}_anyControlsHaveStatus(i){return this._anyControls(e=>e.status===i)}_anyControlsDirty(){return this._anyControls(i=>i.dirty)}_anyControlsTouched(){return this._anyControls(i=>i.touched)}_updatePristine(i,e){let n=!this._anyControlsDirty(),o=this.pristine!==n;this.pristine=n,this._parent&&!i.onlySelf&&this._parent._updatePristine(i,e),o&&this._events.next(new h0(this.pristine,e))}_updateTouched(i={},e){this.touched=this._anyControlsTouched(),this._events.next(new g0(this.touched,e)),this._parent&&!i.onlySelf&&this._parent._updateTouched(i,e)}_onDisabledChange=[];_registerOnCollectionChange(i){this._onCollectionChange=i}_setUpdateStrategy(i){lp(i)&&i.updateOn!=null&&(this._updateOn=i.updateOn)}_parentMarkedDirty(i){let e=this._parent&&this._parent.dirty;return!i&&!!e&&!this._parent._anyControlsDirty()}_find(i){return null}_assignValidators(i){this._rawValidators=Array.isArray(i)?i.slice():i,this._composedValidatorFn=UY(this._rawValidators)}_assignAsyncValidators(i){this._rawAsyncValidators=Array.isArray(i)?i.slice():i,this._composedAsyncValidatorFn=$Y(this._rawAsyncValidators)}},qc=class extends B1{constructor(i,e,n){super(F7(e),V7(n,e)),this.controls=i,this._initObservables(),this._setUpdateStrategy(e),this._setUpControls(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!!this.asyncValidator})}controls;registerControl(i,e){return this.controls[i]?this.controls[i]:(this.controls[i]=e,e.setParent(this),e._registerOnCollectionChange(this._onCollectionChange),e)}addControl(i,e,n={}){this.registerControl(i,e),this.updateValueAndValidity({emitEvent:n.emitEvent}),this._onCollectionChange()}removeControl(i,e={}){this.controls[i]&&this.controls[i]._registerOnCollectionChange(()=>{}),delete this.controls[i],this.updateValueAndValidity({emitEvent:e.emitEvent}),this._onCollectionChange()}setControl(i,e,n={}){this.controls[i]&&this.controls[i]._registerOnCollectionChange(()=>{}),delete this.controls[i],e&&this.registerControl(i,e),this.updateValueAndValidity({emitEvent:n.emitEvent}),this._onCollectionChange()}contains(i){return this.controls.hasOwnProperty(i)&&this.controls[i].enabled}setValue(i,e={}){FS(this,!0,i),Object.keys(i).forEach(n=>{NS(this,!0,n),this.controls[n].setValue(i[n],{onlySelf:!0,emitEvent:e.emitEvent})}),this.updateValueAndValidity(e)}patchValue(i,e={}){i!=null&&(Object.keys(i).forEach(n=>{let o=this.controls[n];o&&o.patchValue(i[n],{onlySelf:!0,emitEvent:e.emitEvent})}),this.updateValueAndValidity(e))}reset(i={},e={}){this._forEachChild((n,o)=>{n.reset(i?i[o]:null,{onlySelf:!0,emitEvent:e.emitEvent})}),this._updatePristine(e,this),this._updateTouched(e,this),this.updateValueAndValidity(e),e?.emitEvent!==!1&&this._events.next(new _0(this))}getRawValue(){return this._reduceChildren({},(i,e,n)=>(i[n]=e.getRawValue(),i))}_syncPendingControls(){let i=this._reduceChildren(!1,(e,n)=>n._syncPendingControls()?!0:e);return i&&this.updateValueAndValidity({onlySelf:!0}),i}_forEachChild(i){Object.keys(this.controls).forEach(e=>{let n=this.controls[e];n&&i(n,e)})}_setUpControls(){this._forEachChild(i=>{i.setParent(this),i._registerOnCollectionChange(this._onCollectionChange)})}_updateValue(){this.value=this._reduceValue()}_anyControls(i){for(let[e,n]of Object.entries(this.controls))if(this.contains(e)&&i(n))return!0;return!1}_reduceValue(){let i={};return this._reduceChildren(i,(e,n,o)=>((n.enabled||this.disabled)&&(e[o]=n.value),e))}_reduceChildren(i,e){let n=i;return this._forEachChild((o,r)=>{n=e(n,o,r)}),n}_allControlsDisabled(){for(let i of Object.keys(this.controls))if(this.controls[i].enabled)return!1;return Object.keys(this.controls).length>0||this.disabled}_find(i){return this.controls.hasOwnProperty(i)?this.controls[i]:null}};var VS=qc;var P7=class extends qc{};var j1=new L("",{providedIn:"root",factory:()=>dp}),dp="always";function up(t,i){return[...i.path,t]}function b0(t,i,e=dp){B7(t,i),i.valueAccessor.writeValue(t.value),(t.disabled||e==="always")&&i.valueAccessor.setDisabledState?.(t.disabled),WY(t,i),YY(t,i),qY(t,i),GY(t,i)}function ap(t,i,e=!0){let n=()=>{};i.valueAccessor&&(i.valueAccessor.registerOnChange(n),i.valueAccessor.registerOnTouched(n)),cp(t,i),t&&(i._invokeOnDestroyCallbacks(),t._registerOnCollectionChange(()=>{}))}function sp(t,i){t.forEach(e=>{e.registerOnValidatorChange&&e.registerOnValidatorChange(i)})}function GY(t,i){if(i.valueAccessor.setDisabledState){let e=n=>{i.valueAccessor.setDisabledState(n)};t.registerOnDisabledChange(e),i._registerOnDestroy(()=>{t._unregisterOnDisabledChange(e)})}}function B7(t,i){let e=zS(t);i.validator!==null?t.setValidators(fS(e,i.validator)):typeof e=="function"&&t.setValidators([e]);let n=RS(t);i.asyncValidator!==null?t.setAsyncValidators(fS(n,i.asyncValidator)):typeof n=="function"&&t.setAsyncValidators([n]);let o=()=>t.updateValueAndValidity();sp(i._rawValidators,o),sp(i._rawAsyncValidators,o)}function cp(t,i){let e=!1;if(t!==null){if(i.validator!==null){let o=zS(t);if(Array.isArray(o)&&o.length>0){let r=o.filter(a=>a!==i.validator);r.length!==o.length&&(e=!0,t.setValidators(r))}}if(i.asyncValidator!==null){let o=RS(t);if(Array.isArray(o)&&o.length>0){let r=o.filter(a=>a!==i.asyncValidator);r.length!==o.length&&(e=!0,t.setAsyncValidators(r))}}}let n=()=>{};return sp(i._rawValidators,n),sp(i._rawAsyncValidators,n),e}function WY(t,i){i.valueAccessor.registerOnChange(e=>{t._pendingValue=e,t._pendingChange=!0,t._pendingDirty=!0,t.updateOn==="change"&&BS(t,i)})}function qY(t,i){i.valueAccessor.registerOnTouched(()=>{t._pendingTouched=!0,t.updateOn==="blur"&&t._pendingChange&&BS(t,i),t.updateOn!=="submit"&&t.markAsTouched()})}function BS(t,i){t._pendingDirty&&t.markAsDirty(),t.setValue(t._pendingValue,{emitModelToViewChange:!1}),i.viewToModelUpdate(t._pendingValue),t._pendingChange=!1}function YY(t,i){let e=(n,o)=>{i.valueAccessor.writeValue(n),o&&i.viewToModelUpdate(n)};t.registerOnChange(e),i._registerOnDestroy(()=>{t._unregisterOnChange(e)})}function jS(t,i){t==null,B7(t,i)}function QY(t,i){return cp(t,i)}function j7(t,i){if(!t.hasOwnProperty("model"))return!1;let e=t.model;return e.isFirstChange()?!0:!Object.is(i,e.currentValue)}function KY(t){return Object.getPrototypeOf(t.constructor)===xS}function HS(t,i){t._syncPendingControls(),i.forEach(e=>{let n=e.control;n.updateOn==="submit"&&n._pendingChange&&(e.viewToModelUpdate(n._pendingValue),n._pendingChange=!1)})}function H7(t,i){if(!i)return null;Array.isArray(i);let e,n,o;return i.forEach(r=>{r.constructor===yi?e=r:KY(r)?n=r:o=r}),o||n||e||null}function XY(t,i){let e=t.indexOf(i);e>-1&&t.splice(e,1)}var ZY={provide:vi,useExisting:kt(()=>H1)},f0=Promise.resolve(),H1=(()=>{class t extends vi{callSetDisabledState;get submitted(){return Vn(this.submittedReactive)}_submitted=Zn(()=>this.submittedReactive());submittedReactive=we(!1);_directives=new Set;form;ngSubmit=new j;options;constructor(e,n,o){super(),this.callSetDisabledState=o,this.form=new qc({},R7(e),N7(n))}ngAfterViewInit(){this._setUpdateStrategy()}get formDirective(){return this}get control(){return this.form}get path(){return[]}get controls(){return this.form.controls}addControl(e){f0.then(()=>{let n=this._findContainer(e.path);e.control=n.registerControl(e.name,e.control),b0(e.control,e,this.callSetDisabledState),e.control.updateValueAndValidity({emitEvent:!1}),this._directives.add(e)})}getControl(e){return this.form.get(e.path)}removeControl(e){f0.then(()=>{let n=this._findContainer(e.path);n&&n.removeControl(e.name),this._directives.delete(e)})}addFormGroup(e){f0.then(()=>{let n=this._findContainer(e.path),o=new qc({});jS(o,e),n.registerControl(e.name,o),o.updateValueAndValidity({emitEvent:!1})})}removeFormGroup(e){f0.then(()=>{let n=this._findContainer(e.path);n&&n.removeControl(e.name)})}getFormGroup(e){return this.form.get(e.path)}updateModel(e,n){f0.then(()=>{this.form.get(e.path).setValue(n)})}setValue(e){this.control.setValue(e)}onSubmit(e){return this.submittedReactive.set(!0),HS(this.form,this._directives),this.ngSubmit.emit(e),this.form._events.next(new rp(this.control)),e?.target?.method==="dialog"}onReset(){this.resetForm()}resetForm(e=void 0){this.form.reset(e),this.submittedReactive.set(!1)}_setUpdateStrategy(){this.options&&this.options.updateOn!=null&&(this.form._updateOn=this.options.updateOn)}_findContainer(e){return e.pop(),e.length?this.form.get(e):this.form}static \u0275fac=function(n){return new(n||t)(Ce(Ci,10),Ce(Yc,10),Ce(j1,8))};static \u0275dir=z({type:t,selectors:[["form",3,"ngNoForm","",3,"formGroup",""],["ng-form"],["","ngForm",""]],hostBindings:function(n,o){n&1&&N("submit",function(a){return o.onSubmit(a)})("reset",function(){return o.onReset()})},inputs:{options:[0,"ngFormOptions","options"]},outputs:{ngSubmit:"ngSubmit"},exportAs:["ngForm"],standalone:!1,features:[de([ZY]),ce]})}return t})();function _S(t,i){let e=t.indexOf(i);e>-1&&t.splice(e,1)}function bS(t){return typeof t=="object"&&t!==null&&Object.keys(t).length===2&&"value"in t&&"disabled"in t}var Ls=class extends B1{defaultValue=null;_onChange=[];_pendingValue;_pendingChange=!1;constructor(i=null,e,n){super(F7(e),V7(n,e)),this._applyFormState(i),this._setUpdateStrategy(e),this._initObservables(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!!this.asyncValidator}),lp(e)&&(e.nonNullable||e.initialValueIsDefault)&&(bS(i)?this.defaultValue=i.value:this.defaultValue=i)}setValue(i,e={}){this.value=this._pendingValue=i,this._onChange.length&&e.emitModelToViewChange!==!1&&this._onChange.forEach(n=>n(this.value,e.emitViewToModelChange!==!1)),this.updateValueAndValidity(e)}patchValue(i,e={}){this.setValue(i,e)}reset(i=this.defaultValue,e={}){this._applyFormState(i),this.markAsPristine(e),this.markAsUntouched(e),this.setValue(this.value,e),this._pendingChange=!1,e?.emitEvent!==!1&&this._events.next(new _0(this))}_updateValue(){}_anyControls(i){return!1}_allControlsDisabled(){return this.disabled}registerOnChange(i){this._onChange.push(i)}_unregisterOnChange(i){_S(this._onChange,i)}registerOnDisabledChange(i){this._onDisabledChange.push(i)}_unregisterOnDisabledChange(i){_S(this._onDisabledChange,i)}_forEachChild(i){}_syncPendingControls(){return this.updateOn==="submit"&&(this._pendingDirty&&this.markAsDirty(),this._pendingTouched&&this.markAsTouched(),this._pendingChange)?(this.setValue(this._pendingValue,{onlySelf:!0,emitModelToViewChange:!1}),!0):!1}_applyFormState(i){bS(i)?(this.value=this._pendingValue=i.value,i.disabled?this.disable({onlySelf:!0,emitEvent:!1}):this.enable({onlySelf:!0,emitEvent:!1})):this.value=this._pendingValue=i}},Hi=Ls,JY=t=>t instanceof Ls,eQ=(()=>{class t extends vi{_parent;ngOnInit(){this._checkParentType(),this.formDirective.addFormGroup(this)}ngOnDestroy(){this.formDirective&&this.formDirective.removeFormGroup(this)}get control(){return this.formDirective.getFormGroup(this)}get path(){return up(this.name==null?this.name:this.name.toString(),this._parent)}get formDirective(){return this._parent?this._parent.formDirective:null}_checkParentType(){}static \u0275fac=(()=>{let e;return function(o){return(e||(e=Ie(t)))(o||t)}})();static \u0275dir=z({type:t,standalone:!1,features:[ce]})}return t})();var tQ={provide:ei,useExisting:kt(()=>nQ)},vS=Promise.resolve(),nQ=(()=>{class t extends ei{_changeDetectorRef;callSetDisabledState;control=new Ls;static ngAcceptInputType_isDisabled;_registered=!1;viewModel;name="";isDisabled;model;options;update=new j;constructor(e,n,o,r,a,s){super(),this._changeDetectorRef=a,this.callSetDisabledState=s,this._parent=e,this._setValidators(n),this._setAsyncValidators(o),this.valueAccessor=H7(this,r)}ngOnChanges(e){if(this._checkForErrors(),!this._registered||"name"in e){if(this._registered&&(this._checkName(),this.formDirective)){let n=e.name.previousValue;this.formDirective.removeControl({name:n,path:this._getPath(n)})}this._setUpControl()}"isDisabled"in e&&this._updateDisabled(e),j7(e,this.viewModel)&&(this._updateValue(this.model),this.viewModel=this.model)}ngOnDestroy(){this.formDirective&&this.formDirective.removeControl(this)}get path(){return this._getPath(this.name)}get formDirective(){return this._parent?this._parent.formDirective:null}viewToModelUpdate(e){this.viewModel=e,this.update.emit(e)}_setUpControl(){this._setUpdateStrategy(),this._isStandalone()?this._setUpStandalone():this.formDirective.addControl(this),this._registered=!0}_setUpdateStrategy(){this.options&&this.options.updateOn!=null&&(this.control._updateOn=this.options.updateOn)}_isStandalone(){return!this._parent||!!(this.options&&this.options.standalone)}_setUpStandalone(){b0(this.control,this,this.callSetDisabledState),this.control.updateValueAndValidity({emitEvent:!1})}_checkForErrors(){this._checkName()}_checkName(){this.options&&this.options.name&&(this.name=this.options.name),!this._isStandalone()&&this.name}_updateValue(e){vS.then(()=>{this.control.setValue(e,{emitViewToModelChange:!1}),this._changeDetectorRef?.markForCheck()})}_updateDisabled(e){let n=e.isDisabled.currentValue,o=n!==0&&H(n);vS.then(()=>{o&&!this.control.disabled?this.control.disable():!o&&this.control.disabled&&this.control.enable(),this._changeDetectorRef?.markForCheck()})}_getPath(e){return this._parent?up(e,this._parent):[e]}static \u0275fac=function(n){return new(n||t)(Ce(vi,9),Ce(Ci,10),Ce(Yc,10),Ce(di,10),Ce(xe,8),Ce(j1,8))};static \u0275dir=z({type:t,selectors:[["","ngModel","",3,"formControlName","",3,"formControl",""]],inputs:{name:"name",isDisabled:[0,"disabled","isDisabled"],model:[0,"ngModel","model"],options:[0,"ngModelOptions","options"]},outputs:{update:"ngModelChange"},exportAs:["ngModel"],standalone:!1,features:[de([tQ]),ce,Re]})}return t})();var zs=(()=>{class t{static \u0275fac=function(n){return new(n||t)};static \u0275dir=z({type:t,selectors:[["form",3,"ngNoForm","",3,"ngNativeValidate",""]],hostAttrs:["novalidate",""],standalone:!1})}return t})(),iQ={provide:di,useExisting:kt(()=>oQ),multi:!0},oQ=(()=>{class t extends xS{writeValue(e){let n=e??"";this.setProperty("value",n)}registerOnChange(e){this.onChange=n=>{e(n==""?null:parseFloat(n))}}static \u0275fac=(()=>{let e;return function(o){return(e||(e=Ie(t)))(o||t)}})();static \u0275dir=z({type:t,selectors:[["input","type","number","formControlName",""],["input","type","number","formControl",""],["input","type","number","ngModel",""]],hostBindings:function(n,o){n&1&&N("input",function(a){return o.onChange(a.target.value)})("blur",function(){return o.onTouched()})},standalone:!1,features:[de([iQ]),ce]})}return t})();var U7=new L(""),rQ={provide:ei,useExisting:kt(()=>Si)},Si=(()=>{class t extends ei{_ngModelWarningConfig;callSetDisabledState;viewModel;form;set isDisabled(e){}model;update=new j;static _ngModelWarningSentOnce=!1;_ngModelWarningSent=!1;constructor(e,n,o,r,a){super(),this._ngModelWarningConfig=r,this.callSetDisabledState=a,this._setValidators(e),this._setAsyncValidators(n),this.valueAccessor=H7(this,o)}ngOnChanges(e){if(this._isControlChanged(e)){let n=e.form.previousValue;n&&ap(n,this,!1),b0(this.form,this,this.callSetDisabledState),this.form.updateValueAndValidity({emitEvent:!1})}j7(e,this.viewModel)&&(this.form.setValue(this.model),this.viewModel=this.model)}ngOnDestroy(){this.form&&ap(this.form,this,!1)}get path(){return[]}get control(){return this.form}viewToModelUpdate(e){this.viewModel=e,this.update.emit(e)}_isControlChanged(e){return e.hasOwnProperty("form")}static \u0275fac=function(n){return new(n||t)(Ce(Ci,10),Ce(Yc,10),Ce(di,10),Ce(U7,8),Ce(j1,8))};static \u0275dir=z({type:t,selectors:[["","formControl",""]],inputs:{form:[0,"formControl","form"],isDisabled:[0,"disabled","isDisabled"],model:[0,"ngModel","model"]},outputs:{update:"ngModelChange"},exportAs:["ngForm"],standalone:!1,features:[de([rQ]),ce,Re]})}return t})(),aQ={provide:vi,useExisting:kt(()=>ui)},ui=(()=>{class t extends vi{callSetDisabledState;get submitted(){return Vn(this._submittedReactive)}set submitted(e){this._submittedReactive.set(e)}_submitted=Zn(()=>this._submittedReactive());_submittedReactive=we(!1);_oldForm;_onCollectionChange=()=>this._updateDomValue();directives=[];form=null;ngSubmit=new j;constructor(e,n,o){super(),this.callSetDisabledState=o,this._setValidators(e),this._setAsyncValidators(n)}ngOnChanges(e){e.hasOwnProperty("form")&&(this._updateValidators(),this._updateDomValue(),this._updateRegistrations(),this._oldForm=this.form)}ngOnDestroy(){this.form&&(cp(this.form,this),this.form._onCollectionChange===this._onCollectionChange&&this.form._registerOnCollectionChange(()=>{}))}get formDirective(){return this}get control(){return this.form}get path(){return[]}addControl(e){let n=this.form.get(e.path);return b0(n,e,this.callSetDisabledState),n.updateValueAndValidity({emitEvent:!1}),this.directives.push(e),n}getControl(e){return this.form.get(e.path)}removeControl(e){ap(e.control||null,e,!1),XY(this.directives,e)}addFormGroup(e){this._setUpFormContainer(e)}removeFormGroup(e){this._cleanUpFormContainer(e)}getFormGroup(e){return this.form.get(e.path)}addFormArray(e){this._setUpFormContainer(e)}removeFormArray(e){this._cleanUpFormContainer(e)}getFormArray(e){return this.form.get(e.path)}updateModel(e,n){this.form.get(e.path).setValue(n)}onSubmit(e){return this._submittedReactive.set(!0),HS(this.form,this.directives),this.ngSubmit.emit(e),this.form._events.next(new rp(this.control)),e?.target?.method==="dialog"}onReset(){this.resetForm()}resetForm(e=void 0,n={}){this.form.reset(e,n),this._submittedReactive.set(!1)}_updateDomValue(){this.directives.forEach(e=>{let n=e.control,o=this.form.get(e.path);n!==o&&(ap(n||null,e),JY(o)&&(b0(o,e,this.callSetDisabledState),e.control=o))}),this.form._updateTreeValidity({emitEvent:!1})}_setUpFormContainer(e){let n=this.form.get(e.path);jS(n,e),n.updateValueAndValidity({emitEvent:!1})}_cleanUpFormContainer(e){if(this.form){let n=this.form.get(e.path);n&&QY(n,e)&&n.updateValueAndValidity({emitEvent:!1})}}_updateRegistrations(){this.form._registerOnCollectionChange(this._onCollectionChange),this._oldForm&&this._oldForm._registerOnCollectionChange(()=>{})}_updateValidators(){B7(this.form,this),this._oldForm&&cp(this._oldForm,this)}static \u0275fac=function(n){return new(n||t)(Ce(Ci,10),Ce(Yc,10),Ce(j1,8))};static \u0275dir=z({type:t,selectors:[["","formGroup",""]],hostBindings:function(n,o){n&1&&N("submit",function(a){return o.onSubmit(a)})("reset",function(){return o.onReset()})},inputs:{form:[0,"formGroup","form"]},outputs:{ngSubmit:"ngSubmit"},exportAs:["ngForm"],standalone:!1,features:[de([aQ]),ce,Re]})}return t})(),sQ={provide:vi,useExisting:kt(()=>US)},US=(()=>{class t extends eQ{name=null;constructor(e,n,o){super(),this._parent=e,this._setValidators(n),this._setAsyncValidators(o)}_checkParentType(){GS(this._parent)}static \u0275fac=function(n){return new(n||t)(Ce(vi,13),Ce(Ci,10),Ce(Yc,10))};static \u0275dir=z({type:t,selectors:[["","formGroupName",""]],inputs:{name:[0,"formGroupName","name"]},standalone:!1,features:[de([sQ]),ce]})}return t})(),cQ={provide:vi,useExisting:kt(()=>$S)},$S=(()=>{class t extends vi{_parent;name=null;constructor(e,n,o){super(),this._parent=e,this._setValidators(n),this._setAsyncValidators(o)}ngOnInit(){GS(this._parent),this.formDirective.addFormArray(this)}ngOnDestroy(){this.formDirective?.removeFormArray(this)}get control(){return this.formDirective.getFormArray(this)}get formDirective(){return this._parent?this._parent.formDirective:null}get path(){return up(this.name==null?this.name:this.name.toString(),this._parent)}static \u0275fac=function(n){return new(n||t)(Ce(vi,13),Ce(Ci,10),Ce(Yc,10))};static \u0275dir=z({type:t,selectors:[["","formArrayName",""]],inputs:{name:[0,"formArrayName","name"]},standalone:!1,features:[de([cQ]),ce]})}return t})();function GS(t){return!(t instanceof US)&&!(t instanceof ui)&&!(t instanceof $S)}var lQ={provide:ei,useExisting:kt(()=>Ao)},Ao=(()=>{class t extends ei{_ngModelWarningConfig;_added=!1;viewModel;control;name=null;set isDisabled(e){}model;update=new j;static _ngModelWarningSentOnce=!1;_ngModelWarningSent=!1;constructor(e,n,o,r,a){super(),this._ngModelWarningConfig=a,this._parent=e,this._setValidators(n),this._setAsyncValidators(o),this.valueAccessor=H7(this,r)}ngOnChanges(e){this._added||this._setUpControl(),j7(e,this.viewModel)&&(this.viewModel=this.model,this.formDirective.updateModel(this,this.model))}ngOnDestroy(){this.formDirective&&this.formDirective.removeControl(this)}viewToModelUpdate(e){this.viewModel=e,this.update.emit(e)}get path(){return up(this.name==null?this.name:this.name.toString(),this._parent)}get formDirective(){return this._parent?this._parent.formDirective:null}_setUpControl(){this.control=this.formDirective.addControl(this),this._added=!0}static \u0275fac=function(n){return new(n||t)(Ce(vi,13),Ce(Ci,10),Ce(Yc,10),Ce(di,10),Ce(U7,8))};static \u0275dir=z({type:t,selectors:[["","formControlName",""]],inputs:{name:[0,"formControlName","name"],isDisabled:[0,"disabled","isDisabled"],model:[0,"ngModel","model"]},outputs:{update:"ngModelChange"},standalone:!1,features:[de([lQ]),ce,Re]})}return t})();function WS(t){return typeof t=="number"?t:parseInt(t,10)}function qS(t){return typeof t=="number"?t:parseFloat(t)}var v0=(()=>{class t{_validator=ep;_onChange;_enabled;ngOnChanges(e){if(this.inputName in e){let n=this.normalizeInput(e[this.inputName].currentValue);this._enabled=this.enabled(n),this._validator=this._enabled?this.createValidator(n):ep,this._onChange&&this._onChange()}}validate(e){return this._validator(e)}registerOnValidatorChange(e){this._onChange=e}enabled(e){return e!=null}static \u0275fac=function(n){return new(n||t)};static \u0275dir=z({type:t,features:[Re]})}return t})(),dQ={provide:Ci,useExisting:kt(()=>uQ),multi:!0},uQ=(()=>{class t extends v0{max;inputName="max";normalizeInput=e=>qS(e);createValidator=e=>wS(e);static \u0275fac=(()=>{let e;return function(o){return(e||(e=Ie(t)))(o||t)}})();static \u0275dir=z({type:t,selectors:[["input","type","number","max","","formControlName",""],["input","type","number","max","","formControl",""],["input","type","number","max","","ngModel",""]],hostVars:1,hostBindings:function(n,o){n&2&&ne("max",o._enabled?o.max:null)},inputs:{max:"max"},standalone:!1,features:[de([dQ]),ce]})}return t})(),mQ={provide:Ci,useExisting:kt(()=>pQ),multi:!0},pQ=(()=>{class t extends v0{min;inputName="min";normalizeInput=e=>qS(e);createValidator=e=>MS(e);static \u0275fac=(()=>{let e;return function(o){return(e||(e=Ie(t)))(o||t)}})();static \u0275dir=z({type:t,selectors:[["input","type","number","min","","formControlName",""],["input","type","number","min","","formControl",""],["input","type","number","min","","ngModel",""]],hostVars:1,hostBindings:function(n,o){n&2&&ne("min",o._enabled?o.min:null)},inputs:{min:"min"},standalone:!1,features:[de([mQ]),ce]})}return t})(),fQ={provide:Ci,useExisting:kt(()=>Ir),multi:!0};var Ir=(()=>{class t extends v0{required;inputName="required";normalizeInput=H;createValidator=e=>DS;enabled(e){return e}static \u0275fac=(()=>{let e;return function(o){return(e||(e=Ie(t)))(o||t)}})();static \u0275dir=z({type:t,selectors:[["","required","","formControlName","",3,"type","checkbox"],["","required","","formControl","",3,"type","checkbox"],["","required","","ngModel","",3,"type","checkbox"]],hostVars:1,hostBindings:function(n,o){n&2&&ne("required",o._enabled?"":null)},inputs:{required:"required"},standalone:!1,features:[de([fQ]),ce]})}return t})();var hQ={provide:Ci,useExisting:kt(()=>gQ),multi:!0},gQ=(()=>{class t extends v0{minlength;inputName="minlength";normalizeInput=e=>WS(e);createValidator=e=>SS(e);static \u0275fac=(()=>{let e;return function(o){return(e||(e=Ie(t)))(o||t)}})();static \u0275dir=z({type:t,selectors:[["","minlength","","formControlName",""],["","minlength","","formControl",""],["","minlength","","ngModel",""]],hostVars:1,hostBindings:function(n,o){n&2&&ne("minlength",o._enabled?o.minlength:null)},inputs:{minlength:"minlength"},standalone:!1,features:[de([hQ]),ce]})}return t})(),_Q={provide:Ci,useExisting:kt(()=>bQ),multi:!0},bQ=(()=>{class t extends v0{maxlength;inputName="maxlength";normalizeInput=e=>WS(e);createValidator=e=>kS(e);static \u0275fac=(()=>{let e;return function(o){return(e||(e=Ie(t)))(o||t)}})();static \u0275dir=z({type:t,selectors:[["","maxlength","","formControlName",""],["","maxlength","","formControl",""],["","maxlength","","ngModel",""]],hostVars:1,hostBindings:function(n,o){n&2&&ne("maxlength",o._enabled?o.maxlength:null)},inputs:{maxlength:"maxlength"},standalone:!1,features:[de([_Q]),ce]})}return t})();var YS=(()=>{class t{static \u0275fac=function(n){return new(n||t)};static \u0275mod=J({type:t});static \u0275inj=X({})}return t})(),L7=class extends B1{constructor(i,e,n){super(F7(e),V7(n,e)),this.controls=i,this._initObservables(),this._setUpdateStrategy(e),this._setUpControls(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!!this.asyncValidator})}controls;at(i){return this.controls[this._adjustIndex(i)]}push(i,e={}){Array.isArray(i)?i.forEach(n=>{this.controls.push(n),this._registerControl(n)}):(this.controls.push(i),this._registerControl(i)),this.updateValueAndValidity({emitEvent:e.emitEvent}),this._onCollectionChange()}insert(i,e,n={}){this.controls.splice(i,0,e),this._registerControl(e),this.updateValueAndValidity({emitEvent:n.emitEvent})}removeAt(i,e={}){let n=this._adjustIndex(i);n<0&&(n=0),this.controls[n]&&this.controls[n]._registerOnCollectionChange(()=>{}),this.controls.splice(n,1),this.updateValueAndValidity({emitEvent:e.emitEvent})}setControl(i,e,n={}){let o=this._adjustIndex(i);o<0&&(o=0),this.controls[o]&&this.controls[o]._registerOnCollectionChange(()=>{}),this.controls.splice(o,1),e&&(this.controls.splice(o,0,e),this._registerControl(e)),this.updateValueAndValidity({emitEvent:n.emitEvent}),this._onCollectionChange()}get length(){return this.controls.length}setValue(i,e={}){FS(this,!1,i),i.forEach((n,o)=>{NS(this,!1,o),this.at(o).setValue(n,{onlySelf:!0,emitEvent:e.emitEvent})}),this.updateValueAndValidity(e)}patchValue(i,e={}){i!=null&&(i.forEach((n,o)=>{this.at(o)&&this.at(o).patchValue(n,{onlySelf:!0,emitEvent:e.emitEvent})}),this.updateValueAndValidity(e))}reset(i=[],e={}){this._forEachChild((n,o)=>{n.reset(i[o],{onlySelf:!0,emitEvent:e.emitEvent})}),this._updatePristine(e,this),this._updateTouched(e,this),this.updateValueAndValidity(e),e?.emitEvent!==!1&&this._events.next(new _0(this))}getRawValue(){return this.controls.map(i=>i.getRawValue())}clear(i={}){this.controls.length<1||(this._forEachChild(e=>e._registerOnCollectionChange(()=>{})),this.controls.splice(0),this.updateValueAndValidity({emitEvent:i.emitEvent}))}_adjustIndex(i){return i<0?i+this.length:i}_syncPendingControls(){let i=this.controls.reduce((e,n)=>n._syncPendingControls()?!0:e,!1);return i&&this.updateValueAndValidity({onlySelf:!0}),i}_forEachChild(i){this.controls.forEach((e,n)=>{i(e,n)})}_updateValue(){this.value=this.controls.filter(i=>i.enabled||this.disabled).map(i=>i.value)}_anyControls(i){return this.controls.some(e=>e.enabled&&i(e))}_setUpControls(){this._forEachChild(i=>this._registerControl(i))}_allControlsDisabled(){for(let i of this.controls)if(i.enabled)return!1;return this.controls.length>0||this.disabled}_registerControl(i){i.setParent(this),i._registerOnCollectionChange(this._onCollectionChange)}_find(i){return this.at(i)??null}};function yS(t){return!!t&&(t.asyncValidators!==void 0||t.validators!==void 0||t.updateOn!==void 0)}var vQ=(()=>{class t{useNonNullable=!1;get nonNullable(){let e=new t;return e.useNonNullable=!0,e}group(e,n=null){let o=this._reduceControls(e),r={};return yS(n)?r=n:n!==null&&(r.validators=n.validator,r.asyncValidators=n.asyncValidator),new qc(o,r)}record(e,n=null){let o=this._reduceControls(e);return new P7(o,n)}control(e,n,o){let r={};return this.useNonNullable?(yS(n)?r=n:(r.validators=n,r.asyncValidators=o),new Ls(e,Ne(q({},r),{nonNullable:!0}))):new Ls(e,n,o)}array(e,n,o){let r=e.map(a=>this._createControl(a));return new L7(r,n,o)}_reduceControls(e){let n={};return Object.keys(e).forEach(o=>{n[o]=this._createControl(e[o])}),n}_createControl(e){if(e instanceof Ls)return e;if(e instanceof B1)return e;if(Array.isArray(e)){let n=e[0],o=e.length>1?e[1]:null,r=e.length>2?e[2]:null;return this.control(n,o,r)}else return this.control(e)}static \u0275fac=function(n){return new(n||t)};static \u0275prov=R({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();var Rs=(()=>{class t extends vQ{group(e,n=null){return super.group(e,n)}control(e,n,o){return super.control(e,n,o)}array(e,n,o){return super.array(e,n,o)}static \u0275fac=(()=>{let e;return function(o){return(e||(e=Ie(t)))(o||t)}})();static \u0275prov=R({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();var QS=(()=>{class t{static withConfig(e){return{ngModule:t,providers:[{provide:j1,useValue:e.callSetDisabledState??dp}]}}static \u0275fac=function(n){return new(n||t)};static \u0275mod=J({type:t});static \u0275inj=X({imports:[YS]})}return t})(),ve=(()=>{class t{static withConfig(e){return{ngModule:t,providers:[{provide:U7,useValue:e.warnOnNgModelWithFormControl??"always"},{provide:j1,useValue:e.callSetDisabledState??dp}]}}static \u0275fac=function(n){return new(n||t)};static \u0275mod=J({type:t});static \u0275inj=X({imports:[YS]})}return t})();var KS=(()=>{class t{constructor(){this.locale=d(wr),this.el=d(Q),this.control=d(ei),this.format="N0",this.digitsInfo="1.0-0",this.sufix=""}set _(e){let n=e.split(":");this.currencyCode=n[0],this.displaySymbol=n.length>1?n[1]:"$",this.digitsInfo=n.length>2?n[2]:"1.2-2"}blur(e){e.value=this.parse(e.value)}focus(e){typeof this.control.value>"u"?e.value="":e.value=this.control.value}ngOnInit(){setTimeout(()=>{this.el.nativeElement.value=this.parse(this.el.nativeElement.value)})}parse(e){return e==""?""+this.sufix:Om(e,this.locale,this.displaySymbol,this.currencyCode,this.digitsInfo)+this.sufix}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275dir=z({type:t,selectors:[["","mifosxFormatAmount",""]],hostBindings:function(n,o){n&1&&N("blur",function(a){return o.blur(a.target)})("focus",function(a){return o.focus(a.target)})},inputs:{sufix:"sufix",_:[0,"mifosxFormatAmount","_"]}})}}return t})();var $Ce=(()=>{class t{constructor(){this.control=d(ei),this.el=d(Q)}onFocus(){this.control.control?.markAsTouched(),this.control.control?.updateValueAndValidity()}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275dir=z({type:t,selectors:[["","mifosxValidateOnFocus",""]],hostBindings:function(n,o){n&1&&N("focus",function(){return o.onFocus()})}})}}return t})();var XS=(()=>{class t{static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275mod=J({type:t})}static{this.\u0275inj=X({imports:[he]})}}return t})();var nr=class{constructor(i={}){this.controlType=i.controlType||"",this.controlName=i.controlName||"",this.label=i.label||"",this.value=i.value===void 0?"":i.value,this.required=!!i.required,this.order=i.order===void 0?1:i.order,this.validators=i.validators===void 0?[]:i.validators,this.min=i.min===void 0?null:i.min,this.max=i.max===void 0?null:i.max}};function Ya(t){return t.buttons===0||t.detail===0}function Qa(t){let i=t.touches&&t.touches[0]||t.changedTouches&&t.changedTouches[0];return!!i&&i.identifier===-1&&(i.radiusX==null||i.radiusX===1)&&(i.radiusY==null||i.radiusY===1)}var $7;function ZS(){if($7==null){let t=typeof document<"u"?document.head:null;$7=!!(t&&(t.createShadowRoot||t.attachShadow))}return $7}function Qc(t){if(ZS()){let i=t.getRootNode?t.getRootNode():null;if(typeof ShadowRoot<"u"&&ShadowRoot&&i instanceof ShadowRoot)return i}return null}function no(){let t=typeof document<"u"&&document?document.activeElement:null;for(;t&&t.shadowRoot;){let i=t.shadowRoot.activeElement;if(i===t)break;t=i}return t}function jn(t){return t.composedPath?t.composedPath()[0]:t.target}var G7;try{G7=typeof Intl<"u"&&Intl.v8BreakIterator}catch{G7=!1}var je=(()=>{class t{_platformId=d(Bc);isBrowser=this._platformId?DD(this._platformId):typeof document=="object"&&!!document;EDGE=this.isBrowser&&/(edge)/i.test(navigator.userAgent);TRIDENT=this.isBrowser&&/(msie|trident)/i.test(navigator.userAgent);BLINK=this.isBrowser&&!!(window.chrome||G7)&&typeof CSS<"u"&&!this.EDGE&&!this.TRIDENT;WEBKIT=this.isBrowser&&/AppleWebKit/i.test(navigator.userAgent)&&!this.BLINK&&!this.EDGE&&!this.TRIDENT;IOS=this.isBrowser&&/iPad|iPhone|iPod/.test(navigator.userAgent)&&!("MSStream"in window);FIREFOX=this.isBrowser&&/(firefox|minefield)/i.test(navigator.userAgent);ANDROID=this.isBrowser&&/android/i.test(navigator.userAgent)&&!this.TRIDENT;SAFARI=this.isBrowser&&/safari/i.test(navigator.userAgent)&&this.WEBKIT;constructor(){}static \u0275fac=function(n){return new(n||t)};static \u0275prov=R({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();var y0;function JS(){if(y0==null&&typeof window<"u")try{window.addEventListener("test",null,Object.defineProperty({},"passive",{get:()=>y0=!0}))}finally{y0=y0||!1}return y0}function Ns(t){return JS()?t:!!t.capture}function vn(t,i=0){return mp(t)?Number(t):arguments.length===2?i:0}function mp(t){return!isNaN(parseFloat(t))&&!isNaN(Number(t))}function kn(t){return t instanceof Q?t.nativeElement:t}var ek=new L("cdk-input-modality-detector-options"),tk={ignoreKeys:[18,17,224,91,16]},nk=650,W7={passive:!0,capture:!0},ik=(()=>{class t{_platform=d(je);_listenerCleanups;modalityDetected;modalityChanged;get mostRecentModality(){return this._modality.value}_mostRecentTarget=null;_modality=new ct(null);_options;_lastTouchMs=0;_onKeydown=e=>{this._options?.ignoreKeys?.some(n=>n===e.keyCode)||(this._modality.next("keyboard"),this._mostRecentTarget=jn(e))};_onMousedown=e=>{Date.now()-this._lastTouchMs{if(Qa(e)){this._modality.next("keyboard");return}this._lastTouchMs=Date.now(),this._modality.next("touch"),this._mostRecentTarget=jn(e)};constructor(){let e=d(se),n=d(Me),o=d(ek,{optional:!0});if(this._options=q(q({},tk),o),this.modalityDetected=this._modality.pipe(Cc(1)),this.modalityChanged=this.modalityDetected.pipe(Wl()),this._platform.isBrowser){let r=d(On).createRenderer(null,null);this._listenerCleanups=e.runOutsideAngular(()=>[r.listen(n,"keydown",this._onKeydown,W7),r.listen(n,"mousedown",this._onMousedown,W7),r.listen(n,"touchstart",this._onTouchstart,W7)])}}ngOnDestroy(){this._modality.complete(),this._listenerCleanups?.forEach(e=>e())}static \u0275fac=function(n){return new(n||t)};static \u0275prov=R({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})(),C0=(function(t){return t[t.IMMEDIATE=0]="IMMEDIATE",t[t.EVENTUAL=1]="EVENTUAL",t})(C0||{}),ok=new L("cdk-focus-monitor-default-options"),pp=Ns({passive:!0,capture:!0}),sn=(()=>{class t{_ngZone=d(se);_platform=d(je);_inputModalityDetector=d(ik);_origin=null;_lastFocusOrigin;_windowFocused=!1;_windowFocusTimeoutId;_originTimeoutId;_originFromTouchInteraction=!1;_elementInfo=new Map;_monitoredElementCount=0;_rootNodeFocusListenerCount=new Map;_detectionMode;_windowFocusListener=()=>{this._windowFocused=!0,this._windowFocusTimeoutId=setTimeout(()=>this._windowFocused=!1)};_document=d(Me);_stopInputModalityDetector=new B;constructor(){let e=d(ok,{optional:!0});this._detectionMode=e?.detectionMode||C0.IMMEDIATE}_rootNodeFocusAndBlurListener=e=>{let n=jn(e);for(let o=n;o;o=o.parentElement)e.type==="focus"?this._onFocus(e,o):this._onBlur(e,o)};monitor(e,n=!1){let o=kn(e);if(!this._platform.isBrowser||o.nodeType!==1)return re();let r=Qc(o)||this._document,a=this._elementInfo.get(o);if(a)return n&&(a.checkChildren=!0),a.subject;let s={checkChildren:n,subject:new B,rootNode:r};return this._elementInfo.set(o,s),this._registerGlobalListeners(s),s.subject}stopMonitoring(e){let n=kn(e),o=this._elementInfo.get(n);o&&(o.subject.complete(),this._setClasses(n),this._elementInfo.delete(n),this._removeGlobalListeners(o))}focusVia(e,n,o){let r=kn(e),a=this._document.activeElement;r===a?this._getClosestElementsInfo(r).forEach(([s,c])=>this._originChanged(s,n,c)):(this._setOrigin(n),typeof r.focus=="function"&&r.focus(o))}ngOnDestroy(){this._elementInfo.forEach((e,n)=>this.stopMonitoring(n))}_getWindow(){return this._document.defaultView||window}_getFocusOrigin(e){return this._origin?this._originFromTouchInteraction?this._shouldBeAttributedToTouch(e)?"touch":"program":this._origin:this._windowFocused&&this._lastFocusOrigin?this._lastFocusOrigin:e&&this._isLastInteractionFromInputLabel(e)?"mouse":"program"}_shouldBeAttributedToTouch(e){return this._detectionMode===C0.EVENTUAL||!!e?.contains(this._inputModalityDetector._mostRecentTarget)}_setClasses(e,n){e.classList.toggle("cdk-focused",!!n),e.classList.toggle("cdk-touch-focused",n==="touch"),e.classList.toggle("cdk-keyboard-focused",n==="keyboard"),e.classList.toggle("cdk-mouse-focused",n==="mouse"),e.classList.toggle("cdk-program-focused",n==="program")}_setOrigin(e,n=!1){this._ngZone.runOutsideAngular(()=>{if(this._origin=e,this._originFromTouchInteraction=e==="touch"&&n,this._detectionMode===C0.IMMEDIATE){clearTimeout(this._originTimeoutId);let o=this._originFromTouchInteraction?nk:1;this._originTimeoutId=setTimeout(()=>this._origin=null,o)}})}_onFocus(e,n){let o=this._elementInfo.get(n),r=jn(e);!o||!o.checkChildren&&n!==r||this._originChanged(n,this._getFocusOrigin(r),o)}_onBlur(e,n){let o=this._elementInfo.get(n);!o||o.checkChildren&&e.relatedTarget instanceof Node&&n.contains(e.relatedTarget)||(this._setClasses(n),this._emitOrigin(o,null))}_emitOrigin(e,n){e.subject.observers.length&&this._ngZone.run(()=>e.subject.next(n))}_registerGlobalListeners(e){if(!this._platform.isBrowser)return;let n=e.rootNode,o=this._rootNodeFocusListenerCount.get(n)||0;o||this._ngZone.runOutsideAngular(()=>{n.addEventListener("focus",this._rootNodeFocusAndBlurListener,pp),n.addEventListener("blur",this._rootNodeFocusAndBlurListener,pp)}),this._rootNodeFocusListenerCount.set(n,o+1),++this._monitoredElementCount===1&&(this._ngZone.runOutsideAngular(()=>{this._getWindow().addEventListener("focus",this._windowFocusListener)}),this._inputModalityDetector.modalityDetected.pipe(ye(this._stopInputModalityDetector)).subscribe(r=>{this._setOrigin(r,!0)}))}_removeGlobalListeners(e){let n=e.rootNode;if(this._rootNodeFocusListenerCount.has(n)){let o=this._rootNodeFocusListenerCount.get(n);o>1?this._rootNodeFocusListenerCount.set(n,o-1):(n.removeEventListener("focus",this._rootNodeFocusAndBlurListener,pp),n.removeEventListener("blur",this._rootNodeFocusAndBlurListener,pp),this._rootNodeFocusListenerCount.delete(n))}--this._monitoredElementCount||(this._getWindow().removeEventListener("focus",this._windowFocusListener),this._stopInputModalityDetector.next(),clearTimeout(this._windowFocusTimeoutId),clearTimeout(this._originTimeoutId))}_originChanged(e,n,o){this._setClasses(e,n),this._emitOrigin(o,n),this._lastFocusOrigin=n}_getClosestElementsInfo(e){let n=[];return this._elementInfo.forEach((o,r)=>{(r===e||o.checkChildren&&r.contains(e))&&n.push([r,o])}),n}_isLastInteractionFromInputLabel(e){let{_mostRecentTarget:n,mostRecentModality:o}=this._inputModalityDetector;if(o!=="mouse"||!n||n===e||e.nodeName!=="INPUT"&&e.nodeName!=="TEXTAREA"||e.disabled)return!1;let r=e.labels;if(r){for(let a=0;a{class t{_elementRef=d(Q);_focusMonitor=d(sn);_monitorSubscription;_focusOrigin=null;cdkFocusChange=new j;constructor(){}get focusOrigin(){return this._focusOrigin}ngAfterViewInit(){let e=this._elementRef.nativeElement;this._monitorSubscription=this._focusMonitor.monitor(e,e.nodeType===1&&e.hasAttribute("cdkMonitorSubtreeFocus")).subscribe(n=>{this._focusOrigin=n,this.cdkFocusChange.emit(n)})}ngOnDestroy(){this._focusMonitor.stopMonitoring(this._elementRef),this._monitorSubscription&&this._monitorSubscription.unsubscribe()}static \u0275fac=function(n){return new(n||t)};static \u0275dir=z({type:t,selectors:[["","cdkMonitorElementFocus",""],["","cdkMonitorSubtreeFocus",""]],outputs:{cdkFocusChange:"cdkFocusChange"},exportAs:["cdkMonitorFocus"]})}return t})();var fp=new WeakMap,at=(()=>{class t{_appRef;_injector=d(be);_environmentInjector=d(Qt);load(e){let n=this._appRef=this._appRef||this._injector.get(li),o=fp.get(n);o||(o={loaders:new Set,refs:[]},fp.set(n,o),n.onDestroy(()=>{fp.get(n)?.refs.forEach(r=>r.destroy()),fp.delete(n)})),o.loaders.has(e)||(o.loaders.add(e),o.refs.push(gm(e,{environmentInjector:this._environmentInjector})))}static \u0275fac=function(n){return new(n||t)};static \u0275prov=R({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();var _o=(()=>{class t{static \u0275fac=function(n){return new(n||t)};static \u0275cmp=P({type:t,selectors:[["ng-component"]],exportAs:["cdkVisuallyHidden"],decls:0,vars:0,template:function(n,o){},styles:[`.cdk-visually-hidden{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px;white-space:nowrap;outline:0;-webkit-appearance:none;-moz-appearance:none;left:0}[dir=rtl] .cdk-visually-hidden{left:auto;right:0} `],encapsulation:2,changeDetection:0})}return t})();function Or(t){return Array.isArray(t)?t:[t]}var rk=new Set,Kc,hp=(()=>{class t{_platform=d(je);_nonce=d(g1,{optional:!0});_matchMedia;constructor(){this._matchMedia=this._platform.isBrowser&&window.matchMedia?window.matchMedia.bind(window):CQ}matchMedia(e){return(this._platform.WEBKIT||this._platform.BLINK)&&yQ(e,this._nonce),this._matchMedia(e)}static \u0275fac=function(n){return new(n||t)};static \u0275prov=R({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();function yQ(t,i){if(!rk.has(t))try{Kc||(Kc=document.createElement("style"),i&&Kc.setAttribute("nonce",i),Kc.setAttribute("type","text/css"),document.head.appendChild(Kc)),Kc.sheet&&(Kc.sheet.insertRule(`@media ${t} {body{ }}`,0),rk.add(t))}catch(e){console.error(e)}}function CQ(t){return{matches:t==="all"||t==="",media:t,addListener:()=>{},removeListener:()=>{}}}var Xc=(()=>{class t{_mediaMatcher=d(hp);_zone=d(se);_queries=new Map;_destroySubject=new B;constructor(){}ngOnDestroy(){this._destroySubject.next(),this._destroySubject.complete()}isMatched(e){return ak(Or(e)).some(o=>this._registerQuery(o).mql.matches)}observe(e){let o=ak(Or(e)).map(a=>this._registerQuery(a).observable),r=gi(o);return r=Li(r.pipe(Be(1)),r.pipe(Cc(1),hr(0))),r.pipe(me(a=>{let s={matches:!1,breakpoints:{}};return a.forEach(({matches:c,query:m})=>{s.matches=s.matches||c,s.breakpoints[m]=c}),s}))}_registerQuery(e){if(this._queries.has(e))return this._queries.get(e);let n=this._mediaMatcher.matchMedia(e),r={observable:new Fe(a=>{let s=c=>this._zone.run(()=>a.next(c));return n.addListener(s),()=>{n.removeListener(s)}}).pipe(We(n),me(({matches:a})=>({query:e,matches:a})),ye(this._destroySubject)),mql:n};return this._queries.set(e,r),r}static \u0275fac=function(n){return new(n||t)};static \u0275prov=R({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();function ak(t){return t.map(i=>i.split(",")).reduce((i,e)=>i.concat(e)).map(i=>i.trim())}function xQ(t){if(t.type==="characterData"&&t.target instanceof Comment)return!0;if(t.type==="childList"){for(let i=0;i{class t{create(e){return typeof MutationObserver>"u"?null:new MutationObserver(e)}static \u0275fac=function(n){return new(n||t)};static \u0275prov=R({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})(),ck=(()=>{class t{_mutationObserverFactory=d(sk);_observedElements=new Map;_ngZone=d(se);constructor(){}ngOnDestroy(){this._observedElements.forEach((e,n)=>this._cleanupObserver(n))}observe(e){let n=kn(e);return new Fe(o=>{let a=this._observeElement(n).pipe(me(s=>s.filter(c=>!xQ(c))),Ae(s=>!!s.length)).subscribe(s=>{this._ngZone.run(()=>{o.next(s)})});return()=>{a.unsubscribe(),this._unobserveElement(n)}})}_observeElement(e){return this._ngZone.runOutsideAngular(()=>{if(this._observedElements.has(e))this._observedElements.get(e).count++;else{let n=new B,o=this._mutationObserverFactory.create(r=>n.next(r));o&&o.observe(e,{characterData:!0,childList:!0,subtree:!0}),this._observedElements.set(e,{observer:o,stream:n,count:1})}return this._observedElements.get(e).stream})}_unobserveElement(e){this._observedElements.has(e)&&(this._observedElements.get(e).count--,this._observedElements.get(e).count||this._cleanupObserver(e))}_cleanupObserver(e){if(this._observedElements.has(e)){let{observer:n,stream:o}=this._observedElements.get(e);n&&n.disconnect(),o.complete(),this._observedElements.delete(e)}}static \u0275fac=function(n){return new(n||t)};static \u0275prov=R({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})(),M0=(()=>{class t{_contentObserver=d(ck);_elementRef=d(Q);event=new j;get disabled(){return this._disabled}set disabled(e){this._disabled=e,this._disabled?this._unsubscribe():this._subscribe()}_disabled=!1;get debounce(){return this._debounce}set debounce(e){this._debounce=vn(e),this._subscribe()}_debounce;_currentSubscription=null;constructor(){}ngAfterContentInit(){!this._currentSubscription&&!this.disabled&&this._subscribe()}ngOnDestroy(){this._unsubscribe()}_subscribe(){this._unsubscribe();let e=this._contentObserver.observe(this._elementRef);this._currentSubscription=(this.debounce?e.pipe(hr(this.debounce)):e).subscribe(this.event)}_unsubscribe(){this._currentSubscription?.unsubscribe()}static \u0275fac=function(n){return new(n||t)};static \u0275dir=z({type:t,selectors:[["","cdkObserveContent",""]],inputs:{disabled:[2,"cdkObserveContentDisabled","disabled",H],debounce:"debounce"},outputs:{event:"cdkObserveContent"},exportAs:["cdkObserveContent"]})}return t})(),U1=(()=>{class t{static \u0275fac=function(n){return new(n||t)};static \u0275mod=J({type:t});static \u0275inj=X({providers:[sk]})}return t})();var Vs=(()=>{class t{_platform=d(je);constructor(){}isDisabled(e){return e.hasAttribute("disabled")}isVisible(e){return wQ(e)&&getComputedStyle(e).visibility==="visible"}isTabbable(e){if(!this._platform.isBrowser)return!1;let n=MQ(PQ(e));if(n&&(lk(n)===-1||!this.isVisible(n)))return!1;let o=e.nodeName.toLowerCase(),r=lk(e);return e.hasAttribute("contenteditable")?r!==-1:o==="iframe"||o==="object"||this._platform.WEBKIT&&this._platform.IOS&&!OQ(e)?!1:o==="audio"?e.hasAttribute("controls")?r!==-1:!1:o==="video"?r===-1?!1:r!==null?!0:this._platform.FIREFOX||e.hasAttribute("controls"):e.tabIndex>=0}isFocusable(e,n){return TQ(e)&&!this.isDisabled(e)&&(n?.ignoreVisibility||this.isVisible(e))}static \u0275fac=function(n){return new(n||t)};static \u0275prov=R({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();function MQ(t){try{return t.frameElement}catch{return null}}function wQ(t){return!!(t.offsetWidth||t.offsetHeight||typeof t.getClientRects=="function"&&t.getClientRects().length)}function DQ(t){let i=t.nodeName.toLowerCase();return i==="input"||i==="select"||i==="button"||i==="textarea"}function SQ(t){return EQ(t)&&t.type=="hidden"}function kQ(t){return IQ(t)&&t.hasAttribute("href")}function EQ(t){return t.nodeName.toLowerCase()=="input"}function IQ(t){return t.nodeName.toLowerCase()=="a"}function mk(t){if(!t.hasAttribute("tabindex")||t.tabIndex===void 0)return!1;let i=t.getAttribute("tabindex");return!!(i&&!isNaN(parseInt(i,10)))}function lk(t){if(!mk(t))return null;let i=parseInt(t.getAttribute("tabindex")||"",10);return isNaN(i)?-1:i}function OQ(t){let i=t.nodeName.toLowerCase(),e=i==="input"&&t.type;return e==="text"||e==="password"||i==="select"||i==="textarea"}function TQ(t){return SQ(t)?!1:DQ(t)||kQ(t)||t.hasAttribute("contenteditable")||mk(t)}function PQ(t){return t.ownerDocument&&t.ownerDocument.defaultView||window}var gp=class{_element;_checker;_ngZone;_document;_injector;_startAnchor;_endAnchor;_hasAttached=!1;startAnchorListener=()=>this.focusLastTabbableElement();endAnchorListener=()=>this.focusFirstTabbableElement();get enabled(){return this._enabled}set enabled(i){this._enabled=i,this._startAnchor&&this._endAnchor&&(this._toggleAnchorTabIndex(i,this._startAnchor),this._toggleAnchorTabIndex(i,this._endAnchor))}_enabled=!0;constructor(i,e,n,o,r=!1,a){this._element=i,this._checker=e,this._ngZone=n,this._document=o,this._injector=a,r||this.attachAnchors()}destroy(){let i=this._startAnchor,e=this._endAnchor;i&&(i.removeEventListener("focus",this.startAnchorListener),i.remove()),e&&(e.removeEventListener("focus",this.endAnchorListener),e.remove()),this._startAnchor=this._endAnchor=null,this._hasAttached=!1}attachAnchors(){return this._hasAttached?!0:(this._ngZone.runOutsideAngular(()=>{this._startAnchor||(this._startAnchor=this._createAnchor(),this._startAnchor.addEventListener("focus",this.startAnchorListener)),this._endAnchor||(this._endAnchor=this._createAnchor(),this._endAnchor.addEventListener("focus",this.endAnchorListener))}),this._element.parentNode&&(this._element.parentNode.insertBefore(this._startAnchor,this._element),this._element.parentNode.insertBefore(this._endAnchor,this._element.nextSibling),this._hasAttached=!0),this._hasAttached)}focusInitialElementWhenReady(i){return new Promise(e=>{this._executeOnStable(()=>e(this.focusInitialElement(i)))})}focusFirstTabbableElementWhenReady(i){return new Promise(e=>{this._executeOnStable(()=>e(this.focusFirstTabbableElement(i)))})}focusLastTabbableElementWhenReady(i){return new Promise(e=>{this._executeOnStable(()=>e(this.focusLastTabbableElement(i)))})}_getRegionBoundary(i){let e=this._element.querySelectorAll(`[cdk-focus-region-${i}], [cdkFocusRegion${i}], [cdk-focus-${i}]`);return i=="start"?e.length?e[0]:this._getFirstTabbableElement(this._element):e.length?e[e.length-1]:this._getLastTabbableElement(this._element)}focusInitialElement(i){let e=this._element.querySelector("[cdk-focus-initial], [cdkFocusInitial]");if(e){if(!this._checker.isFocusable(e)){let n=this._getFirstTabbableElement(e);return n?.focus(i),!!n}return e.focus(i),!0}return this.focusFirstTabbableElement(i)}focusFirstTabbableElement(i){let e=this._getRegionBoundary("start");return e&&e.focus(i),!!e}focusLastTabbableElement(i){let e=this._getRegionBoundary("end");return e&&e.focus(i),!!e}hasAttached(){return this._hasAttached}_getFirstTabbableElement(i){if(this._checker.isFocusable(i)&&this._checker.isTabbable(i))return i;let e=i.children;for(let n=0;n=0;n--){let o=e[n].nodeType===this._document.ELEMENT_NODE?this._getLastTabbableElement(e[n]):null;if(o)return o}return null}_createAnchor(){let i=this._document.createElement("div");return this._toggleAnchorTabIndex(this._enabled,i),i.classList.add("cdk-visually-hidden"),i.classList.add("cdk-focus-trap-anchor"),i.setAttribute("aria-hidden","true"),i}_toggleAnchorTabIndex(i,e){i?e.setAttribute("tabindex","0"):e.removeAttribute("tabindex")}toggleAnchors(i){this._startAnchor&&this._endAnchor&&(this._toggleAnchorTabIndex(i,this._startAnchor),this._toggleAnchorTabIndex(i,this._endAnchor))}_executeOnStable(i){this._injector?Ct(i,{injector:this._injector}):setTimeout(i)}},$1=(()=>{class t{_checker=d(Vs);_ngZone=d(se);_document=d(Me);_injector=d(be);constructor(){d(at).load(_o)}create(e,n=!1){return new gp(e,this._checker,this._ngZone,this._document,n,this._injector)}static \u0275fac=function(n){return new(n||t)};static \u0275prov=R({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})(),Y7=(()=>{class t{_elementRef=d(Q);_focusTrapFactory=d($1);focusTrap;_previouslyFocusedElement=null;get enabled(){return this.focusTrap?.enabled||!1}set enabled(e){this.focusTrap&&(this.focusTrap.enabled=e)}autoCapture;constructor(){d(je).isBrowser&&(this.focusTrap=this._focusTrapFactory.create(this._elementRef.nativeElement,!0))}ngOnDestroy(){this.focusTrap?.destroy(),this._previouslyFocusedElement&&(this._previouslyFocusedElement.focus(),this._previouslyFocusedElement=null)}ngAfterContentInit(){this.focusTrap?.attachAnchors(),this.autoCapture&&this._captureFocus()}ngDoCheck(){this.focusTrap&&!this.focusTrap.hasAttached()&&this.focusTrap.attachAnchors()}ngOnChanges(e){let n=e.autoCapture;n&&!n.firstChange&&this.autoCapture&&this.focusTrap?.hasAttached()&&this._captureFocus()}_captureFocus(){this._previouslyFocusedElement=no(),this.focusTrap?.focusInitialElementWhenReady()}static \u0275fac=function(n){return new(n||t)};static \u0275dir=z({type:t,selectors:[["","cdkTrapFocus",""]],inputs:{enabled:[2,"cdkTrapFocus","enabled",H],autoCapture:[2,"cdkTrapFocusAutoCapture","autoCapture",H]},exportAs:["cdkTrapFocus"],features:[Re]})}return t})(),pk=new L("liveAnnouncerElement",{providedIn:"root",factory:fk});function fk(){return null}var hk=new L("LIVE_ANNOUNCER_DEFAULT_OPTIONS"),LQ=0,w0=(()=>{class t{_ngZone=d(se);_defaultOptions=d(hk,{optional:!0});_liveElement;_document=d(Me);_previousTimeout;_currentPromise;_currentResolve;constructor(){let e=d(pk,{optional:!0});this._liveElement=e||this._createLiveElement()}announce(e,...n){let o=this._defaultOptions,r,a;return n.length===1&&typeof n[0]=="number"?a=n[0]:[r,a]=n,this.clear(),clearTimeout(this._previousTimeout),r||(r=o&&o.politeness?o.politeness:"polite"),a==null&&o&&(a=o.duration),this._liveElement.setAttribute("aria-live",r),this._liveElement.id&&this._exposeAnnouncerToModals(this._liveElement.id),this._ngZone.runOutsideAngular(()=>(this._currentPromise||(this._currentPromise=new Promise(s=>this._currentResolve=s)),clearTimeout(this._previousTimeout),this._previousTimeout=setTimeout(()=>{this._liveElement.textContent=e,typeof a=="number"&&(this._previousTimeout=setTimeout(()=>this.clear(),a)),this._currentResolve?.(),this._currentPromise=this._currentResolve=void 0},100),this._currentPromise))}clear(){this._liveElement&&(this._liveElement.textContent="")}ngOnDestroy(){clearTimeout(this._previousTimeout),this._liveElement?.remove(),this._liveElement=null,this._currentResolve?.(),this._currentPromise=this._currentResolve=void 0}_createLiveElement(){let e="cdk-live-announcer-element",n=this._document.getElementsByClassName(e),o=this._document.createElement("div");for(let r=0;r .cdk-overlay-container [aria-modal="true"]');for(let o=0;o{class t{_platform=d(je);_hasCheckedHighContrastMode;_document=d(Me);_breakpointSubscription;constructor(){this._breakpointSubscription=d(Xc).observe("(forced-colors: active)").subscribe(()=>{this._hasCheckedHighContrastMode&&(this._hasCheckedHighContrastMode=!1,this._applyBodyHighContrastModeCssClasses())})}getHighContrastMode(){if(!this._platform.isBrowser)return Fs.NONE;let e=this._document.createElement("div");e.style.backgroundColor="rgb(1,2,3)",e.style.position="absolute",this._document.body.appendChild(e);let n=this._document.defaultView||window,o=n&&n.getComputedStyle?n.getComputedStyle(e):null,r=(o&&o.backgroundColor||"").replace(/ /g,"");switch(e.remove(),r){case"rgb(0,0,0)":case"rgb(45,50,54)":case"rgb(32,32,32)":return Fs.WHITE_ON_BLACK;case"rgb(255,255,255)":case"rgb(255,250,239)":return Fs.BLACK_ON_WHITE}return Fs.NONE}ngOnDestroy(){this._breakpointSubscription.unsubscribe()}_applyBodyHighContrastModeCssClasses(){if(!this._hasCheckedHighContrastMode&&this._platform.isBrowser&&this._document.body){let e=this._document.body.classList;e.remove(q7,dk,uk),this._hasCheckedHighContrastMode=!0;let n=this.getHighContrastMode();n===Fs.BLACK_ON_WHITE?e.add(q7,dk):n===Fs.WHITE_ON_BLACK&&e.add(q7,uk)}}static \u0275fac=function(n){return new(n||t)};static \u0275prov=R({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})(),Ka=(()=>{class t{constructor(){d(_p)._applyBodyHighContrastModeCssClasses()}static \u0275fac=function(n){return new(n||t)};static \u0275mod=J({type:t});static \u0275inj=X({imports:[U1]})}return t})();var Q7={},He=(()=>{class t{_appId=d(Ds);getId(e){return this._appId!=="ng"&&(e+=this._appId),Q7.hasOwnProperty(e)||(Q7[e]=0),`${e}${Q7[e]++}`}static \u0275fac=function(n){return new(n||t)};static \u0275prov=R({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();var AQ=200,G1=class{_letterKeyStream=new B;_items=[];_selectedItemIndex=-1;_pressedLetters=[];_skipPredicateFn;_selectedItem=new B;selectedItem=this._selectedItem;constructor(i,e){let n=typeof e?.debounceInterval=="number"?e.debounceInterval:AQ;e?.skipPredicate&&(this._skipPredicateFn=e.skipPredicate),this.setItems(i),this._setupKeyHandler(n)}destroy(){this._pressedLetters=[],this._letterKeyStream.complete(),this._selectedItem.complete()}setCurrentSelectedItemIndex(i){this._selectedItemIndex=i}setItems(i){this._items=i}handleKey(i){let e=i.keyCode;i.key&&i.key.length===1?this._letterKeyStream.next(i.key.toLocaleUpperCase()):(e>=65&&e<=90||e>=48&&e<=57)&&this._letterKeyStream.next(String.fromCharCode(e))}isTyping(){return this._pressedLetters.length>0}reset(){this._pressedLetters=[]}_setupKeyHandler(i){this._letterKeyStream.pipe(Ot(e=>this._pressedLetters.push(e)),hr(i),Ae(()=>this._pressedLetters.length>0),me(()=>this._pressedLetters.join("").toLocaleUpperCase())).subscribe(e=>{for(let n=1;nt[e]):t.altKey||t.shiftKey||t.ctrlKey||t.metaKey}var W1=class{_items;_activeItemIndex=we(-1);_activeItem=we(null);_wrap=!1;_typeaheadSubscription=Se.EMPTY;_itemChangesSubscription;_vertical=!0;_horizontal;_allowedModifierKeys=[];_homeAndEnd=!1;_pageUpAndDown={enabled:!1,delta:10};_effectRef;_typeahead;_skipPredicateFn=i=>i.disabled;constructor(i,e){this._items=i,i instanceof In?this._itemChangesSubscription=i.changes.subscribe(n=>this._itemsChanged(n.toArray())):ea(i)&&(this._effectRef=sa(()=>this._itemsChanged(i()),{injector:e}))}tabOut=new B;change=new B;skipPredicate(i){return this._skipPredicateFn=i,this}withWrap(i=!0){return this._wrap=i,this}withVerticalOrientation(i=!0){return this._vertical=i,this}withHorizontalOrientation(i){return this._horizontal=i,this}withAllowedModifierKeys(i){return this._allowedModifierKeys=i,this}withTypeAhead(i=200){this._typeaheadSubscription.unsubscribe();let e=this._getItemsArray();return this._typeahead=new G1(e,{debounceInterval:typeof i=="number"?i:void 0,skipPredicate:n=>this._skipPredicateFn(n)}),this._typeaheadSubscription=this._typeahead.selectedItem.subscribe(n=>{this.setActiveItem(n)}),this}cancelTypeahead(){return this._typeahead?.reset(),this}withHomeAndEnd(i=!0){return this._homeAndEnd=i,this}withPageUpDown(i=!0,e=10){return this._pageUpAndDown={enabled:i,delta:e},this}setActiveItem(i){let e=this._activeItem();this.updateActiveItem(i),this._activeItem()!==e&&this.change.next(this._activeItemIndex())}onKeydown(i){let e=i.keyCode,o=["altKey","ctrlKey","metaKey","shiftKey"].every(r=>!i[r]||this._allowedModifierKeys.indexOf(r)>-1);switch(e){case 9:this.tabOut.next();return;case 40:if(this._vertical&&o){this.setNextItemActive();break}else return;case 38:if(this._vertical&&o){this.setPreviousItemActive();break}else return;case 39:if(this._horizontal&&o){this._horizontal==="rtl"?this.setPreviousItemActive():this.setNextItemActive();break}else return;case 37:if(this._horizontal&&o){this._horizontal==="rtl"?this.setNextItemActive():this.setPreviousItemActive();break}else return;case 36:if(this._homeAndEnd&&o){this.setFirstItemActive();break}else return;case 35:if(this._homeAndEnd&&o){this.setLastItemActive();break}else return;case 33:if(this._pageUpAndDown.enabled&&o){let r=this._activeItemIndex()-this._pageUpAndDown.delta;this._setActiveItemByIndex(r>0?r:0,1);break}else return;case 34:if(this._pageUpAndDown.enabled&&o){let r=this._activeItemIndex()+this._pageUpAndDown.delta,a=this._getItemsArray().length;this._setActiveItemByIndex(r-1&&n!==this._activeItemIndex()&&(this._activeItemIndex.set(n),this._typeahead?.setCurrentSelectedItemIndex(n))}}};var Zc=class extends W1{setActiveItem(i){this.activeItem&&this.activeItem.setInactiveStyles(),super.setActiveItem(i),this.activeItem&&this.activeItem.setActiveStyles()}};var Tr=class extends W1{_origin="program";setFocusOrigin(i){return this._origin=i,this}setActiveItem(i){super.setActiveItem(i),this.activeItem&&this.activeItem.focus(this._origin)}};function Jc(t){return ai(t)?t:re(t)}var K7=class{_activeItemIndex=-1;_activeItem=null;_shouldActivationFollowFocus=!1;_horizontalOrientation="ltr";_skipPredicateFn=i=>!1;_trackByFn=i=>i;_items=[];_typeahead;_typeaheadSubscription=Se.EMPTY;_hasInitialFocused=!1;_initializeFocus(){if(this._hasInitialFocused||this._items.length===0)return;let i=0;for(let n=0;n{this._items=n.toArray(),this._typeahead?.setItems(this._items),this._updateActiveItemIndex(this._items),this._initializeFocus()})):ai(i)?i.subscribe(n=>{this._items=n,this._typeahead?.setItems(n),this._updateActiveItemIndex(n),this._initializeFocus()}):(this._items=i,this._initializeFocus()),typeof e.shouldActivationFollowFocus=="boolean"&&(this._shouldActivationFollowFocus=e.shouldActivationFollowFocus),e.horizontalOrientation&&(this._horizontalOrientation=e.horizontalOrientation),e.skipPredicate&&(this._skipPredicateFn=e.skipPredicate),e.trackBy&&(this._trackByFn=e.trackBy),typeof e.typeAheadDebounceInterval<"u"&&this._setTypeAhead(e.typeAheadDebounceInterval)}change=new B;destroy(){this._typeaheadSubscription.unsubscribe(),this._typeahead?.destroy(),this.change.complete()}onKeydown(i){switch(i.key){case"Tab":return;case"ArrowDown":this._focusNextItem();break;case"ArrowUp":this._focusPreviousItem();break;case"ArrowRight":this._horizontalOrientation==="rtl"?this._collapseCurrentItem():this._expandCurrentItem();break;case"ArrowLeft":this._horizontalOrientation==="rtl"?this._expandCurrentItem():this._collapseCurrentItem();break;case"Home":this._focusFirstItem();break;case"End":this._focusLastItem();break;case"Enter":case" ":this._activateCurrentItem();break;default:if(i.key==="*"){this._expandAllItemsAtCurrentItemLevel();break}this._typeahead?.handleKey(i);return}this._typeahead?.reset(),i.preventDefault()}getActiveItemIndex(){return this._activeItemIndex}getActiveItem(){return this._activeItem}_focusFirstItem(){this.focusItem(this._findNextAvailableItemIndex(-1))}_focusLastItem(){this.focusItem(this._findPreviousAvailableItemIndex(this._items.length))}_focusNextItem(){this.focusItem(this._findNextAvailableItemIndex(this._activeItemIndex))}_focusPreviousItem(){this.focusItem(this._findPreviousAvailableItemIndex(this._activeItemIndex))}focusItem(i,e={}){e.emitChangeEvent??=!0;let n=typeof i=="number"?i:this._items.findIndex(a=>this._trackByFn(a)===this._trackByFn(i));if(n<0||n>=this._items.length)return;let o=this._items[n];if(this._activeItem!==null&&this._trackByFn(o)===this._trackByFn(this._activeItem))return;let r=this._activeItem;this._activeItem=o??null,this._activeItemIndex=n,this._typeahead?.setCurrentSelectedItemIndex(n),this._activeItem?.focus(),r?.unfocus(),e.emitChangeEvent&&this.change.next(this._activeItem),this._shouldActivationFollowFocus&&this._activateCurrentItem()}_updateActiveItemIndex(i){let e=this._activeItem;if(!e)return;let n=i.findIndex(o=>this._trackByFn(o)===this._trackByFn(e));n>-1&&n!==this._activeItemIndex&&(this._activeItemIndex=n,this._typeahead?.setCurrentSelectedItemIndex(n))}_setTypeAhead(i){this._typeahead=new G1(this._items,{debounceInterval:typeof i=="number"?i:void 0,skipPredicate:e=>this._skipPredicateFn(e)}),this._typeaheadSubscription=this._typeahead.selectedItem.subscribe(e=>{this.focusItem(e)})}_findNextAvailableItemIndex(i){for(let e=i+1;e=0;e--)if(!this._skipPredicateFn(this._items[e]))return e;return i}_collapseCurrentItem(){if(this._activeItem)if(this._isCurrentItemExpanded())this._activeItem.collapse();else{let i=this._activeItem.getParent();if(!i||this._skipPredicateFn(i))return;this.focusItem(i)}}_expandCurrentItem(){this._activeItem&&(this._isCurrentItemExpanded()?Jc(this._activeItem.getChildren()).pipe(Be(1)).subscribe(i=>{let e=i.find(n=>!this._skipPredicateFn(n));e&&this.focusItem(e)}):this._activeItem.expand())}_isCurrentItemExpanded(){return this._activeItem?typeof this._activeItem.isExpanded=="boolean"?this._activeItem.isExpanded:this._activeItem.isExpanded():!1}_isItemDisabled(i){return typeof i.isDisabled=="boolean"?i.isDisabled:i.isDisabled?.()}_expandAllItemsAtCurrentItemLevel(){if(!this._activeItem)return;let i=this._activeItem.getParent(),e;i?e=Jc(i.getChildren()):e=re(this._items.filter(n=>n.getParent()===null)),e.pipe(Be(1)).subscribe(n=>{for(let o of n)o.expand()})}_activateCurrentItem(){this._activeItem?.activate()}};function zQ(){return(t,i)=>new K7(t,i)}var bk=new L("tree-key-manager",{providedIn:"root",factory:zQ});var yk=" ";function q1(t,i,e){let n=Cp(t,i);e=e.trim(),!n.some(o=>o.trim()===e)&&(n.push(e),t.setAttribute(i,n.join(yk)))}function Bs(t,i,e){let n=Cp(t,i);e=e.trim();let o=n.filter(r=>r!==e);o.length?t.setAttribute(i,o.join(yk)):t.removeAttribute(i)}function Cp(t,i){return t.getAttribute(i)?.match(/\S+/g)??[]}var Ck="cdk-describedby-message",yp="cdk-describedby-host",Z7=0,Y1=(()=>{class t{_platform=d(je);_document=d(Me);_messageRegistry=new Map;_messagesContainer=null;_id=`${Z7++}`;constructor(){d(at).load(_o),this._id=d(Ds)+"-"+Z7++}describe(e,n,o){if(!this._canBeDescribed(e,n))return;let r=X7(n,o);typeof n!="string"?(vk(n,this._id),this._messageRegistry.set(r,{messageElement:n,referenceCount:0})):this._messageRegistry.has(r)||this._createMessageElement(n,o),this._isElementDescribedByMessage(e,r)||this._addMessageReference(e,r)}removeDescription(e,n,o){if(!n||!this._isElementNode(e))return;let r=X7(n,o);if(this._isElementDescribedByMessage(e,r)&&this._removeMessageReference(e,r),typeof n=="string"){let a=this._messageRegistry.get(r);a&&a.referenceCount===0&&this._deleteMessageElement(r)}this._messagesContainer?.childNodes.length===0&&(this._messagesContainer.remove(),this._messagesContainer=null)}ngOnDestroy(){let e=this._document.querySelectorAll(`[${yp}="${this._id}"]`);for(let n=0;no.indexOf(Ck)!=0);e.setAttribute("aria-describedby",n.join(" "))}_addMessageReference(e,n){let o=this._messageRegistry.get(n);q1(e,"aria-describedby",o.messageElement.id),e.setAttribute(yp,this._id),o.referenceCount++}_removeMessageReference(e,n){let o=this._messageRegistry.get(n);o.referenceCount--,Bs(e,"aria-describedby",o.messageElement.id),e.removeAttribute(yp)}_isElementDescribedByMessage(e,n){let o=Cp(e,"aria-describedby"),r=this._messageRegistry.get(n),a=r&&r.messageElement.id;return!!a&&o.indexOf(a)!=-1}_canBeDescribed(e,n){if(!this._isElementNode(e))return!1;if(n&&typeof n=="object")return!0;let o=n==null?"":`${n}`.trim(),r=e.getAttribute("aria-label");return o?!r||r.trim()!==o:!1}_isElementNode(e){return e.nodeType===this._document.ELEMENT_NODE}static \u0275fac=function(n){return new(n||t)};static \u0275prov=R({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();function X7(t,i){return typeof t=="string"?`${i||""}/${t}`:t}function vk(t,i){t.id||(t.id=`${Ck}-${i}-${Z7++}`)}var RQ=["mat-internal-form-field",""],NQ=["*"],Q1=(()=>{class t{labelPosition;static \u0275fac=function(n){return new(n||t)};static \u0275cmp=P({type:t,selectors:[["div","mat-internal-form-field",""]],hostAttrs:[1,"mdc-form-field","mat-internal-form-field"],hostVars:2,hostBindings:function(n,o){n&2&&oe("mdc-form-field--align-end",o.labelPosition==="before")},inputs:{labelPosition:"labelPosition"},attrs:RQ,ngContentSelectors:NQ,decls:1,vars:0,template:function(n,o){n&1&&(De(),ae(0))},styles:[`.mat-internal-form-field{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;display:inline-flex;align-items:center;vertical-align:middle}.mat-internal-form-field>label{margin-left:0;margin-right:auto;padding-left:4px;padding-right:0;order:0}[dir=rtl] .mat-internal-form-field>label{margin-left:auto;margin-right:0;padding-left:0;padding-right:4px}.mdc-form-field--align-end>label{margin-left:auto;margin-right:0;padding-left:0;padding-right:4px;order:-1}[dir=rtl] .mdc-form-field--align-end .mdc-form-field--align-end label{margin-left:0;margin-right:auto;padding-left:4px;padding-right:0} `],encapsulation:2,changeDetection:0})}return t})();var xk=(()=>{class t{static \u0275fac=function(n){return new(n||t)};static \u0275mod=J({type:t});static \u0275inj=X({})}return t})(),xp={XSmall:"(max-width: 599.98px)",Small:"(min-width: 600px) and (max-width: 959.98px)",Medium:"(min-width: 960px) and (max-width: 1279.98px)",Large:"(min-width: 1280px) and (max-width: 1919.98px)",XLarge:"(min-width: 1920px)",Handset:"(max-width: 599.98px) and (orientation: portrait), (max-width: 959.98px) and (orientation: landscape)",Tablet:"(min-width: 600px) and (max-width: 839.98px) and (orientation: portrait), (min-width: 960px) and (max-width: 1279.98px) and (orientation: landscape)",Web:"(min-width: 840px) and (orientation: portrait), (min-width: 1280px) and (orientation: landscape)",HandsetPortrait:"(max-width: 599.98px) and (orientation: portrait)",TabletPortrait:"(min-width: 600px) and (max-width: 839.98px) and (orientation: portrait)",WebPortrait:"(min-width: 840px) and (orientation: portrait)",HandsetLandscape:"(max-width: 959.98px) and (orientation: landscape)",TabletLandscape:"(min-width: 960px) and (max-width: 1279.98px) and (orientation: landscape)",WebLandscape:"(min-width: 1280px) and (orientation: landscape)"};var FQ=new L("MATERIAL_ANIMATIONS");var Mk=null;function k0(){return d(FQ,{optional:!0})?.animationsDisabled||d(Td,{optional:!0})==="NoopAnimations"?"di-disabled":(Mk??=d(hp).matchMedia("(prefers-reduced-motion)").matches,Mk?"reduced-motion":"enabled")}function Ue(){return k0()!=="enabled"}var cn=(()=>{class t{static \u0275fac=function(n){return new(n||t)};static \u0275cmp=P({type:t,selectors:[["structural-styles"]],decls:0,vars:0,template:function(n,o){},styles:[`.mat-focus-indicator{position:relative}.mat-focus-indicator::before{top:0;left:0;right:0;bottom:0;position:absolute;box-sizing:border-box;pointer-events:none;display:var(--mat-focus-indicator-display, none);border-width:var(--mat-focus-indicator-border-width, 3px);border-style:var(--mat-focus-indicator-border-style, solid);border-color:var(--mat-focus-indicator-border-color, transparent);border-radius:var(--mat-focus-indicator-border-radius, 4px)}.mat-focus-indicator:focus::before{content:""}@media(forced-colors: active){html{--mat-focus-indicator-display: block}} `],encapsulation:2,changeDetection:0})}return t})();var Pr=(function(t){return t[t.NORMAL=0]="NORMAL",t[t.NEGATED=1]="NEGATED",t[t.INVERTED=2]="INVERTED",t})(Pr||{}),Mp,el;function wp(){if(el==null){if(typeof document!="object"||!document||typeof Element!="function"||!Element)return el=!1,el;if(document.documentElement?.style&&"scrollBehavior"in document.documentElement.style)el=!0;else{let t=Element.prototype.scrollTo;t?el=!/\{\s*\[native code\]\s*\}/.test(t.toString()):el=!1}}return el}function K1(){if(typeof document!="object"||!document)return Pr.NORMAL;if(Mp==null){let t=document.createElement("div"),i=t.style;t.dir="rtl",i.width="1px",i.overflow="auto",i.visibility="hidden",i.pointerEvents="none",i.position="absolute";let e=document.createElement("div"),n=e.style;n.width="2px",n.height="1px",t.appendChild(e),document.body.appendChild(t),Mp=Pr.NORMAL,t.scrollLeft===0&&(t.scrollLeft=1,Mp=t.scrollLeft===0?Pr.NEGATED:Pr.INVERTED),t.remove()}return Mp}function J7(){return typeof __karma__<"u"&&!!__karma__||typeof jasmine<"u"&&!!jasmine||typeof jest<"u"&&!!jest||typeof Mocha<"u"&&!!Mocha}var X1,wk=["color","button","checkbox","date","datetime-local","email","file","hidden","image","month","number","password","radio","range","reset","search","submit","tel","text","time","url","week"];function e_(){if(X1)return X1;if(typeof document!="object"||!document)return X1=new Set(wk),X1;let t=document.createElement("input");return X1=new Set(wk.filter(i=>(t.setAttribute("type",i),t.type===i))),X1}function $n(t){return t==null?"":typeof t=="string"?t:`${t}px`}function yn(t){return t!=null&&`${t}`!="false"}function Dk(t,i=/\s+/){let e=[];if(t!=null){let n=Array.isArray(t)?t:`${t}`.split(i);for(let o of n){let r=`${o}`.trim();r&&e.push(r)}}return e}var rr=(function(t){return t[t.FADING_IN=0]="FADING_IN",t[t.VISIBLE=1]="VISIBLE",t[t.FADING_OUT=2]="FADING_OUT",t[t.HIDDEN=3]="HIDDEN",t})(rr||{}),t_=class{_renderer;element;config;_animationForciblyDisabledThroughCss;state=rr.HIDDEN;constructor(i,e,n,o=!1){this._renderer=i,this.element=e,this.config=n,this._animationForciblyDisabledThroughCss=o}fadeOut(){this._renderer.fadeOutRipple(this)}},Sk=Ns({passive:!0,capture:!0}),n_=class{_events=new Map;addHandler(i,e,n,o){let r=this._events.get(e);if(r){let a=r.get(n);a?a.add(o):r.set(n,new Set([o]))}else this._events.set(e,new Map([[n,new Set([o])]])),i.runOutsideAngular(()=>{document.addEventListener(e,this._delegateEventHandler,Sk)})}removeHandler(i,e,n){let o=this._events.get(i);if(!o)return;let r=o.get(e);r&&(r.delete(n),r.size===0&&o.delete(e),o.size===0&&(this._events.delete(i),document.removeEventListener(i,this._delegateEventHandler,Sk)))}_delegateEventHandler=i=>{let e=jn(i);e&&this._events.get(i.type)?.forEach((n,o)=>{(o===e||o.contains(e))&&n.forEach(r=>r.handleEvent(i))})}},E0={enterDuration:225,exitDuration:150},VQ=800,kk=Ns({passive:!0,capture:!0}),Ek=["mousedown","touchstart"],Ik=["mouseup","mouseleave","touchend","touchcancel"],BQ=(()=>{class t{static \u0275fac=function(n){return new(n||t)};static \u0275cmp=P({type:t,selectors:[["ng-component"]],hostAttrs:["mat-ripple-style-loader",""],decls:0,vars:0,template:function(n,o){},styles:[`.mat-ripple{overflow:hidden;position:relative}.mat-ripple:not(:empty){transform:translateZ(0)}.mat-ripple.mat-ripple-unbounded{overflow:visible}.mat-ripple-element{position:absolute;border-radius:50%;pointer-events:none;transition:opacity,transform 0ms cubic-bezier(0, 0, 0.2, 1);transform:scale3d(0, 0, 0);background-color:var(--mat-ripple-color, color-mix(in srgb, var(--mat-sys-on-surface) 10%, transparent))}@media(forced-colors: active){.mat-ripple-element{display:none}}.cdk-drag-preview .mat-ripple-element,.cdk-drag-placeholder .mat-ripple-element{display:none} @@ -700,4 +700,4 @@ If it declares any Font Awesome CSS pseudo-elements, they will not be rendered a MSFullscreenChange.lg.global`+this.core.lgId)},t})(),TR=Ele;var Th=function(){return Th=Object.assign||function(i){for(var e,n=1,o=arguments.length;n
- `;this.core.outer.addClass("lg-has-thumb"),this.settings.appendThumbnailsTo===".lg-components"?this.core.$lgComponents.append(e):this.core.outer.append(e),this.$thumbOuter=this.core.outer.find(".lg-thumb-outer").first(),this.$lgThumb=this.core.outer.find(".lg-thumb").first(),this.settings.animateThumb&&this.core.outer.find(".lg-thumb").css("transition-duration",this.core.settings.speed+"ms").css("width",this.thumbTotalWidth+"px").css("position","relative"),this.setThumbItemHtml(this.core.galleryItems)},t.prototype.enableThumbDrag=function(){var i=this,e={cords:{startX:0,endX:0},isMoved:!1,newTranslateX:0,startTime:new Date,endTime:new Date,touchMoveTime:0},n=!1;this.$thumbOuter.addClass("lg-grab"),this.core.outer.find(".lg-thumb").first().on("mousedown.lg.thumb",function(o){i.thumbTotalWidth>i.thumbOuterWidth&&(o.preventDefault(),e.cords.startX=o.pageX,e.startTime=new Date,i.thumbClickable=!1,n=!0,i.core.outer.get().scrollLeft+=1,i.core.outer.get().scrollLeft-=1,i.$thumbOuter.removeClass("lg-grab").addClass("lg-grabbing"))}),this.$LG(window).on("mousemove.lg.thumb.global"+this.core.lgId,function(o){i.core.lgOpened&&n&&(e.cords.endX=o.pageX,e=i.onThumbTouchMove(e))}),this.$LG(window).on("mouseup.lg.thumb.global"+this.core.lgId,function(){i.core.lgOpened&&(e.isMoved?e=i.onThumbTouchEnd(e):i.thumbClickable=!0,n&&(n=!1,i.$thumbOuter.removeClass("lg-grabbing").addClass("lg-grab")))})},t.prototype.enableThumbSwipe=function(){var i=this,e={cords:{startX:0,endX:0},isMoved:!1,newTranslateX:0,startTime:new Date,endTime:new Date,touchMoveTime:0};this.$lgThumb.on("touchstart.lg",function(n){i.thumbTotalWidth>i.thumbOuterWidth&&(n.preventDefault(),e.cords.startX=n.targetTouches[0].pageX,i.thumbClickable=!1,e.startTime=new Date)}),this.$lgThumb.on("touchmove.lg",function(n){i.thumbTotalWidth>i.thumbOuterWidth&&(n.preventDefault(),e.cords.endX=n.targetTouches[0].pageX,e=i.onThumbTouchMove(e))}),this.$lgThumb.on("touchend.lg",function(){e.isMoved?e=i.onThumbTouchEnd(e):i.thumbClickable=!0})},t.prototype.rebuildThumbnails=function(){var i=this;this.$thumbOuter.addClass("lg-rebuilding-thumbnails"),setTimeout(function(){i.thumbTotalWidth=i.core.galleryItems.length*(i.settings.thumbWidth+i.settings.thumbMargin),i.$lgThumb.css("width",i.thumbTotalWidth+"px"),i.$lgThumb.empty(),i.setThumbItemHtml(i.core.galleryItems),i.animateThumb(i.core.index)},50),setTimeout(function(){i.$thumbOuter.removeClass("lg-rebuilding-thumbnails")},200)},t.prototype.setTranslate=function(i){this.$lgThumb.css("transform","translate3d(-"+i+"px, 0px, 0px)")},t.prototype.getPossibleTransformX=function(i){return i>this.thumbTotalWidth-this.thumbOuterWidth&&(i=this.thumbTotalWidth-this.thumbOuterWidth),i<0&&(i=0),i},t.prototype.animateThumb=function(i){if(this.$lgThumb.css("transition-duration",this.core.settings.speed+"ms"),this.settings.animateThumb){var e=0;switch(this.settings.currentPagerPosition){case"left":e=0;break;case"middle":e=this.thumbOuterWidth/2-this.settings.thumbWidth/2;break;case"right":e=this.thumbOuterWidth-this.settings.thumbWidth}this.translateX=(this.settings.thumbWidth+this.settings.thumbMargin)*i-1-e,this.translateX>this.thumbTotalWidth-this.thumbOuterWidth&&(this.translateX=this.thumbTotalWidth-this.thumbOuterWidth),this.translateX<0&&(this.translateX=0),this.setTranslate(this.translateX)}},t.prototype.onThumbTouchMove=function(i){return i.newTranslateX=this.translateX,i.isMoved=!0,i.touchMoveTime=new Date().valueOf(),i.newTranslateX-=i.cords.endX-i.cords.startX,i.newTranslateX=this.getPossibleTransformX(i.newTranslateX),this.setTranslate(i.newTranslateX),this.$thumbOuter.addClass("lg-dragging"),i},t.prototype.onThumbTouchEnd=function(i){i.isMoved=!1,i.endTime=new Date,this.$thumbOuter.removeClass("lg-dragging");var e=i.endTime.valueOf()-i.startTime.valueOf(),n=i.cords.endX-i.cords.startX,o=Math.abs(n)/e;return o>.15&&i.endTime.valueOf()-i.touchMoveTime<30?(o+=1,o>2&&(o+=1),o=o+o*(Math.abs(n)/this.thumbOuterWidth),this.$lgThumb.css("transition-duration",Math.min(o-1,2)+"settings"),n=n*o,this.translateX=this.getPossibleTransformX(this.translateX-n),this.setTranslate(this.translateX)):this.translateX=i.newTranslateX,Math.abs(i.cords.endX-i.cords.startX)'),this.core.outer.find(".lg-toggle-thumb").first().on("click.lg",function(){i.core.outer.toggleClass("lg-components-open")}))},t.prototype.thumbKeyPress=function(){var i=this;this.$LG(window).on("keydown.lg.thumb.global"+this.core.lgId,function(e){!i.core.lgOpened||!i.settings.toggleThumb||(e.keyCode===38?(e.preventDefault(),i.core.outer.addClass("lg-components-open")):e.keyCode===40&&(e.preventDefault(),i.core.outer.removeClass("lg-components-open")))})},t.prototype.destroy=function(){this.settings.thumbnail&&(this.$LG(window).off(".lg.thumb.global"+this.core.lgId),this.core.LGel.off(".lg.thumb"),this.core.LGel.off(".thumb"),this.$thumbOuter.remove(),this.core.outer.removeClass("lg-has-thumb"))},t})(),PR=Ole;var Ph=function(){return Ph=Object.assign||function(i){for(var e,n=1,o=arguments.length;n':"";this.settings.actualSize&&(i+=''),this.core.outer.addClass("lg-use-transition-for-zoom"),this.core.$toolbar.first().append(i)},t.prototype.enableZoom=function(i){var e=this,n=this.settings.enableZoomAfter+i.detail.delay;this.$LG("body").first().hasClass("lg-from-hash")&&i.detail.delay?n=0:this.$LG("body").first().removeClass("lg-from-hash"),this.zoomableTimeout=setTimeout(function(){e.isImageSlide(e.core.index)&&(e.core.getSlideItem(i.detail.index).addClass("lg-zoomable"),i.detail.index===e.core.index&&e.setZoomEssentials())},n+30)},t.prototype.enableZoomOnSlideItemLoad=function(){this.core.LGel.on(as.slideItemLoad+".zoom",this.enableZoom.bind(this))},t.prototype.getDragCords=function(i){return{x:i.pageX,y:i.pageY}},t.prototype.getSwipeCords=function(i){var e=i.touches[0].pageX,n=i.touches[0].pageY;return{x:e,y:n}},t.prototype.getDragAllowedAxises=function(i,e){if(!this.containerRect)return{allowX:!1,allowY:!1};var n=this.core.getSlideItem(this.core.index).find(".lg-image").first().get(),o=0,r=0,a=n.getBoundingClientRect();i?(o=n.offsetHeight*i,r=n.offsetWidth*i):e?(o=a.height+e*a.height,r=a.width+e*a.width):(o=a.height,r=a.width);var s=o>this.containerRect.height,c=r>this.containerRect.width;return{allowX:c,allowY:s}},t.prototype.setZoomEssentials=function(){this.containerRect=this.core.$content.get().getBoundingClientRect()},t.prototype.zoomImage=function(i,e,n,o){if(!(!this.containerRect||Math.abs(e)<=0)){var r=this.containerRect.width/2+this.containerRect.left,a=this.containerRect.height/2+this.containerRect.top+this.scrollTop,s,c;i===1&&(this.positionChanged=!1);var m=this.getDragAllowedAxises(0,e),f=m.allowY,v=m.allowX;this.positionChanged&&(s=this.left/(this.scale-e),c=this.top/(this.scale-e),this.pageX=r-s,this.pageY=a-c,this.positionChanged=!1);var x=this.getPossibleSwipeDragCords(e),w,O,K=r-this.pageX,Y=a-this.pageY;if(i-e>1){var Z=(i-e)/Math.abs(e);K=(e<0?-K:K)+this.left*(Z+(e<0?-1:1)),Y=(e<0?-Y:Y)+this.top*(Z+(e<0?-1:1)),w=K/Z,O=Y/Z}else{var Z=(i-e)*e;w=K*Z,O=Y*Z}n&&(v?this.isBeyondPossibleLeft(w,x.minX)?w=x.minX:this.isBeyondPossibleRight(w,x.maxX)&&(w=x.maxX):i>1&&(wx.maxX&&(w=x.maxX)),f?this.isBeyondPossibleTop(O,x.minY)?O=x.minY:this.isBeyondPossibleBottom(O,x.maxY)&&(O=x.maxY):i>1&&(Ox.maxY&&(O=x.maxY))),this.setZoomStyles({x:w,y:O,scale:i}),this.left=w,this.top=O,o&&this.setZoomImageSize()}},t.prototype.resetImageTranslate=function(i){if(this.isImageSlide(i)){var e=this.core.getSlideItem(i).find(".lg-image").first();this.imageReset=!1,e.removeClass("reset-transition reset-transition-y reset-transition-x"),this.core.outer.removeClass("lg-actual-size"),e.css("width","auto").css("height","auto"),setTimeout(function(){e.removeClass("no-transition")},10)}},t.prototype.setZoomImageSize=function(){var i=this,e=this.core.getSlideItem(this.core.index).find(".lg-image").first();setTimeout(function(){var n=i.getCurrentImageActualSizeScale();i.scale>=n&&(e.addClass("no-transition"),i.imageReset=!0)},Zb),setTimeout(function(){var n=i.getCurrentImageActualSizeScale();if(i.scale>=n){var o=i.getDragAllowedAxises(i.scale);e.css("width",e.get().naturalWidth+"px").css("height",e.get().naturalHeight+"px"),i.core.outer.addClass("lg-actual-size"),o.allowX&&o.allowY?e.addClass("reset-transition"):o.allowX&&!o.allowY?e.addClass("reset-transition-x"):!o.allowX&&o.allowY&&e.addClass("reset-transition-y")}},Zb+50)},t.prototype.setZoomStyles=function(i){var e=this.core.getSlideItem(this.core.index).find(".lg-img-wrap").first(),n=this.core.getSlideItem(this.core.index).find(".lg-image").first(),o=this.core.outer.find(".lg-current .lg-dummy-img").first();this.scale=i.scale,n.css("transform","scale3d("+i.scale+", "+i.scale+", 1)"),o.css("transform","scale3d("+i.scale+", "+i.scale+", 1)");var r="translate3d("+i.x+"px, "+i.y+"px, 0)";e.css("transform",r)},t.prototype.setActualSize=function(i,e){var n=this;if(!this.zoomInProgress){this.zoomInProgress=!0;var o=this.core.galleryItems[this.core.index];this.resetImageTranslate(i),setTimeout(function(){if(!(!o.src||n.core.outer.hasClass("lg-first-slide-loading"))){var r=n.getCurrentImageActualSizeScale(),a=n.scale;n.core.outer.hasClass("lg-zoomed")?n.scale=1:n.scale=n.getScale(r),n.setPageCords(e),n.beginZoom(n.scale),n.zoomImage(n.scale,n.scale-a,!0,!0)}},50),setTimeout(function(){n.core.outer.removeClass("lg-grabbing").addClass("lg-grab")},60),setTimeout(function(){n.zoomInProgress=!1},Zb+110)}},t.prototype.getNaturalWidth=function(i){var e=this.core.getSlideItem(i).find(".lg-image").first(),n=this.core.galleryItems[i].width;return n?parseFloat(n):e.get().naturalWidth},t.prototype.getActualSizeScale=function(i,e){var n,o;return i>=e?(n=i/e,o=n||2):o=1,o},t.prototype.getCurrentImageActualSizeScale=function(){var i=this.core.getSlideItem(this.core.index).find(".lg-image").first(),e=i.get().offsetWidth,n=this.getNaturalWidth(this.core.index)||e;return this.getActualSizeScale(n,e)},t.prototype.getPageCords=function(i){var e={};if(i)e.x=i.pageX||i.touches[0].pageX,e.y=i.pageY||i.touches[0].pageY;else{var n=this.core.$content.get().getBoundingClientRect();e.x=n.width/2+n.left,e.y=n.height/2+this.scrollTop+n.top}return e},t.prototype.setPageCords=function(i){var e=this.getPageCords(i);this.pageX=e.x,this.pageY=e.y},t.prototype.manageActualPixelClassNames=function(){var i=this.core.getElementById("lg-actual-size");i.removeClass(this.settings.actualSizeIcons.zoomIn).addClass(this.settings.actualSizeIcons.zoomOut)},t.prototype.beginZoom=function(i){return this.core.outer.removeClass("lg-zoom-drag-transition lg-zoom-dragging"),i>1?(this.core.outer.addClass("lg-zoomed"),this.manageActualPixelClassNames()):this.resetZoom(),i>1},t.prototype.getScale=function(i){var e=this.getCurrentImageActualSizeScale();return i<1?i=1:i>e&&(i=e),i},t.prototype.init=function(){var i=this;if(this.settings.zoom){this.buildTemplates(),this.enableZoomOnSlideItemLoad();var e=null;this.core.outer.on("dblclick.lg",function(n){i.$LG(n.target).hasClass("lg-image")&&i.setActualSize(i.core.index,n)}),this.core.outer.on("touchstart.lg",function(n){var o=i.$LG(n.target);n.touches.length===1&&o.hasClass("lg-image")&&(e?(clearTimeout(e),e=null,n.preventDefault(),i.setActualSize(i.core.index,n)):e=setTimeout(function(){e=null},300))}),this.core.LGel.on(as.containerResize+".zoom "+as.rotateRight+".zoom "+as.rotateLeft+".zoom "+as.flipHorizontal+".zoom "+as.flipVertical+".zoom",function(){if(!(!i.core.lgOpened||!i.isImageSlide(i.core.index)||i.core.touchAction)){var n=i.core.getSlideItem(i.core.index).find(".lg-img-wrap").first();i.top=0,i.left=0,i.setZoomEssentials(),i.setZoomSwipeStyles(n,{x:0,y:0}),i.positionChanged=!0}}),this.$LG(window).on("scroll.lg.zoom.global"+this.core.lgId,function(){i.core.lgOpened&&(i.scrollTop=i.$LG(window).scrollTop())}),this.core.getElementById("lg-zoom-out").on("click.lg",function(){if(i.isImageSlide(i.core.index)){var n=0;i.imageReset&&(i.resetImageTranslate(i.core.index),n=50),setTimeout(function(){var o=i.scale-i.settings.scale;o<1&&(o=1),i.beginZoom(o),i.zoomImage(o,-i.settings.scale,!0,!i.settings.infiniteZoom)},n)}}),this.core.getElementById("lg-zoom-in").on("click.lg",function(){i.zoomIn()}),this.core.getElementById("lg-actual-size").on("click.lg",function(){i.setActualSize(i.core.index)}),this.core.LGel.on(as.beforeOpen+".zoom",function(){i.core.outer.find(".lg-item").removeClass("lg-zoomable")}),this.core.LGel.on(as.afterOpen+".zoom",function(){i.scrollTop=i.$LG(window).scrollTop(),i.pageX=i.core.outer.width()/2,i.pageY=i.core.outer.height()/2+i.scrollTop,i.scale=1}),this.core.LGel.on(as.afterSlide+".zoom",function(n){var o=n.detail.prevIndex;i.scale=1,i.positionChanged=!1,i.zoomInProgress=!1,i.resetZoom(o),i.resetImageTranslate(o),i.isImageSlide(i.core.index)&&i.setZoomEssentials()}),this.zoomDrag(),this.pinchZoom(),this.zoomSwipe(),this.zoomableTimeout=!1,this.positionChanged=!1,this.zoomInProgress=!1}},t.prototype.zoomIn=function(){if(this.isImageSlide(this.core.index)){var i=this.scale+this.settings.scale;this.settings.infiniteZoom||(i=this.getScale(i)),this.beginZoom(i),this.zoomImage(i,Math.min(this.settings.scale,i-this.scale),!0,!this.settings.infiniteZoom)}},t.prototype.resetZoom=function(i){this.core.outer.removeClass("lg-zoomed lg-zoom-drag-transition");var e=this.core.getElementById("lg-actual-size"),n=this.core.getSlideItem(i!==void 0?i:this.core.index);e.removeClass(this.settings.actualSizeIcons.zoomOut).addClass(this.settings.actualSizeIcons.zoomIn),n.find(".lg-img-wrap").first().removeAttr("style"),n.find(".lg-image").first().removeAttr("style"),this.scale=1,this.left=0,this.top=0,this.setPageCords()},t.prototype.getTouchDistance=function(i){return Math.sqrt((i.touches[0].pageX-i.touches[1].pageX)*(i.touches[0].pageX-i.touches[1].pageX)+(i.touches[0].pageY-i.touches[1].pageY)*(i.touches[0].pageY-i.touches[1].pageY))},t.prototype.pinchZoom=function(){var i=this,e=0,n=!1,o=1,r=0,a=this.core.getSlideItem(this.core.index);this.core.outer.on("touchstart.lg",function(s){if(a=i.core.getSlideItem(i.core.index),!!i.isImageSlide(i.core.index)&&s.touches.length===2){if(s.preventDefault(),i.core.outer.hasClass("lg-first-slide-loading"))return;o=i.scale||1,i.core.outer.removeClass("lg-zoom-drag-transition lg-zoom-dragging"),i.setPageCords(s),i.resetImageTranslate(i.core.index),i.core.touchAction="pinch",e=i.getTouchDistance(s)}}),this.core.$inner.on("touchmove.lg",function(s){if(s.touches.length===2&&i.core.touchAction==="pinch"&&(i.$LG(s.target).hasClass("lg-item")||a.get().contains(s.target))){s.preventDefault();var c=i.getTouchDistance(s),m=e-c;if(!n&&Math.abs(m)>5&&(n=!0),n){r=i.scale;var f=Math.max(1,o+-m*.02);i.scale=Math.round((f+Number.EPSILON)*100)/100;var v=i.scale-r;i.zoomImage(i.scale,Math.round((v+Number.EPSILON)*100)/100,!1,!1)}}}),this.core.$inner.on("touchend.lg",function(s){if(i.core.touchAction==="pinch"&&(i.$LG(s.target).hasClass("lg-item")||a.get().contains(s.target))){if(n=!1,e=0,i.scale<=1)i.resetZoom();else{var c=i.getCurrentImageActualSizeScale();if(i.scale>=c){var m=c-i.scale;m===0&&(m=.01),i.zoomImage(c,m,!1,!0)}i.manageActualPixelClassNames(),i.core.outer.addClass("lg-zoomed")}i.core.touchAction=void 0}})},t.prototype.touchendZoom=function(i,e,n,o,r){var a=e.x-i.x,s=e.y-i.y,c=Math.abs(a)/r+1,m=Math.abs(s)/r+1;c>2&&(c+=1),m>2&&(m+=1),a=a*c,s=s*m;var f=this.core.getSlideItem(this.core.index).find(".lg-img-wrap").first(),v={};v.x=this.left+a,v.y=this.top+s;var x=this.getPossibleSwipeDragCords();(Math.abs(a)>15||Math.abs(s)>15)&&(o&&(this.isBeyondPossibleTop(v.y,x.minY)?v.y=x.minY:this.isBeyondPossibleBottom(v.y,x.maxY)&&(v.y=x.maxY)),n&&(this.isBeyondPossibleLeft(v.x,x.minX)?v.x=x.minX:this.isBeyondPossibleRight(v.x,x.maxX)&&(v.x=x.maxX)),o?this.top=v.y:v.y=this.top,n?this.left=v.x:v.x=this.left,this.setZoomSwipeStyles(f,v),this.positionChanged=!0)},t.prototype.getZoomSwipeCords=function(i,e,n,o,r){var a={};if(o){if(a.y=this.top+(e.y-i.y),this.isBeyondPossibleTop(a.y,r.minY)){var s=r.minY-a.y;a.y=r.minY-s/6}else if(this.isBeyondPossibleBottom(a.y,r.maxY)){var c=a.y-r.maxY;a.y=r.maxY+c/6}}else a.y=this.top;if(n){if(a.x=this.left+(e.x-i.x),this.isBeyondPossibleLeft(a.x,r.minX)){var m=r.minX-a.x;a.x=r.minX-m/6}else if(this.isBeyondPossibleRight(a.x,r.maxX)){var f=a.x-r.maxX;a.x=r.maxX+f/6}}else a.x=this.left;return a},t.prototype.isBeyondPossibleLeft=function(i,e){return i>=e},t.prototype.isBeyondPossibleRight=function(i,e){return i<=e},t.prototype.isBeyondPossibleTop=function(i,e){return i>=e},t.prototype.isBeyondPossibleBottom=function(i,e){return i<=e},t.prototype.isImageSlide=function(i){var e=this.core.galleryItems[i];return this.core.getSlideType(e)==="image"},t.prototype.getPossibleSwipeDragCords=function(i){var e=this.core.getSlideItem(this.core.index).find(".lg-image").first(),n=this.core.mediaContainerPosition.bottom,o=e.get().getBoundingClientRect(),r=o.height,a=o.width;i&&(r=r+i*r,a=a+i*a);var s=(r-this.containerRect.height)/2,c=(this.containerRect.height-r)/2+n,m=(a-this.containerRect.width)/2,f=(this.containerRect.width-a)/2,v={minY:s,maxY:c,minX:m,maxX:f};return v},t.prototype.setZoomSwipeStyles=function(i,e){i.css("transform","translate3d("+e.x+"px, "+e.y+"px, 0)")},t.prototype.zoomSwipe=function(){var i=this,e={},n={},o=!1,r=!1,a=!1,s=new Date,c=new Date,m,f,v=this.core.getSlideItem(this.core.index);this.core.$inner.on("touchstart.lg",function(x){if(i.isImageSlide(i.core.index)&&(v=i.core.getSlideItem(i.core.index),(i.$LG(x.target).hasClass("lg-item")||v.get().contains(x.target))&&x.touches.length===1&&i.core.outer.hasClass("lg-zoomed"))){x.preventDefault(),s=new Date,i.core.touchAction="zoomSwipe",f=i.core.getSlideItem(i.core.index).find(".lg-img-wrap").first();var w=i.getDragAllowedAxises(0);a=w.allowY,r=w.allowX,(r||a)&&(e=i.getSwipeCords(x)),m=i.getPossibleSwipeDragCords(),i.core.outer.addClass("lg-zoom-dragging lg-zoom-drag-transition")}}),this.core.$inner.on("touchmove.lg",function(x){if(x.touches.length===1&&i.core.touchAction==="zoomSwipe"&&(i.$LG(x.target).hasClass("lg-item")||v.get().contains(x.target))){x.preventDefault(),i.core.touchAction="zoomSwipe",n=i.getSwipeCords(x);var w=i.getZoomSwipeCords(e,n,r,a,m);(Math.abs(n.x-e.x)>15||Math.abs(n.y-e.y)>15)&&(o=!0,i.setZoomSwipeStyles(f,w))}}),this.core.$inner.on("touchend.lg",function(x){if(i.core.touchAction==="zoomSwipe"&&(i.$LG(x.target).hasClass("lg-item")||v.get().contains(x.target))){if(x.preventDefault(),i.core.touchAction=void 0,i.core.outer.removeClass("lg-zoom-dragging"),!o)return;o=!1,c=new Date;var w=c.valueOf()-s.valueOf();i.touchendZoom(e,n,r,a,w)}})},t.prototype.zoomDrag=function(){var i=this,e={},n={},o=!1,r=!1,a=!1,s=!1,c,m,f,v;this.core.outer.on("mousedown.lg.zoom",function(x){if(i.isImageSlide(i.core.index)){var w=i.core.getSlideItem(i.core.index);if(i.$LG(x.target).hasClass("lg-item")||w.get().contains(x.target)){c=new Date,v=i.core.getSlideItem(i.core.index).find(".lg-img-wrap").first();var O=i.getDragAllowedAxises(0);s=O.allowY,a=O.allowX,i.core.outer.hasClass("lg-zoomed")&&i.$LG(x.target).hasClass("lg-object")&&(a||s)&&(x.preventDefault(),e=i.getDragCords(x),f=i.getPossibleSwipeDragCords(),o=!0,i.core.outer.removeClass("lg-grab").addClass("lg-grabbing lg-zoom-drag-transition lg-zoom-dragging"))}}}),this.$LG(window).on("mousemove.lg.zoom.global"+this.core.lgId,function(x){if(o){r=!0,n=i.getDragCords(x);var w=i.getZoomSwipeCords(e,n,a,s,f);i.setZoomSwipeStyles(v,w)}}),this.$LG(window).on("mouseup.lg.zoom.global"+this.core.lgId,function(x){if(o){if(m=new Date,o=!1,i.core.outer.removeClass("lg-zoom-dragging"),r&&(e.x!==n.x||e.y!==n.y)){n=i.getDragCords(x);var w=m.valueOf()-c.valueOf();i.touchendZoom(e,n,a,s,w)}r=!1}i.core.outer.removeClass("lg-grabbing").addClass("lg-grab")})},t.prototype.closeGallery=function(){this.resetZoom(),this.zoomInProgress=!1},t.prototype.destroy=function(){this.$LG(window).off(".lg.zoom.global"+this.core.lgId),this.core.LGel.off(".lg.zoom"),this.core.LGel.off(".zoom"),clearTimeout(this.zoomableTimeout),this.zoomableTimeout=!1},t})(),LR=Ple;function Lle(t,i){t&1&&(y(0),S(1,"translate")),t&2&&ee(" ",k(1,1,"labels.heading.Add Client Identifier")," ")}function Ale(t,i){if(t&1&&(y(0),S(1,"translate"),S(2,"translate")),t&2){let e=M();Ua(" ",k(1,3,"labels.heading.Upload")," ",e.entityType," ",k(2,5,"labels.heading.Documents")," ")}}function zle(t,i){if(t&1&&(h(0,"mat-option",10),y(1),_()),t&2){let e=i.$implicit;D("value",e.id),p(),ee(" ",e.name," ")}}function Rle(t,i){t&1&&(h(0,"mat-error"),y(1),S(2,"translate"),S(3,"translate"),h(4,"strong"),y(5),S(6,"translate"),_()()),t&2&&(p(),St(" ",k(2,3,"labels.inputs.Document Type")," ",k(3,5,"labels.commons.is")," "),p(4),T(k(6,7,"labels.commons.required")))}function Nle(t,i){if(t&1&&(h(0,"mat-option",10),y(1),_()),t&2){let e=i.$implicit;D("value",e.value),p(),ee(" ",e.label," ")}}function Fle(t,i){t&1&&(h(0,"mat-error"),y(1),S(2,"translate"),S(3,"translate"),h(4,"strong"),y(5),S(6,"translate"),_()()),t&2&&(p(),St(" ",k(2,3,"labels.inputs.Status")," ",k(3,5,"labels.commons.is")," "),p(4),T(k(6,7,"labels.commons.required")))}function Vle(t,i){t&1&&(h(0,"mat-error"),y(1),S(2,"translate"),S(3,"translate"),h(4,"strong"),y(5),S(6,"translate"),_()()),t&2&&(p(),St(" ",k(2,3,"labels.inputs.Document Key")," ",k(3,5,"labels.commons.is")," "),p(4),T(k(6,7,"labels.commons.required")))}function Ble(t,i){if(t&1&&(h(0,"mat-form-field",3)(1,"mat-label"),y(2),S(3,"translate"),_(),h(4,"mat-select",9),Xe(5,zle,2,2,"mat-option",10,ht),_(),E(7,Rle,7,9,"mat-error"),_(),h(8,"mat-form-field",3)(9,"mat-label"),y(10),S(11,"translate"),_(),h(12,"mat-select",11),Xe(13,Nle,2,2,"mat-option",10,ht),_(),E(15,Fle,7,9,"mat-error"),_(),h(16,"mat-form-field",3)(17,"mat-label"),y(18),S(19,"translate"),_(),F(20,"input",12),E(21,Vle,7,9,"mat-error"),_(),h(22,"mat-form-field",3)(23,"mat-label"),y(24),S(25,"translate"),_(),F(26,"input",13),_()),t&2){let e=M();p(2),T(k(3,7,"labels.inputs.Document Type")),p(3),Ze(e.allowedDocumentTypes),p(2),I(e.uploadDocumentForm.controls.documentTypeId!=null&&e.uploadDocumentForm.controls.documentTypeId.hasError("required")?7:-1),p(3),T(k(11,9,"labels.inputs.Status")),p(3),Ze(e.statusOptions),p(2),I(e.uploadDocumentForm.controls.status!=null&&e.uploadDocumentForm.controls.status.hasError("required")?15:-1),p(3),T(k(19,11,"labels.inputs.Document Key")),p(3),I(e.uploadDocumentForm.controls.documentKey!=null&&e.uploadDocumentForm.controls.documentKey.hasError("required")?21:-1),p(3),T(k(25,13,"labels.inputs.Description"))}}function jle(t,i){t&1&&(h(0,"mat-error"),y(1),S(2,"translate"),S(3,"translate"),h(4,"strong"),y(5),S(6,"translate"),_()()),t&2&&(p(),St(" ",k(2,3,"labels.inputs.File Name")," ",k(3,5,"labels.commons.is")," "),p(4),T(k(6,7,"labels.commons.required")))}function Hle(t,i){t&1&&(h(0,"mat-form-field",3)(1,"mat-label"),y(2),S(3,"translate"),_(),F(4,"input",13),_()),t&2&&(p(2),T(k(3,1,"labels.inputs.Description")))}function Ule(t,i){t&1&&(y(0),S(1,"translate")),t&2&&ee(" ",k(1,1,"labels.buttons.Add")," ")}function $le(t,i){t&1&&(y(0),S(1,"translate")),t&2&&ee(" ",k(1,1,"labels.buttons.Upload")," ")}var AR=(()=>{class t{constructor(){this.dialogRef=d(qt),this.formBuilder=d(Rs),this.data=d(En),this.uploadDocumentData=[],this.documentIdentifier=!1,this.allowedDocumentTypes=[],this.statusOptions=[];let e=this.data;this.documentIdentifier=e.documentIdentifier,this.entityType=e.entityType,this.allowedDocumentTypes=e.allowedDocumentTypes||[],this.statusOptions=e.statusOptions||[]}ngOnInit(){this.createUploadDocumentForm()}createUploadDocumentForm(){this.documentIdentifier?this.uploadDocumentForm=this.formBuilder.group({documentTypeId:["",en.required],status:["Active",en.required],documentKey:["",en.required],description:[""],fileName:["",en.required],file:[""]}):this.uploadDocumentForm=this.formBuilder.group({fileName:["",en.required],description:[""],file:[""]})}onFileSelect(e){if(e.target.files.length>0){let n=e.target.files[0];this.uploadDocumentForm.get("file").setValue(n)}}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275cmp=P({type:t,selectors:[["mifosx-upload-document-dialog"]],decls:21,vars:14,consts:[["mat-dialog-title",""],[1,"m-l-10","m-r-10"],[1,"layout-column",3,"formGroup"],[1,"flex-fill"],["formControlName","fileName","required","","matInput",""],["flex","60%",3,"change"],["align","end"],["mat-raised-button","","mat-dialog-close",""],["mat-raised-button","","color","primary",3,"disabled","mat-dialog-close"],["formControlName","documentTypeId","required",""],[3,"value"],["formControlName","status","required",""],["formControlName","documentKey","required","","matInput",""],["formControlName","description","matInput",""]],template:function(n,o){n&1&&(h(0,"h1",0),E(1,Lle,2,3)(2,Ale,3,7),_(),h(3,"div",1)(4,"form",2),E(5,Ble,27,15),h(6,"mat-form-field",3)(7,"mat-label"),y(8),S(9,"translate"),_(),F(10,"input",4),E(11,jle,7,9,"mat-error"),_(),E(12,Hle,5,3,"mat-form-field",3),h(13,"mifosx-file-upload",5),N("change",function(a){return o.onFileSelect(a)}),_(),h(14,"mat-dialog-actions",6)(15,"button",7),y(16),S(17,"translate"),_(),h(18,"button",8),E(19,Ule,2,3)(20,$le,2,3),_()()()()),n&2&&(p(),I(o.documentIdentifier?1:2),p(3),D("formGroup",o.uploadDocumentForm),p(),I(o.documentIdentifier?5:-1),p(3),T(k(9,10,"labels.inputs.File Name")),p(3),I(o.uploadDocumentForm.controls.fileName.hasError("required")?11:-1),p(),I(o.documentIdentifier?-1:12),p(4),T(k(17,12,"labels.buttons.Cancel")),p(2),D("disabled",!o.uploadDocumentForm.valid)("mat-dialog-close",o.uploadDocumentForm.value),p(),I(o.documentIdentifier?19:20))},dependencies:[he,ve,zs,yi,mn,tr,Ir,ui,Ao,Bt,Cn,ao,ti,qn,ln,vt,xn,Af,zn,Ln,Te],encapsulation:2})}}return t})();var zR=(()=>{class t{constructor(){this.previewCache=new Map}isPreviewable(e){let n=this.detectType(e.mimeType,e.fileName,e.fileData);return n==="image"||n==="pdf"}resolvePreviewUrl(e,n){return Hr(this,null,function*(){let o=this.previewCache.get(e.id);if(o)return{url:o.url,type:o.type};let r=this.getInlineData(e);if(r){let m=this.detectType(r.mimeType,e.fileName,e.fileData);return this.previewCache.set(e.id,{url:r.url,type:m,isObjectUrl:r.isObjectUrl}),{url:r.url,type:m}}let a=yield L6(n(e)),s=URL.createObjectURL(a),c=this.detectType(a.type||e.mimeType,e.fileName,e.fileData);return this.previewCache.set(e.id,{url:s,type:c,isObjectUrl:!0}),{url:s,type:c}})}release(e){let n=this.previewCache.get(e);n?.isObjectUrl&&URL.revokeObjectURL(n.url),this.previewCache.delete(e)}clear(){this.previewCache.forEach(e=>{e.isObjectUrl&&URL.revokeObjectURL(e.url)}),this.previewCache.clear()}getInlineData(e){if(!e.fileData)return null;let n=e.fileData.match(/^data:(.*?);/);return{url:e.fileData,mimeType:n?n[1]:e.mimeType,isObjectUrl:!1}}detectType(e,n,o){let r=(e||this.extractMimeFromData(o)||"").toLowerCase();if(r.includes("pdf"))return"pdf";if(r.startsWith("image/"))return"image";let a=(n||"").split(".").pop()?.toLowerCase();return a==="pdf"?"pdf":a&&["jpg","jpeg","png","gif","bmp","webp","svg"].includes(a)?"image":"other"}extractMimeFromData(e){if(!e||!e.startsWith("data:"))return;let n=e.match(/^data:(.*?);/);return n?n[1]:void 0}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275prov=R({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();var Gle=["lightboxRoot"];function Wle(t,i){if(t&1){let e=le();h(0,"div",7)(1,"button",8),N("click",function(){G(e);let o=M();return W(o.uploadDocument())}),F(2,"fa-icon",9),y(3),S(4,"translate"),_()()}t&2&&(p(3),ee("",k(4,1,"labels.buttons.Add")," "))}function qle(t,i){if(t&1&&F(0,"img",13),t&2){let e=M().$implicit,n=M(2);D("src",n.previewThumbnails[e.id],_1)("alt",e.name)("title",e.name)}}function Yle(t,i){if(t&1&&(h(0,"div",14),F(1,"fa-icon",22),h(2,"span"),y(3),_()()),t&2){let e=M().$implicit;p(3),T(e.fileName||e.name)}}function Qle(t,i){t&1&&(h(0,"div",15),F(1,"fa-icon",23),_())}function Kle(t,i){if(t&1&&(h(0,"div",18),y(1),_()),t&2){let e=M().$implicit;p(),T(e.fileName)}}function Xle(t,i){if(t&1&&(h(0,"div",19),y(1),_()),t&2){let e=M().$implicit;p(),T(e.description)}}function Zle(t,i){if(t&1){let e=le();h(0,"button",24),S(1,"translate"),N("click",function(){G(e);let o=M().$implicit,r=M(2);return W(r.deleteDocument(o.id,o.name))}),F(2,"fa-icon",25),_()}t&2&&ne("aria-label",k(1,1,"labels.buttons.Delete"))}function Jle(t,i){if(t&1){let e=le();h(0,"div",11)(1,"div",12),S(2,"translate"),N("keydown.enter",function(){let o=G(e).$implicit,r=M(2);return W(r.isPreviewable(o)&&r.openPreview(o))})("keydown.space",function(){let o=G(e).$implicit,r=M(2);return W(r.isPreviewable(o)&&r.openPreview(o))})("click",function(){let o=G(e).$implicit,r=M(2);return W(r.isPreviewable(o)&&r.openPreview(o))}),E(3,qle,1,3,"img",13)(4,Yle,4,1,"div",14),E(5,Qle,2,0,"div",15),_(),h(6,"div",16)(7,"div",17),y(8),_(),E(9,Kle,2,1,"div",18),E(10,Xle,2,1,"div",19),h(11,"div",20),ot(12,Zle,3,3,"button",21),_()()()}if(t&2){let e=i.$implicit,n=M(2);p(),oe("clickable",n.isPreviewable(e)),ne("aria-label",k(2,9,"labels.buttons.Preview")+": "+e.name),p(2),I(n.previewThumbnails[e.id]?3:4),p(2),I(n.isPreviewable(e)?5:-1),p(3),T(e.name),p(),I(e.fileName?9:-1),p(),I(e.description?10:-1),p(2),D("mifosxHasPermission","DELETE_DOCUMENT")}}function e1e(t,i){if(t&1&&(h(0,"div")(1,"div",10),Xe(2,Jle,13,11,"div",11,M5().trackByDocumentId,!0),_()()),t&2){let e=M();p(2),Ze(e.entityDocuments)}}function t1e(t,i){t&1&&(h(0,"div",5)(1,"p"),y(2),S(3,"translate"),_(),h(4,"p",26),y(5),S(6,"translate"),_()()),t&2&&(p(2),T(k(3,2,"labels.text.NoDocuments")),p(3),T(k(6,4,"labels.text.UploadDocumentHint")))}var RR=(()=>{class t{constructor(){this.dialog=d(Wi),this.savingsService=d(Ih),this.loansService=d(Eh),this.clientsService=d(kh),this.documentPreviewService=d(zR),this.previewThumbnails={},this.lightboxInstance=null,this.lightboxPlugins=[LR,PR,TR]}ngOnInit(){this.prefetchThumbnails()}ngOnDestroy(){this.destroyLightbox(),Array.isArray(this.entityDocuments)&&this.entityDocuments.forEach(e=>this.documentPreviewService.release(e.id))}trackByDocumentId(e,n){return n?.id}uploadDocument(){this.dialog.open(AR,{data:{documentIdentifier:!1,entityType:""},width:"33rem"}).afterClosed().subscribe(n=>{if(n){let o=new FormData;o.append("name",n.fileName),o.append("file",n.file),o.append("description",n.description),this.callbackUpload(o).subscribe(r=>{let a={id:r.resourceId,parentEntityType:this.entityType,parentEntityId:this.entityId,name:n.fileName,description:n.description,fileName:n.file.name};this.entityDocuments.push(a),this.setThumbnail(a)})}})}deleteDocument(e,n){this.dialog.open(Rr,{data:{deleteContext:`Document: ${n}`}}).afterClosed().subscribe(r=>{if(r.delete){this.callbackDelete(e);let a=this.entityDocuments.findIndex(s=>s.id===e);a!==-1&&this.entityDocuments.splice(a,1),this.documentPreviewService.release(e),delete this.previewThumbnails[e]}})}isPreviewable(e){return this.documentPreviewService.isPreviewable(e)}openPreview(e){return Hr(this,null,function*(){if(this.isPreviewable(e))try{let n=this.entityDocuments.filter(a=>this.isPreviewable(a)),o=[];for(let a of n)try{let s=yield this.documentPreviewService.resolvePreviewUrl(a,c=>this.getDownloadObservable(c.id));s.type==="image"&&(this.previewThumbnails[a.id]=s.url),o.push({src:s.url,thumb:s.type==="image"?s.url:void 0,subHtml:this.buildSubHtml(a),iframe:s.type==="pdf"})}catch(s){console.error("Preview failed for document",a.id,s)}if(!o.length)return;let r=Math.max(0,n.findIndex(a=>a.id===e.id));this.destroyLightbox(),this.lightboxInstance=OR(this.lightboxRoot.nativeElement,{dynamic:!0,dynamicEl:o,plugins:this.lightboxPlugins,download:!1,closable:!0,escKey:!0,zoomFromOrigin:!0}),this.lightboxInstance.openGallery(r)}catch(n){console.error("Unable to open preview",n)}})}destroyLightbox(){this.lightboxInstance&&(this.lightboxInstance.destroy(),this.lightboxInstance=null)}getDownloadObservable(e){return this.entityType==="savings"?this.savingsService.downloadSavingsDocument(this.entityId,e):this.entityType==="loans"?this.loansService.downloadLoanDocument(this.entityId,e):this.clientsService.downloadClientDocument(this.entityId,e)}buildSubHtml(e){let n=e.description?`

${this.escapeHtml(e.description)}

`:"",o=e.fileName?`

${this.escapeHtml(e.fileName)}

`:"";return`

${this.escapeHtml(e.name||"Document")}

${n}${o}
`}escapeHtml(e){return e?e.replace(/&/g,"&").replace(//g,">").replace(/"/g,"""):""}setThumbnail(e){this.documentPreviewService.isPreviewable(e)&&this.documentPreviewService.resolvePreviewUrl(e,()=>this.getDownloadObservable(e.id)).then(n=>{n.type==="image"&&(this.previewThumbnails[e.id]=n.url)}).catch(()=>{})}prefetchThumbnails(){Array.isArray(this.entityDocuments)&&this.entityDocuments.forEach(e=>this.setThumbnail(e))}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275cmp=P({type:t,selectors:[["mifosx-entity-documents-tab"]],viewQuery:function(n,o){if(n&1&&ue(Gle,7),n&2){let r;U(r=$())&&(o.lightboxRoot=r.first)}},inputs:{entityId:"entityId",entityType:"entityType",entityDocuments:"entityDocuments",callbackUpload:"callbackUpload",callbackDelete:"callbackDelete"},decls:10,vars:5,consts:[["lightboxRoot",""],[1,"tab-container","mat-typography"],[1,"layout-row","align-start-center","header-row"],[1,"flex-90"],["class","flex-10",4,"mifosxHasPermission"],[1,"empty-state"],[1,"document-lightbox-host"],[1,"flex-10"],["mat-raised-button","","color","primary",1,"f-right",3,"click"],["icon","plus",1,"m-r-10"],[1,"document-grid"],[1,"document-card"],["role","button","tabindex","0",1,"thumb",3,"keydown.enter","keydown.space","click"],["loading","lazy",3,"src","alt","title"],[1,"placeholder"],[1,"preview-overlay"],[1,"card-body"],[1,"title"],[1,"meta"],[1,"description"],[1,"actions"],["mat-icon-button","","color","warn","title","Delete",3,"click",4,"mifosxHasPermission"],["icon","file"],["icon","eye"],["mat-icon-button","","color","warn","title","Delete",3,"click"],["icon","times"],[1,"muted"]],template:function(n,o){n&1&&(h(0,"div",1)(1,"div",2)(2,"h3",3),y(3),S(4,"translate"),_(),ot(5,Wle,5,3,"div",4),_(),E(6,e1e,4,0,"div")(7,t1e,7,6,"div",5),_(),F(8,"div",6,0)),n&2&&(p(3),T(k(4,3,"labels.heading.Documents")),p(2),D("mifosxHasPermission","CREATE_DOCUMENT"),p(),I(o.entityDocuments!=null&&o.entityDocuments.length?6:7))},dependencies:[he,ve,vt,Ps,Yt,Te],styles:[".column-mandatory[_ngcontent-%COMP%]{color:#5cb85c;text-align:center}.not-column-mandatory[_ngcontent-%COMP%]{color:#666f73;text-align:center}.cdk-drag-placeholder[_ngcontent-%COMP%]{background:#3498db}.yes[_ngcontent-%COMP%]{color:#5cb85c!important;background-color:#5cb85c;height:4px;cursor:none}.no[_ngcontent-%COMP%]{color:red;background-color:red;height:4px;cursor:none}.strike[_ngcontent-%COMP%]{text-decoration:line-through;color:red}.transfer[_ngcontent-%COMP%]{color:#16a085}.linked[_ngcontent-%COMP%]{color:#4461e2}.accrual[_ngcontent-%COMP%]{color:#999}.fa-question[_ngcontent-%COMP%]{color:#4461e2}.enabled[_ngcontent-%COMP%]{color:#32cd32}.disabled[_ngcontent-%COMP%]{color:#f44366}.tab-container[_ngcontent-%COMP%]{padding:1rem;margin:1rem 0}.header-row[_ngcontent-%COMP%]{display:flex;align-items:center}.document-grid[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;gap:1rem;margin-top:.75rem}.document-card[_ngcontent-%COMP%]{width:240px;background:#fff;border:1px solid #bdc3c7;border-radius:4px;overflow:hidden;box-shadow:0 1px 4px #353b3b1f;display:flex;flex-direction:column;transition:transform .2s ease,box-shadow .2s ease}.document-card[_ngcontent-%COMP%]:hover{transform:translateY(-1px);box-shadow:0 4px 12px #353b3b24}.thumb[_ngcontent-%COMP%]{position:relative;background:#ecf0f1;min-height:9.5rem;display:flex;align-items:center;justify-content:center;cursor:default}.thumb.clickable[_ngcontent-%COMP%]{cursor:pointer}.thumb[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{width:100%;height:100%;object-fit:cover}.preview-overlay[_ngcontent-%COMP%]{position:absolute;bottom:.5rem;right:.5rem;background:#ffffffe6;border-radius:50%;padding:.4rem;color:#3498db;display:flex;align-items:center;justify-content:center;opacity:0;transition:opacity .2s ease}.thumb[_ngcontent-%COMP%]:hover .preview-overlay[_ngcontent-%COMP%], .thumb[_ngcontent-%COMP%]:focus .preview-overlay[_ngcontent-%COMP%]{opacity:1}.placeholder[_ngcontent-%COMP%]{color:#f5f5f5;text-align:center;padding:.875rem;display:flex;flex-direction:column;gap:8px;align-items:center;justify-content:center}.placeholder[_ngcontent-%COMP%] fa-icon[_ngcontent-%COMP%]{font-size:22px}.placeholder[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{font-size:12px;line-height:1.2}.preview-btn[_ngcontent-%COMP%]{position:absolute;right:.5rem;bottom:.5rem;background:#000000a6;color:#fff}.card-body[_ngcontent-%COMP%]{padding:.75rem .875rem .875rem;display:flex;flex-direction:column;gap:.375rem}.title[_ngcontent-%COMP%]{font-weight:700;color:#353b3b}.meta[_ngcontent-%COMP%]{font-size:12px;color:#7f8c8d}.description[_ngcontent-%COMP%]{font-size:13px;color:#353b3b;min-height:32px}.actions[_ngcontent-%COMP%]{display:flex;justify-content:flex-end;gap:.375rem;margin-top:.25rem}.empty-state[_ngcontent-%COMP%]{margin-top:.75rem;padding:1.25rem;text-align:center;background:#f5f5f5;border:1px dashed #bdc3c7;border-radius:4px;color:#353b3b;display:flex;flex-direction:column;gap:.5rem;align-items:center}.empty-state[_ngcontent-%COMP%] .muted[_ngcontent-%COMP%]{color:#95a5a6;margin:.25rem 0 0;font-size:.8125rem}.document-lightbox-host[_ngcontent-%COMP%]{display:none}"]})}}return t})();var Lh=class extends nr{constructor(i){super(i),this.controlType="checkbox"}};var Ah=class extends nr{constructor(i={}){super(i),this.controlType="datepicker",this.minDate=i.minDate||new Date(2e3,0,1),this.maxDate=i.maxDate||new Date}};var zh=class extends nr{constructor(i={}){super(i),this.controlType="datetimepicker",this.minDate=i.minDate||new Date(2e3,0,1),this.maxDate=i.maxDate||new Date}};var Rh=class extends nr{constructor(i={}){super(i),this.controlType="input",this.type=i.type||"text"}};var Nh=class extends nr{constructor(i={}){super(i),this.controlType="select",this.options=i.options||{label:"",value:"",data:[]}}};var Fh=(()=>{class t{constructor(){this.dateUtils=d(go),this.settingsService=d(Xt),this.systemFields=["id","created_at","updated_at"],this.entitiesIdFields=["client_id","savings_account_id","savings_transaction_id","loan_id","group_id","center_id","office_id","product_loan_id","savings_product_id","share_product_id"]}getFormfields(e,n,o){return e.map(r=>{let a=this.toDisplayLabel(r.columnName);switch(r.columnDisplayType){case"INTEGER":case"STRING":case"DECIMAL":case"TEXT":return new Rh({controlName:r.columnName,label:a,value:"",type:r.columnDisplayType==="INTEGER"||r.columnDisplayType==="DECIMAL"?"number":"text",required:!r.isColumnNullable});case"BOOLEAN":return new Lh({controlName:r.columnName,label:a,value:"",type:"checkbox",required:!r.isColumnNullable});case"CODELOOKUP":return new Nh({controlName:r.columnName,label:a,value:"",options:{label:"value",value:"id",data:r.columnValues},required:!r.isColumnNullable});case"DATE":return n.push(r.columnName),o.dateFormat||(o.dateFormat=go.DEFAULT_DATEFORMAT),new Ah({controlName:r.columnName,label:a,value:"",maxDate:this.settingsService.maxAllowedDate,required:!r.isColumnNullable});case"DATETIME":return n.push(r.columnName),o.dateFormat=go.DEFAULT_DATETIMEFORMAT,new zh({controlName:r.columnName,label:a,value:"",maxDate:this.settingsService.maxAllowedDate,required:!r.isColumnNullable})}})}isEntityId(e){return this.entitiesIdFields.includes(e)}isSystemColumn(e){return this.systemFields.includes(e)||this.entitiesIdFields.includes(e)}filterSystemColumns(e){return e.filter((n,o)=>{if(!this.isSystemColumn(n.columnName))return n.idx=o,n})}getInputName(e){return e.columnName&&e.columnName.includes("_cd_")?e.columnName.split("_cd_")[0]:e.columnName}isNumeric(e){return this.isColumnType(e,"INTEGER")||this.isColumnType(e,"DECIMAL")}isDate(e){return this.isColumnType(e,"DATE")||this.isColumnType(e,"DATETIME")}isBoolean(e){return this.isColumnType(e,"BOOLEAN")}isDropdown(e){return this.isColumnType(e,"CODELOOKUP")}isString(e){return this.isColumnType(e,"STRING")}isText(e){return this.isColumnType(e,"TEXT")}isColumnType(e,n){return e===n}buildPayload(e,n,o,r){let a=!1;return e.forEach(s=>{let c=this.getInputName(s);this.isNumeric(s.columnDisplayType)?r[s.columnName]=n[c]*1:this.isDate(s.columnDisplayType)?(r[s.columnName]=this.dateUtils.formatDate(n[c],o),a=!0):r[s.columnName]=n[c]}),a&&(r.dateFormat=o),r}isSystemDefined(e){return this.systemFields.includes(e)}getName(e){return e&&e.includes("_cd_")?e.split("_cd_")[0]:e}toDisplayLabel(e){if(!e)return"";if(e.includes("_cd_")){let n=e.split("_cd_");if(n.length>1&&n[1]&&n[1].trim())return n[1].split("_").filter(r=>r.trim()&&r.toLowerCase()!=="cd").map(r=>r.charAt(0).toUpperCase()+r.slice(1).toLowerCase()).join(" ")||n[1].trim()}return e.split("_").filter(n=>n.trim()&&n.toLowerCase()!=="cd").map(n=>n.charAt(0).toUpperCase()+n.slice(1).toLowerCase()).join(" ")||e}getCodeLookupValue(e,n){if(!e?.columnValues||n===null||n===void 0)return"";let o=e.columnValues.find(r=>r.id===n);return o?o.value:n.toString()}getCodeName(e){return e&&e.includes("_cd_")?e.split("_cd_")[0]:""}isValidUrl(e){try{let n=new URL(e);return n.protocol.startsWith("http")||n.protocol.startsWith("https")}catch{return!1}}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275prov=R({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();var n1e=["dataTable"];function i1e(t,i){if(t&1){let e=le();h(0,"span")(1,"button",11),N("click",function(){G(e);let o=M();return W(o.add())}),F(2,"fa-icon",12),y(3),S(4,"translate"),_()()}t&2&&(p(3),ee("",k(4,1,"labels.buttons.Add")," "))}function o1e(t,i){if(t&1){let e=le();h(0,"span")(1,"button",13),N("click",function(){G(e);let o=M(2);return W(o.deleteSelected())}),F(2,"fa-icon",14),y(3),S(4,"translate"),_()()}t&2&&(p(3),ee(" ",k(4,1,"labels.buttons.Delete Selected")," "))}function r1e(t,i){if(t&1&&(Vi(0),E(1,o1e,5,3,"span"),Bi()),t&2){let e=M();p(),I(e.isSelected?1:-1)}}function a1e(t,i){if(t&1){let e=le();h(0,"span")(1,"button",13),N("click",function(){G(e);let o=M(2);return W(o.delete())}),F(2,"fa-icon",14),y(3),S(4,"translate"),_()()}t&2&&(p(3),ee(" ",k(4,1,"labels.buttons.Delete All")," "))}function s1e(t,i){if(t&1&&(Vi(0),E(1,a1e,5,3,"span"),Bi()),t&2){let e=M();p(),I(e.datatableData.length>0?1:-1)}}function c1e(t,i){t&1&&F(0,"th",17)}function l1e(t,i){if(t&1){let e=le();h(0,"td",18)(1,"mat-checkbox",19),N("click",function(o){return G(e),W(o.stopPropagation())})("change",function(o){let r=G(e).$implicit,a=M(3);return W(o?a.itemToggle(r):null)}),_()()}if(t&2){let e=i.$implicit,n=M(3);p(),D("checked",n.selection.isSelected(e))}}function d1e(t,i){t&1&&ot(0,c1e,1,0,"th",15)(1,l1e,2,1,"td",16)}function u1e(t,i){if(t&1&&(h(0,"th",22),y(1),_()),t&2){let e=M(2).$implicit,n=M();p(),T(n.getInputName(e))}}function m1e(t,i){if(t&1&&(h(0,"td",23),y(1),_()),t&2){let e=i.$implicit,n=M(2).$implicit,o=M();D("ngClass",o.isToDelete(e)),p(),ee(" ",o.formatValue(e,n)," ")}}function p1e(t,i){t&1&&ot(0,u1e,2,1,"th",20)(1,m1e,2,2,"td",21)}function f1e(t,i){if(t&1&&(Vi(0,8),E(1,d1e,2,0),E(2,p1e,2,0),Bi()),t&2){let e=i.$implicit,n=i.$index;D("matColumnDef",e),p(),I(n===0?1:-1),p(),I(n>0?2:-1)}}function h1e(t,i){t&1&&F(0,"tr",24)}function g1e(t,i){t&1&&F(0,"tr",25)}var Vh=(()=>{class t{constructor(){this.route=d(ro),this.dateUtils=d(go),this.systemService=d(O2),this.settingsService=d(Xt),this.dialog=d(Wi),this.datatables=d(Fh),this.dateFormat=d(Lo),this.dateTimeFormat=d(ca),this.numberFormat=d(Zd),this.SELECT_NAME_FIELD="select",this.datatableColumns=[],this.isSelected=!1,this.isLoading=!1}ngOnInit(){this.selection=new uo(!0,[]),this.route.params.subscribe(e=>{this.datatableName=e.datatableName}),this.setData(),this.isSelected=!1}ngOnDestroy(){this.resetData()}ngOnChanges(e){this.setData()}setData(){this.datatableColumns=[this.SELECT_NAME_FIELD],this.dataObject.columnHeaders.filter(e=>{if(!this.datatables.isEntityId(e.columnName))return this.datatableColumns.push(e.columnName),e}),this.datatableData=this.dataObject.data,this.dataTableRef&&this.dataTableRef.renderRows()}resetData(){this.datatableName=null,this.datatableColumns=null,this.datatableData=null}getData(){this.isLoading=!0,this.systemService.getEntityDatatable(this.entityId,this.datatableName).subscribe(e=>{this.dataObject.data=e.data,this.showDeleteBotton=!1,this.dataTableRef&&this.setData(),this.isSelected=!1,this.isLoading=!1})}add(){let e={locale:this.settingsService.language.code},n=[],o=this.datatables.filterSystemColumns(this.dataObject.columnHeaders),r=this.datatables.getFormfields(o,n,e),a={title:"Add "+this.datatableName+" for "+this.entityType,formfields:r};this.dialog.open(es,{data:a,width:"50rem"}).afterClosed().subscribe(c=>{c.data&&(n.forEach(m=>{c.data.value[m]=this.dateUtils.formatDate(c.data.value[m],e.dateFormat)}),e=q(q({},c.data.value),e),this.systemService.addEntityDatatableEntry(this.entityId,this.datatableName,e).subscribe(m=>{this.getData()}))})}delete(){this.dialog.open(Rr,{data:{deleteContext:`the contents of ${this.datatableName}`}}).afterClosed().subscribe(n=>{n.delete&&this.systemService.deleteDatatableContent(this.entityId,this.datatableName).subscribe(()=>{this.getData()})})}deleteSelected(){this.dialog.open(Rr,{data:{deleteContext:`the ${this.selection.selected.length} items selected of ${this.datatableName}`}}).afterClosed().subscribe(n=>{n.delete?(this.isSelected=!1,this.selection.selected.forEach(o=>{this.systemService.deleteDatatableEntry(this.entityId,o.row[0],this.datatableName).subscribe(()=>{this.datatableData.forEach((r,a)=>{r.row[0]===o.row[0]&&(this.datatableData.splice(a,1),this.dataTableRef.renderRows(),this.selection=new uo(!0,[]),this.isSelected=this.selection.selected.length>0)})})})):(this.selection=new uo(!0,[]),this.isSelected=this.selection.selected.length>0)})}formatValue(e,n){let o="";if(this.dataObject.columnHeaders){let r=0;this.dataObject.columnHeaders.some(a=>{if(a.columnName===n){let s=a.columnDisplayType;if(o=e.row[r],s==="DATE")o=this.dateFormat.transform(o);else if(s==="DATETIME")o=this.dateTimeFormat.transform(o);else if(s==="INTEGER"||s==="DECIMAL")typeof o=="number"&&(o=this.numberFormat.transform(o));else if(s==="CODELOOKUP"&&a.columnValues&&o!==null&&o!==void 0){let c=a.columnValues.find(m=>m.id===o);o=c?c.value:o}return!0}r+=1})}return o}isAllSelected(){let e=this.selection.selected;return this.datatableData.length===e}isAnySelected(){return this.selection.selected&&this.selection.selected.length>0}masterToggle(e){e.checked?this.datatableData.forEach(n=>this.selection.select(n)):this.selection=new uo(!0,[]),this.isSelected=this.selection.selected.length>0}itemToggle(e){this.selection.toggle(e),this.isSelected=this.selection.selected.length>0}checkboxLabel(e){return e?`${this.selection.isSelected(e)?"deselect":"select"} row ${e.position+1}`:`${this.isAllSelected()?"select":"deselect"} all`}isToDelete(e){return this.selection.isSelected(e)?"tobe-deleted":""}getInputName(e){return this.datatables.getName(e)}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275cmp=P({type:t,selectors:[["mifosx-datatable-multi-row"]],viewQuery:function(n,o){if(n&1&&ue(n1e,5),n&2){let r;U(r=$())&&(o.dataTableRef=r.first)}},inputs:{dataObject:"dataObject",entityId:"entityId",entityType:"entityType"},features:[Re],decls:16,vars:7,consts:[["dataTable",""],[1,"tab-container","mat-typography"],[1,"layout-row","align-start"],[1,"m-b-10"],[1,"action-button","m-b-7","gap-10px"],[4,"mifosxHasPermission"],[1,"m-t-10"],["mat-table","",1,"mat-elevation-z1","m-b-25",3,"dataSource"],[3,"matColumnDef"],["mat-header-row","",4,"matHeaderRowDef"],["mat-row","",4,"matRowDef","matRowDefColumns"],["mat-raised-button","","color","primary",3,"click"],["icon","plus",1,"m-r-10"],["mat-raised-button","","color","warn",1,"delete-button",3,"click"],["icon","trash",1,"m-r-10"],["mat-header-cell","",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["mat-header-cell",""],["mat-cell",""],[1,"center",3,"click","change","checked"],["mat-header-cell","","class","right",4,"matHeaderCellDef"],["mat-cell","","class","right",3,"ngClass",4,"matCellDef"],["mat-header-cell","",1,"right"],["mat-cell","",1,"right",3,"ngClass"],["mat-header-row",""],["mat-row",""]],template:function(n,o){n&1&&(h(0,"div",1)(1,"div",2)(2,"div",3)(3,"h3"),y(4),_()(),h(5,"div",4),ot(6,i1e,5,3,"span",5)(7,r1e,2,1,"ng-container",5)(8,s1e,2,1,"ng-container",5),_()(),h(9,"div",6)(10,"table",7,0),Xe(12,f1e,3,3,"ng-container",8,ht),ot(14,h1e,1,0,"tr",9)(15,g1e,1,0,"tr",10),_()()()),n&2&&(p(4),T(o.datatableName),p(2),D("mifosxHasPermission","CREATE_"+o.datatableName),p(),D("mifosxHasPermission","DELETE_"+o.datatableName),p(),D("mifosxHasPermission","DELETE_"+o.datatableName),p(2),D("dataSource",o.datatableData),p(2),Ze(o.datatableColumns),p(2),D("matHeaderRowDef",o.datatableColumns),p(),D("matRowDefColumns",o.datatableColumns))},dependencies:[he,Un,ve,vt,il,Ps,Yt,ph,gh,hh,_h,fh,bh,vh,Ch,yh,xh,Te],styles:["body[_ngcontent-%COMP%] table[_ngcontent-%COMP%] tbody[_ngcontent-%COMP%] tr[_ngcontent-%COMP%]:nth-child(2n){background-color:#f2f2f2}.bg-black[_ngcontent-%COMP%]{background-color:#000}.bg-light-grey[_ngcontent-%COMP%]{background-color:#e5e5e5}.bg-medium-grey[_ngcontent-%COMP%]{background-color:#ccc}.bg-grey[_ngcontent-%COMP%]{background-color:#999}.bg-dark-grey[_ngcontent-%COMP%]{background-color:#222}.bg-white[_ngcontent-%COMP%], .bg-fff[_ngcontent-%COMP%]{background-color:#fff}.bg-none[_ngcontent-%COMP%], .no-bg[_ngcontent-%COMP%]{background:none;background-image:none;background-color:transparent}.bg-facebook[_ngcontent-%COMP%]{background-color:#47639e}.bg-twitter[_ngcontent-%COMP%]{background-color:#02a8f3}body[_ngcontent-%COMP%] table[_ngcontent-%COMP%]{border:1px solid rgba(0,0,0,.12)}.no-border[_ngcontent-%COMP%]{border:none}.no-border-t[_ngcontent-%COMP%]{border-top:none}.no-border-r[_ngcontent-%COMP%]{border-right:none}.no-border-b[_ngcontent-%COMP%]{border-bottom:none}.no-border-l[_ngcontent-%COMP%]{border-left:none}.no-border-lr[_ngcontent-%COMP%], .no-border-rl[_ngcontent-%COMP%]{border-left:none;border-right:none}.no-border-tb[_ngcontent-%COMP%], .no-border-bt[_ngcontent-%COMP%]{border-top:none;border-bottom:none}.no-border-tl[_ngcontent-%COMP%], .no-border-lt[_ngcontent-%COMP%]{border-top:none;border-left:none}.no-border-tr[_ngcontent-%COMP%], .no-border-rt[_ngcontent-%COMP%]{border-top:none;border-right:none}.no-border-bl[_ngcontent-%COMP%], .no-border-lb[_ngcontent-%COMP%]{border-bottom:none;border-left:none}.no-border-br[_ngcontent-%COMP%], .no-border-rb[_ngcontent-%COMP%]{border-bottom:none;border-right:none}.border-dashed[_ngcontent-%COMP%], .border-dotted[_ngcontent-%COMP%]{border-style:dashed}.border-black[_ngcontent-%COMP%]{border-color:#000}.border-light-grey[_ngcontent-%COMP%]{border-color:#e5e5e5}.border-medium-grey[_ngcontent-%COMP%]{border-color:#ccc}.border-grey[_ngcontent-%COMP%]{border-color:#999}.border-dark-grey[_ngcontent-%COMP%]{border-color:#2222}.border-white[_ngcontent-%COMP%], .border-fff[_ngcontent-%COMP%]{border-color:#fff}.no-border-radius[_ngcontent-%COMP%]{border-radius:0}.radius3[_ngcontent-%COMP%]{border-radius:3px}.radius5[_ngcontent-%COMP%]{border-radius:5px}.radius10[_ngcontent-%COMP%]{border-radius:10px}.column-mandatory[_ngcontent-%COMP%]{color:#5cb85c;text-align:center}.not-column-mandatory[_ngcontent-%COMP%]{color:#666f73;text-align:center}.cdk-drag-placeholder[_ngcontent-%COMP%]{background:#3498db}.yes[_ngcontent-%COMP%]{color:#5cb85c!important;background-color:#5cb85c;height:4px;cursor:none}.no[_ngcontent-%COMP%]{color:red;background-color:red;height:4px;cursor:none}.strike[_ngcontent-%COMP%]{text-decoration:line-through;color:red}.transfer[_ngcontent-%COMP%]{color:#16a085}.linked[_ngcontent-%COMP%]{color:#4461e2}.accrual[_ngcontent-%COMP%]{color:#999}.fa-question[_ngcontent-%COMP%]{color:#4461e2}.enabled[_ngcontent-%COMP%]{color:#32cd32}.disabled[_ngcontent-%COMP%]{color:#f44366}.v-mid[_ngcontent-%COMP%], .v-m[_ngcontent-%COMP%]{vertical-align:middle}.v-top[_ngcontent-%COMP%], .v-t[_ngcontent-%COMP%]{vertical-align:top}.v-bottom[_ngcontent-%COMP%], .v-b[_ngcontent-%COMP%]{vertical-align:bottom}.v-super[_ngcontent-%COMP%]{vertical-align:super}.r-amount[_ngcontent-%COMP%]{text-align:right!important;padding-right:5px!important}.left[_ngcontent-%COMP%]{text-align:left!important}.right[_ngcontent-%COMP%]{text-align:right!important}.center[_ngcontent-%COMP%]{text-align:center!important}.amount-plus[_ngcontent-%COMP%]{color:#000}.amount-minus[_ngcontent-%COMP%]{color:#4461e2}.block[_ngcontent-%COMP%]{display:block}.inline[_ngcontent-%COMP%]{display:inline}.in-block[_ngcontent-%COMP%]{display:inline-block;zoom:1}.d-none[_ngcontent-%COMP%], .hide[_ngcontent-%COMP%], .hidden[_ngcontent-%COMP%]{display:none}.t-0[_ngcontent-%COMP%]{top:0}.b-0[_ngcontent-%COMP%]{bottom:0}.l-0[_ngcontent-%COMP%]{left:0}.r-0[_ngcontent-%COMP%]{right:0}.tb-0[_ngcontent-%COMP%]{top:0;bottom:0}.lr-0[_ngcontent-%COMP%]{left:0;right:0}.f-left[_ngcontent-%COMP%]{float:left}.f-right[_ngcontent-%COMP%]{float:right}.f-none[_ngcontent-%COMP%]{float:none}textarea[_ngcontent-%COMP%]{resize:both}textarea.vertical[_ngcontent-%COMP%], textarea.horizontal[_ngcontent-%COMP%]{resize:vertical}textarea.noresize[_ngcontent-%COMP%]{resize:none}.full-input[_ngcontent-%COMP%] input[_ngcontent-%COMP%], .full-input[_ngcontent-%COMP%] select[_ngcontent-%COMP%], .full-input[_ngcontent-%COMP%] textarea[_ngcontent-%COMP%]{width:100%}.normal[_ngcontent-%COMP%] input[_ngcontent-%COMP%], .normal[_ngcontent-%COMP%] select[_ngcontent-%COMP%], .normal[_ngcontent-%COMP%] textarea[_ngcontent-%COMP%], .full-input[_ngcontent-%COMP%] [type=checkbox][_ngcontent-%COMP%], .full-input[_ngcontent-%COMP%] [type=radio][_ngcontent-%COMP%]{width:auto}.mat-tab-body-content[_ngcontent-%COMP%]{margin-bottom:20px}.mat-datepicker-input[_ngcontent-%COMP%]{margin-top:5px;margin-bottom:5px}.loader-wrapper[_ngcontent-%COMP%]{height:100vh;width:100vw}.loader-wrapper[_ngcontent-%COMP%] .triangle[_ngcontent-%COMP%]{width:0;height:0;border-style:solid;position:absolute;animation:_ngcontent-%COMP%_rotate .8s infinite .2s}.loader-wrapper[_ngcontent-%COMP%] .bottom[_ngcontent-%COMP%]{border-width:0 90px 90px;border-color:transparent transparent #1fb050;bottom:calc(50% - 100px);left:calc(50% - 90px)}.loader-wrapper[_ngcontent-%COMP%] .top[_ngcontent-%COMP%]{border-width:90px 90px 0;border-color:#b4d575 transparent transparent;top:calc(50% - 100px);left:calc(50% - 90px)}.loader-wrapper[_ngcontent-%COMP%] .left[_ngcontent-%COMP%]{border-width:90px 0 90px 90px;border-color:transparent transparent transparent #1074b9;top:calc(50% - 90px);left:calc(50% - 100px)}.loader-wrapper[_ngcontent-%COMP%] .right[_ngcontent-%COMP%]{border-width:90px 90px 90px 0;border-color:transparent #1daeec transparent transparent;top:calc(50% - 90px);right:calc(50% - 100px)}@keyframes _ngcontent-%COMP%_rotate{0%{transform:rotate(0)}to{transform:rotate(360deg)}}body[_ngcontent-%COMP%]{margin:0}.container[_ngcontent-%COMP%]{margin:0 auto}.mb-05[_ngcontent-%COMP%]{margin-bottom:.5rem}.mr-05[_ngcontent-%COMP%]{margin-right:.5rem}.mb-1[_ngcontent-%COMP%]{margin-bottom:1rem}.mt-1[_ngcontent-%COMP%]{margin-top:1rem}.m-5[_ngcontent-%COMP%]{margin:5px}.m-t-5[_ngcontent-%COMP%]{margin-top:5px}.m-r-5[_ngcontent-%COMP%]{margin-right:5px}.m-b-5[_ngcontent-%COMP%]{margin-bottom:5px}.m-l-5[_ngcontent-%COMP%]{margin-left:5px}.m-v-5[_ngcontent-%COMP%]{margin:5px 0}.m-h-5[_ngcontent-%COMP%]{margin:0 5px}.m-10[_ngcontent-%COMP%]{margin:10px}.m-t-10[_ngcontent-%COMP%]{margin-top:10px}.m-r-10[_ngcontent-%COMP%]{margin-right:10px}.m-b-10[_ngcontent-%COMP%]{margin-bottom:10px}.m-l-10[_ngcontent-%COMP%]{margin-left:10px}.m-v-10[_ngcontent-%COMP%]{margin:10px 0}.m-h-10[_ngcontent-%COMP%]{margin:0 10px}.m-15[_ngcontent-%COMP%]{margin:15px}.m-t-15[_ngcontent-%COMP%]{margin-top:15px}.m-r-15[_ngcontent-%COMP%]{margin-right:15px}.m-b-15[_ngcontent-%COMP%]{margin-bottom:15px}.m-l-15[_ngcontent-%COMP%]{margin-left:15px}.m-v-15[_ngcontent-%COMP%]{margin:15px 0}.m-h-15[_ngcontent-%COMP%]{margin:0 15px}.m-20[_ngcontent-%COMP%]{margin:20px}.m-t-20[_ngcontent-%COMP%]{margin-top:20px}.m-r-20[_ngcontent-%COMP%]{margin-right:20px}.m-b-20[_ngcontent-%COMP%]{margin-bottom:20px}.m-l-20[_ngcontent-%COMP%]{margin-left:20px}.m-v-20[_ngcontent-%COMP%]{margin:20px 0}.m-h-20[_ngcontent-%COMP%]{margin:0 20px}.m-25[_ngcontent-%COMP%]{margin:25px}.m-t-25[_ngcontent-%COMP%]{margin-top:25px}.m-r-25[_ngcontent-%COMP%]{margin-right:25px}.m-b-25[_ngcontent-%COMP%]{margin-bottom:25px}.m-l-25[_ngcontent-%COMP%]{margin-left:25px}.m-v-25[_ngcontent-%COMP%]{margin:25px 0}.m-h-25[_ngcontent-%COMP%]{margin:0 25px}.m-30[_ngcontent-%COMP%]{margin:30px}.m-t-30[_ngcontent-%COMP%]{margin-top:30px}.m-r-30[_ngcontent-%COMP%]{margin-right:30px}.m-b-30[_ngcontent-%COMP%]{margin-bottom:30px}.m-l-30[_ngcontent-%COMP%]{margin-left:30px}.m-v-30[_ngcontent-%COMP%]{margin:30px 0}.m-h-30[_ngcontent-%COMP%]{margin:0 30px}.m-35[_ngcontent-%COMP%]{margin:35px}.m-t-35[_ngcontent-%COMP%]{margin-top:35px}.m-r-35[_ngcontent-%COMP%]{margin-right:35px}.m-b-35[_ngcontent-%COMP%]{margin-bottom:35px}.m-l-35[_ngcontent-%COMP%]{margin-left:35px}.m-v-35[_ngcontent-%COMP%]{margin:35px 0}.m-h-35[_ngcontent-%COMP%]{margin:0 35px}.m-40[_ngcontent-%COMP%]{margin:40px}.m-t-40[_ngcontent-%COMP%]{margin-top:40px}.m-r-40[_ngcontent-%COMP%]{margin-right:40px}.m-b-40[_ngcontent-%COMP%]{margin-bottom:40px}.m-l-40[_ngcontent-%COMP%]{margin-left:40px}.m-v-40[_ngcontent-%COMP%]{margin:40px 0}.m-h-40[_ngcontent-%COMP%]{margin:0 40px}.m-45[_ngcontent-%COMP%]{margin:45px}.m-t-45[_ngcontent-%COMP%]{margin-top:45px}.m-r-45[_ngcontent-%COMP%]{margin-right:45px}.m-b-45[_ngcontent-%COMP%]{margin-bottom:45px}.m-l-45[_ngcontent-%COMP%]{margin-left:45px}.m-v-45[_ngcontent-%COMP%]{margin:45px 0}.m-h-45[_ngcontent-%COMP%]{margin:0 45px}.m-50[_ngcontent-%COMP%]{margin:50px}.m-t-50[_ngcontent-%COMP%]{margin-top:50px}.m-r-50[_ngcontent-%COMP%]{margin-right:50px}.m-b-50[_ngcontent-%COMP%]{margin-bottom:50px}.m-l-50[_ngcontent-%COMP%]{margin-left:50px}.m-v-50[_ngcontent-%COMP%]{margin:50px 0}.m-h-50[_ngcontent-%COMP%]{margin:0 50px}.m-55[_ngcontent-%COMP%]{margin:55px}.m-t-55[_ngcontent-%COMP%]{margin-top:55px}.m-r-55[_ngcontent-%COMP%]{margin-right:55px}.m-b-55[_ngcontent-%COMP%]{margin-bottom:55px}.m-l-55[_ngcontent-%COMP%]{margin-left:55px}.m-v-55[_ngcontent-%COMP%]{margin:55px 0}.m-h-55[_ngcontent-%COMP%]{margin:0 55px}.m-60[_ngcontent-%COMP%]{margin:60px}.m-t-60[_ngcontent-%COMP%]{margin-top:60px}.m-r-60[_ngcontent-%COMP%]{margin-right:60px}.m-b-60[_ngcontent-%COMP%]{margin-bottom:60px}.m-l-60[_ngcontent-%COMP%]{margin-left:60px}.m-v-60[_ngcontent-%COMP%]{margin:60px 0}.m-h-60[_ngcontent-%COMP%]{margin:0 60px}.m-65[_ngcontent-%COMP%]{margin:65px}.m-t-65[_ngcontent-%COMP%]{margin-top:65px}.m-r-65[_ngcontent-%COMP%]{margin-right:65px}.m-b-65[_ngcontent-%COMP%]{margin-bottom:65px}.m-l-65[_ngcontent-%COMP%]{margin-left:65px}.m-v-65[_ngcontent-%COMP%]{margin:65px 0}.m-h-65[_ngcontent-%COMP%]{margin:0 65px}.m-70[_ngcontent-%COMP%]{margin:70px}.m-t-70[_ngcontent-%COMP%]{margin-top:70px}.m-r-70[_ngcontent-%COMP%]{margin-right:70px}.m-b-70[_ngcontent-%COMP%]{margin-bottom:70px}.m-l-70[_ngcontent-%COMP%]{margin-left:70px}.m-v-70[_ngcontent-%COMP%]{margin:70px 0}.m-h-70[_ngcontent-%COMP%]{margin:0 70px}.m-75[_ngcontent-%COMP%]{margin:75px}.m-t-75[_ngcontent-%COMP%]{margin-top:75px}.m-r-75[_ngcontent-%COMP%]{margin-right:75px}.m-b-75[_ngcontent-%COMP%]{margin-bottom:75px}.m-l-75[_ngcontent-%COMP%]{margin-left:75px}.m-v-75[_ngcontent-%COMP%]{margin:75px 0}.m-h-75[_ngcontent-%COMP%]{margin:0 75px}.m-80[_ngcontent-%COMP%]{margin:80px}.m-t-80[_ngcontent-%COMP%]{margin-top:80px}.m-r-80[_ngcontent-%COMP%]{margin-right:80px}.m-b-80[_ngcontent-%COMP%]{margin-bottom:80px}.m-l-80[_ngcontent-%COMP%]{margin-left:80px}.m-v-80[_ngcontent-%COMP%]{margin:80px 0}.m-h-80[_ngcontent-%COMP%]{margin:0 80px}.no-m[_ngcontent-%COMP%]{margin:0}.no-m-t[_ngcontent-%COMP%]{margin-top:0}.no-m-r[_ngcontent-%COMP%]{margin-right:0}.no-m-b[_ngcontent-%COMP%]{margin-bottom:0}.no-m-l[_ngcontent-%COMP%]{margin-left:0}.no-m-v[_ngcontent-%COMP%], .no-m-h[_ngcontent-%COMP%], .no-margin[_ngcontent-%COMP%]{margin:0}.no-m-lr[_ngcontent-%COMP%], .no-m-rl[_ngcontent-%COMP%]{margin-left:0;margin-right:0}.no-m-tb[_ngcontent-%COMP%], .no-m-bt[_ngcontent-%COMP%]{margin-top:0;margin-bottom:0}.m-t-only[_ngcontent-%COMP%]{margin-left:0;margin-right:0;margin-bottom:0}.m-b-only[_ngcontent-%COMP%]{margin-left:0;margin-right:0;margin-top:0}.m-l-only[_ngcontent-%COMP%]{margin-right:0;margin-top:0;margin-bottom:0}.m-r-only[_ngcontent-%COMP%]{margin-left:0;margin-top:0;margin-bottom:0}.m-auto[_ngcontent-%COMP%]{margin-left:auto;margin-right:auto}.ls-0[_ngcontent-%COMP%]{margin-left:10px;margin-right:10px}html[_ngcontent-%COMP%], body[_ngcontent-%COMP%]{-webkit-tap-highlight-color:transparent}div[_ngcontent-%COMP%]{box-sizing:border-box}.color-inherit[_ngcontent-%COMP%]{color:inherit}.no-shadow[_ngcontent-%COMP%]{box-shadow:none}.pointer[_ngcontent-%COMP%]{cursor:pointer}.nolist[_ngcontent-%COMP%]{list-style:none}.actions-menu[_ngcontent-%COMP%]{color:#fff}.alert[_ngcontent-%COMP%]{background-color:#e8f4fd;padding:6px 16px;font-size:.875rem;font-family:Roboto,Helvetica Neue,sans-serif;font-weight:400;line-height:1.43;border-radius:4px;letter-spacing:normal;margin:10px}.alert[_ngcontent-%COMP%] .message[_ngcontent-%COMP%]{padding:8px 0;font-size:18px}.alert[_ngcontent-%COMP%] .alert-check[_ngcontent-%COMP%]{color:#359ff4;margin-right:2px;font-size:1.4rem} .mat-tooltip{font-size:15px;color:#fff!important;background-color:#4461e2b3;border:1px solid rgb(25.7777777778,51.5555555556,166.2222222222);max-width:400px!important;white-space:pre-line!important}.loading[_ngcontent-%COMP%]{position:absolute;min-width:100%;width:100px;height:12px;background:linear-gradient(125deg,#fff,#4461e2,#fff);animation:grow 4s linear infinite,move 4s linear infinite}mat-card-title[_ngcontent-%COMP%]{font-weight:600;font-size:x-large;padding-left:20px;padding-top:20px}html[_ngcontent-%COMP%], body[_ngcontent-%COMP%]{overflow:hidden}.overflow-x-scroll[_ngcontent-%COMP%]{max-width:100%;overflow-x:auto}.overflow-no[_ngcontent-%COMP%]{overflow:hidden}.overflow-auto[_ngcontent-%COMP%]{overflow:auto}.overflow-scroll[_ngcontent-%COMP%]{overflow:scroll}.table-container[_ngcontent-%COMP%]{overflow-x:auto;max-width:100%}body[_ngcontent-%COMP%], .no-p[_ngcontent-%COMP%]{padding:0}.no-p-t[_ngcontent-%COMP%]{padding-top:0}.no-p-r[_ngcontent-%COMP%]{padding-right:0}.no-p-b[_ngcontent-%COMP%]{padding-bottom:0}.no-p-l[_ngcontent-%COMP%]{padding-left:0}.no-p-v[_ngcontent-%COMP%], .no-p-h[_ngcontent-%COMP%]{padding:0}.p-5[_ngcontent-%COMP%]{padding:5px}.p-t-5[_ngcontent-%COMP%]{padding-top:5px}.p-r-5[_ngcontent-%COMP%]{padding-right:5px}.p-b-5[_ngcontent-%COMP%]{padding-bottom:5px}.p-l-5[_ngcontent-%COMP%]{padding-left:5px}.p-v-5[_ngcontent-%COMP%]{padding:5px 0}.p-h-5[_ngcontent-%COMP%]{padding:0 5px}.p-10[_ngcontent-%COMP%]{padding:10px}.p-t-10[_ngcontent-%COMP%]{padding-top:10px}.p-b-10[_ngcontent-%COMP%]{padding-bottom:10px}.p-v-10[_ngcontent-%COMP%]{padding:10px 0}.p-h-10[_ngcontent-%COMP%]{padding:0 10px}.p-15[_ngcontent-%COMP%]{padding:15px}.p-t-15[_ngcontent-%COMP%]{padding-top:15px}.p-r-15[_ngcontent-%COMP%]{padding-right:15px}.p-b-15[_ngcontent-%COMP%]{padding-bottom:15px}.p-l-15[_ngcontent-%COMP%]{padding-left:15px}.p-v-15[_ngcontent-%COMP%]{padding:15px 0}.p-h-15[_ngcontent-%COMP%]{padding:0 15px}.p-20[_ngcontent-%COMP%]{padding:20px}.p-t-20[_ngcontent-%COMP%]{padding-top:20px}.p-r-20[_ngcontent-%COMP%]{padding-right:20px}.p-b-20[_ngcontent-%COMP%]{padding-bottom:20px}.p-l-20[_ngcontent-%COMP%]{padding-left:20px}.p-v-20[_ngcontent-%COMP%]{padding:20px 0}.p-h-20[_ngcontent-%COMP%]{padding:0 20px}.p-25[_ngcontent-%COMP%]{padding:25px}.p-t-25[_ngcontent-%COMP%]{padding-top:25px}.p-r-25[_ngcontent-%COMP%]{padding-right:25px}.p-b-25[_ngcontent-%COMP%]{padding-bottom:25px}.p-l-25[_ngcontent-%COMP%]{padding-left:25px}.p-v-25[_ngcontent-%COMP%]{padding:25px 0}.p-h-25[_ngcontent-%COMP%]{padding:0 25px}.p-30[_ngcontent-%COMP%]{padding:30px}.p-t-30[_ngcontent-%COMP%]{padding-top:30px}.p-r-30[_ngcontent-%COMP%]{padding-right:30px}.p-b-30[_ngcontent-%COMP%]{padding-bottom:30px}.p-l-30[_ngcontent-%COMP%]{padding-left:30px}.p-v-30[_ngcontent-%COMP%]{padding:30px 0}.p-h-30[_ngcontent-%COMP%]{padding:0 30px}.p-35[_ngcontent-%COMP%]{padding:35px}.p-t-35[_ngcontent-%COMP%]{padding-top:35px}.p-r-35[_ngcontent-%COMP%]{padding-right:35px}.p-b-35[_ngcontent-%COMP%]{padding-bottom:35px}.p-l-35[_ngcontent-%COMP%]{padding-left:35px}.p-v-35[_ngcontent-%COMP%]{padding:35px 0}.p-h-35[_ngcontent-%COMP%]{padding:0 35px}.p-40[_ngcontent-%COMP%]{padding:40px}.p-t-40[_ngcontent-%COMP%]{padding-top:40px}.p-r-40[_ngcontent-%COMP%]{padding-right:40px}.p-b-40[_ngcontent-%COMP%]{padding-bottom:40px}.p-l-40[_ngcontent-%COMP%]{padding-left:40px}.p-v-40[_ngcontent-%COMP%]{padding-top:40px;padding-bottom:40px}.p-h-40[_ngcontent-%COMP%]{padding:0 40px}.p-45[_ngcontent-%COMP%]{padding:45px}.p-t-45[_ngcontent-%COMP%]{padding-top:45px}.p-r-45[_ngcontent-%COMP%]{padding-right:45px}.p-b-45[_ngcontent-%COMP%]{padding-bottom:45px}.p-l-45[_ngcontent-%COMP%]{padding-left:45px}.p-v-45[_ngcontent-%COMP%]{padding:45px 0}.p-h-45[_ngcontent-%COMP%]{padding:0 45px}.p-50[_ngcontent-%COMP%]{padding:50px}.p-t-50[_ngcontent-%COMP%]{padding-top:50px}.p-r-50[_ngcontent-%COMP%]{padding-right:50px}.p-b-50[_ngcontent-%COMP%]{padding-bottom:50px}.p-l-50[_ngcontent-%COMP%]{padding-left:50px}.p-v-50[_ngcontent-%COMP%]{padding:50px 0}.p-h-50[_ngcontent-%COMP%]{padding:0 50px}.p-55[_ngcontent-%COMP%]{padding:55px}.p-t-55[_ngcontent-%COMP%]{padding-top:55px}.p-r-55[_ngcontent-%COMP%]{padding-right:55px}.p-b-55[_ngcontent-%COMP%]{padding-bottom:55px}.p-l-55[_ngcontent-%COMP%]{padding-left:55px}.p-v-55[_ngcontent-%COMP%]{padding:55px 0}.p-h-55[_ngcontent-%COMP%]{padding:0 55px}.p-60[_ngcontent-%COMP%]{padding:60px}.p-t-60[_ngcontent-%COMP%]{padding-top:60px}.p-r-60[_ngcontent-%COMP%]{padding-right:60px}.p-b-60[_ngcontent-%COMP%]{padding-bottom:60px}.p-l-60[_ngcontent-%COMP%]{padding-left:60px}.p-v-60[_ngcontent-%COMP%]{padding:60px 0}.p-h-60[_ngcontent-%COMP%]{padding:0 60px}.p-65[_ngcontent-%COMP%]{padding:65px}.p-t-65[_ngcontent-%COMP%]{padding-top:65px}.p-r-65[_ngcontent-%COMP%]{padding-right:65px}.p-b-65[_ngcontent-%COMP%]{padding-bottom:65px}.p-l-65[_ngcontent-%COMP%]{padding-left:65px}.p-v-65[_ngcontent-%COMP%]{padding:65px 0}.p-h-65[_ngcontent-%COMP%]{padding:0 65px}.p-70[_ngcontent-%COMP%]{padding:70px}.p-t-70[_ngcontent-%COMP%]{padding-top:70px}.p-r-70[_ngcontent-%COMP%]{padding-right:70px}.p-b-70[_ngcontent-%COMP%]{padding-bottom:70px}.p-l-70[_ngcontent-%COMP%]{padding-left:70px}.p-v-70[_ngcontent-%COMP%]{padding:70px 0}.p-h-70[_ngcontent-%COMP%]{padding:0 70px}.p-75[_ngcontent-%COMP%]{padding:75px}.p-t-75[_ngcontent-%COMP%]{padding-top:75px}.p-r-75[_ngcontent-%COMP%]{padding-right:75px}.p-b-75[_ngcontent-%COMP%]{padding-bottom:75px}.p-l-75[_ngcontent-%COMP%]{padding-left:75px}.p-v-75[_ngcontent-%COMP%]{padding:75px 0}.p-h-75[_ngcontent-%COMP%]{padding:0 75px}.p-80[_ngcontent-%COMP%]{padding:80px}.p-t-80[_ngcontent-%COMP%]{padding-top:80px}.p-r-80[_ngcontent-%COMP%]{padding-right:80px}.p-b-80[_ngcontent-%COMP%]{padding-bottom:80px}.p-l-80[_ngcontent-%COMP%]{padding-left:80px}.p-v-80[_ngcontent-%COMP%]{padding:80px 0}.p-h-80[_ngcontent-%COMP%]{padding:0 80px}.no-padding[_ngcontent-%COMP%]{padding:0!important}.no-pad-lr[_ngcontent-%COMP%], .no-pad-rl[_ngcontent-%COMP%]{padding-left:0;padding-right:0}.no-pad-tb[_ngcontent-%COMP%], .no-pad-bt[_ngcontent-%COMP%]{padding-top:0;padding-bottom:0}.pad-t-only[_ngcontent-%COMP%]{padding-left:0;padding-right:0;padding-bottom:0}.pad-b-only[_ngcontent-%COMP%]{padding-left:0;padding-right:0;padding-top:0}.pad-l-only[_ngcontent-%COMP%]{padding-right:0;padding-top:0;padding-bottom:0}.pad-r-only[_ngcontent-%COMP%]{padding-left:0;padding-top:0;padding-bottom:0}html[_ngcontent-%COMP%], body[_ngcontent-%COMP%], .rel[_ngcontent-%COMP%], .relative[_ngcontent-%COMP%]{position:relative}.abs[_ngcontent-%COMP%], .absolute[_ngcontent-%COMP%]{position:absolute}.fixed[_ngcontent-%COMP%]{position:fixed}.status-active[_ngcontent-%COMP%]{color:#5cb85c}.status-inactive[_ngcontent-%COMP%]{color:#666f73}.status-deleted[_ngcontent-%COMP%]{color:#000}.status-pending[_ngcontent-%COMP%]{color:orange}.status-approved[_ngcontent-%COMP%]{color:#4461e2}.status-overpaid[_ngcontent-%COMP%]{color:purple}.status-chargeoff[_ngcontent-%COMP%]{color:#f39c12}.status-active-overdue[_ngcontent-%COMP%], .status-block[_ngcontent-%COMP%]{color:red}.status-matured[_ngcontent-%COMP%]{color:#ff4000}.subStatus-contract-termination[_ngcontent-%COMP%]{color:#b3b3b3}.mat-step-header[_ngcontent-%COMP%] .mat-step-icon-state-done[_ngcontent-%COMP%]{background-color:#2af72a}.mat-step-header[_ngcontent-%COMP%] .mat-step-icon-state-done[_ngcontent-%COMP%] .status-transfer-progress[_ngcontent-%COMP%]{color:#ff4000}.mat-step-header[_ngcontent-%COMP%] .mat-step-icon-state-done[_ngcontent-%COMP%] .status-transfer-hold[_ngcontent-%COMP%]{color:#df0101}html[_ngcontent-%COMP%], body[_ngcontent-%COMP%]{-webkit-font-smoothing:antialiased}html[_ngcontent-%COMP%]{font-size:16px}body[_ngcontent-%COMP%]{font-family:Roboto,Helvetica Neue,sans-serif;font-weight:400;font-size:14px;color:#000000de;line-height:1.5;letter-spacing:normal}.mat-h1[_ngcontent-%COMP%], .mat-headline[_ngcontent-%COMP%], .mat-typography[_ngcontent-%COMP%] .mat-h1[_ngcontent-%COMP%], .mat-typography[_ngcontent-%COMP%] .mat-headline[_ngcontent-%COMP%], .mat-typography[_ngcontent-%COMP%] h1[_ngcontent-%COMP%]{font:400 24px/32px Roboto,Helvetica Neue,sans-serif;letter-spacing:normal;margin:0 0 16px}.lh-1[_ngcontent-%COMP%]{line-height:1}.lh-13[_ngcontent-%COMP%]{line-height:1.3}.lh-15[_ngcontent-%COMP%]{line-height:1.5}.bold[_ngcontent-%COMP%], .strong[_ngcontent-%COMP%]{font-weight:700}.no-bold[_ngcontent-%COMP%]{font-weight:400}.italic[_ngcontent-%COMP%], .em[_ngcontent-%COMP%]{font-style:italic}.strike[_ngcontent-%COMP%]{text-decoration:line-through}.normal[_ngcontent-%COMP%]{font-weight:400;font-style:normal}.uppercase[_ngcontent-%COMP%]{text-transform:uppercase}.text-left[_ngcontent-%COMP%]{text-align:left}.text-center[_ngcontent-%COMP%]{text-align:center}.text-right[_ngcontent-%COMP%]{text-align:right}.w100[_ngcontent-%COMP%]{font-weight:100}.w200[_ngcontent-%COMP%]{font-weight:200}.w300[_ngcontent-%COMP%]{font-weight:300}.w400[_ngcontent-%COMP%]{font-weight:400}.w500[_ngcontent-%COMP%]{font-weight:500}.w600[_ngcontent-%COMP%]{font-weight:600}.w700[_ngcontent-%COMP%]{font-weight:700}.w800[_ngcontent-%COMP%]{font-weight:800}.w900[_ngcontent-%COMP%]{font-weight:900}.f9[_ngcontent-%COMP%]{font-size:9px}.f10[_ngcontent-%COMP%]{font-size:10px}.f11[_ngcontent-%COMP%]{font-size:11px}.f12[_ngcontent-%COMP%]{font-size:12px}.f13[_ngcontent-%COMP%]{font-size:13px}.f14[_ngcontent-%COMP%]{font-size:14px}.f15[_ngcontent-%COMP%]{font-size:15px}.f16[_ngcontent-%COMP%]{font-size:16px}.f17[_ngcontent-%COMP%]{font-size:17px}.f18[_ngcontent-%COMP%]{font-size:18px;line-height:30px}.f19[_ngcontent-%COMP%]{font-size:19px}.f20[_ngcontent-%COMP%]{font-size:20px}.f30[_ngcontent-%COMP%]{font-size:30px}.f40[_ngcontent-%COMP%]{font-size:40px}.f50[_ngcontent-%COMP%]{font-size:50px}.f60[_ngcontent-%COMP%]{font-size:60px}.size-small[_ngcontent-%COMP%]{font-size:75%}.size-normal[_ngcontent-%COMP%]{font-size:100%}.size-medium[_ngcontent-%COMP%]{font-size:125%}.size-big[_ngcontent-%COMP%], .size-large[_ngcontent-%COMP%]{font-size:150%}.size-huge[_ngcontent-%COMP%]{font-size:200%}.inherit[_ngcontent-%COMP%]{font:inherit}.text-shadow[_ngcontent-%COMP%]{text-shadow:1px 1px 1px rgba(0,0,0,.4)}.text-rgb-2[_ngcontent-%COMP%]{color:#0003}.text-rgb-3[_ngcontent-%COMP%]{color:#0000004d}.text-rgb-4[_ngcontent-%COMP%]{color:#0006}.text-rgb-5[_ngcontent-%COMP%]{color:#00000080}.no-ul[_ngcontent-%COMP%], .no-ul[_ngcontent-%COMP%]:hover, .no-ul[_ngcontent-%COMP%] a[_ngcontent-%COMP%], .no-ul[_ngcontent-%COMP%] a[_ngcontent-%COMP%]:hover{text-decoration:none}.no-wrap[_ngcontent-%COMP%]{white-space:nowrap}.auto-cell-size[_ngcontent-%COMP%]{white-space:nowrap;width:1%}.ls-0[_ngcontent-%COMP%]{letter-spacing:-3px;white-space:nowrap}.label-field[_ngcontent-%COMP%]{margin-top:32px}.wrap-content[_ngcontent-%COMP%]{overflow-wrap:break-word;word-wrap:break-word}.no-break-content[_ngcontent-%COMP%]{overflow-wrap:anywhere!important}.fit[_ngcontent-%COMP%]{max-width:100%}.half-width[_ngcontent-%COMP%]{width:50%}.full-width[_ngcontent-%COMP%]{width:100%}.full-height[_ngcontent-%COMP%]{height:100%}html[_ngcontent-%COMP%], body[_ngcontent-%COMP%]{width:100%;height:100%;min-height:100%}body[_ngcontent-%COMP%] table[_ngcontent-%COMP%]{width:100%}.container[_ngcontent-%COMP%]{max-width:74rem;width:90%}.mw300[_ngcontent-%COMP%]{max-width:300px}.mw400[_ngcontent-%COMP%]{max-width:400px}.mw500[_ngcontent-%COMP%]{max-width:500px}.mw600[_ngcontent-%COMP%]{max-width:600px}.fullwidth[_ngcontent-%COMP%]{width:100%}.zindex-1[_ngcontent-%COMP%]{z-index:1}.zindex-2[_ngcontent-%COMP%]{z-index:2}.zindex-3[_ngcontent-%COMP%]{z-index:3}.zindex-4[_ngcontent-%COMP%]{z-index:4}.tab-container[_ngcontent-%COMP%]{padding:1%;margin:1%}.tab-container[_ngcontent-%COMP%] .action-button[_ngcontent-%COMP%]{margin-left:auto}.tab-container[_ngcontent-%COMP%] table[_ngcontent-%COMP%]{width:100%}.tobe-deleted[_ngcontent-%COMP%]{text-decoration:line-through;color:#f39c12}"]})}}return t})();function _1e(t,i){if(t&1){let e=le();h(0,"button",5),N("click",function(){G(e);let o=M();return W(o.add())}),F(1,"fa-icon",6),y(2),S(3,"translate"),_()}t&2&&(p(2),ee("",k(3,1,"labels.buttons.Add")," "))}function b1e(t,i){if(t&1){let e=le();h(0,"button",5),N("click",function(){G(e);let o=M();return W(o.edit())}),F(1,"fa-icon",7),y(2),S(3,"translate"),_()}t&2&&(p(2),ee("",k(3,1,"labels.buttons.Edit")," "))}function v1e(t,i){if(t&1){let e=le();h(0,"button",8),N("click",function(){G(e);let o=M();return W(o.delete())}),F(1,"fa-icon",9),y(2),S(3,"translate"),_()}t&2&&(p(2),ee("",k(3,1,"labels.buttons.Delete")," "))}function y1e(t,i){if(t&1&&(h(0,"span"),y(1),S(2,"dateFormat"),_()),t&2){let e=M().$index,n=M(2);p(),ee(" ",k(2,1,n.dataObject.data[0].row[e])," ")}}function C1e(t,i){if(t&1&&(h(0,"span"),y(1),S(2,"datetimeFormat"),_()),t&2){let e=M().$index,n=M(2);p(),ee(" ",k(2,1,n.dataObject.data[0].row[e])," ")}}function x1e(t,i){if(t&1&&(h(0,"span"),y(1),_()),t&2){let e=M().$index,n=M(2);p(),ee(" ",n.dataObject.data[0].row[e]," ")}}function M1e(t,i){if(t&1&&(h(0,"span"),y(1),S(2,"formatNumber"),_()),t&2){let e=M().$index,n=M(2);p(),ee(" ",k(2,1,n.dataObject.data[0].row[e])," ")}}function w1e(t,i){if(t&1&&(h(0,"span"),y(1),_()),t&2){let e=M(),n=e.$implicit,o=e.$index,r=M(2);p(),ee(" ",r.datatables.getCodeLookupValue(n,r.dataObject.data[0].row[o])," ")}}function D1e(t,i){if(t&1&&(h(0,"span",13),y(1),_()),t&2){let e=M().$index,n=M(2);p(),ee(" ",n.dataObject.data[0].row[e]," ")}}function S1e(t,i){if(t&1&&(h(0,"textarea",14),S(1,"prettyPrint"),y(2," "),_()),t&2){let e=M().$index,n=M(2);D("innerHTML",k(1,1,n.dataObject.data[0].row[e].value),jc)}}function k1e(t,i){if(t&1){let e=le();h(0,"span",15)(1,"button",16),S(2,"translate"),N("click",function(){G(e);let o=M(2).$index,r=M(2);return W(r.openSite(r.dataObject.data[0].row[o]))}),F(3,"fa-icon",17),_()()}t&2&&(p(),D("matTooltip",Ft(k(2,2,"tooltips.View Link"))))}function E1e(t,i){if(t&1&&(h(0,"span"),E(1,k1e,4,4,"span",15),y(2),_()),t&2){let e=M().$index,n=M(2);p(),I(n.isValidUrl(n.dataObject.data[0].row[e])?1:-1),p(),ee(" ",n.dataObject.data[0].row[e]," ")}}function I1e(t,i){if(t&1&&(h(0,"div",10)(1,"div",11),y(2),_(),h(3,"div",12),E(4,y1e,3,3,"span")(5,C1e,3,3,"span")(6,x1e,2,1,"span")(7,M1e,3,3,"span")(8,w1e,2,1,"span")(9,D1e,2,1,"span",13)(10,S1e,3,3,"textarea",14)(11,E1e,3,2,"span"),_()()),t&2){let e,n=i.$implicit,o=M(2);D("ngClass",o.setAttributeClass(n.columnName)),p(2),ee(" ",o.datatables.toDisplayLabel(n.columnName)," "),p(2),I((e=o.getColumnType(n.columnDisplayType,n.columnType))==="DATE"?4:e==="DATETIME"?5:e==="INTEGER"?6:e==="DECIMAL"?7:e==="CODELOOKUP"?8:e==="TEXT"?9:e==="JSON"?10:11)}}function O1e(t,i){if(t&1&&(h(0,"div",4),Xe(1,I1e,12,3,"div",10,ht),_()),t&2){let e=M();p(),Ze(e.dataObject.columnHeaders)}}var Bh=(()=>{class t{constructor(){this.route=d(ro),this.dateUtils=d(go),this.dialog=d(Wi),this.settingsService=d(Xt),this.datatables=d(Fh),this.systemService=d(O2)}ngOnInit(){this.route.params.subscribe(e=>{this.datatableName=e.datatableName})}add(){let e={locale:this.settingsService.language.code},n=[],o=this.datatables.filterSystemColumns(this.dataObject.columnHeaders),r=this.datatables.getFormfields(o,n,e),a={title:"Add "+this.datatableName+" for "+this.entityType,formfields:r};this.dialog.open(es,{data:a,width:"50rem"}).afterClosed().subscribe(c=>{c.data&&(n.forEach(m=>{c.data.value[m]=this.dateUtils.formatDate(c.data.value[m],e.dateFormat)}),e=q(q({},c.data.value),e),this.systemService.addEntityDatatableEntry(this.entityId,this.datatableName,e).subscribe(()=>{this.systemService.getEntityDatatable(this.entityId,this.datatableName).subscribe(m=>{this.dataObject=m})}))})}edit(){let e={locale:this.settingsService.language.code},n=[],o=this.datatables.filterSystemColumns(this.dataObject.columnHeaders),r=this.datatables.getFormfields(o,n,e);r=r.map((c,m)=>(c.controlType==="datepicker"?c.value=this.dataObject.data[0].row[o[m].idx]?this.dateUtils.parseDate(this.dataObject.data[0].row[o[m].idx]):"":c.controlType==="datetimepicker"?c.value=this.dataObject.data[0].row[o[m].idx]?this.dateUtils.parseDatetime(this.dataObject.data[0].row[o[m].idx]):"":c.value=this.dataObject.data[0].row[o[m].idx]?this.dataObject.data[0].row[o[m].idx]:"",c));let a={title:"Edit "+this.datatableName+" for "+this.entityType,formfields:r,layout:{addButtonText:"Submit"},pristine:!1};this.dialog.open(es,{data:a,width:"50rem"}).afterClosed().subscribe(c=>{c.data&&(n.forEach(m=>{c.data.value[m]=this.dateUtils.formatDate(c.data.value[m],e.dateFormat)}),e=q(q({},c.data.value),e),this.systemService.editEntityDatatableEntry(this.entityId,this.datatableName,e).subscribe(()=>{this.systemService.getEntityDatatable(this.entityId,this.datatableName).subscribe(m=>{this.dataObject=m})}))})}delete(){this.dialog.open(Rr,{data:{deleteContext:` the contents of ${this.datatableName}`}}).afterClosed().subscribe(n=>{n.delete&&this.systemService.deleteDatatableContent(this.entityId,this.datatableName).subscribe(()=>{this.systemService.getEntityDatatable(this.entityId,this.datatableName).subscribe(o=>{this.dataObject=o})})})}setAttributeClass(e){return this.datatables.isSystemDefined(e)?"system-defined":"table-data"}getColumnType(e,n){switch(e){case"DATE":return e;case"DATETIME":return e;case"INTEGER":return e;case"DECIMAL":return e;case"CODELOOKUP":return e;case"TEXT":return n==="JSON"?"JSON":e;default:return e}}getInputName(e){return this.datatables.getName(e)}isValidUrl(e){return this.datatables.isValidUrl(e)}openSite(e){window.open(e,"_blank")}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275cmp=P({type:t,selectors:[["mifosx-datatable-single-row"]],inputs:{dataObject:"dataObject",entityId:"entityId",entityType:"entityType"},decls:9,vars:5,consts:[[1,"tab-container","mat-typography"],[1,"layout-row","align-end","m-b-20"],["mat-raised-button","","color","primary"],["mat-raised-button","","color","warn",1,"delete-button"],[1,"m-t-10"],["mat-raised-button","","color","primary",3,"click"],["icon","plus",1,"m-r-10"],["icon","edit",1,"m-r-10"],["mat-raised-button","","color","warn",1,"delete-button",3,"click"],["icon","trash",1,"m-r-10"],[1,"flex-fill",3,"ngClass"],[1,"mat-body-strong","left","flex-40"],[1,"right","flex-60"],[1,"long-text"],["cdkTextareaAutosize","true","cdkAutosizeMaxRows","20","cdkAutosizeMinRows","1",1,"json-textarea",3,"innerHTML"],[1,"m-r-5"],["mat-icon-button","","matTooltipPosition","right",1,"small-icon",3,"click","matTooltip"],["icon","eye","size","lg"]],template:function(n,o){n&1&&(h(0,"div",0)(1,"h3"),y(2),_(),h(3,"div",1),E(4,_1e,4,3,"button",2),E(5,b1e,4,3,"button",2),E(6,v1e,4,3,"button",3),_(),F(7,"mat-divider"),E(8,O1e,3,0,"div",4),_()),n&2&&(p(2),T(o.datatableName),p(2),I(o.dataObject.data[0]?-1:4),p(),I(o.dataObject.data[0]?5:-1),p(),I(o.dataObject.data[0]?6:-1),p(2),I(o.dataObject.data.length>0?8:-1))},dependencies:[he,Un,ve,vt,Yt,rc,nf,ni,mo,Lo,Te,ca,Ts,Ym],styles:["body[_ngcontent-%COMP%] table[_ngcontent-%COMP%] tbody[_ngcontent-%COMP%] tr[_ngcontent-%COMP%]:nth-child(2n){background-color:#f2f2f2}.bg-black[_ngcontent-%COMP%]{background-color:#000}.bg-light-grey[_ngcontent-%COMP%]{background-color:#e5e5e5}.bg-medium-grey[_ngcontent-%COMP%]{background-color:#ccc}.bg-grey[_ngcontent-%COMP%]{background-color:#999}.bg-dark-grey[_ngcontent-%COMP%]{background-color:#222}.bg-white[_ngcontent-%COMP%], .bg-fff[_ngcontent-%COMP%]{background-color:#fff}.bg-none[_ngcontent-%COMP%], .no-bg[_ngcontent-%COMP%]{background:none;background-image:none;background-color:transparent}.bg-facebook[_ngcontent-%COMP%]{background-color:#47639e}.bg-twitter[_ngcontent-%COMP%]{background-color:#02a8f3}body[_ngcontent-%COMP%] table[_ngcontent-%COMP%]{border:1px solid rgba(0,0,0,.12)}.no-border[_ngcontent-%COMP%]{border:none}.no-border-t[_ngcontent-%COMP%]{border-top:none}.no-border-r[_ngcontent-%COMP%]{border-right:none}.no-border-b[_ngcontent-%COMP%]{border-bottom:none}.no-border-l[_ngcontent-%COMP%]{border-left:none}.no-border-lr[_ngcontent-%COMP%], .no-border-rl[_ngcontent-%COMP%]{border-left:none;border-right:none}.no-border-tb[_ngcontent-%COMP%], .no-border-bt[_ngcontent-%COMP%]{border-top:none;border-bottom:none}.no-border-tl[_ngcontent-%COMP%], .no-border-lt[_ngcontent-%COMP%]{border-top:none;border-left:none}.no-border-tr[_ngcontent-%COMP%], .no-border-rt[_ngcontent-%COMP%]{border-top:none;border-right:none}.no-border-bl[_ngcontent-%COMP%], .no-border-lb[_ngcontent-%COMP%]{border-bottom:none;border-left:none}.no-border-br[_ngcontent-%COMP%], .no-border-rb[_ngcontent-%COMP%]{border-bottom:none;border-right:none}.border-dashed[_ngcontent-%COMP%], .border-dotted[_ngcontent-%COMP%]{border-style:dashed}.border-black[_ngcontent-%COMP%]{border-color:#000}.border-light-grey[_ngcontent-%COMP%]{border-color:#e5e5e5}.border-medium-grey[_ngcontent-%COMP%]{border-color:#ccc}.border-grey[_ngcontent-%COMP%]{border-color:#999}.border-dark-grey[_ngcontent-%COMP%]{border-color:#2222}.border-white[_ngcontent-%COMP%], .border-fff[_ngcontent-%COMP%]{border-color:#fff}.no-border-radius[_ngcontent-%COMP%]{border-radius:0}.radius3[_ngcontent-%COMP%]{border-radius:3px}.radius5[_ngcontent-%COMP%]{border-radius:5px}.radius10[_ngcontent-%COMP%]{border-radius:10px}.column-mandatory[_ngcontent-%COMP%]{color:#5cb85c;text-align:center}.not-column-mandatory[_ngcontent-%COMP%]{color:#666f73;text-align:center}.cdk-drag-placeholder[_ngcontent-%COMP%]{background:#3498db}.yes[_ngcontent-%COMP%]{color:#5cb85c!important;background-color:#5cb85c;height:4px;cursor:none}.no[_ngcontent-%COMP%]{color:red;background-color:red;height:4px;cursor:none}.strike[_ngcontent-%COMP%]{text-decoration:line-through;color:red}.transfer[_ngcontent-%COMP%]{color:#16a085}.linked[_ngcontent-%COMP%]{color:#4461e2}.accrual[_ngcontent-%COMP%]{color:#999}.fa-question[_ngcontent-%COMP%]{color:#4461e2}.enabled[_ngcontent-%COMP%]{color:#32cd32}.disabled[_ngcontent-%COMP%]{color:#f44366}.v-mid[_ngcontent-%COMP%], .v-m[_ngcontent-%COMP%]{vertical-align:middle}.v-top[_ngcontent-%COMP%], .v-t[_ngcontent-%COMP%]{vertical-align:top}.v-bottom[_ngcontent-%COMP%], .v-b[_ngcontent-%COMP%]{vertical-align:bottom}.v-super[_ngcontent-%COMP%]{vertical-align:super}.r-amount[_ngcontent-%COMP%]{text-align:right!important;padding-right:5px!important}.left[_ngcontent-%COMP%]{text-align:left!important}.right[_ngcontent-%COMP%]{text-align:right!important}.center[_ngcontent-%COMP%]{text-align:center!important}.amount-plus[_ngcontent-%COMP%]{color:#000}.amount-minus[_ngcontent-%COMP%]{color:#4461e2}.block[_ngcontent-%COMP%]{display:block}.inline[_ngcontent-%COMP%]{display:inline}.in-block[_ngcontent-%COMP%]{display:inline-block;zoom:1}.d-none[_ngcontent-%COMP%], .hide[_ngcontent-%COMP%], .hidden[_ngcontent-%COMP%]{display:none}.t-0[_ngcontent-%COMP%]{top:0}.b-0[_ngcontent-%COMP%]{bottom:0}.l-0[_ngcontent-%COMP%]{left:0}.r-0[_ngcontent-%COMP%]{right:0}.tb-0[_ngcontent-%COMP%]{top:0;bottom:0}.lr-0[_ngcontent-%COMP%]{left:0;right:0}.f-left[_ngcontent-%COMP%]{float:left}.f-right[_ngcontent-%COMP%]{float:right}.f-none[_ngcontent-%COMP%]{float:none}textarea[_ngcontent-%COMP%]{resize:both}textarea.vertical[_ngcontent-%COMP%], textarea.horizontal[_ngcontent-%COMP%]{resize:vertical}textarea.noresize[_ngcontent-%COMP%]{resize:none}.full-input[_ngcontent-%COMP%] input[_ngcontent-%COMP%], .full-input[_ngcontent-%COMP%] select[_ngcontent-%COMP%], .full-input[_ngcontent-%COMP%] textarea[_ngcontent-%COMP%]{width:100%}.normal[_ngcontent-%COMP%] input[_ngcontent-%COMP%], .normal[_ngcontent-%COMP%] select[_ngcontent-%COMP%], .normal[_ngcontent-%COMP%] textarea[_ngcontent-%COMP%], .full-input[_ngcontent-%COMP%] [type=checkbox][_ngcontent-%COMP%], .full-input[_ngcontent-%COMP%] [type=radio][_ngcontent-%COMP%]{width:auto}.mat-tab-body-content[_ngcontent-%COMP%]{margin-bottom:20px}.mat-datepicker-input[_ngcontent-%COMP%]{margin-top:5px;margin-bottom:5px}.loader-wrapper[_ngcontent-%COMP%]{height:100vh;width:100vw}.loader-wrapper[_ngcontent-%COMP%] .triangle[_ngcontent-%COMP%]{width:0;height:0;border-style:solid;position:absolute;animation:_ngcontent-%COMP%_rotate .8s infinite .2s}.loader-wrapper[_ngcontent-%COMP%] .bottom[_ngcontent-%COMP%]{border-width:0 90px 90px;border-color:transparent transparent #1fb050;bottom:calc(50% - 100px);left:calc(50% - 90px)}.loader-wrapper[_ngcontent-%COMP%] .top[_ngcontent-%COMP%]{border-width:90px 90px 0;border-color:#b4d575 transparent transparent;top:calc(50% - 100px);left:calc(50% - 90px)}.loader-wrapper[_ngcontent-%COMP%] .left[_ngcontent-%COMP%]{border-width:90px 0 90px 90px;border-color:transparent transparent transparent #1074b9;top:calc(50% - 90px);left:calc(50% - 100px)}.loader-wrapper[_ngcontent-%COMP%] .right[_ngcontent-%COMP%]{border-width:90px 90px 90px 0;border-color:transparent #1daeec transparent transparent;top:calc(50% - 90px);right:calc(50% - 100px)}@keyframes _ngcontent-%COMP%_rotate{0%{transform:rotate(0)}to{transform:rotate(360deg)}}body[_ngcontent-%COMP%]{margin:0}.container[_ngcontent-%COMP%]{margin:0 auto}.mb-05[_ngcontent-%COMP%]{margin-bottom:.5rem}.mr-05[_ngcontent-%COMP%]{margin-right:.5rem}.mb-1[_ngcontent-%COMP%]{margin-bottom:1rem}.mt-1[_ngcontent-%COMP%]{margin-top:1rem}.m-5[_ngcontent-%COMP%]{margin:5px}.m-t-5[_ngcontent-%COMP%]{margin-top:5px}.m-r-5[_ngcontent-%COMP%]{margin-right:5px}.m-b-5[_ngcontent-%COMP%]{margin-bottom:5px}.m-l-5[_ngcontent-%COMP%]{margin-left:5px}.m-v-5[_ngcontent-%COMP%]{margin:5px 0}.m-h-5[_ngcontent-%COMP%]{margin:0 5px}.m-10[_ngcontent-%COMP%]{margin:10px}.m-t-10[_ngcontent-%COMP%]{margin-top:10px}.m-r-10[_ngcontent-%COMP%]{margin-right:10px}.m-b-10[_ngcontent-%COMP%]{margin-bottom:10px}.m-l-10[_ngcontent-%COMP%]{margin-left:10px}.m-v-10[_ngcontent-%COMP%]{margin:10px 0}.m-h-10[_ngcontent-%COMP%]{margin:0 10px}.m-15[_ngcontent-%COMP%]{margin:15px}.m-t-15[_ngcontent-%COMP%]{margin-top:15px}.m-r-15[_ngcontent-%COMP%]{margin-right:15px}.m-b-15[_ngcontent-%COMP%]{margin-bottom:15px}.m-l-15[_ngcontent-%COMP%]{margin-left:15px}.m-v-15[_ngcontent-%COMP%]{margin:15px 0}.m-h-15[_ngcontent-%COMP%]{margin:0 15px}.m-20[_ngcontent-%COMP%]{margin:20px}.m-t-20[_ngcontent-%COMP%]{margin-top:20px}.m-r-20[_ngcontent-%COMP%]{margin-right:20px}.m-b-20[_ngcontent-%COMP%]{margin-bottom:20px}.m-l-20[_ngcontent-%COMP%]{margin-left:20px}.m-v-20[_ngcontent-%COMP%]{margin:20px 0}.m-h-20[_ngcontent-%COMP%]{margin:0 20px}.m-25[_ngcontent-%COMP%]{margin:25px}.m-t-25[_ngcontent-%COMP%]{margin-top:25px}.m-r-25[_ngcontent-%COMP%]{margin-right:25px}.m-b-25[_ngcontent-%COMP%]{margin-bottom:25px}.m-l-25[_ngcontent-%COMP%]{margin-left:25px}.m-v-25[_ngcontent-%COMP%]{margin:25px 0}.m-h-25[_ngcontent-%COMP%]{margin:0 25px}.m-30[_ngcontent-%COMP%]{margin:30px}.m-t-30[_ngcontent-%COMP%]{margin-top:30px}.m-r-30[_ngcontent-%COMP%]{margin-right:30px}.m-b-30[_ngcontent-%COMP%]{margin-bottom:30px}.m-l-30[_ngcontent-%COMP%]{margin-left:30px}.m-v-30[_ngcontent-%COMP%]{margin:30px 0}.m-h-30[_ngcontent-%COMP%]{margin:0 30px}.m-35[_ngcontent-%COMP%]{margin:35px}.m-t-35[_ngcontent-%COMP%]{margin-top:35px}.m-r-35[_ngcontent-%COMP%]{margin-right:35px}.m-b-35[_ngcontent-%COMP%]{margin-bottom:35px}.m-l-35[_ngcontent-%COMP%]{margin-left:35px}.m-v-35[_ngcontent-%COMP%]{margin:35px 0}.m-h-35[_ngcontent-%COMP%]{margin:0 35px}.m-40[_ngcontent-%COMP%]{margin:40px}.m-t-40[_ngcontent-%COMP%]{margin-top:40px}.m-r-40[_ngcontent-%COMP%]{margin-right:40px}.m-b-40[_ngcontent-%COMP%]{margin-bottom:40px}.m-l-40[_ngcontent-%COMP%]{margin-left:40px}.m-v-40[_ngcontent-%COMP%]{margin:40px 0}.m-h-40[_ngcontent-%COMP%]{margin:0 40px}.m-45[_ngcontent-%COMP%]{margin:45px}.m-t-45[_ngcontent-%COMP%]{margin-top:45px}.m-r-45[_ngcontent-%COMP%]{margin-right:45px}.m-b-45[_ngcontent-%COMP%]{margin-bottom:45px}.m-l-45[_ngcontent-%COMP%]{margin-left:45px}.m-v-45[_ngcontent-%COMP%]{margin:45px 0}.m-h-45[_ngcontent-%COMP%]{margin:0 45px}.m-50[_ngcontent-%COMP%]{margin:50px}.m-t-50[_ngcontent-%COMP%]{margin-top:50px}.m-r-50[_ngcontent-%COMP%]{margin-right:50px}.m-b-50[_ngcontent-%COMP%]{margin-bottom:50px}.m-l-50[_ngcontent-%COMP%]{margin-left:50px}.m-v-50[_ngcontent-%COMP%]{margin:50px 0}.m-h-50[_ngcontent-%COMP%]{margin:0 50px}.m-55[_ngcontent-%COMP%]{margin:55px}.m-t-55[_ngcontent-%COMP%]{margin-top:55px}.m-r-55[_ngcontent-%COMP%]{margin-right:55px}.m-b-55[_ngcontent-%COMP%]{margin-bottom:55px}.m-l-55[_ngcontent-%COMP%]{margin-left:55px}.m-v-55[_ngcontent-%COMP%]{margin:55px 0}.m-h-55[_ngcontent-%COMP%]{margin:0 55px}.m-60[_ngcontent-%COMP%]{margin:60px}.m-t-60[_ngcontent-%COMP%]{margin-top:60px}.m-r-60[_ngcontent-%COMP%]{margin-right:60px}.m-b-60[_ngcontent-%COMP%]{margin-bottom:60px}.m-l-60[_ngcontent-%COMP%]{margin-left:60px}.m-v-60[_ngcontent-%COMP%]{margin:60px 0}.m-h-60[_ngcontent-%COMP%]{margin:0 60px}.m-65[_ngcontent-%COMP%]{margin:65px}.m-t-65[_ngcontent-%COMP%]{margin-top:65px}.m-r-65[_ngcontent-%COMP%]{margin-right:65px}.m-b-65[_ngcontent-%COMP%]{margin-bottom:65px}.m-l-65[_ngcontent-%COMP%]{margin-left:65px}.m-v-65[_ngcontent-%COMP%]{margin:65px 0}.m-h-65[_ngcontent-%COMP%]{margin:0 65px}.m-70[_ngcontent-%COMP%]{margin:70px}.m-t-70[_ngcontent-%COMP%]{margin-top:70px}.m-r-70[_ngcontent-%COMP%]{margin-right:70px}.m-b-70[_ngcontent-%COMP%]{margin-bottom:70px}.m-l-70[_ngcontent-%COMP%]{margin-left:70px}.m-v-70[_ngcontent-%COMP%]{margin:70px 0}.m-h-70[_ngcontent-%COMP%]{margin:0 70px}.m-75[_ngcontent-%COMP%]{margin:75px}.m-t-75[_ngcontent-%COMP%]{margin-top:75px}.m-r-75[_ngcontent-%COMP%]{margin-right:75px}.m-b-75[_ngcontent-%COMP%]{margin-bottom:75px}.m-l-75[_ngcontent-%COMP%]{margin-left:75px}.m-v-75[_ngcontent-%COMP%]{margin:75px 0}.m-h-75[_ngcontent-%COMP%]{margin:0 75px}.m-80[_ngcontent-%COMP%]{margin:80px}.m-t-80[_ngcontent-%COMP%]{margin-top:80px}.m-r-80[_ngcontent-%COMP%]{margin-right:80px}.m-b-80[_ngcontent-%COMP%]{margin-bottom:80px}.m-l-80[_ngcontent-%COMP%]{margin-left:80px}.m-v-80[_ngcontent-%COMP%]{margin:80px 0}.m-h-80[_ngcontent-%COMP%]{margin:0 80px}.no-m[_ngcontent-%COMP%]{margin:0}.no-m-t[_ngcontent-%COMP%]{margin-top:0}.no-m-r[_ngcontent-%COMP%]{margin-right:0}.no-m-b[_ngcontent-%COMP%]{margin-bottom:0}.no-m-l[_ngcontent-%COMP%]{margin-left:0}.no-m-v[_ngcontent-%COMP%], .no-m-h[_ngcontent-%COMP%], .no-margin[_ngcontent-%COMP%]{margin:0}.no-m-lr[_ngcontent-%COMP%], .no-m-rl[_ngcontent-%COMP%]{margin-left:0;margin-right:0}.no-m-tb[_ngcontent-%COMP%], .no-m-bt[_ngcontent-%COMP%]{margin-top:0;margin-bottom:0}.m-t-only[_ngcontent-%COMP%]{margin-left:0;margin-right:0;margin-bottom:0}.m-b-only[_ngcontent-%COMP%]{margin-left:0;margin-right:0;margin-top:0}.m-l-only[_ngcontent-%COMP%]{margin-right:0;margin-top:0;margin-bottom:0}.m-r-only[_ngcontent-%COMP%]{margin-left:0;margin-top:0;margin-bottom:0}.m-auto[_ngcontent-%COMP%]{margin-left:auto;margin-right:auto}.ls-0[_ngcontent-%COMP%]{margin-left:10px;margin-right:10px}html[_ngcontent-%COMP%], body[_ngcontent-%COMP%]{-webkit-tap-highlight-color:transparent}div[_ngcontent-%COMP%]{box-sizing:border-box}.color-inherit[_ngcontent-%COMP%]{color:inherit}.no-shadow[_ngcontent-%COMP%]{box-shadow:none}.pointer[_ngcontent-%COMP%]{cursor:pointer}.nolist[_ngcontent-%COMP%]{list-style:none}.actions-menu[_ngcontent-%COMP%]{color:#fff}.alert[_ngcontent-%COMP%]{background-color:#e8f4fd;padding:6px 16px;font-size:.875rem;font-family:Roboto,Helvetica Neue,sans-serif;font-weight:400;line-height:1.43;border-radius:4px;letter-spacing:normal;margin:10px}.alert[_ngcontent-%COMP%] .message[_ngcontent-%COMP%]{padding:8px 0;font-size:18px}.alert[_ngcontent-%COMP%] .alert-check[_ngcontent-%COMP%]{color:#359ff4;margin-right:2px;font-size:1.4rem} .mat-tooltip{font-size:15px;color:#fff!important;background-color:#4461e2b3;border:1px solid rgb(25.7777777778,51.5555555556,166.2222222222);max-width:400px!important;white-space:pre-line!important}.loading[_ngcontent-%COMP%]{position:absolute;min-width:100%;width:100px;height:12px;background:linear-gradient(125deg,#fff,#4461e2,#fff);animation:grow 4s linear infinite,move 4s linear infinite}mat-card-title[_ngcontent-%COMP%]{font-weight:600;font-size:x-large;padding-left:20px;padding-top:20px}html[_ngcontent-%COMP%], body[_ngcontent-%COMP%]{overflow:hidden}.overflow-x-scroll[_ngcontent-%COMP%]{max-width:100%;overflow-x:auto}.overflow-no[_ngcontent-%COMP%]{overflow:hidden}.overflow-auto[_ngcontent-%COMP%]{overflow:auto}.overflow-scroll[_ngcontent-%COMP%]{overflow:scroll}.table-container[_ngcontent-%COMP%]{overflow-x:auto;max-width:100%}body[_ngcontent-%COMP%], .no-p[_ngcontent-%COMP%]{padding:0}.no-p-t[_ngcontent-%COMP%]{padding-top:0}.no-p-r[_ngcontent-%COMP%]{padding-right:0}.no-p-b[_ngcontent-%COMP%]{padding-bottom:0}.no-p-l[_ngcontent-%COMP%]{padding-left:0}.no-p-v[_ngcontent-%COMP%], .no-p-h[_ngcontent-%COMP%]{padding:0}.p-5[_ngcontent-%COMP%]{padding:5px}.p-t-5[_ngcontent-%COMP%]{padding-top:5px}.p-r-5[_ngcontent-%COMP%]{padding-right:5px}.p-b-5[_ngcontent-%COMP%]{padding-bottom:5px}.p-l-5[_ngcontent-%COMP%]{padding-left:5px}.p-v-5[_ngcontent-%COMP%]{padding:5px 0}.p-h-5[_ngcontent-%COMP%]{padding:0 5px}.p-10[_ngcontent-%COMP%]{padding:10px}.p-t-10[_ngcontent-%COMP%]{padding-top:10px}.p-b-10[_ngcontent-%COMP%]{padding-bottom:10px}.p-v-10[_ngcontent-%COMP%]{padding:10px 0}.p-h-10[_ngcontent-%COMP%]{padding:0 10px}.p-15[_ngcontent-%COMP%]{padding:15px}.p-t-15[_ngcontent-%COMP%]{padding-top:15px}.p-r-15[_ngcontent-%COMP%]{padding-right:15px}.p-b-15[_ngcontent-%COMP%]{padding-bottom:15px}.p-l-15[_ngcontent-%COMP%]{padding-left:15px}.p-v-15[_ngcontent-%COMP%]{padding:15px 0}.p-h-15[_ngcontent-%COMP%]{padding:0 15px}.p-20[_ngcontent-%COMP%]{padding:20px}.p-t-20[_ngcontent-%COMP%]{padding-top:20px}.p-r-20[_ngcontent-%COMP%]{padding-right:20px}.p-b-20[_ngcontent-%COMP%]{padding-bottom:20px}.p-l-20[_ngcontent-%COMP%]{padding-left:20px}.p-v-20[_ngcontent-%COMP%]{padding:20px 0}.p-h-20[_ngcontent-%COMP%]{padding:0 20px}.p-25[_ngcontent-%COMP%]{padding:25px}.p-t-25[_ngcontent-%COMP%]{padding-top:25px}.p-r-25[_ngcontent-%COMP%]{padding-right:25px}.p-b-25[_ngcontent-%COMP%]{padding-bottom:25px}.p-l-25[_ngcontent-%COMP%]{padding-left:25px}.p-v-25[_ngcontent-%COMP%]{padding:25px 0}.p-h-25[_ngcontent-%COMP%]{padding:0 25px}.p-30[_ngcontent-%COMP%]{padding:30px}.p-t-30[_ngcontent-%COMP%]{padding-top:30px}.p-r-30[_ngcontent-%COMP%]{padding-right:30px}.p-b-30[_ngcontent-%COMP%]{padding-bottom:30px}.p-l-30[_ngcontent-%COMP%]{padding-left:30px}.p-v-30[_ngcontent-%COMP%]{padding:30px 0}.p-h-30[_ngcontent-%COMP%]{padding:0 30px}.p-35[_ngcontent-%COMP%]{padding:35px}.p-t-35[_ngcontent-%COMP%]{padding-top:35px}.p-r-35[_ngcontent-%COMP%]{padding-right:35px}.p-b-35[_ngcontent-%COMP%]{padding-bottom:35px}.p-l-35[_ngcontent-%COMP%]{padding-left:35px}.p-v-35[_ngcontent-%COMP%]{padding:35px 0}.p-h-35[_ngcontent-%COMP%]{padding:0 35px}.p-40[_ngcontent-%COMP%]{padding:40px}.p-t-40[_ngcontent-%COMP%]{padding-top:40px}.p-r-40[_ngcontent-%COMP%]{padding-right:40px}.p-b-40[_ngcontent-%COMP%]{padding-bottom:40px}.p-l-40[_ngcontent-%COMP%]{padding-left:40px}.p-v-40[_ngcontent-%COMP%]{padding-top:40px;padding-bottom:40px}.p-h-40[_ngcontent-%COMP%]{padding:0 40px}.p-45[_ngcontent-%COMP%]{padding:45px}.p-t-45[_ngcontent-%COMP%]{padding-top:45px}.p-r-45[_ngcontent-%COMP%]{padding-right:45px}.p-b-45[_ngcontent-%COMP%]{padding-bottom:45px}.p-l-45[_ngcontent-%COMP%]{padding-left:45px}.p-v-45[_ngcontent-%COMP%]{padding:45px 0}.p-h-45[_ngcontent-%COMP%]{padding:0 45px}.p-50[_ngcontent-%COMP%]{padding:50px}.p-t-50[_ngcontent-%COMP%]{padding-top:50px}.p-r-50[_ngcontent-%COMP%]{padding-right:50px}.p-b-50[_ngcontent-%COMP%]{padding-bottom:50px}.p-l-50[_ngcontent-%COMP%]{padding-left:50px}.p-v-50[_ngcontent-%COMP%]{padding:50px 0}.p-h-50[_ngcontent-%COMP%]{padding:0 50px}.p-55[_ngcontent-%COMP%]{padding:55px}.p-t-55[_ngcontent-%COMP%]{padding-top:55px}.p-r-55[_ngcontent-%COMP%]{padding-right:55px}.p-b-55[_ngcontent-%COMP%]{padding-bottom:55px}.p-l-55[_ngcontent-%COMP%]{padding-left:55px}.p-v-55[_ngcontent-%COMP%]{padding:55px 0}.p-h-55[_ngcontent-%COMP%]{padding:0 55px}.p-60[_ngcontent-%COMP%]{padding:60px}.p-t-60[_ngcontent-%COMP%]{padding-top:60px}.p-r-60[_ngcontent-%COMP%]{padding-right:60px}.p-b-60[_ngcontent-%COMP%]{padding-bottom:60px}.p-l-60[_ngcontent-%COMP%]{padding-left:60px}.p-v-60[_ngcontent-%COMP%]{padding:60px 0}.p-h-60[_ngcontent-%COMP%]{padding:0 60px}.p-65[_ngcontent-%COMP%]{padding:65px}.p-t-65[_ngcontent-%COMP%]{padding-top:65px}.p-r-65[_ngcontent-%COMP%]{padding-right:65px}.p-b-65[_ngcontent-%COMP%]{padding-bottom:65px}.p-l-65[_ngcontent-%COMP%]{padding-left:65px}.p-v-65[_ngcontent-%COMP%]{padding:65px 0}.p-h-65[_ngcontent-%COMP%]{padding:0 65px}.p-70[_ngcontent-%COMP%]{padding:70px}.p-t-70[_ngcontent-%COMP%]{padding-top:70px}.p-r-70[_ngcontent-%COMP%]{padding-right:70px}.p-b-70[_ngcontent-%COMP%]{padding-bottom:70px}.p-l-70[_ngcontent-%COMP%]{padding-left:70px}.p-v-70[_ngcontent-%COMP%]{padding:70px 0}.p-h-70[_ngcontent-%COMP%]{padding:0 70px}.p-75[_ngcontent-%COMP%]{padding:75px}.p-t-75[_ngcontent-%COMP%]{padding-top:75px}.p-r-75[_ngcontent-%COMP%]{padding-right:75px}.p-b-75[_ngcontent-%COMP%]{padding-bottom:75px}.p-l-75[_ngcontent-%COMP%]{padding-left:75px}.p-v-75[_ngcontent-%COMP%]{padding:75px 0}.p-h-75[_ngcontent-%COMP%]{padding:0 75px}.p-80[_ngcontent-%COMP%]{padding:80px}.p-t-80[_ngcontent-%COMP%]{padding-top:80px}.p-r-80[_ngcontent-%COMP%]{padding-right:80px}.p-b-80[_ngcontent-%COMP%]{padding-bottom:80px}.p-l-80[_ngcontent-%COMP%]{padding-left:80px}.p-v-80[_ngcontent-%COMP%]{padding:80px 0}.p-h-80[_ngcontent-%COMP%]{padding:0 80px}.no-padding[_ngcontent-%COMP%]{padding:0!important}.no-pad-lr[_ngcontent-%COMP%], .no-pad-rl[_ngcontent-%COMP%]{padding-left:0;padding-right:0}.no-pad-tb[_ngcontent-%COMP%], .no-pad-bt[_ngcontent-%COMP%]{padding-top:0;padding-bottom:0}.pad-t-only[_ngcontent-%COMP%]{padding-left:0;padding-right:0;padding-bottom:0}.pad-b-only[_ngcontent-%COMP%]{padding-left:0;padding-right:0;padding-top:0}.pad-l-only[_ngcontent-%COMP%]{padding-right:0;padding-top:0;padding-bottom:0}.pad-r-only[_ngcontent-%COMP%]{padding-left:0;padding-top:0;padding-bottom:0}html[_ngcontent-%COMP%], body[_ngcontent-%COMP%], .rel[_ngcontent-%COMP%], .relative[_ngcontent-%COMP%]{position:relative}.abs[_ngcontent-%COMP%], .absolute[_ngcontent-%COMP%]{position:absolute}.fixed[_ngcontent-%COMP%]{position:fixed}.status-active[_ngcontent-%COMP%]{color:#5cb85c}.status-inactive[_ngcontent-%COMP%]{color:#666f73}.status-deleted[_ngcontent-%COMP%]{color:#000}.status-pending[_ngcontent-%COMP%]{color:orange}.status-approved[_ngcontent-%COMP%]{color:#4461e2}.status-overpaid[_ngcontent-%COMP%]{color:purple}.status-chargeoff[_ngcontent-%COMP%]{color:#f39c12}.status-active-overdue[_ngcontent-%COMP%], .status-block[_ngcontent-%COMP%]{color:red}.status-matured[_ngcontent-%COMP%]{color:#ff4000}.subStatus-contract-termination[_ngcontent-%COMP%]{color:#b3b3b3}.mat-step-header[_ngcontent-%COMP%] .mat-step-icon-state-done[_ngcontent-%COMP%]{background-color:#2af72a}.mat-step-header[_ngcontent-%COMP%] .mat-step-icon-state-done[_ngcontent-%COMP%] .status-transfer-progress[_ngcontent-%COMP%]{color:#ff4000}.mat-step-header[_ngcontent-%COMP%] .mat-step-icon-state-done[_ngcontent-%COMP%] .status-transfer-hold[_ngcontent-%COMP%]{color:#df0101}html[_ngcontent-%COMP%], body[_ngcontent-%COMP%]{-webkit-font-smoothing:antialiased}html[_ngcontent-%COMP%]{font-size:16px}body[_ngcontent-%COMP%]{font-family:Roboto,Helvetica Neue,sans-serif;font-weight:400;font-size:14px;color:#000000de;line-height:1.5;letter-spacing:normal}.mat-h1[_ngcontent-%COMP%], .mat-headline[_ngcontent-%COMP%], .mat-typography[_ngcontent-%COMP%] .mat-h1[_ngcontent-%COMP%], .mat-typography[_ngcontent-%COMP%] .mat-headline[_ngcontent-%COMP%], .mat-typography[_ngcontent-%COMP%] h1[_ngcontent-%COMP%]{font:400 24px/32px Roboto,Helvetica Neue,sans-serif;letter-spacing:normal;margin:0 0 16px}.lh-1[_ngcontent-%COMP%]{line-height:1}.lh-13[_ngcontent-%COMP%]{line-height:1.3}.lh-15[_ngcontent-%COMP%]{line-height:1.5}.bold[_ngcontent-%COMP%], .strong[_ngcontent-%COMP%]{font-weight:700}.no-bold[_ngcontent-%COMP%]{font-weight:400}.italic[_ngcontent-%COMP%], .em[_ngcontent-%COMP%]{font-style:italic}.strike[_ngcontent-%COMP%]{text-decoration:line-through}.normal[_ngcontent-%COMP%]{font-weight:400;font-style:normal}.uppercase[_ngcontent-%COMP%]{text-transform:uppercase}.text-left[_ngcontent-%COMP%]{text-align:left}.text-center[_ngcontent-%COMP%]{text-align:center}.text-right[_ngcontent-%COMP%]{text-align:right}.w100[_ngcontent-%COMP%]{font-weight:100}.w200[_ngcontent-%COMP%]{font-weight:200}.w300[_ngcontent-%COMP%]{font-weight:300}.w400[_ngcontent-%COMP%]{font-weight:400}.w500[_ngcontent-%COMP%]{font-weight:500}.w600[_ngcontent-%COMP%]{font-weight:600}.w700[_ngcontent-%COMP%]{font-weight:700}.w800[_ngcontent-%COMP%]{font-weight:800}.w900[_ngcontent-%COMP%]{font-weight:900}.f9[_ngcontent-%COMP%]{font-size:9px}.f10[_ngcontent-%COMP%]{font-size:10px}.f11[_ngcontent-%COMP%]{font-size:11px}.f12[_ngcontent-%COMP%]{font-size:12px}.f13[_ngcontent-%COMP%]{font-size:13px}.f14[_ngcontent-%COMP%]{font-size:14px}.f15[_ngcontent-%COMP%]{font-size:15px}.f16[_ngcontent-%COMP%]{font-size:16px}.f17[_ngcontent-%COMP%]{font-size:17px}.f18[_ngcontent-%COMP%]{font-size:18px;line-height:30px}.f19[_ngcontent-%COMP%]{font-size:19px}.f20[_ngcontent-%COMP%]{font-size:20px}.f30[_ngcontent-%COMP%]{font-size:30px}.f40[_ngcontent-%COMP%]{font-size:40px}.f50[_ngcontent-%COMP%]{font-size:50px}.f60[_ngcontent-%COMP%]{font-size:60px}.size-small[_ngcontent-%COMP%]{font-size:75%}.size-normal[_ngcontent-%COMP%]{font-size:100%}.size-medium[_ngcontent-%COMP%]{font-size:125%}.size-big[_ngcontent-%COMP%], .size-large[_ngcontent-%COMP%]{font-size:150%}.size-huge[_ngcontent-%COMP%]{font-size:200%}.inherit[_ngcontent-%COMP%]{font:inherit}.text-shadow[_ngcontent-%COMP%]{text-shadow:1px 1px 1px rgba(0,0,0,.4)}.text-rgb-2[_ngcontent-%COMP%]{color:#0003}.text-rgb-3[_ngcontent-%COMP%]{color:#0000004d}.text-rgb-4[_ngcontent-%COMP%]{color:#0006}.text-rgb-5[_ngcontent-%COMP%]{color:#00000080}.no-ul[_ngcontent-%COMP%], .no-ul[_ngcontent-%COMP%]:hover, .no-ul[_ngcontent-%COMP%] a[_ngcontent-%COMP%], .no-ul[_ngcontent-%COMP%] a[_ngcontent-%COMP%]:hover{text-decoration:none}.no-wrap[_ngcontent-%COMP%]{white-space:nowrap}.auto-cell-size[_ngcontent-%COMP%]{white-space:nowrap;width:1%}.ls-0[_ngcontent-%COMP%]{letter-spacing:-3px;white-space:nowrap}.label-field[_ngcontent-%COMP%]{margin-top:32px}.wrap-content[_ngcontent-%COMP%]{overflow-wrap:break-word;word-wrap:break-word}.no-break-content[_ngcontent-%COMP%]{overflow-wrap:anywhere!important}.fit[_ngcontent-%COMP%]{max-width:100%}.half-width[_ngcontent-%COMP%]{width:50%}.full-width[_ngcontent-%COMP%]{width:100%}.full-height[_ngcontent-%COMP%]{height:100%}html[_ngcontent-%COMP%], body[_ngcontent-%COMP%]{width:100%;height:100%;min-height:100%}body[_ngcontent-%COMP%] table[_ngcontent-%COMP%]{width:100%}.container[_ngcontent-%COMP%]{max-width:74rem;width:90%}.mw300[_ngcontent-%COMP%]{max-width:300px}.mw400[_ngcontent-%COMP%]{max-width:400px}.mw500[_ngcontent-%COMP%]{max-width:500px}.mw600[_ngcontent-%COMP%]{max-width:600px}.fullwidth[_ngcontent-%COMP%]{width:100%}.zindex-1[_ngcontent-%COMP%]{z-index:1}.zindex-2[_ngcontent-%COMP%]{z-index:2}.zindex-3[_ngcontent-%COMP%]{z-index:3}.zindex-4[_ngcontent-%COMP%]{z-index:4}.tab-container[_ngcontent-%COMP%]{padding:1%;margin:1%}.tab-container[_ngcontent-%COMP%] .delete-button[_ngcontent-%COMP%]{margin-left:1%}.table-name[_ngcontent-%COMP%]{padding-left:2%}.table-data[_ngcontent-%COMP%], .system-defined[_ngcontent-%COMP%]{margin-top:3px}.long-text[_ngcontent-%COMP%]{word-break:break-all;white-space:normal}.small-icon[_ngcontent-%COMP%]{width:30px;height:30px}.json-textarea[_ngcontent-%COMP%]{width:100%;height:100%}"]})}}return t})();function T1e(t,i){if(t&1&&F(0,"mifosx-datatable-multi-row",0),t&2){let e=M();D("entityType",e.entityType)("entityId",e.entityId)("dataObject",e.entityDatatable)}}function P1e(t,i){if(t&1&&F(0,"mifosx-datatable-single-row",0),t&2){let e=M();D("entityType",e.entityType)("entityId",e.entityId)("dataObject",e.entityDatatable)}}var NR=(()=>{class t{constructor(){this.multiRowDatatableFlag=!1}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275cmp=P({type:t,selectors:[["mifosx-entity-datatable-tab"]],inputs:{multiRowDatatableFlag:"multiRowDatatableFlag",entityDatatable:"entityDatatable",entityType:"entityType",entityId:"entityId"},decls:3,vars:2,consts:[[3,"entityType","entityId","dataObject"]],template:function(n,o){n&1&&(h(0,"div"),E(1,T1e,1,3,"mifosx-datatable-multi-row",0),E(2,P1e,1,3,"mifosx-datatable-single-row",0),_()),n&2&&(p(),I(o.multiRowDatatableFlag?1:-1),p(),I(o.multiRowDatatableFlag?-1:2))},dependencies:[he,ve,Vh,Bh],encapsulation:2})}}return t})();var FR=(()=>{class t{constructor(){}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275cmp=P({type:t,selectors:[["mifosx-svg-icon"]],inputs:{iconFile:"iconFile",iconName:"iconName",iconClass:"iconClass",iconWidth:"iconWidth"},decls:2,vars:4,consts:[["preserveAspectRatio","xMidYMid meet",1,"icon",3,"ngClass"]],template:function(n,o){n&1&&($t(),h(0,"svg",0),F(1,"use"),_()),n&2&&(At("width",o.iconWidth,"px"),D("ngClass",o.iconClass),p(),ne("href","assets/images/icons_"+o.iconFile+".svg#"+o.iconName,null,"xlink"))},dependencies:[he,Un,ve],styles:["body[_ngcontent-%COMP%] table[_ngcontent-%COMP%] tbody[_ngcontent-%COMP%] tr[_ngcontent-%COMP%]:nth-child(2n){background-color:#f2f2f2}.bg-black[_ngcontent-%COMP%]{background-color:#000}.bg-light-grey[_ngcontent-%COMP%]{background-color:#e5e5e5}.bg-medium-grey[_ngcontent-%COMP%]{background-color:#ccc}.bg-grey[_ngcontent-%COMP%]{background-color:#999}.bg-dark-grey[_ngcontent-%COMP%]{background-color:#222}.bg-white[_ngcontent-%COMP%], .bg-fff[_ngcontent-%COMP%]{background-color:#fff}.bg-none[_ngcontent-%COMP%], .no-bg[_ngcontent-%COMP%]{background:none;background-image:none;background-color:transparent}.bg-facebook[_ngcontent-%COMP%]{background-color:#47639e}.bg-twitter[_ngcontent-%COMP%]{background-color:#02a8f3}body[_ngcontent-%COMP%] table[_ngcontent-%COMP%]{border:1px solid rgba(0,0,0,.12)}.no-border[_ngcontent-%COMP%]{border:none}.no-border-t[_ngcontent-%COMP%]{border-top:none}.no-border-r[_ngcontent-%COMP%]{border-right:none}.no-border-b[_ngcontent-%COMP%]{border-bottom:none}.no-border-l[_ngcontent-%COMP%]{border-left:none}.no-border-lr[_ngcontent-%COMP%], .no-border-rl[_ngcontent-%COMP%]{border-left:none;border-right:none}.no-border-tb[_ngcontent-%COMP%], .no-border-bt[_ngcontent-%COMP%]{border-top:none;border-bottom:none}.no-border-tl[_ngcontent-%COMP%], .no-border-lt[_ngcontent-%COMP%]{border-top:none;border-left:none}.no-border-tr[_ngcontent-%COMP%], .no-border-rt[_ngcontent-%COMP%]{border-top:none;border-right:none}.no-border-bl[_ngcontent-%COMP%], .no-border-lb[_ngcontent-%COMP%]{border-bottom:none;border-left:none}.no-border-br[_ngcontent-%COMP%], .no-border-rb[_ngcontent-%COMP%]{border-bottom:none;border-right:none}.border-dashed[_ngcontent-%COMP%], .border-dotted[_ngcontent-%COMP%]{border-style:dashed}.border-black[_ngcontent-%COMP%]{border-color:#000}.border-light-grey[_ngcontent-%COMP%]{border-color:#e5e5e5}.border-medium-grey[_ngcontent-%COMP%]{border-color:#ccc}.border-grey[_ngcontent-%COMP%]{border-color:#999}.border-dark-grey[_ngcontent-%COMP%]{border-color:#2222}.border-white[_ngcontent-%COMP%], .border-fff[_ngcontent-%COMP%]{border-color:#fff}.no-border-radius[_ngcontent-%COMP%]{border-radius:0}.radius3[_ngcontent-%COMP%]{border-radius:3px}.radius5[_ngcontent-%COMP%]{border-radius:5px}.radius10[_ngcontent-%COMP%]{border-radius:10px}.column-mandatory[_ngcontent-%COMP%]{color:#5cb85c;text-align:center}.not-column-mandatory[_ngcontent-%COMP%]{color:#666f73;text-align:center}.cdk-drag-placeholder[_ngcontent-%COMP%]{background:#3498db}.yes[_ngcontent-%COMP%]{color:#5cb85c!important;background-color:#5cb85c;height:4px;cursor:none}.no[_ngcontent-%COMP%]{color:red;background-color:red;height:4px;cursor:none}.strike[_ngcontent-%COMP%]{text-decoration:line-through;color:red}.transfer[_ngcontent-%COMP%]{color:#16a085}.linked[_ngcontent-%COMP%]{color:#4461e2}.accrual[_ngcontent-%COMP%]{color:#999}.fa-question[_ngcontent-%COMP%]{color:#4461e2}.enabled[_ngcontent-%COMP%]{color:#32cd32}.disabled[_ngcontent-%COMP%]{color:#f44366}.v-mid[_ngcontent-%COMP%], .v-m[_ngcontent-%COMP%]{vertical-align:middle}.v-top[_ngcontent-%COMP%], .v-t[_ngcontent-%COMP%]{vertical-align:top}.v-bottom[_ngcontent-%COMP%], .v-b[_ngcontent-%COMP%]{vertical-align:bottom}.v-super[_ngcontent-%COMP%]{vertical-align:super}.r-amount[_ngcontent-%COMP%]{text-align:right!important;padding-right:5px!important}.left[_ngcontent-%COMP%]{text-align:left!important}.right[_ngcontent-%COMP%]{text-align:right!important}.center[_ngcontent-%COMP%]{text-align:center!important}.amount-plus[_ngcontent-%COMP%]{color:#000}.amount-minus[_ngcontent-%COMP%]{color:#4461e2}.block[_ngcontent-%COMP%]{display:block}.inline[_ngcontent-%COMP%]{display:inline}.in-block[_ngcontent-%COMP%]{display:inline-block;zoom:1}.d-none[_ngcontent-%COMP%], .hide[_ngcontent-%COMP%], .hidden[_ngcontent-%COMP%]{display:none}.t-0[_ngcontent-%COMP%]{top:0}.b-0[_ngcontent-%COMP%]{bottom:0}.l-0[_ngcontent-%COMP%]{left:0}.r-0[_ngcontent-%COMP%]{right:0}.tb-0[_ngcontent-%COMP%]{top:0;bottom:0}.lr-0[_ngcontent-%COMP%]{left:0;right:0}.f-left[_ngcontent-%COMP%]{float:left}.f-right[_ngcontent-%COMP%]{float:right}.f-none[_ngcontent-%COMP%]{float:none}textarea[_ngcontent-%COMP%]{resize:both}textarea.vertical[_ngcontent-%COMP%], textarea.horizontal[_ngcontent-%COMP%]{resize:vertical}textarea.noresize[_ngcontent-%COMP%]{resize:none}.full-input[_ngcontent-%COMP%] input[_ngcontent-%COMP%], .full-input[_ngcontent-%COMP%] select[_ngcontent-%COMP%], .full-input[_ngcontent-%COMP%] textarea[_ngcontent-%COMP%]{width:100%}.normal[_ngcontent-%COMP%] input[_ngcontent-%COMP%], .normal[_ngcontent-%COMP%] select[_ngcontent-%COMP%], .normal[_ngcontent-%COMP%] textarea[_ngcontent-%COMP%], .full-input[_ngcontent-%COMP%] [type=checkbox][_ngcontent-%COMP%], .full-input[_ngcontent-%COMP%] [type=radio][_ngcontent-%COMP%]{width:auto}.mat-tab-body-content[_ngcontent-%COMP%]{margin-bottom:20px}.mat-datepicker-input[_ngcontent-%COMP%]{margin-top:5px;margin-bottom:5px}.loader-wrapper[_ngcontent-%COMP%]{height:100vh;width:100vw}.loader-wrapper[_ngcontent-%COMP%] .triangle[_ngcontent-%COMP%]{width:0;height:0;border-style:solid;position:absolute;animation:_ngcontent-%COMP%_rotate .8s infinite .2s}.loader-wrapper[_ngcontent-%COMP%] .bottom[_ngcontent-%COMP%]{border-width:0 90px 90px;border-color:transparent transparent #1fb050;bottom:calc(50% - 100px);left:calc(50% - 90px)}.loader-wrapper[_ngcontent-%COMP%] .top[_ngcontent-%COMP%]{border-width:90px 90px 0;border-color:#b4d575 transparent transparent;top:calc(50% - 100px);left:calc(50% - 90px)}.loader-wrapper[_ngcontent-%COMP%] .left[_ngcontent-%COMP%]{border-width:90px 0 90px 90px;border-color:transparent transparent transparent #1074b9;top:calc(50% - 90px);left:calc(50% - 100px)}.loader-wrapper[_ngcontent-%COMP%] .right[_ngcontent-%COMP%]{border-width:90px 90px 90px 0;border-color:transparent #1daeec transparent transparent;top:calc(50% - 90px);right:calc(50% - 100px)}@keyframes _ngcontent-%COMP%_rotate{0%{transform:rotate(0)}to{transform:rotate(360deg)}}body[_ngcontent-%COMP%]{margin:0}.container[_ngcontent-%COMP%]{margin:0 auto}.mb-05[_ngcontent-%COMP%]{margin-bottom:.5rem}.mr-05[_ngcontent-%COMP%]{margin-right:.5rem}.mb-1[_ngcontent-%COMP%]{margin-bottom:1rem}.mt-1[_ngcontent-%COMP%]{margin-top:1rem}.m-5[_ngcontent-%COMP%]{margin:5px}.m-t-5[_ngcontent-%COMP%]{margin-top:5px}.m-r-5[_ngcontent-%COMP%]{margin-right:5px}.m-b-5[_ngcontent-%COMP%]{margin-bottom:5px}.m-l-5[_ngcontent-%COMP%]{margin-left:5px}.m-v-5[_ngcontent-%COMP%]{margin:5px 0}.m-h-5[_ngcontent-%COMP%]{margin:0 5px}.m-10[_ngcontent-%COMP%]{margin:10px}.m-t-10[_ngcontent-%COMP%]{margin-top:10px}.m-r-10[_ngcontent-%COMP%]{margin-right:10px}.m-b-10[_ngcontent-%COMP%]{margin-bottom:10px}.m-l-10[_ngcontent-%COMP%]{margin-left:10px}.m-v-10[_ngcontent-%COMP%]{margin:10px 0}.m-h-10[_ngcontent-%COMP%]{margin:0 10px}.m-15[_ngcontent-%COMP%]{margin:15px}.m-t-15[_ngcontent-%COMP%]{margin-top:15px}.m-r-15[_ngcontent-%COMP%]{margin-right:15px}.m-b-15[_ngcontent-%COMP%]{margin-bottom:15px}.m-l-15[_ngcontent-%COMP%]{margin-left:15px}.m-v-15[_ngcontent-%COMP%]{margin:15px 0}.m-h-15[_ngcontent-%COMP%]{margin:0 15px}.m-20[_ngcontent-%COMP%]{margin:20px}.m-t-20[_ngcontent-%COMP%]{margin-top:20px}.m-r-20[_ngcontent-%COMP%]{margin-right:20px}.m-b-20[_ngcontent-%COMP%]{margin-bottom:20px}.m-l-20[_ngcontent-%COMP%]{margin-left:20px}.m-v-20[_ngcontent-%COMP%]{margin:20px 0}.m-h-20[_ngcontent-%COMP%]{margin:0 20px}.m-25[_ngcontent-%COMP%]{margin:25px}.m-t-25[_ngcontent-%COMP%]{margin-top:25px}.m-r-25[_ngcontent-%COMP%]{margin-right:25px}.m-b-25[_ngcontent-%COMP%]{margin-bottom:25px}.m-l-25[_ngcontent-%COMP%]{margin-left:25px}.m-v-25[_ngcontent-%COMP%]{margin:25px 0}.m-h-25[_ngcontent-%COMP%]{margin:0 25px}.m-30[_ngcontent-%COMP%]{margin:30px}.m-t-30[_ngcontent-%COMP%]{margin-top:30px}.m-r-30[_ngcontent-%COMP%]{margin-right:30px}.m-b-30[_ngcontent-%COMP%]{margin-bottom:30px}.m-l-30[_ngcontent-%COMP%]{margin-left:30px}.m-v-30[_ngcontent-%COMP%]{margin:30px 0}.m-h-30[_ngcontent-%COMP%]{margin:0 30px}.m-35[_ngcontent-%COMP%]{margin:35px}.m-t-35[_ngcontent-%COMP%]{margin-top:35px}.m-r-35[_ngcontent-%COMP%]{margin-right:35px}.m-b-35[_ngcontent-%COMP%]{margin-bottom:35px}.m-l-35[_ngcontent-%COMP%]{margin-left:35px}.m-v-35[_ngcontent-%COMP%]{margin:35px 0}.m-h-35[_ngcontent-%COMP%]{margin:0 35px}.m-40[_ngcontent-%COMP%]{margin:40px}.m-t-40[_ngcontent-%COMP%]{margin-top:40px}.m-r-40[_ngcontent-%COMP%]{margin-right:40px}.m-b-40[_ngcontent-%COMP%]{margin-bottom:40px}.m-l-40[_ngcontent-%COMP%]{margin-left:40px}.m-v-40[_ngcontent-%COMP%]{margin:40px 0}.m-h-40[_ngcontent-%COMP%]{margin:0 40px}.m-45[_ngcontent-%COMP%]{margin:45px}.m-t-45[_ngcontent-%COMP%]{margin-top:45px}.m-r-45[_ngcontent-%COMP%]{margin-right:45px}.m-b-45[_ngcontent-%COMP%]{margin-bottom:45px}.m-l-45[_ngcontent-%COMP%]{margin-left:45px}.m-v-45[_ngcontent-%COMP%]{margin:45px 0}.m-h-45[_ngcontent-%COMP%]{margin:0 45px}.m-50[_ngcontent-%COMP%]{margin:50px}.m-t-50[_ngcontent-%COMP%]{margin-top:50px}.m-r-50[_ngcontent-%COMP%]{margin-right:50px}.m-b-50[_ngcontent-%COMP%]{margin-bottom:50px}.m-l-50[_ngcontent-%COMP%]{margin-left:50px}.m-v-50[_ngcontent-%COMP%]{margin:50px 0}.m-h-50[_ngcontent-%COMP%]{margin:0 50px}.m-55[_ngcontent-%COMP%]{margin:55px}.m-t-55[_ngcontent-%COMP%]{margin-top:55px}.m-r-55[_ngcontent-%COMP%]{margin-right:55px}.m-b-55[_ngcontent-%COMP%]{margin-bottom:55px}.m-l-55[_ngcontent-%COMP%]{margin-left:55px}.m-v-55[_ngcontent-%COMP%]{margin:55px 0}.m-h-55[_ngcontent-%COMP%]{margin:0 55px}.m-60[_ngcontent-%COMP%]{margin:60px}.m-t-60[_ngcontent-%COMP%]{margin-top:60px}.m-r-60[_ngcontent-%COMP%]{margin-right:60px}.m-b-60[_ngcontent-%COMP%]{margin-bottom:60px}.m-l-60[_ngcontent-%COMP%]{margin-left:60px}.m-v-60[_ngcontent-%COMP%]{margin:60px 0}.m-h-60[_ngcontent-%COMP%]{margin:0 60px}.m-65[_ngcontent-%COMP%]{margin:65px}.m-t-65[_ngcontent-%COMP%]{margin-top:65px}.m-r-65[_ngcontent-%COMP%]{margin-right:65px}.m-b-65[_ngcontent-%COMP%]{margin-bottom:65px}.m-l-65[_ngcontent-%COMP%]{margin-left:65px}.m-v-65[_ngcontent-%COMP%]{margin:65px 0}.m-h-65[_ngcontent-%COMP%]{margin:0 65px}.m-70[_ngcontent-%COMP%]{margin:70px}.m-t-70[_ngcontent-%COMP%]{margin-top:70px}.m-r-70[_ngcontent-%COMP%]{margin-right:70px}.m-b-70[_ngcontent-%COMP%]{margin-bottom:70px}.m-l-70[_ngcontent-%COMP%]{margin-left:70px}.m-v-70[_ngcontent-%COMP%]{margin:70px 0}.m-h-70[_ngcontent-%COMP%]{margin:0 70px}.m-75[_ngcontent-%COMP%]{margin:75px}.m-t-75[_ngcontent-%COMP%]{margin-top:75px}.m-r-75[_ngcontent-%COMP%]{margin-right:75px}.m-b-75[_ngcontent-%COMP%]{margin-bottom:75px}.m-l-75[_ngcontent-%COMP%]{margin-left:75px}.m-v-75[_ngcontent-%COMP%]{margin:75px 0}.m-h-75[_ngcontent-%COMP%]{margin:0 75px}.m-80[_ngcontent-%COMP%]{margin:80px}.m-t-80[_ngcontent-%COMP%]{margin-top:80px}.m-r-80[_ngcontent-%COMP%]{margin-right:80px}.m-b-80[_ngcontent-%COMP%]{margin-bottom:80px}.m-l-80[_ngcontent-%COMP%]{margin-left:80px}.m-v-80[_ngcontent-%COMP%]{margin:80px 0}.m-h-80[_ngcontent-%COMP%]{margin:0 80px}.no-m[_ngcontent-%COMP%]{margin:0}.no-m-t[_ngcontent-%COMP%]{margin-top:0}.no-m-r[_ngcontent-%COMP%]{margin-right:0}.no-m-b[_ngcontent-%COMP%]{margin-bottom:0}.no-m-l[_ngcontent-%COMP%]{margin-left:0}.no-m-v[_ngcontent-%COMP%], .no-m-h[_ngcontent-%COMP%], .no-margin[_ngcontent-%COMP%]{margin:0}.no-m-lr[_ngcontent-%COMP%], .no-m-rl[_ngcontent-%COMP%]{margin-left:0;margin-right:0}.no-m-tb[_ngcontent-%COMP%], .no-m-bt[_ngcontent-%COMP%]{margin-top:0;margin-bottom:0}.m-t-only[_ngcontent-%COMP%]{margin-left:0;margin-right:0;margin-bottom:0}.m-b-only[_ngcontent-%COMP%]{margin-left:0;margin-right:0;margin-top:0}.m-l-only[_ngcontent-%COMP%]{margin-right:0;margin-top:0;margin-bottom:0}.m-r-only[_ngcontent-%COMP%]{margin-left:0;margin-top:0;margin-bottom:0}.m-auto[_ngcontent-%COMP%]{margin-left:auto;margin-right:auto}.ls-0[_ngcontent-%COMP%]{margin-left:10px;margin-right:10px}html[_ngcontent-%COMP%], body[_ngcontent-%COMP%]{-webkit-tap-highlight-color:transparent}div[_ngcontent-%COMP%]{box-sizing:border-box}.color-inherit[_ngcontent-%COMP%]{color:inherit}.no-shadow[_ngcontent-%COMP%]{box-shadow:none}.pointer[_ngcontent-%COMP%]{cursor:pointer}.nolist[_ngcontent-%COMP%]{list-style:none}.actions-menu[_ngcontent-%COMP%]{color:#fff}.alert[_ngcontent-%COMP%]{background-color:#e8f4fd;padding:6px 16px;font-size:.875rem;font-family:Roboto,Helvetica Neue,sans-serif;font-weight:400;line-height:1.43;border-radius:4px;letter-spacing:normal;margin:10px}.alert[_ngcontent-%COMP%] .message[_ngcontent-%COMP%]{padding:8px 0;font-size:18px}.alert[_ngcontent-%COMP%] .alert-check[_ngcontent-%COMP%]{color:#359ff4;margin-right:2px;font-size:1.4rem} .mat-tooltip{font-size:15px;color:#fff!important;background-color:#4461e2b3;border:1px solid rgb(25.7777777778,51.5555555556,166.2222222222);max-width:400px!important;white-space:pre-line!important}.loading[_ngcontent-%COMP%]{position:absolute;min-width:100%;width:100px;height:12px;background:linear-gradient(125deg,#fff,#4461e2,#fff);animation:grow 4s linear infinite,move 4s linear infinite}mat-card-title[_ngcontent-%COMP%]{font-weight:600;font-size:x-large;padding-left:20px;padding-top:20px}html[_ngcontent-%COMP%], body[_ngcontent-%COMP%]{overflow:hidden}.overflow-x-scroll[_ngcontent-%COMP%]{max-width:100%;overflow-x:auto}.overflow-no[_ngcontent-%COMP%]{overflow:hidden}.overflow-auto[_ngcontent-%COMP%]{overflow:auto}.overflow-scroll[_ngcontent-%COMP%]{overflow:scroll}.table-container[_ngcontent-%COMP%]{overflow-x:auto;max-width:100%}body[_ngcontent-%COMP%], .no-p[_ngcontent-%COMP%]{padding:0}.no-p-t[_ngcontent-%COMP%]{padding-top:0}.no-p-r[_ngcontent-%COMP%]{padding-right:0}.no-p-b[_ngcontent-%COMP%]{padding-bottom:0}.no-p-l[_ngcontent-%COMP%]{padding-left:0}.no-p-v[_ngcontent-%COMP%], .no-p-h[_ngcontent-%COMP%]{padding:0}.p-5[_ngcontent-%COMP%]{padding:5px}.p-t-5[_ngcontent-%COMP%]{padding-top:5px}.p-r-5[_ngcontent-%COMP%]{padding-right:5px}.p-b-5[_ngcontent-%COMP%]{padding-bottom:5px}.p-l-5[_ngcontent-%COMP%]{padding-left:5px}.p-v-5[_ngcontent-%COMP%]{padding:5px 0}.p-h-5[_ngcontent-%COMP%]{padding:0 5px}.p-10[_ngcontent-%COMP%]{padding:10px}.p-t-10[_ngcontent-%COMP%]{padding-top:10px}.p-b-10[_ngcontent-%COMP%]{padding-bottom:10px}.p-v-10[_ngcontent-%COMP%]{padding:10px 0}.p-h-10[_ngcontent-%COMP%]{padding:0 10px}.p-15[_ngcontent-%COMP%]{padding:15px}.p-t-15[_ngcontent-%COMP%]{padding-top:15px}.p-r-15[_ngcontent-%COMP%]{padding-right:15px}.p-b-15[_ngcontent-%COMP%]{padding-bottom:15px}.p-l-15[_ngcontent-%COMP%]{padding-left:15px}.p-v-15[_ngcontent-%COMP%]{padding:15px 0}.p-h-15[_ngcontent-%COMP%]{padding:0 15px}.p-20[_ngcontent-%COMP%]{padding:20px}.p-t-20[_ngcontent-%COMP%]{padding-top:20px}.p-r-20[_ngcontent-%COMP%]{padding-right:20px}.p-b-20[_ngcontent-%COMP%]{padding-bottom:20px}.p-l-20[_ngcontent-%COMP%]{padding-left:20px}.p-v-20[_ngcontent-%COMP%]{padding:20px 0}.p-h-20[_ngcontent-%COMP%]{padding:0 20px}.p-25[_ngcontent-%COMP%]{padding:25px}.p-t-25[_ngcontent-%COMP%]{padding-top:25px}.p-r-25[_ngcontent-%COMP%]{padding-right:25px}.p-b-25[_ngcontent-%COMP%]{padding-bottom:25px}.p-l-25[_ngcontent-%COMP%]{padding-left:25px}.p-v-25[_ngcontent-%COMP%]{padding:25px 0}.p-h-25[_ngcontent-%COMP%]{padding:0 25px}.p-30[_ngcontent-%COMP%]{padding:30px}.p-t-30[_ngcontent-%COMP%]{padding-top:30px}.p-r-30[_ngcontent-%COMP%]{padding-right:30px}.p-b-30[_ngcontent-%COMP%]{padding-bottom:30px}.p-l-30[_ngcontent-%COMP%]{padding-left:30px}.p-v-30[_ngcontent-%COMP%]{padding:30px 0}.p-h-30[_ngcontent-%COMP%]{padding:0 30px}.p-35[_ngcontent-%COMP%]{padding:35px}.p-t-35[_ngcontent-%COMP%]{padding-top:35px}.p-r-35[_ngcontent-%COMP%]{padding-right:35px}.p-b-35[_ngcontent-%COMP%]{padding-bottom:35px}.p-l-35[_ngcontent-%COMP%]{padding-left:35px}.p-v-35[_ngcontent-%COMP%]{padding:35px 0}.p-h-35[_ngcontent-%COMP%]{padding:0 35px}.p-40[_ngcontent-%COMP%]{padding:40px}.p-t-40[_ngcontent-%COMP%]{padding-top:40px}.p-r-40[_ngcontent-%COMP%]{padding-right:40px}.p-b-40[_ngcontent-%COMP%]{padding-bottom:40px}.p-l-40[_ngcontent-%COMP%]{padding-left:40px}.p-v-40[_ngcontent-%COMP%]{padding-top:40px;padding-bottom:40px}.p-h-40[_ngcontent-%COMP%]{padding:0 40px}.p-45[_ngcontent-%COMP%]{padding:45px}.p-t-45[_ngcontent-%COMP%]{padding-top:45px}.p-r-45[_ngcontent-%COMP%]{padding-right:45px}.p-b-45[_ngcontent-%COMP%]{padding-bottom:45px}.p-l-45[_ngcontent-%COMP%]{padding-left:45px}.p-v-45[_ngcontent-%COMP%]{padding:45px 0}.p-h-45[_ngcontent-%COMP%]{padding:0 45px}.p-50[_ngcontent-%COMP%]{padding:50px}.p-t-50[_ngcontent-%COMP%]{padding-top:50px}.p-r-50[_ngcontent-%COMP%]{padding-right:50px}.p-b-50[_ngcontent-%COMP%]{padding-bottom:50px}.p-l-50[_ngcontent-%COMP%]{padding-left:50px}.p-v-50[_ngcontent-%COMP%]{padding:50px 0}.p-h-50[_ngcontent-%COMP%]{padding:0 50px}.p-55[_ngcontent-%COMP%]{padding:55px}.p-t-55[_ngcontent-%COMP%]{padding-top:55px}.p-r-55[_ngcontent-%COMP%]{padding-right:55px}.p-b-55[_ngcontent-%COMP%]{padding-bottom:55px}.p-l-55[_ngcontent-%COMP%]{padding-left:55px}.p-v-55[_ngcontent-%COMP%]{padding:55px 0}.p-h-55[_ngcontent-%COMP%]{padding:0 55px}.p-60[_ngcontent-%COMP%]{padding:60px}.p-t-60[_ngcontent-%COMP%]{padding-top:60px}.p-r-60[_ngcontent-%COMP%]{padding-right:60px}.p-b-60[_ngcontent-%COMP%]{padding-bottom:60px}.p-l-60[_ngcontent-%COMP%]{padding-left:60px}.p-v-60[_ngcontent-%COMP%]{padding:60px 0}.p-h-60[_ngcontent-%COMP%]{padding:0 60px}.p-65[_ngcontent-%COMP%]{padding:65px}.p-t-65[_ngcontent-%COMP%]{padding-top:65px}.p-r-65[_ngcontent-%COMP%]{padding-right:65px}.p-b-65[_ngcontent-%COMP%]{padding-bottom:65px}.p-l-65[_ngcontent-%COMP%]{padding-left:65px}.p-v-65[_ngcontent-%COMP%]{padding:65px 0}.p-h-65[_ngcontent-%COMP%]{padding:0 65px}.p-70[_ngcontent-%COMP%]{padding:70px}.p-t-70[_ngcontent-%COMP%]{padding-top:70px}.p-r-70[_ngcontent-%COMP%]{padding-right:70px}.p-b-70[_ngcontent-%COMP%]{padding-bottom:70px}.p-l-70[_ngcontent-%COMP%]{padding-left:70px}.p-v-70[_ngcontent-%COMP%]{padding:70px 0}.p-h-70[_ngcontent-%COMP%]{padding:0 70px}.p-75[_ngcontent-%COMP%]{padding:75px}.p-t-75[_ngcontent-%COMP%]{padding-top:75px}.p-r-75[_ngcontent-%COMP%]{padding-right:75px}.p-b-75[_ngcontent-%COMP%]{padding-bottom:75px}.p-l-75[_ngcontent-%COMP%]{padding-left:75px}.p-v-75[_ngcontent-%COMP%]{padding:75px 0}.p-h-75[_ngcontent-%COMP%]{padding:0 75px}.p-80[_ngcontent-%COMP%]{padding:80px}.p-t-80[_ngcontent-%COMP%]{padding-top:80px}.p-r-80[_ngcontent-%COMP%]{padding-right:80px}.p-b-80[_ngcontent-%COMP%]{padding-bottom:80px}.p-l-80[_ngcontent-%COMP%]{padding-left:80px}.p-v-80[_ngcontent-%COMP%]{padding:80px 0}.p-h-80[_ngcontent-%COMP%]{padding:0 80px}.no-padding[_ngcontent-%COMP%]{padding:0!important}.no-pad-lr[_ngcontent-%COMP%], .no-pad-rl[_ngcontent-%COMP%]{padding-left:0;padding-right:0}.no-pad-tb[_ngcontent-%COMP%], .no-pad-bt[_ngcontent-%COMP%]{padding-top:0;padding-bottom:0}.pad-t-only[_ngcontent-%COMP%]{padding-left:0;padding-right:0;padding-bottom:0}.pad-b-only[_ngcontent-%COMP%]{padding-left:0;padding-right:0;padding-top:0}.pad-l-only[_ngcontent-%COMP%]{padding-right:0;padding-top:0;padding-bottom:0}.pad-r-only[_ngcontent-%COMP%]{padding-left:0;padding-top:0;padding-bottom:0}html[_ngcontent-%COMP%], body[_ngcontent-%COMP%], .rel[_ngcontent-%COMP%], .relative[_ngcontent-%COMP%]{position:relative}.abs[_ngcontent-%COMP%], .absolute[_ngcontent-%COMP%]{position:absolute}.fixed[_ngcontent-%COMP%]{position:fixed}.status-active[_ngcontent-%COMP%]{color:#5cb85c}.status-inactive[_ngcontent-%COMP%]{color:#666f73}.status-deleted[_ngcontent-%COMP%]{color:#000}.status-pending[_ngcontent-%COMP%]{color:orange}.status-approved[_ngcontent-%COMP%]{color:#4461e2}.status-overpaid[_ngcontent-%COMP%]{color:purple}.status-chargeoff[_ngcontent-%COMP%]{color:#f39c12}.status-active-overdue[_ngcontent-%COMP%], .status-block[_ngcontent-%COMP%]{color:red}.status-matured[_ngcontent-%COMP%]{color:#ff4000}.subStatus-contract-termination[_ngcontent-%COMP%]{color:#b3b3b3}.mat-step-header[_ngcontent-%COMP%] .mat-step-icon-state-done[_ngcontent-%COMP%]{background-color:#2af72a}.mat-step-header[_ngcontent-%COMP%] .mat-step-icon-state-done[_ngcontent-%COMP%] .status-transfer-progress[_ngcontent-%COMP%]{color:#ff4000}.mat-step-header[_ngcontent-%COMP%] .mat-step-icon-state-done[_ngcontent-%COMP%] .status-transfer-hold[_ngcontent-%COMP%]{color:#df0101}html[_ngcontent-%COMP%], body[_ngcontent-%COMP%]{-webkit-font-smoothing:antialiased}html[_ngcontent-%COMP%]{font-size:16px}body[_ngcontent-%COMP%]{font-family:Roboto,Helvetica Neue,sans-serif;font-weight:400;font-size:14px;color:#000000de;line-height:1.5;letter-spacing:normal}.mat-h1[_ngcontent-%COMP%], .mat-headline[_ngcontent-%COMP%], .mat-typography[_ngcontent-%COMP%] .mat-h1[_ngcontent-%COMP%], .mat-typography[_ngcontent-%COMP%] .mat-headline[_ngcontent-%COMP%], .mat-typography[_ngcontent-%COMP%] h1[_ngcontent-%COMP%]{font:400 24px/32px Roboto,Helvetica Neue,sans-serif;letter-spacing:normal;margin:0 0 16px}.lh-1[_ngcontent-%COMP%]{line-height:1}.lh-13[_ngcontent-%COMP%]{line-height:1.3}.lh-15[_ngcontent-%COMP%]{line-height:1.5}.bold[_ngcontent-%COMP%], .strong[_ngcontent-%COMP%]{font-weight:700}.no-bold[_ngcontent-%COMP%]{font-weight:400}.italic[_ngcontent-%COMP%], .em[_ngcontent-%COMP%]{font-style:italic}.strike[_ngcontent-%COMP%]{text-decoration:line-through}.normal[_ngcontent-%COMP%]{font-weight:400;font-style:normal}.uppercase[_ngcontent-%COMP%]{text-transform:uppercase}.text-left[_ngcontent-%COMP%]{text-align:left}.text-center[_ngcontent-%COMP%]{text-align:center}.text-right[_ngcontent-%COMP%]{text-align:right}.w100[_ngcontent-%COMP%]{font-weight:100}.w200[_ngcontent-%COMP%]{font-weight:200}.w300[_ngcontent-%COMP%]{font-weight:300}.w400[_ngcontent-%COMP%]{font-weight:400}.w500[_ngcontent-%COMP%]{font-weight:500}.w600[_ngcontent-%COMP%]{font-weight:600}.w700[_ngcontent-%COMP%]{font-weight:700}.w800[_ngcontent-%COMP%]{font-weight:800}.w900[_ngcontent-%COMP%]{font-weight:900}.f9[_ngcontent-%COMP%]{font-size:9px}.f10[_ngcontent-%COMP%]{font-size:10px}.f11[_ngcontent-%COMP%]{font-size:11px}.f12[_ngcontent-%COMP%]{font-size:12px}.f13[_ngcontent-%COMP%]{font-size:13px}.f14[_ngcontent-%COMP%]{font-size:14px}.f15[_ngcontent-%COMP%]{font-size:15px}.f16[_ngcontent-%COMP%]{font-size:16px}.f17[_ngcontent-%COMP%]{font-size:17px}.f18[_ngcontent-%COMP%]{font-size:18px;line-height:30px}.f19[_ngcontent-%COMP%]{font-size:19px}.f20[_ngcontent-%COMP%]{font-size:20px}.f30[_ngcontent-%COMP%]{font-size:30px}.f40[_ngcontent-%COMP%]{font-size:40px}.f50[_ngcontent-%COMP%]{font-size:50px}.f60[_ngcontent-%COMP%]{font-size:60px}.size-small[_ngcontent-%COMP%]{font-size:75%}.size-normal[_ngcontent-%COMP%]{font-size:100%}.size-medium[_ngcontent-%COMP%]{font-size:125%}.size-big[_ngcontent-%COMP%], .size-large[_ngcontent-%COMP%]{font-size:150%}.size-huge[_ngcontent-%COMP%]{font-size:200%}.inherit[_ngcontent-%COMP%]{font:inherit}.text-shadow[_ngcontent-%COMP%]{text-shadow:1px 1px 1px rgba(0,0,0,.4)}.text-rgb-2[_ngcontent-%COMP%]{color:#0003}.text-rgb-3[_ngcontent-%COMP%]{color:#0000004d}.text-rgb-4[_ngcontent-%COMP%]{color:#0006}.text-rgb-5[_ngcontent-%COMP%]{color:#00000080}.no-ul[_ngcontent-%COMP%], .no-ul[_ngcontent-%COMP%]:hover, .no-ul[_ngcontent-%COMP%] a[_ngcontent-%COMP%], .no-ul[_ngcontent-%COMP%] a[_ngcontent-%COMP%]:hover{text-decoration:none}.no-wrap[_ngcontent-%COMP%]{white-space:nowrap}.auto-cell-size[_ngcontent-%COMP%]{white-space:nowrap;width:1%}.ls-0[_ngcontent-%COMP%]{letter-spacing:-3px;white-space:nowrap}.label-field[_ngcontent-%COMP%]{margin-top:32px}.wrap-content[_ngcontent-%COMP%]{overflow-wrap:break-word;word-wrap:break-word}.no-break-content[_ngcontent-%COMP%]{overflow-wrap:anywhere!important}.fit[_ngcontent-%COMP%]{max-width:100%}.half-width[_ngcontent-%COMP%]{width:50%}.full-width[_ngcontent-%COMP%]{width:100%}.full-height[_ngcontent-%COMP%]{height:100%}html[_ngcontent-%COMP%], body[_ngcontent-%COMP%]{width:100%;height:100%;min-height:100%}body[_ngcontent-%COMP%] table[_ngcontent-%COMP%]{width:100%}.container[_ngcontent-%COMP%]{max-width:74rem;width:90%}.mw300[_ngcontent-%COMP%]{max-width:300px}.mw400[_ngcontent-%COMP%]{max-width:400px}.mw500[_ngcontent-%COMP%]{max-width:500px}.mw600[_ngcontent-%COMP%]{max-width:600px}.fullwidth[_ngcontent-%COMP%]{width:100%}.zindex-1[_ngcontent-%COMP%]{z-index:1}.zindex-2[_ngcontent-%COMP%]{z-index:2}.zindex-3[_ngcontent-%COMP%]{z-index:3}.zindex-4[_ngcontent-%COMP%]{z-index:4}.icon[_ngcontent-%COMP%]{flex:1}.chargeoff[_ngcontent-%COMP%]{color:#ffa726}"]})}}return t})();function L1e(t,i){t&1&&(h(0,"span"),y(1),S(2,"translate"),_()),t&2&&(p(),T(k(2,1,"labels.inputs.Credit")))}function A1e(t,i){t&1&&(h(0,"span"),y(1),S(2,"translate"),_()),t&2&&(p(),T(k(2,1,"labels.inputs.Debit")))}function z1e(t,i){if(t&1&&(h(0,"tr")(1,"th"),y(2),S(3,"translate"),_(),h(4,"td"),y(5),_()()),t&2){let e=M();p(2),T(k(3,2,"labels.inputs.Reference Number")),p(3),T(e.data.journalEntry.referenceNumber)}}function R1e(t,i){if(t&1&&(h(0,"tr")(1,"th"),y(2),S(3,"translate"),_(),h(4,"td"),y(5),_()()),t&2){let e=M();p(2),T(k(3,2,"labels.inputs.Comments")),p(3),T(e.data.journalEntry.comments)}}function N1e(t,i){t&1&&(h(0,"tr")(1,"th",4),y(2),S(3,"translate"),_()()),t&2&&(p(2),T(k(3,1,"labels.inputs.Payment Details")))}function F1e(t,i){if(t&1&&(h(0,"tr")(1,"th"),y(2),S(3,"translate"),_(),h(4,"td"),y(5),_()()),t&2){let e=M();p(2),T(k(3,2,"labels.inputs.Payment Type")),p(3),T(e.data.journalEntry.transactionDetails.paymentDetails.paymentType.name)}}function V1e(t,i){if(t&1&&(h(0,"tr")(1,"th"),y(2),S(3,"translate"),_(),h(4,"td"),y(5),_()()),t&2){let e=M();p(2),T(k(3,2,"labels.inputs.Account Number")),p(3),T(e.data.journalEntry.transactionDetails.paymentDetails.accountNumber)}}function B1e(t,i){if(t&1&&(h(0,"tr")(1,"th"),y(2),S(3,"translate"),_(),h(4,"td"),y(5),_()()),t&2){let e=M();p(2),T(k(3,2,"labels.inputs.Cheque Number")),p(3),T(e.data.journalEntry.transactionDetails.paymentDetails.checkNumber)}}function j1e(t,i){if(t&1&&(h(0,"tr")(1,"th"),y(2),S(3,"translate"),_(),h(4,"td"),y(5),_()()),t&2){let e=M();p(2),T(k(3,2,"labels.inputs.Routing Code")),p(3),T(e.data.journalEntry.transactionDetails.paymentDetails.routingCode)}}function H1e(t,i){if(t&1&&(h(0,"tr")(1,"th"),y(2),S(3,"translate"),_(),h(4,"td"),y(5),_()()),t&2){let e=M();p(2),T(k(3,2,"labels.inputs.Receipt Number")),p(3),T(e.data.journalEntry.transactionDetails.paymentDetails.receiptNumber)}}function U1e(t,i){if(t&1&&(h(0,"tr")(1,"th"),y(2),S(3,"translate"),_(),h(4,"td"),y(5),_()()),t&2){let e=M();p(2),T(k(3,2,"labels.inputs.Bank Number")),p(3),T(e.data.journalEntry.transactionDetails.paymentDetails.bankNumber)}}function $1e(t,i){if(t&1&&(h(0,"tr")(1,"th"),y(2),S(3,"translate"),_(),h(4,"td"),y(5),_()()),t&2){let e=M();p(2),T(k(3,2,"labels.inputs.Created by")),p(3),T(e.data.journalEntry.createdByUserName)}}var jh=(()=>{class t{constructor(){this.dialogRef=d(qt),this.data=d(En),this.existsPaymentDetails=!1;let e=this.data;this.existsPaymentDetails=e.journalEntry.transactionDetails!=null&&e.journalEntry.transactionDetails.paymentDetails!=null}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275cmp=P({type:t,selectors:[["mifosx-view-journal-entry"]],decls:82,vars:63,consts:[["mat-dialog-title",""],["mat-dialog-content",""],["align","end"],["mat-button","","mat-dialog-close",""],["colspan","2",1,"header"]],template:function(n,o){n&1&&(h(0,"h1",0),y(1),S(2,"translate"),_(),h(3,"div",1)(4,"table")(5,"tr")(6,"th"),y(7),S(8,"translate"),_(),h(9,"td"),y(10),_()(),h(11,"tr")(12,"th"),y(13),S(14,"translate"),_(),h(15,"td"),y(16),_()(),h(17,"tr")(18,"th"),y(19),S(20,"translate"),_(),h(21,"td"),y(22),_()(),h(23,"tr")(24,"th"),y(25),S(26,"translate"),_(),h(27,"td"),y(28),S(29,"dateFormat"),_()(),h(30,"tr")(31,"th"),y(32),S(33,"translate"),_(),h(34,"td"),y(35),_()(),h(36,"tr")(37,"th"),y(38),S(39,"translate"),_(),h(40,"td"),y(41),_()(),h(42,"tr")(43,"th"),y(44),S(45,"translate"),_(),h(46,"td"),y(47),_()(),h(48,"tr")(49,"th"),E(50,L1e,3,3,"span"),E(51,A1e,3,3,"span"),_(),h(52,"td"),y(53),S(54,"formatNumber"),_()(),h(55,"tr")(56,"th"),y(57),S(58,"translate"),_(),h(59,"td"),y(60),_()(),E(61,z1e,6,4,"tr"),E(62,R1e,6,4,"tr"),E(63,N1e,4,3,"tr"),E(64,F1e,6,4,"tr"),E(65,V1e,6,4,"tr"),E(66,B1e,6,4,"tr"),E(67,j1e,6,4,"tr"),E(68,H1e,6,4,"tr"),E(69,U1e,6,4,"tr"),E(70,$1e,6,4,"tr"),h(71,"tr")(72,"th"),y(73),S(74,"translate"),_(),h(75,"td"),y(76),S(77,"datetimeFormat"),_()()()(),h(78,"mat-dialog-actions",2)(79,"button",3),y(80),S(81,"translate"),_()()),n&2&&(p(),T(k(2,35,"labels.heading.View Journal Entry")),p(6),T(k(8,37,"labels.inputs.Office")),p(3),T(o.data.journalEntry.officeName),p(3),T(k(14,39,"labels.inputs.Entry ID")),p(3),T(o.data.journalEntry.id),p(3),T(k(20,41,"labels.inputs.Transaction ID")),p(3),T(o.data.journalEntry.transactionId),p(3),T(k(26,43,"labels.inputs.Transaction Date")),p(3),T(k(29,45,o.data.journalEntry.transactionDate)),p(4),T(k(33,47,"labels.inputs.Type")),p(3),T(o.data.journalEntry.glAccountType.value),p(3),T(k(39,49,"labels.inputs.Account Code")),p(3),T(o.data.journalEntry.glAccountId),p(3),T(k(45,51,"labels.inputs.Account Name")),p(3),T(o.data.journalEntry.glAccountName),p(3),I(o.data.journalEntry.entryType.value==="CREDIT"?50:-1),p(),I(o.data.journalEntry.entryType.value==="DEBIT"?51:-1),p(2),St("",o.data.journalEntry.currency.displaySymbol," ",k(54,53,o.data.journalEntry.amount)),p(4),T(k(58,55,"labels.inputs.Currency")),p(3),St("(",o.data.journalEntry.currency.code,") ",o.data.journalEntry.currency.name),p(),I(o.data.journalEntry.referenceNumber?61:-1),p(),I(o.data.journalEntry.comments?62:-1),p(),I(o.existsPaymentDetails?63:-1),p(),I(o.existsPaymentDetails&&(o.data.journalEntry.transactionDetails.paymentDetails!=null&&o.data.journalEntry.transactionDetails.paymentDetails.paymentType)?64:-1),p(),I(o.existsPaymentDetails&&(o.data.journalEntry.transactionDetails.paymentDetails!=null&&o.data.journalEntry.transactionDetails.paymentDetails.accountNumber)?65:-1),p(),I(o.existsPaymentDetails&&(o.data.journalEntry.transactionDetails.paymentDetails!=null&&o.data.journalEntry.transactionDetails.paymentDetails.checkNumber)?66:-1),p(),I(o.existsPaymentDetails&&(o.data.journalEntry.transactionDetails.paymentDetails!=null&&o.data.journalEntry.transactionDetails.paymentDetails.routingCode)?67:-1),p(),I(o.existsPaymentDetails&&(o.data.journalEntry.transactionDetails.paymentDetails!=null&&o.data.journalEntry.transactionDetails.paymentDetails.receiptNumber)?68:-1),p(),I(o.existsPaymentDetails&&(o.data.journalEntry.transactionDetails.paymentDetails!=null&&o.data.journalEntry.transactionDetails.paymentDetails.bankNumber)?69:-1),p(),I(o.existsPaymentDetails?70:-1),p(3),T(k(74,57,"labels.inputs.Submitted on")),p(3),T(k(77,59,o.data.journalEntry.submittedOnDate)),p(4),T(k(81,61,"labels.buttons.Close")))},dependencies:[he,ve,vt,xn,An,zn,Ln,Lo,Te,ca,Ts],styles:["table[_ngcontent-%COMP%] th[_ngcontent-%COMP%]{text-align:left;font-weight:500;padding:0 .4rem 0 0}table[_ngcontent-%COMP%] th.header[_ngcontent-%COMP%]{text-align:center;padding:.4rem .4rem 0 0}table[_ngcontent-%COMP%] td[_ngcontent-%COMP%]{padding:0 .4rem 0 0}"]})}}return t})();var G1e=t=>({revert:!0,comments:t}),W1e=()=>({redirect:!0});function q1e(t,i){if(t&1&&(h(0,"div")(1,"h1",0),y(2),S(3,"translate"),_(),h(4,"div",1)(5,"p"),y(6),S(7,"translate"),_(),h(8,"mat-form-field",2)(9,"mat-label"),y(10),S(11,"translate"),_(),F(12,"textarea",3),_()(),h(13,"mat-dialog-actions",4)(14,"button",5),y(15),S(16,"translate"),_(),h(17,"button",6),y(18),S(19,"translate"),_()()()),t&2){let e=M();p(2),T(k(3,7,"labels.heading.Revert Transaction")),p(4),T(k(7,9,"labels.text.Revert this transaction?")),p(4),T(k(11,11,"labels.inputs.Comments")),p(2),D("formControl",e.comments),p(3),T(k(16,13,"labels.buttons.No")),p(2),D("mat-dialog-close",Eo(17,G1e,e.comments.value)),p(),ee(" ",k(19,15,"labels.buttons.Yes")," ")}}function Y1e(t,i){if(t&1&&(h(0,"h1",0),y(1),S(2,"translate"),_(),h(3,"div",1)(4,"h4"),y(5),S(6,"translate"),_(),h(7,"p"),y(8),S(9,"translate"),_(),h(10,"p"),y(11),S(12,"translate"),_()(),h(13,"mat-dialog-actions",4)(14,"button",5),y(15),S(16,"translate"),_(),h(17,"button",6),y(18),S(19,"translate"),_()()),t&2){let e=M();p(),T(k(2,8,"labels.heading.Transaction Reverted")),p(4),T(k(6,10,"labels.heading.Success!")),p(3),T(k(9,12,"labels.text.Journal entry reverse transaction")),p(3),St("",k(12,14,"labels.text.Transaction ID"),": ",e.data.transactionId),p(4),T(k(16,16,"labels.buttons.Close")),p(2),D("mat-dialog-close",ko(20,W1e)),p(),ee(" ",k(19,18,"labels.buttons.Redirect to New Transaction")," ")}}var VR=(()=>{class t{constructor(){this.dialogRef=d(qt),this.data=d(En),this.comments=new Hi("")}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275cmp=P({type:t,selectors:[["mifosx-revert-transaction"]],decls:2,vars:1,consts:[["mat-dialog-title",""],["mat-dialog-content",""],[1,"flex-fill"],["matInput","",3,"formControl"],["align","end"],["mat-button","","mat-dialog-close",""],["mat-button","",3,"mat-dialog-close"]],template:function(n,o){n&1&&E(0,q1e,20,19,"div")(1,Y1e,20,21),n&2&&I(o.data.reverted?1:0)},dependencies:[he,ve,yi,mn,Si,Bt,Cn,ti,vt,xn,An,zn,Ln,Te],encapsulation:2})}}return t})();var BR=(()=>{class t{constructor(){this.http=d(Bn)}getOffices(){let e=new te().set("orderBy","id");return this.http.get("/offices",{params:e})}getAccountingRules(e=!1){let n=new te;return e&&(n=n.set("associations","all")),this.http.get("/accountingrules",{params:n})}getCurrencies(){return this.http.get("/currencies")}getPaymentTypes(){return this.http.get("/paymenttypes")}createJournalEntry(e){return this.http.post("/journalentries",e)}getGlAccounts(){let e=new te().set("manualEntriesAllowed","true").set("usage","1").set("disabled","false");return this.http.get("/glaccounts",{params:e})}getJournalEntry(e){let n=new te().set("transactionId",e).set("transactionDetails","true");return this.http.get("/journalentries",{params:n})}getJournalEntries(e,n,o,r,a){let s=new te().set("offset",r.toString()).set("limit",a.toString()).set("sortOrder",o).set("orderBy",n);return e.forEach(function(c){c.value&&(s=s.set(c.type,c.value))}),this.http.get("/journalentries",{params:s})}revertTransaction(e,n){let o=new te().set("command","reverse"),r={};return n&&(r={comments:n}),this.http.post(`/journalentries/${e}`,r,{params:o})}getFinancialActivityAccounts(){return this.http.get("/financialactivityaccounts")}getFinancialActivityAccountsTemplate(){return this.http.get("/financialactivityaccounts/template")}createFinancialActivityAccount(e){return this.http.post("/financialactivityaccounts",e)}getFinancialActivityAccount(e,n=!1){let o=new te().set("template",n.toString());return this.http.get(`/financialactivityaccounts/${e}`,{params:o})}updateFinancialActivityAccount(e,n){return this.http.put(`/financialactivityaccounts/${e}`,n)}deleteFinancialActivityAccount(e){return this.http.delete(`/financialactivityaccounts/${e}`)}retrieveOpeningBalances(e){let n=new te().set("officeId",e);return this.http.get("/journalentries/openingbalance",{params:n})}defineOpeningBalances(e){let n=new te().set("command","defineOpeningBalance");return this.http.post("/journalentries",e,{params:n})}getChartOfAccounts(){return this.http.get("/glaccounts")}getChartOfAccountsTemplate(){return this.http.get("/glaccounts/template")}createGlAccount(e){return this.http.post("/glaccounts",e)}getGlAccount(e,n=!1){let o=new te().set("template",n.toString());return this.http.get(`/glaccounts/${e}`,{params:o})}updateGlAccount(e,n){return this.http.put(`/glaccounts/${e}`,n)}deleteGlAccount(e){return this.http.delete(`/glaccounts/${e}`)}getAccountingClosures(){return this.http.get("/glclosures")}createAccountingClosure(e){return this.http.post("/glclosures",e)}getAccountingClosure(e){return this.http.get(`/glclosures/${e}`)}updateAccountingClosure(e,n){return this.http.put(`/glclosures/${e}`,n)}deleteAccountingClosure(e){return this.http.delete(`/glclosures/${e}`)}getAccountingRulesTemplate(){return this.http.get("/accountingrules/template")}createAccountingRule(e){return this.http.post("/accountingrules",e)}getAccountingRule(e){return this.http.get(`/accountingrules/${e}`)}updateAccountingRule(e,n){return this.http.put(`/accountingrules/${e}`,n)}deleteAccountingRule(e){return this.http.delete(`/accountingrules/${e}`)}executePeriodicAccruals(e){return this.http.post("/runaccruals",e)}getProvisioningEntries(){return this.http.get("/provisioningentries")}createProvisioningEntry(e){return this.http.post("/provisioningentries",e)}getProvisioningEntry(e){return this.http.get(`/provisioningentries/${e}`)}getLoanProducts(){return this.http.get("/loanproducts")}getProvisioningCategories(){return this.http.get("/provisioningcategory")}getProvisioningEntryEntries(e){let n=new te().set("entryId",e);return this.http.get("/provisioningentries/entries",{params:n})}getProvisioningJournalEntries(e){let n=new te().set("entryId",e);return this.http.get("/journalentries/provisioning",{params:n})}createProvisioningJournalEntries(e){let n=new te().set("command","createjournalentry");return this.http.post(`/provisioningentries/${e}`,{},{params:n})}recreateProvisioningEntries(e){let n=new te().set("command","recreateprovisioningentry");return this.http.post(`/provisioningentries/${e}`,{},{params:n})}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275prov=R({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();function Q1e(t,i){t&1&&(h(0,"span"),F(1,"fa-icon",18),y(2),S(3,"translate"),_()),t&2&&(p(2),ee("",k(3,1,"labels.buttons.Revert Transaction")," "))}function K1e(t,i){t&1&&(h(0,"span"),y(1),S(2,"translate"),_()),t&2&&(p(),T(k(2,1,"labels.buttons.Transaction Reverted")))}function X1e(t,i){if(t&1){let e=le();h(0,"button",17),N("click",function(){G(e);let o=M(3);return W(o.revertTransaction())}),E(1,Q1e,4,3,"span"),E(2,K1e,3,3,"span"),_()}if(t&2){let e=M(3);D("disabled",e.dataSource==null?null:e.dataSource.data[0].reversed),p(),I(e.dataSource.data[0].reversed?-1:1),p(),I(e.dataSource.data[0].reversed?2:-1)}}function Z1e(t,i){t&1&&(h(0,"div",1),ot(1,X1e,3,3,"button",16),_()),t&2&&(p(),D("mifosxHasPermission","REVERSE_JOURNALENTRY"))}function J1e(t,i){t&1&&(h(0,"div",21),y(1),S(2,"translate"),_()),t&2&&(p(),ee(" ",k(2,1,"labels.inputs.External Asset Owner")," "))}function e2e(t,i){if(t&1&&(h(0,"div",22),y(1),_()),t&2){let e=M(4);p(),ee(" ",e.dataSource.data[0].externalAssetOwner," ")}}function t2e(t,i){if(t&1&&(h(0,"mat-card",19)(1,"mat-card-content")(2,"div",20)(3,"div",21),y(4),S(5,"translate"),_(),h(6,"div",22),y(7),_(),h(8,"div",21),y(9),S(10,"translate"),_(),h(11,"div",22),y(12),S(13,"dateFormat"),_(),h(14,"div",21),y(15),S(16,"translate"),_(),h(17,"div",22),y(18),_(),h(19,"div",21),y(20),S(21,"translate"),_(),h(22,"div",22),y(23),S(24,"datetimeFormat"),_(),h(25,"div",21),y(26),S(27,"translate"),_(),h(28,"div",22),y(29),S(30,"yesNo"),_(),E(31,J1e,3,3,"div",21),E(32,e2e,2,1,"div",22),_()()()),t&2){let e=M(3);D("ngClass",Ft(e.journalEntryColor())),p(4),ee(" ",k(5,14,"labels.inputs.Office")," "),p(3),ee(" ",e.dataSource.data[0].officeName," "),p(2),ee(" ",k(10,16,"labels.inputs.Transaction Date")," "),p(3),ee(" ",k(13,18,e.dataSource.data[0].transactionDate)," "),p(3),ee(" ",k(16,20,"labels.inputs.Created By")," "),p(3),ee(" ",e.dataSource.data[0].createdByUserName," "),p(2),ee(" ",k(21,22,"labels.inputs.Submitted on")," "),p(3),ee(" ",k(24,24,e.dataSource.data[0].submittedOnDate)," "),p(3),ee(" ",k(27,26,"labels.inputs.Manual Journal Entry")," "),p(3),ee(" ",k(30,28,e.dataSource.data[0].manualEntry)," "),p(2),I(e.dataSource.data[0].externalAssetOwner?31:-1),p(),I(e.dataSource.data[0].externalAssetOwner?32:-1)}}function n2e(t,i){if(t&1&&(h(0,"div",0),E(1,t2e,33,30,"mat-card",19),_()),t&2){let e=M(2);p(),I(e.dataSource?1:-1)}}function i2e(t,i){t&1&&(h(0,"th",23),y(1),S(2,"translate"),_()),t&2&&(p(),ee(" ",k(2,1,"labels.inputs.Entry ID")," "))}function o2e(t,i){if(t&1&&(h(0,"td",24),y(1),_()),t&2){let e=i.$implicit;p(),T(e.id)}}function r2e(t,i){t&1&&(h(0,"th",23),y(1),S(2,"translate"),_()),t&2&&(p(),ee(" ",k(2,1,"labels.inputs.Type")," "))}function a2e(t,i){if(t&1&&(h(0,"td",24),y(1),_()),t&2){let e=i.$implicit;p(),T(e.glAccountType.value)}}function s2e(t,i){t&1&&(h(0,"th",23),y(1),S(2,"translate"),_()),t&2&&(p(),ee(" ",k(2,1,"labels.inputs.Account Code")," "))}function c2e(t,i){if(t&1&&(h(0,"td",24),y(1),_()),t&2){let e=i.$implicit;p(),T(e.glAccountCode)}}function l2e(t,i){t&1&&(h(0,"th",23),y(1),S(2,"translate"),_()),t&2&&(p(),ee(" ",k(2,1,"labels.inputs.Account Name")," "))}function d2e(t,i){if(t&1&&(h(0,"td",24),y(1),_()),t&2){let e=i.$implicit;p(),T(e.glAccountName)}}function u2e(t,i){t&1&&(h(0,"th",23),y(1),S(2,"translate"),_()),t&2&&(p(),ee(" ",k(2,1,"labels.inputs.Debit")," "))}function m2e(t,i){if(t&1&&(h(0,"span"),y(1),S(2,"formatNumber"),_()),t&2){let e=M().$implicit;p(),St(" ",e.currency.displaySymbol||e.currency.code," ",k(2,2,e.amount)," ")}}function p2e(t,i){if(t&1&&(h(0,"td",24),E(1,m2e,3,4,"span"),_()),t&2){let e=i.$implicit;p(),I(e.entryType.value==="DEBIT"?1:-1)}}function f2e(t,i){t&1&&(h(0,"th",23),y(1),S(2,"translate"),_()),t&2&&(p(),ee(" ",k(2,1,"labels.inputs.Credit")," "))}function h2e(t,i){if(t&1&&(h(0,"span"),y(1),S(2,"formatNumber"),_()),t&2){let e=M().$implicit;p(),St(" ",e.currency.displaySymbol||e.currency.code," ",k(2,2,e.amount)," ")}}function g2e(t,i){if(t&1&&(h(0,"td",24),E(1,h2e,3,4,"span"),_()),t&2){let e=i.$implicit;p(),I(e.entryType.value==="CREDIT"?1:-1)}}function _2e(t,i){t&1&&F(0,"tr",25)}function b2e(t,i){if(t&1){let e=le();h(0,"tr",26),N("click",function(){let o=G(e).$implicit,r=M(2);return W(r.viewJournalEntry(o))}),_()}}function v2e(t,i){if(t&1){let e=le();h(0,"div"),E(1,Z1e,2,1,"div",1),E(2,n2e,2,1,"div",0),h(3,"div",2)(4,"table",3),Vi(5,4),ot(6,i2e,3,3,"th",5)(7,o2e,2,1,"td",6),Bi(),Vi(8,7),ot(9,r2e,3,3,"th",5)(10,a2e,2,1,"td",6),Bi(),Vi(11,8),ot(12,s2e,3,3,"th",5)(13,c2e,2,1,"td",6),Bi(),Vi(14,9),ot(15,l2e,3,3,"th",5)(16,d2e,2,1,"td",6),Bi(),Vi(17,10),ot(18,u2e,3,3,"th",5)(19,p2e,2,1,"td",6),Bi(),Vi(20,11),ot(21,f2e,3,3,"th",5)(22,g2e,2,1,"td",6),Bi(),ot(23,_2e,1,0,"tr",12)(24,b2e,1,0,"tr",13),_(),h(25,"div",14)(26,"button",15),N("click",function(){G(e);let o=M();return W(o.goBack())}),y(27),S(28,"translate"),_()()()()}if(t&2){let e=M();p(),I(e.dataSource!=null&&e.dataSource.data[0].manualEntry?1:-1),p(),I(e.isViewTransaction()?2:-1),p(2),D("dataSource",e.dataSource),p(19),D("matHeaderRowDef",e.displayedColumns),p(),D("matRowDefColumns",e.displayedColumns),p(3),ee(" ",k(28,6,"labels.buttons.Back")," ")}}function y2e(t,i){if(t&1){let e=le();h(0,"div",0)(1,"div",27)(2,"div",28),F(3,"i",29),y(4),S(5,"translate"),_()(),h(6,"div",14)(7,"button",15),N("click",function(){G(e);let o=M();return W(o.goBack())}),y(8),S(9,"translate"),_()()()}t&2&&(p(4),ee(" ",k(5,2,"labels.text.No data found")," "),p(4),ee(" ",k(9,4,"labels.buttons.Back")," "))}var jR=(()=>{class t{constructor(){this.accountingService=d(BR),this.route=d(ro),this.router=d(bo),this.dialog=d(Wi),this.location=d(Jo),this.displayedColumns=["id","glAccountType","glAccountCode","glAccountName","debit","credit"],this.isJournalEntryLoaded=!1,this.isManualJournalEntry=!1}ngOnInit(){this.route.data.subscribe(e=>{this.title=e.title,this.isJournalEntryLoaded=!1,this.isViewTransaction()?(this.transaction=e.transaction,e.transaction.pageItems.length>0&&(this.isJournalEntryLoaded=!0,this.transactionId=e.transaction.pageItems[0].transactionId,this.isManualJournalEntry=e.transaction.pageItems[0].manualEntry)):this.isViewTransfer()&&(this.journalEntriesData=e.transferJournalEntryData.journalEntryData.content,this.isJournalEntryLoaded=!0),this.setTransaction()})}isViewTransaction(){return this.title==="View Transaction"}isViewTransfer(){return this.title==="View Transfer"}setTransaction(){this.journalEntriesData!=null?this.dataSource=new Eu(this.journalEntriesData):(this.dataSource=new Eu(this.transaction.pageItems),this.dataSource.sortingDataAccessor=(e,n)=>{switch(n){case"glAccountType":return e.glAccountType.value;case"debit":return e.amount;case"credit":return e.amount;default:return e[n]}}),this.dataSource.paginator=this.paginator,this.dataSource.sort=this.sort}viewJournalEntry(e){this.dialog.open(jh,{data:{journalEntry:e}})}revertTransaction(e){this.dialog.open(VR,{data:{reverted:this.dataSource.data[0].reversed,transactionId:e}}).afterClosed().subscribe(o=>{o.revert?this.accountingService.revertTransaction(this.transactionId,o.comments).subscribe(r=>{this.dataSource.data[0].reversed=!0,this.revertTransaction(r.transactionId)}):o.redirect&&this.router.navigate(["../",e],{relativeTo:this.route})})}goBack(){this.location.back()}journalEntryColor(){return this.isManualJournalEntry?"manual-entry":""}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275cmp=P({type:t,selectors:[["mifosx-view-journal-entry-transaction"]],viewQuery:function(n,o){if(n&1&&(ue(wb,7),ue(oh,7)),n&2){let r;U(r=$())&&(o.paginator=r.first),U(r=$())&&(o.sort=r.first)}},decls:2,vars:2,consts:[[1,"container","m-b-20"],[1,"layout-row","layout-align-end","container","m-b-20"],[1,"mat-elevation-z8","container","layout-align-center","layout-row-wrap"],["mat-table","","matSort","",3,"dataSource"],["matColumnDef","id"],["mat-header-cell","","class","center","mat-sort-header","",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","glAccountType"],["matColumnDef","glAccountCode"],["matColumnDef","glAccountName"],["matColumnDef","debit"],["matColumnDef","credit"],["mat-header-row","",4,"matHeaderRowDef"],["mat-row","","class","select-row",3,"click",4,"matRowDef","matRowDefColumns"],[1,"layout-row","layout-align-center","m-t-15","m-b-15","gap-5px","layout-xs-column"],["type","button","color","primary","mat-raised-button","",3,"click"],["mat-raised-button","","color","primary",3,"disabled","click",4,"mifosxHasPermission"],["mat-raised-button","","color","primary",3,"click","disabled"],["icon","undo",1,"m-r-10"],[1,"mat-elevation-z8",3,"ngClass"],[1,"layout-row-wrap"],[1,"flex-25","header"],[1,"flex-25"],["mat-header-cell","","mat-sort-header","",1,"center"],["mat-cell",""],["mat-header-row",""],["mat-row","",1,"select-row",3,"click"],[1,"alert"],[1,"message"],[1,"fa","fa-exclamation-circle","alert-check"]],template:function(n,o){n&1&&(E(0,v2e,29,8,"div"),E(1,y2e,10,6,"div",0)),n&2&&(I(o.isJournalEntryLoaded?0:-1),p(),I(o.isJournalEntryLoaded?-1:1))},dependencies:[he,Un,ve,LE,AE,vt,Ps,Yt,ph,oh,gh,hh,_h,Bz,fh,bh,vh,Ch,yh,xh,Lo,Te,ca,Ts,Km],styles:["body[_ngcontent-%COMP%] table[_ngcontent-%COMP%] tbody[_ngcontent-%COMP%] tr[_ngcontent-%COMP%]:nth-child(2n){background-color:#f2f2f2}.bg-black[_ngcontent-%COMP%]{background-color:#000}.bg-light-grey[_ngcontent-%COMP%]{background-color:#e5e5e5}.bg-medium-grey[_ngcontent-%COMP%]{background-color:#ccc}.bg-grey[_ngcontent-%COMP%]{background-color:#999}.bg-dark-grey[_ngcontent-%COMP%]{background-color:#222}.bg-white[_ngcontent-%COMP%], .bg-fff[_ngcontent-%COMP%]{background-color:#fff}.bg-none[_ngcontent-%COMP%], .no-bg[_ngcontent-%COMP%]{background:none;background-image:none;background-color:transparent}.bg-facebook[_ngcontent-%COMP%]{background-color:#47639e}.bg-twitter[_ngcontent-%COMP%]{background-color:#02a8f3}body[_ngcontent-%COMP%] table[_ngcontent-%COMP%]{border:1px solid rgba(0,0,0,.12)}.no-border[_ngcontent-%COMP%]{border:none}.no-border-t[_ngcontent-%COMP%]{border-top:none}.no-border-r[_ngcontent-%COMP%]{border-right:none}.no-border-b[_ngcontent-%COMP%]{border-bottom:none}.no-border-l[_ngcontent-%COMP%]{border-left:none}.no-border-lr[_ngcontent-%COMP%], .no-border-rl[_ngcontent-%COMP%]{border-left:none;border-right:none}.no-border-tb[_ngcontent-%COMP%], .no-border-bt[_ngcontent-%COMP%]{border-top:none;border-bottom:none}.no-border-tl[_ngcontent-%COMP%], .no-border-lt[_ngcontent-%COMP%]{border-top:none;border-left:none}.no-border-tr[_ngcontent-%COMP%], .no-border-rt[_ngcontent-%COMP%]{border-top:none;border-right:none}.no-border-bl[_ngcontent-%COMP%], .no-border-lb[_ngcontent-%COMP%]{border-bottom:none;border-left:none}.no-border-br[_ngcontent-%COMP%], .no-border-rb[_ngcontent-%COMP%]{border-bottom:none;border-right:none}.border-dashed[_ngcontent-%COMP%], .border-dotted[_ngcontent-%COMP%]{border-style:dashed}.border-black[_ngcontent-%COMP%]{border-color:#000}.border-light-grey[_ngcontent-%COMP%]{border-color:#e5e5e5}.border-medium-grey[_ngcontent-%COMP%]{border-color:#ccc}.border-grey[_ngcontent-%COMP%]{border-color:#999}.border-dark-grey[_ngcontent-%COMP%]{border-color:#2222}.border-white[_ngcontent-%COMP%], .border-fff[_ngcontent-%COMP%]{border-color:#fff}.no-border-radius[_ngcontent-%COMP%]{border-radius:0}.radius3[_ngcontent-%COMP%]{border-radius:3px}.radius5[_ngcontent-%COMP%]{border-radius:5px}.radius10[_ngcontent-%COMP%]{border-radius:10px}.column-mandatory[_ngcontent-%COMP%]{color:#5cb85c;text-align:center}.not-column-mandatory[_ngcontent-%COMP%]{color:#666f73;text-align:center}.cdk-drag-placeholder[_ngcontent-%COMP%]{background:#3498db}.yes[_ngcontent-%COMP%]{color:#5cb85c!important;background-color:#5cb85c;height:4px;cursor:none}.no[_ngcontent-%COMP%]{color:red;background-color:red;height:4px;cursor:none}.strike[_ngcontent-%COMP%]{text-decoration:line-through;color:red}.transfer[_ngcontent-%COMP%]{color:#16a085}.linked[_ngcontent-%COMP%]{color:#4461e2}.accrual[_ngcontent-%COMP%]{color:#999}.fa-question[_ngcontent-%COMP%]{color:#4461e2}.enabled[_ngcontent-%COMP%]{color:#32cd32}.disabled[_ngcontent-%COMP%]{color:#f44366}.v-mid[_ngcontent-%COMP%], .v-m[_ngcontent-%COMP%]{vertical-align:middle}.v-top[_ngcontent-%COMP%], .v-t[_ngcontent-%COMP%]{vertical-align:top}.v-bottom[_ngcontent-%COMP%], .v-b[_ngcontent-%COMP%]{vertical-align:bottom}.v-super[_ngcontent-%COMP%]{vertical-align:super}.r-amount[_ngcontent-%COMP%]{text-align:right!important;padding-right:5px!important}.left[_ngcontent-%COMP%]{text-align:left!important}.right[_ngcontent-%COMP%]{text-align:right!important}.center[_ngcontent-%COMP%]{text-align:center!important}.amount-plus[_ngcontent-%COMP%]{color:#000}.amount-minus[_ngcontent-%COMP%]{color:#4461e2}.block[_ngcontent-%COMP%]{display:block}.inline[_ngcontent-%COMP%]{display:inline}.in-block[_ngcontent-%COMP%]{display:inline-block;zoom:1}.d-none[_ngcontent-%COMP%], .hide[_ngcontent-%COMP%], .hidden[_ngcontent-%COMP%]{display:none}.t-0[_ngcontent-%COMP%]{top:0}.b-0[_ngcontent-%COMP%]{bottom:0}.l-0[_ngcontent-%COMP%]{left:0}.r-0[_ngcontent-%COMP%]{right:0}.tb-0[_ngcontent-%COMP%]{top:0;bottom:0}.lr-0[_ngcontent-%COMP%]{left:0;right:0}.f-left[_ngcontent-%COMP%]{float:left}.f-right[_ngcontent-%COMP%]{float:right}.f-none[_ngcontent-%COMP%]{float:none}textarea[_ngcontent-%COMP%]{resize:both}textarea.vertical[_ngcontent-%COMP%], textarea.horizontal[_ngcontent-%COMP%]{resize:vertical}textarea.noresize[_ngcontent-%COMP%]{resize:none}.full-input[_ngcontent-%COMP%] input[_ngcontent-%COMP%], .full-input[_ngcontent-%COMP%] select[_ngcontent-%COMP%], .full-input[_ngcontent-%COMP%] textarea[_ngcontent-%COMP%]{width:100%}.normal[_ngcontent-%COMP%] input[_ngcontent-%COMP%], .normal[_ngcontent-%COMP%] select[_ngcontent-%COMP%], .normal[_ngcontent-%COMP%] textarea[_ngcontent-%COMP%], .full-input[_ngcontent-%COMP%] [type=checkbox][_ngcontent-%COMP%], .full-input[_ngcontent-%COMP%] [type=radio][_ngcontent-%COMP%]{width:auto}.mat-tab-body-content[_ngcontent-%COMP%]{margin-bottom:20px}.mat-datepicker-input[_ngcontent-%COMP%]{margin-top:5px;margin-bottom:5px}.loader-wrapper[_ngcontent-%COMP%]{height:100vh;width:100vw}.loader-wrapper[_ngcontent-%COMP%] .triangle[_ngcontent-%COMP%]{width:0;height:0;border-style:solid;position:absolute;animation:_ngcontent-%COMP%_rotate .8s infinite .2s}.loader-wrapper[_ngcontent-%COMP%] .bottom[_ngcontent-%COMP%]{border-width:0 90px 90px;border-color:transparent transparent #1fb050;bottom:calc(50% - 100px);left:calc(50% - 90px)}.loader-wrapper[_ngcontent-%COMP%] .top[_ngcontent-%COMP%]{border-width:90px 90px 0;border-color:#b4d575 transparent transparent;top:calc(50% - 100px);left:calc(50% - 90px)}.loader-wrapper[_ngcontent-%COMP%] .left[_ngcontent-%COMP%]{border-width:90px 0 90px 90px;border-color:transparent transparent transparent #1074b9;top:calc(50% - 90px);left:calc(50% - 100px)}.loader-wrapper[_ngcontent-%COMP%] .right[_ngcontent-%COMP%]{border-width:90px 90px 90px 0;border-color:transparent #1daeec transparent transparent;top:calc(50% - 90px);right:calc(50% - 100px)}@keyframes _ngcontent-%COMP%_rotate{0%{transform:rotate(0)}to{transform:rotate(360deg)}}body[_ngcontent-%COMP%]{margin:0}.container[_ngcontent-%COMP%]{margin:0 auto}.mb-05[_ngcontent-%COMP%]{margin-bottom:.5rem}.mr-05[_ngcontent-%COMP%]{margin-right:.5rem}.mb-1[_ngcontent-%COMP%]{margin-bottom:1rem}.mt-1[_ngcontent-%COMP%]{margin-top:1rem}.m-5[_ngcontent-%COMP%]{margin:5px}.m-t-5[_ngcontent-%COMP%]{margin-top:5px}.m-r-5[_ngcontent-%COMP%]{margin-right:5px}.m-b-5[_ngcontent-%COMP%]{margin-bottom:5px}.m-l-5[_ngcontent-%COMP%]{margin-left:5px}.m-v-5[_ngcontent-%COMP%]{margin:5px 0}.m-h-5[_ngcontent-%COMP%]{margin:0 5px}.m-10[_ngcontent-%COMP%]{margin:10px}.m-t-10[_ngcontent-%COMP%]{margin-top:10px}.m-r-10[_ngcontent-%COMP%]{margin-right:10px}.m-b-10[_ngcontent-%COMP%]{margin-bottom:10px}.m-l-10[_ngcontent-%COMP%]{margin-left:10px}.m-v-10[_ngcontent-%COMP%]{margin:10px 0}.m-h-10[_ngcontent-%COMP%]{margin:0 10px}.m-15[_ngcontent-%COMP%]{margin:15px}.m-t-15[_ngcontent-%COMP%]{margin-top:15px}.m-r-15[_ngcontent-%COMP%]{margin-right:15px}.m-b-15[_ngcontent-%COMP%]{margin-bottom:15px}.m-l-15[_ngcontent-%COMP%]{margin-left:15px}.m-v-15[_ngcontent-%COMP%]{margin:15px 0}.m-h-15[_ngcontent-%COMP%]{margin:0 15px}.m-20[_ngcontent-%COMP%]{margin:20px}.m-t-20[_ngcontent-%COMP%]{margin-top:20px}.m-r-20[_ngcontent-%COMP%]{margin-right:20px}.m-b-20[_ngcontent-%COMP%]{margin-bottom:20px}.m-l-20[_ngcontent-%COMP%]{margin-left:20px}.m-v-20[_ngcontent-%COMP%]{margin:20px 0}.m-h-20[_ngcontent-%COMP%]{margin:0 20px}.m-25[_ngcontent-%COMP%]{margin:25px}.m-t-25[_ngcontent-%COMP%]{margin-top:25px}.m-r-25[_ngcontent-%COMP%]{margin-right:25px}.m-b-25[_ngcontent-%COMP%]{margin-bottom:25px}.m-l-25[_ngcontent-%COMP%]{margin-left:25px}.m-v-25[_ngcontent-%COMP%]{margin:25px 0}.m-h-25[_ngcontent-%COMP%]{margin:0 25px}.m-30[_ngcontent-%COMP%]{margin:30px}.m-t-30[_ngcontent-%COMP%]{margin-top:30px}.m-r-30[_ngcontent-%COMP%]{margin-right:30px}.m-b-30[_ngcontent-%COMP%]{margin-bottom:30px}.m-l-30[_ngcontent-%COMP%]{margin-left:30px}.m-v-30[_ngcontent-%COMP%]{margin:30px 0}.m-h-30[_ngcontent-%COMP%]{margin:0 30px}.m-35[_ngcontent-%COMP%]{margin:35px}.m-t-35[_ngcontent-%COMP%]{margin-top:35px}.m-r-35[_ngcontent-%COMP%]{margin-right:35px}.m-b-35[_ngcontent-%COMP%]{margin-bottom:35px}.m-l-35[_ngcontent-%COMP%]{margin-left:35px}.m-v-35[_ngcontent-%COMP%]{margin:35px 0}.m-h-35[_ngcontent-%COMP%]{margin:0 35px}.m-40[_ngcontent-%COMP%]{margin:40px}.m-t-40[_ngcontent-%COMP%]{margin-top:40px}.m-r-40[_ngcontent-%COMP%]{margin-right:40px}.m-b-40[_ngcontent-%COMP%]{margin-bottom:40px}.m-l-40[_ngcontent-%COMP%]{margin-left:40px}.m-v-40[_ngcontent-%COMP%]{margin:40px 0}.m-h-40[_ngcontent-%COMP%]{margin:0 40px}.m-45[_ngcontent-%COMP%]{margin:45px}.m-t-45[_ngcontent-%COMP%]{margin-top:45px}.m-r-45[_ngcontent-%COMP%]{margin-right:45px}.m-b-45[_ngcontent-%COMP%]{margin-bottom:45px}.m-l-45[_ngcontent-%COMP%]{margin-left:45px}.m-v-45[_ngcontent-%COMP%]{margin:45px 0}.m-h-45[_ngcontent-%COMP%]{margin:0 45px}.m-50[_ngcontent-%COMP%]{margin:50px}.m-t-50[_ngcontent-%COMP%]{margin-top:50px}.m-r-50[_ngcontent-%COMP%]{margin-right:50px}.m-b-50[_ngcontent-%COMP%]{margin-bottom:50px}.m-l-50[_ngcontent-%COMP%]{margin-left:50px}.m-v-50[_ngcontent-%COMP%]{margin:50px 0}.m-h-50[_ngcontent-%COMP%]{margin:0 50px}.m-55[_ngcontent-%COMP%]{margin:55px}.m-t-55[_ngcontent-%COMP%]{margin-top:55px}.m-r-55[_ngcontent-%COMP%]{margin-right:55px}.m-b-55[_ngcontent-%COMP%]{margin-bottom:55px}.m-l-55[_ngcontent-%COMP%]{margin-left:55px}.m-v-55[_ngcontent-%COMP%]{margin:55px 0}.m-h-55[_ngcontent-%COMP%]{margin:0 55px}.m-60[_ngcontent-%COMP%]{margin:60px}.m-t-60[_ngcontent-%COMP%]{margin-top:60px}.m-r-60[_ngcontent-%COMP%]{margin-right:60px}.m-b-60[_ngcontent-%COMP%]{margin-bottom:60px}.m-l-60[_ngcontent-%COMP%]{margin-left:60px}.m-v-60[_ngcontent-%COMP%]{margin:60px 0}.m-h-60[_ngcontent-%COMP%]{margin:0 60px}.m-65[_ngcontent-%COMP%]{margin:65px}.m-t-65[_ngcontent-%COMP%]{margin-top:65px}.m-r-65[_ngcontent-%COMP%]{margin-right:65px}.m-b-65[_ngcontent-%COMP%]{margin-bottom:65px}.m-l-65[_ngcontent-%COMP%]{margin-left:65px}.m-v-65[_ngcontent-%COMP%]{margin:65px 0}.m-h-65[_ngcontent-%COMP%]{margin:0 65px}.m-70[_ngcontent-%COMP%]{margin:70px}.m-t-70[_ngcontent-%COMP%]{margin-top:70px}.m-r-70[_ngcontent-%COMP%]{margin-right:70px}.m-b-70[_ngcontent-%COMP%]{margin-bottom:70px}.m-l-70[_ngcontent-%COMP%]{margin-left:70px}.m-v-70[_ngcontent-%COMP%]{margin:70px 0}.m-h-70[_ngcontent-%COMP%]{margin:0 70px}.m-75[_ngcontent-%COMP%]{margin:75px}.m-t-75[_ngcontent-%COMP%]{margin-top:75px}.m-r-75[_ngcontent-%COMP%]{margin-right:75px}.m-b-75[_ngcontent-%COMP%]{margin-bottom:75px}.m-l-75[_ngcontent-%COMP%]{margin-left:75px}.m-v-75[_ngcontent-%COMP%]{margin:75px 0}.m-h-75[_ngcontent-%COMP%]{margin:0 75px}.m-80[_ngcontent-%COMP%]{margin:80px}.m-t-80[_ngcontent-%COMP%]{margin-top:80px}.m-r-80[_ngcontent-%COMP%]{margin-right:80px}.m-b-80[_ngcontent-%COMP%]{margin-bottom:80px}.m-l-80[_ngcontent-%COMP%]{margin-left:80px}.m-v-80[_ngcontent-%COMP%]{margin:80px 0}.m-h-80[_ngcontent-%COMP%]{margin:0 80px}.no-m[_ngcontent-%COMP%]{margin:0}.no-m-t[_ngcontent-%COMP%]{margin-top:0}.no-m-r[_ngcontent-%COMP%]{margin-right:0}.no-m-b[_ngcontent-%COMP%]{margin-bottom:0}.no-m-l[_ngcontent-%COMP%]{margin-left:0}.no-m-v[_ngcontent-%COMP%], .no-m-h[_ngcontent-%COMP%], .no-margin[_ngcontent-%COMP%]{margin:0}.no-m-lr[_ngcontent-%COMP%], .no-m-rl[_ngcontent-%COMP%]{margin-left:0;margin-right:0}.no-m-tb[_ngcontent-%COMP%], .no-m-bt[_ngcontent-%COMP%]{margin-top:0;margin-bottom:0}.m-t-only[_ngcontent-%COMP%]{margin-left:0;margin-right:0;margin-bottom:0}.m-b-only[_ngcontent-%COMP%]{margin-left:0;margin-right:0;margin-top:0}.m-l-only[_ngcontent-%COMP%]{margin-right:0;margin-top:0;margin-bottom:0}.m-r-only[_ngcontent-%COMP%]{margin-left:0;margin-top:0;margin-bottom:0}.m-auto[_ngcontent-%COMP%]{margin-left:auto;margin-right:auto}.ls-0[_ngcontent-%COMP%]{margin-left:10px;margin-right:10px}html[_ngcontent-%COMP%], body[_ngcontent-%COMP%]{-webkit-tap-highlight-color:transparent}div[_ngcontent-%COMP%]{box-sizing:border-box}.color-inherit[_ngcontent-%COMP%]{color:inherit}.no-shadow[_ngcontent-%COMP%]{box-shadow:none}.pointer[_ngcontent-%COMP%]{cursor:pointer}.nolist[_ngcontent-%COMP%]{list-style:none}.actions-menu[_ngcontent-%COMP%]{color:#fff}.alert[_ngcontent-%COMP%]{background-color:#e8f4fd;padding:6px 16px;font-size:.875rem;font-family:Roboto,Helvetica Neue,sans-serif;font-weight:400;line-height:1.43;border-radius:4px;letter-spacing:normal;margin:10px}.alert[_ngcontent-%COMP%] .message[_ngcontent-%COMP%]{padding:8px 0;font-size:18px}.alert[_ngcontent-%COMP%] .alert-check[_ngcontent-%COMP%]{color:#359ff4;margin-right:2px;font-size:1.4rem} .mat-tooltip{font-size:15px;color:#fff!important;background-color:#4461e2b3;border:1px solid rgb(25.7777777778,51.5555555556,166.2222222222);max-width:400px!important;white-space:pre-line!important}.loading[_ngcontent-%COMP%]{position:absolute;min-width:100%;width:100px;height:12px;background:linear-gradient(125deg,#fff,#4461e2,#fff);animation:grow 4s linear infinite,move 4s linear infinite}mat-card-title[_ngcontent-%COMP%]{font-weight:600;font-size:x-large;padding-left:20px;padding-top:20px}html[_ngcontent-%COMP%], body[_ngcontent-%COMP%]{overflow:hidden}.overflow-x-scroll[_ngcontent-%COMP%]{max-width:100%;overflow-x:auto}.overflow-no[_ngcontent-%COMP%]{overflow:hidden}.overflow-auto[_ngcontent-%COMP%]{overflow:auto}.overflow-scroll[_ngcontent-%COMP%]{overflow:scroll}.table-container[_ngcontent-%COMP%]{overflow-x:auto;max-width:100%}body[_ngcontent-%COMP%], .no-p[_ngcontent-%COMP%]{padding:0}.no-p-t[_ngcontent-%COMP%]{padding-top:0}.no-p-r[_ngcontent-%COMP%]{padding-right:0}.no-p-b[_ngcontent-%COMP%]{padding-bottom:0}.no-p-l[_ngcontent-%COMP%]{padding-left:0}.no-p-v[_ngcontent-%COMP%], .no-p-h[_ngcontent-%COMP%]{padding:0}.p-5[_ngcontent-%COMP%]{padding:5px}.p-t-5[_ngcontent-%COMP%]{padding-top:5px}.p-r-5[_ngcontent-%COMP%]{padding-right:5px}.p-b-5[_ngcontent-%COMP%]{padding-bottom:5px}.p-l-5[_ngcontent-%COMP%]{padding-left:5px}.p-v-5[_ngcontent-%COMP%]{padding:5px 0}.p-h-5[_ngcontent-%COMP%]{padding:0 5px}.p-10[_ngcontent-%COMP%]{padding:10px}.p-t-10[_ngcontent-%COMP%]{padding-top:10px}.p-b-10[_ngcontent-%COMP%]{padding-bottom:10px}.p-v-10[_ngcontent-%COMP%]{padding:10px 0}.p-h-10[_ngcontent-%COMP%]{padding:0 10px}.p-15[_ngcontent-%COMP%]{padding:15px}.p-t-15[_ngcontent-%COMP%]{padding-top:15px}.p-r-15[_ngcontent-%COMP%]{padding-right:15px}.p-b-15[_ngcontent-%COMP%]{padding-bottom:15px}.p-l-15[_ngcontent-%COMP%]{padding-left:15px}.p-v-15[_ngcontent-%COMP%]{padding:15px 0}.p-h-15[_ngcontent-%COMP%]{padding:0 15px}.p-20[_ngcontent-%COMP%]{padding:20px}.p-t-20[_ngcontent-%COMP%]{padding-top:20px}.p-r-20[_ngcontent-%COMP%]{padding-right:20px}.p-b-20[_ngcontent-%COMP%]{padding-bottom:20px}.p-l-20[_ngcontent-%COMP%]{padding-left:20px}.p-v-20[_ngcontent-%COMP%]{padding:20px 0}.p-h-20[_ngcontent-%COMP%]{padding:0 20px}.p-25[_ngcontent-%COMP%]{padding:25px}.p-t-25[_ngcontent-%COMP%]{padding-top:25px}.p-r-25[_ngcontent-%COMP%]{padding-right:25px}.p-b-25[_ngcontent-%COMP%]{padding-bottom:25px}.p-l-25[_ngcontent-%COMP%]{padding-left:25px}.p-v-25[_ngcontent-%COMP%]{padding:25px 0}.p-h-25[_ngcontent-%COMP%]{padding:0 25px}.p-30[_ngcontent-%COMP%]{padding:30px}.p-t-30[_ngcontent-%COMP%]{padding-top:30px}.p-r-30[_ngcontent-%COMP%]{padding-right:30px}.p-b-30[_ngcontent-%COMP%]{padding-bottom:30px}.p-l-30[_ngcontent-%COMP%]{padding-left:30px}.p-v-30[_ngcontent-%COMP%]{padding:30px 0}.p-h-30[_ngcontent-%COMP%]{padding:0 30px}.p-35[_ngcontent-%COMP%]{padding:35px}.p-t-35[_ngcontent-%COMP%]{padding-top:35px}.p-r-35[_ngcontent-%COMP%]{padding-right:35px}.p-b-35[_ngcontent-%COMP%]{padding-bottom:35px}.p-l-35[_ngcontent-%COMP%]{padding-left:35px}.p-v-35[_ngcontent-%COMP%]{padding:35px 0}.p-h-35[_ngcontent-%COMP%]{padding:0 35px}.p-40[_ngcontent-%COMP%]{padding:40px}.p-t-40[_ngcontent-%COMP%]{padding-top:40px}.p-r-40[_ngcontent-%COMP%]{padding-right:40px}.p-b-40[_ngcontent-%COMP%]{padding-bottom:40px}.p-l-40[_ngcontent-%COMP%]{padding-left:40px}.p-v-40[_ngcontent-%COMP%]{padding-top:40px;padding-bottom:40px}.p-h-40[_ngcontent-%COMP%]{padding:0 40px}.p-45[_ngcontent-%COMP%]{padding:45px}.p-t-45[_ngcontent-%COMP%]{padding-top:45px}.p-r-45[_ngcontent-%COMP%]{padding-right:45px}.p-b-45[_ngcontent-%COMP%]{padding-bottom:45px}.p-l-45[_ngcontent-%COMP%]{padding-left:45px}.p-v-45[_ngcontent-%COMP%]{padding:45px 0}.p-h-45[_ngcontent-%COMP%]{padding:0 45px}.p-50[_ngcontent-%COMP%]{padding:50px}.p-t-50[_ngcontent-%COMP%]{padding-top:50px}.p-r-50[_ngcontent-%COMP%]{padding-right:50px}.p-b-50[_ngcontent-%COMP%]{padding-bottom:50px}.p-l-50[_ngcontent-%COMP%]{padding-left:50px}.p-v-50[_ngcontent-%COMP%]{padding:50px 0}.p-h-50[_ngcontent-%COMP%]{padding:0 50px}.p-55[_ngcontent-%COMP%]{padding:55px}.p-t-55[_ngcontent-%COMP%]{padding-top:55px}.p-r-55[_ngcontent-%COMP%]{padding-right:55px}.p-b-55[_ngcontent-%COMP%]{padding-bottom:55px}.p-l-55[_ngcontent-%COMP%]{padding-left:55px}.p-v-55[_ngcontent-%COMP%]{padding:55px 0}.p-h-55[_ngcontent-%COMP%]{padding:0 55px}.p-60[_ngcontent-%COMP%]{padding:60px}.p-t-60[_ngcontent-%COMP%]{padding-top:60px}.p-r-60[_ngcontent-%COMP%]{padding-right:60px}.p-b-60[_ngcontent-%COMP%]{padding-bottom:60px}.p-l-60[_ngcontent-%COMP%]{padding-left:60px}.p-v-60[_ngcontent-%COMP%]{padding:60px 0}.p-h-60[_ngcontent-%COMP%]{padding:0 60px}.p-65[_ngcontent-%COMP%]{padding:65px}.p-t-65[_ngcontent-%COMP%]{padding-top:65px}.p-r-65[_ngcontent-%COMP%]{padding-right:65px}.p-b-65[_ngcontent-%COMP%]{padding-bottom:65px}.p-l-65[_ngcontent-%COMP%]{padding-left:65px}.p-v-65[_ngcontent-%COMP%]{padding:65px 0}.p-h-65[_ngcontent-%COMP%]{padding:0 65px}.p-70[_ngcontent-%COMP%]{padding:70px}.p-t-70[_ngcontent-%COMP%]{padding-top:70px}.p-r-70[_ngcontent-%COMP%]{padding-right:70px}.p-b-70[_ngcontent-%COMP%]{padding-bottom:70px}.p-l-70[_ngcontent-%COMP%]{padding-left:70px}.p-v-70[_ngcontent-%COMP%]{padding:70px 0}.p-h-70[_ngcontent-%COMP%]{padding:0 70px}.p-75[_ngcontent-%COMP%]{padding:75px}.p-t-75[_ngcontent-%COMP%]{padding-top:75px}.p-r-75[_ngcontent-%COMP%]{padding-right:75px}.p-b-75[_ngcontent-%COMP%]{padding-bottom:75px}.p-l-75[_ngcontent-%COMP%]{padding-left:75px}.p-v-75[_ngcontent-%COMP%]{padding:75px 0}.p-h-75[_ngcontent-%COMP%]{padding:0 75px}.p-80[_ngcontent-%COMP%]{padding:80px}.p-t-80[_ngcontent-%COMP%]{padding-top:80px}.p-r-80[_ngcontent-%COMP%]{padding-right:80px}.p-b-80[_ngcontent-%COMP%]{padding-bottom:80px}.p-l-80[_ngcontent-%COMP%]{padding-left:80px}.p-v-80[_ngcontent-%COMP%]{padding:80px 0}.p-h-80[_ngcontent-%COMP%]{padding:0 80px}.no-padding[_ngcontent-%COMP%]{padding:0!important}.no-pad-lr[_ngcontent-%COMP%], .no-pad-rl[_ngcontent-%COMP%]{padding-left:0;padding-right:0}.no-pad-tb[_ngcontent-%COMP%], .no-pad-bt[_ngcontent-%COMP%]{padding-top:0;padding-bottom:0}.pad-t-only[_ngcontent-%COMP%]{padding-left:0;padding-right:0;padding-bottom:0}.pad-b-only[_ngcontent-%COMP%]{padding-left:0;padding-right:0;padding-top:0}.pad-l-only[_ngcontent-%COMP%]{padding-right:0;padding-top:0;padding-bottom:0}.pad-r-only[_ngcontent-%COMP%]{padding-left:0;padding-top:0;padding-bottom:0}html[_ngcontent-%COMP%], body[_ngcontent-%COMP%], .rel[_ngcontent-%COMP%], .relative[_ngcontent-%COMP%]{position:relative}.abs[_ngcontent-%COMP%], .absolute[_ngcontent-%COMP%]{position:absolute}.fixed[_ngcontent-%COMP%]{position:fixed}.status-active[_ngcontent-%COMP%]{color:#5cb85c}.status-inactive[_ngcontent-%COMP%]{color:#666f73}.status-deleted[_ngcontent-%COMP%]{color:#000}.status-pending[_ngcontent-%COMP%]{color:orange}.status-approved[_ngcontent-%COMP%]{color:#4461e2}.status-overpaid[_ngcontent-%COMP%]{color:purple}.status-chargeoff[_ngcontent-%COMP%]{color:#f39c12}.status-active-overdue[_ngcontent-%COMP%], .status-block[_ngcontent-%COMP%]{color:red}.status-matured[_ngcontent-%COMP%]{color:#ff4000}.subStatus-contract-termination[_ngcontent-%COMP%]{color:#b3b3b3}.mat-step-header[_ngcontent-%COMP%] .mat-step-icon-state-done[_ngcontent-%COMP%]{background-color:#2af72a}.mat-step-header[_ngcontent-%COMP%] .mat-step-icon-state-done[_ngcontent-%COMP%] .status-transfer-progress[_ngcontent-%COMP%]{color:#ff4000}.mat-step-header[_ngcontent-%COMP%] .mat-step-icon-state-done[_ngcontent-%COMP%] .status-transfer-hold[_ngcontent-%COMP%]{color:#df0101}html[_ngcontent-%COMP%], body[_ngcontent-%COMP%]{-webkit-font-smoothing:antialiased}html[_ngcontent-%COMP%]{font-size:16px}body[_ngcontent-%COMP%]{font-family:Roboto,Helvetica Neue,sans-serif;font-weight:400;font-size:14px;color:#000000de;line-height:1.5;letter-spacing:normal}.mat-h1[_ngcontent-%COMP%], .mat-headline[_ngcontent-%COMP%], .mat-typography[_ngcontent-%COMP%] .mat-h1[_ngcontent-%COMP%], .mat-typography[_ngcontent-%COMP%] .mat-headline[_ngcontent-%COMP%], .mat-typography[_ngcontent-%COMP%] h1[_ngcontent-%COMP%]{font:400 24px/32px Roboto,Helvetica Neue,sans-serif;letter-spacing:normal;margin:0 0 16px}.lh-1[_ngcontent-%COMP%]{line-height:1}.lh-13[_ngcontent-%COMP%]{line-height:1.3}.lh-15[_ngcontent-%COMP%]{line-height:1.5}.bold[_ngcontent-%COMP%], .strong[_ngcontent-%COMP%]{font-weight:700}.no-bold[_ngcontent-%COMP%]{font-weight:400}.italic[_ngcontent-%COMP%], .em[_ngcontent-%COMP%]{font-style:italic}.strike[_ngcontent-%COMP%]{text-decoration:line-through}.normal[_ngcontent-%COMP%]{font-weight:400;font-style:normal}.uppercase[_ngcontent-%COMP%]{text-transform:uppercase}.text-left[_ngcontent-%COMP%]{text-align:left}.text-center[_ngcontent-%COMP%]{text-align:center}.text-right[_ngcontent-%COMP%]{text-align:right}.w100[_ngcontent-%COMP%]{font-weight:100}.w200[_ngcontent-%COMP%]{font-weight:200}.w300[_ngcontent-%COMP%]{font-weight:300}.w400[_ngcontent-%COMP%]{font-weight:400}.w500[_ngcontent-%COMP%]{font-weight:500}.w600[_ngcontent-%COMP%]{font-weight:600}.w700[_ngcontent-%COMP%]{font-weight:700}.w800[_ngcontent-%COMP%]{font-weight:800}.w900[_ngcontent-%COMP%]{font-weight:900}.f9[_ngcontent-%COMP%]{font-size:9px}.f10[_ngcontent-%COMP%]{font-size:10px}.f11[_ngcontent-%COMP%]{font-size:11px}.f12[_ngcontent-%COMP%]{font-size:12px}.f13[_ngcontent-%COMP%]{font-size:13px}.f14[_ngcontent-%COMP%]{font-size:14px}.f15[_ngcontent-%COMP%]{font-size:15px}.f16[_ngcontent-%COMP%]{font-size:16px}.f17[_ngcontent-%COMP%]{font-size:17px}.f18[_ngcontent-%COMP%]{font-size:18px;line-height:30px}.f19[_ngcontent-%COMP%]{font-size:19px}.f20[_ngcontent-%COMP%]{font-size:20px}.f30[_ngcontent-%COMP%]{font-size:30px}.f40[_ngcontent-%COMP%]{font-size:40px}.f50[_ngcontent-%COMP%]{font-size:50px}.f60[_ngcontent-%COMP%]{font-size:60px}.size-small[_ngcontent-%COMP%]{font-size:75%}.size-normal[_ngcontent-%COMP%]{font-size:100%}.size-medium[_ngcontent-%COMP%]{font-size:125%}.size-big[_ngcontent-%COMP%], .size-large[_ngcontent-%COMP%]{font-size:150%}.size-huge[_ngcontent-%COMP%]{font-size:200%}.inherit[_ngcontent-%COMP%]{font:inherit}.text-shadow[_ngcontent-%COMP%]{text-shadow:1px 1px 1px rgba(0,0,0,.4)}.text-rgb-2[_ngcontent-%COMP%]{color:#0003}.text-rgb-3[_ngcontent-%COMP%]{color:#0000004d}.text-rgb-4[_ngcontent-%COMP%]{color:#0006}.text-rgb-5[_ngcontent-%COMP%]{color:#00000080}.no-ul[_ngcontent-%COMP%], .no-ul[_ngcontent-%COMP%]:hover, .no-ul[_ngcontent-%COMP%] a[_ngcontent-%COMP%], .no-ul[_ngcontent-%COMP%] a[_ngcontent-%COMP%]:hover{text-decoration:none}.no-wrap[_ngcontent-%COMP%]{white-space:nowrap}.auto-cell-size[_ngcontent-%COMP%]{white-space:nowrap;width:1%}.ls-0[_ngcontent-%COMP%]{letter-spacing:-3px;white-space:nowrap}.label-field[_ngcontent-%COMP%]{margin-top:32px}.wrap-content[_ngcontent-%COMP%]{overflow-wrap:break-word;word-wrap:break-word}.no-break-content[_ngcontent-%COMP%]{overflow-wrap:anywhere!important}.fit[_ngcontent-%COMP%]{max-width:100%}.half-width[_ngcontent-%COMP%]{width:50%}.full-width[_ngcontent-%COMP%]{width:100%}.full-height[_ngcontent-%COMP%]{height:100%}html[_ngcontent-%COMP%], body[_ngcontent-%COMP%]{width:100%;height:100%;min-height:100%}body[_ngcontent-%COMP%] table[_ngcontent-%COMP%]{width:100%}.container[_ngcontent-%COMP%]{max-width:74rem;width:90%}.mw300[_ngcontent-%COMP%]{max-width:300px}.mw400[_ngcontent-%COMP%]{max-width:400px}.mw500[_ngcontent-%COMP%]{max-width:500px}.mw600[_ngcontent-%COMP%]{max-width:600px}.fullwidth[_ngcontent-%COMP%]{width:100%}.zindex-1[_ngcontent-%COMP%]{z-index:1}.zindex-2[_ngcontent-%COMP%]{z-index:2}.zindex-3[_ngcontent-%COMP%]{z-index:3}.zindex-4[_ngcontent-%COMP%]{z-index:4}table[_ngcontent-%COMP%]{width:100%}table[_ngcontent-%COMP%] .select-row[_ngcontent-%COMP%]:hover{cursor:pointer}.manual-entry[_ngcontent-%COMP%]{background-color:#d7e3ff}"]})}}return t})();function C2e(t,i){if(t&1){let e=le();h(0,"span",3),N("click",function(){G(e);let o=M();return W(o.copyValue())}),h(1,"b"),F(2,"fa-icon",4),S(3,"translate"),_()()}t&2&&(p(2),D("title",Ft(k(3,2,"labels.text.Copy Account Number"))))}function x2e(t,i){if(t&1&&(h(0,"span",1)(1,"a",5),y(2),_()()),t&2){let e=M();p(),D("href",Ft(e.getAccountLink()),_1),p(),T(e.accountNo)}}function M2e(t,i){if(t&1&&(h(0,"span",1),y(1),_()),t&2){let e=M();p(),T(e.accountNo)}}function w2e(t,i){if(t&1){let e=le();h(0,"span",6),N("click",function(){G(e);let o=M();return W(o.copyValue())}),h(1,"b"),F(2,"fa-icon",4),S(3,"translate"),_()()}t&2&&(p(2),D("title",Ft(k(3,2,"labels.text.Copy Account Number"))))}var HR=(()=>{class t{constructor(){this.clipboard=d(N2),this.display="right",this.clientId=null,this.accountId=null,this.accountType=null,this.iconVisible=!1,this.displayL=!1,this.displayR=!0}ngOnInit(){this.displayL=this.display==="left",this.displayR=this.display==="right"}copyValue(){this.clipboard.copy(this.accountNo)}mouseEnter(){this.iconVisible=!0}mouseLeave(){this.iconVisible=!1}getAccountLink(){return this.accountType?`/#/clients/${this.clientId}/${this.getAccountType()}/${this.accountId}`:""}getAccountType(){if(this.accountType==="1")return"loan-accounts";if(this.accountType==="2")return"savings-accounts"}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275cmp=P({type:t,selectors:[["mifosx-account-number"]],inputs:{accountNo:"accountNo",display:"display",clientId:"clientId",accountId:"accountId",accountType:"accountType"},decls:5,vars:4,consts:[[3,"mouseenter","mouseleave"],[1,"m-l-5"],[1,"m-l-3"],[1,"m-l-5",3,"click"],["icon","copy","size","sm",3,"title"],[3,"href"],[1,"m-l-3",3,"click"]],template:function(n,o){n&1&&(h(0,"span",0),N("mouseenter",function(){return o.mouseEnter()})("mouseleave",function(){return o.mouseLeave()}),E(1,C2e,4,4,"span",1),E(2,x2e,3,3,"span",1),E(3,M2e,2,1,"span",1),E(4,w2e,4,4,"span",2),_()),n&2&&(p(),I(o.displayL&&o.iconVisible?1:-1),p(),I(o.accountType?2:-1),p(),I(o.accountType?-1:3),p(),I(o.displayR&&o.iconVisible?4:-1))},dependencies:[he,ve,Yt,Te],encapsulation:2})}}return t})();function D2e(t,i){if(t&1){let e=le();h(0,"span",3),N("click",function(){G(e);let o=M();return W(o.copyValue())}),h(1,"b"),F(2,"fa-icon",4),S(3,"translate"),_()()}t&2&&(p(2),D("title",Ft(k(3,2,"labels.text.Copy Account Number"))))}function S2e(t,i){if(t&1){let e=le();h(0,"span",5),N("click",function(){G(e);let o=M();return W(o.copyValue())}),h(1,"b"),F(2,"fa-icon",4),S(3,"translate"),_()()}t&2&&(p(2),D("title",Ft(k(3,2,"labels.text.Copy Account Number"))))}var UR=(()=>{class t{constructor(){this.clipboard=d(N2),this.display="right",this.iconVisible=!1,this.displayL=!1,this.displayR=!0}ngOnInit(){this.displayL=this.display==="left",this.displayR=this.display==="right"}copyValue(){this.clipboard.copy(this.entityName)}mouseEnter(){this.iconVisible=!0}mouseLeave(){this.iconVisible=!1}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275cmp=P({type:t,selectors:[["mifosx-entity-name"]],inputs:{entityName:"entityName",display:"display"},decls:6,vars:3,consts:[[3,"mouseenter","mouseleave"],[1,"m-l-5"],[1,"m-l-3"],[1,"m-l-5",3,"click"],["icon","copy","size","sm",3,"title"],[1,"m-l-3",3,"click"]],template:function(n,o){n&1&&(h(0,"span",0),N("mouseenter",function(){return o.mouseEnter()})("mouseleave",function(){return o.mouseLeave()}),E(1,D2e,4,4,"span",1),h(2,"span",1)(3,"b"),y(4),_()(),E(5,S2e,4,4,"span",2),_()),n&2&&(p(),I(o.displayL&&o.iconVisible?1:-1),p(3),T(o.entityName),p(),I(o.displayR&&o.iconVisible?5:-1))},dependencies:[he,ve,Yt,Te],encapsulation:2})}}return t})();function k2e(t,i){if(t&1&&(nt(0,"tr")(1,"td",4),y(2),S(3,"translate"),rt(),nt(4,"td"),y(5),rt()()),t&2){let e=M(2);p(2),T(k(3,2,"labels.inputs.Account No")),p(3),T(e.paymentDetailData.accountNumber)}}function E2e(t,i){if(t&1&&(nt(0,"tr")(1,"td",4),y(2),S(3,"translate"),rt(),nt(4,"td"),y(5),rt()()),t&2){let e=M(2);p(2),T(k(3,2,"labels.inputs.Cheque Number")),p(3),T(e.paymentDetailData.checkNumber)}}function I2e(t,i){if(t&1&&(nt(0,"tr")(1,"td",4),y(2),S(3,"translate"),rt(),nt(4,"td",4),y(5),rt()()),t&2){let e=M(2);p(2),T(k(3,2,"labels.inputs.Routing Code")),p(3),T(e.paymentDetailData.routingCode)}}function O2e(t,i){if(t&1&&(nt(0,"tr")(1,"td",4),y(2),S(3,"translate"),rt(),nt(4,"td"),y(5),rt()()),t&2){let e=M(2);p(2),T(k(3,2,"labels.inputs.Receipt No")),p(3),T(e.paymentDetailData.receiptNumber)}}function T2e(t,i){if(t&1&&(nt(0,"tr")(1,"td",4),y(2),S(3,"translate"),rt(),nt(4,"td"),y(5),rt()()),t&2){let e=M(2);p(2),T(k(3,2,"labels.inputs.Bank No")),p(3),T(e.paymentDetailData.bankNumber)}}function P2e(t,i){if(t&1&&(nt(0,"table")(1,"tbody")(2,"tr")(3,"td",3),y(4),S(5,"translate"),rt()(),E(6,k2e,6,4,"tr"),E(7,E2e,6,4,"tr"),E(8,I2e,6,4,"tr"),E(9,O2e,6,4,"tr"),E(10,T2e,6,4,"tr"),rt()()),t&2){let e=M();p(4),T(k(5,6,"labels.inputs.Payment Details")),p(2),I(e.isNotNullOrEmpty(e.paymentDetailData.accountNumber)?6:-1),p(),I(e.isNotNullOrEmpty(e.paymentDetailData.checkNumber)?7:-1),p(),I(e.isNotNullOrEmpty(e.paymentDetailData.routingCode)?8:-1),p(),I(e.isNotNullOrEmpty(e.paymentDetailData.receiptNumber)?9:-1),p(),I(e.isNotNullOrEmpty(e.paymentDetailData.bankNumber)?10:-1)}}var $R=(()=>{class t{constructor(){}hasSomeValue(){return this.isNotNullOrEmpty(this.paymentDetailData.accountNumber)||this.isNotNullOrEmpty(this.paymentDetailData.bankNumber)||this.isNotNullOrEmpty(this.paymentDetailData.checkNumber)||this.isNotNullOrEmpty(this.paymentDetailData.receiptNumber)||this.isNotNullOrEmpty(this.paymentDetailData.routingCode)}isNotNullOrEmpty(e){return e!==null&&e!==""}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275cmp=P({type:t,selectors:[["mifosx-transaction-payment-detail"]],inputs:{paymentDetailData:"paymentDetailData"},decls:7,vars:5,consts:[[1,"layout-row-wrap","card-content"],[1,"flex-50","mat-body-strong"],[1,"flex-50"],["colspan","2",1,"mat-body-strong","center"],[1,"mat-body-strong"]],template:function(n,o){n&1&&(nt(0,"div",0)(1,"div",1),y(2),S(3,"translate"),rt(),nt(4,"div",2),y(5),rt()(),E(6,P2e,11,8,"table")),n&2&&(p(2),ee(" ",k(3,3,"labels.inputs.Payment Type")," "),p(3),ee(" ",o.paymentDetailData.paymentType.name," "),p(),I(o.hasSomeValue()?6:-1))},dependencies:[he,ve,Te],styles:["body[_ngcontent-%COMP%] table[_ngcontent-%COMP%] tbody[_ngcontent-%COMP%] tr[_ngcontent-%COMP%]:nth-child(2n){background-color:#f2f2f2}.bg-black[_ngcontent-%COMP%]{background-color:#000}.bg-light-grey[_ngcontent-%COMP%]{background-color:#e5e5e5}.bg-medium-grey[_ngcontent-%COMP%]{background-color:#ccc}.bg-grey[_ngcontent-%COMP%]{background-color:#999}.bg-dark-grey[_ngcontent-%COMP%]{background-color:#222}.bg-white[_ngcontent-%COMP%], .bg-fff[_ngcontent-%COMP%]{background-color:#fff}.bg-none[_ngcontent-%COMP%], .no-bg[_ngcontent-%COMP%]{background:none;background-image:none;background-color:transparent}.bg-facebook[_ngcontent-%COMP%]{background-color:#47639e}.bg-twitter[_ngcontent-%COMP%]{background-color:#02a8f3}body[_ngcontent-%COMP%] table[_ngcontent-%COMP%]{border:1px solid rgba(0,0,0,.12)}.no-border[_ngcontent-%COMP%]{border:none}.no-border-t[_ngcontent-%COMP%]{border-top:none}.no-border-r[_ngcontent-%COMP%]{border-right:none}.no-border-b[_ngcontent-%COMP%]{border-bottom:none}.no-border-l[_ngcontent-%COMP%]{border-left:none}.no-border-lr[_ngcontent-%COMP%], .no-border-rl[_ngcontent-%COMP%]{border-left:none;border-right:none}.no-border-tb[_ngcontent-%COMP%], .no-border-bt[_ngcontent-%COMP%]{border-top:none;border-bottom:none}.no-border-tl[_ngcontent-%COMP%], .no-border-lt[_ngcontent-%COMP%]{border-top:none;border-left:none}.no-border-tr[_ngcontent-%COMP%], .no-border-rt[_ngcontent-%COMP%]{border-top:none;border-right:none}.no-border-bl[_ngcontent-%COMP%], .no-border-lb[_ngcontent-%COMP%]{border-bottom:none;border-left:none}.no-border-br[_ngcontent-%COMP%], .no-border-rb[_ngcontent-%COMP%]{border-bottom:none;border-right:none}.border-dashed[_ngcontent-%COMP%], .border-dotted[_ngcontent-%COMP%]{border-style:dashed}.border-black[_ngcontent-%COMP%]{border-color:#000}.border-light-grey[_ngcontent-%COMP%]{border-color:#e5e5e5}.border-medium-grey[_ngcontent-%COMP%]{border-color:#ccc}.border-grey[_ngcontent-%COMP%]{border-color:#999}.border-dark-grey[_ngcontent-%COMP%]{border-color:#2222}.border-white[_ngcontent-%COMP%], .border-fff[_ngcontent-%COMP%]{border-color:#fff}.no-border-radius[_ngcontent-%COMP%]{border-radius:0}.radius3[_ngcontent-%COMP%]{border-radius:3px}.radius5[_ngcontent-%COMP%]{border-radius:5px}.radius10[_ngcontent-%COMP%]{border-radius:10px}.column-mandatory[_ngcontent-%COMP%]{color:#5cb85c;text-align:center}.not-column-mandatory[_ngcontent-%COMP%]{color:#666f73;text-align:center}.cdk-drag-placeholder[_ngcontent-%COMP%]{background:#3498db}.yes[_ngcontent-%COMP%]{color:#5cb85c!important;background-color:#5cb85c;height:4px;cursor:none}.no[_ngcontent-%COMP%]{color:red;background-color:red;height:4px;cursor:none}.strike[_ngcontent-%COMP%]{text-decoration:line-through;color:red}.transfer[_ngcontent-%COMP%]{color:#16a085}.linked[_ngcontent-%COMP%]{color:#4461e2}.accrual[_ngcontent-%COMP%]{color:#999}.fa-question[_ngcontent-%COMP%]{color:#4461e2}.enabled[_ngcontent-%COMP%]{color:#32cd32}.disabled[_ngcontent-%COMP%]{color:#f44366}.v-mid[_ngcontent-%COMP%], .v-m[_ngcontent-%COMP%]{vertical-align:middle}.v-top[_ngcontent-%COMP%], .v-t[_ngcontent-%COMP%]{vertical-align:top}.v-bottom[_ngcontent-%COMP%], .v-b[_ngcontent-%COMP%]{vertical-align:bottom}.v-super[_ngcontent-%COMP%]{vertical-align:super}.r-amount[_ngcontent-%COMP%]{text-align:right!important;padding-right:5px!important}.left[_ngcontent-%COMP%]{text-align:left!important}.right[_ngcontent-%COMP%]{text-align:right!important}.center[_ngcontent-%COMP%]{text-align:center!important}.amount-plus[_ngcontent-%COMP%]{color:#000}.amount-minus[_ngcontent-%COMP%]{color:#4461e2}.block[_ngcontent-%COMP%]{display:block}.inline[_ngcontent-%COMP%]{display:inline}.in-block[_ngcontent-%COMP%]{display:inline-block;zoom:1}.d-none[_ngcontent-%COMP%], .hide[_ngcontent-%COMP%], .hidden[_ngcontent-%COMP%]{display:none}.t-0[_ngcontent-%COMP%]{top:0}.b-0[_ngcontent-%COMP%]{bottom:0}.l-0[_ngcontent-%COMP%]{left:0}.r-0[_ngcontent-%COMP%]{right:0}.tb-0[_ngcontent-%COMP%]{top:0;bottom:0}.lr-0[_ngcontent-%COMP%]{left:0;right:0}.f-left[_ngcontent-%COMP%]{float:left}.f-right[_ngcontent-%COMP%]{float:right}.f-none[_ngcontent-%COMP%]{float:none}textarea[_ngcontent-%COMP%]{resize:both}textarea.vertical[_ngcontent-%COMP%], textarea.horizontal[_ngcontent-%COMP%]{resize:vertical}textarea.noresize[_ngcontent-%COMP%]{resize:none}.full-input[_ngcontent-%COMP%] input[_ngcontent-%COMP%], .full-input[_ngcontent-%COMP%] select[_ngcontent-%COMP%], .full-input[_ngcontent-%COMP%] textarea[_ngcontent-%COMP%]{width:100%}.normal[_ngcontent-%COMP%] input[_ngcontent-%COMP%], .normal[_ngcontent-%COMP%] select[_ngcontent-%COMP%], .normal[_ngcontent-%COMP%] textarea[_ngcontent-%COMP%], .full-input[_ngcontent-%COMP%] [type=checkbox][_ngcontent-%COMP%], .full-input[_ngcontent-%COMP%] [type=radio][_ngcontent-%COMP%]{width:auto}.mat-tab-body-content[_ngcontent-%COMP%]{margin-bottom:20px}.mat-datepicker-input[_ngcontent-%COMP%]{margin-top:5px;margin-bottom:5px}.loader-wrapper[_ngcontent-%COMP%]{height:100vh;width:100vw}.loader-wrapper[_ngcontent-%COMP%] .triangle[_ngcontent-%COMP%]{width:0;height:0;border-style:solid;position:absolute;animation:_ngcontent-%COMP%_rotate .8s infinite .2s}.loader-wrapper[_ngcontent-%COMP%] .bottom[_ngcontent-%COMP%]{border-width:0 90px 90px;border-color:transparent transparent #1fb050;bottom:calc(50% - 100px);left:calc(50% - 90px)}.loader-wrapper[_ngcontent-%COMP%] .top[_ngcontent-%COMP%]{border-width:90px 90px 0;border-color:#b4d575 transparent transparent;top:calc(50% - 100px);left:calc(50% - 90px)}.loader-wrapper[_ngcontent-%COMP%] .left[_ngcontent-%COMP%]{border-width:90px 0 90px 90px;border-color:transparent transparent transparent #1074b9;top:calc(50% - 90px);left:calc(50% - 100px)}.loader-wrapper[_ngcontent-%COMP%] .right[_ngcontent-%COMP%]{border-width:90px 90px 90px 0;border-color:transparent #1daeec transparent transparent;top:calc(50% - 90px);right:calc(50% - 100px)}@keyframes _ngcontent-%COMP%_rotate{0%{transform:rotate(0)}to{transform:rotate(360deg)}}body[_ngcontent-%COMP%]{margin:0}.container[_ngcontent-%COMP%]{margin:0 auto}.mb-05[_ngcontent-%COMP%]{margin-bottom:.5rem}.mr-05[_ngcontent-%COMP%]{margin-right:.5rem}.mb-1[_ngcontent-%COMP%]{margin-bottom:1rem}.mt-1[_ngcontent-%COMP%]{margin-top:1rem}.m-5[_ngcontent-%COMP%]{margin:5px}.m-t-5[_ngcontent-%COMP%]{margin-top:5px}.m-r-5[_ngcontent-%COMP%]{margin-right:5px}.m-b-5[_ngcontent-%COMP%]{margin-bottom:5px}.m-l-5[_ngcontent-%COMP%]{margin-left:5px}.m-v-5[_ngcontent-%COMP%]{margin:5px 0}.m-h-5[_ngcontent-%COMP%]{margin:0 5px}.m-10[_ngcontent-%COMP%]{margin:10px}.m-t-10[_ngcontent-%COMP%]{margin-top:10px}.m-r-10[_ngcontent-%COMP%]{margin-right:10px}.m-b-10[_ngcontent-%COMP%]{margin-bottom:10px}.m-l-10[_ngcontent-%COMP%]{margin-left:10px}.m-v-10[_ngcontent-%COMP%]{margin:10px 0}.m-h-10[_ngcontent-%COMP%]{margin:0 10px}.m-15[_ngcontent-%COMP%]{margin:15px}.m-t-15[_ngcontent-%COMP%]{margin-top:15px}.m-r-15[_ngcontent-%COMP%]{margin-right:15px}.m-b-15[_ngcontent-%COMP%]{margin-bottom:15px}.m-l-15[_ngcontent-%COMP%]{margin-left:15px}.m-v-15[_ngcontent-%COMP%]{margin:15px 0}.m-h-15[_ngcontent-%COMP%]{margin:0 15px}.m-20[_ngcontent-%COMP%]{margin:20px}.m-t-20[_ngcontent-%COMP%]{margin-top:20px}.m-r-20[_ngcontent-%COMP%]{margin-right:20px}.m-b-20[_ngcontent-%COMP%]{margin-bottom:20px}.m-l-20[_ngcontent-%COMP%]{margin-left:20px}.m-v-20[_ngcontent-%COMP%]{margin:20px 0}.m-h-20[_ngcontent-%COMP%]{margin:0 20px}.m-25[_ngcontent-%COMP%]{margin:25px}.m-t-25[_ngcontent-%COMP%]{margin-top:25px}.m-r-25[_ngcontent-%COMP%]{margin-right:25px}.m-b-25[_ngcontent-%COMP%]{margin-bottom:25px}.m-l-25[_ngcontent-%COMP%]{margin-left:25px}.m-v-25[_ngcontent-%COMP%]{margin:25px 0}.m-h-25[_ngcontent-%COMP%]{margin:0 25px}.m-30[_ngcontent-%COMP%]{margin:30px}.m-t-30[_ngcontent-%COMP%]{margin-top:30px}.m-r-30[_ngcontent-%COMP%]{margin-right:30px}.m-b-30[_ngcontent-%COMP%]{margin-bottom:30px}.m-l-30[_ngcontent-%COMP%]{margin-left:30px}.m-v-30[_ngcontent-%COMP%]{margin:30px 0}.m-h-30[_ngcontent-%COMP%]{margin:0 30px}.m-35[_ngcontent-%COMP%]{margin:35px}.m-t-35[_ngcontent-%COMP%]{margin-top:35px}.m-r-35[_ngcontent-%COMP%]{margin-right:35px}.m-b-35[_ngcontent-%COMP%]{margin-bottom:35px}.m-l-35[_ngcontent-%COMP%]{margin-left:35px}.m-v-35[_ngcontent-%COMP%]{margin:35px 0}.m-h-35[_ngcontent-%COMP%]{margin:0 35px}.m-40[_ngcontent-%COMP%]{margin:40px}.m-t-40[_ngcontent-%COMP%]{margin-top:40px}.m-r-40[_ngcontent-%COMP%]{margin-right:40px}.m-b-40[_ngcontent-%COMP%]{margin-bottom:40px}.m-l-40[_ngcontent-%COMP%]{margin-left:40px}.m-v-40[_ngcontent-%COMP%]{margin:40px 0}.m-h-40[_ngcontent-%COMP%]{margin:0 40px}.m-45[_ngcontent-%COMP%]{margin:45px}.m-t-45[_ngcontent-%COMP%]{margin-top:45px}.m-r-45[_ngcontent-%COMP%]{margin-right:45px}.m-b-45[_ngcontent-%COMP%]{margin-bottom:45px}.m-l-45[_ngcontent-%COMP%]{margin-left:45px}.m-v-45[_ngcontent-%COMP%]{margin:45px 0}.m-h-45[_ngcontent-%COMP%]{margin:0 45px}.m-50[_ngcontent-%COMP%]{margin:50px}.m-t-50[_ngcontent-%COMP%]{margin-top:50px}.m-r-50[_ngcontent-%COMP%]{margin-right:50px}.m-b-50[_ngcontent-%COMP%]{margin-bottom:50px}.m-l-50[_ngcontent-%COMP%]{margin-left:50px}.m-v-50[_ngcontent-%COMP%]{margin:50px 0}.m-h-50[_ngcontent-%COMP%]{margin:0 50px}.m-55[_ngcontent-%COMP%]{margin:55px}.m-t-55[_ngcontent-%COMP%]{margin-top:55px}.m-r-55[_ngcontent-%COMP%]{margin-right:55px}.m-b-55[_ngcontent-%COMP%]{margin-bottom:55px}.m-l-55[_ngcontent-%COMP%]{margin-left:55px}.m-v-55[_ngcontent-%COMP%]{margin:55px 0}.m-h-55[_ngcontent-%COMP%]{margin:0 55px}.m-60[_ngcontent-%COMP%]{margin:60px}.m-t-60[_ngcontent-%COMP%]{margin-top:60px}.m-r-60[_ngcontent-%COMP%]{margin-right:60px}.m-b-60[_ngcontent-%COMP%]{margin-bottom:60px}.m-l-60[_ngcontent-%COMP%]{margin-left:60px}.m-v-60[_ngcontent-%COMP%]{margin:60px 0}.m-h-60[_ngcontent-%COMP%]{margin:0 60px}.m-65[_ngcontent-%COMP%]{margin:65px}.m-t-65[_ngcontent-%COMP%]{margin-top:65px}.m-r-65[_ngcontent-%COMP%]{margin-right:65px}.m-b-65[_ngcontent-%COMP%]{margin-bottom:65px}.m-l-65[_ngcontent-%COMP%]{margin-left:65px}.m-v-65[_ngcontent-%COMP%]{margin:65px 0}.m-h-65[_ngcontent-%COMP%]{margin:0 65px}.m-70[_ngcontent-%COMP%]{margin:70px}.m-t-70[_ngcontent-%COMP%]{margin-top:70px}.m-r-70[_ngcontent-%COMP%]{margin-right:70px}.m-b-70[_ngcontent-%COMP%]{margin-bottom:70px}.m-l-70[_ngcontent-%COMP%]{margin-left:70px}.m-v-70[_ngcontent-%COMP%]{margin:70px 0}.m-h-70[_ngcontent-%COMP%]{margin:0 70px}.m-75[_ngcontent-%COMP%]{margin:75px}.m-t-75[_ngcontent-%COMP%]{margin-top:75px}.m-r-75[_ngcontent-%COMP%]{margin-right:75px}.m-b-75[_ngcontent-%COMP%]{margin-bottom:75px}.m-l-75[_ngcontent-%COMP%]{margin-left:75px}.m-v-75[_ngcontent-%COMP%]{margin:75px 0}.m-h-75[_ngcontent-%COMP%]{margin:0 75px}.m-80[_ngcontent-%COMP%]{margin:80px}.m-t-80[_ngcontent-%COMP%]{margin-top:80px}.m-r-80[_ngcontent-%COMP%]{margin-right:80px}.m-b-80[_ngcontent-%COMP%]{margin-bottom:80px}.m-l-80[_ngcontent-%COMP%]{margin-left:80px}.m-v-80[_ngcontent-%COMP%]{margin:80px 0}.m-h-80[_ngcontent-%COMP%]{margin:0 80px}.no-m[_ngcontent-%COMP%]{margin:0}.no-m-t[_ngcontent-%COMP%]{margin-top:0}.no-m-r[_ngcontent-%COMP%]{margin-right:0}.no-m-b[_ngcontent-%COMP%]{margin-bottom:0}.no-m-l[_ngcontent-%COMP%]{margin-left:0}.no-m-v[_ngcontent-%COMP%], .no-m-h[_ngcontent-%COMP%], .no-margin[_ngcontent-%COMP%]{margin:0}.no-m-lr[_ngcontent-%COMP%], .no-m-rl[_ngcontent-%COMP%]{margin-left:0;margin-right:0}.no-m-tb[_ngcontent-%COMP%], .no-m-bt[_ngcontent-%COMP%]{margin-top:0;margin-bottom:0}.m-t-only[_ngcontent-%COMP%]{margin-left:0;margin-right:0;margin-bottom:0}.m-b-only[_ngcontent-%COMP%]{margin-left:0;margin-right:0;margin-top:0}.m-l-only[_ngcontent-%COMP%]{margin-right:0;margin-top:0;margin-bottom:0}.m-r-only[_ngcontent-%COMP%]{margin-left:0;margin-top:0;margin-bottom:0}.m-auto[_ngcontent-%COMP%]{margin-left:auto;margin-right:auto}.ls-0[_ngcontent-%COMP%]{margin-left:10px;margin-right:10px}html[_ngcontent-%COMP%], body[_ngcontent-%COMP%]{-webkit-tap-highlight-color:transparent}div[_ngcontent-%COMP%]{box-sizing:border-box}.color-inherit[_ngcontent-%COMP%]{color:inherit}.no-shadow[_ngcontent-%COMP%]{box-shadow:none}.pointer[_ngcontent-%COMP%]{cursor:pointer}.nolist[_ngcontent-%COMP%]{list-style:none}.actions-menu[_ngcontent-%COMP%]{color:#fff}.alert[_ngcontent-%COMP%]{background-color:#e8f4fd;padding:6px 16px;font-size:.875rem;font-family:Roboto,Helvetica Neue,sans-serif;font-weight:400;line-height:1.43;border-radius:4px;letter-spacing:normal;margin:10px}.alert[_ngcontent-%COMP%] .message[_ngcontent-%COMP%]{padding:8px 0;font-size:18px}.alert[_ngcontent-%COMP%] .alert-check[_ngcontent-%COMP%]{color:#359ff4;margin-right:2px;font-size:1.4rem} .mat-tooltip{font-size:15px;color:#fff!important;background-color:#4461e2b3;border:1px solid rgb(25.7777777778,51.5555555556,166.2222222222);max-width:400px!important;white-space:pre-line!important}.loading[_ngcontent-%COMP%]{position:absolute;min-width:100%;width:100px;height:12px;background:linear-gradient(125deg,#fff,#4461e2,#fff);animation:grow 4s linear infinite,move 4s linear infinite}mat-card-title[_ngcontent-%COMP%]{font-weight:600;font-size:x-large;padding-left:20px;padding-top:20px}html[_ngcontent-%COMP%], body[_ngcontent-%COMP%]{overflow:hidden}.overflow-x-scroll[_ngcontent-%COMP%]{max-width:100%;overflow-x:auto}.overflow-no[_ngcontent-%COMP%]{overflow:hidden}.overflow-auto[_ngcontent-%COMP%]{overflow:auto}.overflow-scroll[_ngcontent-%COMP%]{overflow:scroll}.table-container[_ngcontent-%COMP%]{overflow-x:auto;max-width:100%}body[_ngcontent-%COMP%], .no-p[_ngcontent-%COMP%]{padding:0}.no-p-t[_ngcontent-%COMP%]{padding-top:0}.no-p-r[_ngcontent-%COMP%]{padding-right:0}.no-p-b[_ngcontent-%COMP%]{padding-bottom:0}.no-p-l[_ngcontent-%COMP%]{padding-left:0}.no-p-v[_ngcontent-%COMP%], .no-p-h[_ngcontent-%COMP%]{padding:0}.p-5[_ngcontent-%COMP%]{padding:5px}.p-t-5[_ngcontent-%COMP%]{padding-top:5px}.p-r-5[_ngcontent-%COMP%]{padding-right:5px}.p-b-5[_ngcontent-%COMP%]{padding-bottom:5px}.p-l-5[_ngcontent-%COMP%]{padding-left:5px}.p-v-5[_ngcontent-%COMP%]{padding:5px 0}.p-h-5[_ngcontent-%COMP%]{padding:0 5px}.p-10[_ngcontent-%COMP%]{padding:10px}.p-t-10[_ngcontent-%COMP%]{padding-top:10px}.p-b-10[_ngcontent-%COMP%]{padding-bottom:10px}.p-v-10[_ngcontent-%COMP%]{padding:10px 0}.p-h-10[_ngcontent-%COMP%]{padding:0 10px}.p-15[_ngcontent-%COMP%]{padding:15px}.p-t-15[_ngcontent-%COMP%]{padding-top:15px}.p-r-15[_ngcontent-%COMP%]{padding-right:15px}.p-b-15[_ngcontent-%COMP%]{padding-bottom:15px}.p-l-15[_ngcontent-%COMP%]{padding-left:15px}.p-v-15[_ngcontent-%COMP%]{padding:15px 0}.p-h-15[_ngcontent-%COMP%]{padding:0 15px}.p-20[_ngcontent-%COMP%]{padding:20px}.p-t-20[_ngcontent-%COMP%]{padding-top:20px}.p-r-20[_ngcontent-%COMP%]{padding-right:20px}.p-b-20[_ngcontent-%COMP%]{padding-bottom:20px}.p-l-20[_ngcontent-%COMP%]{padding-left:20px}.p-v-20[_ngcontent-%COMP%]{padding:20px 0}.p-h-20[_ngcontent-%COMP%]{padding:0 20px}.p-25[_ngcontent-%COMP%]{padding:25px}.p-t-25[_ngcontent-%COMP%]{padding-top:25px}.p-r-25[_ngcontent-%COMP%]{padding-right:25px}.p-b-25[_ngcontent-%COMP%]{padding-bottom:25px}.p-l-25[_ngcontent-%COMP%]{padding-left:25px}.p-v-25[_ngcontent-%COMP%]{padding:25px 0}.p-h-25[_ngcontent-%COMP%]{padding:0 25px}.p-30[_ngcontent-%COMP%]{padding:30px}.p-t-30[_ngcontent-%COMP%]{padding-top:30px}.p-r-30[_ngcontent-%COMP%]{padding-right:30px}.p-b-30[_ngcontent-%COMP%]{padding-bottom:30px}.p-l-30[_ngcontent-%COMP%]{padding-left:30px}.p-v-30[_ngcontent-%COMP%]{padding:30px 0}.p-h-30[_ngcontent-%COMP%]{padding:0 30px}.p-35[_ngcontent-%COMP%]{padding:35px}.p-t-35[_ngcontent-%COMP%]{padding-top:35px}.p-r-35[_ngcontent-%COMP%]{padding-right:35px}.p-b-35[_ngcontent-%COMP%]{padding-bottom:35px}.p-l-35[_ngcontent-%COMP%]{padding-left:35px}.p-v-35[_ngcontent-%COMP%]{padding:35px 0}.p-h-35[_ngcontent-%COMP%]{padding:0 35px}.p-40[_ngcontent-%COMP%]{padding:40px}.p-t-40[_ngcontent-%COMP%]{padding-top:40px}.p-r-40[_ngcontent-%COMP%]{padding-right:40px}.p-b-40[_ngcontent-%COMP%]{padding-bottom:40px}.p-l-40[_ngcontent-%COMP%]{padding-left:40px}.p-v-40[_ngcontent-%COMP%]{padding-top:40px;padding-bottom:40px}.p-h-40[_ngcontent-%COMP%]{padding:0 40px}.p-45[_ngcontent-%COMP%]{padding:45px}.p-t-45[_ngcontent-%COMP%]{padding-top:45px}.p-r-45[_ngcontent-%COMP%]{padding-right:45px}.p-b-45[_ngcontent-%COMP%]{padding-bottom:45px}.p-l-45[_ngcontent-%COMP%]{padding-left:45px}.p-v-45[_ngcontent-%COMP%]{padding:45px 0}.p-h-45[_ngcontent-%COMP%]{padding:0 45px}.p-50[_ngcontent-%COMP%]{padding:50px}.p-t-50[_ngcontent-%COMP%]{padding-top:50px}.p-r-50[_ngcontent-%COMP%]{padding-right:50px}.p-b-50[_ngcontent-%COMP%]{padding-bottom:50px}.p-l-50[_ngcontent-%COMP%]{padding-left:50px}.p-v-50[_ngcontent-%COMP%]{padding:50px 0}.p-h-50[_ngcontent-%COMP%]{padding:0 50px}.p-55[_ngcontent-%COMP%]{padding:55px}.p-t-55[_ngcontent-%COMP%]{padding-top:55px}.p-r-55[_ngcontent-%COMP%]{padding-right:55px}.p-b-55[_ngcontent-%COMP%]{padding-bottom:55px}.p-l-55[_ngcontent-%COMP%]{padding-left:55px}.p-v-55[_ngcontent-%COMP%]{padding:55px 0}.p-h-55[_ngcontent-%COMP%]{padding:0 55px}.p-60[_ngcontent-%COMP%]{padding:60px}.p-t-60[_ngcontent-%COMP%]{padding-top:60px}.p-r-60[_ngcontent-%COMP%]{padding-right:60px}.p-b-60[_ngcontent-%COMP%]{padding-bottom:60px}.p-l-60[_ngcontent-%COMP%]{padding-left:60px}.p-v-60[_ngcontent-%COMP%]{padding:60px 0}.p-h-60[_ngcontent-%COMP%]{padding:0 60px}.p-65[_ngcontent-%COMP%]{padding:65px}.p-t-65[_ngcontent-%COMP%]{padding-top:65px}.p-r-65[_ngcontent-%COMP%]{padding-right:65px}.p-b-65[_ngcontent-%COMP%]{padding-bottom:65px}.p-l-65[_ngcontent-%COMP%]{padding-left:65px}.p-v-65[_ngcontent-%COMP%]{padding:65px 0}.p-h-65[_ngcontent-%COMP%]{padding:0 65px}.p-70[_ngcontent-%COMP%]{padding:70px}.p-t-70[_ngcontent-%COMP%]{padding-top:70px}.p-r-70[_ngcontent-%COMP%]{padding-right:70px}.p-b-70[_ngcontent-%COMP%]{padding-bottom:70px}.p-l-70[_ngcontent-%COMP%]{padding-left:70px}.p-v-70[_ngcontent-%COMP%]{padding:70px 0}.p-h-70[_ngcontent-%COMP%]{padding:0 70px}.p-75[_ngcontent-%COMP%]{padding:75px}.p-t-75[_ngcontent-%COMP%]{padding-top:75px}.p-r-75[_ngcontent-%COMP%]{padding-right:75px}.p-b-75[_ngcontent-%COMP%]{padding-bottom:75px}.p-l-75[_ngcontent-%COMP%]{padding-left:75px}.p-v-75[_ngcontent-%COMP%]{padding:75px 0}.p-h-75[_ngcontent-%COMP%]{padding:0 75px}.p-80[_ngcontent-%COMP%]{padding:80px}.p-t-80[_ngcontent-%COMP%]{padding-top:80px}.p-r-80[_ngcontent-%COMP%]{padding-right:80px}.p-b-80[_ngcontent-%COMP%]{padding-bottom:80px}.p-l-80[_ngcontent-%COMP%]{padding-left:80px}.p-v-80[_ngcontent-%COMP%]{padding:80px 0}.p-h-80[_ngcontent-%COMP%]{padding:0 80px}.no-padding[_ngcontent-%COMP%]{padding:0!important}.no-pad-lr[_ngcontent-%COMP%], .no-pad-rl[_ngcontent-%COMP%]{padding-left:0;padding-right:0}.no-pad-tb[_ngcontent-%COMP%], .no-pad-bt[_ngcontent-%COMP%]{padding-top:0;padding-bottom:0}.pad-t-only[_ngcontent-%COMP%]{padding-left:0;padding-right:0;padding-bottom:0}.pad-b-only[_ngcontent-%COMP%]{padding-left:0;padding-right:0;padding-top:0}.pad-l-only[_ngcontent-%COMP%]{padding-right:0;padding-top:0;padding-bottom:0}.pad-r-only[_ngcontent-%COMP%]{padding-left:0;padding-top:0;padding-bottom:0}html[_ngcontent-%COMP%], body[_ngcontent-%COMP%], .rel[_ngcontent-%COMP%], .relative[_ngcontent-%COMP%]{position:relative}.abs[_ngcontent-%COMP%], .absolute[_ngcontent-%COMP%]{position:absolute}.fixed[_ngcontent-%COMP%]{position:fixed}.status-active[_ngcontent-%COMP%]{color:#5cb85c}.status-inactive[_ngcontent-%COMP%]{color:#666f73}.status-deleted[_ngcontent-%COMP%]{color:#000}.status-pending[_ngcontent-%COMP%]{color:orange}.status-approved[_ngcontent-%COMP%]{color:#4461e2}.status-overpaid[_ngcontent-%COMP%]{color:purple}.status-chargeoff[_ngcontent-%COMP%]{color:#f39c12}.status-active-overdue[_ngcontent-%COMP%], .status-block[_ngcontent-%COMP%]{color:red}.status-matured[_ngcontent-%COMP%]{color:#ff4000}.subStatus-contract-termination[_ngcontent-%COMP%]{color:#b3b3b3}.mat-step-header[_ngcontent-%COMP%] .mat-step-icon-state-done[_ngcontent-%COMP%]{background-color:#2af72a}.mat-step-header[_ngcontent-%COMP%] .mat-step-icon-state-done[_ngcontent-%COMP%] .status-transfer-progress[_ngcontent-%COMP%]{color:#ff4000}.mat-step-header[_ngcontent-%COMP%] .mat-step-icon-state-done[_ngcontent-%COMP%] .status-transfer-hold[_ngcontent-%COMP%]{color:#df0101}html[_ngcontent-%COMP%], body[_ngcontent-%COMP%]{-webkit-font-smoothing:antialiased}html[_ngcontent-%COMP%]{font-size:16px}body[_ngcontent-%COMP%]{font-family:Roboto,Helvetica Neue,sans-serif;font-weight:400;font-size:14px;color:#000000de;line-height:1.5;letter-spacing:normal}.mat-h1[_ngcontent-%COMP%], .mat-headline[_ngcontent-%COMP%], .mat-typography[_ngcontent-%COMP%] .mat-h1[_ngcontent-%COMP%], .mat-typography[_ngcontent-%COMP%] .mat-headline[_ngcontent-%COMP%], .mat-typography[_ngcontent-%COMP%] h1[_ngcontent-%COMP%]{font:400 24px/32px Roboto,Helvetica Neue,sans-serif;letter-spacing:normal;margin:0 0 16px}.lh-1[_ngcontent-%COMP%]{line-height:1}.lh-13[_ngcontent-%COMP%]{line-height:1.3}.lh-15[_ngcontent-%COMP%]{line-height:1.5}.bold[_ngcontent-%COMP%], .strong[_ngcontent-%COMP%]{font-weight:700}.no-bold[_ngcontent-%COMP%]{font-weight:400}.italic[_ngcontent-%COMP%], .em[_ngcontent-%COMP%]{font-style:italic}.strike[_ngcontent-%COMP%]{text-decoration:line-through}.normal[_ngcontent-%COMP%]{font-weight:400;font-style:normal}.uppercase[_ngcontent-%COMP%]{text-transform:uppercase}.text-left[_ngcontent-%COMP%]{text-align:left}.text-center[_ngcontent-%COMP%]{text-align:center}.text-right[_ngcontent-%COMP%]{text-align:right}.w100[_ngcontent-%COMP%]{font-weight:100}.w200[_ngcontent-%COMP%]{font-weight:200}.w300[_ngcontent-%COMP%]{font-weight:300}.w400[_ngcontent-%COMP%]{font-weight:400}.w500[_ngcontent-%COMP%]{font-weight:500}.w600[_ngcontent-%COMP%]{font-weight:600}.w700[_ngcontent-%COMP%]{font-weight:700}.w800[_ngcontent-%COMP%]{font-weight:800}.w900[_ngcontent-%COMP%]{font-weight:900}.f9[_ngcontent-%COMP%]{font-size:9px}.f10[_ngcontent-%COMP%]{font-size:10px}.f11[_ngcontent-%COMP%]{font-size:11px}.f12[_ngcontent-%COMP%]{font-size:12px}.f13[_ngcontent-%COMP%]{font-size:13px}.f14[_ngcontent-%COMP%]{font-size:14px}.f15[_ngcontent-%COMP%]{font-size:15px}.f16[_ngcontent-%COMP%]{font-size:16px}.f17[_ngcontent-%COMP%]{font-size:17px}.f18[_ngcontent-%COMP%]{font-size:18px;line-height:30px}.f19[_ngcontent-%COMP%]{font-size:19px}.f20[_ngcontent-%COMP%]{font-size:20px}.f30[_ngcontent-%COMP%]{font-size:30px}.f40[_ngcontent-%COMP%]{font-size:40px}.f50[_ngcontent-%COMP%]{font-size:50px}.f60[_ngcontent-%COMP%]{font-size:60px}.size-small[_ngcontent-%COMP%]{font-size:75%}.size-normal[_ngcontent-%COMP%]{font-size:100%}.size-medium[_ngcontent-%COMP%]{font-size:125%}.size-big[_ngcontent-%COMP%], .size-large[_ngcontent-%COMP%]{font-size:150%}.size-huge[_ngcontent-%COMP%]{font-size:200%}.inherit[_ngcontent-%COMP%]{font:inherit}.text-shadow[_ngcontent-%COMP%]{text-shadow:1px 1px 1px rgba(0,0,0,.4)}.text-rgb-2[_ngcontent-%COMP%]{color:#0003}.text-rgb-3[_ngcontent-%COMP%]{color:#0000004d}.text-rgb-4[_ngcontent-%COMP%]{color:#0006}.text-rgb-5[_ngcontent-%COMP%]{color:#00000080}.no-ul[_ngcontent-%COMP%], .no-ul[_ngcontent-%COMP%]:hover, .no-ul[_ngcontent-%COMP%] a[_ngcontent-%COMP%], .no-ul[_ngcontent-%COMP%] a[_ngcontent-%COMP%]:hover{text-decoration:none}.no-wrap[_ngcontent-%COMP%]{white-space:nowrap}.auto-cell-size[_ngcontent-%COMP%]{white-space:nowrap;width:1%}.ls-0[_ngcontent-%COMP%]{letter-spacing:-3px;white-space:nowrap}.label-field[_ngcontent-%COMP%]{margin-top:32px}.wrap-content[_ngcontent-%COMP%]{overflow-wrap:break-word;word-wrap:break-word}.no-break-content[_ngcontent-%COMP%]{overflow-wrap:anywhere!important}.fit[_ngcontent-%COMP%]{max-width:100%}.half-width[_ngcontent-%COMP%]{width:50%}.full-width[_ngcontent-%COMP%]{width:100%}.full-height[_ngcontent-%COMP%]{height:100%}html[_ngcontent-%COMP%], body[_ngcontent-%COMP%]{width:100%;height:100%;min-height:100%}body[_ngcontent-%COMP%] table[_ngcontent-%COMP%]{width:100%}.container[_ngcontent-%COMP%]{max-width:74rem;width:90%}.mw300[_ngcontent-%COMP%]{max-width:300px}.mw400[_ngcontent-%COMP%]{max-width:400px}.mw500[_ngcontent-%COMP%]{max-width:500px}.mw600[_ngcontent-%COMP%]{max-width:600px}.fullwidth[_ngcontent-%COMP%]{width:100%}.zindex-1[_ngcontent-%COMP%]{z-index:1}.zindex-2[_ngcontent-%COMP%]{z-index:2}.zindex-3[_ngcontent-%COMP%]{z-index:3}.zindex-4[_ngcontent-%COMP%]{z-index:4}.card-content[_ngcontent-%COMP%]{width:100%;padding-bottom:25px}.card-content[_ngcontent-%COMP%] div[_ngcontent-%COMP%]{text-align:left}.card-content[_ngcontent-%COMP%] .attribute[_ngcontent-%COMP%]{font-weight:500}"]})}}return t})();var GR=(()=>{class t{constructor(){this.disablePrevious=!1,this.disableNext=!1}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275cmp=P({type:t,selectors:[["mifosx-stepper-buttons"]],inputs:{disablePrevious:"disablePrevious",disableNext:"disableNext"},decls:9,vars:8,consts:[[1,"flex-fill","layout-row","layout-align-center","margin-t","gap-2percent","layout-xs-column"],["mat-raised-button","","matStepperPrevious","",3,"disabled"],["icon","arrow-left",1,"m-r-10"],["mat-raised-button","","matStepperNext","",3,"disabled"],["icon","arrow-right",1,"m-l-10"]],template:function(n,o){n&1&&(h(0,"div",0)(1,"button",1),F(2,"fa-icon",2),y(3),S(4,"translate"),_(),h(5,"button",3),y(6),S(7,"translate"),F(8,"fa-icon",4),_()()),n&2&&(p(),D("disabled",o.disablePrevious),p(2),ee(" ",k(4,4,"labels.buttons.Previous")," "),p(2),D("disabled",o.disableNext),p(),ee(" ",k(7,6,"labels.buttons.Next")," "))},dependencies:[he,ve,vt,Yt,Gz,$z,Te],encapsulation:2})}}return t})();function L2e(t,i){if(t&1&&(h(0,"mat-option",4),y(1),_()),t&2){let e=i.$implicit;D("value",e.id),p(),ee(" ","("+e.glCode+") "+e.name," ")}}function A2e(t,i){t&1&&(h(0,"mat-error"),y(1),S(2,"translate"),S(3,"translate"),h(4,"strong"),y(5),S(6,"translate"),_()()),t&2&&(p(),St(" ",k(2,3,"labels.inputs.Account")," ",k(3,5,"labels.commons.is")," "),p(4),T(k(6,7,"labels.commons.required")))}function z2e(t,i){if(t&1&&(h(0,"mat-form-field",1)(1,"mat-label"),y(2),S(3,"translate"),_(),h(4,"mat-select",2)(5,"mat-option"),F(6,"ngx-mat-select-search",3),_(),Xe(7,L2e,2,2,"mat-option",4,ht),S(9,"async"),_(),E(10,A2e,7,9,"mat-error"),_()),t&2){let e=M();p(2),T(k(3,8,"labels.inputs."+e.inputLabel)),p(2),D("formControl",e.inputFormControl),p(2),D("placeholderLabel",Ft(e.placeHolderLabel))("noEntriesFoundLabel",Ft(e.noEntriesFoundLabel))("formControl",e.filterFormCtrl),p(),Ze(k(9,10,e.glAccountData)),p(3),I(e.inputFormControl.hasError("required")?10:-1)}}function R2e(t,i){if(t&1&&(h(0,"mat-option",4),y(1),_()),t&2){let e=i.$implicit;D("value",e.id),p(),ee(" ","("+e.glCode+") "+e.name," ")}}function N2e(t,i){if(t&1&&(h(0,"mat-form-field",1)(1,"mat-label"),y(2),S(3,"translate"),_(),h(4,"mat-select",5)(5,"mat-option"),F(6,"ngx-mat-select-search",6),_(),Xe(7,R2e,2,2,"mat-option",4,ht),S(9,"async"),_()()),t&2){let e=M();p(2),T(k(3,7,"labels.inputs."+e.inputLabel)),p(2),D("formControl",e.inputFormControl),p(2),D("placeholderLabel",Ft(e.placeHolderLabel))("noEntriesFoundLabel",Ft(e.noEntriesFoundLabel))("formControl",e.filterFormCtrl),p(),Ze(k(9,9,e.glAccountData))}}var WR=(()=>{class t{constructor(){this.translateService=d(Po),this.glAccountList=[],this.required=!1,this.inputLabel="",this.glAccountData=new pr(1),this.filterFormCtrl=new Hi(""),this._onDestroy=new B,this.placeHolderLabel="",this.noEntriesFoundLabel=""}ngOnInit(){this.filterFormCtrl.valueChanges.pipe(ye(this._onDestroy)).subscribe(()=>{this.searchGLAccount()}),this.placeHolderLabel=this.translateService.instant("labels.text.Search"),this.noEntriesFoundLabel=this.translateService.instant("labels.text.No data found")}ngOnChanges(e){this.glAccountList&&this.glAccountData.next(this.glAccountList.slice())}ngOnDestroy(){this._onDestroy.next(),this._onDestroy.complete()}searchGLAccount(){if(this.glAccountList){let e=this.filterFormCtrl.value.toLowerCase();e?this.glAccountData.next(this.glAccountList.filter(n=>n.name.toLowerCase().indexOf(e)>=0||n.glCode.toLowerCase().indexOf(e)>=0)):this.glAccountData.next(this.glAccountList.slice())}}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275cmp=P({type:t,selectors:[["mifosx-gl-account-selector"]],inputs:{inputFormControl:"inputFormControl",glAccountList:"glAccountList",required:"required",inputLabel:"inputLabel"},features:[Re],decls:3,vars:2,consts:[[1,"layout-column","m-r-10"],[1,"flex-100"],["required","",3,"formControl"],[3,"placeholderLabel","noEntriesFoundLabel","formControl"],[3,"value"],[3,"formControl"],[3,"formControl","placeholderLabel","noEntriesFoundLabel"]],template:function(n,o){n&1&&(h(0,"div",0),E(1,z2e,11,12,"mat-form-field",1),E(2,N2e,10,11,"mat-form-field",1),_()),n&2&&(p(),I(o.required?1:-1),p(),I(o.required?-1:2))},dependencies:[he,ve,mn,Ir,Si,Bt,Cn,ao,qn,ln,Sh,Qb,Xd,Te],encapsulation:2})}}return t})();function F2e(t,i){if(t&1&&(h(0,"span",0)(1,"div",2),y(2),S(3,"translate"),_(),h(4,"div",3),y(5),_()()),t&2){let e=M();p(),D("ngClass",e.getWithClass(e.withTitle)),p(),ee(" ",k(3,4,"labels.inputs."+e.accountTitle)," "),p(2),D("ngClass",e.getWithClass(e.withAccount)),p(),ee(" ",e.glAccountValue()," ")}}function V2e(t,i){if(t&1&&(h(0,"div",1),y(1),_()),t&2){let e=M();p(),ee(" ",e.glAccountValue()," ")}}var Hh=(()=>{class t{constructor(){this.glAccount=null,this.accountTitle=null,this.withTitle="50%",this.withAccount="50%"}glAccountValue(){return this.glAccount?"("+this.glAccount.glCode+") "+(this.glAccount.nameDecorated?this.glAccount.nameDecorated:this.glAccount.name):""}getWithClass(e){return"flex-"+e.replace("%","")}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275cmp=P({type:t,selectors:[["mifosx-gl-account-display"]],inputs:{glAccount:"glAccount",accountTitle:"accountTitle",withTitle:"withTitle",withAccount:"withAccount"},decls:2,vars:2,consts:[[1,"layout-row"],[1,"flex-100"],[1,"header",3,"ngClass"],[3,"ngClass"]],template:function(n,o){n&1&&(E(0,F2e,6,6,"span",0),E(1,V2e,2,1,"div",1)),n&2&&(I(o.accountTitle?0:-1),p(),I(o.accountTitle?-1:1))},dependencies:[he,Un,ve,Te],styles:["div[_ngcontent-%COMP%]{margin:.3rem 0;word-wrap:break-word}div.header[_ngcontent-%COMP%]{font-weight:500}"]})}}return t})();var qR=(()=>{class t{getAccountingRulesForShares(){return["NONE","Cash"]}getAccountingRulesForSavings(){return["NONE","Cash","Accrual (periodic)"]}getAccountingRulesForLoans(){return["NONE","Cash","Accrual (periodic)","Accrual (upfront)"]}getAccountRuleName(e){return["ACCRUAL PERIODIC","ACCRUAL (PERIODIC)"].includes(e)?"Accrual (periodic)":["ACCRUAL UPFRONT","ACCRUAL (UPFRONT)"].includes(e)?"Accrual (upfront)":e.startsWith("CASH")?"Cash":e==="NONE"?"NONE":""}isNoneAccounting(e){return e.id===1}isNoneAccountingRuleId(e){return e===1}isCashOrAccrualAccounting(e){return e.id===2||e.id===3}isCashOrAccrualAccountingRuleId(e){return e===2||e===3}isAccrualAccounting(e){return e.id===3}isAccrualAccountingRuleId(e){return e===3}getAccountingRuleFrom(e){return e===1?{code:"NONE",id:e,value:"None"}:e===2?{code:"CASH",id:e,value:"Cash"}:e===3?{code:"ACCRUAL_PERIODIC",id:e,value:"Accural (periodic)"}:e===4?{code:"ACCRUAL_UPFRONT",id:e,value:"Accural (upfront)"}:{code:"INVALID",id:e,value:"Invalid"}}glAccountLookUp(e,n){let o=null;return e&&n.some(r=>{r.id===e&&(o={id:r.id,name:r.name,glCode:r.glCode})}),o}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275prov=R({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();function B2e(t,i){if(t&1&&(h(0,"div",1)(1,"span",3),y(2),S(3,"translate"),_(),h(4,"span",4),y(5),S(6,"translate"),_()()),t&2){let e=M();p(2),ee("",k(3,2,"labels.inputs.Type"),":"),p(3),T(k(6,4,"labels.accounting."+e.getAccountingRuleName(e.accountingRule.value)))}}function j2e(t,i){if(t&1&&F(0,"mifosx-gl-account-display",7),t&2){let e=M(2);D("accountTitle","Overdraft portfolio")("glAccount",e.accountingMappings.overdraftPortfolioControl)("withTitle","40%")}}function H2e(t,i){if(t&1&&F(0,"mifosx-gl-account-display",7),t&2){let e=M(2);D("accountTitle","Fees Receivable")("glAccount",e.accountingMappings.feeReceivableAccount)("withTitle","40%")}}function U2e(t,i){if(t&1&&F(0,"mifosx-gl-account-display",7),t&2){let e=M(2);D("accountTitle","Penalties Receivable")("glAccount",e.accountingMappings.penaltyReceivableAccount)("withTitle","40%")}}function $2e(t,i){if(t&1&&F(0,"mifosx-gl-account-display",7),t&2){let e=M(2);D("accountTitle","Interest Receivable")("glAccount",e.accountingMappings.interestReceivableAccount)("withTitle","40%")}}function G2e(t,i){if(t&1&&F(0,"mifosx-gl-account-display",7),t&2){let e=M(2);D("accountTitle","Interest Payable")("glAccount",e.accountingMappings.interestPayableAccount)("withTitle","40%")}}function W2e(t,i){if(t&1&&F(0,"mifosx-gl-account-display",7),t&2){let e=M(2);D("accountTitle","Escheat liability")("glAccount",e.accountingMappings.escheatLiabilityAccount)("withTitle","40%")}}function q2e(t,i){if(t&1&&F(0,"mifosx-gl-account-display",7),t&2){let e=M(2);D("accountTitle","Income from Interest")("glAccount",e.accountingMappings.incomeFromInterest)("withTitle","40%")}}function Y2e(t,i){if(t&1&&F(0,"mifosx-gl-account-display",7),t&2){let e=M(2);D("accountTitle","Write-off")("glAccount",e.accountingMappings.writeOffAccount)("withTitle","40%")}}function Q2e(t,i){if(t&1&&(h(0,"div",2)(1,"h4",5),y(2),S(3,"translate"),_(),h(4,"div",6),F(5,"mifosx-gl-account-display",7),_(),h(6,"div",6),E(7,j2e,1,3,"mifosx-gl-account-display",7),_(),h(8,"div",6),E(9,H2e,1,3,"mifosx-gl-account-display",7),_(),h(10,"div",6),E(11,U2e,1,3,"mifosx-gl-account-display",7),E(12,$2e,1,3,"mifosx-gl-account-display",7),h(13,"h4",5),y(14),S(15,"translate"),_(),h(16,"div",6),F(17,"mifosx-gl-account-display",7),_(),h(18,"div",6),F(19,"mifosx-gl-account-display",7),_(),h(20,"div",6),E(21,G2e,1,3,"mifosx-gl-account-display",7),_(),h(22,"div",6),E(23,W2e,1,3,"mifosx-gl-account-display",7),_(),h(24,"h4",5),y(25),S(26,"translate"),_(),h(27,"div",6),F(28,"mifosx-gl-account-display",7),_(),h(29,"div",6),F(30,"mifosx-gl-account-display",7),_(),h(31,"div",6),E(32,q2e,1,3,"mifosx-gl-account-display",7),_(),h(33,"h4",5),y(34),S(35,"translate"),_(),h(36,"div",6),F(37,"mifosx-gl-account-display",7),_(),h(38,"div",6),E(39,Y2e,1,3,"mifosx-gl-account-display",7),_()()()),t&2){let e=M();p(2),T(k(3,30,"labels.heading.Assets")),p(3),D("accountTitle","Saving reference")("glAccount",e.accountingMappings.savingsReferenceAccount)("withTitle","40%"),p(2),I(e.accountingMappings.overdraftPortfolioControl?7:-1),p(2),I(e.isAccrualAccounting()?9:-1),p(2),I(e.isAccrualAccounting()?11:-1),p(),I(e.isAccrualAccounting()?12:-1),p(2),T(k(15,32,"labels.heading.Liabilities")),p(3),D("accountTitle","Saving control")("glAccount",e.accountingMappings.savingsControlAccount)("withTitle","40%"),p(2),D("accountTitle","Savings transfers in suspense")("glAccount",e.accountingMappings.transfersInSuspenseAccount)("withTitle","40%"),p(2),I(e.isAccrualAccounting()?21:-1),p(2),I(e.accountingMappings.escheatLiabilityAccount?23:-1),p(2),T(k(26,34,"labels.heading.Income")),p(3),D("accountTitle","Income from fees")("glAccount",e.accountingMappings.incomeFromFeeAccount)("withTitle","40%"),p(2),D("accountTitle","Income from penalties")("glAccount",e.accountingMappings.incomeFromPenaltyAccount)("withTitle","40%"),p(2),I(e.accountingMappings.incomeFromInterest?32:-1),p(2),T(k(35,36,"labels.heading.Expenses")),p(3),D("accountTitle","Interest on savings")("glAccount",e.accountingMappings.interestOnSavingsAccount)("withTitle","40%"),p(2),I(e.accountingMappings.writeOffAccount?39:-1)}}var YR=(()=>{class t{constructor(){this.accounting=d(qR),this.accountingMappings=[]}isCashOrAccrualAccounting(){return this.accountingRule?this.accounting.isCashOrAccrualAccounting(this.accountingRule):!1}isAccrualAccounting(){return this.accountingRule?this.accounting.isAccrualAccounting(this.accountingRule):!1}getAccountingRuleName(e){return this.accounting.getAccountRuleName(e.toUpperCase())}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275cmp=P({type:t,selectors:[["mifosx-view-savings-accounting-details"]],inputs:{accountingRule:"accountingRule",accountingMappings:"accountingMappings"},decls:4,vars:2,consts:[[1,"layout-row-wrap","responsive-column"],[1,"layout-row","responsive-column","flex-100"],[1,"layout-row-wrap","responsive-column","flex-100"],[1,"flex-40"],[1,"flex-60"],[1,"mat-h4","flex-100"],[1,"flex-100","layout-row-wrap","responsive-column"],[1,"flex-100",3,"accountTitle","glAccount","withTitle"]],template:function(n,o){n&1&&(h(0,"div",0),E(1,B2e,7,6,"div",1),h(2,"div",2),E(3,Q2e,40,38,"div",2),_()()),n&2&&(p(),I(o.accountingRule?1:-1),p(2),I(o.isCashOrAccrualAccounting()?3:-1))},dependencies:[he,ve,Hh,Te],styles:[".column-mandatory[_ngcontent-%COMP%]{color:#5cb85c;text-align:center}.not-column-mandatory[_ngcontent-%COMP%]{color:#666f73;text-align:center}.cdk-drag-placeholder[_ngcontent-%COMP%]{background:#3498db}.yes[_ngcontent-%COMP%]{color:#5cb85c!important;background-color:#5cb85c;height:4px;cursor:none}.no[_ngcontent-%COMP%]{color:red;background-color:red;height:4px;cursor:none}.strike[_ngcontent-%COMP%]{text-decoration:line-through;color:red}.transfer[_ngcontent-%COMP%]{color:#16a085}.linked[_ngcontent-%COMP%]{color:#4461e2}.accrual[_ngcontent-%COMP%]{color:#999}.fa-question[_ngcontent-%COMP%]{color:#4461e2}.enabled[_ngcontent-%COMP%]{color:#32cd32}.disabled[_ngcontent-%COMP%]{color:#f44366}.container[_ngcontent-%COMP%]{padding:1%;margin:1%;width:100%}h2[_ngcontent-%COMP%], h3[_ngcontent-%COMP%], h4[_ngcontent-%COMP%]{margin:0;font-weight:500}table[_ngcontent-%COMP%]{width:100%}table[_ngcontent-%COMP%] tr.incentives-row[_ngcontent-%COMP%]{height:0}table[_ngcontent-%COMP%] tr.incentives-row[_ngcontent-%COMP%] > td[_ngcontent-%COMP%]{padding:0}table[_ngcontent-%COMP%] tr.incentives-row[_ngcontent-%COMP%] .incentives[_ngcontent-%COMP%]{overflow:hidden}table[_ngcontent-%COMP%] tr.incentives-row[_ngcontent-%COMP%] .mat-card[_ngcontent-%COMP%]{border-radius:0}table[_ngcontent-%COMP%] tr.incentives-row[_ngcontent-%COMP%] .mat-card[_ngcontent-%COMP%] > h4[_ngcontent-%COMP%]{font-weight:500;margin:.5em 0 0}.mat-h4[_ngcontent-%COMP%]{margin-top:10px!important;font-weight:200;color:#4461e2}.mat-elevation-z1[_ngcontent-%COMP%]{margin:1em 0 1.5em}span[_ngcontent-%COMP%]{margin:.5em 0}mat-divider[_ngcontent-%COMP%]{margin:0 0 .5em}.margin-t[_ngcontent-%COMP%]{margin-top:1em}"]})}}return t})();var QR=(()=>{class t{constructor(){this.ref=d(li),this.darkModeOn=!1,this.themes=["dark-theme","light-theme"],this.theme=new ct("light-theme"),this.darkModeOn=window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches,this.setDarkMode(this.darkModeOn),window.matchMedia("(prefers-color-scheme: dark)").addListener(e=>{let n=e.matches;this.theme.next(n?"dark-theme":"light-theme"),this.ref.tick()})}isDarkMode(){return this.darkModeOn=window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches,this.darkModeOn}setDarkMode(e){this.darkModeOn=e,e?(document.body.classList.add("dark-theme"),this.theme.next("dark-theme")):(document.body.classList.remove("dark-theme"),this.theme.next("light-theme"))}setInitialDarkMode(){this.setDarkMode(this.darkModeOn)}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275prov=R({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();var KR=(()=>{class t{constructor(){this.themingService=d(QR),this.settingsService=d(Xt)}ngOnInit(){this.darkModeOn=!!this.settingsService.themeDarkEnabled}ngOnChanges(e){this.darkModeOn=!!this.settingsService.themeDarkEnabled}toggleTheme(){this.darkModeOn=!this.darkModeOn,this.settingsService.setThemeDarkEnabled(this.darkModeOn),this.themingService.setDarkMode(this.darkModeOn)}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275cmp=P({type:t,selectors:[["mifosx-theme-toggle"]],features:[Re],decls:3,vars:1,consts:[["mat-icon-button","",1,"m-l-15","m-r-5",3,"click"]],template:function(n,o){n&1&&(h(0,"button",0),N("click",function(){return o.toggleTheme()}),h(1,"mat-icon"),y(2),_()()),n&2&&(p(2),T(o.darkModeOn?"wb_sunny":"nights_stay"))},dependencies:[he,ve,ni,Co],encapsulation:2})}}return t})();function K2e(t,i){if(t&1){let e=le();h(0,"span",3),N("click",function(){G(e);let o=M(2);return W(o.showValue())}),F(1,"fa-icon",4),_()}if(t&2){let e=M(2);p(),D("title",e.textValue)}}function X2e(t,i){if(t&1){let e=le();h(0,"span",5),N("click",function(){G(e);let o=M(2);return W(o.showValue())}),y(1),S(2,"truncateText"),_()}if(t&2){let e=M(2);p(),ee("",Zo(2,1,e.textValue,e.printChars),"...")}}function Z2e(t,i){if(t&1){let e=le();h(0,"span",5),N("click",function(){G(e);let o=M(2);return W(o.showValue())}),y(1),_()}if(t&2){let e=M(2);p(),T(e.textValue)}}function J2e(t,i){if(t&1){let e=le();h(0,"span",0),N("mouseenter",function(){G(e);let o=M();return W(o.mouseEnter())})("mouseleave",function(){G(e);let o=M();return W(o.mouseLeave())}),E(1,K2e,2,1,"span",1),E(2,X2e,3,4,"span",2),E(3,Z2e,2,1,"span",2),_()}if(t&2){let e=M();p(),I(e.isLongValue()?1:-1),p(),I(e.isLongValue()?2:-1),p(),I(e.isLongValue()?-1:3)}}var XR=(()=>{class t{constructor(){this.chars=30,this.iconVisible=!1,this.displayL=!1,this.displayR=!0,this.emptyValue=!1,this.printChars=30}ngOnInit(){this.emptyValue=!this.textValue||this.textValue==="",this.printChars=this.chars}isLongValue(){return this.textValue==null?!1:this.textValue.length>25}showValue(){this.printChars==30?this.printChars=1e3:this.printChars=30}mouseEnter(){this.iconVisible=!0}mouseLeave(){this.iconVisible=!1}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275cmp=P({type:t,selectors:[["mifosx-long-text"]],inputs:{textValue:"textValue",chars:"chars"},decls:1,vars:1,consts:[[3,"mouseenter","mouseleave"],[1,"m-l-3"],[1,"m-l-5"],[1,"m-l-3",3,"click"],["icon","eye","size","sm",3,"title"],[1,"m-l-5",3,"click"]],template:function(n,o){n&1&&E(0,J2e,4,3,"span"),n&2&&I(o.emptyValue?-1:0)},dependencies:[he,ve,Yt,Qm],encapsulation:2})}}return t})();function ede(t,i){if(t&1&&(h(0,"mat-option",2),y(1),S(2,"translateKey"),_()),t&2){let e=i.$implicit;D("value",e.id),p(),ee(" ",Zo(2,2,e.value,"catalogs")," ")}}function tde(t,i){if(t&1){let e=le();h(0,"button",4),N("click",function(o){G(e);let r=M();return W(r.clearProperty(o))}),h(1,"mat-icon"),y(2),S(3,"translate"),_()()}t&2&&(p(2),T(k(3,1,"labels.buttons.Close")))}var ZR=(()=>{class t{constructor(){this.translateService=d(Po),this.selectOptions=[]}getPlaceHolderText(){return this.placeHolderText?this.translateService.instant("labels.inputs."+this.placeHolderText):""}getLabelText(){return this.labelText?this.translateService.instant("labels.inputs."+this.labelText):""}clearProperty(){this.controlSelect.patchValue("")}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275cmp=P({type:t,selectors:[["mifosx-dropdown"]],inputs:{placeHolderText:"placeHolderText",labelText:"labelText",selectOptions:"selectOptions",controlSelect:"controlSelect",required:"required"},decls:7,vars:4,consts:[[1,"flex-28"],["formControlName","controlSelect",3,"placeholder"],[3,"value"],["matSuffix","","mat-icon-button","","aria-label","Clear"],["matSuffix","","mat-icon-button","","aria-label","Clear",3,"click"]],template:function(n,o){n&1&&(h(0,"mat-form-field",0)(1,"mat-label"),y(2),_(),h(3,"mat-select",1),Xe(4,ede,3,5,"mat-option",2,ht),_(),E(6,tde,4,3,"button",3),_()),n&2&&(p(2),T(o.getLabelText()),p(),D("placeholder",Ft(o.getPlaceHolderText())),p(),Ze(o.selectOptions),p(2),I(o.controlSelect?6:-1))},dependencies:[he,ve,mn,Ao,Bt,Cn,Za,qn,ln,ni,Co,Te,Wc],encapsulation:2})}}return t})();function nde(t,i){if(t&1&&(h(0,"mat-error"),y(1),S(2,"translate"),S(3,"translate"),h(4,"strong"),y(5),S(6,"translate"),_()()),t&2){let e=M(2);p(),St(" ",k(2,3,"labels.inputs."+e.inputLabel)," ",k(3,5,"labels.commons.is")," "),p(4),T(k(6,7,"labels.commons.required"))}}function ide(t,i){if(t&1&&(h(0,"mat-hint",4),y(1),S(2,"currency"),_()),t&2){let e=M(2);p(),T(cm(2,1,e.inputFormControl.value,e.currency.code,e.currency.displaySymbol,"1.2-2"))}}function ode(t,i){if(t&1&&(h(0,"mat-error"),y(1),S(2,"translate"),S(3,"translate"),_()),t&2){let e=M(2);p(),Ua(" ",k(2,3,"labels.inputs.Amount")," ",k(3,5,"labels.commons.Must be at least")," ",e.minVal," ")}}function rde(t,i){if(t&1&&(h(0,"mat-error"),y(1),S(2,"translate"),S(3,"translate"),_()),t&2){let e=M(2);p(),Ua(" ",k(2,3,"labels.inputs.Amount")," ",k(3,5,"labels.commons.Must be less or equal to")," ",e.maxVal," ")}}function ade(t,i){if(t&1){let e=le();h(0,"mat-form-field",0)(1,"mat-label"),y(2),S(3,"translate"),_(),h(4,"div",2)(5,"span"),y(6),_(),h(7,"input",3),N("keypress",function(o){G(e);let r=M();return W(r.numberOnly(o))})("blur",function(){G(e);let o=M();return W(o.displayHint=!1)})("focus",function(){G(e);let o=M();return W(o.displayHint=!0)}),_()(),E(8,nde,7,9,"mat-error"),E(9,ide,3,6,"mat-hint",4),E(10,ode,4,7,"mat-error"),E(11,rde,4,7,"mat-error"),_()}if(t&2){let e=M();p(2),T(k(3,10,"labels.inputs."+e.inputLabel)),p(4),T(e.currency.code),p(),D("mifosxFormatAmount",am("",e.currency.code,":",e.currency.displaySymbol))("formControl",e.inputFormControl),p(),I(e.inputFormControl.hasError("required")?8:-1),p(),I(e.displayHint?9:-1),p(),I(e.minVal&&e.inputFormControl.hasError("min")?10:-1),p(),I(e.maxVal&&e.inputFormControl.hasError("max")?11:-1)}}function sde(t,i){if(t&1&&(h(0,"mat-hint",4),y(1),S(2,"currency"),_()),t&2){let e=M(2);p(),T(cm(2,1,e.inputFormControl.value,e.currency.code,e.currency.displaySymbol,"1.2-2"))}}function cde(t,i){if(t&1&&(h(0,"mat-error"),y(1),S(2,"translate"),S(3,"translate"),_()),t&2){let e=M(2);p(),Ua(" ",k(2,3,"labels.inputs.Amount")," ",k(3,5,"labels.commons.Must be at least")," ",e.minVal," ")}}function lde(t,i){if(t&1&&(h(0,"mat-error"),y(1),S(2,"translate"),S(3,"translate"),_()),t&2){let e=M(2);p(),Ua(" ",k(2,3,"labels.inputs.Amount")," ",k(3,5,"labels.commons.Must be less or equal to")," ",e.maxVal," ")}}function dde(t,i){if(t&1){let e=le();h(0,"mat-form-field",1)(1,"mat-label"),y(2),S(3,"translate"),_(),h(4,"span",5),y(5),_(),F(6,"span",6),h(7,"input",7),N("keypress",function(o){G(e);let r=M();return W(r.numberOnly(o))})("blur",function(){G(e);let o=M();return W(o.displayHint=!1)})("focus",function(){G(e);let o=M();return W(o.displayHint=!0)}),_(),E(8,sde,3,6,"mat-hint",4),E(9,cde,4,7,"mat-error"),E(10,lde,4,7,"mat-error"),_()}if(t&2){let e=M();p(2),T(k(3,9,"labels.inputs."+e.inputLabel)),p(3),T(e.currency.code),p(2),D("mifosxFormatAmount",am("",e.currency.code,":",e.currency.displaySymbol))("formControl",e.inputFormControl),p(),I(e.displayHint?8:-1),p(),I(e.minVal&&e.inputFormControl.hasError("min")?9:-1),p(),I(e.maxVal&&e.inputFormControl.hasError("max")?10:-1)}}var JR=(()=>{class t{constructor(){this.isRequired=!1,this.displayHint=!1}numberOnly(e){let n=e.which?e.which:e.keyCode;return n===46?!(this.inputFormControl.value.indexOf(".")>-1):!(n>31&&(n<48||n>57))}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275cmp=P({type:t,selectors:[["mifosx-input-amount"]],inputs:{isRequired:"isRequired",currency:"currency",inputLabel:"inputLabel",inputFormControl:"inputFormControl",minVal:"minVal",maxVal:"maxVal"},decls:2,vars:2,consts:[["appearance","fill",1,"flex-100","input-container"],["appearance","fill",1,"flex-100"],[1,"input-group"],["required","","matInput","",1,"right-input",3,"keypress","blur","focus","mifosxFormatAmount","formControl"],[1,"right-hint"],["matTextSuffix","",1,"m-l-10"],[1,"flex-auto"],["matInput","",1,"right-input",3,"keypress","blur","focus","mifosxFormatAmount","formControl"]],template:function(n,o){n&1&&(E(0,ade,12,12,"mat-form-field",0),E(1,dde,11,11,"mat-form-field",1)),n&2&&(I(o.isRequired?0:-1),p(),I(o.isRequired?-1:1))},dependencies:[he,ve,yi,mn,Ir,Si,Bt,Cn,ao,Za,W0,ti,KS,o7,Te],styles:[".expandcollapsebutton[_ngcontent-%COMP%]{margin-top:-7px}.input-container[_ngcontent-%COMP%]{width:100%}.input-group[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center;gap:5px}.container[_ngcontent-%COMP%]{max-width:37rem}.right-input[_ngcontent-%COMP%]{text-align:right}.right-label[_ngcontent-%COMP%]{padding-right:25px!important}.right-hint[_ngcontent-%COMP%]{min-width:100%;text-align:right;font-weight:500}"]})}}return t})();var eN=(()=>{class t{constructor(){this.enableMeridian=!0}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275cmp=P({type:t,selectors:[["ngx-mat-datetime-picker"]],inputs:{enableMeridian:"enableMeridian"},decls:3,vars:1,consts:[["picker",""],[3,"for"]],template:function(n,o){if(n&1&&F(0,"mat-datepicker-toggle",1)(1,"mat-datepicker",null,0),n&2){let r=Nt(2);D("for",r)}},dependencies:[he,ve,ou,bf],encapsulation:2})}}return t})();var Vet=(()=>{class t{static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275mod=J({type:t})}static{this.\u0275inj=X({imports:[he,ab,Kb,ve,E7,uS,XS,yf,es,Rr,cO,Af,KT,XT,cP,gP,_P,bP,yP,IP,CP,kP,EP,OP,TP,DR,kR,RR,NR,Bh,Vh,FR,jh,jR,HR,UR,$R,GR,WR,Hh,YR,KR,XR,ZR,JR,Uf,eN,he,ab,Kb,QS,ve,E7]})}}return t})();export{Se as a,Fe as b,B as c,ct as d,pr as e,Sn as f,iue as g,tn as h,re as i,Gr as j,me as k,gi as l,_n as m,Oa as n,ed as o,Ta as p,ft as q,Ae as r,Mo as s,hr as t,Be as u,Wl as v,qr as w,Yr as x,hs as y,Cc as z,We as A,lt as B,ye as C,Ot as D,pe as E,kt as F,R as G,X as H,L as I,ke as J,d as K,G as L,W as M,$t as N,Ko as O,be as P,Me as Q,Fi as R,Xo as S,Re as T,Ie as U,Q as V,Bc as W,Td as X,Fn as Y,jc as Z,_1 as _,Vx as $,mU as aa,pU as ba,p as ca,j as da,se as ea,tt as fa,On as ga,Ke as ha,Ce as ia,P as ja,J as ka,z as la,ce as ma,ot as na,C1 as oa,ne as pa,M5 as qa,E as ra,I as sa,ht as ta,Xe as ua,Ze as va,D as wa,h as xa,_ as ya,F as za,nt as Aa,rt as Ba,Tn as Ca,Vi as Da,Bi as Ea,Vt as Fa,le as Ga,Lt as Ha,N as Ia,M as Ja,De as Ka,ae as La,Ee as Ma,ue as Na,U as Oa,$ as Pa,Nt as Qa,At as Ra,oe as Sa,Tt as Ta,y as Ua,T as Va,ee as Wa,St as Xa,Ua as Ya,uw as Za,M1 as _a,Hd as $a,w1 as ab,Ft as bb,Uc as cb,de as db,ko as eb,Eo as fb,D1 as gb,S as hb,k as ib,Zo as jb,xW as kb,cm as lb,ks as mb,xe as nb,Sr as ob,Jo as pb,Un as qb,vD as rb,wq as sb,yD as tb,Dq as ub,i7 as vb,Es as wb,Xd as xb,Eq as yb,Oq as zb,E1 as Ab,Pq as Bb,Aq as Cb,Zd as Db,o7 as Eb,he as Fb,_be as Gb,DD as Hb,f7 as Ib,Zq as Jb,tY as Kb,T1 as Lb,o0 as Mb,To as Nb,te as Ob,r0 as Pb,O1 as Qb,Bn as Rb,GD as Sb,DY as Tb,SY as Ub,YD as Vb,Ga as Wb,sc as Xb,Ioe as Yb,nb as Zb,$f as _b,LNe as $b,bu as ac,Ooe as bc,Gf as cc,eb as dc,tb as ec,Toe as fc,No as gc,ro as hc,M_ as ic,CE as jc,bo as kc,m2 as lc,MX as mc,EX as nc,Xc as oc,xp as pc,ni as qc,vt as rc,HOe as sc,yo as tc,Wn as uc,Qs as vc,Mi as wc,so as xc,pI as yc,Ei as zc,xse as Ac,qt as Bc,En as Cc,Wi as Dc,Ln as Ec,xn as Fc,An as Gc,zn as Hc,d9 as Ic,L1 as Jc,c0 as Kc,Po as Lc,Te as Mc,E7 as Nc,mt as Oc,JT as Pc,Os as Qc,go as Rc,Xt as Sc,pS as Tc,Zm as Uc,di as Vc,yi as Wc,en as Xc,mn as Yc,tr as Zc,VS as _c,H1 as $c,Hi as ad,nQ as bd,zs as cd,oQ as dd,Si as ed,ui as fd,US as gd,$S as hd,Ao as id,uQ as jd,pQ as kd,Ir as ld,gQ as md,bQ as nd,vQ as od,Rs as pd,QS as qd,ve as rd,LE as sd,KDe as td,XDe as ud,AE as vd,ZDe as wd,JDe as xd,eSe as yd,tSe as zd,nSe as Ad,Cn as Bd,ao as Cd,W0 as Dd,q0 as Ed,Za as Fd,Bt as Gd,nf as Hd,ti as Id,ln as Jd,uo as Kd,qn as Ld,BZ as Md,mo as Nd,bf as Od,vf as Pd,ou as Qd,il as Rd,Lo as Sd,Wc as Td,Ps as Ud,Wf as Vd,QR as Wd,Yt as Xd,YT as Yd,nr as Zd,es as _d,Rr as $d,cO as ae,Af as be,O2 as ce,rc as de,KT as ee,XT as fe,_l as ge,ac as he,Nf as ie,J9 as je,aP as ke,cP as le,Vf as me,Co as ne,gP as oe,_P as pe,bP as qe,yP as re,CP as se,xP as te,kP as ue,EP as ve,IP as we,OP as xe,TP as ye,YA as ze,tVe as Ae,nVe as Be,tz as Ce,ZVe as De,qre as Ee,Jre as Fe,dz as Ge,dae as He,uae as Ie,hje as Je,gje as Ke,_je as Le,jje as Me,Hje as Ne,Uje as Oe,$je as Pe,wb as Qe,Mz as Re,Dz as Se,OHe as Te,qae as Ue,Oz as Ve,Pz as We,ase as Xe,vUe as Ye,use as Ze,oh as _e,Bz as $e,jz as af,Ob as bf,Jse as cf,tce as df,nce as ef,$z as ff,Gz as gf,ph as hf,fh as if,hh as jf,PGe as kf,gh as lf,_h as mf,LGe as nf,bh as of,vh as pf,AGe as qf,yh as rf,Ch as sf,zGe as tf,xh as uf,RGe as vf,Jz as wf,Eu as xf,Ice as yf,Tce as zf,Pce as Af,mWe as Bf,Rce as Cf,Nce as Df,pWe as Ef,DWe as Ff,gR as Gf,_R as Hf,rqe as If,aqe as Jf,sqe as Kf,cqe as Lf,yR as Mf,lqe as Nf,dqe as Of,CR as Pf,xR as Qf,MR as Rf,Qb as Sf,Sh as Tf,DR as Uf,eS as Vf,tS as Wf,nS as Xf,ca as Yf,oS as Zf,Ts as _f,cS as $f,Km as ag,uS as bg,kh as cg,SR as dg,Eh as eg,Ih as fg,kR as gg,OR as hg,TR as ig,PR as jg,LR as kg,AR as lg,zR as mg,RR as ng,$Ce as og,XS as pg,Ah as qg,Rh as rg,Nh as sg,Fh as tg,NR as ug,FR as vg,VR as wg,BR as xg,jR as yg,HR as zg,UR as Ag,$R as Bg,GR as Cg,WR as Dg,Hh as Eg,qR as Fg,YR as Gg,KR as Hg,XR as Ig,JR as Jg,Vet as Kg}; + `;this.core.outer.addClass("lg-has-thumb"),this.settings.appendThumbnailsTo===".lg-components"?this.core.$lgComponents.append(e):this.core.outer.append(e),this.$thumbOuter=this.core.outer.find(".lg-thumb-outer").first(),this.$lgThumb=this.core.outer.find(".lg-thumb").first(),this.settings.animateThumb&&this.core.outer.find(".lg-thumb").css("transition-duration",this.core.settings.speed+"ms").css("width",this.thumbTotalWidth+"px").css("position","relative"),this.setThumbItemHtml(this.core.galleryItems)},t.prototype.enableThumbDrag=function(){var i=this,e={cords:{startX:0,endX:0},isMoved:!1,newTranslateX:0,startTime:new Date,endTime:new Date,touchMoveTime:0},n=!1;this.$thumbOuter.addClass("lg-grab"),this.core.outer.find(".lg-thumb").first().on("mousedown.lg.thumb",function(o){i.thumbTotalWidth>i.thumbOuterWidth&&(o.preventDefault(),e.cords.startX=o.pageX,e.startTime=new Date,i.thumbClickable=!1,n=!0,i.core.outer.get().scrollLeft+=1,i.core.outer.get().scrollLeft-=1,i.$thumbOuter.removeClass("lg-grab").addClass("lg-grabbing"))}),this.$LG(window).on("mousemove.lg.thumb.global"+this.core.lgId,function(o){i.core.lgOpened&&n&&(e.cords.endX=o.pageX,e=i.onThumbTouchMove(e))}),this.$LG(window).on("mouseup.lg.thumb.global"+this.core.lgId,function(){i.core.lgOpened&&(e.isMoved?e=i.onThumbTouchEnd(e):i.thumbClickable=!0,n&&(n=!1,i.$thumbOuter.removeClass("lg-grabbing").addClass("lg-grab")))})},t.prototype.enableThumbSwipe=function(){var i=this,e={cords:{startX:0,endX:0},isMoved:!1,newTranslateX:0,startTime:new Date,endTime:new Date,touchMoveTime:0};this.$lgThumb.on("touchstart.lg",function(n){i.thumbTotalWidth>i.thumbOuterWidth&&(n.preventDefault(),e.cords.startX=n.targetTouches[0].pageX,i.thumbClickable=!1,e.startTime=new Date)}),this.$lgThumb.on("touchmove.lg",function(n){i.thumbTotalWidth>i.thumbOuterWidth&&(n.preventDefault(),e.cords.endX=n.targetTouches[0].pageX,e=i.onThumbTouchMove(e))}),this.$lgThumb.on("touchend.lg",function(){e.isMoved?e=i.onThumbTouchEnd(e):i.thumbClickable=!0})},t.prototype.rebuildThumbnails=function(){var i=this;this.$thumbOuter.addClass("lg-rebuilding-thumbnails"),setTimeout(function(){i.thumbTotalWidth=i.core.galleryItems.length*(i.settings.thumbWidth+i.settings.thumbMargin),i.$lgThumb.css("width",i.thumbTotalWidth+"px"),i.$lgThumb.empty(),i.setThumbItemHtml(i.core.galleryItems),i.animateThumb(i.core.index)},50),setTimeout(function(){i.$thumbOuter.removeClass("lg-rebuilding-thumbnails")},200)},t.prototype.setTranslate=function(i){this.$lgThumb.css("transform","translate3d(-"+i+"px, 0px, 0px)")},t.prototype.getPossibleTransformX=function(i){return i>this.thumbTotalWidth-this.thumbOuterWidth&&(i=this.thumbTotalWidth-this.thumbOuterWidth),i<0&&(i=0),i},t.prototype.animateThumb=function(i){if(this.$lgThumb.css("transition-duration",this.core.settings.speed+"ms"),this.settings.animateThumb){var e=0;switch(this.settings.currentPagerPosition){case"left":e=0;break;case"middle":e=this.thumbOuterWidth/2-this.settings.thumbWidth/2;break;case"right":e=this.thumbOuterWidth-this.settings.thumbWidth}this.translateX=(this.settings.thumbWidth+this.settings.thumbMargin)*i-1-e,this.translateX>this.thumbTotalWidth-this.thumbOuterWidth&&(this.translateX=this.thumbTotalWidth-this.thumbOuterWidth),this.translateX<0&&(this.translateX=0),this.setTranslate(this.translateX)}},t.prototype.onThumbTouchMove=function(i){return i.newTranslateX=this.translateX,i.isMoved=!0,i.touchMoveTime=new Date().valueOf(),i.newTranslateX-=i.cords.endX-i.cords.startX,i.newTranslateX=this.getPossibleTransformX(i.newTranslateX),this.setTranslate(i.newTranslateX),this.$thumbOuter.addClass("lg-dragging"),i},t.prototype.onThumbTouchEnd=function(i){i.isMoved=!1,i.endTime=new Date,this.$thumbOuter.removeClass("lg-dragging");var e=i.endTime.valueOf()-i.startTime.valueOf(),n=i.cords.endX-i.cords.startX,o=Math.abs(n)/e;return o>.15&&i.endTime.valueOf()-i.touchMoveTime<30?(o+=1,o>2&&(o+=1),o=o+o*(Math.abs(n)/this.thumbOuterWidth),this.$lgThumb.css("transition-duration",Math.min(o-1,2)+"settings"),n=n*o,this.translateX=this.getPossibleTransformX(this.translateX-n),this.setTranslate(this.translateX)):this.translateX=i.newTranslateX,Math.abs(i.cords.endX-i.cords.startX)'),this.core.outer.find(".lg-toggle-thumb").first().on("click.lg",function(){i.core.outer.toggleClass("lg-components-open")}))},t.prototype.thumbKeyPress=function(){var i=this;this.$LG(window).on("keydown.lg.thumb.global"+this.core.lgId,function(e){!i.core.lgOpened||!i.settings.toggleThumb||(e.keyCode===38?(e.preventDefault(),i.core.outer.addClass("lg-components-open")):e.keyCode===40&&(e.preventDefault(),i.core.outer.removeClass("lg-components-open")))})},t.prototype.destroy=function(){this.settings.thumbnail&&(this.$LG(window).off(".lg.thumb.global"+this.core.lgId),this.core.LGel.off(".lg.thumb"),this.core.LGel.off(".thumb"),this.$thumbOuter.remove(),this.core.outer.removeClass("lg-has-thumb"))},t})(),PR=Ole;var Ph=function(){return Ph=Object.assign||function(i){for(var e,n=1,o=arguments.length;n':"";this.settings.actualSize&&(i+=''),this.core.outer.addClass("lg-use-transition-for-zoom"),this.core.$toolbar.first().append(i)},t.prototype.enableZoom=function(i){var e=this,n=this.settings.enableZoomAfter+i.detail.delay;this.$LG("body").first().hasClass("lg-from-hash")&&i.detail.delay?n=0:this.$LG("body").first().removeClass("lg-from-hash"),this.zoomableTimeout=setTimeout(function(){e.isImageSlide(e.core.index)&&(e.core.getSlideItem(i.detail.index).addClass("lg-zoomable"),i.detail.index===e.core.index&&e.setZoomEssentials())},n+30)},t.prototype.enableZoomOnSlideItemLoad=function(){this.core.LGel.on(as.slideItemLoad+".zoom",this.enableZoom.bind(this))},t.prototype.getDragCords=function(i){return{x:i.pageX,y:i.pageY}},t.prototype.getSwipeCords=function(i){var e=i.touches[0].pageX,n=i.touches[0].pageY;return{x:e,y:n}},t.prototype.getDragAllowedAxises=function(i,e){if(!this.containerRect)return{allowX:!1,allowY:!1};var n=this.core.getSlideItem(this.core.index).find(".lg-image").first().get(),o=0,r=0,a=n.getBoundingClientRect();i?(o=n.offsetHeight*i,r=n.offsetWidth*i):e?(o=a.height+e*a.height,r=a.width+e*a.width):(o=a.height,r=a.width);var s=o>this.containerRect.height,c=r>this.containerRect.width;return{allowX:c,allowY:s}},t.prototype.setZoomEssentials=function(){this.containerRect=this.core.$content.get().getBoundingClientRect()},t.prototype.zoomImage=function(i,e,n,o){if(!(!this.containerRect||Math.abs(e)<=0)){var r=this.containerRect.width/2+this.containerRect.left,a=this.containerRect.height/2+this.containerRect.top+this.scrollTop,s,c;i===1&&(this.positionChanged=!1);var m=this.getDragAllowedAxises(0,e),f=m.allowY,v=m.allowX;this.positionChanged&&(s=this.left/(this.scale-e),c=this.top/(this.scale-e),this.pageX=r-s,this.pageY=a-c,this.positionChanged=!1);var x=this.getPossibleSwipeDragCords(e),w,O,K=r-this.pageX,Y=a-this.pageY;if(i-e>1){var Z=(i-e)/Math.abs(e);K=(e<0?-K:K)+this.left*(Z+(e<0?-1:1)),Y=(e<0?-Y:Y)+this.top*(Z+(e<0?-1:1)),w=K/Z,O=Y/Z}else{var Z=(i-e)*e;w=K*Z,O=Y*Z}n&&(v?this.isBeyondPossibleLeft(w,x.minX)?w=x.minX:this.isBeyondPossibleRight(w,x.maxX)&&(w=x.maxX):i>1&&(wx.maxX&&(w=x.maxX)),f?this.isBeyondPossibleTop(O,x.minY)?O=x.minY:this.isBeyondPossibleBottom(O,x.maxY)&&(O=x.maxY):i>1&&(Ox.maxY&&(O=x.maxY))),this.setZoomStyles({x:w,y:O,scale:i}),this.left=w,this.top=O,o&&this.setZoomImageSize()}},t.prototype.resetImageTranslate=function(i){if(this.isImageSlide(i)){var e=this.core.getSlideItem(i).find(".lg-image").first();this.imageReset=!1,e.removeClass("reset-transition reset-transition-y reset-transition-x"),this.core.outer.removeClass("lg-actual-size"),e.css("width","auto").css("height","auto"),setTimeout(function(){e.removeClass("no-transition")},10)}},t.prototype.setZoomImageSize=function(){var i=this,e=this.core.getSlideItem(this.core.index).find(".lg-image").first();setTimeout(function(){var n=i.getCurrentImageActualSizeScale();i.scale>=n&&(e.addClass("no-transition"),i.imageReset=!0)},Zb),setTimeout(function(){var n=i.getCurrentImageActualSizeScale();if(i.scale>=n){var o=i.getDragAllowedAxises(i.scale);e.css("width",e.get().naturalWidth+"px").css("height",e.get().naturalHeight+"px"),i.core.outer.addClass("lg-actual-size"),o.allowX&&o.allowY?e.addClass("reset-transition"):o.allowX&&!o.allowY?e.addClass("reset-transition-x"):!o.allowX&&o.allowY&&e.addClass("reset-transition-y")}},Zb+50)},t.prototype.setZoomStyles=function(i){var e=this.core.getSlideItem(this.core.index).find(".lg-img-wrap").first(),n=this.core.getSlideItem(this.core.index).find(".lg-image").first(),o=this.core.outer.find(".lg-current .lg-dummy-img").first();this.scale=i.scale,n.css("transform","scale3d("+i.scale+", "+i.scale+", 1)"),o.css("transform","scale3d("+i.scale+", "+i.scale+", 1)");var r="translate3d("+i.x+"px, "+i.y+"px, 0)";e.css("transform",r)},t.prototype.setActualSize=function(i,e){var n=this;if(!this.zoomInProgress){this.zoomInProgress=!0;var o=this.core.galleryItems[this.core.index];this.resetImageTranslate(i),setTimeout(function(){if(!(!o.src||n.core.outer.hasClass("lg-first-slide-loading"))){var r=n.getCurrentImageActualSizeScale(),a=n.scale;n.core.outer.hasClass("lg-zoomed")?n.scale=1:n.scale=n.getScale(r),n.setPageCords(e),n.beginZoom(n.scale),n.zoomImage(n.scale,n.scale-a,!0,!0)}},50),setTimeout(function(){n.core.outer.removeClass("lg-grabbing").addClass("lg-grab")},60),setTimeout(function(){n.zoomInProgress=!1},Zb+110)}},t.prototype.getNaturalWidth=function(i){var e=this.core.getSlideItem(i).find(".lg-image").first(),n=this.core.galleryItems[i].width;return n?parseFloat(n):e.get().naturalWidth},t.prototype.getActualSizeScale=function(i,e){var n,o;return i>=e?(n=i/e,o=n||2):o=1,o},t.prototype.getCurrentImageActualSizeScale=function(){var i=this.core.getSlideItem(this.core.index).find(".lg-image").first(),e=i.get().offsetWidth,n=this.getNaturalWidth(this.core.index)||e;return this.getActualSizeScale(n,e)},t.prototype.getPageCords=function(i){var e={};if(i)e.x=i.pageX||i.touches[0].pageX,e.y=i.pageY||i.touches[0].pageY;else{var n=this.core.$content.get().getBoundingClientRect();e.x=n.width/2+n.left,e.y=n.height/2+this.scrollTop+n.top}return e},t.prototype.setPageCords=function(i){var e=this.getPageCords(i);this.pageX=e.x,this.pageY=e.y},t.prototype.manageActualPixelClassNames=function(){var i=this.core.getElementById("lg-actual-size");i.removeClass(this.settings.actualSizeIcons.zoomIn).addClass(this.settings.actualSizeIcons.zoomOut)},t.prototype.beginZoom=function(i){return this.core.outer.removeClass("lg-zoom-drag-transition lg-zoom-dragging"),i>1?(this.core.outer.addClass("lg-zoomed"),this.manageActualPixelClassNames()):this.resetZoom(),i>1},t.prototype.getScale=function(i){var e=this.getCurrentImageActualSizeScale();return i<1?i=1:i>e&&(i=e),i},t.prototype.init=function(){var i=this;if(this.settings.zoom){this.buildTemplates(),this.enableZoomOnSlideItemLoad();var e=null;this.core.outer.on("dblclick.lg",function(n){i.$LG(n.target).hasClass("lg-image")&&i.setActualSize(i.core.index,n)}),this.core.outer.on("touchstart.lg",function(n){var o=i.$LG(n.target);n.touches.length===1&&o.hasClass("lg-image")&&(e?(clearTimeout(e),e=null,n.preventDefault(),i.setActualSize(i.core.index,n)):e=setTimeout(function(){e=null},300))}),this.core.LGel.on(as.containerResize+".zoom "+as.rotateRight+".zoom "+as.rotateLeft+".zoom "+as.flipHorizontal+".zoom "+as.flipVertical+".zoom",function(){if(!(!i.core.lgOpened||!i.isImageSlide(i.core.index)||i.core.touchAction)){var n=i.core.getSlideItem(i.core.index).find(".lg-img-wrap").first();i.top=0,i.left=0,i.setZoomEssentials(),i.setZoomSwipeStyles(n,{x:0,y:0}),i.positionChanged=!0}}),this.$LG(window).on("scroll.lg.zoom.global"+this.core.lgId,function(){i.core.lgOpened&&(i.scrollTop=i.$LG(window).scrollTop())}),this.core.getElementById("lg-zoom-out").on("click.lg",function(){if(i.isImageSlide(i.core.index)){var n=0;i.imageReset&&(i.resetImageTranslate(i.core.index),n=50),setTimeout(function(){var o=i.scale-i.settings.scale;o<1&&(o=1),i.beginZoom(o),i.zoomImage(o,-i.settings.scale,!0,!i.settings.infiniteZoom)},n)}}),this.core.getElementById("lg-zoom-in").on("click.lg",function(){i.zoomIn()}),this.core.getElementById("lg-actual-size").on("click.lg",function(){i.setActualSize(i.core.index)}),this.core.LGel.on(as.beforeOpen+".zoom",function(){i.core.outer.find(".lg-item").removeClass("lg-zoomable")}),this.core.LGel.on(as.afterOpen+".zoom",function(){i.scrollTop=i.$LG(window).scrollTop(),i.pageX=i.core.outer.width()/2,i.pageY=i.core.outer.height()/2+i.scrollTop,i.scale=1}),this.core.LGel.on(as.afterSlide+".zoom",function(n){var o=n.detail.prevIndex;i.scale=1,i.positionChanged=!1,i.zoomInProgress=!1,i.resetZoom(o),i.resetImageTranslate(o),i.isImageSlide(i.core.index)&&i.setZoomEssentials()}),this.zoomDrag(),this.pinchZoom(),this.zoomSwipe(),this.zoomableTimeout=!1,this.positionChanged=!1,this.zoomInProgress=!1}},t.prototype.zoomIn=function(){if(this.isImageSlide(this.core.index)){var i=this.scale+this.settings.scale;this.settings.infiniteZoom||(i=this.getScale(i)),this.beginZoom(i),this.zoomImage(i,Math.min(this.settings.scale,i-this.scale),!0,!this.settings.infiniteZoom)}},t.prototype.resetZoom=function(i){this.core.outer.removeClass("lg-zoomed lg-zoom-drag-transition");var e=this.core.getElementById("lg-actual-size"),n=this.core.getSlideItem(i!==void 0?i:this.core.index);e.removeClass(this.settings.actualSizeIcons.zoomOut).addClass(this.settings.actualSizeIcons.zoomIn),n.find(".lg-img-wrap").first().removeAttr("style"),n.find(".lg-image").first().removeAttr("style"),this.scale=1,this.left=0,this.top=0,this.setPageCords()},t.prototype.getTouchDistance=function(i){return Math.sqrt((i.touches[0].pageX-i.touches[1].pageX)*(i.touches[0].pageX-i.touches[1].pageX)+(i.touches[0].pageY-i.touches[1].pageY)*(i.touches[0].pageY-i.touches[1].pageY))},t.prototype.pinchZoom=function(){var i=this,e=0,n=!1,o=1,r=0,a=this.core.getSlideItem(this.core.index);this.core.outer.on("touchstart.lg",function(s){if(a=i.core.getSlideItem(i.core.index),!!i.isImageSlide(i.core.index)&&s.touches.length===2){if(s.preventDefault(),i.core.outer.hasClass("lg-first-slide-loading"))return;o=i.scale||1,i.core.outer.removeClass("lg-zoom-drag-transition lg-zoom-dragging"),i.setPageCords(s),i.resetImageTranslate(i.core.index),i.core.touchAction="pinch",e=i.getTouchDistance(s)}}),this.core.$inner.on("touchmove.lg",function(s){if(s.touches.length===2&&i.core.touchAction==="pinch"&&(i.$LG(s.target).hasClass("lg-item")||a.get().contains(s.target))){s.preventDefault();var c=i.getTouchDistance(s),m=e-c;if(!n&&Math.abs(m)>5&&(n=!0),n){r=i.scale;var f=Math.max(1,o+-m*.02);i.scale=Math.round((f+Number.EPSILON)*100)/100;var v=i.scale-r;i.zoomImage(i.scale,Math.round((v+Number.EPSILON)*100)/100,!1,!1)}}}),this.core.$inner.on("touchend.lg",function(s){if(i.core.touchAction==="pinch"&&(i.$LG(s.target).hasClass("lg-item")||a.get().contains(s.target))){if(n=!1,e=0,i.scale<=1)i.resetZoom();else{var c=i.getCurrentImageActualSizeScale();if(i.scale>=c){var m=c-i.scale;m===0&&(m=.01),i.zoomImage(c,m,!1,!0)}i.manageActualPixelClassNames(),i.core.outer.addClass("lg-zoomed")}i.core.touchAction=void 0}})},t.prototype.touchendZoom=function(i,e,n,o,r){var a=e.x-i.x,s=e.y-i.y,c=Math.abs(a)/r+1,m=Math.abs(s)/r+1;c>2&&(c+=1),m>2&&(m+=1),a=a*c,s=s*m;var f=this.core.getSlideItem(this.core.index).find(".lg-img-wrap").first(),v={};v.x=this.left+a,v.y=this.top+s;var x=this.getPossibleSwipeDragCords();(Math.abs(a)>15||Math.abs(s)>15)&&(o&&(this.isBeyondPossibleTop(v.y,x.minY)?v.y=x.minY:this.isBeyondPossibleBottom(v.y,x.maxY)&&(v.y=x.maxY)),n&&(this.isBeyondPossibleLeft(v.x,x.minX)?v.x=x.minX:this.isBeyondPossibleRight(v.x,x.maxX)&&(v.x=x.maxX)),o?this.top=v.y:v.y=this.top,n?this.left=v.x:v.x=this.left,this.setZoomSwipeStyles(f,v),this.positionChanged=!0)},t.prototype.getZoomSwipeCords=function(i,e,n,o,r){var a={};if(o){if(a.y=this.top+(e.y-i.y),this.isBeyondPossibleTop(a.y,r.minY)){var s=r.minY-a.y;a.y=r.minY-s/6}else if(this.isBeyondPossibleBottom(a.y,r.maxY)){var c=a.y-r.maxY;a.y=r.maxY+c/6}}else a.y=this.top;if(n){if(a.x=this.left+(e.x-i.x),this.isBeyondPossibleLeft(a.x,r.minX)){var m=r.minX-a.x;a.x=r.minX-m/6}else if(this.isBeyondPossibleRight(a.x,r.maxX)){var f=a.x-r.maxX;a.x=r.maxX+f/6}}else a.x=this.left;return a},t.prototype.isBeyondPossibleLeft=function(i,e){return i>=e},t.prototype.isBeyondPossibleRight=function(i,e){return i<=e},t.prototype.isBeyondPossibleTop=function(i,e){return i>=e},t.prototype.isBeyondPossibleBottom=function(i,e){return i<=e},t.prototype.isImageSlide=function(i){var e=this.core.galleryItems[i];return this.core.getSlideType(e)==="image"},t.prototype.getPossibleSwipeDragCords=function(i){var e=this.core.getSlideItem(this.core.index).find(".lg-image").first(),n=this.core.mediaContainerPosition.bottom,o=e.get().getBoundingClientRect(),r=o.height,a=o.width;i&&(r=r+i*r,a=a+i*a);var s=(r-this.containerRect.height)/2,c=(this.containerRect.height-r)/2+n,m=(a-this.containerRect.width)/2,f=(this.containerRect.width-a)/2,v={minY:s,maxY:c,minX:m,maxX:f};return v},t.prototype.setZoomSwipeStyles=function(i,e){i.css("transform","translate3d("+e.x+"px, "+e.y+"px, 0)")},t.prototype.zoomSwipe=function(){var i=this,e={},n={},o=!1,r=!1,a=!1,s=new Date,c=new Date,m,f,v=this.core.getSlideItem(this.core.index);this.core.$inner.on("touchstart.lg",function(x){if(i.isImageSlide(i.core.index)&&(v=i.core.getSlideItem(i.core.index),(i.$LG(x.target).hasClass("lg-item")||v.get().contains(x.target))&&x.touches.length===1&&i.core.outer.hasClass("lg-zoomed"))){x.preventDefault(),s=new Date,i.core.touchAction="zoomSwipe",f=i.core.getSlideItem(i.core.index).find(".lg-img-wrap").first();var w=i.getDragAllowedAxises(0);a=w.allowY,r=w.allowX,(r||a)&&(e=i.getSwipeCords(x)),m=i.getPossibleSwipeDragCords(),i.core.outer.addClass("lg-zoom-dragging lg-zoom-drag-transition")}}),this.core.$inner.on("touchmove.lg",function(x){if(x.touches.length===1&&i.core.touchAction==="zoomSwipe"&&(i.$LG(x.target).hasClass("lg-item")||v.get().contains(x.target))){x.preventDefault(),i.core.touchAction="zoomSwipe",n=i.getSwipeCords(x);var w=i.getZoomSwipeCords(e,n,r,a,m);(Math.abs(n.x-e.x)>15||Math.abs(n.y-e.y)>15)&&(o=!0,i.setZoomSwipeStyles(f,w))}}),this.core.$inner.on("touchend.lg",function(x){if(i.core.touchAction==="zoomSwipe"&&(i.$LG(x.target).hasClass("lg-item")||v.get().contains(x.target))){if(x.preventDefault(),i.core.touchAction=void 0,i.core.outer.removeClass("lg-zoom-dragging"),!o)return;o=!1,c=new Date;var w=c.valueOf()-s.valueOf();i.touchendZoom(e,n,r,a,w)}})},t.prototype.zoomDrag=function(){var i=this,e={},n={},o=!1,r=!1,a=!1,s=!1,c,m,f,v;this.core.outer.on("mousedown.lg.zoom",function(x){if(i.isImageSlide(i.core.index)){var w=i.core.getSlideItem(i.core.index);if(i.$LG(x.target).hasClass("lg-item")||w.get().contains(x.target)){c=new Date,v=i.core.getSlideItem(i.core.index).find(".lg-img-wrap").first();var O=i.getDragAllowedAxises(0);s=O.allowY,a=O.allowX,i.core.outer.hasClass("lg-zoomed")&&i.$LG(x.target).hasClass("lg-object")&&(a||s)&&(x.preventDefault(),e=i.getDragCords(x),f=i.getPossibleSwipeDragCords(),o=!0,i.core.outer.removeClass("lg-grab").addClass("lg-grabbing lg-zoom-drag-transition lg-zoom-dragging"))}}}),this.$LG(window).on("mousemove.lg.zoom.global"+this.core.lgId,function(x){if(o){r=!0,n=i.getDragCords(x);var w=i.getZoomSwipeCords(e,n,a,s,f);i.setZoomSwipeStyles(v,w)}}),this.$LG(window).on("mouseup.lg.zoom.global"+this.core.lgId,function(x){if(o){if(m=new Date,o=!1,i.core.outer.removeClass("lg-zoom-dragging"),r&&(e.x!==n.x||e.y!==n.y)){n=i.getDragCords(x);var w=m.valueOf()-c.valueOf();i.touchendZoom(e,n,a,s,w)}r=!1}i.core.outer.removeClass("lg-grabbing").addClass("lg-grab")})},t.prototype.closeGallery=function(){this.resetZoom(),this.zoomInProgress=!1},t.prototype.destroy=function(){this.$LG(window).off(".lg.zoom.global"+this.core.lgId),this.core.LGel.off(".lg.zoom"),this.core.LGel.off(".zoom"),clearTimeout(this.zoomableTimeout),this.zoomableTimeout=!1},t})(),LR=Ple;function Lle(t,i){t&1&&(y(0),S(1,"translate")),t&2&&ee(" ",k(1,1,"labels.heading.Add Client Identifier")," ")}function Ale(t,i){if(t&1&&(y(0),S(1,"translate"),S(2,"translate")),t&2){let e=M();Ua(" ",k(1,3,"labels.heading.Upload")," ",e.entityType," ",k(2,5,"labels.heading.Documents")," ")}}function zle(t,i){if(t&1&&(h(0,"mat-option",10),y(1),_()),t&2){let e=i.$implicit;D("value",e.id),p(),ee(" ",e.name," ")}}function Rle(t,i){t&1&&(h(0,"mat-error"),y(1),S(2,"translate"),S(3,"translate"),h(4,"strong"),y(5),S(6,"translate"),_()()),t&2&&(p(),St(" ",k(2,3,"labels.inputs.Document Type")," ",k(3,5,"labels.commons.is")," "),p(4),T(k(6,7,"labels.commons.required")))}function Nle(t,i){if(t&1&&(h(0,"mat-option",10),y(1),_()),t&2){let e=i.$implicit;D("value",e.value),p(),ee(" ",e.label," ")}}function Fle(t,i){t&1&&(h(0,"mat-error"),y(1),S(2,"translate"),S(3,"translate"),h(4,"strong"),y(5),S(6,"translate"),_()()),t&2&&(p(),St(" ",k(2,3,"labels.inputs.Status")," ",k(3,5,"labels.commons.is")," "),p(4),T(k(6,7,"labels.commons.required")))}function Vle(t,i){t&1&&(h(0,"mat-error"),y(1),S(2,"translate"),S(3,"translate"),h(4,"strong"),y(5),S(6,"translate"),_()()),t&2&&(p(),St(" ",k(2,3,"labels.inputs.Document Key")," ",k(3,5,"labels.commons.is")," "),p(4),T(k(6,7,"labels.commons.required")))}function Ble(t,i){if(t&1&&(h(0,"mat-form-field",3)(1,"mat-label"),y(2),S(3,"translate"),_(),h(4,"mat-select",9),Xe(5,zle,2,2,"mat-option",10,ht),_(),E(7,Rle,7,9,"mat-error"),_(),h(8,"mat-form-field",3)(9,"mat-label"),y(10),S(11,"translate"),_(),h(12,"mat-select",11),Xe(13,Nle,2,2,"mat-option",10,ht),_(),E(15,Fle,7,9,"mat-error"),_(),h(16,"mat-form-field",3)(17,"mat-label"),y(18),S(19,"translate"),_(),F(20,"input",12),E(21,Vle,7,9,"mat-error"),_(),h(22,"mat-form-field",3)(23,"mat-label"),y(24),S(25,"translate"),_(),F(26,"input",13),_()),t&2){let e=M();p(2),T(k(3,7,"labels.inputs.Document Type")),p(3),Ze(e.allowedDocumentTypes),p(2),I(e.uploadDocumentForm.controls.documentTypeId!=null&&e.uploadDocumentForm.controls.documentTypeId.hasError("required")?7:-1),p(3),T(k(11,9,"labels.inputs.Status")),p(3),Ze(e.statusOptions),p(2),I(e.uploadDocumentForm.controls.status!=null&&e.uploadDocumentForm.controls.status.hasError("required")?15:-1),p(3),T(k(19,11,"labels.inputs.Document Key")),p(3),I(e.uploadDocumentForm.controls.documentKey!=null&&e.uploadDocumentForm.controls.documentKey.hasError("required")?21:-1),p(3),T(k(25,13,"labels.inputs.Description"))}}function jle(t,i){t&1&&(h(0,"mat-error"),y(1),S(2,"translate"),S(3,"translate"),h(4,"strong"),y(5),S(6,"translate"),_()()),t&2&&(p(),St(" ",k(2,3,"labels.inputs.File Name")," ",k(3,5,"labels.commons.is")," "),p(4),T(k(6,7,"labels.commons.required")))}function Hle(t,i){t&1&&(h(0,"mat-form-field",3)(1,"mat-label"),y(2),S(3,"translate"),_(),F(4,"input",13),_()),t&2&&(p(2),T(k(3,1,"labels.inputs.Description")))}function Ule(t,i){t&1&&(y(0),S(1,"translate")),t&2&&ee(" ",k(1,1,"labels.buttons.Add")," ")}function $le(t,i){t&1&&(y(0),S(1,"translate")),t&2&&ee(" ",k(1,1,"labels.buttons.Upload")," ")}var AR=(()=>{class t{constructor(){this.dialogRef=d(qt),this.formBuilder=d(Rs),this.data=d(En),this.uploadDocumentData=[],this.documentIdentifier=!1,this.allowedDocumentTypes=[],this.statusOptions=[];let e=this.data;this.documentIdentifier=e.documentIdentifier,this.entityType=e.entityType,this.allowedDocumentTypes=e.allowedDocumentTypes||[],this.statusOptions=e.statusOptions||[]}ngOnInit(){this.createUploadDocumentForm()}createUploadDocumentForm(){this.documentIdentifier?this.uploadDocumentForm=this.formBuilder.group({documentTypeId:["",en.required],status:["Active",en.required],documentKey:["",en.required],description:[""],fileName:["",en.required],file:[""]}):this.uploadDocumentForm=this.formBuilder.group({fileName:["",en.required],description:[""],file:[""]})}onFileSelect(e){if(e.target.files.length>0){let n=e.target.files[0];this.uploadDocumentForm.get("file").setValue(n)}}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275cmp=P({type:t,selectors:[["mifosx-upload-document-dialog"]],decls:21,vars:14,consts:[["mat-dialog-title",""],[1,"m-l-10","m-r-10"],[1,"layout-column",3,"formGroup"],[1,"flex-fill"],["formControlName","fileName","required","","matInput",""],["flex","60%",3,"change"],["align","end"],["mat-raised-button","","mat-dialog-close",""],["mat-raised-button","","color","primary",3,"disabled","mat-dialog-close"],["formControlName","documentTypeId","required",""],[3,"value"],["formControlName","status","required",""],["formControlName","documentKey","required","","matInput",""],["formControlName","description","matInput",""]],template:function(n,o){n&1&&(h(0,"h1",0),E(1,Lle,2,3)(2,Ale,3,7),_(),h(3,"div",1)(4,"form",2),E(5,Ble,27,15),h(6,"mat-form-field",3)(7,"mat-label"),y(8),S(9,"translate"),_(),F(10,"input",4),E(11,jle,7,9,"mat-error"),_(),E(12,Hle,5,3,"mat-form-field",3),h(13,"mifosx-file-upload",5),N("change",function(a){return o.onFileSelect(a)}),_(),h(14,"mat-dialog-actions",6)(15,"button",7),y(16),S(17,"translate"),_(),h(18,"button",8),E(19,Ule,2,3)(20,$le,2,3),_()()()()),n&2&&(p(),I(o.documentIdentifier?1:2),p(3),D("formGroup",o.uploadDocumentForm),p(),I(o.documentIdentifier?5:-1),p(3),T(k(9,10,"labels.inputs.File Name")),p(3),I(o.uploadDocumentForm.controls.fileName.hasError("required")?11:-1),p(),I(o.documentIdentifier?-1:12),p(4),T(k(17,12,"labels.buttons.Cancel")),p(2),D("disabled",!o.uploadDocumentForm.valid)("mat-dialog-close",o.uploadDocumentForm.value),p(),I(o.documentIdentifier?19:20))},dependencies:[he,ve,zs,yi,mn,tr,Ir,ui,Ao,Bt,Cn,ao,ti,qn,ln,vt,xn,Af,zn,Ln,Te],encapsulation:2})}}return t})();var zR=(()=>{class t{constructor(){this.previewCache=new Map}isPreviewable(e){let n=this.detectType(e.mimeType,e.fileName,e.fileData);return n==="image"||n==="pdf"}resolvePreviewUrl(e,n){return Hr(this,null,function*(){let o=this.previewCache.get(e.id);if(o)return{url:o.url,type:o.type};let r=this.getInlineData(e);if(r){let m=this.detectType(r.mimeType,e.fileName,e.fileData);return this.previewCache.set(e.id,{url:r.url,type:m,isObjectUrl:r.isObjectUrl}),{url:r.url,type:m}}let a=yield L6(n(e)),s=URL.createObjectURL(a),c=this.detectType(a.type||e.mimeType,e.fileName,e.fileData);return this.previewCache.set(e.id,{url:s,type:c,isObjectUrl:!0}),{url:s,type:c}})}release(e){let n=this.previewCache.get(e);n?.isObjectUrl&&URL.revokeObjectURL(n.url),this.previewCache.delete(e)}clear(){this.previewCache.forEach(e=>{e.isObjectUrl&&URL.revokeObjectURL(e.url)}),this.previewCache.clear()}getInlineData(e){if(!e.fileData)return null;let n=e.fileData.match(/^data:(.*?);/);return{url:e.fileData,mimeType:n?n[1]:e.mimeType,isObjectUrl:!1}}detectType(e,n,o){let r=(e||this.extractMimeFromData(o)||"").toLowerCase();if(r.includes("pdf"))return"pdf";if(r.startsWith("image/"))return"image";let a=(n||"").split(".").pop()?.toLowerCase();return a==="pdf"?"pdf":a&&["jpg","jpeg","png","gif","bmp","webp","svg"].includes(a)?"image":"other"}extractMimeFromData(e){if(!e||!e.startsWith("data:"))return;let n=e.match(/^data:(.*?);/);return n?n[1]:void 0}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275prov=R({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();var Gle=["lightboxRoot"];function Wle(t,i){if(t&1){let e=le();h(0,"div",7)(1,"button",8),N("click",function(){G(e);let o=M();return W(o.uploadDocument())}),F(2,"fa-icon",9),y(3),S(4,"translate"),_()()}t&2&&(p(3),ee("",k(4,1,"labels.buttons.Add")," "))}function qle(t,i){if(t&1&&F(0,"img",13),t&2){let e=M().$implicit,n=M(2);D("src",n.previewThumbnails[e.id],_1)("alt",e.name)("title",e.name)}}function Yle(t,i){if(t&1&&(h(0,"div",14),F(1,"fa-icon",22),h(2,"span"),y(3),_()()),t&2){let e=M().$implicit;p(3),T(e.fileName||e.name)}}function Qle(t,i){t&1&&(h(0,"div",15),F(1,"fa-icon",23),_())}function Kle(t,i){if(t&1&&(h(0,"div",18),y(1),_()),t&2){let e=M().$implicit;p(),T(e.fileName)}}function Xle(t,i){if(t&1&&(h(0,"div",19),y(1),_()),t&2){let e=M().$implicit;p(),T(e.description)}}function Zle(t,i){if(t&1){let e=le();h(0,"button",24),S(1,"translate"),N("click",function(){G(e);let o=M().$implicit,r=M(2);return W(r.deleteDocument(o.id,o.name))}),F(2,"fa-icon",25),_()}t&2&&ne("aria-label",k(1,1,"labels.buttons.Delete"))}function Jle(t,i){if(t&1){let e=le();h(0,"div",11)(1,"div",12),S(2,"translate"),N("keydown.enter",function(){let o=G(e).$implicit,r=M(2);return W(r.isPreviewable(o)&&r.openPreview(o))})("keydown.space",function(){let o=G(e).$implicit,r=M(2);return W(r.isPreviewable(o)&&r.openPreview(o))})("click",function(){let o=G(e).$implicit,r=M(2);return W(r.isPreviewable(o)&&r.openPreview(o))}),E(3,qle,1,3,"img",13)(4,Yle,4,1,"div",14),E(5,Qle,2,0,"div",15),_(),h(6,"div",16)(7,"div",17),y(8),_(),E(9,Kle,2,1,"div",18),E(10,Xle,2,1,"div",19),h(11,"div",20),ot(12,Zle,3,3,"button",21),_()()()}if(t&2){let e=i.$implicit,n=M(2);p(),oe("clickable",n.isPreviewable(e)),ne("aria-label",k(2,9,"labels.buttons.Preview")+": "+e.name),p(2),I(n.previewThumbnails[e.id]?3:4),p(2),I(n.isPreviewable(e)?5:-1),p(3),T(e.name),p(),I(e.fileName?9:-1),p(),I(e.description?10:-1),p(2),D("mifosxHasPermission","DELETE_DOCUMENT")}}function e1e(t,i){if(t&1&&(h(0,"div")(1,"div",10),Xe(2,Jle,13,11,"div",11,M5().trackByDocumentId,!0),_()()),t&2){let e=M();p(2),Ze(e.entityDocuments)}}function t1e(t,i){t&1&&(h(0,"div",5)(1,"p"),y(2),S(3,"translate"),_(),h(4,"p",26),y(5),S(6,"translate"),_()()),t&2&&(p(2),T(k(3,2,"labels.text.NoDocuments")),p(3),T(k(6,4,"labels.text.UploadDocumentHint")))}var RR=(()=>{class t{constructor(){this.dialog=d(Wi),this.savingsService=d(Ih),this.loansService=d(Eh),this.clientsService=d(kh),this.documentPreviewService=d(zR),this.previewThumbnails={},this.lightboxInstance=null,this.lightboxPlugins=[LR,PR,TR]}ngOnInit(){this.prefetchThumbnails()}ngOnDestroy(){this.destroyLightbox(),Array.isArray(this.entityDocuments)&&this.entityDocuments.forEach(e=>this.documentPreviewService.release(e.id))}trackByDocumentId(e,n){return n?.id}uploadDocument(){this.dialog.open(AR,{data:{documentIdentifier:!1,entityType:""},width:"33rem"}).afterClosed().subscribe(n=>{if(n){let o=new FormData;o.append("name",n.fileName),o.append("file",n.file),o.append("description",n.description),this.callbackUpload(o).subscribe(r=>{let a={id:r.resourceId,parentEntityType:this.entityType,parentEntityId:this.entityId,name:n.fileName,description:n.description,fileName:n.file.name};this.entityDocuments.push(a),this.setThumbnail(a)})}})}deleteDocument(e,n){this.dialog.open(Rr,{data:{deleteContext:`Document: ${n}`}}).afterClosed().subscribe(r=>{if(r.delete){this.callbackDelete(e);let a=this.entityDocuments.findIndex(s=>s.id===e);a!==-1&&this.entityDocuments.splice(a,1),this.documentPreviewService.release(e),delete this.previewThumbnails[e]}})}isPreviewable(e){return this.documentPreviewService.isPreviewable(e)}openPreview(e){return Hr(this,null,function*(){if(this.isPreviewable(e))try{let n=this.entityDocuments.filter(a=>this.isPreviewable(a)),o=[];for(let a of n)try{let s=yield this.documentPreviewService.resolvePreviewUrl(a,c=>this.getDownloadObservable(c.id));s.type==="image"&&(this.previewThumbnails[a.id]=s.url),o.push({src:s.url,thumb:s.type==="image"?s.url:void 0,subHtml:this.buildSubHtml(a),iframe:s.type==="pdf"})}catch(s){console.error("Preview failed for document",a.id,s)}if(!o.length)return;let r=Math.max(0,n.findIndex(a=>a.id===e.id));this.destroyLightbox(),this.lightboxInstance=OR(this.lightboxRoot.nativeElement,{dynamic:!0,dynamicEl:o,plugins:this.lightboxPlugins,download:!1,closable:!0,escKey:!0,zoomFromOrigin:!0}),this.lightboxInstance.openGallery(r)}catch(n){console.error("Unable to open preview",n)}})}destroyLightbox(){this.lightboxInstance&&(this.lightboxInstance.destroy(),this.lightboxInstance=null)}getDownloadObservable(e){return this.entityType==="savings"?this.savingsService.downloadSavingsDocument(this.entityId,e):this.entityType==="loans"?this.loansService.downloadLoanDocument(this.entityId,e):this.clientsService.downloadClientDocument(this.entityId,e)}buildSubHtml(e){let n=e.description?`

${this.escapeHtml(e.description)}

`:"",o=e.fileName?`

${this.escapeHtml(e.fileName)}

`:"";return`

${this.escapeHtml(e.name||"Document")}

${n}${o}
`}escapeHtml(e){return e?e.replace(/&/g,"&").replace(//g,">").replace(/"/g,"""):""}setThumbnail(e){this.documentPreviewService.isPreviewable(e)&&this.documentPreviewService.resolvePreviewUrl(e,()=>this.getDownloadObservable(e.id)).then(n=>{n.type==="image"&&(this.previewThumbnails[e.id]=n.url)}).catch(()=>{})}prefetchThumbnails(){Array.isArray(this.entityDocuments)&&this.entityDocuments.forEach(e=>this.setThumbnail(e))}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275cmp=P({type:t,selectors:[["mifosx-entity-documents-tab"]],viewQuery:function(n,o){if(n&1&&ue(Gle,7),n&2){let r;U(r=$())&&(o.lightboxRoot=r.first)}},inputs:{entityId:"entityId",entityType:"entityType",entityDocuments:"entityDocuments",callbackUpload:"callbackUpload",callbackDelete:"callbackDelete"},decls:10,vars:5,consts:[["lightboxRoot",""],[1,"tab-container","mat-typography"],[1,"layout-row","align-start-center","header-row"],[1,"flex-90"],["class","flex-10",4,"mifosxHasPermission"],[1,"empty-state"],[1,"document-lightbox-host"],[1,"flex-10"],["mat-raised-button","","color","primary",1,"f-right",3,"click"],["icon","plus",1,"m-r-10"],[1,"document-grid"],[1,"document-card"],["role","button","tabindex","0",1,"thumb",3,"keydown.enter","keydown.space","click"],["loading","lazy",3,"src","alt","title"],[1,"placeholder"],[1,"preview-overlay"],[1,"card-body"],[1,"title"],[1,"meta"],[1,"description"],[1,"actions"],["mat-icon-button","","color","warn","title","Delete",3,"click",4,"mifosxHasPermission"],["icon","file"],["icon","eye"],["mat-icon-button","","color","warn","title","Delete",3,"click"],["icon","times"],[1,"muted"]],template:function(n,o){n&1&&(h(0,"div",1)(1,"div",2)(2,"h3",3),y(3),S(4,"translate"),_(),ot(5,Wle,5,3,"div",4),_(),E(6,e1e,4,0,"div")(7,t1e,7,6,"div",5),_(),F(8,"div",6,0)),n&2&&(p(3),T(k(4,3,"labels.heading.Documents")),p(2),D("mifosxHasPermission","CREATE_DOCUMENT"),p(),I(o.entityDocuments!=null&&o.entityDocuments.length?6:7))},dependencies:[he,ve,vt,Ps,Yt,Te],styles:[".column-mandatory[_ngcontent-%COMP%]{color:#5cb85c;text-align:center}.not-column-mandatory[_ngcontent-%COMP%]{color:#666f73;text-align:center}.cdk-drag-placeholder[_ngcontent-%COMP%]{background:#3498db}.yes[_ngcontent-%COMP%]{color:#5cb85c!important;background-color:#5cb85c;height:4px;cursor:none}.no[_ngcontent-%COMP%]{color:red;background-color:red;height:4px;cursor:none}.strike[_ngcontent-%COMP%]{text-decoration:line-through;color:red}.transfer[_ngcontent-%COMP%]{color:#16a085}.linked[_ngcontent-%COMP%]{color:#4461e2}.accrual[_ngcontent-%COMP%]{color:#999}.fa-question[_ngcontent-%COMP%]{color:#4461e2}.enabled[_ngcontent-%COMP%]{color:#32cd32}.disabled[_ngcontent-%COMP%]{color:#f44366}.tab-container[_ngcontent-%COMP%]{padding:1rem;margin:1rem 0}.header-row[_ngcontent-%COMP%]{display:flex;align-items:center}.document-grid[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;gap:1rem;margin-top:.75rem}.document-card[_ngcontent-%COMP%]{width:240px;background:#fff;border:1px solid #bdc3c7;border-radius:4px;overflow:hidden;box-shadow:0 1px 4px #353b3b1f;display:flex;flex-direction:column;transition:transform .2s ease,box-shadow .2s ease}.document-card[_ngcontent-%COMP%]:hover{transform:translateY(-1px);box-shadow:0 4px 12px #353b3b24}.thumb[_ngcontent-%COMP%]{position:relative;background:#ecf0f1;min-height:9.5rem;display:flex;align-items:center;justify-content:center;cursor:default}.thumb.clickable[_ngcontent-%COMP%]{cursor:pointer}.thumb[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{width:100%;height:100%;object-fit:cover}.preview-overlay[_ngcontent-%COMP%]{position:absolute;bottom:.5rem;right:.5rem;background:#ffffffe6;border-radius:50%;padding:.4rem;color:#3498db;display:flex;align-items:center;justify-content:center;opacity:0;transition:opacity .2s ease}.thumb[_ngcontent-%COMP%]:hover .preview-overlay[_ngcontent-%COMP%], .thumb[_ngcontent-%COMP%]:focus .preview-overlay[_ngcontent-%COMP%]{opacity:1}.placeholder[_ngcontent-%COMP%]{color:#f5f5f5;text-align:center;padding:.875rem;display:flex;flex-direction:column;gap:8px;align-items:center;justify-content:center}.placeholder[_ngcontent-%COMP%] fa-icon[_ngcontent-%COMP%]{font-size:22px}.placeholder[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{font-size:12px;line-height:1.2}.preview-btn[_ngcontent-%COMP%]{position:absolute;right:.5rem;bottom:.5rem;background:#000000a6;color:#fff}.card-body[_ngcontent-%COMP%]{padding:.75rem .875rem .875rem;display:flex;flex-direction:column;gap:.375rem}.title[_ngcontent-%COMP%]{font-weight:700;color:#353b3b}.meta[_ngcontent-%COMP%]{font-size:12px;color:#7f8c8d}.description[_ngcontent-%COMP%]{font-size:13px;color:#353b3b;min-height:32px}.actions[_ngcontent-%COMP%]{display:flex;justify-content:flex-end;gap:.375rem;margin-top:.25rem}.empty-state[_ngcontent-%COMP%]{margin-top:.75rem;padding:1.25rem;text-align:center;background:#f5f5f5;border:1px dashed #bdc3c7;border-radius:4px;color:#353b3b;display:flex;flex-direction:column;gap:.5rem;align-items:center}.empty-state[_ngcontent-%COMP%] .muted[_ngcontent-%COMP%]{color:#95a5a6;margin:.25rem 0 0;font-size:.8125rem}.document-lightbox-host[_ngcontent-%COMP%]{display:none}"]})}}return t})();var Lh=class extends nr{constructor(i){super(i),this.controlType="checkbox"}};var Ah=class extends nr{constructor(i={}){super(i),this.controlType="datepicker",this.minDate=i.minDate||new Date(2e3,0,1),this.maxDate=i.maxDate||new Date}};var zh=class extends nr{constructor(i={}){super(i),this.controlType="datetimepicker",this.minDate=i.minDate||new Date(2e3,0,1),this.maxDate=i.maxDate||new Date}};var Rh=class extends nr{constructor(i={}){super(i),this.controlType="input",this.type=i.type||"text"}};var Nh=class extends nr{constructor(i={}){super(i),this.controlType="select",this.options=i.options||{label:"",value:"",data:[]}}};var Fh=(()=>{class t{constructor(){this.dateUtils=d(go),this.settingsService=d(Xt),this.systemFields=["id","created_at","updated_at"],this.entitiesIdFields=["client_id","savings_account_id","savings_transaction_id","loan_id","group_id","center_id","office_id","product_loan_id","savings_product_id","share_product_id"]}getFormfields(e,n,o){return e.map(r=>{let a=this.toDisplayLabel(r.columnName);switch(r.columnDisplayType){case"INTEGER":case"STRING":case"DECIMAL":case"TEXT":return new Rh({controlName:r.columnName,label:a,value:"",type:r.columnDisplayType==="INTEGER"||r.columnDisplayType==="DECIMAL"?"number":"text",required:!r.isColumnNullable});case"BOOLEAN":return new Lh({controlName:r.columnName,label:a,value:"",type:"checkbox",required:!r.isColumnNullable});case"CODELOOKUP":return new Nh({controlName:r.columnName,label:a,value:"",options:{label:"value",value:"id",data:r.columnValues},required:!r.isColumnNullable});case"DATE":return n.push(r.columnName),o.dateFormat||(o.dateFormat=go.DEFAULT_DATEFORMAT),new Ah({controlName:r.columnName,label:a,value:"",maxDate:this.settingsService.maxAllowedDate,required:!r.isColumnNullable});case"DATETIME":return n.push(r.columnName),o.dateFormat=go.DEFAULT_DATETIMEFORMAT,new zh({controlName:r.columnName,label:a,value:"",maxDate:this.settingsService.maxAllowedDate,required:!r.isColumnNullable})}})}isEntityId(e){return this.entitiesIdFields.includes(e)}isSystemColumn(e){return this.systemFields.includes(e)||this.entitiesIdFields.includes(e)}filterSystemColumns(e){return e.filter((n,o)=>{if(!this.isSystemColumn(n.columnName))return n.idx=o,n})}getInputName(e){return e.columnName&&e.columnName.includes("_cd_")?e.columnName.split("_cd_")[0]:e.columnName}isNumeric(e){return this.isColumnType(e,"INTEGER")||this.isColumnType(e,"DECIMAL")}isDate(e){return this.isColumnType(e,"DATE")||this.isColumnType(e,"DATETIME")}isBoolean(e){return this.isColumnType(e,"BOOLEAN")}isDropdown(e){return this.isColumnType(e,"CODELOOKUP")}isString(e){return this.isColumnType(e,"STRING")}isText(e){return this.isColumnType(e,"TEXT")}isColumnType(e,n){return e===n}buildPayload(e,n,o,r){let a=!1;return e.forEach(s=>{let c=this.getInputName(s);this.isNumeric(s.columnDisplayType)?r[s.columnName]=n[c]*1:this.isDate(s.columnDisplayType)?(r[s.columnName]=this.dateUtils.formatDate(n[c],o),a=!0):r[s.columnName]=n[c]}),a&&(r.dateFormat=o),r}isSystemDefined(e){return this.systemFields.includes(e)}getName(e){return e&&e.includes("_cd_")?e.split("_cd_")[0]:e}toDisplayLabel(e){if(!e)return"";if(e.includes("_cd_")){let n=e.split("_cd_");if(n.length>1&&n[1]&&n[1].trim())return n[1].split("_").filter(r=>r.trim()&&r.toLowerCase()!=="cd").map(r=>r.charAt(0).toUpperCase()+r.slice(1).toLowerCase()).join(" ")||n[1].trim()}return e.split("_").filter(n=>n.trim()&&n.toLowerCase()!=="cd").map(n=>n.charAt(0).toUpperCase()+n.slice(1).toLowerCase()).join(" ")||e}getCodeLookupValue(e,n){if(!e?.columnValues||n===null||n===void 0)return"";let o=e.columnValues.find(r=>r.id===n);return o?o.value:n.toString()}getCodeName(e){return e&&e.includes("_cd_")?e.split("_cd_")[0]:""}isValidUrl(e){try{let n=new URL(e);return n.protocol.startsWith("http")||n.protocol.startsWith("https")}catch{return!1}}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275prov=R({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();var n1e=["dataTable"];function i1e(t,i){if(t&1){let e=le();h(0,"span")(1,"button",11),N("click",function(){G(e);let o=M();return W(o.add())}),F(2,"fa-icon",12),y(3),S(4,"translate"),_()()}t&2&&(p(3),ee("",k(4,1,"labels.buttons.Add")," "))}function o1e(t,i){if(t&1){let e=le();h(0,"span")(1,"button",13),N("click",function(){G(e);let o=M(2);return W(o.deleteSelected())}),F(2,"fa-icon",14),y(3),S(4,"translate"),_()()}t&2&&(p(3),ee(" ",k(4,1,"labels.buttons.Delete Selected")," "))}function r1e(t,i){if(t&1&&(Vi(0),E(1,o1e,5,3,"span"),Bi()),t&2){let e=M();p(),I(e.isSelected?1:-1)}}function a1e(t,i){if(t&1){let e=le();h(0,"span")(1,"button",13),N("click",function(){G(e);let o=M(2);return W(o.delete())}),F(2,"fa-icon",14),y(3),S(4,"translate"),_()()}t&2&&(p(3),ee(" ",k(4,1,"labels.buttons.Delete All")," "))}function s1e(t,i){if(t&1&&(Vi(0),E(1,a1e,5,3,"span"),Bi()),t&2){let e=M();p(),I(e.datatableData.length>0?1:-1)}}function c1e(t,i){t&1&&F(0,"th",17)}function l1e(t,i){if(t&1){let e=le();h(0,"td",18)(1,"mat-checkbox",19),N("click",function(o){return G(e),W(o.stopPropagation())})("change",function(o){let r=G(e).$implicit,a=M(3);return W(o?a.itemToggle(r):null)}),_()()}if(t&2){let e=i.$implicit,n=M(3);p(),D("checked",n.selection.isSelected(e))}}function d1e(t,i){t&1&&ot(0,c1e,1,0,"th",15)(1,l1e,2,1,"td",16)}function u1e(t,i){if(t&1&&(h(0,"th",22),y(1),_()),t&2){let e=M(2).$implicit,n=M();p(),T(n.getInputName(e))}}function m1e(t,i){if(t&1&&(h(0,"td",23),y(1),_()),t&2){let e=i.$implicit,n=M(2).$implicit,o=M();D("ngClass",o.isToDelete(e)),p(),ee(" ",o.formatValue(e,n)," ")}}function p1e(t,i){t&1&&ot(0,u1e,2,1,"th",20)(1,m1e,2,2,"td",21)}function f1e(t,i){if(t&1&&(Vi(0,8),E(1,d1e,2,0),E(2,p1e,2,0),Bi()),t&2){let e=i.$implicit,n=i.$index;D("matColumnDef",e),p(),I(n===0?1:-1),p(),I(n>0?2:-1)}}function h1e(t,i){t&1&&F(0,"tr",24)}function g1e(t,i){t&1&&F(0,"tr",25)}var Vh=(()=>{class t{constructor(){this.route=d(ro),this.dateUtils=d(go),this.systemService=d(O2),this.settingsService=d(Xt),this.dialog=d(Wi),this.datatables=d(Fh),this.dateFormat=d(Lo),this.dateTimeFormat=d(ca),this.numberFormat=d(Zd),this.SELECT_NAME_FIELD="select",this.datatableColumns=[],this.isSelected=!1,this.isLoading=!1}ngOnInit(){this.selection=new uo(!0,[]),this.route.params.subscribe(e=>{this.datatableName=e.datatableName}),this.setData(),this.isSelected=!1}ngOnDestroy(){this.resetData()}ngOnChanges(e){this.setData()}setData(){this.datatableColumns=[this.SELECT_NAME_FIELD],this.dataObject.columnHeaders.filter(e=>{if(!this.datatables.isEntityId(e.columnName))return this.datatableColumns.push(e.columnName),e}),this.datatableData=this.dataObject.data,this.dataTableRef&&this.dataTableRef.renderRows()}resetData(){this.datatableName=null,this.datatableColumns=null,this.datatableData=null}getData(){this.isLoading=!0,this.systemService.getEntityDatatable(this.entityId,this.datatableName).subscribe(e=>{this.dataObject.data=e.data,this.showDeleteBotton=!1,this.dataTableRef&&this.setData(),this.isSelected=!1,this.isLoading=!1})}add(){let e={locale:this.settingsService.language.code},n=[],o=this.datatables.filterSystemColumns(this.dataObject.columnHeaders),r=this.datatables.getFormfields(o,n,e),a={title:"Add "+this.datatableName+" for "+this.entityType,formfields:r};this.dialog.open(es,{data:a,width:"50rem"}).afterClosed().subscribe(c=>{c.data&&(n.forEach(m=>{c.data.value[m]=this.dateUtils.formatDate(c.data.value[m],e.dateFormat)}),e=q(q({},c.data.value),e),this.systemService.addEntityDatatableEntry(this.entityId,this.datatableName,e).subscribe(m=>{this.getData()}))})}delete(){this.dialog.open(Rr,{data:{deleteContext:`the contents of ${this.datatableName}`}}).afterClosed().subscribe(n=>{n.delete&&this.systemService.deleteDatatableContent(this.entityId,this.datatableName).subscribe(()=>{this.getData()})})}deleteSelected(){this.dialog.open(Rr,{data:{deleteContext:`the ${this.selection.selected.length} items selected of ${this.datatableName}`}}).afterClosed().subscribe(n=>{n.delete?(this.isSelected=!1,this.selection.selected.forEach(o=>{this.systemService.deleteDatatableEntry(this.entityId,o.row[0],this.datatableName).subscribe(()=>{this.datatableData.forEach((r,a)=>{r.row[0]===o.row[0]&&(this.datatableData.splice(a,1),this.dataTableRef.renderRows(),this.selection=new uo(!0,[]),this.isSelected=this.selection.selected.length>0)})})})):(this.selection=new uo(!0,[]),this.isSelected=this.selection.selected.length>0)})}formatValue(e,n){let o="";if(this.dataObject.columnHeaders){let r=0;this.dataObject.columnHeaders.some(a=>{if(a.columnName===n){let s=a.columnDisplayType;if(o=e.row[r],s==="DATE")o=this.dateFormat.transform(o);else if(s==="DATETIME")o=this.dateTimeFormat.transform(o);else if(s==="INTEGER"||s==="DECIMAL")typeof o=="number"&&(o=this.numberFormat.transform(o));else if(s==="CODELOOKUP"&&a.columnValues&&o!==null&&o!==void 0){let c=a.columnValues.find(m=>m.id===o);o=c?c.value:o}return!0}r+=1})}return o}isAllSelected(){let e=this.selection.selected;return this.datatableData.length===e}isAnySelected(){return this.selection.selected&&this.selection.selected.length>0}masterToggle(e){e.checked?this.datatableData.forEach(n=>this.selection.select(n)):this.selection=new uo(!0,[]),this.isSelected=this.selection.selected.length>0}itemToggle(e){this.selection.toggle(e),this.isSelected=this.selection.selected.length>0}checkboxLabel(e){return e?`${this.selection.isSelected(e)?"deselect":"select"} row ${e.position+1}`:`${this.isAllSelected()?"select":"deselect"} all`}isToDelete(e){return this.selection.isSelected(e)?"tobe-deleted":""}getInputName(e){return this.datatables.getName(e)}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275cmp=P({type:t,selectors:[["mifosx-datatable-multi-row"]],viewQuery:function(n,o){if(n&1&&ue(n1e,5),n&2){let r;U(r=$())&&(o.dataTableRef=r.first)}},inputs:{dataObject:"dataObject",entityId:"entityId",entityType:"entityType"},features:[Re],decls:16,vars:7,consts:[["dataTable",""],[1,"tab-container","mat-typography"],[1,"layout-row","align-start"],[1,"m-b-10"],[1,"action-button","m-b-7","gap-10px"],[4,"mifosxHasPermission"],[1,"m-t-10"],["mat-table","",1,"mat-elevation-z1","m-b-25",3,"dataSource"],[3,"matColumnDef"],["mat-header-row","",4,"matHeaderRowDef"],["mat-row","",4,"matRowDef","matRowDefColumns"],["mat-raised-button","","color","primary",3,"click"],["icon","plus",1,"m-r-10"],["mat-raised-button","","color","warn",1,"delete-button",3,"click"],["icon","trash",1,"m-r-10"],["mat-header-cell","",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["mat-header-cell",""],["mat-cell",""],[1,"center",3,"click","change","checked"],["mat-header-cell","","class","right",4,"matHeaderCellDef"],["mat-cell","","class","right",3,"ngClass",4,"matCellDef"],["mat-header-cell","",1,"right"],["mat-cell","",1,"right",3,"ngClass"],["mat-header-row",""],["mat-row",""]],template:function(n,o){n&1&&(h(0,"div",1)(1,"div",2)(2,"div",3)(3,"h3"),y(4),_()(),h(5,"div",4),ot(6,i1e,5,3,"span",5)(7,r1e,2,1,"ng-container",5)(8,s1e,2,1,"ng-container",5),_()(),h(9,"div",6)(10,"table",7,0),Xe(12,f1e,3,3,"ng-container",8,ht),ot(14,h1e,1,0,"tr",9)(15,g1e,1,0,"tr",10),_()()()),n&2&&(p(4),T(o.datatableName),p(2),D("mifosxHasPermission","CREATE_"+o.datatableName),p(),D("mifosxHasPermission","DELETE_"+o.datatableName),p(),D("mifosxHasPermission","DELETE_"+o.datatableName),p(2),D("dataSource",o.datatableData),p(2),Ze(o.datatableColumns),p(2),D("matHeaderRowDef",o.datatableColumns),p(),D("matRowDefColumns",o.datatableColumns))},dependencies:[he,Un,ve,vt,il,Ps,Yt,ph,gh,hh,_h,fh,bh,vh,Ch,yh,xh,Te],styles:["body[_ngcontent-%COMP%] table[_ngcontent-%COMP%] tbody[_ngcontent-%COMP%] tr[_ngcontent-%COMP%]:nth-child(2n){background-color:#f2f2f2}.bg-black[_ngcontent-%COMP%]{background-color:#000}.bg-light-grey[_ngcontent-%COMP%]{background-color:#e5e5e5}.bg-medium-grey[_ngcontent-%COMP%]{background-color:#ccc}.bg-grey[_ngcontent-%COMP%]{background-color:#999}.bg-dark-grey[_ngcontent-%COMP%]{background-color:#222}.bg-white[_ngcontent-%COMP%], .bg-fff[_ngcontent-%COMP%]{background-color:#fff}.bg-none[_ngcontent-%COMP%], .no-bg[_ngcontent-%COMP%]{background:none;background-image:none;background-color:transparent}.bg-facebook[_ngcontent-%COMP%]{background-color:#47639e}.bg-twitter[_ngcontent-%COMP%]{background-color:#02a8f3}body[_ngcontent-%COMP%] table[_ngcontent-%COMP%]{border:1px solid rgba(0,0,0,.12)}.no-border[_ngcontent-%COMP%]{border:none}.no-border-t[_ngcontent-%COMP%]{border-top:none}.no-border-r[_ngcontent-%COMP%]{border-right:none}.no-border-b[_ngcontent-%COMP%]{border-bottom:none}.no-border-l[_ngcontent-%COMP%]{border-left:none}.no-border-lr[_ngcontent-%COMP%], .no-border-rl[_ngcontent-%COMP%]{border-left:none;border-right:none}.no-border-tb[_ngcontent-%COMP%], .no-border-bt[_ngcontent-%COMP%]{border-top:none;border-bottom:none}.no-border-tl[_ngcontent-%COMP%], .no-border-lt[_ngcontent-%COMP%]{border-top:none;border-left:none}.no-border-tr[_ngcontent-%COMP%], .no-border-rt[_ngcontent-%COMP%]{border-top:none;border-right:none}.no-border-bl[_ngcontent-%COMP%], .no-border-lb[_ngcontent-%COMP%]{border-bottom:none;border-left:none}.no-border-br[_ngcontent-%COMP%], .no-border-rb[_ngcontent-%COMP%]{border-bottom:none;border-right:none}.border-dashed[_ngcontent-%COMP%], .border-dotted[_ngcontent-%COMP%]{border-style:dashed}.border-black[_ngcontent-%COMP%]{border-color:#000}.border-light-grey[_ngcontent-%COMP%]{border-color:#e5e5e5}.border-medium-grey[_ngcontent-%COMP%]{border-color:#ccc}.border-grey[_ngcontent-%COMP%]{border-color:#999}.border-dark-grey[_ngcontent-%COMP%]{border-color:#2222}.border-white[_ngcontent-%COMP%], .border-fff[_ngcontent-%COMP%]{border-color:#fff}.no-border-radius[_ngcontent-%COMP%]{border-radius:0}.radius3[_ngcontent-%COMP%]{border-radius:3px}.radius5[_ngcontent-%COMP%]{border-radius:5px}.radius10[_ngcontent-%COMP%]{border-radius:10px}.column-mandatory[_ngcontent-%COMP%]{color:#5cb85c;text-align:center}.not-column-mandatory[_ngcontent-%COMP%]{color:#666f73;text-align:center}.cdk-drag-placeholder[_ngcontent-%COMP%]{background:#3498db}.yes[_ngcontent-%COMP%]{color:#5cb85c!important;background-color:#5cb85c;height:4px;cursor:none}.no[_ngcontent-%COMP%]{color:red;background-color:red;height:4px;cursor:none}.strike[_ngcontent-%COMP%]{text-decoration:line-through;color:red}.transfer[_ngcontent-%COMP%]{color:#16a085}.linked[_ngcontent-%COMP%]{color:#4461e2}.accrual[_ngcontent-%COMP%]{color:#999}.fa-question[_ngcontent-%COMP%]{color:#4461e2}.enabled[_ngcontent-%COMP%]{color:#32cd32}.disabled[_ngcontent-%COMP%]{color:#f44366}.v-mid[_ngcontent-%COMP%], .v-m[_ngcontent-%COMP%]{vertical-align:middle}.v-top[_ngcontent-%COMP%], .v-t[_ngcontent-%COMP%]{vertical-align:top}.v-bottom[_ngcontent-%COMP%], .v-b[_ngcontent-%COMP%]{vertical-align:bottom}.v-super[_ngcontent-%COMP%]{vertical-align:super}.r-amount[_ngcontent-%COMP%]{text-align:right!important;padding-right:5px!important}.left[_ngcontent-%COMP%]{text-align:left!important}.right[_ngcontent-%COMP%]{text-align:right!important}.center[_ngcontent-%COMP%]{text-align:center!important}.amount-plus[_ngcontent-%COMP%]{color:#000}.amount-minus[_ngcontent-%COMP%]{color:#4461e2}.block[_ngcontent-%COMP%]{display:block}.inline[_ngcontent-%COMP%]{display:inline}.in-block[_ngcontent-%COMP%]{display:inline-block;zoom:1}.d-none[_ngcontent-%COMP%], .hide[_ngcontent-%COMP%], .hidden[_ngcontent-%COMP%]{display:none}.t-0[_ngcontent-%COMP%]{top:0}.b-0[_ngcontent-%COMP%]{bottom:0}.l-0[_ngcontent-%COMP%]{left:0}.r-0[_ngcontent-%COMP%]{right:0}.tb-0[_ngcontent-%COMP%]{top:0;bottom:0}.lr-0[_ngcontent-%COMP%]{left:0;right:0}.f-left[_ngcontent-%COMP%]{float:left}.f-right[_ngcontent-%COMP%]{float:right}.f-none[_ngcontent-%COMP%]{float:none}textarea[_ngcontent-%COMP%]{resize:both}textarea.vertical[_ngcontent-%COMP%], textarea.horizontal[_ngcontent-%COMP%]{resize:vertical}textarea.noresize[_ngcontent-%COMP%]{resize:none}.full-input[_ngcontent-%COMP%] input[_ngcontent-%COMP%], .full-input[_ngcontent-%COMP%] select[_ngcontent-%COMP%], .full-input[_ngcontent-%COMP%] textarea[_ngcontent-%COMP%]{width:100%}.normal[_ngcontent-%COMP%] input[_ngcontent-%COMP%], .normal[_ngcontent-%COMP%] select[_ngcontent-%COMP%], .normal[_ngcontent-%COMP%] textarea[_ngcontent-%COMP%], .full-input[_ngcontent-%COMP%] [type=checkbox][_ngcontent-%COMP%], .full-input[_ngcontent-%COMP%] [type=radio][_ngcontent-%COMP%]{width:auto}.mat-tab-body-content[_ngcontent-%COMP%]{margin-bottom:20px}.mat-datepicker-input[_ngcontent-%COMP%]{margin-top:5px;margin-bottom:5px}.loader-wrapper[_ngcontent-%COMP%]{height:100vh;width:100vw}.loader-wrapper[_ngcontent-%COMP%] .triangle[_ngcontent-%COMP%]{width:0;height:0;border-style:solid;position:absolute;animation:_ngcontent-%COMP%_rotate .8s infinite .2s}.loader-wrapper[_ngcontent-%COMP%] .bottom[_ngcontent-%COMP%]{border-width:0 90px 90px;border-color:transparent transparent #1fb050;bottom:calc(50% - 100px);left:calc(50% - 90px)}.loader-wrapper[_ngcontent-%COMP%] .top[_ngcontent-%COMP%]{border-width:90px 90px 0;border-color:#b4d575 transparent transparent;top:calc(50% - 100px);left:calc(50% - 90px)}.loader-wrapper[_ngcontent-%COMP%] .left[_ngcontent-%COMP%]{border-width:90px 0 90px 90px;border-color:transparent transparent transparent #1074b9;top:calc(50% - 90px);left:calc(50% - 100px)}.loader-wrapper[_ngcontent-%COMP%] .right[_ngcontent-%COMP%]{border-width:90px 90px 90px 0;border-color:transparent #1daeec transparent transparent;top:calc(50% - 90px);right:calc(50% - 100px)}@keyframes _ngcontent-%COMP%_rotate{0%{transform:rotate(0)}to{transform:rotate(360deg)}}body[_ngcontent-%COMP%]{margin:0}.container[_ngcontent-%COMP%]{margin:0 auto}.mb-05[_ngcontent-%COMP%]{margin-bottom:.5rem}.mr-05[_ngcontent-%COMP%]{margin-right:.5rem}.mb-1[_ngcontent-%COMP%]{margin-bottom:1rem}.mt-1[_ngcontent-%COMP%]{margin-top:1rem}.m-5[_ngcontent-%COMP%]{margin:5px}.m-t-5[_ngcontent-%COMP%]{margin-top:5px}.m-r-5[_ngcontent-%COMP%]{margin-right:5px}.m-b-5[_ngcontent-%COMP%]{margin-bottom:5px}.m-l-5[_ngcontent-%COMP%]{margin-left:5px}.m-v-5[_ngcontent-%COMP%]{margin:5px 0}.m-h-5[_ngcontent-%COMP%]{margin:0 5px}.m-10[_ngcontent-%COMP%]{margin:10px}.m-t-10[_ngcontent-%COMP%]{margin-top:10px}.m-r-10[_ngcontent-%COMP%]{margin-right:10px}.m-b-10[_ngcontent-%COMP%]{margin-bottom:10px}.m-l-10[_ngcontent-%COMP%]{margin-left:10px}.m-v-10[_ngcontent-%COMP%]{margin:10px 0}.m-h-10[_ngcontent-%COMP%]{margin:0 10px}.m-15[_ngcontent-%COMP%]{margin:15px}.m-t-15[_ngcontent-%COMP%]{margin-top:15px}.m-r-15[_ngcontent-%COMP%]{margin-right:15px}.m-b-15[_ngcontent-%COMP%]{margin-bottom:15px}.m-l-15[_ngcontent-%COMP%]{margin-left:15px}.m-v-15[_ngcontent-%COMP%]{margin:15px 0}.m-h-15[_ngcontent-%COMP%]{margin:0 15px}.m-20[_ngcontent-%COMP%]{margin:20px}.m-t-20[_ngcontent-%COMP%]{margin-top:20px}.m-r-20[_ngcontent-%COMP%]{margin-right:20px}.m-b-20[_ngcontent-%COMP%]{margin-bottom:20px}.m-l-20[_ngcontent-%COMP%]{margin-left:20px}.m-v-20[_ngcontent-%COMP%]{margin:20px 0}.m-h-20[_ngcontent-%COMP%]{margin:0 20px}.m-25[_ngcontent-%COMP%]{margin:25px}.m-t-25[_ngcontent-%COMP%]{margin-top:25px}.m-r-25[_ngcontent-%COMP%]{margin-right:25px}.m-b-25[_ngcontent-%COMP%]{margin-bottom:25px}.m-l-25[_ngcontent-%COMP%]{margin-left:25px}.m-v-25[_ngcontent-%COMP%]{margin:25px 0}.m-h-25[_ngcontent-%COMP%]{margin:0 25px}.m-30[_ngcontent-%COMP%]{margin:30px}.m-t-30[_ngcontent-%COMP%]{margin-top:30px}.m-r-30[_ngcontent-%COMP%]{margin-right:30px}.m-b-30[_ngcontent-%COMP%]{margin-bottom:30px}.m-l-30[_ngcontent-%COMP%]{margin-left:30px}.m-v-30[_ngcontent-%COMP%]{margin:30px 0}.m-h-30[_ngcontent-%COMP%]{margin:0 30px}.m-35[_ngcontent-%COMP%]{margin:35px}.m-t-35[_ngcontent-%COMP%]{margin-top:35px}.m-r-35[_ngcontent-%COMP%]{margin-right:35px}.m-b-35[_ngcontent-%COMP%]{margin-bottom:35px}.m-l-35[_ngcontent-%COMP%]{margin-left:35px}.m-v-35[_ngcontent-%COMP%]{margin:35px 0}.m-h-35[_ngcontent-%COMP%]{margin:0 35px}.m-40[_ngcontent-%COMP%]{margin:40px}.m-t-40[_ngcontent-%COMP%]{margin-top:40px}.m-r-40[_ngcontent-%COMP%]{margin-right:40px}.m-b-40[_ngcontent-%COMP%]{margin-bottom:40px}.m-l-40[_ngcontent-%COMP%]{margin-left:40px}.m-v-40[_ngcontent-%COMP%]{margin:40px 0}.m-h-40[_ngcontent-%COMP%]{margin:0 40px}.m-45[_ngcontent-%COMP%]{margin:45px}.m-t-45[_ngcontent-%COMP%]{margin-top:45px}.m-r-45[_ngcontent-%COMP%]{margin-right:45px}.m-b-45[_ngcontent-%COMP%]{margin-bottom:45px}.m-l-45[_ngcontent-%COMP%]{margin-left:45px}.m-v-45[_ngcontent-%COMP%]{margin:45px 0}.m-h-45[_ngcontent-%COMP%]{margin:0 45px}.m-50[_ngcontent-%COMP%]{margin:50px}.m-t-50[_ngcontent-%COMP%]{margin-top:50px}.m-r-50[_ngcontent-%COMP%]{margin-right:50px}.m-b-50[_ngcontent-%COMP%]{margin-bottom:50px}.m-l-50[_ngcontent-%COMP%]{margin-left:50px}.m-v-50[_ngcontent-%COMP%]{margin:50px 0}.m-h-50[_ngcontent-%COMP%]{margin:0 50px}.m-55[_ngcontent-%COMP%]{margin:55px}.m-t-55[_ngcontent-%COMP%]{margin-top:55px}.m-r-55[_ngcontent-%COMP%]{margin-right:55px}.m-b-55[_ngcontent-%COMP%]{margin-bottom:55px}.m-l-55[_ngcontent-%COMP%]{margin-left:55px}.m-v-55[_ngcontent-%COMP%]{margin:55px 0}.m-h-55[_ngcontent-%COMP%]{margin:0 55px}.m-60[_ngcontent-%COMP%]{margin:60px}.m-t-60[_ngcontent-%COMP%]{margin-top:60px}.m-r-60[_ngcontent-%COMP%]{margin-right:60px}.m-b-60[_ngcontent-%COMP%]{margin-bottom:60px}.m-l-60[_ngcontent-%COMP%]{margin-left:60px}.m-v-60[_ngcontent-%COMP%]{margin:60px 0}.m-h-60[_ngcontent-%COMP%]{margin:0 60px}.m-65[_ngcontent-%COMP%]{margin:65px}.m-t-65[_ngcontent-%COMP%]{margin-top:65px}.m-r-65[_ngcontent-%COMP%]{margin-right:65px}.m-b-65[_ngcontent-%COMP%]{margin-bottom:65px}.m-l-65[_ngcontent-%COMP%]{margin-left:65px}.m-v-65[_ngcontent-%COMP%]{margin:65px 0}.m-h-65[_ngcontent-%COMP%]{margin:0 65px}.m-70[_ngcontent-%COMP%]{margin:70px}.m-t-70[_ngcontent-%COMP%]{margin-top:70px}.m-r-70[_ngcontent-%COMP%]{margin-right:70px}.m-b-70[_ngcontent-%COMP%]{margin-bottom:70px}.m-l-70[_ngcontent-%COMP%]{margin-left:70px}.m-v-70[_ngcontent-%COMP%]{margin:70px 0}.m-h-70[_ngcontent-%COMP%]{margin:0 70px}.m-75[_ngcontent-%COMP%]{margin:75px}.m-t-75[_ngcontent-%COMP%]{margin-top:75px}.m-r-75[_ngcontent-%COMP%]{margin-right:75px}.m-b-75[_ngcontent-%COMP%]{margin-bottom:75px}.m-l-75[_ngcontent-%COMP%]{margin-left:75px}.m-v-75[_ngcontent-%COMP%]{margin:75px 0}.m-h-75[_ngcontent-%COMP%]{margin:0 75px}.m-80[_ngcontent-%COMP%]{margin:80px}.m-t-80[_ngcontent-%COMP%]{margin-top:80px}.m-r-80[_ngcontent-%COMP%]{margin-right:80px}.m-b-80[_ngcontent-%COMP%]{margin-bottom:80px}.m-l-80[_ngcontent-%COMP%]{margin-left:80px}.m-v-80[_ngcontent-%COMP%]{margin:80px 0}.m-h-80[_ngcontent-%COMP%]{margin:0 80px}.no-m[_ngcontent-%COMP%]{margin:0}.no-m-t[_ngcontent-%COMP%]{margin-top:0}.no-m-r[_ngcontent-%COMP%]{margin-right:0}.no-m-b[_ngcontent-%COMP%]{margin-bottom:0}.no-m-l[_ngcontent-%COMP%]{margin-left:0}.no-m-v[_ngcontent-%COMP%], .no-m-h[_ngcontent-%COMP%], .no-margin[_ngcontent-%COMP%]{margin:0}.no-m-lr[_ngcontent-%COMP%], .no-m-rl[_ngcontent-%COMP%]{margin-left:0;margin-right:0}.no-m-tb[_ngcontent-%COMP%], .no-m-bt[_ngcontent-%COMP%]{margin-top:0;margin-bottom:0}.m-t-only[_ngcontent-%COMP%]{margin-left:0;margin-right:0;margin-bottom:0}.m-b-only[_ngcontent-%COMP%]{margin-left:0;margin-right:0;margin-top:0}.m-l-only[_ngcontent-%COMP%]{margin-right:0;margin-top:0;margin-bottom:0}.m-r-only[_ngcontent-%COMP%]{margin-left:0;margin-top:0;margin-bottom:0}.m-auto[_ngcontent-%COMP%]{margin-left:auto;margin-right:auto}.ls-0[_ngcontent-%COMP%]{margin-left:10px;margin-right:10px}html[_ngcontent-%COMP%], body[_ngcontent-%COMP%]{-webkit-tap-highlight-color:transparent}div[_ngcontent-%COMP%]{box-sizing:border-box}.color-inherit[_ngcontent-%COMP%]{color:inherit}.no-shadow[_ngcontent-%COMP%]{box-shadow:none}.pointer[_ngcontent-%COMP%]{cursor:pointer}.nolist[_ngcontent-%COMP%]{list-style:none}.actions-menu[_ngcontent-%COMP%]{color:#fff}.alert[_ngcontent-%COMP%]{background-color:#e8f4fd;padding:6px 16px;font-size:.875rem;font-family:Roboto,Helvetica Neue,sans-serif;font-weight:400;line-height:1.43;border-radius:4px;letter-spacing:normal;margin:10px}.alert[_ngcontent-%COMP%] .message[_ngcontent-%COMP%]{padding:8px 0;font-size:18px}.alert[_ngcontent-%COMP%] .alert-check[_ngcontent-%COMP%]{color:#359ff4;margin-right:2px;font-size:1.4rem} .mat-tooltip{font-size:15px;color:#fff!important;background-color:#4461e2b3;border:1px solid rgb(25.7777777778,51.5555555556,166.2222222222);max-width:400px!important;white-space:pre-line!important}.loading[_ngcontent-%COMP%]{position:absolute;min-width:100%;width:100px;height:12px;background:linear-gradient(125deg,#fff,#4461e2,#fff);animation:grow 4s linear infinite,move 4s linear infinite}mat-card-title[_ngcontent-%COMP%]{font-weight:600;font-size:x-large;padding-left:20px;padding-top:20px}html[_ngcontent-%COMP%], body[_ngcontent-%COMP%]{overflow:hidden}.overflow-x-scroll[_ngcontent-%COMP%]{max-width:100%;overflow-x:auto}.overflow-no[_ngcontent-%COMP%]{overflow:hidden}.overflow-auto[_ngcontent-%COMP%]{overflow:auto}.overflow-scroll[_ngcontent-%COMP%]{overflow:scroll}.table-container[_ngcontent-%COMP%]{overflow-x:auto;max-width:100%}body[_ngcontent-%COMP%], .no-p[_ngcontent-%COMP%]{padding:0}.no-p-t[_ngcontent-%COMP%]{padding-top:0}.no-p-r[_ngcontent-%COMP%]{padding-right:0}.no-p-b[_ngcontent-%COMP%]{padding-bottom:0}.no-p-l[_ngcontent-%COMP%]{padding-left:0}.no-p-v[_ngcontent-%COMP%], .no-p-h[_ngcontent-%COMP%]{padding:0}.p-5[_ngcontent-%COMP%]{padding:5px}.p-t-5[_ngcontent-%COMP%]{padding-top:5px}.p-r-5[_ngcontent-%COMP%]{padding-right:5px}.p-b-5[_ngcontent-%COMP%]{padding-bottom:5px}.p-l-5[_ngcontent-%COMP%]{padding-left:5px}.p-v-5[_ngcontent-%COMP%]{padding:5px 0}.p-h-5[_ngcontent-%COMP%]{padding:0 5px}.p-10[_ngcontent-%COMP%]{padding:10px}.p-t-10[_ngcontent-%COMP%]{padding-top:10px}.p-b-10[_ngcontent-%COMP%]{padding-bottom:10px}.p-v-10[_ngcontent-%COMP%]{padding:10px 0}.p-h-10[_ngcontent-%COMP%]{padding:0 10px}.p-15[_ngcontent-%COMP%]{padding:15px}.p-t-15[_ngcontent-%COMP%]{padding-top:15px}.p-r-15[_ngcontent-%COMP%]{padding-right:15px}.p-b-15[_ngcontent-%COMP%]{padding-bottom:15px}.p-l-15[_ngcontent-%COMP%]{padding-left:15px}.p-v-15[_ngcontent-%COMP%]{padding:15px 0}.p-h-15[_ngcontent-%COMP%]{padding:0 15px}.p-20[_ngcontent-%COMP%]{padding:20px}.p-t-20[_ngcontent-%COMP%]{padding-top:20px}.p-r-20[_ngcontent-%COMP%]{padding-right:20px}.p-b-20[_ngcontent-%COMP%]{padding-bottom:20px}.p-l-20[_ngcontent-%COMP%]{padding-left:20px}.p-v-20[_ngcontent-%COMP%]{padding:20px 0}.p-h-20[_ngcontent-%COMP%]{padding:0 20px}.p-25[_ngcontent-%COMP%]{padding:25px}.p-t-25[_ngcontent-%COMP%]{padding-top:25px}.p-r-25[_ngcontent-%COMP%]{padding-right:25px}.p-b-25[_ngcontent-%COMP%]{padding-bottom:25px}.p-l-25[_ngcontent-%COMP%]{padding-left:25px}.p-v-25[_ngcontent-%COMP%]{padding:25px 0}.p-h-25[_ngcontent-%COMP%]{padding:0 25px}.p-30[_ngcontent-%COMP%]{padding:30px}.p-t-30[_ngcontent-%COMP%]{padding-top:30px}.p-r-30[_ngcontent-%COMP%]{padding-right:30px}.p-b-30[_ngcontent-%COMP%]{padding-bottom:30px}.p-l-30[_ngcontent-%COMP%]{padding-left:30px}.p-v-30[_ngcontent-%COMP%]{padding:30px 0}.p-h-30[_ngcontent-%COMP%]{padding:0 30px}.p-35[_ngcontent-%COMP%]{padding:35px}.p-t-35[_ngcontent-%COMP%]{padding-top:35px}.p-r-35[_ngcontent-%COMP%]{padding-right:35px}.p-b-35[_ngcontent-%COMP%]{padding-bottom:35px}.p-l-35[_ngcontent-%COMP%]{padding-left:35px}.p-v-35[_ngcontent-%COMP%]{padding:35px 0}.p-h-35[_ngcontent-%COMP%]{padding:0 35px}.p-40[_ngcontent-%COMP%]{padding:40px}.p-t-40[_ngcontent-%COMP%]{padding-top:40px}.p-r-40[_ngcontent-%COMP%]{padding-right:40px}.p-b-40[_ngcontent-%COMP%]{padding-bottom:40px}.p-l-40[_ngcontent-%COMP%]{padding-left:40px}.p-v-40[_ngcontent-%COMP%]{padding-top:40px;padding-bottom:40px}.p-h-40[_ngcontent-%COMP%]{padding:0 40px}.p-45[_ngcontent-%COMP%]{padding:45px}.p-t-45[_ngcontent-%COMP%]{padding-top:45px}.p-r-45[_ngcontent-%COMP%]{padding-right:45px}.p-b-45[_ngcontent-%COMP%]{padding-bottom:45px}.p-l-45[_ngcontent-%COMP%]{padding-left:45px}.p-v-45[_ngcontent-%COMP%]{padding:45px 0}.p-h-45[_ngcontent-%COMP%]{padding:0 45px}.p-50[_ngcontent-%COMP%]{padding:50px}.p-t-50[_ngcontent-%COMP%]{padding-top:50px}.p-r-50[_ngcontent-%COMP%]{padding-right:50px}.p-b-50[_ngcontent-%COMP%]{padding-bottom:50px}.p-l-50[_ngcontent-%COMP%]{padding-left:50px}.p-v-50[_ngcontent-%COMP%]{padding:50px 0}.p-h-50[_ngcontent-%COMP%]{padding:0 50px}.p-55[_ngcontent-%COMP%]{padding:55px}.p-t-55[_ngcontent-%COMP%]{padding-top:55px}.p-r-55[_ngcontent-%COMP%]{padding-right:55px}.p-b-55[_ngcontent-%COMP%]{padding-bottom:55px}.p-l-55[_ngcontent-%COMP%]{padding-left:55px}.p-v-55[_ngcontent-%COMP%]{padding:55px 0}.p-h-55[_ngcontent-%COMP%]{padding:0 55px}.p-60[_ngcontent-%COMP%]{padding:60px}.p-t-60[_ngcontent-%COMP%]{padding-top:60px}.p-r-60[_ngcontent-%COMP%]{padding-right:60px}.p-b-60[_ngcontent-%COMP%]{padding-bottom:60px}.p-l-60[_ngcontent-%COMP%]{padding-left:60px}.p-v-60[_ngcontent-%COMP%]{padding:60px 0}.p-h-60[_ngcontent-%COMP%]{padding:0 60px}.p-65[_ngcontent-%COMP%]{padding:65px}.p-t-65[_ngcontent-%COMP%]{padding-top:65px}.p-r-65[_ngcontent-%COMP%]{padding-right:65px}.p-b-65[_ngcontent-%COMP%]{padding-bottom:65px}.p-l-65[_ngcontent-%COMP%]{padding-left:65px}.p-v-65[_ngcontent-%COMP%]{padding:65px 0}.p-h-65[_ngcontent-%COMP%]{padding:0 65px}.p-70[_ngcontent-%COMP%]{padding:70px}.p-t-70[_ngcontent-%COMP%]{padding-top:70px}.p-r-70[_ngcontent-%COMP%]{padding-right:70px}.p-b-70[_ngcontent-%COMP%]{padding-bottom:70px}.p-l-70[_ngcontent-%COMP%]{padding-left:70px}.p-v-70[_ngcontent-%COMP%]{padding:70px 0}.p-h-70[_ngcontent-%COMP%]{padding:0 70px}.p-75[_ngcontent-%COMP%]{padding:75px}.p-t-75[_ngcontent-%COMP%]{padding-top:75px}.p-r-75[_ngcontent-%COMP%]{padding-right:75px}.p-b-75[_ngcontent-%COMP%]{padding-bottom:75px}.p-l-75[_ngcontent-%COMP%]{padding-left:75px}.p-v-75[_ngcontent-%COMP%]{padding:75px 0}.p-h-75[_ngcontent-%COMP%]{padding:0 75px}.p-80[_ngcontent-%COMP%]{padding:80px}.p-t-80[_ngcontent-%COMP%]{padding-top:80px}.p-r-80[_ngcontent-%COMP%]{padding-right:80px}.p-b-80[_ngcontent-%COMP%]{padding-bottom:80px}.p-l-80[_ngcontent-%COMP%]{padding-left:80px}.p-v-80[_ngcontent-%COMP%]{padding:80px 0}.p-h-80[_ngcontent-%COMP%]{padding:0 80px}.no-padding[_ngcontent-%COMP%]{padding:0!important}.no-pad-lr[_ngcontent-%COMP%], .no-pad-rl[_ngcontent-%COMP%]{padding-left:0;padding-right:0}.no-pad-tb[_ngcontent-%COMP%], .no-pad-bt[_ngcontent-%COMP%]{padding-top:0;padding-bottom:0}.pad-t-only[_ngcontent-%COMP%]{padding-left:0;padding-right:0;padding-bottom:0}.pad-b-only[_ngcontent-%COMP%]{padding-left:0;padding-right:0;padding-top:0}.pad-l-only[_ngcontent-%COMP%]{padding-right:0;padding-top:0;padding-bottom:0}.pad-r-only[_ngcontent-%COMP%]{padding-left:0;padding-top:0;padding-bottom:0}html[_ngcontent-%COMP%], body[_ngcontent-%COMP%], .rel[_ngcontent-%COMP%], .relative[_ngcontent-%COMP%]{position:relative}.abs[_ngcontent-%COMP%], .absolute[_ngcontent-%COMP%]{position:absolute}.fixed[_ngcontent-%COMP%]{position:fixed}.status-active[_ngcontent-%COMP%]{color:#5cb85c}.status-inactive[_ngcontent-%COMP%]{color:#666f73}.status-deleted[_ngcontent-%COMP%]{color:#000}.status-pending[_ngcontent-%COMP%]{color:orange}.status-approved[_ngcontent-%COMP%]{color:#4461e2}.status-overpaid[_ngcontent-%COMP%]{color:purple}.status-chargeoff[_ngcontent-%COMP%]{color:#f39c12}.status-active-overdue[_ngcontent-%COMP%], .status-block[_ngcontent-%COMP%]{color:red}.status-matured[_ngcontent-%COMP%]{color:#ff4000}.subStatus-contract-termination[_ngcontent-%COMP%]{color:#b3b3b3}.mat-step-header[_ngcontent-%COMP%] .mat-step-icon-state-done[_ngcontent-%COMP%]{background-color:#2af72a}.mat-step-header[_ngcontent-%COMP%] .mat-step-icon-state-done[_ngcontent-%COMP%] .status-transfer-progress[_ngcontent-%COMP%]{color:#ff4000}.mat-step-header[_ngcontent-%COMP%] .mat-step-icon-state-done[_ngcontent-%COMP%] .status-transfer-hold[_ngcontent-%COMP%]{color:#df0101}html[_ngcontent-%COMP%], body[_ngcontent-%COMP%]{-webkit-font-smoothing:antialiased}html[_ngcontent-%COMP%]{font-size:16px}body[_ngcontent-%COMP%]{font-family:Roboto,Helvetica Neue,sans-serif;font-weight:400;font-size:14px;color:#000000de;line-height:1.5;letter-spacing:normal}.mat-h1[_ngcontent-%COMP%], .mat-headline[_ngcontent-%COMP%], .mat-typography[_ngcontent-%COMP%] .mat-h1[_ngcontent-%COMP%], .mat-typography[_ngcontent-%COMP%] .mat-headline[_ngcontent-%COMP%], .mat-typography[_ngcontent-%COMP%] h1[_ngcontent-%COMP%]{font:400 24px/32px Roboto,Helvetica Neue,sans-serif;letter-spacing:normal;margin:0 0 16px}.lh-1[_ngcontent-%COMP%]{line-height:1}.lh-13[_ngcontent-%COMP%]{line-height:1.3}.lh-15[_ngcontent-%COMP%]{line-height:1.5}.bold[_ngcontent-%COMP%], .strong[_ngcontent-%COMP%]{font-weight:700}.no-bold[_ngcontent-%COMP%]{font-weight:400}.italic[_ngcontent-%COMP%], .em[_ngcontent-%COMP%]{font-style:italic}.strike[_ngcontent-%COMP%]{text-decoration:line-through}.normal[_ngcontent-%COMP%]{font-weight:400;font-style:normal}.uppercase[_ngcontent-%COMP%]{text-transform:uppercase}.text-left[_ngcontent-%COMP%]{text-align:left}.text-center[_ngcontent-%COMP%]{text-align:center}.text-right[_ngcontent-%COMP%]{text-align:right}.w100[_ngcontent-%COMP%]{font-weight:100}.w200[_ngcontent-%COMP%]{font-weight:200}.w300[_ngcontent-%COMP%]{font-weight:300}.w400[_ngcontent-%COMP%]{font-weight:400}.w500[_ngcontent-%COMP%]{font-weight:500}.w600[_ngcontent-%COMP%]{font-weight:600}.w700[_ngcontent-%COMP%]{font-weight:700}.w800[_ngcontent-%COMP%]{font-weight:800}.w900[_ngcontent-%COMP%]{font-weight:900}.f9[_ngcontent-%COMP%]{font-size:9px}.f10[_ngcontent-%COMP%]{font-size:10px}.f11[_ngcontent-%COMP%]{font-size:11px}.f12[_ngcontent-%COMP%]{font-size:12px}.f13[_ngcontent-%COMP%]{font-size:13px}.f14[_ngcontent-%COMP%]{font-size:14px}.f15[_ngcontent-%COMP%]{font-size:15px}.f16[_ngcontent-%COMP%]{font-size:16px}.f17[_ngcontent-%COMP%]{font-size:17px}.f18[_ngcontent-%COMP%]{font-size:18px;line-height:30px}.f19[_ngcontent-%COMP%]{font-size:19px}.f20[_ngcontent-%COMP%]{font-size:20px}.f30[_ngcontent-%COMP%]{font-size:30px}.f40[_ngcontent-%COMP%]{font-size:40px}.f50[_ngcontent-%COMP%]{font-size:50px}.f60[_ngcontent-%COMP%]{font-size:60px}.size-small[_ngcontent-%COMP%]{font-size:75%}.size-normal[_ngcontent-%COMP%]{font-size:100%}.size-medium[_ngcontent-%COMP%]{font-size:125%}.size-big[_ngcontent-%COMP%], .size-large[_ngcontent-%COMP%]{font-size:150%}.size-huge[_ngcontent-%COMP%]{font-size:200%}.inherit[_ngcontent-%COMP%]{font:inherit}.text-shadow[_ngcontent-%COMP%]{text-shadow:1px 1px 1px rgba(0,0,0,.4)}.text-rgb-2[_ngcontent-%COMP%]{color:#0003}.text-rgb-3[_ngcontent-%COMP%]{color:#0000004d}.text-rgb-4[_ngcontent-%COMP%]{color:#0006}.text-rgb-5[_ngcontent-%COMP%]{color:#00000080}.no-ul[_ngcontent-%COMP%], .no-ul[_ngcontent-%COMP%]:hover, .no-ul[_ngcontent-%COMP%] a[_ngcontent-%COMP%], .no-ul[_ngcontent-%COMP%] a[_ngcontent-%COMP%]:hover{text-decoration:none}.no-wrap[_ngcontent-%COMP%]{white-space:nowrap}.auto-cell-size[_ngcontent-%COMP%]{white-space:nowrap;width:1%}.ls-0[_ngcontent-%COMP%]{letter-spacing:-3px;white-space:nowrap}.label-field[_ngcontent-%COMP%]{margin-top:32px}.wrap-content[_ngcontent-%COMP%]{overflow-wrap:break-word;word-wrap:break-word}.no-break-content[_ngcontent-%COMP%]{overflow-wrap:anywhere!important}.fit[_ngcontent-%COMP%]{max-width:100%}.half-width[_ngcontent-%COMP%]{width:50%}.full-width[_ngcontent-%COMP%]{width:100%}.full-height[_ngcontent-%COMP%]{height:100%}html[_ngcontent-%COMP%], body[_ngcontent-%COMP%]{width:100%;height:100%;min-height:100%}body[_ngcontent-%COMP%] table[_ngcontent-%COMP%]{width:100%}.container[_ngcontent-%COMP%]{max-width:74rem;width:90%}.mw300[_ngcontent-%COMP%]{max-width:300px}.mw400[_ngcontent-%COMP%]{max-width:400px}.mw500[_ngcontent-%COMP%]{max-width:500px}.mw600[_ngcontent-%COMP%]{max-width:600px}.fullwidth[_ngcontent-%COMP%]{width:100%}.zindex-1[_ngcontent-%COMP%]{z-index:1}.zindex-2[_ngcontent-%COMP%]{z-index:2}.zindex-3[_ngcontent-%COMP%]{z-index:3}.zindex-4[_ngcontent-%COMP%]{z-index:4}.tab-container[_ngcontent-%COMP%]{padding:1%;margin:1%}.tab-container[_ngcontent-%COMP%] .action-button[_ngcontent-%COMP%]{margin-left:auto}.tab-container[_ngcontent-%COMP%] table[_ngcontent-%COMP%]{width:100%}.tobe-deleted[_ngcontent-%COMP%]{text-decoration:line-through;color:#f39c12}"]})}}return t})();function _1e(t,i){if(t&1){let e=le();h(0,"button",5),N("click",function(){G(e);let o=M();return W(o.add())}),F(1,"fa-icon",6),y(2),S(3,"translate"),_()}t&2&&(p(2),ee("",k(3,1,"labels.buttons.Add")," "))}function b1e(t,i){if(t&1){let e=le();h(0,"button",5),N("click",function(){G(e);let o=M();return W(o.edit())}),F(1,"fa-icon",7),y(2),S(3,"translate"),_()}t&2&&(p(2),ee("",k(3,1,"labels.buttons.Edit")," "))}function v1e(t,i){if(t&1){let e=le();h(0,"button",8),N("click",function(){G(e);let o=M();return W(o.delete())}),F(1,"fa-icon",9),y(2),S(3,"translate"),_()}t&2&&(p(2),ee("",k(3,1,"labels.buttons.Delete")," "))}function y1e(t,i){if(t&1&&(h(0,"span"),y(1),S(2,"dateFormat"),_()),t&2){let e=M().$index,n=M(2);p(),ee(" ",k(2,1,n.dataObject.data[0].row[e])," ")}}function C1e(t,i){if(t&1&&(h(0,"span"),y(1),S(2,"datetimeFormat"),_()),t&2){let e=M().$index,n=M(2);p(),ee(" ",k(2,1,n.dataObject.data[0].row[e])," ")}}function x1e(t,i){if(t&1&&(h(0,"span"),y(1),_()),t&2){let e=M().$index,n=M(2);p(),ee(" ",n.dataObject.data[0].row[e]," ")}}function M1e(t,i){if(t&1&&(h(0,"span"),y(1),S(2,"formatNumber"),_()),t&2){let e=M().$index,n=M(2);p(),ee(" ",k(2,1,n.dataObject.data[0].row[e])," ")}}function w1e(t,i){if(t&1&&(h(0,"span"),y(1),_()),t&2){let e=M(),n=e.$implicit,o=e.$index,r=M(2);p(),ee(" ",r.datatables.getCodeLookupValue(n,r.dataObject.data[0].row[o])," ")}}function D1e(t,i){if(t&1&&(h(0,"span",13),y(1),_()),t&2){let e=M().$index,n=M(2);p(),ee(" ",n.dataObject.data[0].row[e]," ")}}function S1e(t,i){if(t&1&&(h(0,"textarea",14),S(1,"prettyPrint"),y(2," "),_()),t&2){let e=M().$index,n=M(2);D("innerHTML",k(1,1,n.dataObject.data[0].row[e].value),jc)}}function k1e(t,i){if(t&1){let e=le();h(0,"span",15)(1,"button",16),S(2,"translate"),N("click",function(){G(e);let o=M(2).$index,r=M(2);return W(r.openSite(r.dataObject.data[0].row[o]))}),F(3,"fa-icon",17),_()()}t&2&&(p(),D("matTooltip",Ft(k(2,2,"tooltips.View Link"))))}function E1e(t,i){if(t&1&&(h(0,"span"),E(1,k1e,4,4,"span",15),y(2),_()),t&2){let e=M().$index,n=M(2);p(),I(n.isValidUrl(n.dataObject.data[0].row[e])?1:-1),p(),ee(" ",n.dataObject.data[0].row[e]," ")}}function I1e(t,i){if(t&1&&(h(0,"div",10)(1,"div",11),y(2),_(),h(3,"div",12),E(4,y1e,3,3,"span")(5,C1e,3,3,"span")(6,x1e,2,1,"span")(7,M1e,3,3,"span")(8,w1e,2,1,"span")(9,D1e,2,1,"span",13)(10,S1e,3,3,"textarea",14)(11,E1e,3,2,"span"),_()()),t&2){let e,n=i.$implicit,o=M(2);D("ngClass",o.setAttributeClass(n.columnName)),p(2),ee(" ",o.datatables.toDisplayLabel(n.columnName)," "),p(2),I((e=o.getColumnType(n.columnDisplayType,n.columnType))==="DATE"?4:e==="DATETIME"?5:e==="INTEGER"?6:e==="DECIMAL"?7:e==="CODELOOKUP"?8:e==="TEXT"?9:e==="JSON"?10:11)}}function O1e(t,i){if(t&1&&(h(0,"div",4),Xe(1,I1e,12,3,"div",10,ht),_()),t&2){let e=M();p(),Ze(e.dataObject.columnHeaders)}}var Bh=(()=>{class t{constructor(){this.route=d(ro),this.dateUtils=d(go),this.dialog=d(Wi),this.settingsService=d(Xt),this.datatables=d(Fh),this.systemService=d(O2)}ngOnInit(){this.route.params.subscribe(e=>{this.datatableName=e.datatableName})}add(){let e={locale:this.settingsService.language.code},n=[],o=this.datatables.filterSystemColumns(this.dataObject.columnHeaders),r=this.datatables.getFormfields(o,n,e),a={title:"Add "+this.datatableName+" for "+this.entityType,formfields:r};this.dialog.open(es,{data:a,width:"50rem"}).afterClosed().subscribe(c=>{c.data&&(n.forEach(m=>{c.data.value[m]=this.dateUtils.formatDate(c.data.value[m],e.dateFormat)}),e=q(q({},c.data.value),e),this.systemService.addEntityDatatableEntry(this.entityId,this.datatableName,e).subscribe(()=>{this.systemService.getEntityDatatable(this.entityId,this.datatableName).subscribe(m=>{this.dataObject=m})}))})}edit(){let e={locale:this.settingsService.language.code},n=[],o=this.datatables.filterSystemColumns(this.dataObject.columnHeaders),r=this.datatables.getFormfields(o,n,e);r=r.map((c,m)=>(c.controlType==="datepicker"?c.value=this.dataObject.data[0].row[o[m].idx]?this.dateUtils.parseDate(this.dataObject.data[0].row[o[m].idx]):"":c.controlType==="datetimepicker"?c.value=this.dataObject.data[0].row[o[m].idx]?this.dateUtils.parseDatetime(this.dataObject.data[0].row[o[m].idx]):"":c.value=this.dataObject.data[0].row[o[m].idx]?this.dataObject.data[0].row[o[m].idx]:"",c));let a={title:"Edit "+this.datatableName+" for "+this.entityType,formfields:r,layout:{addButtonText:"Submit"},pristine:!1};this.dialog.open(es,{data:a,width:"50rem"}).afterClosed().subscribe(c=>{c.data&&(n.forEach(m=>{c.data.value[m]=this.dateUtils.formatDate(c.data.value[m],e.dateFormat)}),e=q(q({},c.data.value),e),this.systemService.editEntityDatatableEntry(this.entityId,this.datatableName,e).subscribe(()=>{this.systemService.getEntityDatatable(this.entityId,this.datatableName).subscribe(m=>{this.dataObject=m})}))})}delete(){this.dialog.open(Rr,{data:{deleteContext:` the contents of ${this.datatableName}`}}).afterClosed().subscribe(n=>{n.delete&&this.systemService.deleteDatatableContent(this.entityId,this.datatableName).subscribe(()=>{this.systemService.getEntityDatatable(this.entityId,this.datatableName).subscribe(o=>{this.dataObject=o})})})}setAttributeClass(e){return this.datatables.isSystemDefined(e)?"system-defined":"table-data"}getColumnType(e,n){switch(e){case"DATE":return e;case"DATETIME":return e;case"INTEGER":return e;case"DECIMAL":return e;case"CODELOOKUP":return e;case"TEXT":return n==="JSON"?"JSON":e;default:return e}}getInputName(e){return this.datatables.getName(e)}isValidUrl(e){return this.datatables.isValidUrl(e)}openSite(e){window.open(e,"_blank")}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275cmp=P({type:t,selectors:[["mifosx-datatable-single-row"]],inputs:{dataObject:"dataObject",entityId:"entityId",entityType:"entityType"},decls:9,vars:5,consts:[[1,"tab-container","mat-typography"],[1,"layout-row","align-end","m-b-20"],["mat-raised-button","","color","primary"],["mat-raised-button","","color","warn",1,"delete-button"],[1,"m-t-10"],["mat-raised-button","","color","primary",3,"click"],["icon","plus",1,"m-r-10"],["icon","edit",1,"m-r-10"],["mat-raised-button","","color","warn",1,"delete-button",3,"click"],["icon","trash",1,"m-r-10"],[1,"flex-fill",3,"ngClass"],[1,"mat-body-strong","left","flex-40"],[1,"right","flex-60"],[1,"long-text"],["cdkTextareaAutosize","true","cdkAutosizeMaxRows","20","cdkAutosizeMinRows","1",1,"json-textarea",3,"innerHTML"],[1,"m-r-5"],["mat-icon-button","","matTooltipPosition","right",1,"small-icon",3,"click","matTooltip"],["icon","eye","size","lg"]],template:function(n,o){n&1&&(h(0,"div",0)(1,"h3"),y(2),_(),h(3,"div",1),E(4,_1e,4,3,"button",2),E(5,b1e,4,3,"button",2),E(6,v1e,4,3,"button",3),_(),F(7,"mat-divider"),E(8,O1e,3,0,"div",4),_()),n&2&&(p(2),T(o.datatableName),p(2),I(o.dataObject.data[0]?-1:4),p(),I(o.dataObject.data[0]?5:-1),p(),I(o.dataObject.data[0]?6:-1),p(2),I(o.dataObject.data.length>0?8:-1))},dependencies:[he,Un,ve,vt,Yt,rc,nf,ni,mo,Lo,Te,ca,Ts,Ym],styles:["body[_ngcontent-%COMP%] table[_ngcontent-%COMP%] tbody[_ngcontent-%COMP%] tr[_ngcontent-%COMP%]:nth-child(2n){background-color:#f2f2f2}.bg-black[_ngcontent-%COMP%]{background-color:#000}.bg-light-grey[_ngcontent-%COMP%]{background-color:#e5e5e5}.bg-medium-grey[_ngcontent-%COMP%]{background-color:#ccc}.bg-grey[_ngcontent-%COMP%]{background-color:#999}.bg-dark-grey[_ngcontent-%COMP%]{background-color:#222}.bg-white[_ngcontent-%COMP%], .bg-fff[_ngcontent-%COMP%]{background-color:#fff}.bg-none[_ngcontent-%COMP%], .no-bg[_ngcontent-%COMP%]{background:none;background-image:none;background-color:transparent}.bg-facebook[_ngcontent-%COMP%]{background-color:#47639e}.bg-twitter[_ngcontent-%COMP%]{background-color:#02a8f3}body[_ngcontent-%COMP%] table[_ngcontent-%COMP%]{border:1px solid rgba(0,0,0,.12)}.no-border[_ngcontent-%COMP%]{border:none}.no-border-t[_ngcontent-%COMP%]{border-top:none}.no-border-r[_ngcontent-%COMP%]{border-right:none}.no-border-b[_ngcontent-%COMP%]{border-bottom:none}.no-border-l[_ngcontent-%COMP%]{border-left:none}.no-border-lr[_ngcontent-%COMP%], .no-border-rl[_ngcontent-%COMP%]{border-left:none;border-right:none}.no-border-tb[_ngcontent-%COMP%], .no-border-bt[_ngcontent-%COMP%]{border-top:none;border-bottom:none}.no-border-tl[_ngcontent-%COMP%], .no-border-lt[_ngcontent-%COMP%]{border-top:none;border-left:none}.no-border-tr[_ngcontent-%COMP%], .no-border-rt[_ngcontent-%COMP%]{border-top:none;border-right:none}.no-border-bl[_ngcontent-%COMP%], .no-border-lb[_ngcontent-%COMP%]{border-bottom:none;border-left:none}.no-border-br[_ngcontent-%COMP%], .no-border-rb[_ngcontent-%COMP%]{border-bottom:none;border-right:none}.border-dashed[_ngcontent-%COMP%], .border-dotted[_ngcontent-%COMP%]{border-style:dashed}.border-black[_ngcontent-%COMP%]{border-color:#000}.border-light-grey[_ngcontent-%COMP%]{border-color:#e5e5e5}.border-medium-grey[_ngcontent-%COMP%]{border-color:#ccc}.border-grey[_ngcontent-%COMP%]{border-color:#999}.border-dark-grey[_ngcontent-%COMP%]{border-color:#2222}.border-white[_ngcontent-%COMP%], .border-fff[_ngcontent-%COMP%]{border-color:#fff}.no-border-radius[_ngcontent-%COMP%]{border-radius:0}.radius3[_ngcontent-%COMP%]{border-radius:3px}.radius5[_ngcontent-%COMP%]{border-radius:5px}.radius10[_ngcontent-%COMP%]{border-radius:10px}.column-mandatory[_ngcontent-%COMP%]{color:#5cb85c;text-align:center}.not-column-mandatory[_ngcontent-%COMP%]{color:#666f73;text-align:center}.cdk-drag-placeholder[_ngcontent-%COMP%]{background:#3498db}.yes[_ngcontent-%COMP%]{color:#5cb85c!important;background-color:#5cb85c;height:4px;cursor:none}.no[_ngcontent-%COMP%]{color:red;background-color:red;height:4px;cursor:none}.strike[_ngcontent-%COMP%]{text-decoration:line-through;color:red}.transfer[_ngcontent-%COMP%]{color:#16a085}.linked[_ngcontent-%COMP%]{color:#4461e2}.accrual[_ngcontent-%COMP%]{color:#999}.fa-question[_ngcontent-%COMP%]{color:#4461e2}.enabled[_ngcontent-%COMP%]{color:#32cd32}.disabled[_ngcontent-%COMP%]{color:#f44366}.v-mid[_ngcontent-%COMP%], .v-m[_ngcontent-%COMP%]{vertical-align:middle}.v-top[_ngcontent-%COMP%], .v-t[_ngcontent-%COMP%]{vertical-align:top}.v-bottom[_ngcontent-%COMP%], .v-b[_ngcontent-%COMP%]{vertical-align:bottom}.v-super[_ngcontent-%COMP%]{vertical-align:super}.r-amount[_ngcontent-%COMP%]{text-align:right!important;padding-right:5px!important}.left[_ngcontent-%COMP%]{text-align:left!important}.right[_ngcontent-%COMP%]{text-align:right!important}.center[_ngcontent-%COMP%]{text-align:center!important}.amount-plus[_ngcontent-%COMP%]{color:#000}.amount-minus[_ngcontent-%COMP%]{color:#4461e2}.block[_ngcontent-%COMP%]{display:block}.inline[_ngcontent-%COMP%]{display:inline}.in-block[_ngcontent-%COMP%]{display:inline-block;zoom:1}.d-none[_ngcontent-%COMP%], .hide[_ngcontent-%COMP%], .hidden[_ngcontent-%COMP%]{display:none}.t-0[_ngcontent-%COMP%]{top:0}.b-0[_ngcontent-%COMP%]{bottom:0}.l-0[_ngcontent-%COMP%]{left:0}.r-0[_ngcontent-%COMP%]{right:0}.tb-0[_ngcontent-%COMP%]{top:0;bottom:0}.lr-0[_ngcontent-%COMP%]{left:0;right:0}.f-left[_ngcontent-%COMP%]{float:left}.f-right[_ngcontent-%COMP%]{float:right}.f-none[_ngcontent-%COMP%]{float:none}textarea[_ngcontent-%COMP%]{resize:both}textarea.vertical[_ngcontent-%COMP%], textarea.horizontal[_ngcontent-%COMP%]{resize:vertical}textarea.noresize[_ngcontent-%COMP%]{resize:none}.full-input[_ngcontent-%COMP%] input[_ngcontent-%COMP%], .full-input[_ngcontent-%COMP%] select[_ngcontent-%COMP%], .full-input[_ngcontent-%COMP%] textarea[_ngcontent-%COMP%]{width:100%}.normal[_ngcontent-%COMP%] input[_ngcontent-%COMP%], .normal[_ngcontent-%COMP%] select[_ngcontent-%COMP%], .normal[_ngcontent-%COMP%] textarea[_ngcontent-%COMP%], .full-input[_ngcontent-%COMP%] [type=checkbox][_ngcontent-%COMP%], .full-input[_ngcontent-%COMP%] [type=radio][_ngcontent-%COMP%]{width:auto}.mat-tab-body-content[_ngcontent-%COMP%]{margin-bottom:20px}.mat-datepicker-input[_ngcontent-%COMP%]{margin-top:5px;margin-bottom:5px}.loader-wrapper[_ngcontent-%COMP%]{height:100vh;width:100vw}.loader-wrapper[_ngcontent-%COMP%] .triangle[_ngcontent-%COMP%]{width:0;height:0;border-style:solid;position:absolute;animation:_ngcontent-%COMP%_rotate .8s infinite .2s}.loader-wrapper[_ngcontent-%COMP%] .bottom[_ngcontent-%COMP%]{border-width:0 90px 90px;border-color:transparent transparent #1fb050;bottom:calc(50% - 100px);left:calc(50% - 90px)}.loader-wrapper[_ngcontent-%COMP%] .top[_ngcontent-%COMP%]{border-width:90px 90px 0;border-color:#b4d575 transparent transparent;top:calc(50% - 100px);left:calc(50% - 90px)}.loader-wrapper[_ngcontent-%COMP%] .left[_ngcontent-%COMP%]{border-width:90px 0 90px 90px;border-color:transparent transparent transparent #1074b9;top:calc(50% - 90px);left:calc(50% - 100px)}.loader-wrapper[_ngcontent-%COMP%] .right[_ngcontent-%COMP%]{border-width:90px 90px 90px 0;border-color:transparent #1daeec transparent transparent;top:calc(50% - 90px);right:calc(50% - 100px)}@keyframes _ngcontent-%COMP%_rotate{0%{transform:rotate(0)}to{transform:rotate(360deg)}}body[_ngcontent-%COMP%]{margin:0}.container[_ngcontent-%COMP%]{margin:0 auto}.mb-05[_ngcontent-%COMP%]{margin-bottom:.5rem}.mr-05[_ngcontent-%COMP%]{margin-right:.5rem}.mb-1[_ngcontent-%COMP%]{margin-bottom:1rem}.mt-1[_ngcontent-%COMP%]{margin-top:1rem}.m-5[_ngcontent-%COMP%]{margin:5px}.m-t-5[_ngcontent-%COMP%]{margin-top:5px}.m-r-5[_ngcontent-%COMP%]{margin-right:5px}.m-b-5[_ngcontent-%COMP%]{margin-bottom:5px}.m-l-5[_ngcontent-%COMP%]{margin-left:5px}.m-v-5[_ngcontent-%COMP%]{margin:5px 0}.m-h-5[_ngcontent-%COMP%]{margin:0 5px}.m-10[_ngcontent-%COMP%]{margin:10px}.m-t-10[_ngcontent-%COMP%]{margin-top:10px}.m-r-10[_ngcontent-%COMP%]{margin-right:10px}.m-b-10[_ngcontent-%COMP%]{margin-bottom:10px}.m-l-10[_ngcontent-%COMP%]{margin-left:10px}.m-v-10[_ngcontent-%COMP%]{margin:10px 0}.m-h-10[_ngcontent-%COMP%]{margin:0 10px}.m-15[_ngcontent-%COMP%]{margin:15px}.m-t-15[_ngcontent-%COMP%]{margin-top:15px}.m-r-15[_ngcontent-%COMP%]{margin-right:15px}.m-b-15[_ngcontent-%COMP%]{margin-bottom:15px}.m-l-15[_ngcontent-%COMP%]{margin-left:15px}.m-v-15[_ngcontent-%COMP%]{margin:15px 0}.m-h-15[_ngcontent-%COMP%]{margin:0 15px}.m-20[_ngcontent-%COMP%]{margin:20px}.m-t-20[_ngcontent-%COMP%]{margin-top:20px}.m-r-20[_ngcontent-%COMP%]{margin-right:20px}.m-b-20[_ngcontent-%COMP%]{margin-bottom:20px}.m-l-20[_ngcontent-%COMP%]{margin-left:20px}.m-v-20[_ngcontent-%COMP%]{margin:20px 0}.m-h-20[_ngcontent-%COMP%]{margin:0 20px}.m-25[_ngcontent-%COMP%]{margin:25px}.m-t-25[_ngcontent-%COMP%]{margin-top:25px}.m-r-25[_ngcontent-%COMP%]{margin-right:25px}.m-b-25[_ngcontent-%COMP%]{margin-bottom:25px}.m-l-25[_ngcontent-%COMP%]{margin-left:25px}.m-v-25[_ngcontent-%COMP%]{margin:25px 0}.m-h-25[_ngcontent-%COMP%]{margin:0 25px}.m-30[_ngcontent-%COMP%]{margin:30px}.m-t-30[_ngcontent-%COMP%]{margin-top:30px}.m-r-30[_ngcontent-%COMP%]{margin-right:30px}.m-b-30[_ngcontent-%COMP%]{margin-bottom:30px}.m-l-30[_ngcontent-%COMP%]{margin-left:30px}.m-v-30[_ngcontent-%COMP%]{margin:30px 0}.m-h-30[_ngcontent-%COMP%]{margin:0 30px}.m-35[_ngcontent-%COMP%]{margin:35px}.m-t-35[_ngcontent-%COMP%]{margin-top:35px}.m-r-35[_ngcontent-%COMP%]{margin-right:35px}.m-b-35[_ngcontent-%COMP%]{margin-bottom:35px}.m-l-35[_ngcontent-%COMP%]{margin-left:35px}.m-v-35[_ngcontent-%COMP%]{margin:35px 0}.m-h-35[_ngcontent-%COMP%]{margin:0 35px}.m-40[_ngcontent-%COMP%]{margin:40px}.m-t-40[_ngcontent-%COMP%]{margin-top:40px}.m-r-40[_ngcontent-%COMP%]{margin-right:40px}.m-b-40[_ngcontent-%COMP%]{margin-bottom:40px}.m-l-40[_ngcontent-%COMP%]{margin-left:40px}.m-v-40[_ngcontent-%COMP%]{margin:40px 0}.m-h-40[_ngcontent-%COMP%]{margin:0 40px}.m-45[_ngcontent-%COMP%]{margin:45px}.m-t-45[_ngcontent-%COMP%]{margin-top:45px}.m-r-45[_ngcontent-%COMP%]{margin-right:45px}.m-b-45[_ngcontent-%COMP%]{margin-bottom:45px}.m-l-45[_ngcontent-%COMP%]{margin-left:45px}.m-v-45[_ngcontent-%COMP%]{margin:45px 0}.m-h-45[_ngcontent-%COMP%]{margin:0 45px}.m-50[_ngcontent-%COMP%]{margin:50px}.m-t-50[_ngcontent-%COMP%]{margin-top:50px}.m-r-50[_ngcontent-%COMP%]{margin-right:50px}.m-b-50[_ngcontent-%COMP%]{margin-bottom:50px}.m-l-50[_ngcontent-%COMP%]{margin-left:50px}.m-v-50[_ngcontent-%COMP%]{margin:50px 0}.m-h-50[_ngcontent-%COMP%]{margin:0 50px}.m-55[_ngcontent-%COMP%]{margin:55px}.m-t-55[_ngcontent-%COMP%]{margin-top:55px}.m-r-55[_ngcontent-%COMP%]{margin-right:55px}.m-b-55[_ngcontent-%COMP%]{margin-bottom:55px}.m-l-55[_ngcontent-%COMP%]{margin-left:55px}.m-v-55[_ngcontent-%COMP%]{margin:55px 0}.m-h-55[_ngcontent-%COMP%]{margin:0 55px}.m-60[_ngcontent-%COMP%]{margin:60px}.m-t-60[_ngcontent-%COMP%]{margin-top:60px}.m-r-60[_ngcontent-%COMP%]{margin-right:60px}.m-b-60[_ngcontent-%COMP%]{margin-bottom:60px}.m-l-60[_ngcontent-%COMP%]{margin-left:60px}.m-v-60[_ngcontent-%COMP%]{margin:60px 0}.m-h-60[_ngcontent-%COMP%]{margin:0 60px}.m-65[_ngcontent-%COMP%]{margin:65px}.m-t-65[_ngcontent-%COMP%]{margin-top:65px}.m-r-65[_ngcontent-%COMP%]{margin-right:65px}.m-b-65[_ngcontent-%COMP%]{margin-bottom:65px}.m-l-65[_ngcontent-%COMP%]{margin-left:65px}.m-v-65[_ngcontent-%COMP%]{margin:65px 0}.m-h-65[_ngcontent-%COMP%]{margin:0 65px}.m-70[_ngcontent-%COMP%]{margin:70px}.m-t-70[_ngcontent-%COMP%]{margin-top:70px}.m-r-70[_ngcontent-%COMP%]{margin-right:70px}.m-b-70[_ngcontent-%COMP%]{margin-bottom:70px}.m-l-70[_ngcontent-%COMP%]{margin-left:70px}.m-v-70[_ngcontent-%COMP%]{margin:70px 0}.m-h-70[_ngcontent-%COMP%]{margin:0 70px}.m-75[_ngcontent-%COMP%]{margin:75px}.m-t-75[_ngcontent-%COMP%]{margin-top:75px}.m-r-75[_ngcontent-%COMP%]{margin-right:75px}.m-b-75[_ngcontent-%COMP%]{margin-bottom:75px}.m-l-75[_ngcontent-%COMP%]{margin-left:75px}.m-v-75[_ngcontent-%COMP%]{margin:75px 0}.m-h-75[_ngcontent-%COMP%]{margin:0 75px}.m-80[_ngcontent-%COMP%]{margin:80px}.m-t-80[_ngcontent-%COMP%]{margin-top:80px}.m-r-80[_ngcontent-%COMP%]{margin-right:80px}.m-b-80[_ngcontent-%COMP%]{margin-bottom:80px}.m-l-80[_ngcontent-%COMP%]{margin-left:80px}.m-v-80[_ngcontent-%COMP%]{margin:80px 0}.m-h-80[_ngcontent-%COMP%]{margin:0 80px}.no-m[_ngcontent-%COMP%]{margin:0}.no-m-t[_ngcontent-%COMP%]{margin-top:0}.no-m-r[_ngcontent-%COMP%]{margin-right:0}.no-m-b[_ngcontent-%COMP%]{margin-bottom:0}.no-m-l[_ngcontent-%COMP%]{margin-left:0}.no-m-v[_ngcontent-%COMP%], .no-m-h[_ngcontent-%COMP%], .no-margin[_ngcontent-%COMP%]{margin:0}.no-m-lr[_ngcontent-%COMP%], .no-m-rl[_ngcontent-%COMP%]{margin-left:0;margin-right:0}.no-m-tb[_ngcontent-%COMP%], .no-m-bt[_ngcontent-%COMP%]{margin-top:0;margin-bottom:0}.m-t-only[_ngcontent-%COMP%]{margin-left:0;margin-right:0;margin-bottom:0}.m-b-only[_ngcontent-%COMP%]{margin-left:0;margin-right:0;margin-top:0}.m-l-only[_ngcontent-%COMP%]{margin-right:0;margin-top:0;margin-bottom:0}.m-r-only[_ngcontent-%COMP%]{margin-left:0;margin-top:0;margin-bottom:0}.m-auto[_ngcontent-%COMP%]{margin-left:auto;margin-right:auto}.ls-0[_ngcontent-%COMP%]{margin-left:10px;margin-right:10px}html[_ngcontent-%COMP%], body[_ngcontent-%COMP%]{-webkit-tap-highlight-color:transparent}div[_ngcontent-%COMP%]{box-sizing:border-box}.color-inherit[_ngcontent-%COMP%]{color:inherit}.no-shadow[_ngcontent-%COMP%]{box-shadow:none}.pointer[_ngcontent-%COMP%]{cursor:pointer}.nolist[_ngcontent-%COMP%]{list-style:none}.actions-menu[_ngcontent-%COMP%]{color:#fff}.alert[_ngcontent-%COMP%]{background-color:#e8f4fd;padding:6px 16px;font-size:.875rem;font-family:Roboto,Helvetica Neue,sans-serif;font-weight:400;line-height:1.43;border-radius:4px;letter-spacing:normal;margin:10px}.alert[_ngcontent-%COMP%] .message[_ngcontent-%COMP%]{padding:8px 0;font-size:18px}.alert[_ngcontent-%COMP%] .alert-check[_ngcontent-%COMP%]{color:#359ff4;margin-right:2px;font-size:1.4rem} .mat-tooltip{font-size:15px;color:#fff!important;background-color:#4461e2b3;border:1px solid rgb(25.7777777778,51.5555555556,166.2222222222);max-width:400px!important;white-space:pre-line!important}.loading[_ngcontent-%COMP%]{position:absolute;min-width:100%;width:100px;height:12px;background:linear-gradient(125deg,#fff,#4461e2,#fff);animation:grow 4s linear infinite,move 4s linear infinite}mat-card-title[_ngcontent-%COMP%]{font-weight:600;font-size:x-large;padding-left:20px;padding-top:20px}html[_ngcontent-%COMP%], body[_ngcontent-%COMP%]{overflow:hidden}.overflow-x-scroll[_ngcontent-%COMP%]{max-width:100%;overflow-x:auto}.overflow-no[_ngcontent-%COMP%]{overflow:hidden}.overflow-auto[_ngcontent-%COMP%]{overflow:auto}.overflow-scroll[_ngcontent-%COMP%]{overflow:scroll}.table-container[_ngcontent-%COMP%]{overflow-x:auto;max-width:100%}body[_ngcontent-%COMP%], .no-p[_ngcontent-%COMP%]{padding:0}.no-p-t[_ngcontent-%COMP%]{padding-top:0}.no-p-r[_ngcontent-%COMP%]{padding-right:0}.no-p-b[_ngcontent-%COMP%]{padding-bottom:0}.no-p-l[_ngcontent-%COMP%]{padding-left:0}.no-p-v[_ngcontent-%COMP%], .no-p-h[_ngcontent-%COMP%]{padding:0}.p-5[_ngcontent-%COMP%]{padding:5px}.p-t-5[_ngcontent-%COMP%]{padding-top:5px}.p-r-5[_ngcontent-%COMP%]{padding-right:5px}.p-b-5[_ngcontent-%COMP%]{padding-bottom:5px}.p-l-5[_ngcontent-%COMP%]{padding-left:5px}.p-v-5[_ngcontent-%COMP%]{padding:5px 0}.p-h-5[_ngcontent-%COMP%]{padding:0 5px}.p-10[_ngcontent-%COMP%]{padding:10px}.p-t-10[_ngcontent-%COMP%]{padding-top:10px}.p-b-10[_ngcontent-%COMP%]{padding-bottom:10px}.p-v-10[_ngcontent-%COMP%]{padding:10px 0}.p-h-10[_ngcontent-%COMP%]{padding:0 10px}.p-15[_ngcontent-%COMP%]{padding:15px}.p-t-15[_ngcontent-%COMP%]{padding-top:15px}.p-r-15[_ngcontent-%COMP%]{padding-right:15px}.p-b-15[_ngcontent-%COMP%]{padding-bottom:15px}.p-l-15[_ngcontent-%COMP%]{padding-left:15px}.p-v-15[_ngcontent-%COMP%]{padding:15px 0}.p-h-15[_ngcontent-%COMP%]{padding:0 15px}.p-20[_ngcontent-%COMP%]{padding:20px}.p-t-20[_ngcontent-%COMP%]{padding-top:20px}.p-r-20[_ngcontent-%COMP%]{padding-right:20px}.p-b-20[_ngcontent-%COMP%]{padding-bottom:20px}.p-l-20[_ngcontent-%COMP%]{padding-left:20px}.p-v-20[_ngcontent-%COMP%]{padding:20px 0}.p-h-20[_ngcontent-%COMP%]{padding:0 20px}.p-25[_ngcontent-%COMP%]{padding:25px}.p-t-25[_ngcontent-%COMP%]{padding-top:25px}.p-r-25[_ngcontent-%COMP%]{padding-right:25px}.p-b-25[_ngcontent-%COMP%]{padding-bottom:25px}.p-l-25[_ngcontent-%COMP%]{padding-left:25px}.p-v-25[_ngcontent-%COMP%]{padding:25px 0}.p-h-25[_ngcontent-%COMP%]{padding:0 25px}.p-30[_ngcontent-%COMP%]{padding:30px}.p-t-30[_ngcontent-%COMP%]{padding-top:30px}.p-r-30[_ngcontent-%COMP%]{padding-right:30px}.p-b-30[_ngcontent-%COMP%]{padding-bottom:30px}.p-l-30[_ngcontent-%COMP%]{padding-left:30px}.p-v-30[_ngcontent-%COMP%]{padding:30px 0}.p-h-30[_ngcontent-%COMP%]{padding:0 30px}.p-35[_ngcontent-%COMP%]{padding:35px}.p-t-35[_ngcontent-%COMP%]{padding-top:35px}.p-r-35[_ngcontent-%COMP%]{padding-right:35px}.p-b-35[_ngcontent-%COMP%]{padding-bottom:35px}.p-l-35[_ngcontent-%COMP%]{padding-left:35px}.p-v-35[_ngcontent-%COMP%]{padding:35px 0}.p-h-35[_ngcontent-%COMP%]{padding:0 35px}.p-40[_ngcontent-%COMP%]{padding:40px}.p-t-40[_ngcontent-%COMP%]{padding-top:40px}.p-r-40[_ngcontent-%COMP%]{padding-right:40px}.p-b-40[_ngcontent-%COMP%]{padding-bottom:40px}.p-l-40[_ngcontent-%COMP%]{padding-left:40px}.p-v-40[_ngcontent-%COMP%]{padding-top:40px;padding-bottom:40px}.p-h-40[_ngcontent-%COMP%]{padding:0 40px}.p-45[_ngcontent-%COMP%]{padding:45px}.p-t-45[_ngcontent-%COMP%]{padding-top:45px}.p-r-45[_ngcontent-%COMP%]{padding-right:45px}.p-b-45[_ngcontent-%COMP%]{padding-bottom:45px}.p-l-45[_ngcontent-%COMP%]{padding-left:45px}.p-v-45[_ngcontent-%COMP%]{padding:45px 0}.p-h-45[_ngcontent-%COMP%]{padding:0 45px}.p-50[_ngcontent-%COMP%]{padding:50px}.p-t-50[_ngcontent-%COMP%]{padding-top:50px}.p-r-50[_ngcontent-%COMP%]{padding-right:50px}.p-b-50[_ngcontent-%COMP%]{padding-bottom:50px}.p-l-50[_ngcontent-%COMP%]{padding-left:50px}.p-v-50[_ngcontent-%COMP%]{padding:50px 0}.p-h-50[_ngcontent-%COMP%]{padding:0 50px}.p-55[_ngcontent-%COMP%]{padding:55px}.p-t-55[_ngcontent-%COMP%]{padding-top:55px}.p-r-55[_ngcontent-%COMP%]{padding-right:55px}.p-b-55[_ngcontent-%COMP%]{padding-bottom:55px}.p-l-55[_ngcontent-%COMP%]{padding-left:55px}.p-v-55[_ngcontent-%COMP%]{padding:55px 0}.p-h-55[_ngcontent-%COMP%]{padding:0 55px}.p-60[_ngcontent-%COMP%]{padding:60px}.p-t-60[_ngcontent-%COMP%]{padding-top:60px}.p-r-60[_ngcontent-%COMP%]{padding-right:60px}.p-b-60[_ngcontent-%COMP%]{padding-bottom:60px}.p-l-60[_ngcontent-%COMP%]{padding-left:60px}.p-v-60[_ngcontent-%COMP%]{padding:60px 0}.p-h-60[_ngcontent-%COMP%]{padding:0 60px}.p-65[_ngcontent-%COMP%]{padding:65px}.p-t-65[_ngcontent-%COMP%]{padding-top:65px}.p-r-65[_ngcontent-%COMP%]{padding-right:65px}.p-b-65[_ngcontent-%COMP%]{padding-bottom:65px}.p-l-65[_ngcontent-%COMP%]{padding-left:65px}.p-v-65[_ngcontent-%COMP%]{padding:65px 0}.p-h-65[_ngcontent-%COMP%]{padding:0 65px}.p-70[_ngcontent-%COMP%]{padding:70px}.p-t-70[_ngcontent-%COMP%]{padding-top:70px}.p-r-70[_ngcontent-%COMP%]{padding-right:70px}.p-b-70[_ngcontent-%COMP%]{padding-bottom:70px}.p-l-70[_ngcontent-%COMP%]{padding-left:70px}.p-v-70[_ngcontent-%COMP%]{padding:70px 0}.p-h-70[_ngcontent-%COMP%]{padding:0 70px}.p-75[_ngcontent-%COMP%]{padding:75px}.p-t-75[_ngcontent-%COMP%]{padding-top:75px}.p-r-75[_ngcontent-%COMP%]{padding-right:75px}.p-b-75[_ngcontent-%COMP%]{padding-bottom:75px}.p-l-75[_ngcontent-%COMP%]{padding-left:75px}.p-v-75[_ngcontent-%COMP%]{padding:75px 0}.p-h-75[_ngcontent-%COMP%]{padding:0 75px}.p-80[_ngcontent-%COMP%]{padding:80px}.p-t-80[_ngcontent-%COMP%]{padding-top:80px}.p-r-80[_ngcontent-%COMP%]{padding-right:80px}.p-b-80[_ngcontent-%COMP%]{padding-bottom:80px}.p-l-80[_ngcontent-%COMP%]{padding-left:80px}.p-v-80[_ngcontent-%COMP%]{padding:80px 0}.p-h-80[_ngcontent-%COMP%]{padding:0 80px}.no-padding[_ngcontent-%COMP%]{padding:0!important}.no-pad-lr[_ngcontent-%COMP%], .no-pad-rl[_ngcontent-%COMP%]{padding-left:0;padding-right:0}.no-pad-tb[_ngcontent-%COMP%], .no-pad-bt[_ngcontent-%COMP%]{padding-top:0;padding-bottom:0}.pad-t-only[_ngcontent-%COMP%]{padding-left:0;padding-right:0;padding-bottom:0}.pad-b-only[_ngcontent-%COMP%]{padding-left:0;padding-right:0;padding-top:0}.pad-l-only[_ngcontent-%COMP%]{padding-right:0;padding-top:0;padding-bottom:0}.pad-r-only[_ngcontent-%COMP%]{padding-left:0;padding-top:0;padding-bottom:0}html[_ngcontent-%COMP%], body[_ngcontent-%COMP%], .rel[_ngcontent-%COMP%], .relative[_ngcontent-%COMP%]{position:relative}.abs[_ngcontent-%COMP%], .absolute[_ngcontent-%COMP%]{position:absolute}.fixed[_ngcontent-%COMP%]{position:fixed}.status-active[_ngcontent-%COMP%]{color:#5cb85c}.status-inactive[_ngcontent-%COMP%]{color:#666f73}.status-deleted[_ngcontent-%COMP%]{color:#000}.status-pending[_ngcontent-%COMP%]{color:orange}.status-approved[_ngcontent-%COMP%]{color:#4461e2}.status-overpaid[_ngcontent-%COMP%]{color:purple}.status-chargeoff[_ngcontent-%COMP%]{color:#f39c12}.status-active-overdue[_ngcontent-%COMP%], .status-block[_ngcontent-%COMP%]{color:red}.status-matured[_ngcontent-%COMP%]{color:#ff4000}.subStatus-contract-termination[_ngcontent-%COMP%]{color:#b3b3b3}.mat-step-header[_ngcontent-%COMP%] .mat-step-icon-state-done[_ngcontent-%COMP%]{background-color:#2af72a}.mat-step-header[_ngcontent-%COMP%] .mat-step-icon-state-done[_ngcontent-%COMP%] .status-transfer-progress[_ngcontent-%COMP%]{color:#ff4000}.mat-step-header[_ngcontent-%COMP%] .mat-step-icon-state-done[_ngcontent-%COMP%] .status-transfer-hold[_ngcontent-%COMP%]{color:#df0101}html[_ngcontent-%COMP%], body[_ngcontent-%COMP%]{-webkit-font-smoothing:antialiased}html[_ngcontent-%COMP%]{font-size:16px}body[_ngcontent-%COMP%]{font-family:Roboto,Helvetica Neue,sans-serif;font-weight:400;font-size:14px;color:#000000de;line-height:1.5;letter-spacing:normal}.mat-h1[_ngcontent-%COMP%], .mat-headline[_ngcontent-%COMP%], .mat-typography[_ngcontent-%COMP%] .mat-h1[_ngcontent-%COMP%], .mat-typography[_ngcontent-%COMP%] .mat-headline[_ngcontent-%COMP%], .mat-typography[_ngcontent-%COMP%] h1[_ngcontent-%COMP%]{font:400 24px/32px Roboto,Helvetica Neue,sans-serif;letter-spacing:normal;margin:0 0 16px}.lh-1[_ngcontent-%COMP%]{line-height:1}.lh-13[_ngcontent-%COMP%]{line-height:1.3}.lh-15[_ngcontent-%COMP%]{line-height:1.5}.bold[_ngcontent-%COMP%], .strong[_ngcontent-%COMP%]{font-weight:700}.no-bold[_ngcontent-%COMP%]{font-weight:400}.italic[_ngcontent-%COMP%], .em[_ngcontent-%COMP%]{font-style:italic}.strike[_ngcontent-%COMP%]{text-decoration:line-through}.normal[_ngcontent-%COMP%]{font-weight:400;font-style:normal}.uppercase[_ngcontent-%COMP%]{text-transform:uppercase}.text-left[_ngcontent-%COMP%]{text-align:left}.text-center[_ngcontent-%COMP%]{text-align:center}.text-right[_ngcontent-%COMP%]{text-align:right}.w100[_ngcontent-%COMP%]{font-weight:100}.w200[_ngcontent-%COMP%]{font-weight:200}.w300[_ngcontent-%COMP%]{font-weight:300}.w400[_ngcontent-%COMP%]{font-weight:400}.w500[_ngcontent-%COMP%]{font-weight:500}.w600[_ngcontent-%COMP%]{font-weight:600}.w700[_ngcontent-%COMP%]{font-weight:700}.w800[_ngcontent-%COMP%]{font-weight:800}.w900[_ngcontent-%COMP%]{font-weight:900}.f9[_ngcontent-%COMP%]{font-size:9px}.f10[_ngcontent-%COMP%]{font-size:10px}.f11[_ngcontent-%COMP%]{font-size:11px}.f12[_ngcontent-%COMP%]{font-size:12px}.f13[_ngcontent-%COMP%]{font-size:13px}.f14[_ngcontent-%COMP%]{font-size:14px}.f15[_ngcontent-%COMP%]{font-size:15px}.f16[_ngcontent-%COMP%]{font-size:16px}.f17[_ngcontent-%COMP%]{font-size:17px}.f18[_ngcontent-%COMP%]{font-size:18px;line-height:30px}.f19[_ngcontent-%COMP%]{font-size:19px}.f20[_ngcontent-%COMP%]{font-size:20px}.f30[_ngcontent-%COMP%]{font-size:30px}.f40[_ngcontent-%COMP%]{font-size:40px}.f50[_ngcontent-%COMP%]{font-size:50px}.f60[_ngcontent-%COMP%]{font-size:60px}.size-small[_ngcontent-%COMP%]{font-size:75%}.size-normal[_ngcontent-%COMP%]{font-size:100%}.size-medium[_ngcontent-%COMP%]{font-size:125%}.size-big[_ngcontent-%COMP%], .size-large[_ngcontent-%COMP%]{font-size:150%}.size-huge[_ngcontent-%COMP%]{font-size:200%}.inherit[_ngcontent-%COMP%]{font:inherit}.text-shadow[_ngcontent-%COMP%]{text-shadow:1px 1px 1px rgba(0,0,0,.4)}.text-rgb-2[_ngcontent-%COMP%]{color:#0003}.text-rgb-3[_ngcontent-%COMP%]{color:#0000004d}.text-rgb-4[_ngcontent-%COMP%]{color:#0006}.text-rgb-5[_ngcontent-%COMP%]{color:#00000080}.no-ul[_ngcontent-%COMP%], .no-ul[_ngcontent-%COMP%]:hover, .no-ul[_ngcontent-%COMP%] a[_ngcontent-%COMP%], .no-ul[_ngcontent-%COMP%] a[_ngcontent-%COMP%]:hover{text-decoration:none}.no-wrap[_ngcontent-%COMP%]{white-space:nowrap}.auto-cell-size[_ngcontent-%COMP%]{white-space:nowrap;width:1%}.ls-0[_ngcontent-%COMP%]{letter-spacing:-3px;white-space:nowrap}.label-field[_ngcontent-%COMP%]{margin-top:32px}.wrap-content[_ngcontent-%COMP%]{overflow-wrap:break-word;word-wrap:break-word}.no-break-content[_ngcontent-%COMP%]{overflow-wrap:anywhere!important}.fit[_ngcontent-%COMP%]{max-width:100%}.half-width[_ngcontent-%COMP%]{width:50%}.full-width[_ngcontent-%COMP%]{width:100%}.full-height[_ngcontent-%COMP%]{height:100%}html[_ngcontent-%COMP%], body[_ngcontent-%COMP%]{width:100%;height:100%;min-height:100%}body[_ngcontent-%COMP%] table[_ngcontent-%COMP%]{width:100%}.container[_ngcontent-%COMP%]{max-width:74rem;width:90%}.mw300[_ngcontent-%COMP%]{max-width:300px}.mw400[_ngcontent-%COMP%]{max-width:400px}.mw500[_ngcontent-%COMP%]{max-width:500px}.mw600[_ngcontent-%COMP%]{max-width:600px}.fullwidth[_ngcontent-%COMP%]{width:100%}.zindex-1[_ngcontent-%COMP%]{z-index:1}.zindex-2[_ngcontent-%COMP%]{z-index:2}.zindex-3[_ngcontent-%COMP%]{z-index:3}.zindex-4[_ngcontent-%COMP%]{z-index:4}.tab-container[_ngcontent-%COMP%]{padding:1%;margin:1%}.tab-container[_ngcontent-%COMP%] .delete-button[_ngcontent-%COMP%]{margin-left:1%}.table-name[_ngcontent-%COMP%]{padding-left:2%}.table-data[_ngcontent-%COMP%], .system-defined[_ngcontent-%COMP%]{margin-top:3px}.long-text[_ngcontent-%COMP%]{word-break:break-all;white-space:normal}.small-icon[_ngcontent-%COMP%]{width:30px;height:30px}.json-textarea[_ngcontent-%COMP%]{width:100%;height:100%}"]})}}return t})();function T1e(t,i){if(t&1&&F(0,"mifosx-datatable-multi-row",0),t&2){let e=M();D("entityType",e.entityType)("entityId",e.entityId)("dataObject",e.entityDatatable)}}function P1e(t,i){if(t&1&&F(0,"mifosx-datatable-single-row",0),t&2){let e=M();D("entityType",e.entityType)("entityId",e.entityId)("dataObject",e.entityDatatable)}}var NR=(()=>{class t{constructor(){this.multiRowDatatableFlag=!1}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275cmp=P({type:t,selectors:[["mifosx-entity-datatable-tab"]],inputs:{multiRowDatatableFlag:"multiRowDatatableFlag",entityDatatable:"entityDatatable",entityType:"entityType",entityId:"entityId"},decls:3,vars:2,consts:[[3,"entityType","entityId","dataObject"]],template:function(n,o){n&1&&(h(0,"div"),E(1,T1e,1,3,"mifosx-datatable-multi-row",0),E(2,P1e,1,3,"mifosx-datatable-single-row",0),_()),n&2&&(p(),I(o.multiRowDatatableFlag?1:-1),p(),I(o.multiRowDatatableFlag?-1:2))},dependencies:[he,ve,Vh,Bh],encapsulation:2})}}return t})();var FR=(()=>{class t{constructor(){}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275cmp=P({type:t,selectors:[["mifosx-svg-icon"]],inputs:{iconFile:"iconFile",iconName:"iconName",iconClass:"iconClass",iconWidth:"iconWidth"},decls:2,vars:4,consts:[["preserveAspectRatio","xMidYMid meet",1,"icon",3,"ngClass"]],template:function(n,o){n&1&&($t(),h(0,"svg",0),F(1,"use"),_()),n&2&&(At("width",o.iconWidth,"px"),D("ngClass",o.iconClass),p(),ne("href","assets/images/icons_"+o.iconFile+".svg#"+o.iconName,null,"xlink"))},dependencies:[he,Un,ve],styles:["body[_ngcontent-%COMP%] table[_ngcontent-%COMP%] tbody[_ngcontent-%COMP%] tr[_ngcontent-%COMP%]:nth-child(2n){background-color:#f2f2f2}.bg-black[_ngcontent-%COMP%]{background-color:#000}.bg-light-grey[_ngcontent-%COMP%]{background-color:#e5e5e5}.bg-medium-grey[_ngcontent-%COMP%]{background-color:#ccc}.bg-grey[_ngcontent-%COMP%]{background-color:#999}.bg-dark-grey[_ngcontent-%COMP%]{background-color:#222}.bg-white[_ngcontent-%COMP%], .bg-fff[_ngcontent-%COMP%]{background-color:#fff}.bg-none[_ngcontent-%COMP%], .no-bg[_ngcontent-%COMP%]{background:none;background-image:none;background-color:transparent}.bg-facebook[_ngcontent-%COMP%]{background-color:#47639e}.bg-twitter[_ngcontent-%COMP%]{background-color:#02a8f3}body[_ngcontent-%COMP%] table[_ngcontent-%COMP%]{border:1px solid rgba(0,0,0,.12)}.no-border[_ngcontent-%COMP%]{border:none}.no-border-t[_ngcontent-%COMP%]{border-top:none}.no-border-r[_ngcontent-%COMP%]{border-right:none}.no-border-b[_ngcontent-%COMP%]{border-bottom:none}.no-border-l[_ngcontent-%COMP%]{border-left:none}.no-border-lr[_ngcontent-%COMP%], .no-border-rl[_ngcontent-%COMP%]{border-left:none;border-right:none}.no-border-tb[_ngcontent-%COMP%], .no-border-bt[_ngcontent-%COMP%]{border-top:none;border-bottom:none}.no-border-tl[_ngcontent-%COMP%], .no-border-lt[_ngcontent-%COMP%]{border-top:none;border-left:none}.no-border-tr[_ngcontent-%COMP%], .no-border-rt[_ngcontent-%COMP%]{border-top:none;border-right:none}.no-border-bl[_ngcontent-%COMP%], .no-border-lb[_ngcontent-%COMP%]{border-bottom:none;border-left:none}.no-border-br[_ngcontent-%COMP%], .no-border-rb[_ngcontent-%COMP%]{border-bottom:none;border-right:none}.border-dashed[_ngcontent-%COMP%], .border-dotted[_ngcontent-%COMP%]{border-style:dashed}.border-black[_ngcontent-%COMP%]{border-color:#000}.border-light-grey[_ngcontent-%COMP%]{border-color:#e5e5e5}.border-medium-grey[_ngcontent-%COMP%]{border-color:#ccc}.border-grey[_ngcontent-%COMP%]{border-color:#999}.border-dark-grey[_ngcontent-%COMP%]{border-color:#2222}.border-white[_ngcontent-%COMP%], .border-fff[_ngcontent-%COMP%]{border-color:#fff}.no-border-radius[_ngcontent-%COMP%]{border-radius:0}.radius3[_ngcontent-%COMP%]{border-radius:3px}.radius5[_ngcontent-%COMP%]{border-radius:5px}.radius10[_ngcontent-%COMP%]{border-radius:10px}.column-mandatory[_ngcontent-%COMP%]{color:#5cb85c;text-align:center}.not-column-mandatory[_ngcontent-%COMP%]{color:#666f73;text-align:center}.cdk-drag-placeholder[_ngcontent-%COMP%]{background:#3498db}.yes[_ngcontent-%COMP%]{color:#5cb85c!important;background-color:#5cb85c;height:4px;cursor:none}.no[_ngcontent-%COMP%]{color:red;background-color:red;height:4px;cursor:none}.strike[_ngcontent-%COMP%]{text-decoration:line-through;color:red}.transfer[_ngcontent-%COMP%]{color:#16a085}.linked[_ngcontent-%COMP%]{color:#4461e2}.accrual[_ngcontent-%COMP%]{color:#999}.fa-question[_ngcontent-%COMP%]{color:#4461e2}.enabled[_ngcontent-%COMP%]{color:#32cd32}.disabled[_ngcontent-%COMP%]{color:#f44366}.v-mid[_ngcontent-%COMP%], .v-m[_ngcontent-%COMP%]{vertical-align:middle}.v-top[_ngcontent-%COMP%], .v-t[_ngcontent-%COMP%]{vertical-align:top}.v-bottom[_ngcontent-%COMP%], .v-b[_ngcontent-%COMP%]{vertical-align:bottom}.v-super[_ngcontent-%COMP%]{vertical-align:super}.r-amount[_ngcontent-%COMP%]{text-align:right!important;padding-right:5px!important}.left[_ngcontent-%COMP%]{text-align:left!important}.right[_ngcontent-%COMP%]{text-align:right!important}.center[_ngcontent-%COMP%]{text-align:center!important}.amount-plus[_ngcontent-%COMP%]{color:#000}.amount-minus[_ngcontent-%COMP%]{color:#4461e2}.block[_ngcontent-%COMP%]{display:block}.inline[_ngcontent-%COMP%]{display:inline}.in-block[_ngcontent-%COMP%]{display:inline-block;zoom:1}.d-none[_ngcontent-%COMP%], .hide[_ngcontent-%COMP%], .hidden[_ngcontent-%COMP%]{display:none}.t-0[_ngcontent-%COMP%]{top:0}.b-0[_ngcontent-%COMP%]{bottom:0}.l-0[_ngcontent-%COMP%]{left:0}.r-0[_ngcontent-%COMP%]{right:0}.tb-0[_ngcontent-%COMP%]{top:0;bottom:0}.lr-0[_ngcontent-%COMP%]{left:0;right:0}.f-left[_ngcontent-%COMP%]{float:left}.f-right[_ngcontent-%COMP%]{float:right}.f-none[_ngcontent-%COMP%]{float:none}textarea[_ngcontent-%COMP%]{resize:both}textarea.vertical[_ngcontent-%COMP%], textarea.horizontal[_ngcontent-%COMP%]{resize:vertical}textarea.noresize[_ngcontent-%COMP%]{resize:none}.full-input[_ngcontent-%COMP%] input[_ngcontent-%COMP%], .full-input[_ngcontent-%COMP%] select[_ngcontent-%COMP%], .full-input[_ngcontent-%COMP%] textarea[_ngcontent-%COMP%]{width:100%}.normal[_ngcontent-%COMP%] input[_ngcontent-%COMP%], .normal[_ngcontent-%COMP%] select[_ngcontent-%COMP%], .normal[_ngcontent-%COMP%] textarea[_ngcontent-%COMP%], .full-input[_ngcontent-%COMP%] [type=checkbox][_ngcontent-%COMP%], .full-input[_ngcontent-%COMP%] [type=radio][_ngcontent-%COMP%]{width:auto}.mat-tab-body-content[_ngcontent-%COMP%]{margin-bottom:20px}.mat-datepicker-input[_ngcontent-%COMP%]{margin-top:5px;margin-bottom:5px}.loader-wrapper[_ngcontent-%COMP%]{height:100vh;width:100vw}.loader-wrapper[_ngcontent-%COMP%] .triangle[_ngcontent-%COMP%]{width:0;height:0;border-style:solid;position:absolute;animation:_ngcontent-%COMP%_rotate .8s infinite .2s}.loader-wrapper[_ngcontent-%COMP%] .bottom[_ngcontent-%COMP%]{border-width:0 90px 90px;border-color:transparent transparent #1fb050;bottom:calc(50% - 100px);left:calc(50% - 90px)}.loader-wrapper[_ngcontent-%COMP%] .top[_ngcontent-%COMP%]{border-width:90px 90px 0;border-color:#b4d575 transparent transparent;top:calc(50% - 100px);left:calc(50% - 90px)}.loader-wrapper[_ngcontent-%COMP%] .left[_ngcontent-%COMP%]{border-width:90px 0 90px 90px;border-color:transparent transparent transparent #1074b9;top:calc(50% - 90px);left:calc(50% - 100px)}.loader-wrapper[_ngcontent-%COMP%] .right[_ngcontent-%COMP%]{border-width:90px 90px 90px 0;border-color:transparent #1daeec transparent transparent;top:calc(50% - 90px);right:calc(50% - 100px)}@keyframes _ngcontent-%COMP%_rotate{0%{transform:rotate(0)}to{transform:rotate(360deg)}}body[_ngcontent-%COMP%]{margin:0}.container[_ngcontent-%COMP%]{margin:0 auto}.mb-05[_ngcontent-%COMP%]{margin-bottom:.5rem}.mr-05[_ngcontent-%COMP%]{margin-right:.5rem}.mb-1[_ngcontent-%COMP%]{margin-bottom:1rem}.mt-1[_ngcontent-%COMP%]{margin-top:1rem}.m-5[_ngcontent-%COMP%]{margin:5px}.m-t-5[_ngcontent-%COMP%]{margin-top:5px}.m-r-5[_ngcontent-%COMP%]{margin-right:5px}.m-b-5[_ngcontent-%COMP%]{margin-bottom:5px}.m-l-5[_ngcontent-%COMP%]{margin-left:5px}.m-v-5[_ngcontent-%COMP%]{margin:5px 0}.m-h-5[_ngcontent-%COMP%]{margin:0 5px}.m-10[_ngcontent-%COMP%]{margin:10px}.m-t-10[_ngcontent-%COMP%]{margin-top:10px}.m-r-10[_ngcontent-%COMP%]{margin-right:10px}.m-b-10[_ngcontent-%COMP%]{margin-bottom:10px}.m-l-10[_ngcontent-%COMP%]{margin-left:10px}.m-v-10[_ngcontent-%COMP%]{margin:10px 0}.m-h-10[_ngcontent-%COMP%]{margin:0 10px}.m-15[_ngcontent-%COMP%]{margin:15px}.m-t-15[_ngcontent-%COMP%]{margin-top:15px}.m-r-15[_ngcontent-%COMP%]{margin-right:15px}.m-b-15[_ngcontent-%COMP%]{margin-bottom:15px}.m-l-15[_ngcontent-%COMP%]{margin-left:15px}.m-v-15[_ngcontent-%COMP%]{margin:15px 0}.m-h-15[_ngcontent-%COMP%]{margin:0 15px}.m-20[_ngcontent-%COMP%]{margin:20px}.m-t-20[_ngcontent-%COMP%]{margin-top:20px}.m-r-20[_ngcontent-%COMP%]{margin-right:20px}.m-b-20[_ngcontent-%COMP%]{margin-bottom:20px}.m-l-20[_ngcontent-%COMP%]{margin-left:20px}.m-v-20[_ngcontent-%COMP%]{margin:20px 0}.m-h-20[_ngcontent-%COMP%]{margin:0 20px}.m-25[_ngcontent-%COMP%]{margin:25px}.m-t-25[_ngcontent-%COMP%]{margin-top:25px}.m-r-25[_ngcontent-%COMP%]{margin-right:25px}.m-b-25[_ngcontent-%COMP%]{margin-bottom:25px}.m-l-25[_ngcontent-%COMP%]{margin-left:25px}.m-v-25[_ngcontent-%COMP%]{margin:25px 0}.m-h-25[_ngcontent-%COMP%]{margin:0 25px}.m-30[_ngcontent-%COMP%]{margin:30px}.m-t-30[_ngcontent-%COMP%]{margin-top:30px}.m-r-30[_ngcontent-%COMP%]{margin-right:30px}.m-b-30[_ngcontent-%COMP%]{margin-bottom:30px}.m-l-30[_ngcontent-%COMP%]{margin-left:30px}.m-v-30[_ngcontent-%COMP%]{margin:30px 0}.m-h-30[_ngcontent-%COMP%]{margin:0 30px}.m-35[_ngcontent-%COMP%]{margin:35px}.m-t-35[_ngcontent-%COMP%]{margin-top:35px}.m-r-35[_ngcontent-%COMP%]{margin-right:35px}.m-b-35[_ngcontent-%COMP%]{margin-bottom:35px}.m-l-35[_ngcontent-%COMP%]{margin-left:35px}.m-v-35[_ngcontent-%COMP%]{margin:35px 0}.m-h-35[_ngcontent-%COMP%]{margin:0 35px}.m-40[_ngcontent-%COMP%]{margin:40px}.m-t-40[_ngcontent-%COMP%]{margin-top:40px}.m-r-40[_ngcontent-%COMP%]{margin-right:40px}.m-b-40[_ngcontent-%COMP%]{margin-bottom:40px}.m-l-40[_ngcontent-%COMP%]{margin-left:40px}.m-v-40[_ngcontent-%COMP%]{margin:40px 0}.m-h-40[_ngcontent-%COMP%]{margin:0 40px}.m-45[_ngcontent-%COMP%]{margin:45px}.m-t-45[_ngcontent-%COMP%]{margin-top:45px}.m-r-45[_ngcontent-%COMP%]{margin-right:45px}.m-b-45[_ngcontent-%COMP%]{margin-bottom:45px}.m-l-45[_ngcontent-%COMP%]{margin-left:45px}.m-v-45[_ngcontent-%COMP%]{margin:45px 0}.m-h-45[_ngcontent-%COMP%]{margin:0 45px}.m-50[_ngcontent-%COMP%]{margin:50px}.m-t-50[_ngcontent-%COMP%]{margin-top:50px}.m-r-50[_ngcontent-%COMP%]{margin-right:50px}.m-b-50[_ngcontent-%COMP%]{margin-bottom:50px}.m-l-50[_ngcontent-%COMP%]{margin-left:50px}.m-v-50[_ngcontent-%COMP%]{margin:50px 0}.m-h-50[_ngcontent-%COMP%]{margin:0 50px}.m-55[_ngcontent-%COMP%]{margin:55px}.m-t-55[_ngcontent-%COMP%]{margin-top:55px}.m-r-55[_ngcontent-%COMP%]{margin-right:55px}.m-b-55[_ngcontent-%COMP%]{margin-bottom:55px}.m-l-55[_ngcontent-%COMP%]{margin-left:55px}.m-v-55[_ngcontent-%COMP%]{margin:55px 0}.m-h-55[_ngcontent-%COMP%]{margin:0 55px}.m-60[_ngcontent-%COMP%]{margin:60px}.m-t-60[_ngcontent-%COMP%]{margin-top:60px}.m-r-60[_ngcontent-%COMP%]{margin-right:60px}.m-b-60[_ngcontent-%COMP%]{margin-bottom:60px}.m-l-60[_ngcontent-%COMP%]{margin-left:60px}.m-v-60[_ngcontent-%COMP%]{margin:60px 0}.m-h-60[_ngcontent-%COMP%]{margin:0 60px}.m-65[_ngcontent-%COMP%]{margin:65px}.m-t-65[_ngcontent-%COMP%]{margin-top:65px}.m-r-65[_ngcontent-%COMP%]{margin-right:65px}.m-b-65[_ngcontent-%COMP%]{margin-bottom:65px}.m-l-65[_ngcontent-%COMP%]{margin-left:65px}.m-v-65[_ngcontent-%COMP%]{margin:65px 0}.m-h-65[_ngcontent-%COMP%]{margin:0 65px}.m-70[_ngcontent-%COMP%]{margin:70px}.m-t-70[_ngcontent-%COMP%]{margin-top:70px}.m-r-70[_ngcontent-%COMP%]{margin-right:70px}.m-b-70[_ngcontent-%COMP%]{margin-bottom:70px}.m-l-70[_ngcontent-%COMP%]{margin-left:70px}.m-v-70[_ngcontent-%COMP%]{margin:70px 0}.m-h-70[_ngcontent-%COMP%]{margin:0 70px}.m-75[_ngcontent-%COMP%]{margin:75px}.m-t-75[_ngcontent-%COMP%]{margin-top:75px}.m-r-75[_ngcontent-%COMP%]{margin-right:75px}.m-b-75[_ngcontent-%COMP%]{margin-bottom:75px}.m-l-75[_ngcontent-%COMP%]{margin-left:75px}.m-v-75[_ngcontent-%COMP%]{margin:75px 0}.m-h-75[_ngcontent-%COMP%]{margin:0 75px}.m-80[_ngcontent-%COMP%]{margin:80px}.m-t-80[_ngcontent-%COMP%]{margin-top:80px}.m-r-80[_ngcontent-%COMP%]{margin-right:80px}.m-b-80[_ngcontent-%COMP%]{margin-bottom:80px}.m-l-80[_ngcontent-%COMP%]{margin-left:80px}.m-v-80[_ngcontent-%COMP%]{margin:80px 0}.m-h-80[_ngcontent-%COMP%]{margin:0 80px}.no-m[_ngcontent-%COMP%]{margin:0}.no-m-t[_ngcontent-%COMP%]{margin-top:0}.no-m-r[_ngcontent-%COMP%]{margin-right:0}.no-m-b[_ngcontent-%COMP%]{margin-bottom:0}.no-m-l[_ngcontent-%COMP%]{margin-left:0}.no-m-v[_ngcontent-%COMP%], .no-m-h[_ngcontent-%COMP%], .no-margin[_ngcontent-%COMP%]{margin:0}.no-m-lr[_ngcontent-%COMP%], .no-m-rl[_ngcontent-%COMP%]{margin-left:0;margin-right:0}.no-m-tb[_ngcontent-%COMP%], .no-m-bt[_ngcontent-%COMP%]{margin-top:0;margin-bottom:0}.m-t-only[_ngcontent-%COMP%]{margin-left:0;margin-right:0;margin-bottom:0}.m-b-only[_ngcontent-%COMP%]{margin-left:0;margin-right:0;margin-top:0}.m-l-only[_ngcontent-%COMP%]{margin-right:0;margin-top:0;margin-bottom:0}.m-r-only[_ngcontent-%COMP%]{margin-left:0;margin-top:0;margin-bottom:0}.m-auto[_ngcontent-%COMP%]{margin-left:auto;margin-right:auto}.ls-0[_ngcontent-%COMP%]{margin-left:10px;margin-right:10px}html[_ngcontent-%COMP%], body[_ngcontent-%COMP%]{-webkit-tap-highlight-color:transparent}div[_ngcontent-%COMP%]{box-sizing:border-box}.color-inherit[_ngcontent-%COMP%]{color:inherit}.no-shadow[_ngcontent-%COMP%]{box-shadow:none}.pointer[_ngcontent-%COMP%]{cursor:pointer}.nolist[_ngcontent-%COMP%]{list-style:none}.actions-menu[_ngcontent-%COMP%]{color:#fff}.alert[_ngcontent-%COMP%]{background-color:#e8f4fd;padding:6px 16px;font-size:.875rem;font-family:Roboto,Helvetica Neue,sans-serif;font-weight:400;line-height:1.43;border-radius:4px;letter-spacing:normal;margin:10px}.alert[_ngcontent-%COMP%] .message[_ngcontent-%COMP%]{padding:8px 0;font-size:18px}.alert[_ngcontent-%COMP%] .alert-check[_ngcontent-%COMP%]{color:#359ff4;margin-right:2px;font-size:1.4rem} .mat-tooltip{font-size:15px;color:#fff!important;background-color:#4461e2b3;border:1px solid rgb(25.7777777778,51.5555555556,166.2222222222);max-width:400px!important;white-space:pre-line!important}.loading[_ngcontent-%COMP%]{position:absolute;min-width:100%;width:100px;height:12px;background:linear-gradient(125deg,#fff,#4461e2,#fff);animation:grow 4s linear infinite,move 4s linear infinite}mat-card-title[_ngcontent-%COMP%]{font-weight:600;font-size:x-large;padding-left:20px;padding-top:20px}html[_ngcontent-%COMP%], body[_ngcontent-%COMP%]{overflow:hidden}.overflow-x-scroll[_ngcontent-%COMP%]{max-width:100%;overflow-x:auto}.overflow-no[_ngcontent-%COMP%]{overflow:hidden}.overflow-auto[_ngcontent-%COMP%]{overflow:auto}.overflow-scroll[_ngcontent-%COMP%]{overflow:scroll}.table-container[_ngcontent-%COMP%]{overflow-x:auto;max-width:100%}body[_ngcontent-%COMP%], .no-p[_ngcontent-%COMP%]{padding:0}.no-p-t[_ngcontent-%COMP%]{padding-top:0}.no-p-r[_ngcontent-%COMP%]{padding-right:0}.no-p-b[_ngcontent-%COMP%]{padding-bottom:0}.no-p-l[_ngcontent-%COMP%]{padding-left:0}.no-p-v[_ngcontent-%COMP%], .no-p-h[_ngcontent-%COMP%]{padding:0}.p-5[_ngcontent-%COMP%]{padding:5px}.p-t-5[_ngcontent-%COMP%]{padding-top:5px}.p-r-5[_ngcontent-%COMP%]{padding-right:5px}.p-b-5[_ngcontent-%COMP%]{padding-bottom:5px}.p-l-5[_ngcontent-%COMP%]{padding-left:5px}.p-v-5[_ngcontent-%COMP%]{padding:5px 0}.p-h-5[_ngcontent-%COMP%]{padding:0 5px}.p-10[_ngcontent-%COMP%]{padding:10px}.p-t-10[_ngcontent-%COMP%]{padding-top:10px}.p-b-10[_ngcontent-%COMP%]{padding-bottom:10px}.p-v-10[_ngcontent-%COMP%]{padding:10px 0}.p-h-10[_ngcontent-%COMP%]{padding:0 10px}.p-15[_ngcontent-%COMP%]{padding:15px}.p-t-15[_ngcontent-%COMP%]{padding-top:15px}.p-r-15[_ngcontent-%COMP%]{padding-right:15px}.p-b-15[_ngcontent-%COMP%]{padding-bottom:15px}.p-l-15[_ngcontent-%COMP%]{padding-left:15px}.p-v-15[_ngcontent-%COMP%]{padding:15px 0}.p-h-15[_ngcontent-%COMP%]{padding:0 15px}.p-20[_ngcontent-%COMP%]{padding:20px}.p-t-20[_ngcontent-%COMP%]{padding-top:20px}.p-r-20[_ngcontent-%COMP%]{padding-right:20px}.p-b-20[_ngcontent-%COMP%]{padding-bottom:20px}.p-l-20[_ngcontent-%COMP%]{padding-left:20px}.p-v-20[_ngcontent-%COMP%]{padding:20px 0}.p-h-20[_ngcontent-%COMP%]{padding:0 20px}.p-25[_ngcontent-%COMP%]{padding:25px}.p-t-25[_ngcontent-%COMP%]{padding-top:25px}.p-r-25[_ngcontent-%COMP%]{padding-right:25px}.p-b-25[_ngcontent-%COMP%]{padding-bottom:25px}.p-l-25[_ngcontent-%COMP%]{padding-left:25px}.p-v-25[_ngcontent-%COMP%]{padding:25px 0}.p-h-25[_ngcontent-%COMP%]{padding:0 25px}.p-30[_ngcontent-%COMP%]{padding:30px}.p-t-30[_ngcontent-%COMP%]{padding-top:30px}.p-r-30[_ngcontent-%COMP%]{padding-right:30px}.p-b-30[_ngcontent-%COMP%]{padding-bottom:30px}.p-l-30[_ngcontent-%COMP%]{padding-left:30px}.p-v-30[_ngcontent-%COMP%]{padding:30px 0}.p-h-30[_ngcontent-%COMP%]{padding:0 30px}.p-35[_ngcontent-%COMP%]{padding:35px}.p-t-35[_ngcontent-%COMP%]{padding-top:35px}.p-r-35[_ngcontent-%COMP%]{padding-right:35px}.p-b-35[_ngcontent-%COMP%]{padding-bottom:35px}.p-l-35[_ngcontent-%COMP%]{padding-left:35px}.p-v-35[_ngcontent-%COMP%]{padding:35px 0}.p-h-35[_ngcontent-%COMP%]{padding:0 35px}.p-40[_ngcontent-%COMP%]{padding:40px}.p-t-40[_ngcontent-%COMP%]{padding-top:40px}.p-r-40[_ngcontent-%COMP%]{padding-right:40px}.p-b-40[_ngcontent-%COMP%]{padding-bottom:40px}.p-l-40[_ngcontent-%COMP%]{padding-left:40px}.p-v-40[_ngcontent-%COMP%]{padding-top:40px;padding-bottom:40px}.p-h-40[_ngcontent-%COMP%]{padding:0 40px}.p-45[_ngcontent-%COMP%]{padding:45px}.p-t-45[_ngcontent-%COMP%]{padding-top:45px}.p-r-45[_ngcontent-%COMP%]{padding-right:45px}.p-b-45[_ngcontent-%COMP%]{padding-bottom:45px}.p-l-45[_ngcontent-%COMP%]{padding-left:45px}.p-v-45[_ngcontent-%COMP%]{padding:45px 0}.p-h-45[_ngcontent-%COMP%]{padding:0 45px}.p-50[_ngcontent-%COMP%]{padding:50px}.p-t-50[_ngcontent-%COMP%]{padding-top:50px}.p-r-50[_ngcontent-%COMP%]{padding-right:50px}.p-b-50[_ngcontent-%COMP%]{padding-bottom:50px}.p-l-50[_ngcontent-%COMP%]{padding-left:50px}.p-v-50[_ngcontent-%COMP%]{padding:50px 0}.p-h-50[_ngcontent-%COMP%]{padding:0 50px}.p-55[_ngcontent-%COMP%]{padding:55px}.p-t-55[_ngcontent-%COMP%]{padding-top:55px}.p-r-55[_ngcontent-%COMP%]{padding-right:55px}.p-b-55[_ngcontent-%COMP%]{padding-bottom:55px}.p-l-55[_ngcontent-%COMP%]{padding-left:55px}.p-v-55[_ngcontent-%COMP%]{padding:55px 0}.p-h-55[_ngcontent-%COMP%]{padding:0 55px}.p-60[_ngcontent-%COMP%]{padding:60px}.p-t-60[_ngcontent-%COMP%]{padding-top:60px}.p-r-60[_ngcontent-%COMP%]{padding-right:60px}.p-b-60[_ngcontent-%COMP%]{padding-bottom:60px}.p-l-60[_ngcontent-%COMP%]{padding-left:60px}.p-v-60[_ngcontent-%COMP%]{padding:60px 0}.p-h-60[_ngcontent-%COMP%]{padding:0 60px}.p-65[_ngcontent-%COMP%]{padding:65px}.p-t-65[_ngcontent-%COMP%]{padding-top:65px}.p-r-65[_ngcontent-%COMP%]{padding-right:65px}.p-b-65[_ngcontent-%COMP%]{padding-bottom:65px}.p-l-65[_ngcontent-%COMP%]{padding-left:65px}.p-v-65[_ngcontent-%COMP%]{padding:65px 0}.p-h-65[_ngcontent-%COMP%]{padding:0 65px}.p-70[_ngcontent-%COMP%]{padding:70px}.p-t-70[_ngcontent-%COMP%]{padding-top:70px}.p-r-70[_ngcontent-%COMP%]{padding-right:70px}.p-b-70[_ngcontent-%COMP%]{padding-bottom:70px}.p-l-70[_ngcontent-%COMP%]{padding-left:70px}.p-v-70[_ngcontent-%COMP%]{padding:70px 0}.p-h-70[_ngcontent-%COMP%]{padding:0 70px}.p-75[_ngcontent-%COMP%]{padding:75px}.p-t-75[_ngcontent-%COMP%]{padding-top:75px}.p-r-75[_ngcontent-%COMP%]{padding-right:75px}.p-b-75[_ngcontent-%COMP%]{padding-bottom:75px}.p-l-75[_ngcontent-%COMP%]{padding-left:75px}.p-v-75[_ngcontent-%COMP%]{padding:75px 0}.p-h-75[_ngcontent-%COMP%]{padding:0 75px}.p-80[_ngcontent-%COMP%]{padding:80px}.p-t-80[_ngcontent-%COMP%]{padding-top:80px}.p-r-80[_ngcontent-%COMP%]{padding-right:80px}.p-b-80[_ngcontent-%COMP%]{padding-bottom:80px}.p-l-80[_ngcontent-%COMP%]{padding-left:80px}.p-v-80[_ngcontent-%COMP%]{padding:80px 0}.p-h-80[_ngcontent-%COMP%]{padding:0 80px}.no-padding[_ngcontent-%COMP%]{padding:0!important}.no-pad-lr[_ngcontent-%COMP%], .no-pad-rl[_ngcontent-%COMP%]{padding-left:0;padding-right:0}.no-pad-tb[_ngcontent-%COMP%], .no-pad-bt[_ngcontent-%COMP%]{padding-top:0;padding-bottom:0}.pad-t-only[_ngcontent-%COMP%]{padding-left:0;padding-right:0;padding-bottom:0}.pad-b-only[_ngcontent-%COMP%]{padding-left:0;padding-right:0;padding-top:0}.pad-l-only[_ngcontent-%COMP%]{padding-right:0;padding-top:0;padding-bottom:0}.pad-r-only[_ngcontent-%COMP%]{padding-left:0;padding-top:0;padding-bottom:0}html[_ngcontent-%COMP%], body[_ngcontent-%COMP%], .rel[_ngcontent-%COMP%], .relative[_ngcontent-%COMP%]{position:relative}.abs[_ngcontent-%COMP%], .absolute[_ngcontent-%COMP%]{position:absolute}.fixed[_ngcontent-%COMP%]{position:fixed}.status-active[_ngcontent-%COMP%]{color:#5cb85c}.status-inactive[_ngcontent-%COMP%]{color:#666f73}.status-deleted[_ngcontent-%COMP%]{color:#000}.status-pending[_ngcontent-%COMP%]{color:orange}.status-approved[_ngcontent-%COMP%]{color:#4461e2}.status-overpaid[_ngcontent-%COMP%]{color:purple}.status-chargeoff[_ngcontent-%COMP%]{color:#f39c12}.status-active-overdue[_ngcontent-%COMP%], .status-block[_ngcontent-%COMP%]{color:red}.status-matured[_ngcontent-%COMP%]{color:#ff4000}.subStatus-contract-termination[_ngcontent-%COMP%]{color:#b3b3b3}.mat-step-header[_ngcontent-%COMP%] .mat-step-icon-state-done[_ngcontent-%COMP%]{background-color:#2af72a}.mat-step-header[_ngcontent-%COMP%] .mat-step-icon-state-done[_ngcontent-%COMP%] .status-transfer-progress[_ngcontent-%COMP%]{color:#ff4000}.mat-step-header[_ngcontent-%COMP%] .mat-step-icon-state-done[_ngcontent-%COMP%] .status-transfer-hold[_ngcontent-%COMP%]{color:#df0101}html[_ngcontent-%COMP%], body[_ngcontent-%COMP%]{-webkit-font-smoothing:antialiased}html[_ngcontent-%COMP%]{font-size:16px}body[_ngcontent-%COMP%]{font-family:Roboto,Helvetica Neue,sans-serif;font-weight:400;font-size:14px;color:#000000de;line-height:1.5;letter-spacing:normal}.mat-h1[_ngcontent-%COMP%], .mat-headline[_ngcontent-%COMP%], .mat-typography[_ngcontent-%COMP%] .mat-h1[_ngcontent-%COMP%], .mat-typography[_ngcontent-%COMP%] .mat-headline[_ngcontent-%COMP%], .mat-typography[_ngcontent-%COMP%] h1[_ngcontent-%COMP%]{font:400 24px/32px Roboto,Helvetica Neue,sans-serif;letter-spacing:normal;margin:0 0 16px}.lh-1[_ngcontent-%COMP%]{line-height:1}.lh-13[_ngcontent-%COMP%]{line-height:1.3}.lh-15[_ngcontent-%COMP%]{line-height:1.5}.bold[_ngcontent-%COMP%], .strong[_ngcontent-%COMP%]{font-weight:700}.no-bold[_ngcontent-%COMP%]{font-weight:400}.italic[_ngcontent-%COMP%], .em[_ngcontent-%COMP%]{font-style:italic}.strike[_ngcontent-%COMP%]{text-decoration:line-through}.normal[_ngcontent-%COMP%]{font-weight:400;font-style:normal}.uppercase[_ngcontent-%COMP%]{text-transform:uppercase}.text-left[_ngcontent-%COMP%]{text-align:left}.text-center[_ngcontent-%COMP%]{text-align:center}.text-right[_ngcontent-%COMP%]{text-align:right}.w100[_ngcontent-%COMP%]{font-weight:100}.w200[_ngcontent-%COMP%]{font-weight:200}.w300[_ngcontent-%COMP%]{font-weight:300}.w400[_ngcontent-%COMP%]{font-weight:400}.w500[_ngcontent-%COMP%]{font-weight:500}.w600[_ngcontent-%COMP%]{font-weight:600}.w700[_ngcontent-%COMP%]{font-weight:700}.w800[_ngcontent-%COMP%]{font-weight:800}.w900[_ngcontent-%COMP%]{font-weight:900}.f9[_ngcontent-%COMP%]{font-size:9px}.f10[_ngcontent-%COMP%]{font-size:10px}.f11[_ngcontent-%COMP%]{font-size:11px}.f12[_ngcontent-%COMP%]{font-size:12px}.f13[_ngcontent-%COMP%]{font-size:13px}.f14[_ngcontent-%COMP%]{font-size:14px}.f15[_ngcontent-%COMP%]{font-size:15px}.f16[_ngcontent-%COMP%]{font-size:16px}.f17[_ngcontent-%COMP%]{font-size:17px}.f18[_ngcontent-%COMP%]{font-size:18px;line-height:30px}.f19[_ngcontent-%COMP%]{font-size:19px}.f20[_ngcontent-%COMP%]{font-size:20px}.f30[_ngcontent-%COMP%]{font-size:30px}.f40[_ngcontent-%COMP%]{font-size:40px}.f50[_ngcontent-%COMP%]{font-size:50px}.f60[_ngcontent-%COMP%]{font-size:60px}.size-small[_ngcontent-%COMP%]{font-size:75%}.size-normal[_ngcontent-%COMP%]{font-size:100%}.size-medium[_ngcontent-%COMP%]{font-size:125%}.size-big[_ngcontent-%COMP%], .size-large[_ngcontent-%COMP%]{font-size:150%}.size-huge[_ngcontent-%COMP%]{font-size:200%}.inherit[_ngcontent-%COMP%]{font:inherit}.text-shadow[_ngcontent-%COMP%]{text-shadow:1px 1px 1px rgba(0,0,0,.4)}.text-rgb-2[_ngcontent-%COMP%]{color:#0003}.text-rgb-3[_ngcontent-%COMP%]{color:#0000004d}.text-rgb-4[_ngcontent-%COMP%]{color:#0006}.text-rgb-5[_ngcontent-%COMP%]{color:#00000080}.no-ul[_ngcontent-%COMP%], .no-ul[_ngcontent-%COMP%]:hover, .no-ul[_ngcontent-%COMP%] a[_ngcontent-%COMP%], .no-ul[_ngcontent-%COMP%] a[_ngcontent-%COMP%]:hover{text-decoration:none}.no-wrap[_ngcontent-%COMP%]{white-space:nowrap}.auto-cell-size[_ngcontent-%COMP%]{white-space:nowrap;width:1%}.ls-0[_ngcontent-%COMP%]{letter-spacing:-3px;white-space:nowrap}.label-field[_ngcontent-%COMP%]{margin-top:32px}.wrap-content[_ngcontent-%COMP%]{overflow-wrap:break-word;word-wrap:break-word}.no-break-content[_ngcontent-%COMP%]{overflow-wrap:anywhere!important}.fit[_ngcontent-%COMP%]{max-width:100%}.half-width[_ngcontent-%COMP%]{width:50%}.full-width[_ngcontent-%COMP%]{width:100%}.full-height[_ngcontent-%COMP%]{height:100%}html[_ngcontent-%COMP%], body[_ngcontent-%COMP%]{width:100%;height:100%;min-height:100%}body[_ngcontent-%COMP%] table[_ngcontent-%COMP%]{width:100%}.container[_ngcontent-%COMP%]{max-width:74rem;width:90%}.mw300[_ngcontent-%COMP%]{max-width:300px}.mw400[_ngcontent-%COMP%]{max-width:400px}.mw500[_ngcontent-%COMP%]{max-width:500px}.mw600[_ngcontent-%COMP%]{max-width:600px}.fullwidth[_ngcontent-%COMP%]{width:100%}.zindex-1[_ngcontent-%COMP%]{z-index:1}.zindex-2[_ngcontent-%COMP%]{z-index:2}.zindex-3[_ngcontent-%COMP%]{z-index:3}.zindex-4[_ngcontent-%COMP%]{z-index:4}.icon[_ngcontent-%COMP%]{flex:1}.chargeoff[_ngcontent-%COMP%]{color:#ffa726}"]})}}return t})();function L1e(t,i){t&1&&(h(0,"span"),y(1),S(2,"translate"),_()),t&2&&(p(),T(k(2,1,"labels.inputs.Credit")))}function A1e(t,i){t&1&&(h(0,"span"),y(1),S(2,"translate"),_()),t&2&&(p(),T(k(2,1,"labels.inputs.Debit")))}function z1e(t,i){if(t&1&&(h(0,"tr")(1,"th"),y(2),S(3,"translate"),_(),h(4,"td"),y(5),_()()),t&2){let e=M();p(2),T(k(3,2,"labels.inputs.Reference Number")),p(3),T(e.data.journalEntry.referenceNumber)}}function R1e(t,i){if(t&1&&(h(0,"tr")(1,"th"),y(2),S(3,"translate"),_(),h(4,"td"),y(5),_()()),t&2){let e=M();p(2),T(k(3,2,"labels.inputs.Comments")),p(3),T(e.data.journalEntry.comments)}}function N1e(t,i){t&1&&(h(0,"tr")(1,"th",4),y(2),S(3,"translate"),_()()),t&2&&(p(2),T(k(3,1,"labels.inputs.Payment Details")))}function F1e(t,i){if(t&1&&(h(0,"tr")(1,"th"),y(2),S(3,"translate"),_(),h(4,"td"),y(5),_()()),t&2){let e=M();p(2),T(k(3,2,"labels.inputs.Payment Type")),p(3),T(e.data.journalEntry.transactionDetails.paymentDetails.paymentType.name)}}function V1e(t,i){if(t&1&&(h(0,"tr")(1,"th"),y(2),S(3,"translate"),_(),h(4,"td"),y(5),_()()),t&2){let e=M();p(2),T(k(3,2,"labels.inputs.Account Number")),p(3),T(e.data.journalEntry.transactionDetails.paymentDetails.accountNumber)}}function B1e(t,i){if(t&1&&(h(0,"tr")(1,"th"),y(2),S(3,"translate"),_(),h(4,"td"),y(5),_()()),t&2){let e=M();p(2),T(k(3,2,"labels.inputs.Cheque Number")),p(3),T(e.data.journalEntry.transactionDetails.paymentDetails.checkNumber)}}function j1e(t,i){if(t&1&&(h(0,"tr")(1,"th"),y(2),S(3,"translate"),_(),h(4,"td"),y(5),_()()),t&2){let e=M();p(2),T(k(3,2,"labels.inputs.Routing Code")),p(3),T(e.data.journalEntry.transactionDetails.paymentDetails.routingCode)}}function H1e(t,i){if(t&1&&(h(0,"tr")(1,"th"),y(2),S(3,"translate"),_(),h(4,"td"),y(5),_()()),t&2){let e=M();p(2),T(k(3,2,"labels.inputs.Receipt Number")),p(3),T(e.data.journalEntry.transactionDetails.paymentDetails.receiptNumber)}}function U1e(t,i){if(t&1&&(h(0,"tr")(1,"th"),y(2),S(3,"translate"),_(),h(4,"td"),y(5),_()()),t&2){let e=M();p(2),T(k(3,2,"labels.inputs.Bank Number")),p(3),T(e.data.journalEntry.transactionDetails.paymentDetails.bankNumber)}}function $1e(t,i){if(t&1&&(h(0,"tr")(1,"th"),y(2),S(3,"translate"),_(),h(4,"td"),y(5),_()()),t&2){let e=M();p(2),T(k(3,2,"labels.inputs.Created by")),p(3),T(e.data.journalEntry.createdByUserName)}}var jh=(()=>{class t{constructor(){this.dialogRef=d(qt),this.data=d(En),this.existsPaymentDetails=!1;let e=this.data;this.existsPaymentDetails=e.journalEntry.transactionDetails!=null&&e.journalEntry.transactionDetails.paymentDetails!=null}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275cmp=P({type:t,selectors:[["mifosx-view-journal-entry"]],decls:82,vars:63,consts:[["mat-dialog-title",""],["mat-dialog-content",""],["align","end"],["mat-button","","mat-dialog-close",""],["colspan","2",1,"header"]],template:function(n,o){n&1&&(h(0,"h1",0),y(1),S(2,"translate"),_(),h(3,"div",1)(4,"table")(5,"tr")(6,"th"),y(7),S(8,"translate"),_(),h(9,"td"),y(10),_()(),h(11,"tr")(12,"th"),y(13),S(14,"translate"),_(),h(15,"td"),y(16),_()(),h(17,"tr")(18,"th"),y(19),S(20,"translate"),_(),h(21,"td"),y(22),_()(),h(23,"tr")(24,"th"),y(25),S(26,"translate"),_(),h(27,"td"),y(28),S(29,"dateFormat"),_()(),h(30,"tr")(31,"th"),y(32),S(33,"translate"),_(),h(34,"td"),y(35),_()(),h(36,"tr")(37,"th"),y(38),S(39,"translate"),_(),h(40,"td"),y(41),_()(),h(42,"tr")(43,"th"),y(44),S(45,"translate"),_(),h(46,"td"),y(47),_()(),h(48,"tr")(49,"th"),E(50,L1e,3,3,"span"),E(51,A1e,3,3,"span"),_(),h(52,"td"),y(53),S(54,"formatNumber"),_()(),h(55,"tr")(56,"th"),y(57),S(58,"translate"),_(),h(59,"td"),y(60),_()(),E(61,z1e,6,4,"tr"),E(62,R1e,6,4,"tr"),E(63,N1e,4,3,"tr"),E(64,F1e,6,4,"tr"),E(65,V1e,6,4,"tr"),E(66,B1e,6,4,"tr"),E(67,j1e,6,4,"tr"),E(68,H1e,6,4,"tr"),E(69,U1e,6,4,"tr"),E(70,$1e,6,4,"tr"),h(71,"tr")(72,"th"),y(73),S(74,"translate"),_(),h(75,"td"),y(76),S(77,"datetimeFormat"),_()()()(),h(78,"mat-dialog-actions",2)(79,"button",3),y(80),S(81,"translate"),_()()),n&2&&(p(),T(k(2,35,"labels.heading.View Journal Entry")),p(6),T(k(8,37,"labels.inputs.Office")),p(3),T(o.data.journalEntry.officeName),p(3),T(k(14,39,"labels.inputs.Entry ID")),p(3),T(o.data.journalEntry.id),p(3),T(k(20,41,"labels.inputs.Transaction ID")),p(3),T(o.data.journalEntry.transactionId),p(3),T(k(26,43,"labels.inputs.Transaction Date")),p(3),T(k(29,45,o.data.journalEntry.transactionDate)),p(4),T(k(33,47,"labels.inputs.Type")),p(3),T(o.data.journalEntry.glAccountType.value),p(3),T(k(39,49,"labels.inputs.Account Code")),p(3),T(o.data.journalEntry.glAccountId),p(3),T(k(45,51,"labels.inputs.Account Name")),p(3),T(o.data.journalEntry.glAccountName),p(3),I(o.data.journalEntry.entryType.value==="CREDIT"?50:-1),p(),I(o.data.journalEntry.entryType.value==="DEBIT"?51:-1),p(2),St("",o.data.journalEntry.currency.displaySymbol," ",k(54,53,o.data.journalEntry.amount)),p(4),T(k(58,55,"labels.inputs.Currency")),p(3),St("(",o.data.journalEntry.currency.code,") ",o.data.journalEntry.currency.name),p(),I(o.data.journalEntry.referenceNumber?61:-1),p(),I(o.data.journalEntry.comments?62:-1),p(),I(o.existsPaymentDetails?63:-1),p(),I(o.existsPaymentDetails&&(o.data.journalEntry.transactionDetails.paymentDetails!=null&&o.data.journalEntry.transactionDetails.paymentDetails.paymentType)?64:-1),p(),I(o.existsPaymentDetails&&(o.data.journalEntry.transactionDetails.paymentDetails!=null&&o.data.journalEntry.transactionDetails.paymentDetails.accountNumber)?65:-1),p(),I(o.existsPaymentDetails&&(o.data.journalEntry.transactionDetails.paymentDetails!=null&&o.data.journalEntry.transactionDetails.paymentDetails.checkNumber)?66:-1),p(),I(o.existsPaymentDetails&&(o.data.journalEntry.transactionDetails.paymentDetails!=null&&o.data.journalEntry.transactionDetails.paymentDetails.routingCode)?67:-1),p(),I(o.existsPaymentDetails&&(o.data.journalEntry.transactionDetails.paymentDetails!=null&&o.data.journalEntry.transactionDetails.paymentDetails.receiptNumber)?68:-1),p(),I(o.existsPaymentDetails&&(o.data.journalEntry.transactionDetails.paymentDetails!=null&&o.data.journalEntry.transactionDetails.paymentDetails.bankNumber)?69:-1),p(),I(o.existsPaymentDetails?70:-1),p(3),T(k(74,57,"labels.inputs.Submitted on")),p(3),T(k(77,59,o.data.journalEntry.submittedOnDate)),p(4),T(k(81,61,"labels.buttons.Close")))},dependencies:[he,ve,vt,xn,An,zn,Ln,Lo,Te,ca,Ts],styles:["table[_ngcontent-%COMP%] th[_ngcontent-%COMP%]{text-align:left;font-weight:500;padding:0 .4rem 0 0}table[_ngcontent-%COMP%] th.header[_ngcontent-%COMP%]{text-align:center;padding:.4rem .4rem 0 0}table[_ngcontent-%COMP%] td[_ngcontent-%COMP%]{padding:0 .4rem 0 0}"]})}}return t})();var G1e=t=>({revert:!0,comments:t}),W1e=()=>({redirect:!0});function q1e(t,i){if(t&1&&(h(0,"div")(1,"h1",0),y(2),S(3,"translate"),_(),h(4,"div",1)(5,"p"),y(6),S(7,"translate"),_(),h(8,"mat-form-field",2)(9,"mat-label"),y(10),S(11,"translate"),_(),F(12,"textarea",3),_()(),h(13,"mat-dialog-actions",4)(14,"button",5),y(15),S(16,"translate"),_(),h(17,"button",6),y(18),S(19,"translate"),_()()()),t&2){let e=M();p(2),T(k(3,7,"labels.heading.Revert Transaction")),p(4),T(k(7,9,"labels.text.Revert this transaction?")),p(4),T(k(11,11,"labels.inputs.Comments")),p(2),D("formControl",e.comments),p(3),T(k(16,13,"labels.buttons.No")),p(2),D("mat-dialog-close",Eo(17,G1e,e.comments.value)),p(),ee(" ",k(19,15,"labels.buttons.Yes")," ")}}function Y1e(t,i){if(t&1&&(h(0,"h1",0),y(1),S(2,"translate"),_(),h(3,"div",1)(4,"h4"),y(5),S(6,"translate"),_(),h(7,"p"),y(8),S(9,"translate"),_(),h(10,"p"),y(11),S(12,"translate"),_()(),h(13,"mat-dialog-actions",4)(14,"button",5),y(15),S(16,"translate"),_(),h(17,"button",6),y(18),S(19,"translate"),_()()),t&2){let e=M();p(),T(k(2,8,"labels.heading.Transaction Reverted")),p(4),T(k(6,10,"labels.heading.Success!")),p(3),T(k(9,12,"labels.text.Journal entry reverse transaction")),p(3),St("",k(12,14,"labels.text.Transaction ID"),": ",e.data.transactionId),p(4),T(k(16,16,"labels.buttons.Close")),p(2),D("mat-dialog-close",ko(20,W1e)),p(),ee(" ",k(19,18,"labels.buttons.Redirect to New Transaction")," ")}}var VR=(()=>{class t{constructor(){this.dialogRef=d(qt),this.data=d(En),this.comments=new Hi("")}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275cmp=P({type:t,selectors:[["mifosx-revert-transaction"]],decls:2,vars:1,consts:[["mat-dialog-title",""],["mat-dialog-content",""],[1,"flex-fill"],["matInput","",3,"formControl"],["align","end"],["mat-button","","mat-dialog-close",""],["mat-button","",3,"mat-dialog-close"]],template:function(n,o){n&1&&E(0,q1e,20,19,"div")(1,Y1e,20,21),n&2&&I(o.data.reverted?1:0)},dependencies:[he,ve,yi,mn,Si,Bt,Cn,ti,vt,xn,An,zn,Ln,Te],encapsulation:2})}}return t})();var BR=(()=>{class t{constructor(){this.http=d(Bn)}getOffices(){let e=new te().set("orderBy","id");return this.http.get("/offices",{params:e})}getAccountingRules(e=!1){let n=new te;return e&&(n=n.set("associations","all")),this.http.get("/accountingrules",{params:n})}getCurrencies(){return this.http.get("/currencies")}getPaymentTypes(){return this.http.get("/paymenttypes")}createJournalEntry(e){return this.http.post("/journalentries",e)}getGlAccounts(){let e=new te().set("manualEntriesAllowed","true").set("usage","1").set("disabled","false");return this.http.get("/glaccounts",{params:e})}getJournalEntry(e){let n=new te().set("transactionId",e).set("transactionDetails","true");return this.http.get("/journalentries",{params:n})}getJournalEntries(e,n,o,r,a){let s=new te().set("offset",r.toString()).set("limit",a.toString()).set("sortOrder",o).set("orderBy",n);return e.forEach(function(c){c.value&&(s=s.set(c.type,c.value))}),this.http.get("/journalentries",{params:s})}revertTransaction(e,n){let o=new te().set("command","reverse"),r={};return n&&(r={comments:n}),this.http.post(`/journalentries/${e}`,r,{params:o})}getFinancialActivityAccounts(){return this.http.get("/financialactivityaccounts")}getFinancialActivityAccountsTemplate(){return this.http.get("/financialactivityaccounts/template")}createFinancialActivityAccount(e){return this.http.post("/financialactivityaccounts",e)}getFinancialActivityAccount(e,n=!1){let o=new te().set("template",n.toString());return this.http.get(`/financialactivityaccounts/${e}`,{params:o})}updateFinancialActivityAccount(e,n){return this.http.put(`/financialactivityaccounts/${e}`,n)}deleteFinancialActivityAccount(e){return this.http.delete(`/financialactivityaccounts/${e}`)}retrieveOpeningBalances(e){let n=new te().set("officeId",e);return this.http.get("/journalentries/openingbalance",{params:n})}defineOpeningBalances(e){let n=new te().set("command","defineOpeningBalance");return this.http.post("/journalentries",e,{params:n})}getChartOfAccounts(){return this.http.get("/glaccounts")}getChartOfAccountsTemplate(){return this.http.get("/glaccounts/template")}createGlAccount(e){return this.http.post("/glaccounts",e)}getGlAccount(e,n=!1){let o=new te().set("template",n.toString());return this.http.get(`/glaccounts/${e}`,{params:o})}updateGlAccount(e,n){return this.http.put(`/glaccounts/${e}`,n)}deleteGlAccount(e){return this.http.delete(`/glaccounts/${e}`)}getAccountingClosures(){return this.http.get("/glclosures")}createAccountingClosure(e){return this.http.post("/glclosures",e)}getAccountingClosure(e){return this.http.get(`/glclosures/${e}`)}updateAccountingClosure(e,n){return this.http.put(`/glclosures/${e}`,n)}deleteAccountingClosure(e){return this.http.delete(`/glclosures/${e}`)}getAccountingRulesTemplate(){return this.http.get("/accountingrules/template")}createAccountingRule(e){return this.http.post("/accountingrules",e)}getAccountingRule(e){return this.http.get(`/accountingrules/${e}`)}updateAccountingRule(e,n){return this.http.put(`/accountingrules/${e}`,n)}deleteAccountingRule(e){return this.http.delete(`/accountingrules/${e}`)}executePeriodicAccruals(e){return this.http.post("/runaccruals",e)}getProvisioningEntries(){return this.http.get("/provisioningentries")}createProvisioningEntry(e){return this.http.post("/provisioningentries",e)}getProvisioningEntry(e){return this.http.get(`/provisioningentries/${e}`)}getLoanProducts(){return this.http.get("/loanproducts")}getProvisioningCategories(){return this.http.get("/provisioningcategory")}getProvisioningEntryEntries(e){let n=new te().set("entryId",e);return this.http.get("/provisioningentries/entries",{params:n})}getProvisioningJournalEntries(e){let n=new te().set("entryId",e);return this.http.get("/journalentries/provisioning",{params:n})}createProvisioningJournalEntries(e){let n=new te().set("command","createjournalentry");return this.http.post(`/provisioningentries/${e}`,{},{params:n})}recreateProvisioningEntries(e){let n=new te().set("command","recreateprovisioningentry");return this.http.post(`/provisioningentries/${e}`,{},{params:n})}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275prov=R({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();function Q1e(t,i){t&1&&(h(0,"span"),F(1,"fa-icon",18),y(2),S(3,"translate"),_()),t&2&&(p(2),ee("",k(3,1,"labels.buttons.Revert Transaction")," "))}function K1e(t,i){t&1&&(h(0,"span"),y(1),S(2,"translate"),_()),t&2&&(p(),T(k(2,1,"labels.buttons.Transaction Reverted")))}function X1e(t,i){if(t&1){let e=le();h(0,"button",17),N("click",function(){G(e);let o=M(3);return W(o.revertTransaction())}),E(1,Q1e,4,3,"span"),E(2,K1e,3,3,"span"),_()}if(t&2){let e=M(3);D("disabled",e.dataSource==null?null:e.dataSource.data[0].reversed),p(),I(e.dataSource.data[0].reversed?-1:1),p(),I(e.dataSource.data[0].reversed?2:-1)}}function Z1e(t,i){t&1&&(h(0,"div",1),ot(1,X1e,3,3,"button",16),_()),t&2&&(p(),D("mifosxHasPermission","REVERSE_JOURNALENTRY"))}function J1e(t,i){t&1&&(h(0,"div",21),y(1),S(2,"translate"),_()),t&2&&(p(),ee(" ",k(2,1,"labels.inputs.External Asset Owner")," "))}function e2e(t,i){if(t&1&&(h(0,"div",22),y(1),_()),t&2){let e=M(4);p(),ee(" ",e.dataSource.data[0].externalAssetOwner," ")}}function t2e(t,i){if(t&1&&(h(0,"mat-card",19)(1,"mat-card-content")(2,"div",20)(3,"div",21),y(4),S(5,"translate"),_(),h(6,"div",22),y(7),_(),h(8,"div",21),y(9),S(10,"translate"),_(),h(11,"div",22),y(12),S(13,"dateFormat"),_(),h(14,"div",21),y(15),S(16,"translate"),_(),h(17,"div",22),y(18),_(),h(19,"div",21),y(20),S(21,"translate"),_(),h(22,"div",22),y(23),S(24,"datetimeFormat"),_(),h(25,"div",21),y(26),S(27,"translate"),_(),h(28,"div",22),y(29),S(30,"yesNo"),_(),E(31,J1e,3,3,"div",21),E(32,e2e,2,1,"div",22),_()()()),t&2){let e=M(3);D("ngClass",Ft(e.journalEntryColor())),p(4),ee(" ",k(5,14,"labels.inputs.Office")," "),p(3),ee(" ",e.dataSource.data[0].officeName," "),p(2),ee(" ",k(10,16,"labels.inputs.Transaction Date")," "),p(3),ee(" ",k(13,18,e.dataSource.data[0].transactionDate)," "),p(3),ee(" ",k(16,20,"labels.inputs.Created By")," "),p(3),ee(" ",e.dataSource.data[0].createdByUserName," "),p(2),ee(" ",k(21,22,"labels.inputs.Submitted on")," "),p(3),ee(" ",k(24,24,e.dataSource.data[0].submittedOnDate)," "),p(3),ee(" ",k(27,26,"labels.inputs.Manual Journal Entry")," "),p(3),ee(" ",k(30,28,e.dataSource.data[0].manualEntry)," "),p(2),I(e.dataSource.data[0].externalAssetOwner?31:-1),p(),I(e.dataSource.data[0].externalAssetOwner?32:-1)}}function n2e(t,i){if(t&1&&(h(0,"div",0),E(1,t2e,33,30,"mat-card",19),_()),t&2){let e=M(2);p(),I(e.dataSource?1:-1)}}function i2e(t,i){t&1&&(h(0,"th",23),y(1),S(2,"translate"),_()),t&2&&(p(),ee(" ",k(2,1,"labels.inputs.Entry ID")," "))}function o2e(t,i){if(t&1&&(h(0,"td",24),y(1),_()),t&2){let e=i.$implicit;p(),T(e.id)}}function r2e(t,i){t&1&&(h(0,"th",23),y(1),S(2,"translate"),_()),t&2&&(p(),ee(" ",k(2,1,"labels.inputs.Type")," "))}function a2e(t,i){if(t&1&&(h(0,"td",24),y(1),_()),t&2){let e=i.$implicit;p(),T(e.glAccountType.value)}}function s2e(t,i){t&1&&(h(0,"th",23),y(1),S(2,"translate"),_()),t&2&&(p(),ee(" ",k(2,1,"labels.inputs.Account Code")," "))}function c2e(t,i){if(t&1&&(h(0,"td",24),y(1),_()),t&2){let e=i.$implicit;p(),T(e.glAccountCode)}}function l2e(t,i){t&1&&(h(0,"th",23),y(1),S(2,"translate"),_()),t&2&&(p(),ee(" ",k(2,1,"labels.inputs.Account Name")," "))}function d2e(t,i){if(t&1&&(h(0,"td",24),y(1),_()),t&2){let e=i.$implicit;p(),T(e.glAccountName)}}function u2e(t,i){t&1&&(h(0,"th",23),y(1),S(2,"translate"),_()),t&2&&(p(),ee(" ",k(2,1,"labels.inputs.Debit")," "))}function m2e(t,i){if(t&1&&(h(0,"span"),y(1),S(2,"formatNumber"),_()),t&2){let e=M().$implicit;p(),St(" ",e.currency.displaySymbol||e.currency.code," ",k(2,2,e.amount)," ")}}function p2e(t,i){if(t&1&&(h(0,"td",24),E(1,m2e,3,4,"span"),_()),t&2){let e=i.$implicit;p(),I(e.entryType.value==="DEBIT"?1:-1)}}function f2e(t,i){t&1&&(h(0,"th",23),y(1),S(2,"translate"),_()),t&2&&(p(),ee(" ",k(2,1,"labels.inputs.Credit")," "))}function h2e(t,i){if(t&1&&(h(0,"span"),y(1),S(2,"formatNumber"),_()),t&2){let e=M().$implicit;p(),St(" ",e.currency.displaySymbol||e.currency.code," ",k(2,2,e.amount)," ")}}function g2e(t,i){if(t&1&&(h(0,"td",24),E(1,h2e,3,4,"span"),_()),t&2){let e=i.$implicit;p(),I(e.entryType.value==="CREDIT"?1:-1)}}function _2e(t,i){t&1&&F(0,"tr",25)}function b2e(t,i){if(t&1){let e=le();h(0,"tr",26),N("click",function(){let o=G(e).$implicit,r=M(2);return W(r.viewJournalEntry(o))}),_()}}function v2e(t,i){if(t&1){let e=le();h(0,"div"),E(1,Z1e,2,1,"div",1),E(2,n2e,2,1,"div",0),h(3,"div",2)(4,"table",3),Vi(5,4),ot(6,i2e,3,3,"th",5)(7,o2e,2,1,"td",6),Bi(),Vi(8,7),ot(9,r2e,3,3,"th",5)(10,a2e,2,1,"td",6),Bi(),Vi(11,8),ot(12,s2e,3,3,"th",5)(13,c2e,2,1,"td",6),Bi(),Vi(14,9),ot(15,l2e,3,3,"th",5)(16,d2e,2,1,"td",6),Bi(),Vi(17,10),ot(18,u2e,3,3,"th",5)(19,p2e,2,1,"td",6),Bi(),Vi(20,11),ot(21,f2e,3,3,"th",5)(22,g2e,2,1,"td",6),Bi(),ot(23,_2e,1,0,"tr",12)(24,b2e,1,0,"tr",13),_(),h(25,"div",14)(26,"button",15),N("click",function(){G(e);let o=M();return W(o.goBack())}),y(27),S(28,"translate"),_()()()()}if(t&2){let e=M();p(),I(e.dataSource!=null&&e.dataSource.data[0].manualEntry?1:-1),p(),I(e.isViewTransaction()?2:-1),p(2),D("dataSource",e.dataSource),p(19),D("matHeaderRowDef",e.displayedColumns),p(),D("matRowDefColumns",e.displayedColumns),p(3),ee(" ",k(28,6,"labels.buttons.Back")," ")}}function y2e(t,i){if(t&1){let e=le();h(0,"div",0)(1,"div",27)(2,"div",28),F(3,"i",29),y(4),S(5,"translate"),_()(),h(6,"div",14)(7,"button",15),N("click",function(){G(e);let o=M();return W(o.goBack())}),y(8),S(9,"translate"),_()()()}t&2&&(p(4),ee(" ",k(5,2,"labels.text.No data found")," "),p(4),ee(" ",k(9,4,"labels.buttons.Back")," "))}var jR=(()=>{class t{constructor(){this.accountingService=d(BR),this.route=d(ro),this.router=d(bo),this.dialog=d(Wi),this.location=d(Jo),this.displayedColumns=["id","glAccountType","glAccountCode","glAccountName","debit","credit"],this.isJournalEntryLoaded=!1,this.isManualJournalEntry=!1}ngOnInit(){this.route.data.subscribe(e=>{this.title=e.title,this.isJournalEntryLoaded=!1,this.isViewTransaction()?(this.transaction=e.transaction,e.transaction.pageItems.length>0&&(this.isJournalEntryLoaded=!0,this.transactionId=e.transaction.pageItems[0].transactionId,this.isManualJournalEntry=e.transaction.pageItems[0].manualEntry)):this.isViewTransfer()&&(this.journalEntriesData=e.transferJournalEntryData.journalEntryData.content,this.isJournalEntryLoaded=!0),this.setTransaction()})}isViewTransaction(){return this.title==="View Transaction"}isViewTransfer(){return this.title==="View Transfer"}setTransaction(){this.journalEntriesData!=null?this.dataSource=new Eu(this.journalEntriesData):(this.dataSource=new Eu(this.transaction.pageItems),this.dataSource.sortingDataAccessor=(e,n)=>{switch(n){case"glAccountType":return e.glAccountType.value;case"debit":return e.amount;case"credit":return e.amount;default:return e[n]}}),this.dataSource.paginator=this.paginator,this.dataSource.sort=this.sort}viewJournalEntry(e){this.dialog.open(jh,{data:{journalEntry:e}})}revertTransaction(e){this.dialog.open(VR,{data:{reverted:this.dataSource.data[0].reversed,transactionId:e}}).afterClosed().subscribe(o=>{o.revert?this.accountingService.revertTransaction(this.transactionId,o.comments).subscribe(r=>{this.dataSource.data[0].reversed=!0,this.revertTransaction(r.transactionId)}):o.redirect&&this.router.navigate(["../",e],{relativeTo:this.route})})}goBack(){this.location.back()}journalEntryColor(){return this.isManualJournalEntry?"manual-entry":""}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275cmp=P({type:t,selectors:[["mifosx-view-journal-entry-transaction"]],viewQuery:function(n,o){if(n&1&&(ue(wb,7),ue(oh,7)),n&2){let r;U(r=$())&&(o.paginator=r.first),U(r=$())&&(o.sort=r.first)}},decls:2,vars:2,consts:[[1,"container","m-b-20"],[1,"layout-row","layout-align-end","container","m-b-20"],[1,"mat-elevation-z8","container","layout-align-center","layout-row-wrap"],["mat-table","","matSort","",3,"dataSource"],["matColumnDef","id"],["mat-header-cell","","class","center","mat-sort-header","",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","glAccountType"],["matColumnDef","glAccountCode"],["matColumnDef","glAccountName"],["matColumnDef","debit"],["matColumnDef","credit"],["mat-header-row","",4,"matHeaderRowDef"],["mat-row","","class","select-row",3,"click",4,"matRowDef","matRowDefColumns"],[1,"layout-row","layout-align-center","m-t-15","m-b-15","gap-5px","layout-xs-column"],["type","button","color","primary","mat-raised-button","",3,"click"],["mat-raised-button","","color","primary",3,"disabled","click",4,"mifosxHasPermission"],["mat-raised-button","","color","primary",3,"click","disabled"],["icon","undo",1,"m-r-10"],[1,"mat-elevation-z8",3,"ngClass"],[1,"layout-row-wrap"],[1,"flex-25","header"],[1,"flex-25"],["mat-header-cell","","mat-sort-header","",1,"center"],["mat-cell",""],["mat-header-row",""],["mat-row","",1,"select-row",3,"click"],[1,"alert"],[1,"message"],[1,"fa","fa-exclamation-circle","alert-check"]],template:function(n,o){n&1&&(E(0,v2e,29,8,"div"),E(1,y2e,10,6,"div",0)),n&2&&(I(o.isJournalEntryLoaded?0:-1),p(),I(o.isJournalEntryLoaded?-1:1))},dependencies:[he,Un,ve,LE,AE,vt,Ps,Yt,ph,oh,gh,hh,_h,Bz,fh,bh,vh,Ch,yh,xh,Lo,Te,ca,Ts,Km],styles:["body[_ngcontent-%COMP%] table[_ngcontent-%COMP%] tbody[_ngcontent-%COMP%] tr[_ngcontent-%COMP%]:nth-child(2n){background-color:#f2f2f2}.bg-black[_ngcontent-%COMP%]{background-color:#000}.bg-light-grey[_ngcontent-%COMP%]{background-color:#e5e5e5}.bg-medium-grey[_ngcontent-%COMP%]{background-color:#ccc}.bg-grey[_ngcontent-%COMP%]{background-color:#999}.bg-dark-grey[_ngcontent-%COMP%]{background-color:#222}.bg-white[_ngcontent-%COMP%], .bg-fff[_ngcontent-%COMP%]{background-color:#fff}.bg-none[_ngcontent-%COMP%], .no-bg[_ngcontent-%COMP%]{background:none;background-image:none;background-color:transparent}.bg-facebook[_ngcontent-%COMP%]{background-color:#47639e}.bg-twitter[_ngcontent-%COMP%]{background-color:#02a8f3}body[_ngcontent-%COMP%] table[_ngcontent-%COMP%]{border:1px solid rgba(0,0,0,.12)}.no-border[_ngcontent-%COMP%]{border:none}.no-border-t[_ngcontent-%COMP%]{border-top:none}.no-border-r[_ngcontent-%COMP%]{border-right:none}.no-border-b[_ngcontent-%COMP%]{border-bottom:none}.no-border-l[_ngcontent-%COMP%]{border-left:none}.no-border-lr[_ngcontent-%COMP%], .no-border-rl[_ngcontent-%COMP%]{border-left:none;border-right:none}.no-border-tb[_ngcontent-%COMP%], .no-border-bt[_ngcontent-%COMP%]{border-top:none;border-bottom:none}.no-border-tl[_ngcontent-%COMP%], .no-border-lt[_ngcontent-%COMP%]{border-top:none;border-left:none}.no-border-tr[_ngcontent-%COMP%], .no-border-rt[_ngcontent-%COMP%]{border-top:none;border-right:none}.no-border-bl[_ngcontent-%COMP%], .no-border-lb[_ngcontent-%COMP%]{border-bottom:none;border-left:none}.no-border-br[_ngcontent-%COMP%], .no-border-rb[_ngcontent-%COMP%]{border-bottom:none;border-right:none}.border-dashed[_ngcontent-%COMP%], .border-dotted[_ngcontent-%COMP%]{border-style:dashed}.border-black[_ngcontent-%COMP%]{border-color:#000}.border-light-grey[_ngcontent-%COMP%]{border-color:#e5e5e5}.border-medium-grey[_ngcontent-%COMP%]{border-color:#ccc}.border-grey[_ngcontent-%COMP%]{border-color:#999}.border-dark-grey[_ngcontent-%COMP%]{border-color:#2222}.border-white[_ngcontent-%COMP%], .border-fff[_ngcontent-%COMP%]{border-color:#fff}.no-border-radius[_ngcontent-%COMP%]{border-radius:0}.radius3[_ngcontent-%COMP%]{border-radius:3px}.radius5[_ngcontent-%COMP%]{border-radius:5px}.radius10[_ngcontent-%COMP%]{border-radius:10px}.column-mandatory[_ngcontent-%COMP%]{color:#5cb85c;text-align:center}.not-column-mandatory[_ngcontent-%COMP%]{color:#666f73;text-align:center}.cdk-drag-placeholder[_ngcontent-%COMP%]{background:#3498db}.yes[_ngcontent-%COMP%]{color:#5cb85c!important;background-color:#5cb85c;height:4px;cursor:none}.no[_ngcontent-%COMP%]{color:red;background-color:red;height:4px;cursor:none}.strike[_ngcontent-%COMP%]{text-decoration:line-through;color:red}.transfer[_ngcontent-%COMP%]{color:#16a085}.linked[_ngcontent-%COMP%]{color:#4461e2}.accrual[_ngcontent-%COMP%]{color:#999}.fa-question[_ngcontent-%COMP%]{color:#4461e2}.enabled[_ngcontent-%COMP%]{color:#32cd32}.disabled[_ngcontent-%COMP%]{color:#f44366}.v-mid[_ngcontent-%COMP%], .v-m[_ngcontent-%COMP%]{vertical-align:middle}.v-top[_ngcontent-%COMP%], .v-t[_ngcontent-%COMP%]{vertical-align:top}.v-bottom[_ngcontent-%COMP%], .v-b[_ngcontent-%COMP%]{vertical-align:bottom}.v-super[_ngcontent-%COMP%]{vertical-align:super}.r-amount[_ngcontent-%COMP%]{text-align:right!important;padding-right:5px!important}.left[_ngcontent-%COMP%]{text-align:left!important}.right[_ngcontent-%COMP%]{text-align:right!important}.center[_ngcontent-%COMP%]{text-align:center!important}.amount-plus[_ngcontent-%COMP%]{color:#000}.amount-minus[_ngcontent-%COMP%]{color:#4461e2}.block[_ngcontent-%COMP%]{display:block}.inline[_ngcontent-%COMP%]{display:inline}.in-block[_ngcontent-%COMP%]{display:inline-block;zoom:1}.d-none[_ngcontent-%COMP%], .hide[_ngcontent-%COMP%], .hidden[_ngcontent-%COMP%]{display:none}.t-0[_ngcontent-%COMP%]{top:0}.b-0[_ngcontent-%COMP%]{bottom:0}.l-0[_ngcontent-%COMP%]{left:0}.r-0[_ngcontent-%COMP%]{right:0}.tb-0[_ngcontent-%COMP%]{top:0;bottom:0}.lr-0[_ngcontent-%COMP%]{left:0;right:0}.f-left[_ngcontent-%COMP%]{float:left}.f-right[_ngcontent-%COMP%]{float:right}.f-none[_ngcontent-%COMP%]{float:none}textarea[_ngcontent-%COMP%]{resize:both}textarea.vertical[_ngcontent-%COMP%], textarea.horizontal[_ngcontent-%COMP%]{resize:vertical}textarea.noresize[_ngcontent-%COMP%]{resize:none}.full-input[_ngcontent-%COMP%] input[_ngcontent-%COMP%], .full-input[_ngcontent-%COMP%] select[_ngcontent-%COMP%], .full-input[_ngcontent-%COMP%] textarea[_ngcontent-%COMP%]{width:100%}.normal[_ngcontent-%COMP%] input[_ngcontent-%COMP%], .normal[_ngcontent-%COMP%] select[_ngcontent-%COMP%], .normal[_ngcontent-%COMP%] textarea[_ngcontent-%COMP%], .full-input[_ngcontent-%COMP%] [type=checkbox][_ngcontent-%COMP%], .full-input[_ngcontent-%COMP%] [type=radio][_ngcontent-%COMP%]{width:auto}.mat-tab-body-content[_ngcontent-%COMP%]{margin-bottom:20px}.mat-datepicker-input[_ngcontent-%COMP%]{margin-top:5px;margin-bottom:5px}.loader-wrapper[_ngcontent-%COMP%]{height:100vh;width:100vw}.loader-wrapper[_ngcontent-%COMP%] .triangle[_ngcontent-%COMP%]{width:0;height:0;border-style:solid;position:absolute;animation:_ngcontent-%COMP%_rotate .8s infinite .2s}.loader-wrapper[_ngcontent-%COMP%] .bottom[_ngcontent-%COMP%]{border-width:0 90px 90px;border-color:transparent transparent #1fb050;bottom:calc(50% - 100px);left:calc(50% - 90px)}.loader-wrapper[_ngcontent-%COMP%] .top[_ngcontent-%COMP%]{border-width:90px 90px 0;border-color:#b4d575 transparent transparent;top:calc(50% - 100px);left:calc(50% - 90px)}.loader-wrapper[_ngcontent-%COMP%] .left[_ngcontent-%COMP%]{border-width:90px 0 90px 90px;border-color:transparent transparent transparent #1074b9;top:calc(50% - 90px);left:calc(50% - 100px)}.loader-wrapper[_ngcontent-%COMP%] .right[_ngcontent-%COMP%]{border-width:90px 90px 90px 0;border-color:transparent #1daeec transparent transparent;top:calc(50% - 90px);right:calc(50% - 100px)}@keyframes _ngcontent-%COMP%_rotate{0%{transform:rotate(0)}to{transform:rotate(360deg)}}body[_ngcontent-%COMP%]{margin:0}.container[_ngcontent-%COMP%]{margin:0 auto}.mb-05[_ngcontent-%COMP%]{margin-bottom:.5rem}.mr-05[_ngcontent-%COMP%]{margin-right:.5rem}.mb-1[_ngcontent-%COMP%]{margin-bottom:1rem}.mt-1[_ngcontent-%COMP%]{margin-top:1rem}.m-5[_ngcontent-%COMP%]{margin:5px}.m-t-5[_ngcontent-%COMP%]{margin-top:5px}.m-r-5[_ngcontent-%COMP%]{margin-right:5px}.m-b-5[_ngcontent-%COMP%]{margin-bottom:5px}.m-l-5[_ngcontent-%COMP%]{margin-left:5px}.m-v-5[_ngcontent-%COMP%]{margin:5px 0}.m-h-5[_ngcontent-%COMP%]{margin:0 5px}.m-10[_ngcontent-%COMP%]{margin:10px}.m-t-10[_ngcontent-%COMP%]{margin-top:10px}.m-r-10[_ngcontent-%COMP%]{margin-right:10px}.m-b-10[_ngcontent-%COMP%]{margin-bottom:10px}.m-l-10[_ngcontent-%COMP%]{margin-left:10px}.m-v-10[_ngcontent-%COMP%]{margin:10px 0}.m-h-10[_ngcontent-%COMP%]{margin:0 10px}.m-15[_ngcontent-%COMP%]{margin:15px}.m-t-15[_ngcontent-%COMP%]{margin-top:15px}.m-r-15[_ngcontent-%COMP%]{margin-right:15px}.m-b-15[_ngcontent-%COMP%]{margin-bottom:15px}.m-l-15[_ngcontent-%COMP%]{margin-left:15px}.m-v-15[_ngcontent-%COMP%]{margin:15px 0}.m-h-15[_ngcontent-%COMP%]{margin:0 15px}.m-20[_ngcontent-%COMP%]{margin:20px}.m-t-20[_ngcontent-%COMP%]{margin-top:20px}.m-r-20[_ngcontent-%COMP%]{margin-right:20px}.m-b-20[_ngcontent-%COMP%]{margin-bottom:20px}.m-l-20[_ngcontent-%COMP%]{margin-left:20px}.m-v-20[_ngcontent-%COMP%]{margin:20px 0}.m-h-20[_ngcontent-%COMP%]{margin:0 20px}.m-25[_ngcontent-%COMP%]{margin:25px}.m-t-25[_ngcontent-%COMP%]{margin-top:25px}.m-r-25[_ngcontent-%COMP%]{margin-right:25px}.m-b-25[_ngcontent-%COMP%]{margin-bottom:25px}.m-l-25[_ngcontent-%COMP%]{margin-left:25px}.m-v-25[_ngcontent-%COMP%]{margin:25px 0}.m-h-25[_ngcontent-%COMP%]{margin:0 25px}.m-30[_ngcontent-%COMP%]{margin:30px}.m-t-30[_ngcontent-%COMP%]{margin-top:30px}.m-r-30[_ngcontent-%COMP%]{margin-right:30px}.m-b-30[_ngcontent-%COMP%]{margin-bottom:30px}.m-l-30[_ngcontent-%COMP%]{margin-left:30px}.m-v-30[_ngcontent-%COMP%]{margin:30px 0}.m-h-30[_ngcontent-%COMP%]{margin:0 30px}.m-35[_ngcontent-%COMP%]{margin:35px}.m-t-35[_ngcontent-%COMP%]{margin-top:35px}.m-r-35[_ngcontent-%COMP%]{margin-right:35px}.m-b-35[_ngcontent-%COMP%]{margin-bottom:35px}.m-l-35[_ngcontent-%COMP%]{margin-left:35px}.m-v-35[_ngcontent-%COMP%]{margin:35px 0}.m-h-35[_ngcontent-%COMP%]{margin:0 35px}.m-40[_ngcontent-%COMP%]{margin:40px}.m-t-40[_ngcontent-%COMP%]{margin-top:40px}.m-r-40[_ngcontent-%COMP%]{margin-right:40px}.m-b-40[_ngcontent-%COMP%]{margin-bottom:40px}.m-l-40[_ngcontent-%COMP%]{margin-left:40px}.m-v-40[_ngcontent-%COMP%]{margin:40px 0}.m-h-40[_ngcontent-%COMP%]{margin:0 40px}.m-45[_ngcontent-%COMP%]{margin:45px}.m-t-45[_ngcontent-%COMP%]{margin-top:45px}.m-r-45[_ngcontent-%COMP%]{margin-right:45px}.m-b-45[_ngcontent-%COMP%]{margin-bottom:45px}.m-l-45[_ngcontent-%COMP%]{margin-left:45px}.m-v-45[_ngcontent-%COMP%]{margin:45px 0}.m-h-45[_ngcontent-%COMP%]{margin:0 45px}.m-50[_ngcontent-%COMP%]{margin:50px}.m-t-50[_ngcontent-%COMP%]{margin-top:50px}.m-r-50[_ngcontent-%COMP%]{margin-right:50px}.m-b-50[_ngcontent-%COMP%]{margin-bottom:50px}.m-l-50[_ngcontent-%COMP%]{margin-left:50px}.m-v-50[_ngcontent-%COMP%]{margin:50px 0}.m-h-50[_ngcontent-%COMP%]{margin:0 50px}.m-55[_ngcontent-%COMP%]{margin:55px}.m-t-55[_ngcontent-%COMP%]{margin-top:55px}.m-r-55[_ngcontent-%COMP%]{margin-right:55px}.m-b-55[_ngcontent-%COMP%]{margin-bottom:55px}.m-l-55[_ngcontent-%COMP%]{margin-left:55px}.m-v-55[_ngcontent-%COMP%]{margin:55px 0}.m-h-55[_ngcontent-%COMP%]{margin:0 55px}.m-60[_ngcontent-%COMP%]{margin:60px}.m-t-60[_ngcontent-%COMP%]{margin-top:60px}.m-r-60[_ngcontent-%COMP%]{margin-right:60px}.m-b-60[_ngcontent-%COMP%]{margin-bottom:60px}.m-l-60[_ngcontent-%COMP%]{margin-left:60px}.m-v-60[_ngcontent-%COMP%]{margin:60px 0}.m-h-60[_ngcontent-%COMP%]{margin:0 60px}.m-65[_ngcontent-%COMP%]{margin:65px}.m-t-65[_ngcontent-%COMP%]{margin-top:65px}.m-r-65[_ngcontent-%COMP%]{margin-right:65px}.m-b-65[_ngcontent-%COMP%]{margin-bottom:65px}.m-l-65[_ngcontent-%COMP%]{margin-left:65px}.m-v-65[_ngcontent-%COMP%]{margin:65px 0}.m-h-65[_ngcontent-%COMP%]{margin:0 65px}.m-70[_ngcontent-%COMP%]{margin:70px}.m-t-70[_ngcontent-%COMP%]{margin-top:70px}.m-r-70[_ngcontent-%COMP%]{margin-right:70px}.m-b-70[_ngcontent-%COMP%]{margin-bottom:70px}.m-l-70[_ngcontent-%COMP%]{margin-left:70px}.m-v-70[_ngcontent-%COMP%]{margin:70px 0}.m-h-70[_ngcontent-%COMP%]{margin:0 70px}.m-75[_ngcontent-%COMP%]{margin:75px}.m-t-75[_ngcontent-%COMP%]{margin-top:75px}.m-r-75[_ngcontent-%COMP%]{margin-right:75px}.m-b-75[_ngcontent-%COMP%]{margin-bottom:75px}.m-l-75[_ngcontent-%COMP%]{margin-left:75px}.m-v-75[_ngcontent-%COMP%]{margin:75px 0}.m-h-75[_ngcontent-%COMP%]{margin:0 75px}.m-80[_ngcontent-%COMP%]{margin:80px}.m-t-80[_ngcontent-%COMP%]{margin-top:80px}.m-r-80[_ngcontent-%COMP%]{margin-right:80px}.m-b-80[_ngcontent-%COMP%]{margin-bottom:80px}.m-l-80[_ngcontent-%COMP%]{margin-left:80px}.m-v-80[_ngcontent-%COMP%]{margin:80px 0}.m-h-80[_ngcontent-%COMP%]{margin:0 80px}.no-m[_ngcontent-%COMP%]{margin:0}.no-m-t[_ngcontent-%COMP%]{margin-top:0}.no-m-r[_ngcontent-%COMP%]{margin-right:0}.no-m-b[_ngcontent-%COMP%]{margin-bottom:0}.no-m-l[_ngcontent-%COMP%]{margin-left:0}.no-m-v[_ngcontent-%COMP%], .no-m-h[_ngcontent-%COMP%], .no-margin[_ngcontent-%COMP%]{margin:0}.no-m-lr[_ngcontent-%COMP%], .no-m-rl[_ngcontent-%COMP%]{margin-left:0;margin-right:0}.no-m-tb[_ngcontent-%COMP%], .no-m-bt[_ngcontent-%COMP%]{margin-top:0;margin-bottom:0}.m-t-only[_ngcontent-%COMP%]{margin-left:0;margin-right:0;margin-bottom:0}.m-b-only[_ngcontent-%COMP%]{margin-left:0;margin-right:0;margin-top:0}.m-l-only[_ngcontent-%COMP%]{margin-right:0;margin-top:0;margin-bottom:0}.m-r-only[_ngcontent-%COMP%]{margin-left:0;margin-top:0;margin-bottom:0}.m-auto[_ngcontent-%COMP%]{margin-left:auto;margin-right:auto}.ls-0[_ngcontent-%COMP%]{margin-left:10px;margin-right:10px}html[_ngcontent-%COMP%], body[_ngcontent-%COMP%]{-webkit-tap-highlight-color:transparent}div[_ngcontent-%COMP%]{box-sizing:border-box}.color-inherit[_ngcontent-%COMP%]{color:inherit}.no-shadow[_ngcontent-%COMP%]{box-shadow:none}.pointer[_ngcontent-%COMP%]{cursor:pointer}.nolist[_ngcontent-%COMP%]{list-style:none}.actions-menu[_ngcontent-%COMP%]{color:#fff}.alert[_ngcontent-%COMP%]{background-color:#e8f4fd;padding:6px 16px;font-size:.875rem;font-family:Roboto,Helvetica Neue,sans-serif;font-weight:400;line-height:1.43;border-radius:4px;letter-spacing:normal;margin:10px}.alert[_ngcontent-%COMP%] .message[_ngcontent-%COMP%]{padding:8px 0;font-size:18px}.alert[_ngcontent-%COMP%] .alert-check[_ngcontent-%COMP%]{color:#359ff4;margin-right:2px;font-size:1.4rem} .mat-tooltip{font-size:15px;color:#fff!important;background-color:#4461e2b3;border:1px solid rgb(25.7777777778,51.5555555556,166.2222222222);max-width:400px!important;white-space:pre-line!important}.loading[_ngcontent-%COMP%]{position:absolute;min-width:100%;width:100px;height:12px;background:linear-gradient(125deg,#fff,#4461e2,#fff);animation:grow 4s linear infinite,move 4s linear infinite}mat-card-title[_ngcontent-%COMP%]{font-weight:600;font-size:x-large;padding-left:20px;padding-top:20px}html[_ngcontent-%COMP%], body[_ngcontent-%COMP%]{overflow:hidden}.overflow-x-scroll[_ngcontent-%COMP%]{max-width:100%;overflow-x:auto}.overflow-no[_ngcontent-%COMP%]{overflow:hidden}.overflow-auto[_ngcontent-%COMP%]{overflow:auto}.overflow-scroll[_ngcontent-%COMP%]{overflow:scroll}.table-container[_ngcontent-%COMP%]{overflow-x:auto;max-width:100%}body[_ngcontent-%COMP%], .no-p[_ngcontent-%COMP%]{padding:0}.no-p-t[_ngcontent-%COMP%]{padding-top:0}.no-p-r[_ngcontent-%COMP%]{padding-right:0}.no-p-b[_ngcontent-%COMP%]{padding-bottom:0}.no-p-l[_ngcontent-%COMP%]{padding-left:0}.no-p-v[_ngcontent-%COMP%], .no-p-h[_ngcontent-%COMP%]{padding:0}.p-5[_ngcontent-%COMP%]{padding:5px}.p-t-5[_ngcontent-%COMP%]{padding-top:5px}.p-r-5[_ngcontent-%COMP%]{padding-right:5px}.p-b-5[_ngcontent-%COMP%]{padding-bottom:5px}.p-l-5[_ngcontent-%COMP%]{padding-left:5px}.p-v-5[_ngcontent-%COMP%]{padding:5px 0}.p-h-5[_ngcontent-%COMP%]{padding:0 5px}.p-10[_ngcontent-%COMP%]{padding:10px}.p-t-10[_ngcontent-%COMP%]{padding-top:10px}.p-b-10[_ngcontent-%COMP%]{padding-bottom:10px}.p-v-10[_ngcontent-%COMP%]{padding:10px 0}.p-h-10[_ngcontent-%COMP%]{padding:0 10px}.p-15[_ngcontent-%COMP%]{padding:15px}.p-t-15[_ngcontent-%COMP%]{padding-top:15px}.p-r-15[_ngcontent-%COMP%]{padding-right:15px}.p-b-15[_ngcontent-%COMP%]{padding-bottom:15px}.p-l-15[_ngcontent-%COMP%]{padding-left:15px}.p-v-15[_ngcontent-%COMP%]{padding:15px 0}.p-h-15[_ngcontent-%COMP%]{padding:0 15px}.p-20[_ngcontent-%COMP%]{padding:20px}.p-t-20[_ngcontent-%COMP%]{padding-top:20px}.p-r-20[_ngcontent-%COMP%]{padding-right:20px}.p-b-20[_ngcontent-%COMP%]{padding-bottom:20px}.p-l-20[_ngcontent-%COMP%]{padding-left:20px}.p-v-20[_ngcontent-%COMP%]{padding:20px 0}.p-h-20[_ngcontent-%COMP%]{padding:0 20px}.p-25[_ngcontent-%COMP%]{padding:25px}.p-t-25[_ngcontent-%COMP%]{padding-top:25px}.p-r-25[_ngcontent-%COMP%]{padding-right:25px}.p-b-25[_ngcontent-%COMP%]{padding-bottom:25px}.p-l-25[_ngcontent-%COMP%]{padding-left:25px}.p-v-25[_ngcontent-%COMP%]{padding:25px 0}.p-h-25[_ngcontent-%COMP%]{padding:0 25px}.p-30[_ngcontent-%COMP%]{padding:30px}.p-t-30[_ngcontent-%COMP%]{padding-top:30px}.p-r-30[_ngcontent-%COMP%]{padding-right:30px}.p-b-30[_ngcontent-%COMP%]{padding-bottom:30px}.p-l-30[_ngcontent-%COMP%]{padding-left:30px}.p-v-30[_ngcontent-%COMP%]{padding:30px 0}.p-h-30[_ngcontent-%COMP%]{padding:0 30px}.p-35[_ngcontent-%COMP%]{padding:35px}.p-t-35[_ngcontent-%COMP%]{padding-top:35px}.p-r-35[_ngcontent-%COMP%]{padding-right:35px}.p-b-35[_ngcontent-%COMP%]{padding-bottom:35px}.p-l-35[_ngcontent-%COMP%]{padding-left:35px}.p-v-35[_ngcontent-%COMP%]{padding:35px 0}.p-h-35[_ngcontent-%COMP%]{padding:0 35px}.p-40[_ngcontent-%COMP%]{padding:40px}.p-t-40[_ngcontent-%COMP%]{padding-top:40px}.p-r-40[_ngcontent-%COMP%]{padding-right:40px}.p-b-40[_ngcontent-%COMP%]{padding-bottom:40px}.p-l-40[_ngcontent-%COMP%]{padding-left:40px}.p-v-40[_ngcontent-%COMP%]{padding-top:40px;padding-bottom:40px}.p-h-40[_ngcontent-%COMP%]{padding:0 40px}.p-45[_ngcontent-%COMP%]{padding:45px}.p-t-45[_ngcontent-%COMP%]{padding-top:45px}.p-r-45[_ngcontent-%COMP%]{padding-right:45px}.p-b-45[_ngcontent-%COMP%]{padding-bottom:45px}.p-l-45[_ngcontent-%COMP%]{padding-left:45px}.p-v-45[_ngcontent-%COMP%]{padding:45px 0}.p-h-45[_ngcontent-%COMP%]{padding:0 45px}.p-50[_ngcontent-%COMP%]{padding:50px}.p-t-50[_ngcontent-%COMP%]{padding-top:50px}.p-r-50[_ngcontent-%COMP%]{padding-right:50px}.p-b-50[_ngcontent-%COMP%]{padding-bottom:50px}.p-l-50[_ngcontent-%COMP%]{padding-left:50px}.p-v-50[_ngcontent-%COMP%]{padding:50px 0}.p-h-50[_ngcontent-%COMP%]{padding:0 50px}.p-55[_ngcontent-%COMP%]{padding:55px}.p-t-55[_ngcontent-%COMP%]{padding-top:55px}.p-r-55[_ngcontent-%COMP%]{padding-right:55px}.p-b-55[_ngcontent-%COMP%]{padding-bottom:55px}.p-l-55[_ngcontent-%COMP%]{padding-left:55px}.p-v-55[_ngcontent-%COMP%]{padding:55px 0}.p-h-55[_ngcontent-%COMP%]{padding:0 55px}.p-60[_ngcontent-%COMP%]{padding:60px}.p-t-60[_ngcontent-%COMP%]{padding-top:60px}.p-r-60[_ngcontent-%COMP%]{padding-right:60px}.p-b-60[_ngcontent-%COMP%]{padding-bottom:60px}.p-l-60[_ngcontent-%COMP%]{padding-left:60px}.p-v-60[_ngcontent-%COMP%]{padding:60px 0}.p-h-60[_ngcontent-%COMP%]{padding:0 60px}.p-65[_ngcontent-%COMP%]{padding:65px}.p-t-65[_ngcontent-%COMP%]{padding-top:65px}.p-r-65[_ngcontent-%COMP%]{padding-right:65px}.p-b-65[_ngcontent-%COMP%]{padding-bottom:65px}.p-l-65[_ngcontent-%COMP%]{padding-left:65px}.p-v-65[_ngcontent-%COMP%]{padding:65px 0}.p-h-65[_ngcontent-%COMP%]{padding:0 65px}.p-70[_ngcontent-%COMP%]{padding:70px}.p-t-70[_ngcontent-%COMP%]{padding-top:70px}.p-r-70[_ngcontent-%COMP%]{padding-right:70px}.p-b-70[_ngcontent-%COMP%]{padding-bottom:70px}.p-l-70[_ngcontent-%COMP%]{padding-left:70px}.p-v-70[_ngcontent-%COMP%]{padding:70px 0}.p-h-70[_ngcontent-%COMP%]{padding:0 70px}.p-75[_ngcontent-%COMP%]{padding:75px}.p-t-75[_ngcontent-%COMP%]{padding-top:75px}.p-r-75[_ngcontent-%COMP%]{padding-right:75px}.p-b-75[_ngcontent-%COMP%]{padding-bottom:75px}.p-l-75[_ngcontent-%COMP%]{padding-left:75px}.p-v-75[_ngcontent-%COMP%]{padding:75px 0}.p-h-75[_ngcontent-%COMP%]{padding:0 75px}.p-80[_ngcontent-%COMP%]{padding:80px}.p-t-80[_ngcontent-%COMP%]{padding-top:80px}.p-r-80[_ngcontent-%COMP%]{padding-right:80px}.p-b-80[_ngcontent-%COMP%]{padding-bottom:80px}.p-l-80[_ngcontent-%COMP%]{padding-left:80px}.p-v-80[_ngcontent-%COMP%]{padding:80px 0}.p-h-80[_ngcontent-%COMP%]{padding:0 80px}.no-padding[_ngcontent-%COMP%]{padding:0!important}.no-pad-lr[_ngcontent-%COMP%], .no-pad-rl[_ngcontent-%COMP%]{padding-left:0;padding-right:0}.no-pad-tb[_ngcontent-%COMP%], .no-pad-bt[_ngcontent-%COMP%]{padding-top:0;padding-bottom:0}.pad-t-only[_ngcontent-%COMP%]{padding-left:0;padding-right:0;padding-bottom:0}.pad-b-only[_ngcontent-%COMP%]{padding-left:0;padding-right:0;padding-top:0}.pad-l-only[_ngcontent-%COMP%]{padding-right:0;padding-top:0;padding-bottom:0}.pad-r-only[_ngcontent-%COMP%]{padding-left:0;padding-top:0;padding-bottom:0}html[_ngcontent-%COMP%], body[_ngcontent-%COMP%], .rel[_ngcontent-%COMP%], .relative[_ngcontent-%COMP%]{position:relative}.abs[_ngcontent-%COMP%], .absolute[_ngcontent-%COMP%]{position:absolute}.fixed[_ngcontent-%COMP%]{position:fixed}.status-active[_ngcontent-%COMP%]{color:#5cb85c}.status-inactive[_ngcontent-%COMP%]{color:#666f73}.status-deleted[_ngcontent-%COMP%]{color:#000}.status-pending[_ngcontent-%COMP%]{color:orange}.status-approved[_ngcontent-%COMP%]{color:#4461e2}.status-overpaid[_ngcontent-%COMP%]{color:purple}.status-chargeoff[_ngcontent-%COMP%]{color:#f39c12}.status-active-overdue[_ngcontent-%COMP%], .status-block[_ngcontent-%COMP%]{color:red}.status-matured[_ngcontent-%COMP%]{color:#ff4000}.subStatus-contract-termination[_ngcontent-%COMP%]{color:#b3b3b3}.mat-step-header[_ngcontent-%COMP%] .mat-step-icon-state-done[_ngcontent-%COMP%]{background-color:#2af72a}.mat-step-header[_ngcontent-%COMP%] .mat-step-icon-state-done[_ngcontent-%COMP%] .status-transfer-progress[_ngcontent-%COMP%]{color:#ff4000}.mat-step-header[_ngcontent-%COMP%] .mat-step-icon-state-done[_ngcontent-%COMP%] .status-transfer-hold[_ngcontent-%COMP%]{color:#df0101}html[_ngcontent-%COMP%], body[_ngcontent-%COMP%]{-webkit-font-smoothing:antialiased}html[_ngcontent-%COMP%]{font-size:16px}body[_ngcontent-%COMP%]{font-family:Roboto,Helvetica Neue,sans-serif;font-weight:400;font-size:14px;color:#000000de;line-height:1.5;letter-spacing:normal}.mat-h1[_ngcontent-%COMP%], .mat-headline[_ngcontent-%COMP%], .mat-typography[_ngcontent-%COMP%] .mat-h1[_ngcontent-%COMP%], .mat-typography[_ngcontent-%COMP%] .mat-headline[_ngcontent-%COMP%], .mat-typography[_ngcontent-%COMP%] h1[_ngcontent-%COMP%]{font:400 24px/32px Roboto,Helvetica Neue,sans-serif;letter-spacing:normal;margin:0 0 16px}.lh-1[_ngcontent-%COMP%]{line-height:1}.lh-13[_ngcontent-%COMP%]{line-height:1.3}.lh-15[_ngcontent-%COMP%]{line-height:1.5}.bold[_ngcontent-%COMP%], .strong[_ngcontent-%COMP%]{font-weight:700}.no-bold[_ngcontent-%COMP%]{font-weight:400}.italic[_ngcontent-%COMP%], .em[_ngcontent-%COMP%]{font-style:italic}.strike[_ngcontent-%COMP%]{text-decoration:line-through}.normal[_ngcontent-%COMP%]{font-weight:400;font-style:normal}.uppercase[_ngcontent-%COMP%]{text-transform:uppercase}.text-left[_ngcontent-%COMP%]{text-align:left}.text-center[_ngcontent-%COMP%]{text-align:center}.text-right[_ngcontent-%COMP%]{text-align:right}.w100[_ngcontent-%COMP%]{font-weight:100}.w200[_ngcontent-%COMP%]{font-weight:200}.w300[_ngcontent-%COMP%]{font-weight:300}.w400[_ngcontent-%COMP%]{font-weight:400}.w500[_ngcontent-%COMP%]{font-weight:500}.w600[_ngcontent-%COMP%]{font-weight:600}.w700[_ngcontent-%COMP%]{font-weight:700}.w800[_ngcontent-%COMP%]{font-weight:800}.w900[_ngcontent-%COMP%]{font-weight:900}.f9[_ngcontent-%COMP%]{font-size:9px}.f10[_ngcontent-%COMP%]{font-size:10px}.f11[_ngcontent-%COMP%]{font-size:11px}.f12[_ngcontent-%COMP%]{font-size:12px}.f13[_ngcontent-%COMP%]{font-size:13px}.f14[_ngcontent-%COMP%]{font-size:14px}.f15[_ngcontent-%COMP%]{font-size:15px}.f16[_ngcontent-%COMP%]{font-size:16px}.f17[_ngcontent-%COMP%]{font-size:17px}.f18[_ngcontent-%COMP%]{font-size:18px;line-height:30px}.f19[_ngcontent-%COMP%]{font-size:19px}.f20[_ngcontent-%COMP%]{font-size:20px}.f30[_ngcontent-%COMP%]{font-size:30px}.f40[_ngcontent-%COMP%]{font-size:40px}.f50[_ngcontent-%COMP%]{font-size:50px}.f60[_ngcontent-%COMP%]{font-size:60px}.size-small[_ngcontent-%COMP%]{font-size:75%}.size-normal[_ngcontent-%COMP%]{font-size:100%}.size-medium[_ngcontent-%COMP%]{font-size:125%}.size-big[_ngcontent-%COMP%], .size-large[_ngcontent-%COMP%]{font-size:150%}.size-huge[_ngcontent-%COMP%]{font-size:200%}.inherit[_ngcontent-%COMP%]{font:inherit}.text-shadow[_ngcontent-%COMP%]{text-shadow:1px 1px 1px rgba(0,0,0,.4)}.text-rgb-2[_ngcontent-%COMP%]{color:#0003}.text-rgb-3[_ngcontent-%COMP%]{color:#0000004d}.text-rgb-4[_ngcontent-%COMP%]{color:#0006}.text-rgb-5[_ngcontent-%COMP%]{color:#00000080}.no-ul[_ngcontent-%COMP%], .no-ul[_ngcontent-%COMP%]:hover, .no-ul[_ngcontent-%COMP%] a[_ngcontent-%COMP%], .no-ul[_ngcontent-%COMP%] a[_ngcontent-%COMP%]:hover{text-decoration:none}.no-wrap[_ngcontent-%COMP%]{white-space:nowrap}.auto-cell-size[_ngcontent-%COMP%]{white-space:nowrap;width:1%}.ls-0[_ngcontent-%COMP%]{letter-spacing:-3px;white-space:nowrap}.label-field[_ngcontent-%COMP%]{margin-top:32px}.wrap-content[_ngcontent-%COMP%]{overflow-wrap:break-word;word-wrap:break-word}.no-break-content[_ngcontent-%COMP%]{overflow-wrap:anywhere!important}.fit[_ngcontent-%COMP%]{max-width:100%}.half-width[_ngcontent-%COMP%]{width:50%}.full-width[_ngcontent-%COMP%]{width:100%}.full-height[_ngcontent-%COMP%]{height:100%}html[_ngcontent-%COMP%], body[_ngcontent-%COMP%]{width:100%;height:100%;min-height:100%}body[_ngcontent-%COMP%] table[_ngcontent-%COMP%]{width:100%}.container[_ngcontent-%COMP%]{max-width:74rem;width:90%}.mw300[_ngcontent-%COMP%]{max-width:300px}.mw400[_ngcontent-%COMP%]{max-width:400px}.mw500[_ngcontent-%COMP%]{max-width:500px}.mw600[_ngcontent-%COMP%]{max-width:600px}.fullwidth[_ngcontent-%COMP%]{width:100%}.zindex-1[_ngcontent-%COMP%]{z-index:1}.zindex-2[_ngcontent-%COMP%]{z-index:2}.zindex-3[_ngcontent-%COMP%]{z-index:3}.zindex-4[_ngcontent-%COMP%]{z-index:4}table[_ngcontent-%COMP%]{width:100%}table[_ngcontent-%COMP%] .select-row[_ngcontent-%COMP%]:hover{cursor:pointer}"]})}}return t})();function C2e(t,i){if(t&1){let e=le();h(0,"span",3),N("click",function(){G(e);let o=M();return W(o.copyValue())}),h(1,"b"),F(2,"fa-icon",4),S(3,"translate"),_()()}t&2&&(p(2),D("title",Ft(k(3,2,"labels.text.Copy Account Number"))))}function x2e(t,i){if(t&1&&(h(0,"span",1)(1,"a",5),y(2),_()()),t&2){let e=M();p(),D("href",Ft(e.getAccountLink()),_1),p(),T(e.accountNo)}}function M2e(t,i){if(t&1&&(h(0,"span",1),y(1),_()),t&2){let e=M();p(),T(e.accountNo)}}function w2e(t,i){if(t&1){let e=le();h(0,"span",6),N("click",function(){G(e);let o=M();return W(o.copyValue())}),h(1,"b"),F(2,"fa-icon",4),S(3,"translate"),_()()}t&2&&(p(2),D("title",Ft(k(3,2,"labels.text.Copy Account Number"))))}var HR=(()=>{class t{constructor(){this.clipboard=d(N2),this.display="right",this.clientId=null,this.accountId=null,this.accountType=null,this.iconVisible=!1,this.displayL=!1,this.displayR=!0}ngOnInit(){this.displayL=this.display==="left",this.displayR=this.display==="right"}copyValue(){this.clipboard.copy(this.accountNo)}mouseEnter(){this.iconVisible=!0}mouseLeave(){this.iconVisible=!1}getAccountLink(){return this.accountType?`/#/clients/${this.clientId}/${this.getAccountType()}/${this.accountId}`:""}getAccountType(){if(this.accountType==="1")return"loan-accounts";if(this.accountType==="2")return"savings-accounts"}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275cmp=P({type:t,selectors:[["mifosx-account-number"]],inputs:{accountNo:"accountNo",display:"display",clientId:"clientId",accountId:"accountId",accountType:"accountType"},decls:5,vars:4,consts:[[3,"mouseenter","mouseleave"],[1,"m-l-5"],[1,"m-l-3"],[1,"m-l-5",3,"click"],["icon","copy","size","sm",3,"title"],[3,"href"],[1,"m-l-3",3,"click"]],template:function(n,o){n&1&&(h(0,"span",0),N("mouseenter",function(){return o.mouseEnter()})("mouseleave",function(){return o.mouseLeave()}),E(1,C2e,4,4,"span",1),E(2,x2e,3,3,"span",1),E(3,M2e,2,1,"span",1),E(4,w2e,4,4,"span",2),_()),n&2&&(p(),I(o.displayL&&o.iconVisible?1:-1),p(),I(o.accountType?2:-1),p(),I(o.accountType?-1:3),p(),I(o.displayR&&o.iconVisible?4:-1))},dependencies:[he,ve,Yt,Te],encapsulation:2})}}return t})();function D2e(t,i){if(t&1){let e=le();h(0,"span",3),N("click",function(){G(e);let o=M();return W(o.copyValue())}),h(1,"b"),F(2,"fa-icon",4),S(3,"translate"),_()()}t&2&&(p(2),D("title",Ft(k(3,2,"labels.text.Copy Account Number"))))}function S2e(t,i){if(t&1){let e=le();h(0,"span",5),N("click",function(){G(e);let o=M();return W(o.copyValue())}),h(1,"b"),F(2,"fa-icon",4),S(3,"translate"),_()()}t&2&&(p(2),D("title",Ft(k(3,2,"labels.text.Copy Account Number"))))}var UR=(()=>{class t{constructor(){this.clipboard=d(N2),this.display="right",this.iconVisible=!1,this.displayL=!1,this.displayR=!0}ngOnInit(){this.displayL=this.display==="left",this.displayR=this.display==="right"}copyValue(){this.clipboard.copy(this.entityName)}mouseEnter(){this.iconVisible=!0}mouseLeave(){this.iconVisible=!1}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275cmp=P({type:t,selectors:[["mifosx-entity-name"]],inputs:{entityName:"entityName",display:"display"},decls:6,vars:3,consts:[[3,"mouseenter","mouseleave"],[1,"m-l-5"],[1,"m-l-3"],[1,"m-l-5",3,"click"],["icon","copy","size","sm",3,"title"],[1,"m-l-3",3,"click"]],template:function(n,o){n&1&&(h(0,"span",0),N("mouseenter",function(){return o.mouseEnter()})("mouseleave",function(){return o.mouseLeave()}),E(1,D2e,4,4,"span",1),h(2,"span",1)(3,"b"),y(4),_()(),E(5,S2e,4,4,"span",2),_()),n&2&&(p(),I(o.displayL&&o.iconVisible?1:-1),p(3),T(o.entityName),p(),I(o.displayR&&o.iconVisible?5:-1))},dependencies:[he,ve,Yt,Te],encapsulation:2})}}return t})();function k2e(t,i){if(t&1&&(nt(0,"tr")(1,"td",4),y(2),S(3,"translate"),rt(),nt(4,"td"),y(5),rt()()),t&2){let e=M(2);p(2),T(k(3,2,"labels.inputs.Account No")),p(3),T(e.paymentDetailData.accountNumber)}}function E2e(t,i){if(t&1&&(nt(0,"tr")(1,"td",4),y(2),S(3,"translate"),rt(),nt(4,"td"),y(5),rt()()),t&2){let e=M(2);p(2),T(k(3,2,"labels.inputs.Cheque Number")),p(3),T(e.paymentDetailData.checkNumber)}}function I2e(t,i){if(t&1&&(nt(0,"tr")(1,"td",4),y(2),S(3,"translate"),rt(),nt(4,"td",4),y(5),rt()()),t&2){let e=M(2);p(2),T(k(3,2,"labels.inputs.Routing Code")),p(3),T(e.paymentDetailData.routingCode)}}function O2e(t,i){if(t&1&&(nt(0,"tr")(1,"td",4),y(2),S(3,"translate"),rt(),nt(4,"td"),y(5),rt()()),t&2){let e=M(2);p(2),T(k(3,2,"labels.inputs.Receipt No")),p(3),T(e.paymentDetailData.receiptNumber)}}function T2e(t,i){if(t&1&&(nt(0,"tr")(1,"td",4),y(2),S(3,"translate"),rt(),nt(4,"td"),y(5),rt()()),t&2){let e=M(2);p(2),T(k(3,2,"labels.inputs.Bank No")),p(3),T(e.paymentDetailData.bankNumber)}}function P2e(t,i){if(t&1&&(nt(0,"table")(1,"tbody")(2,"tr")(3,"td",3),y(4),S(5,"translate"),rt()(),E(6,k2e,6,4,"tr"),E(7,E2e,6,4,"tr"),E(8,I2e,6,4,"tr"),E(9,O2e,6,4,"tr"),E(10,T2e,6,4,"tr"),rt()()),t&2){let e=M();p(4),T(k(5,6,"labels.inputs.Payment Details")),p(2),I(e.isNotNullOrEmpty(e.paymentDetailData.accountNumber)?6:-1),p(),I(e.isNotNullOrEmpty(e.paymentDetailData.checkNumber)?7:-1),p(),I(e.isNotNullOrEmpty(e.paymentDetailData.routingCode)?8:-1),p(),I(e.isNotNullOrEmpty(e.paymentDetailData.receiptNumber)?9:-1),p(),I(e.isNotNullOrEmpty(e.paymentDetailData.bankNumber)?10:-1)}}var $R=(()=>{class t{constructor(){}hasSomeValue(){return this.isNotNullOrEmpty(this.paymentDetailData.accountNumber)||this.isNotNullOrEmpty(this.paymentDetailData.bankNumber)||this.isNotNullOrEmpty(this.paymentDetailData.checkNumber)||this.isNotNullOrEmpty(this.paymentDetailData.receiptNumber)||this.isNotNullOrEmpty(this.paymentDetailData.routingCode)}isNotNullOrEmpty(e){return e!==null&&e!==""}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275cmp=P({type:t,selectors:[["mifosx-transaction-payment-detail"]],inputs:{paymentDetailData:"paymentDetailData"},decls:7,vars:5,consts:[[1,"layout-row-wrap","card-content"],[1,"flex-50","mat-body-strong"],[1,"flex-50"],["colspan","2",1,"mat-body-strong","center"],[1,"mat-body-strong"]],template:function(n,o){n&1&&(nt(0,"div",0)(1,"div",1),y(2),S(3,"translate"),rt(),nt(4,"div",2),y(5),rt()(),E(6,P2e,11,8,"table")),n&2&&(p(2),ee(" ",k(3,3,"labels.inputs.Payment Type")," "),p(3),ee(" ",o.paymentDetailData.paymentType.name," "),p(),I(o.hasSomeValue()?6:-1))},dependencies:[he,ve,Te],styles:["body[_ngcontent-%COMP%] table[_ngcontent-%COMP%] tbody[_ngcontent-%COMP%] tr[_ngcontent-%COMP%]:nth-child(2n){background-color:#f2f2f2}.bg-black[_ngcontent-%COMP%]{background-color:#000}.bg-light-grey[_ngcontent-%COMP%]{background-color:#e5e5e5}.bg-medium-grey[_ngcontent-%COMP%]{background-color:#ccc}.bg-grey[_ngcontent-%COMP%]{background-color:#999}.bg-dark-grey[_ngcontent-%COMP%]{background-color:#222}.bg-white[_ngcontent-%COMP%], .bg-fff[_ngcontent-%COMP%]{background-color:#fff}.bg-none[_ngcontent-%COMP%], .no-bg[_ngcontent-%COMP%]{background:none;background-image:none;background-color:transparent}.bg-facebook[_ngcontent-%COMP%]{background-color:#47639e}.bg-twitter[_ngcontent-%COMP%]{background-color:#02a8f3}body[_ngcontent-%COMP%] table[_ngcontent-%COMP%]{border:1px solid rgba(0,0,0,.12)}.no-border[_ngcontent-%COMP%]{border:none}.no-border-t[_ngcontent-%COMP%]{border-top:none}.no-border-r[_ngcontent-%COMP%]{border-right:none}.no-border-b[_ngcontent-%COMP%]{border-bottom:none}.no-border-l[_ngcontent-%COMP%]{border-left:none}.no-border-lr[_ngcontent-%COMP%], .no-border-rl[_ngcontent-%COMP%]{border-left:none;border-right:none}.no-border-tb[_ngcontent-%COMP%], .no-border-bt[_ngcontent-%COMP%]{border-top:none;border-bottom:none}.no-border-tl[_ngcontent-%COMP%], .no-border-lt[_ngcontent-%COMP%]{border-top:none;border-left:none}.no-border-tr[_ngcontent-%COMP%], .no-border-rt[_ngcontent-%COMP%]{border-top:none;border-right:none}.no-border-bl[_ngcontent-%COMP%], .no-border-lb[_ngcontent-%COMP%]{border-bottom:none;border-left:none}.no-border-br[_ngcontent-%COMP%], .no-border-rb[_ngcontent-%COMP%]{border-bottom:none;border-right:none}.border-dashed[_ngcontent-%COMP%], .border-dotted[_ngcontent-%COMP%]{border-style:dashed}.border-black[_ngcontent-%COMP%]{border-color:#000}.border-light-grey[_ngcontent-%COMP%]{border-color:#e5e5e5}.border-medium-grey[_ngcontent-%COMP%]{border-color:#ccc}.border-grey[_ngcontent-%COMP%]{border-color:#999}.border-dark-grey[_ngcontent-%COMP%]{border-color:#2222}.border-white[_ngcontent-%COMP%], .border-fff[_ngcontent-%COMP%]{border-color:#fff}.no-border-radius[_ngcontent-%COMP%]{border-radius:0}.radius3[_ngcontent-%COMP%]{border-radius:3px}.radius5[_ngcontent-%COMP%]{border-radius:5px}.radius10[_ngcontent-%COMP%]{border-radius:10px}.column-mandatory[_ngcontent-%COMP%]{color:#5cb85c;text-align:center}.not-column-mandatory[_ngcontent-%COMP%]{color:#666f73;text-align:center}.cdk-drag-placeholder[_ngcontent-%COMP%]{background:#3498db}.yes[_ngcontent-%COMP%]{color:#5cb85c!important;background-color:#5cb85c;height:4px;cursor:none}.no[_ngcontent-%COMP%]{color:red;background-color:red;height:4px;cursor:none}.strike[_ngcontent-%COMP%]{text-decoration:line-through;color:red}.transfer[_ngcontent-%COMP%]{color:#16a085}.linked[_ngcontent-%COMP%]{color:#4461e2}.accrual[_ngcontent-%COMP%]{color:#999}.fa-question[_ngcontent-%COMP%]{color:#4461e2}.enabled[_ngcontent-%COMP%]{color:#32cd32}.disabled[_ngcontent-%COMP%]{color:#f44366}.v-mid[_ngcontent-%COMP%], .v-m[_ngcontent-%COMP%]{vertical-align:middle}.v-top[_ngcontent-%COMP%], .v-t[_ngcontent-%COMP%]{vertical-align:top}.v-bottom[_ngcontent-%COMP%], .v-b[_ngcontent-%COMP%]{vertical-align:bottom}.v-super[_ngcontent-%COMP%]{vertical-align:super}.r-amount[_ngcontent-%COMP%]{text-align:right!important;padding-right:5px!important}.left[_ngcontent-%COMP%]{text-align:left!important}.right[_ngcontent-%COMP%]{text-align:right!important}.center[_ngcontent-%COMP%]{text-align:center!important}.amount-plus[_ngcontent-%COMP%]{color:#000}.amount-minus[_ngcontent-%COMP%]{color:#4461e2}.block[_ngcontent-%COMP%]{display:block}.inline[_ngcontent-%COMP%]{display:inline}.in-block[_ngcontent-%COMP%]{display:inline-block;zoom:1}.d-none[_ngcontent-%COMP%], .hide[_ngcontent-%COMP%], .hidden[_ngcontent-%COMP%]{display:none}.t-0[_ngcontent-%COMP%]{top:0}.b-0[_ngcontent-%COMP%]{bottom:0}.l-0[_ngcontent-%COMP%]{left:0}.r-0[_ngcontent-%COMP%]{right:0}.tb-0[_ngcontent-%COMP%]{top:0;bottom:0}.lr-0[_ngcontent-%COMP%]{left:0;right:0}.f-left[_ngcontent-%COMP%]{float:left}.f-right[_ngcontent-%COMP%]{float:right}.f-none[_ngcontent-%COMP%]{float:none}textarea[_ngcontent-%COMP%]{resize:both}textarea.vertical[_ngcontent-%COMP%], textarea.horizontal[_ngcontent-%COMP%]{resize:vertical}textarea.noresize[_ngcontent-%COMP%]{resize:none}.full-input[_ngcontent-%COMP%] input[_ngcontent-%COMP%], .full-input[_ngcontent-%COMP%] select[_ngcontent-%COMP%], .full-input[_ngcontent-%COMP%] textarea[_ngcontent-%COMP%]{width:100%}.normal[_ngcontent-%COMP%] input[_ngcontent-%COMP%], .normal[_ngcontent-%COMP%] select[_ngcontent-%COMP%], .normal[_ngcontent-%COMP%] textarea[_ngcontent-%COMP%], .full-input[_ngcontent-%COMP%] [type=checkbox][_ngcontent-%COMP%], .full-input[_ngcontent-%COMP%] [type=radio][_ngcontent-%COMP%]{width:auto}.mat-tab-body-content[_ngcontent-%COMP%]{margin-bottom:20px}.mat-datepicker-input[_ngcontent-%COMP%]{margin-top:5px;margin-bottom:5px}.loader-wrapper[_ngcontent-%COMP%]{height:100vh;width:100vw}.loader-wrapper[_ngcontent-%COMP%] .triangle[_ngcontent-%COMP%]{width:0;height:0;border-style:solid;position:absolute;animation:_ngcontent-%COMP%_rotate .8s infinite .2s}.loader-wrapper[_ngcontent-%COMP%] .bottom[_ngcontent-%COMP%]{border-width:0 90px 90px;border-color:transparent transparent #1fb050;bottom:calc(50% - 100px);left:calc(50% - 90px)}.loader-wrapper[_ngcontent-%COMP%] .top[_ngcontent-%COMP%]{border-width:90px 90px 0;border-color:#b4d575 transparent transparent;top:calc(50% - 100px);left:calc(50% - 90px)}.loader-wrapper[_ngcontent-%COMP%] .left[_ngcontent-%COMP%]{border-width:90px 0 90px 90px;border-color:transparent transparent transparent #1074b9;top:calc(50% - 90px);left:calc(50% - 100px)}.loader-wrapper[_ngcontent-%COMP%] .right[_ngcontent-%COMP%]{border-width:90px 90px 90px 0;border-color:transparent #1daeec transparent transparent;top:calc(50% - 90px);right:calc(50% - 100px)}@keyframes _ngcontent-%COMP%_rotate{0%{transform:rotate(0)}to{transform:rotate(360deg)}}body[_ngcontent-%COMP%]{margin:0}.container[_ngcontent-%COMP%]{margin:0 auto}.mb-05[_ngcontent-%COMP%]{margin-bottom:.5rem}.mr-05[_ngcontent-%COMP%]{margin-right:.5rem}.mb-1[_ngcontent-%COMP%]{margin-bottom:1rem}.mt-1[_ngcontent-%COMP%]{margin-top:1rem}.m-5[_ngcontent-%COMP%]{margin:5px}.m-t-5[_ngcontent-%COMP%]{margin-top:5px}.m-r-5[_ngcontent-%COMP%]{margin-right:5px}.m-b-5[_ngcontent-%COMP%]{margin-bottom:5px}.m-l-5[_ngcontent-%COMP%]{margin-left:5px}.m-v-5[_ngcontent-%COMP%]{margin:5px 0}.m-h-5[_ngcontent-%COMP%]{margin:0 5px}.m-10[_ngcontent-%COMP%]{margin:10px}.m-t-10[_ngcontent-%COMP%]{margin-top:10px}.m-r-10[_ngcontent-%COMP%]{margin-right:10px}.m-b-10[_ngcontent-%COMP%]{margin-bottom:10px}.m-l-10[_ngcontent-%COMP%]{margin-left:10px}.m-v-10[_ngcontent-%COMP%]{margin:10px 0}.m-h-10[_ngcontent-%COMP%]{margin:0 10px}.m-15[_ngcontent-%COMP%]{margin:15px}.m-t-15[_ngcontent-%COMP%]{margin-top:15px}.m-r-15[_ngcontent-%COMP%]{margin-right:15px}.m-b-15[_ngcontent-%COMP%]{margin-bottom:15px}.m-l-15[_ngcontent-%COMP%]{margin-left:15px}.m-v-15[_ngcontent-%COMP%]{margin:15px 0}.m-h-15[_ngcontent-%COMP%]{margin:0 15px}.m-20[_ngcontent-%COMP%]{margin:20px}.m-t-20[_ngcontent-%COMP%]{margin-top:20px}.m-r-20[_ngcontent-%COMP%]{margin-right:20px}.m-b-20[_ngcontent-%COMP%]{margin-bottom:20px}.m-l-20[_ngcontent-%COMP%]{margin-left:20px}.m-v-20[_ngcontent-%COMP%]{margin:20px 0}.m-h-20[_ngcontent-%COMP%]{margin:0 20px}.m-25[_ngcontent-%COMP%]{margin:25px}.m-t-25[_ngcontent-%COMP%]{margin-top:25px}.m-r-25[_ngcontent-%COMP%]{margin-right:25px}.m-b-25[_ngcontent-%COMP%]{margin-bottom:25px}.m-l-25[_ngcontent-%COMP%]{margin-left:25px}.m-v-25[_ngcontent-%COMP%]{margin:25px 0}.m-h-25[_ngcontent-%COMP%]{margin:0 25px}.m-30[_ngcontent-%COMP%]{margin:30px}.m-t-30[_ngcontent-%COMP%]{margin-top:30px}.m-r-30[_ngcontent-%COMP%]{margin-right:30px}.m-b-30[_ngcontent-%COMP%]{margin-bottom:30px}.m-l-30[_ngcontent-%COMP%]{margin-left:30px}.m-v-30[_ngcontent-%COMP%]{margin:30px 0}.m-h-30[_ngcontent-%COMP%]{margin:0 30px}.m-35[_ngcontent-%COMP%]{margin:35px}.m-t-35[_ngcontent-%COMP%]{margin-top:35px}.m-r-35[_ngcontent-%COMP%]{margin-right:35px}.m-b-35[_ngcontent-%COMP%]{margin-bottom:35px}.m-l-35[_ngcontent-%COMP%]{margin-left:35px}.m-v-35[_ngcontent-%COMP%]{margin:35px 0}.m-h-35[_ngcontent-%COMP%]{margin:0 35px}.m-40[_ngcontent-%COMP%]{margin:40px}.m-t-40[_ngcontent-%COMP%]{margin-top:40px}.m-r-40[_ngcontent-%COMP%]{margin-right:40px}.m-b-40[_ngcontent-%COMP%]{margin-bottom:40px}.m-l-40[_ngcontent-%COMP%]{margin-left:40px}.m-v-40[_ngcontent-%COMP%]{margin:40px 0}.m-h-40[_ngcontent-%COMP%]{margin:0 40px}.m-45[_ngcontent-%COMP%]{margin:45px}.m-t-45[_ngcontent-%COMP%]{margin-top:45px}.m-r-45[_ngcontent-%COMP%]{margin-right:45px}.m-b-45[_ngcontent-%COMP%]{margin-bottom:45px}.m-l-45[_ngcontent-%COMP%]{margin-left:45px}.m-v-45[_ngcontent-%COMP%]{margin:45px 0}.m-h-45[_ngcontent-%COMP%]{margin:0 45px}.m-50[_ngcontent-%COMP%]{margin:50px}.m-t-50[_ngcontent-%COMP%]{margin-top:50px}.m-r-50[_ngcontent-%COMP%]{margin-right:50px}.m-b-50[_ngcontent-%COMP%]{margin-bottom:50px}.m-l-50[_ngcontent-%COMP%]{margin-left:50px}.m-v-50[_ngcontent-%COMP%]{margin:50px 0}.m-h-50[_ngcontent-%COMP%]{margin:0 50px}.m-55[_ngcontent-%COMP%]{margin:55px}.m-t-55[_ngcontent-%COMP%]{margin-top:55px}.m-r-55[_ngcontent-%COMP%]{margin-right:55px}.m-b-55[_ngcontent-%COMP%]{margin-bottom:55px}.m-l-55[_ngcontent-%COMP%]{margin-left:55px}.m-v-55[_ngcontent-%COMP%]{margin:55px 0}.m-h-55[_ngcontent-%COMP%]{margin:0 55px}.m-60[_ngcontent-%COMP%]{margin:60px}.m-t-60[_ngcontent-%COMP%]{margin-top:60px}.m-r-60[_ngcontent-%COMP%]{margin-right:60px}.m-b-60[_ngcontent-%COMP%]{margin-bottom:60px}.m-l-60[_ngcontent-%COMP%]{margin-left:60px}.m-v-60[_ngcontent-%COMP%]{margin:60px 0}.m-h-60[_ngcontent-%COMP%]{margin:0 60px}.m-65[_ngcontent-%COMP%]{margin:65px}.m-t-65[_ngcontent-%COMP%]{margin-top:65px}.m-r-65[_ngcontent-%COMP%]{margin-right:65px}.m-b-65[_ngcontent-%COMP%]{margin-bottom:65px}.m-l-65[_ngcontent-%COMP%]{margin-left:65px}.m-v-65[_ngcontent-%COMP%]{margin:65px 0}.m-h-65[_ngcontent-%COMP%]{margin:0 65px}.m-70[_ngcontent-%COMP%]{margin:70px}.m-t-70[_ngcontent-%COMP%]{margin-top:70px}.m-r-70[_ngcontent-%COMP%]{margin-right:70px}.m-b-70[_ngcontent-%COMP%]{margin-bottom:70px}.m-l-70[_ngcontent-%COMP%]{margin-left:70px}.m-v-70[_ngcontent-%COMP%]{margin:70px 0}.m-h-70[_ngcontent-%COMP%]{margin:0 70px}.m-75[_ngcontent-%COMP%]{margin:75px}.m-t-75[_ngcontent-%COMP%]{margin-top:75px}.m-r-75[_ngcontent-%COMP%]{margin-right:75px}.m-b-75[_ngcontent-%COMP%]{margin-bottom:75px}.m-l-75[_ngcontent-%COMP%]{margin-left:75px}.m-v-75[_ngcontent-%COMP%]{margin:75px 0}.m-h-75[_ngcontent-%COMP%]{margin:0 75px}.m-80[_ngcontent-%COMP%]{margin:80px}.m-t-80[_ngcontent-%COMP%]{margin-top:80px}.m-r-80[_ngcontent-%COMP%]{margin-right:80px}.m-b-80[_ngcontent-%COMP%]{margin-bottom:80px}.m-l-80[_ngcontent-%COMP%]{margin-left:80px}.m-v-80[_ngcontent-%COMP%]{margin:80px 0}.m-h-80[_ngcontent-%COMP%]{margin:0 80px}.no-m[_ngcontent-%COMP%]{margin:0}.no-m-t[_ngcontent-%COMP%]{margin-top:0}.no-m-r[_ngcontent-%COMP%]{margin-right:0}.no-m-b[_ngcontent-%COMP%]{margin-bottom:0}.no-m-l[_ngcontent-%COMP%]{margin-left:0}.no-m-v[_ngcontent-%COMP%], .no-m-h[_ngcontent-%COMP%], .no-margin[_ngcontent-%COMP%]{margin:0}.no-m-lr[_ngcontent-%COMP%], .no-m-rl[_ngcontent-%COMP%]{margin-left:0;margin-right:0}.no-m-tb[_ngcontent-%COMP%], .no-m-bt[_ngcontent-%COMP%]{margin-top:0;margin-bottom:0}.m-t-only[_ngcontent-%COMP%]{margin-left:0;margin-right:0;margin-bottom:0}.m-b-only[_ngcontent-%COMP%]{margin-left:0;margin-right:0;margin-top:0}.m-l-only[_ngcontent-%COMP%]{margin-right:0;margin-top:0;margin-bottom:0}.m-r-only[_ngcontent-%COMP%]{margin-left:0;margin-top:0;margin-bottom:0}.m-auto[_ngcontent-%COMP%]{margin-left:auto;margin-right:auto}.ls-0[_ngcontent-%COMP%]{margin-left:10px;margin-right:10px}html[_ngcontent-%COMP%], body[_ngcontent-%COMP%]{-webkit-tap-highlight-color:transparent}div[_ngcontent-%COMP%]{box-sizing:border-box}.color-inherit[_ngcontent-%COMP%]{color:inherit}.no-shadow[_ngcontent-%COMP%]{box-shadow:none}.pointer[_ngcontent-%COMP%]{cursor:pointer}.nolist[_ngcontent-%COMP%]{list-style:none}.actions-menu[_ngcontent-%COMP%]{color:#fff}.alert[_ngcontent-%COMP%]{background-color:#e8f4fd;padding:6px 16px;font-size:.875rem;font-family:Roboto,Helvetica Neue,sans-serif;font-weight:400;line-height:1.43;border-radius:4px;letter-spacing:normal;margin:10px}.alert[_ngcontent-%COMP%] .message[_ngcontent-%COMP%]{padding:8px 0;font-size:18px}.alert[_ngcontent-%COMP%] .alert-check[_ngcontent-%COMP%]{color:#359ff4;margin-right:2px;font-size:1.4rem} .mat-tooltip{font-size:15px;color:#fff!important;background-color:#4461e2b3;border:1px solid rgb(25.7777777778,51.5555555556,166.2222222222);max-width:400px!important;white-space:pre-line!important}.loading[_ngcontent-%COMP%]{position:absolute;min-width:100%;width:100px;height:12px;background:linear-gradient(125deg,#fff,#4461e2,#fff);animation:grow 4s linear infinite,move 4s linear infinite}mat-card-title[_ngcontent-%COMP%]{font-weight:600;font-size:x-large;padding-left:20px;padding-top:20px}html[_ngcontent-%COMP%], body[_ngcontent-%COMP%]{overflow:hidden}.overflow-x-scroll[_ngcontent-%COMP%]{max-width:100%;overflow-x:auto}.overflow-no[_ngcontent-%COMP%]{overflow:hidden}.overflow-auto[_ngcontent-%COMP%]{overflow:auto}.overflow-scroll[_ngcontent-%COMP%]{overflow:scroll}.table-container[_ngcontent-%COMP%]{overflow-x:auto;max-width:100%}body[_ngcontent-%COMP%], .no-p[_ngcontent-%COMP%]{padding:0}.no-p-t[_ngcontent-%COMP%]{padding-top:0}.no-p-r[_ngcontent-%COMP%]{padding-right:0}.no-p-b[_ngcontent-%COMP%]{padding-bottom:0}.no-p-l[_ngcontent-%COMP%]{padding-left:0}.no-p-v[_ngcontent-%COMP%], .no-p-h[_ngcontent-%COMP%]{padding:0}.p-5[_ngcontent-%COMP%]{padding:5px}.p-t-5[_ngcontent-%COMP%]{padding-top:5px}.p-r-5[_ngcontent-%COMP%]{padding-right:5px}.p-b-5[_ngcontent-%COMP%]{padding-bottom:5px}.p-l-5[_ngcontent-%COMP%]{padding-left:5px}.p-v-5[_ngcontent-%COMP%]{padding:5px 0}.p-h-5[_ngcontent-%COMP%]{padding:0 5px}.p-10[_ngcontent-%COMP%]{padding:10px}.p-t-10[_ngcontent-%COMP%]{padding-top:10px}.p-b-10[_ngcontent-%COMP%]{padding-bottom:10px}.p-v-10[_ngcontent-%COMP%]{padding:10px 0}.p-h-10[_ngcontent-%COMP%]{padding:0 10px}.p-15[_ngcontent-%COMP%]{padding:15px}.p-t-15[_ngcontent-%COMP%]{padding-top:15px}.p-r-15[_ngcontent-%COMP%]{padding-right:15px}.p-b-15[_ngcontent-%COMP%]{padding-bottom:15px}.p-l-15[_ngcontent-%COMP%]{padding-left:15px}.p-v-15[_ngcontent-%COMP%]{padding:15px 0}.p-h-15[_ngcontent-%COMP%]{padding:0 15px}.p-20[_ngcontent-%COMP%]{padding:20px}.p-t-20[_ngcontent-%COMP%]{padding-top:20px}.p-r-20[_ngcontent-%COMP%]{padding-right:20px}.p-b-20[_ngcontent-%COMP%]{padding-bottom:20px}.p-l-20[_ngcontent-%COMP%]{padding-left:20px}.p-v-20[_ngcontent-%COMP%]{padding:20px 0}.p-h-20[_ngcontent-%COMP%]{padding:0 20px}.p-25[_ngcontent-%COMP%]{padding:25px}.p-t-25[_ngcontent-%COMP%]{padding-top:25px}.p-r-25[_ngcontent-%COMP%]{padding-right:25px}.p-b-25[_ngcontent-%COMP%]{padding-bottom:25px}.p-l-25[_ngcontent-%COMP%]{padding-left:25px}.p-v-25[_ngcontent-%COMP%]{padding:25px 0}.p-h-25[_ngcontent-%COMP%]{padding:0 25px}.p-30[_ngcontent-%COMP%]{padding:30px}.p-t-30[_ngcontent-%COMP%]{padding-top:30px}.p-r-30[_ngcontent-%COMP%]{padding-right:30px}.p-b-30[_ngcontent-%COMP%]{padding-bottom:30px}.p-l-30[_ngcontent-%COMP%]{padding-left:30px}.p-v-30[_ngcontent-%COMP%]{padding:30px 0}.p-h-30[_ngcontent-%COMP%]{padding:0 30px}.p-35[_ngcontent-%COMP%]{padding:35px}.p-t-35[_ngcontent-%COMP%]{padding-top:35px}.p-r-35[_ngcontent-%COMP%]{padding-right:35px}.p-b-35[_ngcontent-%COMP%]{padding-bottom:35px}.p-l-35[_ngcontent-%COMP%]{padding-left:35px}.p-v-35[_ngcontent-%COMP%]{padding:35px 0}.p-h-35[_ngcontent-%COMP%]{padding:0 35px}.p-40[_ngcontent-%COMP%]{padding:40px}.p-t-40[_ngcontent-%COMP%]{padding-top:40px}.p-r-40[_ngcontent-%COMP%]{padding-right:40px}.p-b-40[_ngcontent-%COMP%]{padding-bottom:40px}.p-l-40[_ngcontent-%COMP%]{padding-left:40px}.p-v-40[_ngcontent-%COMP%]{padding-top:40px;padding-bottom:40px}.p-h-40[_ngcontent-%COMP%]{padding:0 40px}.p-45[_ngcontent-%COMP%]{padding:45px}.p-t-45[_ngcontent-%COMP%]{padding-top:45px}.p-r-45[_ngcontent-%COMP%]{padding-right:45px}.p-b-45[_ngcontent-%COMP%]{padding-bottom:45px}.p-l-45[_ngcontent-%COMP%]{padding-left:45px}.p-v-45[_ngcontent-%COMP%]{padding:45px 0}.p-h-45[_ngcontent-%COMP%]{padding:0 45px}.p-50[_ngcontent-%COMP%]{padding:50px}.p-t-50[_ngcontent-%COMP%]{padding-top:50px}.p-r-50[_ngcontent-%COMP%]{padding-right:50px}.p-b-50[_ngcontent-%COMP%]{padding-bottom:50px}.p-l-50[_ngcontent-%COMP%]{padding-left:50px}.p-v-50[_ngcontent-%COMP%]{padding:50px 0}.p-h-50[_ngcontent-%COMP%]{padding:0 50px}.p-55[_ngcontent-%COMP%]{padding:55px}.p-t-55[_ngcontent-%COMP%]{padding-top:55px}.p-r-55[_ngcontent-%COMP%]{padding-right:55px}.p-b-55[_ngcontent-%COMP%]{padding-bottom:55px}.p-l-55[_ngcontent-%COMP%]{padding-left:55px}.p-v-55[_ngcontent-%COMP%]{padding:55px 0}.p-h-55[_ngcontent-%COMP%]{padding:0 55px}.p-60[_ngcontent-%COMP%]{padding:60px}.p-t-60[_ngcontent-%COMP%]{padding-top:60px}.p-r-60[_ngcontent-%COMP%]{padding-right:60px}.p-b-60[_ngcontent-%COMP%]{padding-bottom:60px}.p-l-60[_ngcontent-%COMP%]{padding-left:60px}.p-v-60[_ngcontent-%COMP%]{padding:60px 0}.p-h-60[_ngcontent-%COMP%]{padding:0 60px}.p-65[_ngcontent-%COMP%]{padding:65px}.p-t-65[_ngcontent-%COMP%]{padding-top:65px}.p-r-65[_ngcontent-%COMP%]{padding-right:65px}.p-b-65[_ngcontent-%COMP%]{padding-bottom:65px}.p-l-65[_ngcontent-%COMP%]{padding-left:65px}.p-v-65[_ngcontent-%COMP%]{padding:65px 0}.p-h-65[_ngcontent-%COMP%]{padding:0 65px}.p-70[_ngcontent-%COMP%]{padding:70px}.p-t-70[_ngcontent-%COMP%]{padding-top:70px}.p-r-70[_ngcontent-%COMP%]{padding-right:70px}.p-b-70[_ngcontent-%COMP%]{padding-bottom:70px}.p-l-70[_ngcontent-%COMP%]{padding-left:70px}.p-v-70[_ngcontent-%COMP%]{padding:70px 0}.p-h-70[_ngcontent-%COMP%]{padding:0 70px}.p-75[_ngcontent-%COMP%]{padding:75px}.p-t-75[_ngcontent-%COMP%]{padding-top:75px}.p-r-75[_ngcontent-%COMP%]{padding-right:75px}.p-b-75[_ngcontent-%COMP%]{padding-bottom:75px}.p-l-75[_ngcontent-%COMP%]{padding-left:75px}.p-v-75[_ngcontent-%COMP%]{padding:75px 0}.p-h-75[_ngcontent-%COMP%]{padding:0 75px}.p-80[_ngcontent-%COMP%]{padding:80px}.p-t-80[_ngcontent-%COMP%]{padding-top:80px}.p-r-80[_ngcontent-%COMP%]{padding-right:80px}.p-b-80[_ngcontent-%COMP%]{padding-bottom:80px}.p-l-80[_ngcontent-%COMP%]{padding-left:80px}.p-v-80[_ngcontent-%COMP%]{padding:80px 0}.p-h-80[_ngcontent-%COMP%]{padding:0 80px}.no-padding[_ngcontent-%COMP%]{padding:0!important}.no-pad-lr[_ngcontent-%COMP%], .no-pad-rl[_ngcontent-%COMP%]{padding-left:0;padding-right:0}.no-pad-tb[_ngcontent-%COMP%], .no-pad-bt[_ngcontent-%COMP%]{padding-top:0;padding-bottom:0}.pad-t-only[_ngcontent-%COMP%]{padding-left:0;padding-right:0;padding-bottom:0}.pad-b-only[_ngcontent-%COMP%]{padding-left:0;padding-right:0;padding-top:0}.pad-l-only[_ngcontent-%COMP%]{padding-right:0;padding-top:0;padding-bottom:0}.pad-r-only[_ngcontent-%COMP%]{padding-left:0;padding-top:0;padding-bottom:0}html[_ngcontent-%COMP%], body[_ngcontent-%COMP%], .rel[_ngcontent-%COMP%], .relative[_ngcontent-%COMP%]{position:relative}.abs[_ngcontent-%COMP%], .absolute[_ngcontent-%COMP%]{position:absolute}.fixed[_ngcontent-%COMP%]{position:fixed}.status-active[_ngcontent-%COMP%]{color:#5cb85c}.status-inactive[_ngcontent-%COMP%]{color:#666f73}.status-deleted[_ngcontent-%COMP%]{color:#000}.status-pending[_ngcontent-%COMP%]{color:orange}.status-approved[_ngcontent-%COMP%]{color:#4461e2}.status-overpaid[_ngcontent-%COMP%]{color:purple}.status-chargeoff[_ngcontent-%COMP%]{color:#f39c12}.status-active-overdue[_ngcontent-%COMP%], .status-block[_ngcontent-%COMP%]{color:red}.status-matured[_ngcontent-%COMP%]{color:#ff4000}.subStatus-contract-termination[_ngcontent-%COMP%]{color:#b3b3b3}.mat-step-header[_ngcontent-%COMP%] .mat-step-icon-state-done[_ngcontent-%COMP%]{background-color:#2af72a}.mat-step-header[_ngcontent-%COMP%] .mat-step-icon-state-done[_ngcontent-%COMP%] .status-transfer-progress[_ngcontent-%COMP%]{color:#ff4000}.mat-step-header[_ngcontent-%COMP%] .mat-step-icon-state-done[_ngcontent-%COMP%] .status-transfer-hold[_ngcontent-%COMP%]{color:#df0101}html[_ngcontent-%COMP%], body[_ngcontent-%COMP%]{-webkit-font-smoothing:antialiased}html[_ngcontent-%COMP%]{font-size:16px}body[_ngcontent-%COMP%]{font-family:Roboto,Helvetica Neue,sans-serif;font-weight:400;font-size:14px;color:#000000de;line-height:1.5;letter-spacing:normal}.mat-h1[_ngcontent-%COMP%], .mat-headline[_ngcontent-%COMP%], .mat-typography[_ngcontent-%COMP%] .mat-h1[_ngcontent-%COMP%], .mat-typography[_ngcontent-%COMP%] .mat-headline[_ngcontent-%COMP%], .mat-typography[_ngcontent-%COMP%] h1[_ngcontent-%COMP%]{font:400 24px/32px Roboto,Helvetica Neue,sans-serif;letter-spacing:normal;margin:0 0 16px}.lh-1[_ngcontent-%COMP%]{line-height:1}.lh-13[_ngcontent-%COMP%]{line-height:1.3}.lh-15[_ngcontent-%COMP%]{line-height:1.5}.bold[_ngcontent-%COMP%], .strong[_ngcontent-%COMP%]{font-weight:700}.no-bold[_ngcontent-%COMP%]{font-weight:400}.italic[_ngcontent-%COMP%], .em[_ngcontent-%COMP%]{font-style:italic}.strike[_ngcontent-%COMP%]{text-decoration:line-through}.normal[_ngcontent-%COMP%]{font-weight:400;font-style:normal}.uppercase[_ngcontent-%COMP%]{text-transform:uppercase}.text-left[_ngcontent-%COMP%]{text-align:left}.text-center[_ngcontent-%COMP%]{text-align:center}.text-right[_ngcontent-%COMP%]{text-align:right}.w100[_ngcontent-%COMP%]{font-weight:100}.w200[_ngcontent-%COMP%]{font-weight:200}.w300[_ngcontent-%COMP%]{font-weight:300}.w400[_ngcontent-%COMP%]{font-weight:400}.w500[_ngcontent-%COMP%]{font-weight:500}.w600[_ngcontent-%COMP%]{font-weight:600}.w700[_ngcontent-%COMP%]{font-weight:700}.w800[_ngcontent-%COMP%]{font-weight:800}.w900[_ngcontent-%COMP%]{font-weight:900}.f9[_ngcontent-%COMP%]{font-size:9px}.f10[_ngcontent-%COMP%]{font-size:10px}.f11[_ngcontent-%COMP%]{font-size:11px}.f12[_ngcontent-%COMP%]{font-size:12px}.f13[_ngcontent-%COMP%]{font-size:13px}.f14[_ngcontent-%COMP%]{font-size:14px}.f15[_ngcontent-%COMP%]{font-size:15px}.f16[_ngcontent-%COMP%]{font-size:16px}.f17[_ngcontent-%COMP%]{font-size:17px}.f18[_ngcontent-%COMP%]{font-size:18px;line-height:30px}.f19[_ngcontent-%COMP%]{font-size:19px}.f20[_ngcontent-%COMP%]{font-size:20px}.f30[_ngcontent-%COMP%]{font-size:30px}.f40[_ngcontent-%COMP%]{font-size:40px}.f50[_ngcontent-%COMP%]{font-size:50px}.f60[_ngcontent-%COMP%]{font-size:60px}.size-small[_ngcontent-%COMP%]{font-size:75%}.size-normal[_ngcontent-%COMP%]{font-size:100%}.size-medium[_ngcontent-%COMP%]{font-size:125%}.size-big[_ngcontent-%COMP%], .size-large[_ngcontent-%COMP%]{font-size:150%}.size-huge[_ngcontent-%COMP%]{font-size:200%}.inherit[_ngcontent-%COMP%]{font:inherit}.text-shadow[_ngcontent-%COMP%]{text-shadow:1px 1px 1px rgba(0,0,0,.4)}.text-rgb-2[_ngcontent-%COMP%]{color:#0003}.text-rgb-3[_ngcontent-%COMP%]{color:#0000004d}.text-rgb-4[_ngcontent-%COMP%]{color:#0006}.text-rgb-5[_ngcontent-%COMP%]{color:#00000080}.no-ul[_ngcontent-%COMP%], .no-ul[_ngcontent-%COMP%]:hover, .no-ul[_ngcontent-%COMP%] a[_ngcontent-%COMP%], .no-ul[_ngcontent-%COMP%] a[_ngcontent-%COMP%]:hover{text-decoration:none}.no-wrap[_ngcontent-%COMP%]{white-space:nowrap}.auto-cell-size[_ngcontent-%COMP%]{white-space:nowrap;width:1%}.ls-0[_ngcontent-%COMP%]{letter-spacing:-3px;white-space:nowrap}.label-field[_ngcontent-%COMP%]{margin-top:32px}.wrap-content[_ngcontent-%COMP%]{overflow-wrap:break-word;word-wrap:break-word}.no-break-content[_ngcontent-%COMP%]{overflow-wrap:anywhere!important}.fit[_ngcontent-%COMP%]{max-width:100%}.half-width[_ngcontent-%COMP%]{width:50%}.full-width[_ngcontent-%COMP%]{width:100%}.full-height[_ngcontent-%COMP%]{height:100%}html[_ngcontent-%COMP%], body[_ngcontent-%COMP%]{width:100%;height:100%;min-height:100%}body[_ngcontent-%COMP%] table[_ngcontent-%COMP%]{width:100%}.container[_ngcontent-%COMP%]{max-width:74rem;width:90%}.mw300[_ngcontent-%COMP%]{max-width:300px}.mw400[_ngcontent-%COMP%]{max-width:400px}.mw500[_ngcontent-%COMP%]{max-width:500px}.mw600[_ngcontent-%COMP%]{max-width:600px}.fullwidth[_ngcontent-%COMP%]{width:100%}.zindex-1[_ngcontent-%COMP%]{z-index:1}.zindex-2[_ngcontent-%COMP%]{z-index:2}.zindex-3[_ngcontent-%COMP%]{z-index:3}.zindex-4[_ngcontent-%COMP%]{z-index:4}.card-content[_ngcontent-%COMP%]{width:100%;padding-bottom:25px}.card-content[_ngcontent-%COMP%] div[_ngcontent-%COMP%]{text-align:left}.card-content[_ngcontent-%COMP%] .attribute[_ngcontent-%COMP%]{font-weight:500}"]})}}return t})();var GR=(()=>{class t{constructor(){this.disablePrevious=!1,this.disableNext=!1}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275cmp=P({type:t,selectors:[["mifosx-stepper-buttons"]],inputs:{disablePrevious:"disablePrevious",disableNext:"disableNext"},decls:9,vars:8,consts:[[1,"flex-fill","layout-row","layout-align-center","margin-t","gap-2percent","layout-xs-column"],["mat-raised-button","","matStepperPrevious","",3,"disabled"],["icon","arrow-left",1,"m-r-10"],["mat-raised-button","","matStepperNext","",3,"disabled"],["icon","arrow-right",1,"m-l-10"]],template:function(n,o){n&1&&(h(0,"div",0)(1,"button",1),F(2,"fa-icon",2),y(3),S(4,"translate"),_(),h(5,"button",3),y(6),S(7,"translate"),F(8,"fa-icon",4),_()()),n&2&&(p(),D("disabled",o.disablePrevious),p(2),ee(" ",k(4,4,"labels.buttons.Previous")," "),p(2),D("disabled",o.disableNext),p(),ee(" ",k(7,6,"labels.buttons.Next")," "))},dependencies:[he,ve,vt,Yt,Gz,$z,Te],encapsulation:2})}}return t})();function L2e(t,i){if(t&1&&(h(0,"mat-option",4),y(1),_()),t&2){let e=i.$implicit;D("value",e.id),p(),ee(" ","("+e.glCode+") "+e.name," ")}}function A2e(t,i){t&1&&(h(0,"mat-error"),y(1),S(2,"translate"),S(3,"translate"),h(4,"strong"),y(5),S(6,"translate"),_()()),t&2&&(p(),St(" ",k(2,3,"labels.inputs.Account")," ",k(3,5,"labels.commons.is")," "),p(4),T(k(6,7,"labels.commons.required")))}function z2e(t,i){if(t&1&&(h(0,"mat-form-field",1)(1,"mat-label"),y(2),S(3,"translate"),_(),h(4,"mat-select",2)(5,"mat-option"),F(6,"ngx-mat-select-search",3),_(),Xe(7,L2e,2,2,"mat-option",4,ht),S(9,"async"),_(),E(10,A2e,7,9,"mat-error"),_()),t&2){let e=M();p(2),T(k(3,8,"labels.inputs."+e.inputLabel)),p(2),D("formControl",e.inputFormControl),p(2),D("placeholderLabel",Ft(e.placeHolderLabel))("noEntriesFoundLabel",Ft(e.noEntriesFoundLabel))("formControl",e.filterFormCtrl),p(),Ze(k(9,10,e.glAccountData)),p(3),I(e.inputFormControl.hasError("required")?10:-1)}}function R2e(t,i){if(t&1&&(h(0,"mat-option",4),y(1),_()),t&2){let e=i.$implicit;D("value",e.id),p(),ee(" ","("+e.glCode+") "+e.name," ")}}function N2e(t,i){if(t&1&&(h(0,"mat-form-field",1)(1,"mat-label"),y(2),S(3,"translate"),_(),h(4,"mat-select",5)(5,"mat-option"),F(6,"ngx-mat-select-search",6),_(),Xe(7,R2e,2,2,"mat-option",4,ht),S(9,"async"),_()()),t&2){let e=M();p(2),T(k(3,7,"labels.inputs."+e.inputLabel)),p(2),D("formControl",e.inputFormControl),p(2),D("placeholderLabel",Ft(e.placeHolderLabel))("noEntriesFoundLabel",Ft(e.noEntriesFoundLabel))("formControl",e.filterFormCtrl),p(),Ze(k(9,9,e.glAccountData))}}var WR=(()=>{class t{constructor(){this.translateService=d(Po),this.glAccountList=[],this.required=!1,this.inputLabel="",this.glAccountData=new pr(1),this.filterFormCtrl=new Hi(""),this._onDestroy=new B,this.placeHolderLabel="",this.noEntriesFoundLabel=""}ngOnInit(){this.filterFormCtrl.valueChanges.pipe(ye(this._onDestroy)).subscribe(()=>{this.searchGLAccount()}),this.placeHolderLabel=this.translateService.instant("labels.text.Search"),this.noEntriesFoundLabel=this.translateService.instant("labels.text.No data found")}ngOnChanges(e){this.glAccountList&&this.glAccountData.next(this.glAccountList.slice())}ngOnDestroy(){this._onDestroy.next(),this._onDestroy.complete()}searchGLAccount(){if(this.glAccountList){let e=this.filterFormCtrl.value.toLowerCase();e?this.glAccountData.next(this.glAccountList.filter(n=>n.name.toLowerCase().indexOf(e)>=0||n.glCode.toLowerCase().indexOf(e)>=0)):this.glAccountData.next(this.glAccountList.slice())}}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275cmp=P({type:t,selectors:[["mifosx-gl-account-selector"]],inputs:{inputFormControl:"inputFormControl",glAccountList:"glAccountList",required:"required",inputLabel:"inputLabel"},features:[Re],decls:3,vars:2,consts:[[1,"layout-column","m-r-10"],[1,"flex-100"],["required","",3,"formControl"],[3,"placeholderLabel","noEntriesFoundLabel","formControl"],[3,"value"],[3,"formControl"],[3,"formControl","placeholderLabel","noEntriesFoundLabel"]],template:function(n,o){n&1&&(h(0,"div",0),E(1,z2e,11,12,"mat-form-field",1),E(2,N2e,10,11,"mat-form-field",1),_()),n&2&&(p(),I(o.required?1:-1),p(),I(o.required?-1:2))},dependencies:[he,ve,mn,Ir,Si,Bt,Cn,ao,qn,ln,Sh,Qb,Xd,Te],encapsulation:2})}}return t})();function F2e(t,i){if(t&1&&(h(0,"span",0)(1,"div",2),y(2),S(3,"translate"),_(),h(4,"div",3),y(5),_()()),t&2){let e=M();p(),D("ngClass",e.getWithClass(e.withTitle)),p(),ee(" ",k(3,4,"labels.inputs."+e.accountTitle)," "),p(2),D("ngClass",e.getWithClass(e.withAccount)),p(),ee(" ",e.glAccountValue()," ")}}function V2e(t,i){if(t&1&&(h(0,"div",1),y(1),_()),t&2){let e=M();p(),ee(" ",e.glAccountValue()," ")}}var Hh=(()=>{class t{constructor(){this.glAccount=null,this.accountTitle=null,this.withTitle="50%",this.withAccount="50%"}glAccountValue(){return this.glAccount?"("+this.glAccount.glCode+") "+(this.glAccount.nameDecorated?this.glAccount.nameDecorated:this.glAccount.name):""}getWithClass(e){return"flex-"+e.replace("%","")}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275cmp=P({type:t,selectors:[["mifosx-gl-account-display"]],inputs:{glAccount:"glAccount",accountTitle:"accountTitle",withTitle:"withTitle",withAccount:"withAccount"},decls:2,vars:2,consts:[[1,"layout-row"],[1,"flex-100"],[1,"header",3,"ngClass"],[3,"ngClass"]],template:function(n,o){n&1&&(E(0,F2e,6,6,"span",0),E(1,V2e,2,1,"div",1)),n&2&&(I(o.accountTitle?0:-1),p(),I(o.accountTitle?-1:1))},dependencies:[he,Un,ve,Te],styles:["div[_ngcontent-%COMP%]{margin:.3rem 0;word-wrap:break-word}div.header[_ngcontent-%COMP%]{font-weight:500}"]})}}return t})();var qR=(()=>{class t{getAccountingRulesForShares(){return["NONE","Cash"]}getAccountingRulesForSavings(){return["NONE","Cash","Accrual (periodic)"]}getAccountingRulesForLoans(){return["NONE","Cash","Accrual (periodic)","Accrual (upfront)"]}getAccountRuleName(e){return["ACCRUAL PERIODIC","ACCRUAL (PERIODIC)"].includes(e)?"Accrual (periodic)":["ACCRUAL UPFRONT","ACCRUAL (UPFRONT)"].includes(e)?"Accrual (upfront)":e.startsWith("CASH")?"Cash":e==="NONE"?"NONE":""}isNoneAccounting(e){return e.id===1}isNoneAccountingRuleId(e){return e===1}isCashOrAccrualAccounting(e){return e.id===2||e.id===3}isCashOrAccrualAccountingRuleId(e){return e===2||e===3}isAccrualAccounting(e){return e.id===3}isAccrualAccountingRuleId(e){return e===3}getAccountingRuleFrom(e){return e===1?{code:"NONE",id:e,value:"None"}:e===2?{code:"CASH",id:e,value:"Cash"}:e===3?{code:"ACCRUAL_PERIODIC",id:e,value:"Accural (periodic)"}:e===4?{code:"ACCRUAL_UPFRONT",id:e,value:"Accural (upfront)"}:{code:"INVALID",id:e,value:"Invalid"}}glAccountLookUp(e,n){let o=null;return e&&n.some(r=>{r.id===e&&(o={id:r.id,name:r.name,glCode:r.glCode})}),o}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275prov=R({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();function B2e(t,i){if(t&1&&(h(0,"div",1)(1,"span",3),y(2),S(3,"translate"),_(),h(4,"span",4),y(5),S(6,"translate"),_()()),t&2){let e=M();p(2),ee("",k(3,2,"labels.inputs.Type"),":"),p(3),T(k(6,4,"labels.accounting."+e.getAccountingRuleName(e.accountingRule.value)))}}function j2e(t,i){if(t&1&&F(0,"mifosx-gl-account-display",7),t&2){let e=M(2);D("accountTitle","Overdraft portfolio")("glAccount",e.accountingMappings.overdraftPortfolioControl)("withTitle","40%")}}function H2e(t,i){if(t&1&&F(0,"mifosx-gl-account-display",7),t&2){let e=M(2);D("accountTitle","Fees Receivable")("glAccount",e.accountingMappings.feeReceivableAccount)("withTitle","40%")}}function U2e(t,i){if(t&1&&F(0,"mifosx-gl-account-display",7),t&2){let e=M(2);D("accountTitle","Penalties Receivable")("glAccount",e.accountingMappings.penaltyReceivableAccount)("withTitle","40%")}}function $2e(t,i){if(t&1&&F(0,"mifosx-gl-account-display",7),t&2){let e=M(2);D("accountTitle","Interest Receivable")("glAccount",e.accountingMappings.interestReceivableAccount)("withTitle","40%")}}function G2e(t,i){if(t&1&&F(0,"mifosx-gl-account-display",7),t&2){let e=M(2);D("accountTitle","Interest Payable")("glAccount",e.accountingMappings.interestPayableAccount)("withTitle","40%")}}function W2e(t,i){if(t&1&&F(0,"mifosx-gl-account-display",7),t&2){let e=M(2);D("accountTitle","Escheat liability")("glAccount",e.accountingMappings.escheatLiabilityAccount)("withTitle","40%")}}function q2e(t,i){if(t&1&&F(0,"mifosx-gl-account-display",7),t&2){let e=M(2);D("accountTitle","Income from Interest")("glAccount",e.accountingMappings.incomeFromInterest)("withTitle","40%")}}function Y2e(t,i){if(t&1&&F(0,"mifosx-gl-account-display",7),t&2){let e=M(2);D("accountTitle","Write-off")("glAccount",e.accountingMappings.writeOffAccount)("withTitle","40%")}}function Q2e(t,i){if(t&1&&(h(0,"div",2)(1,"h4",5),y(2),S(3,"translate"),_(),h(4,"div",6),F(5,"mifosx-gl-account-display",7),_(),h(6,"div",6),E(7,j2e,1,3,"mifosx-gl-account-display",7),_(),h(8,"div",6),E(9,H2e,1,3,"mifosx-gl-account-display",7),_(),h(10,"div",6),E(11,U2e,1,3,"mifosx-gl-account-display",7),E(12,$2e,1,3,"mifosx-gl-account-display",7),h(13,"h4",5),y(14),S(15,"translate"),_(),h(16,"div",6),F(17,"mifosx-gl-account-display",7),_(),h(18,"div",6),F(19,"mifosx-gl-account-display",7),_(),h(20,"div",6),E(21,G2e,1,3,"mifosx-gl-account-display",7),_(),h(22,"div",6),E(23,W2e,1,3,"mifosx-gl-account-display",7),_(),h(24,"h4",5),y(25),S(26,"translate"),_(),h(27,"div",6),F(28,"mifosx-gl-account-display",7),_(),h(29,"div",6),F(30,"mifosx-gl-account-display",7),_(),h(31,"div",6),E(32,q2e,1,3,"mifosx-gl-account-display",7),_(),h(33,"h4",5),y(34),S(35,"translate"),_(),h(36,"div",6),F(37,"mifosx-gl-account-display",7),_(),h(38,"div",6),E(39,Y2e,1,3,"mifosx-gl-account-display",7),_()()()),t&2){let e=M();p(2),T(k(3,30,"labels.heading.Assets")),p(3),D("accountTitle","Saving reference")("glAccount",e.accountingMappings.savingsReferenceAccount)("withTitle","40%"),p(2),I(e.accountingMappings.overdraftPortfolioControl?7:-1),p(2),I(e.isAccrualAccounting()?9:-1),p(2),I(e.isAccrualAccounting()?11:-1),p(),I(e.isAccrualAccounting()?12:-1),p(2),T(k(15,32,"labels.heading.Liabilities")),p(3),D("accountTitle","Saving control")("glAccount",e.accountingMappings.savingsControlAccount)("withTitle","40%"),p(2),D("accountTitle","Savings transfers in suspense")("glAccount",e.accountingMappings.transfersInSuspenseAccount)("withTitle","40%"),p(2),I(e.isAccrualAccounting()?21:-1),p(2),I(e.accountingMappings.escheatLiabilityAccount?23:-1),p(2),T(k(26,34,"labels.heading.Income")),p(3),D("accountTitle","Income from fees")("glAccount",e.accountingMappings.incomeFromFeeAccount)("withTitle","40%"),p(2),D("accountTitle","Income from penalties")("glAccount",e.accountingMappings.incomeFromPenaltyAccount)("withTitle","40%"),p(2),I(e.accountingMappings.incomeFromInterest?32:-1),p(2),T(k(35,36,"labels.heading.Expenses")),p(3),D("accountTitle","Interest on savings")("glAccount",e.accountingMappings.interestOnSavingsAccount)("withTitle","40%"),p(2),I(e.accountingMappings.writeOffAccount?39:-1)}}var YR=(()=>{class t{constructor(){this.accounting=d(qR),this.accountingMappings=[]}isCashOrAccrualAccounting(){return this.accountingRule?this.accounting.isCashOrAccrualAccounting(this.accountingRule):!1}isAccrualAccounting(){return this.accountingRule?this.accounting.isAccrualAccounting(this.accountingRule):!1}getAccountingRuleName(e){return this.accounting.getAccountRuleName(e.toUpperCase())}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275cmp=P({type:t,selectors:[["mifosx-view-savings-accounting-details"]],inputs:{accountingRule:"accountingRule",accountingMappings:"accountingMappings"},decls:4,vars:2,consts:[[1,"layout-row-wrap","responsive-column"],[1,"layout-row","responsive-column","flex-100"],[1,"layout-row-wrap","responsive-column","flex-100"],[1,"flex-40"],[1,"flex-60"],[1,"mat-h4","flex-100"],[1,"flex-100","layout-row-wrap","responsive-column"],[1,"flex-100",3,"accountTitle","glAccount","withTitle"]],template:function(n,o){n&1&&(h(0,"div",0),E(1,B2e,7,6,"div",1),h(2,"div",2),E(3,Q2e,40,38,"div",2),_()()),n&2&&(p(),I(o.accountingRule?1:-1),p(2),I(o.isCashOrAccrualAccounting()?3:-1))},dependencies:[he,ve,Hh,Te],styles:[".column-mandatory[_ngcontent-%COMP%]{color:#5cb85c;text-align:center}.not-column-mandatory[_ngcontent-%COMP%]{color:#666f73;text-align:center}.cdk-drag-placeholder[_ngcontent-%COMP%]{background:#3498db}.yes[_ngcontent-%COMP%]{color:#5cb85c!important;background-color:#5cb85c;height:4px;cursor:none}.no[_ngcontent-%COMP%]{color:red;background-color:red;height:4px;cursor:none}.strike[_ngcontent-%COMP%]{text-decoration:line-through;color:red}.transfer[_ngcontent-%COMP%]{color:#16a085}.linked[_ngcontent-%COMP%]{color:#4461e2}.accrual[_ngcontent-%COMP%]{color:#999}.fa-question[_ngcontent-%COMP%]{color:#4461e2}.enabled[_ngcontent-%COMP%]{color:#32cd32}.disabled[_ngcontent-%COMP%]{color:#f44366}.container[_ngcontent-%COMP%]{padding:1%;margin:1%;width:100%}h2[_ngcontent-%COMP%], h3[_ngcontent-%COMP%], h4[_ngcontent-%COMP%]{margin:0;font-weight:500}table[_ngcontent-%COMP%]{width:100%}table[_ngcontent-%COMP%] tr.incentives-row[_ngcontent-%COMP%]{height:0}table[_ngcontent-%COMP%] tr.incentives-row[_ngcontent-%COMP%] > td[_ngcontent-%COMP%]{padding:0}table[_ngcontent-%COMP%] tr.incentives-row[_ngcontent-%COMP%] .incentives[_ngcontent-%COMP%]{overflow:hidden}table[_ngcontent-%COMP%] tr.incentives-row[_ngcontent-%COMP%] .mat-card[_ngcontent-%COMP%]{border-radius:0}table[_ngcontent-%COMP%] tr.incentives-row[_ngcontent-%COMP%] .mat-card[_ngcontent-%COMP%] > h4[_ngcontent-%COMP%]{font-weight:500;margin:.5em 0 0}.mat-h4[_ngcontent-%COMP%]{margin-top:10px!important;font-weight:200;color:#4461e2}.mat-elevation-z1[_ngcontent-%COMP%]{margin:1em 0 1.5em}span[_ngcontent-%COMP%]{margin:.5em 0}mat-divider[_ngcontent-%COMP%]{margin:0 0 .5em}.margin-t[_ngcontent-%COMP%]{margin-top:1em}"]})}}return t})();var QR=(()=>{class t{constructor(){this.ref=d(li),this.darkModeOn=!1,this.themes=["dark-theme","light-theme"],this.theme=new ct("light-theme"),this.darkModeOn=window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches,this.setDarkMode(this.darkModeOn),window.matchMedia("(prefers-color-scheme: dark)").addListener(e=>{let n=e.matches;this.theme.next(n?"dark-theme":"light-theme"),this.ref.tick()})}isDarkMode(){return this.darkModeOn=window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches,this.darkModeOn}setDarkMode(e){this.darkModeOn=e,e?(document.body.classList.add("dark-theme"),this.theme.next("dark-theme")):(document.body.classList.remove("dark-theme"),this.theme.next("light-theme"))}setInitialDarkMode(){this.setDarkMode(this.darkModeOn)}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275prov=R({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();var KR=(()=>{class t{constructor(){this.themingService=d(QR),this.settingsService=d(Xt)}ngOnInit(){this.darkModeOn=!!this.settingsService.themeDarkEnabled}ngOnChanges(e){this.darkModeOn=!!this.settingsService.themeDarkEnabled}toggleTheme(){this.darkModeOn=!this.darkModeOn,this.settingsService.setThemeDarkEnabled(this.darkModeOn),this.themingService.setDarkMode(this.darkModeOn)}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275cmp=P({type:t,selectors:[["mifosx-theme-toggle"]],features:[Re],decls:3,vars:1,consts:[["mat-icon-button","",1,"m-l-15","m-r-5",3,"click"]],template:function(n,o){n&1&&(h(0,"button",0),N("click",function(){return o.toggleTheme()}),h(1,"mat-icon"),y(2),_()()),n&2&&(p(2),T(o.darkModeOn?"wb_sunny":"nights_stay"))},dependencies:[he,ve,ni,Co],encapsulation:2})}}return t})();function K2e(t,i){if(t&1){let e=le();h(0,"span",3),N("click",function(){G(e);let o=M(2);return W(o.showValue())}),F(1,"fa-icon",4),_()}if(t&2){let e=M(2);p(),D("title",e.textValue)}}function X2e(t,i){if(t&1){let e=le();h(0,"span",5),N("click",function(){G(e);let o=M(2);return W(o.showValue())}),y(1),S(2,"truncateText"),_()}if(t&2){let e=M(2);p(),ee("",Zo(2,1,e.textValue,e.printChars),"...")}}function Z2e(t,i){if(t&1){let e=le();h(0,"span",5),N("click",function(){G(e);let o=M(2);return W(o.showValue())}),y(1),_()}if(t&2){let e=M(2);p(),T(e.textValue)}}function J2e(t,i){if(t&1){let e=le();h(0,"span",0),N("mouseenter",function(){G(e);let o=M();return W(o.mouseEnter())})("mouseleave",function(){G(e);let o=M();return W(o.mouseLeave())}),E(1,K2e,2,1,"span",1),E(2,X2e,3,4,"span",2),E(3,Z2e,2,1,"span",2),_()}if(t&2){let e=M();p(),I(e.isLongValue()?1:-1),p(),I(e.isLongValue()?2:-1),p(),I(e.isLongValue()?-1:3)}}var XR=(()=>{class t{constructor(){this.chars=30,this.iconVisible=!1,this.displayL=!1,this.displayR=!0,this.emptyValue=!1,this.printChars=30}ngOnInit(){this.emptyValue=!this.textValue||this.textValue==="",this.printChars=this.chars}isLongValue(){return this.textValue==null?!1:this.textValue.length>25}showValue(){this.printChars==30?this.printChars=1e3:this.printChars=30}mouseEnter(){this.iconVisible=!0}mouseLeave(){this.iconVisible=!1}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275cmp=P({type:t,selectors:[["mifosx-long-text"]],inputs:{textValue:"textValue",chars:"chars"},decls:1,vars:1,consts:[[3,"mouseenter","mouseleave"],[1,"m-l-3"],[1,"m-l-5"],[1,"m-l-3",3,"click"],["icon","eye","size","sm",3,"title"],[1,"m-l-5",3,"click"]],template:function(n,o){n&1&&E(0,J2e,4,3,"span"),n&2&&I(o.emptyValue?-1:0)},dependencies:[he,ve,Yt,Qm],encapsulation:2})}}return t})();function ede(t,i){if(t&1&&(h(0,"mat-option",2),y(1),S(2,"translateKey"),_()),t&2){let e=i.$implicit;D("value",e.id),p(),ee(" ",Zo(2,2,e.value,"catalogs")," ")}}function tde(t,i){if(t&1){let e=le();h(0,"button",4),N("click",function(o){G(e);let r=M();return W(r.clearProperty(o))}),h(1,"mat-icon"),y(2),S(3,"translate"),_()()}t&2&&(p(2),T(k(3,1,"labels.buttons.Close")))}var ZR=(()=>{class t{constructor(){this.translateService=d(Po),this.selectOptions=[]}getPlaceHolderText(){return this.placeHolderText?this.translateService.instant("labels.inputs."+this.placeHolderText):""}getLabelText(){return this.labelText?this.translateService.instant("labels.inputs."+this.labelText):""}clearProperty(){this.controlSelect.patchValue("")}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275cmp=P({type:t,selectors:[["mifosx-dropdown"]],inputs:{placeHolderText:"placeHolderText",labelText:"labelText",selectOptions:"selectOptions",controlSelect:"controlSelect",required:"required"},decls:7,vars:4,consts:[[1,"flex-28"],["formControlName","controlSelect",3,"placeholder"],[3,"value"],["matSuffix","","mat-icon-button","","aria-label","Clear"],["matSuffix","","mat-icon-button","","aria-label","Clear",3,"click"]],template:function(n,o){n&1&&(h(0,"mat-form-field",0)(1,"mat-label"),y(2),_(),h(3,"mat-select",1),Xe(4,ede,3,5,"mat-option",2,ht),_(),E(6,tde,4,3,"button",3),_()),n&2&&(p(2),T(o.getLabelText()),p(),D("placeholder",Ft(o.getPlaceHolderText())),p(),Ze(o.selectOptions),p(2),I(o.controlSelect?6:-1))},dependencies:[he,ve,mn,Ao,Bt,Cn,Za,qn,ln,ni,Co,Te,Wc],encapsulation:2})}}return t})();function nde(t,i){if(t&1&&(h(0,"mat-error"),y(1),S(2,"translate"),S(3,"translate"),h(4,"strong"),y(5),S(6,"translate"),_()()),t&2){let e=M(2);p(),St(" ",k(2,3,"labels.inputs."+e.inputLabel)," ",k(3,5,"labels.commons.is")," "),p(4),T(k(6,7,"labels.commons.required"))}}function ide(t,i){if(t&1&&(h(0,"mat-hint",4),y(1),S(2,"currency"),_()),t&2){let e=M(2);p(),T(cm(2,1,e.inputFormControl.value,e.currency.code,e.currency.displaySymbol,"1.2-2"))}}function ode(t,i){if(t&1&&(h(0,"mat-error"),y(1),S(2,"translate"),S(3,"translate"),_()),t&2){let e=M(2);p(),Ua(" ",k(2,3,"labels.inputs.Amount")," ",k(3,5,"labels.commons.Must be at least")," ",e.minVal," ")}}function rde(t,i){if(t&1&&(h(0,"mat-error"),y(1),S(2,"translate"),S(3,"translate"),_()),t&2){let e=M(2);p(),Ua(" ",k(2,3,"labels.inputs.Amount")," ",k(3,5,"labels.commons.Must be less or equal to")," ",e.maxVal," ")}}function ade(t,i){if(t&1){let e=le();h(0,"mat-form-field",0)(1,"mat-label"),y(2),S(3,"translate"),_(),h(4,"div",2)(5,"span"),y(6),_(),h(7,"input",3),N("keypress",function(o){G(e);let r=M();return W(r.numberOnly(o))})("blur",function(){G(e);let o=M();return W(o.displayHint=!1)})("focus",function(){G(e);let o=M();return W(o.displayHint=!0)}),_()(),E(8,nde,7,9,"mat-error"),E(9,ide,3,6,"mat-hint",4),E(10,ode,4,7,"mat-error"),E(11,rde,4,7,"mat-error"),_()}if(t&2){let e=M();p(2),T(k(3,10,"labels.inputs."+e.inputLabel)),p(4),T(e.currency.code),p(),D("mifosxFormatAmount",am("",e.currency.code,":",e.currency.displaySymbol))("formControl",e.inputFormControl),p(),I(e.inputFormControl.hasError("required")?8:-1),p(),I(e.displayHint?9:-1),p(),I(e.minVal&&e.inputFormControl.hasError("min")?10:-1),p(),I(e.maxVal&&e.inputFormControl.hasError("max")?11:-1)}}function sde(t,i){if(t&1&&(h(0,"mat-hint",4),y(1),S(2,"currency"),_()),t&2){let e=M(2);p(),T(cm(2,1,e.inputFormControl.value,e.currency.code,e.currency.displaySymbol,"1.2-2"))}}function cde(t,i){if(t&1&&(h(0,"mat-error"),y(1),S(2,"translate"),S(3,"translate"),_()),t&2){let e=M(2);p(),Ua(" ",k(2,3,"labels.inputs.Amount")," ",k(3,5,"labels.commons.Must be at least")," ",e.minVal," ")}}function lde(t,i){if(t&1&&(h(0,"mat-error"),y(1),S(2,"translate"),S(3,"translate"),_()),t&2){let e=M(2);p(),Ua(" ",k(2,3,"labels.inputs.Amount")," ",k(3,5,"labels.commons.Must be less or equal to")," ",e.maxVal," ")}}function dde(t,i){if(t&1){let e=le();h(0,"mat-form-field",1)(1,"mat-label"),y(2),S(3,"translate"),_(),h(4,"span",5),y(5),_(),F(6,"span",6),h(7,"input",7),N("keypress",function(o){G(e);let r=M();return W(r.numberOnly(o))})("blur",function(){G(e);let o=M();return W(o.displayHint=!1)})("focus",function(){G(e);let o=M();return W(o.displayHint=!0)}),_(),E(8,sde,3,6,"mat-hint",4),E(9,cde,4,7,"mat-error"),E(10,lde,4,7,"mat-error"),_()}if(t&2){let e=M();p(2),T(k(3,9,"labels.inputs."+e.inputLabel)),p(3),T(e.currency.code),p(2),D("mifosxFormatAmount",am("",e.currency.code,":",e.currency.displaySymbol))("formControl",e.inputFormControl),p(),I(e.displayHint?8:-1),p(),I(e.minVal&&e.inputFormControl.hasError("min")?9:-1),p(),I(e.maxVal&&e.inputFormControl.hasError("max")?10:-1)}}var JR=(()=>{class t{constructor(){this.isRequired=!1,this.displayHint=!1}numberOnly(e){let n=e.which?e.which:e.keyCode;return n===46?!(this.inputFormControl.value.indexOf(".")>-1):!(n>31&&(n<48||n>57))}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275cmp=P({type:t,selectors:[["mifosx-input-amount"]],inputs:{isRequired:"isRequired",currency:"currency",inputLabel:"inputLabel",inputFormControl:"inputFormControl",minVal:"minVal",maxVal:"maxVal"},decls:2,vars:2,consts:[["appearance","fill",1,"flex-100","input-container"],["appearance","fill",1,"flex-100"],[1,"input-group"],["required","","matInput","",1,"right-input",3,"keypress","blur","focus","mifosxFormatAmount","formControl"],[1,"right-hint"],["matTextSuffix","",1,"m-l-10"],[1,"flex-auto"],["matInput","",1,"right-input",3,"keypress","blur","focus","mifosxFormatAmount","formControl"]],template:function(n,o){n&1&&(E(0,ade,12,12,"mat-form-field",0),E(1,dde,11,11,"mat-form-field",1)),n&2&&(I(o.isRequired?0:-1),p(),I(o.isRequired?-1:1))},dependencies:[he,ve,yi,mn,Ir,Si,Bt,Cn,ao,Za,W0,ti,KS,o7,Te],styles:[".expandcollapsebutton[_ngcontent-%COMP%]{margin-top:-7px}.input-container[_ngcontent-%COMP%]{width:100%}.input-group[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center;gap:5px}.container[_ngcontent-%COMP%]{max-width:37rem}.right-input[_ngcontent-%COMP%]{text-align:right}.right-label[_ngcontent-%COMP%]{padding-right:25px!important}.right-hint[_ngcontent-%COMP%]{min-width:100%;text-align:right;font-weight:500}"]})}}return t})();var eN=(()=>{class t{constructor(){this.enableMeridian=!0}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275cmp=P({type:t,selectors:[["ngx-mat-datetime-picker"]],inputs:{enableMeridian:"enableMeridian"},decls:3,vars:1,consts:[["picker",""],[3,"for"]],template:function(n,o){if(n&1&&F(0,"mat-datepicker-toggle",1)(1,"mat-datepicker",null,0),n&2){let r=Nt(2);D("for",r)}},dependencies:[he,ve,ou,bf],encapsulation:2})}}return t})();var Vet=(()=>{class t{static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275mod=J({type:t})}static{this.\u0275inj=X({imports:[he,ab,Kb,ve,E7,uS,XS,yf,es,Rr,cO,Af,KT,XT,cP,gP,_P,bP,yP,IP,CP,kP,EP,OP,TP,DR,kR,RR,NR,Bh,Vh,FR,jh,jR,HR,UR,$R,GR,WR,Hh,YR,KR,XR,ZR,JR,Uf,eN,he,ab,Kb,QS,ve,E7]})}}return t})();export{Se as a,Fe as b,B as c,ct as d,pr as e,Sn as f,iue as g,tn as h,re as i,Gr as j,me as k,gi as l,_n as m,Oa as n,ed as o,Ta as p,ft as q,Ae as r,Mo as s,hr as t,Be as u,Wl as v,qr as w,Yr as x,hs as y,Cc as z,We as A,lt as B,ye as C,Ot as D,pe as E,kt as F,R as G,X as H,L as I,ke as J,d as K,G as L,W as M,$t as N,Ko as O,be as P,Me as Q,Fi as R,Xo as S,Re as T,Ie as U,Q as V,Bc as W,Td as X,Fn as Y,jc as Z,_1 as _,Vx as $,mU as aa,pU as ba,p as ca,j as da,se as ea,tt as fa,On as ga,Ke as ha,Ce as ia,P as ja,J as ka,z as la,ce as ma,ot as na,C1 as oa,ne as pa,M5 as qa,E as ra,I as sa,ht as ta,Xe as ua,Ze as va,D as wa,h as xa,_ as ya,F as za,nt as Aa,rt as Ba,Tn as Ca,Vi as Da,Bi as Ea,Vt as Fa,le as Ga,Lt as Ha,N as Ia,M as Ja,De as Ka,ae as La,Ee as Ma,ue as Na,U as Oa,$ as Pa,Nt as Qa,At as Ra,oe as Sa,Tt as Ta,y as Ua,T as Va,ee as Wa,St as Xa,Ua as Ya,uw as Za,M1 as _a,Hd as $a,w1 as ab,Ft as bb,Uc as cb,de as db,ko as eb,Eo as fb,D1 as gb,S as hb,k as ib,Zo as jb,xW as kb,cm as lb,ks as mb,xe as nb,Sr as ob,Jo as pb,Un as qb,vD as rb,wq as sb,yD as tb,Dq as ub,i7 as vb,Es as wb,Xd as xb,Eq as yb,Oq as zb,E1 as Ab,Pq as Bb,Aq as Cb,Zd as Db,o7 as Eb,he as Fb,_be as Gb,DD as Hb,f7 as Ib,Zq as Jb,tY as Kb,T1 as Lb,o0 as Mb,To as Nb,te as Ob,r0 as Pb,O1 as Qb,Bn as Rb,GD as Sb,DY as Tb,SY as Ub,YD as Vb,Ga as Wb,sc as Xb,Ioe as Yb,nb as Zb,$f as _b,LNe as $b,bu as ac,Ooe as bc,Gf as cc,eb as dc,tb as ec,Toe as fc,No as gc,ro as hc,M_ as ic,CE as jc,bo as kc,m2 as lc,MX as mc,EX as nc,Xc as oc,xp as pc,ni as qc,vt as rc,HOe as sc,yo as tc,Wn as uc,Qs as vc,Mi as wc,so as xc,pI as yc,Ei as zc,xse as Ac,qt as Bc,En as Cc,Wi as Dc,Ln as Ec,xn as Fc,An as Gc,zn as Hc,d9 as Ic,L1 as Jc,c0 as Kc,Po as Lc,Te as Mc,E7 as Nc,mt as Oc,JT as Pc,Os as Qc,go as Rc,Xt as Sc,pS as Tc,Zm as Uc,di as Vc,yi as Wc,en as Xc,mn as Yc,tr as Zc,VS as _c,H1 as $c,Hi as ad,nQ as bd,zs as cd,oQ as dd,Si as ed,ui as fd,US as gd,$S as hd,Ao as id,uQ as jd,pQ as kd,Ir as ld,gQ as md,bQ as nd,vQ as od,Rs as pd,QS as qd,ve as rd,LE as sd,KDe as td,XDe as ud,AE as vd,ZDe as wd,JDe as xd,eSe as yd,tSe as zd,nSe as Ad,Cn as Bd,ao as Cd,W0 as Dd,q0 as Ed,Za as Fd,Bt as Gd,nf as Hd,ti as Id,ln as Jd,uo as Kd,qn as Ld,BZ as Md,mo as Nd,bf as Od,vf as Pd,ou as Qd,il as Rd,Lo as Sd,Wc as Td,Ps as Ud,Wf as Vd,QR as Wd,Yt as Xd,YT as Yd,nr as Zd,es as _d,Rr as $d,cO as ae,Af as be,O2 as ce,rc as de,KT as ee,XT as fe,_l as ge,ac as he,Nf as ie,J9 as je,aP as ke,cP as le,Vf as me,Co as ne,gP as oe,_P as pe,bP as qe,yP as re,CP as se,xP as te,kP as ue,EP as ve,IP as we,OP as xe,TP as ye,YA as ze,tVe as Ae,nVe as Be,tz as Ce,ZVe as De,qre as Ee,Jre as Fe,dz as Ge,dae as He,uae as Ie,hje as Je,gje as Ke,_je as Le,jje as Me,Hje as Ne,Uje as Oe,$je as Pe,wb as Qe,Mz as Re,Dz as Se,OHe as Te,qae as Ue,Oz as Ve,Pz as We,ase as Xe,vUe as Ye,use as Ze,oh as _e,Bz as $e,jz as af,Ob as bf,Jse as cf,tce as df,nce as ef,$z as ff,Gz as gf,ph as hf,fh as if,hh as jf,PGe as kf,gh as lf,_h as mf,LGe as nf,bh as of,vh as pf,AGe as qf,yh as rf,Ch as sf,zGe as tf,xh as uf,RGe as vf,Jz as wf,Eu as xf,Ice as yf,Tce as zf,Pce as Af,mWe as Bf,Rce as Cf,Nce as Df,pWe as Ef,DWe as Ff,gR as Gf,_R as Hf,rqe as If,aqe as Jf,sqe as Kf,cqe as Lf,yR as Mf,lqe as Nf,dqe as Of,CR as Pf,xR as Qf,MR as Rf,Qb as Sf,Sh as Tf,DR as Uf,eS as Vf,tS as Wf,nS as Xf,ca as Yf,oS as Zf,Ts as _f,cS as $f,Km as ag,uS as bg,kh as cg,SR as dg,Eh as eg,Ih as fg,kR as gg,OR as hg,TR as ig,PR as jg,LR as kg,AR as lg,zR as mg,RR as ng,$Ce as og,XS as pg,Ah as qg,Rh as rg,Nh as sg,Fh as tg,NR as ug,FR as vg,VR as wg,BR as xg,jR as yg,HR as zg,UR as Ag,$R as Bg,GR as Cg,WR as Dg,Hh as Eg,qR as Fg,YR as Gg,KR as Hg,XR as Ig,JR as Jg,Vet as Kg}; diff --git a/browser/chunk-YJQVOBFM.js b/browser/chunk-EH6HBK56.js similarity index 91% rename from browser/chunk-YJQVOBFM.js rename to browser/chunk-EH6HBK56.js index 2ff67cb8d..8957d586f 100644 --- a/browser/chunk-YJQVOBFM.js +++ b/browser/chunk-EH6HBK56.js @@ -1 +1 @@ -import{G as r,K as i,fg as n}from"./chunk-OX7PN44D.js";var m=(()=>{class t{constructor(){this.savingsService=i(n)}resolve(e){let a=e.parent.parent.paramMap.get("savingAccountId")||e.parent.parent.paramMap.get("fixedDepositAccountId")||e.parent.parent.paramMap.get("recurringDepositAccountId"),c=e.paramMap.get("datatableName");return this.savingsService.getSavingsDatatable(a,c)}static{this.\u0275fac=function(a){return new(a||t)}}static{this.\u0275prov=r({token:t,factory:t.\u0275fac})}}return t})();var S=(()=>{class t{constructor(){this.savingsService=i(n)}resolve(){return this.savingsService.getSavingsDatatables()}static{this.\u0275fac=function(a){return new(a||t)}}static{this.\u0275prov=r({token:t,factory:t.\u0275fac})}}return t})();export{m as a,S as b}; +import{G as r,K as i,fg as n}from"./chunk-BQBWZIWL.js";var m=(()=>{class t{constructor(){this.savingsService=i(n)}resolve(e){let a=e.parent.parent.paramMap.get("savingAccountId")||e.parent.parent.paramMap.get("fixedDepositAccountId")||e.parent.parent.paramMap.get("recurringDepositAccountId"),c=e.paramMap.get("datatableName");return this.savingsService.getSavingsDatatable(a,c)}static{this.\u0275fac=function(a){return new(a||t)}}static{this.\u0275prov=r({token:t,factory:t.\u0275fac})}}return t})();var S=(()=>{class t{constructor(){this.savingsService=i(n)}resolve(){return this.savingsService.getSavingsDatatables()}static{this.\u0275fac=function(a){return new(a||t)}}static{this.\u0275prov=r({token:t,factory:t.\u0275fac})}}return t})();export{m as a,S as b}; diff --git a/browser/chunk-JJ2I2MEQ.js b/browser/chunk-IOMOX4OB.js similarity index 97% rename from browser/chunk-JJ2I2MEQ.js rename to browser/chunk-IOMOX4OB.js index 182edb07f..93245b681 100644 --- a/browser/chunk-JJ2I2MEQ.js +++ b/browser/chunk-IOMOX4OB.js @@ -1 +1 @@ -import{G as i,K as p,Ob as n,Rb as v,dg as c,k as u}from"./chunk-OX7PN44D.js";var h=class{constructor(a){this.selectOptions=[],this.childParameters=[],this.name=a[0],this.variable=a[1],this.label=a[2],this.displayType=a[3],this.formatType=a[4],this.defaultVal=a[5],this.selectOne=a[6],this.selectAll=a[7],this.parentParameterName=a[8],this.inputName=`R_${a[1]}`}};var l=class{constructor(a){this.id=a[0],this.name=a[1]}};var f=class{constructor(a){this.keysLabel=a.columnHeaders[0].columnName,this.valuesLabel=a.columnHeaders[1].columnName,this.keys=a.data.map(e=>e.row[0]),this.values=a.data.map(e=>e.row[1])}};var F=(()=>{class t{constructor(){this.http=p(v)}getReports(){return this.http.get("/reports")}getReportParams(e){let r=new n().set("R_reportListing",`'${e}'`).set("parameterType","true");return this.http.get("/runreports/FullParameterList",{params:r}).pipe(u(s=>s.data.map(o=>new h(o.row))))}getSelectOptions(e){let r=new n().set("parameterType","true");return this.http.get(`/runreports/${e}`,{params:r}).pipe(u(s=>s.data.map(o=>new l(o.row))))}getPentahoParams(e){let r=new n().set("fields","reportParameters");return this.http.get(`/reports/${e}`,{params:r}).pipe(u(s=>s.reportParameters))}getRunReportData(e,r){let s=new n;for(let[o,m]of Object.entries(r))s=s.set(o,m);return this.http.get(`/runreports/${e}`,{params:s})}getChartRunReportData(e,r){let s=new n;for(let[o,m]of Object.entries(r))s=s.set(o,m);return this.http.get(`/runreports/${e}`,{params:s}).pipe(u(o=>new f(o)))}getPentahoRunReportData(e,r,s,o,m){let g=new n().set("tenantIdentifier",s).set("locale",o).set("dateFormat",m);for(let[y,b]of Object.entries(r))g=g.set(y,b);return this.http.get(`/runreports/${e}`,{responseType:"arraybuffer",observe:"response",params:g})}static{this.\u0275fac=function(r){return new(r||t)}}static{this.\u0275prov=i({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();var L=(()=>{class t{constructor(){this.groupsService=p(c)}resolve(e){let r=e.parent.paramMap.get("groupId");return this.groupsService.getGroupAccountsData(r)}static{this.\u0275fac=function(r){return new(r||t)}}static{this.\u0275prov=i({token:t,factory:t.\u0275fac})}}return t})();var V=(()=>{class t{constructor(){this.groupsService=p(c)}resolve(e){let r=e.parent.paramMap.get("groupId");return this.groupsService.getGSIMAccountsData(r)}static{this.\u0275fac=function(r){return new(r||t)}}static{this.\u0275prov=i({token:t,factory:t.\u0275fac})}}return t})();var J=(()=>{class t{constructor(){this.groupsService=p(c)}resolve(e){let r=e.paramMap.get("groupId");return this.groupsService.getGroupData(r)}static{this.\u0275fac=function(r){return new(r||t)}}static{this.\u0275prov=i({token:t,factory:t.\u0275fac})}}return t})();export{F as a,L as b,V as c,J as d}; +import{G as i,K as p,Ob as n,Rb as v,dg as c,k as u}from"./chunk-BQBWZIWL.js";var h=class{constructor(a){this.selectOptions=[],this.childParameters=[],this.name=a[0],this.variable=a[1],this.label=a[2],this.displayType=a[3],this.formatType=a[4],this.defaultVal=a[5],this.selectOne=a[6],this.selectAll=a[7],this.parentParameterName=a[8],this.inputName=`R_${a[1]}`}};var l=class{constructor(a){this.id=a[0],this.name=a[1]}};var f=class{constructor(a){this.keysLabel=a.columnHeaders[0].columnName,this.valuesLabel=a.columnHeaders[1].columnName,this.keys=a.data.map(e=>e.row[0]),this.values=a.data.map(e=>e.row[1])}};var F=(()=>{class t{constructor(){this.http=p(v)}getReports(){return this.http.get("/reports")}getReportParams(e){let r=new n().set("R_reportListing",`'${e}'`).set("parameterType","true");return this.http.get("/runreports/FullParameterList",{params:r}).pipe(u(s=>s.data.map(o=>new h(o.row))))}getSelectOptions(e){let r=new n().set("parameterType","true");return this.http.get(`/runreports/${e}`,{params:r}).pipe(u(s=>s.data.map(o=>new l(o.row))))}getPentahoParams(e){let r=new n().set("fields","reportParameters");return this.http.get(`/reports/${e}`,{params:r}).pipe(u(s=>s.reportParameters))}getRunReportData(e,r){let s=new n;for(let[o,m]of Object.entries(r))s=s.set(o,m);return this.http.get(`/runreports/${e}`,{params:s})}getChartRunReportData(e,r){let s=new n;for(let[o,m]of Object.entries(r))s=s.set(o,m);return this.http.get(`/runreports/${e}`,{params:s}).pipe(u(o=>new f(o)))}getPentahoRunReportData(e,r,s,o,m){let g=new n().set("tenantIdentifier",s).set("locale",o).set("dateFormat",m);for(let[y,b]of Object.entries(r))g=g.set(y,b);return this.http.get(`/runreports/${e}`,{responseType:"arraybuffer",observe:"response",params:g})}static{this.\u0275fac=function(r){return new(r||t)}}static{this.\u0275prov=i({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();var L=(()=>{class t{constructor(){this.groupsService=p(c)}resolve(e){let r=e.parent.paramMap.get("groupId");return this.groupsService.getGroupAccountsData(r)}static{this.\u0275fac=function(r){return new(r||t)}}static{this.\u0275prov=i({token:t,factory:t.\u0275fac})}}return t})();var V=(()=>{class t{constructor(){this.groupsService=p(c)}resolve(e){let r=e.parent.paramMap.get("groupId");return this.groupsService.getGSIMAccountsData(r)}static{this.\u0275fac=function(r){return new(r||t)}}static{this.\u0275prov=i({token:t,factory:t.\u0275fac})}}return t})();var J=(()=>{class t{constructor(){this.groupsService=p(c)}resolve(e){let r=e.paramMap.get("groupId");return this.groupsService.getGroupData(r)}static{this.\u0275fac=function(r){return new(r||t)}}static{this.\u0275prov=i({token:t,factory:t.\u0275fac})}}return t})();export{F as a,L as b,V as c,J as d}; diff --git a/browser/chunk-SJ6K46JC.js b/browser/chunk-JZVD6ANS.js similarity index 97% rename from browser/chunk-SJ6K46JC.js rename to browser/chunk-JZVD6ANS.js index 4fac742b2..935708c48 100644 --- a/browser/chunk-SJ6K46JC.js +++ b/browser/chunk-JZVD6ANS.js @@ -1 +1 @@ -import{B as g,G as f,K as l,Nb as u,Ob as a,Oc as i,Rb as N}from"./chunk-OX7PN44D.js";import{a as d,b as h}from"./chunk-PHUH23IY.js";var P=(()=>{class c{constructor(){this.http=l(N)}getStandingInstructionsData(t){return this.http.get(`/standinginstructions/${t}`)}getStandingInstructionsDataAndTemplate(t){let n=new a().set("associations","template");return this.http.get(`/standinginstructions/${t}`,{params:n})}updateStandingInstructionsData(t,n){let s=new a().set("command","update");return this.http.put(`/standinginstructions/${t}`,n,{params:s})}getStandingInstructionsTemplate(t,n,s,e){let r=new a().set("fromAccountType",s).set("fromClientId",t).set("fromOfficeId",n);if(e){let o=Object.getOwnPropertyNames(e);for(let p=0;p{let o=JSON.stringify(h(d({},s),{ownerFspId:r.fspId}));return this.http.post(`${i.vNextApiUrl}${i.vNextApiVersion}${i.vNextApiProvider}/partyinfo`,o,{headers:e})}))}sendInterbankTransfer(t){let n=new u({"Content-Type":"application/json"});return this.http.post(`${i.vNextApiUrl}${i.vNextApiVersion}${i.vNextApiProvider}/executetransfer`,t,{headers:n})}static{this.\u0275fac=function(n){return new(n||c)}}static{this.\u0275prov=f({token:c,factory:c.\u0275fac,providedIn:"root"})}}return c})();export{P as a}; +import{B as g,G as f,K as l,Nb as u,Ob as a,Oc as i,Rb as N}from"./chunk-BQBWZIWL.js";import{a as d,b as h}from"./chunk-PHUH23IY.js";var P=(()=>{class c{constructor(){this.http=l(N)}getStandingInstructionsData(t){return this.http.get(`/standinginstructions/${t}`)}getStandingInstructionsDataAndTemplate(t){let n=new a().set("associations","template");return this.http.get(`/standinginstructions/${t}`,{params:n})}updateStandingInstructionsData(t,n){let s=new a().set("command","update");return this.http.put(`/standinginstructions/${t}`,n,{params:s})}getStandingInstructionsTemplate(t,n,s,e){let r=new a().set("fromAccountType",s).set("fromClientId",t).set("fromOfficeId",n);if(e){let o=Object.getOwnPropertyNames(e);for(let p=0;p{let o=JSON.stringify(h(d({},s),{ownerFspId:r.fspId}));return this.http.post(`${i.vNextApiUrl}${i.vNextApiVersion}${i.vNextApiProvider}/partyinfo`,o,{headers:e})}))}sendInterbankTransfer(t){let n=new u({"Content-Type":"application/json"});return this.http.post(`${i.vNextApiUrl}${i.vNextApiVersion}${i.vNextApiProvider}/executetransfer`,t,{headers:n})}static{this.\u0275fac=function(n){return new(n||c)}}static{this.\u0275prov=f({token:c,factory:c.\u0275fac,providedIn:"root"})}}return c})();export{P as a}; diff --git a/browser/chunk-QZJSWYAX.js b/browser/chunk-NRQXHT6M.js similarity index 81% rename from browser/chunk-QZJSWYAX.js rename to browser/chunk-NRQXHT6M.js index 4a228fd9e..d7507a118 100644 --- a/browser/chunk-QZJSWYAX.js +++ b/browser/chunk-NRQXHT6M.js @@ -1 +1 @@ -import{G as i,K as r,fg as n}from"./chunk-OX7PN44D.js";var f=(()=>{class t{constructor(){this.savingsService=r(n)}resolve(c){let e=c.paramMap.get("savingAccountId");return this.savingsService.getSavingsAccountData(e)}static{this.\u0275fac=function(e){return new(e||t)}}static{this.\u0275prov=i({token:t,factory:t.\u0275fac})}}return t})();export{f as a}; +import{G as i,K as r,fg as n}from"./chunk-BQBWZIWL.js";var f=(()=>{class t{constructor(){this.savingsService=r(n)}resolve(c){let e=c.paramMap.get("savingAccountId");return this.savingsService.getSavingsAccountData(e)}static{this.\u0275fac=function(e){return new(e||t)}}static{this.\u0275prov=i({token:t,factory:t.\u0275fac})}}return t})();export{f as a}; diff --git a/browser/collaterals.module-2PEXEBPG.js b/browser/collaterals.module-WP7AP2ZF.js similarity index 99% rename from browser/collaterals.module-2PEXEBPG.js rename to browser/collaterals.module-WP7AP2ZF.js index 353bf0cca..ea6ba33ee 100644 --- a/browser/collaterals.module-2PEXEBPG.js +++ b/browser/collaterals.module-WP7AP2ZF.js @@ -1 +1 @@ -import{$d as bt,Bd as st,Cd as ct,Da as _,Dc as Y,Ea as x,Fb as v,G as y,Ga as J,Gd as dt,H as S,Ia as E,Id as ut,Ja as K,K as d,Kg as Tt,L as G,M as U,Mc as F,Ob as W,Rb as X,Sc as Z,Sd as Ct,Ua as o,Ud as ft,Va as c,Wa as h,Wc as tt,Xa as b,Xc as et,Xd as ht,Yc as it,Zc as at,_f as Et,bg as Rt,ca as i,cd as nt,eb as R,fd as lt,hb as r,hc as P,hf as vt,ib as m,id as ot,if as gt,ja as I,jf as _t,ka as w,kc as T,lc as B,ld as rt,lf as xt,mf as Dt,na as f,nc as j,of as Mt,pd as mt,pf as yt,pg as Pt,ra as Q,rc as O,rd as V,rf as St,sa as z,sd as L,sf as It,uf as wt,vd as N,wa as C,xa as l,xd as pt,ya as n,za as u}from"./chunk-OX7PN44D.js";import"./chunk-PHUH23IY.js";var g=(()=>{class t{constructor(){this.http=d(X)}getFilteredClients(e,a,p,M,$){let k=new W().set("displayName",M).set("orphansOnly",p.toString()).set("sortOrder",a).set("orderBy",e);return $&&(k=k.set("officeId",$)),this.http.get("/clients",{params:k})}getClientCollateral(e,a){return this.http.get(`/clients/${e}/collaterals/${a}`)}updateClientCollateral(e,a,p){return this.http.put(`/clients/${e}/collaterals/${a}`,p)}deleteCollateral(e,a){return this.http.delete(`/clients/${e}/collaterals/${a}`)}static{this.\u0275fac=function(a){return new(a||t)}}static{this.\u0275prov=y({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();var qt=()=>["edit"];function Ht(t,s){t&1&&(l(0,"button",16),u(1,"fa-icon",17),o(2),r(3,"translate"),n()),t&2&&(C("routerLink",R(4,qt)),i(2),h(" ",m(3,2,"labels.buttons.Edit")," "))}function kt(t,s){if(t&1){let e=J();l(0,"button",18),E("click",function(){G(e);let p=K();return U(p.deleteCollateral())}),u(1,"fa-icon",19),o(2),r(3,"translate"),n()}t&2&&(i(2),h(" ",m(3,1,"labels.buttons.Delete")," "))}function jt(t,s){t&1&&(l(0,"th",20),o(1),r(2,"translate"),n()),t&2&&(i(),c(m(2,1,"labels.inputs.ID")))}function $t(t,s){if(t&1&&(l(0,"td",21),o(1),n()),t&2){let e=s.$implicit;i(),h(" ",e.loanId," ")}}function Gt(t,s){t&1&&(l(0,"th",20),o(1),r(2,"translate"),n()),t&2&&(i(),c(m(2,1,"labels.inputs.Last Repayment")))}function Ut(t,s){if(t&1&&(l(0,"td",21),o(1),n()),t&2){let e=s.$implicit;i(),c(e.lastRepayment)}}function Qt(t,s){t&1&&(l(0,"th",20),o(1),r(2,"translate"),n()),t&2&&(i(),c(m(2,1,"labels.inputs.Remaining Amount")))}function zt(t,s){if(t&1&&(l(0,"td",21),o(1),r(2,"formatNumber"),n()),t&2){let e=s.$implicit;i(),c(m(2,1,e.remainingAmount))}}function Jt(t,s){t&1&&(l(0,"th",20),o(1),r(2,"translate"),n()),t&2&&(i(),c(m(2,1,"labels.inputs.Last Repayment Date")))}function Kt(t,s){if(t&1&&(l(0,"td",21),o(1),r(2,"dateFormat"),n()),t&2){let e=s.$implicit;i(),c(m(2,1,e.lastRepaymentDate))}}function Wt(t,s){t&1&&u(0,"tr",22)}function Xt(t,s){t&1&&u(0,"tr",23)}var A=(()=>{class t{constructor(){this.route=d(P),this.collateralsService=d(g),this.router=d(T),this.dialog=d(Y),this.collateralColumns=["ID","Last Repayment","Remaining Amount","Last Repayment Date"],this.route.data.subscribe(e=>{this.clientCollateralData=e.clientCollateralData})}deleteCollateral(){this.dialog.open(bt,{data:{deleteContext:`collateral ${this.clientCollateralData.id}`}}).afterClosed().subscribe(a=>{a.delete&&this.collateralsService.deleteCollateral(this.clientCollateralData.clientId,this.clientCollateralData.id).subscribe(()=>{this.router.navigate(["../../"],{relativeTo:this.route})})})}static{this.\u0275fac=function(a){return new(a||t)}}static{this.\u0275cmp=I({type:t,selectors:[["mifosx-view-collateral"]],decls:42,vars:27,consts:[[1,"layout-row","align-end","gap-2px","responsive-column","container","m-b-20"],["mat-raised-button","","color","primary",3,"routerLink",4,"mifosxHasPermission"],["mat-raised-button","","color","warn",3,"click",4,"mifosxHasPermission"],[1,"client-collateral-card"],[1,"content"],[1,"tab-container","mat-typography"],[1,"layout-row","gap-32px","group-details-container","m-b-30"],["mat-table","",1,"mat-elevation-z1","m-b-30",3,"dataSource"],["matColumnDef","ID"],["mat-header-cell","",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","Last Repayment"],["matColumnDef","Remaining Amount"],["matColumnDef","Last Repayment Date"],["mat-header-row","",4,"matHeaderRowDef"],["mat-row","",4,"matRowDef","matRowDefColumns"],["mat-raised-button","","color","primary",3,"routerLink"],["icon","edit",1,"m-r-10"],["mat-raised-button","","color","warn",3,"click"],["icon","trash",1,"m-r-10"],["mat-header-cell",""],["mat-cell",""],["mat-header-row",""],["mat-row",""]],template:function(a,p){a&1&&(l(0,"div",0),f(1,Ht,4,5,"button",1)(2,kt,4,3,"button",2),n(),l(3,"mat-card",3)(4,"mat-card-content",4),o(5,"\\ "),l(6,"div",5)(7,"h3"),o(8),r(9,"translate"),n(),l(10,"div",6)(11,"p"),o(12),r(13,"translate"),u(14,"br"),o(15),r(16,"translate"),u(17,"br"),o(18),r(19,"translate"),u(20,"br"),o(21),r(22,"translate"),u(23,"br"),n()(),l(24,"h3"),o(25),r(26,"translate"),n(),l(27,"table",7),_(28,8),f(29,jt,3,3,"th",9)(30,$t,2,1,"td",10),x(),_(31,11),f(32,Gt,3,3,"th",9)(33,Ut,2,1,"td",10),x(),_(34,12),f(35,Qt,3,3,"th",9)(36,zt,3,3,"td",10),x(),_(37,13),f(38,Jt,3,3,"th",9)(39,Kt,3,3,"td",10),x(),f(40,Wt,1,0,"tr",14)(41,Xt,1,0,"tr",15),n()()()()),a&2&&(i(),C("mifosxHasPermission","UPDATE_CLIENT_COLLATERAL_PRODUCT"),i(),C("mifosxHasPermission","DELETE_CLIENT_COLLATERAL_PRODUCT"),i(6),c(m(9,15,"labels.heading.Client Collateral Details")),i(4),b(" ",m(13,17,"labels.inputs.name"),": ",p.clientCollateralData.name),i(3),b(" ",m(16,19,"labels.inputs.Quantity"),": ",p.clientCollateralData.quantity),i(3),b(" ",m(19,21,"labels.inputs.Total Value"),": ",p.clientCollateralData.total),i(3),b(" ",m(22,23,"labels.inputs.Total Collateral Value"),": ",p.clientCollateralData.totalCollateral),i(4),c(m(26,25,"labels.heading.Transaction Details")),i(2),C("dataSource",p.clientCollateralData.loanTransactionData),i(13),C("matHeaderRowDef",p.collateralColumns),i(),C("matRowDefColumns",p.collateralColumns))},dependencies:[v,V,B,L,N,O,ft,ht,vt,xt,_t,Dt,gt,Mt,yt,It,St,wt,Ct,F,Et],styles:[".client-collateral-card[_ngcontent-%COMP%]{margin:0 auto;max-width:80rem;width:90%;padding:0}.tab-container[_ngcontent-%COMP%]{padding:1%;margin:1%}.tab-container[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{margin:1% auto}.tab-container[_ngcontent-%COMP%] .group-details-container[_ngcontent-%COMP%]{border:1px solid;padding:1%}.tab-container[_ngcontent-%COMP%] .action-button[_ngcontent-%COMP%]{margin-left:auto}.tab-container[_ngcontent-%COMP%] table[_ngcontent-%COMP%]{width:100%}.tab-container[_ngcontent-%COMP%] table[_ngcontent-%COMP%] .account-action-button[_ngcontent-%COMP%]{min-width:26px;padding:0 6px;margin:4px;line-height:25px}.tab-container[_ngcontent-%COMP%] table[_ngcontent-%COMP%] tr.select-row[_ngcontent-%COMP%]:hover, .tab-container[_ngcontent-%COMP%] i[_ngcontent-%COMP%]:hover{cursor:pointer}"]})}}return t})();var q=(()=>{class t{constructor(){this.collateralsService=d(g)}resolve(e){let a=e.parent.paramMap.get("clientId"),p=e.parent.paramMap.get("collateralId");return this.collateralsService.getClientCollateral(a,p)}static{this.\u0275fac=function(a){return new(a||t)}}static{this.\u0275prov=y({token:t,factory:t.\u0275fac})}}return t})();var Yt=()=>["../../"];function Zt(t,s){t&1&&(l(0,"mat-error"),o(1),r(2,"translate"),r(3,"translate"),l(4,"strong"),o(5),r(6,"translate"),n()()),t&2&&(i(),b(" ",m(2,3,"labels.inputs.Quantity")," ",m(3,5,"labels.commons.is")," "),i(4),c(m(6,7,"labels.commons.required")))}var H=(()=>{class t{constructor(){this.formBuilder=d(mt),this.route=d(P),this.router=d(T),this.settingsService=d(Z),this.collateralService=d(g),this.route.data.subscribe(e=>{this.collateralDetails=e.clientCollateralData}),this.clientId=this.route.parent.snapshot.params.clientId}ngOnInit(){this.createClientCollateralForm()}createClientCollateralForm(){this.clientCollateralForm=this.formBuilder.group({quantity:["",et.required],name:[{value:"",disabled:!0}],total:[{value:"",disabled:!0}],totalCollateral:[{value:"",disabled:!0}]}),this.clientCollateralForm.patchValue({name:this.collateralDetails.name,quantity:this.collateralDetails.quantity,total:this.collateralDetails.total,totalCollateral:this.collateralDetails.totalCollateral})}submit(){let e=this.collateralDetails.id,a=this.clientCollateralForm.value.quantity,p=this.settingsService.language.code,M={quantity:a,locale:p};this.collateralService.updateClientCollateral(this.clientId,e,M).subscribe(()=>{this.router.navigate(["../"],{relativeTo:this.route})})}static{this.\u0275fac=function(a){return new(a||t)}}static{this.\u0275cmp=I({type:t,selectors:[["mifosx-edit-collateral"]],decls:34,vars:23,consts:[[1,"container"],[3,"ngSubmit","formGroup"],[1,"layout-column"],["matInput","","required","","formControlName","name"],["matInput","","required","","formControlName","quantity"],["matInput","","required","","formControlName","total"],["matInput","","required","","formControlName","totalCollateral"],[1,"layout-row","layout-xs-column","layout-align-center","gap-5px"],["type","button","mat-raised-button","",3,"routerLink"],["mat-raised-button","","color","primary",3,"disabled"]],template:function(a,p){a&1&&(l(0,"div",0)(1,"mat-card")(2,"form",1),E("ngSubmit",function(){return p.submit()}),l(3,"mat-card-content")(4,"div",2)(5,"div",2)(6,"mat-form-field")(7,"mat-label"),o(8),r(9,"translate"),n(),u(10,"input",3),n(),l(11,"mat-form-field")(12,"mat-label"),o(13),r(14,"translate"),n(),u(15,"input",4),Q(16,Zt,7,9,"mat-error"),n(),l(17,"mat-form-field")(18,"mat-label"),o(19),r(20,"translate"),n(),u(21,"input",5),n(),l(22,"mat-form-field")(23,"mat-label"),o(24),r(25,"translate"),n(),u(26,"input",6),n()()()(),l(27,"mat-card-actions",7)(28,"button",8),o(29),r(30,"translate"),n(),l(31,"button",9),o(32),r(33,"translate"),n()()()()()),a&2&&(i(2),C("formGroup",p.clientCollateralForm),i(6),c(m(9,10,"labels.inputs.name")),i(5),c(m(14,12,"labels.inputs.Quantity")),i(3),z(p.clientCollateralForm.controls.quantity.hasError("required")?16:-1),i(3),c(m(20,14,"labels.inputs.Total")),i(5),c(m(25,16,"labels.inputs.Total Collateral Value")),i(4),C("routerLink",R(22,Yt)),i(),h(" ",m(30,18,"labels.buttons.Cancel")," "),i(2),C("disabled",!p.clientCollateralForm.valid),i(),h(" ",m(33,20,"labels.buttons.Submit")," "))},dependencies:[v,V,nt,tt,it,at,rt,lt,ot,B,L,N,pt,dt,st,ct,ut,O,F],styles:[".container[_ngcontent-%COMP%]{width:37rem}"]})}}return t})();var te=[{path:"",data:{title:"Collateral",breadcrumb:"Collateral",routeParamBreadcrumb:!1},children:[{path:":collateralId",data:{title:"Collateral View",routeParamBreadcrumb:"collateralId"},children:[{path:"",component:A,resolve:{clientCollateralData:q}},{path:"edit",data:{title:"edit",routeParamBreadcrumb:"edit"},component:H,resolve:{clientCollateralData:q}}]}]}],Bt=(()=>{class t{static{this.\u0275fac=function(a){return new(a||t)}}static{this.\u0275mod=w({type:t})}static{this.\u0275inj=S({providers:[q],imports:[j.forChild(te),j]})}}return t})();var Je=(()=>{class t{static{this.\u0275fac=function(a){return new(a||t)}}static{this.\u0275mod=w({type:t})}static{this.\u0275inj=S({imports:[v,Bt,Tt,Pt,Rt,A,H]})}}return t})();export{Je as CollateralsModule}; +import{$d as bt,Bd as st,Cd as ct,Da as _,Dc as Y,Ea as x,Fb as v,G as y,Ga as J,Gd as dt,H as S,Ia as E,Id as ut,Ja as K,K as d,Kg as Tt,L as G,M as U,Mc as F,Ob as W,Rb as X,Sc as Z,Sd as Ct,Ua as o,Ud as ft,Va as c,Wa as h,Wc as tt,Xa as b,Xc as et,Xd as ht,Yc as it,Zc as at,_f as Et,bg as Rt,ca as i,cd as nt,eb as R,fd as lt,hb as r,hc as P,hf as vt,ib as m,id as ot,if as gt,ja as I,jf as _t,ka as w,kc as T,lc as B,ld as rt,lf as xt,mf as Dt,na as f,nc as j,of as Mt,pd as mt,pf as yt,pg as Pt,ra as Q,rc as O,rd as V,rf as St,sa as z,sd as L,sf as It,uf as wt,vd as N,wa as C,xa as l,xd as pt,ya as n,za as u}from"./chunk-BQBWZIWL.js";import"./chunk-PHUH23IY.js";var g=(()=>{class t{constructor(){this.http=d(X)}getFilteredClients(e,a,p,M,$){let k=new W().set("displayName",M).set("orphansOnly",p.toString()).set("sortOrder",a).set("orderBy",e);return $&&(k=k.set("officeId",$)),this.http.get("/clients",{params:k})}getClientCollateral(e,a){return this.http.get(`/clients/${e}/collaterals/${a}`)}updateClientCollateral(e,a,p){return this.http.put(`/clients/${e}/collaterals/${a}`,p)}deleteCollateral(e,a){return this.http.delete(`/clients/${e}/collaterals/${a}`)}static{this.\u0275fac=function(a){return new(a||t)}}static{this.\u0275prov=y({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();var qt=()=>["edit"];function Ht(t,s){t&1&&(l(0,"button",16),u(1,"fa-icon",17),o(2),r(3,"translate"),n()),t&2&&(C("routerLink",R(4,qt)),i(2),h(" ",m(3,2,"labels.buttons.Edit")," "))}function kt(t,s){if(t&1){let e=J();l(0,"button",18),E("click",function(){G(e);let p=K();return U(p.deleteCollateral())}),u(1,"fa-icon",19),o(2),r(3,"translate"),n()}t&2&&(i(2),h(" ",m(3,1,"labels.buttons.Delete")," "))}function jt(t,s){t&1&&(l(0,"th",20),o(1),r(2,"translate"),n()),t&2&&(i(),c(m(2,1,"labels.inputs.ID")))}function $t(t,s){if(t&1&&(l(0,"td",21),o(1),n()),t&2){let e=s.$implicit;i(),h(" ",e.loanId," ")}}function Gt(t,s){t&1&&(l(0,"th",20),o(1),r(2,"translate"),n()),t&2&&(i(),c(m(2,1,"labels.inputs.Last Repayment")))}function Ut(t,s){if(t&1&&(l(0,"td",21),o(1),n()),t&2){let e=s.$implicit;i(),c(e.lastRepayment)}}function Qt(t,s){t&1&&(l(0,"th",20),o(1),r(2,"translate"),n()),t&2&&(i(),c(m(2,1,"labels.inputs.Remaining Amount")))}function zt(t,s){if(t&1&&(l(0,"td",21),o(1),r(2,"formatNumber"),n()),t&2){let e=s.$implicit;i(),c(m(2,1,e.remainingAmount))}}function Jt(t,s){t&1&&(l(0,"th",20),o(1),r(2,"translate"),n()),t&2&&(i(),c(m(2,1,"labels.inputs.Last Repayment Date")))}function Kt(t,s){if(t&1&&(l(0,"td",21),o(1),r(2,"dateFormat"),n()),t&2){let e=s.$implicit;i(),c(m(2,1,e.lastRepaymentDate))}}function Wt(t,s){t&1&&u(0,"tr",22)}function Xt(t,s){t&1&&u(0,"tr",23)}var A=(()=>{class t{constructor(){this.route=d(P),this.collateralsService=d(g),this.router=d(T),this.dialog=d(Y),this.collateralColumns=["ID","Last Repayment","Remaining Amount","Last Repayment Date"],this.route.data.subscribe(e=>{this.clientCollateralData=e.clientCollateralData})}deleteCollateral(){this.dialog.open(bt,{data:{deleteContext:`collateral ${this.clientCollateralData.id}`}}).afterClosed().subscribe(a=>{a.delete&&this.collateralsService.deleteCollateral(this.clientCollateralData.clientId,this.clientCollateralData.id).subscribe(()=>{this.router.navigate(["../../"],{relativeTo:this.route})})})}static{this.\u0275fac=function(a){return new(a||t)}}static{this.\u0275cmp=I({type:t,selectors:[["mifosx-view-collateral"]],decls:42,vars:27,consts:[[1,"layout-row","align-end","gap-2px","responsive-column","container","m-b-20"],["mat-raised-button","","color","primary",3,"routerLink",4,"mifosxHasPermission"],["mat-raised-button","","color","warn",3,"click",4,"mifosxHasPermission"],[1,"client-collateral-card"],[1,"content"],[1,"tab-container","mat-typography"],[1,"layout-row","gap-32px","group-details-container","m-b-30"],["mat-table","",1,"mat-elevation-z1","m-b-30",3,"dataSource"],["matColumnDef","ID"],["mat-header-cell","",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","Last Repayment"],["matColumnDef","Remaining Amount"],["matColumnDef","Last Repayment Date"],["mat-header-row","",4,"matHeaderRowDef"],["mat-row","",4,"matRowDef","matRowDefColumns"],["mat-raised-button","","color","primary",3,"routerLink"],["icon","edit",1,"m-r-10"],["mat-raised-button","","color","warn",3,"click"],["icon","trash",1,"m-r-10"],["mat-header-cell",""],["mat-cell",""],["mat-header-row",""],["mat-row",""]],template:function(a,p){a&1&&(l(0,"div",0),f(1,Ht,4,5,"button",1)(2,kt,4,3,"button",2),n(),l(3,"mat-card",3)(4,"mat-card-content",4),o(5,"\\ "),l(6,"div",5)(7,"h3"),o(8),r(9,"translate"),n(),l(10,"div",6)(11,"p"),o(12),r(13,"translate"),u(14,"br"),o(15),r(16,"translate"),u(17,"br"),o(18),r(19,"translate"),u(20,"br"),o(21),r(22,"translate"),u(23,"br"),n()(),l(24,"h3"),o(25),r(26,"translate"),n(),l(27,"table",7),_(28,8),f(29,jt,3,3,"th",9)(30,$t,2,1,"td",10),x(),_(31,11),f(32,Gt,3,3,"th",9)(33,Ut,2,1,"td",10),x(),_(34,12),f(35,Qt,3,3,"th",9)(36,zt,3,3,"td",10),x(),_(37,13),f(38,Jt,3,3,"th",9)(39,Kt,3,3,"td",10),x(),f(40,Wt,1,0,"tr",14)(41,Xt,1,0,"tr",15),n()()()()),a&2&&(i(),C("mifosxHasPermission","UPDATE_CLIENT_COLLATERAL_PRODUCT"),i(),C("mifosxHasPermission","DELETE_CLIENT_COLLATERAL_PRODUCT"),i(6),c(m(9,15,"labels.heading.Client Collateral Details")),i(4),b(" ",m(13,17,"labels.inputs.name"),": ",p.clientCollateralData.name),i(3),b(" ",m(16,19,"labels.inputs.Quantity"),": ",p.clientCollateralData.quantity),i(3),b(" ",m(19,21,"labels.inputs.Total Value"),": ",p.clientCollateralData.total),i(3),b(" ",m(22,23,"labels.inputs.Total Collateral Value"),": ",p.clientCollateralData.totalCollateral),i(4),c(m(26,25,"labels.heading.Transaction Details")),i(2),C("dataSource",p.clientCollateralData.loanTransactionData),i(13),C("matHeaderRowDef",p.collateralColumns),i(),C("matRowDefColumns",p.collateralColumns))},dependencies:[v,V,B,L,N,O,ft,ht,vt,xt,_t,Dt,gt,Mt,yt,It,St,wt,Ct,F,Et],styles:[".client-collateral-card[_ngcontent-%COMP%]{margin:0 auto;max-width:80rem;width:90%;padding:0}.tab-container[_ngcontent-%COMP%]{padding:1%;margin:1%}.tab-container[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{margin:1% auto}.tab-container[_ngcontent-%COMP%] .group-details-container[_ngcontent-%COMP%]{border:1px solid;padding:1%}.tab-container[_ngcontent-%COMP%] .action-button[_ngcontent-%COMP%]{margin-left:auto}.tab-container[_ngcontent-%COMP%] table[_ngcontent-%COMP%]{width:100%}.tab-container[_ngcontent-%COMP%] table[_ngcontent-%COMP%] .account-action-button[_ngcontent-%COMP%]{min-width:26px;padding:0 6px;margin:4px;line-height:25px}.tab-container[_ngcontent-%COMP%] table[_ngcontent-%COMP%] tr.select-row[_ngcontent-%COMP%]:hover, .tab-container[_ngcontent-%COMP%] i[_ngcontent-%COMP%]:hover{cursor:pointer}"]})}}return t})();var q=(()=>{class t{constructor(){this.collateralsService=d(g)}resolve(e){let a=e.parent.paramMap.get("clientId"),p=e.parent.paramMap.get("collateralId");return this.collateralsService.getClientCollateral(a,p)}static{this.\u0275fac=function(a){return new(a||t)}}static{this.\u0275prov=y({token:t,factory:t.\u0275fac})}}return t})();var Yt=()=>["../../"];function Zt(t,s){t&1&&(l(0,"mat-error"),o(1),r(2,"translate"),r(3,"translate"),l(4,"strong"),o(5),r(6,"translate"),n()()),t&2&&(i(),b(" ",m(2,3,"labels.inputs.Quantity")," ",m(3,5,"labels.commons.is")," "),i(4),c(m(6,7,"labels.commons.required")))}var H=(()=>{class t{constructor(){this.formBuilder=d(mt),this.route=d(P),this.router=d(T),this.settingsService=d(Z),this.collateralService=d(g),this.route.data.subscribe(e=>{this.collateralDetails=e.clientCollateralData}),this.clientId=this.route.parent.snapshot.params.clientId}ngOnInit(){this.createClientCollateralForm()}createClientCollateralForm(){this.clientCollateralForm=this.formBuilder.group({quantity:["",et.required],name:[{value:"",disabled:!0}],total:[{value:"",disabled:!0}],totalCollateral:[{value:"",disabled:!0}]}),this.clientCollateralForm.patchValue({name:this.collateralDetails.name,quantity:this.collateralDetails.quantity,total:this.collateralDetails.total,totalCollateral:this.collateralDetails.totalCollateral})}submit(){let e=this.collateralDetails.id,a=this.clientCollateralForm.value.quantity,p=this.settingsService.language.code,M={quantity:a,locale:p};this.collateralService.updateClientCollateral(this.clientId,e,M).subscribe(()=>{this.router.navigate(["../"],{relativeTo:this.route})})}static{this.\u0275fac=function(a){return new(a||t)}}static{this.\u0275cmp=I({type:t,selectors:[["mifosx-edit-collateral"]],decls:34,vars:23,consts:[[1,"container"],[3,"ngSubmit","formGroup"],[1,"layout-column"],["matInput","","required","","formControlName","name"],["matInput","","required","","formControlName","quantity"],["matInput","","required","","formControlName","total"],["matInput","","required","","formControlName","totalCollateral"],[1,"layout-row","layout-xs-column","layout-align-center","gap-5px"],["type","button","mat-raised-button","",3,"routerLink"],["mat-raised-button","","color","primary",3,"disabled"]],template:function(a,p){a&1&&(l(0,"div",0)(1,"mat-card")(2,"form",1),E("ngSubmit",function(){return p.submit()}),l(3,"mat-card-content")(4,"div",2)(5,"div",2)(6,"mat-form-field")(7,"mat-label"),o(8),r(9,"translate"),n(),u(10,"input",3),n(),l(11,"mat-form-field")(12,"mat-label"),o(13),r(14,"translate"),n(),u(15,"input",4),Q(16,Zt,7,9,"mat-error"),n(),l(17,"mat-form-field")(18,"mat-label"),o(19),r(20,"translate"),n(),u(21,"input",5),n(),l(22,"mat-form-field")(23,"mat-label"),o(24),r(25,"translate"),n(),u(26,"input",6),n()()()(),l(27,"mat-card-actions",7)(28,"button",8),o(29),r(30,"translate"),n(),l(31,"button",9),o(32),r(33,"translate"),n()()()()()),a&2&&(i(2),C("formGroup",p.clientCollateralForm),i(6),c(m(9,10,"labels.inputs.name")),i(5),c(m(14,12,"labels.inputs.Quantity")),i(3),z(p.clientCollateralForm.controls.quantity.hasError("required")?16:-1),i(3),c(m(20,14,"labels.inputs.Total")),i(5),c(m(25,16,"labels.inputs.Total Collateral Value")),i(4),C("routerLink",R(22,Yt)),i(),h(" ",m(30,18,"labels.buttons.Cancel")," "),i(2),C("disabled",!p.clientCollateralForm.valid),i(),h(" ",m(33,20,"labels.buttons.Submit")," "))},dependencies:[v,V,nt,tt,it,at,rt,lt,ot,B,L,N,pt,dt,st,ct,ut,O,F],styles:[".container[_ngcontent-%COMP%]{width:37rem}"]})}}return t})();var te=[{path:"",data:{title:"Collateral",breadcrumb:"Collateral",routeParamBreadcrumb:!1},children:[{path:":collateralId",data:{title:"Collateral View",routeParamBreadcrumb:"collateralId"},children:[{path:"",component:A,resolve:{clientCollateralData:q}},{path:"edit",data:{title:"edit",routeParamBreadcrumb:"edit"},component:H,resolve:{clientCollateralData:q}}]}]}],Bt=(()=>{class t{static{this.\u0275fac=function(a){return new(a||t)}}static{this.\u0275mod=w({type:t})}static{this.\u0275inj=S({providers:[q],imports:[j.forChild(te),j]})}}return t})();var Je=(()=>{class t{static{this.\u0275fac=function(a){return new(a||t)}}static{this.\u0275mod=w({type:t})}static{this.\u0275inj=S({imports:[v,Bt,Tt,Pt,Rt,A,H]})}}return t})();export{Je as CollateralsModule}; diff --git a/browser/fixed-deposits.module-C3I467L6.js b/browser/fixed-deposits.module-47AX7ZXR.js similarity index 99% rename from browser/fixed-deposits.module-C3I467L6.js rename to browser/fixed-deposits.module-47AX7ZXR.js index 74888723c..bd4ff4375 100644 --- a/browser/fixed-deposits.module-C3I467L6.js +++ b/browser/fixed-deposits.module-47AX7ZXR.js @@ -1,2 +1,2 @@ -import{a as sn}from"./chunk-72WDWMOP.js";import{a as yi,b as Ii}from"./chunk-YJQVOBFM.js";import{a as cn}from"./chunk-SJ6K46JC.js";import{$d as ke,$f as Zi,Ad as Gi,Bc as Xt,Bd as nt,Bg as rn,Cc as Be,Cd as Ct,Cf as Ki,Da as b,Dc as Ut,Df as Qi,Ea as P,Eb as se,Ec as Zt,Ef as Yi,Fb as y,Fc as te,Fd as Pt,G as Gt,Ga as F,Gc as ee,Gd as ot,H as He,Hc as ie,Hd as Ft,Ia as M,Id as dt,Ja as _,Jd as At,Jg as ei,K as x,Kg as pn,L as S,Ld as Ot,M as A,Mc as w,Na as ht,Nd as me,Oa as vt,Ob as le,Od as Mt,Pa as Dt,Pd as Tt,Qa as k,Qd as St,Qe as Ui,Rb as Ni,Rc as et,Rd as Ue,Sc as U,Sd as yt,T as Jt,Td as It,Ua as a,Ud as de,Uf as Ji,Va as m,Wa as u,Wc as rt,Xa as T,Xc as V,Xd as ut,Ya as ce,Yc as it,Zb as Ie,Zc as pt,Ze as ji,Zf as Xi,_ as Ri,_b as Fe,_d as he,_e as Wi,_f as ue,ac as oe,ad as Z,ag as tn,bb as _t,bc as ae,bf as Ye,bg as en,ca as i,cc as we,cd as ct,cf as Je,da as $e,dd as jt,de as Re,df as Xe,eb as R,ed as zi,ef as Ze,fb as Ge,fd as st,ff as ne,fg as $t,ge as je,gf as Wt,hb as r,hc as N,he as We,hf as wt,ib as c,ic as Vi,id as lt,ie as Ke,if as Et,ja as O,jb as E,jf as Bt,ka as Le,kc as W,lb as at,lc as tt,ld as gt,lf as kt,mc as qi,mf as Rt,na as C,nc as Oi,ne as Qe,of as Nt,pa as Te,pd as mt,pf as Vt,pg as nn,qb as Se,qc as Ee,qg as ti,ra as h,rc as B,rd as I,rf as qt,rg as Ne,sa as v,sb as Ae,sd as Y,sf as zt,ta as $,tb as Oe,td as Hi,ua as L,ud as $i,uf as Ht,ug as on,va as G,vd as xt,wa as d,xa as n,xd as bt,xf as ve,ya as o,yd as Li,za as g,zb as ye,zg as an}from"./chunk-OX7PN44D.js";import{a as H,b as X}from"./chunk-PHUH23IY.js";var mn=()=>({confirm:!0}),ii=(()=>{class t{constructor(){this.dialogRef=x(Xt)}static{this.\u0275fac=function(l){return new(l||t)}}static{this.\u0275cmp=O({type:t,selectors:[["mifosx-calculate-interest-dialog"]],decls:14,vars:14,consts:[["mat-dialog-title",""],["mat-dialog-content",""],["align","end"],["mat-raised-button","","mat-dialog-close",""],["mat-raised-button","","color","primary",3,"mat-dialog-close"]],template:function(l,p){l&1&&(n(0,"h1",0),a(1),r(2,"translate"),o(),n(3,"div",1)(4,"p"),a(5),r(6,"translate"),o()(),n(7,"mat-dialog-actions",2)(8,"button",3),a(9),r(10,"translate"),o(),n(11,"button",4),a(12),r(13,"translate"),o()()),l&2&&(i(),m(c(2,5,"labels.heading.Calculate Interest")),i(4),u("",c(6,7,"labels.text.Are you sure you want to calculate interest")," ?"),i(4),m(c(10,9,"labels.buttons.Cancel")),i(2),d("mat-dialog-close",R(13,mn)),i(),u(" ",c(13,11,"labels.buttons.Confirm")," "))},dependencies:[y,I,B,te,ee,ie,Zt,w],encapsulation:2})}}return t})();var dn=()=>({confirm:!0}),ni=(()=>{class t{constructor(){this.dialogRef=x(Xt)}static{this.\u0275fac=function(l){return new(l||t)}}static{this.\u0275cmp=O({type:t,selectors:[["mifosx-post-interest-dialog"]],decls:14,vars:14,consts:[["mat-dialog-title",""],["mat-dialog-content",""],["align","end"],["mat-raised-button","","mat-dialog-close",""],["mat-raised-button","","color","primary",3,"mat-dialog-close"]],template:function(l,p){l&1&&(n(0,"h1",0),a(1),r(2,"translate"),o(),n(3,"div",1)(4,"p"),a(5),r(6,"translate"),o()(),n(7,"mat-dialog-actions",2)(8,"button",3),a(9),r(10,"translate"),o(),n(11,"button",4),a(12),r(13,"translate"),o()()),l&2&&(i(),m(c(2,5,"labels.heading.Post Interest")),i(4),u("",c(6,7,"labels.text.Are you sure you want to post interest")," ?"),i(4),m(c(10,9,"labels.buttons.Cancel")),i(2),d("mat-dialog-close",R(13,dn)),i(),u(" ",c(13,11,"labels.buttons.Confirm")," "))},dependencies:[y,I,B,te,ee,ie,Zt,w],encapsulation:2})}}return t})();var un=()=>({confirm:!0}),ze=(()=>{class t{constructor(){this.dialogRef=x(Xt),this.data=x(Be)}static{this.\u0275fac=function(l){return new(l||t)}}static{this.\u0275cmp=O({type:t,selectors:[["mifosx-toggle-withhold-tax-dialog"]],decls:17,vars:25,consts:[["mat-dialog-title",""],["mat-dialog-content",""],["align","end"],["mat-raised-button","","mat-dialog-close",""],["mat-raised-button","",3,"color","mat-dialog-close"]],template:function(l,p){l&1&&(n(0,"h1",0),a(1),r(2,"translate"),r(3,"translate"),o(),n(4,"div",1)(5,"p"),a(6),r(7,"translate"),r(8,"translate"),r(9,"translate"),o()(),n(10,"mat-dialog-actions",2)(11,"button",3),a(12),r(13,"translate"),o(),n(14,"button",4),a(15),r(16,"translate"),o()()),l&2&&(i(),T(" ",c(2,10,p.data.isEnable?"labels.heading.Enable":"labels.heading.Disable")," ",c(3,12,"labels.heading.Withhold Tax"),` -`),i(5),ce(" ",c(7,14,"labels.text.Are you sure you want to")," ",c(8,16,p.data.isEnable?"labels.heading.Enable":"labels.heading.Disable")," ",c(9,18,"labels.text.withhold tax for this account")," ? "),i(6),m(c(13,20,"labels.buttons.Cancel")),i(2),d("color",_t(p.data.isEnable?"accent":"warn"))("mat-dialog-close",R(24,un)),i(),u(" ",c(16,22,"labels.buttons.Confirm")," "))},dependencies:[y,I,B,te,ee,ie,Zt,w],encapsulation:2})}}return t})();var oi=class{constructor(s){this.setOptions(s),this.setButtons(s)}get singleButtons(){return this.buttonsArray}get options(){return this.optionArray}setButtons(s){switch(s){case"Active":this.buttonsArray=[{name:"Premature Close",icon:"fa fa-arrow-left"},{name:"Calculate Interest",icon:"fa fa-table"},{name:"Undo Activation",icon:"fa fa-undo"}];break;case"Matured":this.buttonsArray=[{name:"Close",icon:"fa fa-arrow-right"},{name:"Calculate Interest",icon:"fa fa-table"}];break;case"Submitted and pending approval":this.buttonsArray=[{name:"Modify Application",icon:"fa fa-pencil "},{name:"Approve",icon:"fa fa-check"}];break;case"Approved":this.buttonsArray=[{name:"Undo Approval",icon:"fa fa-undo"},{name:"Activate",icon:"fa fa-check"}];break;default:this.buttonsArray=[]}}setOptions(s){switch(s){case"Active":case"Matured":this.optionArray=[{name:"Post Interest"},{name:"Add Charge"}];break;case"Submitted and pending approval":this.optionArray=[{name:"Reject"},{name:"Withdrawn by Client"},{name:"Add Charge"},{name:"Delete"}];break;case"Approved":default:this.optionArray=[]}}addOption(s){this.optionArray.push(s)}};var j=(()=>{class t{constructor(){this.http=x(Ni)}getFixedDepositsAccountData(e){let l=new le().set("associations","all");return this.http.get(`/fixeddepositaccounts/${e}`,{params:l})}deleteFixedDepositsAccount(e){return this.http.delete(`/fixeddepositaccounts/${e}`)}executeFixedDepositsAccountCommand(e,l,p){let f=new le().set("command",l);return this.http.post(`/fixeddepositaccounts/${e}`,p,{params:f})}getFixedDepositsAccountTransaction(e,l){return this.http.get(`/fixeddepositaccounts/${e}/transactions/${l}`)}executeFixedDepositsAccountTransactionsCommand(e,l,p,f){let D=new le().set("command",l);return this.http.post(`/fixeddepositaccounts/${e}/transactions/${f}`,p,{params:D})}getFixedDepositsAccountClosureTemplate(e){let l=new le().set("command","close");return this.http.get(`/fixeddepositaccounts/${e}/template`,{params:l})}getFixedDepositsAccountTransactionTemplate(e){return this.http.get(`/fixeddepositaccounts/${e}/transactions/template`)}getFixedDepositsAccountTemplate(e,l){let p=new le().set("clientId",e);return p=l?p.set("productId",l):p,this.http.get("/fixeddepositaccounts/template",{params:p})}getFixedDepositsAccountAndTemplate(e){let l=new le().set("associations","charges,+linkedAccount").set("template","true");return this.http.get(`/fixeddepositaccounts/${e}`,{params:l})}createFixedDepositAccount(e){return this.http.post("/fixeddepositaccounts",e)}updateFixedDepositAccount(e,l){return this.http.put(`/fixeddepositaccounts/${e}`,l)}getStandingInstructions(e,l,p,f,D){let q=new le().set("clientId",e).set("clientName",l).set("fromAccountId",p).set("fromAccountType","2").set("locale",f).set("dateFormat",D);return this.http.get("/standinginstructions",{params:q})}static{this.\u0275fac=function(l){return new(l||t)}}static{this.\u0275prov=Gt({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();var fn=()=>["./general"],gn=()=>["./interest-rate-chart"],xn=()=>["./charges"],Cn=()=>["./transactions"],_n=()=>["./standing-instructions"],hn=t=>["./datatables",t];function vn(t,s){if(t&1&&(n(0,"span",21),g(1,"mifosx-account-number",18),o()),t&2){let e=_();i(),d("accountNo",_t(e.fixedDepositsAccountData.clientAccountNo))}}function Dn(t,s){if(t&1&&(n(0,"div",22)(1,"h3",31),a(2),r(3,"translate"),o(),n(4,"table",32)(5,"tbody")(6,"tr")(7,"td",33),a(8),r(9,"translate"),o(),n(10,"td",34),a(11),r(12,"currency"),o()(),n(13,"tr")(14,"td",33),a(15),r(16,"translate"),o(),n(17,"td",34),a(18),r(19,"currency"),o()()()()()),t&2){let e=_();i(2),m(c(3,5,"labels.heading.Account Overview")),i(6),m(c(9,7,"labels.inputs.Current Balance")),i(3),u(" ",at(12,9,e.fixedDepositsAccountData.summary.accountBalance,e.currency.code,"symbol-narrow","1.2-2")," "),i(4),m(c(16,14,"labels.inputs.Deposit Amount")),i(3),u(" ",at(19,16,e.fixedDepositsAccountData.depositAmount,e.currency.code,"symbol-narrow","1.2-2")," ")}}function bn(t,s){if(t&1){let e=F();n(0,"button",35),M("click",function(){let p=S(e).$implicit,f=_();return A(f.doAction(p.name))}),g(1,"i",36),a(2),r(3,"translateKey"),o()}if(t&2){let e=s.$implicit;i(),d("ngClass",_t(e.icon)),i(),u(" ",E(3,3,e.name,"menus")," ")}}function Pn(t,s){if(t&1){let e=F();n(0,"span")(1,"button",35),M("click",function(){let p=S(e).$implicit,f=_(2);return A(f.doAction(p.name))}),a(2),r(3,"translateKey"),o()()}if(t&2){let e=s.$implicit;i(2),m(E(3,1,e.name,"menus"))}}function Mn(t,s){if(t&1&&(n(0,"button",37),a(1),r(2,"translateKey"),o(),n(3,"mat-menu",null,5),L(5,Pn,4,4,"span",null,$),o()),t&2){let e=k(4),l=_();d("matMenuTriggerFor",e),i(),m(E(2,2,"More","menus")),i(4),G(l.buttonConfig.options)}}function Tn(t,s){if(t&1&&(n(0,"span")(1,"a",30,6),a(3),r(4,"translate"),o()()),t&2){let e=k(2);i(),d("routerLink",R(5,Cn))("active",e.isActive),i(2),u(" ",c(4,3,"labels.inputs.Transactions")," ")}}function Sn(t,s){if(t&1&&(n(0,"a",30,7),a(2),r(3,"translate"),o()),t&2){let e=k(1);d("routerLink",R(5,_n))("active",e.isActive),i(2),u(" ",c(3,3,"labels.inputs.Standing Instructions")," ")}}function An(t,s){if(t&1&&(n(0,"a",30,8),a(2),o()),t&2){let e=k(1),l=_().$implicit;d("routerLink",Ge(3,hn,l.registeredTableName))("active",e.isActive),i(2),u(" ",l.registeredTableName," ")}}function On(t,s){if(t&1&&C(0,An,3,5,"a",38),t&2){let e=s.$implicit;d("mifosxHasPermission","READ_"+e.registeredTableName)}}var ai=(()=>{class t{constructor(){this.route=x(N),this.router=x(W),this.fixedDepositsService=x(j),this.savingsService=x($t),this.dialog=x(Ut),this.showTransactions=!1,this.route.data.subscribe(e=>{this.fixedDepositsAccountData=e.fixedDepositsAccountData,this.savingsDatatables=e.savingsDatatables,this.currency=this.fixedDepositsAccountData.currency;let l=e.fixedDepositsAccountData.status;this.showTransactions=l.id>=300}),this.router.url.includes("clients")?this.entityType="Client":this.router.url.includes("groups")?this.entityType="Group":this.router.url.includes("centers")&&(this.entityType="Center")}ngOnInit(){this.setConditionalButtons()}setConditionalButtons(){let e=this.fixedDepositsAccountData.status.value;this.buttonConfig=new oi(e),this.fixedDepositsAccountData.taxGroup&&e==="Active"&&(this.fixedDepositsAccountData.withHoldTax?this.buttonConfig.addOption({name:"Disable Withhold Tax"}):this.buttonConfig.addOption({name:"Enable Withhold Tax"}))}reload(){let e=this.fixedDepositsAccountData.clientId,l=this.router.url;this.router.navigateByUrl(`/clients/${e}/fixed-deposits-accounts`,{skipLocationChange:!0}).then(()=>this.router.navigate([l]))}doAction(e){switch(e){case"Approve":case"Reject":case"Activate":case"Close":case"Undo Approval":case"Undo Activation":case"Add Charge":case"Withdrawn by Client":case"Premature Close":this.router.navigate([`actions/${e}`],{relativeTo:this.route});break;case"Modify Application":this.router.navigate(["edit"],{relativeTo:this.route});break;case"Delete":this.deleteFixedDepositsAccount();break;case"Calculate Interest":this.calculateInterest();break;case"Post Interest":this.postInterest();break;case"Enable Withhold Tax":this.enableWithHoldTax();break;case"Disable Withhold Tax":this.disableWithHoldTax();break}}deleteFixedDepositsAccount(){this.dialog.open(ke,{data:{deleteContext:`fixed deposit account with id: ${this.fixedDepositsAccountData.id}`}}).afterClosed().subscribe(l=>{l.delete&&this.fixedDepositsService.deleteFixedDepositsAccount(this.fixedDepositsAccountData.id).subscribe(()=>{this.router.navigate(["../../"],{relativeTo:this.route})})})}calculateInterest(){this.dialog.open(ii).afterClosed().subscribe(l=>{l.confirm&&this.fixedDepositsService.executeFixedDepositsAccountCommand(this.fixedDepositsAccountData.id,"calculateInterest",{}).subscribe(()=>{this.reload()})})}postInterest(){this.dialog.open(ni).afterClosed().subscribe(l=>{l.confirm&&this.fixedDepositsService.executeFixedDepositsAccountCommand(this.fixedDepositsAccountData.id,"postInterest",{}).subscribe(()=>{this.reload()})})}enableWithHoldTax(){this.dialog.open(ze,{data:{isEnable:!0}}).afterClosed().subscribe(l=>{l.confirm&&this.savingsService.executeSavingsAccountUpdateCommand(this.fixedDepositsAccountData.id,"updateWithHoldTax",{withHoldTax:!0}).subscribe(()=>{this.reload()})})}disableWithHoldTax(){this.dialog.open(ze,{data:{isEnable:!1}}).afterClosed().subscribe(l=>{l.confirm&&this.savingsService.executeSavingsAccountUpdateCommand(this.fixedDepositsAccountData.id,"updateWithHoldTax",{withHoldTax:!1}).subscribe(()=>{this.reload()})})}static{this.\u0275fac=function(l){return new(l||t)}}static{this.\u0275cmp=O({type:t,selectors:[["mifosx-fixed-deposit-account-view"]],decls:54,vars:44,consts:[["accountMenu","matMenu"],["general","routerLinkActive"],["IRC","routerLinkActive"],["charges","routerLinkActive"],["tabPanel",""],["More","matMenu"],["transactions","routerLinkActive"],["standingInstructions","routerLinkActive"],["datatable","routerLinkActive"],[1,"account-card"],[1,"header","layout-column"],[1,"header-title-group"],[1,"profile-image-container"],["mat-card-md-image","",1,"profile-image",3,"matTooltip","src"],[1,"mat-typography","account-card-title"],[1,"layout-row","responsive-column"],[1,"flex-60"],[1,"fa","fa-stop",3,"ngClass","matTooltip"],[3,"accountNo"],[1,"account-overview"],[1,"m-r-10"],[1,"m-l-10"],[1,"flex-30"],[1,"flex-5"],["mat-icon-button","","aria-label","Fixed Deposit account actions","yPosition","below",3,"matMenuTriggerFor"],["matListIcon","",1,"actions-menu"],["icon","bars","size","sm"],["mat-menu-item",""],[1,"content"],["mat-tab-nav-bar","",1,"navigation-tabs",3,"tabPanel"],["mat-tab-link","","routerLinkActive","",3,"routerLink","active"],[1,"flex-100"],[1,"account-overview","flex-100"],[1,"flex-70"],[1,"r-amount","flex-30"],["mat-menu-item","",3,"click"],[3,"ngClass"],["mat-menu-item","",3,"matMenuTriggerFor"],["mat-tab-link","","routerLinkActive","",3,"routerLink","active",4,"mifosxHasPermission"]],template:function(l,p){if(l&1&&(n(0,"mat-card",9)(1,"mat-card-header",10)(2,"mat-card-title-group",11)(3,"div",12)(4,"div"),g(5,"img",13),r(6,"translate"),o()(),n(7,"div",14)(8,"mat-card-title")(9,"div",15)(10,"div",16)(11,"h3"),g(12,"i",17),r(13,"statusLookup"),a(14),r(15,"translate"),g(16,"mifosx-account-number",18),o(),n(17,"span",19)(18,"span",20),a(19),r(20,"translate"),o(),a(21),h(22,vn,2,2,"span",21),o()(),h(23,Dn,20,21,"div",22),n(24,"div",23)(25,"button",24)(26,"mat-icon",25),g(27,"fa-icon",26),o()()()()()(),n(28,"mat-menu",null,0),L(30,bn,4,6,"button",27,$),h(32,Mn,7,5),o()()(),n(33,"mat-card-content",28)(34,"nav",29)(35,"a",30,1),a(37),r(38,"translate"),o(),n(39,"a",30,2),a(41),r(42,"translate"),o(),h(43,Tn,5,6,"span"),n(44,"a",30,3),a(46),r(47,"translate"),o(),h(48,Sn,4,6,"a",30),L(49,On,1,1,"a",30,$),o(),n(51,"mat-tab-nav-panel",null,4),g(53,"router-outlet"),o()()()),l&2){let f=k(29),D=k(36),q=k(40),re=k(45),pe=k(52);i(5),d("matTooltip",_t(c(6,27,"tooltips.Fixed Deposits Account")))("src","assets/images/fd_account_placeholder.png",Ri),i(7),d("ngClass",c(13,29,p.fixedDepositsAccountData.status.code))("matTooltip",p.fixedDepositsAccountData.status.value),i(2),T(" ",c(15,31,"labels.inputs.Fixed Deposit Product")," : ",p.fixedDepositsAccountData.depositProductName," "),i(2),d("accountNo",_t(p.fixedDepositsAccountData.accountNo)),i(3),u("",c(20,33,"labels.text."+p.entityType)," :"),i(2),u(" ",p.fixedDepositsAccountData.clientName||p.fixedDepositsAccountData.groupName," "),i(),v(p.fixedDepositsAccountData.clientAccountNo?22:-1),i(),v(!p.fixedDepositsAccountData.status.rejected&&!p.fixedDepositsAccountData.status.submittedAndPendingApproval?23:-1),i(2),d("matMenuTriggerFor",f),i(5),G(p.buttonConfig.singleButtons),i(2),v(p.buttonConfig.options.length?32:-1),i(2),d("tabPanel",pe),i(),d("routerLink",R(41,fn))("active",D.isActive),i(2),u(" ",c(38,35,"labels.inputs.General")," "),i(2),d("routerLink",R(42,gn))("active",q.isActive),i(2),u(" ",c(42,37,"labels.inputs.Interest Rate Chart")," "),i(2),v(p.showTransactions?43:-1),i(),d("routerLink",R(43,xn))("active",re.isActive),i(2),u(" ",c(47,39,"labels.inputs.Charges")," "),i(2),v(p.fixedDepositsAccountData.clientId?48:-1),i(),G(p.savingsDatatables)}},dependencies:[y,Se,I,tt,Y,xt,de,Li,$i,Gi,me,Hi,an,Ee,Ke,Qe,ut,We,je,Ki,Qi,qi,Yi,Vi,se,w,It,Zi],encapsulation:2})}}return t})();function yn(t,s){t&1&&(n(0,"th",17),a(1),r(2,"translate"),o()),t&2&&(i(),m(c(2,1,"labels.inputs.Period")))}function In(t,s){if(t&1&&(n(0,"td",18),a(1),r(2,"translateKey"),o()),t&2){let e=s.$implicit;i(),ce(" ",e.fromPeriod," - ",e.toPeriod,"\xA0",E(2,3,e.periodType.value,"catalogs")," ")}}function Fn(t,s){t&1&&(n(0,"th",17),a(1),r(2,"translate"),o()),t&2&&(i(),m(c(2,1,"labels.inputs.Amount Range")))}function wn(t,s){if(t&1&&(n(0,"td",18),a(1),r(2,"formatNumber"),r(3,"formatNumber"),o()),t&2){let e=s.$implicit;i(),T(" ",c(2,2,e.amountRangeFrom)," - ",c(3,4,e.amountRangeTo)," ")}}function En(t,s){t&1&&(n(0,"th",17),a(1),r(2,"translate"),o()),t&2&&(i(),m(c(2,1,"labels.inputs.Interest")))}function Bn(t,s){if(t&1&&(n(0,"td",18),a(1),r(2,"formatNumber"),o()),t&2){let e=s.$implicit;i(),u("",c(2,1,e.annualInterestRate)," %")}}function kn(t,s){t&1&&(n(0,"th",17),a(1),r(2,"translate"),o()),t&2&&(i(),m(c(2,1,"labels.inputs.Description")))}function Rn(t,s){if(t&1&&(n(0,"td",18),a(1),o()),t&2){let e=s.$implicit;i(),m(e.description)}}function Nn(t,s){t&1&&(n(0,"th",17),a(1),r(2,"translate"),o()),t&2&&(i(),m(c(2,1,"labels.inputs.Actions")))}function Vn(t,s){t&1&&(n(0,"span"),g(1,"fa-icon",21),a(2),r(3,"translate"),o()),t&2&&(i(2),u(" ",c(3,1,"labels.buttons.View Incentives")," "))}function qn(t,s){t&1&&(n(0,"span"),g(1,"fa-icon",22),a(2),r(3,"translate"),o()),t&2&&(i(2),u(" ",c(3,1,"labels.buttons.Hide Incentives")," "))}function zn(t,s){if(t&1){let e=F();n(0,"td",18)(1,"button",19),M("click",function(){let p=S(e).dataIndex,f=_();return A(f.expandChartSlabIndex=f.expandChartSlabIndex===p?null:p)}),C(2,Vn,4,3,"span",20)(3,qn,4,3,"span",20),o()()}if(t&2){let e=s.dataIndex,l=_();i(2),d("ngIf",l.expandChartSlabIndex!==e),i(),d("ngIf",l.expandChartSlabIndex===e)}}function Hn(t,s){t&1&&(n(0,"th",17),a(1),r(2,"translate"),o()),t&2&&(i(),m(c(2,1,"labels.inputs.Entity Type")))}function $n(t,s){if(t&1&&(n(0,"td",18),a(1),o()),t&2){let e=s.$implicit;i(),u(" ",e.entityType.value," ")}}function Ln(t,s){t&1&&(n(0,"th",17),a(1),r(2,"translate"),o()),t&2&&(i(),m(c(2,1,"labels.inputs.Attribute Name")))}function Gn(t,s){if(t&1&&(n(0,"td",18),a(1),o()),t&2){let e=s.$implicit;i(),u(" ",e.attributeName.value," ")}}function Un(t,s){t&1&&(n(0,"th",17),a(1),r(2,"translate"),o()),t&2&&(i(),m(c(2,1,"labels.inputs.Condition Type")))}function jn(t,s){if(t&1&&(n(0,"td",18),a(1),r(2,"titlecase"),o()),t&2){let e=s.$implicit;i(),u(" ",c(2,1,e.conditionType.value)," ")}}function Wn(t,s){t&1&&(n(0,"th",17),a(1),r(2,"translate"),o()),t&2&&(i(),m(c(2,1,"labels.inputs.Attribute Value")))}function Kn(t,s){if(t&1&&(n(0,"td",35),a(1),o()),t&2){let e=s.$implicit;d("ngSwitch",e.attributeName),i(),u(" ",e.attributeValueDesc," ")}}function Qn(t,s){t&1&&(n(0,"th",17),a(1),r(2,"translate"),o()),t&2&&(i(),m(c(2,1,"labels.inputs.Incentive Type")))}function Yn(t,s){if(t&1&&(n(0,"td",18),a(1),o()),t&2){let e=s.$implicit;i(),u(" ",e.incentiveType.value," ")}}function Jn(t,s){t&1&&(n(0,"th",17),a(1),r(2,"translate"),o()),t&2&&(i(),m(c(2,1,"labels.inputs.Interest")))}function Xn(t,s){if(t&1&&(n(0,"td",18),a(1),r(2,"formatNumber"),o()),t&2){let e=s.$implicit;i(),u(" ",c(2,1,e.amount)," ")}}function Zn(t,s){t&1&&g(0,"tr",36)}function to(t,s){t&1&&g(0,"tr",37)}function eo(t,s){if(t&1&&(n(0,"table",27),b(1,28),C(2,Hn,3,3,"th",7)(3,$n,2,1,"td",8),P(),b(4,29),C(5,Ln,3,3,"th",7)(6,Gn,2,1,"td",8),P(),b(7,30),C(8,Un,3,3,"th",7)(9,jn,3,3,"td",8),P(),b(10,31),C(11,Wn,3,3,"th",7)(12,Kn,2,2,"td",32),P(),b(13,33),C(14,Qn,3,3,"th",7)(15,Yn,2,1,"td",8),P(),b(16,34),C(17,Jn,3,3,"th",7)(18,Xn,3,3,"td",8),P(),C(19,Zn,1,0,"tr",14)(20,to,1,0,"tr",15),o()),t&2){let e=_().$implicit,l=_();d("dataSource",e.incentives),i(19),d("matHeaderRowDef",l.incentivesDisplayedColumns),i(),d("matRowDefColumns",l.incentivesDisplayedColumns)}}function io(t,s){if(t&1&&(n(0,"td",18)(1,"div",23)(2,"mat-card",24)(3,"h4",25),a(4),r(5,"translate"),o(),C(6,eo,21,3,"table",26),o()()()),t&2){let e=s.$implicit,l=s.dataIndex,p=_();Te("colspan",p.chartSlabsDisplayedColumns.length),i(),d("@expandChartSlab",l===p.expandChartSlabIndex?"expanded":"collapsed"),i(3),u(" ",c(5,4,"labels.heading.Incentives")," "),i(2),d("ngIf",e.incentives==null?null:e.incentives.length)}}function no(t,s){t&1&&g(0,"tr",36)}function oo(t,s){t&1&&g(0,"tr",37)}function ao(t,s){t&1&&g(0,"tr",38)}var ri=(()=>{class t{constructor(){this.route=x(N),this.interestRateChartData=[],this.chartSlabsDisplayedColumns=["period","amountRange","interest","description","actions"],this.incentivesDisplayedColumns=["entityType","attributeName","conditionType","attributeValue","incentiveType","amount"],this.chartSlabsIncentivesDisplayedColumns=["incentives"],this.route.parent.data.subscribe(e=>{this.interestRateChartData=e.fixedDepositsAccountData.accountChart.chartSlabs})}static{this.\u0275fac=function(l){return new(l||t)}}static{this.\u0275cmp=O({type:t,selectors:[["mifosx-interest-rate-chart-tab"]],decls:29,vars:7,consts:[["chartsTable",""],[1,"tab-container","mat-typography"],[1,"align-start-center"],[1,"m-b-20"],[1,"mat-elevation-z1","m-b-25"],["mat-table","","multiTemplateDataRows","",3,"dataSource"],["matColumnDef","period"],["mat-header-cell","",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","amountRange"],["matColumnDef","interest"],["matColumnDef","description"],["matColumnDef","actions"],["matColumnDef","incentives"],["mat-header-row","",4,"matHeaderRowDef"],["mat-row","",4,"matRowDef","matRowDefColumns"],["mat-row","","class","incentives-row",4,"matRowDef","matRowDefColumns"],["mat-header-cell",""],["mat-cell",""],["mat-button","","color","primary",3,"click"],[4,"ngIf"],["icon","eye",1,"m-r-10"],["icon","eye-slash",1,"m-r-10"],[1,"layout-row-wrap","flex-fill","incentives"],[1,"layout-row-wrap","flex-fill"],[1,"m-b-10","flex-13"],["class","flex-fill mat-elevation-z1","mat-table","",3,"dataSource",4,"ngIf"],["mat-table","",1,"flex-fill","mat-elevation-z1",3,"dataSource"],["matColumnDef","entityType"],["matColumnDef","attributeName"],["matColumnDef","conditionType"],["matColumnDef","attributeValue"],["mat-cell","",3,"ngSwitch",4,"matCellDef"],["matColumnDef","incentiveType"],["matColumnDef","amount"],["mat-cell","",3,"ngSwitch"],["mat-header-row",""],["mat-row",""],["mat-row","",1,"incentives-row"]],template:function(l,p){l&1&&(n(0,"div",1)(1,"div",2)(2,"div",3)(3,"h3"),a(4),r(5,"translate"),o()()(),n(6,"div",4)(7,"table",5,0),b(9,6),C(10,yn,3,3,"th",7)(11,In,3,6,"td",8),P(),b(12,9),C(13,Fn,3,3,"th",7)(14,wn,4,6,"td",8),P(),b(15,10),C(16,En,3,3,"th",7)(17,Bn,3,3,"td",8),P(),b(18,11),C(19,kn,3,3,"th",7)(20,Rn,2,1,"td",8),P(),b(21,12),C(22,Nn,3,3,"th",7)(23,zn,4,2,"td",8),P(),b(24,13),C(25,io,7,6,"td",8),P(),C(26,no,1,0,"tr",14)(27,oo,1,0,"tr",15)(28,ao,1,0,"tr",16),o()()()),l&2&&(i(4),m(c(5,5,"labels.heading.All Interest Rates")),i(3),d("dataSource",p.interestRateChartData),i(19),d("matHeaderRowDef",p.chartSlabsDisplayedColumns),i(),d("matRowDefColumns",p.chartSlabsDisplayedColumns),i(),d("matRowDefColumns",p.chartSlabsIncentivesDisplayedColumns))},dependencies:[y,Ae,Oe,I,Y,B,wt,kt,Bt,Rt,Et,Nt,ut,Vt,zt,qt,Ht,ye,w,It,ue],styles:[".tab-container[_ngcontent-%COMP%]{padding:1%;margin:1%}.tab-container[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{margin:1% auto}.tab-container[_ngcontent-%COMP%] table[_ngcontent-%COMP%]{width:100%}.tab-container[_ngcontent-%COMP%] table[_ngcontent-%COMP%] tr.incentives-row[_ngcontent-%COMP%]{height:0}.tab-container[_ngcontent-%COMP%] table[_ngcontent-%COMP%] tr.incentives-row[_ngcontent-%COMP%] > td[_ngcontent-%COMP%]{padding:0}.tab-container[_ngcontent-%COMP%] table[_ngcontent-%COMP%] tr.incentives-row[_ngcontent-%COMP%] .incentives[_ngcontent-%COMP%]{overflow:hidden}.tab-container[_ngcontent-%COMP%] table[_ngcontent-%COMP%] tr.incentives-row[_ngcontent-%COMP%] .mat-card[_ngcontent-%COMP%]{border-radius:0}"],data:{animation:[Ie("expandChartSlab",[ae("collapsed",oe({height:"0px",minHeight:"0"})),ae("expanded",oe({height:"*"})),we("expanded <=> collapsed",Fe("225ms cubic-bezier(0.4, 0.0, 0.2, 1)"))])]}})}}return t})();var po=t=>["/","journal-entry","view",t];function co(t,s){if(t&1){let e=F();n(0,"div",5)(1,"mat-checkbox",21),M("click",function(){S(e);let p=_();return A(p.hideReversed())}),a(2),r(3,"translate"),o(),n(4,"mat-checkbox",21),M("click",function(){S(e);let p=_();return A(p.hideAccruals())}),a(5),r(6,"translate"),o()()}if(t&2){let e=_();i(),d("formControl",e.hideReversedParam),i(),u(" ",c(3,4,"labels.inputs.Hide Reversed")),i(2),d("formControl",e.hideAccrualsParam),i(),u(" ",c(6,6,"labels.inputs.Hide Accruals"))}}function so(t,s){t&1&&(n(0,"th",22),a(1,"#"),o())}function lo(t,s){if(t&1){let e=F();n(0,"td",23),M("click",function(){let p=S(e).$implicit,f=_();return A(f.showTransactions(p))}),a(1),o()}if(t&2){let e=s.index;i(),u(" ",e+1," ")}}function mo(t,s){t&1&&(n(0,"th",22),a(1),r(2,"translate"),o()),t&2&&(i(),m(c(2,1,"labels.inputs.ID")))}function uo(t,s){if(t&1){let e=F();n(0,"td",24),M("click",function(){let p=S(e).$implicit,f=_();return A(f.showTransactions(p))}),a(1),o()}if(t&2){let e=s.$implicit,l=_();d("ngClass",l.savingsTransactionColor(e)),i(),u(" ",e.id," ")}}function fo(t,s){t&1&&(n(0,"th",22),a(1),r(2,"translate"),o()),t&2&&(i(),m(c(2,1,"labels.inputs.Transaction Date")))}function go(t,s){if(t&1){let e=F();n(0,"td",24),M("click",function(){let p=S(e).$implicit,f=_();return A(f.showTransactions(p))}),a(1),r(2,"dateFormat"),o()}if(t&2){let e=s.$implicit,l=_();d("ngClass",l.savingsTransactionColor(e)),i(),u(" ",c(2,2,e.date)," ")}}function xo(t,s){t&1&&(n(0,"th",22),a(1),r(2,"translate"),o()),t&2&&(i(),m(c(2,1,"labels.inputs.Transaction Type")))}function Co(t,s){if(t&1){let e=F();n(0,"td",24),M("click",function(){let p=S(e).$implicit,f=_();return A(f.showTransactions(p))}),a(1),r(2,"translateKey"),o()}if(t&2){let e=s.$implicit,l=_();d("ngClass",l.savingsTransactionColor(e)),i(),u(" ",E(2,2,e.transactionType.value,"catalogs")," ")}}function _o(t,s){t&1&&(n(0,"th",22),a(1),r(2,"translate"),o()),t&2&&(i(),m(c(2,1,"labels.inputs.Debit")))}function ho(t,s){if(t&1){let e=F();n(0,"td",24),M("click",function(){let p=S(e).$implicit,f=_();return A(f.showTransactions(p))}),a(1),r(2,"formatNumber"),o()}if(t&2){let e=s.$implicit,l=_();d("ngClass",l.savingsTransactionColor(e)),i(),u(" ",l.isDebit(e.transactionType)?c(2,2,e.amount):"N/A"," ")}}function vo(t,s){t&1&&(n(0,"th",22),a(1),r(2,"translate"),o()),t&2&&(i(),m(c(2,1,"labels.inputs.Credit")))}function Do(t,s){if(t&1){let e=F();n(0,"td",24),M("click",function(){let p=S(e).$implicit,f=_();return A(f.showTransactions(p))}),a(1),r(2,"formatNumber"),o()}if(t&2){let e=s.$implicit,l=_();d("ngClass",l.savingsTransactionColor(e)),i(),u(" ",l.isDebit(e.transactionType)?"N/A":c(2,2,e.amount)," ")}}function bo(t,s){t&1&&(n(0,"th",22),a(1),r(2,"translate"),o()),t&2&&(i(),m(c(2,1,"labels.inputs.Balance")))}function Po(t,s){if(t&1){let e=F();n(0,"td",24),M("click",function(){let p=S(e).$implicit,f=_();return A(f.showTransactions(p))}),a(1),r(2,"formatNumber"),o()}if(t&2){let e=s.$implicit,l=_();d("ngClass",l.savingsTransactionColor(e)),i(),u(" ",c(2,2,e.runningBalance)," ")}}function Mo(t,s){t&1&&(n(0,"th",22),a(1),r(2,"translate"),o()),t&2&&(i(),m(c(2,1,"labels.inputs.Actions")))}function To(t,s){if(t&1){let e=F();n(0,"td",25)(1,"button",26)(2,"mat-icon"),a(3,"more_vert"),o()(),n(4,"mat-menu",null,0)(6,"button",27),M("click",function(){let p=S(e).$implicit,f=_();return A(f.showTransactions(p))}),n(7,"mat-icon"),g(8,"fa-icon",28),o(),n(9,"span"),a(10),r(11,"translate"),o()(),n(12,"button",29),M("click",function(p){S(e);let f=_();return A(f.routeEdit(p))}),n(13,"mat-icon"),g(14,"fa-icon",30),o(),n(15,"span"),a(16),r(17,"translate"),o()()()()}if(t&2){let e=s.$implicit,l=k(5);i(),d("matMenuTriggerFor",l),i(9),m(c(11,4,"labels.text.View Transaction")),i(2),d("routerLink",Ge(8,po,"S"+e.id)),i(4),m(c(17,6,"tooltips.View Journal Entries"))}}function So(t,s){t&1&&g(0,"tr",31)}function Ao(t,s){t&1&&g(0,"tr",32)}var pi=(()=>{class t{constructor(){this.route=x(N),this.router=x(W),this.dialog=x(Ut),this.displayedColumns=["row","id","transactionDate","transactionType","debit","credit","balance","actions"],this.route.parent.data.subscribe(e=>{this.transactionsData=e.fixedDepositsAccountData.transactions,this.accountId=this.route.parent.snapshot.params.fixedDepositAccountId,this.status=e.fixedDepositsAccountData.status.value})}ngOnInit(){this.hideAccrualsParam=new Z(!1),this.hideReversedParam=new Z(!1),this.dataSource=new ve(this.transactionsData)}checkStatus(){return this.status==="Active"||this.status==="Closed"||this.status==="Transfer in progress"||this.status==="Transfer on hold"||this.status==="Premature Closed"||this.status==="Matured"}isDebit(e){return e.withdrawal===!0||e.feeDeduction===!0||e.overdraftInterest===!0||e.withholdTax===!0}showTransactions(e){e.transfer?this.router.navigate([`account-transfers/account-transfers/${e.transfer.id}`],{relativeTo:this.route}):this.router.navigate([e.id],{relativeTo:this.route})}hideAccruals(){this.filterTransactions(this.hideReversedParam.value,!this.hideAccrualsParam.value)}hideReversed(){this.filterTransactions(!this.hideReversedParam.value,this.hideAccrualsParam.value)}filterTransactions(e,l){let p=this.transactionsData;(l||e)&&(p=this.transactionsData.filter(f=>!(e&&f.reversed)&&!(l&&f.transactionType.accrual))),this.dataSource=new ve(p),this.dataSource.paginator=this.paginator,this.dataSource.sort=this.sort}savingsTransactionColor(e){return e.reversed?"strike":e.transfer?"transfer":e.transactionType.accrual?"accrual":""}routeEdit(e){e.stopPropagation()}undoTransaction(e){}static{this.\u0275fac=function(l){return new(l||t)}}static{this.\u0275cmp=O({type:t,selectors:[["mifosx-transactions-tab"]],viewQuery:function(l,p){if(l&1&&(ht(Ui,7),ht(Wi,7)),l&2){let f;vt(f=Dt())&&(p.paginator=f.first),vt(f=Dt())&&(p.sort=f.first)}},decls:35,vars:7,consts:[["transactionMenu","matMenu"],[1,"tab-container","mat-typography"],[1,"mat-elevation-z1","m-b-25"],[1,"layout-row","align-start"],[1,"m-b-20"],[1,"action-button","m-b-20","layout-row","gap-20px"],["mat-table","",3,"dataSource"],["matColumnDef","row"],["mat-header-cell","",4,"matHeaderCellDef"],["mat-cell","",3,"click",4,"matCellDef"],["matColumnDef","id"],["mat-cell","",3,"ngClass","click",4,"matCellDef"],["matColumnDef","transactionDate"],["matColumnDef","transactionType"],["matColumnDef","debit"],["matColumnDef","credit"],["matColumnDef","balance"],["matColumnDef","actions"],["mat-cell","","class","center",4,"matCellDef"],["mat-header-row","",4,"matHeaderRowDef"],["mat-row","","class","select-row",4,"matRowDef","matRowDefColumns"],[1,"accruals",3,"click","formControl"],["mat-header-cell",""],["mat-cell","",3,"click"],["mat-cell","",3,"click","ngClass"],["mat-cell","",1,"center"],["mat-icon-button","","aria-label","",1,"action-button",3,"matMenuTriggerFor"],["mat-menu-item","",3,"click"],["icon","eye","size","sm"],["mat-menu-item","",3,"click","routerLink"],["icon","table-cells","size","sm"],["mat-header-row",""],["mat-row","",1,"select-row"]],template:function(l,p){l&1&&(n(0,"div",1)(1,"div",2)(2,"div",3)(3,"div",4)(4,"h3"),a(5),r(6,"translate"),o()(),h(7,co,7,8,"div",5),o(),n(8,"table",6),b(9,7),C(10,so,2,0,"th",8)(11,lo,2,1,"td",9),P(),b(12,10),C(13,mo,3,3,"th",8)(14,uo,2,2,"td",11),P(),b(15,12),C(16,fo,3,3,"th",8)(17,go,3,4,"td",11),P(),b(18,13),C(19,xo,3,3,"th",8)(20,Co,3,5,"td",11),P(),b(21,14),C(22,_o,3,3,"th",8)(23,ho,3,4,"td",11),P(),b(24,15),C(25,vo,3,3,"th",8)(26,Do,3,4,"td",11),P(),b(27,16),C(28,bo,3,3,"th",8)(29,Po,3,4,"td",11),P(),b(30,17),C(31,Mo,3,3,"th",8)(32,To,18,10,"td",18),P(),C(33,So,1,0,"tr",19)(34,Ao,1,0,"tr",20),o()()()),l&2&&(i(5),m(c(6,5,"labels.heading.All Transactions")),i(2),v(p.checkStatus()?7:-1),i(),d("dataSource",p.dataSource),i(25),d("matHeaderRowDef",p.displayedColumns),i(),d("matRowDefColumns",p.displayedColumns))},dependencies:[y,Se,I,it,zi,tt,Ue,wt,kt,Bt,Rt,Et,Nt,Ee,Ke,Qe,We,je,ut,Vt,zt,qt,Ht,yt,w,It,ue],styles:["body[_ngcontent-%COMP%] table[_ngcontent-%COMP%] tbody[_ngcontent-%COMP%] tr[_ngcontent-%COMP%]:nth-child(2n){background-color:#f2f2f2}.bg-black[_ngcontent-%COMP%]{background-color:#000}.bg-light-grey[_ngcontent-%COMP%]{background-color:#e5e5e5}.bg-medium-grey[_ngcontent-%COMP%]{background-color:#ccc}.bg-grey[_ngcontent-%COMP%]{background-color:#999}.bg-dark-grey[_ngcontent-%COMP%]{background-color:#222}.bg-white[_ngcontent-%COMP%], .bg-fff[_ngcontent-%COMP%]{background-color:#fff}.bg-none[_ngcontent-%COMP%], .no-bg[_ngcontent-%COMP%]{background:none;background-image:none;background-color:transparent}.bg-facebook[_ngcontent-%COMP%]{background-color:#47639e}.bg-twitter[_ngcontent-%COMP%]{background-color:#02a8f3}body[_ngcontent-%COMP%] table[_ngcontent-%COMP%]{border:1px solid rgba(0,0,0,.12)}.no-border[_ngcontent-%COMP%]{border:none}.no-border-t[_ngcontent-%COMP%]{border-top:none}.no-border-r[_ngcontent-%COMP%]{border-right:none}.no-border-b[_ngcontent-%COMP%]{border-bottom:none}.no-border-l[_ngcontent-%COMP%]{border-left:none}.no-border-lr[_ngcontent-%COMP%], .no-border-rl[_ngcontent-%COMP%]{border-left:none;border-right:none}.no-border-tb[_ngcontent-%COMP%], .no-border-bt[_ngcontent-%COMP%]{border-top:none;border-bottom:none}.no-border-tl[_ngcontent-%COMP%], .no-border-lt[_ngcontent-%COMP%]{border-top:none;border-left:none}.no-border-tr[_ngcontent-%COMP%], .no-border-rt[_ngcontent-%COMP%]{border-top:none;border-right:none}.no-border-bl[_ngcontent-%COMP%], .no-border-lb[_ngcontent-%COMP%]{border-bottom:none;border-left:none}.no-border-br[_ngcontent-%COMP%], .no-border-rb[_ngcontent-%COMP%]{border-bottom:none;border-right:none}.border-dashed[_ngcontent-%COMP%], .border-dotted[_ngcontent-%COMP%]{border-style:dashed}.border-black[_ngcontent-%COMP%]{border-color:#000}.border-light-grey[_ngcontent-%COMP%]{border-color:#e5e5e5}.border-medium-grey[_ngcontent-%COMP%]{border-color:#ccc}.border-grey[_ngcontent-%COMP%]{border-color:#999}.border-dark-grey[_ngcontent-%COMP%]{border-color:#2222}.border-white[_ngcontent-%COMP%], .border-fff[_ngcontent-%COMP%]{border-color:#fff}.no-border-radius[_ngcontent-%COMP%]{border-radius:0}.radius3[_ngcontent-%COMP%]{border-radius:3px}.radius5[_ngcontent-%COMP%]{border-radius:5px}.radius10[_ngcontent-%COMP%]{border-radius:10px}.column-mandatory[_ngcontent-%COMP%]{color:#5cb85c;text-align:center}.not-column-mandatory[_ngcontent-%COMP%]{color:#666f73;text-align:center}.cdk-drag-placeholder[_ngcontent-%COMP%]{background:#3498db}.yes[_ngcontent-%COMP%]{color:#5cb85c!important;background-color:#5cb85c;height:4px;cursor:none}.no[_ngcontent-%COMP%]{color:red;background-color:red;height:4px;cursor:none}.strike[_ngcontent-%COMP%]{text-decoration:line-through;color:red}.transfer[_ngcontent-%COMP%]{color:#16a085}.linked[_ngcontent-%COMP%]{color:#4461e2}.accrual[_ngcontent-%COMP%]{color:#999}.fa-question[_ngcontent-%COMP%]{color:#4461e2}.enabled[_ngcontent-%COMP%]{color:#32cd32}.disabled[_ngcontent-%COMP%]{color:#f44366}.v-mid[_ngcontent-%COMP%], .v-m[_ngcontent-%COMP%]{vertical-align:middle}.v-top[_ngcontent-%COMP%], .v-t[_ngcontent-%COMP%]{vertical-align:top}.v-bottom[_ngcontent-%COMP%], .v-b[_ngcontent-%COMP%]{vertical-align:bottom}.v-super[_ngcontent-%COMP%]{vertical-align:super}.r-amount[_ngcontent-%COMP%]{text-align:right!important;padding-right:5px!important}.left[_ngcontent-%COMP%]{text-align:left!important}.right[_ngcontent-%COMP%]{text-align:right!important}.center[_ngcontent-%COMP%]{text-align:center!important}.amount-plus[_ngcontent-%COMP%]{color:#000}.amount-minus[_ngcontent-%COMP%]{color:#4461e2}.block[_ngcontent-%COMP%]{display:block}.inline[_ngcontent-%COMP%]{display:inline}.in-block[_ngcontent-%COMP%]{display:inline-block;zoom:1}.d-none[_ngcontent-%COMP%], .hide[_ngcontent-%COMP%], .hidden[_ngcontent-%COMP%]{display:none}.t-0[_ngcontent-%COMP%]{top:0}.b-0[_ngcontent-%COMP%]{bottom:0}.l-0[_ngcontent-%COMP%]{left:0}.r-0[_ngcontent-%COMP%]{right:0}.tb-0[_ngcontent-%COMP%]{top:0;bottom:0}.lr-0[_ngcontent-%COMP%]{left:0;right:0}.f-left[_ngcontent-%COMP%]{float:left}.f-right[_ngcontent-%COMP%]{float:right}.f-none[_ngcontent-%COMP%]{float:none}textarea[_ngcontent-%COMP%]{resize:both}textarea.vertical[_ngcontent-%COMP%], textarea.horizontal[_ngcontent-%COMP%]{resize:vertical}textarea.noresize[_ngcontent-%COMP%]{resize:none}.full-input[_ngcontent-%COMP%] input[_ngcontent-%COMP%], .full-input[_ngcontent-%COMP%] select[_ngcontent-%COMP%], .full-input[_ngcontent-%COMP%] textarea[_ngcontent-%COMP%]{width:100%}.normal[_ngcontent-%COMP%] input[_ngcontent-%COMP%], .normal[_ngcontent-%COMP%] select[_ngcontent-%COMP%], .normal[_ngcontent-%COMP%] textarea[_ngcontent-%COMP%], .full-input[_ngcontent-%COMP%] [type=checkbox][_ngcontent-%COMP%], .full-input[_ngcontent-%COMP%] [type=radio][_ngcontent-%COMP%]{width:auto}.mat-tab-body-content[_ngcontent-%COMP%]{margin-bottom:20px}.mat-datepicker-input[_ngcontent-%COMP%]{margin-top:5px;margin-bottom:5px}.loader-wrapper[_ngcontent-%COMP%]{height:100vh;width:100vw}.loader-wrapper[_ngcontent-%COMP%] .triangle[_ngcontent-%COMP%]{width:0;height:0;border-style:solid;position:absolute;animation:_ngcontent-%COMP%_rotate .8s infinite .2s}.loader-wrapper[_ngcontent-%COMP%] .bottom[_ngcontent-%COMP%]{border-width:0 90px 90px;border-color:transparent transparent #1fb050;bottom:calc(50% - 100px);left:calc(50% - 90px)}.loader-wrapper[_ngcontent-%COMP%] .top[_ngcontent-%COMP%]{border-width:90px 90px 0;border-color:#b4d575 transparent transparent;top:calc(50% - 100px);left:calc(50% - 90px)}.loader-wrapper[_ngcontent-%COMP%] .left[_ngcontent-%COMP%]{border-width:90px 0 90px 90px;border-color:transparent transparent transparent #1074b9;top:calc(50% - 90px);left:calc(50% - 100px)}.loader-wrapper[_ngcontent-%COMP%] .right[_ngcontent-%COMP%]{border-width:90px 90px 90px 0;border-color:transparent #1daeec transparent transparent;top:calc(50% - 90px);right:calc(50% - 100px)}@keyframes _ngcontent-%COMP%_rotate{0%{transform:rotate(0)}to{transform:rotate(360deg)}}body[_ngcontent-%COMP%]{margin:0}.container[_ngcontent-%COMP%]{margin:0 auto}.mb-05[_ngcontent-%COMP%]{margin-bottom:.5rem}.mr-05[_ngcontent-%COMP%]{margin-right:.5rem}.mb-1[_ngcontent-%COMP%]{margin-bottom:1rem}.mt-1[_ngcontent-%COMP%]{margin-top:1rem}.m-5[_ngcontent-%COMP%]{margin:5px}.m-t-5[_ngcontent-%COMP%]{margin-top:5px}.m-r-5[_ngcontent-%COMP%]{margin-right:5px}.m-b-5[_ngcontent-%COMP%]{margin-bottom:5px}.m-l-5[_ngcontent-%COMP%]{margin-left:5px}.m-v-5[_ngcontent-%COMP%]{margin:5px 0}.m-h-5[_ngcontent-%COMP%]{margin:0 5px}.m-10[_ngcontent-%COMP%]{margin:10px}.m-t-10[_ngcontent-%COMP%]{margin-top:10px}.m-r-10[_ngcontent-%COMP%]{margin-right:10px}.m-b-10[_ngcontent-%COMP%]{margin-bottom:10px}.m-l-10[_ngcontent-%COMP%]{margin-left:10px}.m-v-10[_ngcontent-%COMP%]{margin:10px 0}.m-h-10[_ngcontent-%COMP%]{margin:0 10px}.m-15[_ngcontent-%COMP%]{margin:15px}.m-t-15[_ngcontent-%COMP%]{margin-top:15px}.m-r-15[_ngcontent-%COMP%]{margin-right:15px}.m-b-15[_ngcontent-%COMP%]{margin-bottom:15px}.m-l-15[_ngcontent-%COMP%]{margin-left:15px}.m-v-15[_ngcontent-%COMP%]{margin:15px 0}.m-h-15[_ngcontent-%COMP%]{margin:0 15px}.m-20[_ngcontent-%COMP%]{margin:20px}.m-t-20[_ngcontent-%COMP%]{margin-top:20px}.m-r-20[_ngcontent-%COMP%]{margin-right:20px}.m-b-20[_ngcontent-%COMP%]{margin-bottom:20px}.m-l-20[_ngcontent-%COMP%]{margin-left:20px}.m-v-20[_ngcontent-%COMP%]{margin:20px 0}.m-h-20[_ngcontent-%COMP%]{margin:0 20px}.m-25[_ngcontent-%COMP%]{margin:25px}.m-t-25[_ngcontent-%COMP%]{margin-top:25px}.m-r-25[_ngcontent-%COMP%]{margin-right:25px}.m-b-25[_ngcontent-%COMP%]{margin-bottom:25px}.m-l-25[_ngcontent-%COMP%]{margin-left:25px}.m-v-25[_ngcontent-%COMP%]{margin:25px 0}.m-h-25[_ngcontent-%COMP%]{margin:0 25px}.m-30[_ngcontent-%COMP%]{margin:30px}.m-t-30[_ngcontent-%COMP%]{margin-top:30px}.m-r-30[_ngcontent-%COMP%]{margin-right:30px}.m-b-30[_ngcontent-%COMP%]{margin-bottom:30px}.m-l-30[_ngcontent-%COMP%]{margin-left:30px}.m-v-30[_ngcontent-%COMP%]{margin:30px 0}.m-h-30[_ngcontent-%COMP%]{margin:0 30px}.m-35[_ngcontent-%COMP%]{margin:35px}.m-t-35[_ngcontent-%COMP%]{margin-top:35px}.m-r-35[_ngcontent-%COMP%]{margin-right:35px}.m-b-35[_ngcontent-%COMP%]{margin-bottom:35px}.m-l-35[_ngcontent-%COMP%]{margin-left:35px}.m-v-35[_ngcontent-%COMP%]{margin:35px 0}.m-h-35[_ngcontent-%COMP%]{margin:0 35px}.m-40[_ngcontent-%COMP%]{margin:40px}.m-t-40[_ngcontent-%COMP%]{margin-top:40px}.m-r-40[_ngcontent-%COMP%]{margin-right:40px}.m-b-40[_ngcontent-%COMP%]{margin-bottom:40px}.m-l-40[_ngcontent-%COMP%]{margin-left:40px}.m-v-40[_ngcontent-%COMP%]{margin:40px 0}.m-h-40[_ngcontent-%COMP%]{margin:0 40px}.m-45[_ngcontent-%COMP%]{margin:45px}.m-t-45[_ngcontent-%COMP%]{margin-top:45px}.m-r-45[_ngcontent-%COMP%]{margin-right:45px}.m-b-45[_ngcontent-%COMP%]{margin-bottom:45px}.m-l-45[_ngcontent-%COMP%]{margin-left:45px}.m-v-45[_ngcontent-%COMP%]{margin:45px 0}.m-h-45[_ngcontent-%COMP%]{margin:0 45px}.m-50[_ngcontent-%COMP%]{margin:50px}.m-t-50[_ngcontent-%COMP%]{margin-top:50px}.m-r-50[_ngcontent-%COMP%]{margin-right:50px}.m-b-50[_ngcontent-%COMP%]{margin-bottom:50px}.m-l-50[_ngcontent-%COMP%]{margin-left:50px}.m-v-50[_ngcontent-%COMP%]{margin:50px 0}.m-h-50[_ngcontent-%COMP%]{margin:0 50px}.m-55[_ngcontent-%COMP%]{margin:55px}.m-t-55[_ngcontent-%COMP%]{margin-top:55px}.m-r-55[_ngcontent-%COMP%]{margin-right:55px}.m-b-55[_ngcontent-%COMP%]{margin-bottom:55px}.m-l-55[_ngcontent-%COMP%]{margin-left:55px}.m-v-55[_ngcontent-%COMP%]{margin:55px 0}.m-h-55[_ngcontent-%COMP%]{margin:0 55px}.m-60[_ngcontent-%COMP%]{margin:60px}.m-t-60[_ngcontent-%COMP%]{margin-top:60px}.m-r-60[_ngcontent-%COMP%]{margin-right:60px}.m-b-60[_ngcontent-%COMP%]{margin-bottom:60px}.m-l-60[_ngcontent-%COMP%]{margin-left:60px}.m-v-60[_ngcontent-%COMP%]{margin:60px 0}.m-h-60[_ngcontent-%COMP%]{margin:0 60px}.m-65[_ngcontent-%COMP%]{margin:65px}.m-t-65[_ngcontent-%COMP%]{margin-top:65px}.m-r-65[_ngcontent-%COMP%]{margin-right:65px}.m-b-65[_ngcontent-%COMP%]{margin-bottom:65px}.m-l-65[_ngcontent-%COMP%]{margin-left:65px}.m-v-65[_ngcontent-%COMP%]{margin:65px 0}.m-h-65[_ngcontent-%COMP%]{margin:0 65px}.m-70[_ngcontent-%COMP%]{margin:70px}.m-t-70[_ngcontent-%COMP%]{margin-top:70px}.m-r-70[_ngcontent-%COMP%]{margin-right:70px}.m-b-70[_ngcontent-%COMP%]{margin-bottom:70px}.m-l-70[_ngcontent-%COMP%]{margin-left:70px}.m-v-70[_ngcontent-%COMP%]{margin:70px 0}.m-h-70[_ngcontent-%COMP%]{margin:0 70px}.m-75[_ngcontent-%COMP%]{margin:75px}.m-t-75[_ngcontent-%COMP%]{margin-top:75px}.m-r-75[_ngcontent-%COMP%]{margin-right:75px}.m-b-75[_ngcontent-%COMP%]{margin-bottom:75px}.m-l-75[_ngcontent-%COMP%]{margin-left:75px}.m-v-75[_ngcontent-%COMP%]{margin:75px 0}.m-h-75[_ngcontent-%COMP%]{margin:0 75px}.m-80[_ngcontent-%COMP%]{margin:80px}.m-t-80[_ngcontent-%COMP%]{margin-top:80px}.m-r-80[_ngcontent-%COMP%]{margin-right:80px}.m-b-80[_ngcontent-%COMP%]{margin-bottom:80px}.m-l-80[_ngcontent-%COMP%]{margin-left:80px}.m-v-80[_ngcontent-%COMP%]{margin:80px 0}.m-h-80[_ngcontent-%COMP%]{margin:0 80px}.no-m[_ngcontent-%COMP%]{margin:0}.no-m-t[_ngcontent-%COMP%]{margin-top:0}.no-m-r[_ngcontent-%COMP%]{margin-right:0}.no-m-b[_ngcontent-%COMP%]{margin-bottom:0}.no-m-l[_ngcontent-%COMP%]{margin-left:0}.no-m-v[_ngcontent-%COMP%], .no-m-h[_ngcontent-%COMP%], .no-margin[_ngcontent-%COMP%]{margin:0}.no-m-lr[_ngcontent-%COMP%], .no-m-rl[_ngcontent-%COMP%]{margin-left:0;margin-right:0}.no-m-tb[_ngcontent-%COMP%], .no-m-bt[_ngcontent-%COMP%]{margin-top:0;margin-bottom:0}.m-t-only[_ngcontent-%COMP%]{margin-left:0;margin-right:0;margin-bottom:0}.m-b-only[_ngcontent-%COMP%]{margin-left:0;margin-right:0;margin-top:0}.m-l-only[_ngcontent-%COMP%]{margin-right:0;margin-top:0;margin-bottom:0}.m-r-only[_ngcontent-%COMP%]{margin-left:0;margin-top:0;margin-bottom:0}.m-auto[_ngcontent-%COMP%]{margin-left:auto;margin-right:auto}.ls-0[_ngcontent-%COMP%]{margin-left:10px;margin-right:10px}html[_ngcontent-%COMP%], body[_ngcontent-%COMP%]{-webkit-tap-highlight-color:transparent}div[_ngcontent-%COMP%]{box-sizing:border-box}.color-inherit[_ngcontent-%COMP%]{color:inherit}.no-shadow[_ngcontent-%COMP%]{box-shadow:none}.pointer[_ngcontent-%COMP%]{cursor:pointer}.nolist[_ngcontent-%COMP%]{list-style:none}.actions-menu[_ngcontent-%COMP%]{color:#fff}.alert[_ngcontent-%COMP%]{background-color:#e8f4fd;padding:6px 16px;font-size:.875rem;font-family:Roboto,Helvetica Neue,sans-serif;font-weight:400;line-height:1.43;border-radius:4px;letter-spacing:normal;margin:10px}.alert[_ngcontent-%COMP%] .message[_ngcontent-%COMP%]{padding:8px 0;font-size:18px}.alert[_ngcontent-%COMP%] .alert-check[_ngcontent-%COMP%]{color:#359ff4;margin-right:2px;font-size:1.4rem} .mat-tooltip{font-size:15px;color:#fff!important;background-color:#4461e2b3;border:1px solid rgb(25.7777777778,51.5555555556,166.2222222222);max-width:400px!important;white-space:pre-line!important}.loading[_ngcontent-%COMP%]{position:absolute;min-width:100%;width:100px;height:12px;background:linear-gradient(125deg,#fff,#4461e2,#fff);animation:grow 4s linear infinite,move 4s linear infinite}mat-card-title[_ngcontent-%COMP%]{font-weight:600;font-size:x-large;padding-left:20px;padding-top:20px}html[_ngcontent-%COMP%], body[_ngcontent-%COMP%]{overflow:hidden}.overflow-x-scroll[_ngcontent-%COMP%]{max-width:100%;overflow-x:auto}.overflow-no[_ngcontent-%COMP%]{overflow:hidden}.overflow-auto[_ngcontent-%COMP%]{overflow:auto}.overflow-scroll[_ngcontent-%COMP%]{overflow:scroll}.table-container[_ngcontent-%COMP%]{overflow-x:auto;max-width:100%}body[_ngcontent-%COMP%], .no-p[_ngcontent-%COMP%]{padding:0}.no-p-t[_ngcontent-%COMP%]{padding-top:0}.no-p-r[_ngcontent-%COMP%]{padding-right:0}.no-p-b[_ngcontent-%COMP%]{padding-bottom:0}.no-p-l[_ngcontent-%COMP%]{padding-left:0}.no-p-v[_ngcontent-%COMP%], .no-p-h[_ngcontent-%COMP%]{padding:0}.p-5[_ngcontent-%COMP%]{padding:5px}.p-t-5[_ngcontent-%COMP%]{padding-top:5px}.p-r-5[_ngcontent-%COMP%]{padding-right:5px}.p-b-5[_ngcontent-%COMP%]{padding-bottom:5px}.p-l-5[_ngcontent-%COMP%]{padding-left:5px}.p-v-5[_ngcontent-%COMP%]{padding:5px 0}.p-h-5[_ngcontent-%COMP%]{padding:0 5px}.p-10[_ngcontent-%COMP%]{padding:10px}.p-t-10[_ngcontent-%COMP%]{padding-top:10px}.p-b-10[_ngcontent-%COMP%]{padding-bottom:10px}.p-v-10[_ngcontent-%COMP%]{padding:10px 0}.p-h-10[_ngcontent-%COMP%]{padding:0 10px}.p-15[_ngcontent-%COMP%]{padding:15px}.p-t-15[_ngcontent-%COMP%]{padding-top:15px}.p-r-15[_ngcontent-%COMP%]{padding-right:15px}.p-b-15[_ngcontent-%COMP%]{padding-bottom:15px}.p-l-15[_ngcontent-%COMP%]{padding-left:15px}.p-v-15[_ngcontent-%COMP%]{padding:15px 0}.p-h-15[_ngcontent-%COMP%]{padding:0 15px}.p-20[_ngcontent-%COMP%]{padding:20px}.p-t-20[_ngcontent-%COMP%]{padding-top:20px}.p-r-20[_ngcontent-%COMP%]{padding-right:20px}.p-b-20[_ngcontent-%COMP%]{padding-bottom:20px}.p-l-20[_ngcontent-%COMP%]{padding-left:20px}.p-v-20[_ngcontent-%COMP%]{padding:20px 0}.p-h-20[_ngcontent-%COMP%]{padding:0 20px}.p-25[_ngcontent-%COMP%]{padding:25px}.p-t-25[_ngcontent-%COMP%]{padding-top:25px}.p-r-25[_ngcontent-%COMP%]{padding-right:25px}.p-b-25[_ngcontent-%COMP%]{padding-bottom:25px}.p-l-25[_ngcontent-%COMP%]{padding-left:25px}.p-v-25[_ngcontent-%COMP%]{padding:25px 0}.p-h-25[_ngcontent-%COMP%]{padding:0 25px}.p-30[_ngcontent-%COMP%]{padding:30px}.p-t-30[_ngcontent-%COMP%]{padding-top:30px}.p-r-30[_ngcontent-%COMP%]{padding-right:30px}.p-b-30[_ngcontent-%COMP%]{padding-bottom:30px}.p-l-30[_ngcontent-%COMP%]{padding-left:30px}.p-v-30[_ngcontent-%COMP%]{padding:30px 0}.p-h-30[_ngcontent-%COMP%]{padding:0 30px}.p-35[_ngcontent-%COMP%]{padding:35px}.p-t-35[_ngcontent-%COMP%]{padding-top:35px}.p-r-35[_ngcontent-%COMP%]{padding-right:35px}.p-b-35[_ngcontent-%COMP%]{padding-bottom:35px}.p-l-35[_ngcontent-%COMP%]{padding-left:35px}.p-v-35[_ngcontent-%COMP%]{padding:35px 0}.p-h-35[_ngcontent-%COMP%]{padding:0 35px}.p-40[_ngcontent-%COMP%]{padding:40px}.p-t-40[_ngcontent-%COMP%]{padding-top:40px}.p-r-40[_ngcontent-%COMP%]{padding-right:40px}.p-b-40[_ngcontent-%COMP%]{padding-bottom:40px}.p-l-40[_ngcontent-%COMP%]{padding-left:40px}.p-v-40[_ngcontent-%COMP%]{padding-top:40px;padding-bottom:40px}.p-h-40[_ngcontent-%COMP%]{padding:0 40px}.p-45[_ngcontent-%COMP%]{padding:45px}.p-t-45[_ngcontent-%COMP%]{padding-top:45px}.p-r-45[_ngcontent-%COMP%]{padding-right:45px}.p-b-45[_ngcontent-%COMP%]{padding-bottom:45px}.p-l-45[_ngcontent-%COMP%]{padding-left:45px}.p-v-45[_ngcontent-%COMP%]{padding:45px 0}.p-h-45[_ngcontent-%COMP%]{padding:0 45px}.p-50[_ngcontent-%COMP%]{padding:50px}.p-t-50[_ngcontent-%COMP%]{padding-top:50px}.p-r-50[_ngcontent-%COMP%]{padding-right:50px}.p-b-50[_ngcontent-%COMP%]{padding-bottom:50px}.p-l-50[_ngcontent-%COMP%]{padding-left:50px}.p-v-50[_ngcontent-%COMP%]{padding:50px 0}.p-h-50[_ngcontent-%COMP%]{padding:0 50px}.p-55[_ngcontent-%COMP%]{padding:55px}.p-t-55[_ngcontent-%COMP%]{padding-top:55px}.p-r-55[_ngcontent-%COMP%]{padding-right:55px}.p-b-55[_ngcontent-%COMP%]{padding-bottom:55px}.p-l-55[_ngcontent-%COMP%]{padding-left:55px}.p-v-55[_ngcontent-%COMP%]{padding:55px 0}.p-h-55[_ngcontent-%COMP%]{padding:0 55px}.p-60[_ngcontent-%COMP%]{padding:60px}.p-t-60[_ngcontent-%COMP%]{padding-top:60px}.p-r-60[_ngcontent-%COMP%]{padding-right:60px}.p-b-60[_ngcontent-%COMP%]{padding-bottom:60px}.p-l-60[_ngcontent-%COMP%]{padding-left:60px}.p-v-60[_ngcontent-%COMP%]{padding:60px 0}.p-h-60[_ngcontent-%COMP%]{padding:0 60px}.p-65[_ngcontent-%COMP%]{padding:65px}.p-t-65[_ngcontent-%COMP%]{padding-top:65px}.p-r-65[_ngcontent-%COMP%]{padding-right:65px}.p-b-65[_ngcontent-%COMP%]{padding-bottom:65px}.p-l-65[_ngcontent-%COMP%]{padding-left:65px}.p-v-65[_ngcontent-%COMP%]{padding:65px 0}.p-h-65[_ngcontent-%COMP%]{padding:0 65px}.p-70[_ngcontent-%COMP%]{padding:70px}.p-t-70[_ngcontent-%COMP%]{padding-top:70px}.p-r-70[_ngcontent-%COMP%]{padding-right:70px}.p-b-70[_ngcontent-%COMP%]{padding-bottom:70px}.p-l-70[_ngcontent-%COMP%]{padding-left:70px}.p-v-70[_ngcontent-%COMP%]{padding:70px 0}.p-h-70[_ngcontent-%COMP%]{padding:0 70px}.p-75[_ngcontent-%COMP%]{padding:75px}.p-t-75[_ngcontent-%COMP%]{padding-top:75px}.p-r-75[_ngcontent-%COMP%]{padding-right:75px}.p-b-75[_ngcontent-%COMP%]{padding-bottom:75px}.p-l-75[_ngcontent-%COMP%]{padding-left:75px}.p-v-75[_ngcontent-%COMP%]{padding:75px 0}.p-h-75[_ngcontent-%COMP%]{padding:0 75px}.p-80[_ngcontent-%COMP%]{padding:80px}.p-t-80[_ngcontent-%COMP%]{padding-top:80px}.p-r-80[_ngcontent-%COMP%]{padding-right:80px}.p-b-80[_ngcontent-%COMP%]{padding-bottom:80px}.p-l-80[_ngcontent-%COMP%]{padding-left:80px}.p-v-80[_ngcontent-%COMP%]{padding:80px 0}.p-h-80[_ngcontent-%COMP%]{padding:0 80px}.no-padding[_ngcontent-%COMP%]{padding:0!important}.no-pad-lr[_ngcontent-%COMP%], .no-pad-rl[_ngcontent-%COMP%]{padding-left:0;padding-right:0}.no-pad-tb[_ngcontent-%COMP%], .no-pad-bt[_ngcontent-%COMP%]{padding-top:0;padding-bottom:0}.pad-t-only[_ngcontent-%COMP%]{padding-left:0;padding-right:0;padding-bottom:0}.pad-b-only[_ngcontent-%COMP%]{padding-left:0;padding-right:0;padding-top:0}.pad-l-only[_ngcontent-%COMP%]{padding-right:0;padding-top:0;padding-bottom:0}.pad-r-only[_ngcontent-%COMP%]{padding-left:0;padding-top:0;padding-bottom:0}html[_ngcontent-%COMP%], body[_ngcontent-%COMP%], .rel[_ngcontent-%COMP%], .relative[_ngcontent-%COMP%]{position:relative}.abs[_ngcontent-%COMP%], .absolute[_ngcontent-%COMP%]{position:absolute}.fixed[_ngcontent-%COMP%]{position:fixed}.status-active[_ngcontent-%COMP%]{color:#5cb85c}.status-inactive[_ngcontent-%COMP%]{color:#666f73}.status-deleted[_ngcontent-%COMP%]{color:#000}.status-pending[_ngcontent-%COMP%]{color:orange}.status-approved[_ngcontent-%COMP%]{color:#4461e2}.status-overpaid[_ngcontent-%COMP%]{color:purple}.status-chargeoff[_ngcontent-%COMP%]{color:#f39c12}.status-active-overdue[_ngcontent-%COMP%], .status-block[_ngcontent-%COMP%]{color:red}.status-matured[_ngcontent-%COMP%]{color:#ff4000}.subStatus-contract-termination[_ngcontent-%COMP%]{color:#b3b3b3}.mat-step-header[_ngcontent-%COMP%] .mat-step-icon-state-done[_ngcontent-%COMP%]{background-color:#2af72a}.mat-step-header[_ngcontent-%COMP%] .mat-step-icon-state-done[_ngcontent-%COMP%] .status-transfer-progress[_ngcontent-%COMP%]{color:#ff4000}.mat-step-header[_ngcontent-%COMP%] .mat-step-icon-state-done[_ngcontent-%COMP%] .status-transfer-hold[_ngcontent-%COMP%]{color:#df0101}html[_ngcontent-%COMP%], body[_ngcontent-%COMP%]{-webkit-font-smoothing:antialiased}html[_ngcontent-%COMP%]{font-size:16px}body[_ngcontent-%COMP%]{font-family:Roboto,Helvetica Neue,sans-serif;font-weight:400;font-size:14px;color:#000000de;line-height:1.5;letter-spacing:normal}.mat-h1[_ngcontent-%COMP%], .mat-headline[_ngcontent-%COMP%], .mat-typography[_ngcontent-%COMP%] .mat-h1[_ngcontent-%COMP%], .mat-typography[_ngcontent-%COMP%] .mat-headline[_ngcontent-%COMP%], .mat-typography[_ngcontent-%COMP%] h1[_ngcontent-%COMP%]{font:400 24px/32px Roboto,Helvetica Neue,sans-serif;letter-spacing:normal;margin:0 0 16px}.lh-1[_ngcontent-%COMP%]{line-height:1}.lh-13[_ngcontent-%COMP%]{line-height:1.3}.lh-15[_ngcontent-%COMP%]{line-height:1.5}.bold[_ngcontent-%COMP%], .strong[_ngcontent-%COMP%]{font-weight:700}.no-bold[_ngcontent-%COMP%]{font-weight:400}.italic[_ngcontent-%COMP%], .em[_ngcontent-%COMP%]{font-style:italic}.strike[_ngcontent-%COMP%]{text-decoration:line-through}.normal[_ngcontent-%COMP%]{font-weight:400;font-style:normal}.uppercase[_ngcontent-%COMP%]{text-transform:uppercase}.text-left[_ngcontent-%COMP%]{text-align:left}.text-center[_ngcontent-%COMP%]{text-align:center}.text-right[_ngcontent-%COMP%]{text-align:right}.w100[_ngcontent-%COMP%]{font-weight:100}.w200[_ngcontent-%COMP%]{font-weight:200}.w300[_ngcontent-%COMP%]{font-weight:300}.w400[_ngcontent-%COMP%]{font-weight:400}.w500[_ngcontent-%COMP%]{font-weight:500}.w600[_ngcontent-%COMP%]{font-weight:600}.w700[_ngcontent-%COMP%]{font-weight:700}.w800[_ngcontent-%COMP%]{font-weight:800}.w900[_ngcontent-%COMP%]{font-weight:900}.f9[_ngcontent-%COMP%]{font-size:9px}.f10[_ngcontent-%COMP%]{font-size:10px}.f11[_ngcontent-%COMP%]{font-size:11px}.f12[_ngcontent-%COMP%]{font-size:12px}.f13[_ngcontent-%COMP%]{font-size:13px}.f14[_ngcontent-%COMP%]{font-size:14px}.f15[_ngcontent-%COMP%]{font-size:15px}.f16[_ngcontent-%COMP%]{font-size:16px}.f17[_ngcontent-%COMP%]{font-size:17px}.f18[_ngcontent-%COMP%]{font-size:18px;line-height:30px}.f19[_ngcontent-%COMP%]{font-size:19px}.f20[_ngcontent-%COMP%]{font-size:20px}.f30[_ngcontent-%COMP%]{font-size:30px}.f40[_ngcontent-%COMP%]{font-size:40px}.f50[_ngcontent-%COMP%]{font-size:50px}.f60[_ngcontent-%COMP%]{font-size:60px}.size-small[_ngcontent-%COMP%]{font-size:75%}.size-normal[_ngcontent-%COMP%]{font-size:100%}.size-medium[_ngcontent-%COMP%]{font-size:125%}.size-big[_ngcontent-%COMP%], .size-large[_ngcontent-%COMP%]{font-size:150%}.size-huge[_ngcontent-%COMP%]{font-size:200%}.inherit[_ngcontent-%COMP%]{font:inherit}.text-shadow[_ngcontent-%COMP%]{text-shadow:1px 1px 1px rgba(0,0,0,.4)}.text-rgb-2[_ngcontent-%COMP%]{color:#0003}.text-rgb-3[_ngcontent-%COMP%]{color:#0000004d}.text-rgb-4[_ngcontent-%COMP%]{color:#0006}.text-rgb-5[_ngcontent-%COMP%]{color:#00000080}.no-ul[_ngcontent-%COMP%], .no-ul[_ngcontent-%COMP%]:hover, .no-ul[_ngcontent-%COMP%] a[_ngcontent-%COMP%], .no-ul[_ngcontent-%COMP%] a[_ngcontent-%COMP%]:hover{text-decoration:none}.no-wrap[_ngcontent-%COMP%]{white-space:nowrap}.auto-cell-size[_ngcontent-%COMP%]{white-space:nowrap;width:1%}.ls-0[_ngcontent-%COMP%]{letter-spacing:-3px;white-space:nowrap}.label-field[_ngcontent-%COMP%]{margin-top:32px}.wrap-content[_ngcontent-%COMP%]{overflow-wrap:break-word;word-wrap:break-word}.no-break-content[_ngcontent-%COMP%]{overflow-wrap:anywhere!important}.fit[_ngcontent-%COMP%]{max-width:100%}.half-width[_ngcontent-%COMP%]{width:50%}.full-width[_ngcontent-%COMP%]{width:100%}.full-height[_ngcontent-%COMP%]{height:100%}html[_ngcontent-%COMP%], body[_ngcontent-%COMP%]{width:100%;height:100%;min-height:100%}body[_ngcontent-%COMP%] table[_ngcontent-%COMP%]{width:100%}.container[_ngcontent-%COMP%]{max-width:74rem;width:90%}.mw300[_ngcontent-%COMP%]{max-width:300px}.mw400[_ngcontent-%COMP%]{max-width:400px}.mw500[_ngcontent-%COMP%]{max-width:500px}.mw600[_ngcontent-%COMP%]{max-width:600px}.fullwidth[_ngcontent-%COMP%]{width:100%}.zindex-1[_ngcontent-%COMP%]{z-index:1}.zindex-2[_ngcontent-%COMP%]{z-index:2}.zindex-3[_ngcontent-%COMP%]{z-index:3}.zindex-4[_ngcontent-%COMP%]{z-index:4}.tab-container[_ngcontent-%COMP%]{padding:1%;margin:1%}.tab-container[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{margin:1% auto}.tab-container[_ngcontent-%COMP%] .action-button[_ngcontent-%COMP%]{margin-left:auto}.tab-container[_ngcontent-%COMP%] table[_ngcontent-%COMP%]{width:100%;color:#000}.tab-container[_ngcontent-%COMP%] table[_ngcontent-%COMP%] .account-action-button[_ngcontent-%COMP%]{min-width:26px;padding:0 0 3px;margin:0 2%;line-height:25px}.tab-container[_ngcontent-%COMP%] table[_ngcontent-%COMP%] .strike[_ngcontent-%COMP%]{text-decoration:line-through;color:red}.tab-container[_ngcontent-%COMP%] table[_ngcontent-%COMP%] .linked[_ngcontent-%COMP%]{color:#4461e2}.tab-container[_ngcontent-%COMP%] table[_ngcontent-%COMP%] .accrual[_ngcontent-%COMP%]{color:#999}.select-row[_ngcontent-%COMP%]:hover{cursor:pointer;font-weight:800}"]})}}return t})();var Oo=()=>({confirm:!0}),ci=(()=>{class t{constructor(){this.dialogRef=x(Xt),this.data=x(Be)}static{this.\u0275fac=function(l){return new(l||t)}}static{this.\u0275cmp=O({type:t,selectors:[["mifosx-waive-charge-dialog"]],decls:14,vars:15,consts:[["mat-dialog-title",""],["mat-dialog-content",""],["align","end"],["mat-raised-button","","mat-dialog-close",""],["mat-raised-button","","color","primary",3,"mat-dialog-close"]],template:function(l,p){l&1&&(n(0,"h1",0),a(1),r(2,"translate"),o(),n(3,"div",1)(4,"p"),a(5),r(6,"translate"),o()(),n(7,"mat-dialog-actions",2)(8,"button",3),a(9),r(10,"translate"),o(),n(11,"button",4),a(12),r(13,"translate"),o()()),l&2&&(i(),m(c(2,6,"labels.heading.Waive Charge")),i(4),T("",c(6,8,"labels.text.Are you sure you want to waive charge with id"),": ",p.data.id," ?"),i(4),m(c(10,10,"labels.buttons.Cancel")),i(2),d("mat-dialog-close",R(14,Oo)),i(),u(" ",c(13,12,"labels.buttons.Confirm")," "))},dependencies:[y,I,B,te,ee,ie,Zt,w],encapsulation:2})}}return t})();var yo=()=>({confirm:!0}),si=(()=>{class t{constructor(){this.dialogRef=x(Xt),this.data=x(Be)}static{this.\u0275fac=function(l){return new(l||t)}}static{this.\u0275cmp=O({type:t,selectors:[["mifosx-inactivate-charge-dialog"]],decls:14,vars:15,consts:[["mat-dialog-title",""],["mat-dialog-content",""],["align","end"],["mat-raised-button","","mat-dialog-close",""],["mat-raised-button","","color","primary",3,"mat-dialog-close"]],template:function(l,p){l&1&&(n(0,"h1",0),a(1),r(2,"translate"),o(),n(3,"div",1)(4,"p"),a(5),r(6,"translate"),o()(),n(7,"mat-dialog-actions",2)(8,"button",3),a(9),r(10,"translate"),o(),n(11,"button",4),a(12),r(13,"translate"),o()()),l&2&&(i(),m(c(2,6,"labels.heading.Inactivate Charge")),i(4),T("",c(6,8,"labels.text.Are you sure you want to inactivate charge with id"),": ",p.data.id," ?"),i(4),m(c(10,10,"labels.buttons.Cancel")),i(2),d("mat-dialog-close",R(14,yo)),i(),u(" ",c(13,12,"labels.buttons.Confirm")," "))},dependencies:[y,I,B,te,ee,ie,Zt,w],encapsulation:2})}}return t})();var Io=["chargesTable"],Fo=()=>[2e3];function wo(t,s){if(t&1){let e=F();n(0,"div",4)(1,"button",22),M("click",function(){S(e);let p=_();return A(p.toggleCharges())}),a(2),o()()}if(t&2){let e=_();i(2),u(" ",e.showInactiveCharges?"View Active Charges":"View Inactive Charges"," ")}}function Eo(t,s){t&1&&(n(0,"th",23),a(1),r(2,"translate"),o()),t&2&&(i(),m(c(2,1,"labels.inputs.name")))}function Bo(t,s){if(t&1&&(n(0,"td",24),a(1),o()),t&2){let e=s.$implicit;i(),m(e.name)}}function ko(t,s){t&1&&(n(0,"th",23),a(1),r(2,"translate"),o()),t&2&&(i(),m(c(2,1,"labels.inputs.Fee/Penalty")))}function Ro(t,s){if(t&1&&(n(0,"td",24),a(1),r(2,"translateKey"),r(3,"translateKey"),o()),t&2){let e=s.$implicit;i(),u(" ",e.penalty===!0?E(2,1,"Penalty","catalogs"):E(3,4,"Fee","catalogs")," ")}}function No(t,s){t&1&&(n(0,"th",23),a(1),r(2,"translate"),o()),t&2&&(i(),m(c(2,1,"labels.inputs.Payment Due At")))}function Vo(t,s){if(t&1&&(n(0,"td",24),a(1),r(2,"translateKey"),o()),t&2){let e=s.$implicit;i(),m(E(2,1,e.chargeTimeType.value,"catalogs"))}}function qo(t,s){t&1&&(n(0,"th",23),a(1),r(2,"translate"),o()),t&2&&(i(),m(c(2,1,"labels.inputs.Due As Of")))}function zo(t,s){if(t&1&&(n(0,"td",24),a(1),r(2,"dateFormat"),o()),t&2){let e=s.$implicit;i(),m(c(2,1,e.dueDate))}}function Ho(t,s){t&1&&(n(0,"th",23),a(1),r(2,"translate"),o()),t&2&&(i(),m(c(2,1,"labels.inputs.Repeats On")))}function $o(t,s){if(t&1&&(n(0,"td",24),a(1),r(2,"dateFormat"),r(3,"translateKey"),o()),t&2){let e=s.$implicit;i(),u(" ",e.feeOnMonthDay?E(2,1,R(7,Fo).concat(e.feeOnMonthDay),"dd MMMM"):E(3,4,"Unassigned","inputs")," ")}}function Lo(t,s){t&1&&(n(0,"th",23),a(1),r(2,"translate"),o()),t&2&&(i(),m(c(2,1,"labels.inputs.Calculation Type")))}function Go(t,s){if(t&1&&(n(0,"td",24),a(1),r(2,"translateKey"),o()),t&2){let e=s.$implicit;i(),m(E(2,1,e.chargeCalculationType.value,"catalogs"))}}function Uo(t,s){t&1&&(n(0,"th",23),a(1),r(2,"translate"),o()),t&2&&(i(),m(c(2,1,"labels.inputs.Due")))}function jo(t,s){if(t&1&&(n(0,"td",24),a(1),r(2,"formatNumber"),o()),t&2){let e=s.$implicit;i(),T(" ",e.currency.displaySymbol,"\xA0",c(2,2,e.amount)," ")}}function Wo(t,s){t&1&&(n(0,"th",23),a(1),r(2,"translate"),o()),t&2&&(i(),m(c(2,1,"labels.inputs.Paid")))}function Ko(t,s){if(t&1&&(n(0,"td",24),a(1),r(2,"formatNumber"),o()),t&2){let e=s.$implicit;i(),T(" ",e.currency.displaySymbol,"\xA0",c(2,2,e.amountPaid)," ")}}function Qo(t,s){t&1&&(n(0,"th",23),a(1),r(2,"translate"),o()),t&2&&(i(),m(c(2,1,"labels.inputs.Waived")))}function Yo(t,s){if(t&1&&(n(0,"td",24),a(1),r(2,"formatNumber"),o()),t&2){let e=s.$implicit;i(),T(" ",e.currency.displaySymbol,"\xA0",c(2,2,e.amountWaived)," ")}}function Jo(t,s){t&1&&(n(0,"th",23),a(1),r(2,"translate"),o()),t&2&&(i(),m(c(2,1,"labels.inputs.Outstanding")))}function Xo(t,s){if(t&1&&(n(0,"td",24),a(1),r(2,"formatNumber"),o()),t&2){let e=s.$implicit;i(),T(" ",e.currency.displaySymbol,"\xA0",c(2,2,e.amountOutstanding)," ")}}function Zo(t,s){t&1&&(n(0,"th",23),a(1),r(2,"translate"),o()),t&2&&(i(),m(c(2,1,"labels.inputs.Actions")))}function ta(t,s){if(t&1){let e=F();n(0,"button",27),r(1,"translate"),M("click",function(p){S(e);let f=_(2).$implicit,D=_();return D.routeEdit(p),A(D.editCharge(f))}),g(2,"i",28),o()}t&2&&d("matTooltip",_t(c(1,2,"tooltips.Edit Charge")))}function ea(t,s){if(t&1){let e=F();n(0,"button",29),r(1,"translate"),M("click",function(p){S(e);let f=_(2).$implicit,D=_();return D.routeEdit(p),A(D.deleteCharge(f.id))}),g(2,"i",30),o()}t&2&&d("matTooltip",_t(c(1,2,"tooltips.Delete Charge")))}function ia(t,s){t&1&&(n(0,"span"),C(1,ta,3,4,"button",25)(2,ea,3,4,"button",26),o()),t&2&&(i(),d("mifosxHasPermission","UPDATE_SAVINGSACCOUNTCHARGE"),i(),d("mifosxHasPermission","DELETE_SAVINGSACCOUNTCHARGE"))}function na(t,s){if(t&1){let e=F();n(0,"button",27),r(1,"translate"),M("click",function(p){S(e);let f=_(2).$implicit,D=_();return D.routeEdit(p),A(D.payCharge(f.id))}),g(2,"i",32),o()}t&2&&d("matTooltip",_t(c(1,2,"tooltips.Pay Charge")))}function oa(t,s){if(t&1){let e=F();n(0,"button",27),r(1,"translate"),M("click",function(p){S(e);let f=_(2).$implicit,D=_();return D.routeEdit(p),A(D.waiveCharge(f.id))}),g(2,"i",33),o()}t&2&&d("matTooltip",_t(c(1,2,"tooltips.Waive Charge")))}function aa(t,s){if(t&1){let e=F();n(0,"button",27),r(1,"translate"),M("click",function(p){S(e);let f=_(3).$implicit,D=_();return D.routeEdit(p),A(D.inactivateCharge(f.id))}),g(2,"i",34),o()}t&2&&d("matTooltip",_t(c(1,2,"tooltips.Inactivate Charge")))}function ra(t,s){t&1&&C(0,aa,3,4,"button",25),t&2&&d("mifosxHasPermission","INACTIVATE_SAVINGSACCOUNTCHARGE")}function pa(t,s){if(t&1&&(n(0,"span"),C(1,na,3,4,"button",25)(2,oa,3,4,"button",25),h(3,ra,1,1,"button",31),o()),t&2){let e=_().$implicit,l=_();i(),d("mifosxHasPermission","PAY_SAVINGSACCOUNTCHARGE"),i(),d("mifosxHasPermission","WAIVE_SAVINGSACCOUNTCHARGE"),i(),v(l.isRecurringCharge(e)?3:-1)}}function ca(t,s){if(t&1&&(n(0,"td",24),h(1,ia,3,2,"span"),h(2,pa,4,3,"span"),o()),t&2){let e=s.$implicit,l=_();i(),v(l.fixedDepositsAccountData.status.value==="Submitted and pending approval"?1:-1),i(),v(l.fixedDepositsAccountData.status.value==="Active"&&e.amountOutstanding!==0?2:-1)}}function sa(t,s){t&1&&g(0,"tr",35)}function la(t,s){t&1&&g(0,"tr",36)}var li=(()=>{class t{constructor(){this.savingsService=x($t),this.route=x(N),this.dateUtils=x(et),this.router=x(W),this.dialog=x(Ut),this.settingsService=x(U),this.showInactiveCharges=!1,this.displayedColumns=["name","feeOrPenalty","paymentDueAt","dueAsOf","repeatsOn","calculationType","due","paid","waived","outstanding","actions"],this.route.parent.data.subscribe(e=>{this.fixedDepositsAccountData=e.fixedDepositsAccountData,this.chargesData=this.fixedDepositsAccountData.charges})}ngOnInit(){let e=this.chargesData?this.chargesData.filter(l=>l.isActive):[];this.dataSource=new ve(e)}toggleCharges(){if(this.showInactiveCharges=!this.showInactiveCharges,this.showInactiveCharges){let e=this.chargesData.filter(l=>!l.isActive);this.dataSource.data=e}else{let e=this.chargesData.filter(l=>l.isActive);this.dataSource.data=e}this.chargesTableRef.renderRows()}payCharge(e){let l=[new Ne({controlName:"amount",label:"Amount",value:"",type:"number",required:!0}),new ti({controlName:"dueDate",label:"Payment Date",value:"",type:"date",required:!0})],p={title:`Pay Charge ${e}`,layout:{addButtonText:"Confirm"},formfields:l};this.dialog.open(he,{data:p}).afterClosed().subscribe(D=>{if(D.data){let q=this.settingsService.language.code,re=this.settingsService.dateFormat,pe=X(H({},D.data.value),{dueDate:this.dateUtils.formatDate(D.data.value.dueDate,re),dateFormat:re,locale:q});this.savingsService.executeSavingsAccountChargesCommand(this.fixedDepositsAccountData.id,"paycharge",pe,e).subscribe(()=>{this.reload()})}})}waiveCharge(e){this.dialog.open(ci,{data:{id:e}}).afterClosed().subscribe(p=>{p.confirm&&this.savingsService.executeSavingsAccountChargesCommand(this.fixedDepositsAccountData.id,"waive",{},e).subscribe(()=>{this.reload()})})}inactivateCharge(e){this.dialog.open(si,{data:{id:e}}).afterClosed().subscribe(p=>{p.confirm&&this.savingsService.executeSavingsAccountChargesCommand(this.fixedDepositsAccountData.id,"inactivate",{},e).subscribe(()=>{this.reload()})})}editCharge(e){let l=[new Ne({controlName:"amount",label:"Amount",value:e.amount||e.amountOrPercentage,type:"number",required:!0})],p={title:`Edit Charge ${e.id}`,layout:{addButtonText:"Confirm"},formfields:l};this.dialog.open(he,{data:p}).afterClosed().subscribe(D=>{if(D.data){let q=this.settingsService.language.code,re=this.settingsService.dateFormat,pe=X(H({},D.data.value),{dateFormat:re,locale:q});this.savingsService.editSavingsAccountCharge(this.fixedDepositsAccountData.id,pe,e.id).subscribe(()=>{this.reload()})}})}deleteCharge(e){this.dialog.open(ke,{data:{deleteContext:`charge id:${e}`}}).afterClosed().subscribe(p=>{p.delete&&this.savingsService.deleteSavingsAccountCharge(this.fixedDepositsAccountData.id,e).subscribe(()=>{this.reload()})})}isRecurringCharge(e){return e.chargeTimeType.value==="Monthly Fee"||e.chargeTimeType.value==="Annual Fee"||e.chargeTimeType.value==="Weekly Fee"}routeEdit(e){e.stopPropagation()}reload(){let e=this.fixedDepositsAccountData.clientId,l=this.router.url;this.router.navigateByUrl(`/clients/${e}/fixed-deposits-accounts`,{skipLocationChange:!0}).then(()=>this.router.navigate([l]))}static{this.\u0275fac=function(l){return new(l||t)}}static{this.\u0275cmp=O({type:t,selectors:[["mifosx-charges-tab"]],viewQuery:function(l,p){if(l&1&&ht(Io,7),l&2){let f;vt(f=Dt())&&(p.chargesTableRef=f.first)}},decls:45,vars:7,consts:[["chargesTable",""],[1,"tab-container","mat-typography"],[1,"layout-row","align-start"],[1,"m-b-10"],[1,"action-button","m-b-20"],[1,"mat-elevation-z1","m-b-25"],["mat-table","",3,"dataSource"],["matColumnDef","name"],["mat-header-cell","",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","feeOrPenalty"],["matColumnDef","paymentDueAt"],["matColumnDef","dueAsOf"],["matColumnDef","repeatsOn"],["matColumnDef","calculationType"],["matColumnDef","due"],["matColumnDef","paid"],["matColumnDef","waived"],["matColumnDef","outstanding"],["matColumnDef","actions"],["mat-header-row","",4,"matHeaderRowDef"],["mat-row","",4,"matRowDef","matRowDefColumns"],["mat-raised-button","","color","primary",3,"click"],["mat-header-cell",""],["mat-cell",""],["class","account-action-button","mat-raised-button","","color","primary",3,"matTooltip","click",4,"mifosxHasPermission"],["class","account-action-button","mat-raised-button","","color","warn",3,"matTooltip","click",4,"mifosxHasPermission"],["mat-raised-button","","color","primary",1,"account-action-button",3,"click","matTooltip"],[1,"fa","fa-pencil"],["mat-raised-button","","color","warn",1,"account-action-button",3,"click","matTooltip"],[1,"fa","fa-trash"],["mat-raised-button","","color","primary",1,"account-action-button",3,"matTooltip"],[1,"fa","fa-dollar"],[1,"fa","fa-flag"],[1,"fa","fa-ban"],["mat-header-row",""],["mat-row",""]],template:function(l,p){l&1&&(n(0,"div",1)(1,"div",2)(2,"div",3)(3,"h3"),a(4),r(5,"translate"),o()(),h(6,wo,3,1,"div",4),o(),n(7,"div",5)(8,"table",6,0),b(10,7),C(11,Eo,3,3,"th",8)(12,Bo,2,1,"td",9),P(),b(13,10),C(14,ko,3,3,"th",8)(15,Ro,4,7,"td",9),P(),b(16,11),C(17,No,3,3,"th",8)(18,Vo,3,4,"td",9),P(),b(19,12),C(20,qo,3,3,"th",8)(21,zo,3,3,"td",9),P(),b(22,13),C(23,Ho,3,3,"th",8)(24,$o,4,8,"td",9),P(),b(25,14),C(26,Lo,3,3,"th",8)(27,Go,3,4,"td",9),P(),b(28,15),C(29,Uo,3,3,"th",8)(30,jo,3,4,"td",9),P(),b(31,16),C(32,Wo,3,3,"th",8)(33,Ko,3,4,"td",9),P(),b(34,17),C(35,Qo,3,3,"th",8)(36,Yo,3,4,"td",9),P(),b(37,18),C(38,Jo,3,3,"th",8)(39,Xo,3,4,"td",9),P(),b(40,19),C(41,Zo,3,3,"th",8)(42,ca,3,2,"td",9),P(),C(43,sa,1,0,"tr",20)(44,la,1,0,"tr",21),o()()()),l&2&&(i(4),m(c(5,5,"labels.heading.All Charges")),i(2),v(p.chargesData?6:-1),i(2),d("dataSource",p.dataSource),i(35),d("matHeaderRowDef",p.displayedColumns),i(),d("matRowDefColumns",p.displayedColumns))},dependencies:[y,I,B,de,wt,kt,Bt,Rt,Et,Nt,me,Vt,zt,qt,Ht,yt,w,It,ue],styles:[".tab-container[_ngcontent-%COMP%]{padding:1%;margin:1%}.tab-container[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{margin:1% auto}.tab-container[_ngcontent-%COMP%] .action-button[_ngcontent-%COMP%]{margin-left:auto}.tab-container[_ngcontent-%COMP%] table[_ngcontent-%COMP%]{width:100%}.tab-container[_ngcontent-%COMP%] table[_ngcontent-%COMP%] .account-action-button[_ngcontent-%COMP%]{min-width:26px;padding:0 6px;margin:4px;line-height:25px}"]})}}return t})();var ma=["instructionsTable"];function da(t,s){t&1&&(n(0,"th",16),a(1),r(2,"translate"),o()),t&2&&(i(),m(c(2,1,"labels.inputs.Client")))}function ua(t,s){if(t&1&&(n(0,"td",17),a(1),o()),t&2){let e=s.$implicit;i(),T(" ",e.fromClient.displayName,"-",e.fromClient.id," ")}}function fa(t,s){t&1&&(n(0,"th",16),a(1),r(2,"translate"),o()),t&2&&(i(),m(c(2,1,"labels.inputs.From Account")))}function ga(t,s){if(t&1&&(n(0,"td",17),a(1),o()),t&2){let e=s.$implicit;i(),T(" ",e.fromAccount.accountNo," (",e.fromAccountType.value,") ")}}function xa(t,s){t&1&&(n(0,"th",16),a(1),r(2,"translate"),o()),t&2&&(i(),m(c(2,1,"labels.inputs.Beneficiary")))}function Ca(t,s){if(t&1&&(n(0,"td",17),a(1),o()),t&2){let e=s.$implicit;i(),m(e.toClient.displayName)}}function _a(t,s){t&1&&(n(0,"th",16),a(1),r(2,"translate"),o()),t&2&&(i(),m(c(2,1,"labels.inputs.To Account")))}function ha(t,s){if(t&1&&(n(0,"td",17),a(1),o()),t&2){let e=s.$implicit;i(),T(" ",e.toAccount.accountNo," (",e.toAccountType.value,") ")}}function va(t,s){t&1&&(n(0,"th",16),a(1),r(2,"translate"),o()),t&2&&(i(),m(c(2,1,"labels.inputs.Amount")))}function Da(t,s){if(t&1&&(n(0,"td",17),a(1),o()),t&2){let e=s.$implicit;i(),T("",e.instructionType.value,"/",e.amount)}}function ba(t,s){t&1&&(n(0,"th",16),a(1),r(2,"translate"),o()),t&2&&(i(),m(c(2,1,"labels.inputs.Validity")))}function Pa(t,s){if(t&1&&(n(0,"td",17),a(1),r(2,"dateFormat"),r(3,"dateFormat"),o()),t&2){let e=s.$implicit;i(),T(" ",c(2,2,e.validFrom)," to ",c(3,4,e.validTill)," ")}}function Ma(t,s){t&1&&(n(0,"th",16),a(1),r(2,"translate"),o()),t&2&&(i(),m(c(2,1,"labels.inputs.Actions")))}function Ta(t,s){t&1&&(n(0,"button",19),r(1,"translate"),g(2,"i",20),o()),t&2&&d("matTooltip",_t(c(1,2,"tooltips.Edit Standing Instruction")))}function Sa(t,s){t&1&&(n(0,"span"),C(1,Ta,3,4,"button",18),o()),t&2&&(i(),d("mifosxHasPermission","UPDATE_STANDINGINSTRUCTION"))}function Aa(t,s){if(t&1){let e=F();n(0,"button",22),r(1,"translate"),M("click",function(){S(e);let p=_(2).$implicit,f=_();return A(f.deleteStandingInstruction(p.id))}),g(2,"i",23),o()}t&2&&d("matTooltip",_t(c(1,2,"tooltips.Delete Standing Instruction")))}function Oa(t,s){t&1&&(n(0,"span"),C(1,Aa,3,4,"button",21),o()),t&2&&(i(),d("mifosxHasPermission","DELETE_STANDINGINSTRUCTION"))}function ya(t,s){t&1&&(n(0,"button",19),r(1,"translate"),g(2,"i",24),o()),t&2&&d("matTooltip",_t(c(1,2,"tooltips.View Standing Instruction")))}function Ia(t,s){if(t&1&&(n(0,"td",17),h(1,Sa,2,1,"span"),h(2,Oa,2,1,"span"),C(3,ya,3,4,"button",18),o()),t&2){let e=s.$implicit;i(),v(e.status.value!=="Deleted"?1:-1),i(),v(e.status.value!=="Deleted"?2:-1),i(),d("mifosxHasPermission","READ_STANDINGINSTRUCTION")}}function Fa(t,s){t&1&&g(0,"tr",25)}function wa(t,s){t&1&&g(0,"tr",26)}var mi=(()=>{class t{constructor(){this.route=x(N),this.fixedDepositsService=x(j),this.dialog=x(Ut),this.accountTransfersService=x(cn),this.settingsService=x(U),this.dataSource=new ve,this.displayedColumns=["client","fromAccount","beneficiary","toAccount","amount","validity","actions"],this.route.parent.data.subscribe(e=>{this.fixedDepositsData=e.fixedDepositsAccountData})}ngOnInit(){this.getStandingInstructions()}getStandingInstructions(){let e=this.fixedDepositsData.clientId,l=this.fixedDepositsData.clientName,p=this.fixedDepositsData.id,f=this.settingsService.language.code,D=this.settingsService.dateFormat;this.fixedDepositsService.getStandingInstructions(e,l,p,f,D).subscribe(q=>{this.instructionsData=q.pageItems,this.dataSource.data=this.instructionsData,this.instructionTableRef.renderRows()})}deleteStandingInstruction(e){this.dialog.open(ke,{data:{deleteContext:`standing instruction id: ${e}`}}).afterClosed().subscribe(p=>{p.delete&&this.accountTransfersService.deleteStandingInstrucions(e).subscribe(()=>{})})}static{this.\u0275fac=function(l){return new(l||t)}}static{this.\u0275cmp=O({type:t,selectors:[["mifosx-standing-instructions-tab"]],viewQuery:function(l,p){if(l&1&&ht(ma,7),l&2){let f;vt(f=Dt())&&(p.instructionTableRef=f.first)}},decls:31,vars:6,consts:[["instructionsTable",""],[1,"tab-container","mat-typography"],[1,"m-b-10"],[1,"mat-elevation-z1","m-b-25"],["mat-table","",3,"dataSource"],["matColumnDef","client"],["mat-header-cell","",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","fromAccount"],["matColumnDef","beneficiary"],["matColumnDef","toAccount"],["matColumnDef","amount"],["matColumnDef","validity"],["matColumnDef","actions"],["mat-header-row","",4,"matHeaderRowDef"],["mat-row","",4,"matRowDef","matRowDefColumns"],["mat-header-cell",""],["mat-cell",""],["class","account-action-button","mat-raised-button","","color","primary",3,"matTooltip",4,"mifosxHasPermission"],["mat-raised-button","","color","primary",1,"account-action-button",3,"matTooltip"],[1,"fa","fa-edit"],["class","account-action-button","mat-raised-button","","color","warn",3,"matTooltip","click",4,"mifosxHasPermission"],["mat-raised-button","","color","warn",1,"account-action-button",3,"click","matTooltip"],[1,"fa","fa-times"],[1,"fa","fa-eye"],["mat-header-row",""],["mat-row",""]],template:function(l,p){l&1&&(n(0,"div",1)(1,"div",2)(2,"h3"),a(3),r(4,"translate"),o()(),n(5,"div",3)(6,"table",4,0),b(8,5),C(9,da,3,3,"th",6)(10,ua,2,2,"td",7),P(),b(11,8),C(12,fa,3,3,"th",6)(13,ga,2,2,"td",7),P(),b(14,9),C(15,xa,3,3,"th",6)(16,Ca,2,1,"td",7),P(),b(17,10),C(18,_a,3,3,"th",6)(19,ha,2,2,"td",7),P(),b(20,11),C(21,va,3,3,"th",6)(22,Da,2,2,"td",7),P(),b(23,12),C(24,ba,3,3,"th",6)(25,Pa,4,6,"td",7),P(),b(26,13),C(27,Ma,3,3,"th",6)(28,Ia,4,3,"td",7),P(),C(29,Fa,1,0,"tr",14)(30,wa,1,0,"tr",15),o()()()),l&2&&(i(3),m(c(4,4,"labels.heading.All Standing Instructions")),i(3),d("dataSource",p.dataSource),i(23),d("matHeaderRowDef",p.displayedColumns),i(),d("matRowDefColumns",p.displayedColumns))},dependencies:[y,I,B,de,wt,kt,Bt,Rt,Et,Nt,me,Vt,zt,qt,Ht,yt,w],styles:[".tab-container[_ngcontent-%COMP%]{padding:1%;margin:1%}.tab-container[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{margin:1% auto}.tab-container[_ngcontent-%COMP%] .action-button[_ngcontent-%COMP%]{margin-left:auto}.tab-container[_ngcontent-%COMP%] table[_ngcontent-%COMP%]{width:100%}.tab-container[_ngcontent-%COMP%] table[_ngcontent-%COMP%] .account-action-button[_ngcontent-%COMP%]{min-width:26px;padding:0 6px;margin:4px;line-height:25px}"]})}}return t})();var di=(()=>{class t{constructor(){this.route=x(N),this.entityId=this.route.parent.parent.snapshot.paramMap.get("fixedDepositAccountId"),this.route.data.subscribe(e=>{this.entityDatatable=e.savingsDatatable,this.multiRowDatatableFlag=this.entityDatatable.columnHeaders[0].columnName==="id"})}static{this.\u0275fac=function(l){return new(l||t)}}static{this.\u0275cmp=O({type:t,selectors:[["mifosx-datatable-tabs"]],decls:2,vars:3,consts:[[1,"tab-container","mat-typography"],["entityType","Fixed Deposit",3,"entityId","multiRowDatatableFlag","entityDatatable"]],template:function(l,p){l&1&&(n(0,"div",0),g(1,"mifosx-entity-datatable-tab",1),o()),l&2&&(i(),d("entityId",p.entityId)("multiRowDatatableFlag",p.multiRowDatatableFlag)("entityDatatable",p.entityDatatable))},dependencies:[y,I,on],encapsulation:2})}}return t})();var Ea=()=>["../../"];function Ba(t,s){t&1&&(n(0,"mat-error"),a(1),r(2,"translate"),r(3,"translate"),n(4,"strong"),a(5),r(6,"translate"),o()()),t&2&&(i(),T(" ",c(2,3,"labels.inputs.Approved On Date")," ",c(3,5,"labels.commons.is")," "),i(4),m(c(6,7,"labels.commons.required")))}var ui=(()=>{class t{constructor(){this.formBuilder=x(mt),this.fixedDepositsService=x(j),this.dateUtils=x(et),this.route=x(N),this.router=x(W),this.settingsService=x(U),this.minDate=new Date(2e3,0,1),this.maxDate=new Date,this.accountId=this.route.parent.snapshot.params.fixedDepositAccountId}ngOnInit(){this.maxDate=this.settingsService.businessDate,this.createApproveFixedDepositsAccountForm()}createApproveFixedDepositsAccountForm(){this.approveFixedDepositsAccountForm=this.formBuilder.group({approvedOnDate:["",V.required],note:[""]})}submit(){let e=this.approveFixedDepositsAccountForm.value,l=this.settingsService.language.code,p=this.settingsService.dateFormat,f=this.approveFixedDepositsAccountForm.value.approvedOnDate;e.approvedOnDate instanceof Date&&(e.approvedOnDate=this.dateUtils.formatDate(f,p));let D=X(H({},e),{dateFormat:p,locale:l});this.fixedDepositsService.executeFixedDepositsAccountCommand(this.accountId,"approve",D).subscribe(()=>{this.router.navigate(["../../"],{relativeTo:this.route})})}static{this.\u0275fac=function(l){return new(l||t)}}static{this.\u0275cmp=O({type:t,selectors:[["mifosx-approve-fixed-deposits-account"]],decls:26,vars:21,consts:[["approvedOnDatePicker",""],[1,"container"],[3,"ngSubmit","formGroup"],[1,"layout-column"],[3,"click"],["matInput","","required","","formControlName","approvedOnDate",3,"min","max","matDatepicker"],["matSuffix","",3,"for"],["matInput","","formControlName","note","cdkTextareaAutosize","","cdkAutosizeMinRows","2"],[1,"layout-row","align-center","gap-5px","responsive-column"],["type","button","mat-raised-button","",3,"routerLink"],["mat-raised-button","","color","primary",3,"disabled"]],template:function(l,p){if(l&1){let f=F();n(0,"div",1)(1,"mat-card")(2,"form",2),M("ngSubmit",function(){return S(f),A(p.submit())}),n(3,"mat-card-content")(4,"div",3)(5,"mat-form-field",4),M("click",function(){S(f);let q=k(12);return A(q.open())}),n(6,"mat-label"),a(7),r(8,"translate"),o(),g(9,"input",5)(10,"mat-datepicker-toggle",6)(11,"mat-datepicker",null,0),h(13,Ba,7,9,"mat-error"),o(),n(14,"mat-form-field")(15,"mat-label"),a(16),r(17,"translate"),o(),g(18,"textarea",7),o()()(),n(19,"mat-card-actions",8)(20,"button",9),a(21),r(22,"translate"),o(),n(23,"button",10),a(24),r(25,"translate"),o()()()()()}if(l&2){let f=k(12);i(2),d("formGroup",p.approveFixedDepositsAccountForm),i(5),m(c(8,12,"labels.inputs.Approved On Date")),i(2),d("min",p.minDate)("max",p.maxDate)("matDatepicker",f),i(),d("for",f),i(3),v(p.approveFixedDepositsAccountForm.controls.approvedOnDate.hasError("required")?13:-1),i(3),m(c(17,14,"labels.inputs.Note")),i(4),d("routerLink",R(20,Ea)),i(),u(" ",c(22,16,"labels.buttons.Cancel")," "),i(2),d("disabled",!p.approveFixedDepositsAccountForm),i(),u(" ",c(25,18,"labels.buttons.Confirm")," ")}},dependencies:[y,I,ct,rt,it,pt,gt,st,lt,tt,Y,xt,bt,ot,nt,Ct,Pt,dt,Tt,St,Mt,B,Ft,w],styles:[".container[_ngcontent-%COMP%]{max-width:37rem}"]})}}return t})();var ka=()=>["../../"];function Ra(t,s){t&1&&(n(0,"mat-error"),a(1),r(2,"translate"),r(3,"translate"),n(4,"strong"),a(5),r(6,"translate"),o()()),t&2&&(i(),T(" ",c(2,3,"labels.inputs.Rejected On Date")," ",c(3,5,"labels.commons.is")," "),i(4),m(c(6,7,"labels.commons.required")))}var fi=(()=>{class t{constructor(){this.formBuilder=x(mt),this.fixedDepositsService=x(j),this.dateUtils=x(et),this.route=x(N),this.router=x(W),this.settingsService=x(U),this.minDate=new Date(2e3,0,1),this.maxDate=new Date,this.accountId=this.route.parent.snapshot.params.fixedDepositAccountId}ngOnInit(){this.maxDate=this.settingsService.businessDate,this.createRejectFixedDepositsAccountForm()}createRejectFixedDepositsAccountForm(){this.rejectFixedDepositsAccountForm=this.formBuilder.group({rejectedOnDate:["",V.required],note:[""]})}submit(){let e=this.rejectFixedDepositsAccountForm.value,l=this.settingsService.language.code,p=this.settingsService.dateFormat,f=this.rejectFixedDepositsAccountForm.value.rejectedOnDate;e.rejectedOnDate instanceof Date&&(e.rejectedOnDate=this.dateUtils.formatDate(f,p));let D=X(H({},e),{dateFormat:p,locale:l});this.fixedDepositsService.executeFixedDepositsAccountCommand(this.accountId,"reject",D).subscribe(()=>{this.router.navigate(["../../"],{relativeTo:this.route})})}static{this.\u0275fac=function(l){return new(l||t)}}static{this.\u0275cmp=O({type:t,selectors:[["mifosx-reject-fixed-deposits-account"]],decls:26,vars:21,consts:[["rejectedOnDatePicker",""],[1,"container"],[3,"ngSubmit","formGroup"],[1,"layout-column"],[3,"click"],["matInput","","required","","formControlName","rejectedOnDate",3,"min","max","matDatepicker"],["matSuffix","",3,"for"],["matInput","","formControlName","note","cdkTextareaAutosize","","cdkAutosizeMinRows","2"],[1,"layout-row","align-center","gap-5px","responsive-column"],["type","button","mat-raised-button","",3,"routerLink"],["mat-raised-button","","color","warn",3,"disabled"]],template:function(l,p){if(l&1){let f=F();n(0,"div",1)(1,"mat-card")(2,"form",2),M("ngSubmit",function(){return S(f),A(p.submit())}),n(3,"mat-card-content")(4,"div",3)(5,"mat-form-field",4),M("click",function(){S(f);let q=k(12);return A(q.open())}),n(6,"mat-label"),a(7),r(8,"translate"),o(),g(9,"input",5)(10,"mat-datepicker-toggle",6)(11,"mat-datepicker",null,0),h(13,Ra,7,9,"mat-error"),o(),n(14,"mat-form-field")(15,"mat-label"),a(16),r(17,"translate"),o(),g(18,"textarea",7),o()()(),n(19,"mat-card-actions",8)(20,"button",9),a(21),r(22,"translate"),o(),n(23,"button",10),a(24),r(25,"translate"),o()()()()()}if(l&2){let f=k(12);i(2),d("formGroup",p.rejectFixedDepositsAccountForm),i(5),m(c(8,12,"labels.inputs.Rejected On Date")),i(2),d("min",p.minDate)("max",p.maxDate)("matDatepicker",f),i(),d("for",f),i(3),v(p.rejectFixedDepositsAccountForm.controls.rejectedOnDate.hasError("required")?13:-1),i(3),m(c(17,14,"labels.inputs.Note")),i(4),d("routerLink",R(20,ka)),i(),u(" ",c(22,16,"labels.buttons.Cancel")," "),i(2),d("disabled",!p.rejectFixedDepositsAccountForm.valid),i(),u(" ",c(25,18,"labels.buttons.Confirm")," ")}},dependencies:[y,I,ct,rt,it,pt,gt,st,lt,tt,Y,xt,bt,ot,nt,Ct,Pt,dt,Tt,St,Mt,B,Ft,w],styles:[".container[_ngcontent-%COMP%]{max-width:37rem}"]})}}return t})();var Na=()=>["../../"];function Va(t,s){t&1&&(n(0,"mat-error"),a(1),r(2,"translate"),r(3,"translate"),n(4,"strong"),a(5),r(6,"translate"),o()()),t&2&&(i(),T(" ",c(2,3,"labels.inputs.Activated On Date")," ",c(3,5,"labels.commons.is")," "),i(4),m(c(6,7,"labels.commons.required")))}var gi=(()=>{class t{constructor(){this.formBuilder=x(mt),this.savingsService=x($t),this.dateUtils=x(et),this.route=x(N),this.router=x(W),this.settingsService=x(U),this.minDate=new Date(2e3,0,1),this.maxDate=new Date,this.accountId=this.route.parent.snapshot.params.fixedDepositAccountId}ngOnInit(){this.maxDate=this.settingsService.businessDate,this.createActivateFixedDepositsAccountForm()}createActivateFixedDepositsAccountForm(){this.activateFixedDepositsAccountForm=this.formBuilder.group({activatedOnDate:["",V.required]})}submit(){let e=this.activateFixedDepositsAccountForm.value,l=this.settingsService.language.code,p=this.settingsService.dateFormat,f=this.activateFixedDepositsAccountForm.value.activatedOnDate;e.activatedOnDate instanceof Date&&(e.activatedOnDate=this.dateUtils.formatDate(f,p));let D=X(H({},e),{dateFormat:p,locale:l});this.savingsService.executeSavingsAccountCommand(this.accountId,"activate",D).subscribe(()=>{this.router.navigate(["../../"],{relativeTo:this.route})})}static{this.\u0275fac=function(l){return new(l||t)}}static{this.\u0275cmp=O({type:t,selectors:[["mifosx-activate-fixed-deposits-account"]],decls:20,vars:18,consts:[["activatedOnDatePicker",""],[1,"container"],[3,"ngSubmit","formGroup"],[1,"flex-100",3,"click"],["matInput","","required","","formControlName","activatedOnDate",3,"min","max","matDatepicker"],["matSuffix","",3,"for"],[1,"layout-row","align-center","gap-5px","responsive-column"],["type","button","mat-raised-button","",3,"routerLink"],["mat-raised-button","","color","primary",3,"disabled"]],template:function(l,p){if(l&1){let f=F();n(0,"div",1)(1,"mat-card")(2,"form",2),M("ngSubmit",function(){return S(f),A(p.submit())}),n(3,"mat-card-content")(4,"mat-form-field",3),M("click",function(){S(f);let q=k(11);return A(q.open())}),n(5,"mat-label"),a(6),r(7,"translate"),o(),g(8,"input",4)(9,"mat-datepicker-toggle",5)(10,"mat-datepicker",null,0),h(12,Va,7,9,"mat-error"),o()(),n(13,"mat-card-actions",6)(14,"button",7),a(15),r(16,"translate"),o(),n(17,"button",8),a(18),r(19,"translate"),o()()()()()}if(l&2){let f=k(11);i(2),d("formGroup",p.activateFixedDepositsAccountForm),i(4),m(c(7,11,"labels.inputs.Activated On Date")),i(2),d("min",p.minDate)("max",p.maxDate)("matDatepicker",f),i(),d("for",f),i(3),v(p.activateFixedDepositsAccountForm.controls.activatedOnDate.hasError("required")?12:-1),i(2),d("routerLink",R(17,Na)),i(),u(" ",c(16,13,"labels.buttons.Cancel")," "),i(2),d("disabled",!p.activateFixedDepositsAccountForm.valid),i(),u(" ",c(19,15,"labels.buttons.Confirm")," ")}},dependencies:[y,I,ct,rt,it,pt,gt,st,lt,tt,Y,xt,bt,ot,nt,Ct,Pt,dt,Tt,St,Mt,B,w],styles:[".container[_ngcontent-%COMP%]{max-width:37rem}"]})}}return t})();var qa=()=>["../../"],xi=(()=>{class t{constructor(){this.formBuilder=x(mt),this.savingsService=x($t),this.fixedDepositsService=x(j),this.route=x(N),this.router=x(W),this.undoCommand="undoapproval",this.undoAction=this.route.snapshot.params.name,this.undoAction==="Undo Activation"&&(this.undoCommand="undoactivate"),this.accountId=this.route.parent.snapshot.params.fixedDepositAccountId}ngOnInit(){this.createUndoApprovalFixedDepositsAccountForm()}createUndoApprovalFixedDepositsAccountForm(){this.undoApprovalFixedDepositsAccountForm=this.formBuilder.group({note:[""]})}submit(){let e=H({},this.undoApprovalFixedDepositsAccountForm.value);this.undoAction==="Undo Activation"?this.fixedDepositsService.executeFixedDepositsAccountCommand(this.accountId,this.undoCommand,e).subscribe(()=>{this.router.navigate(["../../"],{relativeTo:this.route})}):this.savingsService.executeSavingsAccountCommand(this.accountId,this.undoCommand,e).subscribe(()=>{this.router.navigate(["../../"],{relativeTo:this.route})})}static{this.\u0275fac=function(l){return new(l||t)}}static{this.\u0275cmp=O({type:t,selectors:[["mifosx-undo-approval-fixed-deposits-account"]],decls:16,vars:13,consts:[[1,"container"],[3,"ngSubmit","formGroup"],[1,"flex-100"],["matInput","","formControlName","note","cdkTextareaAutosize","","cdkAutosizeMinRows","2"],[1,"layout-row","align-center","gap-5px","responsive-column"],["type","button","mat-raised-button","",3,"routerLink"],["mat-raised-button","","color","warn",3,"disabled"]],template:function(l,p){l&1&&(n(0,"div",0)(1,"mat-card")(2,"form",1),M("ngSubmit",function(){return p.submit()}),n(3,"mat-card-content")(4,"mat-form-field",2)(5,"mat-label"),a(6),r(7,"translate"),o(),g(8,"textarea",3),o()(),n(9,"mat-card-actions",4)(10,"button",5),a(11),r(12,"translate"),o(),n(13,"button",6),a(14),r(15,"translate"),o()()()()()),l&2&&(i(2),d("formGroup",p.undoApprovalFixedDepositsAccountForm),i(4),m(c(7,6,"labels.inputs.Note")),i(4),d("routerLink",R(12,qa)),i(),u(" ",c(12,8,"labels.buttons.Cancel")," "),i(2),d("disabled",!p.undoApprovalFixedDepositsAccountForm.valid),i(),u(" ",c(15,10,"labels.buttons.Confirm")," "))},dependencies:[y,I,ct,rt,it,pt,st,lt,tt,Y,xt,bt,ot,nt,dt,B,Ft,w],styles:[".container[_ngcontent-%COMP%]{max-width:37rem}"]})}}return t})();var za=()=>["../../"];function Ha(t,s){t&1&&(n(0,"mat-error"),a(1),r(2,"translate"),r(3,"translate"),n(4,"strong"),a(5),r(6,"translate"),o()()),t&2&&(i(),T(" ",c(2,3,"labels.inputs.Withdrawn On Date")," ",c(3,5,"labels.commons.is")," "),i(4),m(c(6,7,"labels.commons.required")))}var Ci=(()=>{class t{constructor(){this.formBuilder=x(mt),this.fixedDepositsService=x(j),this.dateUtils=x(et),this.route=x(N),this.router=x(W),this.settingsService=x(U),this.minDate=new Date(2e3,0,1),this.maxDate=new Date,this.accountId=this.route.parent.snapshot.params.fixedDepositAccountId}ngOnInit(){this.maxDate=this.settingsService.businessDate,this.createWithdrawFixedDepositsAccountForm()}createWithdrawFixedDepositsAccountForm(){this.withdrawFixedDepositsAccountForm=this.formBuilder.group({withdrawnOnDate:["",V.required],note:[""]})}submit(){let e=this.withdrawFixedDepositsAccountForm.value,l=this.settingsService.language.code,p=this.settingsService.dateFormat,f=this.withdrawFixedDepositsAccountForm.value.withdrawnOnDate;e.withdrawnOnDate instanceof Date&&(e.withdrawnOnDate=this.dateUtils.formatDate(f,p));let D=X(H({},e),{dateFormat:p,locale:l});this.fixedDepositsService.executeFixedDepositsAccountCommand(this.accountId,"withdrawnByApplicant",D).subscribe(()=>{this.router.navigate(["../../"],{relativeTo:this.route})})}static{this.\u0275fac=function(l){return new(l||t)}}static{this.\u0275cmp=O({type:t,selectors:[["mifosx-withdraw-by-client-fixed-deposits-account"]],decls:26,vars:21,consts:[["withdrawnOnDatePicker",""],[1,"container"],[3,"ngSubmit","formGroup"],[1,"layout-column"],[3,"click"],["matInput","","required","","formControlName","withdrawnOnDate",3,"min","max","matDatepicker"],["matSuffix","",3,"for"],["matInput","","formControlName","note","cdkTextareaAutosize","","cdkAutosizeMinRows","2"],[1,"layout-row","align-center","gap-5px","responsive-column"],["type","button","mat-raised-button","",3,"routerLink"],["mat-raised-button","","color","primary",3,"disabled"]],template:function(l,p){if(l&1){let f=F();n(0,"div",1)(1,"mat-card")(2,"form",2),M("ngSubmit",function(){return S(f),A(p.submit())}),n(3,"mat-card-content")(4,"div",3)(5,"mat-form-field",4),M("click",function(){S(f);let q=k(12);return A(q.open())}),n(6,"mat-label"),a(7),r(8,"translate"),o(),g(9,"input",5)(10,"mat-datepicker-toggle",6)(11,"mat-datepicker",null,0),h(13,Ha,7,9,"mat-error"),o(),n(14,"mat-form-field")(15,"mat-label"),a(16),r(17,"translate"),o(),g(18,"textarea",7),o()()(),n(19,"mat-card-actions",8)(20,"button",9),a(21),r(22,"translate"),o(),n(23,"button",10),a(24),r(25,"translate"),o()()()()()}if(l&2){let f=k(12);i(2),d("formGroup",p.withdrawFixedDepositsAccountForm),i(5),m(c(8,12,"labels.inputs.Withdrawn On Date")),i(2),d("min",p.minDate)("max",p.maxDate)("matDatepicker",f),i(),d("for",f),i(3),v(p.withdrawFixedDepositsAccountForm.controls.withdrawnOnDate.hasError("required")?13:-1),i(3),m(c(17,14,"labels.inputs.Note")),i(4),d("routerLink",R(20,za)),i(),u(" ",c(22,16,"labels.buttons.Cancel")," "),i(2),d("disabled",!p.withdrawFixedDepositsAccountForm.valid),i(),u(" ",c(25,18,"labels.buttons.Confirm")," ")}},dependencies:[y,I,ct,rt,it,pt,gt,st,lt,tt,Y,xt,bt,ot,nt,Ct,Pt,dt,Tt,St,Mt,B,Ft,w],styles:[".container[_ngcontent-%COMP%]{max-width:37rem}"]})}}return t})();var $a=()=>["../../"];function La(t,s){if(t&1&&(n(0,"mat-option",6),a(1),o()),t&2){let e=s.$implicit;d("value",e.id),i(),u(" ",e.name+" ("+e.currency.name+")"," ")}}function Ga(t,s){t&1&&(n(0,"mat-error"),a(1),r(2,"translate"),r(3,"translate"),n(4,"strong"),a(5),r(6,"translate"),o()()),t&2&&(i(),T(" ",c(2,3,"labels.inputs.Charge")," ",c(3,5,"labels.commons.is")," "),i(4),m(c(6,7,"labels.commons.required")))}function Ua(t,s){t&1&&(n(0,"mat-error"),a(1),r(2,"translate"),r(3,"translate"),n(4,"strong"),a(5),r(6,"translate"),o()()),t&2&&(i(),T(" ",c(2,3,"labels.inputs.Amount")," ",c(3,5,"labels.commons.is")," "),i(4),m(c(6,7,"labels.commons.required")))}function ja(t,s){if(t&1&&(n(0,"mat-option",6),a(1),o()),t&2){let e=s.$implicit;d("value",e.id),i(),u(" ",e.value," ")}}function Wa(t,s){if(t&1&&(n(0,"mat-option",6),a(1),o()),t&2){let e=s.$implicit;d("value",e.id),i(),u(" ",e.value," ")}}function Ka(t,s){t&1&&(n(0,"mat-error"),a(1),r(2,"translate"),r(3,"translate"),n(4,"strong"),a(5),r(6,"translate"),o()()),t&2&&(i(),T(" ",c(2,3,"labels.inputs.Due for collection on")," ",c(3,5,"labels.commons.is")," "),i(4),m(c(6,7,"labels.commons.required")))}function Qa(t,s){if(t&1){let e=F();n(0,"mat-form-field",13),M("click",function(){S(e);let p=k(7);return A(p.open())}),n(1,"mat-label"),a(2),r(3,"translate"),o(),g(4,"input",14)(5,"mat-datepicker-toggle",15)(6,"mat-datepicker",null,0),h(8,Ka,7,9,"mat-error"),o()}if(t&2){let e=k(7),l=_(2);i(2),m(c(3,6,"labels.inputs.Due for collection on")),i(2),d("min",l.minDate)("max",l.maxDate)("matDatepicker",e),i(),d("for",e),i(3),v(l.fixedDepositsChargeForm.controls.dueDate.hasError("required")?8:-1)}}function Ya(t,s){t&1&&(n(0,"mat-error"),a(1),r(2,"translate"),r(3,"translate"),n(4,"strong"),a(5),r(6,"translate"),o()()),t&2&&(i(),T(" ",c(2,3,"labels.inputs.Due Date")," ",c(3,5,"labels.commons.is")," "),i(4),m(c(6,7,"labels.commons.required")))}function Ja(t,s){if(t&1){let e=F();n(0,"mat-form-field",13),M("click",function(){S(e);let p=k(7);return A(p.open())}),n(1,"mat-label"),a(2),r(3,"translate"),o(),g(4,"input",16)(5,"mat-datepicker-toggle",15)(6,"mat-datepicker",null,1),h(8,Ya,7,9,"mat-error"),o()}if(t&2){let e=k(7),l=_(2);i(2),m(c(3,6,"labels.inputs.Due On")),i(2),d("min",l.minDate)("max",l.maxDate)("matDatepicker",e),i(),d("for",e),i(3),v(l.fixedDepositsChargeForm.controls.feeOnMonthDay.hasError("required")?8:-1)}}function Xa(t,s){t&1&&(n(0,"mat-form-field")(1,"mat-label"),a(2),r(3,"translate"),o(),g(4,"input",17),o()),t&2&&(i(2),m(c(3,1,"labels.inputs.Repeats Every")))}function Za(t,s){if(t&1&&(n(0,"div",4)(1,"mat-form-field")(2,"mat-label"),a(3),r(4,"translate"),o(),g(5,"input",10),h(6,Ua,7,9,"mat-error"),o(),n(7,"mat-form-field")(8,"mat-label"),a(9),r(10,"translate"),o(),n(11,"mat-select",11),L(12,ja,2,2,"mat-option",6,$),o()(),n(14,"mat-form-field")(15,"mat-label"),a(16),r(17,"translate"),o(),n(18,"mat-select",12),L(19,Wa,2,2,"mat-option",6,$),o()(),h(21,Qa,9,8,"mat-form-field"),h(22,Ja,9,8,"mat-form-field"),h(23,Xa,5,3,"mat-form-field"),o()),t&2){let e=_();i(3),m(c(4,7,"labels.inputs.Amount")),i(3),v(e.fixedDepositsChargeForm.controls.amount.hasError("required")?6:-1),i(3),m(c(10,9,"labels.inputs.Charge Calculation")),i(3),G(e.chargeDetails.chargeCalculationTypeOptions),i(4),m(c(17,11,"labels.inputs.Charge time type")),i(3),G(e.chargeDetails.chargeTimeTypeOptions),i(2),v(e.fixedDepositsChargeForm.contains("dueDate")?21:-1),i(),v(e.fixedDepositsChargeForm.contains("feeOnMonthDay")?22:-1),i(),v(e.fixedDepositsChargeForm.contains("feeInterval")?23:-1)}}var _i=(()=>{class t{constructor(){this.formBuilder=x(mt),this.route=x(N),this.router=x(W),this.dateUtils=x(et),this.savingsService=x($t),this.settingsService=x(U),this.minDate=new Date(2e3,0,1),this.maxDate=new Date,this.route.data.subscribe(e=>{this.savingsChargeOptions=e.fixedDepositsAccountActionData.chargeOptions}),this.fixedDepositAccountId=this.route.parent.snapshot.params.fixedDepositAccountId}ngOnInit(){this.maxDate=this.settingsService.businessDate,this.createFixedDepositsChargeForm(),this.buildDependencies()}buildDependencies(){this.fixedDepositsChargeForm.controls.chargeId.valueChanges.subscribe(e=>{this.savingsService.getChargeTemplate(e).subscribe(l=>{this.chargeDetails=l;let p=l.chargeTimeType.id;(l.chargeTimeType.value==="Withdrawal Fee"||l.chargeTimeType.value==="Saving No Activity Fee")&&(this.chargeDetails.dueDateNotRequired=!0),(l.chargeTimeType.value==="Annual Fee"||l.chargeTimeType.value==="Monthly Fee")&&(this.chargeDetails.chargeTimeTypeAnnualOrMonth=!0),!this.chargeDetails.dueDateNotRequired&&!this.chargeDetails.chargeTimeTypeAnnualOrMonth?this.fixedDepositsChargeForm.addControl("dueDate",new Z("",V.required)):this.fixedDepositsChargeForm.removeControl("dueDate"),!this.chargeDetails.dueDateNotRequired&&this.chargeDetails.chargeTimeTypeAnnualOrMonth?this.fixedDepositsChargeForm.addControl("feeOnMonthDay",new Z("",V.required)):this.fixedDepositsChargeForm.removeControl("feeOnMonthDay"),p.value==="Monthly Fee"?this.fixedDepositsChargeForm.addControl("feeInterval",new Z(l.feeInterval,V.required)):this.fixedDepositsChargeForm.removeControl("feeInterval"),this.fixedDepositsChargeForm.patchValue({amount:l.amount,chargeCalculationType:l.chargeCalculationType.id,chargeTimeType:l.chargeTimeType.id})})})}createFixedDepositsChargeForm(){this.fixedDepositsChargeForm=this.formBuilder.group({chargeId:["",V.required],amount:["",V.required],chargeCalculationType:[{value:"",disabled:!0}],chargeTimeType:[{value:"",disabled:!0}]})}submit(){let e=this.fixedDepositsChargeForm.value;if(e.locale=this.settingsService.language.code,e.feeInterval||(e.feeInterval=this.chargeDetails.feeInterval),this.chargeDetails.dueDateNotRequired!==!0)if(this.chargeDetails.chargeTimeTypeAnnualOrMonth===!0){let l="MMMM-dd";if(e.monthDayFormat=l,e.feeOnMonthDay){let p=this.fixedDepositsChargeForm.value.feeOnMonthDay;e.feeOnMonthDay=this.dateUtils.formatDate(p,l)}}else{let l=this.settingsService.dateFormat;if(e.dateFormat=l,e.dueDate){let p=this.fixedDepositsChargeForm.value.dueDate;e.dueDate=this.dateUtils.formatDate(p,l)}}this.savingsService.createSavingsCharge(this.fixedDepositAccountId,"charges",e).subscribe(()=>{this.router.navigate(["../../"],{relativeTo:this.route})})}static{this.\u0275fac=function(l){return new(l||t)}}static{this.\u0275cmp=O({type:t,selectors:[["mifosx-add-charge-fixed-deposits-account"]],decls:21,vars:15,consts:[["dueDatePicker",""],["feeOnMonthDayPicker",""],[1,"container"],[3,"ngSubmit","formGroup"],[1,"layout-column"],["required","","formControlName","chargeId"],[3,"value"],[1,"layout-row","layout-xs-column","layout-align-center","gap-5px"],["type","button","mat-raised-button","",3,"routerLink"],["mat-raised-button","","color","primary",3,"disabled"],["type","number","required","","matInput","","formControlName","amount"],["formControlName","chargeCalculationType"],["formControlName","chargeTimeType"],[3,"click"],["matInput","","required","","formControlName","dueDate",3,"min","max","matDatepicker"],["matSuffix","",3,"for"],["matInput","","required","","formControlName","feeOnMonthDay",3,"min","max","matDatepicker"],["matInput","","formControlName","feeInterval"]],template:function(l,p){l&1&&(n(0,"div",2)(1,"mat-card")(2,"form",3),M("ngSubmit",function(){return p.submit()}),n(3,"mat-card-content")(4,"div",4)(5,"mat-form-field")(6,"mat-label"),a(7),r(8,"translate"),o(),n(9,"mat-select",5),L(10,La,2,2,"mat-option",6,$),o(),h(12,Ga,7,9,"mat-error"),o(),h(13,Za,24,13,"div",4),o(),n(14,"mat-card-actions",7)(15,"button",8),a(16),r(17,"translate"),o(),n(18,"button",9),a(19),r(20,"translate"),o()()()()()()),l&2&&(i(2),d("formGroup",p.fixedDepositsChargeForm),i(5),m(c(8,8,"labels.inputs.Charge")),i(3),G(p.savingsChargeOptions),i(2),v(p.fixedDepositsChargeForm.controls.chargeId.hasError("required")?12:-1),i(),v(p.chargeDetails?13:-1),i(2),d("routerLink",R(14,$a)),i(),u(" ",c(17,10,"labels.buttons.Cancel")," "),i(2),d("disabled",!p.fixedDepositsChargeForm.valid),i(),u(" ",c(20,12,"labels.buttons.Submit")," "))},dependencies:[y,I,ct,rt,jt,it,pt,gt,st,lt,tt,Y,xt,bt,ot,nt,Ct,Pt,dt,Ot,At,Tt,St,Mt,B,w],styles:[".container[_ngcontent-%COMP%]{width:37rem}"]})}}return t})();var tr=()=>["../../"];function er(t,s){t&1&&(n(0,"mat-error"),a(1),r(2,"translate"),r(3,"translate"),n(4,"strong"),a(5),r(6,"translate"),o()()),t&2&&(i(),T(" ",c(2,3,"labels.inputs.Premature Close Date")," ",c(3,5,"labels.commons.is")," "),i(4),m(c(6,7,"labels.commons.required")))}function ir(t,s){t&1&&(n(0,"mat-form-field")(1,"mat-label"),a(2),r(3,"translate"),o(),g(4,"input",10),o()),t&2&&(i(2),m(c(3,1,"labels.inputs.Maturity Amount")))}function nr(t,s){if(t&1&&(n(0,"mat-option",12),a(1),o()),t&2){let e=s.$implicit;d("value",e.id),i(),u(" ",e.value," ")}}function or(t,s){t&1&&(n(0,"mat-error"),a(1),r(2,"translate"),r(3,"translate"),n(4,"strong"),a(5),r(6,"translate"),o()()),t&2&&(i(),T(" ",c(2,3,"labels.inputs.Account action")," ",c(3,5,"labels.commons.is")," "),i(4),m(c(6,7,"labels.commons.required")))}function ar(t,s){if(t&1&&(n(0,"mat-form-field")(1,"mat-label"),a(2),r(3,"translate"),o(),n(4,"mat-select",11),L(5,nr,2,2,"mat-option",12,$),o(),h(7,or,7,9,"mat-error"),o()),t&2){let e=_();i(2),m(c(3,2,"labels.inputs.Action")),i(3),G(e.onAccountClosureOptions),i(2),v(e.prematureCloseAccountForm.controls.onAccountClosureId.hasError("required")?7:-1)}}function rr(t,s){if(t&1&&(n(0,"mat-option",12),a(1),o()),t&2){let e=s.$implicit;d("value",e.id),i(),u(" ",e.accountNo," ")}}function pr(t,s){t&1&&(n(0,"mat-error"),a(1),r(2,"translate"),r(3,"translate"),n(4,"strong"),a(5),r(6,"translate"),o()()),t&2&&(i(),T(" ",c(2,3,"labels.inputs.Transfer to savings account")," ",c(3,5,"labels.commons.is")," "),i(4),m(c(6,7,"labels.commons.required")))}function cr(t,s){if(t&1&&(n(0,"mat-form-field")(1,"mat-label"),a(2),r(3,"translate"),o(),n(4,"mat-select",13),L(5,rr,2,2,"mat-option",12,$),o(),h(7,pr,7,9,"mat-error"),o()),t&2){let e=_();i(2),m(c(3,2,"labels.inputs.Transfer to Savings")),i(3),G(e.savingsAccountsData),i(2),v(e.prematureCloseAccountForm.controls.toSavingsAccountId.hasError("required")?7:-1)}}function sr(t,s){t&1&&(n(0,"mat-form-field")(1,"mat-label"),a(2),r(3,"translate"),o(),g(4,"input",14),o()),t&2&&(i(2),m(c(3,1,"labels.inputs.Transfer Description")))}function lr(t,s){t&1&&(n(0,"mat-form-field")(1,"mat-label"),a(2),r(3,"translate"),o(),g(4,"textarea",15),o()),t&2&&(i(2),m(c(3,1,"labels.inputs.Note")))}var hi=(()=>{class t{constructor(){this.formBuilder=x(mt),this.fixedDepositsService=x(j),this.dateUtils=x(et),this.route=x(N),this.router=x(W),this.settingsService=x(U),this.minDate=new Date(2e3,0,1),this.maxDate=new Date,this.isSubmitted=!1,this.accountId=this.route.parent.snapshot.params.fixedDepositAccountId}ngOnInit(){this.maxDate=this.settingsService.businessDate,this.createPrematureCloseAccountForm(),this.buildDependencies()}createPrematureCloseAccountForm(){this.prematureCloseAccountForm=this.formBuilder.group({closedOnDate:["",V.required]})}buildDependencies(){this.prematureCloseAccountForm.get("closedOnDate").valueChanges.subscribe(e=>{this.isSubmitted||this.calculatePrematureAmount(e)})}calculatePrematureAmount(e){let l=this.settingsService.language.code,p=this.settingsService.dateFormat,f={closedOnDate:this.dateUtils.formatDate(e,p),dateFormat:p,locale:l};this.fixedDepositsService.executeFixedDepositsAccountCommand(this.accountId,"calculatePrematureAmount",f).subscribe(D=>{this.savingsAccountsData=D.savingsAccounts,this.onAccountClosureOptions=D.onAccountClosureOptions,this.prematureCloseAccountForm.addControl("maturityAmount",new Z({value:"",disabled:!0})),this.prematureCloseAccountForm.addControl("onAccountClosureId",new Z("",V.required)),this.prematureCloseAccountForm.addControl("note",new Z("")),this.prematureCloseAccountForm.get("maturityAmount").patchValue(D.maturityAmount),this.addTransferDetails()})}addTransferDetails(){this.prematureCloseAccountForm.get("onAccountClosureId").valueChanges.subscribe(e=>{e===200?(this.prematureCloseAccountForm.addControl("toSavingsAccountId",new Z("",V.required)),this.prematureCloseAccountForm.addControl("transferDescription",new Z(""))):(this.prematureCloseAccountForm.removeControl("toSavingsAccountId"),this.prematureCloseAccountForm.removeControl("transferDescription"))})}submit(){let e=this.prematureCloseAccountForm.value;this.isSubmitted=!0;let l=this.settingsService.language.code,p=this.settingsService.dateFormat,f=this.prematureCloseAccountForm.value.closedOnDate;e.closedOnDate instanceof Date&&(e.closedOnDate=this.dateUtils.formatDate(f,p));let D=X(H({},e),{dateFormat:p,locale:l});this.fixedDepositsService.executeFixedDepositsAccountCommand(this.accountId,"prematureClose",D).subscribe(()=>{this.router.navigate(["../../"],{relativeTo:this.route})})}static{this.\u0275fac=function(l){return new(l||t)}}static{this.\u0275cmp=O({type:t,selectors:[["mifosx-premature-close-fixed-deposits-account"]],decls:26,vars:23,consts:[["closedOnDatePicker",""],[1,"container"],[3,"ngSubmit","formGroup"],[1,"layout-column"],[3,"click"],["matInput","","required","","formControlName","closedOnDate",3,"min","max","matDatepicker"],["matSuffix","",3,"for"],[1,"layout-row","align-center","gap-5px","responsive-column"],["type","button","mat-raised-button","",3,"routerLink"],["mat-raised-button","","color","warn",3,"disabled"],["type","number","matInput","","formControlName","maturityAmount"],["required","","formControlName","onAccountClosureId"],[3,"value"],["required","","formControlName","toSavingsAccountId"],["matInput","","formControlName","transferDescription"],["matInput","","formControlName","note","cdkTextareaAutosize","","cdkAutosizeMinRows","2"]],template:function(l,p){if(l&1){let f=F();n(0,"div",1)(1,"mat-card")(2,"form",2),M("ngSubmit",function(){return S(f),A(p.submit())}),n(3,"mat-card-content")(4,"div",3)(5,"mat-form-field",4),M("click",function(){S(f);let q=k(12);return A(q.open())}),n(6,"mat-label"),a(7),r(8,"translate"),o(),g(9,"input",5)(10,"mat-datepicker-toggle",6)(11,"mat-datepicker",null,0),h(13,er,7,9,"mat-error"),o(),h(14,ir,5,3,"mat-form-field"),h(15,ar,8,4,"mat-form-field"),h(16,cr,8,4,"mat-form-field"),h(17,sr,5,3,"mat-form-field"),h(18,lr,5,3,"mat-form-field"),o()(),n(19,"mat-card-actions",7)(20,"button",8),a(21),r(22,"translate"),o(),n(23,"button",9),a(24),r(25,"translate"),o()()()()()}if(l&2){let f=k(12);i(2),d("formGroup",p.prematureCloseAccountForm),i(5),m(c(8,16,"labels.inputs.Premature Close Date")),i(2),d("min",p.minDate)("max",p.maxDate)("matDatepicker",f),i(),d("for",f),i(3),v(p.prematureCloseAccountForm.controls.closedOnDate.hasError("required")?13:-1),i(),v(p.prematureCloseAccountForm.controls.maturityAmount?14:-1),i(),v(p.prematureCloseAccountForm.contains("onAccountClosureId")?15:-1),i(),v(p.prematureCloseAccountForm.contains("toSavingsAccountId")?16:-1),i(),v(p.prematureCloseAccountForm.contains("transferDescription")?17:-1),i(),v(p.prematureCloseAccountForm.contains("note")?18:-1),i(2),d("routerLink",R(22,tr)),i(),u(" ",c(22,18,"labels.buttons.Cancel")," "),i(2),d("disabled",!p.prematureCloseAccountForm.valid),i(),u(" ",c(25,20,"labels.buttons.Confirm")," ")}},dependencies:[y,I,ct,rt,jt,it,pt,gt,st,lt,tt,Y,xt,bt,ot,nt,Ct,Pt,dt,Ot,At,Tt,St,Mt,B,Ft,w],styles:[".container[_ngcontent-%COMP%]{max-width:37rem}"]})}}return t})();var mr=()=>["../../"];function dr(t,s){t&1&&(n(0,"mat-error"),a(1),r(2,"translate"),r(3,"translate"),n(4,"strong"),a(5),r(6,"translate"),o()()),t&2&&(i(),T(" ",c(2,3,"labels.inputs.Closed On Date")," ",c(3,5,"labels.commons.is")," "),i(4),m(c(6,7,"labels.commons.required")))}function ur(t,s){if(t&1&&(n(0,"mat-option",9),a(1),o()),t&2){let e=s.$implicit;d("value",e.id),i(),u(" ",e.value," ")}}function fr(t,s){t&1&&(n(0,"mat-error"),a(1),r(2,"translate"),r(3,"translate"),n(4,"strong"),a(5),r(6,"translate"),o()()),t&2&&(i(),T(" ",c(2,3,"labels.inputs.Account action")," ",c(3,5,"labels.commons.is")," "),i(4),m(c(6,7,"labels.commons.required")))}function gr(t,s){if(t&1&&(n(0,"mat-option",9),a(1),o()),t&2){let e=s.$implicit;d("value",e.id),i(),u(" ",e.accountNo," ")}}function xr(t,s){t&1&&(n(0,"mat-error"),a(1),r(2,"translate"),r(3,"translate"),n(4,"strong"),a(5),r(6,"translate"),o()()),t&2&&(i(),T(" ",c(2,3,"labels.inputs.Transfer to savings account")," ",c(3,5,"labels.commons.is")," "),i(4),m(c(6,7,"labels.commons.required")))}function Cr(t,s){if(t&1&&(n(0,"mat-form-field")(1,"mat-label"),a(2),r(3,"translate"),o(),n(4,"mat-select",14),L(5,gr,2,2,"mat-option",9,$),o(),h(7,xr,7,9,"mat-error"),o()),t&2){let e=_();i(2),m(c(3,2,"labels.inputs.Transfer to Savings")),i(3),G(e.savingsAccountsData),i(2),v(e.closeOnMaturityAccountForm.controls.toSavingsAccountId.hasError("required")?7:-1)}}function _r(t,s){t&1&&(n(0,"mat-form-field")(1,"mat-label"),a(2),r(3,"translate"),o(),g(4,"input",15),o()),t&2&&(i(2),m(c(3,1,"labels.inputs.Transfer Description")))}var vi=(()=>{class t{constructor(){this.formBuilder=x(mt),this.fixedDepositsService=x(j),this.dateUtils=x(et),this.route=x(N),this.router=x(W),this.settingsService=x(U),this.minDate=new Date(2e3,0,1),this.maxDate=new Date,this.route.data.subscribe(e=>{this.savingsAccountsData=e.fixedDepositsAccountActionData.savingsAccounts,this.onAccountClosureOptions=e.fixedDepositsAccountActionData.onAccountClosureOptions,this.maturityAmount=e.fixedDepositsAccountActionData.maturityAmount}),this.accountId=this.route.parent.snapshot.params.fixedDepositAccountId}ngOnInit(){this.maxDate=this.settingsService.businessDate,this.createCloseOnMaturityAccountForm(),this.addTransferDetails()}createCloseOnMaturityAccountForm(){this.closeOnMaturityAccountForm=this.formBuilder.group({closedOnDate:["",V.required],maturityAmount:[{value:this.maturityAmount,disabled:!0}],onAccountClosureId:["",V.required],note:[""]})}addTransferDetails(){this.closeOnMaturityAccountForm.get("onAccountClosureId").valueChanges.subscribe(e=>{e===200?(this.closeOnMaturityAccountForm.addControl("toSavingsAccountId",new Z("",V.required)),this.closeOnMaturityAccountForm.addControl("transferDescription",new Z(""))):(this.closeOnMaturityAccountForm.removeControl("toSavingsAccountId"),this.closeOnMaturityAccountForm.removeControl("transferDescription"))})}submit(){let e=this.closeOnMaturityAccountForm.value,l=this.settingsService.language.code,p=this.settingsService.dateFormat,f=this.closeOnMaturityAccountForm.value.closedOnDate;e.closedOnDate instanceof Date&&(e.closedOnDate=this.dateUtils.formatDate(f,p));let D=X(H({},e),{dateFormat:p,locale:l});this.fixedDepositsService.executeFixedDepositsAccountCommand(this.accountId,"close",D).subscribe(()=>{this.router.navigate(["../../"],{relativeTo:this.route})})}static{this.\u0275fac=function(l){return new(l||t)}}static{this.\u0275cmp=O({type:t,selectors:[["mifosx-close-fixed-deposits-account"]],decls:41,vars:30,consts:[["closedOnDatePicker",""],[1,"container"],[3,"ngSubmit","formGroup"],[1,"layout-column"],[3,"click"],["matInput","","required","","formControlName","closedOnDate",3,"min","max","matDatepicker"],["matSuffix","",3,"for"],["type","number","matInput","","formControlName","maturityAmount"],["required","","formControlName","onAccountClosureId"],[3,"value"],["matInput","","formControlName","note","cdkTextareaAutosize","","cdkAutosizeMinRows","2"],[1,"layout-row","align-center","gap-5px","responsive-column"],["type","button","mat-raised-button","",3,"routerLink"],["mat-raised-button","","color","warn",3,"disabled"],["required","","formControlName","toSavingsAccountId"],["matInput","","formControlName","transferDescription"]],template:function(l,p){if(l&1){let f=F();n(0,"div",1)(1,"mat-card")(2,"form",2),M("ngSubmit",function(){return S(f),A(p.submit())}),n(3,"mat-card-content")(4,"div",3)(5,"mat-form-field",4),M("click",function(){S(f);let q=k(12);return A(q.open())}),n(6,"mat-label"),a(7),r(8,"translate"),o(),g(9,"input",5)(10,"mat-datepicker-toggle",6)(11,"mat-datepicker",null,0),h(13,dr,7,9,"mat-error"),o(),n(14,"mat-form-field")(15,"mat-label"),a(16),r(17,"translate"),o(),g(18,"input",7),o(),n(19,"mat-form-field")(20,"mat-label"),a(21),r(22,"translate"),o(),n(23,"mat-select",8),L(24,ur,2,2,"mat-option",9,$),o(),h(26,fr,7,9,"mat-error"),o(),h(27,Cr,8,4,"mat-form-field"),h(28,_r,5,3,"mat-form-field"),n(29,"mat-form-field")(30,"mat-label"),a(31),r(32,"translate"),o(),g(33,"textarea",10),o()()(),n(34,"mat-card-actions",11)(35,"button",12),a(36),r(37,"translate"),o(),n(38,"button",13),a(39),r(40,"translate"),o()()()()()}if(l&2){let f=k(12);i(2),d("formGroup",p.closeOnMaturityAccountForm),i(5),m(c(8,17,"labels.inputs.Closed On Date")),i(2),d("min",p.minDate)("max",p.maxDate)("matDatepicker",f),i(),d("for",f),i(3),v(p.closeOnMaturityAccountForm.controls.closedOnDate.hasError("required")?13:-1),i(3),m(c(17,19,"labels.inputs.Maturity Amount")),i(5),m(c(22,21,"labels.inputs.Action")),i(3),G(p.onAccountClosureOptions),i(2),v(p.closeOnMaturityAccountForm.controls.onAccountClosureId.hasError("required")?26:-1),i(),v(p.closeOnMaturityAccountForm.contains("toSavingsAccountId")?27:-1),i(),v(p.closeOnMaturityAccountForm.contains("transferDescription")?28:-1),i(3),m(c(32,23,"labels.inputs.Note")),i(4),d("routerLink",R(29,mr)),i(),u(" ",c(37,25,"labels.buttons.Cancel")," "),i(2),d("disabled",!p.closeOnMaturityAccountForm.valid),i(),u(" ",c(40,27,"labels.buttons.Confirm")," ")}},dependencies:[y,I,ct,rt,jt,it,pt,gt,st,lt,tt,Y,xt,bt,ot,nt,Ct,Pt,dt,Ot,At,Tt,St,Mt,B,Ft,w],styles:[".container[_ngcontent-%COMP%]{max-width:37rem}"]})}}return t})();var hr=()=>["../../transactions"];function vr(t,s){if(t&1&&(n(0,"h2",2),a(1),r(2,"translate"),r(3,"translate"),o()),t&2){let e=_();i(),T(" ",c(2,2,"labels.menus."+e.actionName)," ",c(3,4,"labels.heading.Fixed Deposit Transactions")," ")}}function Dr(t,s){t&1&&(n(0,"mat-error"),a(1),r(2,"translate"),r(3,"translate"),n(4,"strong"),a(5),r(6,"translate"),o()()),t&2&&(i(),T(" ",c(2,3,"labels.inputs.Transaction Date")," ",c(3,5,"labels.commons.is")," "),i(4),m(c(6,7,"labels.commons.required")))}function br(t,s){if(t&1&&(n(0,"mat-option",10),a(1),o()),t&2){let e=s.$implicit;d("value",e.id),i(),u(" ",e.name," ")}}function Pr(t,s){t&1&&(n(0,"mat-form-field")(1,"mat-label"),a(2),r(3,"translate"),o(),g(4,"input",19),o()),t&2&&(i(2),m(c(3,1,"labels.inputs.Account Number")))}function Mr(t,s){t&1&&(n(0,"mat-form-field")(1,"mat-label"),a(2),r(3,"translate"),o(),g(4,"input",20),o()),t&2&&(i(2),m(c(3,1,"labels.inputs.Cheque")))}function Tr(t,s){t&1&&(n(0,"mat-form-field")(1,"mat-label"),a(2),r(3,"translate"),o(),g(4,"input",21),o()),t&2&&(i(2),m(c(3,1,"labels.inputs.Routing Code")))}function Sr(t,s){t&1&&(n(0,"mat-form-field")(1,"mat-label"),a(2),r(3,"translate"),o(),g(4,"input",22),o()),t&2&&(i(2),m(c(3,1,"labels.inputs.Receipt Number")))}function Ar(t,s){t&1&&(n(0,"mat-form-field")(1,"mat-label"),a(2),r(3,"translate"),o(),g(4,"input",23),o()),t&2&&(i(2),m(c(3,1,"labels.inputs.Bank")))}var Di=(()=>{class t{constructor(){this.formBuilder=x(mt),this.route=x(N),this.router=x(W),this.dateUtils=x(et),this.fixedDepositsService=x(j),this.settingsService=x(U),this.minDate=new Date(2e3,0,1),this.maxDate=new Date,this.paymentTypeOptions=[],this.addPaymentDetailsFlag=!1,this.transactionType={deposit:!1,withdrawal:!1},this.route.data.subscribe(l=>{this.currency=l.fixedDepositsAccountActionData.currency,this.paymentTypeOptions=l.fixedDepositsAccountActionData.paymentTypeOptions}),this.actionName=this.route.snapshot.params.name;let e=this.actionName.toLowerCase();if(e==="deposit"||e==="withdrawal")this.transactionCommand=e,this.transactionType[this.transactionCommand]=!0;else throw new Error(`Invalid transaction action: ${this.actionName}`);this.accountId=this.route.parent.snapshot.params.fixedDepositAccountId}ngOnInit(){this.maxDate=this.settingsService.businessDate,this.createSavingAccountTransactionForm()}createSavingAccountTransactionForm(){this.accountTransactionForm=this.formBuilder.group({transactionDate:[this.settingsService.businessDate,V.required],transactionAmount:[0,V.required],paymentTypeId:[""],note:[""]})}addPaymentDetails(){this.addPaymentDetailsFlag=!this.addPaymentDetailsFlag,this.addPaymentDetailsFlag?(this.accountTransactionForm.addControl("accountNumber",new Z("")),this.accountTransactionForm.addControl("checkNumber",new Z("")),this.accountTransactionForm.addControl("routingCode",new Z("")),this.accountTransactionForm.addControl("receiptNumber",new Z("")),this.accountTransactionForm.addControl("bankNumber",new Z(""))):(this.accountTransactionForm.removeControl("accountNumber"),this.accountTransactionForm.removeControl("checkNumber"),this.accountTransactionForm.removeControl("routingCode"),this.accountTransactionForm.removeControl("receiptNumber"),this.accountTransactionForm.removeControl("bankNumber"))}submit(){let e=this.accountTransactionForm.value,l=this.settingsService.language.code,p=this.settingsService.dateFormat,f=this.accountTransactionForm.value.transactionDate;e.transactionDate instanceof Date&&(e.transactionDate=this.dateUtils.formatDate(f,p));let D=X(H({},e),{dateFormat:p,locale:l});delete D.note,D.transactionAmount=D.transactionAmount*1,this.fixedDepositsService.executeFixedDepositsAccountTransactionsCommand(this.accountId,this.transactionCommand,D).subscribe(q=>{this.router.navigate(["../../transactions"],{relativeTo:this.route})})}static{this.\u0275fac=function(l){return new(l||t)}}static{this.\u0275cmp=O({type:t,selectors:[["mifosx-fixed-deposits-cash-transaction"]],decls:46,vars:38,consts:[["dueDatePicker",""],[1,"container","mat-elevation-z8"],["mat-title",""],[3,"ngSubmit","formGroup"],[1,"layout-column"],[3,"click"],["matInput","","formControlName","transactionDate","required","",3,"min","max","matDatepicker"],["matSuffix","",3,"for"],[3,"currency","isRequired","inputFormControl","inputLabel"],["required","","formControlName","paymentTypeId"],[3,"value"],[1,"flex-fill"],[1,"expandcollapsebutton","m-l-10","m-t-40","flex-75",3,"click"],[3,"className"],[1,"m-l-10"],["formControlName","note","matInput","","cdkTextareaAutosize","","cdkAutosizeMinRows","2"],[1,"layout-row","layout-xs-column","layout-align-center","gap-5px"],["type","button","mat-raised-button","",3,"routerLink"],["mat-raised-button","","color","primary",3,"disabled"],["type","number","formControlName","accountNumber","matInput",""],["type","number","formControlName","checkNumber","matInput",""],["formControlName","routingCode","matInput",""],["formControlName","receiptNumber","matInput",""],["formControlName","bankNumber","matInput",""]],template:function(l,p){if(l&1){let f=F();n(0,"div",1)(1,"mat-card"),h(2,vr,4,6,"h2",2),n(3,"form",3),M("ngSubmit",function(){return S(f),A(p.submit())}),n(4,"mat-card-content",4)(5,"mat-form-field",5),M("click",function(){S(f);let q=k(12);return A(q.open())}),n(6,"mat-label"),a(7),r(8,"translate"),o(),g(9,"input",6)(10,"mat-datepicker-toggle",7)(11,"mat-datepicker",null,0),h(13,Dr,7,9,"mat-error"),o(),g(14,"mifosx-input-amount",8),n(15,"mat-form-field")(16,"mat-label"),a(17),r(18,"translate"),o(),n(19,"mat-select",9),L(20,br,2,2,"mat-option",10,$),o()(),n(22,"div",11)(23,"span",12),M("click",function(){return S(f),A(p.addPaymentDetails())}),n(24,"mat-slide-toggle")(25,"div",13)(26,"span",14),a(27),r(28,"translate"),o()()()()(),h(29,Pr,5,3,"mat-form-field"),h(30,Mr,5,3,"mat-form-field"),h(31,Tr,5,3,"mat-form-field"),h(32,Sr,5,3,"mat-form-field"),h(33,Ar,5,3,"mat-form-field"),n(34,"mat-form-field")(35,"mat-label"),a(36),r(37,"translate"),o(),g(38,"textarea",15),o(),n(39,"mat-card-actions",16)(40,"button",17),a(41),r(42,"translate"),o(),n(43,"button",18),a(44),r(45,"translate"),o()()()()()()}if(l&2){let f=k(12);i(2),v(p.transactionType.withdrawal?2:-1),i(),d("formGroup",p.accountTransactionForm),i(4),m(c(8,25,"labels.inputs.Transaction Date")),i(2),d("min",p.minDate)("max",p.maxDate)("matDatepicker",f),i(),d("for",f),i(3),v(p.accountTransactionForm.controls.transactionDate.hasError("required")?13:-1),i(),d("currency",p.currency)("isRequired",!0)("inputFormControl",p.accountTransactionForm.controls.transactionAmount)("inputLabel","Transaction Amount"),i(3),m(c(18,27,"labels.inputs.Payment Type")),i(3),G(p.paymentTypeOptions),i(5),d("className",p.addPaymentDetailsFlag?"enabled":"disabled"),i(2),m(c(28,29,"labels.inputs.Show Payment Details")),i(2),v(p.addPaymentDetailsFlag?29:-1),i(),v(p.addPaymentDetailsFlag?30:-1),i(),v(p.addPaymentDetailsFlag?31:-1),i(),v(p.addPaymentDetailsFlag?32:-1),i(),v(p.addPaymentDetailsFlag?33:-1),i(3),m(c(37,31,"labels.inputs.Notes")),i(4),d("routerLink",R(37,hr)),i(),u(" ",c(42,33,"labels.buttons.Cancel")," "),i(2),d("disabled",!p.accountTransactionForm.valid),i(),u(" ",c(45,35,"labels.buttons.Submit")," ")}},dependencies:[y,I,ct,rt,jt,it,pt,gt,st,lt,tt,Y,xt,bt,ot,nt,Ct,Pt,dt,Ot,At,Tt,St,Mt,B,ei,ji,Ft,w],styles:[".expandcollapsebutton[_ngcontent-%COMP%]{margin-top:-7px}.container[_ngcontent-%COMP%]{max-width:37rem}.right-input[_ngcontent-%COMP%]{text-align:right}.right-label[_ngcontent-%COMP%]{padding-right:25px!important}"]})}}return t})();function Or(t,s){t&1&&g(0,"mifosx-approve-fixed-deposits-account")}function yr(t,s){t&1&&g(0,"mifosx-reject-fixed-deposits-account")}function Ir(t,s){t&1&&g(0,"mifosx-activate-fixed-deposits-account")}function Fr(t,s){t&1&&g(0,"mifosx-undo-approval-fixed-deposits-account")}function wr(t,s){t&1&&g(0,"mifosx-withdraw-by-client-fixed-deposits-account")}function Er(t,s){t&1&&g(0,"mifosx-add-charge-fixed-deposits-account")}function Br(t,s){t&1&&g(0,"mifosx-premature-close-fixed-deposits-account")}function kr(t,s){t&1&&g(0,"mifosx-close-fixed-deposits-account")}function Rr(t,s){t&1&&g(0,"mifosx-fixed-deposits-cash-transaction")}var bi=(()=>{class t{constructor(){this.route=x(N),this.actions={Approve:!1,Reject:!1,Activate:!1,Close:!1,"Undo Approval":!1,"Undo Activation":!1,"Add Charge":!1,"Premature Close":!1,"Withdrawn by Client":!1,Withdrawal:!1};let e=this.route.snapshot.params.name;e&&e in this.actions&&(this.actions[e]=!0)}static{this.\u0275fac=function(l){return new(l||t)}}static{this.\u0275cmp=O({type:t,selectors:[["mifosx-fixed-deposits-account-actions"]],decls:9,vars:9,template:function(l,p){l&1&&(h(0,Or,1,0,"mifosx-approve-fixed-deposits-account"),h(1,yr,1,0,"mifosx-reject-fixed-deposits-account"),h(2,Ir,1,0,"mifosx-activate-fixed-deposits-account"),h(3,Fr,1,0,"mifosx-undo-approval-fixed-deposits-account"),h(4,wr,1,0,"mifosx-withdraw-by-client-fixed-deposits-account"),h(5,Er,1,0,"mifosx-add-charge-fixed-deposits-account"),h(6,Br,1,0,"mifosx-premature-close-fixed-deposits-account"),h(7,kr,1,0,"mifosx-close-fixed-deposits-account"),h(8,Rr,1,0,"mifosx-fixed-deposits-cash-transaction")),l&2&&(v(p.actions.Approve?0:-1),i(),v(p.actions.Reject?1:-1),i(),v(p.actions.Activate?2:-1),i(),v(p.actions["Undo Approval"]||p.actions["Undo Activation"]?3:-1),i(),v(p.actions["Withdrawn by Client"]?4:-1),i(),v(p.actions["Add Charge"]?5:-1),i(),v(p.actions["Premature Close"]?6:-1),i(),v(p.actions.Close?7:-1),i(),v(p.actions.Withdrawal?8:-1))},dependencies:[y,I,ui,fi,gi,xi,Ci,_i,hi,vi,Di],encapsulation:2})}}return t})();var Nr=()=>["../"];function Vr(t,s){if(t&1){let e=F();n(0,"button",10),M("click",function(){S(e);let p=_(2);return A(p.undoTransaction())}),g(1,"fa-icon",11),a(2,"Undo "),o()}}function qr(t,s){t&1&&(n(0,"span"),C(1,Vr,3,0,"button",9),o()),t&2&&(i(),d("mifosxHasPermission","UNDOTRANSACTION_SAVINGSACCOUNT"))}function zr(t,s){t&1&&(n(0,"div",4),a(1),r(2,"translate"),o()),t&2&&(i(),u(" ",c(2,1,"labels.inputs.Note")," "))}function Hr(t,s){if(t&1&&(n(0,"div",5),a(1),o()),t&2){let e=_();i(),u(" ",e.transactionData.note," ")}}function $r(t,s){if(t&1&&g(0,"mifosx-transaction-payment-detail",6),t&2){let e=_();d("paymentDetailData",e.transactionData.paymentDetailData)}}var Pi=(()=>{class t{constructor(){this.savingsService=x($t),this.route=x(N),this.dateUtils=x(et),this.router=x(W),this.dialog=x(Ut),this.settingsService=x(U),this.route.data.subscribe(e=>{this.accountId=this.route.parent.snapshot.params.fixedDepositAccountId,this.transactionData=e.fixedDepositsAccountTransaction})}transactionColor(){return this.transactionData.manuallyReversed?"undo":"active"}allowUndo(){return!1}undoTransaction(){this.dialog.open(sn).afterClosed().subscribe(l=>{if(l.confirm){let p=this.settingsService.language.code,f=this.settingsService.dateFormat,D={transactionDate:this.dateUtils.formatDate(this.transactionData.date&&new Date(this.transactionData.date),f),transactionAmount:0,dateFormat:f,locale:p};this.savingsService.executeSavingsAccountTransactionsCommand(this.accountId,"undo",D,this.transactionData.id).subscribe(()=>{this.router.navigate(["../"],{relativeTo:this.route})})}})}static{this.\u0275fac=function(l){return new(l||t)}}static{this.\u0275cmp=O({type:t,selectors:[["mifosx-view-transaction"]],decls:41,vars:37,consts:[[1,"container","m-b-20","align-end-center","gap-2percent"],[1,"container"],[1,"layout-row-wrap"],[1,"flex-100",3,"ngClass"],[1,"flex-50","mat-body-strong"],[1,"flex-50"],[3,"paymentDetailData"],[1,"layout-row","layout-align-center","gap-2percent","column-on-mobile"],["type","button","mat-raised-button","","color","primary",3,"routerLink"],["mat-raised-button","","color","warn",3,"click",4,"mifosxHasPermission"],["mat-raised-button","","color","warn",3,"click"],["icon","undo",1,"m-r-10"]],template:function(l,p){l&1&&(n(0,"div",0),h(1,qr,2,1,"span"),o(),n(2,"div",1)(3,"mat-card")(4,"mat-card-content")(5,"div",2),g(6,"div",3),n(7,"div",4),a(8),r(9,"translate"),o(),n(10,"div",5),a(11),o(),n(12,"div",4),a(13),r(14,"translate"),o(),n(15,"div",5),a(16),o(),n(17,"div",4),a(18),r(19,"translate"),o(),n(20,"div",5),a(21),r(22,"dateFormat"),o(),n(23,"div",4),a(24),r(25,"translate"),o(),n(26,"div",5),a(27),o(),n(28,"div",4),a(29),r(30,"translate"),o(),n(31,"div",5),a(32),r(33,"currency"),o(),h(34,zr,3,3,"div",4),h(35,Hr,2,1,"div",5),h(36,$r,1,1,"mifosx-transaction-payment-detail",6),o(),n(37,"div",7)(38,"button",8),a(39),r(40,"translate"),o()()()()()),l&2&&(i(),v(p.allowUndo()?1:-1),i(5),d("ngClass",p.transactionColor()),i(2),u(" ",c(9,17,"labels.inputs.Transaction Id")," "),i(3),u(" ",p.transactionData.id," "),i(2),u(" ",c(14,19,"labels.inputs.Type")," "),i(3),u(" ",p.transactionData.transactionType.value," "),i(2),u(" ",c(19,21,"labels.inputs.Transaction Date")," "),i(3),u(" ",c(22,23,p.transactionData.date)," "),i(3),u(" ",c(25,25,"labels.inputs.Currency")," "),i(3),u(" ",p.transactionData.currency.displayLabel," "),i(2),u(" ",c(30,27,"labels.inputs.Amount")," "),i(3),u(" ",at(33,29,p.transactionData.amount,p.transactionData.currency.code,"symbol-narrow","1.2-2")," "),i(2),v(p.transactionData.note?34:-1),i(),v(p.transactionData.note?35:-1),i(),v(p.transactionData.paymentDetailData?36:-1),i(2),d("routerLink",R(36,Nr)),i(),u(" ",c(40,34,"labels.buttons.Back")," "))},dependencies:[y,Se,I,tt,Y,xt,B,de,ut,rn,se,yt,w],styles:["body[_ngcontent-%COMP%] table[_ngcontent-%COMP%] tbody[_ngcontent-%COMP%] tr[_ngcontent-%COMP%]:nth-child(2n){background-color:#f2f2f2}.bg-black[_ngcontent-%COMP%]{background-color:#000}.bg-light-grey[_ngcontent-%COMP%]{background-color:#e5e5e5}.bg-medium-grey[_ngcontent-%COMP%]{background-color:#ccc}.bg-grey[_ngcontent-%COMP%]{background-color:#999}.bg-dark-grey[_ngcontent-%COMP%]{background-color:#222}.bg-white[_ngcontent-%COMP%], .bg-fff[_ngcontent-%COMP%]{background-color:#fff}.bg-none[_ngcontent-%COMP%], .no-bg[_ngcontent-%COMP%]{background:none;background-image:none;background-color:transparent}.bg-facebook[_ngcontent-%COMP%]{background-color:#47639e}.bg-twitter[_ngcontent-%COMP%]{background-color:#02a8f3}body[_ngcontent-%COMP%] table[_ngcontent-%COMP%]{border:1px solid rgba(0,0,0,.12)}.no-border[_ngcontent-%COMP%]{border:none}.no-border-t[_ngcontent-%COMP%]{border-top:none}.no-border-r[_ngcontent-%COMP%]{border-right:none}.no-border-b[_ngcontent-%COMP%]{border-bottom:none}.no-border-l[_ngcontent-%COMP%]{border-left:none}.no-border-lr[_ngcontent-%COMP%], .no-border-rl[_ngcontent-%COMP%]{border-left:none;border-right:none}.no-border-tb[_ngcontent-%COMP%], .no-border-bt[_ngcontent-%COMP%]{border-top:none;border-bottom:none}.no-border-tl[_ngcontent-%COMP%], .no-border-lt[_ngcontent-%COMP%]{border-top:none;border-left:none}.no-border-tr[_ngcontent-%COMP%], .no-border-rt[_ngcontent-%COMP%]{border-top:none;border-right:none}.no-border-bl[_ngcontent-%COMP%], .no-border-lb[_ngcontent-%COMP%]{border-bottom:none;border-left:none}.no-border-br[_ngcontent-%COMP%], .no-border-rb[_ngcontent-%COMP%]{border-bottom:none;border-right:none}.border-dashed[_ngcontent-%COMP%], .border-dotted[_ngcontent-%COMP%]{border-style:dashed}.border-black[_ngcontent-%COMP%]{border-color:#000}.border-light-grey[_ngcontent-%COMP%]{border-color:#e5e5e5}.border-medium-grey[_ngcontent-%COMP%]{border-color:#ccc}.border-grey[_ngcontent-%COMP%]{border-color:#999}.border-dark-grey[_ngcontent-%COMP%]{border-color:#2222}.border-white[_ngcontent-%COMP%], .border-fff[_ngcontent-%COMP%]{border-color:#fff}.no-border-radius[_ngcontent-%COMP%]{border-radius:0}.radius3[_ngcontent-%COMP%]{border-radius:3px}.radius5[_ngcontent-%COMP%]{border-radius:5px}.radius10[_ngcontent-%COMP%]{border-radius:10px}.column-mandatory[_ngcontent-%COMP%]{color:#5cb85c;text-align:center}.not-column-mandatory[_ngcontent-%COMP%]{color:#666f73;text-align:center}.cdk-drag-placeholder[_ngcontent-%COMP%]{background:#3498db}.yes[_ngcontent-%COMP%]{color:#5cb85c!important;background-color:#5cb85c;height:4px;cursor:none}.no[_ngcontent-%COMP%]{color:red;background-color:red;height:4px;cursor:none}.strike[_ngcontent-%COMP%]{text-decoration:line-through;color:red}.transfer[_ngcontent-%COMP%]{color:#16a085}.linked[_ngcontent-%COMP%]{color:#4461e2}.accrual[_ngcontent-%COMP%]{color:#999}.fa-question[_ngcontent-%COMP%]{color:#4461e2}.enabled[_ngcontent-%COMP%]{color:#32cd32}.disabled[_ngcontent-%COMP%]{color:#f44366}.v-mid[_ngcontent-%COMP%], .v-m[_ngcontent-%COMP%]{vertical-align:middle}.v-top[_ngcontent-%COMP%], .v-t[_ngcontent-%COMP%]{vertical-align:top}.v-bottom[_ngcontent-%COMP%], .v-b[_ngcontent-%COMP%]{vertical-align:bottom}.v-super[_ngcontent-%COMP%]{vertical-align:super}.r-amount[_ngcontent-%COMP%]{text-align:right!important;padding-right:5px!important}.left[_ngcontent-%COMP%]{text-align:left!important}.right[_ngcontent-%COMP%]{text-align:right!important}.center[_ngcontent-%COMP%]{text-align:center!important}.amount-plus[_ngcontent-%COMP%]{color:#000}.amount-minus[_ngcontent-%COMP%]{color:#4461e2}.block[_ngcontent-%COMP%]{display:block}.inline[_ngcontent-%COMP%]{display:inline}.in-block[_ngcontent-%COMP%]{display:inline-block;zoom:1}.d-none[_ngcontent-%COMP%], .hide[_ngcontent-%COMP%], .hidden[_ngcontent-%COMP%]{display:none}.t-0[_ngcontent-%COMP%]{top:0}.b-0[_ngcontent-%COMP%]{bottom:0}.l-0[_ngcontent-%COMP%]{left:0}.r-0[_ngcontent-%COMP%]{right:0}.tb-0[_ngcontent-%COMP%]{top:0;bottom:0}.lr-0[_ngcontent-%COMP%]{left:0;right:0}.f-left[_ngcontent-%COMP%]{float:left}.f-right[_ngcontent-%COMP%]{float:right}.f-none[_ngcontent-%COMP%]{float:none}textarea[_ngcontent-%COMP%]{resize:both}textarea.vertical[_ngcontent-%COMP%], textarea.horizontal[_ngcontent-%COMP%]{resize:vertical}textarea.noresize[_ngcontent-%COMP%]{resize:none}.full-input[_ngcontent-%COMP%] input[_ngcontent-%COMP%], .full-input[_ngcontent-%COMP%] select[_ngcontent-%COMP%], .full-input[_ngcontent-%COMP%] textarea[_ngcontent-%COMP%]{width:100%}.normal[_ngcontent-%COMP%] input[_ngcontent-%COMP%], .normal[_ngcontent-%COMP%] select[_ngcontent-%COMP%], .normal[_ngcontent-%COMP%] textarea[_ngcontent-%COMP%], .full-input[_ngcontent-%COMP%] [type=checkbox][_ngcontent-%COMP%], .full-input[_ngcontent-%COMP%] [type=radio][_ngcontent-%COMP%]{width:auto}.mat-tab-body-content[_ngcontent-%COMP%]{margin-bottom:20px}.mat-datepicker-input[_ngcontent-%COMP%]{margin-top:5px;margin-bottom:5px}.loader-wrapper[_ngcontent-%COMP%]{height:100vh;width:100vw}.loader-wrapper[_ngcontent-%COMP%] .triangle[_ngcontent-%COMP%]{width:0;height:0;border-style:solid;position:absolute;animation:_ngcontent-%COMP%_rotate .8s infinite .2s}.loader-wrapper[_ngcontent-%COMP%] .bottom[_ngcontent-%COMP%]{border-width:0 90px 90px;border-color:transparent transparent #1fb050;bottom:calc(50% - 100px);left:calc(50% - 90px)}.loader-wrapper[_ngcontent-%COMP%] .top[_ngcontent-%COMP%]{border-width:90px 90px 0;border-color:#b4d575 transparent transparent;top:calc(50% - 100px);left:calc(50% - 90px)}.loader-wrapper[_ngcontent-%COMP%] .left[_ngcontent-%COMP%]{border-width:90px 0 90px 90px;border-color:transparent transparent transparent #1074b9;top:calc(50% - 90px);left:calc(50% - 100px)}.loader-wrapper[_ngcontent-%COMP%] .right[_ngcontent-%COMP%]{border-width:90px 90px 90px 0;border-color:transparent #1daeec transparent transparent;top:calc(50% - 90px);right:calc(50% - 100px)}@keyframes _ngcontent-%COMP%_rotate{0%{transform:rotate(0)}to{transform:rotate(360deg)}}body[_ngcontent-%COMP%]{margin:0}.container[_ngcontent-%COMP%]{margin:0 auto}.mb-05[_ngcontent-%COMP%]{margin-bottom:.5rem}.mr-05[_ngcontent-%COMP%]{margin-right:.5rem}.mb-1[_ngcontent-%COMP%]{margin-bottom:1rem}.mt-1[_ngcontent-%COMP%]{margin-top:1rem}.m-5[_ngcontent-%COMP%]{margin:5px}.m-t-5[_ngcontent-%COMP%]{margin-top:5px}.m-r-5[_ngcontent-%COMP%]{margin-right:5px}.m-b-5[_ngcontent-%COMP%]{margin-bottom:5px}.m-l-5[_ngcontent-%COMP%]{margin-left:5px}.m-v-5[_ngcontent-%COMP%]{margin:5px 0}.m-h-5[_ngcontent-%COMP%]{margin:0 5px}.m-10[_ngcontent-%COMP%]{margin:10px}.m-t-10[_ngcontent-%COMP%]{margin-top:10px}.m-r-10[_ngcontent-%COMP%]{margin-right:10px}.m-b-10[_ngcontent-%COMP%]{margin-bottom:10px}.m-l-10[_ngcontent-%COMP%]{margin-left:10px}.m-v-10[_ngcontent-%COMP%]{margin:10px 0}.m-h-10[_ngcontent-%COMP%]{margin:0 10px}.m-15[_ngcontent-%COMP%]{margin:15px}.m-t-15[_ngcontent-%COMP%]{margin-top:15px}.m-r-15[_ngcontent-%COMP%]{margin-right:15px}.m-b-15[_ngcontent-%COMP%]{margin-bottom:15px}.m-l-15[_ngcontent-%COMP%]{margin-left:15px}.m-v-15[_ngcontent-%COMP%]{margin:15px 0}.m-h-15[_ngcontent-%COMP%]{margin:0 15px}.m-20[_ngcontent-%COMP%]{margin:20px}.m-t-20[_ngcontent-%COMP%]{margin-top:20px}.m-r-20[_ngcontent-%COMP%]{margin-right:20px}.m-b-20[_ngcontent-%COMP%]{margin-bottom:20px}.m-l-20[_ngcontent-%COMP%]{margin-left:20px}.m-v-20[_ngcontent-%COMP%]{margin:20px 0}.m-h-20[_ngcontent-%COMP%]{margin:0 20px}.m-25[_ngcontent-%COMP%]{margin:25px}.m-t-25[_ngcontent-%COMP%]{margin-top:25px}.m-r-25[_ngcontent-%COMP%]{margin-right:25px}.m-b-25[_ngcontent-%COMP%]{margin-bottom:25px}.m-l-25[_ngcontent-%COMP%]{margin-left:25px}.m-v-25[_ngcontent-%COMP%]{margin:25px 0}.m-h-25[_ngcontent-%COMP%]{margin:0 25px}.m-30[_ngcontent-%COMP%]{margin:30px}.m-t-30[_ngcontent-%COMP%]{margin-top:30px}.m-r-30[_ngcontent-%COMP%]{margin-right:30px}.m-b-30[_ngcontent-%COMP%]{margin-bottom:30px}.m-l-30[_ngcontent-%COMP%]{margin-left:30px}.m-v-30[_ngcontent-%COMP%]{margin:30px 0}.m-h-30[_ngcontent-%COMP%]{margin:0 30px}.m-35[_ngcontent-%COMP%]{margin:35px}.m-t-35[_ngcontent-%COMP%]{margin-top:35px}.m-r-35[_ngcontent-%COMP%]{margin-right:35px}.m-b-35[_ngcontent-%COMP%]{margin-bottom:35px}.m-l-35[_ngcontent-%COMP%]{margin-left:35px}.m-v-35[_ngcontent-%COMP%]{margin:35px 0}.m-h-35[_ngcontent-%COMP%]{margin:0 35px}.m-40[_ngcontent-%COMP%]{margin:40px}.m-t-40[_ngcontent-%COMP%]{margin-top:40px}.m-r-40[_ngcontent-%COMP%]{margin-right:40px}.m-b-40[_ngcontent-%COMP%]{margin-bottom:40px}.m-l-40[_ngcontent-%COMP%]{margin-left:40px}.m-v-40[_ngcontent-%COMP%]{margin:40px 0}.m-h-40[_ngcontent-%COMP%]{margin:0 40px}.m-45[_ngcontent-%COMP%]{margin:45px}.m-t-45[_ngcontent-%COMP%]{margin-top:45px}.m-r-45[_ngcontent-%COMP%]{margin-right:45px}.m-b-45[_ngcontent-%COMP%]{margin-bottom:45px}.m-l-45[_ngcontent-%COMP%]{margin-left:45px}.m-v-45[_ngcontent-%COMP%]{margin:45px 0}.m-h-45[_ngcontent-%COMP%]{margin:0 45px}.m-50[_ngcontent-%COMP%]{margin:50px}.m-t-50[_ngcontent-%COMP%]{margin-top:50px}.m-r-50[_ngcontent-%COMP%]{margin-right:50px}.m-b-50[_ngcontent-%COMP%]{margin-bottom:50px}.m-l-50[_ngcontent-%COMP%]{margin-left:50px}.m-v-50[_ngcontent-%COMP%]{margin:50px 0}.m-h-50[_ngcontent-%COMP%]{margin:0 50px}.m-55[_ngcontent-%COMP%]{margin:55px}.m-t-55[_ngcontent-%COMP%]{margin-top:55px}.m-r-55[_ngcontent-%COMP%]{margin-right:55px}.m-b-55[_ngcontent-%COMP%]{margin-bottom:55px}.m-l-55[_ngcontent-%COMP%]{margin-left:55px}.m-v-55[_ngcontent-%COMP%]{margin:55px 0}.m-h-55[_ngcontent-%COMP%]{margin:0 55px}.m-60[_ngcontent-%COMP%]{margin:60px}.m-t-60[_ngcontent-%COMP%]{margin-top:60px}.m-r-60[_ngcontent-%COMP%]{margin-right:60px}.m-b-60[_ngcontent-%COMP%]{margin-bottom:60px}.m-l-60[_ngcontent-%COMP%]{margin-left:60px}.m-v-60[_ngcontent-%COMP%]{margin:60px 0}.m-h-60[_ngcontent-%COMP%]{margin:0 60px}.m-65[_ngcontent-%COMP%]{margin:65px}.m-t-65[_ngcontent-%COMP%]{margin-top:65px}.m-r-65[_ngcontent-%COMP%]{margin-right:65px}.m-b-65[_ngcontent-%COMP%]{margin-bottom:65px}.m-l-65[_ngcontent-%COMP%]{margin-left:65px}.m-v-65[_ngcontent-%COMP%]{margin:65px 0}.m-h-65[_ngcontent-%COMP%]{margin:0 65px}.m-70[_ngcontent-%COMP%]{margin:70px}.m-t-70[_ngcontent-%COMP%]{margin-top:70px}.m-r-70[_ngcontent-%COMP%]{margin-right:70px}.m-b-70[_ngcontent-%COMP%]{margin-bottom:70px}.m-l-70[_ngcontent-%COMP%]{margin-left:70px}.m-v-70[_ngcontent-%COMP%]{margin:70px 0}.m-h-70[_ngcontent-%COMP%]{margin:0 70px}.m-75[_ngcontent-%COMP%]{margin:75px}.m-t-75[_ngcontent-%COMP%]{margin-top:75px}.m-r-75[_ngcontent-%COMP%]{margin-right:75px}.m-b-75[_ngcontent-%COMP%]{margin-bottom:75px}.m-l-75[_ngcontent-%COMP%]{margin-left:75px}.m-v-75[_ngcontent-%COMP%]{margin:75px 0}.m-h-75[_ngcontent-%COMP%]{margin:0 75px}.m-80[_ngcontent-%COMP%]{margin:80px}.m-t-80[_ngcontent-%COMP%]{margin-top:80px}.m-r-80[_ngcontent-%COMP%]{margin-right:80px}.m-b-80[_ngcontent-%COMP%]{margin-bottom:80px}.m-l-80[_ngcontent-%COMP%]{margin-left:80px}.m-v-80[_ngcontent-%COMP%]{margin:80px 0}.m-h-80[_ngcontent-%COMP%]{margin:0 80px}.no-m[_ngcontent-%COMP%]{margin:0}.no-m-t[_ngcontent-%COMP%]{margin-top:0}.no-m-r[_ngcontent-%COMP%]{margin-right:0}.no-m-b[_ngcontent-%COMP%]{margin-bottom:0}.no-m-l[_ngcontent-%COMP%]{margin-left:0}.no-m-v[_ngcontent-%COMP%], .no-m-h[_ngcontent-%COMP%], .no-margin[_ngcontent-%COMP%]{margin:0}.no-m-lr[_ngcontent-%COMP%], .no-m-rl[_ngcontent-%COMP%]{margin-left:0;margin-right:0}.no-m-tb[_ngcontent-%COMP%], .no-m-bt[_ngcontent-%COMP%]{margin-top:0;margin-bottom:0}.m-t-only[_ngcontent-%COMP%]{margin-left:0;margin-right:0;margin-bottom:0}.m-b-only[_ngcontent-%COMP%]{margin-left:0;margin-right:0;margin-top:0}.m-l-only[_ngcontent-%COMP%]{margin-right:0;margin-top:0;margin-bottom:0}.m-r-only[_ngcontent-%COMP%]{margin-left:0;margin-top:0;margin-bottom:0}.m-auto[_ngcontent-%COMP%]{margin-left:auto;margin-right:auto}.ls-0[_ngcontent-%COMP%]{margin-left:10px;margin-right:10px}html[_ngcontent-%COMP%], body[_ngcontent-%COMP%]{-webkit-tap-highlight-color:transparent}div[_ngcontent-%COMP%]{box-sizing:border-box}.color-inherit[_ngcontent-%COMP%]{color:inherit}.no-shadow[_ngcontent-%COMP%]{box-shadow:none}.pointer[_ngcontent-%COMP%]{cursor:pointer}.nolist[_ngcontent-%COMP%]{list-style:none}.actions-menu[_ngcontent-%COMP%]{color:#fff}.alert[_ngcontent-%COMP%]{background-color:#e8f4fd;padding:6px 16px;font-size:.875rem;font-family:Roboto,Helvetica Neue,sans-serif;font-weight:400;line-height:1.43;border-radius:4px;letter-spacing:normal;margin:10px}.alert[_ngcontent-%COMP%] .message[_ngcontent-%COMP%]{padding:8px 0;font-size:18px}.alert[_ngcontent-%COMP%] .alert-check[_ngcontent-%COMP%]{color:#359ff4;margin-right:2px;font-size:1.4rem} .mat-tooltip{font-size:15px;color:#fff!important;background-color:#4461e2b3;border:1px solid rgb(25.7777777778,51.5555555556,166.2222222222);max-width:400px!important;white-space:pre-line!important}.loading[_ngcontent-%COMP%]{position:absolute;min-width:100%;width:100px;height:12px;background:linear-gradient(125deg,#fff,#4461e2,#fff);animation:grow 4s linear infinite,move 4s linear infinite}mat-card-title[_ngcontent-%COMP%]{font-weight:600;font-size:x-large;padding-left:20px;padding-top:20px}html[_ngcontent-%COMP%], body[_ngcontent-%COMP%]{overflow:hidden}.overflow-x-scroll[_ngcontent-%COMP%]{max-width:100%;overflow-x:auto}.overflow-no[_ngcontent-%COMP%]{overflow:hidden}.overflow-auto[_ngcontent-%COMP%]{overflow:auto}.overflow-scroll[_ngcontent-%COMP%]{overflow:scroll}.table-container[_ngcontent-%COMP%]{overflow-x:auto;max-width:100%}body[_ngcontent-%COMP%], .no-p[_ngcontent-%COMP%]{padding:0}.no-p-t[_ngcontent-%COMP%]{padding-top:0}.no-p-r[_ngcontent-%COMP%]{padding-right:0}.no-p-b[_ngcontent-%COMP%]{padding-bottom:0}.no-p-l[_ngcontent-%COMP%]{padding-left:0}.no-p-v[_ngcontent-%COMP%], .no-p-h[_ngcontent-%COMP%]{padding:0}.p-5[_ngcontent-%COMP%]{padding:5px}.p-t-5[_ngcontent-%COMP%]{padding-top:5px}.p-r-5[_ngcontent-%COMP%]{padding-right:5px}.p-b-5[_ngcontent-%COMP%]{padding-bottom:5px}.p-l-5[_ngcontent-%COMP%]{padding-left:5px}.p-v-5[_ngcontent-%COMP%]{padding:5px 0}.p-h-5[_ngcontent-%COMP%]{padding:0 5px}.p-10[_ngcontent-%COMP%]{padding:10px}.p-t-10[_ngcontent-%COMP%]{padding-top:10px}.p-b-10[_ngcontent-%COMP%]{padding-bottom:10px}.p-v-10[_ngcontent-%COMP%]{padding:10px 0}.p-h-10[_ngcontent-%COMP%]{padding:0 10px}.p-15[_ngcontent-%COMP%]{padding:15px}.p-t-15[_ngcontent-%COMP%]{padding-top:15px}.p-r-15[_ngcontent-%COMP%]{padding-right:15px}.p-b-15[_ngcontent-%COMP%]{padding-bottom:15px}.p-l-15[_ngcontent-%COMP%]{padding-left:15px}.p-v-15[_ngcontent-%COMP%]{padding:15px 0}.p-h-15[_ngcontent-%COMP%]{padding:0 15px}.p-20[_ngcontent-%COMP%]{padding:20px}.p-t-20[_ngcontent-%COMP%]{padding-top:20px}.p-r-20[_ngcontent-%COMP%]{padding-right:20px}.p-b-20[_ngcontent-%COMP%]{padding-bottom:20px}.p-l-20[_ngcontent-%COMP%]{padding-left:20px}.p-v-20[_ngcontent-%COMP%]{padding:20px 0}.p-h-20[_ngcontent-%COMP%]{padding:0 20px}.p-25[_ngcontent-%COMP%]{padding:25px}.p-t-25[_ngcontent-%COMP%]{padding-top:25px}.p-r-25[_ngcontent-%COMP%]{padding-right:25px}.p-b-25[_ngcontent-%COMP%]{padding-bottom:25px}.p-l-25[_ngcontent-%COMP%]{padding-left:25px}.p-v-25[_ngcontent-%COMP%]{padding:25px 0}.p-h-25[_ngcontent-%COMP%]{padding:0 25px}.p-30[_ngcontent-%COMP%]{padding:30px}.p-t-30[_ngcontent-%COMP%]{padding-top:30px}.p-r-30[_ngcontent-%COMP%]{padding-right:30px}.p-b-30[_ngcontent-%COMP%]{padding-bottom:30px}.p-l-30[_ngcontent-%COMP%]{padding-left:30px}.p-v-30[_ngcontent-%COMP%]{padding:30px 0}.p-h-30[_ngcontent-%COMP%]{padding:0 30px}.p-35[_ngcontent-%COMP%]{padding:35px}.p-t-35[_ngcontent-%COMP%]{padding-top:35px}.p-r-35[_ngcontent-%COMP%]{padding-right:35px}.p-b-35[_ngcontent-%COMP%]{padding-bottom:35px}.p-l-35[_ngcontent-%COMP%]{padding-left:35px}.p-v-35[_ngcontent-%COMP%]{padding:35px 0}.p-h-35[_ngcontent-%COMP%]{padding:0 35px}.p-40[_ngcontent-%COMP%]{padding:40px}.p-t-40[_ngcontent-%COMP%]{padding-top:40px}.p-r-40[_ngcontent-%COMP%]{padding-right:40px}.p-b-40[_ngcontent-%COMP%]{padding-bottom:40px}.p-l-40[_ngcontent-%COMP%]{padding-left:40px}.p-v-40[_ngcontent-%COMP%]{padding-top:40px;padding-bottom:40px}.p-h-40[_ngcontent-%COMP%]{padding:0 40px}.p-45[_ngcontent-%COMP%]{padding:45px}.p-t-45[_ngcontent-%COMP%]{padding-top:45px}.p-r-45[_ngcontent-%COMP%]{padding-right:45px}.p-b-45[_ngcontent-%COMP%]{padding-bottom:45px}.p-l-45[_ngcontent-%COMP%]{padding-left:45px}.p-v-45[_ngcontent-%COMP%]{padding:45px 0}.p-h-45[_ngcontent-%COMP%]{padding:0 45px}.p-50[_ngcontent-%COMP%]{padding:50px}.p-t-50[_ngcontent-%COMP%]{padding-top:50px}.p-r-50[_ngcontent-%COMP%]{padding-right:50px}.p-b-50[_ngcontent-%COMP%]{padding-bottom:50px}.p-l-50[_ngcontent-%COMP%]{padding-left:50px}.p-v-50[_ngcontent-%COMP%]{padding:50px 0}.p-h-50[_ngcontent-%COMP%]{padding:0 50px}.p-55[_ngcontent-%COMP%]{padding:55px}.p-t-55[_ngcontent-%COMP%]{padding-top:55px}.p-r-55[_ngcontent-%COMP%]{padding-right:55px}.p-b-55[_ngcontent-%COMP%]{padding-bottom:55px}.p-l-55[_ngcontent-%COMP%]{padding-left:55px}.p-v-55[_ngcontent-%COMP%]{padding:55px 0}.p-h-55[_ngcontent-%COMP%]{padding:0 55px}.p-60[_ngcontent-%COMP%]{padding:60px}.p-t-60[_ngcontent-%COMP%]{padding-top:60px}.p-r-60[_ngcontent-%COMP%]{padding-right:60px}.p-b-60[_ngcontent-%COMP%]{padding-bottom:60px}.p-l-60[_ngcontent-%COMP%]{padding-left:60px}.p-v-60[_ngcontent-%COMP%]{padding:60px 0}.p-h-60[_ngcontent-%COMP%]{padding:0 60px}.p-65[_ngcontent-%COMP%]{padding:65px}.p-t-65[_ngcontent-%COMP%]{padding-top:65px}.p-r-65[_ngcontent-%COMP%]{padding-right:65px}.p-b-65[_ngcontent-%COMP%]{padding-bottom:65px}.p-l-65[_ngcontent-%COMP%]{padding-left:65px}.p-v-65[_ngcontent-%COMP%]{padding:65px 0}.p-h-65[_ngcontent-%COMP%]{padding:0 65px}.p-70[_ngcontent-%COMP%]{padding:70px}.p-t-70[_ngcontent-%COMP%]{padding-top:70px}.p-r-70[_ngcontent-%COMP%]{padding-right:70px}.p-b-70[_ngcontent-%COMP%]{padding-bottom:70px}.p-l-70[_ngcontent-%COMP%]{padding-left:70px}.p-v-70[_ngcontent-%COMP%]{padding:70px 0}.p-h-70[_ngcontent-%COMP%]{padding:0 70px}.p-75[_ngcontent-%COMP%]{padding:75px}.p-t-75[_ngcontent-%COMP%]{padding-top:75px}.p-r-75[_ngcontent-%COMP%]{padding-right:75px}.p-b-75[_ngcontent-%COMP%]{padding-bottom:75px}.p-l-75[_ngcontent-%COMP%]{padding-left:75px}.p-v-75[_ngcontent-%COMP%]{padding:75px 0}.p-h-75[_ngcontent-%COMP%]{padding:0 75px}.p-80[_ngcontent-%COMP%]{padding:80px}.p-t-80[_ngcontent-%COMP%]{padding-top:80px}.p-r-80[_ngcontent-%COMP%]{padding-right:80px}.p-b-80[_ngcontent-%COMP%]{padding-bottom:80px}.p-l-80[_ngcontent-%COMP%]{padding-left:80px}.p-v-80[_ngcontent-%COMP%]{padding:80px 0}.p-h-80[_ngcontent-%COMP%]{padding:0 80px}.no-padding[_ngcontent-%COMP%]{padding:0!important}.no-pad-lr[_ngcontent-%COMP%], .no-pad-rl[_ngcontent-%COMP%]{padding-left:0;padding-right:0}.no-pad-tb[_ngcontent-%COMP%], .no-pad-bt[_ngcontent-%COMP%]{padding-top:0;padding-bottom:0}.pad-t-only[_ngcontent-%COMP%]{padding-left:0;padding-right:0;padding-bottom:0}.pad-b-only[_ngcontent-%COMP%]{padding-left:0;padding-right:0;padding-top:0}.pad-l-only[_ngcontent-%COMP%]{padding-right:0;padding-top:0;padding-bottom:0}.pad-r-only[_ngcontent-%COMP%]{padding-left:0;padding-top:0;padding-bottom:0}html[_ngcontent-%COMP%], body[_ngcontent-%COMP%], .rel[_ngcontent-%COMP%], .relative[_ngcontent-%COMP%]{position:relative}.abs[_ngcontent-%COMP%], .absolute[_ngcontent-%COMP%]{position:absolute}.fixed[_ngcontent-%COMP%]{position:fixed}.status-active[_ngcontent-%COMP%]{color:#5cb85c}.status-inactive[_ngcontent-%COMP%]{color:#666f73}.status-deleted[_ngcontent-%COMP%]{color:#000}.status-pending[_ngcontent-%COMP%]{color:orange}.status-approved[_ngcontent-%COMP%]{color:#4461e2}.status-overpaid[_ngcontent-%COMP%]{color:purple}.status-chargeoff[_ngcontent-%COMP%]{color:#f39c12}.status-active-overdue[_ngcontent-%COMP%], .status-block[_ngcontent-%COMP%]{color:red}.status-matured[_ngcontent-%COMP%]{color:#ff4000}.subStatus-contract-termination[_ngcontent-%COMP%]{color:#b3b3b3}.mat-step-header[_ngcontent-%COMP%] .mat-step-icon-state-done[_ngcontent-%COMP%]{background-color:#2af72a}.mat-step-header[_ngcontent-%COMP%] .mat-step-icon-state-done[_ngcontent-%COMP%] .status-transfer-progress[_ngcontent-%COMP%]{color:#ff4000}.mat-step-header[_ngcontent-%COMP%] .mat-step-icon-state-done[_ngcontent-%COMP%] .status-transfer-hold[_ngcontent-%COMP%]{color:#df0101}html[_ngcontent-%COMP%], body[_ngcontent-%COMP%]{-webkit-font-smoothing:antialiased}html[_ngcontent-%COMP%]{font-size:16px}body[_ngcontent-%COMP%]{font-family:Roboto,Helvetica Neue,sans-serif;font-weight:400;font-size:14px;color:#000000de;line-height:1.5;letter-spacing:normal}.mat-h1[_ngcontent-%COMP%], .mat-headline[_ngcontent-%COMP%], .mat-typography[_ngcontent-%COMP%] .mat-h1[_ngcontent-%COMP%], .mat-typography[_ngcontent-%COMP%] .mat-headline[_ngcontent-%COMP%], .mat-typography[_ngcontent-%COMP%] h1[_ngcontent-%COMP%]{font:400 24px/32px Roboto,Helvetica Neue,sans-serif;letter-spacing:normal;margin:0 0 16px}.lh-1[_ngcontent-%COMP%]{line-height:1}.lh-13[_ngcontent-%COMP%]{line-height:1.3}.lh-15[_ngcontent-%COMP%]{line-height:1.5}.bold[_ngcontent-%COMP%], .strong[_ngcontent-%COMP%]{font-weight:700}.no-bold[_ngcontent-%COMP%]{font-weight:400}.italic[_ngcontent-%COMP%], .em[_ngcontent-%COMP%]{font-style:italic}.strike[_ngcontent-%COMP%]{text-decoration:line-through}.normal[_ngcontent-%COMP%]{font-weight:400;font-style:normal}.uppercase[_ngcontent-%COMP%]{text-transform:uppercase}.text-left[_ngcontent-%COMP%]{text-align:left}.text-center[_ngcontent-%COMP%]{text-align:center}.text-right[_ngcontent-%COMP%]{text-align:right}.w100[_ngcontent-%COMP%]{font-weight:100}.w200[_ngcontent-%COMP%]{font-weight:200}.w300[_ngcontent-%COMP%]{font-weight:300}.w400[_ngcontent-%COMP%]{font-weight:400}.w500[_ngcontent-%COMP%]{font-weight:500}.w600[_ngcontent-%COMP%]{font-weight:600}.w700[_ngcontent-%COMP%]{font-weight:700}.w800[_ngcontent-%COMP%]{font-weight:800}.w900[_ngcontent-%COMP%]{font-weight:900}.f9[_ngcontent-%COMP%]{font-size:9px}.f10[_ngcontent-%COMP%]{font-size:10px}.f11[_ngcontent-%COMP%]{font-size:11px}.f12[_ngcontent-%COMP%]{font-size:12px}.f13[_ngcontent-%COMP%]{font-size:13px}.f14[_ngcontent-%COMP%]{font-size:14px}.f15[_ngcontent-%COMP%]{font-size:15px}.f16[_ngcontent-%COMP%]{font-size:16px}.f17[_ngcontent-%COMP%]{font-size:17px}.f18[_ngcontent-%COMP%]{font-size:18px;line-height:30px}.f19[_ngcontent-%COMP%]{font-size:19px}.f20[_ngcontent-%COMP%]{font-size:20px}.f30[_ngcontent-%COMP%]{font-size:30px}.f40[_ngcontent-%COMP%]{font-size:40px}.f50[_ngcontent-%COMP%]{font-size:50px}.f60[_ngcontent-%COMP%]{font-size:60px}.size-small[_ngcontent-%COMP%]{font-size:75%}.size-normal[_ngcontent-%COMP%]{font-size:100%}.size-medium[_ngcontent-%COMP%]{font-size:125%}.size-big[_ngcontent-%COMP%], .size-large[_ngcontent-%COMP%]{font-size:150%}.size-huge[_ngcontent-%COMP%]{font-size:200%}.inherit[_ngcontent-%COMP%]{font:inherit}.text-shadow[_ngcontent-%COMP%]{text-shadow:1px 1px 1px rgba(0,0,0,.4)}.text-rgb-2[_ngcontent-%COMP%]{color:#0003}.text-rgb-3[_ngcontent-%COMP%]{color:#0000004d}.text-rgb-4[_ngcontent-%COMP%]{color:#0006}.text-rgb-5[_ngcontent-%COMP%]{color:#00000080}.no-ul[_ngcontent-%COMP%], .no-ul[_ngcontent-%COMP%]:hover, .no-ul[_ngcontent-%COMP%] a[_ngcontent-%COMP%], .no-ul[_ngcontent-%COMP%] a[_ngcontent-%COMP%]:hover{text-decoration:none}.no-wrap[_ngcontent-%COMP%]{white-space:nowrap}.auto-cell-size[_ngcontent-%COMP%]{white-space:nowrap;width:1%}.ls-0[_ngcontent-%COMP%]{letter-spacing:-3px;white-space:nowrap}.label-field[_ngcontent-%COMP%]{margin-top:32px}.wrap-content[_ngcontent-%COMP%]{overflow-wrap:break-word;word-wrap:break-word}.no-break-content[_ngcontent-%COMP%]{overflow-wrap:anywhere!important}.fit[_ngcontent-%COMP%]{max-width:100%}.half-width[_ngcontent-%COMP%]{width:50%}.full-width[_ngcontent-%COMP%]{width:100%}.full-height[_ngcontent-%COMP%]{height:100%}html[_ngcontent-%COMP%], body[_ngcontent-%COMP%]{width:100%;height:100%;min-height:100%}body[_ngcontent-%COMP%] table[_ngcontent-%COMP%]{width:100%}.container[_ngcontent-%COMP%]{max-width:74rem;width:90%}.mw300[_ngcontent-%COMP%]{max-width:300px}.mw400[_ngcontent-%COMP%]{max-width:400px}.mw500[_ngcontent-%COMP%]{max-width:500px}.mw600[_ngcontent-%COMP%]{max-width:600px}.fullwidth[_ngcontent-%COMP%]{width:100%}.zindex-1[_ngcontent-%COMP%]{z-index:1}.zindex-2[_ngcontent-%COMP%]{z-index:2}.zindex-3[_ngcontent-%COMP%]{z-index:3}.zindex-4[_ngcontent-%COMP%]{z-index:4}.container[_ngcontent-%COMP%]{max-width:37rem}.container[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] div[_ngcontent-%COMP%]{margin:1rem 0;word-wrap:break-word}.transaction-buttons[_ngcontent-%COMP%]{margin-top:3%}.transaction-relation[_ngcontent-%COMP%]{background-color:#d7dada}.active[_ngcontent-%COMP%]{background-color:#5cb85c;height:4px}.linked[_ngcontent-%COMP%]{background-color:#4461e2;height:4px}.undo[_ngcontent-%COMP%]{background-color:red;height:4px}"]})}}return t})();function Lr(t,s){if(t&1&&(n(0,"mat-option",5),a(1),o()),t&2){let e=s.$implicit;d("value",e.id),i(),u(" ",e.name," ")}}function Gr(t,s){if(t&1){let e=F();n(0,"mat-form-field",11),M("click",function(){S(e);let p=k(7);return A(p.open())}),n(1,"mat-label"),a(2),r(3,"translate"),o(),g(4,"input",12)(5,"mat-datepicker-toggle",13)(6,"mat-datepicker",null,0),n(8,"mat-error"),a(9),r(10,"translate"),r(11,"translate"),n(12,"strong"),a(13),r(14,"translate"),o()()()}if(t&2){let e=k(7),l=_();i(2),m(c(3,8,"labels.inputs.Submitted On")),i(2),d("min",l.minDate)("max",l.maxDate)("matDatepicker",e),i(),d("for",e),i(4),T(" ",c(10,10,"labels.inputs.Submission Date")," ",c(11,12,"labels.commons.is")," "),i(4),m(c(14,14,"labels.commons.required"))}}function Ur(t,s){if(t&1&&(n(0,"mat-option",5),a(1),o()),t&2){let e=s.$implicit;d("value",e.id),i(),u(" ",e.displayName," ")}}function jr(t,s){if(t&1&&(n(0,"mat-form-field",3)(1,"mat-label"),a(2),r(3,"translate"),o(),n(4,"mat-select",14),L(5,Ur,2,2,"mat-option",5,$),o()()),t&2){let e=_();i(2),m(c(3,1,"labels.inputs.Field Officer")),i(3),G(e.fieldOfficerData)}}function Wr(t,s){t&1&&(n(0,"mat-form-field",3)(1,"mat-label"),a(2),r(3,"translate"),o(),g(4,"input",15),r(5,"translate"),o()),t&2&&(i(2),m(c(3,3,"labels.inputs.External id")),i(2),d("matTooltip",_t(c(5,5,"tooltips.Provides an external id"))))}var ge=(()=>{class t{constructor(){this.formBuilder=x(mt),this.fixedDepositsService=x(j),this.settingsService=x(U),this.minDate=new Date(2e3,0,1),this.maxDate=new Date,this.isFieldOfficerPatched=!1,this.isProductSelected=!1,this.fixedDepositsAccountProductTemplate=new $e,this.createFixedDepositsAccountDetailsForm()}ngOnInit(){this.maxDate=this.settingsService.businessDate,this.buildDependencies(),this.fixedDepositsAccountTemplate&&(this.productData=this.fixedDepositsAccountTemplate.productOptions,this.fixedDepositsAccountTemplate.depositProductId&&this.fixedDepositAccountDetailsForm.patchValue({productId:this.fixedDepositsAccountTemplate.depositProductId,submittedOnDate:this.fixedDepositsAccountTemplate.timeline.submittedOnDate&&new Date(this.fixedDepositsAccountTemplate.timeline.submittedOnDate),externalId:this.fixedDepositsAccountTemplate.externalId||""}))}createFixedDepositsAccountDetailsForm(){this.fixedDepositAccountDetailsForm=this.formBuilder.group({productId:["",V.required],submittedOnDate:["",V.required],fieldOfficerId:[""],externalId:[""]})}buildDependencies(){let e=this.fixedDepositsAccountTemplate.clientId;this.fixedDepositAccountDetailsForm.get("productId").valueChanges.subscribe(l=>{this.fixedDepositsService.getFixedDepositsAccountTemplate(e,l).subscribe(p=>{this.fixedDepositsAccountProductTemplate.emit(p),this.isProductSelected=!0,this.fieldOfficerData=p.fieldOfficerOptions,!this.isFieldOfficerPatched&&this.fixedDepositsAccountTemplate.fieldOfficerId?(this.fixedDepositAccountDetailsForm.get("fieldOfficerId").patchValue(this.fixedDepositsAccountTemplate.fieldOfficerId),this.isFieldOfficerPatched=!0):this.fixedDepositAccountDetailsForm.get("fieldOfficerId").patchValue("")})})}get fixedDepositAccountDetails(){let e=this.fixedDepositAccountDetailsForm.value;for(let l in e)e[l]===""&&delete e[l];return e}static{this.\u0275fac=function(l){return new(l||t)}}static{this.\u0275cmp=O({type:t,selectors:[["mifosx-fixed-deposit-account-details-step"]],inputs:{fixedDepositsAccountTemplate:"fixedDepositsAccountTemplate"},outputs:{fixedDepositsAccountProductTemplate:"fixedDepositsAccountProductTemplate"},decls:28,vars:23,consts:[["submittedOnDatePicker",""],[3,"formGroup"],[1,"layout-row-wrap","gap-2px","responsive-column"],[1,"flex-48"],["formControlName","productId","required",""],[3,"value"],[1,"layout-row","align-center","gap-2percent","margin-t","responsive-column"],["mat-raised-button","","matStepperPrevious","","disabled",""],["icon","arrow-left",1,"m-r-10"],["mat-raised-button","","matStepperNext","",3,"disabled"],["icon","arrow-right",1,"m-l-10"],[1,"flex-48",3,"click"],["matInput","","formControlName","submittedOnDate","required","",3,"min","max","matDatepicker"],["matSuffix","",3,"for"],["formControlName","fieldOfficerId"],["matInput","","formControlName","externalId",3,"matTooltip"]],template:function(l,p){if(l&1&&(n(0,"form",1)(1,"div",2)(2,"mat-form-field",3)(3,"mat-label"),a(4),r(5,"translate"),o(),n(6,"mat-select",4),L(7,Lr,2,2,"mat-option",5,$),o(),n(9,"mat-error"),a(10),r(11,"translate"),r(12,"translate"),n(13,"strong"),a(14),r(15,"translate"),o()()(),h(16,Gr,15,16,"mat-form-field",3),h(17,jr,7,3,"mat-form-field",3),h(18,Wr,6,7,"mat-form-field",3),o(),n(19,"div",6)(20,"button",7),g(21,"fa-icon",8),a(22),r(23,"translate"),o(),n(24,"button",9),a(25),r(26,"translate"),g(27,"fa-icon",10),o()()()),l&2){let f;d("formGroup",p.fixedDepositAccountDetailsForm),i(4),m(c(5,11,"labels.inputs.Product Name")),i(3),G(p.productData),i(3),T(" ",c(11,13,"labels.inputs.Product Name")," ",c(12,15,"labels.commons.is")," "),i(4),m(c(15,17,"labels.commons.required")),i(2),v(p.isProductSelected?16:-1),i(),v(p.isProductSelected?17:-1),i(),v(p.isProductSelected?18:-1),i(4),u(" ",c(23,19,"labels.buttons.Previous")," "),i(2),d("disabled",!((f=p.fixedDepositAccountDetailsForm.get("productId"))!=null&&f.value)||!((f=p.fixedDepositAccountDetailsForm.get("submittedOnDate"))!=null&&f.value)),i(),u(" ",c(26,21,"labels.buttons.Next")," ")}},dependencies:[y,I,ct,rt,it,pt,gt,st,lt,ot,nt,Ct,Pt,dt,Ot,At,Tt,St,Mt,B,me,Wt,ut,ne,w],styles:[".margin-t[_ngcontent-%COMP%]{margin-top:1em}"]})}}return t})();function Kr(t,s){if(t&1&&g(0,"mifosx-input-amount",2),t&2){let e=_();d("currency",e.currency)("isRequired",!0)("inputFormControl",e.fixedDepositAccountTermsForm.controls.depositAmount)("inputLabel","Deposit Amount")}}function Qr(t,s){if(t&1&&(n(0,"mat-option",7),a(1),r(2,"translateKey"),o()),t&2){let e=s.$implicit;d("value",e.id),i(),u(" ",E(2,2,e.value,"catalogs")," ")}}function Yr(t,s){if(t&1&&(n(0,"mat-option",7),a(1),r(2,"translateKey"),o()),t&2){let e=s.$implicit;d("value",e.id),i(),u(" ",E(2,2,e.value,"catalogs")," ")}}function Jr(t,s){if(t&1&&(n(0,"mat-option",7),a(1),r(2,"translateKey"),o()),t&2){let e=s.$implicit;d("value",e.id),i(),u(" ",E(2,2,e.value,"catalogs")," ")}}function Xr(t,s){if(t&1&&(n(0,"mat-option",7),a(1),r(2,"translateKey"),o()),t&2){let e=s.$implicit;d("value",e.id),i(),u(" ",E(2,2,e.value,"catalogs")," ")}}function Zr(t,s){if(t&1&&(n(0,"mat-option",7),a(1),r(2,"translateKey"),o()),t&2){let e=s.$implicit;d("value",e.id),i(),u(" ",E(2,2,e.value,"catalogs")," ")}}var xe=(()=>{class t{constructor(){this.formBuilder=x(mt),this.settingsService=x(U),this.minDate=new Date(2e3,0,1),this.maxDate=new Date,this.currency=null,this.createFixedDepositsAccountTermsForm()}ngOnChanges(){this.fixedDepositsAccountProductTemplate&&(this.currency=this.fixedDepositsAccountProductTemplate.currency,this.setOptions())}ngOnInit(){this.maxDate=this.settingsService.businessDate,this.fixedDepositsAccountTemplate.id&&this.fixedDepositAccountTermsForm.patchValue({interestCompoundingPeriodType:this.fixedDepositsAccountTemplate.interestCompoundingPeriodType.id,interestPostingPeriodType:this.fixedDepositsAccountTemplate.interestPostingPeriodType.id,interestCalculationType:this.fixedDepositsAccountTemplate.interestCalculationType.id,interestCalculationDaysInYearType:this.fixedDepositsAccountTemplate.interestCalculationDaysInYearType.id,depositAmount:this.fixedDepositsAccountTemplate.depositAmount?this.fixedDepositsAccountTemplate.depositAmount:0,depositPeriod:this.fixedDepositsAccountTemplate.depositPeriod,depositPeriodFrequencyId:this.fixedDepositsAccountTemplate.depositPeriodFrequency.id})}createFixedDepositsAccountTermsForm(){this.fixedDepositAccountTermsForm=this.formBuilder.group({interestCompoundingPeriodType:["",V.required],interestPostingPeriodType:["",V.required],interestCalculationType:["",V.required],interestCalculationDaysInYearType:["",V.required],depositAmount:[0,V.required],depositPeriod:["",V.required],depositPeriodFrequencyId:["",V.required]})}setOptions(){this.interestCompoundingPeriodTypeData=this.fixedDepositsAccountProductTemplate.interestCompoundingPeriodTypeOptions,this.interestPostingPeriodTypeData=this.fixedDepositsAccountProductTemplate.interestPostingPeriodTypeOptions,this.interestCalculationTypeData=this.fixedDepositsAccountProductTemplate.interestCalculationTypeOptions,this.interestCalculationDaysInYearTypeData=this.fixedDepositsAccountProductTemplate.interestCalculationDaysInYearTypeOptions,this.periodFrequencyTypeData=this.fixedDepositsAccountProductTemplate.periodFrequencyTypeOptions,this.fixedDepositsAccountTemplate.id||this.fixedDepositAccountTermsForm.patchValue({interestCompoundingPeriodType:this.fixedDepositsAccountProductTemplate.interestCompoundingPeriodType.id,interestPostingPeriodType:this.fixedDepositsAccountProductTemplate.interestPostingPeriodType.id,interestCalculationType:this.fixedDepositsAccountProductTemplate.interestCalculationType.id,interestCalculationDaysInYearType:this.fixedDepositsAccountProductTemplate.interestCalculationDaysInYearType.id,depositAmount:this.fixedDepositsAccountProductTemplate.depositAmount,depositPeriod:this.fixedDepositsAccountProductTemplate.minDepositTerm,depositPeriodFrequencyId:this.fixedDepositsAccountProductTemplate.minDepositTermType.id})}get fixedDepositAccountTerms(){let e=this.fixedDepositAccountTermsForm.value;for(let l in e)e[l]===""&&delete e[l];return e}static{this.\u0275fac=function(l){return new(l||t)}}static{this.\u0275cmp=O({type:t,selectors:[["mifosx-fixed-deposit-account-terms-step"]],inputs:{fixedDepositsAccountTemplate:"fixedDepositsAccountTemplate",fixedDepositsAccountProductTemplate:"fixedDepositsAccountProductTemplate"},features:[Jt],decls:96,vars:80,consts:[[3,"formGroup"],[1,"layout-row-wrap","gap-2px","responsive-column"],[1,"flex-48",3,"currency","isRequired","inputFormControl","inputLabel"],[1,"flex-48","hide-lt-md"],[1,"flex-48"],["type","number","matInput","","formControlName","depositPeriod","required",""],["formControlName","depositPeriodFrequencyId","required",""],[3,"value"],[1,"flex-98"],["formControlName","interestCompoundingPeriodType","required",""],["formControlName","interestPostingPeriodType","required",""],["formControlName","interestCalculationType","required",""],["formControlName","interestCalculationDaysInYearType","required",""],[1,"layout-row","align-center","gap-2percent","margin-t","responsive-column"],["mat-raised-button","","matStepperPrevious",""],["icon","arrow-left",1,"m-r-10"],["mat-raised-button","","matStepperNext",""],["icon","arrow-right",1,"m-l-10"]],template:function(l,p){l&1&&(n(0,"form",0)(1,"div",1),h(2,Kr,1,4,"mifosx-input-amount",2),g(3,"span",3),n(4,"mat-form-field",4)(5,"mat-label"),a(6),r(7,"translate"),o(),g(8,"input",5),n(9,"mat-error"),a(10),r(11,"translate"),r(12,"translate"),n(13,"strong"),a(14),r(15,"translate"),o()()(),n(16,"mat-form-field",4)(17,"mat-label"),a(18),r(19,"translate"),o(),n(20,"mat-select",6),L(21,Qr,3,5,"mat-option",7,$),o(),n(23,"mat-error"),a(24),r(25,"translate"),r(26,"translate"),n(27,"strong"),a(28),r(29,"translate"),o()()(),g(30,"mat-divider",8),n(31,"mat-form-field",4)(32,"mat-label"),a(33),r(34,"translate"),o(),n(35,"mat-select",9),L(36,Yr,3,5,"mat-option",7,$),o(),n(38,"mat-error"),a(39),r(40,"translate"),r(41,"translate"),n(42,"strong"),a(43),r(44,"translate"),o()()(),n(45,"mat-form-field",4)(46,"mat-label"),a(47),r(48,"translate"),o(),n(49,"mat-select",10),L(50,Jr,3,5,"mat-option",7,$),o(),n(52,"mat-error"),a(53),r(54,"translate"),r(55,"translate"),n(56,"strong"),a(57),r(58,"translate"),o()()(),n(59,"mat-form-field",4)(60,"mat-label"),a(61),r(62,"translate"),o(),n(63,"mat-select",11),L(64,Xr,3,5,"mat-option",7,$),o(),n(66,"mat-error"),a(67),r(68,"translate"),r(69,"translate"),n(70,"strong"),a(71),r(72,"translate"),o()()(),n(73,"mat-form-field",4)(74,"mat-label"),a(75),r(76,"translate"),o(),n(77,"mat-select",12),L(78,Zr,3,5,"mat-option",7,$),o(),n(80,"mat-error"),a(81),r(82,"translate"),r(83,"translate"),n(84,"strong"),a(85),r(86,"translate"),o()()()(),n(87,"div",13)(88,"button",14),g(89,"fa-icon",15),a(90),r(91,"translate"),o(),n(92,"button",16),a(93),r(94,"translate"),g(95,"fa-icon",17),o()()()),l&2&&(d("formGroup",p.fixedDepositAccountTermsForm),i(2),v(p.currency?2:-1),i(4),m(c(7,28,"labels.inputs.Deposit Period")),i(4),T(" ",c(11,30,"labels.inputs.Deposit Period")," ",c(12,32,"labels.commons.is")," "),i(4),m(c(15,34,"labels.commons.required")),i(4),m(c(19,36,"labels.inputs.Deposit Period Type")),i(3),G(p.periodFrequencyTypeData),i(3),T(" ",c(25,38,"labels.inputs.Deposit Period Type")," ",c(26,40,"labels.commons.is")," "),i(4),m(c(29,42,"labels.commons.required")),i(5),m(c(34,44,"labels.inputs.Interest Compounding Period")),i(3),G(p.interestCompoundingPeriodTypeData),i(3),T(" ",c(40,46,"labels.inputs.Interest Compounding Period")," ",c(41,48,"labels.commons.is")," "),i(4),m(c(44,50,"labels.commons.required")),i(4),m(c(48,52,"labels.inputs.Interest Posting Period")),i(3),G(p.interestPostingPeriodTypeData),i(3),T(" ",c(54,54,"labels.inputs.Interest Posting Period")," ",c(55,56,"labels.commons.is")," "),i(4),m(c(58,58,"labels.commons.required")),i(4),m(c(62,60,"labels.inputs.Interest Calculated using")),i(3),G(p.interestCalculationTypeData),i(3),T(" ",c(68,62,"labels.inputs.Interest Calculated using")," ",c(69,64,"labels.commons.is")," "),i(4),m(c(72,66,"labels.commons.required")),i(4),m(c(76,68,"labels.inputs.Days in Year")),i(3),G(p.interestCalculationDaysInYearTypeData),i(3),T(" ",c(82,70,"labels.inputs.Days in Year")," ",c(83,72,"labels.commons.is")," "),i(4),m(c(86,74,"labels.commons.required")),i(5),u(" ",c(91,76,"labels.buttons.Previous")," "),i(3),u(" ",c(94,78,"labels.buttons.Next")," "))},dependencies:[y,I,ct,rt,jt,it,pt,gt,st,lt,ot,nt,Ct,dt,Ot,At,B,ei,Re,Wt,ut,ne,w,It],styles:["h4[_ngcontent-%COMP%]{font-weight:500;margin:1em 0}h3[_ngcontent-%COMP%]{font-weight:500}mat-divider[_ngcontent-%COMP%]{margin:1em 0 2em}.margin-v[_ngcontent-%COMP%]{margin:1em 0}.margin-b[_ngcontent-%COMP%]{margin:0 0 1em}.margin-t[_ngcontent-%COMP%]{margin-top:1em}"]})}}return t})();function tp(t,s){if(t&1&&(n(0,"mat-option",6),a(1),r(2,"translateKey"),o()),t&2){let e=s.$implicit;d("value",e.id),i(),u(" ",E(2,2,e.value,"catalogs")," ")}}function ep(t,s){if(t&1&&(n(0,"mat-option",6),a(1),r(2,"translateKey"),o()),t&2){let e=s.$implicit;d("value",e.id),i(),u(" ",E(2,2,e.value,"catalogs")," ")}}function ip(t,s){if(t&1&&(n(0,"mat-option",6),a(1),r(2,"translateKey"),o()),t&2){let e=s.$implicit;d("value",e.id),i(),u(" ",E(2,2,e.value,"catalogs")," ")}}function np(t,s){if(t&1&&(n(0,"mat-option",6),a(1),r(2,"translateKey"),o()),t&2){let e=s.$implicit;d("value",e.id),i(),u(" ",E(2,2,e.value,"catalogs")," ")}}function op(t,s){if(t&1&&(n(0,"mat-option",6),a(1),o()),t&2){let e=s.$implicit;d("value",e.id),i(),T(" (",e.accountNo,") ",e.savingsProductName," ")}}function ap(t,s){if(t&1&&(n(0,"mat-form-field",16)(1,"mat-label"),a(2),r(3,"translate"),o(),n(4,"mat-select",28),L(5,op,2,3,"mat-option",6,$),o(),n(7,"mat-error"),a(8),r(9,"translate"),r(10,"translate"),n(11,"strong"),a(12),r(13,"translate"),o()()()),t&2){let e=_();i(2),m(c(3,4,"labels.inputs.Linked Savings Account")),i(3),G(e.savingsAccountsData),i(3),T(" ",c(9,6,"labels.inputs.Linked Savings Account")," ",c(10,8,"labels.commons.is")," "),i(4),m(c(13,10,"labels.commons.required"))}}function rp(t,s){if(t&1&&(n(0,"mat-option",6),a(1),r(2,"translateKey"),o()),t&2){let e=s.$implicit;d("value",e.id),i(),u(" ",E(2,2,e.value,"catalogs")," ")}}function pp(t,s){if(t&1&&(n(0,"mat-option",6),a(1),o()),t&2){let e=s.$implicit;d("value",e.id),i(),T(" (",e.accountNo,") ",e.savingsProductName," ")}}function cp(t,s){if(t&1&&(n(0,"mat-form-field",18)(1,"mat-label"),a(2),r(3,"translate"),o(),n(4,"mat-select",29),L(5,pp,2,3,"mat-option",6,$),o(),n(7,"mat-error"),a(8),r(9,"translate"),r(10,"translate"),n(11,"strong"),a(12),r(13,"translate"),o()()()),t&2){let e=_();i(2),m(c(3,4,"labels.inputs.Transfer to savings account")),i(3),G(e.savingsAccountsData),i(3),T(" ",c(9,6,"labels.inputs.Transfer to savings account")," ",c(10,8,"labels.commons.is")," "),i(4),m(c(13,10,"labels.commons.required"))}}function sp(t,s){if(t&1&&(n(0,"mat-option",6),a(1),r(2,"translateKey"),o()),t&2){let e=s.$implicit;d("value",e.id),i(),u(" ",E(2,2,e.value,"catalogs")," ")}}function lp(t,s){t&1&&(n(0,"mat-form-field",31)(1,"mat-label"),a(2),r(3,"translate"),o(),g(4,"input",32),o()),t&2&&(i(2),m(c(3,1,"labels.inputs.Tax Group")))}function mp(t,s){if(t&1&&(g(0,"mat-divider",13),n(1,"mat-checkbox",30),a(2),r(3,"translate"),o(),h(4,lp,5,3,"mat-form-field",31)),t&2){let e=_();i(2),u(" ",c(3,2,"labels.inputs.Is Withhold Tax Applicable"),"? "),i(2),v(e.fixedDepositAccountSettingsForm.controls.taxGroupId?4:-1)}}var Ce=(()=>{class t{constructor(){this.formBuilder=x(mt),this.settingsService=x(U),this.minDate=new Date(2e3,0,1),this.maxDate=new Date,this.createFixedDepositAccountSettingsForm(),this.buildDependencies()}ngOnChanges(){this.fixedDepositsAccountProductTemplate&&(this.fixedDepositAccountSettingsForm.patchValue({minDepositTerm:this.fixedDepositsAccountProductTemplate.minDepositTerm,minDepositTermTypeId:this.fixedDepositsAccountProductTemplate.minDepositTermType?this.fixedDepositsAccountProductTemplate.minDepositTermType.id:"",inMultiplesOfDepositTerm:this.fixedDepositsAccountProductTemplate.inMultiplesOfDepositTerm,inMultiplesOfDepositTermTypeId:this.fixedDepositsAccountProductTemplate.inMultiplesOfDepositTermType?this.fixedDepositsAccountProductTemplate.inMultiplesOfDepositTermType.id:"",maxDepositTerm:this.fixedDepositsAccountProductTemplate.maxDepositTerm,maxDepositTermTypeId:this.fixedDepositsAccountProductTemplate.maxDepositTermType?this.fixedDepositsAccountProductTemplate.maxDepositTermType.id:"",preClosurePenalApplicable:this.fixedDepositsAccountProductTemplate.preClosurePenalApplicable,preClosurePenalInterest:this.fixedDepositsAccountProductTemplate.preClosurePenalInterest,preClosurePenalInterestOnTypeId:this.fixedDepositsAccountProductTemplate.preClosurePenalInterestOnType?this.fixedDepositsAccountProductTemplate.preClosurePenalInterestOnType.id:"",maturityInstructionId:this.fixedDepositsAccountProductTemplate.maturityInstructionId}),this.fixedDepositsAccountProductTemplate.withHoldTax?(this.fixedDepositAccountSettingsForm.addControl("withHoldTax",new Z(!1)),this.fixedDepositAccountSettingsForm.get("withHoldTax").valueChanges.subscribe(e=>{e?(this.fixedDepositAccountSettingsForm.addControl("taxGroupId",new Z({value:"",disabled:!0})),this.fixedDepositAccountSettingsForm.get("taxGroupId").patchValue(this.fixedDepositsAccountProductTemplate.taxGroup&&this.fixedDepositsAccountProductTemplate.taxGroup.name)):this.fixedDepositAccountSettingsForm.removeControl("taxGroupId")}),this.fixedDepositAccountSettingsForm.get("withHoldTax").patchValue(this.fixedDepositsAccountTemplate.withHoldTax)):this.fixedDepositAccountSettingsForm.removeControl("withHoldTax"),this.setOptions())}ngOnInit(){this.maxDate=this.settingsService.businessDate,this.fixedDepositsAccountTemplate&&this.fixedDepositAccountSettingsForm.patchValue({lockinPeriodFrequency:this.fixedDepositsAccountTemplate.lockinPeriodFrequency,lockinPeriodFrequencyType:this.fixedDepositsAccountTemplate.lockinPeriodFrequencyType&&this.fixedDepositsAccountTemplate.lockinPeriodFrequencyType.id,transferInterestToSavings:this.fixedDepositsAccountTemplate.transferInterestToSavings})}createFixedDepositAccountSettingsForm(){this.fixedDepositAccountSettingsForm=this.formBuilder.group({lockinPeriodFrequency:[""],lockinPeriodFrequencyType:[""],minDepositTerm:[{value:"",disabled:!0}],minDepositTermTypeId:[{value:"",disabled:!0}],inMultiplesOfDepositTerm:[{value:"",disabled:!0}],inMultiplesOfDepositTermTypeId:[{value:"",disabled:!0}],maxDepositTerm:[{value:"",disabled:!0}],maxDepositTermTypeId:[{value:"",disabled:!0}],transferInterestToSavings:[!1],preClosurePenalApplicable:[{value:"",disabled:!0}],preClosurePenalInterest:[{value:"",disabled:!0}],preClosurePenalInterestOnTypeId:[{value:"",disabled:!0}],maturityInstructionId:[""]})}buildDependencies(){this.fixedDepositAccountSettingsForm.get("transferInterestToSavings").valueChanges.subscribe(e=>{e?(this.fixedDepositAccountSettingsForm.addControl("linkAccountId",new Z("",V.required)),this.fixedDepositAccountSettingsForm.get("linkAccountId").patchValue(this.fixedDepositsAccountTemplate.linkedAccount&&this.fixedDepositsAccountTemplate.linkedAccount.id)):this.fixedDepositAccountSettingsForm.removeControl("linkAccountId")}),this.fixedDepositAccountSettingsForm.get("maturityInstructionId").valueChanges.subscribe(e=>{e>100?(this.fixedDepositAccountSettingsForm.addControl("transferToSavingsId",new Z("",V.required)),this.fixedDepositAccountSettingsForm.get("transferToSavingsId").patchValue(this.fixedDepositsAccountTemplate.transferToSavingsId&&this.fixedDepositsAccountTemplate.transferToSavingsId.id)):this.fixedDepositAccountSettingsForm.removeControl("transferToSavingsId")})}setOptions(){this.lockinPeriodFrequencyTypeData=this.fixedDepositsAccountProductTemplate.lockinPeriodFrequencyTypeOptions,this.periodFrequencyTypeData=this.fixedDepositsAccountProductTemplate.periodFrequencyTypeOptions,this.savingsAccountsData=this.fixedDepositsAccountProductTemplate.savingsAccounts,this.preClosurePenalInterestOnTypeData=this.fixedDepositsAccountProductTemplate.preClosurePenalInterestOnTypeOptions,this.maturityInstructionOptions=this.fixedDepositsAccountProductTemplate.maturityInstructionOptions}get fixedDepositAccountSettings(){let e=this.fixedDepositAccountSettingsForm.getRawValue();for(let l in e)(e[l]===""||l==="taxGroupId")&&delete e[l];return e}static{this.\u0275fac=function(l){return new(l||t)}}static{this.\u0275cmp=O({type:t,selectors:[["mifosx-fixed-deposit-account-settings-step"]],inputs:{fixedDepositsAccountTemplate:"fixedDepositsAccountTemplate",fixedDepositsAccountProductTemplate:"fixedDepositsAccountProductTemplate"},features:[Jt],decls:122,vars:85,consts:[[3,"formGroup"],[1,"layout-row-wrap","gap-2px","responsive-column"],[1,"mat-h4","flex-98"],[1,"flex-48"],["type","number","matInput","","formControlName","lockinPeriodFrequency"],["formControlName","lockinPeriodFrequencyType"],[3,"value"],["type","number","matInput","","formControlName","minDepositTerm","required",""],["formControlName","minDepositTermTypeId","required",""],["type","number","matInput","","formControlName","inMultiplesOfDepositTerm"],["formControlName","inMultiplesOfDepositTermTypeId"],["type","number","matInput","","formControlName","maxDepositTerm"],["formControlName","maxDepositTermTypeId"],[1,"flex-98"],[1,"mat-h3","flex-23"],["labelPosition","before","formControlName","transferInterestToSavings",1,"flex-32","margin-b"],[1,"margin-b","flex-48"],["formControlName","maturityInstructionId"],[1,"flex-48","margin-b"],[1,"mat-h4","flex-23"],["labelPosition","before","formControlName","preClosurePenalApplicable",1,"flex-73","margin-v"],["type","number","matInput","","formControlName","preClosurePenalInterest"],["formControlName","preClosurePenalInterestOnTypeId"],[1,"layout-row","align-center","gap-2percent","margin-t","responsive-column"],["mat-raised-button","","matStepperPrevious",""],["icon","arrow-left",1,"m-r-10"],["mat-raised-button","","matStepperNext",""],["icon","arrow-right",1,"m-l-10"],["formControlName","linkAccountId","required",""],["formControlName","transferToSavingsId","required",""],["labelPosition","before","formControlName","withHoldTax",1,"margin-p","flex-48"],[1,"p-b-25","flex-48"],["matInput","","formControlName","taxGroupId"]],template:function(l,p){l&1&&(n(0,"form",0)(1,"div",1)(2,"h4",2),a(3),r(4,"translate"),o(),n(5,"mat-form-field",3)(6,"mat-label"),a(7),r(8,"translate"),o(),g(9,"input",4),o(),n(10,"mat-form-field",3)(11,"mat-label"),a(12),r(13,"translate"),o(),n(14,"mat-select",5),L(15,tp,3,5,"mat-option",6,$),o()(),n(17,"h4",2),a(18),r(19,"translate"),o(),n(20,"mat-form-field",3)(21,"mat-label"),a(22),r(23,"translate"),o(),g(24,"input",7),n(25,"mat-error"),a(26),r(27,"translate"),r(28,"translate"),n(29,"strong"),a(30),r(31,"translate"),o()()(),n(32,"mat-form-field",3)(33,"mat-label"),a(34),r(35,"translate"),o(),n(36,"mat-select",8),L(37,ep,3,5,"mat-option",6,$),o(),n(39,"mat-error"),a(40),r(41,"translate"),r(42,"translate"),n(43,"strong"),a(44),r(45,"translate"),o()()(),n(46,"h4",2),a(47),r(48,"translate"),o(),n(49,"mat-form-field",3)(50,"mat-label"),a(51),r(52,"translate"),o(),g(53,"input",9),o(),n(54,"mat-form-field",3)(55,"mat-label"),a(56),r(57,"translate"),o(),n(58,"mat-select",10),L(59,ip,3,5,"mat-option",6,$),o()(),n(61,"h4",2),a(62),r(63,"translate"),o(),n(64,"mat-form-field",3)(65,"mat-label"),a(66),r(67,"translate"),o(),g(68,"input",11),o(),n(69,"mat-form-field",3)(70,"mat-label"),a(71),r(72,"translate"),o(),n(73,"mat-select",12),L(74,np,3,5,"mat-option",6,$),o()(),g(76,"mat-divider",13),n(77,"h3",14),a(78),r(79,"translate"),o(),n(80,"mat-checkbox",15),a(81),r(82,"translate"),o(),h(83,ap,14,12,"mat-form-field",16),g(84,"mat-divider",13),n(85,"mat-form-field",3)(86,"mat-label"),a(87),r(88,"translate"),o(),n(89,"mat-select",17),L(90,rp,3,5,"mat-option",6,$),o()(),h(92,cp,14,12,"mat-form-field",18),g(93,"mat-divider",13),n(94,"h4",19),a(95),r(96,"translate"),o(),n(97,"mat-checkbox",20),a(98),r(99,"translate"),o(),n(100,"mat-form-field",3)(101,"mat-label"),a(102),r(103,"translate"),o(),g(104,"input",21),o(),n(105,"mat-form-field",3)(106,"mat-label"),a(107),r(108,"translate"),o(),n(109,"mat-select",22),L(110,sp,3,5,"mat-option",6,$),o()(),h(112,mp,5,4),o(),n(113,"div",23)(114,"button",24),g(115,"fa-icon",25),a(116),r(117,"translate"),o(),n(118,"button",26),a(119),r(120,"translate"),g(121,"fa-icon",27),o()()()),l&2&&(d("formGroup",p.fixedDepositAccountSettingsForm),i(3),m(c(4,31,"labels.heading.Lock-in Period")),i(4),m(c(8,33,"labels.inputs.Frequency")),i(5),m(c(13,35,"labels.inputs.Type")),i(3),G(p.lockinPeriodFrequencyTypeData),i(3),m(c(19,37,"labels.heading.Minimum Deposit Term")),i(4),m(c(23,39,"labels.inputs.Frequency")),i(4),T(" ",c(27,41,"labels.inputs.Minimum Deposit Term Frequency")," ",c(28,43,"labels.commons.is")," "),i(4),m(c(31,45,"labels.commons.required")),i(4),m(c(35,47,"labels.inputs.Frequency Type")),i(3),G(p.periodFrequencyTypeData),i(3),T(" ",c(41,49,"labels.inputs.Minimum Deposit Term Frequency Type")," ",c(42,51,"labels.commons.is")," "),i(4),m(c(45,53,"labels.commons.required")),i(3),m(c(48,55,"labels.heading.And thereafter, in Multiples of")),i(4),m(c(52,57,"labels.inputs.Frequency")),i(5),m(c(57,59,"labels.inputs.Type")),i(3),G(p.periodFrequencyTypeData),i(3),m(c(63,61,"labels.heading.Maximum Deposit Term")),i(4),m(c(67,63,"labels.inputs.Frequency")),i(5),m(c(72,65,"labels.inputs.Type")),i(3),G(p.periodFrequencyTypeData),i(4),m(c(79,67,"labels.heading.Interest Transfer")),i(3),u(" ",c(82,69,"labels.inputs.Transfer Interest to Linked Savings Account"),"? "),i(2),v(p.fixedDepositAccountSettingsForm.contains("linkAccountId")?83:-1),i(4),m(c(88,71,"labels.inputs.Maturity Instructions")),i(3),G(p.maturityInstructionOptions),i(2),v(p.fixedDepositAccountSettingsForm.contains("transferToSavingsId")?92:-1),i(3),m(c(96,73,"labels.heading.For Pre-mature closure")),i(3),u(" ",c(99,75,"labels.inputs.Apply Penal Interest (less)")," "),i(4),u("",c(103,77,"labels.inputs.Penal Interest")," (%)"),i(5),m(c(108,79,"labels.inputs.Period")),i(3),G(p.preClosurePenalInterestOnTypeData),i(2),v(p.fixedDepositAccountSettingsForm.controls.withHoldTax?112:-1),i(4),u(" ",c(117,81,"labels.buttons.Previous")," "),i(3),u(" ",c(120,83,"labels.buttons.Next")," "))},dependencies:[y,I,ct,rt,jt,it,pt,gt,st,lt,ot,nt,Ct,dt,Ot,At,B,Ue,Re,Wt,ut,ne,w,It],styles:["h4[_ngcontent-%COMP%]{font-weight:500;margin:1em 0}h3[_ngcontent-%COMP%]{font-weight:500}mat-divider[_ngcontent-%COMP%]{margin:1em 0 2em}.margin-v[_ngcontent-%COMP%]{margin:1em 0}.margin-b[_ngcontent-%COMP%]{margin:0 0 1em}.margin-t[_ngcontent-%COMP%]{margin-top:1em}.margin-p[_ngcontent-%COMP%]{margin-top:1.7em}"]})}}return t})();var dp=()=>[2e3];function up(t,s){if(t&1&&(n(0,"mat-option",3),a(1),o()),t&2){let e=s.$implicit;d("value",e),i(),u(" ",e.name," ")}}function fp(t,s){t&1&&(n(0,"th",24),a(1),r(2,"translate"),o()),t&2&&(i(),m(c(2,1,"labels.inputs.name")))}function gp(t,s){if(t&1&&(n(0,"td",25),a(1),o()),t&2){let e=s.$implicit;i(),u(" ",e.name+", "+e.currency.displaySymbol," ")}}function xp(t,s){t&1&&(n(0,"th",24),a(1),r(2,"translate"),o()),t&2&&(i(),m(c(2,1,"labels.inputs.Type")))}function Cp(t,s){if(t&1&&(n(0,"td",25),a(1),o()),t&2){let e=s.$implicit;i(),u(" ",e.chargeCalculationType.value," ")}}function _p(t,s){t&1&&(n(0,"th",24),a(1),r(2,"translate"),o()),t&2&&(i(),m(c(2,1,"labels.inputs.Amount")))}function hp(t,s){if(t&1){let e=F();n(0,"td",25),a(1),n(2,"button",26),M("click",function(){let p=S(e).$implicit,f=_();return A(f.editChargeAmount(p))}),g(3,"fa-icon",27),o()()}if(t&2){let e=s.$implicit;i(),u(" ",e.amount," ")}}function vp(t,s){t&1&&(n(0,"th",24),a(1),r(2,"translate"),o()),t&2&&(i(),m(c(2,1,"labels.inputs.Collected On")))}function Dp(t,s){if(t&1&&(n(0,"td",25),a(1),o()),t&2){let e=s.$implicit;i(),u(" ",e.chargeTimeType.value," ")}}function bp(t,s){t&1&&(n(0,"th",24),a(1),r(2,"translate"),o()),t&2&&(i(),m(c(2,1,"labels.inputs.Date")))}function Pp(t,s){if(t&1&&(n(0,"span"),a(1),r(2,"dateFormat"),o()),t&2){let e=_().$implicit;i(),u(" ",c(2,1,e.dueDate)||"Unassigned*"," ")}}function Mp(t,s){if(t&1&&(n(0,"span"),a(1),r(2,"dateFormat"),o()),t&2){let e=_().$implicit;i(),u(" ",e.feeOnMonthDay?E(2,1,R(4,dp).concat(e.feeOnMonthDay),"dd MMMM"):"Unassigned"," ")}}function Tp(t,s){t&1&&(n(0,"span"),a(1),r(2,"translate"),o()),t&2&&(i(),u(" ",c(2,1,"labels.inputs.N/A")," "))}function Sp(t,s){if(t&1){let e=F();n(0,"button",26),M("click",function(){S(e);let p=_().$implicit,f=_();return A(f.editChargeDate(p))}),g(1,"fa-icon",27),o()}}function Ap(t,s){if(t&1&&(n(0,"td",25),h(1,Pp,3,3,"span"),h(2,Mp,3,5,"span"),h(3,Tp,3,3,"span"),h(4,Sp,2,0,"button",28),o()),t&2){let e=s.$implicit;i(),v(e.chargeTimeType.value==="Specified due date"||e.chargeTimeType.value==="Weekly Fee"?1:-1),i(),v(e.chargeTimeType.value==="Monthly Fee"||e.chargeTimeType.value==="Annual Fee"?2:-1),i(),v(e.chargeTimeType.value==="Monthly Fee"||e.chargeTimeType.value==="Annual Fee"||e.chargeTimeType.value==="Specified due date"||e.chargeTimeType.value==="Weekly Fee"?-1:3),i(),v(e.chargeTimeType.value==="Weekly Fee"||e.chargeTimeType.value==="Annual Fee"||e.chargeTimeType.value==="Specified due date"?4:-1)}}function Op(t,s){t&1&&(n(0,"th",24),a(1),r(2,"translate"),o()),t&2&&(i(),m(c(2,1,"labels.inputs.Repayments Every")))}function yp(t,s){if(t&1){let e=F();n(0,"button",26),M("click",function(){S(e);let p=_().$implicit,f=_();return A(f.editChargeFeeInterval(p))}),g(1,"fa-icon",27),o()}}function Ip(t,s){if(t&1&&(n(0,"td",25),a(1),h(2,yp,2,0,"button",28),o()),t&2){let e=s.$implicit;i(),u(" ",e.feeInterval||"Not Provided"," "),i(),v(e.chargeTimeType.value==="Weekly Fee"||e.chargeTimeType.value==="Monthly Fee"?2:-1)}}function Fp(t,s){t&1&&(n(0,"th",24),a(1),r(2,"translate"),o()),t&2&&(i(),m(c(2,1,"labels.inputs.Actions")))}function wp(t,s){if(t&1){let e=F();n(0,"td",25)(1,"button",29),M("click",function(){let p=S(e).$implicit,f=_();return A(f.deleteCharge(p))}),g(2,"fa-icon",30),o()()}}function Ep(t,s){t&1&&g(0,"tr",31)}function Bp(t,s){t&1&&g(0,"tr",32)}var _e=(()=>{class t{constructor(){this.dialog=x(Ut),this.dateUtils=x(et),this.settingsService=x(U),this.currency=null,this.chargesDataSource=[],this.displayedColumns=["name","chargeCalculationType","amount","chargeTimeType","date","repaymentsEvery","action"],this.isChargesPatched=!1,this.pristine=!0}ngOnInit(){this.chargesDataSource=[],this.fixedDepositsAccountTemplate.id&&this.fixedDepositsAccountTemplate.charges&&(this.chargesDataSource=this.fixedDepositsAccountTemplate.charges.map(e=>X(H({},e),{id:e.chargeId}))||[])}ngOnChanges(){this.currency==null&&(this.fixedDepositsAccountTemplate.currency?this.currency=this.fixedDepositsAccountTemplate.currency:this.fixedDepositsAccountProductTemplate&&this.fixedDepositsAccountProductTemplate.currency&&(this.currency=this.fixedDepositsAccountProductTemplate.currency)),this.fixedDepositsAccountProductTemplate&&(this.chargeData=this.fixedDepositsAccountProductTemplate.chargeOptions.filter(e=>e.currency.code===this.currency.code))}addCharge(e){this.chargesDataSource=this.chargesDataSource.concat([e.value]),e.value="",this.pristine=!1}editChargeAmount(e){let l=[new Ne({controlName:"amount",label:"Amount",value:e.amount,type:"number",required:!1})],p={title:"Edit Charge Amount",layout:{addButtonText:"Confirm"},formfields:l};this.dialog.open(he,{data:p}).afterClosed().subscribe(D=>{if(D.data){let q=X(H({},e),{amount:D.data.value.amount});this.chargesDataSource.splice(this.chargesDataSource.indexOf(e),1,q),this.chargesDataSource=this.chargesDataSource.concat([])}}),this.pristine=!1}editChargeDate(e){let l=[new ti({controlName:"date",label:"Date",value:e.dueDate||e.feeOnMonthDay||"",type:"datetime-local",required:!1})],p={title:"Edit Charge Date",layout:{addButtonText:"Confirm"},formfields:l};this.dialog.open(he,{data:p}).afterClosed().subscribe(D=>{if(D.data){let q,re=this.settingsService.dateFormat,pe=this.dateUtils.formatDate(D.data.value.date,re);switch(e.chargeTimeType.value){case"Specified due date":case"Weekly Fee":q=X(H({},e),{dueDate:pe});break;case"Annual Fee":q=X(H({},e),{feeOnMonthDay:pe});break}this.chargesDataSource.splice(this.chargesDataSource.indexOf(e),1,q),this.chargesDataSource=this.chargesDataSource.concat([])}}),this.pristine=!1}editChargeFeeInterval(e){let l=[new Ne({controlName:"feeInterval",label:"Fee Interval",value:e.feeInterval,type:"text",required:!1})],p={title:"Edit Charge Fee Interval",layout:{addButtonText:"Confirm"},formfields:l};this.dialog.open(he,{data:p}).afterClosed().subscribe(D=>{if(D.data){let q=X(H({},e),{feeInterval:D.data.value.feeInterval});this.chargesDataSource.splice(this.chargesDataSource.indexOf(e),1,q),this.chargesDataSource=this.chargesDataSource.concat([])}}),this.pristine=!1}deleteCharge(e){this.chargesDataSource.splice(this.chargesDataSource.indexOf(e),1),this.chargesDataSource=this.chargesDataSource.concat([]),this.pristine=!1}get fixedDepositAccountCharges(){return{charges:this.chargesDataSource}}static{this.\u0275fac=function(l){return new(l||t)}}static{this.\u0275cmp=O({type:t,selectors:[["mifosx-fixed-deposit-account-charges-step"]],inputs:{fixedDepositsAccountTemplate:"fixedDepositsAccountTemplate",fixedDepositsAccountProductTemplate:"fixedDepositsAccountProductTemplate",fixedDepositAccountFormValid:"fixedDepositAccountFormValid"},features:[Jt],decls:47,vars:18,consts:[["charge",""],[1,"layout-row-wrap","gap-2px","responsive-column"],[1,"flex-48"],[3,"value"],[1,"flex-48","align-center"],["type","button","mat-raised-button","","color","primary",3,"click","disabled"],["icon","plus",1,"m-r-10"],["mat-table","",1,"flex-98","mat-elevation-z1",3,"dataSource","hidden"],["matColumnDef","name"],["mat-header-cell","",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","chargeCalculationType"],["matColumnDef","amount"],["matColumnDef","chargeTimeType"],["matColumnDef","date"],["matColumnDef","repaymentsEvery"],["matColumnDef","action"],["mat-header-row","",4,"matHeaderRowDef"],["mat-row","",4,"matRowDef","matRowDefColumns"],[1,"layout-row","responsive-column","align-center","gap-2px","margin-t"],["mat-raised-button","","matStepperPrevious",""],["icon","arrow-left",1,"m-r-10"],["mat-raised-button","","matStepperNext","",3,"disabled"],["icon","arrow-right",1,"m-l-10"],["mat-header-cell",""],["mat-cell",""],["mat-icon-button","","color","primary",3,"click"],["icon","pen"],["mat-icon-button","","color","primary"],["mat-icon-button","","color","warn",3,"click"],["icon","trash"],["mat-header-row",""],["mat-row",""]],template:function(l,p){if(l&1){let f=F();n(0,"div",1)(1,"mat-form-field",2)(2,"mat-label"),a(3),r(4,"translate"),o(),n(5,"mat-select",null,0),L(7,up,2,2,"mat-option",3,$),o()(),n(9,"div",4)(10,"button",5),M("click",function(){S(f);let q=k(6);return A(p.addCharge(q))}),g(11,"fa-icon",6),a(12),r(13,"translate"),o()(),n(14,"table",7),b(15,8),C(16,fp,3,3,"th",9)(17,gp,2,1,"td",10),P(),b(18,11),C(19,xp,3,3,"th",9)(20,Cp,2,1,"td",10),P(),b(21,12),C(22,_p,3,3,"th",9)(23,hp,4,1,"td",10),P(),b(24,13),C(25,vp,3,3,"th",9)(26,Dp,2,1,"td",10),P(),b(27,14),C(28,bp,3,3,"th",9)(29,Ap,5,4,"td",10),P(),b(30,15),C(31,Op,3,3,"th",9)(32,Ip,3,2,"td",10),P(),b(33,16),C(34,Fp,3,3,"th",9)(35,wp,3,0,"td",10),P(),C(36,Ep,1,0,"tr",17)(37,Bp,1,0,"tr",18),o()(),n(38,"div",19)(39,"button",20),g(40,"fa-icon",21),a(41),r(42,"translate"),o(),n(43,"button",22),a(44),r(45,"translate"),g(46,"fa-icon",23),o()()}if(l&2){let f=k(6);i(3),m(c(4,10,"labels.inputs.Charge")),i(4),G(p.chargeData),i(3),d("disabled",!f.value),i(2),u(" ",c(13,12,"labels.buttons.Add")," "),i(2),d("dataSource",p.chargesDataSource)("hidden",p.chargesDataSource.length===0),i(22),d("matHeaderRowDef",p.displayedColumns),i(),d("matRowDefColumns",p.displayedColumns),i(4),u(" ",c(42,14,"labels.buttons.Previous")," "),i(2),d("disabled",!p.fixedDepositAccountFormValid),i(),u(" ",c(45,16,"labels.buttons.Next")," ")}},dependencies:[y,I,ot,nt,Ot,At,B,ut,wt,kt,Bt,Rt,Et,Nt,Ee,Vt,zt,qt,Ht,Wt,ne,yt,w],styles:["table[_ngcontent-%COMP%]{width:100%}.mat-elevation-z1[_ngcontent-%COMP%]{margin:1em 0 1.5em}.margin-t[_ngcontent-%COMP%]{margin-top:1em}"]})}}return t})();var kp=["chartsTable"];function Rp(t,s){if(t&1&&(n(0,"div",3)(1,"span",4),a(2),r(3,"translate"),o(),n(4,"span",5),a(5),o()()),t&2){let e=_();i(2),u("",c(3,2,"labels.inputs.name"),":"),i(3),m(e.fixedDepositsAccountProductTemplate.accountChart.name)}}function Np(t,s){if(t&1&&(n(0,"div",3)(1,"span",4),a(2),r(3,"translate"),o(),n(4,"span",5),a(5),r(6,"dateFormat"),o()()),t&2){let e=_();i(2),u("",c(3,2,"labels.inputs.End Date"),":"),i(3),m(c(6,4,e.fixedDepositsAccountProductTemplate==null?null:e.fixedDepositsAccountProductTemplate.accountChart.endDate))}}function Vp(t,s){if(t&1&&(n(0,"div",3)(1,"span",4),a(2),r(3,"translate"),o(),n(4,"span",5),a(5),o()()),t&2){let e=_();i(2),u("",c(3,2,"labels.inputs.Description"),":"),i(3),m(e.fixedDepositsAccountProductTemplate==null?null:e.fixedDepositsAccountProductTemplate.accountChart.description)}}function qp(t,s){t&1&&(n(0,"th",23),a(1),r(2,"translate"),o()),t&2&&(i(),m(c(2,1,"labels.inputs.Period")))}function zp(t,s){if(t&1&&(n(0,"td",24),a(1),o()),t&2){let e=s.$implicit;i(),ce(" ",e.fromPeriod,"-",e.toPeriod,"\xA0",e.periodType.value," ")}}function Hp(t,s){t&1&&(n(0,"th",23),a(1),r(2,"translate"),o()),t&2&&(i(),m(c(2,1,"labels.inputs.Amount Range")))}function $p(t,s){if(t&1&&(n(0,"td",24),a(1),o()),t&2){let e=s.$implicit;i(),T("",e.amountRangeFrom,"-",e.amountRangeTo)}}function Lp(t,s){t&1&&(n(0,"th",23),a(1),r(2,"translate"),o()),t&2&&(i(),m(c(2,1,"labels.inputs.Interest")))}function Gp(t,s){if(t&1&&(n(0,"td",24),a(1),o()),t&2){let e=s.$implicit;i(),m(e.annualInterestRate)}}function Up(t,s){t&1&&(n(0,"th",23),a(1),r(2,"translate"),o()),t&2&&(i(),m(c(2,1,"labels.inputs.Description")))}function jp(t,s){if(t&1&&(n(0,"td",24),a(1),o()),t&2){let e=s.$implicit;i(),m(e.description)}}function Wp(t,s){t&1&&(n(0,"th",23),a(1),r(2,"translate"),o()),t&2&&(i(),m(c(2,1,"labels.inputs.Actions")))}function Kp(t,s){t&1&&(n(0,"span"),g(1,"fa-icon",27),a(2),r(3,"translate"),o()),t&2&&(i(2),u(" ",c(3,1,"labels.buttons.View Incentives")," "))}function Qp(t,s){t&1&&(n(0,"span"),g(1,"fa-icon",28),a(2),r(3,"translate"),o()),t&2&&(i(2),u(" ",c(3,1,"labels.buttons.Hide Incentives")," "))}function Yp(t,s){if(t&1){let e=F();n(0,"td",24)(1,"button",25),M("click",function(){let p=S(e).dataIndex,f=_();return A(f.expandChartSlabIndex=f.expandChartSlabIndex===p?null:p)}),C(2,Kp,4,3,"span",26)(3,Qp,4,3,"span",26),o()()}if(t&2){let e=s.dataIndex,l=_();i(2),d("ngIf",l.expandChartSlabIndex!==e),i(),d("ngIf",l.expandChartSlabIndex===e)}}function Jp(t,s){t&1&&(n(0,"th",23),a(1),r(2,"translate"),o()),t&2&&(i(),m(c(2,1,"labels.inputs.Entity Type")))}function Xp(t,s){if(t&1&&(n(0,"td",24),a(1),o()),t&2){let e=s.$implicit;i(),u(" ",e.entityType.value," ")}}function Zp(t,s){t&1&&(n(0,"th",23),a(1),r(2,"translate"),o()),t&2&&(i(),m(c(2,1,"labels.inputs.Attribute Name")))}function tc(t,s){if(t&1&&(n(0,"td",24),a(1),o()),t&2){let e=s.$implicit;i(),u(" ",e.attributeName.value," ")}}function ec(t,s){t&1&&(n(0,"th",23),a(1),r(2,"translate"),o()),t&2&&(i(),m(c(2,1,"labels.inputs.Condition Type")))}function ic(t,s){if(t&1&&(n(0,"td",24),a(1),r(2,"titlecase"),o()),t&2){let e=s.$implicit;i(),u(" ",c(2,1,e.conditionType.value)," ")}}function nc(t,s){t&1&&(n(0,"th",23),a(1),r(2,"translate"),o()),t&2&&(i(),m(c(2,1,"labels.inputs.Attribute Value")))}function oc(t,s){if(t&1&&(n(0,"td",41),a(1),o()),t&2){let e=s.$implicit;d("ngSwitch",e.attributeName),i(),u(" ",e.attributeValueDesc," ")}}function ac(t,s){t&1&&(n(0,"th",23),a(1),r(2,"translate"),o()),t&2&&(i(),m(c(2,1,"labels.inputs.Incentive Type")))}function rc(t,s){if(t&1&&(n(0,"td",24),a(1),o()),t&2){let e=s.$implicit;i(),u(" ",e.incentiveType.value," ")}}function pc(t,s){t&1&&(n(0,"th",23),a(1),r(2,"translate"),o()),t&2&&(i(),m(c(2,1,"labels.inputs.Interest")))}function cc(t,s){if(t&1&&(n(0,"td",24),a(1),o()),t&2){let e=s.$implicit;i(),u(" ",e.amount," ")}}function sc(t,s){t&1&&g(0,"tr",42)}function lc(t,s){t&1&&g(0,"tr",43)}function mc(t,s){if(t&1&&(n(0,"table",33),b(1,34),C(2,Jp,3,3,"th",8)(3,Xp,2,1,"td",9),P(),b(4,35),C(5,Zp,3,3,"th",8)(6,tc,2,1,"td",9),P(),b(7,36),C(8,ec,3,3,"th",8)(9,ic,3,3,"td",9),P(),b(10,37),C(11,nc,3,3,"th",8)(12,oc,2,2,"td",38),P(),b(13,39),C(14,ac,3,3,"th",8)(15,rc,2,1,"td",9),P(),b(16,40),C(17,pc,3,3,"th",8)(18,cc,2,1,"td",9),P(),C(19,sc,1,0,"tr",15)(20,lc,1,0,"tr",16),o()),t&2){let e=_().$implicit,l=_();d("dataSource",e.incentives),i(19),d("matHeaderRowDef",l.incentivesDisplayedColumns),i(),d("matRowDefColumns",l.incentivesDisplayedColumns)}}function dc(t,s){if(t&1&&(n(0,"td",24)(1,"div",29)(2,"mat-card",30)(3,"h4",31),a(4),r(5,"translate"),o(),C(6,mc,21,3,"table",32),o()()()),t&2){let e=s.$implicit,l=s.dataIndex,p=_();Te("colspan",p.chartSlabsDisplayedColumns.length),i(),d("@expandChartSlab",l===p.expandChartSlabIndex?"expanded":"collapsed"),i(3),u(" ",c(5,4,"labels.heading.Incentives")," "),i(2),d("ngIf",e.incentives.length)}}function uc(t,s){t&1&&g(0,"tr",42)}function fc(t,s){t&1&&g(0,"tr",43)}function gc(t,s){t&1&&g(0,"tr",44)}var Ve=(()=>{class t{constructor(){this.interestRateChartData=[],this.chartSlabsDisplayedColumns=["period","amountRange","interest","description","actions"],this.incentivesDisplayedColumns=["entityType","attributeName","conditionType","attributeValue","incentiveType","amount"],this.chartSlabsIncentivesDisplayedColumns=["incentives"]}ngOnChanges(){this.fixedDepositsAccountProductTemplate&&(this.interestRateChartData=this.fixedDepositsAccountProductTemplate.accountChart.chartSlabs,this.chartsTableRef.renderRows())}static{this.\u0275fac=function(l){return new(l||t)}}static{this.\u0275cmp=O({type:t,selectors:[["mifosx-fixed-deposit-account-interest-rate-chart-step"]],viewQuery:function(l,p){if(l&1&&ht(kp,7),l&2){let f;vt(f=Dt())&&(p.chartsTableRef=f.first)}},inputs:{fixedDepositsAccountTemplate:"fixedDepositsAccountTemplate",fixedDepositsAccountProductTemplate:"fixedDepositsAccountProductTemplate"},features:[Jt],decls:48,vars:23,consts:[["chartsTable",""],[1,"layout-column","gap-2px"],["class","flex-fill",4,"ngIf"],[1,"flex-fill"],[1,"flex-40"],[1,"flex-60"],["mat-table","","multiTemplateDataRows","",1,"mat-elevation-z1",3,"dataSource"],["matColumnDef","period"],["mat-header-cell","",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","amountRange"],["matColumnDef","interest"],["matColumnDef","description"],["matColumnDef","actions"],["matColumnDef","incentives"],["mat-header-row","",4,"matHeaderRowDef"],["mat-row","",4,"matRowDef","matRowDefColumns"],["mat-row","","class","incentives-row",4,"matRowDef","matRowDefColumns"],[1,"layout-row","responsive-column","align-center","gap-2px","margin-t"],["mat-raised-button","","matStepperPrevious",""],["icon","arrow-left",1,"m-r-10"],["mat-raised-button","","matStepperNext",""],["icon","arrow-right",1,"m-l-10"],["mat-header-cell",""],["mat-cell",""],["mat-button","","color","primary",3,"click"],[4,"ngIf"],["icon","eye",1,"m-r-10"],["icon","eye-slash",1,"m-r-10"],[1,"incentives","layout-row-wrap","flex-fill"],[1,"layout-row-wrap","flex-fill"],[1,"m-b-10","flex-13"],["class","flex-fill mat-elevation-z1","mat-table","",3,"dataSource",4,"ngIf"],["mat-table","",1,"flex-fill","mat-elevation-z1",3,"dataSource"],["matColumnDef","entityType"],["matColumnDef","attributeName"],["matColumnDef","conditionType"],["matColumnDef","attributeValue"],["mat-cell","",3,"ngSwitch",4,"matCellDef"],["matColumnDef","incentiveType"],["matColumnDef","amount"],["mat-cell","",3,"ngSwitch"],["mat-header-row",""],["mat-row",""],["mat-row","",1,"incentives-row"]],template:function(l,p){l&1&&(n(0,"div",1),C(1,Rp,6,4,"div",2),n(2,"div",3)(3,"span",4),a(4),r(5,"translate"),o(),n(6,"span",5),a(7),r(8,"dateFormat"),o()(),C(9,Np,7,6,"div",2)(10,Vp,6,4,"div",2),n(11,"div",3)(12,"span",4),a(13),r(14,"translate"),o(),n(15,"span",5),a(16),o()(),n(17,"table",6,0),b(19,7),C(20,qp,3,3,"th",8)(21,zp,2,3,"td",9),P(),b(22,10),C(23,Hp,3,3,"th",8)(24,$p,2,2,"td",9),P(),b(25,11),C(26,Lp,3,3,"th",8)(27,Gp,2,1,"td",9),P(),b(28,12),C(29,Up,3,3,"th",8)(30,jp,2,1,"td",9),P(),b(31,13),C(32,Wp,3,3,"th",8)(33,Yp,4,2,"td",9),P(),b(34,14),C(35,dc,7,6,"td",9),P(),C(36,uc,1,0,"tr",15)(37,fc,1,0,"tr",16)(38,gc,1,0,"tr",17),o()(),n(39,"div",18)(40,"button",19),g(41,"fa-icon",20),a(42),r(43,"translate"),o(),n(44,"button",21),a(45),r(46,"translate"),g(47,"fa-icon",22),o()()),l&2&&(i(),d("ngIf",p.fixedDepositsAccountProductTemplate==null?null:p.fixedDepositsAccountProductTemplate.accountChart.name),i(3),u("",c(5,13,"labels.inputs.Valid from Date"),":"),i(3),m(c(8,15,p.fixedDepositsAccountProductTemplate==null?null:p.fixedDepositsAccountProductTemplate.accountChart.fromDate)),i(2),d("ngIf",p.fixedDepositsAccountProductTemplate==null?null:p.fixedDepositsAccountProductTemplate.accountChart.endDate),i(),d("ngIf",p.fixedDepositsAccountProductTemplate==null?null:p.fixedDepositsAccountProductTemplate.accountChart.description),i(3),u("",c(14,17,"labels.inputs.Primary Grouping by Amount"),":"),i(3),m(p.fixedDepositsAccountProductTemplate!=null&&p.fixedDepositsAccountProductTemplate.accountChart.isPrimaryGroupingByAmount?"Yes":"No"),i(),d("dataSource",p.interestRateChartData),i(19),d("matHeaderRowDef",p.chartSlabsDisplayedColumns),i(),d("matRowDefColumns",p.chartSlabsDisplayedColumns),i(),d("matRowDefColumns",p.chartSlabsIncentivesDisplayedColumns),i(4),u(" ",c(43,19,"labels.buttons.Previous")," "),i(3),u(" ",c(46,21,"labels.buttons.Next")," "))},dependencies:[y,Ae,Oe,I,Y,B,wt,kt,Bt,Rt,Et,Nt,ut,Vt,zt,qt,Ht,Wt,ne,ye,yt,w],styles:[".margin-t[_ngcontent-%COMP%]{margin-top:2em}table[_ngcontent-%COMP%]{width:100%}table[_ngcontent-%COMP%] tr.incentives-row[_ngcontent-%COMP%]{height:0}table[_ngcontent-%COMP%] tr.incentives-row[_ngcontent-%COMP%] > td[_ngcontent-%COMP%]{padding:0}table[_ngcontent-%COMP%] tr.incentives-row[_ngcontent-%COMP%] .incentives[_ngcontent-%COMP%]{overflow:hidden}table[_ngcontent-%COMP%] tr.incentives-row[_ngcontent-%COMP%] .mat-card[_ngcontent-%COMP%]{border-radius:0}"],data:{animation:[Ie("expandChartSlab",[ae("collapsed",oe({height:"0px",minHeight:"0"})),ae("expanded",oe({height:"*"})),we("expanded <=> collapsed",Fe("225ms cubic-bezier(0.4, 0.0, 0.2, 1)"))])]}})}}return t})();var xc=()=>["../.."],Cc=()=>[2e3];function _c(t,s){if(t&1&&(n(0,"div",3)(1,"span",4),a(2),r(3,"translate"),o(),n(4,"span",5),a(5),o()()),t&2){let e=_();i(2),m(c(3,2,"labels.inputs.External Id")),i(3),m(e.fixedDepositAccountData.externalId)}}function hc(t,s){if(t&1&&(n(0,"div",3)(1,"span",4),a(2),r(3,"translate"),o(),n(4,"span",5),a(5),r(6,"find"),r(7,"translateKey"),o()()),t&2){let e=_();i(2),u("",c(3,3,"labels.inputs.Lock-in Period"),":"),i(3),T("",e.fixedDepositAccountData.lockinPeriodFrequency," ",E(7,10,at(6,5,e.fixedDepositAccountData.lockinPeriodFrequencyType,e.fixedDepositsAccountProductTemplate.lockinPeriodFrequencyTypeOptions,"id","value"),"catalogs"))}}function vc(t,s){if(t&1&&(n(0,"div",3)(1,"span",4),a(2),r(3,"translate"),o(),n(4,"span",5),a(5),r(6,"translateKey"),o()()),t&2){let e=_();i(2),u("",c(3,3,"labels.inputs.Minimum Deposit Term"),":"),i(3),T("",e.fixedDepositsAccountProductTemplate.minDepositTerm," ",E(6,5,e.fixedDepositsAccountProductTemplate.minDepositTermType==null?null:e.fixedDepositsAccountProductTemplate.minDepositTermType.value,"catalogs"))}}function Dc(t,s){if(t&1&&(n(0,"div",3)(1,"span",4),a(2),r(3,"translate"),o(),n(4,"span",5),a(5),r(6,"translateKey"),o()()),t&2){let e=_();i(2),u("",c(3,3,"labels.inputs.In Multiples Of"),":"),i(3),T("",e.fixedDepositsAccountProductTemplate.inMultiplesOfDepositTerm," ",E(6,5,e.fixedDepositsAccountProductTemplate.inMultiplesOfDepositTermType==null?null:e.fixedDepositsAccountProductTemplate.inMultiplesOfDepositTermType.value,"catalogs"))}}function bc(t,s){if(t&1&&(n(0,"div",3)(1,"span",4),a(2),r(3,"translate"),o(),n(4,"span",5),a(5),r(6,"translateKey"),o()()),t&2){let e=_();i(2),m(c(3,3,"labels.inputs.Maximum Deposit Term")),i(3),T("",e.fixedDepositsAccountProductTemplate.maxDepositTerm," ",E(6,5,e.fixedDepositsAccountProductTemplate.maxDepositTermType==null?null:e.fixedDepositsAccountProductTemplate.maxDepositTermType.value,"catalogs"))}}function Pc(t,s){if(t&1&&(n(0,"div",3)(1,"span",4),a(2),r(3,"translate"),o(),n(4,"span",5),a(5),r(6,"find"),o()()),t&2){let e=_();i(2),m(c(3,2,"labels.inputs.Linked Savings Account")),i(3),m(at(6,4,e.fixedDepositAccountData.linkAccountId,e.fixedDepositsAccountProductTemplate.savingsAccounts,"id","accountNo"))}}function Mc(t,s){if(t&1&&(n(0,"div",3)(1,"span",4),a(2),r(3,"translate"),o(),n(4,"span",5),a(5),r(6,"find"),r(7,"translateKey"),o()()),t&2){let e=_();i(2),m(c(3,2,"labels.inputs.Maturity Instructions")),i(3),m(E(7,9,at(6,4,e.fixedDepositAccountData.maturityInstructionId,e.fixedDepositsAccountProductTemplate.maturityInstructionOptions,"id","value"),"catalogs"))}}function Tc(t,s){if(t&1&&(n(0,"div",3)(1,"span",4),a(2),r(3,"translate"),o(),n(4,"span",5),a(5),o()()),t&2){let e=_();i(2),u("",c(3,2,"labels.inputs.Penal Interest")," (%):"),i(3),m(e.fixedDepositsAccountProductTemplate.preClosurePenalInterest+"% ("+(e.fixedDepositsAccountProductTemplate.preClosurePenalInterestOnType==null?null:e.fixedDepositsAccountProductTemplate.preClosurePenalInterestOnType.id)+")")}}function Sc(t,s){if(t&1&&(n(0,"div",3)(1,"span",4),a(2),r(3,"translate"),o(),n(4,"span",5),a(5),r(6,"yesNo"),o()()),t&2){let e=_();i(2),u("",c(3,2,"labels.inputs.Withhold Tax is Applicable"),":"),i(3),m(c(6,4,e.fixedDepositAccountData.withHoldTax))}}function Ac(t,s){if(t&1&&(n(0,"div",3)(1,"span",4),a(2),r(3,"translate"),o(),n(4,"span",5),a(5),o()()),t&2){let e=_();i(2),u("",c(3,2,"labels.inputs.name"),":"),i(3),m(e.fixedDepositsAccountProductTemplate==null?null:e.fixedDepositsAccountProductTemplate.accountChart.name)}}function Oc(t,s){if(t&1&&(n(0,"div",3)(1,"span",4),a(2),r(3,"translate"),o(),n(4,"span",5),a(5),r(6,"dateFormat"),o()()),t&2){let e=_();i(2),u("",c(3,2,"labels.inputs.End Date"),":"),i(3),m(c(6,4,e.fixedDepositsAccountProductTemplate==null?null:e.fixedDepositsAccountProductTemplate.accountChart.endDate))}}function yc(t,s){if(t&1&&(n(0,"div",3)(1,"span",4),a(2),r(3,"translate"),o(),n(4,"span",5),a(5),o()()),t&2){let e=_();i(2),u("",c(3,2,"labels.inputs.Description"),":"),i(3),m(e.fixedDepositsAccountProductTemplate==null?null:e.fixedDepositsAccountProductTemplate.accountChart.description)}}function Ic(t,s){t&1&&(n(0,"th",25),a(1),r(2,"translate"),o()),t&2&&(i(),m(c(2,1,"labels.inputs.Period")))}function Fc(t,s){if(t&1&&(n(0,"td",26),a(1),r(2,"translateKey"),o()),t&2){let e=s.$implicit;i(),ce(" ",e.fromPeriod," - ",e.toPeriod,"\xA0",E(2,3,e.periodType.value,"catalogs")," ")}}function wc(t,s){t&1&&(n(0,"th",25),a(1),r(2,"translate"),o()),t&2&&(i(),m(c(2,1,"labels.inputs.Amount Range")))}function Ec(t,s){if(t&1&&(n(0,"td",26),a(1),r(2,"formatNumber"),r(3,"formatNumber"),o()),t&2){let e=s.$implicit;i(),T(" ",c(2,2,e.amountRangeFrom)," - ",c(3,4,e.amountRangeTo)," ")}}function Bc(t,s){t&1&&(n(0,"th",25),a(1),r(2,"translate"),o()),t&2&&(i(),m(c(2,1,"labels.inputs.Interest")))}function kc(t,s){if(t&1&&(n(0,"td",26),a(1),r(2,"formatNumber"),o()),t&2){let e=s.$implicit;i(),u("",c(2,1,e.annualInterestRate)," %")}}function Rc(t,s){t&1&&(n(0,"th",25),a(1),r(2,"translate"),o()),t&2&&(i(),m(c(2,1,"labels.inputs.Description")))}function Nc(t,s){if(t&1&&(n(0,"td",26),a(1),o()),t&2){let e=s.$implicit;i(),m(e.description)}}function Vc(t,s){t&1&&(n(0,"th",25),a(1),r(2,"translate"),o()),t&2&&(i(),m(c(2,1,"labels.inputs.Actions")))}function qc(t,s){t&1&&(n(0,"span"),g(1,"fa-icon",29),a(2),r(3,"translate"),o()),t&2&&(i(2),u(" ",c(3,1,"labels.buttons.View Incentives")," "))}function zc(t,s){t&1&&(n(0,"span"),g(1,"fa-icon",30),a(2),r(3,"translate"),o()),t&2&&(i(2),u(" ",c(3,1,"labels.buttons.Hide Incentives")," "))}function Hc(t,s){if(t&1){let e=F();n(0,"td",26)(1,"button",27),M("click",function(){let p=S(e).dataIndex,f=_();return A(f.expandChartSlabIndex=f.expandChartSlabIndex===p?null:p)}),C(2,qc,4,3,"span",28)(3,zc,4,3,"span",28),o()()}if(t&2){let e=s.dataIndex,l=_();i(2),d("ngIf",l.expandChartSlabIndex!==e),i(),d("ngIf",l.expandChartSlabIndex===e)}}function $c(t,s){t&1&&(n(0,"th",25),a(1),r(2,"translate"),o()),t&2&&(i(),m(c(2,1,"labels.inputs.Entity Type")))}function Lc(t,s){if(t&1&&(n(0,"td",26),a(1),o()),t&2){let e=s.$implicit;i(),u(" ",e.entityType.value," ")}}function Gc(t,s){t&1&&(n(0,"th",25),a(1),r(2,"translate"),o()),t&2&&(i(),m(c(2,1,"labels.inputs.Attribute Name")))}function Uc(t,s){if(t&1&&(n(0,"td",26),a(1),o()),t&2){let e=s.$implicit;i(),u(" ",e.attributeName.value," ")}}function jc(t,s){t&1&&(n(0,"th",25),a(1),r(2,"translate"),o()),t&2&&(i(),m(c(2,1,"labels.inputs.Condition Type")))}function Wc(t,s){if(t&1&&(n(0,"td",26),a(1),r(2,"titlecase"),o()),t&2){let e=s.$implicit;i(),u(" ",c(2,1,e.conditionType.value)," ")}}function Kc(t,s){t&1&&(n(0,"th",25),a(1),r(2,"translate"),o()),t&2&&(i(),m(c(2,1,"labels.inputs.Attribute Value")))}function Qc(t,s){if(t&1&&(n(0,"td",43),a(1),o()),t&2){let e=s.$implicit;d("ngSwitch",e.attributeName),i(),u(" ",e.attributeValueDesc," ")}}function Yc(t,s){t&1&&(n(0,"th",25),a(1),r(2,"translate"),o()),t&2&&(i(),m(c(2,1,"labels.inputs.Incentive Type")))}function Jc(t,s){if(t&1&&(n(0,"td",26),a(1),o()),t&2){let e=s.$implicit;i(),u(" ",e.incentiveType.value," ")}}function Xc(t,s){t&1&&(n(0,"th",25),a(1),r(2,"translate"),o()),t&2&&(i(),m(c(2,1,"labels.inputs.Interest")))}function Zc(t,s){if(t&1&&(n(0,"td",26),a(1),r(2,"formatNumber"),o()),t&2){let e=s.$implicit;i(),u(" ",c(2,1,e.amount)," ")}}function ts(t,s){t&1&&g(0,"tr",44)}function es(t,s){t&1&&g(0,"tr",45)}function is(t,s){if(t&1&&(n(0,"table",35),b(1,36),C(2,$c,3,3,"th",9)(3,Lc,2,1,"td",10),P(),b(4,37),C(5,Gc,3,3,"th",9)(6,Uc,2,1,"td",10),P(),b(7,38),C(8,jc,3,3,"th",9)(9,Wc,3,3,"td",10),P(),b(10,39),C(11,Kc,3,3,"th",9)(12,Qc,2,2,"td",40),P(),b(13,41),C(14,Yc,3,3,"th",9)(15,Jc,2,1,"td",10),P(),b(16,42),C(17,Xc,3,3,"th",9)(18,Zc,3,3,"td",10),P(),C(19,ts,1,0,"tr",16)(20,es,1,0,"tr",17),o()),t&2){let e=_().$implicit,l=_();d("dataSource",e.incentives),i(19),d("matHeaderRowDef",l.incentivesDisplayedColumns),i(),d("matRowDefColumns",l.incentivesDisplayedColumns)}}function ns(t,s){if(t&1&&(n(0,"td",26)(1,"div",31)(2,"mat-card",32)(3,"h4",33),a(4),r(5,"translate"),o(),C(6,is,21,3,"table",34),o()()()),t&2){let e=s.$implicit,l=s.dataIndex,p=_();Te("colspan",p.chartSlabsDisplayedColumns.length),i(),d("@expandChartSlab",l===p.expandChartSlabIndex?"expanded":"collapsed"),i(3),u(" ",c(5,4,"labels.heading.Incentives")," "),i(2),d("ngIf",e.incentives.length)}}function os(t,s){t&1&&g(0,"tr",44)}function as(t,s){t&1&&g(0,"tr",45)}function rs(t,s){t&1&&g(0,"tr",46)}function ps(t,s){t&1&&(n(0,"th",25),a(1),r(2,"translate"),o()),t&2&&(i(),m(c(2,1,"labels.inputs.name")))}function cs(t,s){if(t&1&&(n(0,"td",26),a(1),o()),t&2){let e=s.$implicit;i(),u(" ",e.name+", "+e.currency.displaySymbol," ")}}function ss(t,s){t&1&&(n(0,"th",25),a(1),r(2,"translate"),o()),t&2&&(i(),m(c(2,1,"labels.inputs.Type")))}function ls(t,s){if(t&1&&(n(0,"td",26),a(1),o()),t&2){let e=s.$implicit;i(),u(" ",e.chargeCalculationType.value," ")}}function ms(t,s){t&1&&(n(0,"th",25),a(1),r(2,"translate"),o()),t&2&&(i(),m(c(2,1,"labels.inputs.Amount")))}function ds(t,s){if(t&1&&(n(0,"td",26),a(1),o()),t&2){let e=s.$implicit;i(),u(" ",e.amount," ")}}function us(t,s){t&1&&(n(0,"th",25),a(1),r(2,"translate"),o()),t&2&&(i(),m(c(2,1,"labels.inputs.Date")))}function fs(t,s){if(t&1&&(n(0,"span"),a(1),r(2,"dateFormat"),o()),t&2){let e=_().$implicit;i(),u(" ",c(2,1,e.dueDate)||"Unassigned"," ")}}function gs(t,s){if(t&1&&(n(0,"span"),a(1),r(2,"dateFormat"),o()),t&2){let e=_().$implicit;i(),u(" ",e.feeOnMonthDay?E(2,1,R(4,Cc).concat(e.feeOnMonthDay),"dd MMMM"):"Unassigned"," ")}}function xs(t,s){t&1&&(n(0,"span"),a(1),r(2,"translate"),o()),t&2&&(i(),u(" ",c(2,1,"labels.inputs.N/A")," "))}function Cs(t,s){if(t&1&&(n(0,"td",26),C(1,fs,3,3,"span",28)(2,gs,3,5,"span",28)(3,xs,3,3,"span",28),o()),t&2){let e=s.$implicit;i(),d("ngIf",e.chargeTimeType.value==="Specified due date"||e.chargeTimeType.value==="Weekly Fee"),i(),d("ngIf",e.chargeTimeType.value==="Monthly Fee"||e.chargeTimeType.value==="Annual Fee"),i(),d("ngIf",!(e.chargeTimeType.value==="Monthly Fee"||e.chargeTimeType.value==="Annual Fee"||e.chargeTimeType.value==="Specified due date"||e.chargeTimeType.value==="Weekly Fee"))}}function _s(t,s){t&1&&(n(0,"th",25),a(1),r(2,"translate"),o()),t&2&&(i(),m(c(2,1,"labels.inputs.Repayments Every")))}function hs(t,s){if(t&1&&(n(0,"td",26),a(1),o()),t&2){let e=s.$implicit;i(),u(" ",e.feeInterval||"Not Provided"," ")}}function vs(t,s){t&1&&(n(0,"th",25),a(1),r(2,"translate"),o()),t&2&&(i(),m(c(2,1,"labels.inputs.Collected On")))}function Ds(t,s){if(t&1&&(n(0,"td",26),a(1),o()),t&2){let e=s.$implicit;i(),u(" ",e.chargeTimeType.value," ")}}function bs(t,s){t&1&&g(0,"tr",44)}function Ps(t,s){t&1&&g(0,"tr",45)}function Ms(t,s){if(t&1&&(n(0,"div",47)(1,"h3",1),a(2),r(3,"translate"),o(),g(4,"mat-divider",2),n(5,"table",35),b(6,48),C(7,ps,3,3,"th",9)(8,cs,2,1,"td",10),P(),b(9,49),C(10,ss,3,3,"th",9)(11,ls,2,1,"td",10),P(),b(12,42),C(13,ms,3,3,"th",9)(14,ds,2,1,"td",10),P(),b(15,50),C(16,us,3,3,"th",9)(17,Cs,4,3,"td",10),P(),b(18,51),C(19,_s,3,3,"th",9)(20,hs,2,1,"td",10),P(),b(21,52),C(22,vs,3,3,"th",9)(23,Ds,2,1,"td",10),P(),C(24,bs,1,0,"tr",16)(25,Ps,1,0,"tr",17),o()()),t&2){let e=_();i(2),m(c(3,4,"labels.heading.Charges")),i(3),d("dataSource",e.fixedDepositAccountData.charges),i(19),d("matHeaderRowDef",e.chargesDisplayedColumns),i(),d("matRowDefColumns",e.chargesDisplayedColumns)}}var qe=(()=>{class t{constructor(){this.chargesDisplayedColumns=["name","chargeCalculationType","amount","chargeTimeType","date","repaymentsEvery"],this.interestRateChartData=[],this.chartSlabsDisplayedColumns=["period","amountRange","interest","description","actions"],this.incentivesDisplayedColumns=["entityType","attributeName","conditionType","attributeValue","incentiveType","amount"],this.chartSlabsIncentivesDisplayedColumns=["incentives"],this.submitEvent=new $e}ngOnChanges(){this.fixedDepositsAccountProductTemplate&&(this.interestRateChartData=this.fixedDepositsAccountProductTemplate.accountChart.chartSlabs)}static{this.\u0275fac=function(l){return new(l||t)}}static{this.\u0275cmp=O({type:t,selectors:[["mifosx-fixed-deposit-account-preview-step"]],inputs:{fixedDepositsAccountTemplate:"fixedDepositsAccountTemplate",fixedDepositsAccountProductTemplate:"fixedDepositsAccountProductTemplate",fixedDepositAccountData:"fixedDepositAccountData"},outputs:{submitEvent:"submitEvent"},features:[Jt],decls:181,vars:176,consts:[[1,"layout-row-wrap","responsive-column"],[1,"mat-h3","flex-100"],[1,"flex-100"],[1,"layout-row","flex-100"],[1,"flex-40"],[1,"flex-60"],["class","layout-row flex-100",4,"ngIf"],["mat-table","","multiTemplateDataRows","",1,"mat-elevation-z1","irc-table",3,"dataSource"],["matColumnDef","period"],["mat-header-cell","",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","amountRange"],["matColumnDef","interest"],["matColumnDef","description"],["matColumnDef","actions"],["matColumnDef","incentives"],["mat-header-row","",4,"matHeaderRowDef"],["mat-row","",4,"matRowDef","matRowDefColumns"],["mat-row","","class","incentives-row",4,"matRowDef","matRowDefColumns"],["class","layout-row-wrap responsive-column flex-100",4,"ngIf"],[1,"layout-row","responsive-column","align-center","gap-2px","margin-t"],["mat-raised-button","","matStepperPrevious",""],["icon","arrow-left",1,"m-r-10"],["mat-raised-button","",3,"routerLink"],["mat-raised-button","","color","primary",3,"click"],["mat-header-cell",""],["mat-cell",""],["mat-button","","color","primary",3,"click"],[4,"ngIf"],["icon","eye",1,"m-r-10"],["icon","eye-slash",1,"m-r-10"],[1,"layout-row-wrap","flex-100","incentives"],[1,"layout-row-wrap","flex-100"],[1,"m-b-10","flex-13"],["class","flex-100 mat-elevation-z1","mat-table","",3,"dataSource",4,"ngIf"],["mat-table","",1,"flex-100","mat-elevation-z1",3,"dataSource"],["matColumnDef","entityType"],["matColumnDef","attributeName"],["matColumnDef","conditionType"],["matColumnDef","attributeValue"],["mat-cell","",3,"ngSwitch",4,"matCellDef"],["matColumnDef","incentiveType"],["matColumnDef","amount"],["mat-cell","",3,"ngSwitch"],["mat-header-row",""],["mat-row",""],["mat-row","",1,"incentives-row"],[1,"layout-row-wrap","responsive-column","flex-100"],["matColumnDef","name"],["matColumnDef","chargeCalculationType"],["matColumnDef","date"],["matColumnDef","repaymentsEvery"],["matColumnDef","chargeTimeType"]],template:function(l,p){l&1&&(n(0,"div",0)(1,"h3",1),a(2),r(3,"translate"),o(),g(4,"mat-divider",2),n(5,"div",3)(6,"span",4),a(7),r(8,"translate"),o(),n(9,"span",5),a(10),r(11,"find"),o()(),n(12,"div",3)(13,"span",4),a(14),r(15,"translate"),o(),n(16,"span",5),a(17),r(18,"dateFormat"),o()(),C(19,_c,6,4,"div",6),n(20,"div",3)(21,"span",4),a(22),r(23,"translate"),o(),n(24,"span",5),a(25),r(26,"find"),r(27,"translateKey"),o()(),n(28,"h3",1),a(29),r(30,"translate"),o(),g(31,"mat-divider",2),n(32,"div",3)(33,"span",4),a(34),r(35,"translate"),o(),n(36,"span",5),a(37),o()(),n(38,"div",3)(39,"span",4),a(40),r(41,"translate"),o(),n(42,"span",5),a(43),o()(),n(44,"div",3)(45,"span",4),a(46),r(47,"translate"),o(),n(48,"span",5),a(49),o()(),n(50,"h3",1),a(51),r(52,"translate"),o(),g(53,"mat-divider",2),n(54,"div",3)(55,"span",4),a(56),r(57,"translate"),o(),n(58,"span",5),a(59),r(60,"currency"),o()(),n(61,"div",3)(62,"span",4),a(63),r(64,"translate"),o(),n(65,"span",5),a(66),r(67,"find"),r(68,"translateKey"),o()(),n(69,"div",3)(70,"span",4),a(71),r(72,"translate"),o(),n(73,"span",5),a(74),r(75,"find"),r(76,"translateKey"),o()(),n(77,"div",3)(78,"span",4),a(79),r(80,"translate"),o(),n(81,"span",5),a(82),r(83,"find"),r(84,"translateKey"),o()(),n(85,"div",3)(86,"span",4),a(87),r(88,"translate"),o(),n(89,"span",5),a(90),r(91,"find"),r(92,"translateKey"),o()(),n(93,"div",3)(94,"span",4),a(95),r(96,"translate"),o(),n(97,"span",5),a(98),r(99,"find"),r(100,"translateKey"),o()(),n(101,"h3",1),a(102),r(103,"translate"),o(),g(104,"mat-divider",2),C(105,hc,8,13,"div",6)(106,vc,7,8,"div",6)(107,Dc,7,8,"div",6)(108,bc,7,8,"div",6),n(109,"div",3)(110,"span",4),a(111),r(112,"translate"),o(),n(113,"span",5),a(114),r(115,"yesNo"),o()(),C(116,Pc,7,9,"div",6)(117,Mc,8,12,"div",6),n(118,"div",3)(119,"span",4),a(120),r(121,"translate"),o(),n(122,"span",5),a(123),r(124,"yesNo"),o()(),C(125,Tc,6,4,"div",6)(126,Sc,7,6,"div",6),n(127,"h3",1),a(128),r(129,"translate"),o(),g(130,"mat-divider",2),C(131,Ac,6,4,"div",6),n(132,"div",3)(133,"span",4),a(134),r(135,"translate"),o(),n(136,"span",5),a(137),r(138,"dateFormat"),o()(),C(139,Oc,7,6,"div",6)(140,yc,6,4,"div",6),n(141,"div",3)(142,"span",4),a(143),r(144,"translate"),o(),n(145,"span",5),a(146),r(147,"yesNo"),o()(),n(148,"table",7),b(149,8),C(150,Ic,3,3,"th",9)(151,Fc,3,6,"td",10),P(),b(152,11),C(153,wc,3,3,"th",9)(154,Ec,4,6,"td",10),P(),b(155,12),C(156,Bc,3,3,"th",9)(157,kc,3,3,"td",10),P(),b(158,13),C(159,Rc,3,3,"th",9)(160,Nc,2,1,"td",10),P(),b(161,14),C(162,Vc,3,3,"th",9)(163,Hc,4,2,"td",10),P(),b(164,15),C(165,ns,7,6,"td",10),P(),C(166,os,1,0,"tr",16)(167,as,1,0,"tr",17)(168,rs,1,0,"tr",18),o(),C(169,Ms,26,6,"div",19),o(),n(170,"div",20)(171,"button",21),g(172,"fa-icon",22),a(173),r(174,"translate"),o(),n(175,"button",23),a(176),r(177,"translate"),o(),n(178,"button",24),M("click",function(){return p.submitEvent.emit()}),a(179),r(180,"translate"),o()()),l&2&&(i(2),m(c(3,59,"labels.heading.Details")),i(5),m(c(8,61,"labels.inputs.Product")),i(3),m(at(11,63,p.fixedDepositAccountData.productId,p.fixedDepositsAccountTemplate.productOptions,"id","name")),i(4),m(c(15,68,"labels.inputs.Submitted On")),i(3),m(c(18,70,p.fixedDepositAccountData.submittedOnDate)),i(2),d("ngIf",p.fixedDepositAccountData.externalId),i(3),m(c(23,72,"labels.inputs.Field Officer")),i(3),m(E(27,79,at(26,74,p.fixedDepositAccountData.fieldOfficerId,p.fixedDepositsAccountProductTemplate.fieldOfficerOptions,"id","displayName")||"Unassigned","inputs")),i(4),m(c(30,82,"labels.heading.Currency")),i(5),m(c(35,84,"labels.inputs.Currency")),i(3),m(p.fixedDepositsAccountProductTemplate.currency.code),i(3),m(c(41,86,"labels.inputs.Currency Multiple")),i(3),m(p.fixedDepositsAccountProductTemplate.currency.inMultiplesOf),i(3),m(c(47,88,"labels.inputs.Decimal Places")),i(3),m(p.fixedDepositsAccountProductTemplate.currency.decimalPlaces),i(2),m(c(52,90,"labels.heading.Terms")),i(5),u("",c(57,92,"labels.inputs.Fixed Deposit Amount"),":"),i(3),m(at(60,94,p.fixedDepositAccountData.depositAmount,p.fixedDepositsAccountProductTemplate.currency.code,"symbol-narrow","1.2-2")),i(4),u("",c(64,99,"labels.inputs.Deposit Period"),":"),i(3),T("",p.fixedDepositAccountData.depositPeriod," ",E(68,106,at(67,101,p.fixedDepositAccountData.depositPeriodFrequencyId,p.fixedDepositsAccountProductTemplate.periodFrequencyTypeOptions,"id","value"),"catalogs")),i(5),u("",c(72,109,"labels.inputs.Interest Compounding Period"),":"),i(3),m(E(76,116,at(75,111,p.fixedDepositAccountData.interestCompoundingPeriodType,p.fixedDepositsAccountProductTemplate.interestCompoundingPeriodTypeOptions,"id","value"),"catalogs")),i(5),u("",c(80,119,"labels.inputs.Interest Posting Period"),":"),i(3),m(E(84,126,at(83,121,p.fixedDepositAccountData.interestPostingPeriodType,p.fixedDepositsAccountProductTemplate.interestPostingPeriodTypeOptions,"id","value"),"catalogs")),i(5),u("",c(88,129,"labels.inputs.Interest Calculated using"),":"),i(3),m(E(92,136,at(91,131,p.fixedDepositAccountData.interestCalculationType,p.fixedDepositsAccountProductTemplate.interestCalculationTypeOptions,"id","value"),"catalogs")),i(5),u("",c(96,139,"labels.inputs.Days in Year"),":"),i(3),m(E(100,146,at(99,141,p.fixedDepositAccountData.interestCalculationDaysInYearType,p.fixedDepositsAccountProductTemplate.interestCalculationDaysInYearTypeOptions,"id","value"),"catalogs")),i(4),m(c(103,149,"labels.heading.Settings")),i(3),d("ngIf",p.fixedDepositAccountData.lockinPeriodFrequency),i(),d("ngIf",p.fixedDepositsAccountProductTemplate.minDepositTerm),i(),d("ngIf",p.fixedDepositsAccountProductTemplate.inMultiplesOfDepositTerm),i(),d("ngIf",p.fixedDepositsAccountProductTemplate.maxDepositTerm),i(3),u("",c(112,151,"labels.inputs.Transfer Interest to Savings Account"),"?"),i(3),m(c(115,153,p.fixedDepositAccountData.transferInterestToSavings)),i(2),d("ngIf",p.fixedDepositAccountData.transferInterestToSavings),i(),d("ngIf",p.fixedDepositAccountData.maturityInstructionId),i(3),u("",c(121,155,"labels.inputs.Apply Penal Interest (less)"),":"),i(3),m(c(124,157,p.fixedDepositsAccountProductTemplate.preClosurePenalApplicable)),i(2),d("ngIf",p.fixedDepositsAccountProductTemplate.preClosurePenalApplicable),i(),d("ngIf",p.fixedDepositsAccountProductTemplate.withHoldTax),i(2),m(c(129,159,"labels.heading.Interest Rate Chart")),i(3),d("ngIf",p.fixedDepositsAccountProductTemplate==null?null:p.fixedDepositsAccountProductTemplate.accountChart.name),i(3),u("",c(135,161,"labels.inputs.Valid from Date"),":"),i(3),m(c(138,163,p.fixedDepositsAccountProductTemplate==null?null:p.fixedDepositsAccountProductTemplate.accountChart.fromDate)),i(2),d("ngIf",p.fixedDepositsAccountProductTemplate==null?null:p.fixedDepositsAccountProductTemplate.accountChart.endDate),i(),d("ngIf",p.fixedDepositsAccountProductTemplate==null?null:p.fixedDepositsAccountProductTemplate.accountChart.description),i(3),u("",c(144,165,"labels.inputs.Primary Grouping by Amount"),":"),i(3),m(c(147,167,p.fixedDepositsAccountProductTemplate==null?null:p.fixedDepositsAccountProductTemplate.accountChart.isPrimaryGroupingByAmount)),i(2),d("dataSource",p.interestRateChartData),i(18),d("matHeaderRowDef",p.chartSlabsDisplayedColumns),i(),d("matRowDefColumns",p.chartSlabsDisplayedColumns),i(),d("matRowDefColumns",p.chartSlabsIncentivesDisplayedColumns),i(),d("ngIf",p.fixedDepositAccountData.charges.length),i(4),u(" ",c(174,169,"labels.buttons.Previous")," "),i(2),d("routerLink",R(175,xc)),i(),u(" ",c(177,171,"labels.buttons.Cancel")," "),i(3),u(" ",c(180,173,"labels.buttons.Submit")," "))},dependencies:[y,Ae,Oe,I,tt,Y,B,Re,wt,kt,Bt,Rt,Et,Nt,ut,Vt,zt,qt,Ht,Wt,ye,se,yt,w,It,Xi,ue,tn],styles:["table[_ngcontent-%COMP%]{width:100%}.mat-elevation-z1[_ngcontent-%COMP%]{margin:1em 0 1.5em}h2[_ngcontent-%COMP%], h3[_ngcontent-%COMP%], h4[_ngcontent-%COMP%]{margin:0;font-weight:500}span[_ngcontent-%COMP%]{margin:.5em 0}mat-divider[_ngcontent-%COMP%]{margin:0 0 .5em}.margin-t[_ngcontent-%COMP%]{margin-top:1em}.margin-b[_ngcontent-%COMP%]{margin-bottom:.25em}.irc-table[_ngcontent-%COMP%]{width:100%}.irc-table[_ngcontent-%COMP%] tr.incentives-row[_ngcontent-%COMP%]{height:0}.irc-table[_ngcontent-%COMP%] tr.incentives-row[_ngcontent-%COMP%] > td[_ngcontent-%COMP%]{padding:0}.irc-table[_ngcontent-%COMP%] tr.incentives-row[_ngcontent-%COMP%] .incentives[_ngcontent-%COMP%]{overflow:hidden}.irc-table[_ngcontent-%COMP%] tr.incentives-row[_ngcontent-%COMP%] .mat-card[_ngcontent-%COMP%]{border-radius:0}"],data:{animation:[Ie("expandChartSlab",[ae("collapsed",oe({height:"0px",minHeight:"0"})),ae("expanded",oe({height:"*"})),we("expanded <=> collapsed",Fe("225ms cubic-bezier(0.4, 0.0, 0.2, 1)"))])]}})}}return t})();function Ts(t,s){t&1&&g(0,"fa-icon",14)}function Ss(t,s){t&1&&g(0,"fa-icon",14)}function As(t,s){t&1&&g(0,"fa-icon",15)}function Os(t,s){t&1&&g(0,"fa-icon",16)}function ys(t,s){t&1&&g(0,"fa-icon",17)}function Is(t,s){t&1&&(a(0),r(1,"translate")),t&2&&m(c(1,1,"labels.inputs.DETAILS"))}function Fs(t,s){t&1&&(a(0),r(1,"translate")),t&2&&m(c(1,1,"labels.inputs.TERMS"))}function ws(t,s){t&1&&(a(0),r(1,"translate")),t&2&&m(c(1,1,"labels.inputs.SETTINGS"))}function Es(t,s){t&1&&(a(0),r(1,"translate")),t&2&&m(c(1,1,"labels.inputs.INTEREST RATE CHART"))}function Bs(t,s){t&1&&(a(0),r(1,"translate")),t&2&&m(c(1,1,"labels.inputs.CHARGES"))}function ks(t,s){t&1&&(a(0),r(1,"translate")),t&2&&m(c(1,1,"labels.inputs.PREVIEW"))}function Rs(t,s){if(t&1){let e=F();n(0,"mat-step",13),C(1,ks,2,3,"ng-template",9),n(2,"mifosx-fixed-deposit-account-preview-step",18),M("submitEvent",function(){S(e);let p=_();return A(p.submit())}),o()()}if(t&2){let e=_();i(2),d("fixedDepositsAccountTemplate",e.fixedDepositsAccountTemplate)("fixedDepositsAccountProductTemplate",e.fixedDepositsAccountProductTemplate)("fixedDepositAccountData",e.fixedDepositAccount)}}var Mi=(()=>{class t{constructor(){this.route=x(N),this.router=x(W),this.dateUtils=x(et),this.fixedDepositsService=x(j),this.settingsService=x(U),this.route.data.subscribe(e=>{this.fixedDepositsAccountTemplate=e.fixedDepositsAccountTemplate})}setTemplate(e){this.fixedDepositsAccountProductTemplate=e}get fixedDepositAccountDetailsForm(){return this.fixedDepositsAccountDetailsStep.fixedDepositAccountDetailsForm}get fixedDepositAccountTermsForm(){return this.fixedDepositAccountTermsStep.fixedDepositAccountTermsForm}get fixedDepositAccountSettingsForm(){return this.fixedDepositAccountSettingsStep.fixedDepositAccountSettingsForm}get fixedDepositAccountFormValid(){return this.fixedDepositAccountDetailsForm.valid&&this.fixedDepositAccountTermsForm.valid&&this.fixedDepositAccountSettingsForm.valid}get fixedDepositAccount(){return H(H(H(H({},this.fixedDepositsAccountDetailsStep.fixedDepositAccountDetails),this.fixedDepositAccountTermsStep.fixedDepositAccountTerms),this.fixedDepositAccountSettingsStep.fixedDepositAccountSettings),this.fixedDepositAccountChargesStep.fixedDepositAccountCharges)}submit(){let e=this.settingsService.language.code,l=this.settingsService.dateFormat,p="dd MMMM",f=X(H({},this.fixedDepositAccount),{clientId:this.fixedDepositsAccountTemplate.clientId,charges:this.fixedDepositAccount.charges.map(D=>({chargeId:D.id,amount:D.amount,dueDate:D.dueDate&&this.dateUtils.formatDate(D.dueDate,l),feeOnMonthDay:D.feeOnMonthDay&&this.dateUtils.formatDate([2e3].concat(D.feeOnMonthDay),p),feeInterval:D.feeInterval})),submittedOnDate:this.dateUtils.formatDate(this.fixedDepositAccount.submittedOnDate,l),charts:[{chartSlabs:this.fixedDepositsAccountProductTemplate.accountChart.chartSlabs}],dateFormat:l,monthDayFormat:p,locale:e});this.fixedDepositsService.createFixedDepositAccount(f).subscribe(D=>{this.router.navigate(["../",D.resourceId],{relativeTo:this.route})})}static{this.\u0275fac=function(l){return new(l||t)}}static{this.\u0275cmp=O({type:t,selectors:[["mifosx-create-fixed-deposit-account"]],viewQuery:function(l,p){if(l&1&&(ht(ge,7),ht(xe,7),ht(Ce,7),ht(_e,7)),l&2){let f;vt(f=Dt())&&(p.fixedDepositsAccountDetailsStep=f.first),vt(f=Dt())&&(p.fixedDepositAccountTermsStep=f.first),vt(f=Dt())&&(p.fixedDepositAccountSettingsStep=f.first),vt(f=Dt())&&(p.fixedDepositAccountChargesStep=f.first)}},decls:24,vars:15,consts:[["fixedDepositAccountStepper",""],[1,"container"],["orientation","vertical","labelPosition","bottom",1,"mat-elevation-z8",3,"linear"],["matStepperIcon","number"],["matStepperIcon","edit"],["matStepperIcon","done"],["matStepperIcon","error"],["matStepperIcon","preview"],[3,"stepControl"],["matStepLabel",""],[3,"fixedDepositsAccountProductTemplate","fixedDepositsAccountTemplate"],[3,"fixedDepositsAccountTemplate","fixedDepositsAccountProductTemplate"],[3,"fixedDepositsAccountTemplate","fixedDepositsAccountProductTemplate","fixedDepositAccountFormValid"],["state","preview","completed",""],["icon","pencil-alt","size","sm"],["icon","check","size","sm"],["icon","exclamation-triangle","size","lg"],["icon","eye","size","sm"],[3,"submitEvent","fixedDepositsAccountTemplate","fixedDepositsAccountProductTemplate","fixedDepositAccountData"]],template:function(l,p){if(l&1){let f=F();n(0,"div",1)(1,"mat-stepper",2,0),C(3,Ts,1,0,"ng-template",3)(4,Ss,1,0,"ng-template",4)(5,As,1,0,"ng-template",5)(6,Os,1,0,"ng-template",6)(7,ys,1,0,"ng-template",7),n(8,"mat-step",8),C(9,Is,2,3,"ng-template",9),n(10,"mifosx-fixed-deposit-account-details-step",10),M("fixedDepositsAccountProductTemplate",function(q){return S(f),A(p.setTemplate(q))}),o()(),n(11,"mat-step",8),C(12,Fs,2,3,"ng-template",9),g(13,"mifosx-fixed-deposit-account-terms-step",11),o(),n(14,"mat-step",8),C(15,ws,2,3,"ng-template",9),g(16,"mifosx-fixed-deposit-account-settings-step",11),o(),n(17,"mat-step"),C(18,Es,2,3,"ng-template",9),g(19,"mifosx-fixed-deposit-account-interest-rate-chart-step",11),o(),n(20,"mat-step"),C(21,Bs,2,3,"ng-template",9),g(22,"mifosx-fixed-deposit-account-charges-step",12),o(),h(23,Rs,3,3,"mat-step",13),o()()}l&2&&(i(),d("linear",!1),i(7),d("stepControl",p.fixedDepositAccountDetailsForm),i(2),d("fixedDepositsAccountTemplate",p.fixedDepositsAccountTemplate),i(),d("stepControl",p.fixedDepositAccountTermsForm),i(2),d("fixedDepositsAccountTemplate",p.fixedDepositsAccountTemplate)("fixedDepositsAccountProductTemplate",p.fixedDepositsAccountProductTemplate),i(),d("stepControl",p.fixedDepositAccountSettingsForm),i(2),d("fixedDepositsAccountTemplate",p.fixedDepositsAccountTemplate)("fixedDepositsAccountProductTemplate",p.fixedDepositsAccountProductTemplate),i(3),d("fixedDepositsAccountTemplate",p.fixedDepositsAccountTemplate)("fixedDepositsAccountProductTemplate",p.fixedDepositsAccountProductTemplate),i(3),d("fixedDepositsAccountTemplate",p.fixedDepositsAccountTemplate)("fixedDepositsAccountProductTemplate",p.fixedDepositsAccountProductTemplate)("fixedDepositAccountFormValid",p.fixedDepositAccountFormValid),i(),v(p.fixedDepositAccountFormValid?23:-1))},dependencies:[y,I,Ze,Je,ut,Xe,Ye,ge,xe,Ce,Ve,_e,qe,w],encapsulation:2})}}return t})();function Ns(t,s){t&1&&g(0,"fa-icon",14)}function Vs(t,s){t&1&&g(0,"fa-icon",14)}function qs(t,s){t&1&&g(0,"fa-icon",15)}function zs(t,s){t&1&&g(0,"fa-icon",16)}function Hs(t,s){t&1&&g(0,"fa-icon",17)}function $s(t,s){t&1&&(a(0),r(1,"translate")),t&2&&m(c(1,1,"labels.inputs.DETAILS"))}function Ls(t,s){t&1&&(a(0),r(1,"translate")),t&2&&m(c(1,1,"labels.inputs.TERMS"))}function Gs(t,s){t&1&&(a(0),r(1,"translate")),t&2&&m(c(1,1,"labels.inputs.SETTINGS"))}function Us(t,s){t&1&&(a(0),r(1,"translate")),t&2&&m(c(1,1,"labels.inputs.INTEREST RATE CHART"))}function js(t,s){t&1&&(a(0),r(1,"translate")),t&2&&m(c(1,1,"labels.inputs.CHARGES"))}function Ws(t,s){t&1&&(a(0),r(1,"translate")),t&2&&m(c(1,1,"labels.inputs.PREVIEW"))}function Ks(t,s){if(t&1){let e=F();n(0,"mat-step",13),C(1,Ws,2,3,"ng-template",9),n(2,"mifosx-fixed-deposit-account-preview-step",18),M("submitEvent",function(){S(e);let p=_();return A(p.submit())}),o()()}if(t&2){let e=_();i(2),d("fixedDepositsAccountTemplate",e.fixedDepositsAccountAndTemplate)("fixedDepositsAccountProductTemplate",e.fixedDepositsAccountProductTemplate)("fixedDepositAccountData",e.fixedDepositAccount)}}var Ti=(()=>{class t{constructor(){this.route=x(N),this.router=x(W),this.dateUtils=x(et),this.fixedDepositsService=x(j),this.settingsService=x(U),this.route.data.subscribe(e=>{this.fixedDepositsAccountAndTemplate=e.fixedDepositsAccountAndTemplate})}setTemplate(e){this.fixedDepositsAccountProductTemplate=e,this.currency=this.fixedDepositsAccountAndTemplate.currency}get fixedDepositAccountDetailsForm(){return this.fixedDepositsAccountDetailsStep.fixedDepositAccountDetailsForm}get fixedDepositAccountTermsForm(){return this.fixedDepositAccountTermsStep.fixedDepositAccountTermsForm}get fixedDepositAccountSettingsForm(){return this.fixedDepositAccountSettingsStep.fixedDepositAccountSettingsForm}get fixedDepositAccountFormValidAndNotPristine(){return this.fixedDepositAccountDetailsForm.valid&&this.fixedDepositAccountTermsForm.valid&&this.fixedDepositAccountSettingsForm.valid&&(!this.fixedDepositAccountDetailsForm.pristine||!this.fixedDepositAccountTermsForm.pristine||!this.fixedDepositAccountSettingsForm.pristine||!this.fixedDepositAccountChargesStep.pristine)}get fixedDepositAccount(){return H(H(H(H({},this.fixedDepositsAccountDetailsStep.fixedDepositAccountDetails),this.fixedDepositAccountTermsStep.fixedDepositAccountTerms),this.fixedDepositAccountSettingsStep.fixedDepositAccountSettings),this.fixedDepositAccountChargesStep?.fixedDepositAccountCharges)}submit(){let e=this.settingsService.language.code,l=this.settingsService.dateFormat,p="dd MMMM",f=X(H({},this.fixedDepositAccount),{clientId:this.fixedDepositsAccountAndTemplate.clientId,charges:this.fixedDepositAccount.charges.map(D=>({chargeId:D.id,amount:D.amount,dueDate:D.dueDate&&this.dateUtils.formatDate(D.dueDate,l),feeOnMonthDay:D.feeOnMonthDay&&this.dateUtils.formatDate([2e3].concat(D.feeOnMonthDay),p),feeInterval:D.feeInterval})),submittedOnDate:this.dateUtils.formatDate(this.fixedDepositAccount.submittedOnDate,l),charts:[{chartSlabs:this.fixedDepositsAccountProductTemplate.accountChart.chartSlabs}],dateFormat:l,monthDayFormat:p,locale:e});this.fixedDepositsService.updateFixedDepositAccount(this.fixedDepositsAccountAndTemplate.id,f).subscribe(D=>{this.router.navigate(["../"],{relativeTo:this.route})})}static{this.\u0275fac=function(l){return new(l||t)}}static{this.\u0275cmp=O({type:t,selectors:[["mifosx-edit-fixed-deposit-account"]],viewQuery:function(l,p){if(l&1&&(ht(ge,7),ht(xe,7),ht(Ce,7),ht(_e,7)),l&2){let f;vt(f=Dt())&&(p.fixedDepositsAccountDetailsStep=f.first),vt(f=Dt())&&(p.fixedDepositAccountTermsStep=f.first),vt(f=Dt())&&(p.fixedDepositAccountSettingsStep=f.first),vt(f=Dt())&&(p.fixedDepositAccountChargesStep=f.first)}},decls:24,vars:15,consts:[["fixedDepositAccountStepper",""],[1,"container"],["orientation","vertical","labelPosition","bottom",1,"mat-elevation-z8",3,"linear"],["matStepperIcon","number"],["matStepperIcon","edit"],["matStepperIcon","done"],["matStepperIcon","error"],["matStepperIcon","preview"],[3,"stepControl"],["matStepLabel",""],[3,"fixedDepositsAccountProductTemplate","fixedDepositsAccountTemplate"],[3,"fixedDepositsAccountTemplate","fixedDepositsAccountProductTemplate"],[3,"fixedDepositsAccountTemplate","fixedDepositsAccountProductTemplate","fixedDepositAccountFormValid"],["state","preview","completed",""],["icon","pencil-alt","size","sm"],["icon","check","size","sm"],["icon","exclamation-triangle","size","lg"],["icon","eye","size","sm"],[3,"submitEvent","fixedDepositsAccountTemplate","fixedDepositsAccountProductTemplate","fixedDepositAccountData"]],template:function(l,p){if(l&1){let f=F();n(0,"div",1)(1,"mat-stepper",2,0),C(3,Ns,1,0,"ng-template",3)(4,Vs,1,0,"ng-template",4)(5,qs,1,0,"ng-template",5)(6,zs,1,0,"ng-template",6)(7,Hs,1,0,"ng-template",7),n(8,"mat-step",8),C(9,$s,2,3,"ng-template",9),n(10,"mifosx-fixed-deposit-account-details-step",10),M("fixedDepositsAccountProductTemplate",function(q){return S(f),A(p.setTemplate(q))}),o()(),n(11,"mat-step",8),C(12,Ls,2,3,"ng-template",9),g(13,"mifosx-fixed-deposit-account-terms-step",11),o(),n(14,"mat-step",8),C(15,Gs,2,3,"ng-template",9),g(16,"mifosx-fixed-deposit-account-settings-step",11),o(),n(17,"mat-step"),C(18,Us,2,3,"ng-template",9),g(19,"mifosx-fixed-deposit-account-interest-rate-chart-step",11),o(),n(20,"mat-step"),C(21,js,2,3,"ng-template",9),g(22,"mifosx-fixed-deposit-account-charges-step",12),o(),h(23,Ks,3,3,"mat-step",13),o()()}l&2&&(i(),d("linear",!1),i(7),d("stepControl",p.fixedDepositAccountDetailsForm),i(2),d("fixedDepositsAccountTemplate",p.fixedDepositsAccountAndTemplate),i(),d("stepControl",p.fixedDepositAccountTermsForm),i(2),d("fixedDepositsAccountTemplate",p.fixedDepositsAccountAndTemplate)("fixedDepositsAccountProductTemplate",p.fixedDepositsAccountProductTemplate),i(),d("stepControl",p.fixedDepositAccountSettingsForm),i(2),d("fixedDepositsAccountTemplate",p.fixedDepositsAccountAndTemplate)("fixedDepositsAccountProductTemplate",p.fixedDepositsAccountProductTemplate),i(3),d("fixedDepositsAccountTemplate",p.fixedDepositsAccountAndTemplate)("fixedDepositsAccountProductTemplate",p.fixedDepositsAccountProductTemplate),i(3),d("fixedDepositsAccountTemplate",p.fixedDepositsAccountAndTemplate)("fixedDepositsAccountProductTemplate",p.fixedDepositsAccountProductTemplate)("fixedDepositAccountFormValid",p.fixedDepositAccountFormValidAndNotPristine),i(),v(p.fixedDepositAccountFormValidAndNotPristine?23:-1))},dependencies:[y,I,Ze,Je,ut,Xe,Ye,ge,xe,Ce,Ve,_e,qe,w],encapsulation:2})}}return t})();var Si=(()=>{class t{constructor(){this.fixedDepositsService=x(j)}resolve(e){let l=e.paramMap.get("fixedDepositAccountId");return this.fixedDepositsService.getFixedDepositsAccountData(l)}static{this.\u0275fac=function(l){return new(l||t)}}static{this.\u0275prov=Gt({token:t,factory:t.\u0275fac})}}return t})();var wi=(()=>{class t{constructor(){this.fixedDepositsService=x(j)}resolve(e){let l=e.parent.paramMap.get("fixedDepositAccountId"),p=e.paramMap.get("id");return this.fixedDepositsService.getFixedDepositsAccountTransaction(l,p)}static{this.\u0275fac=function(l){return new(l||t)}}static{this.\u0275prov=Gt({token:t,factory:t.\u0275fac})}}return t})();var Ei=(()=>{class t{constructor(){this.savingsService=x($t),this.fixedDepositsService=x(j)}resolve(e){let l=e.paramMap.get("name"),p=e.paramMap.get("fixedDepositAccountId")||e.parent.parent.paramMap.get("fixedDepositAccountId");switch(l){case"Add Charge":return this.savingsService.getSavingsChargeTemplateResource(p);case"Close":return this.fixedDepositsService.getFixedDepositsAccountClosureTemplate(p);case"Withdrawal":return this.fixedDepositsService.getFixedDepositsAccountTransactionTemplate(p);default:return}}static{this.\u0275fac=function(l){return new(l||t)}}static{this.\u0275prov=Gt({token:t,factory:t.\u0275fac})}}return t})();var Bi=(()=>{class t{constructor(){this.fixedDepositsService=x(j)}resolve(e){let l=e.parent.parent.paramMap.get("clientId");return this.fixedDepositsService.getFixedDepositsAccountTemplate(l)}static{this.\u0275fac=function(l){return new(l||t)}}static{this.\u0275prov=Gt({token:t,factory:t.\u0275fac})}}return t})();var ki=(()=>{class t{constructor(){this.fixedDepositsService=x(j)}resolve(e){let l=e.paramMap.get("fixedDepositAccountId");return this.fixedDepositsService.getFixedDepositsAccountAndTemplate(l)}static{this.\u0275fac=function(l){return new(l||t)}}static{this.\u0275prov=Gt({token:t,factory:t.\u0275fac})}}return t})();function Qs(t,s){if(t&1&&(n(0,"span"),g(1,"mifosx-external-identifier",4),o()),t&2){let e=_();i(),d("externalId",_t(e.fixedDepositsAccountData.externalId))}}function Ys(t,s){t&1&&(n(0,"span"),a(1),r(2,"translate"),o()),t&2&&(i(),u(" ",c(2,1,"labels.inputs.Not Available")," "))}function Js(t,s){if(t&1&&(n(0,"tr")(1,"td"),a(2),r(3,"translate"),o(),n(4,"td"),a(5),r(6,"dateFormat"),o()()),t&2){let e=_();i(2),m(c(3,2,"labels.inputs.Closed On")),i(3),m(c(6,4,e.fixedDepositsAccountData.timeline.closedOnDate))}}function Xs(t,s){if(t&1&&(n(0,"tr")(1,"td"),a(2),r(3,"translate"),o(),n(4,"td"),a(5),o()()),t&2){let e=_();i(2),m(c(3,2,"labels.inputs.Tax Group")),i(3),m(e.fixedDepositsAccountData.taxGroup.name)}}function Zs(t,s){if(t&1&&(n(0,"tr")(1,"td"),a(2),r(3,"translate"),o(),n(4,"td"),a(5),r(6,"translateKey"),o()()),t&2){let e=_();i(2),m(c(3,2,"labels.inputs.Maturity Instructions")),i(3),m(E(6,4,e.fixedDepositsAccountData.onAccountClosure.value,"catalogs"))}}function tl(t,s){if(t&1&&(n(0,"tr")(1,"td"),a(2),r(3,"translate"),o(),n(4,"td"),a(5),r(6,"translateKey"),o()()),t&2){let e=_();i(2),m(c(3,3,"labels.inputs.Pre-cloure Penal")),i(3),T(" ",e.fixedDepositsAccountData.preClosurePenalInterest," % on ",E(6,5,e.fixedDepositsAccountData.preClosurePenalInterestOnType.value,"catalogs")," ")}}function el(t,s){if(t&1&&(n(0,"tr")(1,"td"),a(2),r(3,"translate"),o(),n(4,"td",5),a(5),r(6,"currency"),o()()),t&2){let e=_(2);i(2),m(c(3,2,"labels.inputs.Total Deposits")),i(3),u(" ",at(6,4,e.fixedDepositsAccountData.summary.totalDeposits,e.currency.code,"symbol-narrow","1.2-2")," ")}}function il(t,s){if(t&1&&(n(0,"tr")(1,"td"),a(2),r(3,"translate"),o(),n(4,"td",5),a(5),r(6,"currency"),o()()),t&2){let e=_(2);i(2),m(c(3,2,"labels.inputs.Total Withdrawals")),i(3),u(" ",at(6,4,e.fixedDepositsAccountData.summary.totalWithdrawals,e.currency.code,"symbol-narrow","1.2-2")," ")}}function nl(t,s){if(t&1&&(n(0,"tr")(1,"td"),a(2),r(3,"translate"),o(),n(4,"td",5),a(5),r(6,"currency"),o()()),t&2){let e=_(2);i(2),m(c(3,2,"labels.inputs.Total Interest Earned")),i(3),u(" ",at(6,4,e.fixedDepositsAccountData.summary.totalInterestEarned,e.currency.code,"symbol-narrow","1.2-2")," ")}}function ol(t,s){if(t&1&&(n(0,"div")(1,"h4",2),a(2),r(3,"translate"),o(),n(4,"table")(5,"tbody")(6,"tr")(7,"td"),a(8),r(9,"translate"),o(),n(10,"td",5),a(11),r(12,"currency"),o()(),n(13,"tr")(14,"td"),a(15),r(16,"translate"),o(),n(17,"td",5),a(18),r(19,"currency"),o()(),h(20,el,7,9,"tr"),h(21,il,7,9,"tr"),h(22,nl,7,9,"tr"),o()()()),t&2){let e=_();i(2),m(c(3,8,"labels.heading.Performance History")),i(6),m(c(9,10,"labels.inputs.Principal Amount")),i(3),u(" ",at(12,12,e.fixedDepositsAccountData.depositAmount,e.currency.code,"symbol-narrow","1.2-2")," "),i(4),m(c(16,17,"labels.inputs.Maturity Amount")),i(3),u(" ",at(19,19,e.fixedDepositsAccountData.maturityAmount,e.currency.code,"symbol-narrow","1.2-2")," "),i(2),v(e.fixedDepositsAccountData.summary.totalDeposits?20:-1),i(),v(e.fixedDepositsAccountData.summary.totalWithdrawals?21:-1),i(),v(e.fixedDepositsAccountData.summary.totalInterestEarned>=0?22:-1)}}function al(t,s){if(t&1&&(n(0,"div")(1,"h4",2),a(2),r(3,"translate"),o(),n(4,"table")(5,"tbody")(6,"tr")(7,"td"),a(8),r(9,"translate"),o(),n(10,"td",5),a(11),r(12,"currency"),o()(),n(13,"tr")(14,"td"),a(15),r(16,"translate"),o(),n(17,"td",5),a(18),r(19,"currency"),o()()()()()),t&2){let e=_();i(2),m(c(3,5,"labels.heading.Other Details")),i(6),m(c(9,7,"labels.inputs.Principal Amount")),i(3),u(" ",at(12,9,e.fixedDepositsAccountData.depositAmount,e.currency.code,"symbol-narrow","1.2-2")," "),i(4),m(c(16,14,"labels.inputs.Maturity Amount")),i(3),u(" ",at(19,16,e.fixedDepositsAccountData.maturityAmount,e.currency.code,"symbol-narrow","1.2-2")," ")}}var Ai=(()=>{class t{constructor(){this.route=x(N),this.router=x(W),this.route.parent.data.subscribe(e=>{this.fixedDepositsAccountData=e.fixedDepositsAccountData,this.currency=this.fixedDepositsAccountData.currency}),this.router.url.includes("clients")?this.entityType="Client":this.router.url.includes("groups")?this.entityType="Group":this.router.url.includes("centers")&&(this.entityType="Center")}static{this.\u0275fac=function(l){return new(l||t)}}static{this.\u0275cmp=O({type:t,selectors:[["mifosx-general-tab"]],decls:91,vars:77,consts:[[1,"fixed-deposits-account-tables","layout-row","gap-2percent"],[1,"flex-49","layout-column","gap-4percent"],[1,"table-headers"],[1,"flex-49"],["completed","true",3,"externalId"],[1,"r-amount"]],template:function(l,p){l&1&&(n(0,"div",0)(1,"div",1)(2,"div")(3,"h4",2),a(4),r(5,"translate"),o(),n(6,"table")(7,"tbody")(8,"tr")(9,"td"),a(10),r(11,"translate"),o(),n(12,"td"),h(13,Qs,2,2,"span"),h(14,Ys,3,3,"span"),o()(),n(15,"tr")(16,"td"),a(17),r(18,"translate"),o(),n(19,"td"),a(20),r(21,"dateFormat"),r(22,"translate"),o()(),h(23,Js,7,6,"tr"),n(24,"tr")(25,"td"),a(26),r(27,"translate"),o(),n(28,"td"),a(29),r(30,"translateKey"),o()(),n(31,"tr")(32,"td"),a(33),r(34,"translate"),o(),n(35,"td"),a(36),r(37,"dateFormat"),o()(),n(38,"tr")(39,"td"),a(40),r(41,"translate"),o(),n(42,"td"),a(43),r(44,"translateKey"),o()(),h(45,Xs,6,4,"tr"),h(46,Zs,7,7,"tr"),o()()(),n(47,"div")(48,"h4",2),a(49),r(50,"translate"),o(),n(51,"table")(52,"tbody")(53,"tr")(54,"td"),a(55),r(56,"translate"),o(),n(57,"td"),a(58),o()(),n(59,"tr")(60,"td"),a(61),r(62,"translate"),o(),n(63,"td"),a(64),r(65,"translateKey"),o()(),n(66,"tr")(67,"td"),a(68),r(69,"translate"),o(),n(70,"td"),a(71),r(72,"translateKey"),o()(),n(73,"tr")(74,"td"),a(75),r(76,"translate"),o(),n(77,"td"),a(78),r(79,"translateKey"),o()(),n(80,"tr")(81,"td"),a(82),r(83,"translate"),o(),n(84,"td"),a(85),r(86,"translateKey"),o()(),h(87,tl,7,8,"tr"),o()()()(),n(88,"div",3),h(89,ol,23,24,"div")(90,al,20,21,"div"),o()()),l&2&&(i(4),m(c(5,29,"labels.heading.Fixed Deposit Details")),i(6),m(c(11,31,"labels.inputs.External Id")),i(3),v(p.fixedDepositsAccountData.externalId?13:-1),i(),v(p.fixedDepositsAccountData.externalId?-1:14),i(3),m(c(18,33,"labels.inputs.Activated On")),i(3),u(" ",p.fixedDepositsAccountData.timeline.activatedOnDate?c(21,35,p.fixedDepositsAccountData.timeline.activatedOnDate):c(22,37,"labels.text.Not Activated")," "),i(3),v(p.fixedDepositsAccountData.timeline.closedOnDate?23:-1),i(3),m(c(27,39,"labels.inputs.Field Officer")),i(3),u(" ",p.fixedDepositsAccountData.fieldOfficerName?p.fixedDepositsAccountData.fieldOfficerName:E(30,41,"Unassigned","inputs")," "),i(4),m(c(34,44,"labels.inputs.Maturity Date")),i(3),u(" ",p.fixedDepositsAccountData.maturityDate?c(37,46,p.fixedDepositsAccountData.maturityDate):"N/A"," "),i(4),m(c(41,48,"labels.inputs.Deposit Period")),i(3),T(" ",p.fixedDepositsAccountData.depositPeriod,"\xA0",E(44,50,p.fixedDepositsAccountData.depositPeriodFrequency.value,"catalogs")," "),i(2),v(p.fixedDepositsAccountData.withHoldTax?45:-1),i(),v(p.fixedDepositsAccountData.onAccountClosure?46:-1),i(3),m(c(50,53,"labels.heading.Interest Details")),i(6),m(c(56,55,"labels.inputs.Interest Rate")),i(3),u("",p.fixedDepositsAccountData.nominalAnnualInterestRate," %"),i(3),m(c(62,57,"labels.inputs.Interest Compounding Period")),i(3),m(E(65,59,p.fixedDepositsAccountData.interestCompoundingPeriodType.value,"catalogs")),i(4),m(c(69,62,"labels.inputs.Interest Posting Period")),i(3),m(E(72,64,p.fixedDepositsAccountData.interestPostingPeriodType.value,"catalogs")),i(4),m(c(76,67,"labels.inputs.Interest Calculated Using")),i(3),m(E(79,69,p.fixedDepositsAccountData.interestCalculationType.value,"catalogs")),i(4),m(c(83,72,"labels.inputs.No. of Days in Year")),i(3),m(E(86,74,p.fixedDepositsAccountData.interestCalculationDaysInYearType.value,"catalogs")),i(2),v(p.fixedDepositsAccountData.preClosurePenalApplicable?87:-1),i(2),v(!p.fixedDepositsAccountData.status.rejected&&!p.fixedDepositsAccountData.status.submittedAndPendingApproval?89:90))},dependencies:[y,I,Ji,se,yt,w,It],styles:[".fixed-deposits-account-tables[_ngcontent-%COMP%]{padding:1%}"]})}}return t})();var rl=[{path:"",data:{title:"All Fixed Deposits",breadcrumb:"Fixed Deposits",routeParamBreadcrumb:!1},children:[{path:"create",data:{title:"Create Fixed Deposit Account",breadcrumb:"Create Fixed Deposit Account"},component:Mi,resolve:{fixedDepositsAccountTemplate:Bi}},{path:":fixedDepositAccountId",data:{title:"Fixed Deposit Account View",routeParamBreadcrumb:"fixedDepositAccountId"},resolve:{fixedDepositsAccountData:Si},children:[{path:"",component:ai,resolve:{fixedDepositsAccountData:Si,savingsDatatables:Ii},children:[{path:"",redirectTo:"general",pathMatch:"full"},{path:"general",component:Ai,data:{title:"Fixed Deposit Account Details",breadcrumb:"General",routeParamBreadcrumb:!1}},{path:"interest-rate-chart",component:ri,data:{title:"Fixed Deposit Account Interest Rate Chart",breadcrumb:"Interest Rate Chart",routeParamBreadcrumb:!1}},{path:"transactions",component:pi,data:{title:"Fixed Deposit Account Transactions",breadcrumb:"Transactions",routeParamBreadcrumb:!1}},{path:"charges",component:li,data:{title:"Fixed Deposit Account Charges",breadcrumb:"Charges",routeParamBreadcrumb:!1}},{path:"standing-instructions",component:mi,data:{title:"Fixed Deposit Account Standing Instructions",breadcrumb:"Standing Instructions",routeParamBreadcrumb:!1}},{path:"datatables",children:[{path:":datatableName",component:di,data:{title:"View Data Table",routeParamBreadcrumb:"datatableName"},resolve:{savingsDatatable:yi}}]}]},{path:"edit",data:{title:"Edit Fixed Deposit Account",breadcrumb:"Edit",routeParamBreadcrumb:!1},component:Ti,resolve:{fixedDepositsAccountAndTemplate:ki}},{path:"transactions",data:{title:"Fixed Deposits Account Transactions",breadcrumb:"Transactions",routeParamBreadcrumb:!1},children:[{path:"",redirectTo:"../transactions",pathMatch:"prefix"},{path:"account-transfers",loadChildren:()=>import("./account-transfers.module-EE4IYF6L.js").then(t=>t.AccountTransfersModule)},{path:":id",data:{routeParamBreadcrumb:"id"},children:[{path:"",component:Pi,resolve:{fixedDepositsAccountTransaction:wi}}]}]},{path:"actions/:name",data:{title:"Fixed Deposits Account Actions",routeParamBreadcrumb:"name"},component:bi,resolve:{fixedDepositsAccountActionData:Ei}}]}]}],ln=(()=>{class t{static{this.\u0275fac=function(l){return new(l||t)}}static{this.\u0275mod=Le({type:t})}static{this.\u0275inj=He({providers:[Si,yi,Ii,wi,Ei,Bi,ki],imports:[Oi.forChild(rl),Oi]})}}return t})();var Qx=(()=>{class t{static{this.\u0275fac=function(l){return new(l||t)}}static{this.\u0275mod=Le({type:t})}static{this.\u0275inj=He({imports:[pn,en,nn,ln,ai,pi,li,mi,ri,di,bi,ui,fi,ni,ii,ze,gi,xi,Ci,Pi,ci,si,_i,hi,vi,Mi,ge,xe,_e,Ce,Ve,qe,Ti,Ai,Di]})}}return t})();export{Qx as FixedDepositsModule}; +import{a as sn}from"./chunk-AZ6SD2G5.js";import{a as yi,b as Ii}from"./chunk-EH6HBK56.js";import{a as cn}from"./chunk-JZVD6ANS.js";import{$d as ke,$f as Zi,Ad as Gi,Bc as Xt,Bd as nt,Bg as rn,Cc as Be,Cd as Ct,Cf as Ki,Da as b,Dc as Ut,Df as Qi,Ea as P,Eb as se,Ec as Zt,Ef as Yi,Fb as y,Fc as te,Fd as Pt,G as Gt,Ga as F,Gc as ee,Gd as ot,H as He,Hc as ie,Hd as Ft,Ia as M,Id as dt,Ja as _,Jd as At,Jg as ei,K as x,Kg as pn,L as S,Ld as Ot,M as A,Mc as w,Na as ht,Nd as me,Oa as vt,Ob as le,Od as Mt,Pa as Dt,Pd as Tt,Qa as k,Qd as St,Qe as Ui,Rb as Ni,Rc as et,Rd as Ue,Sc as U,Sd as yt,T as Jt,Td as It,Ua as a,Ud as de,Uf as Ji,Va as m,Wa as u,Wc as rt,Xa as T,Xc as V,Xd as ut,Ya as ce,Yc as it,Zb as Ie,Zc as pt,Ze as ji,Zf as Xi,_ as Ri,_b as Fe,_d as he,_e as Wi,_f as ue,ac as oe,ad as Z,ag as tn,bb as _t,bc as ae,bf as Ye,bg as en,ca as i,cc as we,cd as ct,cf as Je,da as $e,dd as jt,de as Re,df as Xe,eb as R,ed as zi,ef as Ze,fb as Ge,fd as st,ff as ne,fg as $t,ge as je,gf as Wt,hb as r,hc as N,he as We,hf as wt,ib as c,ic as Vi,id as lt,ie as Ke,if as Et,ja as O,jb as E,jf as Bt,ka as Le,kc as W,lb as at,lc as tt,ld as gt,lf as kt,mc as qi,mf as Rt,na as C,nc as Oi,ne as Qe,of as Nt,pa as Te,pd as mt,pf as Vt,pg as nn,qb as Se,qc as Ee,qg as ti,ra as h,rc as B,rd as I,rf as qt,rg as Ne,sa as v,sb as Ae,sd as Y,sf as zt,ta as $,tb as Oe,td as Hi,ua as L,ud as $i,uf as Ht,ug as on,va as G,vd as xt,wa as d,xa as n,xd as bt,xf as ve,ya as o,yd as Li,za as g,zb as ye,zg as an}from"./chunk-BQBWZIWL.js";import{a as H,b as X}from"./chunk-PHUH23IY.js";var mn=()=>({confirm:!0}),ii=(()=>{class t{constructor(){this.dialogRef=x(Xt)}static{this.\u0275fac=function(l){return new(l||t)}}static{this.\u0275cmp=O({type:t,selectors:[["mifosx-calculate-interest-dialog"]],decls:14,vars:14,consts:[["mat-dialog-title",""],["mat-dialog-content",""],["align","end"],["mat-raised-button","","mat-dialog-close",""],["mat-raised-button","","color","primary",3,"mat-dialog-close"]],template:function(l,p){l&1&&(n(0,"h1",0),a(1),r(2,"translate"),o(),n(3,"div",1)(4,"p"),a(5),r(6,"translate"),o()(),n(7,"mat-dialog-actions",2)(8,"button",3),a(9),r(10,"translate"),o(),n(11,"button",4),a(12),r(13,"translate"),o()()),l&2&&(i(),m(c(2,5,"labels.heading.Calculate Interest")),i(4),u("",c(6,7,"labels.text.Are you sure you want to calculate interest")," ?"),i(4),m(c(10,9,"labels.buttons.Cancel")),i(2),d("mat-dialog-close",R(13,mn)),i(),u(" ",c(13,11,"labels.buttons.Confirm")," "))},dependencies:[y,I,B,te,ee,ie,Zt,w],encapsulation:2})}}return t})();var dn=()=>({confirm:!0}),ni=(()=>{class t{constructor(){this.dialogRef=x(Xt)}static{this.\u0275fac=function(l){return new(l||t)}}static{this.\u0275cmp=O({type:t,selectors:[["mifosx-post-interest-dialog"]],decls:14,vars:14,consts:[["mat-dialog-title",""],["mat-dialog-content",""],["align","end"],["mat-raised-button","","mat-dialog-close",""],["mat-raised-button","","color","primary",3,"mat-dialog-close"]],template:function(l,p){l&1&&(n(0,"h1",0),a(1),r(2,"translate"),o(),n(3,"div",1)(4,"p"),a(5),r(6,"translate"),o()(),n(7,"mat-dialog-actions",2)(8,"button",3),a(9),r(10,"translate"),o(),n(11,"button",4),a(12),r(13,"translate"),o()()),l&2&&(i(),m(c(2,5,"labels.heading.Post Interest")),i(4),u("",c(6,7,"labels.text.Are you sure you want to post interest")," ?"),i(4),m(c(10,9,"labels.buttons.Cancel")),i(2),d("mat-dialog-close",R(13,dn)),i(),u(" ",c(13,11,"labels.buttons.Confirm")," "))},dependencies:[y,I,B,te,ee,ie,Zt,w],encapsulation:2})}}return t})();var un=()=>({confirm:!0}),ze=(()=>{class t{constructor(){this.dialogRef=x(Xt),this.data=x(Be)}static{this.\u0275fac=function(l){return new(l||t)}}static{this.\u0275cmp=O({type:t,selectors:[["mifosx-toggle-withhold-tax-dialog"]],decls:17,vars:25,consts:[["mat-dialog-title",""],["mat-dialog-content",""],["align","end"],["mat-raised-button","","mat-dialog-close",""],["mat-raised-button","",3,"color","mat-dialog-close"]],template:function(l,p){l&1&&(n(0,"h1",0),a(1),r(2,"translate"),r(3,"translate"),o(),n(4,"div",1)(5,"p"),a(6),r(7,"translate"),r(8,"translate"),r(9,"translate"),o()(),n(10,"mat-dialog-actions",2)(11,"button",3),a(12),r(13,"translate"),o(),n(14,"button",4),a(15),r(16,"translate"),o()()),l&2&&(i(),T(" ",c(2,10,p.data.isEnable?"labels.heading.Enable":"labels.heading.Disable")," ",c(3,12,"labels.heading.Withhold Tax"),` +`),i(5),ce(" ",c(7,14,"labels.text.Are you sure you want to")," ",c(8,16,p.data.isEnable?"labels.heading.Enable":"labels.heading.Disable")," ",c(9,18,"labels.text.withhold tax for this account")," ? "),i(6),m(c(13,20,"labels.buttons.Cancel")),i(2),d("color",_t(p.data.isEnable?"accent":"warn"))("mat-dialog-close",R(24,un)),i(),u(" ",c(16,22,"labels.buttons.Confirm")," "))},dependencies:[y,I,B,te,ee,ie,Zt,w],encapsulation:2})}}return t})();var oi=class{constructor(s){this.setOptions(s),this.setButtons(s)}get singleButtons(){return this.buttonsArray}get options(){return this.optionArray}setButtons(s){switch(s){case"Active":this.buttonsArray=[{name:"Premature Close",icon:"fa fa-arrow-left"},{name:"Calculate Interest",icon:"fa fa-table"},{name:"Undo Activation",icon:"fa fa-undo"}];break;case"Matured":this.buttonsArray=[{name:"Close",icon:"fa fa-arrow-right"},{name:"Calculate Interest",icon:"fa fa-table"}];break;case"Submitted and pending approval":this.buttonsArray=[{name:"Modify Application",icon:"fa fa-pencil "},{name:"Approve",icon:"fa fa-check"}];break;case"Approved":this.buttonsArray=[{name:"Undo Approval",icon:"fa fa-undo"},{name:"Activate",icon:"fa fa-check"}];break;default:this.buttonsArray=[]}}setOptions(s){switch(s){case"Active":case"Matured":this.optionArray=[{name:"Post Interest"},{name:"Add Charge"}];break;case"Submitted and pending approval":this.optionArray=[{name:"Reject"},{name:"Withdrawn by Client"},{name:"Add Charge"},{name:"Delete"}];break;case"Approved":default:this.optionArray=[]}}addOption(s){this.optionArray.push(s)}};var j=(()=>{class t{constructor(){this.http=x(Ni)}getFixedDepositsAccountData(e){let l=new le().set("associations","all");return this.http.get(`/fixeddepositaccounts/${e}`,{params:l})}deleteFixedDepositsAccount(e){return this.http.delete(`/fixeddepositaccounts/${e}`)}executeFixedDepositsAccountCommand(e,l,p){let f=new le().set("command",l);return this.http.post(`/fixeddepositaccounts/${e}`,p,{params:f})}getFixedDepositsAccountTransaction(e,l){return this.http.get(`/fixeddepositaccounts/${e}/transactions/${l}`)}executeFixedDepositsAccountTransactionsCommand(e,l,p,f){let D=new le().set("command",l);return this.http.post(`/fixeddepositaccounts/${e}/transactions/${f}`,p,{params:D})}getFixedDepositsAccountClosureTemplate(e){let l=new le().set("command","close");return this.http.get(`/fixeddepositaccounts/${e}/template`,{params:l})}getFixedDepositsAccountTransactionTemplate(e){return this.http.get(`/fixeddepositaccounts/${e}/transactions/template`)}getFixedDepositsAccountTemplate(e,l){let p=new le().set("clientId",e);return p=l?p.set("productId",l):p,this.http.get("/fixeddepositaccounts/template",{params:p})}getFixedDepositsAccountAndTemplate(e){let l=new le().set("associations","charges,+linkedAccount").set("template","true");return this.http.get(`/fixeddepositaccounts/${e}`,{params:l})}createFixedDepositAccount(e){return this.http.post("/fixeddepositaccounts",e)}updateFixedDepositAccount(e,l){return this.http.put(`/fixeddepositaccounts/${e}`,l)}getStandingInstructions(e,l,p,f,D){let q=new le().set("clientId",e).set("clientName",l).set("fromAccountId",p).set("fromAccountType","2").set("locale",f).set("dateFormat",D);return this.http.get("/standinginstructions",{params:q})}static{this.\u0275fac=function(l){return new(l||t)}}static{this.\u0275prov=Gt({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();var fn=()=>["./general"],gn=()=>["./interest-rate-chart"],xn=()=>["./charges"],Cn=()=>["./transactions"],_n=()=>["./standing-instructions"],hn=t=>["./datatables",t];function vn(t,s){if(t&1&&(n(0,"span",21),g(1,"mifosx-account-number",18),o()),t&2){let e=_();i(),d("accountNo",_t(e.fixedDepositsAccountData.clientAccountNo))}}function Dn(t,s){if(t&1&&(n(0,"div",22)(1,"h3",31),a(2),r(3,"translate"),o(),n(4,"table",32)(5,"tbody")(6,"tr")(7,"td",33),a(8),r(9,"translate"),o(),n(10,"td",34),a(11),r(12,"currency"),o()(),n(13,"tr")(14,"td",33),a(15),r(16,"translate"),o(),n(17,"td",34),a(18),r(19,"currency"),o()()()()()),t&2){let e=_();i(2),m(c(3,5,"labels.heading.Account Overview")),i(6),m(c(9,7,"labels.inputs.Current Balance")),i(3),u(" ",at(12,9,e.fixedDepositsAccountData.summary.accountBalance,e.currency.code,"symbol-narrow","1.2-2")," "),i(4),m(c(16,14,"labels.inputs.Deposit Amount")),i(3),u(" ",at(19,16,e.fixedDepositsAccountData.depositAmount,e.currency.code,"symbol-narrow","1.2-2")," ")}}function bn(t,s){if(t&1){let e=F();n(0,"button",35),M("click",function(){let p=S(e).$implicit,f=_();return A(f.doAction(p.name))}),g(1,"i",36),a(2),r(3,"translateKey"),o()}if(t&2){let e=s.$implicit;i(),d("ngClass",_t(e.icon)),i(),u(" ",E(3,3,e.name,"menus")," ")}}function Pn(t,s){if(t&1){let e=F();n(0,"span")(1,"button",35),M("click",function(){let p=S(e).$implicit,f=_(2);return A(f.doAction(p.name))}),a(2),r(3,"translateKey"),o()()}if(t&2){let e=s.$implicit;i(2),m(E(3,1,e.name,"menus"))}}function Mn(t,s){if(t&1&&(n(0,"button",37),a(1),r(2,"translateKey"),o(),n(3,"mat-menu",null,5),L(5,Pn,4,4,"span",null,$),o()),t&2){let e=k(4),l=_();d("matMenuTriggerFor",e),i(),m(E(2,2,"More","menus")),i(4),G(l.buttonConfig.options)}}function Tn(t,s){if(t&1&&(n(0,"span")(1,"a",30,6),a(3),r(4,"translate"),o()()),t&2){let e=k(2);i(),d("routerLink",R(5,Cn))("active",e.isActive),i(2),u(" ",c(4,3,"labels.inputs.Transactions")," ")}}function Sn(t,s){if(t&1&&(n(0,"a",30,7),a(2),r(3,"translate"),o()),t&2){let e=k(1);d("routerLink",R(5,_n))("active",e.isActive),i(2),u(" ",c(3,3,"labels.inputs.Standing Instructions")," ")}}function An(t,s){if(t&1&&(n(0,"a",30,8),a(2),o()),t&2){let e=k(1),l=_().$implicit;d("routerLink",Ge(3,hn,l.registeredTableName))("active",e.isActive),i(2),u(" ",l.registeredTableName," ")}}function On(t,s){if(t&1&&C(0,An,3,5,"a",38),t&2){let e=s.$implicit;d("mifosxHasPermission","READ_"+e.registeredTableName)}}var ai=(()=>{class t{constructor(){this.route=x(N),this.router=x(W),this.fixedDepositsService=x(j),this.savingsService=x($t),this.dialog=x(Ut),this.showTransactions=!1,this.route.data.subscribe(e=>{this.fixedDepositsAccountData=e.fixedDepositsAccountData,this.savingsDatatables=e.savingsDatatables,this.currency=this.fixedDepositsAccountData.currency;let l=e.fixedDepositsAccountData.status;this.showTransactions=l.id>=300}),this.router.url.includes("clients")?this.entityType="Client":this.router.url.includes("groups")?this.entityType="Group":this.router.url.includes("centers")&&(this.entityType="Center")}ngOnInit(){this.setConditionalButtons()}setConditionalButtons(){let e=this.fixedDepositsAccountData.status.value;this.buttonConfig=new oi(e),this.fixedDepositsAccountData.taxGroup&&e==="Active"&&(this.fixedDepositsAccountData.withHoldTax?this.buttonConfig.addOption({name:"Disable Withhold Tax"}):this.buttonConfig.addOption({name:"Enable Withhold Tax"}))}reload(){let e=this.fixedDepositsAccountData.clientId,l=this.router.url;this.router.navigateByUrl(`/clients/${e}/fixed-deposits-accounts`,{skipLocationChange:!0}).then(()=>this.router.navigate([l]))}doAction(e){switch(e){case"Approve":case"Reject":case"Activate":case"Close":case"Undo Approval":case"Undo Activation":case"Add Charge":case"Withdrawn by Client":case"Premature Close":this.router.navigate([`actions/${e}`],{relativeTo:this.route});break;case"Modify Application":this.router.navigate(["edit"],{relativeTo:this.route});break;case"Delete":this.deleteFixedDepositsAccount();break;case"Calculate Interest":this.calculateInterest();break;case"Post Interest":this.postInterest();break;case"Enable Withhold Tax":this.enableWithHoldTax();break;case"Disable Withhold Tax":this.disableWithHoldTax();break}}deleteFixedDepositsAccount(){this.dialog.open(ke,{data:{deleteContext:`fixed deposit account with id: ${this.fixedDepositsAccountData.id}`}}).afterClosed().subscribe(l=>{l.delete&&this.fixedDepositsService.deleteFixedDepositsAccount(this.fixedDepositsAccountData.id).subscribe(()=>{this.router.navigate(["../../"],{relativeTo:this.route})})})}calculateInterest(){this.dialog.open(ii).afterClosed().subscribe(l=>{l.confirm&&this.fixedDepositsService.executeFixedDepositsAccountCommand(this.fixedDepositsAccountData.id,"calculateInterest",{}).subscribe(()=>{this.reload()})})}postInterest(){this.dialog.open(ni).afterClosed().subscribe(l=>{l.confirm&&this.fixedDepositsService.executeFixedDepositsAccountCommand(this.fixedDepositsAccountData.id,"postInterest",{}).subscribe(()=>{this.reload()})})}enableWithHoldTax(){this.dialog.open(ze,{data:{isEnable:!0}}).afterClosed().subscribe(l=>{l.confirm&&this.savingsService.executeSavingsAccountUpdateCommand(this.fixedDepositsAccountData.id,"updateWithHoldTax",{withHoldTax:!0}).subscribe(()=>{this.reload()})})}disableWithHoldTax(){this.dialog.open(ze,{data:{isEnable:!1}}).afterClosed().subscribe(l=>{l.confirm&&this.savingsService.executeSavingsAccountUpdateCommand(this.fixedDepositsAccountData.id,"updateWithHoldTax",{withHoldTax:!1}).subscribe(()=>{this.reload()})})}static{this.\u0275fac=function(l){return new(l||t)}}static{this.\u0275cmp=O({type:t,selectors:[["mifosx-fixed-deposit-account-view"]],decls:54,vars:44,consts:[["accountMenu","matMenu"],["general","routerLinkActive"],["IRC","routerLinkActive"],["charges","routerLinkActive"],["tabPanel",""],["More","matMenu"],["transactions","routerLinkActive"],["standingInstructions","routerLinkActive"],["datatable","routerLinkActive"],[1,"account-card"],[1,"header","layout-column"],[1,"header-title-group"],[1,"profile-image-container"],["mat-card-md-image","",1,"profile-image",3,"matTooltip","src"],[1,"mat-typography","account-card-title"],[1,"layout-row","responsive-column"],[1,"flex-60"],[1,"fa","fa-stop",3,"ngClass","matTooltip"],[3,"accountNo"],[1,"account-overview"],[1,"m-r-10"],[1,"m-l-10"],[1,"flex-30"],[1,"flex-5"],["mat-icon-button","","aria-label","Fixed Deposit account actions","yPosition","below",3,"matMenuTriggerFor"],["matListIcon","",1,"actions-menu"],["icon","bars","size","sm"],["mat-menu-item",""],[1,"content"],["mat-tab-nav-bar","",1,"navigation-tabs",3,"tabPanel"],["mat-tab-link","","routerLinkActive","",3,"routerLink","active"],[1,"flex-100"],[1,"account-overview","flex-100"],[1,"flex-70"],[1,"r-amount","flex-30"],["mat-menu-item","",3,"click"],[3,"ngClass"],["mat-menu-item","",3,"matMenuTriggerFor"],["mat-tab-link","","routerLinkActive","",3,"routerLink","active",4,"mifosxHasPermission"]],template:function(l,p){if(l&1&&(n(0,"mat-card",9)(1,"mat-card-header",10)(2,"mat-card-title-group",11)(3,"div",12)(4,"div"),g(5,"img",13),r(6,"translate"),o()(),n(7,"div",14)(8,"mat-card-title")(9,"div",15)(10,"div",16)(11,"h3"),g(12,"i",17),r(13,"statusLookup"),a(14),r(15,"translate"),g(16,"mifosx-account-number",18),o(),n(17,"span",19)(18,"span",20),a(19),r(20,"translate"),o(),a(21),h(22,vn,2,2,"span",21),o()(),h(23,Dn,20,21,"div",22),n(24,"div",23)(25,"button",24)(26,"mat-icon",25),g(27,"fa-icon",26),o()()()()()(),n(28,"mat-menu",null,0),L(30,bn,4,6,"button",27,$),h(32,Mn,7,5),o()()(),n(33,"mat-card-content",28)(34,"nav",29)(35,"a",30,1),a(37),r(38,"translate"),o(),n(39,"a",30,2),a(41),r(42,"translate"),o(),h(43,Tn,5,6,"span"),n(44,"a",30,3),a(46),r(47,"translate"),o(),h(48,Sn,4,6,"a",30),L(49,On,1,1,"a",30,$),o(),n(51,"mat-tab-nav-panel",null,4),g(53,"router-outlet"),o()()()),l&2){let f=k(29),D=k(36),q=k(40),re=k(45),pe=k(52);i(5),d("matTooltip",_t(c(6,27,"tooltips.Fixed Deposits Account")))("src","assets/images/fd_account_placeholder.png",Ri),i(7),d("ngClass",c(13,29,p.fixedDepositsAccountData.status.code))("matTooltip",p.fixedDepositsAccountData.status.value),i(2),T(" ",c(15,31,"labels.inputs.Fixed Deposit Product")," : ",p.fixedDepositsAccountData.depositProductName," "),i(2),d("accountNo",_t(p.fixedDepositsAccountData.accountNo)),i(3),u("",c(20,33,"labels.text."+p.entityType)," :"),i(2),u(" ",p.fixedDepositsAccountData.clientName||p.fixedDepositsAccountData.groupName," "),i(),v(p.fixedDepositsAccountData.clientAccountNo?22:-1),i(),v(!p.fixedDepositsAccountData.status.rejected&&!p.fixedDepositsAccountData.status.submittedAndPendingApproval?23:-1),i(2),d("matMenuTriggerFor",f),i(5),G(p.buttonConfig.singleButtons),i(2),v(p.buttonConfig.options.length?32:-1),i(2),d("tabPanel",pe),i(),d("routerLink",R(41,fn))("active",D.isActive),i(2),u(" ",c(38,35,"labels.inputs.General")," "),i(2),d("routerLink",R(42,gn))("active",q.isActive),i(2),u(" ",c(42,37,"labels.inputs.Interest Rate Chart")," "),i(2),v(p.showTransactions?43:-1),i(),d("routerLink",R(43,xn))("active",re.isActive),i(2),u(" ",c(47,39,"labels.inputs.Charges")," "),i(2),v(p.fixedDepositsAccountData.clientId?48:-1),i(),G(p.savingsDatatables)}},dependencies:[y,Se,I,tt,Y,xt,de,Li,$i,Gi,me,Hi,an,Ee,Ke,Qe,ut,We,je,Ki,Qi,qi,Yi,Vi,se,w,It,Zi],encapsulation:2})}}return t})();function yn(t,s){t&1&&(n(0,"th",17),a(1),r(2,"translate"),o()),t&2&&(i(),m(c(2,1,"labels.inputs.Period")))}function In(t,s){if(t&1&&(n(0,"td",18),a(1),r(2,"translateKey"),o()),t&2){let e=s.$implicit;i(),ce(" ",e.fromPeriod," - ",e.toPeriod,"\xA0",E(2,3,e.periodType.value,"catalogs")," ")}}function Fn(t,s){t&1&&(n(0,"th",17),a(1),r(2,"translate"),o()),t&2&&(i(),m(c(2,1,"labels.inputs.Amount Range")))}function wn(t,s){if(t&1&&(n(0,"td",18),a(1),r(2,"formatNumber"),r(3,"formatNumber"),o()),t&2){let e=s.$implicit;i(),T(" ",c(2,2,e.amountRangeFrom)," - ",c(3,4,e.amountRangeTo)," ")}}function En(t,s){t&1&&(n(0,"th",17),a(1),r(2,"translate"),o()),t&2&&(i(),m(c(2,1,"labels.inputs.Interest")))}function Bn(t,s){if(t&1&&(n(0,"td",18),a(1),r(2,"formatNumber"),o()),t&2){let e=s.$implicit;i(),u("",c(2,1,e.annualInterestRate)," %")}}function kn(t,s){t&1&&(n(0,"th",17),a(1),r(2,"translate"),o()),t&2&&(i(),m(c(2,1,"labels.inputs.Description")))}function Rn(t,s){if(t&1&&(n(0,"td",18),a(1),o()),t&2){let e=s.$implicit;i(),m(e.description)}}function Nn(t,s){t&1&&(n(0,"th",17),a(1),r(2,"translate"),o()),t&2&&(i(),m(c(2,1,"labels.inputs.Actions")))}function Vn(t,s){t&1&&(n(0,"span"),g(1,"fa-icon",21),a(2),r(3,"translate"),o()),t&2&&(i(2),u(" ",c(3,1,"labels.buttons.View Incentives")," "))}function qn(t,s){t&1&&(n(0,"span"),g(1,"fa-icon",22),a(2),r(3,"translate"),o()),t&2&&(i(2),u(" ",c(3,1,"labels.buttons.Hide Incentives")," "))}function zn(t,s){if(t&1){let e=F();n(0,"td",18)(1,"button",19),M("click",function(){let p=S(e).dataIndex,f=_();return A(f.expandChartSlabIndex=f.expandChartSlabIndex===p?null:p)}),C(2,Vn,4,3,"span",20)(3,qn,4,3,"span",20),o()()}if(t&2){let e=s.dataIndex,l=_();i(2),d("ngIf",l.expandChartSlabIndex!==e),i(),d("ngIf",l.expandChartSlabIndex===e)}}function Hn(t,s){t&1&&(n(0,"th",17),a(1),r(2,"translate"),o()),t&2&&(i(),m(c(2,1,"labels.inputs.Entity Type")))}function $n(t,s){if(t&1&&(n(0,"td",18),a(1),o()),t&2){let e=s.$implicit;i(),u(" ",e.entityType.value," ")}}function Ln(t,s){t&1&&(n(0,"th",17),a(1),r(2,"translate"),o()),t&2&&(i(),m(c(2,1,"labels.inputs.Attribute Name")))}function Gn(t,s){if(t&1&&(n(0,"td",18),a(1),o()),t&2){let e=s.$implicit;i(),u(" ",e.attributeName.value," ")}}function Un(t,s){t&1&&(n(0,"th",17),a(1),r(2,"translate"),o()),t&2&&(i(),m(c(2,1,"labels.inputs.Condition Type")))}function jn(t,s){if(t&1&&(n(0,"td",18),a(1),r(2,"titlecase"),o()),t&2){let e=s.$implicit;i(),u(" ",c(2,1,e.conditionType.value)," ")}}function Wn(t,s){t&1&&(n(0,"th",17),a(1),r(2,"translate"),o()),t&2&&(i(),m(c(2,1,"labels.inputs.Attribute Value")))}function Kn(t,s){if(t&1&&(n(0,"td",35),a(1),o()),t&2){let e=s.$implicit;d("ngSwitch",e.attributeName),i(),u(" ",e.attributeValueDesc," ")}}function Qn(t,s){t&1&&(n(0,"th",17),a(1),r(2,"translate"),o()),t&2&&(i(),m(c(2,1,"labels.inputs.Incentive Type")))}function Yn(t,s){if(t&1&&(n(0,"td",18),a(1),o()),t&2){let e=s.$implicit;i(),u(" ",e.incentiveType.value," ")}}function Jn(t,s){t&1&&(n(0,"th",17),a(1),r(2,"translate"),o()),t&2&&(i(),m(c(2,1,"labels.inputs.Interest")))}function Xn(t,s){if(t&1&&(n(0,"td",18),a(1),r(2,"formatNumber"),o()),t&2){let e=s.$implicit;i(),u(" ",c(2,1,e.amount)," ")}}function Zn(t,s){t&1&&g(0,"tr",36)}function to(t,s){t&1&&g(0,"tr",37)}function eo(t,s){if(t&1&&(n(0,"table",27),b(1,28),C(2,Hn,3,3,"th",7)(3,$n,2,1,"td",8),P(),b(4,29),C(5,Ln,3,3,"th",7)(6,Gn,2,1,"td",8),P(),b(7,30),C(8,Un,3,3,"th",7)(9,jn,3,3,"td",8),P(),b(10,31),C(11,Wn,3,3,"th",7)(12,Kn,2,2,"td",32),P(),b(13,33),C(14,Qn,3,3,"th",7)(15,Yn,2,1,"td",8),P(),b(16,34),C(17,Jn,3,3,"th",7)(18,Xn,3,3,"td",8),P(),C(19,Zn,1,0,"tr",14)(20,to,1,0,"tr",15),o()),t&2){let e=_().$implicit,l=_();d("dataSource",e.incentives),i(19),d("matHeaderRowDef",l.incentivesDisplayedColumns),i(),d("matRowDefColumns",l.incentivesDisplayedColumns)}}function io(t,s){if(t&1&&(n(0,"td",18)(1,"div",23)(2,"mat-card",24)(3,"h4",25),a(4),r(5,"translate"),o(),C(6,eo,21,3,"table",26),o()()()),t&2){let e=s.$implicit,l=s.dataIndex,p=_();Te("colspan",p.chartSlabsDisplayedColumns.length),i(),d("@expandChartSlab",l===p.expandChartSlabIndex?"expanded":"collapsed"),i(3),u(" ",c(5,4,"labels.heading.Incentives")," "),i(2),d("ngIf",e.incentives==null?null:e.incentives.length)}}function no(t,s){t&1&&g(0,"tr",36)}function oo(t,s){t&1&&g(0,"tr",37)}function ao(t,s){t&1&&g(0,"tr",38)}var ri=(()=>{class t{constructor(){this.route=x(N),this.interestRateChartData=[],this.chartSlabsDisplayedColumns=["period","amountRange","interest","description","actions"],this.incentivesDisplayedColumns=["entityType","attributeName","conditionType","attributeValue","incentiveType","amount"],this.chartSlabsIncentivesDisplayedColumns=["incentives"],this.route.parent.data.subscribe(e=>{this.interestRateChartData=e.fixedDepositsAccountData.accountChart.chartSlabs})}static{this.\u0275fac=function(l){return new(l||t)}}static{this.\u0275cmp=O({type:t,selectors:[["mifosx-interest-rate-chart-tab"]],decls:29,vars:7,consts:[["chartsTable",""],[1,"tab-container","mat-typography"],[1,"align-start-center"],[1,"m-b-20"],[1,"mat-elevation-z1","m-b-25"],["mat-table","","multiTemplateDataRows","",3,"dataSource"],["matColumnDef","period"],["mat-header-cell","",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","amountRange"],["matColumnDef","interest"],["matColumnDef","description"],["matColumnDef","actions"],["matColumnDef","incentives"],["mat-header-row","",4,"matHeaderRowDef"],["mat-row","",4,"matRowDef","matRowDefColumns"],["mat-row","","class","incentives-row",4,"matRowDef","matRowDefColumns"],["mat-header-cell",""],["mat-cell",""],["mat-button","","color","primary",3,"click"],[4,"ngIf"],["icon","eye",1,"m-r-10"],["icon","eye-slash",1,"m-r-10"],[1,"layout-row-wrap","flex-fill","incentives"],[1,"layout-row-wrap","flex-fill"],[1,"m-b-10","flex-13"],["class","flex-fill mat-elevation-z1","mat-table","",3,"dataSource",4,"ngIf"],["mat-table","",1,"flex-fill","mat-elevation-z1",3,"dataSource"],["matColumnDef","entityType"],["matColumnDef","attributeName"],["matColumnDef","conditionType"],["matColumnDef","attributeValue"],["mat-cell","",3,"ngSwitch",4,"matCellDef"],["matColumnDef","incentiveType"],["matColumnDef","amount"],["mat-cell","",3,"ngSwitch"],["mat-header-row",""],["mat-row",""],["mat-row","",1,"incentives-row"]],template:function(l,p){l&1&&(n(0,"div",1)(1,"div",2)(2,"div",3)(3,"h3"),a(4),r(5,"translate"),o()()(),n(6,"div",4)(7,"table",5,0),b(9,6),C(10,yn,3,3,"th",7)(11,In,3,6,"td",8),P(),b(12,9),C(13,Fn,3,3,"th",7)(14,wn,4,6,"td",8),P(),b(15,10),C(16,En,3,3,"th",7)(17,Bn,3,3,"td",8),P(),b(18,11),C(19,kn,3,3,"th",7)(20,Rn,2,1,"td",8),P(),b(21,12),C(22,Nn,3,3,"th",7)(23,zn,4,2,"td",8),P(),b(24,13),C(25,io,7,6,"td",8),P(),C(26,no,1,0,"tr",14)(27,oo,1,0,"tr",15)(28,ao,1,0,"tr",16),o()()()),l&2&&(i(4),m(c(5,5,"labels.heading.All Interest Rates")),i(3),d("dataSource",p.interestRateChartData),i(19),d("matHeaderRowDef",p.chartSlabsDisplayedColumns),i(),d("matRowDefColumns",p.chartSlabsDisplayedColumns),i(),d("matRowDefColumns",p.chartSlabsIncentivesDisplayedColumns))},dependencies:[y,Ae,Oe,I,Y,B,wt,kt,Bt,Rt,Et,Nt,ut,Vt,zt,qt,Ht,ye,w,It,ue],styles:[".tab-container[_ngcontent-%COMP%]{padding:1%;margin:1%}.tab-container[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{margin:1% auto}.tab-container[_ngcontent-%COMP%] table[_ngcontent-%COMP%]{width:100%}.tab-container[_ngcontent-%COMP%] table[_ngcontent-%COMP%] tr.incentives-row[_ngcontent-%COMP%]{height:0}.tab-container[_ngcontent-%COMP%] table[_ngcontent-%COMP%] tr.incentives-row[_ngcontent-%COMP%] > td[_ngcontent-%COMP%]{padding:0}.tab-container[_ngcontent-%COMP%] table[_ngcontent-%COMP%] tr.incentives-row[_ngcontent-%COMP%] .incentives[_ngcontent-%COMP%]{overflow:hidden}.tab-container[_ngcontent-%COMP%] table[_ngcontent-%COMP%] tr.incentives-row[_ngcontent-%COMP%] .mat-card[_ngcontent-%COMP%]{border-radius:0}"],data:{animation:[Ie("expandChartSlab",[ae("collapsed",oe({height:"0px",minHeight:"0"})),ae("expanded",oe({height:"*"})),we("expanded <=> collapsed",Fe("225ms cubic-bezier(0.4, 0.0, 0.2, 1)"))])]}})}}return t})();var po=t=>["/","journal-entry","view",t];function co(t,s){if(t&1){let e=F();n(0,"div",5)(1,"mat-checkbox",21),M("click",function(){S(e);let p=_();return A(p.hideReversed())}),a(2),r(3,"translate"),o(),n(4,"mat-checkbox",21),M("click",function(){S(e);let p=_();return A(p.hideAccruals())}),a(5),r(6,"translate"),o()()}if(t&2){let e=_();i(),d("formControl",e.hideReversedParam),i(),u(" ",c(3,4,"labels.inputs.Hide Reversed")),i(2),d("formControl",e.hideAccrualsParam),i(),u(" ",c(6,6,"labels.inputs.Hide Accruals"))}}function so(t,s){t&1&&(n(0,"th",22),a(1,"#"),o())}function lo(t,s){if(t&1){let e=F();n(0,"td",23),M("click",function(){let p=S(e).$implicit,f=_();return A(f.showTransactions(p))}),a(1),o()}if(t&2){let e=s.index;i(),u(" ",e+1," ")}}function mo(t,s){t&1&&(n(0,"th",22),a(1),r(2,"translate"),o()),t&2&&(i(),m(c(2,1,"labels.inputs.ID")))}function uo(t,s){if(t&1){let e=F();n(0,"td",24),M("click",function(){let p=S(e).$implicit,f=_();return A(f.showTransactions(p))}),a(1),o()}if(t&2){let e=s.$implicit,l=_();d("ngClass",l.savingsTransactionColor(e)),i(),u(" ",e.id," ")}}function fo(t,s){t&1&&(n(0,"th",22),a(1),r(2,"translate"),o()),t&2&&(i(),m(c(2,1,"labels.inputs.Transaction Date")))}function go(t,s){if(t&1){let e=F();n(0,"td",24),M("click",function(){let p=S(e).$implicit,f=_();return A(f.showTransactions(p))}),a(1),r(2,"dateFormat"),o()}if(t&2){let e=s.$implicit,l=_();d("ngClass",l.savingsTransactionColor(e)),i(),u(" ",c(2,2,e.date)," ")}}function xo(t,s){t&1&&(n(0,"th",22),a(1),r(2,"translate"),o()),t&2&&(i(),m(c(2,1,"labels.inputs.Transaction Type")))}function Co(t,s){if(t&1){let e=F();n(0,"td",24),M("click",function(){let p=S(e).$implicit,f=_();return A(f.showTransactions(p))}),a(1),r(2,"translateKey"),o()}if(t&2){let e=s.$implicit,l=_();d("ngClass",l.savingsTransactionColor(e)),i(),u(" ",E(2,2,e.transactionType.value,"catalogs")," ")}}function _o(t,s){t&1&&(n(0,"th",22),a(1),r(2,"translate"),o()),t&2&&(i(),m(c(2,1,"labels.inputs.Debit")))}function ho(t,s){if(t&1){let e=F();n(0,"td",24),M("click",function(){let p=S(e).$implicit,f=_();return A(f.showTransactions(p))}),a(1),r(2,"formatNumber"),o()}if(t&2){let e=s.$implicit,l=_();d("ngClass",l.savingsTransactionColor(e)),i(),u(" ",l.isDebit(e.transactionType)?c(2,2,e.amount):"N/A"," ")}}function vo(t,s){t&1&&(n(0,"th",22),a(1),r(2,"translate"),o()),t&2&&(i(),m(c(2,1,"labels.inputs.Credit")))}function Do(t,s){if(t&1){let e=F();n(0,"td",24),M("click",function(){let p=S(e).$implicit,f=_();return A(f.showTransactions(p))}),a(1),r(2,"formatNumber"),o()}if(t&2){let e=s.$implicit,l=_();d("ngClass",l.savingsTransactionColor(e)),i(),u(" ",l.isDebit(e.transactionType)?"N/A":c(2,2,e.amount)," ")}}function bo(t,s){t&1&&(n(0,"th",22),a(1),r(2,"translate"),o()),t&2&&(i(),m(c(2,1,"labels.inputs.Balance")))}function Po(t,s){if(t&1){let e=F();n(0,"td",24),M("click",function(){let p=S(e).$implicit,f=_();return A(f.showTransactions(p))}),a(1),r(2,"formatNumber"),o()}if(t&2){let e=s.$implicit,l=_();d("ngClass",l.savingsTransactionColor(e)),i(),u(" ",c(2,2,e.runningBalance)," ")}}function Mo(t,s){t&1&&(n(0,"th",22),a(1),r(2,"translate"),o()),t&2&&(i(),m(c(2,1,"labels.inputs.Actions")))}function To(t,s){if(t&1){let e=F();n(0,"td",25)(1,"button",26)(2,"mat-icon"),a(3,"more_vert"),o()(),n(4,"mat-menu",null,0)(6,"button",27),M("click",function(){let p=S(e).$implicit,f=_();return A(f.showTransactions(p))}),n(7,"mat-icon"),g(8,"fa-icon",28),o(),n(9,"span"),a(10),r(11,"translate"),o()(),n(12,"button",29),M("click",function(p){S(e);let f=_();return A(f.routeEdit(p))}),n(13,"mat-icon"),g(14,"fa-icon",30),o(),n(15,"span"),a(16),r(17,"translate"),o()()()()}if(t&2){let e=s.$implicit,l=k(5);i(),d("matMenuTriggerFor",l),i(9),m(c(11,4,"labels.text.View Transaction")),i(2),d("routerLink",Ge(8,po,"S"+e.id)),i(4),m(c(17,6,"tooltips.View Journal Entries"))}}function So(t,s){t&1&&g(0,"tr",31)}function Ao(t,s){t&1&&g(0,"tr",32)}var pi=(()=>{class t{constructor(){this.route=x(N),this.router=x(W),this.dialog=x(Ut),this.displayedColumns=["row","id","transactionDate","transactionType","debit","credit","balance","actions"],this.route.parent.data.subscribe(e=>{this.transactionsData=e.fixedDepositsAccountData.transactions,this.accountId=this.route.parent.snapshot.params.fixedDepositAccountId,this.status=e.fixedDepositsAccountData.status.value})}ngOnInit(){this.hideAccrualsParam=new Z(!1),this.hideReversedParam=new Z(!1),this.dataSource=new ve(this.transactionsData)}checkStatus(){return this.status==="Active"||this.status==="Closed"||this.status==="Transfer in progress"||this.status==="Transfer on hold"||this.status==="Premature Closed"||this.status==="Matured"}isDebit(e){return e.withdrawal===!0||e.feeDeduction===!0||e.overdraftInterest===!0||e.withholdTax===!0}showTransactions(e){e.transfer?this.router.navigate([`account-transfers/account-transfers/${e.transfer.id}`],{relativeTo:this.route}):this.router.navigate([e.id],{relativeTo:this.route})}hideAccruals(){this.filterTransactions(this.hideReversedParam.value,!this.hideAccrualsParam.value)}hideReversed(){this.filterTransactions(!this.hideReversedParam.value,this.hideAccrualsParam.value)}filterTransactions(e,l){let p=this.transactionsData;(l||e)&&(p=this.transactionsData.filter(f=>!(e&&f.reversed)&&!(l&&f.transactionType.accrual))),this.dataSource=new ve(p),this.dataSource.paginator=this.paginator,this.dataSource.sort=this.sort}savingsTransactionColor(e){return e.reversed?"strike":e.transfer?"transfer":e.transactionType.accrual?"accrual":""}routeEdit(e){e.stopPropagation()}undoTransaction(e){}static{this.\u0275fac=function(l){return new(l||t)}}static{this.\u0275cmp=O({type:t,selectors:[["mifosx-transactions-tab"]],viewQuery:function(l,p){if(l&1&&(ht(Ui,7),ht(Wi,7)),l&2){let f;vt(f=Dt())&&(p.paginator=f.first),vt(f=Dt())&&(p.sort=f.first)}},decls:35,vars:7,consts:[["transactionMenu","matMenu"],[1,"tab-container","mat-typography"],[1,"mat-elevation-z1","m-b-25"],[1,"layout-row","align-start"],[1,"m-b-20"],[1,"action-button","m-b-20","layout-row","gap-20px"],["mat-table","",3,"dataSource"],["matColumnDef","row"],["mat-header-cell","",4,"matHeaderCellDef"],["mat-cell","",3,"click",4,"matCellDef"],["matColumnDef","id"],["mat-cell","",3,"ngClass","click",4,"matCellDef"],["matColumnDef","transactionDate"],["matColumnDef","transactionType"],["matColumnDef","debit"],["matColumnDef","credit"],["matColumnDef","balance"],["matColumnDef","actions"],["mat-cell","","class","center",4,"matCellDef"],["mat-header-row","",4,"matHeaderRowDef"],["mat-row","","class","select-row",4,"matRowDef","matRowDefColumns"],[1,"accruals",3,"click","formControl"],["mat-header-cell",""],["mat-cell","",3,"click"],["mat-cell","",3,"click","ngClass"],["mat-cell","",1,"center"],["mat-icon-button","","aria-label","",1,"action-button",3,"matMenuTriggerFor"],["mat-menu-item","",3,"click"],["icon","eye","size","sm"],["mat-menu-item","",3,"click","routerLink"],["icon","table-cells","size","sm"],["mat-header-row",""],["mat-row","",1,"select-row"]],template:function(l,p){l&1&&(n(0,"div",1)(1,"div",2)(2,"div",3)(3,"div",4)(4,"h3"),a(5),r(6,"translate"),o()(),h(7,co,7,8,"div",5),o(),n(8,"table",6),b(9,7),C(10,so,2,0,"th",8)(11,lo,2,1,"td",9),P(),b(12,10),C(13,mo,3,3,"th",8)(14,uo,2,2,"td",11),P(),b(15,12),C(16,fo,3,3,"th",8)(17,go,3,4,"td",11),P(),b(18,13),C(19,xo,3,3,"th",8)(20,Co,3,5,"td",11),P(),b(21,14),C(22,_o,3,3,"th",8)(23,ho,3,4,"td",11),P(),b(24,15),C(25,vo,3,3,"th",8)(26,Do,3,4,"td",11),P(),b(27,16),C(28,bo,3,3,"th",8)(29,Po,3,4,"td",11),P(),b(30,17),C(31,Mo,3,3,"th",8)(32,To,18,10,"td",18),P(),C(33,So,1,0,"tr",19)(34,Ao,1,0,"tr",20),o()()()),l&2&&(i(5),m(c(6,5,"labels.heading.All Transactions")),i(2),v(p.checkStatus()?7:-1),i(),d("dataSource",p.dataSource),i(25),d("matHeaderRowDef",p.displayedColumns),i(),d("matRowDefColumns",p.displayedColumns))},dependencies:[y,Se,I,it,zi,tt,Ue,wt,kt,Bt,Rt,Et,Nt,Ee,Ke,Qe,We,je,ut,Vt,zt,qt,Ht,yt,w,It,ue],styles:["body[_ngcontent-%COMP%] table[_ngcontent-%COMP%] tbody[_ngcontent-%COMP%] tr[_ngcontent-%COMP%]:nth-child(2n){background-color:#f2f2f2}.bg-black[_ngcontent-%COMP%]{background-color:#000}.bg-light-grey[_ngcontent-%COMP%]{background-color:#e5e5e5}.bg-medium-grey[_ngcontent-%COMP%]{background-color:#ccc}.bg-grey[_ngcontent-%COMP%]{background-color:#999}.bg-dark-grey[_ngcontent-%COMP%]{background-color:#222}.bg-white[_ngcontent-%COMP%], .bg-fff[_ngcontent-%COMP%]{background-color:#fff}.bg-none[_ngcontent-%COMP%], .no-bg[_ngcontent-%COMP%]{background:none;background-image:none;background-color:transparent}.bg-facebook[_ngcontent-%COMP%]{background-color:#47639e}.bg-twitter[_ngcontent-%COMP%]{background-color:#02a8f3}body[_ngcontent-%COMP%] table[_ngcontent-%COMP%]{border:1px solid rgba(0,0,0,.12)}.no-border[_ngcontent-%COMP%]{border:none}.no-border-t[_ngcontent-%COMP%]{border-top:none}.no-border-r[_ngcontent-%COMP%]{border-right:none}.no-border-b[_ngcontent-%COMP%]{border-bottom:none}.no-border-l[_ngcontent-%COMP%]{border-left:none}.no-border-lr[_ngcontent-%COMP%], .no-border-rl[_ngcontent-%COMP%]{border-left:none;border-right:none}.no-border-tb[_ngcontent-%COMP%], .no-border-bt[_ngcontent-%COMP%]{border-top:none;border-bottom:none}.no-border-tl[_ngcontent-%COMP%], .no-border-lt[_ngcontent-%COMP%]{border-top:none;border-left:none}.no-border-tr[_ngcontent-%COMP%], .no-border-rt[_ngcontent-%COMP%]{border-top:none;border-right:none}.no-border-bl[_ngcontent-%COMP%], .no-border-lb[_ngcontent-%COMP%]{border-bottom:none;border-left:none}.no-border-br[_ngcontent-%COMP%], .no-border-rb[_ngcontent-%COMP%]{border-bottom:none;border-right:none}.border-dashed[_ngcontent-%COMP%], .border-dotted[_ngcontent-%COMP%]{border-style:dashed}.border-black[_ngcontent-%COMP%]{border-color:#000}.border-light-grey[_ngcontent-%COMP%]{border-color:#e5e5e5}.border-medium-grey[_ngcontent-%COMP%]{border-color:#ccc}.border-grey[_ngcontent-%COMP%]{border-color:#999}.border-dark-grey[_ngcontent-%COMP%]{border-color:#2222}.border-white[_ngcontent-%COMP%], .border-fff[_ngcontent-%COMP%]{border-color:#fff}.no-border-radius[_ngcontent-%COMP%]{border-radius:0}.radius3[_ngcontent-%COMP%]{border-radius:3px}.radius5[_ngcontent-%COMP%]{border-radius:5px}.radius10[_ngcontent-%COMP%]{border-radius:10px}.column-mandatory[_ngcontent-%COMP%]{color:#5cb85c;text-align:center}.not-column-mandatory[_ngcontent-%COMP%]{color:#666f73;text-align:center}.cdk-drag-placeholder[_ngcontent-%COMP%]{background:#3498db}.yes[_ngcontent-%COMP%]{color:#5cb85c!important;background-color:#5cb85c;height:4px;cursor:none}.no[_ngcontent-%COMP%]{color:red;background-color:red;height:4px;cursor:none}.strike[_ngcontent-%COMP%]{text-decoration:line-through;color:red}.transfer[_ngcontent-%COMP%]{color:#16a085}.linked[_ngcontent-%COMP%]{color:#4461e2}.accrual[_ngcontent-%COMP%]{color:#999}.fa-question[_ngcontent-%COMP%]{color:#4461e2}.enabled[_ngcontent-%COMP%]{color:#32cd32}.disabled[_ngcontent-%COMP%]{color:#f44366}.v-mid[_ngcontent-%COMP%], .v-m[_ngcontent-%COMP%]{vertical-align:middle}.v-top[_ngcontent-%COMP%], .v-t[_ngcontent-%COMP%]{vertical-align:top}.v-bottom[_ngcontent-%COMP%], .v-b[_ngcontent-%COMP%]{vertical-align:bottom}.v-super[_ngcontent-%COMP%]{vertical-align:super}.r-amount[_ngcontent-%COMP%]{text-align:right!important;padding-right:5px!important}.left[_ngcontent-%COMP%]{text-align:left!important}.right[_ngcontent-%COMP%]{text-align:right!important}.center[_ngcontent-%COMP%]{text-align:center!important}.amount-plus[_ngcontent-%COMP%]{color:#000}.amount-minus[_ngcontent-%COMP%]{color:#4461e2}.block[_ngcontent-%COMP%]{display:block}.inline[_ngcontent-%COMP%]{display:inline}.in-block[_ngcontent-%COMP%]{display:inline-block;zoom:1}.d-none[_ngcontent-%COMP%], .hide[_ngcontent-%COMP%], .hidden[_ngcontent-%COMP%]{display:none}.t-0[_ngcontent-%COMP%]{top:0}.b-0[_ngcontent-%COMP%]{bottom:0}.l-0[_ngcontent-%COMP%]{left:0}.r-0[_ngcontent-%COMP%]{right:0}.tb-0[_ngcontent-%COMP%]{top:0;bottom:0}.lr-0[_ngcontent-%COMP%]{left:0;right:0}.f-left[_ngcontent-%COMP%]{float:left}.f-right[_ngcontent-%COMP%]{float:right}.f-none[_ngcontent-%COMP%]{float:none}textarea[_ngcontent-%COMP%]{resize:both}textarea.vertical[_ngcontent-%COMP%], textarea.horizontal[_ngcontent-%COMP%]{resize:vertical}textarea.noresize[_ngcontent-%COMP%]{resize:none}.full-input[_ngcontent-%COMP%] input[_ngcontent-%COMP%], .full-input[_ngcontent-%COMP%] select[_ngcontent-%COMP%], .full-input[_ngcontent-%COMP%] textarea[_ngcontent-%COMP%]{width:100%}.normal[_ngcontent-%COMP%] input[_ngcontent-%COMP%], .normal[_ngcontent-%COMP%] select[_ngcontent-%COMP%], .normal[_ngcontent-%COMP%] textarea[_ngcontent-%COMP%], .full-input[_ngcontent-%COMP%] [type=checkbox][_ngcontent-%COMP%], .full-input[_ngcontent-%COMP%] [type=radio][_ngcontent-%COMP%]{width:auto}.mat-tab-body-content[_ngcontent-%COMP%]{margin-bottom:20px}.mat-datepicker-input[_ngcontent-%COMP%]{margin-top:5px;margin-bottom:5px}.loader-wrapper[_ngcontent-%COMP%]{height:100vh;width:100vw}.loader-wrapper[_ngcontent-%COMP%] .triangle[_ngcontent-%COMP%]{width:0;height:0;border-style:solid;position:absolute;animation:_ngcontent-%COMP%_rotate .8s infinite .2s}.loader-wrapper[_ngcontent-%COMP%] .bottom[_ngcontent-%COMP%]{border-width:0 90px 90px;border-color:transparent transparent #1fb050;bottom:calc(50% - 100px);left:calc(50% - 90px)}.loader-wrapper[_ngcontent-%COMP%] .top[_ngcontent-%COMP%]{border-width:90px 90px 0;border-color:#b4d575 transparent transparent;top:calc(50% - 100px);left:calc(50% - 90px)}.loader-wrapper[_ngcontent-%COMP%] .left[_ngcontent-%COMP%]{border-width:90px 0 90px 90px;border-color:transparent transparent transparent #1074b9;top:calc(50% - 90px);left:calc(50% - 100px)}.loader-wrapper[_ngcontent-%COMP%] .right[_ngcontent-%COMP%]{border-width:90px 90px 90px 0;border-color:transparent #1daeec transparent transparent;top:calc(50% - 90px);right:calc(50% - 100px)}@keyframes _ngcontent-%COMP%_rotate{0%{transform:rotate(0)}to{transform:rotate(360deg)}}body[_ngcontent-%COMP%]{margin:0}.container[_ngcontent-%COMP%]{margin:0 auto}.mb-05[_ngcontent-%COMP%]{margin-bottom:.5rem}.mr-05[_ngcontent-%COMP%]{margin-right:.5rem}.mb-1[_ngcontent-%COMP%]{margin-bottom:1rem}.mt-1[_ngcontent-%COMP%]{margin-top:1rem}.m-5[_ngcontent-%COMP%]{margin:5px}.m-t-5[_ngcontent-%COMP%]{margin-top:5px}.m-r-5[_ngcontent-%COMP%]{margin-right:5px}.m-b-5[_ngcontent-%COMP%]{margin-bottom:5px}.m-l-5[_ngcontent-%COMP%]{margin-left:5px}.m-v-5[_ngcontent-%COMP%]{margin:5px 0}.m-h-5[_ngcontent-%COMP%]{margin:0 5px}.m-10[_ngcontent-%COMP%]{margin:10px}.m-t-10[_ngcontent-%COMP%]{margin-top:10px}.m-r-10[_ngcontent-%COMP%]{margin-right:10px}.m-b-10[_ngcontent-%COMP%]{margin-bottom:10px}.m-l-10[_ngcontent-%COMP%]{margin-left:10px}.m-v-10[_ngcontent-%COMP%]{margin:10px 0}.m-h-10[_ngcontent-%COMP%]{margin:0 10px}.m-15[_ngcontent-%COMP%]{margin:15px}.m-t-15[_ngcontent-%COMP%]{margin-top:15px}.m-r-15[_ngcontent-%COMP%]{margin-right:15px}.m-b-15[_ngcontent-%COMP%]{margin-bottom:15px}.m-l-15[_ngcontent-%COMP%]{margin-left:15px}.m-v-15[_ngcontent-%COMP%]{margin:15px 0}.m-h-15[_ngcontent-%COMP%]{margin:0 15px}.m-20[_ngcontent-%COMP%]{margin:20px}.m-t-20[_ngcontent-%COMP%]{margin-top:20px}.m-r-20[_ngcontent-%COMP%]{margin-right:20px}.m-b-20[_ngcontent-%COMP%]{margin-bottom:20px}.m-l-20[_ngcontent-%COMP%]{margin-left:20px}.m-v-20[_ngcontent-%COMP%]{margin:20px 0}.m-h-20[_ngcontent-%COMP%]{margin:0 20px}.m-25[_ngcontent-%COMP%]{margin:25px}.m-t-25[_ngcontent-%COMP%]{margin-top:25px}.m-r-25[_ngcontent-%COMP%]{margin-right:25px}.m-b-25[_ngcontent-%COMP%]{margin-bottom:25px}.m-l-25[_ngcontent-%COMP%]{margin-left:25px}.m-v-25[_ngcontent-%COMP%]{margin:25px 0}.m-h-25[_ngcontent-%COMP%]{margin:0 25px}.m-30[_ngcontent-%COMP%]{margin:30px}.m-t-30[_ngcontent-%COMP%]{margin-top:30px}.m-r-30[_ngcontent-%COMP%]{margin-right:30px}.m-b-30[_ngcontent-%COMP%]{margin-bottom:30px}.m-l-30[_ngcontent-%COMP%]{margin-left:30px}.m-v-30[_ngcontent-%COMP%]{margin:30px 0}.m-h-30[_ngcontent-%COMP%]{margin:0 30px}.m-35[_ngcontent-%COMP%]{margin:35px}.m-t-35[_ngcontent-%COMP%]{margin-top:35px}.m-r-35[_ngcontent-%COMP%]{margin-right:35px}.m-b-35[_ngcontent-%COMP%]{margin-bottom:35px}.m-l-35[_ngcontent-%COMP%]{margin-left:35px}.m-v-35[_ngcontent-%COMP%]{margin:35px 0}.m-h-35[_ngcontent-%COMP%]{margin:0 35px}.m-40[_ngcontent-%COMP%]{margin:40px}.m-t-40[_ngcontent-%COMP%]{margin-top:40px}.m-r-40[_ngcontent-%COMP%]{margin-right:40px}.m-b-40[_ngcontent-%COMP%]{margin-bottom:40px}.m-l-40[_ngcontent-%COMP%]{margin-left:40px}.m-v-40[_ngcontent-%COMP%]{margin:40px 0}.m-h-40[_ngcontent-%COMP%]{margin:0 40px}.m-45[_ngcontent-%COMP%]{margin:45px}.m-t-45[_ngcontent-%COMP%]{margin-top:45px}.m-r-45[_ngcontent-%COMP%]{margin-right:45px}.m-b-45[_ngcontent-%COMP%]{margin-bottom:45px}.m-l-45[_ngcontent-%COMP%]{margin-left:45px}.m-v-45[_ngcontent-%COMP%]{margin:45px 0}.m-h-45[_ngcontent-%COMP%]{margin:0 45px}.m-50[_ngcontent-%COMP%]{margin:50px}.m-t-50[_ngcontent-%COMP%]{margin-top:50px}.m-r-50[_ngcontent-%COMP%]{margin-right:50px}.m-b-50[_ngcontent-%COMP%]{margin-bottom:50px}.m-l-50[_ngcontent-%COMP%]{margin-left:50px}.m-v-50[_ngcontent-%COMP%]{margin:50px 0}.m-h-50[_ngcontent-%COMP%]{margin:0 50px}.m-55[_ngcontent-%COMP%]{margin:55px}.m-t-55[_ngcontent-%COMP%]{margin-top:55px}.m-r-55[_ngcontent-%COMP%]{margin-right:55px}.m-b-55[_ngcontent-%COMP%]{margin-bottom:55px}.m-l-55[_ngcontent-%COMP%]{margin-left:55px}.m-v-55[_ngcontent-%COMP%]{margin:55px 0}.m-h-55[_ngcontent-%COMP%]{margin:0 55px}.m-60[_ngcontent-%COMP%]{margin:60px}.m-t-60[_ngcontent-%COMP%]{margin-top:60px}.m-r-60[_ngcontent-%COMP%]{margin-right:60px}.m-b-60[_ngcontent-%COMP%]{margin-bottom:60px}.m-l-60[_ngcontent-%COMP%]{margin-left:60px}.m-v-60[_ngcontent-%COMP%]{margin:60px 0}.m-h-60[_ngcontent-%COMP%]{margin:0 60px}.m-65[_ngcontent-%COMP%]{margin:65px}.m-t-65[_ngcontent-%COMP%]{margin-top:65px}.m-r-65[_ngcontent-%COMP%]{margin-right:65px}.m-b-65[_ngcontent-%COMP%]{margin-bottom:65px}.m-l-65[_ngcontent-%COMP%]{margin-left:65px}.m-v-65[_ngcontent-%COMP%]{margin:65px 0}.m-h-65[_ngcontent-%COMP%]{margin:0 65px}.m-70[_ngcontent-%COMP%]{margin:70px}.m-t-70[_ngcontent-%COMP%]{margin-top:70px}.m-r-70[_ngcontent-%COMP%]{margin-right:70px}.m-b-70[_ngcontent-%COMP%]{margin-bottom:70px}.m-l-70[_ngcontent-%COMP%]{margin-left:70px}.m-v-70[_ngcontent-%COMP%]{margin:70px 0}.m-h-70[_ngcontent-%COMP%]{margin:0 70px}.m-75[_ngcontent-%COMP%]{margin:75px}.m-t-75[_ngcontent-%COMP%]{margin-top:75px}.m-r-75[_ngcontent-%COMP%]{margin-right:75px}.m-b-75[_ngcontent-%COMP%]{margin-bottom:75px}.m-l-75[_ngcontent-%COMP%]{margin-left:75px}.m-v-75[_ngcontent-%COMP%]{margin:75px 0}.m-h-75[_ngcontent-%COMP%]{margin:0 75px}.m-80[_ngcontent-%COMP%]{margin:80px}.m-t-80[_ngcontent-%COMP%]{margin-top:80px}.m-r-80[_ngcontent-%COMP%]{margin-right:80px}.m-b-80[_ngcontent-%COMP%]{margin-bottom:80px}.m-l-80[_ngcontent-%COMP%]{margin-left:80px}.m-v-80[_ngcontent-%COMP%]{margin:80px 0}.m-h-80[_ngcontent-%COMP%]{margin:0 80px}.no-m[_ngcontent-%COMP%]{margin:0}.no-m-t[_ngcontent-%COMP%]{margin-top:0}.no-m-r[_ngcontent-%COMP%]{margin-right:0}.no-m-b[_ngcontent-%COMP%]{margin-bottom:0}.no-m-l[_ngcontent-%COMP%]{margin-left:0}.no-m-v[_ngcontent-%COMP%], .no-m-h[_ngcontent-%COMP%], .no-margin[_ngcontent-%COMP%]{margin:0}.no-m-lr[_ngcontent-%COMP%], .no-m-rl[_ngcontent-%COMP%]{margin-left:0;margin-right:0}.no-m-tb[_ngcontent-%COMP%], .no-m-bt[_ngcontent-%COMP%]{margin-top:0;margin-bottom:0}.m-t-only[_ngcontent-%COMP%]{margin-left:0;margin-right:0;margin-bottom:0}.m-b-only[_ngcontent-%COMP%]{margin-left:0;margin-right:0;margin-top:0}.m-l-only[_ngcontent-%COMP%]{margin-right:0;margin-top:0;margin-bottom:0}.m-r-only[_ngcontent-%COMP%]{margin-left:0;margin-top:0;margin-bottom:0}.m-auto[_ngcontent-%COMP%]{margin-left:auto;margin-right:auto}.ls-0[_ngcontent-%COMP%]{margin-left:10px;margin-right:10px}html[_ngcontent-%COMP%], body[_ngcontent-%COMP%]{-webkit-tap-highlight-color:transparent}div[_ngcontent-%COMP%]{box-sizing:border-box}.color-inherit[_ngcontent-%COMP%]{color:inherit}.no-shadow[_ngcontent-%COMP%]{box-shadow:none}.pointer[_ngcontent-%COMP%]{cursor:pointer}.nolist[_ngcontent-%COMP%]{list-style:none}.actions-menu[_ngcontent-%COMP%]{color:#fff}.alert[_ngcontent-%COMP%]{background-color:#e8f4fd;padding:6px 16px;font-size:.875rem;font-family:Roboto,Helvetica Neue,sans-serif;font-weight:400;line-height:1.43;border-radius:4px;letter-spacing:normal;margin:10px}.alert[_ngcontent-%COMP%] .message[_ngcontent-%COMP%]{padding:8px 0;font-size:18px}.alert[_ngcontent-%COMP%] .alert-check[_ngcontent-%COMP%]{color:#359ff4;margin-right:2px;font-size:1.4rem} .mat-tooltip{font-size:15px;color:#fff!important;background-color:#4461e2b3;border:1px solid rgb(25.7777777778,51.5555555556,166.2222222222);max-width:400px!important;white-space:pre-line!important}.loading[_ngcontent-%COMP%]{position:absolute;min-width:100%;width:100px;height:12px;background:linear-gradient(125deg,#fff,#4461e2,#fff);animation:grow 4s linear infinite,move 4s linear infinite}mat-card-title[_ngcontent-%COMP%]{font-weight:600;font-size:x-large;padding-left:20px;padding-top:20px}html[_ngcontent-%COMP%], body[_ngcontent-%COMP%]{overflow:hidden}.overflow-x-scroll[_ngcontent-%COMP%]{max-width:100%;overflow-x:auto}.overflow-no[_ngcontent-%COMP%]{overflow:hidden}.overflow-auto[_ngcontent-%COMP%]{overflow:auto}.overflow-scroll[_ngcontent-%COMP%]{overflow:scroll}.table-container[_ngcontent-%COMP%]{overflow-x:auto;max-width:100%}body[_ngcontent-%COMP%], .no-p[_ngcontent-%COMP%]{padding:0}.no-p-t[_ngcontent-%COMP%]{padding-top:0}.no-p-r[_ngcontent-%COMP%]{padding-right:0}.no-p-b[_ngcontent-%COMP%]{padding-bottom:0}.no-p-l[_ngcontent-%COMP%]{padding-left:0}.no-p-v[_ngcontent-%COMP%], .no-p-h[_ngcontent-%COMP%]{padding:0}.p-5[_ngcontent-%COMP%]{padding:5px}.p-t-5[_ngcontent-%COMP%]{padding-top:5px}.p-r-5[_ngcontent-%COMP%]{padding-right:5px}.p-b-5[_ngcontent-%COMP%]{padding-bottom:5px}.p-l-5[_ngcontent-%COMP%]{padding-left:5px}.p-v-5[_ngcontent-%COMP%]{padding:5px 0}.p-h-5[_ngcontent-%COMP%]{padding:0 5px}.p-10[_ngcontent-%COMP%]{padding:10px}.p-t-10[_ngcontent-%COMP%]{padding-top:10px}.p-b-10[_ngcontent-%COMP%]{padding-bottom:10px}.p-v-10[_ngcontent-%COMP%]{padding:10px 0}.p-h-10[_ngcontent-%COMP%]{padding:0 10px}.p-15[_ngcontent-%COMP%]{padding:15px}.p-t-15[_ngcontent-%COMP%]{padding-top:15px}.p-r-15[_ngcontent-%COMP%]{padding-right:15px}.p-b-15[_ngcontent-%COMP%]{padding-bottom:15px}.p-l-15[_ngcontent-%COMP%]{padding-left:15px}.p-v-15[_ngcontent-%COMP%]{padding:15px 0}.p-h-15[_ngcontent-%COMP%]{padding:0 15px}.p-20[_ngcontent-%COMP%]{padding:20px}.p-t-20[_ngcontent-%COMP%]{padding-top:20px}.p-r-20[_ngcontent-%COMP%]{padding-right:20px}.p-b-20[_ngcontent-%COMP%]{padding-bottom:20px}.p-l-20[_ngcontent-%COMP%]{padding-left:20px}.p-v-20[_ngcontent-%COMP%]{padding:20px 0}.p-h-20[_ngcontent-%COMP%]{padding:0 20px}.p-25[_ngcontent-%COMP%]{padding:25px}.p-t-25[_ngcontent-%COMP%]{padding-top:25px}.p-r-25[_ngcontent-%COMP%]{padding-right:25px}.p-b-25[_ngcontent-%COMP%]{padding-bottom:25px}.p-l-25[_ngcontent-%COMP%]{padding-left:25px}.p-v-25[_ngcontent-%COMP%]{padding:25px 0}.p-h-25[_ngcontent-%COMP%]{padding:0 25px}.p-30[_ngcontent-%COMP%]{padding:30px}.p-t-30[_ngcontent-%COMP%]{padding-top:30px}.p-r-30[_ngcontent-%COMP%]{padding-right:30px}.p-b-30[_ngcontent-%COMP%]{padding-bottom:30px}.p-l-30[_ngcontent-%COMP%]{padding-left:30px}.p-v-30[_ngcontent-%COMP%]{padding:30px 0}.p-h-30[_ngcontent-%COMP%]{padding:0 30px}.p-35[_ngcontent-%COMP%]{padding:35px}.p-t-35[_ngcontent-%COMP%]{padding-top:35px}.p-r-35[_ngcontent-%COMP%]{padding-right:35px}.p-b-35[_ngcontent-%COMP%]{padding-bottom:35px}.p-l-35[_ngcontent-%COMP%]{padding-left:35px}.p-v-35[_ngcontent-%COMP%]{padding:35px 0}.p-h-35[_ngcontent-%COMP%]{padding:0 35px}.p-40[_ngcontent-%COMP%]{padding:40px}.p-t-40[_ngcontent-%COMP%]{padding-top:40px}.p-r-40[_ngcontent-%COMP%]{padding-right:40px}.p-b-40[_ngcontent-%COMP%]{padding-bottom:40px}.p-l-40[_ngcontent-%COMP%]{padding-left:40px}.p-v-40[_ngcontent-%COMP%]{padding-top:40px;padding-bottom:40px}.p-h-40[_ngcontent-%COMP%]{padding:0 40px}.p-45[_ngcontent-%COMP%]{padding:45px}.p-t-45[_ngcontent-%COMP%]{padding-top:45px}.p-r-45[_ngcontent-%COMP%]{padding-right:45px}.p-b-45[_ngcontent-%COMP%]{padding-bottom:45px}.p-l-45[_ngcontent-%COMP%]{padding-left:45px}.p-v-45[_ngcontent-%COMP%]{padding:45px 0}.p-h-45[_ngcontent-%COMP%]{padding:0 45px}.p-50[_ngcontent-%COMP%]{padding:50px}.p-t-50[_ngcontent-%COMP%]{padding-top:50px}.p-r-50[_ngcontent-%COMP%]{padding-right:50px}.p-b-50[_ngcontent-%COMP%]{padding-bottom:50px}.p-l-50[_ngcontent-%COMP%]{padding-left:50px}.p-v-50[_ngcontent-%COMP%]{padding:50px 0}.p-h-50[_ngcontent-%COMP%]{padding:0 50px}.p-55[_ngcontent-%COMP%]{padding:55px}.p-t-55[_ngcontent-%COMP%]{padding-top:55px}.p-r-55[_ngcontent-%COMP%]{padding-right:55px}.p-b-55[_ngcontent-%COMP%]{padding-bottom:55px}.p-l-55[_ngcontent-%COMP%]{padding-left:55px}.p-v-55[_ngcontent-%COMP%]{padding:55px 0}.p-h-55[_ngcontent-%COMP%]{padding:0 55px}.p-60[_ngcontent-%COMP%]{padding:60px}.p-t-60[_ngcontent-%COMP%]{padding-top:60px}.p-r-60[_ngcontent-%COMP%]{padding-right:60px}.p-b-60[_ngcontent-%COMP%]{padding-bottom:60px}.p-l-60[_ngcontent-%COMP%]{padding-left:60px}.p-v-60[_ngcontent-%COMP%]{padding:60px 0}.p-h-60[_ngcontent-%COMP%]{padding:0 60px}.p-65[_ngcontent-%COMP%]{padding:65px}.p-t-65[_ngcontent-%COMP%]{padding-top:65px}.p-r-65[_ngcontent-%COMP%]{padding-right:65px}.p-b-65[_ngcontent-%COMP%]{padding-bottom:65px}.p-l-65[_ngcontent-%COMP%]{padding-left:65px}.p-v-65[_ngcontent-%COMP%]{padding:65px 0}.p-h-65[_ngcontent-%COMP%]{padding:0 65px}.p-70[_ngcontent-%COMP%]{padding:70px}.p-t-70[_ngcontent-%COMP%]{padding-top:70px}.p-r-70[_ngcontent-%COMP%]{padding-right:70px}.p-b-70[_ngcontent-%COMP%]{padding-bottom:70px}.p-l-70[_ngcontent-%COMP%]{padding-left:70px}.p-v-70[_ngcontent-%COMP%]{padding:70px 0}.p-h-70[_ngcontent-%COMP%]{padding:0 70px}.p-75[_ngcontent-%COMP%]{padding:75px}.p-t-75[_ngcontent-%COMP%]{padding-top:75px}.p-r-75[_ngcontent-%COMP%]{padding-right:75px}.p-b-75[_ngcontent-%COMP%]{padding-bottom:75px}.p-l-75[_ngcontent-%COMP%]{padding-left:75px}.p-v-75[_ngcontent-%COMP%]{padding:75px 0}.p-h-75[_ngcontent-%COMP%]{padding:0 75px}.p-80[_ngcontent-%COMP%]{padding:80px}.p-t-80[_ngcontent-%COMP%]{padding-top:80px}.p-r-80[_ngcontent-%COMP%]{padding-right:80px}.p-b-80[_ngcontent-%COMP%]{padding-bottom:80px}.p-l-80[_ngcontent-%COMP%]{padding-left:80px}.p-v-80[_ngcontent-%COMP%]{padding:80px 0}.p-h-80[_ngcontent-%COMP%]{padding:0 80px}.no-padding[_ngcontent-%COMP%]{padding:0!important}.no-pad-lr[_ngcontent-%COMP%], .no-pad-rl[_ngcontent-%COMP%]{padding-left:0;padding-right:0}.no-pad-tb[_ngcontent-%COMP%], .no-pad-bt[_ngcontent-%COMP%]{padding-top:0;padding-bottom:0}.pad-t-only[_ngcontent-%COMP%]{padding-left:0;padding-right:0;padding-bottom:0}.pad-b-only[_ngcontent-%COMP%]{padding-left:0;padding-right:0;padding-top:0}.pad-l-only[_ngcontent-%COMP%]{padding-right:0;padding-top:0;padding-bottom:0}.pad-r-only[_ngcontent-%COMP%]{padding-left:0;padding-top:0;padding-bottom:0}html[_ngcontent-%COMP%], body[_ngcontent-%COMP%], .rel[_ngcontent-%COMP%], .relative[_ngcontent-%COMP%]{position:relative}.abs[_ngcontent-%COMP%], .absolute[_ngcontent-%COMP%]{position:absolute}.fixed[_ngcontent-%COMP%]{position:fixed}.status-active[_ngcontent-%COMP%]{color:#5cb85c}.status-inactive[_ngcontent-%COMP%]{color:#666f73}.status-deleted[_ngcontent-%COMP%]{color:#000}.status-pending[_ngcontent-%COMP%]{color:orange}.status-approved[_ngcontent-%COMP%]{color:#4461e2}.status-overpaid[_ngcontent-%COMP%]{color:purple}.status-chargeoff[_ngcontent-%COMP%]{color:#f39c12}.status-active-overdue[_ngcontent-%COMP%], .status-block[_ngcontent-%COMP%]{color:red}.status-matured[_ngcontent-%COMP%]{color:#ff4000}.subStatus-contract-termination[_ngcontent-%COMP%]{color:#b3b3b3}.mat-step-header[_ngcontent-%COMP%] .mat-step-icon-state-done[_ngcontent-%COMP%]{background-color:#2af72a}.mat-step-header[_ngcontent-%COMP%] .mat-step-icon-state-done[_ngcontent-%COMP%] .status-transfer-progress[_ngcontent-%COMP%]{color:#ff4000}.mat-step-header[_ngcontent-%COMP%] .mat-step-icon-state-done[_ngcontent-%COMP%] .status-transfer-hold[_ngcontent-%COMP%]{color:#df0101}html[_ngcontent-%COMP%], body[_ngcontent-%COMP%]{-webkit-font-smoothing:antialiased}html[_ngcontent-%COMP%]{font-size:16px}body[_ngcontent-%COMP%]{font-family:Roboto,Helvetica Neue,sans-serif;font-weight:400;font-size:14px;color:#000000de;line-height:1.5;letter-spacing:normal}.mat-h1[_ngcontent-%COMP%], .mat-headline[_ngcontent-%COMP%], .mat-typography[_ngcontent-%COMP%] .mat-h1[_ngcontent-%COMP%], .mat-typography[_ngcontent-%COMP%] .mat-headline[_ngcontent-%COMP%], .mat-typography[_ngcontent-%COMP%] h1[_ngcontent-%COMP%]{font:400 24px/32px Roboto,Helvetica Neue,sans-serif;letter-spacing:normal;margin:0 0 16px}.lh-1[_ngcontent-%COMP%]{line-height:1}.lh-13[_ngcontent-%COMP%]{line-height:1.3}.lh-15[_ngcontent-%COMP%]{line-height:1.5}.bold[_ngcontent-%COMP%], .strong[_ngcontent-%COMP%]{font-weight:700}.no-bold[_ngcontent-%COMP%]{font-weight:400}.italic[_ngcontent-%COMP%], .em[_ngcontent-%COMP%]{font-style:italic}.strike[_ngcontent-%COMP%]{text-decoration:line-through}.normal[_ngcontent-%COMP%]{font-weight:400;font-style:normal}.uppercase[_ngcontent-%COMP%]{text-transform:uppercase}.text-left[_ngcontent-%COMP%]{text-align:left}.text-center[_ngcontent-%COMP%]{text-align:center}.text-right[_ngcontent-%COMP%]{text-align:right}.w100[_ngcontent-%COMP%]{font-weight:100}.w200[_ngcontent-%COMP%]{font-weight:200}.w300[_ngcontent-%COMP%]{font-weight:300}.w400[_ngcontent-%COMP%]{font-weight:400}.w500[_ngcontent-%COMP%]{font-weight:500}.w600[_ngcontent-%COMP%]{font-weight:600}.w700[_ngcontent-%COMP%]{font-weight:700}.w800[_ngcontent-%COMP%]{font-weight:800}.w900[_ngcontent-%COMP%]{font-weight:900}.f9[_ngcontent-%COMP%]{font-size:9px}.f10[_ngcontent-%COMP%]{font-size:10px}.f11[_ngcontent-%COMP%]{font-size:11px}.f12[_ngcontent-%COMP%]{font-size:12px}.f13[_ngcontent-%COMP%]{font-size:13px}.f14[_ngcontent-%COMP%]{font-size:14px}.f15[_ngcontent-%COMP%]{font-size:15px}.f16[_ngcontent-%COMP%]{font-size:16px}.f17[_ngcontent-%COMP%]{font-size:17px}.f18[_ngcontent-%COMP%]{font-size:18px;line-height:30px}.f19[_ngcontent-%COMP%]{font-size:19px}.f20[_ngcontent-%COMP%]{font-size:20px}.f30[_ngcontent-%COMP%]{font-size:30px}.f40[_ngcontent-%COMP%]{font-size:40px}.f50[_ngcontent-%COMP%]{font-size:50px}.f60[_ngcontent-%COMP%]{font-size:60px}.size-small[_ngcontent-%COMP%]{font-size:75%}.size-normal[_ngcontent-%COMP%]{font-size:100%}.size-medium[_ngcontent-%COMP%]{font-size:125%}.size-big[_ngcontent-%COMP%], .size-large[_ngcontent-%COMP%]{font-size:150%}.size-huge[_ngcontent-%COMP%]{font-size:200%}.inherit[_ngcontent-%COMP%]{font:inherit}.text-shadow[_ngcontent-%COMP%]{text-shadow:1px 1px 1px rgba(0,0,0,.4)}.text-rgb-2[_ngcontent-%COMP%]{color:#0003}.text-rgb-3[_ngcontent-%COMP%]{color:#0000004d}.text-rgb-4[_ngcontent-%COMP%]{color:#0006}.text-rgb-5[_ngcontent-%COMP%]{color:#00000080}.no-ul[_ngcontent-%COMP%], .no-ul[_ngcontent-%COMP%]:hover, .no-ul[_ngcontent-%COMP%] a[_ngcontent-%COMP%], .no-ul[_ngcontent-%COMP%] a[_ngcontent-%COMP%]:hover{text-decoration:none}.no-wrap[_ngcontent-%COMP%]{white-space:nowrap}.auto-cell-size[_ngcontent-%COMP%]{white-space:nowrap;width:1%}.ls-0[_ngcontent-%COMP%]{letter-spacing:-3px;white-space:nowrap}.label-field[_ngcontent-%COMP%]{margin-top:32px}.wrap-content[_ngcontent-%COMP%]{overflow-wrap:break-word;word-wrap:break-word}.no-break-content[_ngcontent-%COMP%]{overflow-wrap:anywhere!important}.fit[_ngcontent-%COMP%]{max-width:100%}.half-width[_ngcontent-%COMP%]{width:50%}.full-width[_ngcontent-%COMP%]{width:100%}.full-height[_ngcontent-%COMP%]{height:100%}html[_ngcontent-%COMP%], body[_ngcontent-%COMP%]{width:100%;height:100%;min-height:100%}body[_ngcontent-%COMP%] table[_ngcontent-%COMP%]{width:100%}.container[_ngcontent-%COMP%]{max-width:74rem;width:90%}.mw300[_ngcontent-%COMP%]{max-width:300px}.mw400[_ngcontent-%COMP%]{max-width:400px}.mw500[_ngcontent-%COMP%]{max-width:500px}.mw600[_ngcontent-%COMP%]{max-width:600px}.fullwidth[_ngcontent-%COMP%]{width:100%}.zindex-1[_ngcontent-%COMP%]{z-index:1}.zindex-2[_ngcontent-%COMP%]{z-index:2}.zindex-3[_ngcontent-%COMP%]{z-index:3}.zindex-4[_ngcontent-%COMP%]{z-index:4}.tab-container[_ngcontent-%COMP%]{padding:1%;margin:1%}.tab-container[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{margin:1% auto}.tab-container[_ngcontent-%COMP%] .action-button[_ngcontent-%COMP%]{margin-left:auto}.tab-container[_ngcontent-%COMP%] table[_ngcontent-%COMP%]{width:100%;color:#000}.tab-container[_ngcontent-%COMP%] table[_ngcontent-%COMP%] .account-action-button[_ngcontent-%COMP%]{min-width:26px;padding:0 0 3px;margin:0 2%;line-height:25px}.tab-container[_ngcontent-%COMP%] table[_ngcontent-%COMP%] .strike[_ngcontent-%COMP%]{text-decoration:line-through;color:red}.tab-container[_ngcontent-%COMP%] table[_ngcontent-%COMP%] .linked[_ngcontent-%COMP%]{color:#4461e2}.tab-container[_ngcontent-%COMP%] table[_ngcontent-%COMP%] .accrual[_ngcontent-%COMP%]{color:#999}.select-row[_ngcontent-%COMP%]:hover{cursor:pointer;font-weight:800}"]})}}return t})();var Oo=()=>({confirm:!0}),ci=(()=>{class t{constructor(){this.dialogRef=x(Xt),this.data=x(Be)}static{this.\u0275fac=function(l){return new(l||t)}}static{this.\u0275cmp=O({type:t,selectors:[["mifosx-waive-charge-dialog"]],decls:14,vars:15,consts:[["mat-dialog-title",""],["mat-dialog-content",""],["align","end"],["mat-raised-button","","mat-dialog-close",""],["mat-raised-button","","color","primary",3,"mat-dialog-close"]],template:function(l,p){l&1&&(n(0,"h1",0),a(1),r(2,"translate"),o(),n(3,"div",1)(4,"p"),a(5),r(6,"translate"),o()(),n(7,"mat-dialog-actions",2)(8,"button",3),a(9),r(10,"translate"),o(),n(11,"button",4),a(12),r(13,"translate"),o()()),l&2&&(i(),m(c(2,6,"labels.heading.Waive Charge")),i(4),T("",c(6,8,"labels.text.Are you sure you want to waive charge with id"),": ",p.data.id," ?"),i(4),m(c(10,10,"labels.buttons.Cancel")),i(2),d("mat-dialog-close",R(14,Oo)),i(),u(" ",c(13,12,"labels.buttons.Confirm")," "))},dependencies:[y,I,B,te,ee,ie,Zt,w],encapsulation:2})}}return t})();var yo=()=>({confirm:!0}),si=(()=>{class t{constructor(){this.dialogRef=x(Xt),this.data=x(Be)}static{this.\u0275fac=function(l){return new(l||t)}}static{this.\u0275cmp=O({type:t,selectors:[["mifosx-inactivate-charge-dialog"]],decls:14,vars:15,consts:[["mat-dialog-title",""],["mat-dialog-content",""],["align","end"],["mat-raised-button","","mat-dialog-close",""],["mat-raised-button","","color","primary",3,"mat-dialog-close"]],template:function(l,p){l&1&&(n(0,"h1",0),a(1),r(2,"translate"),o(),n(3,"div",1)(4,"p"),a(5),r(6,"translate"),o()(),n(7,"mat-dialog-actions",2)(8,"button",3),a(9),r(10,"translate"),o(),n(11,"button",4),a(12),r(13,"translate"),o()()),l&2&&(i(),m(c(2,6,"labels.heading.Inactivate Charge")),i(4),T("",c(6,8,"labels.text.Are you sure you want to inactivate charge with id"),": ",p.data.id," ?"),i(4),m(c(10,10,"labels.buttons.Cancel")),i(2),d("mat-dialog-close",R(14,yo)),i(),u(" ",c(13,12,"labels.buttons.Confirm")," "))},dependencies:[y,I,B,te,ee,ie,Zt,w],encapsulation:2})}}return t})();var Io=["chargesTable"],Fo=()=>[2e3];function wo(t,s){if(t&1){let e=F();n(0,"div",4)(1,"button",22),M("click",function(){S(e);let p=_();return A(p.toggleCharges())}),a(2),o()()}if(t&2){let e=_();i(2),u(" ",e.showInactiveCharges?"View Active Charges":"View Inactive Charges"," ")}}function Eo(t,s){t&1&&(n(0,"th",23),a(1),r(2,"translate"),o()),t&2&&(i(),m(c(2,1,"labels.inputs.name")))}function Bo(t,s){if(t&1&&(n(0,"td",24),a(1),o()),t&2){let e=s.$implicit;i(),m(e.name)}}function ko(t,s){t&1&&(n(0,"th",23),a(1),r(2,"translate"),o()),t&2&&(i(),m(c(2,1,"labels.inputs.Fee/Penalty")))}function Ro(t,s){if(t&1&&(n(0,"td",24),a(1),r(2,"translateKey"),r(3,"translateKey"),o()),t&2){let e=s.$implicit;i(),u(" ",e.penalty===!0?E(2,1,"Penalty","catalogs"):E(3,4,"Fee","catalogs")," ")}}function No(t,s){t&1&&(n(0,"th",23),a(1),r(2,"translate"),o()),t&2&&(i(),m(c(2,1,"labels.inputs.Payment Due At")))}function Vo(t,s){if(t&1&&(n(0,"td",24),a(1),r(2,"translateKey"),o()),t&2){let e=s.$implicit;i(),m(E(2,1,e.chargeTimeType.value,"catalogs"))}}function qo(t,s){t&1&&(n(0,"th",23),a(1),r(2,"translate"),o()),t&2&&(i(),m(c(2,1,"labels.inputs.Due As Of")))}function zo(t,s){if(t&1&&(n(0,"td",24),a(1),r(2,"dateFormat"),o()),t&2){let e=s.$implicit;i(),m(c(2,1,e.dueDate))}}function Ho(t,s){t&1&&(n(0,"th",23),a(1),r(2,"translate"),o()),t&2&&(i(),m(c(2,1,"labels.inputs.Repeats On")))}function $o(t,s){if(t&1&&(n(0,"td",24),a(1),r(2,"dateFormat"),r(3,"translateKey"),o()),t&2){let e=s.$implicit;i(),u(" ",e.feeOnMonthDay?E(2,1,R(7,Fo).concat(e.feeOnMonthDay),"dd MMMM"):E(3,4,"Unassigned","inputs")," ")}}function Lo(t,s){t&1&&(n(0,"th",23),a(1),r(2,"translate"),o()),t&2&&(i(),m(c(2,1,"labels.inputs.Calculation Type")))}function Go(t,s){if(t&1&&(n(0,"td",24),a(1),r(2,"translateKey"),o()),t&2){let e=s.$implicit;i(),m(E(2,1,e.chargeCalculationType.value,"catalogs"))}}function Uo(t,s){t&1&&(n(0,"th",23),a(1),r(2,"translate"),o()),t&2&&(i(),m(c(2,1,"labels.inputs.Due")))}function jo(t,s){if(t&1&&(n(0,"td",24),a(1),r(2,"formatNumber"),o()),t&2){let e=s.$implicit;i(),T(" ",e.currency.displaySymbol,"\xA0",c(2,2,e.amount)," ")}}function Wo(t,s){t&1&&(n(0,"th",23),a(1),r(2,"translate"),o()),t&2&&(i(),m(c(2,1,"labels.inputs.Paid")))}function Ko(t,s){if(t&1&&(n(0,"td",24),a(1),r(2,"formatNumber"),o()),t&2){let e=s.$implicit;i(),T(" ",e.currency.displaySymbol,"\xA0",c(2,2,e.amountPaid)," ")}}function Qo(t,s){t&1&&(n(0,"th",23),a(1),r(2,"translate"),o()),t&2&&(i(),m(c(2,1,"labels.inputs.Waived")))}function Yo(t,s){if(t&1&&(n(0,"td",24),a(1),r(2,"formatNumber"),o()),t&2){let e=s.$implicit;i(),T(" ",e.currency.displaySymbol,"\xA0",c(2,2,e.amountWaived)," ")}}function Jo(t,s){t&1&&(n(0,"th",23),a(1),r(2,"translate"),o()),t&2&&(i(),m(c(2,1,"labels.inputs.Outstanding")))}function Xo(t,s){if(t&1&&(n(0,"td",24),a(1),r(2,"formatNumber"),o()),t&2){let e=s.$implicit;i(),T(" ",e.currency.displaySymbol,"\xA0",c(2,2,e.amountOutstanding)," ")}}function Zo(t,s){t&1&&(n(0,"th",23),a(1),r(2,"translate"),o()),t&2&&(i(),m(c(2,1,"labels.inputs.Actions")))}function ta(t,s){if(t&1){let e=F();n(0,"button",27),r(1,"translate"),M("click",function(p){S(e);let f=_(2).$implicit,D=_();return D.routeEdit(p),A(D.editCharge(f))}),g(2,"i",28),o()}t&2&&d("matTooltip",_t(c(1,2,"tooltips.Edit Charge")))}function ea(t,s){if(t&1){let e=F();n(0,"button",29),r(1,"translate"),M("click",function(p){S(e);let f=_(2).$implicit,D=_();return D.routeEdit(p),A(D.deleteCharge(f.id))}),g(2,"i",30),o()}t&2&&d("matTooltip",_t(c(1,2,"tooltips.Delete Charge")))}function ia(t,s){t&1&&(n(0,"span"),C(1,ta,3,4,"button",25)(2,ea,3,4,"button",26),o()),t&2&&(i(),d("mifosxHasPermission","UPDATE_SAVINGSACCOUNTCHARGE"),i(),d("mifosxHasPermission","DELETE_SAVINGSACCOUNTCHARGE"))}function na(t,s){if(t&1){let e=F();n(0,"button",27),r(1,"translate"),M("click",function(p){S(e);let f=_(2).$implicit,D=_();return D.routeEdit(p),A(D.payCharge(f.id))}),g(2,"i",32),o()}t&2&&d("matTooltip",_t(c(1,2,"tooltips.Pay Charge")))}function oa(t,s){if(t&1){let e=F();n(0,"button",27),r(1,"translate"),M("click",function(p){S(e);let f=_(2).$implicit,D=_();return D.routeEdit(p),A(D.waiveCharge(f.id))}),g(2,"i",33),o()}t&2&&d("matTooltip",_t(c(1,2,"tooltips.Waive Charge")))}function aa(t,s){if(t&1){let e=F();n(0,"button",27),r(1,"translate"),M("click",function(p){S(e);let f=_(3).$implicit,D=_();return D.routeEdit(p),A(D.inactivateCharge(f.id))}),g(2,"i",34),o()}t&2&&d("matTooltip",_t(c(1,2,"tooltips.Inactivate Charge")))}function ra(t,s){t&1&&C(0,aa,3,4,"button",25),t&2&&d("mifosxHasPermission","INACTIVATE_SAVINGSACCOUNTCHARGE")}function pa(t,s){if(t&1&&(n(0,"span"),C(1,na,3,4,"button",25)(2,oa,3,4,"button",25),h(3,ra,1,1,"button",31),o()),t&2){let e=_().$implicit,l=_();i(),d("mifosxHasPermission","PAY_SAVINGSACCOUNTCHARGE"),i(),d("mifosxHasPermission","WAIVE_SAVINGSACCOUNTCHARGE"),i(),v(l.isRecurringCharge(e)?3:-1)}}function ca(t,s){if(t&1&&(n(0,"td",24),h(1,ia,3,2,"span"),h(2,pa,4,3,"span"),o()),t&2){let e=s.$implicit,l=_();i(),v(l.fixedDepositsAccountData.status.value==="Submitted and pending approval"?1:-1),i(),v(l.fixedDepositsAccountData.status.value==="Active"&&e.amountOutstanding!==0?2:-1)}}function sa(t,s){t&1&&g(0,"tr",35)}function la(t,s){t&1&&g(0,"tr",36)}var li=(()=>{class t{constructor(){this.savingsService=x($t),this.route=x(N),this.dateUtils=x(et),this.router=x(W),this.dialog=x(Ut),this.settingsService=x(U),this.showInactiveCharges=!1,this.displayedColumns=["name","feeOrPenalty","paymentDueAt","dueAsOf","repeatsOn","calculationType","due","paid","waived","outstanding","actions"],this.route.parent.data.subscribe(e=>{this.fixedDepositsAccountData=e.fixedDepositsAccountData,this.chargesData=this.fixedDepositsAccountData.charges})}ngOnInit(){let e=this.chargesData?this.chargesData.filter(l=>l.isActive):[];this.dataSource=new ve(e)}toggleCharges(){if(this.showInactiveCharges=!this.showInactiveCharges,this.showInactiveCharges){let e=this.chargesData.filter(l=>!l.isActive);this.dataSource.data=e}else{let e=this.chargesData.filter(l=>l.isActive);this.dataSource.data=e}this.chargesTableRef.renderRows()}payCharge(e){let l=[new Ne({controlName:"amount",label:"Amount",value:"",type:"number",required:!0}),new ti({controlName:"dueDate",label:"Payment Date",value:"",type:"date",required:!0})],p={title:`Pay Charge ${e}`,layout:{addButtonText:"Confirm"},formfields:l};this.dialog.open(he,{data:p}).afterClosed().subscribe(D=>{if(D.data){let q=this.settingsService.language.code,re=this.settingsService.dateFormat,pe=X(H({},D.data.value),{dueDate:this.dateUtils.formatDate(D.data.value.dueDate,re),dateFormat:re,locale:q});this.savingsService.executeSavingsAccountChargesCommand(this.fixedDepositsAccountData.id,"paycharge",pe,e).subscribe(()=>{this.reload()})}})}waiveCharge(e){this.dialog.open(ci,{data:{id:e}}).afterClosed().subscribe(p=>{p.confirm&&this.savingsService.executeSavingsAccountChargesCommand(this.fixedDepositsAccountData.id,"waive",{},e).subscribe(()=>{this.reload()})})}inactivateCharge(e){this.dialog.open(si,{data:{id:e}}).afterClosed().subscribe(p=>{p.confirm&&this.savingsService.executeSavingsAccountChargesCommand(this.fixedDepositsAccountData.id,"inactivate",{},e).subscribe(()=>{this.reload()})})}editCharge(e){let l=[new Ne({controlName:"amount",label:"Amount",value:e.amount||e.amountOrPercentage,type:"number",required:!0})],p={title:`Edit Charge ${e.id}`,layout:{addButtonText:"Confirm"},formfields:l};this.dialog.open(he,{data:p}).afterClosed().subscribe(D=>{if(D.data){let q=this.settingsService.language.code,re=this.settingsService.dateFormat,pe=X(H({},D.data.value),{dateFormat:re,locale:q});this.savingsService.editSavingsAccountCharge(this.fixedDepositsAccountData.id,pe,e.id).subscribe(()=>{this.reload()})}})}deleteCharge(e){this.dialog.open(ke,{data:{deleteContext:`charge id:${e}`}}).afterClosed().subscribe(p=>{p.delete&&this.savingsService.deleteSavingsAccountCharge(this.fixedDepositsAccountData.id,e).subscribe(()=>{this.reload()})})}isRecurringCharge(e){return e.chargeTimeType.value==="Monthly Fee"||e.chargeTimeType.value==="Annual Fee"||e.chargeTimeType.value==="Weekly Fee"}routeEdit(e){e.stopPropagation()}reload(){let e=this.fixedDepositsAccountData.clientId,l=this.router.url;this.router.navigateByUrl(`/clients/${e}/fixed-deposits-accounts`,{skipLocationChange:!0}).then(()=>this.router.navigate([l]))}static{this.\u0275fac=function(l){return new(l||t)}}static{this.\u0275cmp=O({type:t,selectors:[["mifosx-charges-tab"]],viewQuery:function(l,p){if(l&1&&ht(Io,7),l&2){let f;vt(f=Dt())&&(p.chargesTableRef=f.first)}},decls:45,vars:7,consts:[["chargesTable",""],[1,"tab-container","mat-typography"],[1,"layout-row","align-start"],[1,"m-b-10"],[1,"action-button","m-b-20"],[1,"mat-elevation-z1","m-b-25"],["mat-table","",3,"dataSource"],["matColumnDef","name"],["mat-header-cell","",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","feeOrPenalty"],["matColumnDef","paymentDueAt"],["matColumnDef","dueAsOf"],["matColumnDef","repeatsOn"],["matColumnDef","calculationType"],["matColumnDef","due"],["matColumnDef","paid"],["matColumnDef","waived"],["matColumnDef","outstanding"],["matColumnDef","actions"],["mat-header-row","",4,"matHeaderRowDef"],["mat-row","",4,"matRowDef","matRowDefColumns"],["mat-raised-button","","color","primary",3,"click"],["mat-header-cell",""],["mat-cell",""],["class","account-action-button","mat-raised-button","","color","primary",3,"matTooltip","click",4,"mifosxHasPermission"],["class","account-action-button","mat-raised-button","","color","warn",3,"matTooltip","click",4,"mifosxHasPermission"],["mat-raised-button","","color","primary",1,"account-action-button",3,"click","matTooltip"],[1,"fa","fa-pencil"],["mat-raised-button","","color","warn",1,"account-action-button",3,"click","matTooltip"],[1,"fa","fa-trash"],["mat-raised-button","","color","primary",1,"account-action-button",3,"matTooltip"],[1,"fa","fa-dollar"],[1,"fa","fa-flag"],[1,"fa","fa-ban"],["mat-header-row",""],["mat-row",""]],template:function(l,p){l&1&&(n(0,"div",1)(1,"div",2)(2,"div",3)(3,"h3"),a(4),r(5,"translate"),o()(),h(6,wo,3,1,"div",4),o(),n(7,"div",5)(8,"table",6,0),b(10,7),C(11,Eo,3,3,"th",8)(12,Bo,2,1,"td",9),P(),b(13,10),C(14,ko,3,3,"th",8)(15,Ro,4,7,"td",9),P(),b(16,11),C(17,No,3,3,"th",8)(18,Vo,3,4,"td",9),P(),b(19,12),C(20,qo,3,3,"th",8)(21,zo,3,3,"td",9),P(),b(22,13),C(23,Ho,3,3,"th",8)(24,$o,4,8,"td",9),P(),b(25,14),C(26,Lo,3,3,"th",8)(27,Go,3,4,"td",9),P(),b(28,15),C(29,Uo,3,3,"th",8)(30,jo,3,4,"td",9),P(),b(31,16),C(32,Wo,3,3,"th",8)(33,Ko,3,4,"td",9),P(),b(34,17),C(35,Qo,3,3,"th",8)(36,Yo,3,4,"td",9),P(),b(37,18),C(38,Jo,3,3,"th",8)(39,Xo,3,4,"td",9),P(),b(40,19),C(41,Zo,3,3,"th",8)(42,ca,3,2,"td",9),P(),C(43,sa,1,0,"tr",20)(44,la,1,0,"tr",21),o()()()),l&2&&(i(4),m(c(5,5,"labels.heading.All Charges")),i(2),v(p.chargesData?6:-1),i(2),d("dataSource",p.dataSource),i(35),d("matHeaderRowDef",p.displayedColumns),i(),d("matRowDefColumns",p.displayedColumns))},dependencies:[y,I,B,de,wt,kt,Bt,Rt,Et,Nt,me,Vt,zt,qt,Ht,yt,w,It,ue],styles:[".tab-container[_ngcontent-%COMP%]{padding:1%;margin:1%}.tab-container[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{margin:1% auto}.tab-container[_ngcontent-%COMP%] .action-button[_ngcontent-%COMP%]{margin-left:auto}.tab-container[_ngcontent-%COMP%] table[_ngcontent-%COMP%]{width:100%}.tab-container[_ngcontent-%COMP%] table[_ngcontent-%COMP%] .account-action-button[_ngcontent-%COMP%]{min-width:26px;padding:0 6px;margin:4px;line-height:25px}"]})}}return t})();var ma=["instructionsTable"];function da(t,s){t&1&&(n(0,"th",16),a(1),r(2,"translate"),o()),t&2&&(i(),m(c(2,1,"labels.inputs.Client")))}function ua(t,s){if(t&1&&(n(0,"td",17),a(1),o()),t&2){let e=s.$implicit;i(),T(" ",e.fromClient.displayName,"-",e.fromClient.id," ")}}function fa(t,s){t&1&&(n(0,"th",16),a(1),r(2,"translate"),o()),t&2&&(i(),m(c(2,1,"labels.inputs.From Account")))}function ga(t,s){if(t&1&&(n(0,"td",17),a(1),o()),t&2){let e=s.$implicit;i(),T(" ",e.fromAccount.accountNo," (",e.fromAccountType.value,") ")}}function xa(t,s){t&1&&(n(0,"th",16),a(1),r(2,"translate"),o()),t&2&&(i(),m(c(2,1,"labels.inputs.Beneficiary")))}function Ca(t,s){if(t&1&&(n(0,"td",17),a(1),o()),t&2){let e=s.$implicit;i(),m(e.toClient.displayName)}}function _a(t,s){t&1&&(n(0,"th",16),a(1),r(2,"translate"),o()),t&2&&(i(),m(c(2,1,"labels.inputs.To Account")))}function ha(t,s){if(t&1&&(n(0,"td",17),a(1),o()),t&2){let e=s.$implicit;i(),T(" ",e.toAccount.accountNo," (",e.toAccountType.value,") ")}}function va(t,s){t&1&&(n(0,"th",16),a(1),r(2,"translate"),o()),t&2&&(i(),m(c(2,1,"labels.inputs.Amount")))}function Da(t,s){if(t&1&&(n(0,"td",17),a(1),o()),t&2){let e=s.$implicit;i(),T("",e.instructionType.value,"/",e.amount)}}function ba(t,s){t&1&&(n(0,"th",16),a(1),r(2,"translate"),o()),t&2&&(i(),m(c(2,1,"labels.inputs.Validity")))}function Pa(t,s){if(t&1&&(n(0,"td",17),a(1),r(2,"dateFormat"),r(3,"dateFormat"),o()),t&2){let e=s.$implicit;i(),T(" ",c(2,2,e.validFrom)," to ",c(3,4,e.validTill)," ")}}function Ma(t,s){t&1&&(n(0,"th",16),a(1),r(2,"translate"),o()),t&2&&(i(),m(c(2,1,"labels.inputs.Actions")))}function Ta(t,s){t&1&&(n(0,"button",19),r(1,"translate"),g(2,"i",20),o()),t&2&&d("matTooltip",_t(c(1,2,"tooltips.Edit Standing Instruction")))}function Sa(t,s){t&1&&(n(0,"span"),C(1,Ta,3,4,"button",18),o()),t&2&&(i(),d("mifosxHasPermission","UPDATE_STANDINGINSTRUCTION"))}function Aa(t,s){if(t&1){let e=F();n(0,"button",22),r(1,"translate"),M("click",function(){S(e);let p=_(2).$implicit,f=_();return A(f.deleteStandingInstruction(p.id))}),g(2,"i",23),o()}t&2&&d("matTooltip",_t(c(1,2,"tooltips.Delete Standing Instruction")))}function Oa(t,s){t&1&&(n(0,"span"),C(1,Aa,3,4,"button",21),o()),t&2&&(i(),d("mifosxHasPermission","DELETE_STANDINGINSTRUCTION"))}function ya(t,s){t&1&&(n(0,"button",19),r(1,"translate"),g(2,"i",24),o()),t&2&&d("matTooltip",_t(c(1,2,"tooltips.View Standing Instruction")))}function Ia(t,s){if(t&1&&(n(0,"td",17),h(1,Sa,2,1,"span"),h(2,Oa,2,1,"span"),C(3,ya,3,4,"button",18),o()),t&2){let e=s.$implicit;i(),v(e.status.value!=="Deleted"?1:-1),i(),v(e.status.value!=="Deleted"?2:-1),i(),d("mifosxHasPermission","READ_STANDINGINSTRUCTION")}}function Fa(t,s){t&1&&g(0,"tr",25)}function wa(t,s){t&1&&g(0,"tr",26)}var mi=(()=>{class t{constructor(){this.route=x(N),this.fixedDepositsService=x(j),this.dialog=x(Ut),this.accountTransfersService=x(cn),this.settingsService=x(U),this.dataSource=new ve,this.displayedColumns=["client","fromAccount","beneficiary","toAccount","amount","validity","actions"],this.route.parent.data.subscribe(e=>{this.fixedDepositsData=e.fixedDepositsAccountData})}ngOnInit(){this.getStandingInstructions()}getStandingInstructions(){let e=this.fixedDepositsData.clientId,l=this.fixedDepositsData.clientName,p=this.fixedDepositsData.id,f=this.settingsService.language.code,D=this.settingsService.dateFormat;this.fixedDepositsService.getStandingInstructions(e,l,p,f,D).subscribe(q=>{this.instructionsData=q.pageItems,this.dataSource.data=this.instructionsData,this.instructionTableRef.renderRows()})}deleteStandingInstruction(e){this.dialog.open(ke,{data:{deleteContext:`standing instruction id: ${e}`}}).afterClosed().subscribe(p=>{p.delete&&this.accountTransfersService.deleteStandingInstrucions(e).subscribe(()=>{})})}static{this.\u0275fac=function(l){return new(l||t)}}static{this.\u0275cmp=O({type:t,selectors:[["mifosx-standing-instructions-tab"]],viewQuery:function(l,p){if(l&1&&ht(ma,7),l&2){let f;vt(f=Dt())&&(p.instructionTableRef=f.first)}},decls:31,vars:6,consts:[["instructionsTable",""],[1,"tab-container","mat-typography"],[1,"m-b-10"],[1,"mat-elevation-z1","m-b-25"],["mat-table","",3,"dataSource"],["matColumnDef","client"],["mat-header-cell","",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","fromAccount"],["matColumnDef","beneficiary"],["matColumnDef","toAccount"],["matColumnDef","amount"],["matColumnDef","validity"],["matColumnDef","actions"],["mat-header-row","",4,"matHeaderRowDef"],["mat-row","",4,"matRowDef","matRowDefColumns"],["mat-header-cell",""],["mat-cell",""],["class","account-action-button","mat-raised-button","","color","primary",3,"matTooltip",4,"mifosxHasPermission"],["mat-raised-button","","color","primary",1,"account-action-button",3,"matTooltip"],[1,"fa","fa-edit"],["class","account-action-button","mat-raised-button","","color","warn",3,"matTooltip","click",4,"mifosxHasPermission"],["mat-raised-button","","color","warn",1,"account-action-button",3,"click","matTooltip"],[1,"fa","fa-times"],[1,"fa","fa-eye"],["mat-header-row",""],["mat-row",""]],template:function(l,p){l&1&&(n(0,"div",1)(1,"div",2)(2,"h3"),a(3),r(4,"translate"),o()(),n(5,"div",3)(6,"table",4,0),b(8,5),C(9,da,3,3,"th",6)(10,ua,2,2,"td",7),P(),b(11,8),C(12,fa,3,3,"th",6)(13,ga,2,2,"td",7),P(),b(14,9),C(15,xa,3,3,"th",6)(16,Ca,2,1,"td",7),P(),b(17,10),C(18,_a,3,3,"th",6)(19,ha,2,2,"td",7),P(),b(20,11),C(21,va,3,3,"th",6)(22,Da,2,2,"td",7),P(),b(23,12),C(24,ba,3,3,"th",6)(25,Pa,4,6,"td",7),P(),b(26,13),C(27,Ma,3,3,"th",6)(28,Ia,4,3,"td",7),P(),C(29,Fa,1,0,"tr",14)(30,wa,1,0,"tr",15),o()()()),l&2&&(i(3),m(c(4,4,"labels.heading.All Standing Instructions")),i(3),d("dataSource",p.dataSource),i(23),d("matHeaderRowDef",p.displayedColumns),i(),d("matRowDefColumns",p.displayedColumns))},dependencies:[y,I,B,de,wt,kt,Bt,Rt,Et,Nt,me,Vt,zt,qt,Ht,yt,w],styles:[".tab-container[_ngcontent-%COMP%]{padding:1%;margin:1%}.tab-container[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{margin:1% auto}.tab-container[_ngcontent-%COMP%] .action-button[_ngcontent-%COMP%]{margin-left:auto}.tab-container[_ngcontent-%COMP%] table[_ngcontent-%COMP%]{width:100%}.tab-container[_ngcontent-%COMP%] table[_ngcontent-%COMP%] .account-action-button[_ngcontent-%COMP%]{min-width:26px;padding:0 6px;margin:4px;line-height:25px}"]})}}return t})();var di=(()=>{class t{constructor(){this.route=x(N),this.entityId=this.route.parent.parent.snapshot.paramMap.get("fixedDepositAccountId"),this.route.data.subscribe(e=>{this.entityDatatable=e.savingsDatatable,this.multiRowDatatableFlag=this.entityDatatable.columnHeaders[0].columnName==="id"})}static{this.\u0275fac=function(l){return new(l||t)}}static{this.\u0275cmp=O({type:t,selectors:[["mifosx-datatable-tabs"]],decls:2,vars:3,consts:[[1,"tab-container","mat-typography"],["entityType","Fixed Deposit",3,"entityId","multiRowDatatableFlag","entityDatatable"]],template:function(l,p){l&1&&(n(0,"div",0),g(1,"mifosx-entity-datatable-tab",1),o()),l&2&&(i(),d("entityId",p.entityId)("multiRowDatatableFlag",p.multiRowDatatableFlag)("entityDatatable",p.entityDatatable))},dependencies:[y,I,on],encapsulation:2})}}return t})();var Ea=()=>["../../"];function Ba(t,s){t&1&&(n(0,"mat-error"),a(1),r(2,"translate"),r(3,"translate"),n(4,"strong"),a(5),r(6,"translate"),o()()),t&2&&(i(),T(" ",c(2,3,"labels.inputs.Approved On Date")," ",c(3,5,"labels.commons.is")," "),i(4),m(c(6,7,"labels.commons.required")))}var ui=(()=>{class t{constructor(){this.formBuilder=x(mt),this.fixedDepositsService=x(j),this.dateUtils=x(et),this.route=x(N),this.router=x(W),this.settingsService=x(U),this.minDate=new Date(2e3,0,1),this.maxDate=new Date,this.accountId=this.route.parent.snapshot.params.fixedDepositAccountId}ngOnInit(){this.maxDate=this.settingsService.businessDate,this.createApproveFixedDepositsAccountForm()}createApproveFixedDepositsAccountForm(){this.approveFixedDepositsAccountForm=this.formBuilder.group({approvedOnDate:["",V.required],note:[""]})}submit(){let e=this.approveFixedDepositsAccountForm.value,l=this.settingsService.language.code,p=this.settingsService.dateFormat,f=this.approveFixedDepositsAccountForm.value.approvedOnDate;e.approvedOnDate instanceof Date&&(e.approvedOnDate=this.dateUtils.formatDate(f,p));let D=X(H({},e),{dateFormat:p,locale:l});this.fixedDepositsService.executeFixedDepositsAccountCommand(this.accountId,"approve",D).subscribe(()=>{this.router.navigate(["../../"],{relativeTo:this.route})})}static{this.\u0275fac=function(l){return new(l||t)}}static{this.\u0275cmp=O({type:t,selectors:[["mifosx-approve-fixed-deposits-account"]],decls:26,vars:21,consts:[["approvedOnDatePicker",""],[1,"container"],[3,"ngSubmit","formGroup"],[1,"layout-column"],[3,"click"],["matInput","","required","","formControlName","approvedOnDate",3,"min","max","matDatepicker"],["matSuffix","",3,"for"],["matInput","","formControlName","note","cdkTextareaAutosize","","cdkAutosizeMinRows","2"],[1,"layout-row","align-center","gap-5px","responsive-column"],["type","button","mat-raised-button","",3,"routerLink"],["mat-raised-button","","color","primary",3,"disabled"]],template:function(l,p){if(l&1){let f=F();n(0,"div",1)(1,"mat-card")(2,"form",2),M("ngSubmit",function(){return S(f),A(p.submit())}),n(3,"mat-card-content")(4,"div",3)(5,"mat-form-field",4),M("click",function(){S(f);let q=k(12);return A(q.open())}),n(6,"mat-label"),a(7),r(8,"translate"),o(),g(9,"input",5)(10,"mat-datepicker-toggle",6)(11,"mat-datepicker",null,0),h(13,Ba,7,9,"mat-error"),o(),n(14,"mat-form-field")(15,"mat-label"),a(16),r(17,"translate"),o(),g(18,"textarea",7),o()()(),n(19,"mat-card-actions",8)(20,"button",9),a(21),r(22,"translate"),o(),n(23,"button",10),a(24),r(25,"translate"),o()()()()()}if(l&2){let f=k(12);i(2),d("formGroup",p.approveFixedDepositsAccountForm),i(5),m(c(8,12,"labels.inputs.Approved On Date")),i(2),d("min",p.minDate)("max",p.maxDate)("matDatepicker",f),i(),d("for",f),i(3),v(p.approveFixedDepositsAccountForm.controls.approvedOnDate.hasError("required")?13:-1),i(3),m(c(17,14,"labels.inputs.Note")),i(4),d("routerLink",R(20,Ea)),i(),u(" ",c(22,16,"labels.buttons.Cancel")," "),i(2),d("disabled",!p.approveFixedDepositsAccountForm),i(),u(" ",c(25,18,"labels.buttons.Confirm")," ")}},dependencies:[y,I,ct,rt,it,pt,gt,st,lt,tt,Y,xt,bt,ot,nt,Ct,Pt,dt,Tt,St,Mt,B,Ft,w],styles:[".container[_ngcontent-%COMP%]{max-width:37rem}"]})}}return t})();var ka=()=>["../../"];function Ra(t,s){t&1&&(n(0,"mat-error"),a(1),r(2,"translate"),r(3,"translate"),n(4,"strong"),a(5),r(6,"translate"),o()()),t&2&&(i(),T(" ",c(2,3,"labels.inputs.Rejected On Date")," ",c(3,5,"labels.commons.is")," "),i(4),m(c(6,7,"labels.commons.required")))}var fi=(()=>{class t{constructor(){this.formBuilder=x(mt),this.fixedDepositsService=x(j),this.dateUtils=x(et),this.route=x(N),this.router=x(W),this.settingsService=x(U),this.minDate=new Date(2e3,0,1),this.maxDate=new Date,this.accountId=this.route.parent.snapshot.params.fixedDepositAccountId}ngOnInit(){this.maxDate=this.settingsService.businessDate,this.createRejectFixedDepositsAccountForm()}createRejectFixedDepositsAccountForm(){this.rejectFixedDepositsAccountForm=this.formBuilder.group({rejectedOnDate:["",V.required],note:[""]})}submit(){let e=this.rejectFixedDepositsAccountForm.value,l=this.settingsService.language.code,p=this.settingsService.dateFormat,f=this.rejectFixedDepositsAccountForm.value.rejectedOnDate;e.rejectedOnDate instanceof Date&&(e.rejectedOnDate=this.dateUtils.formatDate(f,p));let D=X(H({},e),{dateFormat:p,locale:l});this.fixedDepositsService.executeFixedDepositsAccountCommand(this.accountId,"reject",D).subscribe(()=>{this.router.navigate(["../../"],{relativeTo:this.route})})}static{this.\u0275fac=function(l){return new(l||t)}}static{this.\u0275cmp=O({type:t,selectors:[["mifosx-reject-fixed-deposits-account"]],decls:26,vars:21,consts:[["rejectedOnDatePicker",""],[1,"container"],[3,"ngSubmit","formGroup"],[1,"layout-column"],[3,"click"],["matInput","","required","","formControlName","rejectedOnDate",3,"min","max","matDatepicker"],["matSuffix","",3,"for"],["matInput","","formControlName","note","cdkTextareaAutosize","","cdkAutosizeMinRows","2"],[1,"layout-row","align-center","gap-5px","responsive-column"],["type","button","mat-raised-button","",3,"routerLink"],["mat-raised-button","","color","warn",3,"disabled"]],template:function(l,p){if(l&1){let f=F();n(0,"div",1)(1,"mat-card")(2,"form",2),M("ngSubmit",function(){return S(f),A(p.submit())}),n(3,"mat-card-content")(4,"div",3)(5,"mat-form-field",4),M("click",function(){S(f);let q=k(12);return A(q.open())}),n(6,"mat-label"),a(7),r(8,"translate"),o(),g(9,"input",5)(10,"mat-datepicker-toggle",6)(11,"mat-datepicker",null,0),h(13,Ra,7,9,"mat-error"),o(),n(14,"mat-form-field")(15,"mat-label"),a(16),r(17,"translate"),o(),g(18,"textarea",7),o()()(),n(19,"mat-card-actions",8)(20,"button",9),a(21),r(22,"translate"),o(),n(23,"button",10),a(24),r(25,"translate"),o()()()()()}if(l&2){let f=k(12);i(2),d("formGroup",p.rejectFixedDepositsAccountForm),i(5),m(c(8,12,"labels.inputs.Rejected On Date")),i(2),d("min",p.minDate)("max",p.maxDate)("matDatepicker",f),i(),d("for",f),i(3),v(p.rejectFixedDepositsAccountForm.controls.rejectedOnDate.hasError("required")?13:-1),i(3),m(c(17,14,"labels.inputs.Note")),i(4),d("routerLink",R(20,ka)),i(),u(" ",c(22,16,"labels.buttons.Cancel")," "),i(2),d("disabled",!p.rejectFixedDepositsAccountForm.valid),i(),u(" ",c(25,18,"labels.buttons.Confirm")," ")}},dependencies:[y,I,ct,rt,it,pt,gt,st,lt,tt,Y,xt,bt,ot,nt,Ct,Pt,dt,Tt,St,Mt,B,Ft,w],styles:[".container[_ngcontent-%COMP%]{max-width:37rem}"]})}}return t})();var Na=()=>["../../"];function Va(t,s){t&1&&(n(0,"mat-error"),a(1),r(2,"translate"),r(3,"translate"),n(4,"strong"),a(5),r(6,"translate"),o()()),t&2&&(i(),T(" ",c(2,3,"labels.inputs.Activated On Date")," ",c(3,5,"labels.commons.is")," "),i(4),m(c(6,7,"labels.commons.required")))}var gi=(()=>{class t{constructor(){this.formBuilder=x(mt),this.savingsService=x($t),this.dateUtils=x(et),this.route=x(N),this.router=x(W),this.settingsService=x(U),this.minDate=new Date(2e3,0,1),this.maxDate=new Date,this.accountId=this.route.parent.snapshot.params.fixedDepositAccountId}ngOnInit(){this.maxDate=this.settingsService.businessDate,this.createActivateFixedDepositsAccountForm()}createActivateFixedDepositsAccountForm(){this.activateFixedDepositsAccountForm=this.formBuilder.group({activatedOnDate:["",V.required]})}submit(){let e=this.activateFixedDepositsAccountForm.value,l=this.settingsService.language.code,p=this.settingsService.dateFormat,f=this.activateFixedDepositsAccountForm.value.activatedOnDate;e.activatedOnDate instanceof Date&&(e.activatedOnDate=this.dateUtils.formatDate(f,p));let D=X(H({},e),{dateFormat:p,locale:l});this.savingsService.executeSavingsAccountCommand(this.accountId,"activate",D).subscribe(()=>{this.router.navigate(["../../"],{relativeTo:this.route})})}static{this.\u0275fac=function(l){return new(l||t)}}static{this.\u0275cmp=O({type:t,selectors:[["mifosx-activate-fixed-deposits-account"]],decls:20,vars:18,consts:[["activatedOnDatePicker",""],[1,"container"],[3,"ngSubmit","formGroup"],[1,"flex-100",3,"click"],["matInput","","required","","formControlName","activatedOnDate",3,"min","max","matDatepicker"],["matSuffix","",3,"for"],[1,"layout-row","align-center","gap-5px","responsive-column"],["type","button","mat-raised-button","",3,"routerLink"],["mat-raised-button","","color","primary",3,"disabled"]],template:function(l,p){if(l&1){let f=F();n(0,"div",1)(1,"mat-card")(2,"form",2),M("ngSubmit",function(){return S(f),A(p.submit())}),n(3,"mat-card-content")(4,"mat-form-field",3),M("click",function(){S(f);let q=k(11);return A(q.open())}),n(5,"mat-label"),a(6),r(7,"translate"),o(),g(8,"input",4)(9,"mat-datepicker-toggle",5)(10,"mat-datepicker",null,0),h(12,Va,7,9,"mat-error"),o()(),n(13,"mat-card-actions",6)(14,"button",7),a(15),r(16,"translate"),o(),n(17,"button",8),a(18),r(19,"translate"),o()()()()()}if(l&2){let f=k(11);i(2),d("formGroup",p.activateFixedDepositsAccountForm),i(4),m(c(7,11,"labels.inputs.Activated On Date")),i(2),d("min",p.minDate)("max",p.maxDate)("matDatepicker",f),i(),d("for",f),i(3),v(p.activateFixedDepositsAccountForm.controls.activatedOnDate.hasError("required")?12:-1),i(2),d("routerLink",R(17,Na)),i(),u(" ",c(16,13,"labels.buttons.Cancel")," "),i(2),d("disabled",!p.activateFixedDepositsAccountForm.valid),i(),u(" ",c(19,15,"labels.buttons.Confirm")," ")}},dependencies:[y,I,ct,rt,it,pt,gt,st,lt,tt,Y,xt,bt,ot,nt,Ct,Pt,dt,Tt,St,Mt,B,w],styles:[".container[_ngcontent-%COMP%]{max-width:37rem}"]})}}return t})();var qa=()=>["../../"],xi=(()=>{class t{constructor(){this.formBuilder=x(mt),this.savingsService=x($t),this.fixedDepositsService=x(j),this.route=x(N),this.router=x(W),this.undoCommand="undoapproval",this.undoAction=this.route.snapshot.params.name,this.undoAction==="Undo Activation"&&(this.undoCommand="undoactivate"),this.accountId=this.route.parent.snapshot.params.fixedDepositAccountId}ngOnInit(){this.createUndoApprovalFixedDepositsAccountForm()}createUndoApprovalFixedDepositsAccountForm(){this.undoApprovalFixedDepositsAccountForm=this.formBuilder.group({note:[""]})}submit(){let e=H({},this.undoApprovalFixedDepositsAccountForm.value);this.undoAction==="Undo Activation"?this.fixedDepositsService.executeFixedDepositsAccountCommand(this.accountId,this.undoCommand,e).subscribe(()=>{this.router.navigate(["../../"],{relativeTo:this.route})}):this.savingsService.executeSavingsAccountCommand(this.accountId,this.undoCommand,e).subscribe(()=>{this.router.navigate(["../../"],{relativeTo:this.route})})}static{this.\u0275fac=function(l){return new(l||t)}}static{this.\u0275cmp=O({type:t,selectors:[["mifosx-undo-approval-fixed-deposits-account"]],decls:16,vars:13,consts:[[1,"container"],[3,"ngSubmit","formGroup"],[1,"flex-100"],["matInput","","formControlName","note","cdkTextareaAutosize","","cdkAutosizeMinRows","2"],[1,"layout-row","align-center","gap-5px","responsive-column"],["type","button","mat-raised-button","",3,"routerLink"],["mat-raised-button","","color","warn",3,"disabled"]],template:function(l,p){l&1&&(n(0,"div",0)(1,"mat-card")(2,"form",1),M("ngSubmit",function(){return p.submit()}),n(3,"mat-card-content")(4,"mat-form-field",2)(5,"mat-label"),a(6),r(7,"translate"),o(),g(8,"textarea",3),o()(),n(9,"mat-card-actions",4)(10,"button",5),a(11),r(12,"translate"),o(),n(13,"button",6),a(14),r(15,"translate"),o()()()()()),l&2&&(i(2),d("formGroup",p.undoApprovalFixedDepositsAccountForm),i(4),m(c(7,6,"labels.inputs.Note")),i(4),d("routerLink",R(12,qa)),i(),u(" ",c(12,8,"labels.buttons.Cancel")," "),i(2),d("disabled",!p.undoApprovalFixedDepositsAccountForm.valid),i(),u(" ",c(15,10,"labels.buttons.Confirm")," "))},dependencies:[y,I,ct,rt,it,pt,st,lt,tt,Y,xt,bt,ot,nt,dt,B,Ft,w],styles:[".container[_ngcontent-%COMP%]{max-width:37rem}"]})}}return t})();var za=()=>["../../"];function Ha(t,s){t&1&&(n(0,"mat-error"),a(1),r(2,"translate"),r(3,"translate"),n(4,"strong"),a(5),r(6,"translate"),o()()),t&2&&(i(),T(" ",c(2,3,"labels.inputs.Withdrawn On Date")," ",c(3,5,"labels.commons.is")," "),i(4),m(c(6,7,"labels.commons.required")))}var Ci=(()=>{class t{constructor(){this.formBuilder=x(mt),this.fixedDepositsService=x(j),this.dateUtils=x(et),this.route=x(N),this.router=x(W),this.settingsService=x(U),this.minDate=new Date(2e3,0,1),this.maxDate=new Date,this.accountId=this.route.parent.snapshot.params.fixedDepositAccountId}ngOnInit(){this.maxDate=this.settingsService.businessDate,this.createWithdrawFixedDepositsAccountForm()}createWithdrawFixedDepositsAccountForm(){this.withdrawFixedDepositsAccountForm=this.formBuilder.group({withdrawnOnDate:["",V.required],note:[""]})}submit(){let e=this.withdrawFixedDepositsAccountForm.value,l=this.settingsService.language.code,p=this.settingsService.dateFormat,f=this.withdrawFixedDepositsAccountForm.value.withdrawnOnDate;e.withdrawnOnDate instanceof Date&&(e.withdrawnOnDate=this.dateUtils.formatDate(f,p));let D=X(H({},e),{dateFormat:p,locale:l});this.fixedDepositsService.executeFixedDepositsAccountCommand(this.accountId,"withdrawnByApplicant",D).subscribe(()=>{this.router.navigate(["../../"],{relativeTo:this.route})})}static{this.\u0275fac=function(l){return new(l||t)}}static{this.\u0275cmp=O({type:t,selectors:[["mifosx-withdraw-by-client-fixed-deposits-account"]],decls:26,vars:21,consts:[["withdrawnOnDatePicker",""],[1,"container"],[3,"ngSubmit","formGroup"],[1,"layout-column"],[3,"click"],["matInput","","required","","formControlName","withdrawnOnDate",3,"min","max","matDatepicker"],["matSuffix","",3,"for"],["matInput","","formControlName","note","cdkTextareaAutosize","","cdkAutosizeMinRows","2"],[1,"layout-row","align-center","gap-5px","responsive-column"],["type","button","mat-raised-button","",3,"routerLink"],["mat-raised-button","","color","primary",3,"disabled"]],template:function(l,p){if(l&1){let f=F();n(0,"div",1)(1,"mat-card")(2,"form",2),M("ngSubmit",function(){return S(f),A(p.submit())}),n(3,"mat-card-content")(4,"div",3)(5,"mat-form-field",4),M("click",function(){S(f);let q=k(12);return A(q.open())}),n(6,"mat-label"),a(7),r(8,"translate"),o(),g(9,"input",5)(10,"mat-datepicker-toggle",6)(11,"mat-datepicker",null,0),h(13,Ha,7,9,"mat-error"),o(),n(14,"mat-form-field")(15,"mat-label"),a(16),r(17,"translate"),o(),g(18,"textarea",7),o()()(),n(19,"mat-card-actions",8)(20,"button",9),a(21),r(22,"translate"),o(),n(23,"button",10),a(24),r(25,"translate"),o()()()()()}if(l&2){let f=k(12);i(2),d("formGroup",p.withdrawFixedDepositsAccountForm),i(5),m(c(8,12,"labels.inputs.Withdrawn On Date")),i(2),d("min",p.minDate)("max",p.maxDate)("matDatepicker",f),i(),d("for",f),i(3),v(p.withdrawFixedDepositsAccountForm.controls.withdrawnOnDate.hasError("required")?13:-1),i(3),m(c(17,14,"labels.inputs.Note")),i(4),d("routerLink",R(20,za)),i(),u(" ",c(22,16,"labels.buttons.Cancel")," "),i(2),d("disabled",!p.withdrawFixedDepositsAccountForm.valid),i(),u(" ",c(25,18,"labels.buttons.Confirm")," ")}},dependencies:[y,I,ct,rt,it,pt,gt,st,lt,tt,Y,xt,bt,ot,nt,Ct,Pt,dt,Tt,St,Mt,B,Ft,w],styles:[".container[_ngcontent-%COMP%]{max-width:37rem}"]})}}return t})();var $a=()=>["../../"];function La(t,s){if(t&1&&(n(0,"mat-option",6),a(1),o()),t&2){let e=s.$implicit;d("value",e.id),i(),u(" ",e.name+" ("+e.currency.name+")"," ")}}function Ga(t,s){t&1&&(n(0,"mat-error"),a(1),r(2,"translate"),r(3,"translate"),n(4,"strong"),a(5),r(6,"translate"),o()()),t&2&&(i(),T(" ",c(2,3,"labels.inputs.Charge")," ",c(3,5,"labels.commons.is")," "),i(4),m(c(6,7,"labels.commons.required")))}function Ua(t,s){t&1&&(n(0,"mat-error"),a(1),r(2,"translate"),r(3,"translate"),n(4,"strong"),a(5),r(6,"translate"),o()()),t&2&&(i(),T(" ",c(2,3,"labels.inputs.Amount")," ",c(3,5,"labels.commons.is")," "),i(4),m(c(6,7,"labels.commons.required")))}function ja(t,s){if(t&1&&(n(0,"mat-option",6),a(1),o()),t&2){let e=s.$implicit;d("value",e.id),i(),u(" ",e.value," ")}}function Wa(t,s){if(t&1&&(n(0,"mat-option",6),a(1),o()),t&2){let e=s.$implicit;d("value",e.id),i(),u(" ",e.value," ")}}function Ka(t,s){t&1&&(n(0,"mat-error"),a(1),r(2,"translate"),r(3,"translate"),n(4,"strong"),a(5),r(6,"translate"),o()()),t&2&&(i(),T(" ",c(2,3,"labels.inputs.Due for collection on")," ",c(3,5,"labels.commons.is")," "),i(4),m(c(6,7,"labels.commons.required")))}function Qa(t,s){if(t&1){let e=F();n(0,"mat-form-field",13),M("click",function(){S(e);let p=k(7);return A(p.open())}),n(1,"mat-label"),a(2),r(3,"translate"),o(),g(4,"input",14)(5,"mat-datepicker-toggle",15)(6,"mat-datepicker",null,0),h(8,Ka,7,9,"mat-error"),o()}if(t&2){let e=k(7),l=_(2);i(2),m(c(3,6,"labels.inputs.Due for collection on")),i(2),d("min",l.minDate)("max",l.maxDate)("matDatepicker",e),i(),d("for",e),i(3),v(l.fixedDepositsChargeForm.controls.dueDate.hasError("required")?8:-1)}}function Ya(t,s){t&1&&(n(0,"mat-error"),a(1),r(2,"translate"),r(3,"translate"),n(4,"strong"),a(5),r(6,"translate"),o()()),t&2&&(i(),T(" ",c(2,3,"labels.inputs.Due Date")," ",c(3,5,"labels.commons.is")," "),i(4),m(c(6,7,"labels.commons.required")))}function Ja(t,s){if(t&1){let e=F();n(0,"mat-form-field",13),M("click",function(){S(e);let p=k(7);return A(p.open())}),n(1,"mat-label"),a(2),r(3,"translate"),o(),g(4,"input",16)(5,"mat-datepicker-toggle",15)(6,"mat-datepicker",null,1),h(8,Ya,7,9,"mat-error"),o()}if(t&2){let e=k(7),l=_(2);i(2),m(c(3,6,"labels.inputs.Due On")),i(2),d("min",l.minDate)("max",l.maxDate)("matDatepicker",e),i(),d("for",e),i(3),v(l.fixedDepositsChargeForm.controls.feeOnMonthDay.hasError("required")?8:-1)}}function Xa(t,s){t&1&&(n(0,"mat-form-field")(1,"mat-label"),a(2),r(3,"translate"),o(),g(4,"input",17),o()),t&2&&(i(2),m(c(3,1,"labels.inputs.Repeats Every")))}function Za(t,s){if(t&1&&(n(0,"div",4)(1,"mat-form-field")(2,"mat-label"),a(3),r(4,"translate"),o(),g(5,"input",10),h(6,Ua,7,9,"mat-error"),o(),n(7,"mat-form-field")(8,"mat-label"),a(9),r(10,"translate"),o(),n(11,"mat-select",11),L(12,ja,2,2,"mat-option",6,$),o()(),n(14,"mat-form-field")(15,"mat-label"),a(16),r(17,"translate"),o(),n(18,"mat-select",12),L(19,Wa,2,2,"mat-option",6,$),o()(),h(21,Qa,9,8,"mat-form-field"),h(22,Ja,9,8,"mat-form-field"),h(23,Xa,5,3,"mat-form-field"),o()),t&2){let e=_();i(3),m(c(4,7,"labels.inputs.Amount")),i(3),v(e.fixedDepositsChargeForm.controls.amount.hasError("required")?6:-1),i(3),m(c(10,9,"labels.inputs.Charge Calculation")),i(3),G(e.chargeDetails.chargeCalculationTypeOptions),i(4),m(c(17,11,"labels.inputs.Charge time type")),i(3),G(e.chargeDetails.chargeTimeTypeOptions),i(2),v(e.fixedDepositsChargeForm.contains("dueDate")?21:-1),i(),v(e.fixedDepositsChargeForm.contains("feeOnMonthDay")?22:-1),i(),v(e.fixedDepositsChargeForm.contains("feeInterval")?23:-1)}}var _i=(()=>{class t{constructor(){this.formBuilder=x(mt),this.route=x(N),this.router=x(W),this.dateUtils=x(et),this.savingsService=x($t),this.settingsService=x(U),this.minDate=new Date(2e3,0,1),this.maxDate=new Date,this.route.data.subscribe(e=>{this.savingsChargeOptions=e.fixedDepositsAccountActionData.chargeOptions}),this.fixedDepositAccountId=this.route.parent.snapshot.params.fixedDepositAccountId}ngOnInit(){this.maxDate=this.settingsService.businessDate,this.createFixedDepositsChargeForm(),this.buildDependencies()}buildDependencies(){this.fixedDepositsChargeForm.controls.chargeId.valueChanges.subscribe(e=>{this.savingsService.getChargeTemplate(e).subscribe(l=>{this.chargeDetails=l;let p=l.chargeTimeType.id;(l.chargeTimeType.value==="Withdrawal Fee"||l.chargeTimeType.value==="Saving No Activity Fee")&&(this.chargeDetails.dueDateNotRequired=!0),(l.chargeTimeType.value==="Annual Fee"||l.chargeTimeType.value==="Monthly Fee")&&(this.chargeDetails.chargeTimeTypeAnnualOrMonth=!0),!this.chargeDetails.dueDateNotRequired&&!this.chargeDetails.chargeTimeTypeAnnualOrMonth?this.fixedDepositsChargeForm.addControl("dueDate",new Z("",V.required)):this.fixedDepositsChargeForm.removeControl("dueDate"),!this.chargeDetails.dueDateNotRequired&&this.chargeDetails.chargeTimeTypeAnnualOrMonth?this.fixedDepositsChargeForm.addControl("feeOnMonthDay",new Z("",V.required)):this.fixedDepositsChargeForm.removeControl("feeOnMonthDay"),p.value==="Monthly Fee"?this.fixedDepositsChargeForm.addControl("feeInterval",new Z(l.feeInterval,V.required)):this.fixedDepositsChargeForm.removeControl("feeInterval"),this.fixedDepositsChargeForm.patchValue({amount:l.amount,chargeCalculationType:l.chargeCalculationType.id,chargeTimeType:l.chargeTimeType.id})})})}createFixedDepositsChargeForm(){this.fixedDepositsChargeForm=this.formBuilder.group({chargeId:["",V.required],amount:["",V.required],chargeCalculationType:[{value:"",disabled:!0}],chargeTimeType:[{value:"",disabled:!0}]})}submit(){let e=this.fixedDepositsChargeForm.value;if(e.locale=this.settingsService.language.code,e.feeInterval||(e.feeInterval=this.chargeDetails.feeInterval),this.chargeDetails.dueDateNotRequired!==!0)if(this.chargeDetails.chargeTimeTypeAnnualOrMonth===!0){let l="MMMM-dd";if(e.monthDayFormat=l,e.feeOnMonthDay){let p=this.fixedDepositsChargeForm.value.feeOnMonthDay;e.feeOnMonthDay=this.dateUtils.formatDate(p,l)}}else{let l=this.settingsService.dateFormat;if(e.dateFormat=l,e.dueDate){let p=this.fixedDepositsChargeForm.value.dueDate;e.dueDate=this.dateUtils.formatDate(p,l)}}this.savingsService.createSavingsCharge(this.fixedDepositAccountId,"charges",e).subscribe(()=>{this.router.navigate(["../../"],{relativeTo:this.route})})}static{this.\u0275fac=function(l){return new(l||t)}}static{this.\u0275cmp=O({type:t,selectors:[["mifosx-add-charge-fixed-deposits-account"]],decls:21,vars:15,consts:[["dueDatePicker",""],["feeOnMonthDayPicker",""],[1,"container"],[3,"ngSubmit","formGroup"],[1,"layout-column"],["required","","formControlName","chargeId"],[3,"value"],[1,"layout-row","layout-xs-column","layout-align-center","gap-5px"],["type","button","mat-raised-button","",3,"routerLink"],["mat-raised-button","","color","primary",3,"disabled"],["type","number","required","","matInput","","formControlName","amount"],["formControlName","chargeCalculationType"],["formControlName","chargeTimeType"],[3,"click"],["matInput","","required","","formControlName","dueDate",3,"min","max","matDatepicker"],["matSuffix","",3,"for"],["matInput","","required","","formControlName","feeOnMonthDay",3,"min","max","matDatepicker"],["matInput","","formControlName","feeInterval"]],template:function(l,p){l&1&&(n(0,"div",2)(1,"mat-card")(2,"form",3),M("ngSubmit",function(){return p.submit()}),n(3,"mat-card-content")(4,"div",4)(5,"mat-form-field")(6,"mat-label"),a(7),r(8,"translate"),o(),n(9,"mat-select",5),L(10,La,2,2,"mat-option",6,$),o(),h(12,Ga,7,9,"mat-error"),o(),h(13,Za,24,13,"div",4),o(),n(14,"mat-card-actions",7)(15,"button",8),a(16),r(17,"translate"),o(),n(18,"button",9),a(19),r(20,"translate"),o()()()()()()),l&2&&(i(2),d("formGroup",p.fixedDepositsChargeForm),i(5),m(c(8,8,"labels.inputs.Charge")),i(3),G(p.savingsChargeOptions),i(2),v(p.fixedDepositsChargeForm.controls.chargeId.hasError("required")?12:-1),i(),v(p.chargeDetails?13:-1),i(2),d("routerLink",R(14,$a)),i(),u(" ",c(17,10,"labels.buttons.Cancel")," "),i(2),d("disabled",!p.fixedDepositsChargeForm.valid),i(),u(" ",c(20,12,"labels.buttons.Submit")," "))},dependencies:[y,I,ct,rt,jt,it,pt,gt,st,lt,tt,Y,xt,bt,ot,nt,Ct,Pt,dt,Ot,At,Tt,St,Mt,B,w],styles:[".container[_ngcontent-%COMP%]{width:37rem}"]})}}return t})();var tr=()=>["../../"];function er(t,s){t&1&&(n(0,"mat-error"),a(1),r(2,"translate"),r(3,"translate"),n(4,"strong"),a(5),r(6,"translate"),o()()),t&2&&(i(),T(" ",c(2,3,"labels.inputs.Premature Close Date")," ",c(3,5,"labels.commons.is")," "),i(4),m(c(6,7,"labels.commons.required")))}function ir(t,s){t&1&&(n(0,"mat-form-field")(1,"mat-label"),a(2),r(3,"translate"),o(),g(4,"input",10),o()),t&2&&(i(2),m(c(3,1,"labels.inputs.Maturity Amount")))}function nr(t,s){if(t&1&&(n(0,"mat-option",12),a(1),o()),t&2){let e=s.$implicit;d("value",e.id),i(),u(" ",e.value," ")}}function or(t,s){t&1&&(n(0,"mat-error"),a(1),r(2,"translate"),r(3,"translate"),n(4,"strong"),a(5),r(6,"translate"),o()()),t&2&&(i(),T(" ",c(2,3,"labels.inputs.Account action")," ",c(3,5,"labels.commons.is")," "),i(4),m(c(6,7,"labels.commons.required")))}function ar(t,s){if(t&1&&(n(0,"mat-form-field")(1,"mat-label"),a(2),r(3,"translate"),o(),n(4,"mat-select",11),L(5,nr,2,2,"mat-option",12,$),o(),h(7,or,7,9,"mat-error"),o()),t&2){let e=_();i(2),m(c(3,2,"labels.inputs.Action")),i(3),G(e.onAccountClosureOptions),i(2),v(e.prematureCloseAccountForm.controls.onAccountClosureId.hasError("required")?7:-1)}}function rr(t,s){if(t&1&&(n(0,"mat-option",12),a(1),o()),t&2){let e=s.$implicit;d("value",e.id),i(),u(" ",e.accountNo," ")}}function pr(t,s){t&1&&(n(0,"mat-error"),a(1),r(2,"translate"),r(3,"translate"),n(4,"strong"),a(5),r(6,"translate"),o()()),t&2&&(i(),T(" ",c(2,3,"labels.inputs.Transfer to savings account")," ",c(3,5,"labels.commons.is")," "),i(4),m(c(6,7,"labels.commons.required")))}function cr(t,s){if(t&1&&(n(0,"mat-form-field")(1,"mat-label"),a(2),r(3,"translate"),o(),n(4,"mat-select",13),L(5,rr,2,2,"mat-option",12,$),o(),h(7,pr,7,9,"mat-error"),o()),t&2){let e=_();i(2),m(c(3,2,"labels.inputs.Transfer to Savings")),i(3),G(e.savingsAccountsData),i(2),v(e.prematureCloseAccountForm.controls.toSavingsAccountId.hasError("required")?7:-1)}}function sr(t,s){t&1&&(n(0,"mat-form-field")(1,"mat-label"),a(2),r(3,"translate"),o(),g(4,"input",14),o()),t&2&&(i(2),m(c(3,1,"labels.inputs.Transfer Description")))}function lr(t,s){t&1&&(n(0,"mat-form-field")(1,"mat-label"),a(2),r(3,"translate"),o(),g(4,"textarea",15),o()),t&2&&(i(2),m(c(3,1,"labels.inputs.Note")))}var hi=(()=>{class t{constructor(){this.formBuilder=x(mt),this.fixedDepositsService=x(j),this.dateUtils=x(et),this.route=x(N),this.router=x(W),this.settingsService=x(U),this.minDate=new Date(2e3,0,1),this.maxDate=new Date,this.isSubmitted=!1,this.accountId=this.route.parent.snapshot.params.fixedDepositAccountId}ngOnInit(){this.maxDate=this.settingsService.businessDate,this.createPrematureCloseAccountForm(),this.buildDependencies()}createPrematureCloseAccountForm(){this.prematureCloseAccountForm=this.formBuilder.group({closedOnDate:["",V.required]})}buildDependencies(){this.prematureCloseAccountForm.get("closedOnDate").valueChanges.subscribe(e=>{this.isSubmitted||this.calculatePrematureAmount(e)})}calculatePrematureAmount(e){let l=this.settingsService.language.code,p=this.settingsService.dateFormat,f={closedOnDate:this.dateUtils.formatDate(e,p),dateFormat:p,locale:l};this.fixedDepositsService.executeFixedDepositsAccountCommand(this.accountId,"calculatePrematureAmount",f).subscribe(D=>{this.savingsAccountsData=D.savingsAccounts,this.onAccountClosureOptions=D.onAccountClosureOptions,this.prematureCloseAccountForm.addControl("maturityAmount",new Z({value:"",disabled:!0})),this.prematureCloseAccountForm.addControl("onAccountClosureId",new Z("",V.required)),this.prematureCloseAccountForm.addControl("note",new Z("")),this.prematureCloseAccountForm.get("maturityAmount").patchValue(D.maturityAmount),this.addTransferDetails()})}addTransferDetails(){this.prematureCloseAccountForm.get("onAccountClosureId").valueChanges.subscribe(e=>{e===200?(this.prematureCloseAccountForm.addControl("toSavingsAccountId",new Z("",V.required)),this.prematureCloseAccountForm.addControl("transferDescription",new Z(""))):(this.prematureCloseAccountForm.removeControl("toSavingsAccountId"),this.prematureCloseAccountForm.removeControl("transferDescription"))})}submit(){let e=this.prematureCloseAccountForm.value;this.isSubmitted=!0;let l=this.settingsService.language.code,p=this.settingsService.dateFormat,f=this.prematureCloseAccountForm.value.closedOnDate;e.closedOnDate instanceof Date&&(e.closedOnDate=this.dateUtils.formatDate(f,p));let D=X(H({},e),{dateFormat:p,locale:l});this.fixedDepositsService.executeFixedDepositsAccountCommand(this.accountId,"prematureClose",D).subscribe(()=>{this.router.navigate(["../../"],{relativeTo:this.route})})}static{this.\u0275fac=function(l){return new(l||t)}}static{this.\u0275cmp=O({type:t,selectors:[["mifosx-premature-close-fixed-deposits-account"]],decls:26,vars:23,consts:[["closedOnDatePicker",""],[1,"container"],[3,"ngSubmit","formGroup"],[1,"layout-column"],[3,"click"],["matInput","","required","","formControlName","closedOnDate",3,"min","max","matDatepicker"],["matSuffix","",3,"for"],[1,"layout-row","align-center","gap-5px","responsive-column"],["type","button","mat-raised-button","",3,"routerLink"],["mat-raised-button","","color","warn",3,"disabled"],["type","number","matInput","","formControlName","maturityAmount"],["required","","formControlName","onAccountClosureId"],[3,"value"],["required","","formControlName","toSavingsAccountId"],["matInput","","formControlName","transferDescription"],["matInput","","formControlName","note","cdkTextareaAutosize","","cdkAutosizeMinRows","2"]],template:function(l,p){if(l&1){let f=F();n(0,"div",1)(1,"mat-card")(2,"form",2),M("ngSubmit",function(){return S(f),A(p.submit())}),n(3,"mat-card-content")(4,"div",3)(5,"mat-form-field",4),M("click",function(){S(f);let q=k(12);return A(q.open())}),n(6,"mat-label"),a(7),r(8,"translate"),o(),g(9,"input",5)(10,"mat-datepicker-toggle",6)(11,"mat-datepicker",null,0),h(13,er,7,9,"mat-error"),o(),h(14,ir,5,3,"mat-form-field"),h(15,ar,8,4,"mat-form-field"),h(16,cr,8,4,"mat-form-field"),h(17,sr,5,3,"mat-form-field"),h(18,lr,5,3,"mat-form-field"),o()(),n(19,"mat-card-actions",7)(20,"button",8),a(21),r(22,"translate"),o(),n(23,"button",9),a(24),r(25,"translate"),o()()()()()}if(l&2){let f=k(12);i(2),d("formGroup",p.prematureCloseAccountForm),i(5),m(c(8,16,"labels.inputs.Premature Close Date")),i(2),d("min",p.minDate)("max",p.maxDate)("matDatepicker",f),i(),d("for",f),i(3),v(p.prematureCloseAccountForm.controls.closedOnDate.hasError("required")?13:-1),i(),v(p.prematureCloseAccountForm.controls.maturityAmount?14:-1),i(),v(p.prematureCloseAccountForm.contains("onAccountClosureId")?15:-1),i(),v(p.prematureCloseAccountForm.contains("toSavingsAccountId")?16:-1),i(),v(p.prematureCloseAccountForm.contains("transferDescription")?17:-1),i(),v(p.prematureCloseAccountForm.contains("note")?18:-1),i(2),d("routerLink",R(22,tr)),i(),u(" ",c(22,18,"labels.buttons.Cancel")," "),i(2),d("disabled",!p.prematureCloseAccountForm.valid),i(),u(" ",c(25,20,"labels.buttons.Confirm")," ")}},dependencies:[y,I,ct,rt,jt,it,pt,gt,st,lt,tt,Y,xt,bt,ot,nt,Ct,Pt,dt,Ot,At,Tt,St,Mt,B,Ft,w],styles:[".container[_ngcontent-%COMP%]{max-width:37rem}"]})}}return t})();var mr=()=>["../../"];function dr(t,s){t&1&&(n(0,"mat-error"),a(1),r(2,"translate"),r(3,"translate"),n(4,"strong"),a(5),r(6,"translate"),o()()),t&2&&(i(),T(" ",c(2,3,"labels.inputs.Closed On Date")," ",c(3,5,"labels.commons.is")," "),i(4),m(c(6,7,"labels.commons.required")))}function ur(t,s){if(t&1&&(n(0,"mat-option",9),a(1),o()),t&2){let e=s.$implicit;d("value",e.id),i(),u(" ",e.value," ")}}function fr(t,s){t&1&&(n(0,"mat-error"),a(1),r(2,"translate"),r(3,"translate"),n(4,"strong"),a(5),r(6,"translate"),o()()),t&2&&(i(),T(" ",c(2,3,"labels.inputs.Account action")," ",c(3,5,"labels.commons.is")," "),i(4),m(c(6,7,"labels.commons.required")))}function gr(t,s){if(t&1&&(n(0,"mat-option",9),a(1),o()),t&2){let e=s.$implicit;d("value",e.id),i(),u(" ",e.accountNo," ")}}function xr(t,s){t&1&&(n(0,"mat-error"),a(1),r(2,"translate"),r(3,"translate"),n(4,"strong"),a(5),r(6,"translate"),o()()),t&2&&(i(),T(" ",c(2,3,"labels.inputs.Transfer to savings account")," ",c(3,5,"labels.commons.is")," "),i(4),m(c(6,7,"labels.commons.required")))}function Cr(t,s){if(t&1&&(n(0,"mat-form-field")(1,"mat-label"),a(2),r(3,"translate"),o(),n(4,"mat-select",14),L(5,gr,2,2,"mat-option",9,$),o(),h(7,xr,7,9,"mat-error"),o()),t&2){let e=_();i(2),m(c(3,2,"labels.inputs.Transfer to Savings")),i(3),G(e.savingsAccountsData),i(2),v(e.closeOnMaturityAccountForm.controls.toSavingsAccountId.hasError("required")?7:-1)}}function _r(t,s){t&1&&(n(0,"mat-form-field")(1,"mat-label"),a(2),r(3,"translate"),o(),g(4,"input",15),o()),t&2&&(i(2),m(c(3,1,"labels.inputs.Transfer Description")))}var vi=(()=>{class t{constructor(){this.formBuilder=x(mt),this.fixedDepositsService=x(j),this.dateUtils=x(et),this.route=x(N),this.router=x(W),this.settingsService=x(U),this.minDate=new Date(2e3,0,1),this.maxDate=new Date,this.route.data.subscribe(e=>{this.savingsAccountsData=e.fixedDepositsAccountActionData.savingsAccounts,this.onAccountClosureOptions=e.fixedDepositsAccountActionData.onAccountClosureOptions,this.maturityAmount=e.fixedDepositsAccountActionData.maturityAmount}),this.accountId=this.route.parent.snapshot.params.fixedDepositAccountId}ngOnInit(){this.maxDate=this.settingsService.businessDate,this.createCloseOnMaturityAccountForm(),this.addTransferDetails()}createCloseOnMaturityAccountForm(){this.closeOnMaturityAccountForm=this.formBuilder.group({closedOnDate:["",V.required],maturityAmount:[{value:this.maturityAmount,disabled:!0}],onAccountClosureId:["",V.required],note:[""]})}addTransferDetails(){this.closeOnMaturityAccountForm.get("onAccountClosureId").valueChanges.subscribe(e=>{e===200?(this.closeOnMaturityAccountForm.addControl("toSavingsAccountId",new Z("",V.required)),this.closeOnMaturityAccountForm.addControl("transferDescription",new Z(""))):(this.closeOnMaturityAccountForm.removeControl("toSavingsAccountId"),this.closeOnMaturityAccountForm.removeControl("transferDescription"))})}submit(){let e=this.closeOnMaturityAccountForm.value,l=this.settingsService.language.code,p=this.settingsService.dateFormat,f=this.closeOnMaturityAccountForm.value.closedOnDate;e.closedOnDate instanceof Date&&(e.closedOnDate=this.dateUtils.formatDate(f,p));let D=X(H({},e),{dateFormat:p,locale:l});this.fixedDepositsService.executeFixedDepositsAccountCommand(this.accountId,"close",D).subscribe(()=>{this.router.navigate(["../../"],{relativeTo:this.route})})}static{this.\u0275fac=function(l){return new(l||t)}}static{this.\u0275cmp=O({type:t,selectors:[["mifosx-close-fixed-deposits-account"]],decls:41,vars:30,consts:[["closedOnDatePicker",""],[1,"container"],[3,"ngSubmit","formGroup"],[1,"layout-column"],[3,"click"],["matInput","","required","","formControlName","closedOnDate",3,"min","max","matDatepicker"],["matSuffix","",3,"for"],["type","number","matInput","","formControlName","maturityAmount"],["required","","formControlName","onAccountClosureId"],[3,"value"],["matInput","","formControlName","note","cdkTextareaAutosize","","cdkAutosizeMinRows","2"],[1,"layout-row","align-center","gap-5px","responsive-column"],["type","button","mat-raised-button","",3,"routerLink"],["mat-raised-button","","color","warn",3,"disabled"],["required","","formControlName","toSavingsAccountId"],["matInput","","formControlName","transferDescription"]],template:function(l,p){if(l&1){let f=F();n(0,"div",1)(1,"mat-card")(2,"form",2),M("ngSubmit",function(){return S(f),A(p.submit())}),n(3,"mat-card-content")(4,"div",3)(5,"mat-form-field",4),M("click",function(){S(f);let q=k(12);return A(q.open())}),n(6,"mat-label"),a(7),r(8,"translate"),o(),g(9,"input",5)(10,"mat-datepicker-toggle",6)(11,"mat-datepicker",null,0),h(13,dr,7,9,"mat-error"),o(),n(14,"mat-form-field")(15,"mat-label"),a(16),r(17,"translate"),o(),g(18,"input",7),o(),n(19,"mat-form-field")(20,"mat-label"),a(21),r(22,"translate"),o(),n(23,"mat-select",8),L(24,ur,2,2,"mat-option",9,$),o(),h(26,fr,7,9,"mat-error"),o(),h(27,Cr,8,4,"mat-form-field"),h(28,_r,5,3,"mat-form-field"),n(29,"mat-form-field")(30,"mat-label"),a(31),r(32,"translate"),o(),g(33,"textarea",10),o()()(),n(34,"mat-card-actions",11)(35,"button",12),a(36),r(37,"translate"),o(),n(38,"button",13),a(39),r(40,"translate"),o()()()()()}if(l&2){let f=k(12);i(2),d("formGroup",p.closeOnMaturityAccountForm),i(5),m(c(8,17,"labels.inputs.Closed On Date")),i(2),d("min",p.minDate)("max",p.maxDate)("matDatepicker",f),i(),d("for",f),i(3),v(p.closeOnMaturityAccountForm.controls.closedOnDate.hasError("required")?13:-1),i(3),m(c(17,19,"labels.inputs.Maturity Amount")),i(5),m(c(22,21,"labels.inputs.Action")),i(3),G(p.onAccountClosureOptions),i(2),v(p.closeOnMaturityAccountForm.controls.onAccountClosureId.hasError("required")?26:-1),i(),v(p.closeOnMaturityAccountForm.contains("toSavingsAccountId")?27:-1),i(),v(p.closeOnMaturityAccountForm.contains("transferDescription")?28:-1),i(3),m(c(32,23,"labels.inputs.Note")),i(4),d("routerLink",R(29,mr)),i(),u(" ",c(37,25,"labels.buttons.Cancel")," "),i(2),d("disabled",!p.closeOnMaturityAccountForm.valid),i(),u(" ",c(40,27,"labels.buttons.Confirm")," ")}},dependencies:[y,I,ct,rt,jt,it,pt,gt,st,lt,tt,Y,xt,bt,ot,nt,Ct,Pt,dt,Ot,At,Tt,St,Mt,B,Ft,w],styles:[".container[_ngcontent-%COMP%]{max-width:37rem}"]})}}return t})();var hr=()=>["../../transactions"];function vr(t,s){if(t&1&&(n(0,"h2",2),a(1),r(2,"translate"),r(3,"translate"),o()),t&2){let e=_();i(),T(" ",c(2,2,"labels.menus."+e.actionName)," ",c(3,4,"labels.heading.Fixed Deposit Transactions")," ")}}function Dr(t,s){t&1&&(n(0,"mat-error"),a(1),r(2,"translate"),r(3,"translate"),n(4,"strong"),a(5),r(6,"translate"),o()()),t&2&&(i(),T(" ",c(2,3,"labels.inputs.Transaction Date")," ",c(3,5,"labels.commons.is")," "),i(4),m(c(6,7,"labels.commons.required")))}function br(t,s){if(t&1&&(n(0,"mat-option",10),a(1),o()),t&2){let e=s.$implicit;d("value",e.id),i(),u(" ",e.name," ")}}function Pr(t,s){t&1&&(n(0,"mat-form-field")(1,"mat-label"),a(2),r(3,"translate"),o(),g(4,"input",19),o()),t&2&&(i(2),m(c(3,1,"labels.inputs.Account Number")))}function Mr(t,s){t&1&&(n(0,"mat-form-field")(1,"mat-label"),a(2),r(3,"translate"),o(),g(4,"input",20),o()),t&2&&(i(2),m(c(3,1,"labels.inputs.Cheque")))}function Tr(t,s){t&1&&(n(0,"mat-form-field")(1,"mat-label"),a(2),r(3,"translate"),o(),g(4,"input",21),o()),t&2&&(i(2),m(c(3,1,"labels.inputs.Routing Code")))}function Sr(t,s){t&1&&(n(0,"mat-form-field")(1,"mat-label"),a(2),r(3,"translate"),o(),g(4,"input",22),o()),t&2&&(i(2),m(c(3,1,"labels.inputs.Receipt Number")))}function Ar(t,s){t&1&&(n(0,"mat-form-field")(1,"mat-label"),a(2),r(3,"translate"),o(),g(4,"input",23),o()),t&2&&(i(2),m(c(3,1,"labels.inputs.Bank")))}var Di=(()=>{class t{constructor(){this.formBuilder=x(mt),this.route=x(N),this.router=x(W),this.dateUtils=x(et),this.fixedDepositsService=x(j),this.settingsService=x(U),this.minDate=new Date(2e3,0,1),this.maxDate=new Date,this.paymentTypeOptions=[],this.addPaymentDetailsFlag=!1,this.transactionType={deposit:!1,withdrawal:!1},this.route.data.subscribe(l=>{this.currency=l.fixedDepositsAccountActionData.currency,this.paymentTypeOptions=l.fixedDepositsAccountActionData.paymentTypeOptions}),this.actionName=this.route.snapshot.params.name;let e=this.actionName.toLowerCase();if(e==="deposit"||e==="withdrawal")this.transactionCommand=e,this.transactionType[this.transactionCommand]=!0;else throw new Error(`Invalid transaction action: ${this.actionName}`);this.accountId=this.route.parent.snapshot.params.fixedDepositAccountId}ngOnInit(){this.maxDate=this.settingsService.businessDate,this.createSavingAccountTransactionForm()}createSavingAccountTransactionForm(){this.accountTransactionForm=this.formBuilder.group({transactionDate:[this.settingsService.businessDate,V.required],transactionAmount:[0,V.required],paymentTypeId:[""],note:[""]})}addPaymentDetails(){this.addPaymentDetailsFlag=!this.addPaymentDetailsFlag,this.addPaymentDetailsFlag?(this.accountTransactionForm.addControl("accountNumber",new Z("")),this.accountTransactionForm.addControl("checkNumber",new Z("")),this.accountTransactionForm.addControl("routingCode",new Z("")),this.accountTransactionForm.addControl("receiptNumber",new Z("")),this.accountTransactionForm.addControl("bankNumber",new Z(""))):(this.accountTransactionForm.removeControl("accountNumber"),this.accountTransactionForm.removeControl("checkNumber"),this.accountTransactionForm.removeControl("routingCode"),this.accountTransactionForm.removeControl("receiptNumber"),this.accountTransactionForm.removeControl("bankNumber"))}submit(){let e=this.accountTransactionForm.value,l=this.settingsService.language.code,p=this.settingsService.dateFormat,f=this.accountTransactionForm.value.transactionDate;e.transactionDate instanceof Date&&(e.transactionDate=this.dateUtils.formatDate(f,p));let D=X(H({},e),{dateFormat:p,locale:l});delete D.note,D.transactionAmount=D.transactionAmount*1,this.fixedDepositsService.executeFixedDepositsAccountTransactionsCommand(this.accountId,this.transactionCommand,D).subscribe(q=>{this.router.navigate(["../../transactions"],{relativeTo:this.route})})}static{this.\u0275fac=function(l){return new(l||t)}}static{this.\u0275cmp=O({type:t,selectors:[["mifosx-fixed-deposits-cash-transaction"]],decls:46,vars:38,consts:[["dueDatePicker",""],[1,"container","mat-elevation-z8"],["mat-title",""],[3,"ngSubmit","formGroup"],[1,"layout-column"],[3,"click"],["matInput","","formControlName","transactionDate","required","",3,"min","max","matDatepicker"],["matSuffix","",3,"for"],[3,"currency","isRequired","inputFormControl","inputLabel"],["required","","formControlName","paymentTypeId"],[3,"value"],[1,"flex-fill"],[1,"expandcollapsebutton","m-l-10","m-t-40","flex-75",3,"click"],[3,"className"],[1,"m-l-10"],["formControlName","note","matInput","","cdkTextareaAutosize","","cdkAutosizeMinRows","2"],[1,"layout-row","layout-xs-column","layout-align-center","gap-5px"],["type","button","mat-raised-button","",3,"routerLink"],["mat-raised-button","","color","primary",3,"disabled"],["type","number","formControlName","accountNumber","matInput",""],["type","number","formControlName","checkNumber","matInput",""],["formControlName","routingCode","matInput",""],["formControlName","receiptNumber","matInput",""],["formControlName","bankNumber","matInput",""]],template:function(l,p){if(l&1){let f=F();n(0,"div",1)(1,"mat-card"),h(2,vr,4,6,"h2",2),n(3,"form",3),M("ngSubmit",function(){return S(f),A(p.submit())}),n(4,"mat-card-content",4)(5,"mat-form-field",5),M("click",function(){S(f);let q=k(12);return A(q.open())}),n(6,"mat-label"),a(7),r(8,"translate"),o(),g(9,"input",6)(10,"mat-datepicker-toggle",7)(11,"mat-datepicker",null,0),h(13,Dr,7,9,"mat-error"),o(),g(14,"mifosx-input-amount",8),n(15,"mat-form-field")(16,"mat-label"),a(17),r(18,"translate"),o(),n(19,"mat-select",9),L(20,br,2,2,"mat-option",10,$),o()(),n(22,"div",11)(23,"span",12),M("click",function(){return S(f),A(p.addPaymentDetails())}),n(24,"mat-slide-toggle")(25,"div",13)(26,"span",14),a(27),r(28,"translate"),o()()()()(),h(29,Pr,5,3,"mat-form-field"),h(30,Mr,5,3,"mat-form-field"),h(31,Tr,5,3,"mat-form-field"),h(32,Sr,5,3,"mat-form-field"),h(33,Ar,5,3,"mat-form-field"),n(34,"mat-form-field")(35,"mat-label"),a(36),r(37,"translate"),o(),g(38,"textarea",15),o(),n(39,"mat-card-actions",16)(40,"button",17),a(41),r(42,"translate"),o(),n(43,"button",18),a(44),r(45,"translate"),o()()()()()()}if(l&2){let f=k(12);i(2),v(p.transactionType.withdrawal?2:-1),i(),d("formGroup",p.accountTransactionForm),i(4),m(c(8,25,"labels.inputs.Transaction Date")),i(2),d("min",p.minDate)("max",p.maxDate)("matDatepicker",f),i(),d("for",f),i(3),v(p.accountTransactionForm.controls.transactionDate.hasError("required")?13:-1),i(),d("currency",p.currency)("isRequired",!0)("inputFormControl",p.accountTransactionForm.controls.transactionAmount)("inputLabel","Transaction Amount"),i(3),m(c(18,27,"labels.inputs.Payment Type")),i(3),G(p.paymentTypeOptions),i(5),d("className",p.addPaymentDetailsFlag?"enabled":"disabled"),i(2),m(c(28,29,"labels.inputs.Show Payment Details")),i(2),v(p.addPaymentDetailsFlag?29:-1),i(),v(p.addPaymentDetailsFlag?30:-1),i(),v(p.addPaymentDetailsFlag?31:-1),i(),v(p.addPaymentDetailsFlag?32:-1),i(),v(p.addPaymentDetailsFlag?33:-1),i(3),m(c(37,31,"labels.inputs.Notes")),i(4),d("routerLink",R(37,hr)),i(),u(" ",c(42,33,"labels.buttons.Cancel")," "),i(2),d("disabled",!p.accountTransactionForm.valid),i(),u(" ",c(45,35,"labels.buttons.Submit")," ")}},dependencies:[y,I,ct,rt,jt,it,pt,gt,st,lt,tt,Y,xt,bt,ot,nt,Ct,Pt,dt,Ot,At,Tt,St,Mt,B,ei,ji,Ft,w],styles:[".expandcollapsebutton[_ngcontent-%COMP%]{margin-top:-7px}.container[_ngcontent-%COMP%]{max-width:37rem}.right-input[_ngcontent-%COMP%]{text-align:right}.right-label[_ngcontent-%COMP%]{padding-right:25px!important}"]})}}return t})();function Or(t,s){t&1&&g(0,"mifosx-approve-fixed-deposits-account")}function yr(t,s){t&1&&g(0,"mifosx-reject-fixed-deposits-account")}function Ir(t,s){t&1&&g(0,"mifosx-activate-fixed-deposits-account")}function Fr(t,s){t&1&&g(0,"mifosx-undo-approval-fixed-deposits-account")}function wr(t,s){t&1&&g(0,"mifosx-withdraw-by-client-fixed-deposits-account")}function Er(t,s){t&1&&g(0,"mifosx-add-charge-fixed-deposits-account")}function Br(t,s){t&1&&g(0,"mifosx-premature-close-fixed-deposits-account")}function kr(t,s){t&1&&g(0,"mifosx-close-fixed-deposits-account")}function Rr(t,s){t&1&&g(0,"mifosx-fixed-deposits-cash-transaction")}var bi=(()=>{class t{constructor(){this.route=x(N),this.actions={Approve:!1,Reject:!1,Activate:!1,Close:!1,"Undo Approval":!1,"Undo Activation":!1,"Add Charge":!1,"Premature Close":!1,"Withdrawn by Client":!1,Withdrawal:!1};let e=this.route.snapshot.params.name;e&&e in this.actions&&(this.actions[e]=!0)}static{this.\u0275fac=function(l){return new(l||t)}}static{this.\u0275cmp=O({type:t,selectors:[["mifosx-fixed-deposits-account-actions"]],decls:9,vars:9,template:function(l,p){l&1&&(h(0,Or,1,0,"mifosx-approve-fixed-deposits-account"),h(1,yr,1,0,"mifosx-reject-fixed-deposits-account"),h(2,Ir,1,0,"mifosx-activate-fixed-deposits-account"),h(3,Fr,1,0,"mifosx-undo-approval-fixed-deposits-account"),h(4,wr,1,0,"mifosx-withdraw-by-client-fixed-deposits-account"),h(5,Er,1,0,"mifosx-add-charge-fixed-deposits-account"),h(6,Br,1,0,"mifosx-premature-close-fixed-deposits-account"),h(7,kr,1,0,"mifosx-close-fixed-deposits-account"),h(8,Rr,1,0,"mifosx-fixed-deposits-cash-transaction")),l&2&&(v(p.actions.Approve?0:-1),i(),v(p.actions.Reject?1:-1),i(),v(p.actions.Activate?2:-1),i(),v(p.actions["Undo Approval"]||p.actions["Undo Activation"]?3:-1),i(),v(p.actions["Withdrawn by Client"]?4:-1),i(),v(p.actions["Add Charge"]?5:-1),i(),v(p.actions["Premature Close"]?6:-1),i(),v(p.actions.Close?7:-1),i(),v(p.actions.Withdrawal?8:-1))},dependencies:[y,I,ui,fi,gi,xi,Ci,_i,hi,vi,Di],encapsulation:2})}}return t})();var Nr=()=>["../"];function Vr(t,s){if(t&1){let e=F();n(0,"button",10),M("click",function(){S(e);let p=_(2);return A(p.undoTransaction())}),g(1,"fa-icon",11),a(2,"Undo "),o()}}function qr(t,s){t&1&&(n(0,"span"),C(1,Vr,3,0,"button",9),o()),t&2&&(i(),d("mifosxHasPermission","UNDOTRANSACTION_SAVINGSACCOUNT"))}function zr(t,s){t&1&&(n(0,"div",4),a(1),r(2,"translate"),o()),t&2&&(i(),u(" ",c(2,1,"labels.inputs.Note")," "))}function Hr(t,s){if(t&1&&(n(0,"div",5),a(1),o()),t&2){let e=_();i(),u(" ",e.transactionData.note," ")}}function $r(t,s){if(t&1&&g(0,"mifosx-transaction-payment-detail",6),t&2){let e=_();d("paymentDetailData",e.transactionData.paymentDetailData)}}var Pi=(()=>{class t{constructor(){this.savingsService=x($t),this.route=x(N),this.dateUtils=x(et),this.router=x(W),this.dialog=x(Ut),this.settingsService=x(U),this.route.data.subscribe(e=>{this.accountId=this.route.parent.snapshot.params.fixedDepositAccountId,this.transactionData=e.fixedDepositsAccountTransaction})}transactionColor(){return this.transactionData.manuallyReversed?"undo":"active"}allowUndo(){return!1}undoTransaction(){this.dialog.open(sn).afterClosed().subscribe(l=>{if(l.confirm){let p=this.settingsService.language.code,f=this.settingsService.dateFormat,D={transactionDate:this.dateUtils.formatDate(this.transactionData.date&&new Date(this.transactionData.date),f),transactionAmount:0,dateFormat:f,locale:p};this.savingsService.executeSavingsAccountTransactionsCommand(this.accountId,"undo",D,this.transactionData.id).subscribe(()=>{this.router.navigate(["../"],{relativeTo:this.route})})}})}static{this.\u0275fac=function(l){return new(l||t)}}static{this.\u0275cmp=O({type:t,selectors:[["mifosx-view-transaction"]],decls:41,vars:37,consts:[[1,"container","m-b-20","align-end-center","gap-2percent"],[1,"container"],[1,"layout-row-wrap"],[1,"flex-100",3,"ngClass"],[1,"flex-50","mat-body-strong"],[1,"flex-50"],[3,"paymentDetailData"],[1,"layout-row","layout-align-center","gap-2percent","column-on-mobile"],["type","button","mat-raised-button","","color","primary",3,"routerLink"],["mat-raised-button","","color","warn",3,"click",4,"mifosxHasPermission"],["mat-raised-button","","color","warn",3,"click"],["icon","undo",1,"m-r-10"]],template:function(l,p){l&1&&(n(0,"div",0),h(1,qr,2,1,"span"),o(),n(2,"div",1)(3,"mat-card")(4,"mat-card-content")(5,"div",2),g(6,"div",3),n(7,"div",4),a(8),r(9,"translate"),o(),n(10,"div",5),a(11),o(),n(12,"div",4),a(13),r(14,"translate"),o(),n(15,"div",5),a(16),o(),n(17,"div",4),a(18),r(19,"translate"),o(),n(20,"div",5),a(21),r(22,"dateFormat"),o(),n(23,"div",4),a(24),r(25,"translate"),o(),n(26,"div",5),a(27),o(),n(28,"div",4),a(29),r(30,"translate"),o(),n(31,"div",5),a(32),r(33,"currency"),o(),h(34,zr,3,3,"div",4),h(35,Hr,2,1,"div",5),h(36,$r,1,1,"mifosx-transaction-payment-detail",6),o(),n(37,"div",7)(38,"button",8),a(39),r(40,"translate"),o()()()()()),l&2&&(i(),v(p.allowUndo()?1:-1),i(5),d("ngClass",p.transactionColor()),i(2),u(" ",c(9,17,"labels.inputs.Transaction Id")," "),i(3),u(" ",p.transactionData.id," "),i(2),u(" ",c(14,19,"labels.inputs.Type")," "),i(3),u(" ",p.transactionData.transactionType.value," "),i(2),u(" ",c(19,21,"labels.inputs.Transaction Date")," "),i(3),u(" ",c(22,23,p.transactionData.date)," "),i(3),u(" ",c(25,25,"labels.inputs.Currency")," "),i(3),u(" ",p.transactionData.currency.displayLabel," "),i(2),u(" ",c(30,27,"labels.inputs.Amount")," "),i(3),u(" ",at(33,29,p.transactionData.amount,p.transactionData.currency.code,"symbol-narrow","1.2-2")," "),i(2),v(p.transactionData.note?34:-1),i(),v(p.transactionData.note?35:-1),i(),v(p.transactionData.paymentDetailData?36:-1),i(2),d("routerLink",R(36,Nr)),i(),u(" ",c(40,34,"labels.buttons.Back")," "))},dependencies:[y,Se,I,tt,Y,xt,B,de,ut,rn,se,yt,w],styles:["body[_ngcontent-%COMP%] table[_ngcontent-%COMP%] tbody[_ngcontent-%COMP%] tr[_ngcontent-%COMP%]:nth-child(2n){background-color:#f2f2f2}.bg-black[_ngcontent-%COMP%]{background-color:#000}.bg-light-grey[_ngcontent-%COMP%]{background-color:#e5e5e5}.bg-medium-grey[_ngcontent-%COMP%]{background-color:#ccc}.bg-grey[_ngcontent-%COMP%]{background-color:#999}.bg-dark-grey[_ngcontent-%COMP%]{background-color:#222}.bg-white[_ngcontent-%COMP%], .bg-fff[_ngcontent-%COMP%]{background-color:#fff}.bg-none[_ngcontent-%COMP%], .no-bg[_ngcontent-%COMP%]{background:none;background-image:none;background-color:transparent}.bg-facebook[_ngcontent-%COMP%]{background-color:#47639e}.bg-twitter[_ngcontent-%COMP%]{background-color:#02a8f3}body[_ngcontent-%COMP%] table[_ngcontent-%COMP%]{border:1px solid rgba(0,0,0,.12)}.no-border[_ngcontent-%COMP%]{border:none}.no-border-t[_ngcontent-%COMP%]{border-top:none}.no-border-r[_ngcontent-%COMP%]{border-right:none}.no-border-b[_ngcontent-%COMP%]{border-bottom:none}.no-border-l[_ngcontent-%COMP%]{border-left:none}.no-border-lr[_ngcontent-%COMP%], .no-border-rl[_ngcontent-%COMP%]{border-left:none;border-right:none}.no-border-tb[_ngcontent-%COMP%], .no-border-bt[_ngcontent-%COMP%]{border-top:none;border-bottom:none}.no-border-tl[_ngcontent-%COMP%], .no-border-lt[_ngcontent-%COMP%]{border-top:none;border-left:none}.no-border-tr[_ngcontent-%COMP%], .no-border-rt[_ngcontent-%COMP%]{border-top:none;border-right:none}.no-border-bl[_ngcontent-%COMP%], .no-border-lb[_ngcontent-%COMP%]{border-bottom:none;border-left:none}.no-border-br[_ngcontent-%COMP%], .no-border-rb[_ngcontent-%COMP%]{border-bottom:none;border-right:none}.border-dashed[_ngcontent-%COMP%], .border-dotted[_ngcontent-%COMP%]{border-style:dashed}.border-black[_ngcontent-%COMP%]{border-color:#000}.border-light-grey[_ngcontent-%COMP%]{border-color:#e5e5e5}.border-medium-grey[_ngcontent-%COMP%]{border-color:#ccc}.border-grey[_ngcontent-%COMP%]{border-color:#999}.border-dark-grey[_ngcontent-%COMP%]{border-color:#2222}.border-white[_ngcontent-%COMP%], .border-fff[_ngcontent-%COMP%]{border-color:#fff}.no-border-radius[_ngcontent-%COMP%]{border-radius:0}.radius3[_ngcontent-%COMP%]{border-radius:3px}.radius5[_ngcontent-%COMP%]{border-radius:5px}.radius10[_ngcontent-%COMP%]{border-radius:10px}.column-mandatory[_ngcontent-%COMP%]{color:#5cb85c;text-align:center}.not-column-mandatory[_ngcontent-%COMP%]{color:#666f73;text-align:center}.cdk-drag-placeholder[_ngcontent-%COMP%]{background:#3498db}.yes[_ngcontent-%COMP%]{color:#5cb85c!important;background-color:#5cb85c;height:4px;cursor:none}.no[_ngcontent-%COMP%]{color:red;background-color:red;height:4px;cursor:none}.strike[_ngcontent-%COMP%]{text-decoration:line-through;color:red}.transfer[_ngcontent-%COMP%]{color:#16a085}.linked[_ngcontent-%COMP%]{color:#4461e2}.accrual[_ngcontent-%COMP%]{color:#999}.fa-question[_ngcontent-%COMP%]{color:#4461e2}.enabled[_ngcontent-%COMP%]{color:#32cd32}.disabled[_ngcontent-%COMP%]{color:#f44366}.v-mid[_ngcontent-%COMP%], .v-m[_ngcontent-%COMP%]{vertical-align:middle}.v-top[_ngcontent-%COMP%], .v-t[_ngcontent-%COMP%]{vertical-align:top}.v-bottom[_ngcontent-%COMP%], .v-b[_ngcontent-%COMP%]{vertical-align:bottom}.v-super[_ngcontent-%COMP%]{vertical-align:super}.r-amount[_ngcontent-%COMP%]{text-align:right!important;padding-right:5px!important}.left[_ngcontent-%COMP%]{text-align:left!important}.right[_ngcontent-%COMP%]{text-align:right!important}.center[_ngcontent-%COMP%]{text-align:center!important}.amount-plus[_ngcontent-%COMP%]{color:#000}.amount-minus[_ngcontent-%COMP%]{color:#4461e2}.block[_ngcontent-%COMP%]{display:block}.inline[_ngcontent-%COMP%]{display:inline}.in-block[_ngcontent-%COMP%]{display:inline-block;zoom:1}.d-none[_ngcontent-%COMP%], .hide[_ngcontent-%COMP%], .hidden[_ngcontent-%COMP%]{display:none}.t-0[_ngcontent-%COMP%]{top:0}.b-0[_ngcontent-%COMP%]{bottom:0}.l-0[_ngcontent-%COMP%]{left:0}.r-0[_ngcontent-%COMP%]{right:0}.tb-0[_ngcontent-%COMP%]{top:0;bottom:0}.lr-0[_ngcontent-%COMP%]{left:0;right:0}.f-left[_ngcontent-%COMP%]{float:left}.f-right[_ngcontent-%COMP%]{float:right}.f-none[_ngcontent-%COMP%]{float:none}textarea[_ngcontent-%COMP%]{resize:both}textarea.vertical[_ngcontent-%COMP%], textarea.horizontal[_ngcontent-%COMP%]{resize:vertical}textarea.noresize[_ngcontent-%COMP%]{resize:none}.full-input[_ngcontent-%COMP%] input[_ngcontent-%COMP%], .full-input[_ngcontent-%COMP%] select[_ngcontent-%COMP%], .full-input[_ngcontent-%COMP%] textarea[_ngcontent-%COMP%]{width:100%}.normal[_ngcontent-%COMP%] input[_ngcontent-%COMP%], .normal[_ngcontent-%COMP%] select[_ngcontent-%COMP%], .normal[_ngcontent-%COMP%] textarea[_ngcontent-%COMP%], .full-input[_ngcontent-%COMP%] [type=checkbox][_ngcontent-%COMP%], .full-input[_ngcontent-%COMP%] [type=radio][_ngcontent-%COMP%]{width:auto}.mat-tab-body-content[_ngcontent-%COMP%]{margin-bottom:20px}.mat-datepicker-input[_ngcontent-%COMP%]{margin-top:5px;margin-bottom:5px}.loader-wrapper[_ngcontent-%COMP%]{height:100vh;width:100vw}.loader-wrapper[_ngcontent-%COMP%] .triangle[_ngcontent-%COMP%]{width:0;height:0;border-style:solid;position:absolute;animation:_ngcontent-%COMP%_rotate .8s infinite .2s}.loader-wrapper[_ngcontent-%COMP%] .bottom[_ngcontent-%COMP%]{border-width:0 90px 90px;border-color:transparent transparent #1fb050;bottom:calc(50% - 100px);left:calc(50% - 90px)}.loader-wrapper[_ngcontent-%COMP%] .top[_ngcontent-%COMP%]{border-width:90px 90px 0;border-color:#b4d575 transparent transparent;top:calc(50% - 100px);left:calc(50% - 90px)}.loader-wrapper[_ngcontent-%COMP%] .left[_ngcontent-%COMP%]{border-width:90px 0 90px 90px;border-color:transparent transparent transparent #1074b9;top:calc(50% - 90px);left:calc(50% - 100px)}.loader-wrapper[_ngcontent-%COMP%] .right[_ngcontent-%COMP%]{border-width:90px 90px 90px 0;border-color:transparent #1daeec transparent transparent;top:calc(50% - 90px);right:calc(50% - 100px)}@keyframes _ngcontent-%COMP%_rotate{0%{transform:rotate(0)}to{transform:rotate(360deg)}}body[_ngcontent-%COMP%]{margin:0}.container[_ngcontent-%COMP%]{margin:0 auto}.mb-05[_ngcontent-%COMP%]{margin-bottom:.5rem}.mr-05[_ngcontent-%COMP%]{margin-right:.5rem}.mb-1[_ngcontent-%COMP%]{margin-bottom:1rem}.mt-1[_ngcontent-%COMP%]{margin-top:1rem}.m-5[_ngcontent-%COMP%]{margin:5px}.m-t-5[_ngcontent-%COMP%]{margin-top:5px}.m-r-5[_ngcontent-%COMP%]{margin-right:5px}.m-b-5[_ngcontent-%COMP%]{margin-bottom:5px}.m-l-5[_ngcontent-%COMP%]{margin-left:5px}.m-v-5[_ngcontent-%COMP%]{margin:5px 0}.m-h-5[_ngcontent-%COMP%]{margin:0 5px}.m-10[_ngcontent-%COMP%]{margin:10px}.m-t-10[_ngcontent-%COMP%]{margin-top:10px}.m-r-10[_ngcontent-%COMP%]{margin-right:10px}.m-b-10[_ngcontent-%COMP%]{margin-bottom:10px}.m-l-10[_ngcontent-%COMP%]{margin-left:10px}.m-v-10[_ngcontent-%COMP%]{margin:10px 0}.m-h-10[_ngcontent-%COMP%]{margin:0 10px}.m-15[_ngcontent-%COMP%]{margin:15px}.m-t-15[_ngcontent-%COMP%]{margin-top:15px}.m-r-15[_ngcontent-%COMP%]{margin-right:15px}.m-b-15[_ngcontent-%COMP%]{margin-bottom:15px}.m-l-15[_ngcontent-%COMP%]{margin-left:15px}.m-v-15[_ngcontent-%COMP%]{margin:15px 0}.m-h-15[_ngcontent-%COMP%]{margin:0 15px}.m-20[_ngcontent-%COMP%]{margin:20px}.m-t-20[_ngcontent-%COMP%]{margin-top:20px}.m-r-20[_ngcontent-%COMP%]{margin-right:20px}.m-b-20[_ngcontent-%COMP%]{margin-bottom:20px}.m-l-20[_ngcontent-%COMP%]{margin-left:20px}.m-v-20[_ngcontent-%COMP%]{margin:20px 0}.m-h-20[_ngcontent-%COMP%]{margin:0 20px}.m-25[_ngcontent-%COMP%]{margin:25px}.m-t-25[_ngcontent-%COMP%]{margin-top:25px}.m-r-25[_ngcontent-%COMP%]{margin-right:25px}.m-b-25[_ngcontent-%COMP%]{margin-bottom:25px}.m-l-25[_ngcontent-%COMP%]{margin-left:25px}.m-v-25[_ngcontent-%COMP%]{margin:25px 0}.m-h-25[_ngcontent-%COMP%]{margin:0 25px}.m-30[_ngcontent-%COMP%]{margin:30px}.m-t-30[_ngcontent-%COMP%]{margin-top:30px}.m-r-30[_ngcontent-%COMP%]{margin-right:30px}.m-b-30[_ngcontent-%COMP%]{margin-bottom:30px}.m-l-30[_ngcontent-%COMP%]{margin-left:30px}.m-v-30[_ngcontent-%COMP%]{margin:30px 0}.m-h-30[_ngcontent-%COMP%]{margin:0 30px}.m-35[_ngcontent-%COMP%]{margin:35px}.m-t-35[_ngcontent-%COMP%]{margin-top:35px}.m-r-35[_ngcontent-%COMP%]{margin-right:35px}.m-b-35[_ngcontent-%COMP%]{margin-bottom:35px}.m-l-35[_ngcontent-%COMP%]{margin-left:35px}.m-v-35[_ngcontent-%COMP%]{margin:35px 0}.m-h-35[_ngcontent-%COMP%]{margin:0 35px}.m-40[_ngcontent-%COMP%]{margin:40px}.m-t-40[_ngcontent-%COMP%]{margin-top:40px}.m-r-40[_ngcontent-%COMP%]{margin-right:40px}.m-b-40[_ngcontent-%COMP%]{margin-bottom:40px}.m-l-40[_ngcontent-%COMP%]{margin-left:40px}.m-v-40[_ngcontent-%COMP%]{margin:40px 0}.m-h-40[_ngcontent-%COMP%]{margin:0 40px}.m-45[_ngcontent-%COMP%]{margin:45px}.m-t-45[_ngcontent-%COMP%]{margin-top:45px}.m-r-45[_ngcontent-%COMP%]{margin-right:45px}.m-b-45[_ngcontent-%COMP%]{margin-bottom:45px}.m-l-45[_ngcontent-%COMP%]{margin-left:45px}.m-v-45[_ngcontent-%COMP%]{margin:45px 0}.m-h-45[_ngcontent-%COMP%]{margin:0 45px}.m-50[_ngcontent-%COMP%]{margin:50px}.m-t-50[_ngcontent-%COMP%]{margin-top:50px}.m-r-50[_ngcontent-%COMP%]{margin-right:50px}.m-b-50[_ngcontent-%COMP%]{margin-bottom:50px}.m-l-50[_ngcontent-%COMP%]{margin-left:50px}.m-v-50[_ngcontent-%COMP%]{margin:50px 0}.m-h-50[_ngcontent-%COMP%]{margin:0 50px}.m-55[_ngcontent-%COMP%]{margin:55px}.m-t-55[_ngcontent-%COMP%]{margin-top:55px}.m-r-55[_ngcontent-%COMP%]{margin-right:55px}.m-b-55[_ngcontent-%COMP%]{margin-bottom:55px}.m-l-55[_ngcontent-%COMP%]{margin-left:55px}.m-v-55[_ngcontent-%COMP%]{margin:55px 0}.m-h-55[_ngcontent-%COMP%]{margin:0 55px}.m-60[_ngcontent-%COMP%]{margin:60px}.m-t-60[_ngcontent-%COMP%]{margin-top:60px}.m-r-60[_ngcontent-%COMP%]{margin-right:60px}.m-b-60[_ngcontent-%COMP%]{margin-bottom:60px}.m-l-60[_ngcontent-%COMP%]{margin-left:60px}.m-v-60[_ngcontent-%COMP%]{margin:60px 0}.m-h-60[_ngcontent-%COMP%]{margin:0 60px}.m-65[_ngcontent-%COMP%]{margin:65px}.m-t-65[_ngcontent-%COMP%]{margin-top:65px}.m-r-65[_ngcontent-%COMP%]{margin-right:65px}.m-b-65[_ngcontent-%COMP%]{margin-bottom:65px}.m-l-65[_ngcontent-%COMP%]{margin-left:65px}.m-v-65[_ngcontent-%COMP%]{margin:65px 0}.m-h-65[_ngcontent-%COMP%]{margin:0 65px}.m-70[_ngcontent-%COMP%]{margin:70px}.m-t-70[_ngcontent-%COMP%]{margin-top:70px}.m-r-70[_ngcontent-%COMP%]{margin-right:70px}.m-b-70[_ngcontent-%COMP%]{margin-bottom:70px}.m-l-70[_ngcontent-%COMP%]{margin-left:70px}.m-v-70[_ngcontent-%COMP%]{margin:70px 0}.m-h-70[_ngcontent-%COMP%]{margin:0 70px}.m-75[_ngcontent-%COMP%]{margin:75px}.m-t-75[_ngcontent-%COMP%]{margin-top:75px}.m-r-75[_ngcontent-%COMP%]{margin-right:75px}.m-b-75[_ngcontent-%COMP%]{margin-bottom:75px}.m-l-75[_ngcontent-%COMP%]{margin-left:75px}.m-v-75[_ngcontent-%COMP%]{margin:75px 0}.m-h-75[_ngcontent-%COMP%]{margin:0 75px}.m-80[_ngcontent-%COMP%]{margin:80px}.m-t-80[_ngcontent-%COMP%]{margin-top:80px}.m-r-80[_ngcontent-%COMP%]{margin-right:80px}.m-b-80[_ngcontent-%COMP%]{margin-bottom:80px}.m-l-80[_ngcontent-%COMP%]{margin-left:80px}.m-v-80[_ngcontent-%COMP%]{margin:80px 0}.m-h-80[_ngcontent-%COMP%]{margin:0 80px}.no-m[_ngcontent-%COMP%]{margin:0}.no-m-t[_ngcontent-%COMP%]{margin-top:0}.no-m-r[_ngcontent-%COMP%]{margin-right:0}.no-m-b[_ngcontent-%COMP%]{margin-bottom:0}.no-m-l[_ngcontent-%COMP%]{margin-left:0}.no-m-v[_ngcontent-%COMP%], .no-m-h[_ngcontent-%COMP%], .no-margin[_ngcontent-%COMP%]{margin:0}.no-m-lr[_ngcontent-%COMP%], .no-m-rl[_ngcontent-%COMP%]{margin-left:0;margin-right:0}.no-m-tb[_ngcontent-%COMP%], .no-m-bt[_ngcontent-%COMP%]{margin-top:0;margin-bottom:0}.m-t-only[_ngcontent-%COMP%]{margin-left:0;margin-right:0;margin-bottom:0}.m-b-only[_ngcontent-%COMP%]{margin-left:0;margin-right:0;margin-top:0}.m-l-only[_ngcontent-%COMP%]{margin-right:0;margin-top:0;margin-bottom:0}.m-r-only[_ngcontent-%COMP%]{margin-left:0;margin-top:0;margin-bottom:0}.m-auto[_ngcontent-%COMP%]{margin-left:auto;margin-right:auto}.ls-0[_ngcontent-%COMP%]{margin-left:10px;margin-right:10px}html[_ngcontent-%COMP%], body[_ngcontent-%COMP%]{-webkit-tap-highlight-color:transparent}div[_ngcontent-%COMP%]{box-sizing:border-box}.color-inherit[_ngcontent-%COMP%]{color:inherit}.no-shadow[_ngcontent-%COMP%]{box-shadow:none}.pointer[_ngcontent-%COMP%]{cursor:pointer}.nolist[_ngcontent-%COMP%]{list-style:none}.actions-menu[_ngcontent-%COMP%]{color:#fff}.alert[_ngcontent-%COMP%]{background-color:#e8f4fd;padding:6px 16px;font-size:.875rem;font-family:Roboto,Helvetica Neue,sans-serif;font-weight:400;line-height:1.43;border-radius:4px;letter-spacing:normal;margin:10px}.alert[_ngcontent-%COMP%] .message[_ngcontent-%COMP%]{padding:8px 0;font-size:18px}.alert[_ngcontent-%COMP%] .alert-check[_ngcontent-%COMP%]{color:#359ff4;margin-right:2px;font-size:1.4rem} .mat-tooltip{font-size:15px;color:#fff!important;background-color:#4461e2b3;border:1px solid rgb(25.7777777778,51.5555555556,166.2222222222);max-width:400px!important;white-space:pre-line!important}.loading[_ngcontent-%COMP%]{position:absolute;min-width:100%;width:100px;height:12px;background:linear-gradient(125deg,#fff,#4461e2,#fff);animation:grow 4s linear infinite,move 4s linear infinite}mat-card-title[_ngcontent-%COMP%]{font-weight:600;font-size:x-large;padding-left:20px;padding-top:20px}html[_ngcontent-%COMP%], body[_ngcontent-%COMP%]{overflow:hidden}.overflow-x-scroll[_ngcontent-%COMP%]{max-width:100%;overflow-x:auto}.overflow-no[_ngcontent-%COMP%]{overflow:hidden}.overflow-auto[_ngcontent-%COMP%]{overflow:auto}.overflow-scroll[_ngcontent-%COMP%]{overflow:scroll}.table-container[_ngcontent-%COMP%]{overflow-x:auto;max-width:100%}body[_ngcontent-%COMP%], .no-p[_ngcontent-%COMP%]{padding:0}.no-p-t[_ngcontent-%COMP%]{padding-top:0}.no-p-r[_ngcontent-%COMP%]{padding-right:0}.no-p-b[_ngcontent-%COMP%]{padding-bottom:0}.no-p-l[_ngcontent-%COMP%]{padding-left:0}.no-p-v[_ngcontent-%COMP%], .no-p-h[_ngcontent-%COMP%]{padding:0}.p-5[_ngcontent-%COMP%]{padding:5px}.p-t-5[_ngcontent-%COMP%]{padding-top:5px}.p-r-5[_ngcontent-%COMP%]{padding-right:5px}.p-b-5[_ngcontent-%COMP%]{padding-bottom:5px}.p-l-5[_ngcontent-%COMP%]{padding-left:5px}.p-v-5[_ngcontent-%COMP%]{padding:5px 0}.p-h-5[_ngcontent-%COMP%]{padding:0 5px}.p-10[_ngcontent-%COMP%]{padding:10px}.p-t-10[_ngcontent-%COMP%]{padding-top:10px}.p-b-10[_ngcontent-%COMP%]{padding-bottom:10px}.p-v-10[_ngcontent-%COMP%]{padding:10px 0}.p-h-10[_ngcontent-%COMP%]{padding:0 10px}.p-15[_ngcontent-%COMP%]{padding:15px}.p-t-15[_ngcontent-%COMP%]{padding-top:15px}.p-r-15[_ngcontent-%COMP%]{padding-right:15px}.p-b-15[_ngcontent-%COMP%]{padding-bottom:15px}.p-l-15[_ngcontent-%COMP%]{padding-left:15px}.p-v-15[_ngcontent-%COMP%]{padding:15px 0}.p-h-15[_ngcontent-%COMP%]{padding:0 15px}.p-20[_ngcontent-%COMP%]{padding:20px}.p-t-20[_ngcontent-%COMP%]{padding-top:20px}.p-r-20[_ngcontent-%COMP%]{padding-right:20px}.p-b-20[_ngcontent-%COMP%]{padding-bottom:20px}.p-l-20[_ngcontent-%COMP%]{padding-left:20px}.p-v-20[_ngcontent-%COMP%]{padding:20px 0}.p-h-20[_ngcontent-%COMP%]{padding:0 20px}.p-25[_ngcontent-%COMP%]{padding:25px}.p-t-25[_ngcontent-%COMP%]{padding-top:25px}.p-r-25[_ngcontent-%COMP%]{padding-right:25px}.p-b-25[_ngcontent-%COMP%]{padding-bottom:25px}.p-l-25[_ngcontent-%COMP%]{padding-left:25px}.p-v-25[_ngcontent-%COMP%]{padding:25px 0}.p-h-25[_ngcontent-%COMP%]{padding:0 25px}.p-30[_ngcontent-%COMP%]{padding:30px}.p-t-30[_ngcontent-%COMP%]{padding-top:30px}.p-r-30[_ngcontent-%COMP%]{padding-right:30px}.p-b-30[_ngcontent-%COMP%]{padding-bottom:30px}.p-l-30[_ngcontent-%COMP%]{padding-left:30px}.p-v-30[_ngcontent-%COMP%]{padding:30px 0}.p-h-30[_ngcontent-%COMP%]{padding:0 30px}.p-35[_ngcontent-%COMP%]{padding:35px}.p-t-35[_ngcontent-%COMP%]{padding-top:35px}.p-r-35[_ngcontent-%COMP%]{padding-right:35px}.p-b-35[_ngcontent-%COMP%]{padding-bottom:35px}.p-l-35[_ngcontent-%COMP%]{padding-left:35px}.p-v-35[_ngcontent-%COMP%]{padding:35px 0}.p-h-35[_ngcontent-%COMP%]{padding:0 35px}.p-40[_ngcontent-%COMP%]{padding:40px}.p-t-40[_ngcontent-%COMP%]{padding-top:40px}.p-r-40[_ngcontent-%COMP%]{padding-right:40px}.p-b-40[_ngcontent-%COMP%]{padding-bottom:40px}.p-l-40[_ngcontent-%COMP%]{padding-left:40px}.p-v-40[_ngcontent-%COMP%]{padding-top:40px;padding-bottom:40px}.p-h-40[_ngcontent-%COMP%]{padding:0 40px}.p-45[_ngcontent-%COMP%]{padding:45px}.p-t-45[_ngcontent-%COMP%]{padding-top:45px}.p-r-45[_ngcontent-%COMP%]{padding-right:45px}.p-b-45[_ngcontent-%COMP%]{padding-bottom:45px}.p-l-45[_ngcontent-%COMP%]{padding-left:45px}.p-v-45[_ngcontent-%COMP%]{padding:45px 0}.p-h-45[_ngcontent-%COMP%]{padding:0 45px}.p-50[_ngcontent-%COMP%]{padding:50px}.p-t-50[_ngcontent-%COMP%]{padding-top:50px}.p-r-50[_ngcontent-%COMP%]{padding-right:50px}.p-b-50[_ngcontent-%COMP%]{padding-bottom:50px}.p-l-50[_ngcontent-%COMP%]{padding-left:50px}.p-v-50[_ngcontent-%COMP%]{padding:50px 0}.p-h-50[_ngcontent-%COMP%]{padding:0 50px}.p-55[_ngcontent-%COMP%]{padding:55px}.p-t-55[_ngcontent-%COMP%]{padding-top:55px}.p-r-55[_ngcontent-%COMP%]{padding-right:55px}.p-b-55[_ngcontent-%COMP%]{padding-bottom:55px}.p-l-55[_ngcontent-%COMP%]{padding-left:55px}.p-v-55[_ngcontent-%COMP%]{padding:55px 0}.p-h-55[_ngcontent-%COMP%]{padding:0 55px}.p-60[_ngcontent-%COMP%]{padding:60px}.p-t-60[_ngcontent-%COMP%]{padding-top:60px}.p-r-60[_ngcontent-%COMP%]{padding-right:60px}.p-b-60[_ngcontent-%COMP%]{padding-bottom:60px}.p-l-60[_ngcontent-%COMP%]{padding-left:60px}.p-v-60[_ngcontent-%COMP%]{padding:60px 0}.p-h-60[_ngcontent-%COMP%]{padding:0 60px}.p-65[_ngcontent-%COMP%]{padding:65px}.p-t-65[_ngcontent-%COMP%]{padding-top:65px}.p-r-65[_ngcontent-%COMP%]{padding-right:65px}.p-b-65[_ngcontent-%COMP%]{padding-bottom:65px}.p-l-65[_ngcontent-%COMP%]{padding-left:65px}.p-v-65[_ngcontent-%COMP%]{padding:65px 0}.p-h-65[_ngcontent-%COMP%]{padding:0 65px}.p-70[_ngcontent-%COMP%]{padding:70px}.p-t-70[_ngcontent-%COMP%]{padding-top:70px}.p-r-70[_ngcontent-%COMP%]{padding-right:70px}.p-b-70[_ngcontent-%COMP%]{padding-bottom:70px}.p-l-70[_ngcontent-%COMP%]{padding-left:70px}.p-v-70[_ngcontent-%COMP%]{padding:70px 0}.p-h-70[_ngcontent-%COMP%]{padding:0 70px}.p-75[_ngcontent-%COMP%]{padding:75px}.p-t-75[_ngcontent-%COMP%]{padding-top:75px}.p-r-75[_ngcontent-%COMP%]{padding-right:75px}.p-b-75[_ngcontent-%COMP%]{padding-bottom:75px}.p-l-75[_ngcontent-%COMP%]{padding-left:75px}.p-v-75[_ngcontent-%COMP%]{padding:75px 0}.p-h-75[_ngcontent-%COMP%]{padding:0 75px}.p-80[_ngcontent-%COMP%]{padding:80px}.p-t-80[_ngcontent-%COMP%]{padding-top:80px}.p-r-80[_ngcontent-%COMP%]{padding-right:80px}.p-b-80[_ngcontent-%COMP%]{padding-bottom:80px}.p-l-80[_ngcontent-%COMP%]{padding-left:80px}.p-v-80[_ngcontent-%COMP%]{padding:80px 0}.p-h-80[_ngcontent-%COMP%]{padding:0 80px}.no-padding[_ngcontent-%COMP%]{padding:0!important}.no-pad-lr[_ngcontent-%COMP%], .no-pad-rl[_ngcontent-%COMP%]{padding-left:0;padding-right:0}.no-pad-tb[_ngcontent-%COMP%], .no-pad-bt[_ngcontent-%COMP%]{padding-top:0;padding-bottom:0}.pad-t-only[_ngcontent-%COMP%]{padding-left:0;padding-right:0;padding-bottom:0}.pad-b-only[_ngcontent-%COMP%]{padding-left:0;padding-right:0;padding-top:0}.pad-l-only[_ngcontent-%COMP%]{padding-right:0;padding-top:0;padding-bottom:0}.pad-r-only[_ngcontent-%COMP%]{padding-left:0;padding-top:0;padding-bottom:0}html[_ngcontent-%COMP%], body[_ngcontent-%COMP%], .rel[_ngcontent-%COMP%], .relative[_ngcontent-%COMP%]{position:relative}.abs[_ngcontent-%COMP%], .absolute[_ngcontent-%COMP%]{position:absolute}.fixed[_ngcontent-%COMP%]{position:fixed}.status-active[_ngcontent-%COMP%]{color:#5cb85c}.status-inactive[_ngcontent-%COMP%]{color:#666f73}.status-deleted[_ngcontent-%COMP%]{color:#000}.status-pending[_ngcontent-%COMP%]{color:orange}.status-approved[_ngcontent-%COMP%]{color:#4461e2}.status-overpaid[_ngcontent-%COMP%]{color:purple}.status-chargeoff[_ngcontent-%COMP%]{color:#f39c12}.status-active-overdue[_ngcontent-%COMP%], .status-block[_ngcontent-%COMP%]{color:red}.status-matured[_ngcontent-%COMP%]{color:#ff4000}.subStatus-contract-termination[_ngcontent-%COMP%]{color:#b3b3b3}.mat-step-header[_ngcontent-%COMP%] .mat-step-icon-state-done[_ngcontent-%COMP%]{background-color:#2af72a}.mat-step-header[_ngcontent-%COMP%] .mat-step-icon-state-done[_ngcontent-%COMP%] .status-transfer-progress[_ngcontent-%COMP%]{color:#ff4000}.mat-step-header[_ngcontent-%COMP%] .mat-step-icon-state-done[_ngcontent-%COMP%] .status-transfer-hold[_ngcontent-%COMP%]{color:#df0101}html[_ngcontent-%COMP%], body[_ngcontent-%COMP%]{-webkit-font-smoothing:antialiased}html[_ngcontent-%COMP%]{font-size:16px}body[_ngcontent-%COMP%]{font-family:Roboto,Helvetica Neue,sans-serif;font-weight:400;font-size:14px;color:#000000de;line-height:1.5;letter-spacing:normal}.mat-h1[_ngcontent-%COMP%], .mat-headline[_ngcontent-%COMP%], .mat-typography[_ngcontent-%COMP%] .mat-h1[_ngcontent-%COMP%], .mat-typography[_ngcontent-%COMP%] .mat-headline[_ngcontent-%COMP%], .mat-typography[_ngcontent-%COMP%] h1[_ngcontent-%COMP%]{font:400 24px/32px Roboto,Helvetica Neue,sans-serif;letter-spacing:normal;margin:0 0 16px}.lh-1[_ngcontent-%COMP%]{line-height:1}.lh-13[_ngcontent-%COMP%]{line-height:1.3}.lh-15[_ngcontent-%COMP%]{line-height:1.5}.bold[_ngcontent-%COMP%], .strong[_ngcontent-%COMP%]{font-weight:700}.no-bold[_ngcontent-%COMP%]{font-weight:400}.italic[_ngcontent-%COMP%], .em[_ngcontent-%COMP%]{font-style:italic}.strike[_ngcontent-%COMP%]{text-decoration:line-through}.normal[_ngcontent-%COMP%]{font-weight:400;font-style:normal}.uppercase[_ngcontent-%COMP%]{text-transform:uppercase}.text-left[_ngcontent-%COMP%]{text-align:left}.text-center[_ngcontent-%COMP%]{text-align:center}.text-right[_ngcontent-%COMP%]{text-align:right}.w100[_ngcontent-%COMP%]{font-weight:100}.w200[_ngcontent-%COMP%]{font-weight:200}.w300[_ngcontent-%COMP%]{font-weight:300}.w400[_ngcontent-%COMP%]{font-weight:400}.w500[_ngcontent-%COMP%]{font-weight:500}.w600[_ngcontent-%COMP%]{font-weight:600}.w700[_ngcontent-%COMP%]{font-weight:700}.w800[_ngcontent-%COMP%]{font-weight:800}.w900[_ngcontent-%COMP%]{font-weight:900}.f9[_ngcontent-%COMP%]{font-size:9px}.f10[_ngcontent-%COMP%]{font-size:10px}.f11[_ngcontent-%COMP%]{font-size:11px}.f12[_ngcontent-%COMP%]{font-size:12px}.f13[_ngcontent-%COMP%]{font-size:13px}.f14[_ngcontent-%COMP%]{font-size:14px}.f15[_ngcontent-%COMP%]{font-size:15px}.f16[_ngcontent-%COMP%]{font-size:16px}.f17[_ngcontent-%COMP%]{font-size:17px}.f18[_ngcontent-%COMP%]{font-size:18px;line-height:30px}.f19[_ngcontent-%COMP%]{font-size:19px}.f20[_ngcontent-%COMP%]{font-size:20px}.f30[_ngcontent-%COMP%]{font-size:30px}.f40[_ngcontent-%COMP%]{font-size:40px}.f50[_ngcontent-%COMP%]{font-size:50px}.f60[_ngcontent-%COMP%]{font-size:60px}.size-small[_ngcontent-%COMP%]{font-size:75%}.size-normal[_ngcontent-%COMP%]{font-size:100%}.size-medium[_ngcontent-%COMP%]{font-size:125%}.size-big[_ngcontent-%COMP%], .size-large[_ngcontent-%COMP%]{font-size:150%}.size-huge[_ngcontent-%COMP%]{font-size:200%}.inherit[_ngcontent-%COMP%]{font:inherit}.text-shadow[_ngcontent-%COMP%]{text-shadow:1px 1px 1px rgba(0,0,0,.4)}.text-rgb-2[_ngcontent-%COMP%]{color:#0003}.text-rgb-3[_ngcontent-%COMP%]{color:#0000004d}.text-rgb-4[_ngcontent-%COMP%]{color:#0006}.text-rgb-5[_ngcontent-%COMP%]{color:#00000080}.no-ul[_ngcontent-%COMP%], .no-ul[_ngcontent-%COMP%]:hover, .no-ul[_ngcontent-%COMP%] a[_ngcontent-%COMP%], .no-ul[_ngcontent-%COMP%] a[_ngcontent-%COMP%]:hover{text-decoration:none}.no-wrap[_ngcontent-%COMP%]{white-space:nowrap}.auto-cell-size[_ngcontent-%COMP%]{white-space:nowrap;width:1%}.ls-0[_ngcontent-%COMP%]{letter-spacing:-3px;white-space:nowrap}.label-field[_ngcontent-%COMP%]{margin-top:32px}.wrap-content[_ngcontent-%COMP%]{overflow-wrap:break-word;word-wrap:break-word}.no-break-content[_ngcontent-%COMP%]{overflow-wrap:anywhere!important}.fit[_ngcontent-%COMP%]{max-width:100%}.half-width[_ngcontent-%COMP%]{width:50%}.full-width[_ngcontent-%COMP%]{width:100%}.full-height[_ngcontent-%COMP%]{height:100%}html[_ngcontent-%COMP%], body[_ngcontent-%COMP%]{width:100%;height:100%;min-height:100%}body[_ngcontent-%COMP%] table[_ngcontent-%COMP%]{width:100%}.container[_ngcontent-%COMP%]{max-width:74rem;width:90%}.mw300[_ngcontent-%COMP%]{max-width:300px}.mw400[_ngcontent-%COMP%]{max-width:400px}.mw500[_ngcontent-%COMP%]{max-width:500px}.mw600[_ngcontent-%COMP%]{max-width:600px}.fullwidth[_ngcontent-%COMP%]{width:100%}.zindex-1[_ngcontent-%COMP%]{z-index:1}.zindex-2[_ngcontent-%COMP%]{z-index:2}.zindex-3[_ngcontent-%COMP%]{z-index:3}.zindex-4[_ngcontent-%COMP%]{z-index:4}.container[_ngcontent-%COMP%]{max-width:37rem}.container[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] div[_ngcontent-%COMP%]{margin:1rem 0;word-wrap:break-word}.transaction-buttons[_ngcontent-%COMP%]{margin-top:3%}.transaction-relation[_ngcontent-%COMP%]{background-color:#d7dada}.active[_ngcontent-%COMP%]{background-color:#5cb85c;height:4px}.linked[_ngcontent-%COMP%]{background-color:#4461e2;height:4px}.undo[_ngcontent-%COMP%]{background-color:red;height:4px}"]})}}return t})();function Lr(t,s){if(t&1&&(n(0,"mat-option",5),a(1),o()),t&2){let e=s.$implicit;d("value",e.id),i(),u(" ",e.name," ")}}function Gr(t,s){if(t&1){let e=F();n(0,"mat-form-field",11),M("click",function(){S(e);let p=k(7);return A(p.open())}),n(1,"mat-label"),a(2),r(3,"translate"),o(),g(4,"input",12)(5,"mat-datepicker-toggle",13)(6,"mat-datepicker",null,0),n(8,"mat-error"),a(9),r(10,"translate"),r(11,"translate"),n(12,"strong"),a(13),r(14,"translate"),o()()()}if(t&2){let e=k(7),l=_();i(2),m(c(3,8,"labels.inputs.Submitted On")),i(2),d("min",l.minDate)("max",l.maxDate)("matDatepicker",e),i(),d("for",e),i(4),T(" ",c(10,10,"labels.inputs.Submission Date")," ",c(11,12,"labels.commons.is")," "),i(4),m(c(14,14,"labels.commons.required"))}}function Ur(t,s){if(t&1&&(n(0,"mat-option",5),a(1),o()),t&2){let e=s.$implicit;d("value",e.id),i(),u(" ",e.displayName," ")}}function jr(t,s){if(t&1&&(n(0,"mat-form-field",3)(1,"mat-label"),a(2),r(3,"translate"),o(),n(4,"mat-select",14),L(5,Ur,2,2,"mat-option",5,$),o()()),t&2){let e=_();i(2),m(c(3,1,"labels.inputs.Field Officer")),i(3),G(e.fieldOfficerData)}}function Wr(t,s){t&1&&(n(0,"mat-form-field",3)(1,"mat-label"),a(2),r(3,"translate"),o(),g(4,"input",15),r(5,"translate"),o()),t&2&&(i(2),m(c(3,3,"labels.inputs.External id")),i(2),d("matTooltip",_t(c(5,5,"tooltips.Provides an external id"))))}var ge=(()=>{class t{constructor(){this.formBuilder=x(mt),this.fixedDepositsService=x(j),this.settingsService=x(U),this.minDate=new Date(2e3,0,1),this.maxDate=new Date,this.isFieldOfficerPatched=!1,this.isProductSelected=!1,this.fixedDepositsAccountProductTemplate=new $e,this.createFixedDepositsAccountDetailsForm()}ngOnInit(){this.maxDate=this.settingsService.businessDate,this.buildDependencies(),this.fixedDepositsAccountTemplate&&(this.productData=this.fixedDepositsAccountTemplate.productOptions,this.fixedDepositsAccountTemplate.depositProductId&&this.fixedDepositAccountDetailsForm.patchValue({productId:this.fixedDepositsAccountTemplate.depositProductId,submittedOnDate:this.fixedDepositsAccountTemplate.timeline.submittedOnDate&&new Date(this.fixedDepositsAccountTemplate.timeline.submittedOnDate),externalId:this.fixedDepositsAccountTemplate.externalId||""}))}createFixedDepositsAccountDetailsForm(){this.fixedDepositAccountDetailsForm=this.formBuilder.group({productId:["",V.required],submittedOnDate:["",V.required],fieldOfficerId:[""],externalId:[""]})}buildDependencies(){let e=this.fixedDepositsAccountTemplate.clientId;this.fixedDepositAccountDetailsForm.get("productId").valueChanges.subscribe(l=>{this.fixedDepositsService.getFixedDepositsAccountTemplate(e,l).subscribe(p=>{this.fixedDepositsAccountProductTemplate.emit(p),this.isProductSelected=!0,this.fieldOfficerData=p.fieldOfficerOptions,!this.isFieldOfficerPatched&&this.fixedDepositsAccountTemplate.fieldOfficerId?(this.fixedDepositAccountDetailsForm.get("fieldOfficerId").patchValue(this.fixedDepositsAccountTemplate.fieldOfficerId),this.isFieldOfficerPatched=!0):this.fixedDepositAccountDetailsForm.get("fieldOfficerId").patchValue("")})})}get fixedDepositAccountDetails(){let e=this.fixedDepositAccountDetailsForm.value;for(let l in e)e[l]===""&&delete e[l];return e}static{this.\u0275fac=function(l){return new(l||t)}}static{this.\u0275cmp=O({type:t,selectors:[["mifosx-fixed-deposit-account-details-step"]],inputs:{fixedDepositsAccountTemplate:"fixedDepositsAccountTemplate"},outputs:{fixedDepositsAccountProductTemplate:"fixedDepositsAccountProductTemplate"},decls:28,vars:23,consts:[["submittedOnDatePicker",""],[3,"formGroup"],[1,"layout-row-wrap","gap-2px","responsive-column"],[1,"flex-48"],["formControlName","productId","required",""],[3,"value"],[1,"layout-row","align-center","gap-2percent","margin-t","responsive-column"],["mat-raised-button","","matStepperPrevious","","disabled",""],["icon","arrow-left",1,"m-r-10"],["mat-raised-button","","matStepperNext","",3,"disabled"],["icon","arrow-right",1,"m-l-10"],[1,"flex-48",3,"click"],["matInput","","formControlName","submittedOnDate","required","",3,"min","max","matDatepicker"],["matSuffix","",3,"for"],["formControlName","fieldOfficerId"],["matInput","","formControlName","externalId",3,"matTooltip"]],template:function(l,p){if(l&1&&(n(0,"form",1)(1,"div",2)(2,"mat-form-field",3)(3,"mat-label"),a(4),r(5,"translate"),o(),n(6,"mat-select",4),L(7,Lr,2,2,"mat-option",5,$),o(),n(9,"mat-error"),a(10),r(11,"translate"),r(12,"translate"),n(13,"strong"),a(14),r(15,"translate"),o()()(),h(16,Gr,15,16,"mat-form-field",3),h(17,jr,7,3,"mat-form-field",3),h(18,Wr,6,7,"mat-form-field",3),o(),n(19,"div",6)(20,"button",7),g(21,"fa-icon",8),a(22),r(23,"translate"),o(),n(24,"button",9),a(25),r(26,"translate"),g(27,"fa-icon",10),o()()()),l&2){let f;d("formGroup",p.fixedDepositAccountDetailsForm),i(4),m(c(5,11,"labels.inputs.Product Name")),i(3),G(p.productData),i(3),T(" ",c(11,13,"labels.inputs.Product Name")," ",c(12,15,"labels.commons.is")," "),i(4),m(c(15,17,"labels.commons.required")),i(2),v(p.isProductSelected?16:-1),i(),v(p.isProductSelected?17:-1),i(),v(p.isProductSelected?18:-1),i(4),u(" ",c(23,19,"labels.buttons.Previous")," "),i(2),d("disabled",!((f=p.fixedDepositAccountDetailsForm.get("productId"))!=null&&f.value)||!((f=p.fixedDepositAccountDetailsForm.get("submittedOnDate"))!=null&&f.value)),i(),u(" ",c(26,21,"labels.buttons.Next")," ")}},dependencies:[y,I,ct,rt,it,pt,gt,st,lt,ot,nt,Ct,Pt,dt,Ot,At,Tt,St,Mt,B,me,Wt,ut,ne,w],styles:[".margin-t[_ngcontent-%COMP%]{margin-top:1em}"]})}}return t})();function Kr(t,s){if(t&1&&g(0,"mifosx-input-amount",2),t&2){let e=_();d("currency",e.currency)("isRequired",!0)("inputFormControl",e.fixedDepositAccountTermsForm.controls.depositAmount)("inputLabel","Deposit Amount")}}function Qr(t,s){if(t&1&&(n(0,"mat-option",7),a(1),r(2,"translateKey"),o()),t&2){let e=s.$implicit;d("value",e.id),i(),u(" ",E(2,2,e.value,"catalogs")," ")}}function Yr(t,s){if(t&1&&(n(0,"mat-option",7),a(1),r(2,"translateKey"),o()),t&2){let e=s.$implicit;d("value",e.id),i(),u(" ",E(2,2,e.value,"catalogs")," ")}}function Jr(t,s){if(t&1&&(n(0,"mat-option",7),a(1),r(2,"translateKey"),o()),t&2){let e=s.$implicit;d("value",e.id),i(),u(" ",E(2,2,e.value,"catalogs")," ")}}function Xr(t,s){if(t&1&&(n(0,"mat-option",7),a(1),r(2,"translateKey"),o()),t&2){let e=s.$implicit;d("value",e.id),i(),u(" ",E(2,2,e.value,"catalogs")," ")}}function Zr(t,s){if(t&1&&(n(0,"mat-option",7),a(1),r(2,"translateKey"),o()),t&2){let e=s.$implicit;d("value",e.id),i(),u(" ",E(2,2,e.value,"catalogs")," ")}}var xe=(()=>{class t{constructor(){this.formBuilder=x(mt),this.settingsService=x(U),this.minDate=new Date(2e3,0,1),this.maxDate=new Date,this.currency=null,this.createFixedDepositsAccountTermsForm()}ngOnChanges(){this.fixedDepositsAccountProductTemplate&&(this.currency=this.fixedDepositsAccountProductTemplate.currency,this.setOptions())}ngOnInit(){this.maxDate=this.settingsService.businessDate,this.fixedDepositsAccountTemplate.id&&this.fixedDepositAccountTermsForm.patchValue({interestCompoundingPeriodType:this.fixedDepositsAccountTemplate.interestCompoundingPeriodType.id,interestPostingPeriodType:this.fixedDepositsAccountTemplate.interestPostingPeriodType.id,interestCalculationType:this.fixedDepositsAccountTemplate.interestCalculationType.id,interestCalculationDaysInYearType:this.fixedDepositsAccountTemplate.interestCalculationDaysInYearType.id,depositAmount:this.fixedDepositsAccountTemplate.depositAmount?this.fixedDepositsAccountTemplate.depositAmount:0,depositPeriod:this.fixedDepositsAccountTemplate.depositPeriod,depositPeriodFrequencyId:this.fixedDepositsAccountTemplate.depositPeriodFrequency.id})}createFixedDepositsAccountTermsForm(){this.fixedDepositAccountTermsForm=this.formBuilder.group({interestCompoundingPeriodType:["",V.required],interestPostingPeriodType:["",V.required],interestCalculationType:["",V.required],interestCalculationDaysInYearType:["",V.required],depositAmount:[0,V.required],depositPeriod:["",V.required],depositPeriodFrequencyId:["",V.required]})}setOptions(){this.interestCompoundingPeriodTypeData=this.fixedDepositsAccountProductTemplate.interestCompoundingPeriodTypeOptions,this.interestPostingPeriodTypeData=this.fixedDepositsAccountProductTemplate.interestPostingPeriodTypeOptions,this.interestCalculationTypeData=this.fixedDepositsAccountProductTemplate.interestCalculationTypeOptions,this.interestCalculationDaysInYearTypeData=this.fixedDepositsAccountProductTemplate.interestCalculationDaysInYearTypeOptions,this.periodFrequencyTypeData=this.fixedDepositsAccountProductTemplate.periodFrequencyTypeOptions,this.fixedDepositsAccountTemplate.id||this.fixedDepositAccountTermsForm.patchValue({interestCompoundingPeriodType:this.fixedDepositsAccountProductTemplate.interestCompoundingPeriodType.id,interestPostingPeriodType:this.fixedDepositsAccountProductTemplate.interestPostingPeriodType.id,interestCalculationType:this.fixedDepositsAccountProductTemplate.interestCalculationType.id,interestCalculationDaysInYearType:this.fixedDepositsAccountProductTemplate.interestCalculationDaysInYearType.id,depositAmount:this.fixedDepositsAccountProductTemplate.depositAmount,depositPeriod:this.fixedDepositsAccountProductTemplate.minDepositTerm,depositPeriodFrequencyId:this.fixedDepositsAccountProductTemplate.minDepositTermType.id})}get fixedDepositAccountTerms(){let e=this.fixedDepositAccountTermsForm.value;for(let l in e)e[l]===""&&delete e[l];return e}static{this.\u0275fac=function(l){return new(l||t)}}static{this.\u0275cmp=O({type:t,selectors:[["mifosx-fixed-deposit-account-terms-step"]],inputs:{fixedDepositsAccountTemplate:"fixedDepositsAccountTemplate",fixedDepositsAccountProductTemplate:"fixedDepositsAccountProductTemplate"},features:[Jt],decls:96,vars:80,consts:[[3,"formGroup"],[1,"layout-row-wrap","gap-2px","responsive-column"],[1,"flex-48",3,"currency","isRequired","inputFormControl","inputLabel"],[1,"flex-48","hide-lt-md"],[1,"flex-48"],["type","number","matInput","","formControlName","depositPeriod","required",""],["formControlName","depositPeriodFrequencyId","required",""],[3,"value"],[1,"flex-98"],["formControlName","interestCompoundingPeriodType","required",""],["formControlName","interestPostingPeriodType","required",""],["formControlName","interestCalculationType","required",""],["formControlName","interestCalculationDaysInYearType","required",""],[1,"layout-row","align-center","gap-2percent","margin-t","responsive-column"],["mat-raised-button","","matStepperPrevious",""],["icon","arrow-left",1,"m-r-10"],["mat-raised-button","","matStepperNext",""],["icon","arrow-right",1,"m-l-10"]],template:function(l,p){l&1&&(n(0,"form",0)(1,"div",1),h(2,Kr,1,4,"mifosx-input-amount",2),g(3,"span",3),n(4,"mat-form-field",4)(5,"mat-label"),a(6),r(7,"translate"),o(),g(8,"input",5),n(9,"mat-error"),a(10),r(11,"translate"),r(12,"translate"),n(13,"strong"),a(14),r(15,"translate"),o()()(),n(16,"mat-form-field",4)(17,"mat-label"),a(18),r(19,"translate"),o(),n(20,"mat-select",6),L(21,Qr,3,5,"mat-option",7,$),o(),n(23,"mat-error"),a(24),r(25,"translate"),r(26,"translate"),n(27,"strong"),a(28),r(29,"translate"),o()()(),g(30,"mat-divider",8),n(31,"mat-form-field",4)(32,"mat-label"),a(33),r(34,"translate"),o(),n(35,"mat-select",9),L(36,Yr,3,5,"mat-option",7,$),o(),n(38,"mat-error"),a(39),r(40,"translate"),r(41,"translate"),n(42,"strong"),a(43),r(44,"translate"),o()()(),n(45,"mat-form-field",4)(46,"mat-label"),a(47),r(48,"translate"),o(),n(49,"mat-select",10),L(50,Jr,3,5,"mat-option",7,$),o(),n(52,"mat-error"),a(53),r(54,"translate"),r(55,"translate"),n(56,"strong"),a(57),r(58,"translate"),o()()(),n(59,"mat-form-field",4)(60,"mat-label"),a(61),r(62,"translate"),o(),n(63,"mat-select",11),L(64,Xr,3,5,"mat-option",7,$),o(),n(66,"mat-error"),a(67),r(68,"translate"),r(69,"translate"),n(70,"strong"),a(71),r(72,"translate"),o()()(),n(73,"mat-form-field",4)(74,"mat-label"),a(75),r(76,"translate"),o(),n(77,"mat-select",12),L(78,Zr,3,5,"mat-option",7,$),o(),n(80,"mat-error"),a(81),r(82,"translate"),r(83,"translate"),n(84,"strong"),a(85),r(86,"translate"),o()()()(),n(87,"div",13)(88,"button",14),g(89,"fa-icon",15),a(90),r(91,"translate"),o(),n(92,"button",16),a(93),r(94,"translate"),g(95,"fa-icon",17),o()()()),l&2&&(d("formGroup",p.fixedDepositAccountTermsForm),i(2),v(p.currency?2:-1),i(4),m(c(7,28,"labels.inputs.Deposit Period")),i(4),T(" ",c(11,30,"labels.inputs.Deposit Period")," ",c(12,32,"labels.commons.is")," "),i(4),m(c(15,34,"labels.commons.required")),i(4),m(c(19,36,"labels.inputs.Deposit Period Type")),i(3),G(p.periodFrequencyTypeData),i(3),T(" ",c(25,38,"labels.inputs.Deposit Period Type")," ",c(26,40,"labels.commons.is")," "),i(4),m(c(29,42,"labels.commons.required")),i(5),m(c(34,44,"labels.inputs.Interest Compounding Period")),i(3),G(p.interestCompoundingPeriodTypeData),i(3),T(" ",c(40,46,"labels.inputs.Interest Compounding Period")," ",c(41,48,"labels.commons.is")," "),i(4),m(c(44,50,"labels.commons.required")),i(4),m(c(48,52,"labels.inputs.Interest Posting Period")),i(3),G(p.interestPostingPeriodTypeData),i(3),T(" ",c(54,54,"labels.inputs.Interest Posting Period")," ",c(55,56,"labels.commons.is")," "),i(4),m(c(58,58,"labels.commons.required")),i(4),m(c(62,60,"labels.inputs.Interest Calculated using")),i(3),G(p.interestCalculationTypeData),i(3),T(" ",c(68,62,"labels.inputs.Interest Calculated using")," ",c(69,64,"labels.commons.is")," "),i(4),m(c(72,66,"labels.commons.required")),i(4),m(c(76,68,"labels.inputs.Days in Year")),i(3),G(p.interestCalculationDaysInYearTypeData),i(3),T(" ",c(82,70,"labels.inputs.Days in Year")," ",c(83,72,"labels.commons.is")," "),i(4),m(c(86,74,"labels.commons.required")),i(5),u(" ",c(91,76,"labels.buttons.Previous")," "),i(3),u(" ",c(94,78,"labels.buttons.Next")," "))},dependencies:[y,I,ct,rt,jt,it,pt,gt,st,lt,ot,nt,Ct,dt,Ot,At,B,ei,Re,Wt,ut,ne,w,It],styles:["h4[_ngcontent-%COMP%]{font-weight:500;margin:1em 0}h3[_ngcontent-%COMP%]{font-weight:500}mat-divider[_ngcontent-%COMP%]{margin:1em 0 2em}.margin-v[_ngcontent-%COMP%]{margin:1em 0}.margin-b[_ngcontent-%COMP%]{margin:0 0 1em}.margin-t[_ngcontent-%COMP%]{margin-top:1em}"]})}}return t})();function tp(t,s){if(t&1&&(n(0,"mat-option",6),a(1),r(2,"translateKey"),o()),t&2){let e=s.$implicit;d("value",e.id),i(),u(" ",E(2,2,e.value,"catalogs")," ")}}function ep(t,s){if(t&1&&(n(0,"mat-option",6),a(1),r(2,"translateKey"),o()),t&2){let e=s.$implicit;d("value",e.id),i(),u(" ",E(2,2,e.value,"catalogs")," ")}}function ip(t,s){if(t&1&&(n(0,"mat-option",6),a(1),r(2,"translateKey"),o()),t&2){let e=s.$implicit;d("value",e.id),i(),u(" ",E(2,2,e.value,"catalogs")," ")}}function np(t,s){if(t&1&&(n(0,"mat-option",6),a(1),r(2,"translateKey"),o()),t&2){let e=s.$implicit;d("value",e.id),i(),u(" ",E(2,2,e.value,"catalogs")," ")}}function op(t,s){if(t&1&&(n(0,"mat-option",6),a(1),o()),t&2){let e=s.$implicit;d("value",e.id),i(),T(" (",e.accountNo,") ",e.savingsProductName," ")}}function ap(t,s){if(t&1&&(n(0,"mat-form-field",16)(1,"mat-label"),a(2),r(3,"translate"),o(),n(4,"mat-select",28),L(5,op,2,3,"mat-option",6,$),o(),n(7,"mat-error"),a(8),r(9,"translate"),r(10,"translate"),n(11,"strong"),a(12),r(13,"translate"),o()()()),t&2){let e=_();i(2),m(c(3,4,"labels.inputs.Linked Savings Account")),i(3),G(e.savingsAccountsData),i(3),T(" ",c(9,6,"labels.inputs.Linked Savings Account")," ",c(10,8,"labels.commons.is")," "),i(4),m(c(13,10,"labels.commons.required"))}}function rp(t,s){if(t&1&&(n(0,"mat-option",6),a(1),r(2,"translateKey"),o()),t&2){let e=s.$implicit;d("value",e.id),i(),u(" ",E(2,2,e.value,"catalogs")," ")}}function pp(t,s){if(t&1&&(n(0,"mat-option",6),a(1),o()),t&2){let e=s.$implicit;d("value",e.id),i(),T(" (",e.accountNo,") ",e.savingsProductName," ")}}function cp(t,s){if(t&1&&(n(0,"mat-form-field",18)(1,"mat-label"),a(2),r(3,"translate"),o(),n(4,"mat-select",29),L(5,pp,2,3,"mat-option",6,$),o(),n(7,"mat-error"),a(8),r(9,"translate"),r(10,"translate"),n(11,"strong"),a(12),r(13,"translate"),o()()()),t&2){let e=_();i(2),m(c(3,4,"labels.inputs.Transfer to savings account")),i(3),G(e.savingsAccountsData),i(3),T(" ",c(9,6,"labels.inputs.Transfer to savings account")," ",c(10,8,"labels.commons.is")," "),i(4),m(c(13,10,"labels.commons.required"))}}function sp(t,s){if(t&1&&(n(0,"mat-option",6),a(1),r(2,"translateKey"),o()),t&2){let e=s.$implicit;d("value",e.id),i(),u(" ",E(2,2,e.value,"catalogs")," ")}}function lp(t,s){t&1&&(n(0,"mat-form-field",31)(1,"mat-label"),a(2),r(3,"translate"),o(),g(4,"input",32),o()),t&2&&(i(2),m(c(3,1,"labels.inputs.Tax Group")))}function mp(t,s){if(t&1&&(g(0,"mat-divider",13),n(1,"mat-checkbox",30),a(2),r(3,"translate"),o(),h(4,lp,5,3,"mat-form-field",31)),t&2){let e=_();i(2),u(" ",c(3,2,"labels.inputs.Is Withhold Tax Applicable"),"? "),i(2),v(e.fixedDepositAccountSettingsForm.controls.taxGroupId?4:-1)}}var Ce=(()=>{class t{constructor(){this.formBuilder=x(mt),this.settingsService=x(U),this.minDate=new Date(2e3,0,1),this.maxDate=new Date,this.createFixedDepositAccountSettingsForm(),this.buildDependencies()}ngOnChanges(){this.fixedDepositsAccountProductTemplate&&(this.fixedDepositAccountSettingsForm.patchValue({minDepositTerm:this.fixedDepositsAccountProductTemplate.minDepositTerm,minDepositTermTypeId:this.fixedDepositsAccountProductTemplate.minDepositTermType?this.fixedDepositsAccountProductTemplate.minDepositTermType.id:"",inMultiplesOfDepositTerm:this.fixedDepositsAccountProductTemplate.inMultiplesOfDepositTerm,inMultiplesOfDepositTermTypeId:this.fixedDepositsAccountProductTemplate.inMultiplesOfDepositTermType?this.fixedDepositsAccountProductTemplate.inMultiplesOfDepositTermType.id:"",maxDepositTerm:this.fixedDepositsAccountProductTemplate.maxDepositTerm,maxDepositTermTypeId:this.fixedDepositsAccountProductTemplate.maxDepositTermType?this.fixedDepositsAccountProductTemplate.maxDepositTermType.id:"",preClosurePenalApplicable:this.fixedDepositsAccountProductTemplate.preClosurePenalApplicable,preClosurePenalInterest:this.fixedDepositsAccountProductTemplate.preClosurePenalInterest,preClosurePenalInterestOnTypeId:this.fixedDepositsAccountProductTemplate.preClosurePenalInterestOnType?this.fixedDepositsAccountProductTemplate.preClosurePenalInterestOnType.id:"",maturityInstructionId:this.fixedDepositsAccountProductTemplate.maturityInstructionId}),this.fixedDepositsAccountProductTemplate.withHoldTax?(this.fixedDepositAccountSettingsForm.addControl("withHoldTax",new Z(!1)),this.fixedDepositAccountSettingsForm.get("withHoldTax").valueChanges.subscribe(e=>{e?(this.fixedDepositAccountSettingsForm.addControl("taxGroupId",new Z({value:"",disabled:!0})),this.fixedDepositAccountSettingsForm.get("taxGroupId").patchValue(this.fixedDepositsAccountProductTemplate.taxGroup&&this.fixedDepositsAccountProductTemplate.taxGroup.name)):this.fixedDepositAccountSettingsForm.removeControl("taxGroupId")}),this.fixedDepositAccountSettingsForm.get("withHoldTax").patchValue(this.fixedDepositsAccountTemplate.withHoldTax)):this.fixedDepositAccountSettingsForm.removeControl("withHoldTax"),this.setOptions())}ngOnInit(){this.maxDate=this.settingsService.businessDate,this.fixedDepositsAccountTemplate&&this.fixedDepositAccountSettingsForm.patchValue({lockinPeriodFrequency:this.fixedDepositsAccountTemplate.lockinPeriodFrequency,lockinPeriodFrequencyType:this.fixedDepositsAccountTemplate.lockinPeriodFrequencyType&&this.fixedDepositsAccountTemplate.lockinPeriodFrequencyType.id,transferInterestToSavings:this.fixedDepositsAccountTemplate.transferInterestToSavings})}createFixedDepositAccountSettingsForm(){this.fixedDepositAccountSettingsForm=this.formBuilder.group({lockinPeriodFrequency:[""],lockinPeriodFrequencyType:[""],minDepositTerm:[{value:"",disabled:!0}],minDepositTermTypeId:[{value:"",disabled:!0}],inMultiplesOfDepositTerm:[{value:"",disabled:!0}],inMultiplesOfDepositTermTypeId:[{value:"",disabled:!0}],maxDepositTerm:[{value:"",disabled:!0}],maxDepositTermTypeId:[{value:"",disabled:!0}],transferInterestToSavings:[!1],preClosurePenalApplicable:[{value:"",disabled:!0}],preClosurePenalInterest:[{value:"",disabled:!0}],preClosurePenalInterestOnTypeId:[{value:"",disabled:!0}],maturityInstructionId:[""]})}buildDependencies(){this.fixedDepositAccountSettingsForm.get("transferInterestToSavings").valueChanges.subscribe(e=>{e?(this.fixedDepositAccountSettingsForm.addControl("linkAccountId",new Z("",V.required)),this.fixedDepositAccountSettingsForm.get("linkAccountId").patchValue(this.fixedDepositsAccountTemplate.linkedAccount&&this.fixedDepositsAccountTemplate.linkedAccount.id)):this.fixedDepositAccountSettingsForm.removeControl("linkAccountId")}),this.fixedDepositAccountSettingsForm.get("maturityInstructionId").valueChanges.subscribe(e=>{e>100?(this.fixedDepositAccountSettingsForm.addControl("transferToSavingsId",new Z("",V.required)),this.fixedDepositAccountSettingsForm.get("transferToSavingsId").patchValue(this.fixedDepositsAccountTemplate.transferToSavingsId&&this.fixedDepositsAccountTemplate.transferToSavingsId.id)):this.fixedDepositAccountSettingsForm.removeControl("transferToSavingsId")})}setOptions(){this.lockinPeriodFrequencyTypeData=this.fixedDepositsAccountProductTemplate.lockinPeriodFrequencyTypeOptions,this.periodFrequencyTypeData=this.fixedDepositsAccountProductTemplate.periodFrequencyTypeOptions,this.savingsAccountsData=this.fixedDepositsAccountProductTemplate.savingsAccounts,this.preClosurePenalInterestOnTypeData=this.fixedDepositsAccountProductTemplate.preClosurePenalInterestOnTypeOptions,this.maturityInstructionOptions=this.fixedDepositsAccountProductTemplate.maturityInstructionOptions}get fixedDepositAccountSettings(){let e=this.fixedDepositAccountSettingsForm.getRawValue();for(let l in e)(e[l]===""||l==="taxGroupId")&&delete e[l];return e}static{this.\u0275fac=function(l){return new(l||t)}}static{this.\u0275cmp=O({type:t,selectors:[["mifosx-fixed-deposit-account-settings-step"]],inputs:{fixedDepositsAccountTemplate:"fixedDepositsAccountTemplate",fixedDepositsAccountProductTemplate:"fixedDepositsAccountProductTemplate"},features:[Jt],decls:122,vars:85,consts:[[3,"formGroup"],[1,"layout-row-wrap","gap-2px","responsive-column"],[1,"mat-h4","flex-98"],[1,"flex-48"],["type","number","matInput","","formControlName","lockinPeriodFrequency"],["formControlName","lockinPeriodFrequencyType"],[3,"value"],["type","number","matInput","","formControlName","minDepositTerm","required",""],["formControlName","minDepositTermTypeId","required",""],["type","number","matInput","","formControlName","inMultiplesOfDepositTerm"],["formControlName","inMultiplesOfDepositTermTypeId"],["type","number","matInput","","formControlName","maxDepositTerm"],["formControlName","maxDepositTermTypeId"],[1,"flex-98"],[1,"mat-h3","flex-23"],["labelPosition","before","formControlName","transferInterestToSavings",1,"flex-32","margin-b"],[1,"margin-b","flex-48"],["formControlName","maturityInstructionId"],[1,"flex-48","margin-b"],[1,"mat-h4","flex-23"],["labelPosition","before","formControlName","preClosurePenalApplicable",1,"flex-73","margin-v"],["type","number","matInput","","formControlName","preClosurePenalInterest"],["formControlName","preClosurePenalInterestOnTypeId"],[1,"layout-row","align-center","gap-2percent","margin-t","responsive-column"],["mat-raised-button","","matStepperPrevious",""],["icon","arrow-left",1,"m-r-10"],["mat-raised-button","","matStepperNext",""],["icon","arrow-right",1,"m-l-10"],["formControlName","linkAccountId","required",""],["formControlName","transferToSavingsId","required",""],["labelPosition","before","formControlName","withHoldTax",1,"margin-p","flex-48"],[1,"p-b-25","flex-48"],["matInput","","formControlName","taxGroupId"]],template:function(l,p){l&1&&(n(0,"form",0)(1,"div",1)(2,"h4",2),a(3),r(4,"translate"),o(),n(5,"mat-form-field",3)(6,"mat-label"),a(7),r(8,"translate"),o(),g(9,"input",4),o(),n(10,"mat-form-field",3)(11,"mat-label"),a(12),r(13,"translate"),o(),n(14,"mat-select",5),L(15,tp,3,5,"mat-option",6,$),o()(),n(17,"h4",2),a(18),r(19,"translate"),o(),n(20,"mat-form-field",3)(21,"mat-label"),a(22),r(23,"translate"),o(),g(24,"input",7),n(25,"mat-error"),a(26),r(27,"translate"),r(28,"translate"),n(29,"strong"),a(30),r(31,"translate"),o()()(),n(32,"mat-form-field",3)(33,"mat-label"),a(34),r(35,"translate"),o(),n(36,"mat-select",8),L(37,ep,3,5,"mat-option",6,$),o(),n(39,"mat-error"),a(40),r(41,"translate"),r(42,"translate"),n(43,"strong"),a(44),r(45,"translate"),o()()(),n(46,"h4",2),a(47),r(48,"translate"),o(),n(49,"mat-form-field",3)(50,"mat-label"),a(51),r(52,"translate"),o(),g(53,"input",9),o(),n(54,"mat-form-field",3)(55,"mat-label"),a(56),r(57,"translate"),o(),n(58,"mat-select",10),L(59,ip,3,5,"mat-option",6,$),o()(),n(61,"h4",2),a(62),r(63,"translate"),o(),n(64,"mat-form-field",3)(65,"mat-label"),a(66),r(67,"translate"),o(),g(68,"input",11),o(),n(69,"mat-form-field",3)(70,"mat-label"),a(71),r(72,"translate"),o(),n(73,"mat-select",12),L(74,np,3,5,"mat-option",6,$),o()(),g(76,"mat-divider",13),n(77,"h3",14),a(78),r(79,"translate"),o(),n(80,"mat-checkbox",15),a(81),r(82,"translate"),o(),h(83,ap,14,12,"mat-form-field",16),g(84,"mat-divider",13),n(85,"mat-form-field",3)(86,"mat-label"),a(87),r(88,"translate"),o(),n(89,"mat-select",17),L(90,rp,3,5,"mat-option",6,$),o()(),h(92,cp,14,12,"mat-form-field",18),g(93,"mat-divider",13),n(94,"h4",19),a(95),r(96,"translate"),o(),n(97,"mat-checkbox",20),a(98),r(99,"translate"),o(),n(100,"mat-form-field",3)(101,"mat-label"),a(102),r(103,"translate"),o(),g(104,"input",21),o(),n(105,"mat-form-field",3)(106,"mat-label"),a(107),r(108,"translate"),o(),n(109,"mat-select",22),L(110,sp,3,5,"mat-option",6,$),o()(),h(112,mp,5,4),o(),n(113,"div",23)(114,"button",24),g(115,"fa-icon",25),a(116),r(117,"translate"),o(),n(118,"button",26),a(119),r(120,"translate"),g(121,"fa-icon",27),o()()()),l&2&&(d("formGroup",p.fixedDepositAccountSettingsForm),i(3),m(c(4,31,"labels.heading.Lock-in Period")),i(4),m(c(8,33,"labels.inputs.Frequency")),i(5),m(c(13,35,"labels.inputs.Type")),i(3),G(p.lockinPeriodFrequencyTypeData),i(3),m(c(19,37,"labels.heading.Minimum Deposit Term")),i(4),m(c(23,39,"labels.inputs.Frequency")),i(4),T(" ",c(27,41,"labels.inputs.Minimum Deposit Term Frequency")," ",c(28,43,"labels.commons.is")," "),i(4),m(c(31,45,"labels.commons.required")),i(4),m(c(35,47,"labels.inputs.Frequency Type")),i(3),G(p.periodFrequencyTypeData),i(3),T(" ",c(41,49,"labels.inputs.Minimum Deposit Term Frequency Type")," ",c(42,51,"labels.commons.is")," "),i(4),m(c(45,53,"labels.commons.required")),i(3),m(c(48,55,"labels.heading.And thereafter, in Multiples of")),i(4),m(c(52,57,"labels.inputs.Frequency")),i(5),m(c(57,59,"labels.inputs.Type")),i(3),G(p.periodFrequencyTypeData),i(3),m(c(63,61,"labels.heading.Maximum Deposit Term")),i(4),m(c(67,63,"labels.inputs.Frequency")),i(5),m(c(72,65,"labels.inputs.Type")),i(3),G(p.periodFrequencyTypeData),i(4),m(c(79,67,"labels.heading.Interest Transfer")),i(3),u(" ",c(82,69,"labels.inputs.Transfer Interest to Linked Savings Account"),"? "),i(2),v(p.fixedDepositAccountSettingsForm.contains("linkAccountId")?83:-1),i(4),m(c(88,71,"labels.inputs.Maturity Instructions")),i(3),G(p.maturityInstructionOptions),i(2),v(p.fixedDepositAccountSettingsForm.contains("transferToSavingsId")?92:-1),i(3),m(c(96,73,"labels.heading.For Pre-mature closure")),i(3),u(" ",c(99,75,"labels.inputs.Apply Penal Interest (less)")," "),i(4),u("",c(103,77,"labels.inputs.Penal Interest")," (%)"),i(5),m(c(108,79,"labels.inputs.Period")),i(3),G(p.preClosurePenalInterestOnTypeData),i(2),v(p.fixedDepositAccountSettingsForm.controls.withHoldTax?112:-1),i(4),u(" ",c(117,81,"labels.buttons.Previous")," "),i(3),u(" ",c(120,83,"labels.buttons.Next")," "))},dependencies:[y,I,ct,rt,jt,it,pt,gt,st,lt,ot,nt,Ct,dt,Ot,At,B,Ue,Re,Wt,ut,ne,w,It],styles:["h4[_ngcontent-%COMP%]{font-weight:500;margin:1em 0}h3[_ngcontent-%COMP%]{font-weight:500}mat-divider[_ngcontent-%COMP%]{margin:1em 0 2em}.margin-v[_ngcontent-%COMP%]{margin:1em 0}.margin-b[_ngcontent-%COMP%]{margin:0 0 1em}.margin-t[_ngcontent-%COMP%]{margin-top:1em}.margin-p[_ngcontent-%COMP%]{margin-top:1.7em}"]})}}return t})();var dp=()=>[2e3];function up(t,s){if(t&1&&(n(0,"mat-option",3),a(1),o()),t&2){let e=s.$implicit;d("value",e),i(),u(" ",e.name," ")}}function fp(t,s){t&1&&(n(0,"th",24),a(1),r(2,"translate"),o()),t&2&&(i(),m(c(2,1,"labels.inputs.name")))}function gp(t,s){if(t&1&&(n(0,"td",25),a(1),o()),t&2){let e=s.$implicit;i(),u(" ",e.name+", "+e.currency.displaySymbol," ")}}function xp(t,s){t&1&&(n(0,"th",24),a(1),r(2,"translate"),o()),t&2&&(i(),m(c(2,1,"labels.inputs.Type")))}function Cp(t,s){if(t&1&&(n(0,"td",25),a(1),o()),t&2){let e=s.$implicit;i(),u(" ",e.chargeCalculationType.value," ")}}function _p(t,s){t&1&&(n(0,"th",24),a(1),r(2,"translate"),o()),t&2&&(i(),m(c(2,1,"labels.inputs.Amount")))}function hp(t,s){if(t&1){let e=F();n(0,"td",25),a(1),n(2,"button",26),M("click",function(){let p=S(e).$implicit,f=_();return A(f.editChargeAmount(p))}),g(3,"fa-icon",27),o()()}if(t&2){let e=s.$implicit;i(),u(" ",e.amount," ")}}function vp(t,s){t&1&&(n(0,"th",24),a(1),r(2,"translate"),o()),t&2&&(i(),m(c(2,1,"labels.inputs.Collected On")))}function Dp(t,s){if(t&1&&(n(0,"td",25),a(1),o()),t&2){let e=s.$implicit;i(),u(" ",e.chargeTimeType.value," ")}}function bp(t,s){t&1&&(n(0,"th",24),a(1),r(2,"translate"),o()),t&2&&(i(),m(c(2,1,"labels.inputs.Date")))}function Pp(t,s){if(t&1&&(n(0,"span"),a(1),r(2,"dateFormat"),o()),t&2){let e=_().$implicit;i(),u(" ",c(2,1,e.dueDate)||"Unassigned*"," ")}}function Mp(t,s){if(t&1&&(n(0,"span"),a(1),r(2,"dateFormat"),o()),t&2){let e=_().$implicit;i(),u(" ",e.feeOnMonthDay?E(2,1,R(4,dp).concat(e.feeOnMonthDay),"dd MMMM"):"Unassigned"," ")}}function Tp(t,s){t&1&&(n(0,"span"),a(1),r(2,"translate"),o()),t&2&&(i(),u(" ",c(2,1,"labels.inputs.N/A")," "))}function Sp(t,s){if(t&1){let e=F();n(0,"button",26),M("click",function(){S(e);let p=_().$implicit,f=_();return A(f.editChargeDate(p))}),g(1,"fa-icon",27),o()}}function Ap(t,s){if(t&1&&(n(0,"td",25),h(1,Pp,3,3,"span"),h(2,Mp,3,5,"span"),h(3,Tp,3,3,"span"),h(4,Sp,2,0,"button",28),o()),t&2){let e=s.$implicit;i(),v(e.chargeTimeType.value==="Specified due date"||e.chargeTimeType.value==="Weekly Fee"?1:-1),i(),v(e.chargeTimeType.value==="Monthly Fee"||e.chargeTimeType.value==="Annual Fee"?2:-1),i(),v(e.chargeTimeType.value==="Monthly Fee"||e.chargeTimeType.value==="Annual Fee"||e.chargeTimeType.value==="Specified due date"||e.chargeTimeType.value==="Weekly Fee"?-1:3),i(),v(e.chargeTimeType.value==="Weekly Fee"||e.chargeTimeType.value==="Annual Fee"||e.chargeTimeType.value==="Specified due date"?4:-1)}}function Op(t,s){t&1&&(n(0,"th",24),a(1),r(2,"translate"),o()),t&2&&(i(),m(c(2,1,"labels.inputs.Repayments Every")))}function yp(t,s){if(t&1){let e=F();n(0,"button",26),M("click",function(){S(e);let p=_().$implicit,f=_();return A(f.editChargeFeeInterval(p))}),g(1,"fa-icon",27),o()}}function Ip(t,s){if(t&1&&(n(0,"td",25),a(1),h(2,yp,2,0,"button",28),o()),t&2){let e=s.$implicit;i(),u(" ",e.feeInterval||"Not Provided"," "),i(),v(e.chargeTimeType.value==="Weekly Fee"||e.chargeTimeType.value==="Monthly Fee"?2:-1)}}function Fp(t,s){t&1&&(n(0,"th",24),a(1),r(2,"translate"),o()),t&2&&(i(),m(c(2,1,"labels.inputs.Actions")))}function wp(t,s){if(t&1){let e=F();n(0,"td",25)(1,"button",29),M("click",function(){let p=S(e).$implicit,f=_();return A(f.deleteCharge(p))}),g(2,"fa-icon",30),o()()}}function Ep(t,s){t&1&&g(0,"tr",31)}function Bp(t,s){t&1&&g(0,"tr",32)}var _e=(()=>{class t{constructor(){this.dialog=x(Ut),this.dateUtils=x(et),this.settingsService=x(U),this.currency=null,this.chargesDataSource=[],this.displayedColumns=["name","chargeCalculationType","amount","chargeTimeType","date","repaymentsEvery","action"],this.isChargesPatched=!1,this.pristine=!0}ngOnInit(){this.chargesDataSource=[],this.fixedDepositsAccountTemplate.id&&this.fixedDepositsAccountTemplate.charges&&(this.chargesDataSource=this.fixedDepositsAccountTemplate.charges.map(e=>X(H({},e),{id:e.chargeId}))||[])}ngOnChanges(){this.currency==null&&(this.fixedDepositsAccountTemplate.currency?this.currency=this.fixedDepositsAccountTemplate.currency:this.fixedDepositsAccountProductTemplate&&this.fixedDepositsAccountProductTemplate.currency&&(this.currency=this.fixedDepositsAccountProductTemplate.currency)),this.fixedDepositsAccountProductTemplate&&(this.chargeData=this.fixedDepositsAccountProductTemplate.chargeOptions.filter(e=>e.currency.code===this.currency.code))}addCharge(e){this.chargesDataSource=this.chargesDataSource.concat([e.value]),e.value="",this.pristine=!1}editChargeAmount(e){let l=[new Ne({controlName:"amount",label:"Amount",value:e.amount,type:"number",required:!1})],p={title:"Edit Charge Amount",layout:{addButtonText:"Confirm"},formfields:l};this.dialog.open(he,{data:p}).afterClosed().subscribe(D=>{if(D.data){let q=X(H({},e),{amount:D.data.value.amount});this.chargesDataSource.splice(this.chargesDataSource.indexOf(e),1,q),this.chargesDataSource=this.chargesDataSource.concat([])}}),this.pristine=!1}editChargeDate(e){let l=[new ti({controlName:"date",label:"Date",value:e.dueDate||e.feeOnMonthDay||"",type:"datetime-local",required:!1})],p={title:"Edit Charge Date",layout:{addButtonText:"Confirm"},formfields:l};this.dialog.open(he,{data:p}).afterClosed().subscribe(D=>{if(D.data){let q,re=this.settingsService.dateFormat,pe=this.dateUtils.formatDate(D.data.value.date,re);switch(e.chargeTimeType.value){case"Specified due date":case"Weekly Fee":q=X(H({},e),{dueDate:pe});break;case"Annual Fee":q=X(H({},e),{feeOnMonthDay:pe});break}this.chargesDataSource.splice(this.chargesDataSource.indexOf(e),1,q),this.chargesDataSource=this.chargesDataSource.concat([])}}),this.pristine=!1}editChargeFeeInterval(e){let l=[new Ne({controlName:"feeInterval",label:"Fee Interval",value:e.feeInterval,type:"text",required:!1})],p={title:"Edit Charge Fee Interval",layout:{addButtonText:"Confirm"},formfields:l};this.dialog.open(he,{data:p}).afterClosed().subscribe(D=>{if(D.data){let q=X(H({},e),{feeInterval:D.data.value.feeInterval});this.chargesDataSource.splice(this.chargesDataSource.indexOf(e),1,q),this.chargesDataSource=this.chargesDataSource.concat([])}}),this.pristine=!1}deleteCharge(e){this.chargesDataSource.splice(this.chargesDataSource.indexOf(e),1),this.chargesDataSource=this.chargesDataSource.concat([]),this.pristine=!1}get fixedDepositAccountCharges(){return{charges:this.chargesDataSource}}static{this.\u0275fac=function(l){return new(l||t)}}static{this.\u0275cmp=O({type:t,selectors:[["mifosx-fixed-deposit-account-charges-step"]],inputs:{fixedDepositsAccountTemplate:"fixedDepositsAccountTemplate",fixedDepositsAccountProductTemplate:"fixedDepositsAccountProductTemplate",fixedDepositAccountFormValid:"fixedDepositAccountFormValid"},features:[Jt],decls:47,vars:18,consts:[["charge",""],[1,"layout-row-wrap","gap-2px","responsive-column"],[1,"flex-48"],[3,"value"],[1,"flex-48","align-center"],["type","button","mat-raised-button","","color","primary",3,"click","disabled"],["icon","plus",1,"m-r-10"],["mat-table","",1,"flex-98","mat-elevation-z1",3,"dataSource","hidden"],["matColumnDef","name"],["mat-header-cell","",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","chargeCalculationType"],["matColumnDef","amount"],["matColumnDef","chargeTimeType"],["matColumnDef","date"],["matColumnDef","repaymentsEvery"],["matColumnDef","action"],["mat-header-row","",4,"matHeaderRowDef"],["mat-row","",4,"matRowDef","matRowDefColumns"],[1,"layout-row","responsive-column","align-center","gap-2px","margin-t"],["mat-raised-button","","matStepperPrevious",""],["icon","arrow-left",1,"m-r-10"],["mat-raised-button","","matStepperNext","",3,"disabled"],["icon","arrow-right",1,"m-l-10"],["mat-header-cell",""],["mat-cell",""],["mat-icon-button","","color","primary",3,"click"],["icon","pen"],["mat-icon-button","","color","primary"],["mat-icon-button","","color","warn",3,"click"],["icon","trash"],["mat-header-row",""],["mat-row",""]],template:function(l,p){if(l&1){let f=F();n(0,"div",1)(1,"mat-form-field",2)(2,"mat-label"),a(3),r(4,"translate"),o(),n(5,"mat-select",null,0),L(7,up,2,2,"mat-option",3,$),o()(),n(9,"div",4)(10,"button",5),M("click",function(){S(f);let q=k(6);return A(p.addCharge(q))}),g(11,"fa-icon",6),a(12),r(13,"translate"),o()(),n(14,"table",7),b(15,8),C(16,fp,3,3,"th",9)(17,gp,2,1,"td",10),P(),b(18,11),C(19,xp,3,3,"th",9)(20,Cp,2,1,"td",10),P(),b(21,12),C(22,_p,3,3,"th",9)(23,hp,4,1,"td",10),P(),b(24,13),C(25,vp,3,3,"th",9)(26,Dp,2,1,"td",10),P(),b(27,14),C(28,bp,3,3,"th",9)(29,Ap,5,4,"td",10),P(),b(30,15),C(31,Op,3,3,"th",9)(32,Ip,3,2,"td",10),P(),b(33,16),C(34,Fp,3,3,"th",9)(35,wp,3,0,"td",10),P(),C(36,Ep,1,0,"tr",17)(37,Bp,1,0,"tr",18),o()(),n(38,"div",19)(39,"button",20),g(40,"fa-icon",21),a(41),r(42,"translate"),o(),n(43,"button",22),a(44),r(45,"translate"),g(46,"fa-icon",23),o()()}if(l&2){let f=k(6);i(3),m(c(4,10,"labels.inputs.Charge")),i(4),G(p.chargeData),i(3),d("disabled",!f.value),i(2),u(" ",c(13,12,"labels.buttons.Add")," "),i(2),d("dataSource",p.chargesDataSource)("hidden",p.chargesDataSource.length===0),i(22),d("matHeaderRowDef",p.displayedColumns),i(),d("matRowDefColumns",p.displayedColumns),i(4),u(" ",c(42,14,"labels.buttons.Previous")," "),i(2),d("disabled",!p.fixedDepositAccountFormValid),i(),u(" ",c(45,16,"labels.buttons.Next")," ")}},dependencies:[y,I,ot,nt,Ot,At,B,ut,wt,kt,Bt,Rt,Et,Nt,Ee,Vt,zt,qt,Ht,Wt,ne,yt,w],styles:["table[_ngcontent-%COMP%]{width:100%}.mat-elevation-z1[_ngcontent-%COMP%]{margin:1em 0 1.5em}.margin-t[_ngcontent-%COMP%]{margin-top:1em}"]})}}return t})();var kp=["chartsTable"];function Rp(t,s){if(t&1&&(n(0,"div",3)(1,"span",4),a(2),r(3,"translate"),o(),n(4,"span",5),a(5),o()()),t&2){let e=_();i(2),u("",c(3,2,"labels.inputs.name"),":"),i(3),m(e.fixedDepositsAccountProductTemplate.accountChart.name)}}function Np(t,s){if(t&1&&(n(0,"div",3)(1,"span",4),a(2),r(3,"translate"),o(),n(4,"span",5),a(5),r(6,"dateFormat"),o()()),t&2){let e=_();i(2),u("",c(3,2,"labels.inputs.End Date"),":"),i(3),m(c(6,4,e.fixedDepositsAccountProductTemplate==null?null:e.fixedDepositsAccountProductTemplate.accountChart.endDate))}}function Vp(t,s){if(t&1&&(n(0,"div",3)(1,"span",4),a(2),r(3,"translate"),o(),n(4,"span",5),a(5),o()()),t&2){let e=_();i(2),u("",c(3,2,"labels.inputs.Description"),":"),i(3),m(e.fixedDepositsAccountProductTemplate==null?null:e.fixedDepositsAccountProductTemplate.accountChart.description)}}function qp(t,s){t&1&&(n(0,"th",23),a(1),r(2,"translate"),o()),t&2&&(i(),m(c(2,1,"labels.inputs.Period")))}function zp(t,s){if(t&1&&(n(0,"td",24),a(1),o()),t&2){let e=s.$implicit;i(),ce(" ",e.fromPeriod,"-",e.toPeriod,"\xA0",e.periodType.value," ")}}function Hp(t,s){t&1&&(n(0,"th",23),a(1),r(2,"translate"),o()),t&2&&(i(),m(c(2,1,"labels.inputs.Amount Range")))}function $p(t,s){if(t&1&&(n(0,"td",24),a(1),o()),t&2){let e=s.$implicit;i(),T("",e.amountRangeFrom,"-",e.amountRangeTo)}}function Lp(t,s){t&1&&(n(0,"th",23),a(1),r(2,"translate"),o()),t&2&&(i(),m(c(2,1,"labels.inputs.Interest")))}function Gp(t,s){if(t&1&&(n(0,"td",24),a(1),o()),t&2){let e=s.$implicit;i(),m(e.annualInterestRate)}}function Up(t,s){t&1&&(n(0,"th",23),a(1),r(2,"translate"),o()),t&2&&(i(),m(c(2,1,"labels.inputs.Description")))}function jp(t,s){if(t&1&&(n(0,"td",24),a(1),o()),t&2){let e=s.$implicit;i(),m(e.description)}}function Wp(t,s){t&1&&(n(0,"th",23),a(1),r(2,"translate"),o()),t&2&&(i(),m(c(2,1,"labels.inputs.Actions")))}function Kp(t,s){t&1&&(n(0,"span"),g(1,"fa-icon",27),a(2),r(3,"translate"),o()),t&2&&(i(2),u(" ",c(3,1,"labels.buttons.View Incentives")," "))}function Qp(t,s){t&1&&(n(0,"span"),g(1,"fa-icon",28),a(2),r(3,"translate"),o()),t&2&&(i(2),u(" ",c(3,1,"labels.buttons.Hide Incentives")," "))}function Yp(t,s){if(t&1){let e=F();n(0,"td",24)(1,"button",25),M("click",function(){let p=S(e).dataIndex,f=_();return A(f.expandChartSlabIndex=f.expandChartSlabIndex===p?null:p)}),C(2,Kp,4,3,"span",26)(3,Qp,4,3,"span",26),o()()}if(t&2){let e=s.dataIndex,l=_();i(2),d("ngIf",l.expandChartSlabIndex!==e),i(),d("ngIf",l.expandChartSlabIndex===e)}}function Jp(t,s){t&1&&(n(0,"th",23),a(1),r(2,"translate"),o()),t&2&&(i(),m(c(2,1,"labels.inputs.Entity Type")))}function Xp(t,s){if(t&1&&(n(0,"td",24),a(1),o()),t&2){let e=s.$implicit;i(),u(" ",e.entityType.value," ")}}function Zp(t,s){t&1&&(n(0,"th",23),a(1),r(2,"translate"),o()),t&2&&(i(),m(c(2,1,"labels.inputs.Attribute Name")))}function tc(t,s){if(t&1&&(n(0,"td",24),a(1),o()),t&2){let e=s.$implicit;i(),u(" ",e.attributeName.value," ")}}function ec(t,s){t&1&&(n(0,"th",23),a(1),r(2,"translate"),o()),t&2&&(i(),m(c(2,1,"labels.inputs.Condition Type")))}function ic(t,s){if(t&1&&(n(0,"td",24),a(1),r(2,"titlecase"),o()),t&2){let e=s.$implicit;i(),u(" ",c(2,1,e.conditionType.value)," ")}}function nc(t,s){t&1&&(n(0,"th",23),a(1),r(2,"translate"),o()),t&2&&(i(),m(c(2,1,"labels.inputs.Attribute Value")))}function oc(t,s){if(t&1&&(n(0,"td",41),a(1),o()),t&2){let e=s.$implicit;d("ngSwitch",e.attributeName),i(),u(" ",e.attributeValueDesc," ")}}function ac(t,s){t&1&&(n(0,"th",23),a(1),r(2,"translate"),o()),t&2&&(i(),m(c(2,1,"labels.inputs.Incentive Type")))}function rc(t,s){if(t&1&&(n(0,"td",24),a(1),o()),t&2){let e=s.$implicit;i(),u(" ",e.incentiveType.value," ")}}function pc(t,s){t&1&&(n(0,"th",23),a(1),r(2,"translate"),o()),t&2&&(i(),m(c(2,1,"labels.inputs.Interest")))}function cc(t,s){if(t&1&&(n(0,"td",24),a(1),o()),t&2){let e=s.$implicit;i(),u(" ",e.amount," ")}}function sc(t,s){t&1&&g(0,"tr",42)}function lc(t,s){t&1&&g(0,"tr",43)}function mc(t,s){if(t&1&&(n(0,"table",33),b(1,34),C(2,Jp,3,3,"th",8)(3,Xp,2,1,"td",9),P(),b(4,35),C(5,Zp,3,3,"th",8)(6,tc,2,1,"td",9),P(),b(7,36),C(8,ec,3,3,"th",8)(9,ic,3,3,"td",9),P(),b(10,37),C(11,nc,3,3,"th",8)(12,oc,2,2,"td",38),P(),b(13,39),C(14,ac,3,3,"th",8)(15,rc,2,1,"td",9),P(),b(16,40),C(17,pc,3,3,"th",8)(18,cc,2,1,"td",9),P(),C(19,sc,1,0,"tr",15)(20,lc,1,0,"tr",16),o()),t&2){let e=_().$implicit,l=_();d("dataSource",e.incentives),i(19),d("matHeaderRowDef",l.incentivesDisplayedColumns),i(),d("matRowDefColumns",l.incentivesDisplayedColumns)}}function dc(t,s){if(t&1&&(n(0,"td",24)(1,"div",29)(2,"mat-card",30)(3,"h4",31),a(4),r(5,"translate"),o(),C(6,mc,21,3,"table",32),o()()()),t&2){let e=s.$implicit,l=s.dataIndex,p=_();Te("colspan",p.chartSlabsDisplayedColumns.length),i(),d("@expandChartSlab",l===p.expandChartSlabIndex?"expanded":"collapsed"),i(3),u(" ",c(5,4,"labels.heading.Incentives")," "),i(2),d("ngIf",e.incentives.length)}}function uc(t,s){t&1&&g(0,"tr",42)}function fc(t,s){t&1&&g(0,"tr",43)}function gc(t,s){t&1&&g(0,"tr",44)}var Ve=(()=>{class t{constructor(){this.interestRateChartData=[],this.chartSlabsDisplayedColumns=["period","amountRange","interest","description","actions"],this.incentivesDisplayedColumns=["entityType","attributeName","conditionType","attributeValue","incentiveType","amount"],this.chartSlabsIncentivesDisplayedColumns=["incentives"]}ngOnChanges(){this.fixedDepositsAccountProductTemplate&&(this.interestRateChartData=this.fixedDepositsAccountProductTemplate.accountChart.chartSlabs,this.chartsTableRef.renderRows())}static{this.\u0275fac=function(l){return new(l||t)}}static{this.\u0275cmp=O({type:t,selectors:[["mifosx-fixed-deposit-account-interest-rate-chart-step"]],viewQuery:function(l,p){if(l&1&&ht(kp,7),l&2){let f;vt(f=Dt())&&(p.chartsTableRef=f.first)}},inputs:{fixedDepositsAccountTemplate:"fixedDepositsAccountTemplate",fixedDepositsAccountProductTemplate:"fixedDepositsAccountProductTemplate"},features:[Jt],decls:48,vars:23,consts:[["chartsTable",""],[1,"layout-column","gap-2px"],["class","flex-fill",4,"ngIf"],[1,"flex-fill"],[1,"flex-40"],[1,"flex-60"],["mat-table","","multiTemplateDataRows","",1,"mat-elevation-z1",3,"dataSource"],["matColumnDef","period"],["mat-header-cell","",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","amountRange"],["matColumnDef","interest"],["matColumnDef","description"],["matColumnDef","actions"],["matColumnDef","incentives"],["mat-header-row","",4,"matHeaderRowDef"],["mat-row","",4,"matRowDef","matRowDefColumns"],["mat-row","","class","incentives-row",4,"matRowDef","matRowDefColumns"],[1,"layout-row","responsive-column","align-center","gap-2px","margin-t"],["mat-raised-button","","matStepperPrevious",""],["icon","arrow-left",1,"m-r-10"],["mat-raised-button","","matStepperNext",""],["icon","arrow-right",1,"m-l-10"],["mat-header-cell",""],["mat-cell",""],["mat-button","","color","primary",3,"click"],[4,"ngIf"],["icon","eye",1,"m-r-10"],["icon","eye-slash",1,"m-r-10"],[1,"incentives","layout-row-wrap","flex-fill"],[1,"layout-row-wrap","flex-fill"],[1,"m-b-10","flex-13"],["class","flex-fill mat-elevation-z1","mat-table","",3,"dataSource",4,"ngIf"],["mat-table","",1,"flex-fill","mat-elevation-z1",3,"dataSource"],["matColumnDef","entityType"],["matColumnDef","attributeName"],["matColumnDef","conditionType"],["matColumnDef","attributeValue"],["mat-cell","",3,"ngSwitch",4,"matCellDef"],["matColumnDef","incentiveType"],["matColumnDef","amount"],["mat-cell","",3,"ngSwitch"],["mat-header-row",""],["mat-row",""],["mat-row","",1,"incentives-row"]],template:function(l,p){l&1&&(n(0,"div",1),C(1,Rp,6,4,"div",2),n(2,"div",3)(3,"span",4),a(4),r(5,"translate"),o(),n(6,"span",5),a(7),r(8,"dateFormat"),o()(),C(9,Np,7,6,"div",2)(10,Vp,6,4,"div",2),n(11,"div",3)(12,"span",4),a(13),r(14,"translate"),o(),n(15,"span",5),a(16),o()(),n(17,"table",6,0),b(19,7),C(20,qp,3,3,"th",8)(21,zp,2,3,"td",9),P(),b(22,10),C(23,Hp,3,3,"th",8)(24,$p,2,2,"td",9),P(),b(25,11),C(26,Lp,3,3,"th",8)(27,Gp,2,1,"td",9),P(),b(28,12),C(29,Up,3,3,"th",8)(30,jp,2,1,"td",9),P(),b(31,13),C(32,Wp,3,3,"th",8)(33,Yp,4,2,"td",9),P(),b(34,14),C(35,dc,7,6,"td",9),P(),C(36,uc,1,0,"tr",15)(37,fc,1,0,"tr",16)(38,gc,1,0,"tr",17),o()(),n(39,"div",18)(40,"button",19),g(41,"fa-icon",20),a(42),r(43,"translate"),o(),n(44,"button",21),a(45),r(46,"translate"),g(47,"fa-icon",22),o()()),l&2&&(i(),d("ngIf",p.fixedDepositsAccountProductTemplate==null?null:p.fixedDepositsAccountProductTemplate.accountChart.name),i(3),u("",c(5,13,"labels.inputs.Valid from Date"),":"),i(3),m(c(8,15,p.fixedDepositsAccountProductTemplate==null?null:p.fixedDepositsAccountProductTemplate.accountChart.fromDate)),i(2),d("ngIf",p.fixedDepositsAccountProductTemplate==null?null:p.fixedDepositsAccountProductTemplate.accountChart.endDate),i(),d("ngIf",p.fixedDepositsAccountProductTemplate==null?null:p.fixedDepositsAccountProductTemplate.accountChart.description),i(3),u("",c(14,17,"labels.inputs.Primary Grouping by Amount"),":"),i(3),m(p.fixedDepositsAccountProductTemplate!=null&&p.fixedDepositsAccountProductTemplate.accountChart.isPrimaryGroupingByAmount?"Yes":"No"),i(),d("dataSource",p.interestRateChartData),i(19),d("matHeaderRowDef",p.chartSlabsDisplayedColumns),i(),d("matRowDefColumns",p.chartSlabsDisplayedColumns),i(),d("matRowDefColumns",p.chartSlabsIncentivesDisplayedColumns),i(4),u(" ",c(43,19,"labels.buttons.Previous")," "),i(3),u(" ",c(46,21,"labels.buttons.Next")," "))},dependencies:[y,Ae,Oe,I,Y,B,wt,kt,Bt,Rt,Et,Nt,ut,Vt,zt,qt,Ht,Wt,ne,ye,yt,w],styles:[".margin-t[_ngcontent-%COMP%]{margin-top:2em}table[_ngcontent-%COMP%]{width:100%}table[_ngcontent-%COMP%] tr.incentives-row[_ngcontent-%COMP%]{height:0}table[_ngcontent-%COMP%] tr.incentives-row[_ngcontent-%COMP%] > td[_ngcontent-%COMP%]{padding:0}table[_ngcontent-%COMP%] tr.incentives-row[_ngcontent-%COMP%] .incentives[_ngcontent-%COMP%]{overflow:hidden}table[_ngcontent-%COMP%] tr.incentives-row[_ngcontent-%COMP%] .mat-card[_ngcontent-%COMP%]{border-radius:0}"],data:{animation:[Ie("expandChartSlab",[ae("collapsed",oe({height:"0px",minHeight:"0"})),ae("expanded",oe({height:"*"})),we("expanded <=> collapsed",Fe("225ms cubic-bezier(0.4, 0.0, 0.2, 1)"))])]}})}}return t})();var xc=()=>["../.."],Cc=()=>[2e3];function _c(t,s){if(t&1&&(n(0,"div",3)(1,"span",4),a(2),r(3,"translate"),o(),n(4,"span",5),a(5),o()()),t&2){let e=_();i(2),m(c(3,2,"labels.inputs.External Id")),i(3),m(e.fixedDepositAccountData.externalId)}}function hc(t,s){if(t&1&&(n(0,"div",3)(1,"span",4),a(2),r(3,"translate"),o(),n(4,"span",5),a(5),r(6,"find"),r(7,"translateKey"),o()()),t&2){let e=_();i(2),u("",c(3,3,"labels.inputs.Lock-in Period"),":"),i(3),T("",e.fixedDepositAccountData.lockinPeriodFrequency," ",E(7,10,at(6,5,e.fixedDepositAccountData.lockinPeriodFrequencyType,e.fixedDepositsAccountProductTemplate.lockinPeriodFrequencyTypeOptions,"id","value"),"catalogs"))}}function vc(t,s){if(t&1&&(n(0,"div",3)(1,"span",4),a(2),r(3,"translate"),o(),n(4,"span",5),a(5),r(6,"translateKey"),o()()),t&2){let e=_();i(2),u("",c(3,3,"labels.inputs.Minimum Deposit Term"),":"),i(3),T("",e.fixedDepositsAccountProductTemplate.minDepositTerm," ",E(6,5,e.fixedDepositsAccountProductTemplate.minDepositTermType==null?null:e.fixedDepositsAccountProductTemplate.minDepositTermType.value,"catalogs"))}}function Dc(t,s){if(t&1&&(n(0,"div",3)(1,"span",4),a(2),r(3,"translate"),o(),n(4,"span",5),a(5),r(6,"translateKey"),o()()),t&2){let e=_();i(2),u("",c(3,3,"labels.inputs.In Multiples Of"),":"),i(3),T("",e.fixedDepositsAccountProductTemplate.inMultiplesOfDepositTerm," ",E(6,5,e.fixedDepositsAccountProductTemplate.inMultiplesOfDepositTermType==null?null:e.fixedDepositsAccountProductTemplate.inMultiplesOfDepositTermType.value,"catalogs"))}}function bc(t,s){if(t&1&&(n(0,"div",3)(1,"span",4),a(2),r(3,"translate"),o(),n(4,"span",5),a(5),r(6,"translateKey"),o()()),t&2){let e=_();i(2),m(c(3,3,"labels.inputs.Maximum Deposit Term")),i(3),T("",e.fixedDepositsAccountProductTemplate.maxDepositTerm," ",E(6,5,e.fixedDepositsAccountProductTemplate.maxDepositTermType==null?null:e.fixedDepositsAccountProductTemplate.maxDepositTermType.value,"catalogs"))}}function Pc(t,s){if(t&1&&(n(0,"div",3)(1,"span",4),a(2),r(3,"translate"),o(),n(4,"span",5),a(5),r(6,"find"),o()()),t&2){let e=_();i(2),m(c(3,2,"labels.inputs.Linked Savings Account")),i(3),m(at(6,4,e.fixedDepositAccountData.linkAccountId,e.fixedDepositsAccountProductTemplate.savingsAccounts,"id","accountNo"))}}function Mc(t,s){if(t&1&&(n(0,"div",3)(1,"span",4),a(2),r(3,"translate"),o(),n(4,"span",5),a(5),r(6,"find"),r(7,"translateKey"),o()()),t&2){let e=_();i(2),m(c(3,2,"labels.inputs.Maturity Instructions")),i(3),m(E(7,9,at(6,4,e.fixedDepositAccountData.maturityInstructionId,e.fixedDepositsAccountProductTemplate.maturityInstructionOptions,"id","value"),"catalogs"))}}function Tc(t,s){if(t&1&&(n(0,"div",3)(1,"span",4),a(2),r(3,"translate"),o(),n(4,"span",5),a(5),o()()),t&2){let e=_();i(2),u("",c(3,2,"labels.inputs.Penal Interest")," (%):"),i(3),m(e.fixedDepositsAccountProductTemplate.preClosurePenalInterest+"% ("+(e.fixedDepositsAccountProductTemplate.preClosurePenalInterestOnType==null?null:e.fixedDepositsAccountProductTemplate.preClosurePenalInterestOnType.id)+")")}}function Sc(t,s){if(t&1&&(n(0,"div",3)(1,"span",4),a(2),r(3,"translate"),o(),n(4,"span",5),a(5),r(6,"yesNo"),o()()),t&2){let e=_();i(2),u("",c(3,2,"labels.inputs.Withhold Tax is Applicable"),":"),i(3),m(c(6,4,e.fixedDepositAccountData.withHoldTax))}}function Ac(t,s){if(t&1&&(n(0,"div",3)(1,"span",4),a(2),r(3,"translate"),o(),n(4,"span",5),a(5),o()()),t&2){let e=_();i(2),u("",c(3,2,"labels.inputs.name"),":"),i(3),m(e.fixedDepositsAccountProductTemplate==null?null:e.fixedDepositsAccountProductTemplate.accountChart.name)}}function Oc(t,s){if(t&1&&(n(0,"div",3)(1,"span",4),a(2),r(3,"translate"),o(),n(4,"span",5),a(5),r(6,"dateFormat"),o()()),t&2){let e=_();i(2),u("",c(3,2,"labels.inputs.End Date"),":"),i(3),m(c(6,4,e.fixedDepositsAccountProductTemplate==null?null:e.fixedDepositsAccountProductTemplate.accountChart.endDate))}}function yc(t,s){if(t&1&&(n(0,"div",3)(1,"span",4),a(2),r(3,"translate"),o(),n(4,"span",5),a(5),o()()),t&2){let e=_();i(2),u("",c(3,2,"labels.inputs.Description"),":"),i(3),m(e.fixedDepositsAccountProductTemplate==null?null:e.fixedDepositsAccountProductTemplate.accountChart.description)}}function Ic(t,s){t&1&&(n(0,"th",25),a(1),r(2,"translate"),o()),t&2&&(i(),m(c(2,1,"labels.inputs.Period")))}function Fc(t,s){if(t&1&&(n(0,"td",26),a(1),r(2,"translateKey"),o()),t&2){let e=s.$implicit;i(),ce(" ",e.fromPeriod," - ",e.toPeriod,"\xA0",E(2,3,e.periodType.value,"catalogs")," ")}}function wc(t,s){t&1&&(n(0,"th",25),a(1),r(2,"translate"),o()),t&2&&(i(),m(c(2,1,"labels.inputs.Amount Range")))}function Ec(t,s){if(t&1&&(n(0,"td",26),a(1),r(2,"formatNumber"),r(3,"formatNumber"),o()),t&2){let e=s.$implicit;i(),T(" ",c(2,2,e.amountRangeFrom)," - ",c(3,4,e.amountRangeTo)," ")}}function Bc(t,s){t&1&&(n(0,"th",25),a(1),r(2,"translate"),o()),t&2&&(i(),m(c(2,1,"labels.inputs.Interest")))}function kc(t,s){if(t&1&&(n(0,"td",26),a(1),r(2,"formatNumber"),o()),t&2){let e=s.$implicit;i(),u("",c(2,1,e.annualInterestRate)," %")}}function Rc(t,s){t&1&&(n(0,"th",25),a(1),r(2,"translate"),o()),t&2&&(i(),m(c(2,1,"labels.inputs.Description")))}function Nc(t,s){if(t&1&&(n(0,"td",26),a(1),o()),t&2){let e=s.$implicit;i(),m(e.description)}}function Vc(t,s){t&1&&(n(0,"th",25),a(1),r(2,"translate"),o()),t&2&&(i(),m(c(2,1,"labels.inputs.Actions")))}function qc(t,s){t&1&&(n(0,"span"),g(1,"fa-icon",29),a(2),r(3,"translate"),o()),t&2&&(i(2),u(" ",c(3,1,"labels.buttons.View Incentives")," "))}function zc(t,s){t&1&&(n(0,"span"),g(1,"fa-icon",30),a(2),r(3,"translate"),o()),t&2&&(i(2),u(" ",c(3,1,"labels.buttons.Hide Incentives")," "))}function Hc(t,s){if(t&1){let e=F();n(0,"td",26)(1,"button",27),M("click",function(){let p=S(e).dataIndex,f=_();return A(f.expandChartSlabIndex=f.expandChartSlabIndex===p?null:p)}),C(2,qc,4,3,"span",28)(3,zc,4,3,"span",28),o()()}if(t&2){let e=s.dataIndex,l=_();i(2),d("ngIf",l.expandChartSlabIndex!==e),i(),d("ngIf",l.expandChartSlabIndex===e)}}function $c(t,s){t&1&&(n(0,"th",25),a(1),r(2,"translate"),o()),t&2&&(i(),m(c(2,1,"labels.inputs.Entity Type")))}function Lc(t,s){if(t&1&&(n(0,"td",26),a(1),o()),t&2){let e=s.$implicit;i(),u(" ",e.entityType.value," ")}}function Gc(t,s){t&1&&(n(0,"th",25),a(1),r(2,"translate"),o()),t&2&&(i(),m(c(2,1,"labels.inputs.Attribute Name")))}function Uc(t,s){if(t&1&&(n(0,"td",26),a(1),o()),t&2){let e=s.$implicit;i(),u(" ",e.attributeName.value," ")}}function jc(t,s){t&1&&(n(0,"th",25),a(1),r(2,"translate"),o()),t&2&&(i(),m(c(2,1,"labels.inputs.Condition Type")))}function Wc(t,s){if(t&1&&(n(0,"td",26),a(1),r(2,"titlecase"),o()),t&2){let e=s.$implicit;i(),u(" ",c(2,1,e.conditionType.value)," ")}}function Kc(t,s){t&1&&(n(0,"th",25),a(1),r(2,"translate"),o()),t&2&&(i(),m(c(2,1,"labels.inputs.Attribute Value")))}function Qc(t,s){if(t&1&&(n(0,"td",43),a(1),o()),t&2){let e=s.$implicit;d("ngSwitch",e.attributeName),i(),u(" ",e.attributeValueDesc," ")}}function Yc(t,s){t&1&&(n(0,"th",25),a(1),r(2,"translate"),o()),t&2&&(i(),m(c(2,1,"labels.inputs.Incentive Type")))}function Jc(t,s){if(t&1&&(n(0,"td",26),a(1),o()),t&2){let e=s.$implicit;i(),u(" ",e.incentiveType.value," ")}}function Xc(t,s){t&1&&(n(0,"th",25),a(1),r(2,"translate"),o()),t&2&&(i(),m(c(2,1,"labels.inputs.Interest")))}function Zc(t,s){if(t&1&&(n(0,"td",26),a(1),r(2,"formatNumber"),o()),t&2){let e=s.$implicit;i(),u(" ",c(2,1,e.amount)," ")}}function ts(t,s){t&1&&g(0,"tr",44)}function es(t,s){t&1&&g(0,"tr",45)}function is(t,s){if(t&1&&(n(0,"table",35),b(1,36),C(2,$c,3,3,"th",9)(3,Lc,2,1,"td",10),P(),b(4,37),C(5,Gc,3,3,"th",9)(6,Uc,2,1,"td",10),P(),b(7,38),C(8,jc,3,3,"th",9)(9,Wc,3,3,"td",10),P(),b(10,39),C(11,Kc,3,3,"th",9)(12,Qc,2,2,"td",40),P(),b(13,41),C(14,Yc,3,3,"th",9)(15,Jc,2,1,"td",10),P(),b(16,42),C(17,Xc,3,3,"th",9)(18,Zc,3,3,"td",10),P(),C(19,ts,1,0,"tr",16)(20,es,1,0,"tr",17),o()),t&2){let e=_().$implicit,l=_();d("dataSource",e.incentives),i(19),d("matHeaderRowDef",l.incentivesDisplayedColumns),i(),d("matRowDefColumns",l.incentivesDisplayedColumns)}}function ns(t,s){if(t&1&&(n(0,"td",26)(1,"div",31)(2,"mat-card",32)(3,"h4",33),a(4),r(5,"translate"),o(),C(6,is,21,3,"table",34),o()()()),t&2){let e=s.$implicit,l=s.dataIndex,p=_();Te("colspan",p.chartSlabsDisplayedColumns.length),i(),d("@expandChartSlab",l===p.expandChartSlabIndex?"expanded":"collapsed"),i(3),u(" ",c(5,4,"labels.heading.Incentives")," "),i(2),d("ngIf",e.incentives.length)}}function os(t,s){t&1&&g(0,"tr",44)}function as(t,s){t&1&&g(0,"tr",45)}function rs(t,s){t&1&&g(0,"tr",46)}function ps(t,s){t&1&&(n(0,"th",25),a(1),r(2,"translate"),o()),t&2&&(i(),m(c(2,1,"labels.inputs.name")))}function cs(t,s){if(t&1&&(n(0,"td",26),a(1),o()),t&2){let e=s.$implicit;i(),u(" ",e.name+", "+e.currency.displaySymbol," ")}}function ss(t,s){t&1&&(n(0,"th",25),a(1),r(2,"translate"),o()),t&2&&(i(),m(c(2,1,"labels.inputs.Type")))}function ls(t,s){if(t&1&&(n(0,"td",26),a(1),o()),t&2){let e=s.$implicit;i(),u(" ",e.chargeCalculationType.value," ")}}function ms(t,s){t&1&&(n(0,"th",25),a(1),r(2,"translate"),o()),t&2&&(i(),m(c(2,1,"labels.inputs.Amount")))}function ds(t,s){if(t&1&&(n(0,"td",26),a(1),o()),t&2){let e=s.$implicit;i(),u(" ",e.amount," ")}}function us(t,s){t&1&&(n(0,"th",25),a(1),r(2,"translate"),o()),t&2&&(i(),m(c(2,1,"labels.inputs.Date")))}function fs(t,s){if(t&1&&(n(0,"span"),a(1),r(2,"dateFormat"),o()),t&2){let e=_().$implicit;i(),u(" ",c(2,1,e.dueDate)||"Unassigned"," ")}}function gs(t,s){if(t&1&&(n(0,"span"),a(1),r(2,"dateFormat"),o()),t&2){let e=_().$implicit;i(),u(" ",e.feeOnMonthDay?E(2,1,R(4,Cc).concat(e.feeOnMonthDay),"dd MMMM"):"Unassigned"," ")}}function xs(t,s){t&1&&(n(0,"span"),a(1),r(2,"translate"),o()),t&2&&(i(),u(" ",c(2,1,"labels.inputs.N/A")," "))}function Cs(t,s){if(t&1&&(n(0,"td",26),C(1,fs,3,3,"span",28)(2,gs,3,5,"span",28)(3,xs,3,3,"span",28),o()),t&2){let e=s.$implicit;i(),d("ngIf",e.chargeTimeType.value==="Specified due date"||e.chargeTimeType.value==="Weekly Fee"),i(),d("ngIf",e.chargeTimeType.value==="Monthly Fee"||e.chargeTimeType.value==="Annual Fee"),i(),d("ngIf",!(e.chargeTimeType.value==="Monthly Fee"||e.chargeTimeType.value==="Annual Fee"||e.chargeTimeType.value==="Specified due date"||e.chargeTimeType.value==="Weekly Fee"))}}function _s(t,s){t&1&&(n(0,"th",25),a(1),r(2,"translate"),o()),t&2&&(i(),m(c(2,1,"labels.inputs.Repayments Every")))}function hs(t,s){if(t&1&&(n(0,"td",26),a(1),o()),t&2){let e=s.$implicit;i(),u(" ",e.feeInterval||"Not Provided"," ")}}function vs(t,s){t&1&&(n(0,"th",25),a(1),r(2,"translate"),o()),t&2&&(i(),m(c(2,1,"labels.inputs.Collected On")))}function Ds(t,s){if(t&1&&(n(0,"td",26),a(1),o()),t&2){let e=s.$implicit;i(),u(" ",e.chargeTimeType.value," ")}}function bs(t,s){t&1&&g(0,"tr",44)}function Ps(t,s){t&1&&g(0,"tr",45)}function Ms(t,s){if(t&1&&(n(0,"div",47)(1,"h3",1),a(2),r(3,"translate"),o(),g(4,"mat-divider",2),n(5,"table",35),b(6,48),C(7,ps,3,3,"th",9)(8,cs,2,1,"td",10),P(),b(9,49),C(10,ss,3,3,"th",9)(11,ls,2,1,"td",10),P(),b(12,42),C(13,ms,3,3,"th",9)(14,ds,2,1,"td",10),P(),b(15,50),C(16,us,3,3,"th",9)(17,Cs,4,3,"td",10),P(),b(18,51),C(19,_s,3,3,"th",9)(20,hs,2,1,"td",10),P(),b(21,52),C(22,vs,3,3,"th",9)(23,Ds,2,1,"td",10),P(),C(24,bs,1,0,"tr",16)(25,Ps,1,0,"tr",17),o()()),t&2){let e=_();i(2),m(c(3,4,"labels.heading.Charges")),i(3),d("dataSource",e.fixedDepositAccountData.charges),i(19),d("matHeaderRowDef",e.chargesDisplayedColumns),i(),d("matRowDefColumns",e.chargesDisplayedColumns)}}var qe=(()=>{class t{constructor(){this.chargesDisplayedColumns=["name","chargeCalculationType","amount","chargeTimeType","date","repaymentsEvery"],this.interestRateChartData=[],this.chartSlabsDisplayedColumns=["period","amountRange","interest","description","actions"],this.incentivesDisplayedColumns=["entityType","attributeName","conditionType","attributeValue","incentiveType","amount"],this.chartSlabsIncentivesDisplayedColumns=["incentives"],this.submitEvent=new $e}ngOnChanges(){this.fixedDepositsAccountProductTemplate&&(this.interestRateChartData=this.fixedDepositsAccountProductTemplate.accountChart.chartSlabs)}static{this.\u0275fac=function(l){return new(l||t)}}static{this.\u0275cmp=O({type:t,selectors:[["mifosx-fixed-deposit-account-preview-step"]],inputs:{fixedDepositsAccountTemplate:"fixedDepositsAccountTemplate",fixedDepositsAccountProductTemplate:"fixedDepositsAccountProductTemplate",fixedDepositAccountData:"fixedDepositAccountData"},outputs:{submitEvent:"submitEvent"},features:[Jt],decls:181,vars:176,consts:[[1,"layout-row-wrap","responsive-column"],[1,"mat-h3","flex-100"],[1,"flex-100"],[1,"layout-row","flex-100"],[1,"flex-40"],[1,"flex-60"],["class","layout-row flex-100",4,"ngIf"],["mat-table","","multiTemplateDataRows","",1,"mat-elevation-z1","irc-table",3,"dataSource"],["matColumnDef","period"],["mat-header-cell","",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","amountRange"],["matColumnDef","interest"],["matColumnDef","description"],["matColumnDef","actions"],["matColumnDef","incentives"],["mat-header-row","",4,"matHeaderRowDef"],["mat-row","",4,"matRowDef","matRowDefColumns"],["mat-row","","class","incentives-row",4,"matRowDef","matRowDefColumns"],["class","layout-row-wrap responsive-column flex-100",4,"ngIf"],[1,"layout-row","responsive-column","align-center","gap-2px","margin-t"],["mat-raised-button","","matStepperPrevious",""],["icon","arrow-left",1,"m-r-10"],["mat-raised-button","",3,"routerLink"],["mat-raised-button","","color","primary",3,"click"],["mat-header-cell",""],["mat-cell",""],["mat-button","","color","primary",3,"click"],[4,"ngIf"],["icon","eye",1,"m-r-10"],["icon","eye-slash",1,"m-r-10"],[1,"layout-row-wrap","flex-100","incentives"],[1,"layout-row-wrap","flex-100"],[1,"m-b-10","flex-13"],["class","flex-100 mat-elevation-z1","mat-table","",3,"dataSource",4,"ngIf"],["mat-table","",1,"flex-100","mat-elevation-z1",3,"dataSource"],["matColumnDef","entityType"],["matColumnDef","attributeName"],["matColumnDef","conditionType"],["matColumnDef","attributeValue"],["mat-cell","",3,"ngSwitch",4,"matCellDef"],["matColumnDef","incentiveType"],["matColumnDef","amount"],["mat-cell","",3,"ngSwitch"],["mat-header-row",""],["mat-row",""],["mat-row","",1,"incentives-row"],[1,"layout-row-wrap","responsive-column","flex-100"],["matColumnDef","name"],["matColumnDef","chargeCalculationType"],["matColumnDef","date"],["matColumnDef","repaymentsEvery"],["matColumnDef","chargeTimeType"]],template:function(l,p){l&1&&(n(0,"div",0)(1,"h3",1),a(2),r(3,"translate"),o(),g(4,"mat-divider",2),n(5,"div",3)(6,"span",4),a(7),r(8,"translate"),o(),n(9,"span",5),a(10),r(11,"find"),o()(),n(12,"div",3)(13,"span",4),a(14),r(15,"translate"),o(),n(16,"span",5),a(17),r(18,"dateFormat"),o()(),C(19,_c,6,4,"div",6),n(20,"div",3)(21,"span",4),a(22),r(23,"translate"),o(),n(24,"span",5),a(25),r(26,"find"),r(27,"translateKey"),o()(),n(28,"h3",1),a(29),r(30,"translate"),o(),g(31,"mat-divider",2),n(32,"div",3)(33,"span",4),a(34),r(35,"translate"),o(),n(36,"span",5),a(37),o()(),n(38,"div",3)(39,"span",4),a(40),r(41,"translate"),o(),n(42,"span",5),a(43),o()(),n(44,"div",3)(45,"span",4),a(46),r(47,"translate"),o(),n(48,"span",5),a(49),o()(),n(50,"h3",1),a(51),r(52,"translate"),o(),g(53,"mat-divider",2),n(54,"div",3)(55,"span",4),a(56),r(57,"translate"),o(),n(58,"span",5),a(59),r(60,"currency"),o()(),n(61,"div",3)(62,"span",4),a(63),r(64,"translate"),o(),n(65,"span",5),a(66),r(67,"find"),r(68,"translateKey"),o()(),n(69,"div",3)(70,"span",4),a(71),r(72,"translate"),o(),n(73,"span",5),a(74),r(75,"find"),r(76,"translateKey"),o()(),n(77,"div",3)(78,"span",4),a(79),r(80,"translate"),o(),n(81,"span",5),a(82),r(83,"find"),r(84,"translateKey"),o()(),n(85,"div",3)(86,"span",4),a(87),r(88,"translate"),o(),n(89,"span",5),a(90),r(91,"find"),r(92,"translateKey"),o()(),n(93,"div",3)(94,"span",4),a(95),r(96,"translate"),o(),n(97,"span",5),a(98),r(99,"find"),r(100,"translateKey"),o()(),n(101,"h3",1),a(102),r(103,"translate"),o(),g(104,"mat-divider",2),C(105,hc,8,13,"div",6)(106,vc,7,8,"div",6)(107,Dc,7,8,"div",6)(108,bc,7,8,"div",6),n(109,"div",3)(110,"span",4),a(111),r(112,"translate"),o(),n(113,"span",5),a(114),r(115,"yesNo"),o()(),C(116,Pc,7,9,"div",6)(117,Mc,8,12,"div",6),n(118,"div",3)(119,"span",4),a(120),r(121,"translate"),o(),n(122,"span",5),a(123),r(124,"yesNo"),o()(),C(125,Tc,6,4,"div",6)(126,Sc,7,6,"div",6),n(127,"h3",1),a(128),r(129,"translate"),o(),g(130,"mat-divider",2),C(131,Ac,6,4,"div",6),n(132,"div",3)(133,"span",4),a(134),r(135,"translate"),o(),n(136,"span",5),a(137),r(138,"dateFormat"),o()(),C(139,Oc,7,6,"div",6)(140,yc,6,4,"div",6),n(141,"div",3)(142,"span",4),a(143),r(144,"translate"),o(),n(145,"span",5),a(146),r(147,"yesNo"),o()(),n(148,"table",7),b(149,8),C(150,Ic,3,3,"th",9)(151,Fc,3,6,"td",10),P(),b(152,11),C(153,wc,3,3,"th",9)(154,Ec,4,6,"td",10),P(),b(155,12),C(156,Bc,3,3,"th",9)(157,kc,3,3,"td",10),P(),b(158,13),C(159,Rc,3,3,"th",9)(160,Nc,2,1,"td",10),P(),b(161,14),C(162,Vc,3,3,"th",9)(163,Hc,4,2,"td",10),P(),b(164,15),C(165,ns,7,6,"td",10),P(),C(166,os,1,0,"tr",16)(167,as,1,0,"tr",17)(168,rs,1,0,"tr",18),o(),C(169,Ms,26,6,"div",19),o(),n(170,"div",20)(171,"button",21),g(172,"fa-icon",22),a(173),r(174,"translate"),o(),n(175,"button",23),a(176),r(177,"translate"),o(),n(178,"button",24),M("click",function(){return p.submitEvent.emit()}),a(179),r(180,"translate"),o()()),l&2&&(i(2),m(c(3,59,"labels.heading.Details")),i(5),m(c(8,61,"labels.inputs.Product")),i(3),m(at(11,63,p.fixedDepositAccountData.productId,p.fixedDepositsAccountTemplate.productOptions,"id","name")),i(4),m(c(15,68,"labels.inputs.Submitted On")),i(3),m(c(18,70,p.fixedDepositAccountData.submittedOnDate)),i(2),d("ngIf",p.fixedDepositAccountData.externalId),i(3),m(c(23,72,"labels.inputs.Field Officer")),i(3),m(E(27,79,at(26,74,p.fixedDepositAccountData.fieldOfficerId,p.fixedDepositsAccountProductTemplate.fieldOfficerOptions,"id","displayName")||"Unassigned","inputs")),i(4),m(c(30,82,"labels.heading.Currency")),i(5),m(c(35,84,"labels.inputs.Currency")),i(3),m(p.fixedDepositsAccountProductTemplate.currency.code),i(3),m(c(41,86,"labels.inputs.Currency Multiple")),i(3),m(p.fixedDepositsAccountProductTemplate.currency.inMultiplesOf),i(3),m(c(47,88,"labels.inputs.Decimal Places")),i(3),m(p.fixedDepositsAccountProductTemplate.currency.decimalPlaces),i(2),m(c(52,90,"labels.heading.Terms")),i(5),u("",c(57,92,"labels.inputs.Fixed Deposit Amount"),":"),i(3),m(at(60,94,p.fixedDepositAccountData.depositAmount,p.fixedDepositsAccountProductTemplate.currency.code,"symbol-narrow","1.2-2")),i(4),u("",c(64,99,"labels.inputs.Deposit Period"),":"),i(3),T("",p.fixedDepositAccountData.depositPeriod," ",E(68,106,at(67,101,p.fixedDepositAccountData.depositPeriodFrequencyId,p.fixedDepositsAccountProductTemplate.periodFrequencyTypeOptions,"id","value"),"catalogs")),i(5),u("",c(72,109,"labels.inputs.Interest Compounding Period"),":"),i(3),m(E(76,116,at(75,111,p.fixedDepositAccountData.interestCompoundingPeriodType,p.fixedDepositsAccountProductTemplate.interestCompoundingPeriodTypeOptions,"id","value"),"catalogs")),i(5),u("",c(80,119,"labels.inputs.Interest Posting Period"),":"),i(3),m(E(84,126,at(83,121,p.fixedDepositAccountData.interestPostingPeriodType,p.fixedDepositsAccountProductTemplate.interestPostingPeriodTypeOptions,"id","value"),"catalogs")),i(5),u("",c(88,129,"labels.inputs.Interest Calculated using"),":"),i(3),m(E(92,136,at(91,131,p.fixedDepositAccountData.interestCalculationType,p.fixedDepositsAccountProductTemplate.interestCalculationTypeOptions,"id","value"),"catalogs")),i(5),u("",c(96,139,"labels.inputs.Days in Year"),":"),i(3),m(E(100,146,at(99,141,p.fixedDepositAccountData.interestCalculationDaysInYearType,p.fixedDepositsAccountProductTemplate.interestCalculationDaysInYearTypeOptions,"id","value"),"catalogs")),i(4),m(c(103,149,"labels.heading.Settings")),i(3),d("ngIf",p.fixedDepositAccountData.lockinPeriodFrequency),i(),d("ngIf",p.fixedDepositsAccountProductTemplate.minDepositTerm),i(),d("ngIf",p.fixedDepositsAccountProductTemplate.inMultiplesOfDepositTerm),i(),d("ngIf",p.fixedDepositsAccountProductTemplate.maxDepositTerm),i(3),u("",c(112,151,"labels.inputs.Transfer Interest to Savings Account"),"?"),i(3),m(c(115,153,p.fixedDepositAccountData.transferInterestToSavings)),i(2),d("ngIf",p.fixedDepositAccountData.transferInterestToSavings),i(),d("ngIf",p.fixedDepositAccountData.maturityInstructionId),i(3),u("",c(121,155,"labels.inputs.Apply Penal Interest (less)"),":"),i(3),m(c(124,157,p.fixedDepositsAccountProductTemplate.preClosurePenalApplicable)),i(2),d("ngIf",p.fixedDepositsAccountProductTemplate.preClosurePenalApplicable),i(),d("ngIf",p.fixedDepositsAccountProductTemplate.withHoldTax),i(2),m(c(129,159,"labels.heading.Interest Rate Chart")),i(3),d("ngIf",p.fixedDepositsAccountProductTemplate==null?null:p.fixedDepositsAccountProductTemplate.accountChart.name),i(3),u("",c(135,161,"labels.inputs.Valid from Date"),":"),i(3),m(c(138,163,p.fixedDepositsAccountProductTemplate==null?null:p.fixedDepositsAccountProductTemplate.accountChart.fromDate)),i(2),d("ngIf",p.fixedDepositsAccountProductTemplate==null?null:p.fixedDepositsAccountProductTemplate.accountChart.endDate),i(),d("ngIf",p.fixedDepositsAccountProductTemplate==null?null:p.fixedDepositsAccountProductTemplate.accountChart.description),i(3),u("",c(144,165,"labels.inputs.Primary Grouping by Amount"),":"),i(3),m(c(147,167,p.fixedDepositsAccountProductTemplate==null?null:p.fixedDepositsAccountProductTemplate.accountChart.isPrimaryGroupingByAmount)),i(2),d("dataSource",p.interestRateChartData),i(18),d("matHeaderRowDef",p.chartSlabsDisplayedColumns),i(),d("matRowDefColumns",p.chartSlabsDisplayedColumns),i(),d("matRowDefColumns",p.chartSlabsIncentivesDisplayedColumns),i(),d("ngIf",p.fixedDepositAccountData.charges.length),i(4),u(" ",c(174,169,"labels.buttons.Previous")," "),i(2),d("routerLink",R(175,xc)),i(),u(" ",c(177,171,"labels.buttons.Cancel")," "),i(3),u(" ",c(180,173,"labels.buttons.Submit")," "))},dependencies:[y,Ae,Oe,I,tt,Y,B,Re,wt,kt,Bt,Rt,Et,Nt,ut,Vt,zt,qt,Ht,Wt,ye,se,yt,w,It,Xi,ue,tn],styles:["table[_ngcontent-%COMP%]{width:100%}.mat-elevation-z1[_ngcontent-%COMP%]{margin:1em 0 1.5em}h2[_ngcontent-%COMP%], h3[_ngcontent-%COMP%], h4[_ngcontent-%COMP%]{margin:0;font-weight:500}span[_ngcontent-%COMP%]{margin:.5em 0}mat-divider[_ngcontent-%COMP%]{margin:0 0 .5em}.margin-t[_ngcontent-%COMP%]{margin-top:1em}.margin-b[_ngcontent-%COMP%]{margin-bottom:.25em}.irc-table[_ngcontent-%COMP%]{width:100%}.irc-table[_ngcontent-%COMP%] tr.incentives-row[_ngcontent-%COMP%]{height:0}.irc-table[_ngcontent-%COMP%] tr.incentives-row[_ngcontent-%COMP%] > td[_ngcontent-%COMP%]{padding:0}.irc-table[_ngcontent-%COMP%] tr.incentives-row[_ngcontent-%COMP%] .incentives[_ngcontent-%COMP%]{overflow:hidden}.irc-table[_ngcontent-%COMP%] tr.incentives-row[_ngcontent-%COMP%] .mat-card[_ngcontent-%COMP%]{border-radius:0}"],data:{animation:[Ie("expandChartSlab",[ae("collapsed",oe({height:"0px",minHeight:"0"})),ae("expanded",oe({height:"*"})),we("expanded <=> collapsed",Fe("225ms cubic-bezier(0.4, 0.0, 0.2, 1)"))])]}})}}return t})();function Ts(t,s){t&1&&g(0,"fa-icon",14)}function Ss(t,s){t&1&&g(0,"fa-icon",14)}function As(t,s){t&1&&g(0,"fa-icon",15)}function Os(t,s){t&1&&g(0,"fa-icon",16)}function ys(t,s){t&1&&g(0,"fa-icon",17)}function Is(t,s){t&1&&(a(0),r(1,"translate")),t&2&&m(c(1,1,"labels.inputs.DETAILS"))}function Fs(t,s){t&1&&(a(0),r(1,"translate")),t&2&&m(c(1,1,"labels.inputs.TERMS"))}function ws(t,s){t&1&&(a(0),r(1,"translate")),t&2&&m(c(1,1,"labels.inputs.SETTINGS"))}function Es(t,s){t&1&&(a(0),r(1,"translate")),t&2&&m(c(1,1,"labels.inputs.INTEREST RATE CHART"))}function Bs(t,s){t&1&&(a(0),r(1,"translate")),t&2&&m(c(1,1,"labels.inputs.CHARGES"))}function ks(t,s){t&1&&(a(0),r(1,"translate")),t&2&&m(c(1,1,"labels.inputs.PREVIEW"))}function Rs(t,s){if(t&1){let e=F();n(0,"mat-step",13),C(1,ks,2,3,"ng-template",9),n(2,"mifosx-fixed-deposit-account-preview-step",18),M("submitEvent",function(){S(e);let p=_();return A(p.submit())}),o()()}if(t&2){let e=_();i(2),d("fixedDepositsAccountTemplate",e.fixedDepositsAccountTemplate)("fixedDepositsAccountProductTemplate",e.fixedDepositsAccountProductTemplate)("fixedDepositAccountData",e.fixedDepositAccount)}}var Mi=(()=>{class t{constructor(){this.route=x(N),this.router=x(W),this.dateUtils=x(et),this.fixedDepositsService=x(j),this.settingsService=x(U),this.route.data.subscribe(e=>{this.fixedDepositsAccountTemplate=e.fixedDepositsAccountTemplate})}setTemplate(e){this.fixedDepositsAccountProductTemplate=e}get fixedDepositAccountDetailsForm(){return this.fixedDepositsAccountDetailsStep.fixedDepositAccountDetailsForm}get fixedDepositAccountTermsForm(){return this.fixedDepositAccountTermsStep.fixedDepositAccountTermsForm}get fixedDepositAccountSettingsForm(){return this.fixedDepositAccountSettingsStep.fixedDepositAccountSettingsForm}get fixedDepositAccountFormValid(){return this.fixedDepositAccountDetailsForm.valid&&this.fixedDepositAccountTermsForm.valid&&this.fixedDepositAccountSettingsForm.valid}get fixedDepositAccount(){return H(H(H(H({},this.fixedDepositsAccountDetailsStep.fixedDepositAccountDetails),this.fixedDepositAccountTermsStep.fixedDepositAccountTerms),this.fixedDepositAccountSettingsStep.fixedDepositAccountSettings),this.fixedDepositAccountChargesStep.fixedDepositAccountCharges)}submit(){let e=this.settingsService.language.code,l=this.settingsService.dateFormat,p="dd MMMM",f=X(H({},this.fixedDepositAccount),{clientId:this.fixedDepositsAccountTemplate.clientId,charges:this.fixedDepositAccount.charges.map(D=>({chargeId:D.id,amount:D.amount,dueDate:D.dueDate&&this.dateUtils.formatDate(D.dueDate,l),feeOnMonthDay:D.feeOnMonthDay&&this.dateUtils.formatDate([2e3].concat(D.feeOnMonthDay),p),feeInterval:D.feeInterval})),submittedOnDate:this.dateUtils.formatDate(this.fixedDepositAccount.submittedOnDate,l),charts:[{chartSlabs:this.fixedDepositsAccountProductTemplate.accountChart.chartSlabs}],dateFormat:l,monthDayFormat:p,locale:e});this.fixedDepositsService.createFixedDepositAccount(f).subscribe(D=>{this.router.navigate(["../",D.resourceId],{relativeTo:this.route})})}static{this.\u0275fac=function(l){return new(l||t)}}static{this.\u0275cmp=O({type:t,selectors:[["mifosx-create-fixed-deposit-account"]],viewQuery:function(l,p){if(l&1&&(ht(ge,7),ht(xe,7),ht(Ce,7),ht(_e,7)),l&2){let f;vt(f=Dt())&&(p.fixedDepositsAccountDetailsStep=f.first),vt(f=Dt())&&(p.fixedDepositAccountTermsStep=f.first),vt(f=Dt())&&(p.fixedDepositAccountSettingsStep=f.first),vt(f=Dt())&&(p.fixedDepositAccountChargesStep=f.first)}},decls:24,vars:15,consts:[["fixedDepositAccountStepper",""],[1,"container"],["orientation","vertical","labelPosition","bottom",1,"mat-elevation-z8",3,"linear"],["matStepperIcon","number"],["matStepperIcon","edit"],["matStepperIcon","done"],["matStepperIcon","error"],["matStepperIcon","preview"],[3,"stepControl"],["matStepLabel",""],[3,"fixedDepositsAccountProductTemplate","fixedDepositsAccountTemplate"],[3,"fixedDepositsAccountTemplate","fixedDepositsAccountProductTemplate"],[3,"fixedDepositsAccountTemplate","fixedDepositsAccountProductTemplate","fixedDepositAccountFormValid"],["state","preview","completed",""],["icon","pencil-alt","size","sm"],["icon","check","size","sm"],["icon","exclamation-triangle","size","lg"],["icon","eye","size","sm"],[3,"submitEvent","fixedDepositsAccountTemplate","fixedDepositsAccountProductTemplate","fixedDepositAccountData"]],template:function(l,p){if(l&1){let f=F();n(0,"div",1)(1,"mat-stepper",2,0),C(3,Ts,1,0,"ng-template",3)(4,Ss,1,0,"ng-template",4)(5,As,1,0,"ng-template",5)(6,Os,1,0,"ng-template",6)(7,ys,1,0,"ng-template",7),n(8,"mat-step",8),C(9,Is,2,3,"ng-template",9),n(10,"mifosx-fixed-deposit-account-details-step",10),M("fixedDepositsAccountProductTemplate",function(q){return S(f),A(p.setTemplate(q))}),o()(),n(11,"mat-step",8),C(12,Fs,2,3,"ng-template",9),g(13,"mifosx-fixed-deposit-account-terms-step",11),o(),n(14,"mat-step",8),C(15,ws,2,3,"ng-template",9),g(16,"mifosx-fixed-deposit-account-settings-step",11),o(),n(17,"mat-step"),C(18,Es,2,3,"ng-template",9),g(19,"mifosx-fixed-deposit-account-interest-rate-chart-step",11),o(),n(20,"mat-step"),C(21,Bs,2,3,"ng-template",9),g(22,"mifosx-fixed-deposit-account-charges-step",12),o(),h(23,Rs,3,3,"mat-step",13),o()()}l&2&&(i(),d("linear",!1),i(7),d("stepControl",p.fixedDepositAccountDetailsForm),i(2),d("fixedDepositsAccountTemplate",p.fixedDepositsAccountTemplate),i(),d("stepControl",p.fixedDepositAccountTermsForm),i(2),d("fixedDepositsAccountTemplate",p.fixedDepositsAccountTemplate)("fixedDepositsAccountProductTemplate",p.fixedDepositsAccountProductTemplate),i(),d("stepControl",p.fixedDepositAccountSettingsForm),i(2),d("fixedDepositsAccountTemplate",p.fixedDepositsAccountTemplate)("fixedDepositsAccountProductTemplate",p.fixedDepositsAccountProductTemplate),i(3),d("fixedDepositsAccountTemplate",p.fixedDepositsAccountTemplate)("fixedDepositsAccountProductTemplate",p.fixedDepositsAccountProductTemplate),i(3),d("fixedDepositsAccountTemplate",p.fixedDepositsAccountTemplate)("fixedDepositsAccountProductTemplate",p.fixedDepositsAccountProductTemplate)("fixedDepositAccountFormValid",p.fixedDepositAccountFormValid),i(),v(p.fixedDepositAccountFormValid?23:-1))},dependencies:[y,I,Ze,Je,ut,Xe,Ye,ge,xe,Ce,Ve,_e,qe,w],encapsulation:2})}}return t})();function Ns(t,s){t&1&&g(0,"fa-icon",14)}function Vs(t,s){t&1&&g(0,"fa-icon",14)}function qs(t,s){t&1&&g(0,"fa-icon",15)}function zs(t,s){t&1&&g(0,"fa-icon",16)}function Hs(t,s){t&1&&g(0,"fa-icon",17)}function $s(t,s){t&1&&(a(0),r(1,"translate")),t&2&&m(c(1,1,"labels.inputs.DETAILS"))}function Ls(t,s){t&1&&(a(0),r(1,"translate")),t&2&&m(c(1,1,"labels.inputs.TERMS"))}function Gs(t,s){t&1&&(a(0),r(1,"translate")),t&2&&m(c(1,1,"labels.inputs.SETTINGS"))}function Us(t,s){t&1&&(a(0),r(1,"translate")),t&2&&m(c(1,1,"labels.inputs.INTEREST RATE CHART"))}function js(t,s){t&1&&(a(0),r(1,"translate")),t&2&&m(c(1,1,"labels.inputs.CHARGES"))}function Ws(t,s){t&1&&(a(0),r(1,"translate")),t&2&&m(c(1,1,"labels.inputs.PREVIEW"))}function Ks(t,s){if(t&1){let e=F();n(0,"mat-step",13),C(1,Ws,2,3,"ng-template",9),n(2,"mifosx-fixed-deposit-account-preview-step",18),M("submitEvent",function(){S(e);let p=_();return A(p.submit())}),o()()}if(t&2){let e=_();i(2),d("fixedDepositsAccountTemplate",e.fixedDepositsAccountAndTemplate)("fixedDepositsAccountProductTemplate",e.fixedDepositsAccountProductTemplate)("fixedDepositAccountData",e.fixedDepositAccount)}}var Ti=(()=>{class t{constructor(){this.route=x(N),this.router=x(W),this.dateUtils=x(et),this.fixedDepositsService=x(j),this.settingsService=x(U),this.route.data.subscribe(e=>{this.fixedDepositsAccountAndTemplate=e.fixedDepositsAccountAndTemplate})}setTemplate(e){this.fixedDepositsAccountProductTemplate=e,this.currency=this.fixedDepositsAccountAndTemplate.currency}get fixedDepositAccountDetailsForm(){return this.fixedDepositsAccountDetailsStep.fixedDepositAccountDetailsForm}get fixedDepositAccountTermsForm(){return this.fixedDepositAccountTermsStep.fixedDepositAccountTermsForm}get fixedDepositAccountSettingsForm(){return this.fixedDepositAccountSettingsStep.fixedDepositAccountSettingsForm}get fixedDepositAccountFormValidAndNotPristine(){return this.fixedDepositAccountDetailsForm.valid&&this.fixedDepositAccountTermsForm.valid&&this.fixedDepositAccountSettingsForm.valid&&(!this.fixedDepositAccountDetailsForm.pristine||!this.fixedDepositAccountTermsForm.pristine||!this.fixedDepositAccountSettingsForm.pristine||!this.fixedDepositAccountChargesStep.pristine)}get fixedDepositAccount(){return H(H(H(H({},this.fixedDepositsAccountDetailsStep.fixedDepositAccountDetails),this.fixedDepositAccountTermsStep.fixedDepositAccountTerms),this.fixedDepositAccountSettingsStep.fixedDepositAccountSettings),this.fixedDepositAccountChargesStep?.fixedDepositAccountCharges)}submit(){let e=this.settingsService.language.code,l=this.settingsService.dateFormat,p="dd MMMM",f=X(H({},this.fixedDepositAccount),{clientId:this.fixedDepositsAccountAndTemplate.clientId,charges:this.fixedDepositAccount.charges.map(D=>({chargeId:D.id,amount:D.amount,dueDate:D.dueDate&&this.dateUtils.formatDate(D.dueDate,l),feeOnMonthDay:D.feeOnMonthDay&&this.dateUtils.formatDate([2e3].concat(D.feeOnMonthDay),p),feeInterval:D.feeInterval})),submittedOnDate:this.dateUtils.formatDate(this.fixedDepositAccount.submittedOnDate,l),charts:[{chartSlabs:this.fixedDepositsAccountProductTemplate.accountChart.chartSlabs}],dateFormat:l,monthDayFormat:p,locale:e});this.fixedDepositsService.updateFixedDepositAccount(this.fixedDepositsAccountAndTemplate.id,f).subscribe(D=>{this.router.navigate(["../"],{relativeTo:this.route})})}static{this.\u0275fac=function(l){return new(l||t)}}static{this.\u0275cmp=O({type:t,selectors:[["mifosx-edit-fixed-deposit-account"]],viewQuery:function(l,p){if(l&1&&(ht(ge,7),ht(xe,7),ht(Ce,7),ht(_e,7)),l&2){let f;vt(f=Dt())&&(p.fixedDepositsAccountDetailsStep=f.first),vt(f=Dt())&&(p.fixedDepositAccountTermsStep=f.first),vt(f=Dt())&&(p.fixedDepositAccountSettingsStep=f.first),vt(f=Dt())&&(p.fixedDepositAccountChargesStep=f.first)}},decls:24,vars:15,consts:[["fixedDepositAccountStepper",""],[1,"container"],["orientation","vertical","labelPosition","bottom",1,"mat-elevation-z8",3,"linear"],["matStepperIcon","number"],["matStepperIcon","edit"],["matStepperIcon","done"],["matStepperIcon","error"],["matStepperIcon","preview"],[3,"stepControl"],["matStepLabel",""],[3,"fixedDepositsAccountProductTemplate","fixedDepositsAccountTemplate"],[3,"fixedDepositsAccountTemplate","fixedDepositsAccountProductTemplate"],[3,"fixedDepositsAccountTemplate","fixedDepositsAccountProductTemplate","fixedDepositAccountFormValid"],["state","preview","completed",""],["icon","pencil-alt","size","sm"],["icon","check","size","sm"],["icon","exclamation-triangle","size","lg"],["icon","eye","size","sm"],[3,"submitEvent","fixedDepositsAccountTemplate","fixedDepositsAccountProductTemplate","fixedDepositAccountData"]],template:function(l,p){if(l&1){let f=F();n(0,"div",1)(1,"mat-stepper",2,0),C(3,Ns,1,0,"ng-template",3)(4,Vs,1,0,"ng-template",4)(5,qs,1,0,"ng-template",5)(6,zs,1,0,"ng-template",6)(7,Hs,1,0,"ng-template",7),n(8,"mat-step",8),C(9,$s,2,3,"ng-template",9),n(10,"mifosx-fixed-deposit-account-details-step",10),M("fixedDepositsAccountProductTemplate",function(q){return S(f),A(p.setTemplate(q))}),o()(),n(11,"mat-step",8),C(12,Ls,2,3,"ng-template",9),g(13,"mifosx-fixed-deposit-account-terms-step",11),o(),n(14,"mat-step",8),C(15,Gs,2,3,"ng-template",9),g(16,"mifosx-fixed-deposit-account-settings-step",11),o(),n(17,"mat-step"),C(18,Us,2,3,"ng-template",9),g(19,"mifosx-fixed-deposit-account-interest-rate-chart-step",11),o(),n(20,"mat-step"),C(21,js,2,3,"ng-template",9),g(22,"mifosx-fixed-deposit-account-charges-step",12),o(),h(23,Ks,3,3,"mat-step",13),o()()}l&2&&(i(),d("linear",!1),i(7),d("stepControl",p.fixedDepositAccountDetailsForm),i(2),d("fixedDepositsAccountTemplate",p.fixedDepositsAccountAndTemplate),i(),d("stepControl",p.fixedDepositAccountTermsForm),i(2),d("fixedDepositsAccountTemplate",p.fixedDepositsAccountAndTemplate)("fixedDepositsAccountProductTemplate",p.fixedDepositsAccountProductTemplate),i(),d("stepControl",p.fixedDepositAccountSettingsForm),i(2),d("fixedDepositsAccountTemplate",p.fixedDepositsAccountAndTemplate)("fixedDepositsAccountProductTemplate",p.fixedDepositsAccountProductTemplate),i(3),d("fixedDepositsAccountTemplate",p.fixedDepositsAccountAndTemplate)("fixedDepositsAccountProductTemplate",p.fixedDepositsAccountProductTemplate),i(3),d("fixedDepositsAccountTemplate",p.fixedDepositsAccountAndTemplate)("fixedDepositsAccountProductTemplate",p.fixedDepositsAccountProductTemplate)("fixedDepositAccountFormValid",p.fixedDepositAccountFormValidAndNotPristine),i(),v(p.fixedDepositAccountFormValidAndNotPristine?23:-1))},dependencies:[y,I,Ze,Je,ut,Xe,Ye,ge,xe,Ce,Ve,_e,qe,w],encapsulation:2})}}return t})();var Si=(()=>{class t{constructor(){this.fixedDepositsService=x(j)}resolve(e){let l=e.paramMap.get("fixedDepositAccountId");return this.fixedDepositsService.getFixedDepositsAccountData(l)}static{this.\u0275fac=function(l){return new(l||t)}}static{this.\u0275prov=Gt({token:t,factory:t.\u0275fac})}}return t})();var wi=(()=>{class t{constructor(){this.fixedDepositsService=x(j)}resolve(e){let l=e.parent.paramMap.get("fixedDepositAccountId"),p=e.paramMap.get("id");return this.fixedDepositsService.getFixedDepositsAccountTransaction(l,p)}static{this.\u0275fac=function(l){return new(l||t)}}static{this.\u0275prov=Gt({token:t,factory:t.\u0275fac})}}return t})();var Ei=(()=>{class t{constructor(){this.savingsService=x($t),this.fixedDepositsService=x(j)}resolve(e){let l=e.paramMap.get("name"),p=e.paramMap.get("fixedDepositAccountId")||e.parent.parent.paramMap.get("fixedDepositAccountId");switch(l){case"Add Charge":return this.savingsService.getSavingsChargeTemplateResource(p);case"Close":return this.fixedDepositsService.getFixedDepositsAccountClosureTemplate(p);case"Withdrawal":return this.fixedDepositsService.getFixedDepositsAccountTransactionTemplate(p);default:return}}static{this.\u0275fac=function(l){return new(l||t)}}static{this.\u0275prov=Gt({token:t,factory:t.\u0275fac})}}return t})();var Bi=(()=>{class t{constructor(){this.fixedDepositsService=x(j)}resolve(e){let l=e.parent.parent.paramMap.get("clientId");return this.fixedDepositsService.getFixedDepositsAccountTemplate(l)}static{this.\u0275fac=function(l){return new(l||t)}}static{this.\u0275prov=Gt({token:t,factory:t.\u0275fac})}}return t})();var ki=(()=>{class t{constructor(){this.fixedDepositsService=x(j)}resolve(e){let l=e.paramMap.get("fixedDepositAccountId");return this.fixedDepositsService.getFixedDepositsAccountAndTemplate(l)}static{this.\u0275fac=function(l){return new(l||t)}}static{this.\u0275prov=Gt({token:t,factory:t.\u0275fac})}}return t})();function Qs(t,s){if(t&1&&(n(0,"span"),g(1,"mifosx-external-identifier",4),o()),t&2){let e=_();i(),d("externalId",_t(e.fixedDepositsAccountData.externalId))}}function Ys(t,s){t&1&&(n(0,"span"),a(1),r(2,"translate"),o()),t&2&&(i(),u(" ",c(2,1,"labels.inputs.Not Available")," "))}function Js(t,s){if(t&1&&(n(0,"tr")(1,"td"),a(2),r(3,"translate"),o(),n(4,"td"),a(5),r(6,"dateFormat"),o()()),t&2){let e=_();i(2),m(c(3,2,"labels.inputs.Closed On")),i(3),m(c(6,4,e.fixedDepositsAccountData.timeline.closedOnDate))}}function Xs(t,s){if(t&1&&(n(0,"tr")(1,"td"),a(2),r(3,"translate"),o(),n(4,"td"),a(5),o()()),t&2){let e=_();i(2),m(c(3,2,"labels.inputs.Tax Group")),i(3),m(e.fixedDepositsAccountData.taxGroup.name)}}function Zs(t,s){if(t&1&&(n(0,"tr")(1,"td"),a(2),r(3,"translate"),o(),n(4,"td"),a(5),r(6,"translateKey"),o()()),t&2){let e=_();i(2),m(c(3,2,"labels.inputs.Maturity Instructions")),i(3),m(E(6,4,e.fixedDepositsAccountData.onAccountClosure.value,"catalogs"))}}function tl(t,s){if(t&1&&(n(0,"tr")(1,"td"),a(2),r(3,"translate"),o(),n(4,"td"),a(5),r(6,"translateKey"),o()()),t&2){let e=_();i(2),m(c(3,3,"labels.inputs.Pre-cloure Penal")),i(3),T(" ",e.fixedDepositsAccountData.preClosurePenalInterest," % on ",E(6,5,e.fixedDepositsAccountData.preClosurePenalInterestOnType.value,"catalogs")," ")}}function el(t,s){if(t&1&&(n(0,"tr")(1,"td"),a(2),r(3,"translate"),o(),n(4,"td",5),a(5),r(6,"currency"),o()()),t&2){let e=_(2);i(2),m(c(3,2,"labels.inputs.Total Deposits")),i(3),u(" ",at(6,4,e.fixedDepositsAccountData.summary.totalDeposits,e.currency.code,"symbol-narrow","1.2-2")," ")}}function il(t,s){if(t&1&&(n(0,"tr")(1,"td"),a(2),r(3,"translate"),o(),n(4,"td",5),a(5),r(6,"currency"),o()()),t&2){let e=_(2);i(2),m(c(3,2,"labels.inputs.Total Withdrawals")),i(3),u(" ",at(6,4,e.fixedDepositsAccountData.summary.totalWithdrawals,e.currency.code,"symbol-narrow","1.2-2")," ")}}function nl(t,s){if(t&1&&(n(0,"tr")(1,"td"),a(2),r(3,"translate"),o(),n(4,"td",5),a(5),r(6,"currency"),o()()),t&2){let e=_(2);i(2),m(c(3,2,"labels.inputs.Total Interest Earned")),i(3),u(" ",at(6,4,e.fixedDepositsAccountData.summary.totalInterestEarned,e.currency.code,"symbol-narrow","1.2-2")," ")}}function ol(t,s){if(t&1&&(n(0,"div")(1,"h4",2),a(2),r(3,"translate"),o(),n(4,"table")(5,"tbody")(6,"tr")(7,"td"),a(8),r(9,"translate"),o(),n(10,"td",5),a(11),r(12,"currency"),o()(),n(13,"tr")(14,"td"),a(15),r(16,"translate"),o(),n(17,"td",5),a(18),r(19,"currency"),o()(),h(20,el,7,9,"tr"),h(21,il,7,9,"tr"),h(22,nl,7,9,"tr"),o()()()),t&2){let e=_();i(2),m(c(3,8,"labels.heading.Performance History")),i(6),m(c(9,10,"labels.inputs.Principal Amount")),i(3),u(" ",at(12,12,e.fixedDepositsAccountData.depositAmount,e.currency.code,"symbol-narrow","1.2-2")," "),i(4),m(c(16,17,"labels.inputs.Maturity Amount")),i(3),u(" ",at(19,19,e.fixedDepositsAccountData.maturityAmount,e.currency.code,"symbol-narrow","1.2-2")," "),i(2),v(e.fixedDepositsAccountData.summary.totalDeposits?20:-1),i(),v(e.fixedDepositsAccountData.summary.totalWithdrawals?21:-1),i(),v(e.fixedDepositsAccountData.summary.totalInterestEarned>=0?22:-1)}}function al(t,s){if(t&1&&(n(0,"div")(1,"h4",2),a(2),r(3,"translate"),o(),n(4,"table")(5,"tbody")(6,"tr")(7,"td"),a(8),r(9,"translate"),o(),n(10,"td",5),a(11),r(12,"currency"),o()(),n(13,"tr")(14,"td"),a(15),r(16,"translate"),o(),n(17,"td",5),a(18),r(19,"currency"),o()()()()()),t&2){let e=_();i(2),m(c(3,5,"labels.heading.Other Details")),i(6),m(c(9,7,"labels.inputs.Principal Amount")),i(3),u(" ",at(12,9,e.fixedDepositsAccountData.depositAmount,e.currency.code,"symbol-narrow","1.2-2")," "),i(4),m(c(16,14,"labels.inputs.Maturity Amount")),i(3),u(" ",at(19,16,e.fixedDepositsAccountData.maturityAmount,e.currency.code,"symbol-narrow","1.2-2")," ")}}var Ai=(()=>{class t{constructor(){this.route=x(N),this.router=x(W),this.route.parent.data.subscribe(e=>{this.fixedDepositsAccountData=e.fixedDepositsAccountData,this.currency=this.fixedDepositsAccountData.currency}),this.router.url.includes("clients")?this.entityType="Client":this.router.url.includes("groups")?this.entityType="Group":this.router.url.includes("centers")&&(this.entityType="Center")}static{this.\u0275fac=function(l){return new(l||t)}}static{this.\u0275cmp=O({type:t,selectors:[["mifosx-general-tab"]],decls:91,vars:77,consts:[[1,"fixed-deposits-account-tables","layout-row","gap-2percent"],[1,"flex-49","layout-column","gap-4percent"],[1,"table-headers"],[1,"flex-49"],["completed","true",3,"externalId"],[1,"r-amount"]],template:function(l,p){l&1&&(n(0,"div",0)(1,"div",1)(2,"div")(3,"h4",2),a(4),r(5,"translate"),o(),n(6,"table")(7,"tbody")(8,"tr")(9,"td"),a(10),r(11,"translate"),o(),n(12,"td"),h(13,Qs,2,2,"span"),h(14,Ys,3,3,"span"),o()(),n(15,"tr")(16,"td"),a(17),r(18,"translate"),o(),n(19,"td"),a(20),r(21,"dateFormat"),r(22,"translate"),o()(),h(23,Js,7,6,"tr"),n(24,"tr")(25,"td"),a(26),r(27,"translate"),o(),n(28,"td"),a(29),r(30,"translateKey"),o()(),n(31,"tr")(32,"td"),a(33),r(34,"translate"),o(),n(35,"td"),a(36),r(37,"dateFormat"),o()(),n(38,"tr")(39,"td"),a(40),r(41,"translate"),o(),n(42,"td"),a(43),r(44,"translateKey"),o()(),h(45,Xs,6,4,"tr"),h(46,Zs,7,7,"tr"),o()()(),n(47,"div")(48,"h4",2),a(49),r(50,"translate"),o(),n(51,"table")(52,"tbody")(53,"tr")(54,"td"),a(55),r(56,"translate"),o(),n(57,"td"),a(58),o()(),n(59,"tr")(60,"td"),a(61),r(62,"translate"),o(),n(63,"td"),a(64),r(65,"translateKey"),o()(),n(66,"tr")(67,"td"),a(68),r(69,"translate"),o(),n(70,"td"),a(71),r(72,"translateKey"),o()(),n(73,"tr")(74,"td"),a(75),r(76,"translate"),o(),n(77,"td"),a(78),r(79,"translateKey"),o()(),n(80,"tr")(81,"td"),a(82),r(83,"translate"),o(),n(84,"td"),a(85),r(86,"translateKey"),o()(),h(87,tl,7,8,"tr"),o()()()(),n(88,"div",3),h(89,ol,23,24,"div")(90,al,20,21,"div"),o()()),l&2&&(i(4),m(c(5,29,"labels.heading.Fixed Deposit Details")),i(6),m(c(11,31,"labels.inputs.External Id")),i(3),v(p.fixedDepositsAccountData.externalId?13:-1),i(),v(p.fixedDepositsAccountData.externalId?-1:14),i(3),m(c(18,33,"labels.inputs.Activated On")),i(3),u(" ",p.fixedDepositsAccountData.timeline.activatedOnDate?c(21,35,p.fixedDepositsAccountData.timeline.activatedOnDate):c(22,37,"labels.text.Not Activated")," "),i(3),v(p.fixedDepositsAccountData.timeline.closedOnDate?23:-1),i(3),m(c(27,39,"labels.inputs.Field Officer")),i(3),u(" ",p.fixedDepositsAccountData.fieldOfficerName?p.fixedDepositsAccountData.fieldOfficerName:E(30,41,"Unassigned","inputs")," "),i(4),m(c(34,44,"labels.inputs.Maturity Date")),i(3),u(" ",p.fixedDepositsAccountData.maturityDate?c(37,46,p.fixedDepositsAccountData.maturityDate):"N/A"," "),i(4),m(c(41,48,"labels.inputs.Deposit Period")),i(3),T(" ",p.fixedDepositsAccountData.depositPeriod,"\xA0",E(44,50,p.fixedDepositsAccountData.depositPeriodFrequency.value,"catalogs")," "),i(2),v(p.fixedDepositsAccountData.withHoldTax?45:-1),i(),v(p.fixedDepositsAccountData.onAccountClosure?46:-1),i(3),m(c(50,53,"labels.heading.Interest Details")),i(6),m(c(56,55,"labels.inputs.Interest Rate")),i(3),u("",p.fixedDepositsAccountData.nominalAnnualInterestRate," %"),i(3),m(c(62,57,"labels.inputs.Interest Compounding Period")),i(3),m(E(65,59,p.fixedDepositsAccountData.interestCompoundingPeriodType.value,"catalogs")),i(4),m(c(69,62,"labels.inputs.Interest Posting Period")),i(3),m(E(72,64,p.fixedDepositsAccountData.interestPostingPeriodType.value,"catalogs")),i(4),m(c(76,67,"labels.inputs.Interest Calculated Using")),i(3),m(E(79,69,p.fixedDepositsAccountData.interestCalculationType.value,"catalogs")),i(4),m(c(83,72,"labels.inputs.No. of Days in Year")),i(3),m(E(86,74,p.fixedDepositsAccountData.interestCalculationDaysInYearType.value,"catalogs")),i(2),v(p.fixedDepositsAccountData.preClosurePenalApplicable?87:-1),i(2),v(!p.fixedDepositsAccountData.status.rejected&&!p.fixedDepositsAccountData.status.submittedAndPendingApproval?89:90))},dependencies:[y,I,Ji,se,yt,w,It],styles:[".fixed-deposits-account-tables[_ngcontent-%COMP%]{padding:1%}"]})}}return t})();var rl=[{path:"",data:{title:"All Fixed Deposits",breadcrumb:"Fixed Deposits",routeParamBreadcrumb:!1},children:[{path:"create",data:{title:"Create Fixed Deposit Account",breadcrumb:"Create Fixed Deposit Account"},component:Mi,resolve:{fixedDepositsAccountTemplate:Bi}},{path:":fixedDepositAccountId",data:{title:"Fixed Deposit Account View",routeParamBreadcrumb:"fixedDepositAccountId"},resolve:{fixedDepositsAccountData:Si},children:[{path:"",component:ai,resolve:{fixedDepositsAccountData:Si,savingsDatatables:Ii},children:[{path:"",redirectTo:"general",pathMatch:"full"},{path:"general",component:Ai,data:{title:"Fixed Deposit Account Details",breadcrumb:"General",routeParamBreadcrumb:!1}},{path:"interest-rate-chart",component:ri,data:{title:"Fixed Deposit Account Interest Rate Chart",breadcrumb:"Interest Rate Chart",routeParamBreadcrumb:!1}},{path:"transactions",component:pi,data:{title:"Fixed Deposit Account Transactions",breadcrumb:"Transactions",routeParamBreadcrumb:!1}},{path:"charges",component:li,data:{title:"Fixed Deposit Account Charges",breadcrumb:"Charges",routeParamBreadcrumb:!1}},{path:"standing-instructions",component:mi,data:{title:"Fixed Deposit Account Standing Instructions",breadcrumb:"Standing Instructions",routeParamBreadcrumb:!1}},{path:"datatables",children:[{path:":datatableName",component:di,data:{title:"View Data Table",routeParamBreadcrumb:"datatableName"},resolve:{savingsDatatable:yi}}]}]},{path:"edit",data:{title:"Edit Fixed Deposit Account",breadcrumb:"Edit",routeParamBreadcrumb:!1},component:Ti,resolve:{fixedDepositsAccountAndTemplate:ki}},{path:"transactions",data:{title:"Fixed Deposits Account Transactions",breadcrumb:"Transactions",routeParamBreadcrumb:!1},children:[{path:"",redirectTo:"../transactions",pathMatch:"prefix"},{path:"account-transfers",loadChildren:()=>import("./account-transfers.module-IS46QWMU.js").then(t=>t.AccountTransfersModule)},{path:":id",data:{routeParamBreadcrumb:"id"},children:[{path:"",component:Pi,resolve:{fixedDepositsAccountTransaction:wi}}]}]},{path:"actions/:name",data:{title:"Fixed Deposits Account Actions",routeParamBreadcrumb:"name"},component:bi,resolve:{fixedDepositsAccountActionData:Ei}}]}]}],ln=(()=>{class t{static{this.\u0275fac=function(l){return new(l||t)}}static{this.\u0275mod=Le({type:t})}static{this.\u0275inj=He({providers:[Si,yi,Ii,wi,Ei,Bi,ki],imports:[Oi.forChild(rl),Oi]})}}return t})();var Qx=(()=>{class t{static{this.\u0275fac=function(l){return new(l||t)}}static{this.\u0275mod=Le({type:t})}static{this.\u0275inj=He({imports:[pn,en,nn,ln,ai,pi,li,mi,ri,di,bi,ui,fi,ni,ii,ze,gi,xi,Ci,Pi,ci,si,_i,hi,vi,Mi,ge,xe,_e,Ce,Ve,qe,Ti,Ai,Di]})}}return t})();export{Qx as FixedDepositsModule}; diff --git a/browser/index.html b/browser/index.html index 701d39e5c..544cd67c5 100644 --- a/browser/index.html +++ b/browser/index.html @@ -57,5 +57,5 @@
- + diff --git a/browser/loans.module-SNK5EVID.js b/browser/loans.module-2KH4LJVS.js similarity index 99% rename from browser/loans.module-SNK5EVID.js rename to browser/loans.module-2KH4LJVS.js index ba509068c..a2c6cd386 100644 --- a/browser/loans.module-SNK5EVID.js +++ b/browser/loans.module-2KH4LJVS.js @@ -1,4 +1,4 @@ -import{a as _1}from"./chunk-QZJSWYAX.js";import{a as Yf,b as h1,c as Gr,d as Wr,e as Op,f as Ep}from"./chunk-7VHKCFQO.js";import{a as Ip,b as ld,c as C1,d as b1}from"./chunk-JJ2I2MEQ.js";import{a as g1}from"./chunk-SJ6K46JC.js";import{$ as hp,$a as ec,$d as ra,$e as yp,$f as Ap,Aa as ee,Ba as te,Bc as Vo,Bd as ge,Bg as u1,C as Pf,Cc as Uo,Cd as Ve,Cf as Qf,Da as X,Db as kf,Dc as Gn,De as Jf,Df as t1,Ea as Q,Eb as Sa,Ec as Kl,Ee as Xf,Ef as e1,Fb as wt,Fc as Ur,Fd as Je,G as sn,Ga as xt,Gc as Ho,Gd as _e,H as fp,Hc as Go,Hd as Wn,Ia as it,Id as Pe,Ig as Mp,Ja as P,Jd as On,Jg as Ri,K as A,Kg as f1,L as mt,Lc as pa,Ld as In,M as dt,Mc as Pt,Na as mi,Nc as Bf,Nd as Oi,Oa as di,Oc as qf,Od as Qe,Pa as ui,Pd as tn,Qa as Lt,Qc as Jl,Qd as en,Qe as Do,R as Af,Rc as de,Rd as Da,Sc as oe,Sd as En,Sf as n1,T as Vr,Td as qa,Tf as i1,Ua as c,Uc as jf,Ud as Ae,Uf as Va,Va as b,Vf as a1,Wa as v,Wb as Zl,Wc as we,Xa as $t,Xc as Gt,Xd as un,Y as Mf,Ya as Xs,Yc as he,Yf as o1,Za as Qs,Zc as Ee,Zd as Zf,Ze as ja,Zf as Pp,_ as od,_a as tc,_d as _i,_e as wo,_f as hn,ab as nc,ad as pe,ae as Kf,ag as Hr,b as Df,bb as ce,bd as zf,bf as Xl,bg as r1,c as wf,ca as o,cb as If,cd as Re,ce as _p,cf as Ql,cg as ns,da as Yl,dd as Mi,de as $o,df as ts,e as Tf,eb as Ut,ed as Wo,ef as es,eg as Mt,fb as La,fd as Le,ff as mo,ge as Cp,gf as za,gg as l1,ha as Of,hb as p,hc as Et,he as bp,hf as bn,ib as m,ic as Ff,id as Ne,ie as vp,if as vn,ja as Dt,jb as Ge,jd as Vf,jf as xn,ka as gp,kb as Ef,kc as le,kd as Uf,kf as Sp,lb as Ye,lc as ae,ld as je,lf as yn,mc as Rf,mf as Sn,na as k,nc as rd,ne as xp,nf as Dp,ng as s1,of as Dn,pa as oa,pd as Te,pf as wn,pg as c1,qb as ca,qc as Ba,qd as Hf,qf as wp,qg as la,ra as M,rc as Wt,rd as Tt,re as ma,rf as Tn,rg as Ti,sa as O,sb as Lf,sd as xe,sf as Pn,sg as ic,ta as Ce,td as Gf,tf as Tp,ua as ue,ud as Wf,uf as An,ug as p1,va as fe,vd as Oe,vg as m1,wa as x,xa as s,xb as Nf,xd as ze,xf as Li,ya as l,yd as $f,za as T,zg as d1}from"./chunk-OX7PN44D.js";import{a as ie,b as ve,d as Sf}from"./chunk-PHUH23IY.js";var Lp=class{constructor(n,e){this.setOptions(n,e),this.setButtons(n)}get singleButtons(){return this.buttonsArray}get options(){return this.optionArray}get optionsPayment(){return this.optionPaymentArray}setButtons(n){switch(n){case"Active":this.buttonsArray=[{name:"Add Loan Charge",icon:"plus",taskPermissionName:"CREATE_LOANCHARGE"},{name:"Foreclosure",icon:"heart-broken",taskPermissionName:"FORECLOSURE_LOAN"},{name:"Make Repayment",icon:"coins",taskPermissionName:"REPAYMENT_LOAN"},{name:"Undo Disbursal",icon:"undo",taskPermissionName:"DISBURSALUNDO_LOAN"}];break;case"Submitted and pending approval":this.buttonsArray=[{name:"Add Loan Charge",icon:"plus",taskPermissionName:"CREATE_LOANCHARGE"},{name:"Approve",icon:"check",taskPermissionName:"APPROVE_LOAN"},{name:"Modify Application",icon:"edit",taskPermissionName:"UPDATE_LOAN"},{name:"Reject",icon:"times",taskPermissionName:"REJECT_LOAN"}];break;case"Approved":this.buttonsArray=[{name:"Disburse",icon:"hand-holding-usd",taskPermissionName:"DISBURSE_LOAN"},{name:"Disburse to Savings",icon:"piggy-bank",taskPermissionName:"DISBURSETOSAVINGS_LOAN"},{name:"Undo Approval",icon:"undo",taskPermissionName:"APPROVALUNDO_LOAN"}];break;case"Overpaid":this.buttonsArray=[{name:"Transfer Funds",icon:"exchange",taskPermissionName:"CREATE_ACCOUNTTRANSFER"},{name:"Credit Balance Refund",icon:"coins",taskPermissionName:"CREATE_CREDIT_BALANCE_REFUND"}];break;case"Closed (written off)":this.buttonsArray=[{name:"Recovery Payment",icon:"briefcase",taskPermissionName:"RECOVERYPAYMENT_LOAN"},{name:"Undo Write-off",icon:"undo",taskPermissionName:"UNDOWRITEOFF_LOAN"}];break;case"Closed (obligations met)":this.buttonsArray=[{name:"Goodwill Credit",icon:"coins",taskPermissionName:"CREATE_GOODWILL_TRANSACTION"},{name:"Interest Payment Waiver",icon:"coins",taskPermissionName:"CREATE_INTERESTPAYMENTWAIVER_TRANSACTION"},{name:"Payout Refund",icon:"coins",taskPermissionName:"CREATE_PAYOUT_REFUND"},{name:"Merchant Issued Refund",icon:"coins",taskPermissionName:"CREATE_MERCHANT_ISSUED_REFUND"}];break;default:this.buttonsArray=[]}}setOptions(n,e){switch(n){case"Active":this.optionArray=[{name:"Waive Interest",taskPermissionName:"WAIVEINTERESTPORTION_LOAN"},{name:"Reschedule",taskPermissionName:"CREATE_RESCHEDULELOAN"},{name:"Write Off",taskPermissionName:"WRITEOFF_LOAN"},{name:"Close (as Rescheduled)",taskPermissionName:"CLOSEASRESCHEDULED_LOAN"},{name:"Close",taskPermissionName:"CLOSE_LOAN"},{name:"Loan Screen Report",taskPermissionName:"READ_LOAN"},{name:"View Guarantors",taskPermissionName:"READ_GUARANTOR"},{name:"Create Guarantor",taskPermissionName:"CREATE_GUARANTOR"},{name:"Recover From Guarantor",taskPermissionName:"RECOVERGUARANTEES_LOAN"},{name:"Sell Loan",taskPermissionName:"SALE_LOAN"}],this.isContractTermination(e)||this.optionArray.push({name:"Contract Termination",taskPermissionName:"CONTRACT_TERMINATION_LOAN"}),this.optionPaymentArray=[{name:"Goodwill Credit",taskPermissionName:"CREATE_GOODWILL_TRANSACTION"},{name:"Interest Payment Waiver",taskPermissionName:"CREATE_INTERESTPAYMENTWAIVER_TRANSACTION"},{name:"Payout Refund",taskPermissionName:"CREATE_PAYOUT_REFUND"},{name:"Merchant Issued Refund",taskPermissionName:"CREATE_MERCHANT_ISSUED_REFUND"}];break;case"Submitted and pending approval":this.optionArray=[{name:"Withdrawn by Client",taskPermissionName:"WITHDRAW_LOAN"},{name:"Delete",taskPermissionName:"DELETE_LOAN"},{name:"Add Collateral",taskPermissionName:"CREATE_COLLATERAL"},{name:"View Guarantors",taskPermissionName:"READ_GUARANTOR"},{name:"Create Guarantor",taskPermissionName:"CREATE_GUARANTOR"},{name:"Loan Screen Reports",taskPermissionName:"READ_LOAN"}],this.optionPaymentArray=[];break;case"Approved":this.optionArray=[{name:"Add Loan Charge",taskPermissionName:"CREATE_LOANCHARGE"},{name:"View Guarantors",taskPermissionName:"READ_GUARANTOR"},{name:"Create Guarantor",taskPermissionName:"CREATE_GUARANTOR"},{name:"Loan Screen Report",taskPermissionName:"READ_LOAN"}],this.optionPaymentArray=[];break;default:this.optionArray=[],this.optionPaymentArray=[]}}addOption(n){this.optionArray.push(n)}addButton(n){this.buttonsArray.push(n)}isContractTermination(n){return n==null?!1:n.code==="loanSubStatus.loanSubStatusType.contractTermination"}};var d_=()=>["./general"],u_=()=>["./accountdetail"],f_=()=>["./repayment-schedule"],h_=()=>["./loan-documents"],g_=()=>["./original-schedule"],__=()=>["./transactions"],C_=()=>["./deferred-income"],b_=()=>["./buy-down-fees"],v_=()=>["./delinquencytags"],x_=()=>["./loan-collateral"],y_=()=>["./loan-tranche-details"],S_=()=>["./term-variations"],D_=()=>["./overdue-charges"],w_=()=>["./floating-interest-rates"],T_=()=>["./charges"],P_=()=>["./loan-reschedules"],A_=()=>["./notes"],M_=()=>["./standing-instruction"],O_=()=>["./external-asset-owner"],I_=t=>["./datatables",t];function E_(t,n){if(t&1&&(s(0,"tr")(1,"td"),c(2),p(3,"translate"),l(),s(4,"td")(5,"span",48),T(6,"i",49),l(),c(7),l()()),t&2){let e=P(2);o(2),v("",m(3,3,"labels.inputs.Delinquency Classification")," :"),o(4),x("ngClass",e.loanDelinquencyClassificationStyle),o(),v(" ",e.loanDetailsData==null?null:e.loanDetailsData.delinquencyRange.classification," ")}}function L_(t,n){if(t&1&&(s(0,"tr")(1,"td"),c(2),p(3,"translate"),l(),s(4,"td"),c(5),p(6,"formatNumber"),l()()),t&2){let e=P(2);o(2),v("",m(3,2,"labels.inputs.Past Due Days")," :"),o(3),b(m(6,4,e.loanDetailsData==null?null:e.loanDetailsData.delinquent.pastDueDays))}}function N_(t,n){if(t&1&&(s(0,"tr")(1,"td"),c(2),p(3,"translate"),l(),s(4,"td"),c(5),p(6,"formatNumber"),l()()),t&2){let e=P(2);o(2),v("",m(3,2,"labels.inputs.Delinquent Days")," :"),o(3),b(m(6,4,e.loanDetailsData==null?null:e.loanDetailsData.delinquent.delinquentDays))}}function k_(t,n){if(t&1&&(s(0,"div")(1,"table",47)(2,"tbody"),M(3,E_,8,5,"tr"),M(4,L_,7,6,"tr"),M(5,N_,7,6,"tr"),l()()()),t&2){let e=P();o(3),O(e.loanDetailsData.delinquencyRange?3:-1),o(),O(e.loanDetailsData.delinquent&&e.loanDetailsData.delinquent.pastDueDays>0?4:-1),o(),O(e.loanDetailsData.delinquent&&e.loanDetailsData.delinquent.delinquentDays>0&&e.loanDetailsData.delinquent.pastDueDays!==e.loanDetailsData.delinquent.delinquentDays?5:-1)}}function F_(t,n){if(t&1&&(s(0,"td",50),c(1),p(2,"currency"),l()),t&2){let e=P(3);o(),v(" ",Ye(2,1,e.loanDetailsData.summary.totalOverdue,e.currency.code,"symbol-narrow","1.2-2")," ")}}function R_(t,n){t&1&&(s(0,"td"),c(1),p(2,"translate"),l()),t&2&&(o(),v(" ",m(2,1,"labels.inputs.Not Provided")," "))}function B_(t,n){if(t&1&&(s(0,"tr")(1,"td"),c(2),p(3,"translate"),l(),M(4,F_,3,6,"td",50),M(5,R_,3,3,"td"),l()),t&2){let e=P(2);o(2),b(m(3,3,"labels.inputs.Arrears By")),o(2),O(e.loanDetailsData.summary.totalOverdue>=0?4:-1),o(),O(e.loanDetailsData.summary.totalOverdue>=0?-1:5)}}function q_(t,n){if(t&1&&(s(0,"tr")(1,"td"),c(2),p(3,"translate"),l(),s(4,"td"),c(5),p(6,"dateFormat"),l()()),t&2){let e=P(2);o(2),b(m(3,2,"labels.inputs.Arrears Since")),o(3),b(m(6,4,e.loanDetailsData.summary.overdueSinceDate))}}function j_(t,n){if(t&1&&(s(0,"tr")(1,"td"),c(2),p(3,"translate"),l(),s(4,"td",50),c(5),p(6,"currency"),l()()),t&2){let e=P(2);o(2),b(m(3,2,"labels.inputs.Overpaid By")),o(3),v(" ",Ye(6,4,e.loanDetailsData.totalOverpaid,e.currency.code,"symbol-narrow","1.2-2")," ")}}function z_(t,n){if(t&1&&(s(0,"div",39)(1,"h3"),c(2),p(3,"translate"),l(),s(4,"table",47)(5,"tbody")(6,"tr")(7,"td"),c(8),p(9,"translate"),l(),s(10,"td",50),c(11),p(12,"currency"),l()(),M(13,B_,6,5,"tr"),M(14,q_,7,6,"tr"),M(15,j_,7,9,"tr"),l()()()),t&2){let e=P();o(2),b(m(3,6,"labels.heading.Account Overview")),o(6),b(m(9,8,"labels.inputs.Current Balance")),o(3),v(" ",Ye(12,10,e.loanDetailsData.summary.totalOutstanding,e.currency.code,"symbol-narrow","1.2-2")," "),o(2),O(e.loanDisplayArrearsDelinquency<2?13:-1),o(),O(e.loanDetailsData.inArrears?14:-1),o(),O(e.loanDetailsData.totalOverpaid&&e.loanDetailsData.totalOverpaid>0?15:-1)}}function V_(t,n){if(t&1&&(s(0,"button",41)(1,"mat-icon",51),T(2,"fa-icon",52),l()()),t&2){P();let e=Lt(35);x("matMenuTriggerFor",e)}}function U_(t,n){if(t&1){let e=xt();s(0,"button",54),it("click",function(){mt(e);let a=P().$implicit,r=P();return dt(r.loanAction(a.name))}),s(1,"mat-icon",55),T(2,"fa-icon",56),l(),s(3,"span"),c(4),p(5,"translate"),l()()}if(t&2){let e=P().$implicit;o(2),x("icon",ce(e.icon)),o(2),b(m(5,3,"labels.menus."+e.name))}}function H_(t,n){if(t&1&&k(0,U_,6,5,"button",53),t&2){let e=n.$implicit;x("mifosxHasPermission",e.taskPermissionName)}}function G_(t,n){if(t&1){let e=xt();s(0,"button",54),it("click",function(){mt(e);let a=P().$implicit,r=P(2);return dt(r.loanAction(a.name))}),c(1),p(2,"translate"),l()}if(t&2){let e=P().$implicit;o(),v(" ",m(2,1,"labels.menus."+e.name)," ")}}function W_(t,n){if(t&1&&(s(0,"span"),k(1,G_,3,3,"button",53),l()),t&2){let e=n.$implicit;o(),x("mifosxHasPermission",e.taskPermissionName)}}function $_(t,n){if(t&1&&(X(0,43),s(1,"button",57),c(2),p(3,"translate"),l(),s(4,"mat-menu",null,6),ue(6,W_,2,1,"span",null,Ce),l(),Q()),t&2){let e=Lt(5),i=P();o(),x("matMenuTriggerFor",e),o(),b(m(3,2,"labels.menus.Payments")),o(4),fe(i.buttonConfig.optionsPayment)}}function Y_(t,n){if(t&1){let e=xt();s(0,"button",54),it("click",function(){mt(e);let a=P().$implicit,r=P(2);return dt(r.loanAction(a.name))}),c(1),p(2,"translate"),l()}if(t&2){let e=P().$implicit;o(),v(" ",m(2,1,"labels.menus."+e.name)," ")}}function Z_(t,n){if(t&1&&(s(0,"span"),k(1,Y_,3,3,"button",53),l()),t&2){let e=n.$implicit;o(),x("mifosxHasPermission",e.taskPermissionName)}}function K_(t,n){if(t&1&&(X(0,43),s(1,"button",57),c(2),p(3,"translate"),l(),s(4,"mat-menu",null,7),ue(6,Z_,2,1,"span",null,Ce),l(),Q()),t&2){let e=Lt(5),i=P();o(),x("matMenuTriggerFor",e),o(),b(m(3,2,"labels.menus.More")),o(4),fe(i.buttonConfig.options)}}function J_(t,n){if(t&1&&(s(0,"a",45,8),c(2),p(3,"translate"),l()),t&2){let e=Lt(1);x("routerLink",Ut(5,g_))("active",e.isActive),o(2),v(" ",m(3,3,"labels.inputs.Original Schedule")," ")}}function X_(t,n){if(t&1&&(s(0,"a",45,9),c(2),p(3,"translate"),l()),t&2){let e=Lt(1);x("routerLink",Ut(5,__))("active",e.isActive),o(2),v(" ",m(3,3,"labels.inputs.Transactions")," ")}}function Q_(t,n){if(t&1&&(s(0,"a",45,10),c(2),p(3,"translate"),l()),t&2){let e=Lt(1);x("routerLink",Ut(5,C_))("active",e.isActive),o(2),v(" ",m(3,3,"labels.inputs.Deferred income")," ")}}function tC(t,n){if(t&1&&(s(0,"a",45,11),c(2),p(3,"translate"),l()),t&2){let e=Lt(1);x("routerLink",Ut(5,b_))("active",e.isActive),o(2),v(" ",m(3,3,"labels.heading.Buy Down Fees")," ")}}function eC(t,n){if(t&1&&(s(0,"a",45,12),c(2),p(3,"translate"),l()),t&2){let e=Lt(1);x("routerLink",Ut(5,v_))("active",e.isActive),o(2),v(" ",m(3,3,"labels.inputs.Delinquency Tags")," ")}}function nC(t,n){if(t&1&&(s(0,"a",45,13),c(2),p(3,"translate"),l()),t&2){let e=Lt(1);x("routerLink",Ut(5,x_))("active",e.isActive),o(2),v(" ",m(3,3,"labels.inputs.Loan Collateral Details")," ")}}function iC(t,n){if(t&1&&(s(0,"a",45,14),c(2),p(3,"translate"),l()),t&2){let e=Lt(1);x("routerLink",Ut(5,y_))("active",e.isActive),o(2),v(" ",m(3,3,"labels.inputs.Loan Tranche Details")," ")}}function aC(t,n){if(t&1&&(s(0,"a",45,15),c(2),p(3,"translate"),l()),t&2){let e=Lt(1);x("routerLink",Ut(5,S_))("active",e.isActive),o(2),v(" ",m(3,3,"labels.inputs.Term Variations")," ")}}function oC(t,n){if(t&1&&(s(0,"a",45,16),c(2),p(3,"translate"),l()),t&2){let e=Lt(1);x("routerLink",Ut(5,D_))("active",e.isActive),o(2),v(" ",m(3,3,"labels.inputs.Overdue Charges")," ")}}function rC(t,n){if(t&1&&(s(0,"a",45,17),c(2),p(3,"translate"),l()),t&2){let e=Lt(1);x("routerLink",Ut(5,w_))("active",e.isActive),o(2),v(" ",m(3,3,"labels.inputs.Floating Interest Rates")," ")}}function lC(t,n){if(t&1&&(s(0,"a",45,18),c(2),p(3,"translate"),l()),t&2){let e=Lt(1);x("routerLink",Ut(5,T_))("active",e.isActive),o(2),v(" ",m(3,3,"labels.inputs.Charges")," ")}}function sC(t,n){if(t&1&&(s(0,"a",45,19),c(2),p(3,"translate"),l()),t&2){let e=Lt(1);x("routerLink",Ut(5,P_))("active",e.isActive),o(2),v(" ",m(3,3,"labels.inputs.Loan Reschedules")," ")}}function cC(t,n){if(t&1&&(s(0,"a",45,20),c(2),p(3,"translate"),l()),t&2){let e=Lt(1);x("routerLink",Ut(5,A_))("active",e.isActive),o(2),v(" ",m(3,3,"labels.inputs.Notes")," ")}}function pC(t,n){if(t&1&&(s(0,"a",45,21),c(2),p(3,"translate"),l()),t&2){let e=Lt(1);x("routerLink",Ut(5,M_))("active",e.isActive),o(2),v(" ",m(3,3,"labels.inputs.Standing Instruction")," ")}}function mC(t,n){if(t&1&&(s(0,"a",45,22),c(2),p(3,"translate"),l()),t&2){let e=Lt(1);x("routerLink",Ut(5,O_))("active",e.isActive),o(2),v(" ",m(3,3,"labels.inputs.External Asset Owner")," ")}}function dC(t,n){if(t&1&&(s(0,"a",45,23),c(2),l()),t&2){let e=Lt(1),i=P().$implicit;x("routerLink",La(3,I_,i.registeredTableName))("active",e.isActive),o(2),v(" ",i.registeredTableName," ")}}function uC(t,n){if(t&1&&k(0,dC,3,5,"a",46),t&2){let e=n.$implicit;x("mifosxHasPermission","READ_"+e.registeredTableName)}}var Np=(()=>{class t{constructor(){this.route=A(Et),this.router=A(le),this.loansService=A(Mt),this.translateService=A(pa),this.dialog=A(Gn),this.disburseTransactionNo=0,this.loanDelinquencyClassificationStyle="",this.loanSubStatus=null,this.loanReAged=!1,this.loanReAmortized=!1;let e=this.loansService;this.route.data.subscribe(i=>{this.loanDetailsData=i.loanDetailsData,this.loanDatatables=i.loanDatatables,this.loanDisplayArrearsDelinquency=i.loanArrearsDelinquencyConfig.value||0,this.loanStatus=this.loanDetailsData.status,this.loanSubStatus=this.loanDetailsData.subStatus===void 0?null:this.loanDetailsData.subStatus,this.currency=this.loanDetailsData.currency,e.saveLoanDisbursementDetailsData(this.loanDetailsData.disbursementDetails),this.loanStatus.active&&this.loanDetailsData.transactions.forEach(a=>{a.manuallyReversed||(a.type.reAge?this.loanReAged=!0:a.type.reAmortize&&(this.loanReAmortized=!0))}),this.setConditionalButtons()}),this.loanId=this.route.snapshot.params.loanId,this.clientId=this.loanDetailsData.clientId}ngOnInit(){this.route.params.subscribe(e=>{this.loanId!=e.loanId&&(this.loanId=e.loanId,this.reload())}),this.recalculateInterest=this.loanDetailsData.recalculateInterest||!0,this.status=this.loanDetailsData.status.value,this.loanStatus=this.loanDetailsData.status,this.loanSubStatus=this.loanDetailsData.subStatus===void 0?null:this.loanDetailsData.subStatus,this.loanStatus.active&&this.loanDetailsData.multiDisburseLoan&&this.loanDetailsData&&this.loanDetailsData.transactions&&this.loanDetailsData.transactions.forEach(e=>{e.type.disbursement&&this.disburseTransactionNo++}),this.setConditionalButtons(),this.router.url.includes("clients")?this.entityType="Client":this.router.url.includes("groups")?this.entityType="Group":this.router.url.includes("centers")&&(this.entityType="Center"),this.loanDelinquencyClassification()}setConditionalButtons(){this.buttonConfig=new Lp(this.status,this.loanSubStatus),this.status==="Submitted and pending approval"?(this.buttonConfig.addOption({name:this.loanDetailsData.loanOfficerName?"Change Loan Officer":"Assign Loan Officer",icon:"user-tie",taskPermissionName:"DISBURSE_LOAN"}),this.loanDetailsData.isVariableInstallmentsAllowed&&this.buttonConfig.addOption({name:"Edit Repayment Schedule",icon:"edit",taskPermissionName:"ADJUST_REPAYMENT_SCHEDULE"})):this.status==="Approved"?this.buttonConfig.addButton({name:this.loanDetailsData.loanOfficerName?"Change Loan Officer":"Assign Loan Officer",icon:"user-tie",taskPermissionName:"DISBURSE_LOAN"}):this.status==="Active"?(this.loanDetailsData.enableBuyDownFee&&this.buttonConfig.addButton({name:"Buy Down Fee",icon:"plus",taskPermissionName:"BUYDOWNFEE_LOAN"}),this.loanDetailsData.enableIncomeCapitalization&&this.buttonConfig.addButton({name:"Capitalized Income",icon:"coins",taskPermissionName:"CAPITALIZEDINCOME_LOAN"}),(this.loanDetailsData.canDisburse||this.loanDetailsData.multiDisburseLoan)&&this.buttonConfig.addButton({name:"Disburse",icon:"hand-holding-usd",taskPermissionName:"DISBURSE_LOAN"}),this.loanDetailsData.canDisburse&&this.buttonConfig.addButton({name:"Disburse to Savings",icon:"piggy-bank",taskPermissionName:"DISBURSETOSAVINGS_LOAN"}),this.loanDetailsData.multiDisburseLoan&&this.disburseTransactionNo>1&&this.buttonConfig.addButton({name:"Undo Last Disbursal",icon:"undo",taskPermissionName:"DISBURSALLASTUNDO_LOAN"}),this.recalculateInterest&&this.buttonConfig.addButton({name:"Add Interest Pause",icon:"calendar",taskPermissionName:"CREATE_INTEREST_PAUSE"}),this.loanDetailsData.loanOfficerName||this.buttonConfig.addButton({name:"Assign Loan Officer",icon:"user-tie",taskPermissionName:"UPDATELOANOFFICER_LOAN"}),this.recalculateInterest&&this.buttonConfig.addButton({name:"Prepay Loan",icon:"coins",taskPermissionName:"REPAYMENT_LOAN"}),this.loanDetailsData.chargedOff?this.buttonConfig.addButton({name:"Undo Charge-Off",icon:"undo",taskPermissionName:"UNDOCHARGEOFF_LOAN"}):this.buttonConfig.addButton({name:"Charge-Off",icon:"coins",taskPermissionName:"CHARGEOFF_LOAN"}),this.loanReAged?this.buttonConfig.addButton({name:"Undo Re-Age",icon:"undo",taskPermissionName:"UNDO_REAGE_LOAN"}):this.buttonConfig.addButton({name:"Re-Age",icon:"calendar",taskPermissionName:"REAGE_LOAN"}),this.loanReAmortized?this.buttonConfig.addButton({name:"Undo Re-Amortize",icon:"undo",taskPermissionName:"UNDO_REAMORTIZE_LOAN"}):this.buttonConfig.addButton({name:"Re-Amortize",icon:"calendar-alt",taskPermissionName:"REAMORTIZE_LOAN"})):(this.status==="Closed (obligations met)"||this.status==="Overpaid")&&(this.loanDetailsData.multiDisburseLoan&&this.buttonConfig.addButton({name:"Disburse",icon:"hand-holding-usd",taskPermissionName:"DISBURSE_LOAN"}),Gr.isAdvancedPaymentAllocationStrategy(this.loanDetailsData.transactionProcessingStrategyCode)&&this.buttonConfig.addButton({name:"Reschedule",icon:"calendar",taskPermissionName:"CREATE_RESCHEDULELOAN"}))}loanAction(e){switch(e){case"Recover From Guarantor":this.recoverFromGuarantor();break;case"Delete":this.deleteLoanAccount();break;case"Modify Application":this.router.navigate(["edit-loans-account"],{relativeTo:this.route});break;case"Transfer Funds":let i={loanId:this.loanId,accountType:"fromloans"};this.router.navigate(["transfer-funds/make-account-transfer"],{relativeTo:this.route,queryParams:i});break;case"Undo Re-Age":case"Undo Re-Amortize":case"Undo Charge-Off":this.undoLoanAction(e);break;default:let a={relativeTo:this.route,state:{data:this.loanDetailsData}};this.router.navigate(["actions",e],a);break}}recoverFromGuarantor(){this.dialog.open(ma,{data:{heading:this.translateService.instant("labels.heading.Recover from Guarantor"),dialogContext:this.translateService.instant("labels.dialogContext.Are you sure you want recover from Guarantor"),type:"Mild"}}).afterClosed().subscribe(i=>{i.confirm&&this.loansService.loanActionButtons(this.loanId,"recoverGuarantees").subscribe(()=>{this.reload()})})}loanDelinquencyClassification(){this.loanDelinquencyClassificationStyle="",this.loanDetailsData.delinquent&&this.loanDetailsData.delinquent.delinquencyPausePeriods&&this.loanDetailsData.delinquent.delinquencyPausePeriods.some(e=>{e.active&&(this.loanDelinquencyClassificationStyle="fa fa-stop status-pending")})}undoLoanAction(e){e=e.replace("Undo ",""),this.dialog.open(ma,{data:{heading:this.translateService.instant("labels.heading.Undo Transaction"),dialogContext:this.translateService.instant("labels.dialogContext.Are you sure you want undo the transaction type")+" "+this.translateService.instant("labels.menus."+e)}}).afterClosed().subscribe(a=>{if(a.confirm){let r="";switch(e){case"Re-Age":r="undoReAge";break;case"Re-Amortize":r="undoReAmortize";break;case"Charge-Off":r="undo-charge-off";break}this.loansService.executeLoansAccountTransactionsCommand(String(this.loanId),r,{}).subscribe(()=>{this.reload()})}})}iconLoanStatusColor(){return this.loanDetailsData.chargedOff?"loanStatusType.chargeoff":this.isContractTermination(this.loanSubStatus)?"loanSubStatusType.contractTermination":this.loanDetailsData.inArrears?"loanStatusType.activeOverdue":this.loanDetailsData.status.code}loanStatusTooltip(){return this.loanDetailsData.chargedOff?"Chargeoff":this.loanDetailsData.inArrears?"activeOverdue":this.loanDetailsData.status.code}loanSubStatusTooltip(){return this.isContractTermination(this.loanSubStatus)?"contractTermination":""}deleteLoanAccount(){this.dialog.open(ra,{data:{deleteContext:`with loan id: ${this.loanId}`}}).afterClosed().subscribe(i=>{i.delete&&this.loansService.deleteLoanAccount(this.loanId).subscribe(()=>{this.router.navigate(["../../"],{relativeTo:this.route})})})}reload(){let e=this.clientId,i=this.router.url;this.router.navigateByUrl(`/clients/${e}/loans-accounts`,{skipLocationChange:!0}).then(()=>this.router.navigate([i]))}isContractTermination(e){return e==null?!1:e.code==="loanSubStatus.loanSubStatusType.contractTermination"}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=Dt({type:t,selectors:[["mifosx-loans-view"]],decls:78,vars:71,consts:[["accountMenu","matMenu"],["general","routerLinkActive"],["accountdetail","routerLinkActive"],["repaymentSchedule","routerLinkActive"],["loanDocuments","routerLinkActive"],["tabPanel",""],["Payments","matMenu"],["More","matMenu"],["originalSchedule","routerLinkActive"],["transactions","routerLinkActive"],["deferredIncome","routerLinkActive"],["buyDownFees","routerLinkActive"],["delinquencytags","routerLinkActive"],["loanCollateralDetails","routerLinkActive"],["loanTrancheDetails","routerLinkActive"],["termVariations","routerLinkActive"],["overduecharges","routerLinkActive"],["floatingInterestRates","routerLinkActive"],["charges","routerLinkActive"],["loanReschedules","routerLinkActive"],["notes","routerLinkActive"],["standingInstruction","routerLinkActive"],["externalAssetOwner","routerLinkActive"],["datatable","routerLinkActive"],[1,"account-card"],[1,"header","layout-column"],[1,"header-title-group"],[1,"profile-image-container"],["iconFile","account_placeholder","iconName","LOAN_ACCOUNT","iconWidth","210",3,"iconClass","matTooltip"],[1,"mat-typography","account-card-title"],[1,"layout-row","responsive-column"],[1,"flex-60"],[1,"fa","fa-stop",3,"matTooltip","ngClass"],[1,"m-r-5"],[3,"textValue"],["display","left",3,"accountNo"],[1,"loans-overview"],[1,"m-r-10"],[1,"m-l-5"],[1,"loans-overview","mat-typography","flex-30"],[1,"flex-5"],["mat-icon-button","","aria-label","Loan account actions","yPosition","below",3,"matMenuTriggerFor"],["mat-menu-item",""],[1,"loan-span"],["mat-tab-nav-bar","",1,"navigation-tabs",3,"tabPanel"],["mat-tab-link","","routerLinkActive","",3,"routerLink","active"],["mat-tab-link","","routerLinkActive","",3,"routerLink","active",4,"mifosxHasPermission"],[1,"account-overview"],[1,"m-r-3"],[3,"ngClass"],[1,"r-amount"],["matListIcon","",1,"actions-menu"],["icon","bars","size","sm"],["mat-menu-item","",3,"click",4,"mifosxHasPermission"],["mat-menu-item","",3,"click"],["matListIcon",""],["size","sm",3,"icon"],["mat-menu-item","",3,"matMenuTriggerFor"]],template:function(i,a){if(i&1&&(s(0,"mat-card",24)(1,"mat-card-header",25)(2,"mat-card-title-group",26)(3,"div",27)(4,"div"),T(5,"mifosx-svg-icon",28),p(6,"translate"),l()(),s(7,"div",29)(8,"mat-card-title")(9,"div",30)(10,"div",31)(11,"h3"),T(12,"i",32),p(13,"translate"),p(14,"statusLookup"),s(15,"span",33),c(16),p(17,"translate"),l(),s(18,"span",33),T(19,"mifosx-long-text",34),l(),T(20,"mifosx-account-number",35),l(),s(21,"span",36)(22,"span",37),c(23),p(24,"translate"),p(25,"translate"),l(),c(26),s(27,"span",38),c(28),l(),T(29,"br"),l(),M(30,k_,6,3,"div"),l(),M(31,z_,16,15,"div",39),s(32,"div",40),M(33,V_,3,1,"button",41),l()()()(),s(34,"mat-menu",null,0),ue(36,H_,1,1,"button",42,Ce),M(38,$_,8,4,"ng-container",43),M(39,K_,8,4,"ng-container",43),l()()(),s(40,"mat-card-content")(41,"nav",44)(42,"a",45,1),c(44),p(45,"translate"),l(),s(46,"a",45,2),c(48),p(49,"translate"),l(),M(50,J_,4,6,"a",45),s(51,"a",45,3),c(53),p(54,"translate"),l(),M(55,X_,4,6,"a",45),M(56,Q_,4,6,"a",45),M(57,tC,4,6,"a",45),M(58,eC,4,6,"a",45),M(59,nC,4,6,"a",45),M(60,iC,4,6,"a",45),M(61,aC,4,6,"a",45),M(62,oC,4,6,"a",45),M(63,rC,4,6,"a",45),M(64,lC,4,6,"a",45),M(65,sC,4,6,"a",45),s(66,"a",45,4),c(68),p(69,"translate"),l(),k(70,cC,4,6,"a",46),M(71,pC,4,6,"a",45),M(72,mC,4,6,"a",45),ue(73,uC,1,1,"a",45,Ce),l(),s(75,"mat-tab-nav-panel",null,5),T(77,"router-outlet"),l()()()),i&2){let r=Lt(43),u=Lt(47),d=Lt(52),g=Lt(67),_=Lt(76);o(5),x("matTooltip",ce(m(6,47,"tooltips.Loan Account"))),o(7),x("matTooltip",ce(m(13,49,"labels.status."+a.loanDetailsData.status.value)))("ngClass",m(14,51,a.iconLoanStatusColor())),o(4),v("",m(17,53,"labels.heading.Loan Product")," :"),o(3),x("textValue",ce(a.loanDetailsData.loanProductName)),o(),x("accountNo",ce(a.loanDetailsData.accountNo)),o(3),$t("",m(24,55,"labels.text."+a.entityType)," ",m(25,57,"labels.inputs.name")," :"),o(3),v(" ",a.loanDetailsData.clientName||a.loanDetailsData.group.name),o(2),v("(",a.loanDetailsData.clientAccountNo||a.loanDetailsData.group.accountNo,")"),o(2),O(a.loanDisplayArrearsDelinquency!==1?30:-1),o(),O(a.loanDetailsData.summary?31:-1),o(2),O(a.buttonConfig.singleButtons.length>0?33:-1),o(3),fe(a.buttonConfig.singleButtons),o(2),O(a.buttonConfig.optionsPayment.length?38:-1),o(),O(a.buttonConfig.options.length?39:-1),o(2),x("tabPanel",_),o(),x("routerLink",Ut(67,d_))("active",r.isActive),o(2),v(" ",m(45,59,"labels.inputs.General")," "),o(2),x("routerLink",Ut(68,u_))("active",u.isActive),o(2),v(" ",m(49,61,"labels.inputs.Account Details")," "),o(2),O(a.loanDetailsData.originalSchedule?50:-1),o(),x("routerLink",Ut(69,f_))("active",d.isActive),o(2),v(" ",m(54,63,"labels.inputs.Repayment Schedule")," "),o(2),O(a.loanDetailsData.transactions?55:-1),o(),O(a.loanDetailsData.enableIncomeCapitalization?56:-1),o(),O(a.loanDetailsData.enableBuyDownFee?57:-1),o(),O(a.loanDetailsData.status.active?58:-1),o(),O(a.loanDetailsData.collateral?59:-1),o(),O(a.loanDetailsData.multiDisburseLoan?60:-1),o(),O(a.loanDetailsData.loanTermVariations?61:-1),o(),O(a.loanDetailsData.overdueCharges.length>0?62:-1),o(),O(a.loanDetailsData.isLoanProductLinkedToFloatingRate?63:-1),o(),O(a.loanDetailsData.charges?64:-1),o(),O(a.loanDetailsData.status.active||a.loanDetailsData.status.closed||a.loanDetailsData.status.overpaid?65:-1),o(),x("routerLink",Ut(70,h_))("active",g.isActive),o(2),v(" ",m(69,65,"labels.inputs.Loan Documents")," "),o(2),x("mifosxHasPermission","READ_LOANNOTE"),o(),O(a.loanDetailsData.clientId?71:-1),o(),O(a.loanDetailsData.status.active?72:-1),o(),fe(a.loanDatatables)}},dependencies:[wt,ca,Tt,ae,xe,Oe,Ae,$f,Wf,m1,Oi,Gf,Mp,d1,Ba,vp,xp,un,bp,Cp,Qf,t1,Rf,e1,Ff,Sa,En,Pt,Ap,hn],styles:[".loans-overview[_ngcontent-%COMP%]{font-size:14px}.account-overview[_ngcontent-%COMP%]{min-width:80%;font-weight:400}"]})}}return t})();function fC(t,n){if(t&1&&(s(0,"h3"),c(1),p(2,"translate"),l(),s(3,"div",1)(4,"table")(5,"tbody")(6,"tr")(7,"td",2)(8,"b"),c(9),p(10,"translate"),l()(),s(11,"td",3),c(12),p(13,"formatNumber"),l(),s(14,"td",2)(15,"b"),c(16),p(17,"translate"),l()(),s(18,"td",3),c(19),p(20,"dateFormat"),l()()()()()),t&2){let e=P();o(),b(m(2,5,"labels.heading.Performance History")),o(8),v("",m(10,7,"labels.inputs.Number of Repayments")," :"),o(3),v(" ",m(13,9,e.loanDetails==null?null:e.loanDetails.numberOfRepayments)," "),o(4),v("",m(17,11,"labels.inputs.Maturity Date")," :"),o(3),v(" ",m(20,13,e.loanDetails==null?null:e.loanDetails.timeline.expectedMaturityDate)," ")}}function hC(t,n){t&1&&T(0,"th",21)}function gC(t,n){if(t&1&&(s(0,"td",22),c(1),l()),t&2){let e=n.$implicit;o(),b(e.property)}}function _C(t,n){t&1&&(s(0,"th",23),c(1),p(2,"translate"),l()),t&2&&(o(),b(m(2,1,"labels.inputs.Original")))}function CC(t,n){if(t&1&&(s(0,"td",24),c(1),p(2,"currency"),l()),t&2){let e=n.$implicit,i=P(2);o(),v(" ",Ye(2,1,e.original,i.currencyCode,"symbol-narrow","1.2-2")," ")}}function bC(t,n){t&1&&(s(0,"th",23),c(1),p(2,"translate"),l()),t&2&&(o(),b(m(2,1,"labels.inputs.Paid")))}function vC(t,n){if(t&1&&(s(0,"td",25),c(1),p(2,"currency"),l()),t&2){let e=n.$implicit,i=P(2);o(),v(" ",Ye(2,1,e.paid,i.currencyCode,"symbol-narrow","1.2-2")," ")}}function xC(t,n){t&1&&(s(0,"th",23),c(1),p(2,"translate"),l()),t&2&&(o(),v(" ",m(2,1,"labels.inputs.Credit Adjustments")," "))}function yC(t,n){if(t&1&&(s(0,"td",26),c(1),p(2,"currency"),l()),t&2){let e=n.$implicit,i=P(2);o(),v(" ",Ye(2,1,e.adjustment,i.currencyCode,"symbol-narrow","1.2-2")," ")}}function SC(t,n){t&1&&(s(0,"th",23),c(1),p(2,"translate"),l()),t&2&&(o(),b(m(2,1,"labels.inputs.Waived")))}function DC(t,n){if(t&1&&(s(0,"td",25),c(1),p(2,"currency"),l()),t&2){let e=n.$implicit,i=P(2);o(),v(" ",Ye(2,1,e.waived,i.currencyCode,"symbol-narrow","1.2-2")," ")}}function wC(t,n){t&1&&(s(0,"th",23),c(1),p(2,"translate"),l()),t&2&&(o(),b(m(2,1,"labels.inputs.Written Off")))}function TC(t,n){if(t&1&&(s(0,"td",25),c(1),p(2,"currency"),l()),t&2){let e=n.$implicit,i=P(2);o(),v(" ",Ye(2,1,e.writtenOff,i.currencyCode,"symbol-narrow","1.2-2")," ")}}function PC(t,n){t&1&&(s(0,"th",23),c(1),p(2,"translate"),l()),t&2&&(o(),b(m(2,1,"labels.inputs.Outstanding")))}function AC(t,n){if(t&1&&(s(0,"td",24),c(1),p(2,"currency"),l()),t&2){let e=n.$implicit,i=P(2);o(),v(" ",Ye(2,1,e.outstanding,i.currencyCode,"symbol-narrow","1.2-2")," ")}}function MC(t,n){t&1&&(s(0,"th",23),c(1),p(2,"translate"),l()),t&2&&(o(),b(m(2,1,"labels.inputs.Over Due")))}function OC(t,n){if(t&1&&(s(0,"td",24),c(1),p(2,"currency"),l()),t&2){let e=n.$implicit,i=P(2);o(),v(" ",Ye(2,1,e.overdue,i.currencyCode,"symbol-narrow","1.2-2")," ")}}function IC(t,n){t&1&&T(0,"tr",27)}function EC(t,n){t&1&&T(0,"tr",28)}function LC(t,n){if(t&1&&(s(0,"div")(1,"h3"),c(2),p(3,"translate"),l(),s(4,"table",4),X(5,5),k(6,hC,1,0,"th",6)(7,gC,2,1,"td",7),Q(),X(8,8),k(9,_C,3,3,"th",9)(10,CC,3,6,"td",10),Q(),X(11,11),k(12,bC,3,3,"th",9)(13,vC,3,6,"td",12),Q(),X(14,13),k(15,xC,3,3,"th",9)(16,yC,3,6,"td",14),Q(),X(17,15),k(18,SC,3,3,"th",9)(19,DC,3,6,"td",12),Q(),X(20,16),k(21,wC,3,3,"th",9)(22,TC,3,6,"td",12),Q(),X(23,17),k(24,PC,3,3,"th",9)(25,AC,3,6,"td",10),Q(),X(26,18),k(27,MC,3,3,"th",9)(28,OC,3,6,"td",10),Q(),k(29,IC,1,0,"tr",19)(30,EC,1,0,"tr",20),l()()),t&2){let e=P();o(2),b(m(3,4,"labels.heading.Loan Summary")),o(2),x("dataSource",e.dataSource),o(25),x("matHeaderRowDef",e.loanSummaryColumns),o(),x("matRowDefColumns",e.loanSummaryColumns)}}function NC(t,n){if(t&1&&(s(0,"td",22),c(1),p(2,"translate"),l()),t&2){let e=n.$implicit;o(),b(m(2,1,"labels.inputs."+e.key))}}function kC(t,n){if(t&1&&(s(0,"span"),c(1),p(2,"dateFormat"),l()),t&2){let e=P(4);o(),v(" ",m(2,1,e.loanDetails.timeline.actualDisbursementDate)," ")}}function FC(t,n){t&1&&(s(0,"span"),c(1),p(2,"translate"),l()),t&2&&(o(),v(" ",m(2,1,"labels.inputs.Not Available")," "))}function RC(t,n){if(t&1&&(M(0,kC,3,3,"span"),M(1,FC,3,3,"span")),t&2){let e=P(3);O(e.loanDetails.timeline.actualDisbursementDate?0:-1),o(),O(e.loanDetails.timeline.actualDisbursementDate?-1:1)}}function BC(t,n){if(t&1&&(s(0,"span"),c(1),l()),t&2){let e=P(4);o(),v(" ",e.loanDetails.loanPurposeName," ")}}function qC(t,n){t&1&&(s(0,"span"),c(1),p(2,"translate"),l()),t&2&&(o(),v(" ",m(2,1,"labels.inputs.Not Available")," "))}function jC(t,n){if(t&1&&(M(0,BC,2,1,"span"),M(1,qC,3,3,"span")),t&2){let e=P(3);O(e.loanDetails.loanPurposeName?0:-1),o(),O(e.loanDetails.loanPurposeName?-1:1)}}function zC(t,n){t&1&&(s(0,"span"),c(1),p(2,"translate"),l()),t&2&&(o(),v(" ",m(2,1,"labels.inputs.Unassigned")," "))}function VC(t,n){t&1&&T(0,"span")}function UC(t,n){if(t&1&&(s(0,"span"),c(1),M(2,VC,1,0,"span"),l()),t&2){let e=P(4);o(),v(" ",e.loanDetails.loanOfficerName," \xA0 "),o(),O(e.loanDetails.loanOfficerName?2:-1)}}function HC(t,n){if(t&1&&(M(0,zC,3,3,"span"),M(1,UC,3,2,"span")),t&2){let e=P(3);O(e.loanDetails.loanOfficerName?-1:0),o(),O(e.loanDetails.loanOfficerName?1:-1)}}function GC(t,n){if(t&1&&(s(0,"span"),c(1),l()),t&2){let e=P(3);o(),$t(" ",e.loanDetails.currency.name," ",e.loanDetails.currency.code," ")}}function WC(t,n){if(t&1&&(s(0,"span"),T(1,"mifosx-external-identifier",31),l()),t&2){let e=P(4);o(),x("externalId",ce(e.loanDetails.externalId))}}function $C(t,n){t&1&&(s(0,"span"),c(1),p(2,"translate"),l()),t&2&&(o(),v(" ",m(2,1,"labels.inputs.Not Available")," "))}function YC(t,n){if(t&1&&(M(0,WC,2,2,"span"),M(1,$C,3,3,"span")),t&2){let e=P(3);O(e.loanDetails.externalId?0:-1),o(),O(e.loanDetails.externalId?-1:1)}}function ZC(t,n){if(t&1&&(s(0,"span"),c(1),l()),t&2){let e=P(2).$implicit;o(),b(e.value)}}function KC(t,n){t&1&&(s(0,"span"),c(1),p(2,"translate"),l()),t&2&&(o(),b(m(2,1,"labels.inputs.Not Available")))}function JC(t,n){if(t&1&&(M(0,ZC,2,1,"span"),M(1,KC,3,3,"span")),t&2){let e=P().$implicit;O(e.value?0:-1),o(),O(e.value?-1:1)}}function XC(t,n){if(t&1&&c(0),t&2){let e=P().$implicit;v(" ",e.value," ")}}function QC(t,n){if(t&1&&(s(0,"td",22),M(1,RC,2,2),M(2,jC,2,2),M(3,HC,2,2),M(4,GC,2,2,"span"),M(5,YC,2,2),M(6,JC,2,2),M(7,XC,1,1),l()),t&2){let e=n.$implicit;o(),O(e.key==="Disbursement Date"?1:-1),o(),O(e.key==="Loan Purpose"?2:-1),o(),O(e.key==="Loan Officer"?3:-1),o(),O(e.key==="Currency"?4:-1),o(),O(e.key==="External Id"?5:-1),o(),O(e.key==="Write-off Reason"?6:-1),o(),O(e.key==="Proposed Amount"||e.key==="Approved Amount"||e.key==="Disburse Amount"?7:-1)}}function tb(t,n){t&1&&T(0,"tr",28)}function eb(t,n){if(t&1&&(s(0,"div")(1,"h3"),c(2),p(3,"translate"),l(),s(4,"table",4),X(5,29),k(6,NC,3,3,"td",7),Q(),X(7,30),k(8,QC,8,7,"td",7),Q(),k(9,tb,1,0,"tr",20),l()()),t&2){let e=P();o(2),b(m(3,3,"labels.heading.Loan Details")),o(2),x("dataSource",e.detailsDataSource),o(5),x("matRowDefColumns",e.loanDetailsColumns)}}function nb(t,n){if(t&1&&(s(0,"td",22),c(1),p(2,"translate"),l()),t&2){let e=n.$implicit;o(),b(m(2,1,"labels.inputs."+e.key))}}function ib(t,n){if(t&1&&(s(0,"span"),c(1),p(2,"dateFormat"),l()),t&2){let e=P(4);o(),v(" ",m(2,1,e.loanDetails.timeline.actualDisbursementDate)," ")}}function ab(t,n){t&1&&(s(0,"span"),c(1),p(2,"translate"),l()),t&2&&(o(),v(" ",m(2,1,"labels.inputs.Not Available")," "))}function ob(t,n){if(t&1&&(M(0,ib,3,3,"span"),M(1,ab,3,3,"span")),t&2){let e=P(3);O(e.loanDetails.timeline.actualDisbursementDate?0:-1),o(),O(e.loanDetails.timeline.actualDisbursementDate?-1:1)}}function rb(t,n){t&1&&(s(0,"span"),c(1),p(2,"translate"),l()),t&2&&(o(),v(" ",m(2,1,"labels.inputs.Unassigned")," "))}function lb(t,n){t&1&&T(0,"span")}function sb(t,n){if(t&1&&(s(0,"span"),c(1),M(2,lb,1,0,"span"),l()),t&2){let e=P(4);o(),v(" ",e.loanDetails.loanOfficerName," \xA0 "),o(),O(e.loanDetails.loanOfficerName?2:-1)}}function cb(t,n){if(t&1&&(M(0,rb,3,3,"span"),M(1,sb,3,2,"span")),t&2){let e=P(3);O(e.loanDetails.loanOfficerName?-1:0),o(),O(e.loanDetails.loanOfficerName?1:-1)}}function pb(t,n){if(t&1&&(s(0,"span"),c(1),l()),t&2){let e=P(3);o(),$t(" ",e.loanDetails.currency.name," ",e.loanDetails.currency.code," ")}}function mb(t,n){if(t&1&&(s(0,"span"),T(1,"mifosx-external-identifier",31),l()),t&2){let e=P(4);o(),x("externalId",ce(e.loanDetails.externalId))}}function db(t,n){t&1&&(s(0,"span"),c(1),p(2,"translate"),l()),t&2&&(o(),v(" ",m(2,1,"labels.inputs.Not Available")," "))}function ub(t,n){if(t&1&&(M(0,mb,2,2,"span"),M(1,db,3,3,"span")),t&2){let e=P(3);O(e.loanDetails.externalId?0:-1),o(),O(e.loanDetails.externalId?-1:1)}}function fb(t,n){if(t&1&&(s(0,"td",22),M(1,ob,2,2),M(2,cb,2,2),M(3,pb,2,2,"span"),M(4,ub,2,2),l()),t&2){let e=n.$implicit;o(),O(e.key==="Disbursement Date"?1:-1),o(),O(e.key==="Loan Officer"?2:-1),o(),O(e.key==="Currency"?3:-1),o(),O(e.key==="External Id"?4:-1)}}function hb(t,n){t&1&&T(0,"tr",28)}function gb(t,n){if(t&1&&(s(0,"div")(1,"h3"),c(2),p(3,"translate"),l(),s(4,"table",4),X(5,29),k(6,nb,3,3,"td",7),Q(),X(7,30),k(8,fb,5,4,"td",7),Q(),k(9,hb,1,0,"tr",20),l()()),t&2){let e=P();o(2),b(m(3,3,"labels.heading.Loan Details")),o(2),x("dataSource",e.detailsDataSource),o(5),x("matRowDefColumns",e.loanDetailsColumns)}}function _b(t,n){if(t&1&&(s(0,"span",35),c(1),l()),t&2){let e=P(2);o(),v(" ",e.loanDetails.loanPurposeName," ")}}function Cb(t,n){t&1&&(s(0,"span",35),c(1),p(2,"translate"),l()),t&2&&(o(),v(" ",m(2,1,"labels.inputs.Not Provided")," "))}function bb(t,n){if(t&1&&(s(0,"div",34)(1,"span",35),c(2),p(3,"translate"),l(),s(4,"span",35),c(5),p(6,"currency"),l()()),t&2){let e=P(2);o(2),v("",m(3,2,"labels.inputs.Approved Amount"),":"),o(3),b(Ye(6,4,e.loanDetails.approvedPrincipal,e.currencyCode,"symbol-narrow","1.2-2"))}}function vb(t,n){if(t&1&&(s(0,"div",34)(1,"span",35),c(2),p(3,"translate"),l(),s(4,"span",35),c(5),p(6,"currency"),l()()),t&2){let e=P(2);o(2),v("",m(3,2,"labels.inputs.Disburse Amount"),":"),o(3),b(Ye(6,4,e.loanDetails.principal,e.currencyCode,"symbol-narrow","1.2-2"))}}function xb(t,n){if(t&1&&(s(0,"div",34)(1,"span",35),c(2),p(3,"translate"),l(),s(4,"span",35),c(5),p(6,"currency"),l()()),t&2){let e=P(2);o(2),v("",m(3,2,"labels.inputs.Balloon Repayment Amount"),":"),o(3),b(Ye(6,4,e.loanDetails.balloonRepaymentAmount,e.currencyCode,"symbol-narrow","1.2-2"))}}function yb(t,n){if(t&1&&(s(0,"div")(1,"h3"),c(2),p(3,"translate"),l(),s(4,"div",32)(5,"div",33)(6,"div",34)(7,"span",35),c(8),p(9,"translate"),l(),M(10,_b,2,1,"span",35),M(11,Cb,3,3,"span",35),l(),s(12,"div",34)(13,"span",35),c(14),p(15,"translate"),l(),s(16,"span",35),c(17),p(18,"currency"),l()(),M(19,bb,7,9,"div",34),M(20,vb,7,9,"div",34),M(21,xb,7,9,"div",34),s(22,"div",34)(23,"span",35),c(24),p(25,"translate"),l(),s(26,"span",35),c(27),p(28,"translate"),l()()()()()),t&2){let e=P();o(2),b(m(3,11,"labels.heading.Loan Purpose")),o(6),v("",m(9,13,"labels.inputs.Loan Purpose"),":"),o(2),O(e.loanDetails.loanPurposeName?10:-1),o(),O(e.loanDetails.loanPurposeName?-1:11),o(3),v("",m(15,15,"labels.inputs.Proposed Amount"),":"),o(3),b(Ye(18,17,e.loanDetails.proposedPrincipal,e.currencyCode,"symbol-narrow","1.2-2")),o(2),O(e.showApprovedAmountBasedOnStatus()?19:-1),o(),O(e.showDisbursedAmountBasedOnStatus()?20:-1),o(),O(e.loanDetails.balloonRepaymentAmount>0?21:-1),o(3),v("",m(25,22,"labels.inputs.Arrears By"),":"),o(3),b(m(28,24,"labels.inputs.Not Provided"))}}var kp=(()=>{class t{constructor(){this.route=A(Et),this.loanSummaryColumns=["Empty","Original","Paid","Waived","Written Off","Outstanding","Over Due"],this.loanDetailsColumns=["Key","Value"],this.showDisbursedAmountBasedOnStatus=function(){return!(this.status==="Submitted and pending approval"||this.status==="Withdrawn by applicant"||this.status==="Rejected"||this.status==="Approved")},this.route.parent.data.subscribe(e=>{this.loanDetails=e.loanDetailsData,this.currencyCode=this.loanDetails.currency.code,this.loanDetails.transactions&&this.loanDetails.transactions.some(i=>{if(i.type.code==="loanTransactionType.chargeback"){this.loanSummaryColumns=["Empty","Original","Adjustments","Paid","Waived","Written Off","Outstanding","Over Due"];return}})})}ngOnInit(){this.status=this.loanDetails.value,this.loanDetails.summary?(this.setloanSummaryTableData(),this.setloanDetailsTableData()):this.setloanNonDetailsTableData()}setloanSummaryTableData(){this.loanSummaryTableData=[{property:"Principal",original:this.loanDetails.summary.totalPrincipal,adjustment:this.loanDetails.summary.principalAdjustments||0,paid:this.loanDetails.summary.principalPaid,waived:this.loanDetails.summary.principalWaived||0,writtenOff:this.loanDetails.summary.principalWrittenOff,outstanding:this.loanDetails.summary.principalOutstanding,overdue:this.loanDetails.summary.principalOverdue},{property:"Interest",original:this.loanDetails.summary.interestCharged,adjustment:"0",paid:this.loanDetails.summary.interestPaid,waived:this.loanDetails.summary.interestWaived,writtenOff:this.loanDetails.summary.interestWrittenOff,outstanding:this.loanDetails.summary.interestOutstanding,overdue:this.loanDetails.summary.interestOverdue},{property:"Fees",original:this.loanDetails.summary.feeChargesCharged,adjustment:"0",paid:this.loanDetails.summary.feeChargesPaid,waived:this.loanDetails.summary.feeChargesWaived,writtenOff:this.loanDetails.summary.feeChargesWrittenOff,outstanding:this.loanDetails.summary.feeChargesOutstanding,overdue:this.loanDetails.summary.feeChargesOverdue},{property:"Penalties",original:this.loanDetails.summary.penaltyChargesCharged,adjustment:"0",paid:this.loanDetails.summary.penaltyChargesPaid,waived:this.loanDetails.summary.penaltyChargesWaived,writtenOff:this.loanDetails.summary.penaltyChargesWrittenOff,outstanding:this.loanDetails.summary.penaltyChargesOutstanding,overdue:this.loanDetails.summary.penaltyChargesOverdue},{property:"Total",original:this.loanDetails.summary.totalExpectedRepayment,adjustment:this.loanDetails.summary.principalAdjustments||0,paid:this.loanDetails.summary.totalRepayment,waived:this.loanDetails.summary.totalWaived,writtenOff:this.loanDetails.summary.totalWrittenOff,outstanding:this.loanDetails.summary.totalOutstanding,overdue:this.loanDetails.summary.totalOverdue}],this.dataSource=new Li(this.loanSummaryTableData)}setloanDetailsTableData(){this.loanDetailsTableData=[{key:"Disbursement Date"},{key:"Loan Purpose"},{key:"Loan Officer"},{key:"Currency"},{key:"External Id"},{key:"Proposed Amount",value:this.loanDetails.proposedPrincipal},{key:"Approved Amount",value:this.loanDetails.approvedPrincipal},{key:"Disburse Amount",value:this.loanDetails.principal}],this.loanDetails.writeOffReason&&this.loanDetailsTableData.push({key:"Write-off Reason",value:this.loanDetails.writeOffReason}),this.detailsDataSource=new Li(this.loanDetailsTableData)}setloanNonDetailsTableData(){this.loanDetailsTableData=[{key:"Disbursement Date"},{key:"Currency"},{key:"Loan Officer"},{key:"External Id"}],this.detailsDataSource=new Li(this.loanDetailsTableData)}showApprovedAmountBasedOnStatus(){return!(this.status==="Submitted and pending approval"||this.status==="Withdrawn by applicant"||this.status==="Rejected")}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=Dt({type:t,selectors:[["mifosx-general-tab"]],decls:6,vars:5,consts:[[1,"tab-container","mat-typography"],[1,"layout-row","gap-32px","performance-history-container"],[1,"flex-25"],[1,"flex-25","left"],["mat-table","",3,"dataSource"],["matColumnDef","Empty"],["mat-header-cell","",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","Original"],["mat-header-cell","","class","r-amount",4,"matHeaderCellDef"],["mat-cell","","class","r-amount",4,"matCellDef"],["matColumnDef","Paid"],["mat-cell","","class","r-amount amount-minus",4,"matCellDef"],["matColumnDef","Adjustments"],["mat-cell","","class","r-amount amount-plus",4,"matCellDef"],["matColumnDef","Waived"],["matColumnDef","Written Off"],["matColumnDef","Outstanding"],["matColumnDef","Over Due"],["mat-header-row","",4,"matHeaderRowDef"],["mat-row","",4,"matRowDef","matRowDefColumns"],["mat-header-cell",""],["mat-cell",""],["mat-header-cell","",1,"r-amount"],["mat-cell","",1,"r-amount"],["mat-cell","",1,"r-amount","amount-minus"],["mat-cell","",1,"r-amount","amount-plus"],["mat-header-row",""],["mat-row",""],["matColumnDef","Key"],["matColumnDef","Value"],["completed","true",3,"externalId"],[1,"container"],[1,"layout-row-wrap","responsive-column"],[1,"flex-contents"],[1,"flex-50"]],template:function(i,a){i&1&&(s(0,"div",0),M(1,fC,21,15),M(2,LC,31,6,"div"),M(3,eb,10,5,"div"),M(4,gb,10,5,"div"),M(5,yb,29,26,"div"),l()),i&2&&(o(),O(a.loanDetails.summary?1:-1),o(),O(a.loanDetails.summary?2:-1),o(),O(a.loanDetails.summary?3:-1),o(),O(a.loanDetails.summary?-1:4),o(),O(a.loanDetails.summary?-1:5))},dependencies:[wt,Tt,bn,yn,xn,Sn,vn,Dn,wn,Pn,Tn,An,Va,Sa,En,Pt,hn],styles:[".tab-container[_ngcontent-%COMP%]{padding:1%;margin:1%}.tab-container[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{margin:1% auto}.tab-container[_ngcontent-%COMP%] .performance-history-container[_ngcontent-%COMP%]{border:1px solid;padding:1%;margin-bottom:20px}.tab-container[_ngcontent-%COMP%] table[_ngcontent-%COMP%]{width:100%;margin-bottom:20px}span[_ngcontent-%COMP%]{margin:.5em 0}"]})}}return t})();function Sb(t,n){if(t&1&&(ee(0,"span")(1,"span",4),c(2),p(3,"translate"),te(),c(4),ee(5,"span",4),c(6),p(7,"translateKey"),te()()),t&2){let e=P(2);o(2),b(m(3,3,"labels.commons.on")),o(2),v("",e.loanDetails.repaymentFrequencyNthDayType==null?null:e.loanDetails.repaymentFrequencyNthDayType.value," "),o(2),b(Ge(7,5,e.loanDetails.repaymentFrequencyDayOfWeekType==null?null:e.loanDetails.repaymentFrequencyDayOfWeekType.value,"catalogs"))}}function Db(t,n){if(t&1&&(ee(0,"span",4),M(1,Sb,8,8,"span"),te()),t&2){let e=P();o(),O(e.loanDetails.repaymentFrequencyDayOfWeekType?1:-1)}}function wb(t,n){if(t&1&&(ee(0,"div",2)(1,"span",3),c(2),p(3,"translate"),te(),ee(4,"span",3),c(5),p(6,"translateKey"),te()()),t&2){let e=P();o(2),v(" ",m(3,3,"labels.inputs.Fixed Length")," "),o(3),$t(" ",e.loanDetails.fixedLength," ",Ge(6,5,e.loanDetails.repaymentFrequencyType.value,"catalogs"))}}function Tb(t,n){if(t&1&&(ee(0,"div",2)(1,"span",3),c(2),p(3,"translate"),te(),ee(4,"span",3),c(5),p(6,"formatNumber"),te()()),t&2){let e=P();o(2),v(" ",m(3,2,"labels.inputs.Principal Percentage Per Installment")," "),o(3),v(" ",m(6,4,e.loanDetails.fixedPrincipalPercentagePerInstallment)," %")}}function Pb(t,n){if(t&1&&(ee(0,"div",2)(1,"span",3),c(2),p(3,"translate"),te(),ee(4,"span",3),c(5),p(6,"translateKey"),te()()),t&2){let e=P();o(2),v(" ",m(3,2,"labels.inputs.Income capitalization calculation type")),o(3),v(" ",Ge(6,4,e.loanDetails.capitalizedIncomeCalculationType==null?null:e.loanDetails.capitalizedIncomeCalculationType.value,"catalogs")," ")}}function Ab(t,n){if(t&1&&(ee(0,"div",2)(1,"span",3),c(2),p(3,"translate"),te(),ee(4,"span",3),c(5),p(6,"translateKey"),te()()),t&2){let e=P();o(2),v(" ",m(3,2,"labels.inputs.Income capitalization strategy")),o(3),v(" ",Ge(6,4,e.loanDetails.capitalizedIncomeStrategy==null?null:e.loanDetails.capitalizedIncomeStrategy.value,"catalogs")," ")}}function Mb(t,n){if(t&1&&(ee(0,"div",2)(1,"span",3),c(2),p(3,"translate"),te(),ee(4,"span",3),c(5),p(6,"translateKey"),te()()),t&2){let e=P();o(2),v(" ",m(3,2,"labels.inputs.Income capitalization type")),o(3),v(" ",Ge(6,4,e.loanDetails.capitalizedIncomeType==null?null:e.loanDetails.capitalizedIncomeType.value,"catalogs")," ")}}function Ob(t,n){if(t&1&&(ee(0,"div",2)(1,"span",3),c(2),p(3,"translate"),te(),ee(4,"span",3),c(5),p(6,"translateKey"),te()()),t&2){let e=P();o(2),v(" ",m(3,2,"labels.inputs.Buy down fee calculation type")),o(3),v(" ",Ge(6,4,e.loanDetails.buyDownFeeCalculationType==null?null:e.loanDetails.buyDownFeeCalculationType.value,"catalogs")," ")}}function Ib(t,n){if(t&1&&(ee(0,"div",2)(1,"span",3),c(2),p(3,"translate"),te(),ee(4,"span",3),c(5),p(6,"translateKey"),te()()),t&2){let e=P();o(2),v(" ",m(3,2,"labels.inputs.Buy down fee strategy")),o(3),v(" ",Ge(6,4,e.loanDetails.buyDownFeeStrategy==null?null:e.loanDetails.buyDownFeeStrategy.value,"catalogs")," ")}}function Eb(t,n){if(t&1&&(ee(0,"div",2)(1,"span",3),c(2),p(3,"translate"),te(),ee(4,"span",3),c(5),p(6,"translateKey"),te()()),t&2){let e=P();o(2),v(" ",m(3,2,"labels.inputs.Buy down fee income type")),o(3),v(" ",Ge(6,4,e.loanDetails.buyDownFeeIncomeType==null?null:e.loanDetails.buyDownFeeIncomeType.value,"catalogs")," ")}}function Lb(t,n){if(t&1&&(ee(0,"div",2)(1,"span",3),c(2),p(3,"translate"),te(),ee(4,"span",3),c(5),p(6,"yesNo"),te()()),t&2){let e=P();o(2),v(" ",m(3,2,"labels.inputs.Merchant Buy down fee")),o(3),v(" ",m(6,4,e.loanDetails.merchantBuyDownFee)," ")}}function Nb(t,n){if(t&1&&(ee(0,"span",3),c(1),te()),t&2){let e=P();o(),v(" ",e.loanDetails.fundName," ")}}function kb(t,n){t&1&&(ee(0,"span",3),c(1),p(2,"translate"),te()),t&2&&(o(),v(" ",m(2,1,"labels.inputs.Unassigned")," "))}function Fb(t,n){if(t&1&&(ee(0,"div",2)(1,"span",3),c(2),p(3,"translate"),te(),ee(4,"span",3),c(5),p(6,"formatNumber"),te()()),t&2){let e=P();o(2),v(" ",m(3,2,"labels.inputs.Fixed EMI amount")),o(3),v(" ",m(6,4,e.loanDetails.fixedEmiAmount)," ")}}function Rb(t,n){if(t&1&&(ee(0,"div",2)(1,"span",3),c(2),p(3,"translate"),te(),ee(4,"span",3),c(5),p(6,"yesNo"),te()()),t&2){let e=P();o(2),v(" ",m(3,2,"labels.inputs.Is Topup Loan"),"?"),o(3),v(" ",m(6,4,e.loanDetails.isTopup)," ")}}function Bb(t,n){if(t&1&&(ee(0,"div",2)(1,"span",3),c(2),p(3,"translate"),te(),ee(4,"span",3)(5,"a",5),c(6),te()()()),t&2){let e=P();o(2),v(" ",m(3,2,"labels.inputs.Loan closed with Topup")," "),o(4),b(e.loanDetails.closureLoanAccountNo)}}function qb(t,n){if(t&1&&(ee(0,"div",2)(1,"span",3),c(2),p(3,"translate"),te(),ee(4,"span",3),c(5),p(6,"formatNumber"),te()()),t&2){let e=P();o(2),v(" ",m(3,2,"labels.inputs.Topup closure amount")),o(3),v(" ",m(6,4,e.loanDetails.topupAmount)," ")}}function jb(t,n){if(t&1&&(ee(0,"div",2)(1,"span",3),c(2),p(3,"translate"),te(),ee(4,"span",3),c(5),p(6,"translateKey"),te()()),t&2){let e=P();o(2),v(" ",m(3,2,"labels.inputs.Interest recalculation compounding on")),o(3),v(" ",Ge(6,4,e.loanDetails.interestRecalculationData.interestRecalculationCompoundingType.value,"catalogs")," ")}}function zb(t,n){if(t&1&&(ee(0,"div",2)(1,"span",3),c(2),p(3,"translate"),te(),ee(4,"span",3),c(5),p(6,"translateKey"),te()()),t&2){let e=P();o(2),v(" ",m(3,2,"labels.inputs.Advance payments adjustment type")),o(3),v(" ",Ge(6,4,e.loanDetails.interestRecalculationData.rescheduleStrategyType.value,"catalogs")," ")}}function Vb(t,n){if(t&1&&(ee(0,"div",2)(1,"span",3),c(2),p(3,"translate"),te(),ee(4,"span",3),c(5),te()()),t&2){let e=P();o(2),v(" ",m(3,2,"labels.inputs.Frequency for recalculate Outstanding Principal")),o(3),v(" ",e.loanDetails.interestRecalculationData.calendarData.humanReadable," ")}}function Ub(t,n){if(t&1&&(ee(0,"div",2)(1,"span",3),c(2),p(3,"translate"),te(),ee(4,"span",3),c(5),te()()),t&2){let e=P();o(2),v(" ",m(3,2,"labels.inputs.Frequency for compounding")),o(3),v(" ",e.loanDetails.interestRecalculationData.compoundingCalendarData.humanReadable," ")}}function Hb(t,n){if(t&1&&(ee(0,"div",2)(1,"span",3),c(2),p(3,"translate"),te(),ee(4,"span",3),c(5),p(6,"yesNo"),te()()),t&2){let e=P();o(2),v(" ",m(3,2,"labels.inputs.Variable Installments Allowed")),o(3),v(" ",m(6,4,e.loanDetails.isVariableInstallmentsAllowed)," ")}}function Gb(t,n){if(t&1&&(ee(0,"div",2)(1,"span",3),c(2),p(3,"translate"),te(),ee(4,"span",3),c(5),p(6,"formatNumber"),p(7,"translate"),p(8,"formatNumber"),p(9,"translate"),te()()),t&2){let e=P();o(2),v(" ",m(3,5,"labels.inputs.Gap between Installments")),o(3),Qs(" ",m(6,7,e.loanDetails.minimumGap),"\xA0",m(7,9,"labels.text.Days"),"\xA0, Max:",m(8,11,e.loanDetails.maximumGap),"\xA0",m(9,13,"labels.text.Days")," ")}}function Wb(t,n){if(t&1&&(ee(0,"div",2)(1,"span",3),c(2),p(3,"translate"),te(),ee(4,"span",3),c(5),p(6,"formatNumber"),te()()),t&2){let e=P();o(2),b(m(3,2,"labels.inputs.Available Disbursement Amount (with Over Applied)")),o(3),b(m(6,4,e.loanDetails.delinquent.availableDisbursementAmountWithOverApplied))}}var Fp=(()=>{class t{constructor(){this.route=A(Et),this.route.parent.data.subscribe(e=>{this.loanDetails=e.loanDetailsData})}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=Dt({type:t,selectors:[["mifosx-account-details"]],decls:205,vars:188,consts:[[1,"container","p-b-20"],[1,"responsive-column"],[1,"flex-fill","layout-row"],[1,"flex-50"],[1,"m-l-10"],["href","#"]],template:function(i,a){i&1&&(ee(0,"div",0)(1,"h3"),c(2),p(3,"translate"),te(),ee(4,"div",1)(5,"div",2)(6,"span",3),c(7),p(8,"translate"),te(),ee(9,"span",3),c(10),p(11,"translateKey"),te()(),ee(12,"div",2)(13,"span",3),c(14),p(15,"translate"),te(),ee(16,"span",3),c(17),p(18,"translateKey"),M(19,Db,2,1,"span",4),te()(),M(20,wb,7,8,"div",2),ee(21,"div",2)(22,"span",3),c(23),p(24,"translate"),te(),ee(25,"span",3),c(26),p(27,"translateKey"),te()(),M(28,Tb,7,6,"div",2),ee(29,"div",2)(30,"span",3),c(31),p(32,"translate"),te(),ee(33,"span",3),c(34),p(35,"yesNo"),te()(),ee(36,"div",2)(37,"span",3),c(38),p(39,"translate"),te(),ee(40,"span",3),c(41),p(42,"formatNumber"),p(43,"translate"),p(44,"translateKey"),te()(),ee(45,"div",2)(46,"span",3),c(47),p(48,"translate"),te(),ee(49,"span",3),c(50),p(51,"translate"),te()(),ee(52,"div",2)(53,"span",3),c(54),p(55,"translate"),te(),ee(56,"span",3),c(57),p(58,"yesNo"),te()(),ee(59,"div",2)(60,"span",3),c(61),p(62,"translate"),te(),ee(63,"span",3),c(64),p(65,"translateKey"),te()(),ee(66,"div",2)(67,"span",3),c(68),p(69,"translate"),te(),ee(70,"span",3),c(71),p(72,"yesNo"),te()(),M(73,Pb,7,7,"div",2),M(74,Ab,7,7,"div",2),M(75,Mb,7,7,"div",2),ee(76,"div",2)(77,"span",3),c(78),p(79,"translate"),te(),ee(80,"span",3),c(81),p(82,"yesNo"),te()(),M(83,Ob,7,7,"div",2),M(84,Ib,7,7,"div",2),M(85,Eb,7,7,"div",2),M(86,Lb,7,6,"div",2),ee(87,"div",2)(88,"span",3),c(89),p(90,"translate"),te(),ee(91,"span",3),c(92),te()(),ee(93,"div",2)(94,"span",3),c(95),p(96,"translate"),te(),ee(97,"span",3),c(98),te()(),ee(99,"div",2)(100,"span",3),c(101),p(102,"translate"),te(),ee(103,"span",3),c(104),te()(),ee(105,"div",2)(106,"span",3),c(107),p(108,"translate"),te(),ee(109,"span",3),c(110),p(111,"yesNo"),te()(),ee(112,"div",2)(113,"span",3),c(114),p(115,"translate"),te(),M(116,Nb,2,1,"span",3),M(117,kb,3,3,"span",3),te(),ee(118,"div",2)(119,"span",3),c(120),p(121,"translate"),te(),ee(122,"span",3),c(123),te()(),ee(124,"div",2)(125,"span",3),c(126),p(127,"translate"),te(),ee(128,"span",3),c(129),p(130,"translateKey"),te()(),ee(131,"div",2)(132,"span",3),c(133),p(134,"translate"),te(),ee(135,"span",3),c(136),p(137,"yesNo"),te()(),ee(138,"div",2)(139,"span",3),c(140),p(141,"translate"),te(),ee(142,"span",3),c(143),p(144,"yesNo"),te()(),ee(145,"div",2)(146,"span",3),c(147),p(148,"translate"),te(),ee(149,"span",3),c(150),p(151,"dateFormat"),te()(),ee(152,"div",2)(153,"span",3),c(154),p(155,"translate"),te(),ee(156,"span",3),c(157),p(158,"dateFormat"),te()(),ee(159,"div",2)(160,"span",3),c(161),p(162,"translate"),te(),ee(163,"span",3),c(164),p(165,"dateFormat"),te()(),ee(166,"div",2)(167,"span",3),c(168),p(169,"translate"),te(),ee(170,"span",3),c(171),p(172,"dateFormat"),te()(),M(173,Fb,7,6,"div",2),M(174,Rb,7,6,"div",2),M(175,Bb,7,4,"div",2),M(176,qb,7,6,"div",2),ee(177,"div",2)(178,"span",3),c(179),p(180,"translate"),te(),ee(181,"span",3),c(182),p(183,"yesNo"),te()(),ee(184,"div",2)(185,"span",3),c(186),p(187,"translate"),te(),ee(188,"span",3),c(189),p(190,"translateKey"),te()(),ee(191,"div",2)(192,"span",3),c(193),p(194,"translate"),te(),ee(195,"span",3),c(196),p(197,"translateKey"),te()(),M(198,jb,7,7,"div",2),M(199,zb,7,7,"div",2),M(200,Vb,6,4,"div",2),M(201,Ub,6,4,"div",2),M(202,Hb,7,6,"div",2),M(203,Gb,10,15,"div",2),M(204,Wb,7,6,"div",2),te()()),i&2&&(o(2),b(m(3,80,"labels.heading.Loan Details")),o(5),b(m(8,82,"labels.inputs.Repayment Strategy")),o(3),b(Ge(11,84,a.loanDetails.transactionProcessingStrategyName,"catalogs")),o(4),b(m(15,87,"labels.inputs.Repayments")),o(3),Xs("",a.loanDetails.numberOfRepayments," every ",a.loanDetails.repaymentEvery,"\xA0",Ge(18,89,a.loanDetails.repaymentFrequencyType.value,"catalogs")," "),o(2),O((a.loanDetails.repaymentFrequencyType==null?null:a.loanDetails.repaymentFrequencyType.id)===2&&(a.loanDetails.repaymentFrequencyNthDayType==null?null:a.loanDetails.repaymentFrequencyNthDayType.id)!==0&&(a.loanDetails.repaymentFrequencyDayOfWeekType==null?null:a.loanDetails.repaymentFrequencyDayOfWeekType.id)!==0?19:-1),o(),O(a.loanDetails.fixedLength?20:-1),o(3),v(" ",m(24,92,"labels.inputs.Amortization")," "),o(3),v(" ",Ge(27,94,a.loanDetails.amortizationType.value,"catalogs")," "),o(2),O(a.loanDetails.fixedPrincipalPercentagePerInstallment?28:-1),o(3),v(" ",m(32,97,"labels.inputs.Equal Amortization")," "),o(3),v(" ",m(35,99,a.loanDetails.isEqualAmortization)," "),o(4),v(" ",m(39,101,"labels.inputs.Interest")," "),o(3),Qs(" ",m(42,103,a.loanDetails.annualInterestRate)," % ",m(43,105,"labels.text.per annum")," (",a.loanDetails.interestRatePerPeriod," %\xA0 ",Ge(44,107,a.loanDetails.interestRateFrequencyType.value,"catalogs"),") "),o(6),v(" ",m(48,110,"labels.inputs.Interest Type")," "),o(3),v(" ",m(51,112,"labels.text."+a.loanDetails.interestType.value)," "),o(4),v("",m(55,114,"labels.inputs.Enable Down Payments"),":"),o(3),b(m(58,116,a.loanDetails.enableDownPayment)),o(4),v("",m(62,118,"labels.inputs.Loan Charge-off behaviour"),":"),o(3),b(Ge(65,120,a.loanDetails.chargeOffBehaviour.value,"catalogs")),o(4),v(" ",m(69,123,"labels.inputs.Enable income capitalization")),o(3),v(" ",m(72,125,a.loanDetails.enableIncomeCapitalization)," "),o(2),O(a.loanDetails.enableIncomeCapitalization?73:-1),o(),O(a.loanDetails.enableIncomeCapitalization?74:-1),o(),O(a.loanDetails.enableIncomeCapitalization?75:-1),o(3),v(" ",m(79,127,"labels.inputs.Enable Buy down fee")),o(3),v(" ",m(82,129,a.loanDetails.enableBuyDownFee)," "),o(2),O(a.loanDetails.enableBuyDownFee?83:-1),o(),O(a.loanDetails.enableBuyDownFee?84:-1),o(),O(a.loanDetails.enableBuyDownFee?85:-1),o(),O(a.loanDetails.enableBuyDownFee?86:-1),o(3),v(" ",m(90,131,"labels.inputs.Grace: On Principal Payment")),o(3),v(" ",a.loanDetails.graceOnPrincipalPayment," "),o(3),v(" ",m(96,133,"labels.inputs.Grace: On Interest Payment")),o(3),v(" ",a.loanDetails.graceOnInterestPayment," "),o(3),v(" ",m(102,135,"labels.inputs.Grace on Arrears Ageing")),o(3),v(" ",a.loanDetails.graceOnArrearsAgeing," "),o(3),v(" ",m(108,137,"labels.inputs.Enable installment level Delinquency")," "),o(3),v(" ",m(111,139,a.loanDetails.enableInstallmentLevelDelinquency)," "),o(4),v(" ",m(115,141,"labels.inputs.Fund Source")," "),o(2),O(a.loanDetails.fundName?116:-1),o(),O(a.loanDetails.fundName?-1:117),o(3),v(" ",m(121,143,"labels.inputs.Interest Free Period")),o(3),v(" ",a.loanDetails.graceOnInterestCharged," "),o(3),v(" ",m(127,145,"labels.inputs.Interest Calculation Period")),o(3),v(" ",Ge(130,147,a.loanDetails.interestCalculationPeriodType.value,"catalogs")," "),o(4),v(" ",m(134,150,"labels.inputs.Allow Partial Interest Calculation with same as repayment")),o(3),v(" ",m(137,152,a.loanDetails.allowPartialPeriodInterestCalculation)," "),o(4),v("",m(141,154,"labels.inputs.Is interest recognition on disbursement date?"),":"),o(3),b(m(144,156,a.loanDetails.interestRecognitionOnDisbursementDate)),o(4),v(" ",m(148,158,"labels.inputs.Submitted on")),o(3),v(" ",m(151,160,a.loanDetails.timeline.submittedOnDate)," "),o(4),v(" ",m(155,162,"labels.inputs.Approved on")),o(3),v(" ",m(158,164,a.loanDetails.timeline.approvedOnDate)," "),o(4),v(" ",m(162,166,"labels.inputs.Disbursed on")),o(3),v(" ",m(165,168,a.loanDetails.timeline.actualDisbursementDate)," "),o(4),v(" ",m(169,170,"labels.inputs.Matures on")),o(3),v(" ",m(172,172,a.loanDetails.timeline.expectedMaturityDate)," "),o(2),O(a.loanDetails.canDefineInstallmentAmount?173:-1),o(),O(a.loanDetails.isTopup?174:-1),o(),O(a.loanDetails.isTopup?175:-1),o(),O(a.loanDetails.isTopup?176:-1),o(3),v(" ",m(180,174,"labels.inputs.Recalculate Interest based on new terms")),o(3),v(" ",m(183,176,a.loanDetails.isInterestRecalculationEnabled)," "),o(4),v(" ",m(187,178,"labels.inputs.Days in year")),o(3),v(" ",Ge(190,180,a.loanDetails.daysInYearType.value,"catalogs")," "),o(4),v(" ",m(194,183,"labels.inputs.Days in month")),o(3),v(" ",Ge(197,185,a.loanDetails.daysInMonthType.value,"catalogs")," "),o(2),O(a.loanDetails.isInterestRecalculationEnabled?198:-1),o(),O(a.loanDetails.isInterestRecalculationEnabled?199:-1),o(),O(a.loanDetails.isInterestRecalculationEnabled?200:-1),o(),O(a.loanDetails.isInterestRecalculationEnabled&&a.loanDetails.interestRecalculationData.interestRecalculationCompoundingType.id!==0?201:-1),o(),O(a.loanDetails.isVariableInstallmentsAllowed?202:-1),o(),O(a.loanDetails.isVariableInstallmentsAllowed?203:-1),o(),O(a.loanDetails&&a.loanDetails.delinquent&&a.loanDetails.delinquent.availableDisbursementAmountWithOverApplied!==void 0?204:-1))},dependencies:[wt,Tt,En,Pt,qa,hn,Hr],styles:["table[_ngcontent-%COMP%]{width:100%}span[_ngcontent-%COMP%]{margin:.5em 0}"]})}}return t})();var Rp=(()=>{class t{constructor(){this.route=A(Et),this.loansService=A(Mt),this.authenticationService=A(jf);let e=this.authenticationService.getCredentials();this.username=e.username,this.entityId=this.route.parent.snapshot.params.loanId,this.route.data.subscribe(i=>{this.entityNotes=i.loanNotes})}ngOnInit(){this.route.parent.params.subscribe(e=>{this.entityId=e.loanId})}addNote(e){this.loansService.createLoanNote(this.entityId,e).subscribe(i=>{this.entityNotes.push({id:i.resourceId,createdByUsername:this.username,createdOn:new Date,note:e.note})})}editNote(e,i,a){this.loansService.editLoanNote(this.entityId,e,i).subscribe(()=>{this.entityNotes[a].note=i.note})}deleteNote(e,i){this.loansService.deleteLoanNote(this.entityId,e).subscribe(()=>{this.entityNotes.splice(i,1)})}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=Dt({type:t,selectors:[["mifosx-notes-tab"]],decls:1,vars:5,consts:[[3,"entityId","entityNotes","callbackAdd","callbackEdit","callbackDelete"]],template:function(i,a){i&1&&T(0,"mifosx-entity-notes-tab",0),i&2&&x("entityId",a.entityId)("entityNotes",a.entityNotes)("callbackAdd",a.addNote)("callbackEdit",a.editNote)("callbackDelete",a.deleteNote)},dependencies:[wt,Tt,l1],encapsulation:2})}}return t})();function fi(t){"@babel/helpers - typeof";return fi=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},fi(t)}var To=Uint8Array,Qa=Uint16Array,dd=Int32Array,ud=new To([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),fd=new To([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),v1=new To([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),D1=function(t,n){for(var e=new Qa(31),i=0;i<31;++i)e[i]=n+=1<>1|(ri&21845)<<1,br=(br&52428)>>2|(br&13107)<<2,br=(br&61680)>>4|(br&3855)<<4,pd[ri]=((br&65280)>>8|(br&255)<<8)>>1;var br,ri,rc=function(t,n,e){for(var i=t.length,a=0,r=new Qa(n);a>g]=_}else for(d=new Qa(i),a=0;a>15-t[a]);return d},yl=new To(288);for(ri=0;ri<144;++ri)yl[ri]=8;var ri;for(ri=144;ri<256;++ri)yl[ri]=9;var ri;for(ri=256;ri<280;++ri)yl[ri]=7;var ri;for(ri=280;ri<288;++ri)yl[ri]=8;var ri,Bp=new To(32);for(ri=0;ri<32;++ri)Bp[ri]=5;var ri,Yb=rc(yl,9,0);var Zb=rc(Bp,5,0);var P1=function(t){return(t+7)/8|0},Kb=function(t,n,e){return(n==null||n<0)&&(n=0),(e==null||e>t.length)&&(e=t.length),new To(t.subarray(n,e))};var vr=function(t,n,e){e<<=n&7;var i=n/8|0;t[i]|=e,t[i+1]|=e>>8},ac=function(t,n,e){e<<=n&7;var i=n/8|0;t[i]|=e,t[i+1]|=e>>8,t[i+2]|=e>>16},sd=function(t,n){for(var e=[],i=0;iN&&(N=r[i].s);var D=new Qa(N+1),U=md(e[y-1],D,0);if(U>n){var i=0,H=0,K=U-n,z=1<n)H+=z-(1<>=K;H>0;){var pt=r[i].s;D[pt]=0&&H;--i){var nt=r[i].s;D[nt]==n&&(--D[nt],++H)}U=n}return{t:new To(D),l:U}},md=function(t,n,e){return t.s==-1?Math.max(md(t.l,n,e+1),md(t.r,n,e+1)):n[t.s]=e},y1=function(t){for(var n=t.length;n&&!t[--n];);for(var e=new Qa(++n),i=0,a=t[0],r=1,u=function(g){e[i++]=g},d=1;d<=n;++d)if(t[d]==a&&d!=n)++r;else{if(!a&&r>2){for(;r>138;r-=138)u(32754);r>2&&(u(r>10?r-11<<5|28690:r-3<<5|12305),r=0)}else if(r>3){for(u(a),--r;r>6;r-=6)u(8304);r>2&&(u(r-3<<5|8208),r=0)}for(;r--;)u(a);r=1,a=t[d]}return{c:e.subarray(0,i),n}},oc=function(t,n){for(var e=0,i=0;i>8,t[a+2]=t[a]^255,t[a+3]=t[a+1]^255;for(var r=0;r4&&!vt[v1[Y-1]];--Y);var rt=_+5<<3,ot=oc(a,yl)+oc(r,Bp)+u,At=oc(a,N)+oc(r,H)+u+14+3*Y+oc(jt,vt)+2*jt[16]+3*jt[17]+7*jt[18];if(g>=0&&rt<=ot&&rt<=At)return A1(n,y,t.subarray(g,g+_));var kt,Rt,St,qt;if(vr(n,y,1+(At15&&(vr(n,y,J[ht]>>5&127),y+=J[ht]>>12)}}else kt=Yb,Rt=yl,St=Zb,qt=Bp;for(var ht=0;ht255){var et=lt>>18&31;ac(n,y,kt[et+257]),y+=Rt[et+257],et>7&&(vr(n,y,lt>>23&31),y+=ud[et]);var ft=lt&31;ac(n,y,St[ft]),y+=qt[ft],ft>3&&(ac(n,y,lt>>5&8191),y+=fd[ft])}else ac(n,y,kt[lt]),y+=Rt[lt]}return ac(n,y,kt[256]),y+Rt[256]},Jb=new dd([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),M1=new To(0),Xb=function(t,n,e,i,a,r){var u=r.z||t.length,d=new To(i+u+5*(1+Math.ceil(u/7e3))+a),g=d.subarray(i,d.length-a),_=r.l,y=(r.r||0)&7;if(n){y&&(g[0]=r.r>>3);for(var I=Jb[n-1],N=I>>13,D=I&8191,U=(1<7e3||vt>24576)&&(kt>423||!_)){y=S1(t,g,0,nt,Ot,Yt,ht,vt,Y,tt-Y,y),vt=jt=ht=0,Y=tt;for(var Rt=0;Rt<286;++Rt)Ot[Rt]=0;for(var Rt=0;Rt<30;++Rt)Yt[Rt]=0}var St=2,qt=0,se=D,Jt=ot-At&32767;if(kt>2&&rt==pt(tt-Jt))for(var B=Math.min(N,kt)-1,J=Math.min(32767,tt),et=Math.min(258,kt);Jt<=J&&--se&&ot!=At;){if(t[tt+St]==t[tt+St-Jt]){for(var lt=0;ltSt){if(St=lt,qt=Jt,lt>B)break;for(var ft=Math.min(Jt,lt-2),Ct=0,Rt=0;RtCt&&(Ct=Ht,At=It)}}}ot=At,At=H[ot],Jt+=ot-At&32767}if(qt){nt[vt++]=268435456|cd[St]<<18|x1[qt];var re=cd[St]&31,Me=x1[qt]&31;ht+=ud[re]+fd[Me],++Ot[257+re],++Yt[Me],j=tt+St,++jt}else nt[vt++]=t[tt],++Ot[t[tt]]}}for(tt=Math.max(tt,j);tt=u&&(g[y/8|0]=_,De=u),y=A1(g,y+1,t.subarray(tt,De))}r.i=u}return Kb(d,0,i+P1(y)+a)};var O1=function(){var t=1,n=0;return{p:function(e){for(var i=t,a=n,r=e.length|0,u=0;u!=r;){for(var d=Math.min(u+2655,r);u>16),a=(a&65535)+15*(a>>16)}t=i,n=a},d:function(){return t%=65521,n%=65521,(t&255)<<24|(t&65280)<<8|(n&255)<<8|n>>8}}},Qb=function(t,n,e,i,a){if(!a&&(a={l:1},n.dictionary)){var r=n.dictionary.subarray(-32768),u=new To(r.length+t.length);u.set(r),u.set(t,r.length),t=u,a.w=r.length}return Xb(t,n.level==null?6:n.level,n.mem==null?a.l?Math.ceil(Math.max(8,Math.min(13,Math.log(t.length)))*1.5):20:12+n.mem,e,i,a)};var I1=function(t,n,e){for(;e;++n)t[n]=e,e>>>=8};var tv=function(t,n){var e=n.level,i=e==0?0:e<6?1:e==9?3:2;if(t[0]=120,t[1]=i<<6|(n.dictionary&&32),t[1]|=31-(t[0]<<8|t[1])%31,n.dictionary){var a=O1();a.p(n.dictionary),I1(t,2,a.d())}};function qp(t,n){n||(n={});var e=O1();e.p(t);var i=Qb(t,n,n.dictionary?6:2,4);return tv(i,n),I1(i,i.length-4,e.d()),i}var ev=typeof TextDecoder<"u"&&new TextDecoder,nv=0;try{ev.decode(M1,{stream:!0}),nv=1}catch{}function E1(t){if(Array.isArray(t))return t}function L1(t,n){var e=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(e!=null){var i,a,r,u,d=[],g=!0,_=!1;try{if(r=(e=e.call(t)).next,n===0){if(Object(e)!==e)return;g=!1}else for(;!(g=(i=r.call(e)).done)&&(d.push(i.value),d.length!==n);g=!0);}catch(y){_=!0,a=y}finally{try{if(!g&&e.return!=null&&(u=e.return(),Object(u)!==u))return}finally{if(_)throw a}}return d}}function hd(t,n){(n==null||n>t.length)&&(n=t.length);for(var e=0,i=Array(n);e["./general"],u_=()=>["./accountdetail"],f_=()=>["./repayment-schedule"],h_=()=>["./loan-documents"],g_=()=>["./original-schedule"],__=()=>["./transactions"],C_=()=>["./deferred-income"],b_=()=>["./buy-down-fees"],v_=()=>["./delinquencytags"],x_=()=>["./loan-collateral"],y_=()=>["./loan-tranche-details"],S_=()=>["./term-variations"],D_=()=>["./overdue-charges"],w_=()=>["./floating-interest-rates"],T_=()=>["./charges"],P_=()=>["./loan-reschedules"],A_=()=>["./notes"],M_=()=>["./standing-instruction"],O_=()=>["./external-asset-owner"],I_=t=>["./datatables",t];function E_(t,n){if(t&1&&(s(0,"tr")(1,"td"),c(2),p(3,"translate"),l(),s(4,"td")(5,"span",48),T(6,"i",49),l(),c(7),l()()),t&2){let e=P(2);o(2),v("",m(3,3,"labels.inputs.Delinquency Classification")," :"),o(4),x("ngClass",e.loanDelinquencyClassificationStyle),o(),v(" ",e.loanDetailsData==null?null:e.loanDetailsData.delinquencyRange.classification," ")}}function L_(t,n){if(t&1&&(s(0,"tr")(1,"td"),c(2),p(3,"translate"),l(),s(4,"td"),c(5),p(6,"formatNumber"),l()()),t&2){let e=P(2);o(2),v("",m(3,2,"labels.inputs.Past Due Days")," :"),o(3),b(m(6,4,e.loanDetailsData==null?null:e.loanDetailsData.delinquent.pastDueDays))}}function N_(t,n){if(t&1&&(s(0,"tr")(1,"td"),c(2),p(3,"translate"),l(),s(4,"td"),c(5),p(6,"formatNumber"),l()()),t&2){let e=P(2);o(2),v("",m(3,2,"labels.inputs.Delinquent Days")," :"),o(3),b(m(6,4,e.loanDetailsData==null?null:e.loanDetailsData.delinquent.delinquentDays))}}function k_(t,n){if(t&1&&(s(0,"div")(1,"table",47)(2,"tbody"),M(3,E_,8,5,"tr"),M(4,L_,7,6,"tr"),M(5,N_,7,6,"tr"),l()()()),t&2){let e=P();o(3),O(e.loanDetailsData.delinquencyRange?3:-1),o(),O(e.loanDetailsData.delinquent&&e.loanDetailsData.delinquent.pastDueDays>0?4:-1),o(),O(e.loanDetailsData.delinquent&&e.loanDetailsData.delinquent.delinquentDays>0&&e.loanDetailsData.delinquent.pastDueDays!==e.loanDetailsData.delinquent.delinquentDays?5:-1)}}function F_(t,n){if(t&1&&(s(0,"td",50),c(1),p(2,"currency"),l()),t&2){let e=P(3);o(),v(" ",Ye(2,1,e.loanDetailsData.summary.totalOverdue,e.currency.code,"symbol-narrow","1.2-2")," ")}}function R_(t,n){t&1&&(s(0,"td"),c(1),p(2,"translate"),l()),t&2&&(o(),v(" ",m(2,1,"labels.inputs.Not Provided")," "))}function B_(t,n){if(t&1&&(s(0,"tr")(1,"td"),c(2),p(3,"translate"),l(),M(4,F_,3,6,"td",50),M(5,R_,3,3,"td"),l()),t&2){let e=P(2);o(2),b(m(3,3,"labels.inputs.Arrears By")),o(2),O(e.loanDetailsData.summary.totalOverdue>=0?4:-1),o(),O(e.loanDetailsData.summary.totalOverdue>=0?-1:5)}}function q_(t,n){if(t&1&&(s(0,"tr")(1,"td"),c(2),p(3,"translate"),l(),s(4,"td"),c(5),p(6,"dateFormat"),l()()),t&2){let e=P(2);o(2),b(m(3,2,"labels.inputs.Arrears Since")),o(3),b(m(6,4,e.loanDetailsData.summary.overdueSinceDate))}}function j_(t,n){if(t&1&&(s(0,"tr")(1,"td"),c(2),p(3,"translate"),l(),s(4,"td",50),c(5),p(6,"currency"),l()()),t&2){let e=P(2);o(2),b(m(3,2,"labels.inputs.Overpaid By")),o(3),v(" ",Ye(6,4,e.loanDetailsData.totalOverpaid,e.currency.code,"symbol-narrow","1.2-2")," ")}}function z_(t,n){if(t&1&&(s(0,"div",39)(1,"h3"),c(2),p(3,"translate"),l(),s(4,"table",47)(5,"tbody")(6,"tr")(7,"td"),c(8),p(9,"translate"),l(),s(10,"td",50),c(11),p(12,"currency"),l()(),M(13,B_,6,5,"tr"),M(14,q_,7,6,"tr"),M(15,j_,7,9,"tr"),l()()()),t&2){let e=P();o(2),b(m(3,6,"labels.heading.Account Overview")),o(6),b(m(9,8,"labels.inputs.Current Balance")),o(3),v(" ",Ye(12,10,e.loanDetailsData.summary.totalOutstanding,e.currency.code,"symbol-narrow","1.2-2")," "),o(2),O(e.loanDisplayArrearsDelinquency<2?13:-1),o(),O(e.loanDetailsData.inArrears?14:-1),o(),O(e.loanDetailsData.totalOverpaid&&e.loanDetailsData.totalOverpaid>0?15:-1)}}function V_(t,n){if(t&1&&(s(0,"button",41)(1,"mat-icon",51),T(2,"fa-icon",52),l()()),t&2){P();let e=Lt(35);x("matMenuTriggerFor",e)}}function U_(t,n){if(t&1){let e=xt();s(0,"button",54),it("click",function(){mt(e);let a=P().$implicit,r=P();return dt(r.loanAction(a.name))}),s(1,"mat-icon",55),T(2,"fa-icon",56),l(),s(3,"span"),c(4),p(5,"translate"),l()()}if(t&2){let e=P().$implicit;o(2),x("icon",ce(e.icon)),o(2),b(m(5,3,"labels.menus."+e.name))}}function H_(t,n){if(t&1&&k(0,U_,6,5,"button",53),t&2){let e=n.$implicit;x("mifosxHasPermission",e.taskPermissionName)}}function G_(t,n){if(t&1){let e=xt();s(0,"button",54),it("click",function(){mt(e);let a=P().$implicit,r=P(2);return dt(r.loanAction(a.name))}),c(1),p(2,"translate"),l()}if(t&2){let e=P().$implicit;o(),v(" ",m(2,1,"labels.menus."+e.name)," ")}}function W_(t,n){if(t&1&&(s(0,"span"),k(1,G_,3,3,"button",53),l()),t&2){let e=n.$implicit;o(),x("mifosxHasPermission",e.taskPermissionName)}}function $_(t,n){if(t&1&&(X(0,43),s(1,"button",57),c(2),p(3,"translate"),l(),s(4,"mat-menu",null,6),ue(6,W_,2,1,"span",null,Ce),l(),Q()),t&2){let e=Lt(5),i=P();o(),x("matMenuTriggerFor",e),o(),b(m(3,2,"labels.menus.Payments")),o(4),fe(i.buttonConfig.optionsPayment)}}function Y_(t,n){if(t&1){let e=xt();s(0,"button",54),it("click",function(){mt(e);let a=P().$implicit,r=P(2);return dt(r.loanAction(a.name))}),c(1),p(2,"translate"),l()}if(t&2){let e=P().$implicit;o(),v(" ",m(2,1,"labels.menus."+e.name)," ")}}function Z_(t,n){if(t&1&&(s(0,"span"),k(1,Y_,3,3,"button",53),l()),t&2){let e=n.$implicit;o(),x("mifosxHasPermission",e.taskPermissionName)}}function K_(t,n){if(t&1&&(X(0,43),s(1,"button",57),c(2),p(3,"translate"),l(),s(4,"mat-menu",null,7),ue(6,Z_,2,1,"span",null,Ce),l(),Q()),t&2){let e=Lt(5),i=P();o(),x("matMenuTriggerFor",e),o(),b(m(3,2,"labels.menus.More")),o(4),fe(i.buttonConfig.options)}}function J_(t,n){if(t&1&&(s(0,"a",45,8),c(2),p(3,"translate"),l()),t&2){let e=Lt(1);x("routerLink",Ut(5,g_))("active",e.isActive),o(2),v(" ",m(3,3,"labels.inputs.Original Schedule")," ")}}function X_(t,n){if(t&1&&(s(0,"a",45,9),c(2),p(3,"translate"),l()),t&2){let e=Lt(1);x("routerLink",Ut(5,__))("active",e.isActive),o(2),v(" ",m(3,3,"labels.inputs.Transactions")," ")}}function Q_(t,n){if(t&1&&(s(0,"a",45,10),c(2),p(3,"translate"),l()),t&2){let e=Lt(1);x("routerLink",Ut(5,C_))("active",e.isActive),o(2),v(" ",m(3,3,"labels.inputs.Deferred income")," ")}}function tC(t,n){if(t&1&&(s(0,"a",45,11),c(2),p(3,"translate"),l()),t&2){let e=Lt(1);x("routerLink",Ut(5,b_))("active",e.isActive),o(2),v(" ",m(3,3,"labels.heading.Buy Down Fees")," ")}}function eC(t,n){if(t&1&&(s(0,"a",45,12),c(2),p(3,"translate"),l()),t&2){let e=Lt(1);x("routerLink",Ut(5,v_))("active",e.isActive),o(2),v(" ",m(3,3,"labels.inputs.Delinquency Tags")," ")}}function nC(t,n){if(t&1&&(s(0,"a",45,13),c(2),p(3,"translate"),l()),t&2){let e=Lt(1);x("routerLink",Ut(5,x_))("active",e.isActive),o(2),v(" ",m(3,3,"labels.inputs.Loan Collateral Details")," ")}}function iC(t,n){if(t&1&&(s(0,"a",45,14),c(2),p(3,"translate"),l()),t&2){let e=Lt(1);x("routerLink",Ut(5,y_))("active",e.isActive),o(2),v(" ",m(3,3,"labels.inputs.Loan Tranche Details")," ")}}function aC(t,n){if(t&1&&(s(0,"a",45,15),c(2),p(3,"translate"),l()),t&2){let e=Lt(1);x("routerLink",Ut(5,S_))("active",e.isActive),o(2),v(" ",m(3,3,"labels.inputs.Term Variations")," ")}}function oC(t,n){if(t&1&&(s(0,"a",45,16),c(2),p(3,"translate"),l()),t&2){let e=Lt(1);x("routerLink",Ut(5,D_))("active",e.isActive),o(2),v(" ",m(3,3,"labels.inputs.Overdue Charges")," ")}}function rC(t,n){if(t&1&&(s(0,"a",45,17),c(2),p(3,"translate"),l()),t&2){let e=Lt(1);x("routerLink",Ut(5,w_))("active",e.isActive),o(2),v(" ",m(3,3,"labels.inputs.Floating Interest Rates")," ")}}function lC(t,n){if(t&1&&(s(0,"a",45,18),c(2),p(3,"translate"),l()),t&2){let e=Lt(1);x("routerLink",Ut(5,T_))("active",e.isActive),o(2),v(" ",m(3,3,"labels.inputs.Charges")," ")}}function sC(t,n){if(t&1&&(s(0,"a",45,19),c(2),p(3,"translate"),l()),t&2){let e=Lt(1);x("routerLink",Ut(5,P_))("active",e.isActive),o(2),v(" ",m(3,3,"labels.inputs.Loan Reschedules")," ")}}function cC(t,n){if(t&1&&(s(0,"a",45,20),c(2),p(3,"translate"),l()),t&2){let e=Lt(1);x("routerLink",Ut(5,A_))("active",e.isActive),o(2),v(" ",m(3,3,"labels.inputs.Notes")," ")}}function pC(t,n){if(t&1&&(s(0,"a",45,21),c(2),p(3,"translate"),l()),t&2){let e=Lt(1);x("routerLink",Ut(5,M_))("active",e.isActive),o(2),v(" ",m(3,3,"labels.inputs.Standing Instruction")," ")}}function mC(t,n){if(t&1&&(s(0,"a",45,22),c(2),p(3,"translate"),l()),t&2){let e=Lt(1);x("routerLink",Ut(5,O_))("active",e.isActive),o(2),v(" ",m(3,3,"labels.inputs.External Asset Owner")," ")}}function dC(t,n){if(t&1&&(s(0,"a",45,23),c(2),l()),t&2){let e=Lt(1),i=P().$implicit;x("routerLink",La(3,I_,i.registeredTableName))("active",e.isActive),o(2),v(" ",i.registeredTableName," ")}}function uC(t,n){if(t&1&&k(0,dC,3,5,"a",46),t&2){let e=n.$implicit;x("mifosxHasPermission","READ_"+e.registeredTableName)}}var Np=(()=>{class t{constructor(){this.route=A(Et),this.router=A(le),this.loansService=A(Mt),this.translateService=A(pa),this.dialog=A(Gn),this.disburseTransactionNo=0,this.loanDelinquencyClassificationStyle="",this.loanSubStatus=null,this.loanReAged=!1,this.loanReAmortized=!1;let e=this.loansService;this.route.data.subscribe(i=>{this.loanDetailsData=i.loanDetailsData,this.loanDatatables=i.loanDatatables,this.loanDisplayArrearsDelinquency=i.loanArrearsDelinquencyConfig.value||0,this.loanStatus=this.loanDetailsData.status,this.loanSubStatus=this.loanDetailsData.subStatus===void 0?null:this.loanDetailsData.subStatus,this.currency=this.loanDetailsData.currency,e.saveLoanDisbursementDetailsData(this.loanDetailsData.disbursementDetails),this.loanStatus.active&&this.loanDetailsData.transactions.forEach(a=>{a.manuallyReversed||(a.type.reAge?this.loanReAged=!0:a.type.reAmortize&&(this.loanReAmortized=!0))}),this.setConditionalButtons()}),this.loanId=this.route.snapshot.params.loanId,this.clientId=this.loanDetailsData.clientId}ngOnInit(){this.route.params.subscribe(e=>{this.loanId!=e.loanId&&(this.loanId=e.loanId,this.reload())}),this.recalculateInterest=this.loanDetailsData.recalculateInterest||!0,this.status=this.loanDetailsData.status.value,this.loanStatus=this.loanDetailsData.status,this.loanSubStatus=this.loanDetailsData.subStatus===void 0?null:this.loanDetailsData.subStatus,this.loanStatus.active&&this.loanDetailsData.multiDisburseLoan&&this.loanDetailsData&&this.loanDetailsData.transactions&&this.loanDetailsData.transactions.forEach(e=>{e.type.disbursement&&this.disburseTransactionNo++}),this.setConditionalButtons(),this.router.url.includes("clients")?this.entityType="Client":this.router.url.includes("groups")?this.entityType="Group":this.router.url.includes("centers")&&(this.entityType="Center"),this.loanDelinquencyClassification()}setConditionalButtons(){this.buttonConfig=new Lp(this.status,this.loanSubStatus),this.status==="Submitted and pending approval"?(this.buttonConfig.addOption({name:this.loanDetailsData.loanOfficerName?"Change Loan Officer":"Assign Loan Officer",icon:"user-tie",taskPermissionName:"DISBURSE_LOAN"}),this.loanDetailsData.isVariableInstallmentsAllowed&&this.buttonConfig.addOption({name:"Edit Repayment Schedule",icon:"edit",taskPermissionName:"ADJUST_REPAYMENT_SCHEDULE"})):this.status==="Approved"?this.buttonConfig.addButton({name:this.loanDetailsData.loanOfficerName?"Change Loan Officer":"Assign Loan Officer",icon:"user-tie",taskPermissionName:"DISBURSE_LOAN"}):this.status==="Active"?(this.loanDetailsData.enableBuyDownFee&&this.buttonConfig.addButton({name:"Buy Down Fee",icon:"plus",taskPermissionName:"BUYDOWNFEE_LOAN"}),this.loanDetailsData.enableIncomeCapitalization&&this.buttonConfig.addButton({name:"Capitalized Income",icon:"coins",taskPermissionName:"CAPITALIZEDINCOME_LOAN"}),(this.loanDetailsData.canDisburse||this.loanDetailsData.multiDisburseLoan)&&this.buttonConfig.addButton({name:"Disburse",icon:"hand-holding-usd",taskPermissionName:"DISBURSE_LOAN"}),this.loanDetailsData.canDisburse&&this.buttonConfig.addButton({name:"Disburse to Savings",icon:"piggy-bank",taskPermissionName:"DISBURSETOSAVINGS_LOAN"}),this.loanDetailsData.multiDisburseLoan&&this.disburseTransactionNo>1&&this.buttonConfig.addButton({name:"Undo Last Disbursal",icon:"undo",taskPermissionName:"DISBURSALLASTUNDO_LOAN"}),this.recalculateInterest&&this.buttonConfig.addButton({name:"Add Interest Pause",icon:"calendar",taskPermissionName:"CREATE_INTEREST_PAUSE"}),this.loanDetailsData.loanOfficerName||this.buttonConfig.addButton({name:"Assign Loan Officer",icon:"user-tie",taskPermissionName:"UPDATELOANOFFICER_LOAN"}),this.recalculateInterest&&this.buttonConfig.addButton({name:"Prepay Loan",icon:"coins",taskPermissionName:"REPAYMENT_LOAN"}),this.loanDetailsData.chargedOff?this.buttonConfig.addButton({name:"Undo Charge-Off",icon:"undo",taskPermissionName:"UNDOCHARGEOFF_LOAN"}):this.buttonConfig.addButton({name:"Charge-Off",icon:"coins",taskPermissionName:"CHARGEOFF_LOAN"}),this.loanReAged?this.buttonConfig.addButton({name:"Undo Re-Age",icon:"undo",taskPermissionName:"UNDO_REAGE_LOAN"}):this.buttonConfig.addButton({name:"Re-Age",icon:"calendar",taskPermissionName:"REAGE_LOAN"}),this.loanReAmortized?this.buttonConfig.addButton({name:"Undo Re-Amortize",icon:"undo",taskPermissionName:"UNDO_REAMORTIZE_LOAN"}):this.buttonConfig.addButton({name:"Re-Amortize",icon:"calendar-alt",taskPermissionName:"REAMORTIZE_LOAN"})):(this.status==="Closed (obligations met)"||this.status==="Overpaid")&&(this.loanDetailsData.multiDisburseLoan&&this.buttonConfig.addButton({name:"Disburse",icon:"hand-holding-usd",taskPermissionName:"DISBURSE_LOAN"}),Gr.isAdvancedPaymentAllocationStrategy(this.loanDetailsData.transactionProcessingStrategyCode)&&this.buttonConfig.addButton({name:"Reschedule",icon:"calendar",taskPermissionName:"CREATE_RESCHEDULELOAN"}))}loanAction(e){switch(e){case"Recover From Guarantor":this.recoverFromGuarantor();break;case"Delete":this.deleteLoanAccount();break;case"Modify Application":this.router.navigate(["edit-loans-account"],{relativeTo:this.route});break;case"Transfer Funds":let i={loanId:this.loanId,accountType:"fromloans"};this.router.navigate(["transfer-funds/make-account-transfer"],{relativeTo:this.route,queryParams:i});break;case"Undo Re-Age":case"Undo Re-Amortize":case"Undo Charge-Off":this.undoLoanAction(e);break;default:let a={relativeTo:this.route,state:{data:this.loanDetailsData}};this.router.navigate(["actions",e],a);break}}recoverFromGuarantor(){this.dialog.open(ma,{data:{heading:this.translateService.instant("labels.heading.Recover from Guarantor"),dialogContext:this.translateService.instant("labels.dialogContext.Are you sure you want recover from Guarantor"),type:"Mild"}}).afterClosed().subscribe(i=>{i.confirm&&this.loansService.loanActionButtons(this.loanId,"recoverGuarantees").subscribe(()=>{this.reload()})})}loanDelinquencyClassification(){this.loanDelinquencyClassificationStyle="",this.loanDetailsData.delinquent&&this.loanDetailsData.delinquent.delinquencyPausePeriods&&this.loanDetailsData.delinquent.delinquencyPausePeriods.some(e=>{e.active&&(this.loanDelinquencyClassificationStyle="fa fa-stop status-pending")})}undoLoanAction(e){e=e.replace("Undo ",""),this.dialog.open(ma,{data:{heading:this.translateService.instant("labels.heading.Undo Transaction"),dialogContext:this.translateService.instant("labels.dialogContext.Are you sure you want undo the transaction type")+" "+this.translateService.instant("labels.menus."+e)}}).afterClosed().subscribe(a=>{if(a.confirm){let r="";switch(e){case"Re-Age":r="undoReAge";break;case"Re-Amortize":r="undoReAmortize";break;case"Charge-Off":r="undo-charge-off";break}this.loansService.executeLoansAccountTransactionsCommand(String(this.loanId),r,{}).subscribe(()=>{this.reload()})}})}iconLoanStatusColor(){return this.loanDetailsData.chargedOff?"loanStatusType.chargeoff":this.isContractTermination(this.loanSubStatus)?"loanSubStatusType.contractTermination":this.loanDetailsData.inArrears?"loanStatusType.activeOverdue":this.loanDetailsData.status.code}loanStatusTooltip(){return this.loanDetailsData.chargedOff?"Chargeoff":this.loanDetailsData.inArrears?"activeOverdue":this.loanDetailsData.status.code}loanSubStatusTooltip(){return this.isContractTermination(this.loanSubStatus)?"contractTermination":""}deleteLoanAccount(){this.dialog.open(ra,{data:{deleteContext:`with loan id: ${this.loanId}`}}).afterClosed().subscribe(i=>{i.delete&&this.loansService.deleteLoanAccount(this.loanId).subscribe(()=>{this.router.navigate(["../../"],{relativeTo:this.route})})})}reload(){let e=this.clientId,i=this.router.url;this.router.navigateByUrl(`/clients/${e}/loans-accounts`,{skipLocationChange:!0}).then(()=>this.router.navigate([i]))}isContractTermination(e){return e==null?!1:e.code==="loanSubStatus.loanSubStatusType.contractTermination"}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=Dt({type:t,selectors:[["mifosx-loans-view"]],decls:78,vars:71,consts:[["accountMenu","matMenu"],["general","routerLinkActive"],["accountdetail","routerLinkActive"],["repaymentSchedule","routerLinkActive"],["loanDocuments","routerLinkActive"],["tabPanel",""],["Payments","matMenu"],["More","matMenu"],["originalSchedule","routerLinkActive"],["transactions","routerLinkActive"],["deferredIncome","routerLinkActive"],["buyDownFees","routerLinkActive"],["delinquencytags","routerLinkActive"],["loanCollateralDetails","routerLinkActive"],["loanTrancheDetails","routerLinkActive"],["termVariations","routerLinkActive"],["overduecharges","routerLinkActive"],["floatingInterestRates","routerLinkActive"],["charges","routerLinkActive"],["loanReschedules","routerLinkActive"],["notes","routerLinkActive"],["standingInstruction","routerLinkActive"],["externalAssetOwner","routerLinkActive"],["datatable","routerLinkActive"],[1,"account-card"],[1,"header","layout-column"],[1,"header-title-group"],[1,"profile-image-container"],["iconFile","account_placeholder","iconName","LOAN_ACCOUNT","iconWidth","210",3,"iconClass","matTooltip"],[1,"mat-typography","account-card-title"],[1,"layout-row","responsive-column"],[1,"flex-60"],[1,"fa","fa-stop",3,"matTooltip","ngClass"],[1,"m-r-5"],[3,"textValue"],["display","left",3,"accountNo"],[1,"loans-overview"],[1,"m-r-10"],[1,"m-l-5"],[1,"loans-overview","mat-typography","flex-30"],[1,"flex-5"],["mat-icon-button","","aria-label","Loan account actions","yPosition","below",3,"matMenuTriggerFor"],["mat-menu-item",""],[1,"loan-span"],["mat-tab-nav-bar","",1,"navigation-tabs",3,"tabPanel"],["mat-tab-link","","routerLinkActive","",3,"routerLink","active"],["mat-tab-link","","routerLinkActive","",3,"routerLink","active",4,"mifosxHasPermission"],[1,"account-overview"],[1,"m-r-3"],[3,"ngClass"],[1,"r-amount"],["matListIcon","",1,"actions-menu"],["icon","bars","size","sm"],["mat-menu-item","",3,"click",4,"mifosxHasPermission"],["mat-menu-item","",3,"click"],["matListIcon",""],["size","sm",3,"icon"],["mat-menu-item","",3,"matMenuTriggerFor"]],template:function(i,a){if(i&1&&(s(0,"mat-card",24)(1,"mat-card-header",25)(2,"mat-card-title-group",26)(3,"div",27)(4,"div"),T(5,"mifosx-svg-icon",28),p(6,"translate"),l()(),s(7,"div",29)(8,"mat-card-title")(9,"div",30)(10,"div",31)(11,"h3"),T(12,"i",32),p(13,"translate"),p(14,"statusLookup"),s(15,"span",33),c(16),p(17,"translate"),l(),s(18,"span",33),T(19,"mifosx-long-text",34),l(),T(20,"mifosx-account-number",35),l(),s(21,"span",36)(22,"span",37),c(23),p(24,"translate"),p(25,"translate"),l(),c(26),s(27,"span",38),c(28),l(),T(29,"br"),l(),M(30,k_,6,3,"div"),l(),M(31,z_,16,15,"div",39),s(32,"div",40),M(33,V_,3,1,"button",41),l()()()(),s(34,"mat-menu",null,0),ue(36,H_,1,1,"button",42,Ce),M(38,$_,8,4,"ng-container",43),M(39,K_,8,4,"ng-container",43),l()()(),s(40,"mat-card-content")(41,"nav",44)(42,"a",45,1),c(44),p(45,"translate"),l(),s(46,"a",45,2),c(48),p(49,"translate"),l(),M(50,J_,4,6,"a",45),s(51,"a",45,3),c(53),p(54,"translate"),l(),M(55,X_,4,6,"a",45),M(56,Q_,4,6,"a",45),M(57,tC,4,6,"a",45),M(58,eC,4,6,"a",45),M(59,nC,4,6,"a",45),M(60,iC,4,6,"a",45),M(61,aC,4,6,"a",45),M(62,oC,4,6,"a",45),M(63,rC,4,6,"a",45),M(64,lC,4,6,"a",45),M(65,sC,4,6,"a",45),s(66,"a",45,4),c(68),p(69,"translate"),l(),k(70,cC,4,6,"a",46),M(71,pC,4,6,"a",45),M(72,mC,4,6,"a",45),ue(73,uC,1,1,"a",45,Ce),l(),s(75,"mat-tab-nav-panel",null,5),T(77,"router-outlet"),l()()()),i&2){let r=Lt(43),u=Lt(47),d=Lt(52),g=Lt(67),_=Lt(76);o(5),x("matTooltip",ce(m(6,47,"tooltips.Loan Account"))),o(7),x("matTooltip",ce(m(13,49,"labels.status."+a.loanDetailsData.status.value)))("ngClass",m(14,51,a.iconLoanStatusColor())),o(4),v("",m(17,53,"labels.heading.Loan Product")," :"),o(3),x("textValue",ce(a.loanDetailsData.loanProductName)),o(),x("accountNo",ce(a.loanDetailsData.accountNo)),o(3),$t("",m(24,55,"labels.text."+a.entityType)," ",m(25,57,"labels.inputs.name")," :"),o(3),v(" ",a.loanDetailsData.clientName||a.loanDetailsData.group.name),o(2),v("(",a.loanDetailsData.clientAccountNo||a.loanDetailsData.group.accountNo,")"),o(2),O(a.loanDisplayArrearsDelinquency!==1?30:-1),o(),O(a.loanDetailsData.summary?31:-1),o(2),O(a.buttonConfig.singleButtons.length>0?33:-1),o(3),fe(a.buttonConfig.singleButtons),o(2),O(a.buttonConfig.optionsPayment.length?38:-1),o(),O(a.buttonConfig.options.length?39:-1),o(2),x("tabPanel",_),o(),x("routerLink",Ut(67,d_))("active",r.isActive),o(2),v(" ",m(45,59,"labels.inputs.General")," "),o(2),x("routerLink",Ut(68,u_))("active",u.isActive),o(2),v(" ",m(49,61,"labels.inputs.Account Details")," "),o(2),O(a.loanDetailsData.originalSchedule?50:-1),o(),x("routerLink",Ut(69,f_))("active",d.isActive),o(2),v(" ",m(54,63,"labels.inputs.Repayment Schedule")," "),o(2),O(a.loanDetailsData.transactions?55:-1),o(),O(a.loanDetailsData.enableIncomeCapitalization?56:-1),o(),O(a.loanDetailsData.enableBuyDownFee?57:-1),o(),O(a.loanDetailsData.status.active?58:-1),o(),O(a.loanDetailsData.collateral?59:-1),o(),O(a.loanDetailsData.multiDisburseLoan?60:-1),o(),O(a.loanDetailsData.loanTermVariations?61:-1),o(),O(a.loanDetailsData.overdueCharges.length>0?62:-1),o(),O(a.loanDetailsData.isLoanProductLinkedToFloatingRate?63:-1),o(),O(a.loanDetailsData.charges?64:-1),o(),O(a.loanDetailsData.status.active||a.loanDetailsData.status.closed||a.loanDetailsData.status.overpaid?65:-1),o(),x("routerLink",Ut(70,h_))("active",g.isActive),o(2),v(" ",m(69,65,"labels.inputs.Loan Documents")," "),o(2),x("mifosxHasPermission","READ_LOANNOTE"),o(),O(a.loanDetailsData.clientId?71:-1),o(),O(a.loanDetailsData.status.active?72:-1),o(),fe(a.loanDatatables)}},dependencies:[wt,ca,Tt,ae,xe,Oe,Ae,$f,Wf,m1,Oi,Gf,Mp,d1,Ba,vp,xp,un,bp,Cp,Qf,t1,Rf,e1,Ff,Sa,En,Pt,Ap,hn],styles:[".loans-overview[_ngcontent-%COMP%]{font-size:14px}.account-overview[_ngcontent-%COMP%]{min-width:80%;font-weight:400}"]})}}return t})();function fC(t,n){if(t&1&&(s(0,"h3"),c(1),p(2,"translate"),l(),s(3,"div",1)(4,"table")(5,"tbody")(6,"tr")(7,"td",2)(8,"b"),c(9),p(10,"translate"),l()(),s(11,"td",3),c(12),p(13,"formatNumber"),l(),s(14,"td",2)(15,"b"),c(16),p(17,"translate"),l()(),s(18,"td",3),c(19),p(20,"dateFormat"),l()()()()()),t&2){let e=P();o(),b(m(2,5,"labels.heading.Performance History")),o(8),v("",m(10,7,"labels.inputs.Number of Repayments")," :"),o(3),v(" ",m(13,9,e.loanDetails==null?null:e.loanDetails.numberOfRepayments)," "),o(4),v("",m(17,11,"labels.inputs.Maturity Date")," :"),o(3),v(" ",m(20,13,e.loanDetails==null?null:e.loanDetails.timeline.expectedMaturityDate)," ")}}function hC(t,n){t&1&&T(0,"th",21)}function gC(t,n){if(t&1&&(s(0,"td",22),c(1),l()),t&2){let e=n.$implicit;o(),b(e.property)}}function _C(t,n){t&1&&(s(0,"th",23),c(1),p(2,"translate"),l()),t&2&&(o(),b(m(2,1,"labels.inputs.Original")))}function CC(t,n){if(t&1&&(s(0,"td",24),c(1),p(2,"currency"),l()),t&2){let e=n.$implicit,i=P(2);o(),v(" ",Ye(2,1,e.original,i.currencyCode,"symbol-narrow","1.2-2")," ")}}function bC(t,n){t&1&&(s(0,"th",23),c(1),p(2,"translate"),l()),t&2&&(o(),b(m(2,1,"labels.inputs.Paid")))}function vC(t,n){if(t&1&&(s(0,"td",25),c(1),p(2,"currency"),l()),t&2){let e=n.$implicit,i=P(2);o(),v(" ",Ye(2,1,e.paid,i.currencyCode,"symbol-narrow","1.2-2")," ")}}function xC(t,n){t&1&&(s(0,"th",23),c(1),p(2,"translate"),l()),t&2&&(o(),v(" ",m(2,1,"labels.inputs.Credit Adjustments")," "))}function yC(t,n){if(t&1&&(s(0,"td",26),c(1),p(2,"currency"),l()),t&2){let e=n.$implicit,i=P(2);o(),v(" ",Ye(2,1,e.adjustment,i.currencyCode,"symbol-narrow","1.2-2")," ")}}function SC(t,n){t&1&&(s(0,"th",23),c(1),p(2,"translate"),l()),t&2&&(o(),b(m(2,1,"labels.inputs.Waived")))}function DC(t,n){if(t&1&&(s(0,"td",25),c(1),p(2,"currency"),l()),t&2){let e=n.$implicit,i=P(2);o(),v(" ",Ye(2,1,e.waived,i.currencyCode,"symbol-narrow","1.2-2")," ")}}function wC(t,n){t&1&&(s(0,"th",23),c(1),p(2,"translate"),l()),t&2&&(o(),b(m(2,1,"labels.inputs.Written Off")))}function TC(t,n){if(t&1&&(s(0,"td",25),c(1),p(2,"currency"),l()),t&2){let e=n.$implicit,i=P(2);o(),v(" ",Ye(2,1,e.writtenOff,i.currencyCode,"symbol-narrow","1.2-2")," ")}}function PC(t,n){t&1&&(s(0,"th",23),c(1),p(2,"translate"),l()),t&2&&(o(),b(m(2,1,"labels.inputs.Outstanding")))}function AC(t,n){if(t&1&&(s(0,"td",24),c(1),p(2,"currency"),l()),t&2){let e=n.$implicit,i=P(2);o(),v(" ",Ye(2,1,e.outstanding,i.currencyCode,"symbol-narrow","1.2-2")," ")}}function MC(t,n){t&1&&(s(0,"th",23),c(1),p(2,"translate"),l()),t&2&&(o(),b(m(2,1,"labels.inputs.Over Due")))}function OC(t,n){if(t&1&&(s(0,"td",24),c(1),p(2,"currency"),l()),t&2){let e=n.$implicit,i=P(2);o(),v(" ",Ye(2,1,e.overdue,i.currencyCode,"symbol-narrow","1.2-2")," ")}}function IC(t,n){t&1&&T(0,"tr",27)}function EC(t,n){t&1&&T(0,"tr",28)}function LC(t,n){if(t&1&&(s(0,"div")(1,"h3"),c(2),p(3,"translate"),l(),s(4,"table",4),X(5,5),k(6,hC,1,0,"th",6)(7,gC,2,1,"td",7),Q(),X(8,8),k(9,_C,3,3,"th",9)(10,CC,3,6,"td",10),Q(),X(11,11),k(12,bC,3,3,"th",9)(13,vC,3,6,"td",12),Q(),X(14,13),k(15,xC,3,3,"th",9)(16,yC,3,6,"td",14),Q(),X(17,15),k(18,SC,3,3,"th",9)(19,DC,3,6,"td",12),Q(),X(20,16),k(21,wC,3,3,"th",9)(22,TC,3,6,"td",12),Q(),X(23,17),k(24,PC,3,3,"th",9)(25,AC,3,6,"td",10),Q(),X(26,18),k(27,MC,3,3,"th",9)(28,OC,3,6,"td",10),Q(),k(29,IC,1,0,"tr",19)(30,EC,1,0,"tr",20),l()()),t&2){let e=P();o(2),b(m(3,4,"labels.heading.Loan Summary")),o(2),x("dataSource",e.dataSource),o(25),x("matHeaderRowDef",e.loanSummaryColumns),o(),x("matRowDefColumns",e.loanSummaryColumns)}}function NC(t,n){if(t&1&&(s(0,"td",22),c(1),p(2,"translate"),l()),t&2){let e=n.$implicit;o(),b(m(2,1,"labels.inputs."+e.key))}}function kC(t,n){if(t&1&&(s(0,"span"),c(1),p(2,"dateFormat"),l()),t&2){let e=P(4);o(),v(" ",m(2,1,e.loanDetails.timeline.actualDisbursementDate)," ")}}function FC(t,n){t&1&&(s(0,"span"),c(1),p(2,"translate"),l()),t&2&&(o(),v(" ",m(2,1,"labels.inputs.Not Available")," "))}function RC(t,n){if(t&1&&(M(0,kC,3,3,"span"),M(1,FC,3,3,"span")),t&2){let e=P(3);O(e.loanDetails.timeline.actualDisbursementDate?0:-1),o(),O(e.loanDetails.timeline.actualDisbursementDate?-1:1)}}function BC(t,n){if(t&1&&(s(0,"span"),c(1),l()),t&2){let e=P(4);o(),v(" ",e.loanDetails.loanPurposeName," ")}}function qC(t,n){t&1&&(s(0,"span"),c(1),p(2,"translate"),l()),t&2&&(o(),v(" ",m(2,1,"labels.inputs.Not Available")," "))}function jC(t,n){if(t&1&&(M(0,BC,2,1,"span"),M(1,qC,3,3,"span")),t&2){let e=P(3);O(e.loanDetails.loanPurposeName?0:-1),o(),O(e.loanDetails.loanPurposeName?-1:1)}}function zC(t,n){t&1&&(s(0,"span"),c(1),p(2,"translate"),l()),t&2&&(o(),v(" ",m(2,1,"labels.inputs.Unassigned")," "))}function VC(t,n){t&1&&T(0,"span")}function UC(t,n){if(t&1&&(s(0,"span"),c(1),M(2,VC,1,0,"span"),l()),t&2){let e=P(4);o(),v(" ",e.loanDetails.loanOfficerName," \xA0 "),o(),O(e.loanDetails.loanOfficerName?2:-1)}}function HC(t,n){if(t&1&&(M(0,zC,3,3,"span"),M(1,UC,3,2,"span")),t&2){let e=P(3);O(e.loanDetails.loanOfficerName?-1:0),o(),O(e.loanDetails.loanOfficerName?1:-1)}}function GC(t,n){if(t&1&&(s(0,"span"),c(1),l()),t&2){let e=P(3);o(),$t(" ",e.loanDetails.currency.name," ",e.loanDetails.currency.code," ")}}function WC(t,n){if(t&1&&(s(0,"span"),T(1,"mifosx-external-identifier",31),l()),t&2){let e=P(4);o(),x("externalId",ce(e.loanDetails.externalId))}}function $C(t,n){t&1&&(s(0,"span"),c(1),p(2,"translate"),l()),t&2&&(o(),v(" ",m(2,1,"labels.inputs.Not Available")," "))}function YC(t,n){if(t&1&&(M(0,WC,2,2,"span"),M(1,$C,3,3,"span")),t&2){let e=P(3);O(e.loanDetails.externalId?0:-1),o(),O(e.loanDetails.externalId?-1:1)}}function ZC(t,n){if(t&1&&(s(0,"span"),c(1),l()),t&2){let e=P(2).$implicit;o(),b(e.value)}}function KC(t,n){t&1&&(s(0,"span"),c(1),p(2,"translate"),l()),t&2&&(o(),b(m(2,1,"labels.inputs.Not Available")))}function JC(t,n){if(t&1&&(M(0,ZC,2,1,"span"),M(1,KC,3,3,"span")),t&2){let e=P().$implicit;O(e.value?0:-1),o(),O(e.value?-1:1)}}function XC(t,n){if(t&1&&c(0),t&2){let e=P().$implicit;v(" ",e.value," ")}}function QC(t,n){if(t&1&&(s(0,"td",22),M(1,RC,2,2),M(2,jC,2,2),M(3,HC,2,2),M(4,GC,2,2,"span"),M(5,YC,2,2),M(6,JC,2,2),M(7,XC,1,1),l()),t&2){let e=n.$implicit;o(),O(e.key==="Disbursement Date"?1:-1),o(),O(e.key==="Loan Purpose"?2:-1),o(),O(e.key==="Loan Officer"?3:-1),o(),O(e.key==="Currency"?4:-1),o(),O(e.key==="External Id"?5:-1),o(),O(e.key==="Write-off Reason"?6:-1),o(),O(e.key==="Proposed Amount"||e.key==="Approved Amount"||e.key==="Disburse Amount"?7:-1)}}function tb(t,n){t&1&&T(0,"tr",28)}function eb(t,n){if(t&1&&(s(0,"div")(1,"h3"),c(2),p(3,"translate"),l(),s(4,"table",4),X(5,29),k(6,NC,3,3,"td",7),Q(),X(7,30),k(8,QC,8,7,"td",7),Q(),k(9,tb,1,0,"tr",20),l()()),t&2){let e=P();o(2),b(m(3,3,"labels.heading.Loan Details")),o(2),x("dataSource",e.detailsDataSource),o(5),x("matRowDefColumns",e.loanDetailsColumns)}}function nb(t,n){if(t&1&&(s(0,"td",22),c(1),p(2,"translate"),l()),t&2){let e=n.$implicit;o(),b(m(2,1,"labels.inputs."+e.key))}}function ib(t,n){if(t&1&&(s(0,"span"),c(1),p(2,"dateFormat"),l()),t&2){let e=P(4);o(),v(" ",m(2,1,e.loanDetails.timeline.actualDisbursementDate)," ")}}function ab(t,n){t&1&&(s(0,"span"),c(1),p(2,"translate"),l()),t&2&&(o(),v(" ",m(2,1,"labels.inputs.Not Available")," "))}function ob(t,n){if(t&1&&(M(0,ib,3,3,"span"),M(1,ab,3,3,"span")),t&2){let e=P(3);O(e.loanDetails.timeline.actualDisbursementDate?0:-1),o(),O(e.loanDetails.timeline.actualDisbursementDate?-1:1)}}function rb(t,n){t&1&&(s(0,"span"),c(1),p(2,"translate"),l()),t&2&&(o(),v(" ",m(2,1,"labels.inputs.Unassigned")," "))}function lb(t,n){t&1&&T(0,"span")}function sb(t,n){if(t&1&&(s(0,"span"),c(1),M(2,lb,1,0,"span"),l()),t&2){let e=P(4);o(),v(" ",e.loanDetails.loanOfficerName," \xA0 "),o(),O(e.loanDetails.loanOfficerName?2:-1)}}function cb(t,n){if(t&1&&(M(0,rb,3,3,"span"),M(1,sb,3,2,"span")),t&2){let e=P(3);O(e.loanDetails.loanOfficerName?-1:0),o(),O(e.loanDetails.loanOfficerName?1:-1)}}function pb(t,n){if(t&1&&(s(0,"span"),c(1),l()),t&2){let e=P(3);o(),$t(" ",e.loanDetails.currency.name," ",e.loanDetails.currency.code," ")}}function mb(t,n){if(t&1&&(s(0,"span"),T(1,"mifosx-external-identifier",31),l()),t&2){let e=P(4);o(),x("externalId",ce(e.loanDetails.externalId))}}function db(t,n){t&1&&(s(0,"span"),c(1),p(2,"translate"),l()),t&2&&(o(),v(" ",m(2,1,"labels.inputs.Not Available")," "))}function ub(t,n){if(t&1&&(M(0,mb,2,2,"span"),M(1,db,3,3,"span")),t&2){let e=P(3);O(e.loanDetails.externalId?0:-1),o(),O(e.loanDetails.externalId?-1:1)}}function fb(t,n){if(t&1&&(s(0,"td",22),M(1,ob,2,2),M(2,cb,2,2),M(3,pb,2,2,"span"),M(4,ub,2,2),l()),t&2){let e=n.$implicit;o(),O(e.key==="Disbursement Date"?1:-1),o(),O(e.key==="Loan Officer"?2:-1),o(),O(e.key==="Currency"?3:-1),o(),O(e.key==="External Id"?4:-1)}}function hb(t,n){t&1&&T(0,"tr",28)}function gb(t,n){if(t&1&&(s(0,"div")(1,"h3"),c(2),p(3,"translate"),l(),s(4,"table",4),X(5,29),k(6,nb,3,3,"td",7),Q(),X(7,30),k(8,fb,5,4,"td",7),Q(),k(9,hb,1,0,"tr",20),l()()),t&2){let e=P();o(2),b(m(3,3,"labels.heading.Loan Details")),o(2),x("dataSource",e.detailsDataSource),o(5),x("matRowDefColumns",e.loanDetailsColumns)}}function _b(t,n){if(t&1&&(s(0,"span",35),c(1),l()),t&2){let e=P(2);o(),v(" ",e.loanDetails.loanPurposeName," ")}}function Cb(t,n){t&1&&(s(0,"span",35),c(1),p(2,"translate"),l()),t&2&&(o(),v(" ",m(2,1,"labels.inputs.Not Provided")," "))}function bb(t,n){if(t&1&&(s(0,"div",34)(1,"span",35),c(2),p(3,"translate"),l(),s(4,"span",35),c(5),p(6,"currency"),l()()),t&2){let e=P(2);o(2),v("",m(3,2,"labels.inputs.Approved Amount"),":"),o(3),b(Ye(6,4,e.loanDetails.approvedPrincipal,e.currencyCode,"symbol-narrow","1.2-2"))}}function vb(t,n){if(t&1&&(s(0,"div",34)(1,"span",35),c(2),p(3,"translate"),l(),s(4,"span",35),c(5),p(6,"currency"),l()()),t&2){let e=P(2);o(2),v("",m(3,2,"labels.inputs.Disburse Amount"),":"),o(3),b(Ye(6,4,e.loanDetails.principal,e.currencyCode,"symbol-narrow","1.2-2"))}}function xb(t,n){if(t&1&&(s(0,"div",34)(1,"span",35),c(2),p(3,"translate"),l(),s(4,"span",35),c(5),p(6,"currency"),l()()),t&2){let e=P(2);o(2),v("",m(3,2,"labels.inputs.Balloon Repayment Amount"),":"),o(3),b(Ye(6,4,e.loanDetails.balloonRepaymentAmount,e.currencyCode,"symbol-narrow","1.2-2"))}}function yb(t,n){if(t&1&&(s(0,"div")(1,"h3"),c(2),p(3,"translate"),l(),s(4,"div",32)(5,"div",33)(6,"div",34)(7,"span",35),c(8),p(9,"translate"),l(),M(10,_b,2,1,"span",35),M(11,Cb,3,3,"span",35),l(),s(12,"div",34)(13,"span",35),c(14),p(15,"translate"),l(),s(16,"span",35),c(17),p(18,"currency"),l()(),M(19,bb,7,9,"div",34),M(20,vb,7,9,"div",34),M(21,xb,7,9,"div",34),s(22,"div",34)(23,"span",35),c(24),p(25,"translate"),l(),s(26,"span",35),c(27),p(28,"translate"),l()()()()()),t&2){let e=P();o(2),b(m(3,11,"labels.heading.Loan Purpose")),o(6),v("",m(9,13,"labels.inputs.Loan Purpose"),":"),o(2),O(e.loanDetails.loanPurposeName?10:-1),o(),O(e.loanDetails.loanPurposeName?-1:11),o(3),v("",m(15,15,"labels.inputs.Proposed Amount"),":"),o(3),b(Ye(18,17,e.loanDetails.proposedPrincipal,e.currencyCode,"symbol-narrow","1.2-2")),o(2),O(e.showApprovedAmountBasedOnStatus()?19:-1),o(),O(e.showDisbursedAmountBasedOnStatus()?20:-1),o(),O(e.loanDetails.balloonRepaymentAmount>0?21:-1),o(3),v("",m(25,22,"labels.inputs.Arrears By"),":"),o(3),b(m(28,24,"labels.inputs.Not Provided"))}}var kp=(()=>{class t{constructor(){this.route=A(Et),this.loanSummaryColumns=["Empty","Original","Paid","Waived","Written Off","Outstanding","Over Due"],this.loanDetailsColumns=["Key","Value"],this.showDisbursedAmountBasedOnStatus=function(){return!(this.status==="Submitted and pending approval"||this.status==="Withdrawn by applicant"||this.status==="Rejected"||this.status==="Approved")},this.route.parent.data.subscribe(e=>{this.loanDetails=e.loanDetailsData,this.currencyCode=this.loanDetails.currency.code,this.loanDetails.transactions&&this.loanDetails.transactions.some(i=>{if(i.type.code==="loanTransactionType.chargeback"){this.loanSummaryColumns=["Empty","Original","Adjustments","Paid","Waived","Written Off","Outstanding","Over Due"];return}})})}ngOnInit(){this.status=this.loanDetails.value,this.loanDetails.summary?(this.setloanSummaryTableData(),this.setloanDetailsTableData()):this.setloanNonDetailsTableData()}setloanSummaryTableData(){this.loanSummaryTableData=[{property:"Principal",original:this.loanDetails.summary.totalPrincipal,adjustment:this.loanDetails.summary.principalAdjustments||0,paid:this.loanDetails.summary.principalPaid,waived:this.loanDetails.summary.principalWaived||0,writtenOff:this.loanDetails.summary.principalWrittenOff,outstanding:this.loanDetails.summary.principalOutstanding,overdue:this.loanDetails.summary.principalOverdue},{property:"Interest",original:this.loanDetails.summary.interestCharged,adjustment:"0",paid:this.loanDetails.summary.interestPaid,waived:this.loanDetails.summary.interestWaived,writtenOff:this.loanDetails.summary.interestWrittenOff,outstanding:this.loanDetails.summary.interestOutstanding,overdue:this.loanDetails.summary.interestOverdue},{property:"Fees",original:this.loanDetails.summary.feeChargesCharged,adjustment:"0",paid:this.loanDetails.summary.feeChargesPaid,waived:this.loanDetails.summary.feeChargesWaived,writtenOff:this.loanDetails.summary.feeChargesWrittenOff,outstanding:this.loanDetails.summary.feeChargesOutstanding,overdue:this.loanDetails.summary.feeChargesOverdue},{property:"Penalties",original:this.loanDetails.summary.penaltyChargesCharged,adjustment:"0",paid:this.loanDetails.summary.penaltyChargesPaid,waived:this.loanDetails.summary.penaltyChargesWaived,writtenOff:this.loanDetails.summary.penaltyChargesWrittenOff,outstanding:this.loanDetails.summary.penaltyChargesOutstanding,overdue:this.loanDetails.summary.penaltyChargesOverdue},{property:"Total",original:this.loanDetails.summary.totalExpectedRepayment,adjustment:this.loanDetails.summary.principalAdjustments||0,paid:this.loanDetails.summary.totalRepayment,waived:this.loanDetails.summary.totalWaived,writtenOff:this.loanDetails.summary.totalWrittenOff,outstanding:this.loanDetails.summary.totalOutstanding,overdue:this.loanDetails.summary.totalOverdue}],this.dataSource=new Li(this.loanSummaryTableData)}setloanDetailsTableData(){this.loanDetailsTableData=[{key:"Disbursement Date"},{key:"Loan Purpose"},{key:"Loan Officer"},{key:"Currency"},{key:"External Id"},{key:"Proposed Amount",value:this.loanDetails.proposedPrincipal},{key:"Approved Amount",value:this.loanDetails.approvedPrincipal},{key:"Disburse Amount",value:this.loanDetails.principal}],this.loanDetails.writeOffReason&&this.loanDetailsTableData.push({key:"Write-off Reason",value:this.loanDetails.writeOffReason}),this.detailsDataSource=new Li(this.loanDetailsTableData)}setloanNonDetailsTableData(){this.loanDetailsTableData=[{key:"Disbursement Date"},{key:"Currency"},{key:"Loan Officer"},{key:"External Id"}],this.detailsDataSource=new Li(this.loanDetailsTableData)}showApprovedAmountBasedOnStatus(){return!(this.status==="Submitted and pending approval"||this.status==="Withdrawn by applicant"||this.status==="Rejected")}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=Dt({type:t,selectors:[["mifosx-general-tab"]],decls:6,vars:5,consts:[[1,"tab-container","mat-typography"],[1,"layout-row","gap-32px","performance-history-container"],[1,"flex-25"],[1,"flex-25","left"],["mat-table","",3,"dataSource"],["matColumnDef","Empty"],["mat-header-cell","",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","Original"],["mat-header-cell","","class","r-amount",4,"matHeaderCellDef"],["mat-cell","","class","r-amount",4,"matCellDef"],["matColumnDef","Paid"],["mat-cell","","class","r-amount amount-minus",4,"matCellDef"],["matColumnDef","Adjustments"],["mat-cell","","class","r-amount amount-plus",4,"matCellDef"],["matColumnDef","Waived"],["matColumnDef","Written Off"],["matColumnDef","Outstanding"],["matColumnDef","Over Due"],["mat-header-row","",4,"matHeaderRowDef"],["mat-row","",4,"matRowDef","matRowDefColumns"],["mat-header-cell",""],["mat-cell",""],["mat-header-cell","",1,"r-amount"],["mat-cell","",1,"r-amount"],["mat-cell","",1,"r-amount","amount-minus"],["mat-cell","",1,"r-amount","amount-plus"],["mat-header-row",""],["mat-row",""],["matColumnDef","Key"],["matColumnDef","Value"],["completed","true",3,"externalId"],[1,"container"],[1,"layout-row-wrap","responsive-column"],[1,"flex-contents"],[1,"flex-50"]],template:function(i,a){i&1&&(s(0,"div",0),M(1,fC,21,15),M(2,LC,31,6,"div"),M(3,eb,10,5,"div"),M(4,gb,10,5,"div"),M(5,yb,29,26,"div"),l()),i&2&&(o(),O(a.loanDetails.summary?1:-1),o(),O(a.loanDetails.summary?2:-1),o(),O(a.loanDetails.summary?3:-1),o(),O(a.loanDetails.summary?-1:4),o(),O(a.loanDetails.summary?-1:5))},dependencies:[wt,Tt,bn,yn,xn,Sn,vn,Dn,wn,Pn,Tn,An,Va,Sa,En,Pt,hn],styles:[".tab-container[_ngcontent-%COMP%]{padding:1%;margin:1%}.tab-container[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{margin:1% auto}.tab-container[_ngcontent-%COMP%] .performance-history-container[_ngcontent-%COMP%]{border:1px solid;padding:1%;margin-bottom:20px}.tab-container[_ngcontent-%COMP%] table[_ngcontent-%COMP%]{width:100%;margin-bottom:20px}span[_ngcontent-%COMP%]{margin:.5em 0}"]})}}return t})();function Sb(t,n){if(t&1&&(ee(0,"span")(1,"span",4),c(2),p(3,"translate"),te(),c(4),ee(5,"span",4),c(6),p(7,"translateKey"),te()()),t&2){let e=P(2);o(2),b(m(3,3,"labels.commons.on")),o(2),v("",e.loanDetails.repaymentFrequencyNthDayType==null?null:e.loanDetails.repaymentFrequencyNthDayType.value," "),o(2),b(Ge(7,5,e.loanDetails.repaymentFrequencyDayOfWeekType==null?null:e.loanDetails.repaymentFrequencyDayOfWeekType.value,"catalogs"))}}function Db(t,n){if(t&1&&(ee(0,"span",4),M(1,Sb,8,8,"span"),te()),t&2){let e=P();o(),O(e.loanDetails.repaymentFrequencyDayOfWeekType?1:-1)}}function wb(t,n){if(t&1&&(ee(0,"div",2)(1,"span",3),c(2),p(3,"translate"),te(),ee(4,"span",3),c(5),p(6,"translateKey"),te()()),t&2){let e=P();o(2),v(" ",m(3,3,"labels.inputs.Fixed Length")," "),o(3),$t(" ",e.loanDetails.fixedLength," ",Ge(6,5,e.loanDetails.repaymentFrequencyType.value,"catalogs"))}}function Tb(t,n){if(t&1&&(ee(0,"div",2)(1,"span",3),c(2),p(3,"translate"),te(),ee(4,"span",3),c(5),p(6,"formatNumber"),te()()),t&2){let e=P();o(2),v(" ",m(3,2,"labels.inputs.Principal Percentage Per Installment")," "),o(3),v(" ",m(6,4,e.loanDetails.fixedPrincipalPercentagePerInstallment)," %")}}function Pb(t,n){if(t&1&&(ee(0,"div",2)(1,"span",3),c(2),p(3,"translate"),te(),ee(4,"span",3),c(5),p(6,"translateKey"),te()()),t&2){let e=P();o(2),v(" ",m(3,2,"labels.inputs.Income capitalization calculation type")),o(3),v(" ",Ge(6,4,e.loanDetails.capitalizedIncomeCalculationType==null?null:e.loanDetails.capitalizedIncomeCalculationType.value,"catalogs")," ")}}function Ab(t,n){if(t&1&&(ee(0,"div",2)(1,"span",3),c(2),p(3,"translate"),te(),ee(4,"span",3),c(5),p(6,"translateKey"),te()()),t&2){let e=P();o(2),v(" ",m(3,2,"labels.inputs.Income capitalization strategy")),o(3),v(" ",Ge(6,4,e.loanDetails.capitalizedIncomeStrategy==null?null:e.loanDetails.capitalizedIncomeStrategy.value,"catalogs")," ")}}function Mb(t,n){if(t&1&&(ee(0,"div",2)(1,"span",3),c(2),p(3,"translate"),te(),ee(4,"span",3),c(5),p(6,"translateKey"),te()()),t&2){let e=P();o(2),v(" ",m(3,2,"labels.inputs.Income capitalization type")),o(3),v(" ",Ge(6,4,e.loanDetails.capitalizedIncomeType==null?null:e.loanDetails.capitalizedIncomeType.value,"catalogs")," ")}}function Ob(t,n){if(t&1&&(ee(0,"div",2)(1,"span",3),c(2),p(3,"translate"),te(),ee(4,"span",3),c(5),p(6,"translateKey"),te()()),t&2){let e=P();o(2),v(" ",m(3,2,"labels.inputs.Buy down fee calculation type")),o(3),v(" ",Ge(6,4,e.loanDetails.buyDownFeeCalculationType==null?null:e.loanDetails.buyDownFeeCalculationType.value,"catalogs")," ")}}function Ib(t,n){if(t&1&&(ee(0,"div",2)(1,"span",3),c(2),p(3,"translate"),te(),ee(4,"span",3),c(5),p(6,"translateKey"),te()()),t&2){let e=P();o(2),v(" ",m(3,2,"labels.inputs.Buy down fee strategy")),o(3),v(" ",Ge(6,4,e.loanDetails.buyDownFeeStrategy==null?null:e.loanDetails.buyDownFeeStrategy.value,"catalogs")," ")}}function Eb(t,n){if(t&1&&(ee(0,"div",2)(1,"span",3),c(2),p(3,"translate"),te(),ee(4,"span",3),c(5),p(6,"translateKey"),te()()),t&2){let e=P();o(2),v(" ",m(3,2,"labels.inputs.Buy down fee income type")),o(3),v(" ",Ge(6,4,e.loanDetails.buyDownFeeIncomeType==null?null:e.loanDetails.buyDownFeeIncomeType.value,"catalogs")," ")}}function Lb(t,n){if(t&1&&(ee(0,"div",2)(1,"span",3),c(2),p(3,"translate"),te(),ee(4,"span",3),c(5),p(6,"yesNo"),te()()),t&2){let e=P();o(2),v(" ",m(3,2,"labels.inputs.Merchant Buy down fee")),o(3),v(" ",m(6,4,e.loanDetails.merchantBuyDownFee)," ")}}function Nb(t,n){if(t&1&&(ee(0,"span",3),c(1),te()),t&2){let e=P();o(),v(" ",e.loanDetails.fundName," ")}}function kb(t,n){t&1&&(ee(0,"span",3),c(1),p(2,"translate"),te()),t&2&&(o(),v(" ",m(2,1,"labels.inputs.Unassigned")," "))}function Fb(t,n){if(t&1&&(ee(0,"div",2)(1,"span",3),c(2),p(3,"translate"),te(),ee(4,"span",3),c(5),p(6,"formatNumber"),te()()),t&2){let e=P();o(2),v(" ",m(3,2,"labels.inputs.Fixed EMI amount")),o(3),v(" ",m(6,4,e.loanDetails.fixedEmiAmount)," ")}}function Rb(t,n){if(t&1&&(ee(0,"div",2)(1,"span",3),c(2),p(3,"translate"),te(),ee(4,"span",3),c(5),p(6,"yesNo"),te()()),t&2){let e=P();o(2),v(" ",m(3,2,"labels.inputs.Is Topup Loan"),"?"),o(3),v(" ",m(6,4,e.loanDetails.isTopup)," ")}}function Bb(t,n){if(t&1&&(ee(0,"div",2)(1,"span",3),c(2),p(3,"translate"),te(),ee(4,"span",3)(5,"a",5),c(6),te()()()),t&2){let e=P();o(2),v(" ",m(3,2,"labels.inputs.Loan closed with Topup")," "),o(4),b(e.loanDetails.closureLoanAccountNo)}}function qb(t,n){if(t&1&&(ee(0,"div",2)(1,"span",3),c(2),p(3,"translate"),te(),ee(4,"span",3),c(5),p(6,"formatNumber"),te()()),t&2){let e=P();o(2),v(" ",m(3,2,"labels.inputs.Topup closure amount")),o(3),v(" ",m(6,4,e.loanDetails.topupAmount)," ")}}function jb(t,n){if(t&1&&(ee(0,"div",2)(1,"span",3),c(2),p(3,"translate"),te(),ee(4,"span",3),c(5),p(6,"translateKey"),te()()),t&2){let e=P();o(2),v(" ",m(3,2,"labels.inputs.Interest recalculation compounding on")),o(3),v(" ",Ge(6,4,e.loanDetails.interestRecalculationData.interestRecalculationCompoundingType.value,"catalogs")," ")}}function zb(t,n){if(t&1&&(ee(0,"div",2)(1,"span",3),c(2),p(3,"translate"),te(),ee(4,"span",3),c(5),p(6,"translateKey"),te()()),t&2){let e=P();o(2),v(" ",m(3,2,"labels.inputs.Advance payments adjustment type")),o(3),v(" ",Ge(6,4,e.loanDetails.interestRecalculationData.rescheduleStrategyType.value,"catalogs")," ")}}function Vb(t,n){if(t&1&&(ee(0,"div",2)(1,"span",3),c(2),p(3,"translate"),te(),ee(4,"span",3),c(5),te()()),t&2){let e=P();o(2),v(" ",m(3,2,"labels.inputs.Frequency for recalculate Outstanding Principal")),o(3),v(" ",e.loanDetails.interestRecalculationData.calendarData.humanReadable," ")}}function Ub(t,n){if(t&1&&(ee(0,"div",2)(1,"span",3),c(2),p(3,"translate"),te(),ee(4,"span",3),c(5),te()()),t&2){let e=P();o(2),v(" ",m(3,2,"labels.inputs.Frequency for compounding")),o(3),v(" ",e.loanDetails.interestRecalculationData.compoundingCalendarData.humanReadable," ")}}function Hb(t,n){if(t&1&&(ee(0,"div",2)(1,"span",3),c(2),p(3,"translate"),te(),ee(4,"span",3),c(5),p(6,"yesNo"),te()()),t&2){let e=P();o(2),v(" ",m(3,2,"labels.inputs.Variable Installments Allowed")),o(3),v(" ",m(6,4,e.loanDetails.isVariableInstallmentsAllowed)," ")}}function Gb(t,n){if(t&1&&(ee(0,"div",2)(1,"span",3),c(2),p(3,"translate"),te(),ee(4,"span",3),c(5),p(6,"formatNumber"),p(7,"translate"),p(8,"formatNumber"),p(9,"translate"),te()()),t&2){let e=P();o(2),v(" ",m(3,5,"labels.inputs.Gap between Installments")),o(3),Qs(" ",m(6,7,e.loanDetails.minimumGap),"\xA0",m(7,9,"labels.text.Days"),"\xA0, Max:",m(8,11,e.loanDetails.maximumGap),"\xA0",m(9,13,"labels.text.Days")," ")}}function Wb(t,n){if(t&1&&(ee(0,"div",2)(1,"span",3),c(2),p(3,"translate"),te(),ee(4,"span",3),c(5),p(6,"formatNumber"),te()()),t&2){let e=P();o(2),b(m(3,2,"labels.inputs.Available Disbursement Amount (with Over Applied)")),o(3),b(m(6,4,e.loanDetails.delinquent.availableDisbursementAmountWithOverApplied))}}var Fp=(()=>{class t{constructor(){this.route=A(Et),this.route.parent.data.subscribe(e=>{this.loanDetails=e.loanDetailsData})}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=Dt({type:t,selectors:[["mifosx-account-details"]],decls:205,vars:188,consts:[[1,"container","p-b-20"],[1,"responsive-column"],[1,"flex-fill","layout-row"],[1,"flex-50"],[1,"m-l-10"],["href","#"]],template:function(i,a){i&1&&(ee(0,"div",0)(1,"h3"),c(2),p(3,"translate"),te(),ee(4,"div",1)(5,"div",2)(6,"span",3),c(7),p(8,"translate"),te(),ee(9,"span",3),c(10),p(11,"translateKey"),te()(),ee(12,"div",2)(13,"span",3),c(14),p(15,"translate"),te(),ee(16,"span",3),c(17),p(18,"translateKey"),M(19,Db,2,1,"span",4),te()(),M(20,wb,7,8,"div",2),ee(21,"div",2)(22,"span",3),c(23),p(24,"translate"),te(),ee(25,"span",3),c(26),p(27,"translateKey"),te()(),M(28,Tb,7,6,"div",2),ee(29,"div",2)(30,"span",3),c(31),p(32,"translate"),te(),ee(33,"span",3),c(34),p(35,"yesNo"),te()(),ee(36,"div",2)(37,"span",3),c(38),p(39,"translate"),te(),ee(40,"span",3),c(41),p(42,"formatNumber"),p(43,"translate"),p(44,"translateKey"),te()(),ee(45,"div",2)(46,"span",3),c(47),p(48,"translate"),te(),ee(49,"span",3),c(50),p(51,"translate"),te()(),ee(52,"div",2)(53,"span",3),c(54),p(55,"translate"),te(),ee(56,"span",3),c(57),p(58,"yesNo"),te()(),ee(59,"div",2)(60,"span",3),c(61),p(62,"translate"),te(),ee(63,"span",3),c(64),p(65,"translateKey"),te()(),ee(66,"div",2)(67,"span",3),c(68),p(69,"translate"),te(),ee(70,"span",3),c(71),p(72,"yesNo"),te()(),M(73,Pb,7,7,"div",2),M(74,Ab,7,7,"div",2),M(75,Mb,7,7,"div",2),ee(76,"div",2)(77,"span",3),c(78),p(79,"translate"),te(),ee(80,"span",3),c(81),p(82,"yesNo"),te()(),M(83,Ob,7,7,"div",2),M(84,Ib,7,7,"div",2),M(85,Eb,7,7,"div",2),M(86,Lb,7,6,"div",2),ee(87,"div",2)(88,"span",3),c(89),p(90,"translate"),te(),ee(91,"span",3),c(92),te()(),ee(93,"div",2)(94,"span",3),c(95),p(96,"translate"),te(),ee(97,"span",3),c(98),te()(),ee(99,"div",2)(100,"span",3),c(101),p(102,"translate"),te(),ee(103,"span",3),c(104),te()(),ee(105,"div",2)(106,"span",3),c(107),p(108,"translate"),te(),ee(109,"span",3),c(110),p(111,"yesNo"),te()(),ee(112,"div",2)(113,"span",3),c(114),p(115,"translate"),te(),M(116,Nb,2,1,"span",3),M(117,kb,3,3,"span",3),te(),ee(118,"div",2)(119,"span",3),c(120),p(121,"translate"),te(),ee(122,"span",3),c(123),te()(),ee(124,"div",2)(125,"span",3),c(126),p(127,"translate"),te(),ee(128,"span",3),c(129),p(130,"translateKey"),te()(),ee(131,"div",2)(132,"span",3),c(133),p(134,"translate"),te(),ee(135,"span",3),c(136),p(137,"yesNo"),te()(),ee(138,"div",2)(139,"span",3),c(140),p(141,"translate"),te(),ee(142,"span",3),c(143),p(144,"yesNo"),te()(),ee(145,"div",2)(146,"span",3),c(147),p(148,"translate"),te(),ee(149,"span",3),c(150),p(151,"dateFormat"),te()(),ee(152,"div",2)(153,"span",3),c(154),p(155,"translate"),te(),ee(156,"span",3),c(157),p(158,"dateFormat"),te()(),ee(159,"div",2)(160,"span",3),c(161),p(162,"translate"),te(),ee(163,"span",3),c(164),p(165,"dateFormat"),te()(),ee(166,"div",2)(167,"span",3),c(168),p(169,"translate"),te(),ee(170,"span",3),c(171),p(172,"dateFormat"),te()(),M(173,Fb,7,6,"div",2),M(174,Rb,7,6,"div",2),M(175,Bb,7,4,"div",2),M(176,qb,7,6,"div",2),ee(177,"div",2)(178,"span",3),c(179),p(180,"translate"),te(),ee(181,"span",3),c(182),p(183,"yesNo"),te()(),ee(184,"div",2)(185,"span",3),c(186),p(187,"translate"),te(),ee(188,"span",3),c(189),p(190,"translateKey"),te()(),ee(191,"div",2)(192,"span",3),c(193),p(194,"translate"),te(),ee(195,"span",3),c(196),p(197,"translateKey"),te()(),M(198,jb,7,7,"div",2),M(199,zb,7,7,"div",2),M(200,Vb,6,4,"div",2),M(201,Ub,6,4,"div",2),M(202,Hb,7,6,"div",2),M(203,Gb,10,15,"div",2),M(204,Wb,7,6,"div",2),te()()),i&2&&(o(2),b(m(3,80,"labels.heading.Loan Details")),o(5),b(m(8,82,"labels.inputs.Repayment Strategy")),o(3),b(Ge(11,84,a.loanDetails.transactionProcessingStrategyName,"catalogs")),o(4),b(m(15,87,"labels.inputs.Repayments")),o(3),Xs("",a.loanDetails.numberOfRepayments," every ",a.loanDetails.repaymentEvery,"\xA0",Ge(18,89,a.loanDetails.repaymentFrequencyType.value,"catalogs")," "),o(2),O((a.loanDetails.repaymentFrequencyType==null?null:a.loanDetails.repaymentFrequencyType.id)===2&&(a.loanDetails.repaymentFrequencyNthDayType==null?null:a.loanDetails.repaymentFrequencyNthDayType.id)!==0&&(a.loanDetails.repaymentFrequencyDayOfWeekType==null?null:a.loanDetails.repaymentFrequencyDayOfWeekType.id)!==0?19:-1),o(),O(a.loanDetails.fixedLength?20:-1),o(3),v(" ",m(24,92,"labels.inputs.Amortization")," "),o(3),v(" ",Ge(27,94,a.loanDetails.amortizationType.value,"catalogs")," "),o(2),O(a.loanDetails.fixedPrincipalPercentagePerInstallment?28:-1),o(3),v(" ",m(32,97,"labels.inputs.Equal Amortization")," "),o(3),v(" ",m(35,99,a.loanDetails.isEqualAmortization)," "),o(4),v(" ",m(39,101,"labels.inputs.Interest")," "),o(3),Qs(" ",m(42,103,a.loanDetails.annualInterestRate)," % ",m(43,105,"labels.text.per annum")," (",a.loanDetails.interestRatePerPeriod," %\xA0 ",Ge(44,107,a.loanDetails.interestRateFrequencyType.value,"catalogs"),") "),o(6),v(" ",m(48,110,"labels.inputs.Interest Type")," "),o(3),v(" ",m(51,112,"labels.text."+a.loanDetails.interestType.value)," "),o(4),v("",m(55,114,"labels.inputs.Enable Down Payments"),":"),o(3),b(m(58,116,a.loanDetails.enableDownPayment)),o(4),v("",m(62,118,"labels.inputs.Loan Charge-off behaviour"),":"),o(3),b(Ge(65,120,a.loanDetails.chargeOffBehaviour.value,"catalogs")),o(4),v(" ",m(69,123,"labels.inputs.Enable income capitalization")),o(3),v(" ",m(72,125,a.loanDetails.enableIncomeCapitalization)," "),o(2),O(a.loanDetails.enableIncomeCapitalization?73:-1),o(),O(a.loanDetails.enableIncomeCapitalization?74:-1),o(),O(a.loanDetails.enableIncomeCapitalization?75:-1),o(3),v(" ",m(79,127,"labels.inputs.Enable Buy down fee")),o(3),v(" ",m(82,129,a.loanDetails.enableBuyDownFee)," "),o(2),O(a.loanDetails.enableBuyDownFee?83:-1),o(),O(a.loanDetails.enableBuyDownFee?84:-1),o(),O(a.loanDetails.enableBuyDownFee?85:-1),o(),O(a.loanDetails.enableBuyDownFee?86:-1),o(3),v(" ",m(90,131,"labels.inputs.Grace: On Principal Payment")),o(3),v(" ",a.loanDetails.graceOnPrincipalPayment," "),o(3),v(" ",m(96,133,"labels.inputs.Grace: On Interest Payment")),o(3),v(" ",a.loanDetails.graceOnInterestPayment," "),o(3),v(" ",m(102,135,"labels.inputs.Grace on Arrears Ageing")),o(3),v(" ",a.loanDetails.graceOnArrearsAgeing," "),o(3),v(" ",m(108,137,"labels.inputs.Enable installment level Delinquency")," "),o(3),v(" ",m(111,139,a.loanDetails.enableInstallmentLevelDelinquency)," "),o(4),v(" ",m(115,141,"labels.inputs.Fund Source")," "),o(2),O(a.loanDetails.fundName?116:-1),o(),O(a.loanDetails.fundName?-1:117),o(3),v(" ",m(121,143,"labels.inputs.Interest Free Period")),o(3),v(" ",a.loanDetails.graceOnInterestCharged," "),o(3),v(" ",m(127,145,"labels.inputs.Interest Calculation Period")),o(3),v(" ",Ge(130,147,a.loanDetails.interestCalculationPeriodType.value,"catalogs")," "),o(4),v(" ",m(134,150,"labels.inputs.Allow Partial Interest Calculation with same as repayment")),o(3),v(" ",m(137,152,a.loanDetails.allowPartialPeriodInterestCalculation)," "),o(4),v("",m(141,154,"labels.inputs.Is interest recognition on disbursement date?"),":"),o(3),b(m(144,156,a.loanDetails.interestRecognitionOnDisbursementDate)),o(4),v(" ",m(148,158,"labels.inputs.Submitted on")),o(3),v(" ",m(151,160,a.loanDetails.timeline.submittedOnDate)," "),o(4),v(" ",m(155,162,"labels.inputs.Approved on")),o(3),v(" ",m(158,164,a.loanDetails.timeline.approvedOnDate)," "),o(4),v(" ",m(162,166,"labels.inputs.Disbursed on")),o(3),v(" ",m(165,168,a.loanDetails.timeline.actualDisbursementDate)," "),o(4),v(" ",m(169,170,"labels.inputs.Matures on")),o(3),v(" ",m(172,172,a.loanDetails.timeline.expectedMaturityDate)," "),o(2),O(a.loanDetails.canDefineInstallmentAmount?173:-1),o(),O(a.loanDetails.isTopup?174:-1),o(),O(a.loanDetails.isTopup?175:-1),o(),O(a.loanDetails.isTopup?176:-1),o(3),v(" ",m(180,174,"labels.inputs.Recalculate Interest based on new terms")),o(3),v(" ",m(183,176,a.loanDetails.isInterestRecalculationEnabled)," "),o(4),v(" ",m(187,178,"labels.inputs.Days in year")),o(3),v(" ",Ge(190,180,a.loanDetails.daysInYearType.value,"catalogs")," "),o(4),v(" ",m(194,183,"labels.inputs.Days in month")),o(3),v(" ",Ge(197,185,a.loanDetails.daysInMonthType.value,"catalogs")," "),o(2),O(a.loanDetails.isInterestRecalculationEnabled?198:-1),o(),O(a.loanDetails.isInterestRecalculationEnabled?199:-1),o(),O(a.loanDetails.isInterestRecalculationEnabled?200:-1),o(),O(a.loanDetails.isInterestRecalculationEnabled&&a.loanDetails.interestRecalculationData.interestRecalculationCompoundingType.id!==0?201:-1),o(),O(a.loanDetails.isVariableInstallmentsAllowed?202:-1),o(),O(a.loanDetails.isVariableInstallmentsAllowed?203:-1),o(),O(a.loanDetails&&a.loanDetails.delinquent&&a.loanDetails.delinquent.availableDisbursementAmountWithOverApplied!==void 0?204:-1))},dependencies:[wt,Tt,En,Pt,qa,hn,Hr],styles:["table[_ngcontent-%COMP%]{width:100%}span[_ngcontent-%COMP%]{margin:.5em 0}"]})}}return t})();var Rp=(()=>{class t{constructor(){this.route=A(Et),this.loansService=A(Mt),this.authenticationService=A(jf);let e=this.authenticationService.getCredentials();this.username=e.username,this.entityId=this.route.parent.snapshot.params.loanId,this.route.data.subscribe(i=>{this.entityNotes=i.loanNotes})}ngOnInit(){this.route.parent.params.subscribe(e=>{this.entityId=e.loanId})}addNote(e){this.loansService.createLoanNote(this.entityId,e).subscribe(i=>{this.entityNotes.push({id:i.resourceId,createdByUsername:this.username,createdOn:new Date,note:e.note})})}editNote(e,i,a){this.loansService.editLoanNote(this.entityId,e,i).subscribe(()=>{this.entityNotes[a].note=i.note})}deleteNote(e,i){this.loansService.deleteLoanNote(this.entityId,e).subscribe(()=>{this.entityNotes.splice(i,1)})}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=Dt({type:t,selectors:[["mifosx-notes-tab"]],decls:1,vars:5,consts:[[3,"entityId","entityNotes","callbackAdd","callbackEdit","callbackDelete"]],template:function(i,a){i&1&&T(0,"mifosx-entity-notes-tab",0),i&2&&x("entityId",a.entityId)("entityNotes",a.entityNotes)("callbackAdd",a.addNote)("callbackEdit",a.editNote)("callbackDelete",a.deleteNote)},dependencies:[wt,Tt,l1],encapsulation:2})}}return t})();function fi(t){"@babel/helpers - typeof";return fi=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},fi(t)}var To=Uint8Array,Qa=Uint16Array,dd=Int32Array,ud=new To([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),fd=new To([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),v1=new To([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),D1=function(t,n){for(var e=new Qa(31),i=0;i<31;++i)e[i]=n+=1<>1|(ri&21845)<<1,br=(br&52428)>>2|(br&13107)<<2,br=(br&61680)>>4|(br&3855)<<4,pd[ri]=((br&65280)>>8|(br&255)<<8)>>1;var br,ri,rc=function(t,n,e){for(var i=t.length,a=0,r=new Qa(n);a>g]=_}else for(d=new Qa(i),a=0;a>15-t[a]);return d},yl=new To(288);for(ri=0;ri<144;++ri)yl[ri]=8;var ri;for(ri=144;ri<256;++ri)yl[ri]=9;var ri;for(ri=256;ri<280;++ri)yl[ri]=7;var ri;for(ri=280;ri<288;++ri)yl[ri]=8;var ri,Bp=new To(32);for(ri=0;ri<32;++ri)Bp[ri]=5;var ri,Yb=rc(yl,9,0);var Zb=rc(Bp,5,0);var P1=function(t){return(t+7)/8|0},Kb=function(t,n,e){return(n==null||n<0)&&(n=0),(e==null||e>t.length)&&(e=t.length),new To(t.subarray(n,e))};var vr=function(t,n,e){e<<=n&7;var i=n/8|0;t[i]|=e,t[i+1]|=e>>8},ac=function(t,n,e){e<<=n&7;var i=n/8|0;t[i]|=e,t[i+1]|=e>>8,t[i+2]|=e>>16},sd=function(t,n){for(var e=[],i=0;iN&&(N=r[i].s);var D=new Qa(N+1),U=md(e[y-1],D,0);if(U>n){var i=0,H=0,K=U-n,z=1<n)H+=z-(1<>=K;H>0;){var pt=r[i].s;D[pt]=0&&H;--i){var nt=r[i].s;D[nt]==n&&(--D[nt],++H)}U=n}return{t:new To(D),l:U}},md=function(t,n,e){return t.s==-1?Math.max(md(t.l,n,e+1),md(t.r,n,e+1)):n[t.s]=e},y1=function(t){for(var n=t.length;n&&!t[--n];);for(var e=new Qa(++n),i=0,a=t[0],r=1,u=function(g){e[i++]=g},d=1;d<=n;++d)if(t[d]==a&&d!=n)++r;else{if(!a&&r>2){for(;r>138;r-=138)u(32754);r>2&&(u(r>10?r-11<<5|28690:r-3<<5|12305),r=0)}else if(r>3){for(u(a),--r;r>6;r-=6)u(8304);r>2&&(u(r-3<<5|8208),r=0)}for(;r--;)u(a);r=1,a=t[d]}return{c:e.subarray(0,i),n}},oc=function(t,n){for(var e=0,i=0;i>8,t[a+2]=t[a]^255,t[a+3]=t[a+1]^255;for(var r=0;r4&&!vt[v1[Y-1]];--Y);var rt=_+5<<3,ot=oc(a,yl)+oc(r,Bp)+u,At=oc(a,N)+oc(r,H)+u+14+3*Y+oc(jt,vt)+2*jt[16]+3*jt[17]+7*jt[18];if(g>=0&&rt<=ot&&rt<=At)return A1(n,y,t.subarray(g,g+_));var kt,Rt,St,qt;if(vr(n,y,1+(At15&&(vr(n,y,J[ht]>>5&127),y+=J[ht]>>12)}}else kt=Yb,Rt=yl,St=Zb,qt=Bp;for(var ht=0;ht255){var et=lt>>18&31;ac(n,y,kt[et+257]),y+=Rt[et+257],et>7&&(vr(n,y,lt>>23&31),y+=ud[et]);var ft=lt&31;ac(n,y,St[ft]),y+=qt[ft],ft>3&&(ac(n,y,lt>>5&8191),y+=fd[ft])}else ac(n,y,kt[lt]),y+=Rt[lt]}return ac(n,y,kt[256]),y+Rt[256]},Jb=new dd([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),M1=new To(0),Xb=function(t,n,e,i,a,r){var u=r.z||t.length,d=new To(i+u+5*(1+Math.ceil(u/7e3))+a),g=d.subarray(i,d.length-a),_=r.l,y=(r.r||0)&7;if(n){y&&(g[0]=r.r>>3);for(var I=Jb[n-1],N=I>>13,D=I&8191,U=(1<7e3||vt>24576)&&(kt>423||!_)){y=S1(t,g,0,nt,Ot,Yt,ht,vt,Y,tt-Y,y),vt=jt=ht=0,Y=tt;for(var Rt=0;Rt<286;++Rt)Ot[Rt]=0;for(var Rt=0;Rt<30;++Rt)Yt[Rt]=0}var St=2,qt=0,se=D,Jt=ot-At&32767;if(kt>2&&rt==pt(tt-Jt))for(var B=Math.min(N,kt)-1,J=Math.min(32767,tt),et=Math.min(258,kt);Jt<=J&&--se&&ot!=At;){if(t[tt+St]==t[tt+St-Jt]){for(var lt=0;ltSt){if(St=lt,qt=Jt,lt>B)break;for(var ft=Math.min(Jt,lt-2),Ct=0,Rt=0;RtCt&&(Ct=Ht,At=It)}}}ot=At,At=H[ot],Jt+=ot-At&32767}if(qt){nt[vt++]=268435456|cd[St]<<18|x1[qt];var re=cd[St]&31,Me=x1[qt]&31;ht+=ud[re]+fd[Me],++Ot[257+re],++Yt[Me],j=tt+St,++jt}else nt[vt++]=t[tt],++Ot[t[tt]]}}for(tt=Math.max(tt,j);tt=u&&(g[y/8|0]=_,De=u),y=A1(g,y+1,t.subarray(tt,De))}r.i=u}return Kb(d,0,i+P1(y)+a)};var O1=function(){var t=1,n=0;return{p:function(e){for(var i=t,a=n,r=e.length|0,u=0;u!=r;){for(var d=Math.min(u+2655,r);u>16),a=(a&65535)+15*(a>>16)}t=i,n=a},d:function(){return t%=65521,n%=65521,(t&255)<<24|(t&65280)<<8|(n&255)<<8|n>>8}}},Qb=function(t,n,e,i,a){if(!a&&(a={l:1},n.dictionary)){var r=n.dictionary.subarray(-32768),u=new To(r.length+t.length);u.set(r),u.set(t,r.length),t=u,a.w=r.length}return Xb(t,n.level==null?6:n.level,n.mem==null?a.l?Math.ceil(Math.max(8,Math.min(13,Math.log(t.length)))*1.5):20:12+n.mem,e,i,a)};var I1=function(t,n,e){for(;e;++n)t[n]=e,e>>>=8};var tv=function(t,n){var e=n.level,i=e==0?0:e<6?1:e==9?3:2;if(t[0]=120,t[1]=i<<6|(n.dictionary&&32),t[1]|=31-(t[0]<<8|t[1])%31,n.dictionary){var a=O1();a.p(n.dictionary),I1(t,2,a.d())}};function qp(t,n){n||(n={});var e=O1();e.p(t);var i=Qb(t,n,n.dictionary?6:2,4);return tv(i,n),I1(i,i.length-4,e.d()),i}var ev=typeof TextDecoder<"u"&&new TextDecoder,nv=0;try{ev.decode(M1,{stream:!0}),nv=1}catch{}function E1(t){if(Array.isArray(t))return t}function L1(t,n){var e=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(e!=null){var i,a,r,u,d=[],g=!0,_=!1;try{if(r=(e=e.call(t)).next,n===0){if(Object(e)!==e)return;g=!1}else for(;!(g=(i=r.call(e)).done)&&(d.push(i.value),d.length!==n);g=!0);}catch(y){_=!0,a=y}finally{try{if(!g&&e.return!=null&&(u=e.return(),Object(u)!==u))return}finally{if(_)throw a}}return d}}function hd(t,n){(n==null||n>t.length)&&(n=t.length);for(var e=0,i=Array(n);e{let t=new Uint8Array(4),n=new Uint32Array(t.buffer);return!((n[0]=1)&t[0])})(),Cd={int8:globalThis.Int8Array,uint8:globalThis.Uint8Array,int16:globalThis.Int16Array,uint16:globalThis.Uint16Array,int32:globalThis.Int32Array,uint32:globalThis.Uint32Array,uint64:globalThis.BigUint64Array,int64:globalThis.BigInt64Array,float32:globalThis.Float32Array,float64:globalThis.Float64Array},lc=class t{buffer;byteLength;byteOffset;length;offset;lastWrittenByte;littleEndian;_data;_mark;_marks;constructor(n=av,e={}){let i=!1;typeof n=="number"?n=new ArrayBuffer(n):(i=!0,this.lastWrittenByte=n.byteLength);let a=e.offset?e.offset>>>0:0,r=n.byteLength-a,u=a;(ArrayBuffer.isView(n)||n instanceof t)&&(n.byteLength!==n.buffer.byteLength&&(u=n.byteOffset+a),n=n.buffer),i?this.lastWrittenByte=r:this.lastWrittenByte=0,this.buffer=n,this.length=r,this.byteLength=r,this.byteOffset=u,this.offset=0,this.littleEndian=!0,this._data=new DataView(this.buffer,u,r),this._mark=0,this._marks=[]}available(n=1){return this.offset+n<=this.length}isLittleEndian(){return this.littleEndian}setLittleEndian(){return this.littleEndian=!0,this}isBigEndian(){return!this.littleEndian}setBigEndian(){return this.littleEndian=!1,this}skip(n=1){return this.offset+=n,this}back(n=1){return this.offset-=n,this}seek(n){return this.offset=n,this}mark(){return this._mark=this.offset,this}reset(){return this.offset=this._mark,this}pushMark(){return this._marks.push(this.offset),this}popMark(){let n=this._marks.pop();if(n===void 0)throw new Error("Mark stack empty");return this.seek(n),this}rewind(){return this.offset=0,this}ensureAvailable(n=1){if(!this.available(n)){let i=(this.offset+n)*2,a=new Uint8Array(i);a.set(new Uint8Array(this.buffer)),this.buffer=a.buffer,this.length=i,this.byteLength=i,this._data=new DataView(this.buffer)}return this}readBoolean(){return this.readUint8()!==0}readInt8(){return this._data.getInt8(this.offset++)}readUint8(){return this._data.getUint8(this.offset++)}readByte(){return this.readUint8()}readBytes(n=1){return this.readArray(n,"uint8")}readArray(n,e){let i=Cd[e].BYTES_PER_ELEMENT*n,a=this.byteOffset+this.offset,r=this.buffer.slice(a,a+i);if(this.littleEndian===ov&&e!=="uint8"&&e!=="int8"){let d=new Uint8Array(this.buffer.slice(a,a+i));d.reverse();let g=new Cd[e](d.buffer);return this.offset+=i,g.reverse(),g}let u=new Cd[e](r);return this.offset+=i,u}readInt16(){let n=this._data.getInt16(this.offset,this.littleEndian);return this.offset+=2,n}readUint16(){let n=this._data.getUint16(this.offset,this.littleEndian);return this.offset+=2,n}readInt32(){let n=this._data.getInt32(this.offset,this.littleEndian);return this.offset+=4,n}readUint32(){let n=this._data.getUint32(this.offset,this.littleEndian);return this.offset+=4,n}readFloat32(){let n=this._data.getFloat32(this.offset,this.littleEndian);return this.offset+=4,n}readFloat64(){let n=this._data.getFloat64(this.offset,this.littleEndian);return this.offset+=8,n}readBigInt64(){let n=this._data.getBigInt64(this.offset,this.littleEndian);return this.offset+=8,n}readBigUint64(){let n=this._data.getBigUint64(this.offset,this.littleEndian);return this.offset+=8,n}readChar(){return String.fromCharCode(this.readInt8())}readChars(n=1){let e="";for(let i=0;ithis.lastWrittenByte&&(this.lastWrittenByte=this.offset)}};function cs(t){let n=t.length;for(;--n>=0;)t[n]=0}var rv=0,xh=1,lv=2,sv=3,cv=258,Vd=29,yc=256,fc=yc+1+Vd,rs=30,Ud=19,yh=2*fc+1,Sl=15,bd=16,pv=7,Hd=256,Sh=16,Dh=17,wh=18,Ld=new Uint8Array([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0]),Gp=new Uint8Array([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13]),mv=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7]),Th=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),dv=512,yr=new Array((fc+2)*2);cs(yr);var mc=new Array(rs*2);cs(mc);var hc=new Array(dv);cs(hc);var gc=new Array(cv-sv+1);cs(gc);var Gd=new Array(Vd);cs(Gd);var Wp=new Array(rs);cs(Wp);function vd(t,n,e,i,a){this.static_tree=t,this.extra_bits=n,this.extra_base=e,this.elems=i,this.max_length=a,this.has_stree=t&&t.length}var Ph,Ah,Mh;function xd(t,n){this.dyn_tree=t,this.max_code=0,this.stat_desc=n}var Oh=t=>t<256?hc[t]:hc[256+(t>>>7)],_c=(t,n)=>{t.pending_buf[t.pending++]=n&255,t.pending_buf[t.pending++]=n>>>8&255},Ua=(t,n,e)=>{t.bi_valid>bd-e?(t.bi_buf|=n<>bd-t.bi_valid,t.bi_valid+=e-bd):(t.bi_buf|=n<{Ua(t,e[n*2],e[n*2+1])},Ih=(t,n)=>{let e=0;do e|=t&1,t>>>=1,e<<=1;while(--n>0);return e>>>1},uv=t=>{t.bi_valid===16?(_c(t,t.bi_buf),t.bi_buf=0,t.bi_valid=0):t.bi_valid>=8&&(t.pending_buf[t.pending++]=t.bi_buf&255,t.bi_buf>>=8,t.bi_valid-=8)},fv=(t,n)=>{let e=n.dyn_tree,i=n.max_code,a=n.stat_desc.static_tree,r=n.stat_desc.has_stree,u=n.stat_desc.extra_bits,d=n.stat_desc.extra_base,g=n.stat_desc.max_length,_,y,I,N,D,U,H=0;for(N=0;N<=Sl;N++)t.bl_count[N]=0;for(e[t.heap[t.heap_max]*2+1]=0,_=t.heap_max+1;_g&&(N=g,H++),e[y*2+1]=N,!(y>i)&&(t.bl_count[N]++,D=0,y>=d&&(D=u[y-d]),U=e[y*2],t.opt_len+=U*(N+D),r&&(t.static_len+=U*(a[y*2+1]+D)));if(H!==0){do{for(N=g-1;t.bl_count[N]===0;)N--;t.bl_count[N]--,t.bl_count[N+1]+=2,t.bl_count[g]--,H-=2}while(H>0);for(N=g;N!==0;N--)for(y=t.bl_count[N];y!==0;)I=t.heap[--_],!(I>i)&&(e[I*2+1]!==N&&(t.opt_len+=(N-e[I*2+1])*e[I*2],e[I*2+1]=N),y--)}},Eh=(t,n,e)=>{let i=new Array(Sl+1),a=0,r,u;for(r=1;r<=Sl;r++)a=a+e[r-1]<<1,i[r]=a;for(u=0;u<=n;u++){let d=t[u*2+1];d!==0&&(t[u*2]=Ih(i[d]++,d))}},hv=()=>{let t,n,e,i,a,r=new Array(Sl+1);for(e=0,i=0;i>=7;i{let n;for(n=0;n{t.bi_valid>8?_c(t,t.bi_buf):t.bi_valid>0&&(t.pending_buf[t.pending++]=t.bi_buf),t.bi_buf=0,t.bi_valid=0},R1=(t,n,e,i)=>{let a=n*2,r=e*2;return t[a]{let i=t.heap[e],a=e<<1;for(;a<=t.heap_len&&(a{let i,a,r=0,u,d;if(t.sym_next!==0)do i=t.pending_buf[t.sym_buf+r++]&255,i+=(t.pending_buf[t.sym_buf+r++]&255)<<8,a=t.pending_buf[t.sym_buf+r++],i===0?Zo(t,a,n):(u=gc[a],Zo(t,u+yc+1,n),d=Ld[u],d!==0&&(a-=Gd[u],Ua(t,a,d)),i--,u=Oh(i),Zo(t,u,e),d=Gp[u],d!==0&&(i-=Wp[u],Ua(t,i,d)));while(r{let e=n.dyn_tree,i=n.stat_desc.static_tree,a=n.stat_desc.has_stree,r=n.stat_desc.elems,u,d,g=-1,_;for(t.heap_len=0,t.heap_max=yh,u=0;u>1;u>=1;u--)yd(t,e,u);_=r;do u=t.heap[1],t.heap[1]=t.heap[t.heap_len--],yd(t,e,1),d=t.heap[1],t.heap[--t.heap_max]=u,t.heap[--t.heap_max]=d,e[_*2]=e[u*2]+e[d*2],t.depth[_]=(t.depth[u]>=t.depth[d]?t.depth[u]:t.depth[d])+1,e[u*2+1]=e[d*2+1]=_,t.heap[1]=_++,yd(t,e,1);while(t.heap_len>=2);t.heap[--t.heap_max]=t.heap[1],fv(t,n),Eh(e,g,t.bl_count)},q1=(t,n,e)=>{let i,a=-1,r,u=n[1],d=0,g=7,_=4;for(u===0&&(g=138,_=3),n[(e+1)*2+1]=65535,i=0;i<=e;i++)r=u,u=n[(i+1)*2+1],!(++d{let i,a=-1,r,u=n[1],d=0,g=7,_=4;for(u===0&&(g=138,_=3),i=0;i<=e;i++)if(r=u,u=n[(i+1)*2+1],!(++d{let n;for(q1(t,t.dyn_ltree,t.l_desc.max_code),q1(t,t.dyn_dtree,t.d_desc.max_code),Nd(t,t.bl_desc),n=Ud-1;n>=3&&t.bl_tree[Th[n]*2+1]===0;n--);return t.opt_len+=3*(n+1)+5+5+4,n},_v=(t,n,e,i)=>{let a;for(Ua(t,n-257,5),Ua(t,e-1,5),Ua(t,i-4,4),a=0;a{let n=4093624447,e;for(e=0;e<=31;e++,n>>>=1)if(n&1&&t.dyn_ltree[e*2]!==0)return 0;if(t.dyn_ltree[18]!==0||t.dyn_ltree[20]!==0||t.dyn_ltree[26]!==0)return 1;for(e=32;e{z1||(hv(),z1=!0),t.l_desc=new xd(t.dyn_ltree,Ph),t.d_desc=new xd(t.dyn_dtree,Ah),t.bl_desc=new xd(t.bl_tree,Mh),t.bi_buf=0,t.bi_valid=0,Lh(t)},kh=(t,n,e,i)=>{Ua(t,(rv<<1)+(i?1:0),3),Nh(t),_c(t,e),_c(t,~e),e&&t.pending_buf.set(t.window.subarray(n,n+e),t.pending),t.pending+=e},vv=t=>{Ua(t,xh<<1,3),Zo(t,Hd,yr),uv(t)},xv=(t,n,e,i)=>{let a,r,u=0;t.level>0?(t.strm.data_type===2&&(t.strm.data_type=Cv(t)),Nd(t,t.l_desc),Nd(t,t.d_desc),u=gv(t),a=t.opt_len+3+7>>>3,r=t.static_len+3+7>>>3,r<=a&&(a=r)):a=r=e+5,e+4<=a&&n!==-1?kh(t,n,e,i):t.strategy===4||r===a?(Ua(t,(xh<<1)+(i?1:0),3),B1(t,yr,mc)):(Ua(t,(lv<<1)+(i?1:0),3),_v(t,t.l_desc.max_code+1,t.d_desc.max_code+1,u+1),B1(t,t.dyn_ltree,t.dyn_dtree)),Lh(t),i&&Nh(t)},yv=(t,n,e)=>(t.pending_buf[t.sym_buf+t.sym_next++]=n,t.pending_buf[t.sym_buf+t.sym_next++]=n>>8,t.pending_buf[t.sym_buf+t.sym_next++]=e,n===0?t.dyn_ltree[e*2]++:(t.matches++,n--,t.dyn_ltree[(gc[e]+yc+1)*2]++,t.dyn_dtree[Oh(n)*2]++),t.sym_next===t.sym_end),Sv=bv,Dv=kh,wv=xv,Tv=yv,Pv=vv,Av={_tr_init:Sv,_tr_stored_block:Dv,_tr_flush_block:wv,_tr_tally:Tv,_tr_align:Pv},Mv=(t,n,e,i)=>{let a=t&65535|0,r=t>>>16&65535|0,u=0;for(;e!==0;){u=e>2e3?2e3:e,e-=u;do a=a+n[i++]|0,r=r+a|0;while(--u);a%=65521,r%=65521}return a|r<<16|0},Cc=Mv,Ov=()=>{let t,n=[];for(var e=0;e<256;e++){t=e;for(var i=0;i<8;i++)t=t&1?3988292384^t>>>1:t>>>1;n[e]=t}return n},Iv=new Uint32Array(Ov()),Ev=(t,n,e,i)=>{let a=Iv,r=i+e;t^=-1;for(let u=i;u>>8^a[(t^n[u])&255];return t^-1},da=Ev,Tl={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"},ps={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_MEM_ERROR:-4,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8},{_tr_init:Lv,_tr_stored_block:kd,_tr_flush_block:Nv,_tr_tally:Zr,_tr_align:kv}=Av,{Z_NO_FLUSH:Kr,Z_PARTIAL_FLUSH:Fv,Z_FULL_FLUSH:Rv,Z_FINISH:uo,Z_BLOCK:V1,Z_OK:va,Z_STREAM_END:U1,Z_STREAM_ERROR:Ko,Z_DATA_ERROR:Bv,Z_BUF_ERROR:Sd,Z_DEFAULT_COMPRESSION:qv,Z_FILTERED:jv,Z_HUFFMAN_ONLY:jp,Z_RLE:zv,Z_FIXED:Vv,Z_DEFAULT_STRATEGY:Uv,Z_UNKNOWN:Hv,Z_DEFLATED:Zp}=ps,Gv=9,Wv=15,$v=8,Yv=29,Zv=256,Fd=Zv+1+Yv,Kv=30,Jv=19,Xv=2*Fd+1,Qv=15,ti=3,Yr=258,Jo=Yr+ti+1,t5=32,ls=42,Wd=57,Rd=69,Bd=73,qd=91,jd=103,Dl=113,cc=666,Na=1,ms=2,Pl=3,ds=4,e5=3,wl=(t,n)=>(t.msg=Tl[n],n),H1=t=>t*2-(t>4?9:0),$r=t=>{let n=t.length;for(;--n>=0;)t[n]=0},n5=t=>{let n,e,i,a=t.w_size;n=t.hash_size,i=n;do e=t.head[--i],t.head[i]=e>=a?e-a:0;while(--n);n=a,i=n;do e=t.prev[--i],t.prev[i]=e>=a?e-a:0;while(--n)},i5=(t,n,e)=>(n<{let n=t.state,e=n.pending;e>t.avail_out&&(e=t.avail_out),e!==0&&(t.output.set(n.pending_buf.subarray(n.pending_out,n.pending_out+e),t.next_out),t.next_out+=e,n.pending_out+=e,t.total_out+=e,t.avail_out-=e,n.pending-=e,n.pending===0&&(n.pending_out=0))},eo=(t,n)=>{Nv(t,t.block_start>=0?t.block_start:-1,t.strstart-t.block_start,n),t.block_start=t.strstart,to(t.strm)},li=(t,n)=>{t.pending_buf[t.pending++]=n},sc=(t,n)=>{t.pending_buf[t.pending++]=n>>>8&255,t.pending_buf[t.pending++]=n&255},zd=(t,n,e,i)=>{let a=t.avail_in;return a>i&&(a=i),a===0?0:(t.avail_in-=a,n.set(t.input.subarray(t.next_in,t.next_in+a),e),t.state.wrap===1?t.adler=Cc(t.adler,n,a,e):t.state.wrap===2&&(t.adler=da(t.adler,n,a,e)),t.next_in+=a,t.total_in+=a,a)},Fh=(t,n)=>{let e=t.max_chain_length,i=t.strstart,a,r,u=t.prev_length,d=t.nice_match,g=t.strstart>t.w_size-Jo?t.strstart-(t.w_size-Jo):0,_=t.window,y=t.w_mask,I=t.prev,N=t.strstart+Yr,D=_[i+u-1],U=_[i+u];t.prev_length>=t.good_match&&(e>>=2),d>t.lookahead&&(d=t.lookahead);do if(a=n,!(_[a+u]!==U||_[a+u-1]!==D||_[a]!==_[i]||_[++a]!==_[i+1])){i+=2,a++;do;while(_[++i]===_[++a]&&_[++i]===_[++a]&&_[++i]===_[++a]&&_[++i]===_[++a]&&_[++i]===_[++a]&&_[++i]===_[++a]&&_[++i]===_[++a]&&_[++i]===_[++a]&&iu){if(t.match_start=n,u=r,r>=d)break;D=_[i+u-1],U=_[i+u]}}while((n=I[n&y])>g&&--e!==0);return u<=t.lookahead?u:t.lookahead},ss=t=>{let n=t.w_size,e,i,a;do{if(i=t.window_size-t.lookahead-t.strstart,t.strstart>=n+(n-Jo)&&(t.window.set(t.window.subarray(n,n+n-i),0),t.match_start-=n,t.strstart-=n,t.block_start-=n,t.insert>t.strstart&&(t.insert=t.strstart),n5(t),i+=n),t.strm.avail_in===0)break;if(e=zd(t.strm,t.window,t.strstart+t.lookahead,i),t.lookahead+=e,t.lookahead+t.insert>=ti)for(a=t.strstart-t.insert,t.ins_h=t.window[a],t.ins_h=Jr(t,t.ins_h,t.window[a+1]);t.insert&&(t.ins_h=Jr(t,t.ins_h,t.window[a+ti-1]),t.prev[a&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=a,a++,t.insert--,!(t.lookahead+t.insert{let e=t.pending_buf_size-5>t.w_size?t.w_size:t.pending_buf_size-5,i,a,r,u=0,d=t.strm.avail_in;do{if(i=65535,r=t.bi_valid+42>>3,t.strm.avail_outa+t.strm.avail_in&&(i=a+t.strm.avail_in),i>r&&(i=r),i>8,t.pending_buf[t.pending-2]=~i,t.pending_buf[t.pending-1]=~i>>8,to(t.strm),a&&(a>i&&(a=i),t.strm.output.set(t.window.subarray(t.block_start,t.block_start+a),t.strm.next_out),t.strm.next_out+=a,t.strm.avail_out-=a,t.strm.total_out+=a,t.block_start+=a,i-=a),i&&(zd(t.strm,t.strm.output,t.strm.next_out,i),t.strm.next_out+=i,t.strm.avail_out-=i,t.strm.total_out+=i)}while(u===0);return d-=t.strm.avail_in,d&&(d>=t.w_size?(t.matches=2,t.window.set(t.strm.input.subarray(t.strm.next_in-t.w_size,t.strm.next_in),0),t.strstart=t.w_size,t.insert=t.strstart):(t.window_size-t.strstart<=d&&(t.strstart-=t.w_size,t.window.set(t.window.subarray(t.w_size,t.w_size+t.strstart),0),t.matches<2&&t.matches++,t.insert>t.strstart&&(t.insert=t.strstart)),t.window.set(t.strm.input.subarray(t.strm.next_in-d,t.strm.next_in),t.strstart),t.strstart+=d,t.insert+=d>t.w_size-t.insert?t.w_size-t.insert:d),t.block_start=t.strstart),t.high_waterr&&t.block_start>=t.w_size&&(t.block_start-=t.w_size,t.strstart-=t.w_size,t.window.set(t.window.subarray(t.w_size,t.w_size+t.strstart),0),t.matches<2&&t.matches++,r+=t.w_size,t.insert>t.strstart&&(t.insert=t.strstart)),r>t.strm.avail_in&&(r=t.strm.avail_in),r&&(zd(t.strm,t.window,t.strstart,r),t.strstart+=r,t.insert+=r>t.w_size-t.insert?t.w_size-t.insert:r),t.high_water>3,r=t.pending_buf_size-r>65535?65535:t.pending_buf_size-r,e=r>t.w_size?t.w_size:r,a=t.strstart-t.block_start,(a>=e||(a||n===uo)&&n!==Kr&&t.strm.avail_in===0&&a<=r)&&(i=a>r?r:a,u=n===uo&&t.strm.avail_in===0&&i===a?1:0,kd(t,t.block_start,i,u),t.block_start+=i,to(t.strm)),u?Pl:Na)},Dd=(t,n)=>{let e,i;for(;;){if(t.lookahead=ti&&(t.ins_h=Jr(t,t.ins_h,t.window[t.strstart+ti-1]),e=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart),e!==0&&t.strstart-e<=t.w_size-Jo&&(t.match_length=Fh(t,e)),t.match_length>=ti)if(i=Zr(t,t.strstart-t.match_start,t.match_length-ti),t.lookahead-=t.match_length,t.match_length<=t.max_lazy_match&&t.lookahead>=ti){t.match_length--;do t.strstart++,t.ins_h=Jr(t,t.ins_h,t.window[t.strstart+ti-1]),e=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart;while(--t.match_length!==0);t.strstart++}else t.strstart+=t.match_length,t.match_length=0,t.ins_h=t.window[t.strstart],t.ins_h=Jr(t,t.ins_h,t.window[t.strstart+1]);else i=Zr(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++;if(i&&(eo(t,!1),t.strm.avail_out===0))return Na}return t.insert=t.strstart{let e,i,a;for(;;){if(t.lookahead=ti&&(t.ins_h=Jr(t,t.ins_h,t.window[t.strstart+ti-1]),e=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart),t.prev_length=t.match_length,t.prev_match=t.match_start,t.match_length=ti-1,e!==0&&t.prev_length4096)&&(t.match_length=ti-1)),t.prev_length>=ti&&t.match_length<=t.prev_length){a=t.strstart+t.lookahead-ti,i=Zr(t,t.strstart-1-t.prev_match,t.prev_length-ti),t.lookahead-=t.prev_length-1,t.prev_length-=2;do++t.strstart<=a&&(t.ins_h=Jr(t,t.ins_h,t.window[t.strstart+ti-1]),e=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart);while(--t.prev_length!==0);if(t.match_available=0,t.match_length=ti-1,t.strstart++,i&&(eo(t,!1),t.strm.avail_out===0))return Na}else if(t.match_available){if(i=Zr(t,0,t.window[t.strstart-1]),i&&eo(t,!1),t.strstart++,t.lookahead--,t.strm.avail_out===0)return Na}else t.match_available=1,t.strstart++,t.lookahead--}return t.match_available&&(i=Zr(t,0,t.window[t.strstart-1]),t.match_available=0),t.insert=t.strstart{let e,i,a,r,u=t.window;for(;;){if(t.lookahead<=Yr){if(ss(t),t.lookahead<=Yr&&n===Kr)return Na;if(t.lookahead===0)break}if(t.match_length=0,t.lookahead>=ti&&t.strstart>0&&(a=t.strstart-1,i=u[a],i===u[++a]&&i===u[++a]&&i===u[++a])){r=t.strstart+Yr;do;while(i===u[++a]&&i===u[++a]&&i===u[++a]&&i===u[++a]&&i===u[++a]&&i===u[++a]&&i===u[++a]&&i===u[++a]&&at.lookahead&&(t.match_length=t.lookahead)}if(t.match_length>=ti?(e=Zr(t,1,t.match_length-ti),t.lookahead-=t.match_length,t.strstart+=t.match_length,t.match_length=0):(e=Zr(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++),e&&(eo(t,!1),t.strm.avail_out===0))return Na}return t.insert=0,n===uo?(eo(t,!0),t.strm.avail_out===0?Pl:ds):t.sym_next&&(eo(t,!1),t.strm.avail_out===0)?Na:ms},o5=(t,n)=>{let e;for(;;){if(t.lookahead===0&&(ss(t),t.lookahead===0)){if(n===Kr)return Na;break}if(t.match_length=0,e=Zr(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++,e&&(eo(t,!1),t.strm.avail_out===0))return Na}return t.insert=0,n===uo?(eo(t,!0),t.strm.avail_out===0?Pl:ds):t.sym_next&&(eo(t,!1),t.strm.avail_out===0)?Na:ms};function Yo(t,n,e,i,a){this.good_length=t,this.max_lazy=n,this.nice_length=e,this.max_chain=i,this.func=a}var pc=[new Yo(0,0,0,0,Rh),new Yo(4,4,8,4,Dd),new Yo(4,5,16,8,Dd),new Yo(4,6,32,32,Dd),new Yo(4,4,16,16,as),new Yo(8,16,32,32,as),new Yo(8,16,128,128,as),new Yo(8,32,128,256,as),new Yo(32,128,258,1024,as),new Yo(32,258,258,4096,as)],r5=t=>{t.window_size=2*t.w_size,$r(t.head),t.max_lazy_match=pc[t.level].max_lazy,t.good_match=pc[t.level].good_length,t.nice_match=pc[t.level].nice_length,t.max_chain_length=pc[t.level].max_chain,t.strstart=0,t.block_start=0,t.lookahead=0,t.insert=0,t.match_length=t.prev_length=ti-1,t.match_available=0,t.ins_h=0};function l5(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=Zp,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new Uint16Array(Xv*2),this.dyn_dtree=new Uint16Array((2*Kv+1)*2),this.bl_tree=new Uint16Array((2*Jv+1)*2),$r(this.dyn_ltree),$r(this.dyn_dtree),$r(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new Uint16Array(Qv+1),this.heap=new Uint16Array(2*Fd+1),$r(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new Uint16Array(2*Fd+1),$r(this.depth),this.sym_buf=0,this.lit_bufsize=0,this.sym_next=0,this.sym_end=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}var Sc=t=>{if(!t)return 1;let n=t.state;return!n||n.strm!==t||n.status!==ls&&n.status!==Wd&&n.status!==Rd&&n.status!==Bd&&n.status!==qd&&n.status!==jd&&n.status!==Dl&&n.status!==cc?1:0},Bh=t=>{if(Sc(t))return wl(t,Ko);t.total_in=t.total_out=0,t.data_type=Hv;let n=t.state;return n.pending=0,n.pending_out=0,n.wrap<0&&(n.wrap=-n.wrap),n.status=n.wrap===2?Wd:n.wrap?ls:Dl,t.adler=n.wrap===2?0:1,n.last_flush=-2,Lv(n),va},qh=t=>{let n=Bh(t);return n===va&&r5(t.state),n},s5=(t,n)=>Sc(t)||t.state.wrap!==2?Ko:(t.state.gzhead=n,va),jh=(t,n,e,i,a,r)=>{if(!t)return Ko;let u=1;if(n===qv&&(n=6),i<0?(u=0,i=-i):i>15&&(u=2,i-=16),a<1||a>Gv||e!==Zp||i<8||i>15||n<0||n>9||r<0||r>Vv||i===8&&u!==1)return wl(t,Ko);i===8&&(i=9);let d=new l5;return t.state=d,d.strm=t,d.status=ls,d.wrap=u,d.gzhead=null,d.w_bits=i,d.w_size=1<jh(t,n,Zp,Wv,$v,Uv),p5=(t,n)=>{if(Sc(t)||n>V1||n<0)return t?wl(t,Ko):Ko;let e=t.state;if(!t.output||t.avail_in!==0&&!t.input||e.status===cc&&n!==uo)return wl(t,t.avail_out===0?Sd:Ko);let i=e.last_flush;if(e.last_flush=n,e.pending!==0){if(to(t),t.avail_out===0)return e.last_flush=-1,va}else if(t.avail_in===0&&H1(n)<=H1(i)&&n!==uo)return wl(t,Sd);if(e.status===cc&&t.avail_in!==0)return wl(t,Sd);if(e.status===ls&&e.wrap===0&&(e.status=Dl),e.status===ls){let a=Zp+(e.w_bits-8<<4)<<8,r=-1;if(e.strategy>=jp||e.level<2?r=0:e.level<6?r=1:e.level===6?r=2:r=3,a|=r<<6,e.strstart!==0&&(a|=t5),a+=31-a%31,sc(e,a),e.strstart!==0&&(sc(e,t.adler>>>16),sc(e,t.adler&65535)),t.adler=1,e.status=Dl,to(t),e.pending!==0)return e.last_flush=-1,va}if(e.status===Wd){if(t.adler=0,li(e,31),li(e,139),li(e,8),e.gzhead)li(e,(e.gzhead.text?1:0)+(e.gzhead.hcrc?2:0)+(e.gzhead.extra?4:0)+(e.gzhead.name?8:0)+(e.gzhead.comment?16:0)),li(e,e.gzhead.time&255),li(e,e.gzhead.time>>8&255),li(e,e.gzhead.time>>16&255),li(e,e.gzhead.time>>24&255),li(e,e.level===9?2:e.strategy>=jp||e.level<2?4:0),li(e,e.gzhead.os&255),e.gzhead.extra&&e.gzhead.extra.length&&(li(e,e.gzhead.extra.length&255),li(e,e.gzhead.extra.length>>8&255)),e.gzhead.hcrc&&(t.adler=da(t.adler,e.pending_buf,e.pending,0)),e.gzindex=0,e.status=Rd;else if(li(e,0),li(e,0),li(e,0),li(e,0),li(e,0),li(e,e.level===9?2:e.strategy>=jp||e.level<2?4:0),li(e,e5),e.status=Dl,to(t),e.pending!==0)return e.last_flush=-1,va}if(e.status===Rd){if(e.gzhead.extra){let a=e.pending,r=(e.gzhead.extra.length&65535)-e.gzindex;for(;e.pending+r>e.pending_buf_size;){let d=e.pending_buf_size-e.pending;if(e.pending_buf.set(e.gzhead.extra.subarray(e.gzindex,e.gzindex+d),e.pending),e.pending=e.pending_buf_size,e.gzhead.hcrc&&e.pending>a&&(t.adler=da(t.adler,e.pending_buf,e.pending-a,a)),e.gzindex+=d,to(t),e.pending!==0)return e.last_flush=-1,va;a=0,r-=d}let u=new Uint8Array(e.gzhead.extra);e.pending_buf.set(u.subarray(e.gzindex,e.gzindex+r),e.pending),e.pending+=r,e.gzhead.hcrc&&e.pending>a&&(t.adler=da(t.adler,e.pending_buf,e.pending-a,a)),e.gzindex=0}e.status=Bd}if(e.status===Bd){if(e.gzhead.name){let a=e.pending,r;do{if(e.pending===e.pending_buf_size){if(e.gzhead.hcrc&&e.pending>a&&(t.adler=da(t.adler,e.pending_buf,e.pending-a,a)),to(t),e.pending!==0)return e.last_flush=-1,va;a=0}e.gzindexa&&(t.adler=da(t.adler,e.pending_buf,e.pending-a,a)),e.gzindex=0}e.status=qd}if(e.status===qd){if(e.gzhead.comment){let a=e.pending,r;do{if(e.pending===e.pending_buf_size){if(e.gzhead.hcrc&&e.pending>a&&(t.adler=da(t.adler,e.pending_buf,e.pending-a,a)),to(t),e.pending!==0)return e.last_flush=-1,va;a=0}e.gzindexa&&(t.adler=da(t.adler,e.pending_buf,e.pending-a,a))}e.status=jd}if(e.status===jd){if(e.gzhead.hcrc){if(e.pending+2>e.pending_buf_size&&(to(t),e.pending!==0))return e.last_flush=-1,va;li(e,t.adler&255),li(e,t.adler>>8&255),t.adler=0}if(e.status=Dl,to(t),e.pending!==0)return e.last_flush=-1,va}if(t.avail_in!==0||e.lookahead!==0||n!==Kr&&e.status!==cc){let a=e.level===0?Rh(e,n):e.strategy===jp?o5(e,n):e.strategy===zv?a5(e,n):pc[e.level].func(e,n);if((a===Pl||a===ds)&&(e.status=cc),a===Na||a===Pl)return t.avail_out===0&&(e.last_flush=-1),va;if(a===ms&&(n===Fv?kv(e):n!==V1&&(kd(e,0,0,!1),n===Rv&&($r(e.head),e.lookahead===0&&(e.strstart=0,e.block_start=0,e.insert=0))),to(t),t.avail_out===0))return e.last_flush=-1,va}return n!==uo?va:e.wrap<=0?U1:(e.wrap===2?(li(e,t.adler&255),li(e,t.adler>>8&255),li(e,t.adler>>16&255),li(e,t.adler>>24&255),li(e,t.total_in&255),li(e,t.total_in>>8&255),li(e,t.total_in>>16&255),li(e,t.total_in>>24&255)):(sc(e,t.adler>>>16),sc(e,t.adler&65535)),to(t),e.wrap>0&&(e.wrap=-e.wrap),e.pending!==0?va:U1)},m5=t=>{if(Sc(t))return Ko;let n=t.state.status;return t.state=null,n===Dl?wl(t,Bv):va},d5=(t,n)=>{let e=n.length;if(Sc(t))return Ko;let i=t.state,a=i.wrap;if(a===2||a===1&&i.status!==ls||i.lookahead)return Ko;if(a===1&&(t.adler=Cc(t.adler,n,e,0)),i.wrap=0,e>=i.w_size){a===0&&($r(i.head),i.strstart=0,i.block_start=0,i.insert=0);let g=new Uint8Array(i.w_size);g.set(n.subarray(e-i.w_size,e),0),n=g,e=i.w_size}let r=t.avail_in,u=t.next_in,d=t.input;for(t.avail_in=e,t.next_in=0,t.input=n,ss(i);i.lookahead>=ti;){let g=i.strstart,_=i.lookahead-(ti-1);do i.ins_h=Jr(i,i.ins_h,i.window[g+ti-1]),i.prev[g&i.w_mask]=i.head[i.ins_h],i.head[i.ins_h]=g,g++;while(--_);i.strstart=g,i.lookahead=ti-1,ss(i)}return i.strstart+=i.lookahead,i.block_start=i.strstart,i.insert=i.lookahead,i.lookahead=0,i.match_length=i.prev_length=ti-1,i.match_available=0,t.next_in=u,t.input=d,t.avail_in=r,i.wrap=a,va},u5=c5,f5=jh,h5=qh,g5=Bh,_5=s5,C5=p5,b5=m5,v5=d5,x5="pako deflate (from Nodeca project)",dc={deflateInit:u5,deflateInit2:f5,deflateReset:h5,deflateResetKeep:g5,deflateSetHeader:_5,deflate:C5,deflateEnd:b5,deflateSetDictionary:v5,deflateInfo:x5},y5=(t,n)=>Object.prototype.hasOwnProperty.call(t,n),S5=function(t){let n=Array.prototype.slice.call(arguments,1);for(;n.length;){let e=n.shift();if(e){if(typeof e!="object")throw new TypeError(e+"must be non-object");for(let i in e)y5(e,i)&&(t[i]=e[i])}}return t},D5=t=>{let n=0;for(let i=0,a=t.length;i=252?6:t>=248?5:t>=240?4:t>=224?3:t>=192?2:1;bc[254]=bc[254]=1;var w5=t=>{if(typeof TextEncoder=="function"&&TextEncoder.prototype.encode)return new TextEncoder().encode(t);let n,e,i,a,r,u=t.length,d=0;for(a=0;a>>6,n[r++]=128|e&63):e<65536?(n[r++]=224|e>>>12,n[r++]=128|e>>>6&63,n[r++]=128|e&63):(n[r++]=240|e>>>18,n[r++]=128|e>>>12&63,n[r++]=128|e>>>6&63,n[r++]=128|e&63);return n},T5=(t,n)=>{if(n<65534&&t.subarray&&zh)return String.fromCharCode.apply(null,t.length===n?t:t.subarray(0,n));let e="";for(let i=0;i{let e=n||t.length;if(typeof TextDecoder=="function"&&TextDecoder.prototype.decode)return new TextDecoder().decode(t.subarray(0,n));let i,a,r=new Array(e*2);for(a=0,i=0;i4){r[a++]=65533,i+=d-1;continue}for(u&=d===2?31:d===3?15:7;d>1&&i1){r[a++]=65533;continue}u<65536?r[a++]=u:(u-=65536,r[a++]=55296|u>>10&1023,r[a++]=56320|u&1023)}return T5(r,a)},A5=(t,n)=>{n=n||t.length,n>t.length&&(n=t.length);let e=n-1;for(;e>=0&&(t[e]&192)===128;)e--;return e<0||e===0?n:e+bc[t[e]]>n?e:n},vc={string2buf:w5,buf2string:P5,utf8border:A5};function M5(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}var Vh=M5,Uh=Object.prototype.toString,{Z_NO_FLUSH:O5,Z_SYNC_FLUSH:I5,Z_FULL_FLUSH:E5,Z_FINISH:L5,Z_OK:$p,Z_STREAM_END:N5,Z_DEFAULT_COMPRESSION:k5,Z_DEFAULT_STRATEGY:F5,Z_DEFLATED:R5}=ps;function Dc(t){this.options=Kp.assign({level:k5,method:R5,chunkSize:16384,windowBits:15,memLevel:8,strategy:F5},t||{});let n=this.options;n.raw&&n.windowBits>0?n.windowBits=-n.windowBits:n.gzip&&n.windowBits>0&&n.windowBits<16&&(n.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new Vh,this.strm.avail_out=0;let e=dc.deflateInit2(this.strm,n.level,n.method,n.windowBits,n.memLevel,n.strategy);if(e!==$p)throw new Error(Tl[e]);if(n.header&&dc.deflateSetHeader(this.strm,n.header),n.dictionary){let i;if(typeof n.dictionary=="string"?i=vc.string2buf(n.dictionary):Uh.call(n.dictionary)==="[object ArrayBuffer]"?i=new Uint8Array(n.dictionary):i=n.dictionary,e=dc.deflateSetDictionary(this.strm,i),e!==$p)throw new Error(Tl[e]);this._dict_set=!0}}Dc.prototype.push=function(t,n){let e=this.strm,i=this.options.chunkSize,a,r;if(this.ended)return!1;for(n===~~n?r=n:r=n===!0?L5:O5,typeof t=="string"?e.input=vc.string2buf(t):Uh.call(t)==="[object ArrayBuffer]"?e.input=new Uint8Array(t):e.input=t,e.next_in=0,e.avail_in=e.input.length;;){if(e.avail_out===0&&(e.output=new Uint8Array(i),e.next_out=0,e.avail_out=i),(r===I5||r===E5)&&e.avail_out<=6){this.onData(e.output.subarray(0,e.next_out)),e.avail_out=0;continue}if(a=dc.deflate(e,r),a===N5)return e.next_out>0&&this.onData(e.output.subarray(0,e.next_out)),a=dc.deflateEnd(this.strm),this.onEnd(a),this.ended=!0,a===$p;if(e.avail_out===0){this.onData(e.output);continue}if(r>0&&e.next_out>0){this.onData(e.output.subarray(0,e.next_out)),e.avail_out=0;continue}if(e.avail_in===0)break}return!0};Dc.prototype.onData=function(t){this.chunks.push(t)};Dc.prototype.onEnd=function(t){t===$p&&(this.result=Kp.flattenChunks(this.chunks)),this.chunks=[],this.err=t,this.msg=this.strm.msg};function $d(t,n){let e=new Dc(n);if(e.push(t,!0),e.err)throw e.msg||Tl[e.err];return e.result}function B5(t,n){return n=n||{},n.raw=!0,$d(t,n)}function q5(t,n){return n=n||{},n.gzip=!0,$d(t,n)}var j5=Dc,z5=$d,V5=B5,U5=q5,H5=ps,G5={Deflate:j5,deflate:z5,deflateRaw:V5,gzip:U5,constants:H5},zp=16209,W5=16191,$5=function(n,e){let i,a,r,u,d,g,_,y,I,N,D,U,H,K,z,ct,pt,nt,Ot,Yt,jt,ht,tt,vt,j=n.state;i=n.next_in,tt=n.input,a=i+(n.avail_in-5),r=n.next_out,vt=n.output,u=r-(e-n.avail_out),d=r+(n.avail_out-257),g=j.dmax,_=j.wsize,y=j.whave,I=j.wnext,N=j.window,D=j.hold,U=j.bits,H=j.lencode,K=j.distcode,z=(1<>>24,D>>>=nt,U-=nt,nt=pt>>>16&255,nt===0)vt[r++]=pt&65535;else if(nt&16){Ot=pt&65535,nt&=15,nt&&(U>>=nt,U-=nt),U<15&&(D+=tt[i++]<>>24,D>>>=nt,U-=nt,nt=pt>>>16&255,nt&16){if(Yt=pt&65535,nt&=15,Ug){n.msg="invalid distance too far back",j.mode=zp;break t}if(D>>>=nt,U-=nt,nt=r-u,Yt>nt){if(nt=Yt-nt,nt>y&&j.sane){n.msg="invalid distance too far back",j.mode=zp;break t}if(jt=0,ht=N,I===0){if(jt+=_-nt,nt2;)vt[r++]=ht[jt++],vt[r++]=ht[jt++],vt[r++]=ht[jt++],Ot-=3;Ot&&(vt[r++]=ht[jt++],Ot>1&&(vt[r++]=ht[jt++]))}else{jt=r-Yt;do vt[r++]=vt[jt++],vt[r++]=vt[jt++],vt[r++]=vt[jt++],Ot-=3;while(Ot>2);Ot&&(vt[r++]=vt[jt++],Ot>1&&(vt[r++]=vt[jt++]))}}else if((nt&64)===0){pt=K[(pt&65535)+(D&(1<>3,i-=Ot,U-=Ot<<3,D&=(1<{let g=d.bits,_=0,y=0,I=0,N=0,D=0,U=0,H=0,K=0,z=0,ct=0,pt,nt,Ot,Yt,jt,ht=null,tt,vt=new Uint16Array(os+1),j=new Uint16Array(os+1),Y=null,rt,ot,At;for(_=0;_<=os;_++)vt[_]=0;for(y=0;y=1&&vt[N]===0;N--);if(D>N&&(D=N),N===0)return a[r++]=1<<24|64<<16|0,a[r++]=1<<24|64<<16|0,d.bits=1,0;for(I=1;I0&&(t===$1||N!==1))return-1;for(j[1]=0,_=1;_G1||t===Y1&&z>W1)return 1;for(;;){rt=_-H,u[y]+1=tt?(ot=Y[u[y]-tt],At=ht[u[y]-tt]):(ot=96,At=0),pt=1<<_-H,nt=1<>H)+nt]=rt<<24|ot<<16|At|0;while(nt!==0);for(pt=1<<_-1;ct&pt;)pt>>=1;if(pt!==0?(ct&=pt-1,ct+=pt):ct=0,y++,--vt[_]===0){if(_===N)break;_=n[e+u[y]]}if(_>D&&(ct&Yt)!==Ot){for(H===0&&(H=D),jt+=I,U=_-H,K=1<G1||t===Y1&&z>W1)return 1;Ot=ct&Yt,a[Ot]=D<<24|U<<16|jt-r|0}}return ct!==0&&(a[jt+ct]=_-H<<24|64<<16|0),d.bits=D,0},uc=X5,Q5=0,Hh=1,Gh=2,{Z_FINISH:Z1,Z_BLOCK:tx,Z_TREES:Vp,Z_OK:Al,Z_STREAM_END:ex,Z_NEED_DICT:nx,Z_STREAM_ERROR:fo,Z_DATA_ERROR:Wh,Z_MEM_ERROR:$h,Z_BUF_ERROR:ix,Z_DEFLATED:K1}=ps,Jp=16180,J1=16181,X1=16182,Q1=16183,th=16184,eh=16185,nh=16186,ih=16187,ah=16188,oh=16189,Yp=16190,xr=16191,Td=16192,rh=16193,Pd=16194,lh=16195,sh=16196,ch=16197,ph=16198,Up=16199,Hp=16200,mh=16201,dh=16202,uh=16203,fh=16204,hh=16205,Ad=16206,gh=16207,_h=16208,Ii=16209,Yh=16210,Zh=16211,ax=852,ox=592,rx=15,lx=rx,Ch=t=>(t>>>24&255)+(t>>>8&65280)+((t&65280)<<8)+((t&255)<<24);function sx(){this.strm=null,this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new Uint16Array(320),this.work=new Uint16Array(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}var Ml=t=>{if(!t)return 1;let n=t.state;return!n||n.strm!==t||n.modeZh?1:0},Kh=t=>{if(Ml(t))return fo;let n=t.state;return t.total_in=t.total_out=n.total=0,t.msg="",n.wrap&&(t.adler=n.wrap&1),n.mode=Jp,n.last=0,n.havedict=0,n.flags=-1,n.dmax=32768,n.head=null,n.hold=0,n.bits=0,n.lencode=n.lendyn=new Int32Array(ax),n.distcode=n.distdyn=new Int32Array(ox),n.sane=1,n.back=-1,Al},Jh=t=>{if(Ml(t))return fo;let n=t.state;return n.wsize=0,n.whave=0,n.wnext=0,Kh(t)},Xh=(t,n)=>{let e;if(Ml(t))return fo;let i=t.state;return n<0?(e=0,n=-n):(e=(n>>4)+5,n<48&&(n&=15)),n&&(n<8||n>15)?fo:(i.window!==null&&i.wbits!==n&&(i.window=null),i.wrap=e,i.wbits=n,Jh(t))},Qh=(t,n)=>{if(!t)return fo;let e=new sx;t.state=e,e.strm=t,e.window=null,e.mode=Jp;let i=Xh(t,n);return i!==Al&&(t.state=null),i},cx=t=>Qh(t,lx),bh=!0,Md,Od,px=t=>{if(bh){Md=new Int32Array(512),Od=new Int32Array(32);let n=0;for(;n<144;)t.lens[n++]=8;for(;n<256;)t.lens[n++]=9;for(;n<280;)t.lens[n++]=7;for(;n<288;)t.lens[n++]=8;for(uc(Hh,t.lens,0,288,Md,0,t.work,{bits:9}),n=0;n<32;)t.lens[n++]=5;uc(Gh,t.lens,0,32,Od,0,t.work,{bits:5}),bh=!1}t.lencode=Md,t.lenbits=9,t.distcode=Od,t.distbits=5},t2=(t,n,e,i)=>{let a,r=t.state;return r.window===null&&(r.wsize=1<=r.wsize?(r.window.set(n.subarray(e-r.wsize,e),0),r.wnext=0,r.whave=r.wsize):(a=r.wsize-r.wnext,a>i&&(a=i),r.window.set(n.subarray(e-i,e-i+a),r.wnext),i-=a,i?(r.window.set(n.subarray(e-i,e),0),r.wnext=i,r.whave=r.wsize):(r.wnext+=a,r.wnext===r.wsize&&(r.wnext=0),r.whave{let e,i,a,r,u,d,g,_,y,I,N,D,U,H,K=0,z,ct,pt,nt,Ot,Yt,jt,ht,tt=new Uint8Array(4),vt,j,Y=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]);if(Ml(t)||!t.output||!t.input&&t.avail_in!==0)return fo;e=t.state,e.mode===xr&&(e.mode=Td),u=t.next_out,a=t.output,g=t.avail_out,r=t.next_in,i=t.input,d=t.avail_in,_=e.hold,y=e.bits,I=d,N=g,ht=Al;t:for(;;)switch(e.mode){case Jp:if(e.wrap===0){e.mode=Td;break}for(;y<16;){if(d===0)break t;d--,_+=i[r++]<>>8&255,e.check=da(e.check,tt,2,0),_=0,y=0,e.mode=J1;break}if(e.head&&(e.head.done=!1),!(e.wrap&1)||(((_&255)<<8)+(_>>8))%31){t.msg="incorrect header check",e.mode=Ii;break}if((_&15)!==K1){t.msg="unknown compression method",e.mode=Ii;break}if(_>>>=4,y-=4,jt=(_&15)+8,e.wbits===0&&(e.wbits=jt),jt>15||jt>e.wbits){t.msg="invalid window size",e.mode=Ii;break}e.dmax=1<>8&1),e.flags&512&&e.wrap&4&&(tt[0]=_&255,tt[1]=_>>>8&255,e.check=da(e.check,tt,2,0)),_=0,y=0,e.mode=X1;case X1:for(;y<32;){if(d===0)break t;d--,_+=i[r++]<>>8&255,tt[2]=_>>>16&255,tt[3]=_>>>24&255,e.check=da(e.check,tt,4,0)),_=0,y=0,e.mode=Q1;case Q1:for(;y<16;){if(d===0)break t;d--,_+=i[r++]<>8),e.flags&512&&e.wrap&4&&(tt[0]=_&255,tt[1]=_>>>8&255,e.check=da(e.check,tt,2,0)),_=0,y=0,e.mode=th;case th:if(e.flags&1024){for(;y<16;){if(d===0)break t;d--,_+=i[r++]<>>8&255,e.check=da(e.check,tt,2,0)),_=0,y=0}else e.head&&(e.head.extra=null);e.mode=eh;case eh:if(e.flags&1024&&(D=e.length,D>d&&(D=d),D&&(e.head&&(jt=e.head.extra_len-e.length,e.head.extra||(e.head.extra=new Uint8Array(e.head.extra_len)),e.head.extra.set(i.subarray(r,r+D),jt)),e.flags&512&&e.wrap&4&&(e.check=da(e.check,i,D,r)),d-=D,r+=D,e.length-=D),e.length))break t;e.length=0,e.mode=nh;case nh:if(e.flags&2048){if(d===0)break t;D=0;do jt=i[r+D++],e.head&&jt&&e.length<65536&&(e.head.name+=String.fromCharCode(jt));while(jt&&D>9&1,e.head.done=!0),t.adler=e.check=0,e.mode=xr;break;case oh:for(;y<32;){if(d===0)break t;d--,_+=i[r++]<>>=y&7,y-=y&7,e.mode=Ad;break}for(;y<3;){if(d===0)break t;d--,_+=i[r++]<>>=1,y-=1,_&3){case 0:e.mode=rh;break;case 1:if(px(e),e.mode=Up,n===Vp){_>>>=2,y-=2;break t}break;case 2:e.mode=sh;break;case 3:t.msg="invalid block type",e.mode=Ii}_>>>=2,y-=2;break;case rh:for(_>>>=y&7,y-=y&7;y<32;){if(d===0)break t;d--,_+=i[r++]<>>16^65535)){t.msg="invalid stored block lengths",e.mode=Ii;break}if(e.length=_&65535,_=0,y=0,e.mode=Pd,n===Vp)break t;case Pd:e.mode=lh;case lh:if(D=e.length,D){if(D>d&&(D=d),D>g&&(D=g),D===0)break t;a.set(i.subarray(r,r+D),u),d-=D,r+=D,g-=D,u+=D,e.length-=D;break}e.mode=xr;break;case sh:for(;y<14;){if(d===0)break t;d--,_+=i[r++]<>>=5,y-=5,e.ndist=(_&31)+1,_>>>=5,y-=5,e.ncode=(_&15)+4,_>>>=4,y-=4,e.nlen>286||e.ndist>30){t.msg="too many length or distance symbols",e.mode=Ii;break}e.have=0,e.mode=ch;case ch:for(;e.have>>=3,y-=3}for(;e.have<19;)e.lens[Y[e.have++]]=0;if(e.lencode=e.lendyn,e.lenbits=7,vt={bits:e.lenbits},ht=uc(Q5,e.lens,0,19,e.lencode,0,e.work,vt),e.lenbits=vt.bits,ht){t.msg="invalid code lengths set",e.mode=Ii;break}e.have=0,e.mode=ph;case ph:for(;e.have>>24,ct=K>>>16&255,pt=K&65535,!(z<=y);){if(d===0)break t;d--,_+=i[r++]<>>=z,y-=z,e.lens[e.have++]=pt;else{if(pt===16){for(j=z+2;y>>=z,y-=z,e.have===0){t.msg="invalid bit length repeat",e.mode=Ii;break}jt=e.lens[e.have-1],D=3+(_&3),_>>>=2,y-=2}else if(pt===17){for(j=z+3;y>>=z,y-=z,jt=0,D=3+(_&7),_>>>=3,y-=3}else{for(j=z+7;y>>=z,y-=z,jt=0,D=11+(_&127),_>>>=7,y-=7}if(e.have+D>e.nlen+e.ndist){t.msg="invalid bit length repeat",e.mode=Ii;break}for(;D--;)e.lens[e.have++]=jt}}if(e.mode===Ii)break;if(e.lens[256]===0){t.msg="invalid code -- missing end-of-block",e.mode=Ii;break}if(e.lenbits=9,vt={bits:e.lenbits},ht=uc(Hh,e.lens,0,e.nlen,e.lencode,0,e.work,vt),e.lenbits=vt.bits,ht){t.msg="invalid literal/lengths set",e.mode=Ii;break}if(e.distbits=6,e.distcode=e.distdyn,vt={bits:e.distbits},ht=uc(Gh,e.lens,e.nlen,e.ndist,e.distcode,0,e.work,vt),e.distbits=vt.bits,ht){t.msg="invalid distances set",e.mode=Ii;break}if(e.mode=Up,n===Vp)break t;case Up:e.mode=Hp;case Hp:if(d>=6&&g>=258){t.next_out=u,t.avail_out=g,t.next_in=r,t.avail_in=d,e.hold=_,e.bits=y,$5(t,N),u=t.next_out,a=t.output,g=t.avail_out,r=t.next_in,i=t.input,d=t.avail_in,_=e.hold,y=e.bits,e.mode===xr&&(e.back=-1);break}for(e.back=0;K=e.lencode[_&(1<>>24,ct=K>>>16&255,pt=K&65535,!(z<=y);){if(d===0)break t;d--,_+=i[r++]<>nt)],z=K>>>24,ct=K>>>16&255,pt=K&65535,!(nt+z<=y);){if(d===0)break t;d--,_+=i[r++]<>>=nt,y-=nt,e.back+=nt}if(_>>>=z,y-=z,e.back+=z,e.length=pt,ct===0){e.mode=hh;break}if(ct&32){e.back=-1,e.mode=xr;break}if(ct&64){t.msg="invalid literal/length code",e.mode=Ii;break}e.extra=ct&15,e.mode=mh;case mh:if(e.extra){for(j=e.extra;y>>=e.extra,y-=e.extra,e.back+=e.extra}e.was=e.length,e.mode=dh;case dh:for(;K=e.distcode[_&(1<>>24,ct=K>>>16&255,pt=K&65535,!(z<=y);){if(d===0)break t;d--,_+=i[r++]<>nt)],z=K>>>24,ct=K>>>16&255,pt=K&65535,!(nt+z<=y);){if(d===0)break t;d--,_+=i[r++]<>>=nt,y-=nt,e.back+=nt}if(_>>>=z,y-=z,e.back+=z,ct&64){t.msg="invalid distance code",e.mode=Ii;break}e.offset=pt,e.extra=ct&15,e.mode=uh;case uh:if(e.extra){for(j=e.extra;y>>=e.extra,y-=e.extra,e.back+=e.extra}if(e.offset>e.dmax){t.msg="invalid distance too far back",e.mode=Ii;break}e.mode=fh;case fh:if(g===0)break t;if(D=N-g,e.offset>D){if(D=e.offset-D,D>e.whave&&e.sane){t.msg="invalid distance too far back",e.mode=Ii;break}D>e.wnext?(D-=e.wnext,U=e.wsize-D):U=e.wnext-D,D>e.length&&(D=e.length),H=e.window}else H=a,U=u-e.offset,D=e.length;D>g&&(D=g),g-=D,e.length-=D;do a[u++]=H[U++];while(--D);e.length===0&&(e.mode=Hp);break;case hh:if(g===0)break t;a[u++]=e.length,g--,e.mode=Hp;break;case Ad:if(e.wrap){for(;y<32;){if(d===0)break t;d--,_|=i[r++]<{if(Ml(t))return fo;let n=t.state;return n.window&&(n.window=null),t.state=null,Al},ux=(t,n)=>{if(Ml(t))return fo;let e=t.state;return(e.wrap&2)===0?fo:(e.head=n,n.done=!1,Al)},fx=(t,n)=>{let e=n.length,i,a,r;return Ml(t)||(i=t.state,i.wrap!==0&&i.mode!==Yp)?fo:i.mode===Yp&&(a=1,a=Cc(a,n,e,0),a!==i.check)?Wh:(r=t2(t,n,e,e),r?(i.mode=Yh,$h):(i.havedict=1,Al))},hx=Jh,gx=Xh,_x=Kh,Cx=cx,bx=Qh,vx=mx,xx=dx,yx=ux,Sx=fx,Dx="pako inflate (from Nodeca project)",Sr={inflateReset:hx,inflateReset2:gx,inflateResetKeep:_x,inflateInit:Cx,inflateInit2:bx,inflate:vx,inflateEnd:xx,inflateGetHeader:yx,inflateSetDictionary:Sx,inflateInfo:Dx};function wx(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name="",this.comment="",this.hcrc=0,this.done=!1}var Tx=wx,e2=Object.prototype.toString,{Z_NO_FLUSH:Px,Z_FINISH:Ax,Z_OK:xc,Z_STREAM_END:Id,Z_NEED_DICT:Ed,Z_STREAM_ERROR:Mx,Z_DATA_ERROR:vh,Z_MEM_ERROR:Ox}=ps;function wc(t){this.options=Kp.assign({chunkSize:1024*64,windowBits:15,to:""},t||{});let n=this.options;n.raw&&n.windowBits>=0&&n.windowBits<16&&(n.windowBits=-n.windowBits,n.windowBits===0&&(n.windowBits=-15)),n.windowBits>=0&&n.windowBits<16&&!(t&&t.windowBits)&&(n.windowBits+=32),n.windowBits>15&&n.windowBits<48&&(n.windowBits&15)===0&&(n.windowBits|=15),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new Vh,this.strm.avail_out=0;let e=Sr.inflateInit2(this.strm,n.windowBits);if(e!==xc)throw new Error(Tl[e]);if(this.header=new Tx,Sr.inflateGetHeader(this.strm,this.header),n.dictionary&&(typeof n.dictionary=="string"?n.dictionary=vc.string2buf(n.dictionary):e2.call(n.dictionary)==="[object ArrayBuffer]"&&(n.dictionary=new Uint8Array(n.dictionary)),n.raw&&(e=Sr.inflateSetDictionary(this.strm,n.dictionary),e!==xc)))throw new Error(Tl[e])}wc.prototype.push=function(t,n){let e=this.strm,i=this.options.chunkSize,a=this.options.dictionary,r,u,d;if(this.ended)return!1;for(n===~~n?u=n:u=n===!0?Ax:Px,e2.call(t)==="[object ArrayBuffer]"?e.input=new Uint8Array(t):e.input=t,e.next_in=0,e.avail_in=e.input.length;;){for(e.avail_out===0&&(e.output=new Uint8Array(i),e.next_out=0,e.avail_out=i),r=Sr.inflate(e,u),r===Ed&&a&&(r=Sr.inflateSetDictionary(e,a),r===xc?r=Sr.inflate(e,u):r===vh&&(r=Ed));e.avail_in>0&&r===Id&&e.state.wrap>0&&t[e.next_in]!==0;)Sr.inflateReset(e),r=Sr.inflate(e,u);switch(r){case Mx:case vh:case Ed:case Ox:return this.onEnd(r),this.ended=!0,!1}if(d=e.avail_out,e.next_out&&(e.avail_out===0||r===Id))if(this.options.to==="string"){let g=vc.utf8border(e.output,e.next_out),_=e.next_out-g,y=vc.buf2string(e.output,g);e.next_out=_,e.avail_out=i-_,_&&e.output.set(e.output.subarray(g,g+_),0),this.onData(y)}else this.onData(e.output.length===e.next_out?e.output:e.output.subarray(0,e.next_out));if(!(r===xc&&d===0)){if(r===Id)return r=Sr.inflateEnd(this.strm),this.onEnd(r),this.ended=!0,!0;if(e.avail_in===0)break}}return!0};wc.prototype.onData=function(t){this.chunks.push(t)};wc.prototype.onEnd=function(t){t===xc&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=Kp.flattenChunks(this.chunks)),this.chunks=[],this.err=t,this.msg=this.strm.msg};function Yd(t,n){let e=new wc(n);if(e.push(t),e.err)throw e.msg||Tl[e.err];return e.result}function Ix(t,n){return n=n||{},n.raw=!0,Yd(t,n)}var Ex=wc,Lx=Yd,Nx=Ix,kx=Yd,Fx=ps,Rx={Inflate:Ex,inflate:Lx,inflateRaw:Nx,ungzip:kx,constants:Fx},{Deflate:vR,deflate:xR,deflateRaw:yR,gzip:SR}=G5,{Inflate:Bx,inflate:qx,inflateRaw:DR,ungzip:wR}=Rx;var Zd=Bx,n2=qx;var a2=[];for(let t=0;t<256;t++){let n=t;for(let e=0;e<8;e++)n&1?n=3988292384^n>>>1:n=n>>>1;a2[t]=n}var i2=4294967295;function jx(t,n,e){let i=t;for(let a=0;a>>8;return i}function zx(t,n){return(jx(i2,t,n)^i2)>>>0}function Kd(t,n,e){let i=t.readUint32(),a=zx(new Uint8Array(t.buffer,t.byteOffset+t.offset-n-4,n),n);if(a!==i)throw new Error(`CRC mismatch for chunk ${e}. Expected ${i}, found ${a}`)}function Xp(t,n,e){for(let i=0;i>1)&255}else{for(;r>1)&255;for(;r>1)&255}}function nm(t,n,e,i,a){let r=0;if(e.length===0){for(;r=e||Yt>=i))for(let jt=0;jt>8&255}var $x=new Uint16Array([255]),Yx=new Uint8Array($x.buffer),Zx=Yx[0]===255,Kx=new Uint8Array(0);function Jd(t){let{data:n,width:e,height:i,channels:a,depth:r}=t,u=Math.ceil(r/8)*a,d=Math.ceil(r/8*a*e),g=new Uint8Array(i*d),_=Kx,y=0,I,N;for(let D=0;D>8&255}var im=Uint8Array.of(137,80,78,71,13,10,26,10);function Xd(t){if(!l2(t.readBytes(im.length)))throw new Error("wrong PNG signature")}function l2(t){if(t.length79)throw new Error("keyword length must be between 1 and 79")}var e3=/^[\u0000-\u00FF]*$/;function n3(t){if(!e3.test(t))throw new Error("invalid latin1 text")}function p2(t,n,e){let i=Qd(n);t[i]=i3(n,e-i.length-1)}function Qd(t){for(t.mark();t.readByte()!==Qx;);let n=t.offset;t.reset();let e=c2.decode(t.readBytes(n-t.offset-1));return t.skip(1),t3(e),e}function i3(t,n){return c2.decode(t.readBytes(n))}var ka={UNKNOWN:-1,GREYSCALE:0,TRUECOLOUR:2,INDEXED_COLOUR:3,GREYSCALE_ALPHA:4,TRUECOLOUR_ALPHA:6},Tc={UNKNOWN:-1,DEFLATE:0},am={UNKNOWN:-1,ADAPTIVE:0},Pc={UNKNOWN:-1,NO_INTERLACE:0,ADAM7:1},Ac={NONE:0,BACKGROUND:1,PREVIOUS:2},om={SOURCE:0,OVER:1};var rm=class extends lc{_checkCrc;_inflator;_png;_apng;_end;_hasPalette;_palette;_hasTransparency;_transparency;_compressionMethod;_filterMethod;_interlaceMethod;_colorType;_isAnimated;_numberOfFrames;_numberOfPlays;_frames;_writingDataChunks;constructor(n,e={}){super(n);let{checkCrc:i=!1}=e;this._checkCrc=i,this._inflator=new Zd,this._png={width:-1,height:-1,channels:-1,data:new Uint8Array(0),depth:1,text:{}},this._apng={width:-1,height:-1,channels:-1,depth:1,numberOfFrames:1,numberOfPlays:0,text:{},frames:[]},this._end=!1,this._hasPalette=!1,this._palette=[],this._hasTransparency=!1,this._transparency=new Uint16Array(0),this._compressionMethod=Tc.UNKNOWN,this._filterMethod=am.UNKNOWN,this._interlaceMethod=Pc.UNKNOWN,this._colorType=ka.UNKNOWN,this._isAnimated=!1,this._numberOfFrames=1,this._numberOfPlays=0,this._frames=[],this._writingDataChunks=!1,this.setBigEndian()}decode(){for(Xd(this);!this._end;){let n=this.readUint32(),e=this.readChars(4);this.decodeChunk(n,e)}return this.decodeImage(),this._png}decodeApng(){for(Xd(this);!this._end;){let n=this.readUint32(),e=this.readChars(4);this.decodeApngChunk(n,e)}return this.decodeApngImage(),this._apng}decodeChunk(n,e){let i=this.offset;switch(e){case"IHDR":this.decodeIHDR();break;case"PLTE":this.decodePLTE(n);break;case"IDAT":this.decodeIDAT(n);break;case"IEND":this._end=!0;break;case"tRNS":this.decodetRNS(n);break;case"iCCP":this.decodeiCCP(n);break;case s2:p2(this._png.text,this,n);break;case"pHYs":this.decodepHYs();break;default:this.skip(n);break}if(this.offset-i!==n)throw new Error(`Length mismatch while decoding chunk ${e}`);this._checkCrc?Kd(this,n+4,e):this.skip(4)}decodeApngChunk(n,e){let i=this.offset;switch(e!=="fdAT"&&e!=="IDAT"&&this._writingDataChunks&&this.pushDataToFrame(),e){case"acTL":this.decodeACTL();break;case"fcTL":this.decodeFCTL();break;case"fdAT":this.decodeFDAT(n);break;default:this.decodeChunk(n,e),this.offset=i+n;break}if(this.offset-i!==n)throw new Error(`Length mismatch while decoding chunk ${e}`);this._checkCrc?Kd(this,n+4,e):this.skip(4)}decodeIHDR(){let n=this._png;n.width=this.readUint32(),n.height=this.readUint32(),n.depth=a3(this.readUint8());let e=this.readUint8();this._colorType=e;let i;switch(e){case ka.GREYSCALE:i=1;break;case ka.TRUECOLOUR:i=3;break;case ka.INDEXED_COLOUR:i=1;break;case ka.GREYSCALE_ALPHA:i=2;break;case ka.TRUECOLOUR_ALPHA:i=4;break;case ka.UNKNOWN:default:throw new Error(`Unknown color type: ${e}`)}if(this._png.channels=i,this._compressionMethod=this.readUint8(),this._compressionMethod!==Tc.DEFLATE)throw new Error(`Unsupported compression method: ${this._compressionMethod}`);this._filterMethod=this.readUint8(),this._interlaceMethod=this.readUint8()}decodeACTL(){this._numberOfFrames=this.readUint32(),this._numberOfPlays=this.readUint32(),this._isAnimated=!0}decodeFCTL(){let n={sequenceNumber:this.readUint32(),width:this.readUint32(),height:this.readUint32(),xOffset:this.readUint32(),yOffset:this.readUint32(),delayNumber:this.readUint16(),delayDenominator:this.readUint16(),disposeOp:this.readUint8(),blendOp:this.readUint8(),data:new Uint8Array(0)};this._frames.push(n)}decodePLTE(n){if(n%3!==0)throw new RangeError(`PLTE field length must be a multiple of 3. Got ${n}`);let e=n/3;this._hasPalette=!0;let i=[];this._palette=i;for(let a=0;athis._png.width*this._png.height)throw new Error(`tRNS chunk contains more alpha values than there are pixels (${n/2} vs ${this._png.width*this._png.height})`);this._hasTransparency=!0,this._transparency=new Uint16Array(n/2);for(let e=0;ethis._palette.length)throw new Error(`tRNS chunk contains more alpha values than there are palette colors (${n} vs ${this._palette.length})`);let e=0;for(;e{let d=((r+e.yOffset)*this._png.width+e.xOffset+u)*this._png.channels,g=(r*e.width+u)*this._png.channels;return{index:d,frameIndex:g}};switch(e.blendOp){case om.SOURCE:for(let r=0;r=200&&n.status<=299}function lm(t){try{t.dispatchEvent(new MouseEvent("click"))}catch{var n=document.createEvent("MouseEvents");n.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),t.dispatchEvent(n)}}var Ol=_n.saveAs||((typeof window>"u"?"undefined":fi(window))!=="object"||window!==_n?function(){}:typeof HTMLAnchorElement<"u"&&"download"in HTMLAnchorElement.prototype?function(t,n,e){var i=_n.URL||_n.webkitURL,a=document.createElement("a");n=n||t.name||"download",a.download=n,a.rel="noopener",typeof t=="string"?(a.href=t,a.origin!==location.origin?d2(a.href)?eu(t,n,e):lm(a,a.target="_blank"):lm(a)):(a.href=i.createObjectURL(t),setTimeout(function(){i.revokeObjectURL(a.href)},4e4),setTimeout(function(){lm(a)},0))}:"msSaveOrOpenBlob"in navigator?function(t,n,e){if(n=n||t.name||"download",typeof t=="string")if(d2(t))eu(t,n,e);else{var i=document.createElement("a");i.href=t,i.target="_blank",setTimeout(function(){lm(i)})}else navigator.msSaveOrOpenBlob((function(a,r){return r===void 0?r={autoBom:!1}:fi(r)!=="object"&&(vi.warn("Deprecated: Expected third argument to be a object"),r={autoBom:!r}),r.autoBom&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(a.type)?new Blob(["\uFEFF",a],{type:a.type}):a})(t,e),n)}:function(t,n,e,i){if((i=i||open("","_blank"))&&(i.document.title=i.document.body.innerText="downloading..."),typeof t=="string")return eu(t,n,e);var a=t.type==="application/octet-stream",r=/constructor/i.test(_n.HTMLElement)||_n.safari,u=/CriOS\/[\d]+/.test(navigator.userAgent);if((u||a&&r)&&(typeof FileReader>"u"?"undefined":fi(FileReader))==="object"){var d=new FileReader;d.onloadend=function(){var y=d.result;y=u?y:y.replace(/^data:[^;]*;/,"data:attachment/file;"),i?i.location.href=y:location=y,i=null},d.readAsDataURL(t)}else{var g=_n.URL||_n.webkitURL,_=g.createObjectURL(t);i?i.location=_:location.href=_,i=null,setTimeout(function(){g.revokeObjectURL(_)},4e4)}});function F2(t){var n;t=t||"",this.ok=!1,t.charAt(0)=="#"&&(t=t.substr(1,6)),t={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"00ffff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000000",blanchedalmond:"ffebcd",blue:"0000ff",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"00ffff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dodgerblue:"1e90ff",feldspar:"d19275",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"ff00ff",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgrey:"d3d3d3",lightgreen:"90ee90",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslateblue:"8470ff",lightslategray:"778899",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"00ff00",limegreen:"32cd32",linen:"faf0e6",magenta:"ff00ff",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370d8",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"d87093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",red:"ff0000",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",violetred:"d02090",wheat:"f5deb3",white:"ffffff",whitesmoke:"f5f5f5",yellow:"ffff00",yellowgreen:"9acd32"}[t=(t=t.replace(/ /g,"")).toLowerCase()]||t;for(var e=[{re:/^rgb\((\d{1,3}),\s*(\d{1,3}),\s*(\d{1,3})\)$/,example:["rgb(123, 234, 45)","rgb(255,234,245)"],process:function(d){return[parseInt(d[1]),parseInt(d[2]),parseInt(d[3])]}},{re:/^(\w{2})(\w{2})(\w{2})$/,example:["#00ff00","336699"],process:function(d){return[parseInt(d[1],16),parseInt(d[2],16),parseInt(d[3],16)]}},{re:/^(\w{1})(\w{1})(\w{1})$/,example:["#fb0","f0f"],process:function(d){return[parseInt(d[1]+d[1],16),parseInt(d[2]+d[2],16),parseInt(d[3]+d[3],16)]}}],i=0;i255?255:this.r,this.g=this.g<0||isNaN(this.g)?0:this.g>255?255:this.g,this.b=this.b<0||isNaN(this.b)?0:this.b>255?255:this.b,this.toRGB=function(){return"rgb("+this.r+", "+this.g+", "+this.b+")"},this.toHex=function(){var d=this.r.toString(16),g=this.g.toString(16),_=this.b.toString(16);return d.length==1&&(d="0"+d),g.length==1&&(g="0"+g),_.length==1&&(_="0"+_),"#"+d+g+_}}var mm=_n.atob.bind(_n),u2=_n.btoa.bind(_n);function nu(t,n){var e=t[0],i=t[1],a=t[2],r=t[3];e=wa(e,i,a,r,n[0],7,-680876936),r=wa(r,e,i,a,n[1],12,-389564586),a=wa(a,r,e,i,n[2],17,606105819),i=wa(i,a,r,e,n[3],22,-1044525330),e=wa(e,i,a,r,n[4],7,-176418897),r=wa(r,e,i,a,n[5],12,1200080426),a=wa(a,r,e,i,n[6],17,-1473231341),i=wa(i,a,r,e,n[7],22,-45705983),e=wa(e,i,a,r,n[8],7,1770035416),r=wa(r,e,i,a,n[9],12,-1958414417),a=wa(a,r,e,i,n[10],17,-42063),i=wa(i,a,r,e,n[11],22,-1990404162),e=wa(e,i,a,r,n[12],7,1804603682),r=wa(r,e,i,a,n[13],12,-40341101),a=wa(a,r,e,i,n[14],17,-1502002290),e=Ta(e,i=wa(i,a,r,e,n[15],22,1236535329),a,r,n[1],5,-165796510),r=Ta(r,e,i,a,n[6],9,-1069501632),a=Ta(a,r,e,i,n[11],14,643717713),i=Ta(i,a,r,e,n[0],20,-373897302),e=Ta(e,i,a,r,n[5],5,-701558691),r=Ta(r,e,i,a,n[10],9,38016083),a=Ta(a,r,e,i,n[15],14,-660478335),i=Ta(i,a,r,e,n[4],20,-405537848),e=Ta(e,i,a,r,n[9],5,568446438),r=Ta(r,e,i,a,n[14],9,-1019803690),a=Ta(a,r,e,i,n[3],14,-187363961),i=Ta(i,a,r,e,n[8],20,1163531501),e=Ta(e,i,a,r,n[13],5,-1444681467),r=Ta(r,e,i,a,n[2],9,-51403784),a=Ta(a,r,e,i,n[7],14,1735328473),e=Pa(e,i=Ta(i,a,r,e,n[12],20,-1926607734),a,r,n[5],4,-378558),r=Pa(r,e,i,a,n[8],11,-2022574463),a=Pa(a,r,e,i,n[11],16,1839030562),i=Pa(i,a,r,e,n[14],23,-35309556),e=Pa(e,i,a,r,n[1],4,-1530992060),r=Pa(r,e,i,a,n[4],11,1272893353),a=Pa(a,r,e,i,n[7],16,-155497632),i=Pa(i,a,r,e,n[10],23,-1094730640),e=Pa(e,i,a,r,n[13],4,681279174),r=Pa(r,e,i,a,n[0],11,-358537222),a=Pa(a,r,e,i,n[3],16,-722521979),i=Pa(i,a,r,e,n[6],23,76029189),e=Pa(e,i,a,r,n[9],4,-640364487),r=Pa(r,e,i,a,n[12],11,-421815835),a=Pa(a,r,e,i,n[15],16,530742520),e=Aa(e,i=Pa(i,a,r,e,n[2],23,-995338651),a,r,n[0],6,-198630844),r=Aa(r,e,i,a,n[7],10,1126891415),a=Aa(a,r,e,i,n[14],15,-1416354905),i=Aa(i,a,r,e,n[5],21,-57434055),e=Aa(e,i,a,r,n[12],6,1700485571),r=Aa(r,e,i,a,n[3],10,-1894986606),a=Aa(a,r,e,i,n[10],15,-1051523),i=Aa(i,a,r,e,n[1],21,-2054922799),e=Aa(e,i,a,r,n[8],6,1873313359),r=Aa(r,e,i,a,n[15],10,-30611744),a=Aa(a,r,e,i,n[6],15,-1560198380),i=Aa(i,a,r,e,n[13],21,1309151649),e=Aa(e,i,a,r,n[4],6,-145523070),r=Aa(r,e,i,a,n[11],10,-1120210379),a=Aa(a,r,e,i,n[2],15,718787259),i=Aa(i,a,r,e,n[9],21,-343485551),t[0]=Qr(e,t[0]),t[1]=Qr(i,t[1]),t[2]=Qr(a,t[2]),t[3]=Qr(r,t[3])}function Cm(t,n,e,i,a,r){return n=Qr(Qr(n,t),Qr(i,r)),Qr(n<>>32-a,e)}function wa(t,n,e,i,a,r,u){return Cm(n&e|~n&i,t,n,a,r,u)}function Ta(t,n,e,i,a,r,u){return Cm(n&i|e&~i,t,n,a,r,u)}function Pa(t,n,e,i,a,r,u){return Cm(n^e^i,t,n,a,r,u)}function Aa(t,n,e,i,a,r,u){return Cm(e^(n|~i),t,n,a,r,u)}function R2(t){var n,e=t.length,i=[1732584193,-271733879,-1732584194,271733878];for(n=64;n<=t.length;n+=64)nu(i,o3(t.substring(n-64,n)));t=t.substring(n-64);var a=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];for(n=0;n>2]|=t.charCodeAt(n)<<(n%4<<3);if(a[n>>2]|=128<<(n%4<<3),n>55)for(nu(i,a),n=0;n<16;n++)a[n]=0;return a[14]=8*e,nu(i,a),i}function o3(t){var n,e=[];for(n=0;n<64;n+=4)e[n>>2]=t.charCodeAt(n)+(t.charCodeAt(n+1)<<8)+(t.charCodeAt(n+2)<<16)+(t.charCodeAt(n+3)<<24);return e}var f2="0123456789abcdef".split("");function r3(t){for(var n="",e=0;e<4;e++)n+=f2[t>>8*e+4&15]+f2[t>>8*e&15];return n}function l3(t){return String.fromCharCode(255&t,(65280&t)>>8,(16711680&t)>>16,(4278190080&t)>>24)}function su(t){return R2(t).map(l3).join("")}var s3=(function(t){for(var n=0;n>16)+(n>>16)+(e>>16)<<16|65535&e}return t+n&4294967295}function cu(t,n){var e,i,a,r;if(t!==e){for(var u=(a=t,r=1+(256/t.length|0),new Array(r+1).join(a)),d=[],g=0;g<256;g++)d[g]=g;var _=0;for(g=0;g<256;g++){var y=d[g];_=(_+y+u.charCodeAt(g))%256,d[g]=d[_],d[_]=y}e=t,i=d}else d=i;var I=n.length,N=0,D=0,U="";for(g=0;g\x80/\f\xA9\xFEdSiz";var r=(n+this.padding).substr(0,32),u=(e+this.padding).substr(0,32);this.O=this.processOwnerPassword(r,u),this.P=-(1+(255^a)),this.encryptionKey=su(r+this.O+this.lsbFirstWord(this.P)+this.hexToBytes(i)).substr(0,5),this.U=cu(this.encryptionKey,this.padding)}function gs(t){if(/[^\u0000-\u00ff]/.test(t))throw new Error("Invalid PDF Name Object: "+t+", Only accept ASCII characters.");for(var n="",e=t.length,i=0;i126?"#"+("0"+a.toString(16)).slice(-2):t[i]}return n}function g2(t){if(fi(t)!=="object")throw new Error("Invalid Context passed to initialize PubSub (jsPDF-module)");var n={};this.subscribe=function(e,i,a){if(a=a||!1,typeof e!="string"||typeof i!="function"||typeof a!="boolean")throw new Error("Invalid arguments passed to PubSub.subscribe (jsPDF-module)");n.hasOwnProperty(e)||(n[e]={});var r=Math.random().toString(35);return n[e][r]=[i,!!a],r},this.unsubscribe=function(e){for(var i in n)if(n[i][e])return delete n[i][e],Object.keys(n[i]).length===0&&delete n[i],!0;return!1},this.publish=function(e){if(n.hasOwnProperty(e)){var i=Array.prototype.slice.call(arguments,1),a=[];for(var r in n[e]){var u=n[e][r];try{u[0].apply(t,i)}catch(d){_n.console&&vi.error("jsPDF PubSub Error",d.message,d)}u[1]&&a.push(r)}a.length&&a.forEach(this.unsubscribe)}},this.getTopics=function(){return n}}function gm(t){if(!(this instanceof gm))return new gm(t);var n="opacity,stroke-opacity".split(",");for(var e in t)t.hasOwnProperty(e)&&n.indexOf(e)>=0&&(this[e]=t[e]);this.id="",this.objectNumber=-1}function B2(t,n){this.gState=t,this.matrix=n,this.id="",this.objectNumber=-1}function Il(t,n,e,i,a){if(!(this instanceof Il))return new Il(t,n,e,i,a);this.type=t==="axial"?2:3,this.coords=n,this.colors=e,B2.call(this,i,a)}function _s(t,n,e,i,a){if(!(this instanceof _s))return new _s(t,n,e,i,a);this.boundingBox=t,this.xStep=n,this.yStep=e,this.stream="",this.cloneIndex=0,B2.call(this,i,a)}function Ze(t){var n,e=typeof arguments[0]=="string"?arguments[0]:"p",i=arguments[1],a=arguments[2],r=arguments[3],u=[],d=1,g=16,_="S",y=null;fi(t=t||{})==="object"&&(e=t.orientation,i=t.unit||i,a=t.format||a,r=t.compress||t.compressPdf||r,(y=t.encryption||null)!==null&&(y.userPassword=y.userPassword||"",y.ownerPassword=y.ownerPassword||"",y.userPermissions=y.userPermissions||[]),d=typeof t.userUnit=="number"?Math.abs(t.userUnit):1,t.precision!==void 0&&(n=t.precision),t.floatPrecision!==void 0&&(g=t.floatPrecision),_=t.defaultPathOperation||"S"),u=t.filters||(r===!0?["FlateEncode"]:u),i=i||"mm",e=(""+(e||"P")).toLowerCase();var I=t.putOnlyUsedFonts||!1,N={},D={internal:{},__private__:{}};D.__private__.PubSub=g2;var U="1.3",H=D.__private__.getPdfVersion=function(){return U};D.__private__.setPdfVersion=function(C){U=C};var K={a0:[2383.94,3370.39],a1:[1683.78,2383.94],a2:[1190.55,1683.78],a3:[841.89,1190.55],a4:[595.28,841.89],a5:[419.53,595.28],a6:[297.64,419.53],a7:[209.76,297.64],a8:[147.4,209.76],a9:[104.88,147.4],a10:[73.7,104.88],b0:[2834.65,4008.19],b1:[2004.09,2834.65],b2:[1417.32,2004.09],b3:[1000.63,1417.32],b4:[708.66,1000.63],b5:[498.9,708.66],b6:[354.33,498.9],b7:[249.45,354.33],b8:[175.75,249.45],b9:[124.72,175.75],b10:[87.87,124.72],c0:[2599.37,3676.54],c1:[1836.85,2599.37],c2:[1298.27,1836.85],c3:[918.43,1298.27],c4:[649.13,918.43],c5:[459.21,649.13],c6:[323.15,459.21],c7:[229.61,323.15],c8:[161.57,229.61],c9:[113.39,161.57],c10:[79.37,113.39],dl:[311.81,623.62],letter:[612,792],"government-letter":[576,756],legal:[612,1008],"junior-legal":[576,360],ledger:[1224,792],tabloid:[792,1224],"credit-card":[153,243]};D.__private__.getPageFormats=function(){return K};var z=D.__private__.getPageFormat=function(C){return K[C]};a=a||"a4";var ct="compat",pt="advanced",nt=ct;function Ot(){this.saveGraphicsState(),G(new dn(Rn,0,0,-Rn,0,dl()*Rn).toString()+" cm"),this.setFontSize(this.getFontSize()/Rn),_="n",nt=pt}function Yt(){this.restoreGraphicsState(),_="S",nt=ct}var jt=D.__private__.combineFontStyleAndFontWeight=function(C,E){if(C=="bold"&&E=="normal"||C=="bold"&&E==400||C=="normal"&&E=="italic"||C=="bold"&&E=="italic")throw new Error("Invalid Combination of fontweight and fontstyle");return E&&(C=E==400||E==="normal"?C==="italic"?"italic":"normal":E!=700&&E!=="bold"||C!=="normal"?(E==700?"bold":E)+""+C:"bold"),C};D.advancedAPI=function(C){var E=nt===ct;return E&&Ot.call(this),typeof C!="function"||(C(this),E&&Yt.call(this)),this},D.compatAPI=function(C){var E=nt===pt;return E&&Yt.call(this),typeof C!="function"||(C(this),E&&Ot.call(this)),this},D.isAdvancedAPI=function(){return nt===pt};var ht,tt=function(C){if(nt!==pt)throw new Error(C+" is only available in 'advanced' API mode. You need to call advancedAPI() first.")},vt=D.roundToPrecision=D.__private__.roundToPrecision=function(C,E){var Z=n||E;if(isNaN(C)||isNaN(Z))throw new Error("Invalid argument passed to jsPDF.roundToPrecision");return C.toFixed(Z).replace(/0+$/,"")};ht=D.hpf=D.__private__.hpf=typeof g=="number"?function(C){if(isNaN(C))throw new Error("Invalid argument passed to jsPDF.hpf");return vt(C,g)}:g==="smart"?function(C){if(isNaN(C))throw new Error("Invalid argument passed to jsPDF.hpf");return vt(C,C>-1&&C<1?16:5)}:function(C){if(isNaN(C))throw new Error("Invalid argument passed to jsPDF.hpf");return vt(C,16)};var j=D.f2=D.__private__.f2=function(C){if(isNaN(C))throw new Error("Invalid argument passed to jsPDF.f2");return vt(C,2)},Y=D.__private__.f3=function(C){if(isNaN(C))throw new Error("Invalid argument passed to jsPDF.f3");return vt(C,3)},rt=D.scale=D.__private__.scale=function(C){if(isNaN(C))throw new Error("Invalid argument passed to jsPDF.scale");return nt===ct?C*Rn:nt===pt?C:void 0},ot=function(C){return rt((function(E){return nt===ct?dl()-E:nt===pt?E:void 0})(C))};D.__private__.setPrecision=D.setPrecision=function(C){typeof parseInt(C,10)=="number"&&(n=parseInt(C,10))};var At,kt="00000000000000000000000000000000",Rt=D.__private__.getFileId=function(){return kt},St=D.__private__.setFileId=function(C){return kt=C!==void 0&&/^[a-fA-F0-9]{32}$/.test(C)?C.toUpperCase():kt.split("").map(function(){return"ABCDEF0123456789".charAt(Math.floor(16*Math.random()))}).join(""),y!==null&&(Qi=new hs(y.userPermissions,y.userPassword,y.ownerPassword,kt)),kt};D.setFileId=function(C){return St(C),this},D.getFileId=function(){return Rt()};var qt=D.__private__.convertDateToPDFDate=function(C){var E=C.getTimezoneOffset(),Z=E<0?"+":"-",at=Math.floor(Math.abs(E/60)),gt=Math.abs(E%60),zt=[Z,et(at),"'",et(gt),"'"].join("");return["D:",C.getFullYear(),et(C.getMonth()+1),et(C.getDate()),et(C.getHours()),et(C.getMinutes()),et(C.getSeconds()),zt].join("")},se=D.__private__.convertPDFDateToDate=function(C){var E=parseInt(C.substr(2,4),10),Z=parseInt(C.substr(6,2),10)-1,at=parseInt(C.substr(8,2),10),gt=parseInt(C.substr(10,2),10),zt=parseInt(C.substr(12,2),10),Zt=parseInt(C.substr(14,2),10);return new Date(E,Z,at,gt,zt,Zt,0)},Jt=D.__private__.setCreationDate=function(C){var E;if(C===void 0&&(C=new Date),C instanceof Date)E=qt(C);else{if(!/^D:(20[0-2][0-9]|203[0-7]|19[7-9][0-9])(0[0-9]|1[0-2])([0-2][0-9]|3[0-1])(0[0-9]|1[0-9]|2[0-3])(0[0-9]|[1-5][0-9])(0[0-9]|[1-5][0-9])(\+0[0-9]|\+1[0-4]|-0[0-9]|-1[0-1])'(0[0-9]|[1-5][0-9])'?$/.test(C))throw new Error("Invalid argument passed to jsPDF.setCreationDate");E=C}return At=E},B=D.__private__.getCreationDate=function(C){var E=At;return C==="jsDate"&&(E=se(At)),E};D.setCreationDate=function(C){return Jt(C),this},D.getCreationDate=function(C){return B(C)};var J,et=D.__private__.padd2=function(C){return("0"+parseInt(C)).slice(-2)},lt=D.__private__.padd2Hex=function(C){return("00"+(C=C.toString())).substr(C.length)},ft=0,Ct=[],It=[],Nt=0,Ht=[],re=[],Me=!1,De=It;D.__private__.setCustomOutputDestination=function(C){Me=!0,De=C};var an=function(C){Me||(De=C)};D.__private__.resetCustomOutputDestination=function(){Me=!1,De=It};var G=D.__private__.out=function(C){return C=C.toString(),Nt+=C.length+1,De.push(C),De},be=D.__private__.write=function(C){return G(arguments.length===1?C.toString():Array.prototype.join.call(arguments," "))},zn=D.__private__.getArrayBuffer=function(C){for(var E=C.length,Z=new ArrayBuffer(E),at=new Uint8Array(Z);E--;)at[E]=C.charCodeAt(E);return Z},cn=[["Helvetica","helvetica","normal","WinAnsiEncoding"],["Helvetica-Bold","helvetica","bold","WinAnsiEncoding"],["Helvetica-Oblique","helvetica","italic","WinAnsiEncoding"],["Helvetica-BoldOblique","helvetica","bolditalic","WinAnsiEncoding"],["Courier","courier","normal","WinAnsiEncoding"],["Courier-Bold","courier","bold","WinAnsiEncoding"],["Courier-Oblique","courier","italic","WinAnsiEncoding"],["Courier-BoldOblique","courier","bolditalic","WinAnsiEncoding"],["Times-Roman","times","normal","WinAnsiEncoding"],["Times-Bold","times","bold","WinAnsiEncoding"],["Times-Italic","times","italic","WinAnsiEncoding"],["Times-BoldItalic","times","bolditalic","WinAnsiEncoding"],["ZapfDingbats","zapfdingbats","normal",null],["Symbol","symbol","normal",null]];D.__private__.getStandardFonts=function(){return cn};var Qt=t.fontSize||16;D.__private__.setFontSize=D.setFontSize=function(C){return Qt=nt===pt?C/Rn:C,this};var pn,Fe=D.__private__.getFontSize=D.getFontSize=function(){return nt===ct?Qt:Qt*Rn},ln=t.R2L||!1;D.__private__.setR2L=D.setR2L=function(C){return ln=C,this},D.__private__.getR2L=D.getR2L=function(){return ln};var on,si=D.__private__.setZoomMode=function(C){if(/^(?:\d+\.\d*|\d*\.\d+|\d+)%$/.test(C))pn=C;else if(isNaN(C)){if([void 0,null,"fullwidth","fullheight","fullpage","original"].indexOf(C)===-1)throw new Error('zoom must be Integer (e.g. 2), a percentage Value (e.g. 300%) or fullwidth, fullheight, fullpage, original. "'+C+'" is not recognized.');pn=C}else pn=parseInt(C,10)};D.__private__.getZoomMode=function(){return pn};var Yn,Nn=D.__private__.setPageMode=function(C){if([void 0,null,"UseNone","UseOutlines","UseThumbs","FullScreen"].indexOf(C)==-1)throw new Error('Page mode must be one of UseNone, UseOutlines, UseThumbs, or FullScreen. "'+C+'" is not recognized.');on=C};D.__private__.getPageMode=function(){return on};var Jn=D.__private__.setLayoutMode=function(C){if([void 0,null,"continuous","single","twoleft","tworight","two"].indexOf(C)==-1)throw new Error('Layout mode must be one of continuous, single, twoleft, tworight. "'+C+'" is not recognized.');Yn=C};D.__private__.getLayoutMode=function(){return Yn},D.__private__.setDisplayMode=D.setDisplayMode=function(C,E,Z){return si(C),Jn(E),Nn(Z),this};var Zn={title:"",subject:"",author:"",keywords:"",creator:""};D.__private__.getDocumentProperty=function(C){if(Object.keys(Zn).indexOf(C)===-1)throw new Error("Invalid argument passed to jsPDF.getDocumentProperty");return Zn[C]},D.__private__.getDocumentProperties=function(){return Zn},D.__private__.setDocumentProperties=D.setProperties=D.setDocumentProperties=function(C){for(var E in Zn)Zn.hasOwnProperty(E)&&C[E]&&(Zn[E]=C[E]);return this},D.__private__.setDocumentProperty=function(C,E){if(Object.keys(Zn).indexOf(C)===-1)throw new Error("Invalid arguments passed to jsPDF.setDocumentProperty");return Zn[C]=E};var We,Rn,Xe,qi,ii,Vn={},Un={},Pi=[],rn={},yi={},fn={},kn={},Ai=null,Hn=0,mn=[],ci=new g2(D),al=t.hotfixes||[],xa={},er={},Lo=[],dn=function C(E,Z,at,gt,zt,Zt){if(!(this instanceof C))return new C(E,Z,at,gt,zt,Zt);isNaN(E)&&(E=1),isNaN(Z)&&(Z=0),isNaN(at)&&(at=0),isNaN(gt)&&(gt=1),isNaN(zt)&&(zt=0),isNaN(Zt)&&(Zt=0),this._matrix=[E,Z,at,gt,zt,Zt]};Object.defineProperty(dn.prototype,"sx",{get:function(){return this._matrix[0]},set:function(C){this._matrix[0]=C}}),Object.defineProperty(dn.prototype,"shy",{get:function(){return this._matrix[1]},set:function(C){this._matrix[1]=C}}),Object.defineProperty(dn.prototype,"shx",{get:function(){return this._matrix[2]},set:function(C){this._matrix[2]=C}}),Object.defineProperty(dn.prototype,"sy",{get:function(){return this._matrix[3]},set:function(C){this._matrix[3]=C}}),Object.defineProperty(dn.prototype,"tx",{get:function(){return this._matrix[4]},set:function(C){this._matrix[4]=C}}),Object.defineProperty(dn.prototype,"ty",{get:function(){return this._matrix[5]},set:function(C){this._matrix[5]=C}}),Object.defineProperty(dn.prototype,"a",{get:function(){return this._matrix[0]},set:function(C){this._matrix[0]=C}}),Object.defineProperty(dn.prototype,"b",{get:function(){return this._matrix[1]},set:function(C){this._matrix[1]=C}}),Object.defineProperty(dn.prototype,"c",{get:function(){return this._matrix[2]},set:function(C){this._matrix[2]=C}}),Object.defineProperty(dn.prototype,"d",{get:function(){return this._matrix[3]},set:function(C){this._matrix[3]=C}}),Object.defineProperty(dn.prototype,"e",{get:function(){return this._matrix[4]},set:function(C){this._matrix[4]=C}}),Object.defineProperty(dn.prototype,"f",{get:function(){return this._matrix[5]},set:function(C){this._matrix[5]=C}}),Object.defineProperty(dn.prototype,"rotation",{get:function(){return Math.atan2(this.shx,this.sx)}}),Object.defineProperty(dn.prototype,"scaleX",{get:function(){return this.decompose().scale.sx}}),Object.defineProperty(dn.prototype,"scaleY",{get:function(){return this.decompose().scale.sy}}),Object.defineProperty(dn.prototype,"isIdentity",{get:function(){return this.sx===1&&this.shy===0&&this.shx===0&&this.sy===1&&this.tx===0&&this.ty===0}}),dn.prototype.join=function(C){return[this.sx,this.shy,this.shx,this.sy,this.tx,this.ty].map(ht).join(C)},dn.prototype.multiply=function(C){var E=C.sx*this.sx+C.shy*this.shx,Z=C.sx*this.shy+C.shy*this.sy,at=C.shx*this.sx+C.sy*this.shx,gt=C.shx*this.shy+C.sy*this.sy,zt=C.tx*this.sx+C.ty*this.shx+this.tx,Zt=C.tx*this.shy+C.ty*this.sy+this.ty;return new dn(E,Z,at,gt,zt,Zt)},dn.prototype.decompose=function(){var C=this.sx,E=this.shy,Z=this.shx,at=this.sy,gt=this.tx,zt=this.ty,Zt=Math.sqrt(C*C+E*E),qe=(C/=Zt)*Z+(E/=Zt)*at;Z-=C*qe,at-=E*qe;var $e=Math.sqrt(Z*Z+at*at);return qe/=$e,C*(at/=$e)>16&255,at=$e>>8&255,gt=255&$e}if(at===void 0||zt===void 0&&Z===at&&at===gt)E=typeof Z=="string"?Z+" "+Zt[0]:C.precision===2?j(Z/255)+" "+Zt[0]:Y(Z/255)+" "+Zt[0];else if(zt===void 0||fi(zt)==="object"){if(zt&&!isNaN(zt.a)&&zt.a===0)return["1.","1.","1.",Zt[1]].join(" ");E=typeof Z=="string"?[Z,at,gt,Zt[1]].join(" "):C.precision===2?[j(Z/255),j(at/255),j(gt/255),Zt[1]].join(" "):[Y(Z/255),Y(at/255),Y(gt/255),Zt[1]].join(" ")}else E=typeof Z=="string"?[Z,at,gt,zt,Zt[2]].join(" "):C.precision===2?[j(Z),j(at),j(gt),j(zt),Zt[2]].join(" "):[Y(Z),Y(at),Y(gt),Y(zt),Zt[2]].join(" ");return E},Co=D.__private__.getFilters=function(){return u},ao=D.__private__.putStream=function(C){var E=(C=C||{}).data||"",Z=C.filters||Co(),at=C.alreadyAppliedFilters||[],gt=C.addLength1||!1,zt=E.length,Zt=C.objectId,qe=function(ta){return ta};if(y!==null&&Zt===void 0)throw new Error("ObjectId must be passed to putStream for file encryption");y!==null&&(qe=Qi.encryptor(Zt,0));var $e={};Z===!0&&(Z=["FlateEncode"]);var Cn=C.additionalKeyValues||[],Bn=($e=Ze.API.processDataByFilters!==void 0?Ze.API.processDataByFilters(E,Z):{data:E,reverseChain:[]}).reverseChain+(Array.isArray(at)?at.join(" "):at.toString());if($e.data.length!==0&&(Cn.push({key:"Length",value:$e.data.length}),gt===!0&&Cn.push({key:"Length1",value:zt})),Bn.length!=0)if(Bn.split("/").length-1==1)Cn.push({key:"Filter",value:Bn});else{Cn.push({key:"Filter",value:"["+Bn+"]"});for(var ai=0;ai>"),$e.data.length!==0&&(G("stream"),G(qe($e.data)),G("endstream"))},rl=D.__private__.putPage=function(C){var E=C.number,Z=C.data,at=C.objId,gt=C.contentsObjId;fa(at,!0),G("<>"),G("endobj");var zt=Z.join(` `);return nt===pt&&(zt+=` @@ -77,4 +77,4 @@ end end`};n.events.push(["putFont",function(r){(function(u){var d=u.font,g=u.out,_=u.newObject,y=u.putStream;if(d.metadata instanceof t.API.TTFFont&&d.encoding==="Identity-H"){for(var I=d.metadata.Unicode.widths,N=d.metadata.subset.encode(d.metadata.glyIdsUsed,1),D="",U=0;U>"),g("endobj");var ct=_();g("<<"),g("/Type /Font"),g("/BaseFont /"+gs(d.fontName)),g("/FontDescriptor "+z+" 0 R"),g("/W "+t.API.PDFObject.convert(I)),g("/CIDToGIDMap /Identity"),g("/DW 1000"),g("/Subtype /CIDFontType2"),g("/CIDSystemInfo"),g("<<"),g("/Supplement 0"),g("/Registry (Adobe)"),g("/Ordering ("+d.encoding+")"),g(">>"),g(">>"),g("endobj"),d.objectNumber=_(),g("<<"),g("/Type /Font"),g("/Subtype /Type0"),g("/ToUnicode "+K+" 0 R"),g("/BaseFont /"+gs(d.fontName)),g("/Encoding /"+d.encoding),g("/DescendantFonts ["+ct+" 0 R]"),g(">>"),g("endobj"),d.isAlreadyPutted=!0}})(r)}]),n.events.push(["putFont",function(r){(function(u){var d=u.font,g=u.out,_=u.newObject,y=u.putStream;if(d.metadata instanceof t.API.TTFFont&&d.encoding==="WinAnsiEncoding"){for(var I=d.metadata.rawData,N="",D=0;D>"),g("endobj"),d.objectNumber=_();for(var z=0;z>"),g("endobj"),d.isAlreadyPutted=!0}})(r)}]);var a=function(r){var u,d=r.text||"",g=r.x,_=r.y,y=r.options||{},I=r.mutex||{},N=I.pdfEscape,D=I.activeFontKey,U=I.fonts,H=D,K="",z=0,ct="",pt=U[H].encoding;if(U[H].encoding!=="Identity-H")return{text:d,x:g,y:_,options:y,mutex:I};for(ct=d,H=D,Array.isArray(d)&&(ct=d[0]),z=0;z","<","[","]","[","{","}","{","\xAB","\xBB","\xAB","\u2039","\u203A","\u2039","\u2045","\u2046","\u2045","\u207D","\u207E","\u207D","\u208D","\u208E","\u208D","\u2264","\u2265","\u2264","\u2329","\u232A","\u2329","\uFE59","\uFE5A","\uFE59","\uFE5B","\uFE5C","\uFE5B","\uFE5D","\uFE5E","\uFE5D","\uFE64","\uFE65","\uFE64"],z=new RegExp(/^([1-4|9]|1[0-9]|2[0-9]|3[0168]|4[04589]|5[012]|7[78]|159|16[0-9]|17[0-2]|21[569]|22[03489]|250)$/),ct=!1,pt=0;this.__bidiEngine__={};var nt=function(j){var Y=j.charCodeAt(),rt=Y>>8,ot=H[rt];return ot!==void 0?I[256*ot+(255&Y)]:rt===252||rt===253?"AL":z.test(rt)?"L":rt===8?"R":"N"},Ot=function(j){for(var Y,rt=0;rt=Y.length||(At=rt[ot-1])!=="EN"&&At!=="AN"||(kt=Y[ot+1])!=="EN"&&kt!=="AN"?qt="N":ct&&(kt="AN"),qt=kt===At?kt:"N";break;case"ES":qt=(At=ot>0?rt[ot-1]:"B")==="EN"&&ot+10&&rt[ot-1]==="EN"){qt="EN";break}if(ct){qt="N";break}for(Rt=ot+1,St=Y.length;Rt=1425&&se<=2303||se===64286;if(At=Y[Rt],Jt&&(At==="R"||At==="AL")){qt="R";break}}}qt=ot<1||(At=Y[ot-1])==="B"?"N":rt[ot-1];break;case"B":ct=!1,a=!0,qt=pt;break;case"S":r=!0,qt="N"}return qt},jt=function(j,Y,rt){var ot=j.split("");return rt&&ht(ot,rt,{hiLevel:pt}),ot.reverse(),Y&&Y.reverse(),ot.join("")},ht=function(j,Y,rt){var ot,At,kt,Rt,St,qt=-1,se=j.length,Jt=0,B=[],J=pt?D:N,et=[];for(ct=!1,a=!1,r=!1,At=0;At0)if(ot===16){for(At=qt;At-1){for(At=qt;At=0&<[Nt]==="WS";Nt--)ft[Nt]=pt}})(et,Y,se)},tt=function(j,Y,rt,ot,At){if(!(At.hiLevel=j){for(St=Jt+1;St=j;)St++;for(qt=Jt,Rt=St-1;qt=0&&(kt[se]=K[qt+1])})(ot,rt,At),tt(2,ot,Y,rt,At),tt(1,ot,Y,rt,At),ot.join("")};return this.__bidiEngine__.doBidiReorder=function(j,Y,rt){if((function(At,kt){if(kt)for(var Rt=0;Rt>16)&&(e=-(1+(65535^e))),this.italicAngle=+(e+"."+i)):this.italicAngle=0,this.ascender=Math.round(this.ascender*this.scaleFactor),this.decender=Math.round(this.decender*this.scaleFactor),this.lineGap=Math.round(this.lineGap*this.scaleFactor),this.capHeight=this.os2.exists&&this.os2.capHeight||this.ascender,this.xHeight=this.os2.exists&&this.os2.xHeight||0,this.familyClass=(this.os2.exists&&this.os2.familyClass||0)>>8,this.isSerif=(r=this.familyClass)===1||r===2||r===3||r===4||r===5||r===7,this.isScript=this.familyClass===10,this.flags=0,this.post.isFixedPitch&&(this.flags|=1),this.isSerif&&(this.flags|=2),this.isScript&&(this.flags|=8),this.italicAngle!==0&&(this.flags|=64),this.flags|=32,!this.cmap.unicode)throw new Error("No unicode cmap for font")},t.prototype.characterToGlyph=function(n){var e;return((e=this.cmap.unicode)!=null?e.codeMap[n]:void 0)||0},t.prototype.widthOfGlyph=function(n){var e;return e=1e3/this.head.unitsPerEm,this.hmtx.forGlyph(n).advance*e},t.prototype.widthOfString=function(n,e,i){var a,r,u,d;for(u=0,r=0,d=(n=""+n).length;0<=d?rd;r=0<=d?++r:--r)a=n.charCodeAt(r),u+=this.widthOfGlyph(this.characterToGlyph(a))+i*(1e3/e)||0;return u*(e/1e3)},t.prototype.lineHeight=function(n,e){var i;return e==null&&(e=!1),i=e?this.lineGap:0,(this.ascender+i-this.decender)/1e3*n},t})();var Mo,tl=(function(){function t(n){this.data=n??[],this.pos=0,this.length=this.data.length}return t.prototype.readByte=function(){return this.data[this.pos++]},t.prototype.writeByte=function(n){return this.data[this.pos++]=n},t.prototype.readUInt32=function(){return 16777216*this.readByte()+(this.readByte()<<16)+(this.readByte()<<8)+this.readByte()},t.prototype.writeUInt32=function(n){return this.writeByte(n>>>24&255),this.writeByte(n>>16&255),this.writeByte(n>>8&255),this.writeByte(255&n)},t.prototype.readInt32=function(){var n;return(n=this.readUInt32())>=2147483648?n-4294967296:n},t.prototype.writeInt32=function(n){return n<0&&(n+=4294967296),this.writeUInt32(n)},t.prototype.readUInt16=function(){return this.readByte()<<8|this.readByte()},t.prototype.writeUInt16=function(n){return this.writeByte(n>>8&255),this.writeByte(255&n)},t.prototype.readInt16=function(){var n;return(n=this.readUInt16())>=32768?n-65536:n},t.prototype.writeInt16=function(n){return n<0&&(n+=65536),this.writeUInt16(n)},t.prototype.readString=function(n){var e,i;for(i=[],e=0;0<=n?en;e=0<=n?++e:--e)i[e]=String.fromCharCode(this.readByte());return i.join("")},t.prototype.writeString=function(n){var e,i,a;for(a=[],e=0,i=n.length;0<=i?ei;e=0<=i?++e:--e)a.push(this.writeByte(n.charCodeAt(e)));return a},t.prototype.readShort=function(){return this.readInt16()},t.prototype.writeShort=function(n){return this.writeInt16(n)},t.prototype.readLongLong=function(){var n,e,i,a,r,u,d,g;return n=this.readByte(),e=this.readByte(),i=this.readByte(),a=this.readByte(),r=this.readByte(),u=this.readByte(),d=this.readByte(),g=this.readByte(),128&n?-1*(72057594037927940*(255^n)+281474976710656*(255^e)+1099511627776*(255^i)+4294967296*(255^a)+16777216*(255^r)+65536*(255^u)+256*(255^d)+(255^g)+1):72057594037927940*n+281474976710656*e+1099511627776*i+4294967296*a+16777216*r+65536*u+256*d+g},t.prototype.writeLongLong=function(n){var e,i;return e=Math.floor(n/4294967296),i=4294967295&n,this.writeByte(e>>24&255),this.writeByte(e>>16&255),this.writeByte(e>>8&255),this.writeByte(255&e),this.writeByte(i>>24&255),this.writeByte(i>>16&255),this.writeByte(i>>8&255),this.writeByte(255&i)},t.prototype.readInt=function(){return this.readInt32()},t.prototype.writeInt=function(n){return this.writeInt32(n)},t.prototype.read=function(n){var e,i;for(e=[],i=0;0<=n?in;i=0<=n?++i:--i)e.push(this.readByte());return e},t.prototype.write=function(n){var e,i,a,r;for(r=[],i=0,a=n.length;ir;a=0<=r?++a:--a)i={tag:e.readString(4),checksum:e.readInt(),offset:e.readInt(),length:e.readInt()},this.tables[i.tag]=i}return n.prototype.encode=function(e){var i,a,r,u,d,g,_,y,I,N,D,U,H;for(H in D=Object.keys(e).length,g=Math.log(2),I=16*Math.floor(Math.log(D)/g),u=Math.floor(I/g),y=16*D-I,(a=new tl).writeInt(this.scalarType),a.writeShort(D),a.writeShort(I),a.writeShort(u),a.writeShort(y),r=16*D,_=a.pos+r,d=null,U=[],e)for(N=e[H],a.writeString(H),a.writeInt(t(N)),a.writeInt(_),a.writeInt(N.length),U=U.concat(N),H==="head"&&(d=_),_+=N.length;_%4;)U.push(0),_++;return a.write(U),i=2981146554-t(a.data),a.pos=d+8,a.writeUInt32(i),a.data},t=function(e){var i,a,r,u;for(e=Y2.call(e);e.length%4;)e.push(0);for(r=new tl(e),a=0,i=0,u=e.length;iN;g=0<=N?++nt:--nt)Ot.push(n.readUInt16());return Ot})(),n.pos+=2,H=(function(){var nt,Ot;for(Ot=[],g=nt=0;0<=N?ntN;g=0<=N?++nt:--nt)Ot.push(n.readUInt16());return Ot})(),_=(function(){var nt,Ot;for(Ot=[],g=nt=0;0<=N?ntN;g=0<=N?++nt:--nt)Ot.push(n.readUInt16());return Ot})(),y=(function(){var nt,Ot;for(Ot=[],g=nt=0;0<=N?ntN;g=0<=N?++nt:--nt)Ot.push(n.readUInt16());return Ot})(),a=(this.length-n.pos+this.offset)/2,d=(function(){var nt,Ot;for(Ot=[],g=nt=0;0<=a?nta;g=0<=a?++nt:--nt)Ot.push(n.readUInt16());return Ot})(),g=z=0,pt=r.length;z=K;i=U<=K?++ct:--ct)y[g]===0?u=i+_[g]:(u=d[y[g]/2+(i-U)-(N-g)]||0)!==0&&(u+=_[g]),this.codeMap[i]=65535&u}n.pos=I}return t.encode=function(n,e){var i,a,r,u,d,g,_,y,I,N,D,U,H,K,z,ct,pt,nt,Ot,Yt,jt,ht,tt,vt,j,Y,rt,ot,At,kt,Rt,St,qt,se,Jt,B,J,et,lt,ft,Ct,It,Nt,Ht,re,Me;switch(ot=new tl,u=Object.keys(n).sort(function(De,an){return De-an}),e){case"macroman":for(H=0,K=(function(){var De=[];for(U=0;U<256;++U)De.push(0);return De})(),ct={0:0},r={},At=0,qt=u.length;At=32768)for(g.push(0),Yt.push(2*(D.length+tt-U)),a=St=j;j<=y?St<=y:St>=y;a=j<=y?++St:--St)D.push(i[a].new);else g.push(rt-j),Yt.push(0)}for(ot.writeUInt16(3),ot.writeUInt16(1),ot.writeUInt32(12),ot.writeUInt16(4),ot.writeUInt16(16+8*tt+2*D.length),ot.writeUInt16(0),ot.writeUInt16(vt),ot.writeUInt16(ht),ot.writeUInt16(N),ot.writeUInt16(jt),Ct=0,B=I.length;Cta;i=0<=a?++i:--i)e=new k2(n,this.offset),this.tables.push(e),e.isUnicode&&this.unicode==null&&(this.unicode=e);return!0},t.encode=function(n,e){var i,a;return e==null&&(e="macroman"),i=k2.encode(n,e),(a=new tl).writeUInt16(0),a.writeUInt16(1),i.table=a.data.concat(i.subtable),i},t})(),M3=(function(){function t(){return t.__super__.constructor.apply(this,arguments)}return tr(t,Mo),t.prototype.tag="hhea",t.prototype.parse=function(n){return n.pos=this.offset,this.version=n.readInt(),this.ascender=n.readShort(),this.decender=n.readShort(),this.lineGap=n.readShort(),this.advanceWidthMax=n.readShort(),this.minLeftSideBearing=n.readShort(),this.minRightSideBearing=n.readShort(),this.xMaxExtent=n.readShort(),this.caretSlopeRise=n.readShort(),this.caretSlopeRun=n.readShort(),this.caretOffset=n.readShort(),n.pos+=8,this.metricDataFormat=n.readShort(),this.numberOfMetrics=n.readUInt16()},t})(),O3=(function(){function t(){return t.__super__.constructor.apply(this,arguments)}return tr(t,Mo),t.prototype.tag="OS/2",t.prototype.parse=function(n){if(n.pos=this.offset,this.version=n.readUInt16(),this.averageCharWidth=n.readShort(),this.weightClass=n.readUInt16(),this.widthClass=n.readUInt16(),this.type=n.readShort(),this.ySubscriptXSize=n.readShort(),this.ySubscriptYSize=n.readShort(),this.ySubscriptXOffset=n.readShort(),this.ySubscriptYOffset=n.readShort(),this.ySuperscriptXSize=n.readShort(),this.ySuperscriptYSize=n.readShort(),this.ySuperscriptXOffset=n.readShort(),this.ySuperscriptYOffset=n.readShort(),this.yStrikeoutSize=n.readShort(),this.yStrikeoutPosition=n.readShort(),this.familyClass=n.readShort(),this.panose=(function(){var e,i;for(i=[],e=0;e<10;++e)i.push(n.readByte());return i})(),this.charRange=(function(){var e,i;for(i=[],e=0;e<4;++e)i.push(n.readInt());return i})(),this.vendorID=n.readString(4),this.selection=n.readShort(),this.firstCharIndex=n.readShort(),this.lastCharIndex=n.readShort(),this.version>0&&(this.ascent=n.readShort(),this.descent=n.readShort(),this.lineGap=n.readShort(),this.winAscent=n.readShort(),this.winDescent=n.readShort(),this.codePageRange=(function(){var e,i;for(i=[],e=0;e<2;e=++e)i.push(n.readInt());return i})(),this.version>1))return this.xHeight=n.readShort(),this.capHeight=n.readShort(),this.defaultChar=n.readShort(),this.breakChar=n.readShort(),this.maxContext=n.readShort()},t})(),I3=(function(){function t(){return t.__super__.constructor.apply(this,arguments)}return tr(t,Mo),t.prototype.tag="post",t.prototype.parse=function(n){var e,i,a;switch(n.pos=this.offset,this.format=n.readInt(),this.italicAngle=n.readInt(),this.underlinePosition=n.readShort(),this.underlineThickness=n.readShort(),this.isFixedPitch=n.readInt(),this.minMemType42=n.readInt(),this.maxMemType42=n.readInt(),this.minMemType1=n.readInt(),this.maxMemType1=n.readInt(),this.format){case 65536:case 196608:break;case 131072:var r;for(i=n.readUInt16(),this.glyphNameIndex=[],r=0;0<=i?ri;r=0<=i?++r:--r)this.glyphNameIndex.push(n.readUInt16());for(this.names=[],a=[];n.posd;r=0<=d?++u:--u)g.push(n.readUInt32());return g}.call(this)}},t})(),E3=function(t,n){this.raw=t,this.length=t.length,this.platformID=n.platformID,this.encodingID=n.encodingID,this.languageID=n.languageID},L3=(function(){function t(){return t.__super__.constructor.apply(this,arguments)}return tr(t,Mo),t.prototype.tag="name",t.prototype.parse=function(n){var e,i,a,r,u,d,g,_,y,I,N;for(n.pos=this.offset,n.readShort(),e=n.readShort(),d=n.readShort(),i=[],r=0;0<=e?re;r=0<=e?++r:--r)i.push({platformID:n.readShort(),encodingID:n.readShort(),languageID:n.readShort(),nameID:n.readShort(),length:n.readShort(),offset:this.offset+d+n.readShort()});for(g={},r=y=0,I=i.length;yd;e=0<=d?++e:--e)this.metrics.push({advance:n.readUInt16(),lsb:n.readInt16()});for(a=this.file.maxp.numGlyphs-this.file.hhea.numberOfMetrics,this.leftSideBearings=(function(){var _,y;for(y=[],e=_=0;0<=a?_a;e=0<=a?++_:--_)y.push(n.readInt16());return y})(),this.widths=function(){var _,y,I,N;for(N=[],_=0,y=(I=this.metrics).length;_a;e=0<=a?++u:--u)g.push(this.widths.push(i));return g},t.prototype.forGlyph=function(n){return n in this.metrics?this.metrics[n]:{advance:this.metrics[this.metrics.length-1].advance,lsb:this.leftSideBearings[n-this.metrics.length]}},t})(),Y2=[].slice,F3=(function(){function t(){return t.__super__.constructor.apply(this,arguments)}return tr(t,Mo),t.prototype.tag="glyf",t.prototype.parse=function(){return this.cache={}},t.prototype.glyphFor=function(n){var e,i,a,r,u,d,g,_,y,I;return n in this.cache?this.cache[n]:(r=this.file.loca,e=this.file.contents,i=r.indexOf(n),(a=r.lengthOf(n))===0?this.cache[n]=null:(e.pos=this.offset+i,u=(d=new tl(e.read(a))).readShort(),_=d.readShort(),I=d.readShort(),g=d.readShort(),y=d.readShort(),this.cache[n]=u===-1?new B3(d,_,I,g,y):new R3(d,u,_,I,g,y),this.cache[n]))},t.prototype.encode=function(n,e,i){var a,r,u,d,g;for(u=[],r=[],d=0,g=e.length;d0&&(a+=g)}for(var _=new Array(4*i.length),y=0;y>8,_[4*y+1]=(16711680&i[y])>>16,_[4*y]=(4278190080&i[y])>>24;return _},t})(),j3=(function(){function t(n){this.font=n,this.subset={},this.unicodes={},this.next=33}return t.prototype.generateCmap=function(){var n,e,i,a,r;for(e in a=this.font.cmap.tables[0].codeMap,n={},r=this.subset)i=r[e],n[e]=a[i];return n},t.prototype.glyphsFor=function(n){var e,i,a,r,u,d,g;for(a={},u=0,d=n.length;u0)for(r in g=this.glyphsFor(e))i=g[r],a[r]=i;return a},t.prototype.encode=function(n,e){var i,a,r,u,d,g,_,y,I,N,D,U,H,K,z;for(a in i=$2.encode(this.generateCmap(),"unicode"),u=this.glyphsFor(n),D={0:0},z=i.charMap)D[(g=z[a]).old]=g.new;for(U in N=i.maxGlyphID,u)U in D||(D[U]=N++);return y=(function(ct){var pt,nt;for(pt in nt={},ct)nt[ct[pt]]=pt;return nt})(D),I=Object.keys(y).sort(function(ct,pt){return ct-pt}),H=(function(){var ct,pt,nt;for(nt=[],ct=0,pt=I.length;ct>"),r.join(` `)}return""+e},n})();function tg(t,n,e,i,a){i=i||{};var r=1.15,u=a.internal.scaleFactor,d=a.internal.getFontSize()/u,g=a.getLineHeightFactor?a.getLineHeightFactor():r,_=d*g,y=/\r\n|\r|\n/g,I="",N=1;if((i.valign==="middle"||i.valign==="bottom"||i.halign==="center"||i.halign==="right")&&(I=typeof t=="string"?t.split(y):t,N=I.length||1),e+=d*(2-r),i.valign==="middle"?e-=N/2*_:i.valign==="bottom"&&(e-=N*_),i.halign==="center"||i.halign==="right"){var D=d;if(i.halign==="center"&&(D*=.5),I&&N>=1){for(var U=0;U0,i=n||n===0;return e&&i?"DF":e?"S":i?"F":null}function xm(t,n){var e,i,a,r;if(t=t||n,Array.isArray(t)){if(t.length>=4)return{top:t[0],right:t[1],bottom:t[2],left:t[3]};if(t.length===3)return{top:t[0],right:t[1],bottom:t[2],left:t[1]};if(t.length===2)return{top:t[0],right:t[1],bottom:t[0],left:t[1]};t.length===1?t=t[0]:t=n}return typeof t=="object"?(typeof t.vertical=="number"&&(t.top=t.vertical,t.bottom=t.vertical),typeof t.horizontal=="number"&&(t.right=t.horizontal,t.left=t.horizontal),{left:(e=t.left)!==null&&e!==void 0?e:n,top:(i=t.top)!==null&&i!==void 0?i:n,right:(a=t.right)!==null&&a!==void 0?a:n,bottom:(r=t.bottom)!==null&&r!==void 0?r:n}):(typeof t!="number"&&(t=n),{top:t,right:t,bottom:t,left:t})}function og(t,n){var e=xm(n.settings.margin,0);return t.pageSize().width-(e.left+e.right)}function U3(t,n,e,i,a){var r={},u=1.3333333333333333,d=uu(n,function(pt){return a.getComputedStyle(pt).backgroundColor});d!=null&&(r.fillColor=d);var g=uu(n,function(pt){return a.getComputedStyle(pt).color});g!=null&&(r.textColor=g);var _=G3(i,e);_&&(r.cellPadding=_);var y="borderTopColor",I=u*e,N=i.borderTopWidth;if(i.borderBottomWidth===N&&i.borderRightWidth===N&&i.borderLeftWidth===N){var D=(parseFloat(N)||0)/I;D&&(r.lineWidth=D)}else r.lineWidth={top:(parseFloat(i.borderTopWidth)||0)/I,right:(parseFloat(i.borderRightWidth)||0)/I,bottom:(parseFloat(i.borderBottomWidth)||0)/I,left:(parseFloat(i.borderLeftWidth)||0)/I},r.lineWidth.top||(r.lineWidth.right?y="borderRightColor":r.lineWidth.bottom?y="borderBottomColor":r.lineWidth.left&&(y="borderLeftColor"));var U=uu(n,function(pt){return a.getComputedStyle(pt)[y]});U!=null&&(r.lineColor=U);var H=["left","right","center","justify"];H.indexOf(i.textAlign)!==-1&&(r.halign=i.textAlign),H=["middle","bottom","top"],H.indexOf(i.verticalAlign)!==-1&&(r.valign=i.verticalAlign);var K=parseInt(i.fontSize||"");isNaN(K)||(r.fontSize=K/u);var z=H3(i);z&&(r.fontStyle=z);var ct=(i.fontFamily||"").toLowerCase();return t.indexOf(ct)!==-1&&(r.font=ct),r}function H3(t){var n="";return(t.fontWeight==="bold"||t.fontWeight==="bolder"||parseInt(t.fontWeight)>=700)&&(n="bold"),(t.fontStyle==="italic"||t.fontStyle==="oblique")&&(n+="italic"),n}function uu(t,n){var e=rg(t,n);if(!e)return null;var i=e.match(/^rgba?\((\d+),\s*(\d+),\s*(\d+)(?:,\s*(\d*\.?\d*))?\)$/);if(!i||!Array.isArray(i))return null;var a=[parseInt(i[1]),parseInt(i[2]),parseInt(i[3])],r=parseInt(i[4]);return r===0||isNaN(a[0])||isNaN(a[1])||isNaN(a[2])?null:a}function rg(t,n){var e=n(t);return e==="rgba(0, 0, 0, 0)"||e==="transparent"||e==="initial"||e==="inherit"?t.parentElement==null?null:rg(t.parentElement,n):e}function G3(t,n){var e=[t.paddingTop,t.paddingRight,t.paddingBottom,t.paddingLeft],i=96/(72/n),a=(parseInt(t.lineHeight)-parseInt(t.fontSize))/n/2,r=e.map(function(d){return parseInt(d||"0")/i}),u=xm(r,0);return a>u.top&&(u.top=a),a>u.bottom&&(u.bottom=a),u}function lg(t,n,e,i,a){var r,u;i===void 0&&(i=!1),a===void 0&&(a=!1);var d;typeof n=="string"?d=e.document.querySelector(n):d=n;var g=Object.keys(t.getFontList()),_=t.scaleFactor(),y=[],I=[],N=[];if(!d)return console.error("Html table could not be found with input: ",n),{head:y,body:I,foot:N};for(var D=0;D0&&(a||I.display!=="none"))return u}function $3(t){var n=t.cloneNode(!0);return n.innerHTML=n.innerHTML.replace(/\n/g,"").replace(/ +/g," "),n.innerHTML=n.innerHTML.split(//).map(function(e){return e.trim()}).join(` `),n.innerText||n.textContent||""}function Y3(t,n,e){for(var i=0,a=[t,n,e];i0?"_".concat(g):"");var y={dataKey:_};a.push(y)}}),a}var vu=(function(){function t(n,e,i){this.table=e,this.pageNumber=e.pageNumber,this.settings=e.settings,this.cursor=i,this.doc=n.getDocument()}return t})(),ey=(function(t){eg(n,t);function n(e,i,a,r,u,d){var g=t.call(this,e,i,d)||this;return g.cell=a,g.row=r,g.column=u,g.section=r.section,g}return n})(vu),ny=(function(){function t(n,e){this.pageNumber=1,this.id=n.id,this.settings=n.settings,this.styles=n.styles,this.hooks=n.hooks,this.columns=e.columns,this.head=e.head,this.body=e.body,this.foot=e.foot}return t.prototype.getHeadHeight=function(n){return this.head.reduce(function(e,i){return e+i.getMaxCellHeight(n)},0)},t.prototype.getFootHeight=function(n){return this.foot.reduce(function(e,i){return e+i.getMaxCellHeight(n)},0)},t.prototype.allRows=function(){return this.head.concat(this.body).concat(this.foot)},t.prototype.callCellHooks=function(n,e,i,a,r,u){for(var d=0,g=e;d1:!1}).length>0},t.prototype.canEntireRowFit=function(n,e){return this.getMaxCellHeight(e)<=n},t.prototype.getMinimumRowHeight=function(n,e){var i=this;return n.reduce(function(a,r){var u=i.cells[r.index];if(!u)return 0;var d=e.getLineHeight(u.styles.fontSize),g=u.padding("vertical"),_=g+d;return _>a?_:a},0)},t})(),pg=(function(){function t(n,e,i){var a;this.contentHeight=0,this.contentWidth=0,this.wrappedWidth=0,this.minReadableWidth=0,this.minWidth=0,this.width=0,this.height=0,this.x=0,this.y=0,this.styles=e,this.section=i,this.raw=n;var r=n;n!=null&&typeof n=="object"&&!Array.isArray(n)?(this.rowSpan=n.rowSpan||1,this.colSpan=n.colSpan||1,r=(a=n.content)!==null&&a!==void 0?a:n,n._element&&(this.raw=n._element)):(this.rowSpan=1,this.colSpan=1);var u=r!=null?""+r:"",d=/\r\n|\r|\n/g;this.text=u.split(d)}return t.prototype.getTextPos=function(){var n;if(this.styles.valign==="top")n=this.y+this.padding("top");else if(this.styles.valign==="bottom")n=this.y+this.height-this.padding("bottom");else{var e=this.height-this.padding("vertical");n=this.y+e/2+this.padding("top")}var i;if(this.styles.halign==="right")i=this.x+this.width-this.padding("right");else if(this.styles.halign==="center"){var a=this.width-this.padding("horizontal");i=this.x+a/2+this.padding("left")}else i=this.x+this.padding("left");return{x:i,y:n}},t.prototype.getContentHeight=function(n,e){e===void 0&&(e=1.15);var i=Array.isArray(this.text)?this.text.length:1,a=this.styles.fontSize/n*e,r=i*a+this.padding("vertical");return Math.max(r,this.styles.minCellHeight)},t.prototype.padding=function(n){var e=xm(this.styles.cellPadding,0);return n==="vertical"?e.top+e.bottom:n==="horizontal"?e.left+e.right:e[n]},t})(),iy=(function(){function t(n,e,i){this.wrappedWidth=0,this.minReadableWidth=0,this.minWidth=0,this.width=0,this.dataKey=n,this.raw=e,this.index=i}return t.prototype.getMaxCustomCellWidth=function(n){for(var e=0,i=0,a=n.allRows();i.1/t.scaleFactor()&&(a=a<1?a:Math.round(a),console.warn("Of the table content, ".concat(a," units width could not fit page"))),ly(n),sy(n,t),ry(n)}function oy(t,n){var e=t.scaleFactor(),i=n.settings.horizontalPageBreak,a=og(t,n);n.allRows().forEach(function(r){for(var u=0,d=n.columns;ua?(_.minWidth=a,_.wrappedWidth=a):(_.minWidth=_.contentWidth,_.wrappedWidth=_.contentWidth);else{var D=10/e;_.minWidth=_.styles.minCellWidth||D,_.wrappedWidth=_.contentWidth,_.minWidth>_.wrappedWidth&&(_.wrappedWidth=_.minWidth)}}}}),n.allRows().forEach(function(r){for(var u=0,d=n.columns;u1&&!g.minWidth&&(g.minWidth=_.minWidth),_.colSpan>1&&!g.wrappedWidth&&(g.wrappedWidth=_.minWidth))}})}function xu(t,n,e){for(var i=n,a=t.reduce(function(D,U){return D+U.wrappedWidth},0),r=0;re(D):!0});N.length&&(n=xu(N,n,e))}return n}function ry(t){for(var n={},e=1,i=t.allRows(),a=0;a1)e--,delete r.cells[g.index];else if(_)_.cell.height+=r.height,e=_.cell.colSpan,delete r.cells[g.index],_.left--,_.left<=1&&delete n[g.index];else{var y=r.cells[g.index];if(!y)continue;if(y.height=r.height,y.rowSpan>1){var I=i.length-a,N=y.rowSpan>I?I:y.rowSpan;n[g.index]={cell:y,left:N,row:r}}}}}function ly(t){for(var n=t.allRows(),e=0;e1&&t.columns[d+1])r+=g.width,delete i.cells[g.index];else if(a){var _=a;delete i.cells[g.index],a=null,_.width=g.width+r}else{var _=i.cells[g.index];if(!_)continue;if(u=_.colSpan,r=0,_.colSpan>1){a=_,r+=g.width;continue}_.width=g.width+r}}}function sy(t,n){for(var e={count:0,height:0},i=0,a=t.allRows();i1&&e.count*e.height0&&e.height>N&&(N=e.height),N>r.height&&(r.height=N)}}e.count--}}function K2(t,n,e,i,a){return t.map(function(r){return cy(r,n,e,i,a)})}function cy(t,n,e,i,a){var r=1e4*i.scaleFactor();if(n=Math.ceil(n*r)/r,n>=bm(t,e,i))return t;for(;n0?e:null}function my(t,n){if(t==="head"){if(typeof n=="object")return n.header||null;if(typeof n=="string"||typeof n=="number")return n}else if(t==="foot"&&typeof n=="object")return n.footer;return null}function dy(t){return t.map(function(n,e){var i,a;return typeof n=="object"?a=(i=n.dataKey)!==null&&i!==void 0?i:e:a=e,new iy(a,n,e)})}function uy(t,n,e,i,a,r,u){var d=V3(i),g;t==="head"?g=a.headStyles:t==="body"?g=a.bodyStyles:t==="foot"&&(g=a.footStyles);var _=Dr({},d.table,d[t],a.styles,g),y=a.columnStyles[n.dataKey]||a.columnStyles[n.index]||{},I=t==="body"?y:{},N=t==="body"&&e%2===0?Dr({},d.alternateRow,a.alternateRowStyles):{},D=z3(r),U=Dr({},D,_,N,I);return Dr(U,u)}function fy(t,n,e){var i;e===void 0&&(e={});var a=og(t,n),r=new Map,u=[],d=[],g=[];Array.isArray(n.settings.horizontalPageBreakRepeat)?g=n.settings.horizontalPageBreakRepeat:(typeof n.settings.horizontalPageBreakRepeat=="string"||typeof n.settings.horizontalPageBreakRepeat=="number")&&(g=[n.settings.horizontalPageBreakRepeat]),g.forEach(function(N){var D=n.columns.find(function(U){return U.dataKey===N||U.index===N});D&&!r.has(D.index)&&(r.set(D.index,!0),u.push(D.index),d.push(n.columns[D.index]),a-=D.wrappedWidth)});for(var _=!0,y=(i=e?.start)!==null&&i!==void 0?i:0;y=I)_=!1,u.push(y),d.push(n.columns[y]),a-=I;else break;y++}return{colIndexes:u,columns:d,lastIndex:y-1}}function hy(t,n){for(var e=[],i=0;iy.pageSize().height)&&(fg(y),r.y=a.top),n.callWillDrawPageHooks(y,r);var I=Dr({},r);n.startPageNumber=y.pageNumber(),e.horizontalPageBreak?gy(y,n,I,r):(y.applyStyles(y.userStyles),(e.showHead==="firstPage"||e.showHead==="everyPage")&&n.head.forEach(function(N){return wr(y,n,N,r,n.columns)}),y.applyStyles(y.userStyles),n.body.forEach(function(N,D){var U=D===n.body.length-1;vm(y,n,N,U,I,r,n.columns)}),y.applyStyles(y.userStyles),(e.showFoot==="lastPage"||e.showFoot==="everyPage")&&n.foot.forEach(function(N){return wr(y,n,N,r,n.columns)})),ig(y,n,I,r),n.callEndPageHooks(y,r),n.finalY=r.y,t.lastAutoTable=n,y.applyStyles(y.userStyles)}function gy(t,n,e,i){var a=hy(t,n),r=n.settings;if(r.horizontalPageBreakBehaviour==="afterAllRows")a.forEach(function(_,y){t.applyStyles(t.userStyles),y>0?Mc(t,n,e,i,_.columns,!0):X2(t,n,i,_.columns),_y(t,n,e,i,_.columns),hu(t,n,i,_.columns)});else for(var u=-1,d=a[0],g=function(){var _=u;if(d){t.applyStyles(t.userStyles);var y=d.columns;u>=0?Mc(t,n,e,i,y,!0):X2(t,n,i,y),_=Q2(t,n,u+1,i,y),hu(t,n,i,y)}var I=_-u;a.slice(1).forEach(function(N){t.applyStyles(t.userStyles),Mc(t,n,e,i,N.columns,!0),Q2(t,n,u+1,i,N.columns,I),hu(t,n,i,N.columns)}),u=_};uI&&(y.text=_.text.splice(I,_.text.length));var N=i.scaleFactor(),D=i.getLineHeightFactor();_.contentHeight=_.getContentHeight(N,D),_.contentHeight>=n&&(_.contentHeight=n,y.styles.minCellHeight-=n),_.contentHeight>t.height&&(t.height=_.contentHeight),y.contentHeight=y.getContentHeight(N,D),y.contentHeight>r&&(r=y.contentHeight),a[g.index]=y}}var U=new cg(t.raw,-1,t.section,a,!0);U.height=r;for(var H=0,K=e.columns;Hd)return console.error("Will not be able to print row ".concat(n.index," correctly since it's minimum height is larger than page height")),!0;if(!_)return!1;var y=n.hasRowSpan(i.columns),I=n.getMaxCellHeight(i.columns)>d;return I?(y&&console.error("The content of row ".concat(n.index," will not be drawn correctly since drawing rows with a height larger than the page height and has cells with rowspans is not supported.")),!0):!(y||i.settings.rowPageBreak==="avoid")}function vm(t,n,e,i,a,r,u){var d=ug(t,n,i,r);if(e.canEntireRowFit(d,u))wr(t,n,e,r,u);else if(vy(t,e,d,n)){var g=by(e,d,n,t);wr(t,n,e,r,u),Mc(t,n,a,r,u),vm(t,n,g,i,a,r,u)}else Mc(t,n,a,r,u),vm(t,n,e,i,a,r,u)}function wr(t,n,e,i,a){i.x=n.settings.margin.left;for(var r=0,u=a;r"u")return console.error("Cannot run autoTableHtmlToJson in non browser environment"),null;var a=new ys(this),r=lg(a,n,window,e,!1),u=r.head,d=r.body,g=((i=u[0])===null||i===void 0?void 0:i.map(function(_){return _.content}))||[];return{columns:g,rows:d,data:d}}}var gu;function hg(t,n){var e=sg(t,n),i=mg(t,e);dg(t,i)}try{typeof window<"u"&&window&&(_u=window,Cu=_u.jsPDF||((gu=_u.jspdf)===null||gu===void 0?void 0:gu.jsPDF),Cu&&Sy(Cu))}catch(t){console.error("Could not apply autoTable plugin",t)}var _u,Cu;var Dy=()=>["header","header-amount","header-total-cost","header-installment-totals"];function wy(t,n){if(t&1){let e=xt();s(0,"div",1)(1,"button",4),it("click",function(){mt(e);let a=P();return dt(a.exportToPDF())}),T(2,"fa-icon",5),c(3,"Export to PDF "),l()()}}function Ty(t,n){t&1&&(s(0,"th",42),c(1,"#"),l())}function Py(t,n){if(t&1&&(s(0,"td",43),c(1),l()),t&2){let e=n.$implicit;o(),b(e.period)}}function Ay(t,n){t&1&&(s(0,"td",44),c(1,"\xA0"),l())}function My(t,n){t&1&&(s(0,"th",42),c(1),p(2,"translate"),l()),t&2&&(o(),b(m(2,1,"labels.inputs.Days")))}function Oy(t,n){if(t&1&&(s(0,"td",45),c(1),l()),t&2){let e=n.$implicit,i=P(2);x("ngClass",i.installmentStyle(e)),o(),v(" ",e.daysInPeriod," ")}}function Iy(t,n){t&1&&(s(0,"td",46)(1,"b"),c(2," Total"),l()())}function Ey(t,n){t&1&&(s(0,"th",42),c(1),p(2,"translate"),l()),t&2&&(o(),b(m(2,1,"labels.inputs.Date")))}function Ly(t,n){if(t&1&&(s(0,"td",47),c(1),p(2,"dateFormat"),l()),t&2){let e=n.$implicit,i=P(2);x("ngClass",i.installmentStyle(e)),o(),v(" ",m(2,2,e.dueDate)," ")}}function Ny(t,n){t&1&&T(0,"td",44)}function ky(t,n){t&1&&(s(0,"th",42),c(1),p(2,"translate"),l()),t&2&&(o(),v(" ",m(2,1,"labels.inputs.Paid Date")," "))}function Fy(t,n){if(t&1&&(s(0,"td",45),c(1),p(2,"dateFormat"),l()),t&2){let e=n.$implicit,i=P(2);x("ngClass",i.installmentStyle(e)),o(),v(" ",m(2,2,e.obligationsMetOnDate)," ")}}function Ry(t,n){t&1&&T(0,"td",44)}function By(t,n){t&1&&(s(0,"th",48),c(1,"\xA0"),l())}function qy(t,n){t&1&&(s(0,"span"),T(1,"i",49),l())}function jy(t,n){if(t&1&&(s(0,"td",45),M(1,qy,2,0,"span"),l()),t&2){let e=n.$implicit,i=P(2);x("ngClass",i.installmentStyle(e)),o(),O(e.obligationsMetOnDate?1:-1)}}function zy(t,n){t&1&&T(0,"td",44)}function Vy(t,n){t&1&&(s(0,"th",50),c(1),p(2,"translate"),l()),t&2&&(o(),v(" ",m(2,1,"labels.inputs.Balance Of Loan")," "))}function Uy(t,n){if(t&1&&(s(0,"td",51),c(1),p(2,"formatNumber"),l()),t&2){let e=n.$implicit,i=P(2);x("ngClass",i.installmentStyle(e)),o(),v(" ",m(2,2,e.principalLoanBalanceOutstanding)," ")}}function Hy(t,n){t&1&&(s(0,"td",52),c(1,"\xA0"),l())}function Gy(t,n){t&1&&(s(0,"th",50),c(1),p(2,"translate"),l()),t&2&&(o(),v(" ",m(2,1,"labels.inputs.Principal Due")," "))}function Wy(t,n){if(t&1&&(s(0,"td",53),c(1),p(2,"formatNumber"),l()),t&2){let e=n.$implicit,i=P(2);x("ngClass",i.installmentStyle(e)),o(),v(" ",m(2,2,e.principalDue)," ")}}function $y(t,n){if(t&1&&(s(0,"td",54)(1,"b"),c(2),p(3,"currency"),l()()),t&2){let e=P(2);o(2),v(" ",Ye(3,1,e.repaymentScheduleDetails==null?null:e.repaymentScheduleDetails.totalPrincipalExpected,e.currencyCode,"symbol-narrow","1.2-2"))}}function Yy(t,n){t&1&&(s(0,"th",50),c(1),p(2,"translate"),l()),t&2&&(o(),v(" ",m(2,1,"labels.inputs.Interest")," "))}function Zy(t,n){if(t&1&&(s(0,"td",51),c(1),p(2,"formatNumber"),l()),t&2){let e=n.$implicit,i=P(2);x("ngClass",i.installmentStyle(e)),o(),v(" ",m(2,2,e.interestOriginalDue)," ")}}function Ky(t,n){if(t&1&&(s(0,"td",52)(1,"b"),c(2),p(3,"currency"),l()()),t&2){let e=P(2);o(2),v(" ",Ye(3,1,e.repaymentScheduleDetails==null?null:e.repaymentScheduleDetails.totalInterestCharged,e.currencyCode,"symbol-narrow","1.2-2")," ")}}function Jy(t,n){t&1&&(s(0,"th",50),c(1),p(2,"translate"),l()),t&2&&(o(),v(" ",m(2,1,"labels.inputs.Fees")," "))}function Xy(t,n){if(t&1&&(s(0,"td",51),c(1),p(2,"formatNumber"),l()),t&2){let e=n.$implicit,i=P(2);x("ngClass",i.installmentStyle(e)),o(),v(" ",m(2,2,e.feeChargesDue)," ")}}function Qy(t,n){if(t&1&&(s(0,"td",52)(1,"b"),c(2),p(3,"currency"),l()()),t&2){let e=P(2);o(2),v(" ",Ye(3,1,e.repaymentScheduleDetails==null?null:e.repaymentScheduleDetails.totalFeeChargesCharged,e.currencyCode,"symbol-narrow","1.2-2")," ")}}function t4(t,n){t&1&&(s(0,"th",50),c(1),p(2,"translate"),l()),t&2&&(o(),v(" ",m(2,1,"labels.inputs.Penalties")," "))}function e4(t,n){if(t&1&&(s(0,"td",51),c(1),p(2,"formatNumber"),l()),t&2){let e=n.$implicit,i=P(2);x("ngClass",i.installmentStyle(e)),o(),v(" ",m(2,2,e.penaltyChargesDue)," ")}}function n4(t,n){if(t&1&&(s(0,"td",52)(1,"b"),c(2),p(3,"currency"),l()()),t&2){let e=P(2);o(2),v(" ",Ye(3,1,e.repaymentScheduleDetails==null?null:e.repaymentScheduleDetails.totalPenaltyChargesCharged,e.currencyCode,"symbol-narrow","1.2-2")," ")}}function i4(t,n){t&1&&(s(0,"th",50),c(1),p(2,"translate"),l()),t&2&&(o(),v(" ",m(2,1,"labels.inputs.Due")," "))}function a4(t,n){if(t&1&&(s(0,"td",51),c(1),p(2,"formatNumber"),l()),t&2){let e=n.$implicit,i=P(2);x("ngClass",i.installmentStyle(e)),o(),v(" ",m(2,2,e.totalDueForPeriod)," ")}}function o4(t,n){if(t&1&&(s(0,"td",52)(1,"b"),c(2),p(3,"currency"),l()()),t&2){let e=P(2);o(2),v(" ",Ye(3,1,e.repaymentScheduleDetails==null?null:e.repaymentScheduleDetails.totalRepaymentExpected,e.currencyCode,"symbol-narrow","1.2-2")," ")}}function r4(t,n){t&1&&(s(0,"th",50),c(1),p(2,"translate"),l()),t&2&&(o(),v(" ",m(2,1,"labels.inputs.Paid")," "))}function l4(t,n){if(t&1&&(s(0,"td",51),c(1),p(2,"formatNumber"),l()),t&2){let e=n.$implicit,i=P(2);x("ngClass",i.installmentStyle(e)),o(),v(" ",m(2,2,e.totalPaidForPeriod)," ")}}function s4(t,n){if(t&1&&(s(0,"td",52)(1,"b"),c(2),p(3,"currency"),l()()),t&2){let e=P(2);o(2),v(" ",Ye(3,1,e.repaymentScheduleDetails==null?null:e.repaymentScheduleDetails.totalRepayment,e.currencyCode,"symbol-narrow","1.2-2")," ")}}function c4(t,n){t&1&&(s(0,"th",50),c(1),p(2,"translate"),l()),t&2&&(o(),v(" ",m(2,1,"labels.inputs.In advance")," "))}function p4(t,n){if(t&1&&(s(0,"td",51),c(1),p(2,"formatNumber"),l()),t&2){let e=n.$implicit,i=P(2);x("ngClass",i.installmentStyle(e)),o(),v(" ",m(2,2,e.totalPaidInAdvanceForPeriod)," ")}}function m4(t,n){if(t&1&&(s(0,"td",52)(1,"b"),c(2),p(3,"currency"),l()()),t&2){let e=P(2);o(2),v(" ",Ye(3,1,e.repaymentScheduleDetails==null?null:e.repaymentScheduleDetails.totalPaidInAdvance,e.currencyCode,"symbol-narrow","1.2-2")," ")}}function d4(t,n){t&1&&(s(0,"th",50),c(1),p(2,"translate"),l()),t&2&&(o(),v(" ",m(2,1,"labels.inputs.Late")," "))}function u4(t,n){if(t&1&&(s(0,"td",51),c(1),p(2,"formatNumber"),l()),t&2){let e=n.$implicit,i=P(2);x("ngClass",i.installmentStyle(e)),o(),v(" ",m(2,2,e.totalPaidLateForPeriod)," ")}}function f4(t,n){if(t&1&&(s(0,"td",52)(1,"b"),c(2),p(3,"currency"),l()()),t&2){let e=P(2);o(2),v(" ",Ye(3,1,e.repaymentScheduleDetails==null?null:e.repaymentScheduleDetails.totalPaidLate,e.currencyCode,"symbol-narrow","1.2-2")," ")}}function h4(t,n){t&1&&(s(0,"th",50),c(1),p(2,"translate"),l()),t&2&&(o(),v(" ",m(2,1,"labels.inputs.Waived")," "))}function g4(t,n){if(t&1&&(s(0,"td",51),c(1),p(2,"formatNumber"),l()),t&2){let e=n.$implicit,i=P(3);x("ngClass",i.installmentStyle(e)),o(),v(" ",m(2,2,e.totalWaivedForPeriod)," ")}}function _4(t,n){if(t&1&&(s(0,"td",52)(1,"b"),c(2),p(3,"currency"),l()()),t&2){let e=P(3);o(2),v(" ",Ye(3,1,e.repaymentScheduleDetails==null?null:e.repaymentScheduleDetails.totalWaived,e.currencyCode,"symbol-narrow","1.2-2")," ")}}function C4(t,n){t&1&&(X(0,32),k(1,h4,3,3,"th",19)(2,g4,3,4,"td",20)(3,_4,4,6,"td",21),Q())}function b4(t,n){t&1&&T(0,"th",48)}function v4(t,n){t&1&&T(0,"td",56)}function x4(t,n){t&1&&(s(0,"td",44),T(1,"b"),l())}function y4(t,n){t&1&&(X(0,32),k(1,b4,1,0,"th",17)(2,v4,1,0,"td",55)(3,x4,2,0,"td",9),Q())}function S4(t,n){t&1&&(s(0,"th",50),c(1),p(2,"translate"),l()),t&2&&(o(),v(" ",m(2,1,"labels.inputs.Outstanding")," "))}function D4(t,n){if(t&1&&(s(0,"td",57),c(1),p(2,"formatNumber"),l()),t&2){let e=n.$implicit;o(),b(m(2,1,e.totalOutstandingForPeriod))}}function w4(t,n){if(t&1&&(s(0,"td",52)(1,"b"),c(2),p(3,"currency"),l()()),t&2){let e=P(2);o(2),v(" ",Ye(3,1,e.repaymentScheduleDetails==null?null:e.repaymentScheduleDetails.totalOutstanding,e.currencyCode,"symbol-narrow","1.2-2")," ")}}function T4(t,n){t&1&&T(0,"th",48),t&2&&oa("colspan",5)}function P4(t,n){t&1&&(s(0,"th",42),c(1),p(2,"translate"),l()),t&2&&(oa("colspan",2),o(),v(" ",m(2,2,"labels.inputs.Loan Amount and Balance")," "))}function A4(t,n){t&1&&(s(0,"th",42),c(1),p(2,"translate"),l()),t&2&&(oa("colspan",3),o(),v(" ",m(2,2,"labels.inputs.Total Cost of Loan")," "))}function M4(t,n){t&1&&(s(0,"th",42),c(1),p(2,"translate"),l()),t&2&&(oa("colspan",6),o(),v(" ",m(2,2,"labels.inputs.Installment Totals")," "))}function O4(t,n){t&1&&T(0,"tr",58)}function I4(t,n){t&1&&T(0,"tr",58)}function E4(t,n){t&1&&T(0,"tr",59)}function L4(t,n){t&1&&T(0,"tr",60)}function N4(t,n){if(t&1&&(s(0,"table",2),X(1,6),k(2,Ty,2,0,"th",7)(3,Py,2,1,"td",8)(4,Ay,2,0,"td",9),Q(),X(5,10),k(6,My,3,3,"th",7)(7,Oy,2,2,"td",11)(8,Iy,3,0,"td",12),Q(),X(9,13),k(10,Ey,3,3,"th",7)(11,Ly,3,4,"td",14)(12,Ny,1,0,"td",9),Q(),X(13,15),k(14,ky,3,3,"th",7)(15,Fy,3,4,"td",11)(16,Ry,1,0,"td",9),Q(),X(17,16),k(18,By,2,0,"th",17)(19,jy,2,2,"td",11)(20,zy,1,0,"td",9),Q(),X(21,18),k(22,Vy,3,3,"th",19)(23,Uy,3,4,"td",20)(24,Hy,2,0,"td",21),Q(),X(25,22),k(26,Gy,3,3,"th",19)(27,Wy,3,4,"td",23)(28,$y,4,6,"td",24),Q(),X(29,25),k(30,Yy,3,3,"th",19)(31,Zy,3,4,"td",20)(32,Ky,4,6,"td",21),Q(),X(33,26),k(34,Jy,3,3,"th",19)(35,Xy,3,4,"td",20)(36,Qy,4,6,"td",21),Q(),X(37,27),k(38,t4,3,3,"th",19)(39,e4,3,4,"td",20)(40,n4,4,6,"td",21),Q(),X(41,28),k(42,i4,3,3,"th",19)(43,a4,3,4,"td",20)(44,o4,4,6,"td",21),Q(),X(45,29),k(46,r4,3,3,"th",19)(47,l4,3,4,"td",20)(48,s4,4,6,"td",21),Q(),X(49,30),k(50,c4,3,3,"th",19)(51,p4,3,4,"td",20)(52,m4,4,6,"td",21),Q(),X(53,31),k(54,d4,3,3,"th",19)(55,u4,3,4,"td",20)(56,f4,4,6,"td",21),Q(),M(57,C4,4,0,"ng-container",32),M(58,y4,4,0,"ng-container",32),X(59,33),k(60,S4,3,3,"th",19)(61,D4,3,3,"td",34)(62,w4,4,6,"td",21),Q(),X(63,35),k(64,T4,1,1,"th",17),Q(),X(65,36),k(66,P4,3,4,"th",7),Q(),X(67,37),k(68,A4,3,4,"th",7),Q(),X(69,38),k(70,M4,3,4,"th",7),Q(),k(71,O4,1,0,"tr",39)(72,I4,1,0,"tr",39)(73,E4,1,0,"tr",40)(74,L4,1,0,"tr",41),l()),t&2){let e=P();x("dataSource",e.repaymentScheduleDetails==null?null:e.repaymentScheduleDetails.periods),o(57),O(e.isWaived?57:-1),o(),O(e.isWaived?-1:58),o(13),x("matHeaderRowDef",Ut(7,Dy)),o(),x("matHeaderRowDef",e.displayedColumns),o(),x("matRowDefColumns",e.displayedColumns),o(),x("matFooterRowDef",e.displayedColumns)}}function k4(t,n){t&1&&(s(0,"th",42),c(1,"#"),l())}function F4(t,n){if(t&1&&(s(0,"td",56),c(1),l()),t&2){let e=n.$implicit;o(),b(e.period)}}function R4(t,n){t&1&&(s(0,"th",42),c(1),p(2,"translate"),l()),t&2&&(o(),b(m(2,1,"labels.inputs.Date")))}function B4(t,n){if(t&1&&(s(0,"td",65),X(1),c(2),p(3,"dateFormat"),Q(),l()),t&2){let e=n.$implicit;o(2),v(" ",m(3,1,e.dueDate)," ")}}function q4(t,n){t&1&&(s(0,"th",50),c(1),p(2,"translate"),l()),t&2&&(o(),v(" ",m(2,1,"labels.inputs.Balance Of Loan")," "))}function j4(t,n){if(t&1&&(s(0,"td",57),c(1),p(2,"formatNumber"),l()),t&2){let e=n.$implicit;o(),v(" ",m(2,1,e.principalLoanBalanceOutstanding)," ")}}function z4(t,n){t&1&&(s(0,"th",50),c(1),p(2,"translate"),l()),t&2&&(o(),v(" ",m(2,1,"labels.inputs.Principal Due")," "))}function V4(t,n){if(t&1&&(s(0,"td",57),X(1),c(2),p(3,"formatNumber"),Q(),l()),t&2){let e=n.$implicit;o(2),v(" ",m(3,1,e.principalDue)," ")}}function U4(t,n){t&1&&(s(0,"th",50),c(1),p(2,"translate"),l()),t&2&&(o(),v(" ",m(2,1,"labels.inputs.Interest")," "))}function H4(t,n){if(t&1&&(s(0,"td",57),c(1),p(2,"formatNumber"),l()),t&2){let e=n.$implicit;o(),b(m(2,1,e.interestOriginalDue))}}function G4(t,n){t&1&&(s(0,"th",50),c(1),p(2,"translate"),l()),t&2&&(o(),v(" ",m(2,1,"labels.inputs.Fees")," "))}function W4(t,n){if(t&1&&(s(0,"td",57),c(1),p(2,"formatNumber"),l()),t&2){let e=n.$implicit;o(),b(m(2,1,e.feeChargesDue))}}function $4(t,n){t&1&&(s(0,"th",50),c(1),p(2,"translate"),l()),t&2&&(o(),v(" ",m(2,1,"labels.inputs.Installment Amount")," "))}function Y4(t,n){if(t&1&&(s(0,"span"),c(1),p(2,"formatNumber"),l()),t&2){let e=P().$implicit;o(),v(" ",m(2,1,e.totalDueForPeriod)," ")}}function Z4(t,n){if(t&1&&(s(0,"span",66)(1,"b"),c(2),p(3,"formatNumber"),l()()),t&2){let e=P().$implicit;o(2),b(m(3,1,e.totalDueForPeriod))}}function K4(t,n){if(t&1&&(s(0,"td",57),M(1,Y4,3,3,"span"),M(2,Z4,4,3,"span",66),l()),t&2){let e=n.$implicit;o(),O(e.changed?-1:1),o(),O(e.changed?2:-1)}}function J4(t,n){t&1&&(s(0,"th",48),c(1),p(2,"translate"),l()),t&2&&(o(),b(m(2,1,"labels.inputs.Actions")))}function X4(t,n){if(t&1){let e=xt();s(0,"span"),X(1),s(2,"button",68),p(3,"translate"),it("click",function(){mt(e);let a=P().$implicit,r=P(2);return dt(r.editInstallment(a))}),T(4,"fa-icon",69),l(),s(5,"button",70),p(6,"translate"),it("click",function(){mt(e);let a=P().$implicit,r=P(2);return dt(r.startEdit(a.period))}),T(7,"fa-icon",71),l(),Q(),l()}t&2&&(o(2),x("matTooltip",ce(m(3,4,"tooltips.Edit"))),o(3),x("matTooltip",ce(m(6,6,"tooltips.Delete"))))}function Q4(t,n){if(t&1&&(s(0,"td",67),M(1,X4,8,8,"span"),l()),t&2){let e=n.$implicit,i=P(2);o(),O(e.period&&e.period+1<(i.repaymentScheduleDetails==null||i.repaymentScheduleDetails.periods==null?null:i.repaymentScheduleDetails.periods.length)?1:-1)}}function tS(t,n){t&1&&T(0,"td",44)}function eS(t,n){t&1&&T(0,"tr",58)}function nS(t,n){t&1&&T(0,"tr",72)}function iS(t,n){if(t&1&&(s(0,"table",3),X(1,6),k(2,k4,2,0,"th",7)(3,F4,2,1,"td",55),Q(),X(4,13),k(5,R4,3,3,"th",7)(6,B4,4,3,"td",61),Q(),X(7,18),k(8,q4,3,3,"th",19)(9,j4,3,3,"td",34),Q(),X(10,22),k(11,z4,3,3,"th",19)(12,V4,4,3,"td",34),Q(),X(13,25),k(14,U4,3,3,"th",19)(15,H4,3,3,"td",34),Q(),X(16,26),k(17,G4,3,3,"th",19)(18,W4,3,3,"td",34),Q(),X(19,28),k(20,$4,3,3,"th",19)(21,K4,3,2,"td",34),Q(),X(22,62),k(23,J4,3,3,"th",17)(24,Q4,2,1,"td",63)(25,tS,1,0,"td",9),Q(),k(26,eS,1,0,"tr",39)(27,nS,1,0,"tr",64),l()),t&2){let e=P();x("dataSource",e.repaymentScheduleDetails==null?null:e.repaymentScheduleDetails.periods),o(26),x("matHeaderRowDef",e.displayedColumnsEdit),o(),x("matRowDefColumns",e.displayedColumnsEdit)}}var ho=(()=>{class t{constructor(){this.route=A(Et),this.settingsService=A(oe),this.dateUtils=A(de),this.dialog=A(Gn),this.forEditing=!1,this.repaymentScheduleDetails=null,this.loanDetailsDataRepaymentSchedule=null,this.editCache={},this.listOfData=[],this.repaymentSchedulePeriods=[],this.totalRepaymentExpected=0,this.displayedColumns=["number","days","date","paiddate","check","balanceOfLoan","principalDue","interest","fees","penalties","due","paid","inadvance","late","waived","outstanding"],this.displayedColumnsEdit=["number","date","balanceOfLoan","principalDue","interest","fees","due","actions"],this.editPeriod=new Yl,this.businessDate=new Date,this.destroyRef=A(Af),this.businessDate=this.settingsService.businessDate}ngOnInit(){this.route.parent?this.route.parent.data.pipe(h1(this.destroyRef)).subscribe({next:e=>{this.loanDetailsDataRepaymentSchedule=e.loanDetailsData?.repaymentSchedule??this.getDefaultRepaymentSchedule(),e.loanDetailsData?.currency?.code&&(this.currencyCode=e.loanDetailsData.currency.code),this.initializeRepaymentSchedule()},error:e=>{console.error("Failed to load loan repayment schedule data:",e),this.loanDetailsDataRepaymentSchedule=this.getDefaultRepaymentSchedule(),this.initializeRepaymentSchedule()}}):(this.loanDetailsDataRepaymentSchedule=this.getDefaultRepaymentSchedule(),this.initializeRepaymentSchedule())}initializeRepaymentSchedule(){this.repaymentScheduleDetails?(this.repaymentScheduleDetails.periods??=[],this.repaymentScheduleDetails.totalWaived??=0):this.repaymentScheduleDetails=this.loanDetailsDataRepaymentSchedule??this.getDefaultRepaymentSchedule(),this.isWaived=(this.repaymentScheduleDetails.totalWaived??0)>0,this.updateEditCache()}getDefaultRepaymentSchedule(){return{periods:[],totalWaived:0,currency:{},loanTermInDays:0,totalPrincipalDisbursed:0,totalPrincipalExpected:0,totalPrincipalPaid:0,totalInterestCharged:0,totalFeeChargesCharged:0,totalPenaltyChargesCharged:0,totalWrittenOff:0,totalRepaymentExpected:0,totalRepayment:0,totalPaidInAdvance:0,totalPaidLate:0,totalOutstanding:0,totalCredits:0}}ngOnChanges(e){e.repaymentScheduleDetails&&!e.repaymentScheduleDetails.firstChange&&this.initializeRepaymentSchedule(),this.totalRepaymentExpected=0,this.listOfData.forEach(i=>{this.totalRepaymentExpected=this.totalRepaymentExpected+i.totalDueForPeriod})}installmentStyle(e){if(e.complete)return"paid";let i=this.isCurrent(e);return i!==""?i:e.isAdditional?"additional":e.downPaymentPeriod?"downpayment":""}isCurrent(e){if(e.fromDate){this.businessDate=this.settingsService.businessDate;let i=this.dateUtils.parseDate(e.fromDate),a=this.dateUtils.parseDate(e.dueDate);if(i<=this.businessDate&&this.businessDatea)return"overdued"}else return"";return""}exportToPDF(){let i=`repaymentschedule-${this.dateUtils.formatDate(this.settingsService.businessDate,de.DEFAULT_DATEFORMAT)}.pdf`,a={orientation:"l",unit:"in",format:"letter",precision:2,compress:!0,putOnlyUsedFonts:!0},r=new Ze(a);hg(r,{html:"#repaymentSchedule",bodyStyles:{lineColor:[0,0,0]},styles:{fontSize:8,cellWidth:"auto",halign:"center"}}),r.save(i)}editInstallment(e){if(!e.period)return;this.editCache[e.period].edit=!0;let a={title:"Period",formfields:[new la({controlName:"dueDate",label:"Due Date",value:this.dateUtils.parseDate(e.dueDate),type:"date",required:!0}),new Ti({controlName:"principalDue",label:"Amount",value:e.principalDue,type:"number",required:!0})]};this.dialog.open(_i,{data:a,width:"50rem"}).afterClosed().subscribe(u=>{u.data})}cancelEdit(e){let i=this.listOfData.findIndex(a=>a.period?.toString()===e);i!==-1&&(this.editCache[e]={data:ie({},this.listOfData[i]),edit:!1})}saveEdit(e){let i=this.listOfData.findIndex(a=>a.period?.toString()===e);i!==-1&&(Object.assign(this.listOfData[i],this.editCache[e].data),this.editCache[e].edit=!1,this.editPeriod.emit(e))}updateEditCache(){this.repaymentScheduleDetails?.periods&&(this.listOfData=this.repaymentScheduleDetails.periods,this.totalRepaymentExpected=0,this.listOfData.forEach(e=>{this.editCache[e.period]={edit:!1,data:ie({},e)},this.totalRepaymentExpected=this.totalRepaymentExpected+e.totalDueForPeriod}))}numberOnly(e,i){let a=i.which?i.which:i.keyCode;return a===46?!(e.value.indexOf(".")>-1):!(a>31&&(a<48||a>57))}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=Dt({type:t,selectors:[["mifosx-repayment-schedule-tab"]],inputs:{currencyCode:"currencyCode",forEditing:"forEditing",repaymentScheduleDetails:"repaymentScheduleDetails"},outputs:{editPeriod:"editPeriod"},features:[Vr],decls:4,vars:3,consts:[[1,"container"],[1,"layout-row","m-t-20","align-end","align-items-center"],["mat-table","","id","repaymentSchedule",3,"dataSource"],["mat-table","","id","repaymentScheduleEdit",3,"dataSource"],["mat-raised-button","","color","primary",3,"click"],["icon","download",1,"m-r-10"],["matColumnDef","number"],["mat-header-cell","","class","center mat-header-cell",4,"matHeaderCellDef"],["mat-cell","","class","right",4,"matCellDef"],["mat-footer-cell","",4,"matFooterCellDef"],["matColumnDef","days"],["mat-cell","","class","center",3,"ngClass",4,"matCellDef"],["mat-footer-cell","","class","center",4,"matFooterCellDef"],["matColumnDef","date"],["mat-cell","","class","m-r-5",3,"ngClass",4,"matCellDef"],["matColumnDef","paiddate"],["matColumnDef","check"],["mat-header-cell","",4,"matHeaderCellDef"],["matColumnDef","balanceOfLoan"],["mat-header-cell","","class","r-amount mat-header-cell",4,"matHeaderCellDef"],["mat-cell","","class","r-amount",3,"ngClass",4,"matCellDef"],["mat-footer-cell","","class","r-amount",4,"matFooterCellDef"],["matColumnDef","principalDue"],["mat-cell","","class","check r-amount",3,"ngClass",4,"matCellDef"],["mat-footer-cell","","class","check r-amount",4,"matFooterCellDef"],["matColumnDef","interest"],["matColumnDef","fees"],["matColumnDef","penalties"],["matColumnDef","due"],["matColumnDef","paid"],["matColumnDef","inadvance"],["matColumnDef","late"],["matColumnDef","waived"],["matColumnDef","outstanding"],["mat-cell","","class","r-amount",4,"matCellDef"],["matColumnDef","header"],["matColumnDef","header-amount"],["matColumnDef","header-total-cost"],["matColumnDef","header-installment-totals"],["mat-header-row","",4,"matHeaderRowDef"],["mat-row","","class","table-row",4,"matRowDef","matRowDefColumns"],["mat-footer-row","",4,"matFooterRowDef"],["mat-header-cell","",1,"center","mat-header-cell"],["mat-cell","",1,"right"],["mat-footer-cell",""],["mat-cell","",1,"center",3,"ngClass"],["mat-footer-cell","",1,"center"],["mat-cell","",1,"m-r-5",3,"ngClass"],["mat-header-cell",""],[1,"fa","fa-check"],["mat-header-cell","",1,"r-amount","mat-header-cell"],["mat-cell","",1,"r-amount",3,"ngClass"],["mat-footer-cell","",1,"r-amount"],["mat-cell","",1,"check","r-amount",3,"ngClass"],["mat-footer-cell","",1,"check","r-amount"],["mat-cell","",4,"matCellDef"],["mat-cell",""],["mat-cell","",1,"r-amount"],["mat-header-row",""],["mat-row","",1,"table-row"],["mat-footer-row",""],["mat-cell","","class","m-r-10",4,"matCellDef"],["matColumnDef","actions"],["mat-cell","","class","center",4,"matCellDef"],["mat-row","",4,"matRowDef","matRowDefColumns"],["mat-cell","",1,"m-r-10"],[1,"amount-changed"],["mat-cell","",1,"center"],["type","button","color","primary","mat-icon-button","","matTooltipPosition","above",3,"click","matTooltip"],["icon","edit","size","lg"],["type","button","color","warn","mat-icon-button","","matTooltipPosition","above",3,"click","matTooltip"],["icon","trash","size","lg"],["mat-row",""]],template:function(i,a){i&1&&(s(0,"div",0),M(1,wy,4,0,"div",1),M(2,N4,75,8,"table",2),M(3,iS,28,3,"table",3),l()),i&2&&(o(),O(a.forEditing?-1:1),o(),O(a.forEditing?-1:2),o(),O(a.forEditing&&(a.repaymentScheduleDetails==null||a.repaymentScheduleDetails.periods==null?null:a.repaymentScheduleDetails.periods.length)>0?3:-1))},dependencies:[wt,ca,Tt,Wt,un,bn,yn,xn,Sn,vn,Dn,Sp,Dp,wn,Pn,Tn,An,wp,Tp,Ba,Oi,Sa,En,Pt,hn],styles:["body[_ngcontent-%COMP%] table[_ngcontent-%COMP%] tbody[_ngcontent-%COMP%] tr[_ngcontent-%COMP%]:nth-child(2n){background-color:#f2f2f2}.bg-black[_ngcontent-%COMP%]{background-color:#000}.bg-light-grey[_ngcontent-%COMP%]{background-color:#e5e5e5}.bg-medium-grey[_ngcontent-%COMP%]{background-color:#ccc}.bg-grey[_ngcontent-%COMP%]{background-color:#999}.bg-dark-grey[_ngcontent-%COMP%]{background-color:#222}.bg-white[_ngcontent-%COMP%], .bg-fff[_ngcontent-%COMP%]{background-color:#fff}.bg-none[_ngcontent-%COMP%], .no-bg[_ngcontent-%COMP%]{background:none;background-image:none;background-color:transparent}.bg-facebook[_ngcontent-%COMP%]{background-color:#47639e}.bg-twitter[_ngcontent-%COMP%]{background-color:#02a8f3}body[_ngcontent-%COMP%] table[_ngcontent-%COMP%]{border:1px solid rgba(0,0,0,.12)}.no-border[_ngcontent-%COMP%]{border:none}.no-border-t[_ngcontent-%COMP%]{border-top:none}.no-border-r[_ngcontent-%COMP%]{border-right:none}.no-border-b[_ngcontent-%COMP%]{border-bottom:none}.no-border-l[_ngcontent-%COMP%]{border-left:none}.no-border-lr[_ngcontent-%COMP%], .no-border-rl[_ngcontent-%COMP%]{border-left:none;border-right:none}.no-border-tb[_ngcontent-%COMP%], .no-border-bt[_ngcontent-%COMP%]{border-top:none;border-bottom:none}.no-border-tl[_ngcontent-%COMP%], .no-border-lt[_ngcontent-%COMP%]{border-top:none;border-left:none}.no-border-tr[_ngcontent-%COMP%], .no-border-rt[_ngcontent-%COMP%]{border-top:none;border-right:none}.no-border-bl[_ngcontent-%COMP%], .no-border-lb[_ngcontent-%COMP%]{border-bottom:none;border-left:none}.no-border-br[_ngcontent-%COMP%], .no-border-rb[_ngcontent-%COMP%]{border-bottom:none;border-right:none}.border-dashed[_ngcontent-%COMP%], .border-dotted[_ngcontent-%COMP%]{border-style:dashed}.border-black[_ngcontent-%COMP%]{border-color:#000}.border-light-grey[_ngcontent-%COMP%]{border-color:#e5e5e5}.border-medium-grey[_ngcontent-%COMP%]{border-color:#ccc}.border-grey[_ngcontent-%COMP%]{border-color:#999}.border-dark-grey[_ngcontent-%COMP%]{border-color:#2222}.border-white[_ngcontent-%COMP%], .border-fff[_ngcontent-%COMP%]{border-color:#fff}.no-border-radius[_ngcontent-%COMP%]{border-radius:0}.radius3[_ngcontent-%COMP%]{border-radius:3px}.radius5[_ngcontent-%COMP%]{border-radius:5px}.radius10[_ngcontent-%COMP%]{border-radius:10px}.column-mandatory[_ngcontent-%COMP%]{color:#5cb85c;text-align:center}.not-column-mandatory[_ngcontent-%COMP%]{color:#666f73;text-align:center}.cdk-drag-placeholder[_ngcontent-%COMP%]{background:#3498db}.yes[_ngcontent-%COMP%]{color:#5cb85c!important;background-color:#5cb85c;height:4px;cursor:none}.no[_ngcontent-%COMP%]{color:red;background-color:red;height:4px;cursor:none}.strike[_ngcontent-%COMP%]{text-decoration:line-through;color:red}.transfer[_ngcontent-%COMP%]{color:#16a085}.linked[_ngcontent-%COMP%]{color:#4461e2}.accrual[_ngcontent-%COMP%]{color:#999}.fa-question[_ngcontent-%COMP%]{color:#4461e2}.enabled[_ngcontent-%COMP%]{color:#32cd32}.disabled[_ngcontent-%COMP%]{color:#f44366}.v-mid[_ngcontent-%COMP%], .v-m[_ngcontent-%COMP%]{vertical-align:middle}.v-top[_ngcontent-%COMP%], .v-t[_ngcontent-%COMP%]{vertical-align:top}.v-bottom[_ngcontent-%COMP%], .v-b[_ngcontent-%COMP%]{vertical-align:bottom}.v-super[_ngcontent-%COMP%]{vertical-align:super}.r-amount[_ngcontent-%COMP%]{text-align:right!important;padding-right:5px!important}.left[_ngcontent-%COMP%]{text-align:left!important}.right[_ngcontent-%COMP%]{text-align:right!important}.center[_ngcontent-%COMP%]{text-align:center!important}.amount-plus[_ngcontent-%COMP%]{color:#000}.amount-minus[_ngcontent-%COMP%]{color:#4461e2}.block[_ngcontent-%COMP%]{display:block}.inline[_ngcontent-%COMP%]{display:inline}.in-block[_ngcontent-%COMP%]{display:inline-block;zoom:1}.d-none[_ngcontent-%COMP%], .hide[_ngcontent-%COMP%], .hidden[_ngcontent-%COMP%]{display:none}.t-0[_ngcontent-%COMP%]{top:0}.b-0[_ngcontent-%COMP%]{bottom:0}.l-0[_ngcontent-%COMP%]{left:0}.r-0[_ngcontent-%COMP%]{right:0}.tb-0[_ngcontent-%COMP%]{top:0;bottom:0}.lr-0[_ngcontent-%COMP%]{left:0;right:0}.f-left[_ngcontent-%COMP%]{float:left}.f-right[_ngcontent-%COMP%]{float:right}.f-none[_ngcontent-%COMP%]{float:none}textarea[_ngcontent-%COMP%]{resize:both}textarea.vertical[_ngcontent-%COMP%], textarea.horizontal[_ngcontent-%COMP%]{resize:vertical}textarea.noresize[_ngcontent-%COMP%]{resize:none}.full-input[_ngcontent-%COMP%] input[_ngcontent-%COMP%], .full-input[_ngcontent-%COMP%] select[_ngcontent-%COMP%], .full-input[_ngcontent-%COMP%] textarea[_ngcontent-%COMP%]{width:100%}.normal[_ngcontent-%COMP%] input[_ngcontent-%COMP%], .normal[_ngcontent-%COMP%] select[_ngcontent-%COMP%], .normal[_ngcontent-%COMP%] textarea[_ngcontent-%COMP%], .full-input[_ngcontent-%COMP%] [type=checkbox][_ngcontent-%COMP%], .full-input[_ngcontent-%COMP%] [type=radio][_ngcontent-%COMP%]{width:auto}.mat-tab-body-content[_ngcontent-%COMP%]{margin-bottom:20px}.mat-datepicker-input[_ngcontent-%COMP%]{margin-top:5px;margin-bottom:5px}.loader-wrapper[_ngcontent-%COMP%]{height:100vh;width:100vw}.loader-wrapper[_ngcontent-%COMP%] .triangle[_ngcontent-%COMP%]{width:0;height:0;border-style:solid;position:absolute;animation:_ngcontent-%COMP%_rotate .8s infinite .2s}.loader-wrapper[_ngcontent-%COMP%] .bottom[_ngcontent-%COMP%]{border-width:0 90px 90px;border-color:transparent transparent #1fb050;bottom:calc(50% - 100px);left:calc(50% - 90px)}.loader-wrapper[_ngcontent-%COMP%] .top[_ngcontent-%COMP%]{border-width:90px 90px 0;border-color:#b4d575 transparent transparent;top:calc(50% - 100px);left:calc(50% - 90px)}.loader-wrapper[_ngcontent-%COMP%] .left[_ngcontent-%COMP%]{border-width:90px 0 90px 90px;border-color:transparent transparent transparent #1074b9;top:calc(50% - 90px);left:calc(50% - 100px)}.loader-wrapper[_ngcontent-%COMP%] .right[_ngcontent-%COMP%]{border-width:90px 90px 90px 0;border-color:transparent #1daeec transparent transparent;top:calc(50% - 90px);right:calc(50% - 100px)}@keyframes _ngcontent-%COMP%_rotate{0%{transform:rotate(0)}to{transform:rotate(360deg)}}body[_ngcontent-%COMP%]{margin:0}.container[_ngcontent-%COMP%]{margin:0 auto}.mb-05[_ngcontent-%COMP%]{margin-bottom:.5rem}.mr-05[_ngcontent-%COMP%]{margin-right:.5rem}.mb-1[_ngcontent-%COMP%]{margin-bottom:1rem}.mt-1[_ngcontent-%COMP%]{margin-top:1rem}.m-5[_ngcontent-%COMP%]{margin:5px}.m-t-5[_ngcontent-%COMP%]{margin-top:5px}.m-r-5[_ngcontent-%COMP%]{margin-right:5px}.m-b-5[_ngcontent-%COMP%]{margin-bottom:5px}.m-l-5[_ngcontent-%COMP%]{margin-left:5px}.m-v-5[_ngcontent-%COMP%]{margin:5px 0}.m-h-5[_ngcontent-%COMP%]{margin:0 5px}.m-10[_ngcontent-%COMP%]{margin:10px}.m-t-10[_ngcontent-%COMP%]{margin-top:10px}.m-r-10[_ngcontent-%COMP%]{margin-right:10px}.m-b-10[_ngcontent-%COMP%]{margin-bottom:10px}.m-l-10[_ngcontent-%COMP%]{margin-left:10px}.m-v-10[_ngcontent-%COMP%]{margin:10px 0}.m-h-10[_ngcontent-%COMP%]{margin:0 10px}.m-15[_ngcontent-%COMP%]{margin:15px}.m-t-15[_ngcontent-%COMP%]{margin-top:15px}.m-r-15[_ngcontent-%COMP%]{margin-right:15px}.m-b-15[_ngcontent-%COMP%]{margin-bottom:15px}.m-l-15[_ngcontent-%COMP%]{margin-left:15px}.m-v-15[_ngcontent-%COMP%]{margin:15px 0}.m-h-15[_ngcontent-%COMP%]{margin:0 15px}.m-20[_ngcontent-%COMP%]{margin:20px}.m-t-20[_ngcontent-%COMP%]{margin-top:20px}.m-r-20[_ngcontent-%COMP%]{margin-right:20px}.m-b-20[_ngcontent-%COMP%]{margin-bottom:20px}.m-l-20[_ngcontent-%COMP%]{margin-left:20px}.m-v-20[_ngcontent-%COMP%]{margin:20px 0}.m-h-20[_ngcontent-%COMP%]{margin:0 20px}.m-25[_ngcontent-%COMP%]{margin:25px}.m-t-25[_ngcontent-%COMP%]{margin-top:25px}.m-r-25[_ngcontent-%COMP%]{margin-right:25px}.m-b-25[_ngcontent-%COMP%]{margin-bottom:25px}.m-l-25[_ngcontent-%COMP%]{margin-left:25px}.m-v-25[_ngcontent-%COMP%]{margin:25px 0}.m-h-25[_ngcontent-%COMP%]{margin:0 25px}.m-30[_ngcontent-%COMP%]{margin:30px}.m-t-30[_ngcontent-%COMP%]{margin-top:30px}.m-r-30[_ngcontent-%COMP%]{margin-right:30px}.m-b-30[_ngcontent-%COMP%]{margin-bottom:30px}.m-l-30[_ngcontent-%COMP%]{margin-left:30px}.m-v-30[_ngcontent-%COMP%]{margin:30px 0}.m-h-30[_ngcontent-%COMP%]{margin:0 30px}.m-35[_ngcontent-%COMP%]{margin:35px}.m-t-35[_ngcontent-%COMP%]{margin-top:35px}.m-r-35[_ngcontent-%COMP%]{margin-right:35px}.m-b-35[_ngcontent-%COMP%]{margin-bottom:35px}.m-l-35[_ngcontent-%COMP%]{margin-left:35px}.m-v-35[_ngcontent-%COMP%]{margin:35px 0}.m-h-35[_ngcontent-%COMP%]{margin:0 35px}.m-40[_ngcontent-%COMP%]{margin:40px}.m-t-40[_ngcontent-%COMP%]{margin-top:40px}.m-r-40[_ngcontent-%COMP%]{margin-right:40px}.m-b-40[_ngcontent-%COMP%]{margin-bottom:40px}.m-l-40[_ngcontent-%COMP%]{margin-left:40px}.m-v-40[_ngcontent-%COMP%]{margin:40px 0}.m-h-40[_ngcontent-%COMP%]{margin:0 40px}.m-45[_ngcontent-%COMP%]{margin:45px}.m-t-45[_ngcontent-%COMP%]{margin-top:45px}.m-r-45[_ngcontent-%COMP%]{margin-right:45px}.m-b-45[_ngcontent-%COMP%]{margin-bottom:45px}.m-l-45[_ngcontent-%COMP%]{margin-left:45px}.m-v-45[_ngcontent-%COMP%]{margin:45px 0}.m-h-45[_ngcontent-%COMP%]{margin:0 45px}.m-50[_ngcontent-%COMP%]{margin:50px}.m-t-50[_ngcontent-%COMP%]{margin-top:50px}.m-r-50[_ngcontent-%COMP%]{margin-right:50px}.m-b-50[_ngcontent-%COMP%]{margin-bottom:50px}.m-l-50[_ngcontent-%COMP%]{margin-left:50px}.m-v-50[_ngcontent-%COMP%]{margin:50px 0}.m-h-50[_ngcontent-%COMP%]{margin:0 50px}.m-55[_ngcontent-%COMP%]{margin:55px}.m-t-55[_ngcontent-%COMP%]{margin-top:55px}.m-r-55[_ngcontent-%COMP%]{margin-right:55px}.m-b-55[_ngcontent-%COMP%]{margin-bottom:55px}.m-l-55[_ngcontent-%COMP%]{margin-left:55px}.m-v-55[_ngcontent-%COMP%]{margin:55px 0}.m-h-55[_ngcontent-%COMP%]{margin:0 55px}.m-60[_ngcontent-%COMP%]{margin:60px}.m-t-60[_ngcontent-%COMP%]{margin-top:60px}.m-r-60[_ngcontent-%COMP%]{margin-right:60px}.m-b-60[_ngcontent-%COMP%]{margin-bottom:60px}.m-l-60[_ngcontent-%COMP%]{margin-left:60px}.m-v-60[_ngcontent-%COMP%]{margin:60px 0}.m-h-60[_ngcontent-%COMP%]{margin:0 60px}.m-65[_ngcontent-%COMP%]{margin:65px}.m-t-65[_ngcontent-%COMP%]{margin-top:65px}.m-r-65[_ngcontent-%COMP%]{margin-right:65px}.m-b-65[_ngcontent-%COMP%]{margin-bottom:65px}.m-l-65[_ngcontent-%COMP%]{margin-left:65px}.m-v-65[_ngcontent-%COMP%]{margin:65px 0}.m-h-65[_ngcontent-%COMP%]{margin:0 65px}.m-70[_ngcontent-%COMP%]{margin:70px}.m-t-70[_ngcontent-%COMP%]{margin-top:70px}.m-r-70[_ngcontent-%COMP%]{margin-right:70px}.m-b-70[_ngcontent-%COMP%]{margin-bottom:70px}.m-l-70[_ngcontent-%COMP%]{margin-left:70px}.m-v-70[_ngcontent-%COMP%]{margin:70px 0}.m-h-70[_ngcontent-%COMP%]{margin:0 70px}.m-75[_ngcontent-%COMP%]{margin:75px}.m-t-75[_ngcontent-%COMP%]{margin-top:75px}.m-r-75[_ngcontent-%COMP%]{margin-right:75px}.m-b-75[_ngcontent-%COMP%]{margin-bottom:75px}.m-l-75[_ngcontent-%COMP%]{margin-left:75px}.m-v-75[_ngcontent-%COMP%]{margin:75px 0}.m-h-75[_ngcontent-%COMP%]{margin:0 75px}.m-80[_ngcontent-%COMP%]{margin:80px}.m-t-80[_ngcontent-%COMP%]{margin-top:80px}.m-r-80[_ngcontent-%COMP%]{margin-right:80px}.m-b-80[_ngcontent-%COMP%]{margin-bottom:80px}.m-l-80[_ngcontent-%COMP%]{margin-left:80px}.m-v-80[_ngcontent-%COMP%]{margin:80px 0}.m-h-80[_ngcontent-%COMP%]{margin:0 80px}.no-m[_ngcontent-%COMP%]{margin:0}.no-m-t[_ngcontent-%COMP%]{margin-top:0}.no-m-r[_ngcontent-%COMP%]{margin-right:0}.no-m-b[_ngcontent-%COMP%]{margin-bottom:0}.no-m-l[_ngcontent-%COMP%]{margin-left:0}.no-m-v[_ngcontent-%COMP%], .no-m-h[_ngcontent-%COMP%], .no-margin[_ngcontent-%COMP%]{margin:0}.no-m-lr[_ngcontent-%COMP%], .no-m-rl[_ngcontent-%COMP%]{margin-left:0;margin-right:0}.no-m-tb[_ngcontent-%COMP%], .no-m-bt[_ngcontent-%COMP%]{margin-top:0;margin-bottom:0}.m-t-only[_ngcontent-%COMP%]{margin-left:0;margin-right:0;margin-bottom:0}.m-b-only[_ngcontent-%COMP%]{margin-left:0;margin-right:0;margin-top:0}.m-l-only[_ngcontent-%COMP%]{margin-right:0;margin-top:0;margin-bottom:0}.m-r-only[_ngcontent-%COMP%]{margin-left:0;margin-top:0;margin-bottom:0}.m-auto[_ngcontent-%COMP%]{margin-left:auto;margin-right:auto}.ls-0[_ngcontent-%COMP%]{margin-left:10px;margin-right:10px}html[_ngcontent-%COMP%], body[_ngcontent-%COMP%]{-webkit-tap-highlight-color:transparent}div[_ngcontent-%COMP%]{box-sizing:border-box}.color-inherit[_ngcontent-%COMP%]{color:inherit}.no-shadow[_ngcontent-%COMP%]{box-shadow:none}.pointer[_ngcontent-%COMP%]{cursor:pointer}.nolist[_ngcontent-%COMP%]{list-style:none}.actions-menu[_ngcontent-%COMP%]{color:#fff}.alert[_ngcontent-%COMP%]{background-color:#e8f4fd;padding:6px 16px;font-size:.875rem;font-family:Roboto,Helvetica Neue,sans-serif;font-weight:400;line-height:1.43;border-radius:4px;letter-spacing:normal;margin:10px}.alert[_ngcontent-%COMP%] .message[_ngcontent-%COMP%]{padding:8px 0;font-size:18px}.alert[_ngcontent-%COMP%] .alert-check[_ngcontent-%COMP%]{color:#359ff4;margin-right:2px;font-size:1.4rem} .mat-tooltip{font-size:15px;color:#fff!important;background-color:#4461e2b3;border:1px solid rgb(25.7777777778,51.5555555556,166.2222222222);max-width:400px!important;white-space:pre-line!important}.loading[_ngcontent-%COMP%]{position:absolute;min-width:100%;width:100px;height:12px;background:linear-gradient(125deg,#fff,#4461e2,#fff);animation:grow 4s linear infinite,move 4s linear infinite}mat-card-title[_ngcontent-%COMP%]{font-weight:600;font-size:x-large;padding-left:20px;padding-top:20px}html[_ngcontent-%COMP%], body[_ngcontent-%COMP%]{overflow:hidden}.overflow-x-scroll[_ngcontent-%COMP%]{max-width:100%;overflow-x:auto}.overflow-no[_ngcontent-%COMP%]{overflow:hidden}.overflow-auto[_ngcontent-%COMP%]{overflow:auto}.overflow-scroll[_ngcontent-%COMP%]{overflow:scroll}.table-container[_ngcontent-%COMP%]{overflow-x:auto;max-width:100%}body[_ngcontent-%COMP%], .no-p[_ngcontent-%COMP%]{padding:0}.no-p-t[_ngcontent-%COMP%]{padding-top:0}.no-p-r[_ngcontent-%COMP%]{padding-right:0}.no-p-b[_ngcontent-%COMP%]{padding-bottom:0}.no-p-l[_ngcontent-%COMP%]{padding-left:0}.no-p-v[_ngcontent-%COMP%], .no-p-h[_ngcontent-%COMP%]{padding:0}.p-5[_ngcontent-%COMP%]{padding:5px}.p-t-5[_ngcontent-%COMP%]{padding-top:5px}.p-r-5[_ngcontent-%COMP%]{padding-right:5px}.p-b-5[_ngcontent-%COMP%]{padding-bottom:5px}.p-l-5[_ngcontent-%COMP%]{padding-left:5px}.p-v-5[_ngcontent-%COMP%]{padding:5px 0}.p-h-5[_ngcontent-%COMP%]{padding:0 5px}.p-10[_ngcontent-%COMP%]{padding:10px}.p-t-10[_ngcontent-%COMP%]{padding-top:10px}.p-b-10[_ngcontent-%COMP%]{padding-bottom:10px}.p-v-10[_ngcontent-%COMP%]{padding:10px 0}.p-h-10[_ngcontent-%COMP%]{padding:0 10px}.p-15[_ngcontent-%COMP%]{padding:15px}.p-t-15[_ngcontent-%COMP%]{padding-top:15px}.p-r-15[_ngcontent-%COMP%]{padding-right:15px}.p-b-15[_ngcontent-%COMP%]{padding-bottom:15px}.p-l-15[_ngcontent-%COMP%]{padding-left:15px}.p-v-15[_ngcontent-%COMP%]{padding:15px 0}.p-h-15[_ngcontent-%COMP%]{padding:0 15px}.p-20[_ngcontent-%COMP%]{padding:20px}.p-t-20[_ngcontent-%COMP%]{padding-top:20px}.p-r-20[_ngcontent-%COMP%]{padding-right:20px}.p-b-20[_ngcontent-%COMP%]{padding-bottom:20px}.p-l-20[_ngcontent-%COMP%]{padding-left:20px}.p-v-20[_ngcontent-%COMP%]{padding:20px 0}.p-h-20[_ngcontent-%COMP%]{padding:0 20px}.p-25[_ngcontent-%COMP%]{padding:25px}.p-t-25[_ngcontent-%COMP%]{padding-top:25px}.p-r-25[_ngcontent-%COMP%]{padding-right:25px}.p-b-25[_ngcontent-%COMP%]{padding-bottom:25px}.p-l-25[_ngcontent-%COMP%]{padding-left:25px}.p-v-25[_ngcontent-%COMP%]{padding:25px 0}.p-h-25[_ngcontent-%COMP%]{padding:0 25px}.p-30[_ngcontent-%COMP%]{padding:30px}.p-t-30[_ngcontent-%COMP%]{padding-top:30px}.p-r-30[_ngcontent-%COMP%]{padding-right:30px}.p-b-30[_ngcontent-%COMP%]{padding-bottom:30px}.p-l-30[_ngcontent-%COMP%]{padding-left:30px}.p-v-30[_ngcontent-%COMP%]{padding:30px 0}.p-h-30[_ngcontent-%COMP%]{padding:0 30px}.p-35[_ngcontent-%COMP%]{padding:35px}.p-t-35[_ngcontent-%COMP%]{padding-top:35px}.p-r-35[_ngcontent-%COMP%]{padding-right:35px}.p-b-35[_ngcontent-%COMP%]{padding-bottom:35px}.p-l-35[_ngcontent-%COMP%]{padding-left:35px}.p-v-35[_ngcontent-%COMP%]{padding:35px 0}.p-h-35[_ngcontent-%COMP%]{padding:0 35px}.p-40[_ngcontent-%COMP%]{padding:40px}.p-t-40[_ngcontent-%COMP%]{padding-top:40px}.p-r-40[_ngcontent-%COMP%]{padding-right:40px}.p-b-40[_ngcontent-%COMP%]{padding-bottom:40px}.p-l-40[_ngcontent-%COMP%]{padding-left:40px}.p-v-40[_ngcontent-%COMP%]{padding-top:40px;padding-bottom:40px}.p-h-40[_ngcontent-%COMP%]{padding:0 40px}.p-45[_ngcontent-%COMP%]{padding:45px}.p-t-45[_ngcontent-%COMP%]{padding-top:45px}.p-r-45[_ngcontent-%COMP%]{padding-right:45px}.p-b-45[_ngcontent-%COMP%]{padding-bottom:45px}.p-l-45[_ngcontent-%COMP%]{padding-left:45px}.p-v-45[_ngcontent-%COMP%]{padding:45px 0}.p-h-45[_ngcontent-%COMP%]{padding:0 45px}.p-50[_ngcontent-%COMP%]{padding:50px}.p-t-50[_ngcontent-%COMP%]{padding-top:50px}.p-r-50[_ngcontent-%COMP%]{padding-right:50px}.p-b-50[_ngcontent-%COMP%]{padding-bottom:50px}.p-l-50[_ngcontent-%COMP%]{padding-left:50px}.p-v-50[_ngcontent-%COMP%]{padding:50px 0}.p-h-50[_ngcontent-%COMP%]{padding:0 50px}.p-55[_ngcontent-%COMP%]{padding:55px}.p-t-55[_ngcontent-%COMP%]{padding-top:55px}.p-r-55[_ngcontent-%COMP%]{padding-right:55px}.p-b-55[_ngcontent-%COMP%]{padding-bottom:55px}.p-l-55[_ngcontent-%COMP%]{padding-left:55px}.p-v-55[_ngcontent-%COMP%]{padding:55px 0}.p-h-55[_ngcontent-%COMP%]{padding:0 55px}.p-60[_ngcontent-%COMP%]{padding:60px}.p-t-60[_ngcontent-%COMP%]{padding-top:60px}.p-r-60[_ngcontent-%COMP%]{padding-right:60px}.p-b-60[_ngcontent-%COMP%]{padding-bottom:60px}.p-l-60[_ngcontent-%COMP%]{padding-left:60px}.p-v-60[_ngcontent-%COMP%]{padding:60px 0}.p-h-60[_ngcontent-%COMP%]{padding:0 60px}.p-65[_ngcontent-%COMP%]{padding:65px}.p-t-65[_ngcontent-%COMP%]{padding-top:65px}.p-r-65[_ngcontent-%COMP%]{padding-right:65px}.p-b-65[_ngcontent-%COMP%]{padding-bottom:65px}.p-l-65[_ngcontent-%COMP%]{padding-left:65px}.p-v-65[_ngcontent-%COMP%]{padding:65px 0}.p-h-65[_ngcontent-%COMP%]{padding:0 65px}.p-70[_ngcontent-%COMP%]{padding:70px}.p-t-70[_ngcontent-%COMP%]{padding-top:70px}.p-r-70[_ngcontent-%COMP%]{padding-right:70px}.p-b-70[_ngcontent-%COMP%]{padding-bottom:70px}.p-l-70[_ngcontent-%COMP%]{padding-left:70px}.p-v-70[_ngcontent-%COMP%]{padding:70px 0}.p-h-70[_ngcontent-%COMP%]{padding:0 70px}.p-75[_ngcontent-%COMP%]{padding:75px}.p-t-75[_ngcontent-%COMP%]{padding-top:75px}.p-r-75[_ngcontent-%COMP%]{padding-right:75px}.p-b-75[_ngcontent-%COMP%]{padding-bottom:75px}.p-l-75[_ngcontent-%COMP%]{padding-left:75px}.p-v-75[_ngcontent-%COMP%]{padding:75px 0}.p-h-75[_ngcontent-%COMP%]{padding:0 75px}.p-80[_ngcontent-%COMP%]{padding:80px}.p-t-80[_ngcontent-%COMP%]{padding-top:80px}.p-r-80[_ngcontent-%COMP%]{padding-right:80px}.p-b-80[_ngcontent-%COMP%]{padding-bottom:80px}.p-l-80[_ngcontent-%COMP%]{padding-left:80px}.p-v-80[_ngcontent-%COMP%]{padding:80px 0}.p-h-80[_ngcontent-%COMP%]{padding:0 80px}.no-padding[_ngcontent-%COMP%]{padding:0!important}.no-pad-lr[_ngcontent-%COMP%], .no-pad-rl[_ngcontent-%COMP%]{padding-left:0;padding-right:0}.no-pad-tb[_ngcontent-%COMP%], .no-pad-bt[_ngcontent-%COMP%]{padding-top:0;padding-bottom:0}.pad-t-only[_ngcontent-%COMP%]{padding-left:0;padding-right:0;padding-bottom:0}.pad-b-only[_ngcontent-%COMP%]{padding-left:0;padding-right:0;padding-top:0}.pad-l-only[_ngcontent-%COMP%]{padding-right:0;padding-top:0;padding-bottom:0}.pad-r-only[_ngcontent-%COMP%]{padding-left:0;padding-top:0;padding-bottom:0}html[_ngcontent-%COMP%], body[_ngcontent-%COMP%], .rel[_ngcontent-%COMP%], .relative[_ngcontent-%COMP%]{position:relative}.abs[_ngcontent-%COMP%], .absolute[_ngcontent-%COMP%]{position:absolute}.fixed[_ngcontent-%COMP%]{position:fixed}.status-active[_ngcontent-%COMP%]{color:#5cb85c}.status-inactive[_ngcontent-%COMP%]{color:#666f73}.status-deleted[_ngcontent-%COMP%]{color:#000}.status-pending[_ngcontent-%COMP%]{color:orange}.status-approved[_ngcontent-%COMP%]{color:#4461e2}.status-overpaid[_ngcontent-%COMP%]{color:purple}.status-chargeoff[_ngcontent-%COMP%]{color:#f39c12}.status-active-overdue[_ngcontent-%COMP%], .status-block[_ngcontent-%COMP%]{color:red}.status-matured[_ngcontent-%COMP%]{color:#ff4000}.subStatus-contract-termination[_ngcontent-%COMP%]{color:#b3b3b3}.mat-step-header[_ngcontent-%COMP%] .mat-step-icon-state-done[_ngcontent-%COMP%]{background-color:#2af72a}.mat-step-header[_ngcontent-%COMP%] .mat-step-icon-state-done[_ngcontent-%COMP%] .status-transfer-progress[_ngcontent-%COMP%]{color:#ff4000}.mat-step-header[_ngcontent-%COMP%] .mat-step-icon-state-done[_ngcontent-%COMP%] .status-transfer-hold[_ngcontent-%COMP%]{color:#df0101}html[_ngcontent-%COMP%], body[_ngcontent-%COMP%]{-webkit-font-smoothing:antialiased}html[_ngcontent-%COMP%]{font-size:16px}body[_ngcontent-%COMP%]{font-family:Roboto,Helvetica Neue,sans-serif;font-weight:400;font-size:14px;color:#000000de;line-height:1.5;letter-spacing:normal}.mat-h1[_ngcontent-%COMP%], .mat-headline[_ngcontent-%COMP%], .mat-typography[_ngcontent-%COMP%] .mat-h1[_ngcontent-%COMP%], .mat-typography[_ngcontent-%COMP%] .mat-headline[_ngcontent-%COMP%], .mat-typography[_ngcontent-%COMP%] h1[_ngcontent-%COMP%]{font:400 24px/32px Roboto,Helvetica Neue,sans-serif;letter-spacing:normal;margin:0 0 16px}.lh-1[_ngcontent-%COMP%]{line-height:1}.lh-13[_ngcontent-%COMP%]{line-height:1.3}.lh-15[_ngcontent-%COMP%]{line-height:1.5}.bold[_ngcontent-%COMP%], .strong[_ngcontent-%COMP%]{font-weight:700}.no-bold[_ngcontent-%COMP%]{font-weight:400}.italic[_ngcontent-%COMP%], .em[_ngcontent-%COMP%]{font-style:italic}.strike[_ngcontent-%COMP%]{text-decoration:line-through}.normal[_ngcontent-%COMP%]{font-weight:400;font-style:normal}.uppercase[_ngcontent-%COMP%]{text-transform:uppercase}.text-left[_ngcontent-%COMP%]{text-align:left}.text-center[_ngcontent-%COMP%]{text-align:center}.text-right[_ngcontent-%COMP%]{text-align:right}.w100[_ngcontent-%COMP%]{font-weight:100}.w200[_ngcontent-%COMP%]{font-weight:200}.w300[_ngcontent-%COMP%]{font-weight:300}.w400[_ngcontent-%COMP%]{font-weight:400}.w500[_ngcontent-%COMP%]{font-weight:500}.w600[_ngcontent-%COMP%]{font-weight:600}.w700[_ngcontent-%COMP%]{font-weight:700}.w800[_ngcontent-%COMP%]{font-weight:800}.w900[_ngcontent-%COMP%]{font-weight:900}.f9[_ngcontent-%COMP%]{font-size:9px}.f10[_ngcontent-%COMP%]{font-size:10px}.f11[_ngcontent-%COMP%]{font-size:11px}.f12[_ngcontent-%COMP%]{font-size:12px}.f13[_ngcontent-%COMP%]{font-size:13px}.f14[_ngcontent-%COMP%]{font-size:14px}.f15[_ngcontent-%COMP%]{font-size:15px}.f16[_ngcontent-%COMP%]{font-size:16px}.f17[_ngcontent-%COMP%]{font-size:17px}.f18[_ngcontent-%COMP%]{font-size:18px;line-height:30px}.f19[_ngcontent-%COMP%]{font-size:19px}.f20[_ngcontent-%COMP%]{font-size:20px}.f30[_ngcontent-%COMP%]{font-size:30px}.f40[_ngcontent-%COMP%]{font-size:40px}.f50[_ngcontent-%COMP%]{font-size:50px}.f60[_ngcontent-%COMP%]{font-size:60px}.size-small[_ngcontent-%COMP%]{font-size:75%}.size-normal[_ngcontent-%COMP%]{font-size:100%}.size-medium[_ngcontent-%COMP%]{font-size:125%}.size-big[_ngcontent-%COMP%], .size-large[_ngcontent-%COMP%]{font-size:150%}.size-huge[_ngcontent-%COMP%]{font-size:200%}.inherit[_ngcontent-%COMP%]{font:inherit}.text-shadow[_ngcontent-%COMP%]{text-shadow:1px 1px 1px rgba(0,0,0,.4)}.text-rgb-2[_ngcontent-%COMP%]{color:#0003}.text-rgb-3[_ngcontent-%COMP%]{color:#0000004d}.text-rgb-4[_ngcontent-%COMP%]{color:#0006}.text-rgb-5[_ngcontent-%COMP%]{color:#00000080}.no-ul[_ngcontent-%COMP%], .no-ul[_ngcontent-%COMP%]:hover, .no-ul[_ngcontent-%COMP%] a[_ngcontent-%COMP%], .no-ul[_ngcontent-%COMP%] a[_ngcontent-%COMP%]:hover{text-decoration:none}.no-wrap[_ngcontent-%COMP%]{white-space:nowrap}.auto-cell-size[_ngcontent-%COMP%]{white-space:nowrap;width:1%}.ls-0[_ngcontent-%COMP%]{letter-spacing:-3px;white-space:nowrap}.label-field[_ngcontent-%COMP%]{margin-top:32px}.wrap-content[_ngcontent-%COMP%]{overflow-wrap:break-word;word-wrap:break-word}.no-break-content[_ngcontent-%COMP%]{overflow-wrap:anywhere!important}.fit[_ngcontent-%COMP%]{max-width:100%}.half-width[_ngcontent-%COMP%]{width:50%}.full-width[_ngcontent-%COMP%]{width:100%}.full-height[_ngcontent-%COMP%]{height:100%}html[_ngcontent-%COMP%], body[_ngcontent-%COMP%]{width:100%;height:100%;min-height:100%}body[_ngcontent-%COMP%] table[_ngcontent-%COMP%]{width:100%}.container[_ngcontent-%COMP%]{max-width:74rem;width:90%}.mw300[_ngcontent-%COMP%]{max-width:300px}.mw400[_ngcontent-%COMP%]{max-width:400px}.mw500[_ngcontent-%COMP%]{max-width:500px}.mw600[_ngcontent-%COMP%]{max-width:600px}.fullwidth[_ngcontent-%COMP%]{width:100%}.zindex-1[_ngcontent-%COMP%]{z-index:1}.zindex-2[_ngcontent-%COMP%]{z-index:2}.zindex-3[_ngcontent-%COMP%]{z-index:3}.zindex-4[_ngcontent-%COMP%]{z-index:4}table[_ngcontent-%COMP%]{width:100%;margin:2% 0%}.table-row[_ngcontent-%COMP%]{font-size:small}.container[_ngcontent-%COMP%]{padding-bottom:2%;width:98%}.check[_ngcontent-%COMP%]{padding-left:15px}.amount-changed[_ngcontent-%COMP%], .additional[_ngcontent-%COMP%]{color:#4461e2}.downpayment[_ngcontent-%COMP%]{color:#16a085}.paid[_ngcontent-%COMP%]{color:#666f73}.current[_ngcontent-%COMP%]{color:#5cb85c}.overdued[_ngcontent-%COMP%]{color:#ff4000}#repaymentSchedule[_ngcontent-%COMP%], #repaymentScheduleEdit[_ngcontent-%COMP%]{width:100%}.mat-header-cell[_ngcontent-%COMP%]{color:#0000008a;font-size:12px;font-weight:500}div.container[_ngcontent-%COMP%]{overflow:auto;max-width:100%}"]})}}return t})();var aS=()=>[50,100,200],oS=()=>["export"],rS=t=>[t,"reciept"],lS=t=>["/","journal-entry","view",t];function sS(t,n){if(t&1){let e=xt();s(0,"div",2)(1,"mat-checkbox",46),it("click",function(){mt(e);let a=P();return dt(a.hideReversed())}),c(2),p(3,"translate"),l(),s(4,"mat-checkbox",46),it("click",function(){mt(e);let a=P();return dt(a.hideAccruals())}),c(5),p(6,"translate"),l(),s(7,"button",47),c(8),p(9,"translate"),l()()}if(t&2){let e=P();o(),x("formControl",e.hideReversedParam),o(),v(" ",m(3,6,"labels.inputs.Hide Reversed")),o(2),x("formControl",e.hideAccrualsParam),o(),v(" ",m(6,8,"labels.inputs.Hide Accruals")),o(2),x("routerLink",Ut(12,oS)),o(),v(" ",m(9,10,"labels.buttons.Export")," ")}}function cS(t,n){if(t&1){let e=xt();s(0,"td",48),it("click",function(){let a=mt(e).$implicit,r=P();return dt(r.showTransactions(a))}),c(1),l()}if(t&2){let e=n.index;o(),v(" ",e+1," ")}}function pS(t,n){if(t&1){let e=xt();s(0,"td",49),it("click",function(){let a=mt(e).$implicit,r=P();return dt(r.showTransactions(a))}),c(1),l()}if(t&2){let e=n.$implicit,i=P();x("ngClass",i.loanTransactionColor(e)),o(),v(" ",e.id," ")}}function mS(t,n){if(t&1){let e=xt();s(0,"td",50),it("click",function(){let a=mt(e).$implicit,r=P();return dt(r.showTransactions(a))}),c(1),l()}if(t&2){let e=n.$implicit,i=P();x("ngClass",i.loanTransactionColor(e)),o(),v(" ",e.officeName," ")}}function dS(t,n){if(t&1&&(s(0,"td",51),T(1,"mifosx-external-identifier",52),l()),t&2){let e=n.$implicit,i=P();x("ngClass",i.loanTransactionColor(e)),o(),x("externalId",ce(e.externalId))}}function uS(t,n){if(t&1){let e=xt();s(0,"td",50),it("click",function(){let a=mt(e).$implicit,r=P();return dt(r.showTransactions(a))}),c(1),p(2,"dateFormat"),l()}if(t&2){let e=n.$implicit,i=P();x("ngClass",i.loanTransactionColor(e)),o(),v(" ",m(2,2,e.date)," ")}}function fS(t,n){if(t&1){let e=xt();s(0,"td",50),it("click",function(){let a=mt(e).$implicit,r=P();return dt(r.showTransactions(a))}),c(1),p(2,"translateKey"),l()}if(t&2){let e=n.$implicit,i=P();x("ngClass",i.loanTransactionColor(e)),o(),v(" ",Ge(2,2,e.type.value,"catalogs")," ")}}function hS(t,n){if(t&1){let e=xt();s(0,"td",53),it("click",function(){let a=mt(e).$implicit,r=P();return dt(r.showTransactions(a))}),c(1),p(2,"formatNumber"),l()}if(t&2){let e=n.$implicit,i=P();x("ngClass",i.loanTransactionColor(e)),o(),v(" ",m(2,2,e.amount)," ")}}function gS(t,n){if(t&1){let e=xt();s(0,"td",53),it("click",function(){let a=mt(e).$implicit,r=P();return dt(r.showTransactions(a))}),c(1),p(2,"formatNumber"),l()}if(t&2){let e=n.$implicit,i=P();x("ngClass",i.loanTransactionColor(e)),o(),v(" ",m(2,2,e.principalPortion)," ")}}function _S(t,n){if(t&1){let e=xt();s(0,"td",53),it("click",function(){let a=mt(e).$implicit,r=P();return dt(r.showTransactions(a))}),c(1),p(2,"formatNumber"),l()}if(t&2){let e=n.$implicit,i=P();x("ngClass",i.loanTransactionColor(e)),o(),v(" ",m(2,2,e.interestPortion)," ")}}function CS(t,n){if(t&1){let e=xt();s(0,"td",53),it("click",function(){let a=mt(e).$implicit,r=P();return dt(r.showTransactions(a))}),c(1),p(2,"formatNumber"),l()}if(t&2){let e=n.$implicit,i=P();x("ngClass",i.loanTransactionColor(e)),o(),v(" ",m(2,2,e.feeChargesPortion)," ")}}function bS(t,n){if(t&1){let e=xt();s(0,"td",53),it("click",function(){let a=mt(e).$implicit,r=P();return dt(r.showTransactions(a))}),c(1),p(2,"formatNumber"),l()}if(t&2){let e=n.$implicit,i=P();x("ngClass",i.loanTransactionColor(e)),o(),v(" ",m(2,2,e.penaltyChargesPortion)," ")}}function vS(t,n){if(t&1){let e=xt();s(0,"td",53),it("click",function(){let a=mt(e).$implicit,r=P();return dt(r.showTransactions(a))}),c(1),p(2,"formatNumber"),l()}if(t&2){let e=n.$implicit,i=P();x("ngClass",i.loanTransactionColor(e)),o(),v(" ",m(2,2,e.outstandingLoanBalance)," ")}}function xS(t,n){if(t&1&&(s(0,"button",55)(1,"mat-icon"),c(2,"more_vert"),l()()),t&2){P();let e=Lt(3);x("matMenuTriggerFor",e)}}function yS(t,n){if(t&1){let e=xt();s(0,"span")(1,"button",56),it("click",function(){mt(e);let a=P().$implicit,r=P();return dt(r.showTransactions(a))}),s(2,"mat-icon"),T(3,"fa-icon",57),l(),s(4,"span"),c(5),p(6,"translate"),l()()()}t&2&&(o(5),b(m(6,1,"labels.text.View Transaction")))}function SS(t,n){if(t&1){let e=xt();s(0,"span")(1,"button",56),it("click",function(){mt(e);let a=P().$implicit,r=P();return dt(r.openInterestRefundDialog(a))}),s(2,"mat-icon"),T(3,"fa-icon",58),l(),s(4,"span"),c(5),p(6,"translate"),l()()()}t&2&&(o(5),b(m(6,1,"tooltips.Create Interest Refund")))}function DS(t,n){if(t&1){let e=xt();s(0,"button",56),it("click",function(a){mt(e);let r=P(2).$implicit,u=P();return dt(u.undoTransaction(r,a))}),s(1,"mat-icon"),T(2,"fa-icon",62),l(),s(3,"span"),c(4),p(5,"translate"),l()()}t&2&&(o(4),b(m(5,1,"tooltips.Undo Transaction")))}function wS(t,n){if(t&1){let e=xt();s(0,"span"),k(1,DS,6,3,"button",59),s(2,"button",60),it("click",function(a){mt(e);let r=P(2);return dt(r.routeEdit(a))}),s(3,"mat-icon"),T(4,"fa-icon",61),l(),s(5,"span"),c(6),p(7,"translate"),l()()()}if(t&2){let e=P().$implicit;o(),x("mifosxHasPermission","ADJUST_LOAN"),o(),x("routerLink",La(5,rS,e.id)),o(4),b(m(7,3,"tooltips.View Receipts"))}}function TS(t,n){if(t&1){let e=xt();s(0,"button",56),it("click",function(a){mt(e);let r=P(2).$implicit,u=P();return dt(u.undoReAgeOrReAmortize(r,a))}),s(1,"mat-icon"),T(2,"fa-icon",62),l(),s(3,"span"),c(4),p(5,"translate"),l()()}t&2&&(o(4),b(m(5,1,"labels.menus.Undo Re-Age")))}function PS(t,n){t&1&&(s(0,"span"),k(1,TS,6,3,"button",59),l()),t&2&&(o(),x("mifosxHasPermission","UNDO_REAGE_LOAN"))}function AS(t,n){if(t&1){let e=xt();s(0,"button",56),it("click",function(a){mt(e);let r=P(2).$implicit,u=P();return dt(u.undoReAgeOrReAmortize(r,a))}),s(1,"mat-icon"),T(2,"fa-icon",62),l(),s(3,"span"),c(4),p(5,"translate"),l()()}t&2&&(o(4),b(m(5,1,"labels.menus.Undo Re-Amortize")))}function MS(t,n){t&1&&(s(0,"span"),k(1,AS,6,3,"button",59),l()),t&2&&(o(),x("mifosxHasPermission","UNDO_REAMORTIZE_LOAN"))}function OS(t,n){if(t&1){let e=xt();s(0,"button",56),it("click",function(a){mt(e);let r=P(2).$implicit,u=P();return dt(u.capitalizedIncomeAdjustmentTransaction(r,a))}),s(1,"mat-icon"),T(2,"fa-icon",63),l(),s(3,"span"),c(4),p(5,"translate"),l()()}t&2&&(o(4),b(m(5,1,"labels.menus.Capitalized Income Adjustment")))}function IS(t,n){t&1&&(s(0,"span"),k(1,OS,6,3,"button",59),l()),t&2&&(o(),x("mifosxHasPermission","CAPITALIZEDINCOME_LOAN"))}function ES(t,n){if(t&1){let e=xt();s(0,"button",56),it("click",function(a){mt(e);let r=P(2).$implicit,u=P();return dt(u.buyDownFeeAdjustmentTransaction(r,a))}),s(1,"mat-icon"),T(2,"fa-icon",63),l(),s(3,"span"),c(4),p(5,"translate"),l()()}t&2&&(o(4),b(m(5,1,"labels.menus.Buy Down Fee Adjustment")))}function LS(t,n){t&1&&(s(0,"span"),k(1,ES,6,3,"button",59),l()),t&2&&(o(),x("mifosxHasPermission","BUYDOWNFEE_LOAN"))}function NS(t,n){if(t&1){let e=xt();s(0,"span")(1,"button",64),it("click",function(a){mt(e);let r=P(2);return dt(r.routeEdit(a))}),s(2,"mat-icon"),T(3,"fa-icon",65),l(),s(4,"span"),c(5),p(6,"translate"),l()()()}if(t&2){let e=P().$implicit;o(),x("routerLink",La(4,lS,"L"+e.id)),o(4),b(m(6,2,"tooltips.View Journal Entries"))}}function kS(t,n){if(t&1&&(s(0,"td",54),M(1,xS,3,1,"button",55),s(2,"mat-menu",null,0),M(4,yS,7,3,"span"),M(5,SS,7,3,"span"),M(6,wS,8,7,"span"),M(7,PS,2,1,"span"),M(8,MS,2,1,"span"),M(9,IS,2,1,"span"),M(10,LS,2,1,"span"),M(11,NS,7,6,"span"),l()()),t&2){let e=n.$implicit,i=P();o(),O(i.displaySubMenu(e)?1:-1),o(3),O(i.showTransaction(e)?4:-1),o(),O(i.canCreateInterestRefund(e)?5:-1),o(),O(i.allowUndoTransaction(e)?6:-1),o(),O(i.isReAge(e.type)&&!e.manuallyReversed?7:-1),o(),O(i.isReAmortize(e.type)&&!e.manuallyReversed?8:-1),o(),O(i.isCapitalizedIncome(e.type)&&!e.manuallyReversed?9:-1),o(),O(i.isBuyDownFee(e.type)&&!e.manuallyReversed?10:-1),o(),O(i.viewJournalEntry(e.type)?11:-1)}}function FS(t,n){t&1&&(s(0,"th",66),c(1,"#"),l())}function RS(t,n){t&1&&(s(0,"th",66),c(1),p(2,"translate"),l()),t&2&&(o(),b(m(2,1,"labels.inputs.Id")))}function BS(t,n){t&1&&(s(0,"th",66),c(1),p(2,"translate"),l()),t&2&&(o(),b(m(2,1,"labels.inputs.Office")))}function qS(t,n){t&1&&(s(0,"th",66),c(1),p(2,"translate"),l()),t&2&&(o(),b(m(2,1,"labels.inputs.External Id")))}function jS(t,n){t&1&&(s(0,"th",66),c(1),p(2,"translate"),l()),t&2&&(o(),b(m(2,1,"labels.inputs.Transaction Date")))}function zS(t,n){t&1&&(s(0,"th",66),c(1),p(2,"translate"),l()),t&2&&(o(),b(m(2,1,"labels.inputs.Transaction Type")))}function VS(t,n){t&1&&T(0,"th",66)}function US(t,n){t&1&&(s(0,"th",67),c(1),p(2,"translate"),l()),t&2&&(oa("colspan",4),o(),v(" ",m(2,2,"labels.inputs.Breakdown")," "))}function HS(t,n){t&1&&(s(0,"th",66),c(1),p(2,"translate"),l()),t&2&&(o(),b(m(2,1,"labels.inputs.Loan Balance")))}function GS(t,n){t&1&&(s(0,"th",67),c(1),p(2,"translate"),l()),t&2&&(o(),b(m(2,1,"labels.inputs.Actions")))}function WS(t,n){t&1&&T(0,"th",66),t&2&&oa("colspan",6)}function $S(t,n){t&1&&(s(0,"th",68),c(1),p(2,"translate"),l()),t&2&&(oa("colspan",1),o(),v(" ",m(2,2,"labels.inputs.Amount")," "))}function YS(t,n){t&1&&(s(0,"th",68),c(1),p(2,"translate"),l()),t&2&&(oa("colspan",1),o(),v(" ",m(2,2,"labels.inputs.Principal")," "))}function ZS(t,n){t&1&&(s(0,"th",68),c(1),p(2,"translate"),l()),t&2&&(oa("colspan",1),o(),v(" ",m(2,2,"labels.inputs.Interest")," "))}function KS(t,n){t&1&&(s(0,"th",68),c(1),p(2,"translate"),l()),t&2&&(oa("colspan",1),o(),v(" ",m(2,2,"labels.inputs.Fees")," "))}function JS(t,n){t&1&&(s(0,"th",68),c(1),p(2,"translate"),l()),t&2&&(oa("colspan",1),o(),v(" ",m(2,2,"labels.inputs.Penalties")," "))}function XS(t,n){t&1&&T(0,"th",66),t&2&&oa("colspan",2)}function QS(t,n){t&1&&T(0,"tr",69)}function tD(t,n){t&1&&T(0,"tr",69)}function eD(t,n){t&1&&T(0,"tr",70)}var ym=(()=>{class t{constructor(){this.route=A(Et),this.dateUtils=A(de),this.router=A(le),this.dialog=A(Gn),this.loansService=A(Mt),this.translateService=A(pa),this.settingsService=A(oe),this.alertService=A(Jl),this.transactionsData=[],this.displayedColumns=["row","id","office","externalId","date","transactionType","amount","principal","interest","fee","penalties","loanBalance","actions"],this.displayedHeader1Columns=["h1-row","h1-id","h1-office","h1-external-id","h1-transaction-date","h1-transaction-type","h1-space","h1-breakdown","h1-loan-balance","h1-actions"],this.displayedHeader2Columns=["h2-space","h2-amount","h2-principal","h2-interest","h2-fees","h2-penalties","h2-action"],this.route.parent.parent.data.subscribe(e=>{this.loanDetailsData=e.loanDetailsData,this.status=e.loanDetailsData.status.value}),this.loanId=this.route.parent.parent.snapshot.params.loanId}ngOnInit(){this.transactionsData=this.loanDetailsData.transactions,this.hideAccrualsParam=new pe(!1),this.hideReversedParam=new pe(!1),this.setLoanTransactions()}setLoanTransactions(){this.transactionsData.forEach(e=>{e.date=this.dateUtils.parseDate(e.date)}),this.dataSource=new Li(this.transactionsData),this.dataSource.paginator=this.paginator,this.dataSource.sort=this.sort}checkStatus(){return this.status==="Active"||this.status==="Closed (obligations met)"||this.status==="Overpaid"||this.status==="Closed (rescheduled)"||this.status==="Closed (written off)"}hideAccruals(){this.filterTransactions(this.hideReversedParam.value,this.hideAccrualsParam.value)}hideReversed(){this.filterTransactions(this.hideReversedParam.value,this.hideAccrualsParam.value)}filterTransactions(e,i){let a=this.transactionsData;(i||e)&&(a=this.transactionsData.filter(r=>!(e&&r.manuallyReversed)&&!(i&&this.isAccrualKindOf(r.type)))),this.dataSource=new Li(a),this.dataSource.paginator=this.paginator,this.dataSource.sort=this.sort}applyFilter(e=""){this.dataSource.filter=e.trim().toLowerCase()}removeItem(e,i){return e.filter(a=>a!==i)}showTransactions(e){this.showTransaction(e)&&this.router.navigate([e.id],{relativeTo:this.route})}showTransaction(e){return[1,2,4,9,20,21,22,23,26,28,29,30,31,32,33,35,36,37,38,40,41,42].includes(e.type.id)}allowUndoTransaction(e){return e.manuallyReversed?!1:!(e.type.disbursement||e.type.chargeoff||this.isReAgoeOrReAmortize(e.type)||e.type.interestRefund||e.type.contractTermination)}loanTransactionColor(e){return e.manuallyReversed?"strike":e.transactionRelations&&e.transactionRelations.length>0?"linked":this.isAccrualKindOf(e.type)?"accrual":this.isChargeOff(e.type)?"chargeoff":this.isDownPayment(e.type)?"down-payment":this.isReAge(e.type)?"reage":this.isReAmortize(e.type)?"reamortize":""}routeEdit(e){e.stopPropagation()}undoTransaction(e,i){i.stopPropagation();let a=this.settingsService.language.code,r=this.settingsService.dateFormat,u=this.route.parent.parent.snapshot.params.loanId,d="undo",g=this.dateUtils.parseDate(e.date),_={};this.isChargeOff(e.type)?(d="undo-charge-off",g=this.settingsService.businessDate,_={}):this.isWriteOff(e.type)?(d="undowriteoff",_={transactionDate:this.dateUtils.formatDate(g&&new Date(g),r),transactionAmount:0,dateFormat:r,locale:a}):_={transactionDate:this.dateUtils.formatDate(g&&new Date(g),r),transactionAmount:0,dateFormat:r,locale:a},this.dialog.open(ma,{data:{heading:this.translateService.instant("labels.heading.Undo Transaction"),dialogContext:this.translateService.instant("labels.dialogContext.Are you sure you want undo the transaction type")+`${e.type.value}`+this.translateService.instant("labels.dialogContext.with id")+`${e.id}`}}).afterClosed().subscribe(I=>{if(I.confirm){let N=e.id;(this.isChargeOff(e.type)||d==="undowriteoff"||this.isWriteOff(e.type))&&(N=null),this.loansService.executeLoansAccountTransactionsCommand(u,d,_,N).subscribe(D=>{e.manuallyReversed=!0,this.reload()})}})}undoReAgeOrReAmortize(e){let i=e.type.reAmortize?"Re-Amortize":"Re-Age";this.dialog.open(ma,{data:{heading:this.translateService.instant("labels.heading.Undo Transaction"),dialogContext:this.translateService.instant("labels.dialogContext.Are you sure you want undo the transaction type")+" "+this.translateService.instant("labels.menus."+i)}}).afterClosed().subscribe(r=>{if(r.confirm){let u=i==="Re-Age"?"undoReAge":"undoReAmortize";this.loansService.executeLoansAccountTransactionsCommand(String(this.loanId),u,{}).subscribe(()=>{this.reload()})}})}isAccrual(e){return e.accrual||e.code==="loanTransactionType.overdueCharge"}isChargeOff(e){return e.chargeoff||e.code==="loanTransactionType.chargeOff"}isWriteOff(e){return e.writeOff||e.code==="loanTransactionType.writeOff"}isDownPayment(e){return e.downPayment||e.code==="loanTransactionType.downPayment"}isReAge(e){return e.reAge||e.code==="loanTransactionType.reAge"}isReAmortize(e){return e.reAmortize||e.code==="loanTransactionType.reAmortize"}isCapitalizedIncome(e){return e.capitalizedIncome||e.code==="loanTransactionType.capitalizedIncome"}isBuyDownFeeAmortization(e){return e.buyDownFeeAmortizationAdjustment||e.code==="loanTransactionType.buyDownFeeAmortizationAdjustment"}isAccrualKindOf(e){return this.isAccrual(e)||this.isCapitalizedIncomeAmortization(e)||this.isBuyDownFeeAmortization(e)}isCapitalizedIncomeAmortization(e){return e.capitalizedIncomeAmortization||e.code==="loanTransactionType.capitalizedIncomeAmortization"}isReAgoeOrReAmortize(e){return this.isReAmortize(e)||this.isReAge(e)}isBuyDownFee(e){return e.buyDownFee||e.code==="loanTransactionType.buyDownFee"}viewJournalEntry(e){return!(this.isReAmortize(e)||this.isReAge(e))}canCreateInterestRefund(e){let i=e?.type?.code?.toLowerCase()||"";return!(!(i.includes("payoutrefund")||i.includes("merchantissuedrefund"))||e.manuallyReversed||e.transactionRelations&&e.transactionRelations.some(r=>r.relationType==="INTEREST_REFUND"))}openInterestRefundDialog(e){let i=this.loanId;this.loansService.getLoanTransactionActionTemplate(String(i),"interest-refund",String(e.id)).subscribe(a=>{let r=new Zf({controlType:"select",controlName:"paymentTypeId",label:this.translateService.instant("labels.inputs.Payment Type"),value:a.paymentTypeId||"",required:!0,order:2});r.options={data:a.paymentTypeOptions||[],value:"id",label:"name"};let u=[new Ti({controlName:"amount",label:this.translateService.instant("labels.inputs.Amount"),value:a.amount,type:"number",required:!0,readonly:!0,order:1}),r,new Ti({controlName:"externalId",label:this.translateService.instant("labels.inputs.External Id"),value:"",type:"text",required:!1,order:3}),new Ti({controlName:"note",label:this.translateService.instant("labels.inputs.Note"),value:"",type:"text",required:!1,order:4})],d={title:this.translateService.instant("labels.buttons.Create Interest Refund"),layout:{addButtonText:this.translateService.instant("labels.buttons.Create Interest Refund")},formfields:u};this.dialog.open(_i,{data:d}).afterClosed().subscribe(_=>{if(_?.data){let y=_.data.value,{amount:I,transactionDate:N}=y,D=Sf(y,["amount","transactionDate"]),U=ve(ie({},D),{transactionAmount:I,locale:this.settingsService.language.code,dateFormat:this.settingsService.dateFormat});this.loansService.executeLoansAccountTransactionsCommand(String(i),"interest-refund",U,String(e.id)).subscribe(()=>{this.reload()})}})})}reload(){let e=this.route.parent.parent.snapshot.params.clientId,i=this.router.url;this.router.navigateByUrl("/clients",{skipLocationChange:!0}).then(()=>this.router.navigate([i]))}displaySubMenu(e){return!(this.isReAgoeOrReAmortize(e.type)&&e.manuallyReversed)}capitalizedIncomeAdjustmentTransaction(e){let i=`${this.loanId}`;this.loansService.getLoanTransactionActionTemplate(i,"capitalizedIncomeAdjustment",`${e.id}`).subscribe(a=>{let r=a.date||e.date;if(a.amount==0)this.displayAlertMessage("Capitalized Income amount adjusted already adjusted",e.amount);else{let u=a.amount||e.amount,d=[new la({controlName:"transactionDate",label:"Date",value:this.dateUtils.parseDate(r),type:"datetime-local",required:!0,minDate:this.dateUtils.parseDate(e.date),order:1}),new Ti({controlName:"amount",label:"Amount",value:u,type:"number",required:!0,min:.001,max:u,validators:[Gt.min(.001),Gt.max(u)],order:2})],g={title:`Adjustment ${e.type.value} Transaction`,layout:{addButtonText:"Adjustment"},formfields:d,pristine:!1};this.dialog.open(_i,{data:g}).afterClosed().subscribe(y=>{if(y.data){let I=this.settingsService.dateFormat;if(y.data.value.amount<=u){let N=this.settingsService.language.code,D={transactionDate:this.dateUtils.formatDate(y.data.value.transactionDate,I),transactionAmount:y.data.value.amount,locale:N,dateFormat:I};this.loansService.executeLoansAccountTransactionsCommand(i,"capitalizedIncomeAdjustment",D,e.id).subscribe(()=>{this.reload()})}else this.displayAlertMessage("Capitalized Income Adjustment amount must be lower or equal to",u)}})}})}buyDownFeeAdjustmentTransaction(e){let i=`${this.loanId}`;this.loansService.getLoanTransactionActionTemplate(i,"buyDownFeeAdjustment",`${e.id}`).subscribe(a=>{let r=a.date||e.date;if(a.amount==0)this.displayAlertMessage("Buy Down Fee amount already adjusted",e.amount);else{let u=a.amount||e.amount,d=[new la({controlName:"transactionDate",label:"Date",value:this.dateUtils.parseDate(r),type:"datetime-local",required:!0,minDate:this.dateUtils.parseDate(e.date),order:1}),new Ti({controlName:"amount",label:"Amount",value:u,type:"number",required:!0,min:.001,max:u,validators:[Gt.min(.001),Gt.max(u)],order:2})],g={title:`Adjustment ${e.type.value} Transaction`,layout:{addButtonText:"Adjustment"},formfields:d,pristine:!1};this.dialog.open(_i,{data:g}).afterClosed().subscribe(y=>{if(y.data){let I=this.settingsService.dateFormat;if(y.data.value.amount<=u){let N=this.settingsService.language.code,D={transactionDate:this.dateUtils.formatDate(y.data.value.transactionDate,I),transactionAmount:y.data.value.amount,locale:N,dateFormat:I};this.loansService.executeLoansAccountTransactionsCommand(i,"buyDownFeeAdjustment",D,e.id).subscribe(()=>{this.reload()})}else this.displayAlertMessage("Buy Down Fee Adjustment amount must be lower or equal to",u)}})}})}displayAlertMessage(e,i){let a=this.translateService.instant("errors."+e);i&&(a=a+": "+i),this.alertService.alert({type:"BusinessRule",message:a})}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=Dt({type:t,selectors:[["mifosx-transactions-tab"]],viewQuery:function(i,a){if(i&1&&(mi(Do,7),mi(wo,7)),i&2){let r;di(r=ui())&&(a.paginator=r.first),di(r=ui())&&(a.sort=r.first)}},decls:67,vars:8,consts:[["transactionMenu","matMenu"],[1,"container"],[1,"layout-row","transaction-buttons","align-end","gap-20px"],["mat-table","","matSort","",3,"dataSource"],["matColumnDef","row"],["mat-cell","",3,"click",4,"matCellDef"],["matColumnDef","id"],["mat-cell","","class","td-select",3,"ngClass","click",4,"matCellDef"],["matColumnDef","office"],["mat-cell","",3,"ngClass","click",4,"matCellDef"],["matColumnDef","externalId"],["mat-cell","",3,"ngClass",4,"matCellDef"],["matColumnDef","date"],["matColumnDef","transactionType"],["matColumnDef","amount"],["mat-cell","","class","r-amount td-min-space",3,"ngClass","click",4,"matCellDef"],["matColumnDef","principal"],["matColumnDef","interest"],["matColumnDef","fee"],["matColumnDef","penalties"],["matColumnDef","loanBalance"],["matColumnDef","actions"],["mat-cell","","class","center",4,"matCellDef"],["matColumnDef","h1-row"],["mat-header-cell","",4,"matHeaderCellDef"],["matColumnDef","h1-id"],["matColumnDef","h1-office"],["matColumnDef","h1-external-id"],["matColumnDef","h1-transaction-date"],["matColumnDef","h1-transaction-type"],["matColumnDef","h1-space"],["matColumnDef","h1-breakdown"],["mat-header-cell","","class","center",4,"matHeaderCellDef"],["matColumnDef","h1-loan-balance"],["matColumnDef","h1-actions"],["matColumnDef","h2-space"],["matColumnDef","h2-amount"],["mat-header-cell","","class","r-amount",4,"matHeaderCellDef"],["matColumnDef","h2-principal"],["matColumnDef","h2-interest"],["matColumnDef","h2-fees"],["matColumnDef","h2-penalties"],["matColumnDef","h2-action"],["mat-header-row","",4,"matHeaderRowDef"],["mat-row","","class","select-row",4,"matRowDef","matRowDefColumns"],["showFirstLastButtons","",3,"pageSize","pageSizeOptions"],[1,"accruals",3,"click","formControl"],["mat-raised-button","","color","primary",1,"transaction-button",3,"routerLink"],["mat-cell","",3,"click"],["mat-cell","",1,"td-select",3,"click","ngClass"],["mat-cell","",3,"click","ngClass"],["mat-cell","",3,"ngClass"],[3,"externalId"],["mat-cell","",1,"r-amount","td-min-space",3,"click","ngClass"],["mat-cell","",1,"center"],["mat-icon-button","","aria-label","",1,"action-button",3,"matMenuTriggerFor"],["mat-menu-item","",3,"click"],["icon","eye","size","sm"],["icon","plus","size","sm"],["mat-menu-item","",3,"click",4,"mifosxHasPermission"],["mat-menu-item","",1,"account-action-button",3,"click","routerLink"],["icon","receipt","size","sm"],["icon","undo","size","sm"],["icon","coins","size","sm"],["mat-menu-item","",3,"click","routerLink"],["icon","table-cells","size","sm"],["mat-header-cell",""],["mat-header-cell","",1,"center"],["mat-header-cell","",1,"r-amount"],["mat-header-row",""],["mat-row","",1,"select-row"]],template:function(i,a){i&1&&(s(0,"div",1),M(1,sS,10,13,"div",2),s(2,"table",3),X(3,4),k(4,cS,2,1,"td",5),Q(),X(5,6),k(6,pS,2,2,"td",7),Q(),X(7,8),k(8,mS,2,2,"td",9),Q(),X(9,10),k(10,dS,2,3,"td",11),Q(),X(11,12),k(12,uS,3,4,"td",9),Q(),X(13,13),k(14,fS,3,5,"td",9),Q(),X(15,14),k(16,hS,3,4,"td",15),Q(),X(17,16),k(18,gS,3,4,"td",15),Q(),X(19,17),k(20,_S,3,4,"td",15),Q(),X(21,18),k(22,CS,3,4,"td",15),Q(),X(23,19),k(24,bS,3,4,"td",15),Q(),X(25,20),k(26,vS,3,4,"td",15),Q(),X(27,21),k(28,kS,12,9,"td",22),Q(),X(29,23),k(30,FS,2,0,"th",24),Q(),X(31,25),k(32,RS,3,3,"th",24),Q(),X(33,26),k(34,BS,3,3,"th",24),Q(),X(35,27),k(36,qS,3,3,"th",24),Q(),X(37,28),k(38,jS,3,3,"th",24),Q(),X(39,29),k(40,zS,3,3,"th",24),Q(),X(41,30),k(42,VS,1,0,"th",24),Q(),X(43,31),k(44,US,3,4,"th",32),Q(),X(45,33),k(46,HS,3,3,"th",24),Q(),X(47,34),k(48,GS,3,3,"th",32),Q(),X(49,35),k(50,WS,1,1,"th",24),Q(),X(51,36),k(52,$S,3,4,"th",37),Q(),X(53,38),k(54,YS,3,4,"th",37),Q(),X(55,39),k(56,ZS,3,4,"th",37),Q(),X(57,40),k(58,KS,3,4,"th",37),Q(),X(59,41),k(60,JS,3,4,"th",37),Q(),X(61,42),k(62,XS,1,1,"th",24),Q(),k(63,QS,1,0,"tr",43)(64,tD,1,0,"tr",43)(65,eD,1,0,"tr",44),l(),T(66,"mat-paginator",45),l()),i&2&&(o(),O(a.checkStatus()?1:-1),o(),x("dataSource",a.dataSource),o(61),x("matHeaderRowDef",a.displayedHeader1Columns),o(),x("matHeaderRowDef",a.displayedHeader2Columns),o(),x("matRowDefColumns",a.displayedColumns),o(),x("pageSize",100)("pageSizeOptions",Ut(7,aS)))},dependencies:[wt,ca,Tt,he,Wo,ae,Wt,Da,Ae,bn,wo,yn,vn,Dn,Va,Ba,vp,xp,bp,Cp,un,xn,Sn,wn,Pn,Tn,An,Do,En,Pt,qa,hn],styles:["body[_ngcontent-%COMP%] table[_ngcontent-%COMP%] tbody[_ngcontent-%COMP%] tr[_ngcontent-%COMP%]:nth-child(2n){background-color:#f2f2f2}.bg-black[_ngcontent-%COMP%]{background-color:#000}.bg-light-grey[_ngcontent-%COMP%]{background-color:#e5e5e5}.bg-medium-grey[_ngcontent-%COMP%]{background-color:#ccc}.bg-grey[_ngcontent-%COMP%]{background-color:#999}.bg-dark-grey[_ngcontent-%COMP%]{background-color:#222}.bg-white[_ngcontent-%COMP%], .bg-fff[_ngcontent-%COMP%]{background-color:#fff}.bg-none[_ngcontent-%COMP%], .no-bg[_ngcontent-%COMP%]{background:none;background-image:none;background-color:transparent}.bg-facebook[_ngcontent-%COMP%]{background-color:#47639e}.bg-twitter[_ngcontent-%COMP%]{background-color:#02a8f3}body[_ngcontent-%COMP%] table[_ngcontent-%COMP%]{border:1px solid rgba(0,0,0,.12)}.no-border[_ngcontent-%COMP%]{border:none}.no-border-t[_ngcontent-%COMP%]{border-top:none}.no-border-r[_ngcontent-%COMP%]{border-right:none}.no-border-b[_ngcontent-%COMP%]{border-bottom:none}.no-border-l[_ngcontent-%COMP%]{border-left:none}.no-border-lr[_ngcontent-%COMP%], .no-border-rl[_ngcontent-%COMP%]{border-left:none;border-right:none}.no-border-tb[_ngcontent-%COMP%], .no-border-bt[_ngcontent-%COMP%]{border-top:none;border-bottom:none}.no-border-tl[_ngcontent-%COMP%], .no-border-lt[_ngcontent-%COMP%]{border-top:none;border-left:none}.no-border-tr[_ngcontent-%COMP%], .no-border-rt[_ngcontent-%COMP%]{border-top:none;border-right:none}.no-border-bl[_ngcontent-%COMP%], .no-border-lb[_ngcontent-%COMP%]{border-bottom:none;border-left:none}.no-border-br[_ngcontent-%COMP%], .no-border-rb[_ngcontent-%COMP%]{border-bottom:none;border-right:none}.border-dashed[_ngcontent-%COMP%], .border-dotted[_ngcontent-%COMP%]{border-style:dashed}.border-black[_ngcontent-%COMP%]{border-color:#000}.border-light-grey[_ngcontent-%COMP%]{border-color:#e5e5e5}.border-medium-grey[_ngcontent-%COMP%]{border-color:#ccc}.border-grey[_ngcontent-%COMP%]{border-color:#999}.border-dark-grey[_ngcontent-%COMP%]{border-color:#2222}.border-white[_ngcontent-%COMP%], .border-fff[_ngcontent-%COMP%]{border-color:#fff}.no-border-radius[_ngcontent-%COMP%]{border-radius:0}.radius3[_ngcontent-%COMP%]{border-radius:3px}.radius5[_ngcontent-%COMP%]{border-radius:5px}.radius10[_ngcontent-%COMP%]{border-radius:10px}.column-mandatory[_ngcontent-%COMP%]{color:#5cb85c;text-align:center}.not-column-mandatory[_ngcontent-%COMP%]{color:#666f73;text-align:center}.cdk-drag-placeholder[_ngcontent-%COMP%]{background:#3498db}.yes[_ngcontent-%COMP%]{color:#5cb85c!important;background-color:#5cb85c;height:4px;cursor:none}.no[_ngcontent-%COMP%]{color:red;background-color:red;height:4px;cursor:none}.strike[_ngcontent-%COMP%]{text-decoration:line-through;color:red}.transfer[_ngcontent-%COMP%]{color:#16a085}.linked[_ngcontent-%COMP%]{color:#4461e2}.accrual[_ngcontent-%COMP%]{color:#999}.fa-question[_ngcontent-%COMP%]{color:#4461e2}.enabled[_ngcontent-%COMP%]{color:#32cd32}.disabled[_ngcontent-%COMP%]{color:#f44366}.v-mid[_ngcontent-%COMP%], .v-m[_ngcontent-%COMP%]{vertical-align:middle}.v-top[_ngcontent-%COMP%], .v-t[_ngcontent-%COMP%]{vertical-align:top}.v-bottom[_ngcontent-%COMP%], .v-b[_ngcontent-%COMP%]{vertical-align:bottom}.v-super[_ngcontent-%COMP%]{vertical-align:super}.r-amount[_ngcontent-%COMP%]{text-align:right!important;padding-right:5px!important}.left[_ngcontent-%COMP%]{text-align:left!important}.right[_ngcontent-%COMP%]{text-align:right!important}.center[_ngcontent-%COMP%]{text-align:center!important}.amount-plus[_ngcontent-%COMP%]{color:#000}.amount-minus[_ngcontent-%COMP%]{color:#4461e2}.block[_ngcontent-%COMP%]{display:block}.inline[_ngcontent-%COMP%]{display:inline}.in-block[_ngcontent-%COMP%]{display:inline-block;zoom:1}.d-none[_ngcontent-%COMP%], .hide[_ngcontent-%COMP%], .hidden[_ngcontent-%COMP%]{display:none}.t-0[_ngcontent-%COMP%]{top:0}.b-0[_ngcontent-%COMP%]{bottom:0}.l-0[_ngcontent-%COMP%]{left:0}.r-0[_ngcontent-%COMP%]{right:0}.tb-0[_ngcontent-%COMP%]{top:0;bottom:0}.lr-0[_ngcontent-%COMP%]{left:0;right:0}.f-left[_ngcontent-%COMP%]{float:left}.f-right[_ngcontent-%COMP%]{float:right}.f-none[_ngcontent-%COMP%]{float:none}textarea[_ngcontent-%COMP%]{resize:both}textarea.vertical[_ngcontent-%COMP%], textarea.horizontal[_ngcontent-%COMP%]{resize:vertical}textarea.noresize[_ngcontent-%COMP%]{resize:none}.full-input[_ngcontent-%COMP%] input[_ngcontent-%COMP%], .full-input[_ngcontent-%COMP%] select[_ngcontent-%COMP%], .full-input[_ngcontent-%COMP%] textarea[_ngcontent-%COMP%]{width:100%}.normal[_ngcontent-%COMP%] input[_ngcontent-%COMP%], .normal[_ngcontent-%COMP%] select[_ngcontent-%COMP%], .normal[_ngcontent-%COMP%] textarea[_ngcontent-%COMP%], .full-input[_ngcontent-%COMP%] [type=checkbox][_ngcontent-%COMP%], .full-input[_ngcontent-%COMP%] [type=radio][_ngcontent-%COMP%]{width:auto}.mat-tab-body-content[_ngcontent-%COMP%]{margin-bottom:20px}.mat-datepicker-input[_ngcontent-%COMP%]{margin-top:5px;margin-bottom:5px}.loader-wrapper[_ngcontent-%COMP%]{height:100vh;width:100vw}.loader-wrapper[_ngcontent-%COMP%] .triangle[_ngcontent-%COMP%]{width:0;height:0;border-style:solid;position:absolute;animation:_ngcontent-%COMP%_rotate .8s infinite .2s}.loader-wrapper[_ngcontent-%COMP%] .bottom[_ngcontent-%COMP%]{border-width:0 90px 90px;border-color:transparent transparent #1fb050;bottom:calc(50% - 100px);left:calc(50% - 90px)}.loader-wrapper[_ngcontent-%COMP%] .top[_ngcontent-%COMP%]{border-width:90px 90px 0;border-color:#b4d575 transparent transparent;top:calc(50% - 100px);left:calc(50% - 90px)}.loader-wrapper[_ngcontent-%COMP%] .left[_ngcontent-%COMP%]{border-width:90px 0 90px 90px;border-color:transparent transparent transparent #1074b9;top:calc(50% - 90px);left:calc(50% - 100px)}.loader-wrapper[_ngcontent-%COMP%] .right[_ngcontent-%COMP%]{border-width:90px 90px 90px 0;border-color:transparent #1daeec transparent transparent;top:calc(50% - 90px);right:calc(50% - 100px)}@keyframes _ngcontent-%COMP%_rotate{0%{transform:rotate(0)}to{transform:rotate(360deg)}}body[_ngcontent-%COMP%]{margin:0}.container[_ngcontent-%COMP%]{margin:0 auto}.mb-05[_ngcontent-%COMP%]{margin-bottom:.5rem}.mr-05[_ngcontent-%COMP%]{margin-right:.5rem}.mb-1[_ngcontent-%COMP%]{margin-bottom:1rem}.mt-1[_ngcontent-%COMP%]{margin-top:1rem}.m-5[_ngcontent-%COMP%]{margin:5px}.m-t-5[_ngcontent-%COMP%]{margin-top:5px}.m-r-5[_ngcontent-%COMP%]{margin-right:5px}.m-b-5[_ngcontent-%COMP%]{margin-bottom:5px}.m-l-5[_ngcontent-%COMP%]{margin-left:5px}.m-v-5[_ngcontent-%COMP%]{margin:5px 0}.m-h-5[_ngcontent-%COMP%]{margin:0 5px}.m-10[_ngcontent-%COMP%]{margin:10px}.m-t-10[_ngcontent-%COMP%]{margin-top:10px}.m-r-10[_ngcontent-%COMP%]{margin-right:10px}.m-b-10[_ngcontent-%COMP%]{margin-bottom:10px}.m-l-10[_ngcontent-%COMP%]{margin-left:10px}.m-v-10[_ngcontent-%COMP%]{margin:10px 0}.m-h-10[_ngcontent-%COMP%]{margin:0 10px}.m-15[_ngcontent-%COMP%]{margin:15px}.m-t-15[_ngcontent-%COMP%]{margin-top:15px}.m-r-15[_ngcontent-%COMP%]{margin-right:15px}.m-b-15[_ngcontent-%COMP%]{margin-bottom:15px}.m-l-15[_ngcontent-%COMP%]{margin-left:15px}.m-v-15[_ngcontent-%COMP%]{margin:15px 0}.m-h-15[_ngcontent-%COMP%]{margin:0 15px}.m-20[_ngcontent-%COMP%]{margin:20px}.m-t-20[_ngcontent-%COMP%]{margin-top:20px}.m-r-20[_ngcontent-%COMP%]{margin-right:20px}.m-b-20[_ngcontent-%COMP%]{margin-bottom:20px}.m-l-20[_ngcontent-%COMP%]{margin-left:20px}.m-v-20[_ngcontent-%COMP%]{margin:20px 0}.m-h-20[_ngcontent-%COMP%]{margin:0 20px}.m-25[_ngcontent-%COMP%]{margin:25px}.m-t-25[_ngcontent-%COMP%]{margin-top:25px}.m-r-25[_ngcontent-%COMP%]{margin-right:25px}.m-b-25[_ngcontent-%COMP%]{margin-bottom:25px}.m-l-25[_ngcontent-%COMP%]{margin-left:25px}.m-v-25[_ngcontent-%COMP%]{margin:25px 0}.m-h-25[_ngcontent-%COMP%]{margin:0 25px}.m-30[_ngcontent-%COMP%]{margin:30px}.m-t-30[_ngcontent-%COMP%]{margin-top:30px}.m-r-30[_ngcontent-%COMP%]{margin-right:30px}.m-b-30[_ngcontent-%COMP%]{margin-bottom:30px}.m-l-30[_ngcontent-%COMP%]{margin-left:30px}.m-v-30[_ngcontent-%COMP%]{margin:30px 0}.m-h-30[_ngcontent-%COMP%]{margin:0 30px}.m-35[_ngcontent-%COMP%]{margin:35px}.m-t-35[_ngcontent-%COMP%]{margin-top:35px}.m-r-35[_ngcontent-%COMP%]{margin-right:35px}.m-b-35[_ngcontent-%COMP%]{margin-bottom:35px}.m-l-35[_ngcontent-%COMP%]{margin-left:35px}.m-v-35[_ngcontent-%COMP%]{margin:35px 0}.m-h-35[_ngcontent-%COMP%]{margin:0 35px}.m-40[_ngcontent-%COMP%]{margin:40px}.m-t-40[_ngcontent-%COMP%]{margin-top:40px}.m-r-40[_ngcontent-%COMP%]{margin-right:40px}.m-b-40[_ngcontent-%COMP%]{margin-bottom:40px}.m-l-40[_ngcontent-%COMP%]{margin-left:40px}.m-v-40[_ngcontent-%COMP%]{margin:40px 0}.m-h-40[_ngcontent-%COMP%]{margin:0 40px}.m-45[_ngcontent-%COMP%]{margin:45px}.m-t-45[_ngcontent-%COMP%]{margin-top:45px}.m-r-45[_ngcontent-%COMP%]{margin-right:45px}.m-b-45[_ngcontent-%COMP%]{margin-bottom:45px}.m-l-45[_ngcontent-%COMP%]{margin-left:45px}.m-v-45[_ngcontent-%COMP%]{margin:45px 0}.m-h-45[_ngcontent-%COMP%]{margin:0 45px}.m-50[_ngcontent-%COMP%]{margin:50px}.m-t-50[_ngcontent-%COMP%]{margin-top:50px}.m-r-50[_ngcontent-%COMP%]{margin-right:50px}.m-b-50[_ngcontent-%COMP%]{margin-bottom:50px}.m-l-50[_ngcontent-%COMP%]{margin-left:50px}.m-v-50[_ngcontent-%COMP%]{margin:50px 0}.m-h-50[_ngcontent-%COMP%]{margin:0 50px}.m-55[_ngcontent-%COMP%]{margin:55px}.m-t-55[_ngcontent-%COMP%]{margin-top:55px}.m-r-55[_ngcontent-%COMP%]{margin-right:55px}.m-b-55[_ngcontent-%COMP%]{margin-bottom:55px}.m-l-55[_ngcontent-%COMP%]{margin-left:55px}.m-v-55[_ngcontent-%COMP%]{margin:55px 0}.m-h-55[_ngcontent-%COMP%]{margin:0 55px}.m-60[_ngcontent-%COMP%]{margin:60px}.m-t-60[_ngcontent-%COMP%]{margin-top:60px}.m-r-60[_ngcontent-%COMP%]{margin-right:60px}.m-b-60[_ngcontent-%COMP%]{margin-bottom:60px}.m-l-60[_ngcontent-%COMP%]{margin-left:60px}.m-v-60[_ngcontent-%COMP%]{margin:60px 0}.m-h-60[_ngcontent-%COMP%]{margin:0 60px}.m-65[_ngcontent-%COMP%]{margin:65px}.m-t-65[_ngcontent-%COMP%]{margin-top:65px}.m-r-65[_ngcontent-%COMP%]{margin-right:65px}.m-b-65[_ngcontent-%COMP%]{margin-bottom:65px}.m-l-65[_ngcontent-%COMP%]{margin-left:65px}.m-v-65[_ngcontent-%COMP%]{margin:65px 0}.m-h-65[_ngcontent-%COMP%]{margin:0 65px}.m-70[_ngcontent-%COMP%]{margin:70px}.m-t-70[_ngcontent-%COMP%]{margin-top:70px}.m-r-70[_ngcontent-%COMP%]{margin-right:70px}.m-b-70[_ngcontent-%COMP%]{margin-bottom:70px}.m-l-70[_ngcontent-%COMP%]{margin-left:70px}.m-v-70[_ngcontent-%COMP%]{margin:70px 0}.m-h-70[_ngcontent-%COMP%]{margin:0 70px}.m-75[_ngcontent-%COMP%]{margin:75px}.m-t-75[_ngcontent-%COMP%]{margin-top:75px}.m-r-75[_ngcontent-%COMP%]{margin-right:75px}.m-b-75[_ngcontent-%COMP%]{margin-bottom:75px}.m-l-75[_ngcontent-%COMP%]{margin-left:75px}.m-v-75[_ngcontent-%COMP%]{margin:75px 0}.m-h-75[_ngcontent-%COMP%]{margin:0 75px}.m-80[_ngcontent-%COMP%]{margin:80px}.m-t-80[_ngcontent-%COMP%]{margin-top:80px}.m-r-80[_ngcontent-%COMP%]{margin-right:80px}.m-b-80[_ngcontent-%COMP%]{margin-bottom:80px}.m-l-80[_ngcontent-%COMP%]{margin-left:80px}.m-v-80[_ngcontent-%COMP%]{margin:80px 0}.m-h-80[_ngcontent-%COMP%]{margin:0 80px}.no-m[_ngcontent-%COMP%]{margin:0}.no-m-t[_ngcontent-%COMP%]{margin-top:0}.no-m-r[_ngcontent-%COMP%]{margin-right:0}.no-m-b[_ngcontent-%COMP%]{margin-bottom:0}.no-m-l[_ngcontent-%COMP%]{margin-left:0}.no-m-v[_ngcontent-%COMP%], .no-m-h[_ngcontent-%COMP%], .no-margin[_ngcontent-%COMP%]{margin:0}.no-m-lr[_ngcontent-%COMP%], .no-m-rl[_ngcontent-%COMP%]{margin-left:0;margin-right:0}.no-m-tb[_ngcontent-%COMP%], .no-m-bt[_ngcontent-%COMP%]{margin-top:0;margin-bottom:0}.m-t-only[_ngcontent-%COMP%]{margin-left:0;margin-right:0;margin-bottom:0}.m-b-only[_ngcontent-%COMP%]{margin-left:0;margin-right:0;margin-top:0}.m-l-only[_ngcontent-%COMP%]{margin-right:0;margin-top:0;margin-bottom:0}.m-r-only[_ngcontent-%COMP%]{margin-left:0;margin-top:0;margin-bottom:0}.m-auto[_ngcontent-%COMP%]{margin-left:auto;margin-right:auto}.ls-0[_ngcontent-%COMP%]{margin-left:10px;margin-right:10px}html[_ngcontent-%COMP%], body[_ngcontent-%COMP%]{-webkit-tap-highlight-color:transparent}div[_ngcontent-%COMP%]{box-sizing:border-box}.color-inherit[_ngcontent-%COMP%]{color:inherit}.no-shadow[_ngcontent-%COMP%]{box-shadow:none}.pointer[_ngcontent-%COMP%]{cursor:pointer}.nolist[_ngcontent-%COMP%]{list-style:none}.actions-menu[_ngcontent-%COMP%]{color:#fff}.alert[_ngcontent-%COMP%]{background-color:#e8f4fd;padding:6px 16px;font-size:.875rem;font-family:Roboto,Helvetica Neue,sans-serif;font-weight:400;line-height:1.43;border-radius:4px;letter-spacing:normal;margin:10px}.alert[_ngcontent-%COMP%] .message[_ngcontent-%COMP%]{padding:8px 0;font-size:18px}.alert[_ngcontent-%COMP%] .alert-check[_ngcontent-%COMP%]{color:#359ff4;margin-right:2px;font-size:1.4rem} .mat-tooltip{font-size:15px;color:#fff!important;background-color:#4461e2b3;border:1px solid rgb(25.7777777778,51.5555555556,166.2222222222);max-width:400px!important;white-space:pre-line!important}.loading[_ngcontent-%COMP%]{position:absolute;min-width:100%;width:100px;height:12px;background:linear-gradient(125deg,#fff,#4461e2,#fff);animation:grow 4s linear infinite,move 4s linear infinite}mat-card-title[_ngcontent-%COMP%]{font-weight:600;font-size:x-large;padding-left:20px;padding-top:20px}html[_ngcontent-%COMP%], body[_ngcontent-%COMP%]{overflow:hidden}.overflow-x-scroll[_ngcontent-%COMP%]{max-width:100%;overflow-x:auto}.overflow-no[_ngcontent-%COMP%]{overflow:hidden}.overflow-auto[_ngcontent-%COMP%]{overflow:auto}.overflow-scroll[_ngcontent-%COMP%]{overflow:scroll}.table-container[_ngcontent-%COMP%]{overflow-x:auto;max-width:100%}body[_ngcontent-%COMP%], .no-p[_ngcontent-%COMP%]{padding:0}.no-p-t[_ngcontent-%COMP%]{padding-top:0}.no-p-r[_ngcontent-%COMP%]{padding-right:0}.no-p-b[_ngcontent-%COMP%]{padding-bottom:0}.no-p-l[_ngcontent-%COMP%]{padding-left:0}.no-p-v[_ngcontent-%COMP%], .no-p-h[_ngcontent-%COMP%]{padding:0}.p-5[_ngcontent-%COMP%]{padding:5px}.p-t-5[_ngcontent-%COMP%]{padding-top:5px}.p-r-5[_ngcontent-%COMP%]{padding-right:5px}.p-b-5[_ngcontent-%COMP%]{padding-bottom:5px}.p-l-5[_ngcontent-%COMP%]{padding-left:5px}.p-v-5[_ngcontent-%COMP%]{padding:5px 0}.p-h-5[_ngcontent-%COMP%]{padding:0 5px}.p-10[_ngcontent-%COMP%]{padding:10px}.p-t-10[_ngcontent-%COMP%]{padding-top:10px}.p-b-10[_ngcontent-%COMP%]{padding-bottom:10px}.p-v-10[_ngcontent-%COMP%]{padding:10px 0}.p-h-10[_ngcontent-%COMP%]{padding:0 10px}.p-15[_ngcontent-%COMP%]{padding:15px}.p-t-15[_ngcontent-%COMP%]{padding-top:15px}.p-r-15[_ngcontent-%COMP%]{padding-right:15px}.p-b-15[_ngcontent-%COMP%]{padding-bottom:15px}.p-l-15[_ngcontent-%COMP%]{padding-left:15px}.p-v-15[_ngcontent-%COMP%]{padding:15px 0}.p-h-15[_ngcontent-%COMP%]{padding:0 15px}.p-20[_ngcontent-%COMP%]{padding:20px}.p-t-20[_ngcontent-%COMP%]{padding-top:20px}.p-r-20[_ngcontent-%COMP%]{padding-right:20px}.p-b-20[_ngcontent-%COMP%]{padding-bottom:20px}.p-l-20[_ngcontent-%COMP%]{padding-left:20px}.p-v-20[_ngcontent-%COMP%]{padding:20px 0}.p-h-20[_ngcontent-%COMP%]{padding:0 20px}.p-25[_ngcontent-%COMP%]{padding:25px}.p-t-25[_ngcontent-%COMP%]{padding-top:25px}.p-r-25[_ngcontent-%COMP%]{padding-right:25px}.p-b-25[_ngcontent-%COMP%]{padding-bottom:25px}.p-l-25[_ngcontent-%COMP%]{padding-left:25px}.p-v-25[_ngcontent-%COMP%]{padding:25px 0}.p-h-25[_ngcontent-%COMP%]{padding:0 25px}.p-30[_ngcontent-%COMP%]{padding:30px}.p-t-30[_ngcontent-%COMP%]{padding-top:30px}.p-r-30[_ngcontent-%COMP%]{padding-right:30px}.p-b-30[_ngcontent-%COMP%]{padding-bottom:30px}.p-l-30[_ngcontent-%COMP%]{padding-left:30px}.p-v-30[_ngcontent-%COMP%]{padding:30px 0}.p-h-30[_ngcontent-%COMP%]{padding:0 30px}.p-35[_ngcontent-%COMP%]{padding:35px}.p-t-35[_ngcontent-%COMP%]{padding-top:35px}.p-r-35[_ngcontent-%COMP%]{padding-right:35px}.p-b-35[_ngcontent-%COMP%]{padding-bottom:35px}.p-l-35[_ngcontent-%COMP%]{padding-left:35px}.p-v-35[_ngcontent-%COMP%]{padding:35px 0}.p-h-35[_ngcontent-%COMP%]{padding:0 35px}.p-40[_ngcontent-%COMP%]{padding:40px}.p-t-40[_ngcontent-%COMP%]{padding-top:40px}.p-r-40[_ngcontent-%COMP%]{padding-right:40px}.p-b-40[_ngcontent-%COMP%]{padding-bottom:40px}.p-l-40[_ngcontent-%COMP%]{padding-left:40px}.p-v-40[_ngcontent-%COMP%]{padding-top:40px;padding-bottom:40px}.p-h-40[_ngcontent-%COMP%]{padding:0 40px}.p-45[_ngcontent-%COMP%]{padding:45px}.p-t-45[_ngcontent-%COMP%]{padding-top:45px}.p-r-45[_ngcontent-%COMP%]{padding-right:45px}.p-b-45[_ngcontent-%COMP%]{padding-bottom:45px}.p-l-45[_ngcontent-%COMP%]{padding-left:45px}.p-v-45[_ngcontent-%COMP%]{padding:45px 0}.p-h-45[_ngcontent-%COMP%]{padding:0 45px}.p-50[_ngcontent-%COMP%]{padding:50px}.p-t-50[_ngcontent-%COMP%]{padding-top:50px}.p-r-50[_ngcontent-%COMP%]{padding-right:50px}.p-b-50[_ngcontent-%COMP%]{padding-bottom:50px}.p-l-50[_ngcontent-%COMP%]{padding-left:50px}.p-v-50[_ngcontent-%COMP%]{padding:50px 0}.p-h-50[_ngcontent-%COMP%]{padding:0 50px}.p-55[_ngcontent-%COMP%]{padding:55px}.p-t-55[_ngcontent-%COMP%]{padding-top:55px}.p-r-55[_ngcontent-%COMP%]{padding-right:55px}.p-b-55[_ngcontent-%COMP%]{padding-bottom:55px}.p-l-55[_ngcontent-%COMP%]{padding-left:55px}.p-v-55[_ngcontent-%COMP%]{padding:55px 0}.p-h-55[_ngcontent-%COMP%]{padding:0 55px}.p-60[_ngcontent-%COMP%]{padding:60px}.p-t-60[_ngcontent-%COMP%]{padding-top:60px}.p-r-60[_ngcontent-%COMP%]{padding-right:60px}.p-b-60[_ngcontent-%COMP%]{padding-bottom:60px}.p-l-60[_ngcontent-%COMP%]{padding-left:60px}.p-v-60[_ngcontent-%COMP%]{padding:60px 0}.p-h-60[_ngcontent-%COMP%]{padding:0 60px}.p-65[_ngcontent-%COMP%]{padding:65px}.p-t-65[_ngcontent-%COMP%]{padding-top:65px}.p-r-65[_ngcontent-%COMP%]{padding-right:65px}.p-b-65[_ngcontent-%COMP%]{padding-bottom:65px}.p-l-65[_ngcontent-%COMP%]{padding-left:65px}.p-v-65[_ngcontent-%COMP%]{padding:65px 0}.p-h-65[_ngcontent-%COMP%]{padding:0 65px}.p-70[_ngcontent-%COMP%]{padding:70px}.p-t-70[_ngcontent-%COMP%]{padding-top:70px}.p-r-70[_ngcontent-%COMP%]{padding-right:70px}.p-b-70[_ngcontent-%COMP%]{padding-bottom:70px}.p-l-70[_ngcontent-%COMP%]{padding-left:70px}.p-v-70[_ngcontent-%COMP%]{padding:70px 0}.p-h-70[_ngcontent-%COMP%]{padding:0 70px}.p-75[_ngcontent-%COMP%]{padding:75px}.p-t-75[_ngcontent-%COMP%]{padding-top:75px}.p-r-75[_ngcontent-%COMP%]{padding-right:75px}.p-b-75[_ngcontent-%COMP%]{padding-bottom:75px}.p-l-75[_ngcontent-%COMP%]{padding-left:75px}.p-v-75[_ngcontent-%COMP%]{padding:75px 0}.p-h-75[_ngcontent-%COMP%]{padding:0 75px}.p-80[_ngcontent-%COMP%]{padding:80px}.p-t-80[_ngcontent-%COMP%]{padding-top:80px}.p-r-80[_ngcontent-%COMP%]{padding-right:80px}.p-b-80[_ngcontent-%COMP%]{padding-bottom:80px}.p-l-80[_ngcontent-%COMP%]{padding-left:80px}.p-v-80[_ngcontent-%COMP%]{padding:80px 0}.p-h-80[_ngcontent-%COMP%]{padding:0 80px}.no-padding[_ngcontent-%COMP%]{padding:0!important}.no-pad-lr[_ngcontent-%COMP%], .no-pad-rl[_ngcontent-%COMP%]{padding-left:0;padding-right:0}.no-pad-tb[_ngcontent-%COMP%], .no-pad-bt[_ngcontent-%COMP%]{padding-top:0;padding-bottom:0}.pad-t-only[_ngcontent-%COMP%]{padding-left:0;padding-right:0;padding-bottom:0}.pad-b-only[_ngcontent-%COMP%]{padding-left:0;padding-right:0;padding-top:0}.pad-l-only[_ngcontent-%COMP%]{padding-right:0;padding-top:0;padding-bottom:0}.pad-r-only[_ngcontent-%COMP%]{padding-left:0;padding-top:0;padding-bottom:0}html[_ngcontent-%COMP%], body[_ngcontent-%COMP%], .rel[_ngcontent-%COMP%], .relative[_ngcontent-%COMP%]{position:relative}.abs[_ngcontent-%COMP%], .absolute[_ngcontent-%COMP%]{position:absolute}.fixed[_ngcontent-%COMP%]{position:fixed}.status-active[_ngcontent-%COMP%]{color:#5cb85c}.status-inactive[_ngcontent-%COMP%]{color:#666f73}.status-deleted[_ngcontent-%COMP%]{color:#000}.status-pending[_ngcontent-%COMP%]{color:orange}.status-approved[_ngcontent-%COMP%]{color:#4461e2}.status-overpaid[_ngcontent-%COMP%]{color:purple}.status-chargeoff[_ngcontent-%COMP%]{color:#f39c12}.status-active-overdue[_ngcontent-%COMP%], .status-block[_ngcontent-%COMP%]{color:red}.status-matured[_ngcontent-%COMP%]{color:#ff4000}.subStatus-contract-termination[_ngcontent-%COMP%]{color:#b3b3b3}.mat-step-header[_ngcontent-%COMP%] .mat-step-icon-state-done[_ngcontent-%COMP%]{background-color:#2af72a}.mat-step-header[_ngcontent-%COMP%] .mat-step-icon-state-done[_ngcontent-%COMP%] .status-transfer-progress[_ngcontent-%COMP%]{color:#ff4000}.mat-step-header[_ngcontent-%COMP%] .mat-step-icon-state-done[_ngcontent-%COMP%] .status-transfer-hold[_ngcontent-%COMP%]{color:#df0101}html[_ngcontent-%COMP%], body[_ngcontent-%COMP%]{-webkit-font-smoothing:antialiased}html[_ngcontent-%COMP%]{font-size:16px}body[_ngcontent-%COMP%]{font-family:Roboto,Helvetica Neue,sans-serif;font-weight:400;font-size:14px;color:#000000de;line-height:1.5;letter-spacing:normal}.mat-h1[_ngcontent-%COMP%], .mat-headline[_ngcontent-%COMP%], .mat-typography[_ngcontent-%COMP%] .mat-h1[_ngcontent-%COMP%], .mat-typography[_ngcontent-%COMP%] .mat-headline[_ngcontent-%COMP%], .mat-typography[_ngcontent-%COMP%] h1[_ngcontent-%COMP%]{font:400 24px/32px Roboto,Helvetica Neue,sans-serif;letter-spacing:normal;margin:0 0 16px}.lh-1[_ngcontent-%COMP%]{line-height:1}.lh-13[_ngcontent-%COMP%]{line-height:1.3}.lh-15[_ngcontent-%COMP%]{line-height:1.5}.bold[_ngcontent-%COMP%], .strong[_ngcontent-%COMP%]{font-weight:700}.no-bold[_ngcontent-%COMP%]{font-weight:400}.italic[_ngcontent-%COMP%], .em[_ngcontent-%COMP%]{font-style:italic}.strike[_ngcontent-%COMP%]{text-decoration:line-through}.normal[_ngcontent-%COMP%]{font-weight:400;font-style:normal}.uppercase[_ngcontent-%COMP%]{text-transform:uppercase}.text-left[_ngcontent-%COMP%]{text-align:left}.text-center[_ngcontent-%COMP%]{text-align:center}.text-right[_ngcontent-%COMP%]{text-align:right}.w100[_ngcontent-%COMP%]{font-weight:100}.w200[_ngcontent-%COMP%]{font-weight:200}.w300[_ngcontent-%COMP%]{font-weight:300}.w400[_ngcontent-%COMP%]{font-weight:400}.w500[_ngcontent-%COMP%]{font-weight:500}.w600[_ngcontent-%COMP%]{font-weight:600}.w700[_ngcontent-%COMP%]{font-weight:700}.w800[_ngcontent-%COMP%]{font-weight:800}.w900[_ngcontent-%COMP%]{font-weight:900}.f9[_ngcontent-%COMP%]{font-size:9px}.f10[_ngcontent-%COMP%]{font-size:10px}.f11[_ngcontent-%COMP%]{font-size:11px}.f12[_ngcontent-%COMP%]{font-size:12px}.f13[_ngcontent-%COMP%]{font-size:13px}.f14[_ngcontent-%COMP%]{font-size:14px}.f15[_ngcontent-%COMP%]{font-size:15px}.f16[_ngcontent-%COMP%]{font-size:16px}.f17[_ngcontent-%COMP%]{font-size:17px}.f18[_ngcontent-%COMP%]{font-size:18px;line-height:30px}.f19[_ngcontent-%COMP%]{font-size:19px}.f20[_ngcontent-%COMP%]{font-size:20px}.f30[_ngcontent-%COMP%]{font-size:30px}.f40[_ngcontent-%COMP%]{font-size:40px}.f50[_ngcontent-%COMP%]{font-size:50px}.f60[_ngcontent-%COMP%]{font-size:60px}.size-small[_ngcontent-%COMP%]{font-size:75%}.size-normal[_ngcontent-%COMP%]{font-size:100%}.size-medium[_ngcontent-%COMP%]{font-size:125%}.size-big[_ngcontent-%COMP%], .size-large[_ngcontent-%COMP%]{font-size:150%}.size-huge[_ngcontent-%COMP%]{font-size:200%}.inherit[_ngcontent-%COMP%]{font:inherit}.text-shadow[_ngcontent-%COMP%]{text-shadow:1px 1px 1px rgba(0,0,0,.4)}.text-rgb-2[_ngcontent-%COMP%]{color:#0003}.text-rgb-3[_ngcontent-%COMP%]{color:#0000004d}.text-rgb-4[_ngcontent-%COMP%]{color:#0006}.text-rgb-5[_ngcontent-%COMP%]{color:#00000080}.no-ul[_ngcontent-%COMP%], .no-ul[_ngcontent-%COMP%]:hover, .no-ul[_ngcontent-%COMP%] a[_ngcontent-%COMP%], .no-ul[_ngcontent-%COMP%] a[_ngcontent-%COMP%]:hover{text-decoration:none}.no-wrap[_ngcontent-%COMP%]{white-space:nowrap}.auto-cell-size[_ngcontent-%COMP%]{white-space:nowrap;width:1%}.ls-0[_ngcontent-%COMP%]{letter-spacing:-3px;white-space:nowrap}.label-field[_ngcontent-%COMP%]{margin-top:32px}.wrap-content[_ngcontent-%COMP%]{overflow-wrap:break-word;word-wrap:break-word}.no-break-content[_ngcontent-%COMP%]{overflow-wrap:anywhere!important}.fit[_ngcontent-%COMP%]{max-width:100%}.half-width[_ngcontent-%COMP%]{width:50%}.full-width[_ngcontent-%COMP%]{width:100%}.full-height[_ngcontent-%COMP%]{height:100%}html[_ngcontent-%COMP%], body[_ngcontent-%COMP%]{width:100%;height:100%;min-height:100%}body[_ngcontent-%COMP%] table[_ngcontent-%COMP%]{width:100%}.container[_ngcontent-%COMP%]{max-width:74rem;width:90%}.mw300[_ngcontent-%COMP%]{max-width:300px}.mw400[_ngcontent-%COMP%]{max-width:400px}.mw500[_ngcontent-%COMP%]{max-width:500px}.mw600[_ngcontent-%COMP%]{max-width:600px}.fullwidth[_ngcontent-%COMP%]{width:100%}.zindex-1[_ngcontent-%COMP%]{z-index:1}.zindex-2[_ngcontent-%COMP%]{z-index:2}.zindex-3[_ngcontent-%COMP%]{z-index:3}.zindex-4[_ngcontent-%COMP%]{z-index:4}.container[_ngcontent-%COMP%]{padding-bottom:2%;max-width:100%}.container[_ngcontent-%COMP%] .transaction-buttons[_ngcontent-%COMP%]{padding-bottom:1rem;padding-top:1rem}.container[_ngcontent-%COMP%] .transaction-buttons[_ngcontent-%COMP%] .accruals[_ngcontent-%COMP%]{padding-top:1%}.container[_ngcontent-%COMP%] table[_ngcontent-%COMP%]{width:100%}.container[_ngcontent-%COMP%] table[_ngcontent-%COMP%] .account-action-button[_ngcontent-%COMP%]{min-width:26px;padding:0 0 3px;margin:0 2%;line-height:25px}.container[_ngcontent-%COMP%] table[_ngcontent-%COMP%] .strike[_ngcontent-%COMP%]{text-decoration:line-through;color:red}.container[_ngcontent-%COMP%] table[_ngcontent-%COMP%] .linked[_ngcontent-%COMP%]{color:#4461e2}.container[_ngcontent-%COMP%] table[_ngcontent-%COMP%] .accrual[_ngcontent-%COMP%]{color:#999}.container[_ngcontent-%COMP%] table[_ngcontent-%COMP%] .down-payment[_ngcontent-%COMP%]{color:#16a085}.container[_ngcontent-%COMP%] table[_ngcontent-%COMP%] .chargeoff[_ngcontent-%COMP%]{color:#f39c12}.container[_ngcontent-%COMP%] table[_ngcontent-%COMP%] .reage[_ngcontent-%COMP%]{color:#e08e0b}.container[_ngcontent-%COMP%] table[_ngcontent-%COMP%] .reamortize[_ngcontent-%COMP%]{color:#4461e2}.select-row[_ngcontent-%COMP%]:hover{cursor:pointer;font-weight:800}.td-min-space[_ngcontent-%COMP%]{min-width:60px}.filter-box[_ngcontent-%COMP%]{min-width:280px}.transaction-button[_ngcontent-%COMP%]{min-width:180px}.action-button[_ngcontent-%COMP%]{width:100%;height:100%}"]})}}return t})();var nD=()=>["header","header-amount","header-total-cost","header-installment-totals"];function iD(t,n){t&1&&(s(0,"th",24),c(1,"#"),l())}function aD(t,n){if(t&1&&(s(0,"td",25),c(1),l()),t&2){let e=n.index;o(),b(e+1)}}function oD(t,n){t&1&&(s(0,"td",26),c(1,"\xA0"),l())}function rD(t,n){t&1&&(s(0,"th",24),c(1),p(2,"translate"),l()),t&2&&(o(),b(m(2,1,"labels.inputs.Date")))}function lD(t,n){if(t&1&&(s(0,"td",25),c(1),p(2,"dateFormat"),l()),t&2){let e=n.$implicit;o(),b(m(2,1,e.dueDate))}}function sD(t,n){t&1&&(s(0,"td",26)(1,"b"),c(2),p(3,"translate"),l()()),t&2&&(o(2),v(" ",m(3,1,"labels.inputs.Total")))}function cD(t,n){t&1&&(s(0,"th",27),c(1),p(2,"translate"),l()),t&2&&(o(),b(m(2,1,"labels.inputs.Balance Of Loan")))}function pD(t,n){if(t&1&&(s(0,"td",28),c(1),p(2,"formatNumber"),l()),t&2){let e=n.$implicit;o(),b(m(2,1,e.principalLoanBalanceOutstanding))}}function mD(t,n){t&1&&(s(0,"td",26),c(1,"\xA0"),l())}function dD(t,n){t&1&&(s(0,"th",27),c(1),p(2,"translate"),l()),t&2&&(o(),b(m(2,1,"labels.inputs.Principal Due")))}function uD(t,n){if(t&1&&(s(0,"td",28),c(1),p(2,"formatNumber"),l()),t&2){let e=n.$implicit;o(),b(m(2,1,e.principalDue))}}function fD(t,n){if(t&1&&(s(0,"td",29)(1,"b"),c(2),p(3,"currency"),l()()),t&2){let e=P();o(2),v(" ",Ye(3,1,e.originalScheduleDetails.totalPrincipalExpected,e.currency.code,"symbol-narrow","1.2-2")," ")}}function hD(t,n){t&1&&(s(0,"th",27),c(1),p(2,"translate"),l()),t&2&&(o(),b(m(2,1,"labels.inputs.Interest")))}function gD(t,n){if(t&1&&(s(0,"td",28),c(1),p(2,"formatNumber"),l()),t&2){let e=n.$implicit;o(),b(m(2,1,e.interestOriginalDue))}}function _D(t,n){if(t&1&&(s(0,"td",29)(1,"b"),c(2),p(3,"currency"),l()()),t&2){let e=P();o(2),v(" ",Ye(3,1,e.originalScheduleDetails.totalInterestCharged,e.currency.code,"symbol-narrow","1.2-2")," ")}}function CD(t,n){t&1&&(s(0,"th",27),c(1),p(2,"translate"),l()),t&2&&(o(),b(m(2,1,"labels.inputs.Fees")))}function bD(t,n){if(t&1&&(s(0,"td",28),c(1),p(2,"formatNumber"),l()),t&2){let e=n.$implicit;o(),b(m(2,1,e.feeChargesDue))}}function vD(t,n){if(t&1&&(s(0,"td",29)(1,"b"),c(2),p(3,"currency"),l()()),t&2){let e=P();o(2),v(" ",Ye(3,1,e.originalScheduleDetails.totalFeeChargesCharged,e.currency.code,"symbol-narrow","1.2-2")," ")}}function xD(t,n){t&1&&(s(0,"th",27),c(1),p(2,"translate"),l()),t&2&&(o(),b(m(2,1,"labels.inputs.Penalties")))}function yD(t,n){if(t&1&&(s(0,"td",28),c(1),p(2,"formatNumber"),l()),t&2){let e=n.$implicit;o(),b(m(2,1,e.penaltyChargesDue))}}function SD(t,n){if(t&1&&(s(0,"td",29)(1,"b"),c(2),p(3,"currency"),l()()),t&2){let e=P();o(2),v(" ",Ye(3,1,e.originalScheduleDetails.totalPenaltyChargesCharged,e.currency.code,"symbol-narrow","1.2-2")," ")}}function DD(t,n){t&1&&(s(0,"th",27),c(1),p(2,"translate"),l()),t&2&&(o(),b(m(2,1,"labels.inputs.Outstanding")))}function wD(t,n){if(t&1&&(s(0,"td",28),c(1),p(2,"formatNumber"),l()),t&2){let e=n.$implicit;o(),b(m(2,1,e.totalOutstandingForPeriod))}}function TD(t,n){if(t&1&&(s(0,"td",29)(1,"b"),c(2),p(3,"currency"),l()()),t&2){let e=P();o(2),v(" ",Ye(3,1,e.originalScheduleDetails.totalRepaymentExpected,e.currency.code,"symbol-narrow","1.2-2")," ")}}function PD(t,n){t&1&&T(0,"th",30),t&2&&oa("colspan",2)}function AD(t,n){t&1&&(s(0,"th",30),c(1),p(2,"translate"),l()),t&2&&(oa("colspan",2),o(),v(" ",m(2,2,"labels.inputs.Loan Amount and Balance")," "))}function MD(t,n){t&1&&(s(0,"th",30),c(1),p(2,"translate"),l()),t&2&&(oa("colspan",3),o(),v(" ",m(2,2,"labels.inputs.Total Cost of Loan")," "))}function OD(t,n){t&1&&(s(0,"th",30),c(1),p(2,"translate"),l()),t&2&&(oa("colspan",1),o(),v(" ",m(2,2,"labels.inputs.Installment Totals")," "))}function ID(t,n){t&1&&T(0,"tr",31)}function ED(t,n){t&1&&T(0,"tr",31)}function LD(t,n){t&1&&T(0,"tr",32)}function ND(t,n){t&1&&T(0,"tr",33)}var Sm=(()=>{class t{constructor(){this.route=A(Et),this.displayedColumns=["number","date","balanceOfLoan","principalDue","interest","fees","penalties","outstanding"],this.currency=null,this.route.parent.data.subscribe(e=>{this.currency=e.loanDetailsData.currency,this.originalScheduleDetails=e.loanDetailsData.originalSchedule})}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=Dt({type:t,selectors:[["mifosx-original-schedule-tab"]],decls:46,vars:6,consts:[[1,"container"],["mat-table","","matSort","",3,"dataSource"],["matColumnDef","number"],["mat-header-cell","",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["mat-footer-cell","",4,"matFooterCellDef"],["matColumnDef","date"],["matColumnDef","balanceOfLoan"],["mat-header-cell","","class","r-amount",4,"matHeaderCellDef"],["mat-cell","","class","r-amount",4,"matCellDef"],["matColumnDef","principalDue"],["mat-footer-cell","","class","r-amount",4,"matFooterCellDef"],["matColumnDef","interest"],["matColumnDef","fees"],["matColumnDef","penalties"],["matColumnDef","outstanding"],["matColumnDef","header"],["mat-header-cell","","class","center",4,"matHeaderCellDef"],["matColumnDef","header-amount"],["matColumnDef","header-total-cost"],["matColumnDef","header-installment-totals"],["mat-header-row","",4,"matHeaderRowDef"],["mat-row","",4,"matRowDef","matRowDefColumns"],["mat-footer-row","",4,"matFooterRowDef"],["mat-header-cell",""],["mat-cell",""],["mat-footer-cell",""],["mat-header-cell","",1,"r-amount"],["mat-cell","",1,"r-amount"],["mat-footer-cell","",1,"r-amount"],["mat-header-cell","",1,"center"],["mat-header-row",""],["mat-row",""],["mat-footer-row",""]],template:function(i,a){i&1&&(s(0,"div",0)(1,"table",1),X(2,2),k(3,iD,2,0,"th",3)(4,aD,2,1,"td",4)(5,oD,2,0,"td",5),Q(),X(6,6),k(7,rD,3,3,"th",3)(8,lD,3,3,"td",4)(9,sD,4,3,"td",5),Q(),X(10,7),k(11,cD,3,3,"th",8)(12,pD,3,3,"td",9)(13,mD,2,0,"td",5),Q(),X(14,10),k(15,dD,3,3,"th",8)(16,uD,3,3,"td",9)(17,fD,4,6,"td",11),Q(),X(18,12),k(19,hD,3,3,"th",8)(20,gD,3,3,"td",9)(21,_D,4,6,"td",11),Q(),X(22,13),k(23,CD,3,3,"th",8)(24,bD,3,3,"td",9)(25,vD,4,6,"td",11),Q(),X(26,14),k(27,xD,3,3,"th",8)(28,yD,3,3,"td",9)(29,SD,4,6,"td",11),Q(),X(30,15),k(31,DD,3,3,"th",8)(32,wD,3,3,"td",9)(33,TD,4,6,"td",11),Q(),X(34,16),k(35,PD,1,1,"th",17),Q(),X(36,18),k(37,AD,3,4,"th",17),Q(),X(38,19),k(39,MD,3,4,"th",17),Q(),X(40,20),k(41,OD,3,4,"th",17),Q(),k(42,ID,1,0,"tr",21)(43,ED,1,0,"tr",21)(44,LD,1,0,"tr",22)(45,ND,1,0,"tr",23),l()()),i&2&&(o(),x("dataSource",a.originalScheduleDetails.periods),o(41),x("matHeaderRowDef",Ut(5,nD)),o(),x("matHeaderRowDef",a.displayedColumns),o(),x("matRowDefColumns",a.displayedColumns),o(),x("matFooterRowDef",a.displayedColumns))},dependencies:[wt,Tt,bn,wo,yn,xn,Sn,vn,Dn,Sp,Dp,wn,Pn,Tn,An,wp,Tp,Sa,En,Pt,hn],styles:["table[_ngcontent-%COMP%]{width:100%;margin:3% 0%}.container[_ngcontent-%COMP%]{padding-bottom:2%}"]})}}return t})();var kD=()=>[10,25,50,100];function FD(t,n){t&1&&(s(0,"th",11),c(1),p(2,"translate"),l()),t&2&&(o(),b(m(2,1,"labels.inputs.Name")))}function RD(t,n){if(t&1&&(s(0,"td",12),c(1),l()),t&2){let e=n.$implicit;o(),$t("",e.name,",",e.currency.displaySymbol)}}function BD(t,n){t&1&&(s(0,"th",11),c(1),p(2,"translate"),l()),t&2&&(o(),b(m(2,1,"labels.inputs.Type")))}function qD(t,n){if(t&1&&(s(0,"td",12),c(1),l()),t&2){let e=n.$implicit;o(),b(e.chargeCalculationType.value)}}function jD(t,n){t&1&&(s(0,"th",11),c(1),p(2,"translate"),l()),t&2&&(o(),b(m(2,1,"labels.inputs.Amount")))}function zD(t,n){if(t&1&&(s(0,"td",12),c(1),p(2,"formatNumber"),l()),t&2){let e=n.$implicit;o(),b(m(2,1,e.amount))}}function VD(t,n){t&1&&(s(0,"th",11),c(1),p(2,"translate"),l()),t&2&&(o(),b(m(2,1,"labels.inputs.Collected On")))}function UD(t,n){if(t&1&&(s(0,"td",12),c(1),l()),t&2){let e=n.$implicit;o(),b(e.chargeTimeType.value)}}function HD(t,n){t&1&&T(0,"tr",13)}function GD(t,n){t&1&&T(0,"tr",14)}var Dm=(()=>{class t{constructor(){this.route=A(Et),this.displayedColumns=["name","type","amount","collectedon"],this.route.parent.data.subscribe(e=>{this.loanDetails=e.loanDetailsData})}ngOnInit(){this.overdueCharges=this.loanDetails.overdueCharges,this.dataSource=new Li(this.overdueCharges),this.dataSource.paginator=this.paginator,this.dataSource.sort=this.sort}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=Dt({type:t,selectors:[["mifosx-overdue-charges-tab"]],viewQuery:function(i,a){if(i&1&&(mi(Do,7),mi(wo,7)),i&2){let r;di(r=ui())&&(a.paginator=r.first),di(r=ui())&&(a.sort=r.first)}},decls:17,vars:5,consts:[[1,"container"],["mat-table","","matSort","",3,"dataSource"],["matColumnDef","name"],["mat-header-cell","","mat-sort-header","",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","type"],["matColumnDef","amount"],["matColumnDef","collectedon"],["mat-header-row","",4,"matHeaderRowDef"],["mat-row","",4,"matRowDef","matRowDefColumns"],["showFirstLastButtons","",3,"pageSizeOptions"],["mat-header-cell","","mat-sort-header",""],["mat-cell",""],["mat-header-row",""],["mat-row",""]],template:function(i,a){i&1&&(s(0,"div",0)(1,"table",1),X(2,2),k(3,FD,3,3,"th",3)(4,RD,2,2,"td",4),Q(),X(5,5),k(6,BD,3,3,"th",3)(7,qD,2,1,"td",4),Q(),X(8,6),k(9,jD,3,3,"th",3)(10,zD,3,3,"td",4),Q(),X(11,7),k(12,VD,3,3,"th",3)(13,UD,2,1,"td",4),Q(),k(14,HD,1,0,"tr",8)(15,GD,1,0,"tr",9),l(),T(16,"mat-paginator",10),l()),i&2&&(o(),x("dataSource",a.dataSource),o(13),x("matHeaderRowDef",a.displayedColumns),o(),x("matRowDefColumns",a.displayedColumns),o(),x("pageSizeOptions",Ut(4,kD)))},dependencies:[wt,Tt,bn,wo,yn,xn,Sn,yp,vn,Dn,wn,Pn,Tn,An,Do,Pt,hn],styles:["table[_ngcontent-%COMP%]{width:100%;margin-top:3%}"]})}}return t})();var WD=()=>[50,100,200],$D=t=>[t];function YD(t,n){t&1&&(s(0,"th",22),c(1),p(2,"translate"),l()),t&2&&(o(),b(m(2,1,"labels.inputs.name")))}function ZD(t,n){if(t&1&&(s(0,"td",23),c(1),l()),t&2){let e=n.$implicit;o(),b(e.name)}}function KD(t,n){t&1&&(s(0,"th",22),c(1),p(2,"translate"),l()),t&2&&(o(),b(m(2,1,"labels.inputs.Fee/Penalty")))}function JD(t,n){t&1&&(s(0,"span"),c(1),p(2,"translate"),l()),t&2&&(o(),b(m(2,1,"labels.inputs.Penalty")))}function XD(t,n){t&1&&(s(0,"span"),c(1),p(2,"translate"),l()),t&2&&(o(),b(m(2,1,"labels.inputs.Fee")))}function QD(t,n){if(t&1&&(s(0,"td",23),M(1,JD,3,3,"span"),M(2,XD,3,3,"span"),l()),t&2){let e=n.$implicit;o(),O(e.penalty?1:-1),o(),O(e.penalty?-1:2)}}function tw(t,n){t&1&&(s(0,"th",22),c(1),p(2,"translate"),l()),t&2&&(o(),b(m(2,1,"labels.inputs.Payment due at")))}function ew(t,n){if(t&1&&(s(0,"td",23),c(1),l()),t&2){let e=n.$implicit;o(),b(e.chargeTimeType.value)}}function nw(t,n){t&1&&(s(0,"th",22),c(1),p(2,"translate"),l()),t&2&&(o(),b(m(2,1,"labels.inputs.Submitted On")))}function iw(t,n){if(t&1&&(s(0,"td",23),c(1),p(2,"dateFormat"),l()),t&2){let e=n.$implicit;o(),b(m(2,1,e.submittedOnDate))}}function aw(t,n){t&1&&(s(0,"span"),c(1),p(2,"translate"),l()),t&2&&(o(),v(" ",m(2,1,"labels.inputs.Due As Of")," "))}function ow(t,n){t&1&&(s(0,"span"),c(1),p(2,"translate"),l()),t&2&&(o(),v(" ",m(2,1,"labels.inputs.Submitted On")," "))}function rw(t,n){if(t&1&&(s(0,"th",24),M(1,aw,3,3,"span"),M(2,ow,3,3,"span"),l()),t&2){let e=P();x("hide",e.useDueDate),o(),O(e.useDueDate?1:-1),o(),O(e.useDueDate?-1:2)}}function lw(t,n){if(t&1&&(s(0,"span"),c(1),p(2,"dateFormat"),l()),t&2){let e=P().$implicit;o(),b(m(2,1,e.dueDate))}}function sw(t,n){if(t&1&&(s(0,"span"),c(1),p(2,"dateFormat"),l()),t&2){let e=P().$implicit;o(),b(m(2,1,e.submittedOnDate))}}function cw(t,n){if(t&1&&(s(0,"td",23),M(1,lw,3,3,"span"),M(2,sw,3,3,"span"),l()),t&2){let e=P();o(),O(e.useDueDate?1:-1),o(),O(e.useDueDate?-1:2)}}function pw(t,n){t&1&&(s(0,"th",22),c(1),p(2,"translate"),l()),t&2&&(o(),b(m(2,1,"labels.inputs.Calculation Type")))}function mw(t,n){if(t&1&&(s(0,"td",23),c(1),l()),t&2){let e=n.$implicit;o(),b(e.chargeCalculationType.value)}}function dw(t,n){t&1&&(s(0,"th",25),c(1),p(2,"translate"),l()),t&2&&(o(),b(m(2,1,"labels.inputs.Due")))}function uw(t,n){if(t&1&&(s(0,"td",26),c(1),p(2,"currency"),l()),t&2){let e=n.$implicit;o(),v(" ",Ye(2,1,e.amount,e.currency.code,"symbol-narrow","1.2-2")," ")}}function fw(t,n){t&1&&(s(0,"th",25),c(1),p(2,"translate"),l()),t&2&&(o(),b(m(2,1,"labels.inputs.Paid")))}function hw(t,n){if(t&1&&(s(0,"td",26),c(1),p(2,"currency"),l()),t&2){let e=n.$implicit;o(),v(" ",Ye(2,1,e.amountPaid,e.currency.code,"symbol-narrow","1.2-2")," ")}}function gw(t,n){t&1&&(s(0,"th",25),c(1),p(2,"translate"),l()),t&2&&(o(),v(" ",m(2,1,"labels.inputs.Waived")," "))}function _w(t,n){if(t&1&&(s(0,"td",26),c(1),p(2,"currency"),l()),t&2){let e=n.$implicit;o(),v(" ",Ye(2,1,e.amountWaived,e.currency.code,"symbol-narrow","1.2-2")," ")}}function Cw(t,n){t&1&&(s(0,"th",25),c(1),p(2,"translate"),l()),t&2&&(o(),v(" ",m(2,1,"labels.inputs.Outstanding")," "))}function bw(t,n){if(t&1&&(s(0,"td",26),c(1),p(2,"currency"),l()),t&2){let e=n.$implicit;o(),v(" ",Ye(2,1,e.amountOutstanding,e.currency.code,"symbol-narrow","1.2-2")," ")}}function vw(t,n){t&1&&(s(0,"th",25),c(1),p(2,"translate"),l()),t&2&&(o(),v(" ",m(2,1,"labels.inputs.Actions")," "))}function xw(t,n){if(t&1){let e=xt();s(0,"span")(1,"button",30),p(2,"translate"),it("click",function(a){mt(e);let r=P().$implicit,u=P();return u.routeEdit(a),dt(u.editCharge(r))}),T(3,"i",31),l(),s(4,"button",32),p(5,"translate"),it("click",function(a){mt(e);let r=P().$implicit,u=P();return u.routeEdit(a),dt(u.deleteCharge(r.id))}),T(6,"i",33),l()()}t&2&&(o(),x("matTooltip",ce(m(2,4,"tooltips.Edit Charge"))),o(3),x("matTooltip",ce(m(5,6,"tooltips.Delete Charge"))))}function yw(t,n){if(t&1){let e=xt();s(0,"button",34),p(1,"translate"),it("click",function(a){mt(e);let r=P().$implicit,u=P();return u.routeEdit(a),dt(u.adjustCharge(r.id))}),T(2,"i",31),l()}t&2&&x("matTooltip",ce(m(1,2,"tooltips.Adjust Charge")))}function Sw(t,n){if(t&1){let e=xt();s(0,"button",30),p(1,"translate"),it("click",function(a){mt(e);let r=P().$implicit,u=P();return u.routeEdit(a),dt(u.payCharge(r.id))}),T(2,"i",35),l()}t&2&&x("matTooltip",ce(m(1,2,"tooltips.Pay Charge")))}function Dw(t,n){if(t&1){let e=xt();s(0,"button",30),p(1,"translate"),it("click",function(a){mt(e);let r=P().$implicit,u=P();return u.routeEdit(a),dt(u.waiveCharge(r.id))}),T(2,"i",36),l()}t&2&&x("matTooltip",ce(m(1,2,"tooltips.Waive Charge")))}function ww(t,n){if(t&1&&(s(0,"td",27),M(1,xw,7,8,"span"),M(2,yw,3,4,"button",28),M(3,Sw,3,4,"button",29),M(4,Dw,3,4,"button",29),l()),t&2){let e=n.$implicit,i=P();o(),O(i.status==="Submitted and pending approval"?1:-1),o(),O(!e.paid&&i.status==="Active"?2:-1),o(),O(e.chargePayable&&!e.paid&&i.status==="Active"?3:-1),o(),O(e.actionFlag?-1:4)}}function Tw(t,n){t&1&&T(0,"tr",37)}function Pw(t,n){if(t&1&&T(0,"tr",38),t&2){let e=n.$implicit;x("routerLink",La(1,$D,e.id))}}var wm=(()=>{class t{constructor(){this.loansService=A(Mt),this.route=A(Et),this.dateUtils=A(de),this.router=A(le),this.translateService=A(pa),this.dialog=A(Gn),this.settingsService=A(oe),this.systemService=A(_p),this.displayedColumns=["name","feepenalty","paymentdueat","dueDate","calculationtype","due","paid","waived","outstanding","actions"],this.useDueDate=!0,this.route.parent.data.subscribe(e=>{this.loanDetails=e.loanDetailsData})}ngOnInit(){this.systemService.getConfigurationByName("charge-accrual-date").subscribe(i=>{this.useDueDate=i.stringValue==="due-date"}),this.chargesData=this.loanDetails.charges,this.status=this.loanDetails.status.value;let e;this.chargesData.forEach(i=>{i.dueDate=this.dateUtils.parseDate(i.dueDate),i.paid||i.waived||i.chargeTimeType.value==="Disbursement"||this.loanDetails.status.value!=="Active"?e=!0:e=!1,i.actionFlag=e}),this.chargesData=this.chargesData.sort(function(i,a){return a.dueDate-i.dueDate}),this.dataSource=new Li(this.chargesData),this.dataSource.paginator=this.paginator,this.dataSource.sort=this.sort}adjustCharge(e){this.router.navigate([`${e}/adjustment`],{relativeTo:this.route})}payCharge(e){let i=[new la({controlName:"transactionDate",label:"Payment Date",value:"",type:"date",required:!0})],a={title:`Pay Charge ${e}`,layout:{addButtonText:"Confirm"},formfields:i};this.dialog.open(_i,{data:a}).afterClosed().subscribe(u=>{if(u.data){let d=this.settingsService.language.code,g=this.settingsService.dateFormat,_=u.data.value.transactionDate,y={transactionDate:this.dateUtils.formatDate(_,g),dateFormat:g,locale:d};this.loansService.executeLoansAccountChargesCommand(this.loanDetails.id,"pay",y,e).subscribe(()=>{this.reload()})}})}waiveCharge(e){this.dialog.open(ma,{data:{heading:this.translateService.instant("labels.heading.Waive Charge"),dialogContext:this.translateService.instant("labels.dialogContext.Are you sure you want to waive charge with id")+`${e} ?`,type:"Basic"}}).afterClosed().subscribe(a=>{a.confirm&&this.loansService.executeLoansAccountChargesCommand(this.loanDetails.id,"waive",{},e).subscribe(()=>{this.reload()})})}editCharge(e){let i=[new Ti({controlName:"amount",label:"Amount",value:e.amount||e.amountOrPercentage,type:"number",required:!0})],a={title:`Edit Charge ${e.id}`,layout:{addButtonText:"Confirm"},formfields:i};this.dialog.open(_i,{data:a}).afterClosed().subscribe(u=>{if(u.data){let d=this.settingsService.language.code,g=this.settingsService.dateFormat,_=ve(ie({},u.data.value),{dateFormat:g,locale:d});this.loansService.editLoansAccountCharge(this.loanDetails.id,_,e.id).subscribe(()=>{this.reload()})}})}deleteCharge(e){this.dialog.open(ra,{data:{deleteContext:`charge id:${e}`}}).afterClosed().subscribe(a=>{a.delete&&this.loansService.deleteLoansAccountCharge(this.loanDetails.id,e).subscribe(()=>{this.reload()})})}routeEdit(e){e.stopPropagation()}reload(){let e=this.loanDetails.clientId,i=this.router.url;this.router.navigateByUrl(`/clients/${e}/loans-accounts`,{skipLocationChange:!0}).then(()=>this.router.navigate([i]))}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=Dt({type:t,selectors:[["mifosx-charges-tab"]],viewQuery:function(i,a){if(i&1&&(mi(Do,7),mi(wo,7)),i&2){let r;di(r=ui())&&(a.paginator=r.first),di(r=ui())&&(a.sort=r.first)}},decls:38,vars:5,consts:[[1,"tab-container"],["mat-table","","matSort","",3,"dataSource"],["matColumnDef","name"],["mat-header-cell","","mat-sort-header","",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","feepenalty"],["matColumnDef","paymentdueat"],["matColumnDef","submittedDate"],["matColumnDef","dueDate"],["mat-header-cell","","mat-sort-header","",3,"hide",4,"matHeaderCellDef"],["matColumnDef","calculationtype"],["matColumnDef","due"],["mat-header-cell","","class","r-amount","mat-sort-header","",4,"matHeaderCellDef"],["mat-cell","","class","r-amount",4,"matCellDef"],["matColumnDef","paid"],["matColumnDef","waived"],["matColumnDef","outstanding"],["matColumnDef","actions"],["mat-cell","","class","center",4,"matCellDef"],["mat-header-row","",4,"matHeaderRowDef"],["mat-row","","class","select-row",3,"routerLink",4,"matRowDef","matRowDefColumns"],["showFirstLastButtons","",3,"pageSizeOptions"],["mat-header-cell","","mat-sort-header",""],["mat-cell",""],["mat-header-cell","","mat-sort-header","",3,"hide"],["mat-header-cell","","mat-sort-header","",1,"r-amount"],["mat-cell","",1,"r-amount"],["mat-cell","",1,"center"],["mat-raised-button","","color","accent",1,"account-action-button",3,"matTooltip"],["mat-raised-button","","color","primary",1,"account-action-button",3,"matTooltip"],["mat-raised-button","","color","primary",1,"account-action-button",3,"click","matTooltip"],[1,"fa","fa-pencil"],["mat-raised-button","","color","warn",1,"account-action-button",3,"click","matTooltip"],[1,"fa","fa-trash"],["mat-raised-button","","color","accent",1,"account-action-button",3,"click","matTooltip"],[1,"fa","fa-dollar"],[1,"fa","fa-flag"],["mat-header-row",""],["mat-row","",1,"select-row",3,"routerLink"]],template:function(i,a){i&1&&(s(0,"div",0)(1,"table",1),X(2,2),k(3,YD,3,3,"th",3)(4,ZD,2,1,"td",4),Q(),X(5,5),k(6,KD,3,3,"th",3)(7,QD,3,2,"td",4),Q(),X(8,6),k(9,tw,3,3,"th",3)(10,ew,2,1,"td",4),Q(),X(11,7),k(12,nw,3,3,"th",3)(13,iw,3,3,"td",4),Q(),X(14,8),k(15,rw,3,3,"th",9)(16,cw,3,2,"td",4),Q(),X(17,10),k(18,pw,3,3,"th",3)(19,mw,2,1,"td",4),Q(),X(20,11),k(21,dw,3,3,"th",12)(22,uw,3,6,"td",13),Q(),X(23,14),k(24,fw,3,3,"th",12)(25,hw,3,6,"td",13),Q(),X(26,15),k(27,gw,3,3,"th",12)(28,_w,3,6,"td",13),Q(),X(29,16),k(30,Cw,3,3,"th",12)(31,bw,3,6,"td",13),Q(),X(32,17),k(33,vw,3,3,"th",12)(34,ww,5,4,"td",18),Q(),k(35,Tw,1,0,"tr",19)(36,Pw,1,3,"tr",20),l(),T(37,"mat-paginator",21),l()),i&2&&(o(),x("dataSource",a.dataSource),o(34),x("matHeaderRowDef",a.displayedColumns),o(),x("matRowDefColumns",a.displayedColumns),o(),x("pageSizeOptions",Ut(4,WD)))},dependencies:[wt,Tt,ae,Wt,bn,wo,yn,xn,Sn,yp,vn,Dn,Oi,wn,Pn,Tn,An,Do,Sa,En,Pt],styles:[".tab-container[_ngcontent-%COMP%]{padding:1%;margin:1%}.tab-container[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{margin:1% auto}.tab-container[_ngcontent-%COMP%] table[_ngcontent-%COMP%]{width:100%;margin-top:3%}.tab-container[_ngcontent-%COMP%] table[_ngcontent-%COMP%] .account-action-button[_ngcontent-%COMP%]{min-width:26px;padding:0 6px;margin:4px;line-height:25px}.tab-container[_ngcontent-%COMP%] table[_ngcontent-%COMP%] .select-row[_ngcontent-%COMP%]:hover{cursor:pointer}"]})}}return t})();var Tm=(()=>{class t{constructor(){this.route=A(Et),this.entityDatatable=null,this.entityId=this.route.parent.parent.snapshot.paramMap.get("loanId"),this.entityDatatable=null,this.route.data.subscribe(e=>{this.entityDatatable=e.loanDatatable,this.multiRowDatatableFlag=this.entityDatatable.columnHeaders[0].columnName==="id"})}ngOnInit(){this.route.parent.parent.params.subscribe(e=>{this.entityId=e.loanId})}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=Dt({type:t,selectors:[["mifosx-datatable-tab"]],decls:2,vars:3,consts:[[1,"tab-container","mat-typography"],["entityType","Loan Account",3,"entityId","multiRowDatatableFlag","entityDatatable"]],template:function(i,a){i&1&&(s(0,"div",0),T(1,"mifosx-entity-datatable-tab",1),l()),i&2&&(o(),x("entityId",a.entityId)("multiRowDatatableFlag",a.multiRowDatatableFlag)("entityDatatable",a.entityDatatable))},dependencies:[wt,Tt,p1],encapsulation:2})}}return t})();var Aw=()=>["../../general"];function Mw(t,n){t&1&&(s(0,"mat-error"),c(1),p(2,"translate"),p(3,"translate"),s(4,"strong"),c(5),p(6,"translate"),l()()),t&2&&(o(),$t(" ",m(2,3,"labels.inputs.Closed Date")," ",m(3,5,"labels.commons.is")," "),o(4),b(m(6,7,"labels.commons.required")))}function Ow(t,n){if(t&1&&(s(0,"button",11),c(1),p(2,"translate"),l()),t&2){let e=P();x("disabled",!e.closeLoanForm.valid),o(),v(" ",m(2,2,"labels.buttons.Submit")," ")}}var Pm=(()=>{class t{constructor(){this.formBuilder=A(Te),this.loanService=A(Mt),this.route=A(Et),this.router=A(le),this.dateUtils=A(de),this.settingsService=A(oe),this.minDate=new Date(2e3,0,1),this.maxDate=new Date,this.loanId=this.route.snapshot.params.loanId}ngOnInit(){this.maxDate=this.settingsService.businessDate,this.createCloseForm()}createCloseForm(){this.closeLoanForm=this.formBuilder.group({transactionDate:[new Date(this.dataObject.date)||new Date,Gt.required],note:[]})}submit(){let e=this.closeLoanForm.value,i=this.settingsService.language.code,a=this.settingsService.dateFormat,r=this.closeLoanForm.value.transactionDate;e.transactionDate instanceof Date&&(e.transactionDate=this.dateUtils.formatDate(r,a));let u=ve(ie({},e),{dateFormat:a,locale:i});this.loanService.submitLoanActionButton(this.loanId,u,"close").subscribe(d=>{this.router.navigate(["../../general"],{relativeTo:this.route})})}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=Dt({type:t,selectors:[["mifosx-loans-account-close"]],inputs:{dataObject:"dataObject"},decls:24,vars:18,consts:[["closedDatePicker",""],[1,"container","mat-elevation-z8"],[3,"ngSubmit","formGroup"],[1,"layout-column"],[3,"click"],["matInput","","required","","formControlName","transactionDate",3,"min","max","matDatepicker"],["matSuffix","",3,"for"],["matInput","","formControlName","note","cdkTextareaAutosize","","cdkAutosizeMinRows","2"],[1,"layout-row","align-center","gap-5px","responsive-column"],["type","button","mat-raised-button","",3,"routerLink"],["mat-raised-button","","color","primary",3,"disabled",4,"mifosxHasPermission"],["mat-raised-button","","color","primary",3,"disabled"]],template:function(i,a){if(i&1){let r=xt();s(0,"div",1)(1,"mat-card")(2,"form",2),it("ngSubmit",function(){return mt(r),dt(a.submit())}),s(3,"mat-card-content")(4,"div",3)(5,"mat-form-field",4),it("click",function(){mt(r);let d=Lt(12);return dt(d.open())}),s(6,"mat-label"),c(7),p(8,"translate"),l(),T(9,"input",5)(10,"mat-datepicker-toggle",6)(11,"mat-datepicker",null,0),M(13,Mw,7,9,"mat-error"),l(),s(14,"mat-form-field")(15,"mat-label"),c(16),p(17,"translate"),l(),T(18,"textarea",7),l()(),s(19,"mat-card-actions",8)(20,"button",9),c(21),p(22,"translate"),l(),k(23,Ow,3,4,"button",10),l()()()()()}if(i&2){let r=Lt(12);o(2),x("formGroup",a.closeLoanForm),o(5),b(m(8,11,"labels.inputs.Closed On")),o(2),x("min",a.minDate)("max",a.maxDate)("matDatepicker",r),o(),x("for",r),o(3),O(a.closeLoanForm.controls.transactionDate.hasError("required")?13:-1),o(3),b(m(17,13,"labels.inputs.Note")),o(4),x("routerLink",Ut(17,Aw)),o(),v(" ",m(22,15,"labels.buttons.Cancel")," "),o(2),x("mifosxHasPermission","CLOSE_LOAN")}},dependencies:[wt,Tt,Re,we,he,Ee,je,Le,Ne,ae,xe,Oe,ze,_e,ge,Ve,Je,Pe,tn,en,Qe,Wt,Ae,Wn,Pt],styles:[".container[_ngcontent-%COMP%]{max-width:37rem}"]})}}return t})();var Iw=()=>["../../general"];function Ew(t,n){if(t&1){let e=xt();s(0,"button",7),it("click",function(){mt(e);let a=P();return dt(a.submit())}),c(1),p(2,"translate"),l()}t&2&&(o(),v(" ",m(2,1,"labels.buttons.Submit")," "))}var Am=(()=>{class t{constructor(){this.loanService=A(Mt),this.formBuilder=A(Te),this.route=A(Et),this.router=A(le)}ngOnInit(){this.note=this.formBuilder.control("")}submit(){let e=this.route.snapshot.params.loanId;this.loanService.loanActionButtons(e,"undoapproval",{note:this.note.value}).subscribe(i=>{this.router.navigate(["../../general"],{relativeTo:this.route})})}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=Dt({type:t,selectors:[["mifosx-undo-approval"]],decls:14,vars:10,consts:[[1,"container","mat-elevation-z8"],[1,"layout-column"],[1,"flex-fill"],["matInput","",3,"formControl"],[1,"layout-row","align-center","gap-5px","responsive-column"],["type","button","mat-raised-button","",3,"routerLink"],["mat-raised-button","","color","primary",3,"click",4,"mifosxHasPermission"],["mat-raised-button","","color","primary",3,"click"]],template:function(i,a){i&1&&(s(0,"div",0)(1,"mat-card")(2,"mat-card-content")(3,"div",1)(4,"mat-form-field",2)(5,"mat-label"),c(6),p(7,"translate"),l(),T(8,"textarea",3),l(),s(9,"mat-card-actions",4)(10,"button",5),c(11),p(12,"translate"),l(),k(13,Ew,3,3,"button",6),l()()()()()),i&2&&(o(6),b(m(7,5,"labels.inputs.Note")),o(2),x("formControl",a.note),o(2),x("routerLink",Ut(9,Iw)),o(),v(" ",m(12,7,"labels.buttons.Cancel")," "),o(2),x("mifosxHasPermission","APPROVALUNDO_LOAN"))},dependencies:[wt,Tt,we,he,Wo,ae,xe,Oe,ze,_e,ge,Pe,Wt,Ae,Pt],styles:[".container[_ngcontent-%COMP%]{max-width:37rem}"]})}}return t})();var Lw=()=>["../../general"];function Nw(t,n){if(t&1&&(s(0,"mat-option",5),c(1),l()),t&2){let e=n.$implicit;x("value",e.id),o(),v(" ",e.displayName," ")}}function kw(t,n){t&1&&(s(0,"mat-error"),c(1),p(2,"translate"),p(3,"translate"),s(4,"strong"),c(5),p(6,"translate"),l()()),t&2&&(o(),$t(" ",m(2,3,"labels.inputs.Loan Officer")," ",m(3,5,"labels.commons.is")," "),o(4),b(m(6,7,"labels.commons.required")))}function Fw(t,n){t&1&&(s(0,"mat-error"),c(1),p(2,"translate"),p(3,"translate"),s(4,"strong"),c(5),p(6,"translate"),l()()),t&2&&(o(),$t(" ",m(2,3,"labels.inputs.Assignment Date")," ",m(3,5,"labels.commons.is")," "),o(4),b(m(6,7,"labels.commons.required")))}function Rw(t,n){if(t&1&&(s(0,"button",12),c(1),p(2,"translate"),l()),t&2){let e=P();x("disabled",!e.assignOfficerForm.valid),o(),v(" ",m(2,2,"labels.buttons.Submit")," ")}}var Mm=(()=>{class t{constructor(){this.formBuilder=A(Te),this.loanService=A(Mt),this.route=A(Et),this.router=A(le),this.dateUtils=A(de),this.settingsService=A(oe),this.minDate=new Date(2e3,0,1),this.maxDate=new Date,this.loanId=this.route.snapshot.params.loanId}ngOnInit(){this.maxDate=this.settingsService.businessDate,this.createassignOfficerForm(),this.loanOfficers=this.dataObject.loanOfficerOptions}createassignOfficerForm(){this.assignOfficerForm=this.formBuilder.group({toLoanOfficerId:["",Gt.required],assignmentDate:[new Date,Gt.required]})}submit(){let e=this.assignOfficerForm.value,i=this.settingsService.language.code,a=this.settingsService.dateFormat,r=this.assignOfficerForm.value.assignmentDate;e.assignmentDate instanceof Date&&(e.assignmentDate=this.dateUtils.formatDate(r,a));let u=ve(ie({},e),{dateFormat:a,locale:i});u.fromLoanOfficerId=this.dataObject.loanOfficerId||"",this.loanService.loanActionButtons(this.loanId,"assignLoanOfficer",u).subscribe(d=>{this.router.navigate(["../../general"],{relativeTo:this.route})})}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=Dt({type:t,selectors:[["mifosx-assign-loan-officer"]],inputs:{dataObject:"dataObject"},decls:27,vars:19,consts:[["assignOnDatePicker",""],[1,"container","mat-elevation-z8"],[3,"ngSubmit","formGroup"],[1,"layout-column"],["required","","formControlName","toLoanOfficerId"],[3,"value"],[3,"click"],["matInput","","required","","formControlName","assignmentDate",3,"min","max","matDatepicker"],["matSuffix","",3,"for"],[1,"layout-row","align-center","gap-5px","responsive-column"],["type","button","mat-raised-button","",3,"routerLink"],["mat-raised-button","","color","primary",3,"disabled",4,"mifosxHasPermission"],["mat-raised-button","","color","primary",3,"disabled"]],template:function(i,a){if(i&1){let r=xt();s(0,"div",1)(1,"mat-card")(2,"form",2),it("ngSubmit",function(){return mt(r),dt(a.submit())}),s(3,"mat-card-content")(4,"div",3)(5,"mat-form-field")(6,"mat-label"),c(7),p(8,"translate"),l(),s(9,"mat-select",4),ue(10,Nw,2,2,"mat-option",5,Ce),l(),M(12,kw,7,9,"mat-error"),l(),s(13,"mat-form-field",6),it("click",function(){mt(r);let d=Lt(20);return dt(d.open())}),s(14,"mat-label"),c(15),p(16,"translate"),l(),T(17,"input",7)(18,"mat-datepicker-toggle",8)(19,"mat-datepicker",null,0),M(21,Fw,7,9,"mat-error"),l()(),s(22,"mat-card-actions",9)(23,"button",10),c(24),p(25,"translate"),l(),k(26,Rw,3,4,"button",11),l()()()()()}if(i&2){let r=Lt(20);o(2),x("formGroup",a.assignOfficerForm),o(5),v(" ",m(8,12,"labels.inputs.To Loan Officer")),o(3),fe(a.loanOfficers),o(2),O(a.assignOfficerForm.controls.toLoanOfficerId.hasError("required")?12:-1),o(3),b(m(16,14,"labels.inputs.Assignment Date")),o(2),x("min",a.minDate)("max",a.maxDate)("matDatepicker",r),o(),x("for",r),o(3),O(a.assignOfficerForm.controls.assignmentDate.hasError("required")?21:-1),o(2),x("routerLink",Ut(18,Lw)),o(),v(" ",m(25,16,"labels.buttons.Cancel")," "),o(2),x("mifosxHasPermission","BULKREASSIGN_LOAN")}},dependencies:[wt,Tt,Re,we,he,Ee,je,Le,Ne,ae,xe,Oe,ze,_e,ge,Ve,Je,Pe,In,On,tn,en,Qe,Wt,Ae,Pt],styles:[".container[_ngcontent-%COMP%]{max-width:37rem}"]})}}return t})();var Bw=()=>["../../general"];function qw(t,n){t&1&&(s(0,"mat-error"),c(1),p(2,"translate"),p(3,"translate"),s(4,"strong"),c(5),p(6,"translate"),l()()),t&2&&(o(),$t(" ",m(2,3,"labels.inputs.Transaction Date")," ",m(3,5,"labels.commons.is")," "),o(4),b(m(6,7,"labels.commons.required")))}function jw(t,n){if(t&1&&(s(0,"button",16),c(1),p(2,"translate"),l()),t&2){let e=P();x("disabled",!e.foreclosureForm.valid),o(),v(" ",m(2,2,"labels.buttons.Foreclosure")," ")}}var Om=(()=>{class t{constructor(){this.formBuilder=A(Te),this.loanService=A(Mt),this.route=A(Et),this.router=A(le),this.dateUtils=A(de),this.settingsService=A(oe),this.minDate=new Date(2e3,0,1),this.maxDate=new Date,this.loanId=this.route.snapshot.params.loanId}ngOnInit(){this.maxDate=this.settingsService.businessDate,this.createforeclosureForm(),this.onChanges()}createforeclosureForm(){this.foreclosureForm=this.formBuilder.group({transactionDate:[this.dataObject.date&&new Date(this.dataObject.date),Gt.required],outstandingPrincipalPortion:[{value:this.dataObject.principalPortion||0,disabled:!0}],outstandingInterestPortion:[{value:this.dataObject.interestPortion||0,disabled:!0}],outstandingFeeChargesPortion:[{value:this.dataObject.feeChargesPortion||0,disabled:!0}],outstandingPenaltyChargesPortion:[{value:this.dataObject.penaltyChargesPortion||0,disabled:!0}],transactionAmount:[{value:this.dataObject.amount,disabled:!0}],note:["",Gt.required]})}onChanges(){this.foreclosureForm.get("transactionDate").valueChanges.subscribe(e=>{this.retrieveLoanForeclosureTemplate(e)})}retrieveLoanForeclosureTemplate(e){let i=this.settingsService.dateFormat,a=this.dateUtils.formatDate(e,i),r={command:"foreclosure",dateFormat:this.settingsService.dateFormat,locale:this.settingsService.language.code,transactionDate:a};this.loanService.getForeclosureData(this.loanId,r).subscribe(u=>{this.foreclosuredata=u,this.foreclosureForm.patchValue({outstandingPrincipalPortion:this.foreclosuredata.principalPortion,outstandingInterestPortion:this.foreclosuredata.interestPortion,outstandingFeeChargesPortion:this.foreclosuredata.feeChargesPortion,outstandingPenaltyChargesPortion:this.foreclosuredata.penaltyChargesPortion})})}submit(){let e=this.foreclosureForm.value,i=this.settingsService.language.code,a=this.settingsService.dateFormat,r=this.foreclosureForm.value.transactionDate;e.transactionDate instanceof Date&&(e.transactionDate=this.dateUtils.formatDate(r,a));let u=ve(ie({},e),{dateFormat:a,locale:i});this.loanService.loanForclosureData(this.loanId,u).subscribe(d=>{this.router.navigate(["../../general"],{relativeTo:this.route})})}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=Dt({type:t,selectors:[["mifosx-foreclosure"]],inputs:{dataObject:"dataObject"},decls:49,vars:33,consts:[["transactionsDatePicker",""],[1,"container","mat-elevation-z8"],[3,"ngSubmit","formGroup"],[1,"layout-column"],[3,"click"],["matInput","","required","","formControlName","transactionDate",3,"min","max","matDatepicker"],["matSuffix","",3,"for"],["matInput","","formControlName","outstandingPrincipalPortion"],["matInput","","formControlName","outstandingInterestPortion"],["matInput","","formControlName","outstandingFeeChargesPortion"],["matInput","","required","","formControlName","outstandingPenaltyChargesPortion"],["matInput","","required","","formControlName","transactionAmount"],["matInput","","formControlName","note","cdkTextareaAutosize","","cdkAutosizeMinRows","2"],[1,"layout-row","align-center","gap-5px","responsive-column"],["type","button","mat-raised-button","",3,"routerLink"],["mat-raised-button","","color","primary",3,"disabled",4,"mifosxHasPermission"],["mat-raised-button","","color","primary",3,"disabled"]],template:function(i,a){if(i&1){let r=xt();s(0,"div",1)(1,"mat-card")(2,"form",2),it("ngSubmit",function(){return mt(r),dt(a.submit())}),s(3,"mat-card-content")(4,"div",3)(5,"mat-form-field",4),it("click",function(){mt(r);let d=Lt(12);return dt(d.open())}),s(6,"mat-label"),c(7),p(8,"translate"),l(),T(9,"input",5)(10,"mat-datepicker-toggle",6)(11,"mat-datepicker",null,0),M(13,qw,7,9,"mat-error"),l(),s(14,"mat-form-field")(15,"mat-label"),c(16),p(17,"translate"),l(),T(18,"input",7),l(),s(19,"mat-form-field")(20,"mat-label"),c(21),p(22,"translate"),l(),T(23,"input",8),l(),s(24,"mat-form-field")(25,"mat-label"),c(26),p(27,"translate"),l(),T(28,"input",9),l(),s(29,"mat-form-field")(30,"mat-label"),c(31),p(32,"translate"),l(),T(33,"input",10),l(),s(34,"mat-form-field")(35,"mat-label"),c(36),p(37,"translate"),l(),T(38,"input",11),l(),s(39,"mat-form-field")(40,"mat-label"),c(41),p(42,"translate"),l(),T(43,"textarea",12),l()(),s(44,"mat-card-actions",13)(45,"button",14),c(46),p(47,"translate"),l(),k(48,jw,3,4,"button",15),l()()()()()}if(i&2){let r=Lt(12);o(2),x("formGroup",a.foreclosureForm),o(5),b(m(8,16,"labels.inputs.Transaction Date")),o(2),x("min",a.minDate)("max",a.maxDate)("matDatepicker",r),o(),x("for",r),o(3),O(a.foreclosureForm.controls.transactionDate.hasError("required")?13:-1),o(3),b(m(17,18,"labels.inputs.Principal")),o(5),b(m(22,20,"labels.inputs.Interest")),o(5),b(m(27,22,"labels.inputs.Fee Amount")),o(5),b(m(32,24,"labels.inputs.Penalty Amount")),o(5),b(m(37,26,"labels.inputs.Transaction Amount")),o(5),b(m(42,28,"labels.inputs.Note")),o(4),x("routerLink",Ut(32,Bw)),o(),v(" ",m(47,30,"labels.buttons.Cancel")," "),o(2),x("mifosxHasPermission","FORECLOSURE_LOAN")}},dependencies:[wt,Tt,Re,we,he,Ee,je,Le,Ne,ae,xe,Oe,ze,_e,ge,Ve,Je,Pe,tn,en,Qe,Wt,Ae,Wn,Pt],styles:[".container[_ngcontent-%COMP%]{max-width:37rem}"]})}}return t})();var zw=()=>["../../general"];function Vw(t,n){t&1&&(s(0,"mat-error"),c(1),p(2,"translate"),p(3,"translate"),s(4,"strong"),c(5),p(6,"translate"),l()()),t&2&&(o(),$t(" ",m(2,3,"labels.inputs.Transaction Date")," ",m(3,5,"labels.commons.is")," "),o(4),b(m(6,7,"labels.commons.required")))}function Uw(t,n){if(t&1){let e=xt();s(0,"mat-form-field",14),it("click",function(){mt(e);let a=Lt(7);return dt(a.open())}),s(1,"mat-label"),c(2),p(3,"translate"),l(),T(4,"input",15)(5,"mat-datepicker-toggle",16)(6,"mat-datepicker",null,0),M(8,Vw,7,9,"mat-error"),l()}if(t&2){let e=Lt(7),i=P();o(2),b(m(3,6,"labels.inputs.Transaction Date")),o(2),x("min",i.minDate)("max",i.maxDate)("matDatepicker",e),o(),x("for",e),o(3),O(i.prepayLoanForm.controls.transactionDate.hasError("required")?8:-1)}}function Hw(t,n){if(t&1&&T(0,"mifosx-input-amount",7),t&2){let e=P();x("currency",e.currency)("isRequired",!0)("inputFormControl",e.prepayLoanForm.controls.transactionAmount)("inputLabel","Transaction Amount")}}function Gw(t,n){if(t&1&&(s(0,"mat-option",18),c(1),l()),t&2){let e=n.$implicit;x("value",e.id),o(),v(" ",e.name," ")}}function Ww(t,n){if(t&1&&(s(0,"mat-form-field")(1,"mat-label"),c(2),p(3,"translate"),l(),s(4,"mat-select",17),ue(5,Gw,2,2,"mat-option",18,Ce),l()()),t&2){let e=P();o(2),b(m(3,1,"labels.inputs.Payment Type")),o(3),fe(e.paymentTypes)}}function $w(t,n){if(t&1){let e=xt();s(0,"div",9)(1,"span",19),it("click",function(){mt(e);let a=P();return dt(a.addPaymentDetails())}),s(2,"mat-slide-toggle")(3,"div",20)(4,"span",21),c(5),p(6,"translate"),l()()()()()}if(t&2){let e=P();o(3),x("className",e.showPaymentDetails?"enabled":"disabled"),o(2),b(m(6,2,"labels.inputs.Show Payment Details"))}}function Yw(t,n){t&1&&(s(0,"mat-form-field")(1,"mat-label"),c(2),p(3,"translate"),l(),T(4,"input",22),l(),s(5,"mat-form-field")(6,"mat-label"),c(7),p(8,"translate"),l(),T(9,"input",23),l(),s(10,"mat-form-field")(11,"mat-label"),c(12),p(13,"translate"),l(),T(14,"input",24),l(),s(15,"mat-form-field")(16,"mat-label"),c(17),p(18,"translate"),l(),T(19,"input",25),l(),s(20,"mat-form-field")(21,"mat-label"),c(22),p(23,"translate"),l(),T(24,"input",26),l()),t&2&&(o(2),v(" ",m(3,5,"labels.inputs.Account")," #"),o(5),v("",m(8,7,"labels.inputs.Cheque")," #"),o(5),b(m(13,9,"labels.inputs.Routing Code")),o(5),v("",m(18,11,"labels.inputs.Reciept")," #"),o(5),v("",m(23,13,"labels.inputs.Bank")," #"))}function Zw(t,n){if(t&1&&(s(0,"button",27),c(1),p(2,"translate"),l()),t&2){let e=P();x("disabled",!e.prepayLoanForm.valid),o(),v(" ",m(2,2,"labels.buttons.Submit")," ")}}var Im=(()=>{class t{constructor(){this.formBuilder=A(Te),this.loanService=A(Mt),this.route=A(Et),this.router=A(le),this.dateUtils=A(de),this.settingsService=A(oe),this.showPaymentDetails=!1,this.minDate=new Date(2e3,0,1),this.maxDate=new Date,this.currency=null,this.loanId=this.route.snapshot.params.loanId}ngOnInit(){this.prepayData=this.dataObject,this.contractTermination=this.dataObject.actionName=="Contract Termination",this.maxDate=this.settingsService.businessDate,this.createprepayLoanForm(),this.contractTermination||this.setPrepayLoanDetails(),this.dataObject.currency&&(this.currency=this.dataObject.currency)}createprepayLoanForm(){this.contractTermination?this.prepayLoanForm=this.formBuilder.group({externalId:[""],note:[""]}):this.prepayLoanForm=this.formBuilder.group({transactionDate:[new Date,Gt.required],transactionAmount:["",Gt.required],externalId:[""],paymentTypeId:[""],note:[""]})}setPrepayLoanDetails(){this.paymentTypes=this.dataObject.paymentTypeOptions,this.prepayLoanForm.patchValue({transactionAmount:this.dataObject.amount}),this.prepayLoanForm.get("transactionDate").valueChanges.subscribe(e=>{let i=this.dateUtils.formatDate(e,this.settingsService.dateFormat);this.loanService.getLoanPrepayLoanActionTemplate(this.loanId,i).subscribe(a=>{this.prepayData=a,this.prepayLoanForm.patchValue({transactionAmount:this.prepayData.amount})})})}addPaymentDetails(){this.showPaymentDetails=!this.showPaymentDetails,this.showPaymentDetails?(this.prepayLoanForm.addControl("accountNumber",new pe("")),this.prepayLoanForm.addControl("checkNumber",new pe("")),this.prepayLoanForm.addControl("routingCode",new pe("")),this.prepayLoanForm.addControl("receiptNumber",new pe("")),this.prepayLoanForm.addControl("bankNumber",new pe(""))):(this.prepayLoanForm.removeControl("accountNumber"),this.prepayLoanForm.removeControl("checkNumber"),this.prepayLoanForm.removeControl("routingCode"),this.prepayLoanForm.removeControl("receiptNumber"),this.prepayLoanForm.removeControl("bankNumber"))}submitRepayment(){let e=this.prepayLoanForm.value,i=this.settingsService.language.code,a=this.settingsService.dateFormat,r=this.prepayLoanForm.value.transactionDate;e.transactionDate instanceof Date&&(e.transactionDate=this.dateUtils.formatDate(r,a));let u=ve(ie({},e),{dateFormat:a,locale:i});u.transactionAmount=u.transactionAmount*1,this.loanService.submitLoanActionButton(this.loanId,u,"repayment").subscribe(d=>{this.router.navigate(["../../general"],{relativeTo:this.route})})}submitContractTermination(){let e=ie({},this.prepayLoanForm.value);this.loanService.loanActionButtons(this.loanId,"contractTermination",e).subscribe(i=>{this.router.navigate(["../../general"],{relativeTo:this.route})})}submit(){this.contractTermination?this.submitContractTermination():this.submitRepayment()}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=Dt({type:t,selectors:[["mifosx-prepay-loan"]],inputs:{dataObject:"dataObject"},decls:50,vars:42,consts:[["transactionDatePicker",""],[1,"container","mat-elevation-z8"],[3,"ngSubmit","formGroup"],[1,"layout-column"],[1,"layout-row-wrap"],[1,"flex-50","mat-body-strong"],[1,"flex-50","r-amount","right-label"],[3,"currency","isRequired","inputFormControl","inputLabel"],["matInput","","formControlName","externalId"],[1,"flex-fill"],["matInput","","formControlName","note","cdkTextareaAutosize","","cdkAutosizeMinRows","2"],[1,"layout-row","align-center","gap-5px","responsive-column"],["type","button","mat-raised-button","",3,"routerLink"],["mat-raised-button","","color","primary",3,"disabled",4,"mifosxHasPermission"],[3,"click"],["matInput","","required","","formControlName","transactionDate",3,"min","max","matDatepicker"],["matSuffix","",3,"for"],["formControlName","paymentTypeId"],[3,"value"],[1,"expandcollapsebutton","m-l-10","m-t-40","flex-75",3,"click"],[3,"className"],[1,"m-l-10"],["matInput","","formControlName","accountNumber"],["matInput","","formControlName","checkNumber"],["matInput","","formControlName","routingCode"],["matInput","","formControlName","receiptNumber"],["matInput","","formControlName","bankNumber"],["mat-raised-button","","color","primary",3,"disabled"]],template:function(i,a){i&1&&(s(0,"div",1)(1,"mat-card")(2,"form",2),it("ngSubmit",function(){return a.submit()}),s(3,"mat-card-content")(4,"div",3),M(5,Uw,9,8,"mat-form-field"),s(6,"div",4)(7,"div",5),c(8),p(9,"translate"),l(),s(10,"div",6),c(11),p(12,"formatNumber"),l(),s(13,"div",5),c(14),p(15,"translate"),l(),s(16,"div",6),c(17),p(18,"formatNumber"),l(),s(19,"div",5),c(20),p(21,"translate"),l(),s(22,"div",6),c(23),p(24,"formatNumber"),l(),s(25,"div",5),c(26),p(27,"translate"),l(),s(28,"div",6),c(29),p(30,"formatNumber"),l()(),M(31,Hw,1,4,"mifosx-input-amount",7),s(32,"mat-form-field")(33,"mat-label"),c(34),p(35,"translate"),l(),T(36,"input",8),l(),M(37,Ww,7,3,"mat-form-field"),M(38,$w,7,4,"div",9),M(39,Yw,25,15),s(40,"mat-form-field")(41,"mat-label"),c(42),p(43,"translate"),l(),T(44,"textarea",10),l()(),s(45,"mat-card-actions",11)(46,"button",12),c(47),p(48,"translate"),l(),k(49,Zw,3,4,"button",13),l()()()()()),i&2&&(o(2),x("formGroup",a.prepayLoanForm),o(3),O(a.contractTermination?-1:5),o(3),v(" ",m(9,19,"labels.inputs.Principal")," "),o(3),v(" ",m(12,21,a.prepayData.principalPortion)," "),o(3),v(" ",m(15,23,"labels.inputs.Interest")," "),o(3),v(" ",m(18,25,a.prepayData.interestPortion)," "),o(3),v(" ",m(21,27,"labels.inputs.Fees")," "),o(3),v(" ",m(24,29,a.prepayData.feeChargesPortion)," "),o(3),v(" ",m(27,31,"labels.inputs.Penalties")," "),o(3),v(" ",m(30,33,a.prepayData.penaltyChargesPortion)," "),o(2),O(a.contractTermination?-1:31),o(3),b(m(35,35,"labels.inputs.External Id")),o(3),O(a.contractTermination?-1:37),o(),O(a.contractTermination?-1:38),o(),O(a.showPaymentDetails?39:-1),o(3),b(m(43,37,"labels.inputs.Note")),o(4),x("routerLink",Ut(41,zw)),o(),v(" ",m(48,39,"labels.buttons.Cancel")," "),o(2),x("mifosxHasPermission","REPAYMENT_LOAN"))},dependencies:[wt,Tt,Re,we,he,Ee,je,Le,Ne,ae,xe,Oe,ze,_e,ge,Ve,Je,Pe,In,On,tn,en,Qe,Wt,Ae,Ri,ja,Wn,Pt,hn],styles:[".expandcollapsebutton[_ngcontent-%COMP%]{margin-top:-7px}.container[_ngcontent-%COMP%]{max-width:37rem}.right-input[_ngcontent-%COMP%]{text-align:right}.right-label[_ngcontent-%COMP%]{padding-right:25px!important}"]})}}return t})();var Kw=()=>["../../general"];function Jw(t,n){t&1&&(s(0,"mat-error"),c(1),p(2,"translate"),p(3,"translate"),s(4,"strong"),c(5),p(6,"translate"),l()()),t&2&&(o(),$t(" ",m(2,3,"labels.inputs.Transaction Date")," ",m(3,5,"labels.commons.is")," "),o(4),b(m(6,7,"labels.commons.required")))}function Xw(t,n){if(t&1&&(s(0,"div",7)(1,"div",21),c(2),p(3,"translate"),l(),s(4,"div",22),c(5),p(6,"formatNumber"),l(),s(7,"div",21),c(8),p(9,"translate"),l(),s(10,"div",22),c(11),p(12,"formatNumber"),l(),s(13,"div",21),c(14),p(15,"translate"),l(),s(16,"div",22),c(17),p(18,"formatNumber"),l(),s(19,"div",21),c(20),p(21,"translate"),l(),s(22,"div",22),c(23),p(24,"formatNumber"),l()()),t&2){let e=P();o(2),v(" ",m(3,8,"labels.inputs.Principal")," "),o(3),v(" ",m(6,10,e.dataObject.principalPortion)," "),o(3),v(" ",m(9,12,"labels.inputs.Interest")," "),o(3),v(" ",m(12,14,e.dataObject.interestPortion)," "),o(3),v(" ",m(15,16,"labels.inputs.Fees")," "),o(3),v(" ",m(18,18,e.dataObject.feeChargesPortion)," "),o(3),v(" ",m(21,20,"labels.inputs.Penalties")," "),o(3),v(" ",m(24,22,e.dataObject.penaltyChargesPortion)," ")}}function Qw(t,n){if(t&1&&(s(0,"mat-option",11),c(1),l()),t&2){let e=n.$implicit;x("value",e.id),o(),v(" ",e.name," ")}}function tT(t,n){if(t&1&&(s(0,"mat-form-field")(1,"mat-label"),c(2),p(3,"translate"),l(),s(4,"mat-select",23),ue(5,Qw,2,2,"mat-option",11,Ce),l()()),t&2){let e=P();o(2),b(m(3,1,"labels.inputs.Classification")),o(3),fe(e.classificationOptions)}}function eT(t,n){if(t&1&&(s(0,"mat-option",11),c(1),l()),t&2){let e=n.$implicit;x("value",e.id),o(),v(" ",e.name," ")}}function nT(t,n){t&1&&(s(0,"mat-form-field")(1,"mat-label"),c(2),p(3,"translate"),l(),T(4,"input",24),l(),s(5,"mat-form-field")(6,"mat-label"),c(7),p(8,"translate"),l(),T(9,"input",25),l(),s(10,"mat-form-field")(11,"mat-label"),c(12),p(13,"translate"),l(),T(14,"input",26),l(),s(15,"mat-form-field")(16,"mat-label"),c(17),p(18,"translate"),l(),T(19,"input",27),l(),s(20,"mat-form-field")(21,"mat-label"),c(22),p(23,"translate"),l(),T(24,"input",28),l()),t&2&&(o(2),v(" ",m(3,5,"labels.inputs.Account")," #"),o(5),v(" ",m(8,7,"labels.inputs.Cheque")," #"),o(5),v(" ",m(13,9,"labels.inputs.Routing Code")),o(5),v(" ",m(18,11,"labels.inputs.Reciept")," #"),o(5),v(" ",m(23,13,"labels.inputs.Bank")," #"))}function iT(t,n){t&1&&(s(0,"mat-checkbox",17),c(1),p(2,"translate"),l()),t&2&&(o(),v(" ",m(2,1,"labels.inputs.Skip Interest Refund Transaction Posting")," "))}function aT(t,n){if(t&1&&(s(0,"button",29),c(1),p(2,"translate"),l()),t&2){let e=P();x("disabled",!e.repaymentLoanForm.valid),o(),v(" ",m(2,2,"labels.buttons.Submit")," ")}}var Em=(()=>{class t{constructor(){this.formBuilder=A(Te),this.loanService=A(Mt),this.route=A(Et),this.router=A(le),this.dateUtils=A(de),this.settingsService=A(oe),this.showPaymentDetails=!1,this.minDate=new Date(2e3,0,1),this.maxDate=new Date,this.currency=null,this.command=null,this.classificationOptions=[],this.loanId=this.route.snapshot.params.loanId}ngOnInit(){this.command=this.dataObject.type.code.split(".")[1],this.maxDate=this.settingsService.businessDate,this.createRepaymentLoanForm(),this.setRepaymentLoanDetails(),this.dataObject.currency&&(this.currency=this.dataObject.currency)}createRepaymentLoanForm(){this.repaymentLoanForm=this.formBuilder.group({transactionDate:[this.settingsService.businessDate,Gt.required],externalId:"",paymentTypeId:"",note:"",skipInterestRefund:[!1]}),this.isCapitalizedIncome()?this.repaymentLoanForm.addControl("transactionAmount",new pe("",[Gt.required,Gt.min(.001),Gt.max(this.dataObject.amount)])):this.repaymentLoanForm.addControl("transactionAmount",new pe("",[Gt.required,Gt.min(.001)])),(this.isCapitalizedIncome()||this.isBuyDownFee())&&this.repaymentLoanForm.addControl("classificationId",new pe(""))}setRepaymentLoanDetails(){this.paymentTypes=this.dataObject.paymentTypeOptions,this.classificationOptions=this.dataObject.classificationOptions,this.repaymentLoanForm.patchValue({transactionAmount:this.dataObject.amount})}addPaymentDetails(){this.showPaymentDetails=!this.showPaymentDetails,this.showPaymentDetails?(this.repaymentLoanForm.addControl("accountNumber",new pe("")),this.repaymentLoanForm.addControl("checkNumber",new pe("")),this.repaymentLoanForm.addControl("routingCode",new pe("")),this.repaymentLoanForm.addControl("receiptNumber",new pe("")),this.repaymentLoanForm.addControl("bankNumber",new pe(""))):(this.repaymentLoanForm.removeControl("accountNumber"),this.repaymentLoanForm.removeControl("checkNumber"),this.repaymentLoanForm.removeControl("routingCode"),this.repaymentLoanForm.removeControl("receiptNumber"),this.repaymentLoanForm.removeControl("bankNumber"))}showDetails(){return!this.isCapitalizedIncome()&&!this.isBuyDownFee()}isCapitalizedIncome(){return["capitalizedIncome","capitalizedIncomeAdjustment"].includes(this.command)}isBuyDownFee(){return["buyDownFee"].includes(this.command)}showInterestRefundCheckbox(){let e=this.dataObject?.type?.code?.toLowerCase()||"";return e.includes("merchantissuedrefund")||e.includes("payoutrefund")}submit(){let e=this.repaymentLoanForm.value,i=this.settingsService.language.code,a=this.settingsService.dateFormat,r=this.repaymentLoanForm.value.transactionDate;e.transactionDate instanceof Date&&(e.transactionDate=this.dateUtils.formatDate(r,a));let u=ve(ie({},e),{dateFormat:a,locale:i});u.transactionAmount=u.transactionAmount*1,e.skipInterestRefund&&(u.interestRefundCalculation=!1),delete u.skipInterestRefund,this.loanService.submitLoanActionButton(this.loanId,u,this.command).subscribe(d=>{this.router.navigate(["../../transactions"],{relativeTo:this.route})})}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=Dt({type:t,selectors:[["mifosx-make-repayment"]],inputs:{dataObject:"dataObject"},decls:48,vars:36,consts:[["transactionDatePicker",""],[1,"container","mat-elevation-z8"],[3,"ngSubmit","formGroup"],[1,"layout-column"],[3,"click"],["matInput","","required","","formControlName","transactionDate",3,"min","max","matDatepicker"],["matSuffix","",3,"for"],[1,"layout-row-wrap"],[3,"currency","isRequired","inputFormControl","inputLabel"],["matInput","","formControlName","externalId"],["formControlName","paymentTypeId"],[3,"value"],[1,"flex-fill"],[1,"expandcollapsebutton","m-l-10","m-t-40","flex-75",3,"click"],[3,"className"],[1,"m-l-10"],["matInput","","formControlName","note","cdkTextareaAutosize","","cdkAutosizeMinRows","2"],["formControlName","skipInterestRefund"],[1,"layout-row","align-center","gap-5px","responsive-column"],["type","button","mat-raised-button","",3,"routerLink"],["mat-raised-button","","color","primary",3,"disabled",4,"mifosxHasPermission"],[1,"flex-50","mat-body-strong"],[1,"flex-50","r-amount","right-label"],["formControlName","classificationId"],["matInput","","formControlName","accountNumber"],["matInput","","formControlName","checkNumber"],["matInput","","formControlName","routingCode"],["matInput","","formControlName","receiptNumber"],["matInput","","formControlName","bankNumber"],["mat-raised-button","","color","primary",3,"disabled"]],template:function(i,a){if(i&1){let r=xt();s(0,"div",1)(1,"mat-card")(2,"form",2),it("ngSubmit",function(){return mt(r),dt(a.submit())}),s(3,"mat-card-content")(4,"div",3)(5,"mat-form-field",4),it("click",function(){mt(r);let d=Lt(12);return dt(d.open())}),s(6,"mat-label"),c(7),p(8,"translate"),l(),T(9,"input",5)(10,"mat-datepicker-toggle",6)(11,"mat-datepicker",null,0),M(13,Jw,7,9,"mat-error"),l(),M(14,Xw,25,24,"div",7),T(15,"mifosx-input-amount",8),s(16,"mat-form-field")(17,"mat-label"),c(18),p(19,"translate"),l(),T(20,"input",9),l(),M(21,tT,7,3,"mat-form-field"),s(22,"mat-form-field")(23,"mat-label"),c(24),p(25,"translate"),l(),s(26,"mat-select",10),ue(27,eT,2,2,"mat-option",11,Ce),l()(),s(29,"div",12)(30,"span",13),it("click",function(){return mt(r),dt(a.addPaymentDetails())}),s(31,"mat-slide-toggle")(32,"div",14)(33,"span",15),c(34),p(35,"translate"),l()()()()(),M(36,nT,25,15),s(37,"mat-form-field")(38,"mat-label"),c(39),p(40,"translate"),l(),T(41,"textarea",16),l(),M(42,iT,3,3,"mat-checkbox",17),l(),s(43,"mat-card-actions",18)(44,"button",19),c(45),p(46,"translate"),l(),k(47,aT,3,4,"button",20),l()()()()()}if(i&2){let r=Lt(12);o(2),x("formGroup",a.repaymentLoanForm),o(5),b(m(8,23,"labels.inputs.Transaction Date")),o(2),x("min",a.minDate)("max",a.maxDate)("matDatepicker",r),o(),x("for",r),o(3),O(a.repaymentLoanForm.controls.transactionDate.hasError("required")?13:-1),o(),O(a.showDetails()?14:-1),o(),x("currency",a.currency)("isRequired",!0)("inputFormControl",a.repaymentLoanForm.controls.transactionAmount)("inputLabel","Transaction Amount"),o(3),b(m(19,25,"labels.inputs.External Id")),o(3),O(a.isCapitalizedIncome()||a.isBuyDownFee()?21:-1),o(3),b(m(25,27,"labels.inputs.Payment Type")),o(3),fe(a.paymentTypes),o(5),x("className",a.showPaymentDetails?"enabled":"disabled"),o(2),b(m(35,29,"labels.inputs.Show Payment Details")),o(2),O(a.showPaymentDetails?36:-1),o(3),v(" ",m(40,31,"labels.inputs.Note")),o(3),O(a.showInterestRefundCheckbox()?42:-1),o(2),x("routerLink",Ut(35,Kw)),o(),v(" ",m(46,33,"labels.buttons.Cancel")," "),o(2),x("mifosxHasPermission","REPAYMENT_LOAN")}},dependencies:[wt,Tt,Re,we,he,Ee,je,Le,Ne,ae,xe,Oe,ze,_e,ge,Ve,Je,Pe,In,On,tn,en,Qe,Wt,Da,Ae,Ri,ja,Wn,Pt,hn],styles:[".expandcollapsebutton[_ngcontent-%COMP%]{margin-top:-7px}.container[_ngcontent-%COMP%]{max-width:37rem}.right-input[_ngcontent-%COMP%]{text-align:right}.right-label[_ngcontent-%COMP%]{padding-right:25px!important}"]})}}return t})();var oT=()=>["../../general"];function rT(t,n){t&1&&(s(0,"mat-error"),c(1),p(2,"translate"),p(3,"translate"),s(4,"strong"),c(5),p(6,"translate"),l()()),t&2&&(o(),$t(" ",m(2,3,"labels.inputs.Transaction Date")," ",m(3,5,"labels.commons.is")," "),o(4),b(m(6,7,"labels.commons.required")))}function lT(t,n){if(t&1&&(s(0,"button",13),c(1),p(2,"translate"),l()),t&2){let e=P();x("disabled",!e.creditBalanceLoanForm.valid),o(),v(" ",m(2,2,"labels.buttons.Submit")," ")}}var Lm=(()=>{class t{constructor(){this.formBuilder=A(Te),this.loanService=A(Mt),this.route=A(Et),this.router=A(le),this.dateUtils=A(de),this.settingsService=A(oe),this.minDate=new Date(2e3,0,1),this.maxDate=new Date,this.loanId=this.route.snapshot.params.loanId}ngOnInit(){this.maxDate=this.settingsService.businessDate,this.createCreditBalanceLoanForm(),this.setCreditBalanceLoanDetails(),this.dataObject.currency&&(this.currency=this.dataObject.currency)}createCreditBalanceLoanForm(){this.creditBalanceLoanForm=this.formBuilder.group({transactionDate:[new Date,Gt.required],transactionAmount:["",Gt.required],externalId:"",note:""})}setCreditBalanceLoanDetails(){this.creditBalanceLoanForm.patchValue({transactionAmount:this.dataObject.amount})}submit(){let e=this.creditBalanceLoanForm.value,i=this.settingsService.language.code,a=this.settingsService.dateFormat,r=this.creditBalanceLoanForm.value.transactionDate;e.transactionDate instanceof Date&&(e.transactionDate=this.dateUtils.formatDate(r,a));let u=ve(ie({},e),{dateFormat:a,locale:i}),d=this.dataObject.type.code.split(".")[1];u.transactionAmount=u.transactionAmount*1,this.loanService.submitLoanActionButton(this.loanId,u,d).subscribe(g=>{this.router.navigate(["../../transactions"],{relativeTo:this.route})})}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=Dt({type:t,selectors:[["mifosx-loan-credit-balance-refund"]],inputs:{dataObject:"dataObject"},decls:30,vars:25,consts:[["transactionDatePicker",""],[1,"container","mat-elevation-z8"],[3,"ngSubmit","formGroup"],[1,"layout-column"],[3,"click"],["matInput","","required","","formControlName","transactionDate",3,"min","max","matDatepicker"],["matSuffix","",3,"for"],[3,"currency","isRequired","inputFormControl","inputLabel"],["matInput","","formControlName","externalId"],["matInput","","formControlName","note","cdkTextareaAutosize","","cdkAutosizeMinRows","2"],[1,"layout-row","align-center","gap-5px","responsive-column"],["type","button","mat-raised-button","",3,"routerLink"],["mat-raised-button","","color","primary",3,"disabled",4,"mifosxHasPermission"],["mat-raised-button","","color","primary",3,"disabled"]],template:function(i,a){if(i&1){let r=xt();s(0,"div",1)(1,"mat-card")(2,"form",2),it("ngSubmit",function(){return mt(r),dt(a.submit())}),s(3,"mat-card-content")(4,"div",3)(5,"mat-form-field",4),it("click",function(){mt(r);let d=Lt(12);return dt(d.open())}),s(6,"mat-label"),c(7),p(8,"translate"),l(),T(9,"input",5)(10,"mat-datepicker-toggle",6)(11,"mat-datepicker",null,0),M(13,rT,7,9,"mat-error"),l(),T(14,"mifosx-input-amount",7),s(15,"mat-form-field")(16,"mat-label"),c(17),p(18,"translate"),l(),T(19,"input",8),l(),s(20,"mat-form-field")(21,"mat-label"),c(22),p(23,"translate"),l(),T(24,"textarea",9),l()(),s(25,"mat-card-actions",10)(26,"button",11),c(27),p(28,"translate"),l(),k(29,lT,3,4,"button",12),l()()()()()}if(i&2){let r=Lt(12);o(2),x("formGroup",a.creditBalanceLoanForm),o(5),b(m(8,16,"labels.inputs.Transaction Date")),o(2),x("min",a.minDate)("max",a.maxDate)("matDatepicker",r),o(),x("for",r),o(3),O(a.creditBalanceLoanForm.controls.transactionDate.hasError("required")?13:-1),o(),x("currency",a.currency)("isRequired",!0)("inputFormControl",a.creditBalanceLoanForm.controls.transactionAmount)("inputLabel","Transaction Amount"),o(3),b(m(18,18,"labels.inputs.External Id")),o(5),b(m(23,20,"labels.inputs.Note")),o(4),x("routerLink",Ut(24,oT)),o(),v(" ",m(28,22,"labels.buttons.Cancel")," "),o(2),x("mifosxHasPermission","REPAYMENT_LOAN")}},dependencies:[wt,Tt,Re,we,he,Ee,je,Le,Ne,ae,xe,Oe,ze,_e,ge,Ve,Je,Pe,tn,en,Qe,Wt,Ae,Ri,Wn,Pt],styles:[".expandcollapsebutton[_ngcontent-%COMP%]{margin-top:-7px}.container[_ngcontent-%COMP%]{max-width:37rem}"]})}}return t})();var sT=()=>["../../general"];function cT(t,n){t&1&&(s(0,"mat-error"),c(1),p(2,"translate"),p(3,"translate"),s(4,"strong"),c(5),p(6,"translate"),l()()),t&2&&(o(),$t(" ",m(2,3,"labels.inputs.Interest Date")," ",m(3,5,"labels.commons.is")," "),o(4),b(m(6,7,"labels.commons.required")))}function pT(t,n){if(t&1&&(s(0,"button",12),c(1),p(2,"translate"),l()),t&2){let e=P();x("disabled",!e.loanInterestForm.valid),o(),v(" ",m(2,2,"labels.buttons.Submit")," ")}}var Nm=(()=>{class t{constructor(){this.formBuilder=A(Te),this.router=A(le),this.settingsService=A(oe),this.dateUtils=A(de),this.loanService=A(Mt),this.route=A(Et),this.minDate=new Date(2e3,0,1),this.maxDate=new Date}ngOnInit(){this.maxDate=this.settingsService.businessDate,this.setLoanInterestForm(),this.dataObject.currency&&(this.currency=this.dataObject.currency)}setLoanInterestForm(){this.loanInterestForm=this.formBuilder.group({transactionAmount:[this.dataObject.amount,Gt.required],transactionDate:[this.dataObject.date&&new Date(this.dataObject.date),Gt.required],note:[""]})}submit(){let e=this.loanInterestForm.value,i=this.settingsService.language.code,a=this.settingsService.dateFormat,r=this.loanInterestForm.value.transactionDate;e.transactionDate instanceof Date&&(e.transactionDate=this.dateUtils.formatDate(r,a));let u=ve(ie({},e),{dateFormat:a,locale:i});u.transactionAmount=u.transactionAmount*1;let d=this.route.snapshot.params.loanId;this.loanService.submitLoanActionButton(d,u,"waiveinterest").subscribe(g=>{this.router.navigate(["../../general"],{relativeTo:this.route})})}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=Dt({type:t,selectors:[["mifosx-waive-interest"]],inputs:{dataObject:"dataObject"},decls:25,vars:22,consts:[["interestDatePicker",""],[1,"container","mat-elevation-z8"],[3,"ngSubmit","formGroup"],[1,"layout-column"],[3,"click"],["matInput","","required","","formControlName","transactionDate",3,"min","max","matDatepicker"],["matSuffix","",3,"for"],[3,"currency","isRequired","inputFormControl","inputLabel"],["matInput","","formControlName","note","cdkTextareaAutosize","","cdkAutosizeMinRows","2"],[1,"layout-row","align-center","gap-5px","responsive-column"],["type","button","mat-raised-button","",3,"routerLink"],["mat-raised-button","","color","primary",3,"disabled",4,"mifosxHasPermission"],["mat-raised-button","","color","primary",3,"disabled"]],template:function(i,a){if(i&1){let r=xt();s(0,"div",1)(1,"mat-card")(2,"form",2),it("ngSubmit",function(){return mt(r),dt(a.submit())}),s(3,"mat-card-content")(4,"div",3)(5,"mat-form-field",4),it("click",function(){mt(r);let d=Lt(12);return dt(d.open())}),s(6,"mat-label"),c(7),p(8,"translate"),l(),T(9,"input",5)(10,"mat-datepicker-toggle",6)(11,"mat-datepicker",null,0),M(13,cT,7,9,"mat-error"),l(),T(14,"mifosx-input-amount",7),s(15,"mat-form-field")(16,"mat-label"),c(17),p(18,"translate"),l(),T(19,"textarea",8),l()(),s(20,"mat-card-actions",9)(21,"button",10),c(22),p(23,"translate"),l(),k(24,pT,3,4,"button",11),l()()()()()}if(i&2){let r=Lt(12);o(2),x("formGroup",a.loanInterestForm),o(5),b(m(8,15,"labels.inputs.Interest waived on")),o(2),x("min",a.minDate)("max",a.maxDate)("matDatepicker",r),o(),x("for",r),o(3),O(a.loanInterestForm.controls.transactionDate.hasError("required")?13:-1),o(),x("currency",a.currency)("isRequired",!0)("inputFormControl",a.loanInterestForm.controls.transactionAmount)("inputLabel","Transaction Amount"),o(3),b(m(18,17,"labels.inputs.Note")),o(4),x("routerLink",Ut(21,sT)),o(),v(" ",m(23,19,"labels.buttons.Cancel")," "),o(2),x("mifosxHasPermission","WAIVEINTERESTPORTION_LOAN")}},dependencies:[wt,Tt,Re,we,he,Ee,je,Le,Ne,ae,xe,Oe,ze,_e,ge,Ve,Je,Pe,tn,en,Qe,Wt,Ae,Ri,Wn,Pt],styles:[".container[_ngcontent-%COMP%]{max-width:37rem}"]})}}return t})();var mT=()=>["../../general"];function dT(t,n){t&1&&(s(0,"mat-error"),c(1),p(2,"translate"),p(3,"translate"),s(4,"strong"),c(5),p(6,"translate"),l()()),t&2&&(o(),$t(" ",m(2,3,"labels.inputs.Write Off Date")," ",m(3,5,"labels.commons.is")," "),o(4),b(m(6,7,"labels.commons.required")))}function uT(t,n){if(t&1&&(s(0,"mat-option",9),c(1),l()),t&2){let e=n.$implicit;x("value",e.id),o(),v(" ",e.name," ")}}function fT(t,n){if(t&1){let e=xt();s(0,"button",14),it("click",function(){mt(e);let a=P();return dt(a.submit())}),c(1),p(2,"translate"),l()}t&2&&(o(),v(" ",m(2,1,"labels.buttons.Submit")," "))}var km=(()=>{class t{constructor(){this.formBuilder=A(Te),this.route=A(Et),this.loanService=A(Mt),this.dateUtils=A(de),this.router=A(le),this.settingsService=A(oe),this.minDate=new Date(2e3,0,1),this.maxDate=new Date,this.writeOffReasonOptions=[],this.loanId=this.route.snapshot.params.loanId}ngOnInit(){this.maxDate=this.settingsService.businessDate,this.setWriteOffForm(),this.writeOffReasonOptions=this.dataObject.writeOffReasonOptions}setWriteOffForm(){this.writeOffForm=this.formBuilder.group({transactionDate:[this.dataObject.date&&new Date(this.dataObject.date),Gt.required],amount:[{value:this.dataObject.amount,disabled:!0}],writeoffReasonId:[""],note:[""]})}submit(){let e=this.writeOffForm.value,i=this.settingsService.language.code,a=this.settingsService.dateFormat,r=this.writeOffForm.value.transactionDate;e.transactionDate instanceof Date&&(e.transactionDate=this.dateUtils.formatDate(r,a)),(e.writeoffReasonId===null||e.writeoffReasonId==="")&&delete e.writeoffReasonId;let u=ve(ie({},e),{dateFormat:a,locale:i});delete u.amount,this.loanService.submitLoanActionButton(this.loanId,u,"writeoff").subscribe(d=>{this.router.navigate(["../../general"],{relativeTo:this.route})})}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=Dt({type:t,selectors:[["mifosx-write-off-page"]],inputs:{dataObject:"dataObject"},decls:36,vars:24,consts:[["writeOffDatePicker",""],[1,"container","mat-elevation-z8"],[3,"formGroup"],[1,"layout-column"],[3,"click"],["matInput","","required","","formControlName","transactionDate",3,"min","max","matDatepicker"],["matSuffix","",3,"for"],["matInput","","formControlName","amount"],["formControlName","writeoffReasonId"],[3,"value"],["matInput","","formControlName","note","cdkTextareaAutosize","","cdkAutosizeMinRows","2"],[1,"layout-row","align-center","gap-5px","responsive-column"],["type","button","mat-raised-button","",3,"routerLink"],["mat-raised-button","","color","primary",3,"click",4,"mifosxHasPermission"],["mat-raised-button","","color","primary",3,"click"]],template:function(i,a){if(i&1){let r=xt();s(0,"div",1)(1,"mat-card")(2,"mat-card-content")(3,"form",2)(4,"div",3)(5,"mat-form-field",4),it("click",function(){mt(r);let d=Lt(12);return dt(d.open())}),s(6,"mat-label"),c(7),p(8,"translate"),l(),T(9,"input",5)(10,"mat-datepicker-toggle",6)(11,"mat-datepicker",null,0),M(13,dT,7,9,"mat-error"),l(),s(14,"mat-form-field")(15,"mat-label"),c(16),p(17,"translate"),l(),T(18,"input",7),l(),s(19,"mat-form-field")(20,"mat-label"),c(21),p(22,"translate"),l(),s(23,"mat-select",8),ue(24,uT,2,2,"mat-option",9,Ce),l()(),s(26,"mat-form-field")(27,"mat-label"),c(28),p(29,"translate"),l(),T(30,"textarea",10),l()()(),s(31,"mat-card-actions",11)(32,"button",12),c(33),p(34,"translate"),l(),k(35,fT,3,3,"button",13),l()()()()}if(i&2){let r=Lt(12);o(3),x("formGroup",a.writeOffForm),o(4),b(m(8,13,"labels.inputs.Write off on")),o(2),x("min",a.minDate)("max",a.maxDate)("matDatepicker",r),o(),x("for",r),o(3),O(a.writeOffForm.controls.transactionDate.hasError("required")?13:-1),o(3),b(m(17,15,"labels.inputs.Amount")),o(5),b(m(22,17,"labels.inputs.Reason for Write-Off")),o(3),fe(a.writeOffReasonOptions),o(4),b(m(29,19,"labels.inputs.Note")),o(4),x("routerLink",Ut(23,mT)),o(),v(" ",m(34,21,"labels.buttons.Cancel")," "),o(2),x("mifosxHasPermission","WRITEOFF_LOAN")}},dependencies:[wt,Tt,Re,we,he,Ee,je,Le,Ne,ae,xe,Oe,ze,_e,ge,Ve,Je,Pe,In,On,tn,en,Qe,Wt,Ae,Wn,Pt],styles:[".container[_ngcontent-%COMP%]{max-width:37rem}"]})}}return t})();var hT=()=>["../../general"];function gT(t,n){t&1&&(s(0,"mat-error"),c(1),p(2,"translate"),p(3,"translate"),s(4,"strong"),c(5),p(6,"translate"),l()()),t&2&&(o(),$t(" ",m(2,3,"labels.inputs.Closed Date")," ",m(3,5,"labels.commons.is")," "),o(4),b(m(6,7,"labels.commons.required")))}function _T(t,n){if(t&1&&(s(0,"button",11),c(1),p(2,"translate"),l()),t&2){let e=P();x("disabled",!e.closeLoanForm.valid),o(),v(" ",m(2,2,"labels.buttons.Submit")," ")}}var Fm=(()=>{class t{constructor(){this.formBuilder=A(Te),this.loanService=A(Mt),this.route=A(Et),this.router=A(le),this.dateUtils=A(de),this.settingsService=A(oe),this.minDate=new Date(2e3,0,1),this.maxDate=new Date,this.loanId=this.route.snapshot.params.loanId}ngOnInit(){this.maxDate=this.settingsService.businessDate,this.createCloseForm()}createCloseForm(){this.closeLoanForm=this.formBuilder.group({transactionDate:[new Date(this.dataObject.date)||new Date,Gt.required],note:[]})}submit(){let e=this.closeLoanForm.value,i=this.settingsService.language.code,a=this.settingsService.dateFormat,r=this.closeLoanForm.value.transactionDate;e.transactionDate instanceof Date&&(e.transactionDate=this.dateUtils.formatDate(r,a));let u=ve(ie({},e),{dateFormat:a,locale:i});this.loanService.submitLoanActionButton(this.loanId,u,"close-rescheduled").subscribe(d=>{this.router.navigate(["../../general"],{relativeTo:this.route})})}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=Dt({type:t,selectors:[["mifosx-close-as-rescheduled"]],inputs:{dataObject:"dataObject"},decls:24,vars:18,consts:[["closedDatePicker",""],[1,"container","mat-elevation-z8"],[3,"ngSubmit","formGroup"],[1,"layout-column"],[3,"click"],["matInput","","required","","formControlName","transactionDate",3,"min","max","matDatepicker"],["matSuffix","",3,"for"],["matInput","","formControlName","note","cdkTextareaAutosize","","cdkAutosizeMinRows","2"],[1,"layout-row","align-center","gap-5px","responsive-column"],["type","button","mat-raised-button","",3,"routerLink"],["mat-raised-button","","color","primary",3,"disabled",4,"mifosxHasPermission"],["mat-raised-button","","color","primary",3,"disabled"]],template:function(i,a){if(i&1){let r=xt();s(0,"div",1)(1,"mat-card")(2,"form",2),it("ngSubmit",function(){return mt(r),dt(a.submit())}),s(3,"mat-card-content")(4,"div",3)(5,"mat-form-field",4),it("click",function(){mt(r);let d=Lt(12);return dt(d.open())}),s(6,"mat-label"),c(7),p(8,"translate"),l(),T(9,"input",5)(10,"mat-datepicker-toggle",6)(11,"mat-datepicker",null,0),M(13,gT,7,9,"mat-error"),l(),s(14,"mat-form-field")(15,"mat-label"),c(16),p(17,"translate"),l(),T(18,"textarea",7),l()(),s(19,"mat-card-actions",8)(20,"button",9),c(21),p(22,"translate"),l(),k(23,_T,3,4,"button",10),l()()()()()}if(i&2){let r=Lt(12);o(2),x("formGroup",a.closeLoanForm),o(5),b(m(8,11,"labels.inputs.Closed On")),o(2),x("min",a.minDate)("max",a.maxDate)("matDatepicker",r),o(),x("for",r),o(3),O(a.closeLoanForm.controls.transactionDate.hasError("required")?13:-1),o(3),b(m(17,13,"labels.inputs.Note")),o(4),x("routerLink",Ut(17,hT)),o(),v(" ",m(22,15,"labels.buttons.Cancel")," "),o(2),x("mifosxHasPermission","CLOSEASRESCHEDULED_LOAN")}},dependencies:[wt,Tt,Re,we,he,Ee,je,Le,Ne,ae,xe,Oe,ze,_e,ge,Ve,Je,Pe,tn,en,Qe,Wt,Ae,Wn,Pt],styles:[".container[_ngcontent-%COMP%]{max-width:37rem}"]})}}return t})();var CT=()=>["../../general"];function bT(t,n){t&1&&(s(0,"mat-error"),c(1),p(2,"translate"),p(3,"translate"),s(4,"strong"),c(5),p(6,"translate"),l()()),t&2&&(o(),$t(" ",m(2,3,"labels.inputs.Reschedule Date")," ",m(3,5,"labels.commons.is")," "),o(4),b(m(6,7,"labels.commons.required")))}function vT(t,n){if(t&1&&(s(0,"mat-option",10),c(1),l()),t&2){let e=n.$implicit;x("value",e.id),o(),v(" ",e.name," ")}}function xT(t,n){t&1&&(s(0,"mat-error"),c(1),p(2,"translate"),p(3,"translate"),s(4,"strong"),c(5),p(6,"translate"),l()()),t&2&&(o(),$t(" ",m(2,3,"labels.inputs.Reason for Rescheduling")," ",m(3,5,"labels.commons.is")," "),o(4),b(m(6,7,"labels.commons.required")))}function yT(t,n){t&1&&(s(0,"mat-error"),c(1),p(2,"translate"),p(3,"translate"),s(4,"strong"),c(5),p(6,"translate"),l()()),t&2&&(o(),$t(" ",m(2,3,"labels.inputs.Submitted On Date")," ",m(3,5,"labels.commons.is")," "),o(4),b(m(6,7,"labels.commons.required")))}function ST(t,n){if(t&1){let e=xt();s(0,"mat-form-field",6),it("click",function(){mt(e);let a=Lt(7);return dt(a.open())}),s(1,"mat-label"),c(2),p(3,"translate"),l(),T(4,"input",17)(5,"mat-datepicker-toggle",8)(6,"mat-datepicker",null,2),l()}if(t&2){let e=Lt(7),i=P();o(2),b(m(3,4,"labels.inputs.Installment Rescheduled to")),o(2),x("min",i.minDate)("matDatepicker",e),o(),x("for",e)}}function DT(t,n){t&1&&(s(0,"mat-form-field")(1,"mat-label"),c(2),p(3,"translate"),l(),T(4,"input",18),l(),s(5,"mat-form-field")(6,"mat-label"),c(7),p(8,"translate"),l(),T(9,"input",19),l()),t&2&&(o(2),v("",m(3,2,"labels.inputs.Principal Grace Periods")," "),o(5),v("",m(8,4,"labels.inputs.Interest Grace Periods")," "))}function wT(t,n){t&1&&(s(0,"mat-form-field")(1,"mat-label"),c(2),p(3,"translate"),l(),T(4,"input",20),l()),t&2&&(o(2),b(m(3,1,"labels.inputs.Number Of new Repayments")))}function TT(t,n){t&1&&(s(0,"mat-form-field")(1,"mat-label"),c(2),p(3,"translate"),l(),T(4,"input",21),l()),t&2&&(o(2),b(m(3,1,"labels.inputs.New Interest Rate")))}function PT(t,n){if(t&1&&(s(0,"button",22),c(1),p(2,"translate"),l()),t&2){let e=P();x("disabled",!e.rescheduleLoanForm.valid),o(),v(" ",m(2,2,"labels.buttons.Submit")," ")}}var Rm=(()=>{class t{constructor(){this.formBuilder=A(Te),this.loanService=A(Mt),this.route=A(Et),this.router=A(le),this.dateUtils=A(de),this.settingsService=A(oe),this.minDate=new Date(2e3,0,1),this.maxDate=new Date,this.changeRepaymentDate=new pe(!1),this.introduceGracePeriods=new pe(!1),this.extendRepaymentPeriod=new pe(!1),this.adjustinterestrates=new pe(!1),this.loanId=this.route.snapshot.params.loanId}ngOnInit(){this.maxDate=this.settingsService.businessDate,this.codes=this.dataObject.rescheduleReasons,this.setRescheduleLoanForm()}setRescheduleLoanForm(){this.rescheduleLoanForm=this.formBuilder.group({rescheduleFromDate:[new Date,Gt.required],rescheduleReasonId:["",Gt.required],submittedOnDate:[new Date,Gt.required],rescheduleReasonComment:[""],adjustedDueDate:[""],graceOnPrincipal:[""],graceOnInterest:[""],extraTerms:[""],newInterestRate:[""]})}submit(){let e=this.rescheduleLoanForm.value,i=this.settingsService.language.code,a=this.settingsService.dateFormat,r=this.rescheduleLoanForm.value.rescheduleFromDate,u=this.rescheduleLoanForm.value.adjustedDueDate,d=this.rescheduleLoanForm.value.submittedOnDate;r instanceof Date&&(e.rescheduleFromDate=this.dateUtils.formatDate(r,a)),u instanceof Date&&(e.adjustedDueDate=this.dateUtils.formatDate(u,a)),d instanceof Date&&(e.submittedOnDate=this.dateUtils.formatDate(d,a));let g=ve(ie({},e),{dateFormat:a,locale:i});g.loanId=this.loanId,this.loanService.submitRescheduleData(g).subscribe(_=>{this.router.navigate(["../../general"],{relativeTo:this.route})})}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=Dt({type:t,selectors:[["mifosx-loan-reschedule"]],inputs:{dataObject:"dataObject"},decls:57,vars:48,consts:[["rescheduleDatePicker",""],["submittedDatePicker",""],["installmentrescheduledDatePicker",""],[1,"container","mat-elevation-z8"],[3,"ngSubmit","formGroup"],[1,"layout-column"],[3,"click"],["matInput","","required","","formControlName","rescheduleFromDate",3,"min","matDatepicker"],["matSuffix","",3,"for"],["formControlName","rescheduleReasonId"],[3,"value"],["matInput","","required","","formControlName","submittedOnDate",3,"min","matDatepicker"],["matInput","","formControlName","rescheduleReasonComment"],[3,"formControl"],[1,"layout-row","align-center","gap-5px","responsive-column"],["type","button","mat-raised-button","",3,"routerLink"],["mat-raised-button","","color","primary",3,"disabled",4,"mifosxHasPermission"],["matInput","","formControlName","adjustedDueDate",3,"min","matDatepicker"],["matInput","","formControlName","graceOnPrincipal"],["matInput","","formControlName","graceOnInterest"],["matInput","","formControlName","extraTerms"],["matInput","","formControlName","newInterestRate"],["mat-raised-button","","color","primary",3,"disabled"]],template:function(i,a){if(i&1){let r=xt();s(0,"div",3)(1,"mat-card")(2,"form",4),it("ngSubmit",function(){return mt(r),dt(a.submit())}),s(3,"mat-card-content")(4,"div",5)(5,"mat-form-field",6),it("click",function(){mt(r);let d=Lt(12);return dt(d.open())}),s(6,"mat-label"),c(7),p(8,"translate"),l(),T(9,"input",7)(10,"mat-datepicker-toggle",8)(11,"mat-datepicker",null,0),M(13,bT,7,9,"mat-error"),l(),s(14,"mat-form-field")(15,"mat-label"),c(16),p(17,"translate"),l(),s(18,"mat-select",9),ue(19,vT,2,2,"mat-option",10,Ce),l(),M(21,xT,7,9,"mat-error"),l(),s(22,"mat-form-field",6),it("click",function(){mt(r);let d=Lt(29);return dt(d.open())}),s(23,"mat-label"),c(24),p(25,"translate"),l(),T(26,"input",11)(27,"mat-datepicker-toggle",8)(28,"mat-datepicker",null,1),M(30,yT,7,9,"mat-error"),l(),s(31,"mat-form-field")(32,"mat-label"),c(33),p(34,"translate"),l(),T(35,"textarea",12),l(),s(36,"mat-checkbox",13),c(37),p(38,"translate"),l(),M(39,ST,8,6,"mat-form-field"),s(40,"mat-checkbox",13),c(41),p(42,"translate"),l(),M(43,DT,10,6),s(44,"mat-checkbox",13),c(45),p(46,"translate"),l(),M(47,wT,5,3,"mat-form-field"),s(48,"mat-checkbox",13),c(49),p(50,"translate"),l(),M(51,TT,5,3,"mat-form-field"),l(),s(52,"mat-card-actions",14)(53,"button",15),c(54),p(55,"translate"),l(),k(56,PT,3,4,"button",16),l()()()()()}if(i&2){let r=Lt(12),u=Lt(29);o(2),x("formGroup",a.rescheduleLoanForm),o(5),b(m(8,29,"labels.inputs.Reschedule from Installment On")),o(2),x("min",a.minDate)("matDatepicker",r),o(),x("for",r),o(3),O(a.rescheduleLoanForm.controls.rescheduleFromDate.hasError("required")?13:-1),o(3),b(m(17,31,"labels.inputs.Reason for Rescheduling")),o(3),fe(a.codes),o(2),O(a.rescheduleLoanForm.controls.rescheduleReasonId.hasError("required")?21:-1),o(3),b(m(25,33,"labels.inputs.Submitted On")),o(2),x("min",a.minDate)("matDatepicker",u),o(),x("for",u),o(3),O(a.rescheduleLoanForm.controls.submittedOnDate.hasError("required")?30:-1),o(3),b(m(34,35,"labels.inputs.Comments")),o(3),x("formControl",a.changeRepaymentDate),o(),v(" ",m(38,37,"labels.inputs.Change Repayment Date")," "),o(2),O(a.changeRepaymentDate.value?39:-1),o(),x("formControl",a.introduceGracePeriods),o(),v(" ",m(42,39,"labels.inputs.Introduce Mid-term grace periods")," "),o(2),O(a.introduceGracePeriods.value?43:-1),o(),x("formControl",a.extendRepaymentPeriod),o(),v(" ",m(46,41,"labels.inputs.Extend Repayment Period")," "),o(2),O(a.extendRepaymentPeriod.value?47:-1),o(),x("formControl",a.adjustinterestrates),o(),v(" ",m(50,43,"labels.inputs.Adjust interest rates for remainder of loan")," "),o(2),O(a.adjustinterestrates.value?51:-1),o(2),x("routerLink",Ut(47,CT)),o(),v(" ",m(55,45,"labels.buttons.Cancel")," "),o(2),x("mifosxHasPermission","APPROVE_RESCHEDULELOAN")}},dependencies:[wt,Tt,Re,we,he,Ee,je,Wo,Le,Ne,ae,xe,Oe,ze,_e,ge,Ve,Je,Pe,In,On,tn,en,Qe,Wt,Da,Ae,Pt],styles:[".container[_ngcontent-%COMP%]{max-width:37rem}"]})}}return t})();var AT=()=>["../../general"];function MT(t,n){t&1&&(s(0,"mat-error"),c(1),p(2,"translate"),p(3,"translate"),s(4,"strong"),c(5),p(6,"translate"),l()()),t&2&&(o(),$t(" ",m(2,3,"labels.inputs.Transaction Date")," ",m(3,5,"labels.commons.is")," "),o(4),b(m(6,7,"labels.commons.required")))}function OT(t,n){if(t&1&&(s(0,"mat-option",10),c(1),l()),t&2){let e=n.$implicit;x("value",e.id),o(),v(" ",e.name," ")}}function IT(t,n){t&1&&(s(0,"mat-form-field")(1,"mat-label"),c(2),p(3,"translate"),l(),T(4,"input",19),l(),s(5,"mat-form-field")(6,"mat-label"),c(7),p(8,"translate"),l(),T(9,"input",20),l(),s(10,"mat-form-field")(11,"mat-label"),c(12),p(13,"translate"),l(),T(14,"input",21),l(),s(15,"mat-form-field")(16,"mat-label"),c(17),p(18,"translate"),l(),T(19,"input",22),l(),s(20,"mat-form-field")(21,"mat-label"),c(22),p(23,"translate"),l(),T(24,"input",23),l()),t&2&&(o(2),v(" ",m(3,5,"labels.inputs.Account")," #"),o(5),v("",m(8,7,"labels.inputs.Cheque")," #"),o(5),b(m(13,9,"labels.inputs.Routing Code")),o(5),v("",m(18,11,"labels.inputs.Reciept")," #"),o(5),v("",m(23,13,"labels.inputs.Bank")," #"))}function ET(t,n){if(t&1&&(s(0,"button",24),c(1),p(2,"translate"),l()),t&2){let e=P();x("disabled",!e.recoveryRepaymentLoanForm.valid),o(),v(" ",m(2,2,"labels.buttons.Submit")," ")}}var Bm=(()=>{class t{constructor(){this.formBuilder=A(Te),this.loanService=A(Mt),this.route=A(Et),this.router=A(le),this.dateUtils=A(de),this.settingsService=A(oe),this.showPaymentDetails=!1,this.minDate=new Date(2e3,0,1),this.maxDate=new Date,this.currency=null,this.loanId=this.route.snapshot.params.loanId}ngOnInit(){this.maxDate=this.settingsService.businessDate,this.createRecoveryRepaymentLoanForm(),this.setRecoveryRepaymentLoanDetails(),this.dataObject.currency&&(this.currency=this.dataObject.currency)}createRecoveryRepaymentLoanForm(){this.recoveryRepaymentLoanForm=this.formBuilder.group({transactionDate:[new Date,Gt.required],transactionAmount:["",Gt.required],externalId:[""],paymentTypeId:[""],note:[""]})}setRecoveryRepaymentLoanDetails(){this.paymentTypes=this.dataObject.paymentTypeOptions,this.recoveryRepaymentLoanForm.patchValue({transactionAmount:this.dataObject.amount,transactionDate:new Date(this.dataObject.date)})}addPaymentDetails(){this.showPaymentDetails=!this.showPaymentDetails,this.showPaymentDetails?(this.recoveryRepaymentLoanForm.addControl("accountNumber",new pe("")),this.recoveryRepaymentLoanForm.addControl("checkNumber",new pe("")),this.recoveryRepaymentLoanForm.addControl("routingCode",new pe("")),this.recoveryRepaymentLoanForm.addControl("receiptNumber",new pe("")),this.recoveryRepaymentLoanForm.addControl("bankNumber",new pe(""))):(this.recoveryRepaymentLoanForm.removeControl("accountNumber"),this.recoveryRepaymentLoanForm.removeControl("checkNumber"),this.recoveryRepaymentLoanForm.removeControl("routingCode"),this.recoveryRepaymentLoanForm.removeControl("receiptNumber"),this.recoveryRepaymentLoanForm.removeControl("bankNumber"))}submit(){let e=this.recoveryRepaymentLoanForm.value,i=this.settingsService.language.code,a=this.settingsService.dateFormat,r=this.recoveryRepaymentLoanForm.value.transactionDate;e.transactionDate instanceof Date&&(e.transactionDate=this.dateUtils.formatDate(r,a));let u=ve(ie({},e),{dateFormat:a,locale:i});u.transactionAmount=u.transactionAmount*1,this.loanService.submitLoanActionButton(this.loanId,u,"recoverypayment").subscribe(d=>{this.router.navigate(["../../general"],{relativeTo:this.route})})}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=Dt({type:t,selectors:[["mifosx-recovery-repayment"]],inputs:{dataObject:"dataObject"},decls:45,vars:33,consts:[["transactionDatePicker",""],[1,"container","mat-elevation-z8"],[3,"ngSubmit","formGroup"],[1,"layout-column"],[3,"click"],["matInput","","required","","formControlName","transactionDate",3,"min","max","matDatepicker"],["matSuffix","",3,"for"],[3,"currency","isRequired","inputFormControl","inputLabel"],["matInput","","formControlName","externalId"],["formControlName","paymentTypeId"],[3,"value"],[1,"flex-fill"],[1,"expandcollapsebutton","m-l-10","m-t-40","flex-75",3,"click"],[3,"className"],[1,"m-l-10"],["matInput","","formControlName","note","cdkTextareaAutosize","","cdkAutosizeMinRows","2"],[1,"layout-row","align-center","gap-5px","responsive-column"],["type","button","mat-raised-button","",3,"routerLink"],["mat-raised-button","","color","primary",3,"disabled",4,"mifosxHasPermission"],["matInput","","formControlName","accountNumber"],["matInput","","formControlName","checkNumber"],["matInput","","formControlName","routingCode"],["matInput","","formControlName","receiptNumber"],["matInput","","formControlName","bankNumber"],["mat-raised-button","","color","primary",3,"disabled"]],template:function(i,a){if(i&1){let r=xt();s(0,"div",1)(1,"mat-card")(2,"form",2),it("ngSubmit",function(){return mt(r),dt(a.submit())}),s(3,"mat-card-content")(4,"div",3)(5,"mat-form-field",4),it("click",function(){mt(r);let d=Lt(12);return dt(d.open())}),s(6,"mat-label"),c(7),p(8,"translate"),l(),T(9,"input",5)(10,"mat-datepicker-toggle",6)(11,"mat-datepicker",null,0),M(13,MT,7,9,"mat-error"),l(),T(14,"mifosx-input-amount",7),s(15,"mat-form-field")(16,"mat-label"),c(17),p(18,"translate"),l(),T(19,"input",8),l(),s(20,"mat-form-field")(21,"mat-label"),c(22),p(23,"translate"),l(),s(24,"mat-select",9),ue(25,OT,2,2,"mat-option",10,Ce),l()(),s(27,"div",11)(28,"span",12),it("click",function(){return mt(r),dt(a.addPaymentDetails())}),s(29,"mat-slide-toggle")(30,"div",13)(31,"span",14),c(32),p(33,"translate"),l()()()()(),M(34,IT,25,15),s(35,"mat-form-field")(36,"mat-label"),c(37),p(38,"translate"),l(),T(39,"textarea",15),l()(),s(40,"mat-card-actions",16)(41,"button",17),c(42),p(43,"translate"),l(),k(44,ET,3,4,"button",18),l()()()()()}if(i&2){let r=Lt(12);o(2),x("formGroup",a.recoveryRepaymentLoanForm),o(5),b(m(8,20,"labels.inputs.Transaction Date")),o(2),x("min",a.minDate)("max",a.maxDate)("matDatepicker",r),o(),x("for",r),o(3),O(a.recoveryRepaymentLoanForm.controls.transactionDate.hasError("required")?13:-1),o(),x("currency",a.currency)("isRequired",!0)("inputFormControl",a.recoveryRepaymentLoanForm.controls.transactionAmount)("inputLabel","Transaction Amount"),o(3),b(m(18,22,"labels.inputs.External Id")),o(5),b(m(23,24,"labels.inputs.Payment Type")),o(3),fe(a.paymentTypes),o(5),x("className",a.showPaymentDetails?"enabled":"disabled"),o(2),b(m(33,26,"labels.inputs.Show Payment Details")),o(2),O(a.showPaymentDetails?34:-1),o(3),b(m(38,28,"labels.inputs.Note")),o(4),x("routerLink",Ut(32,AT)),o(),v(" ",m(43,30,"labels.buttons.Cancel")," "),o(2),x("mifosxHasPermission","REPAYMENT_LOAN")}},dependencies:[wt,Tt,Re,we,he,Ee,je,Le,Ne,ae,xe,Oe,ze,_e,ge,Ve,Je,Pe,In,On,tn,en,Qe,Wt,Ae,Ri,ja,Wn,Pt],styles:[".expandcollapsebutton[_ngcontent-%COMP%]{margin-top:-7px}.container[_ngcontent-%COMP%]{max-width:37rem}"]})}}return t})();function LT(t,n){t&1&&(s(0,"span"),c(1),p(2,"translate"),l()),t&2&&(o(),v(" ",m(2,1,"labels.inputs.Active")," "))}function NT(t,n){t&1&&(s(0,"span"),c(1),p(2,"translate"),l()),t&2&&(o(),v(" ",m(2,1,"labels.inputs.Deleted")," "))}function kT(t,n){if(t&1&&(s(0,"div",3)(1,"span",4),c(2),p(3,"translate"),l(),s(4,"span",4),c(5),p(6,"formatNumber"),l()()),t&2){let e=P();o(2),v("",m(3,2,"labels.inputs.Available Disbursement Amount (with Over Applied)"),":"),o(3),b(m(6,4,e.data.loanData.delinquent.availableDisbursementAmountWithOverApplied))}}var qm=(()=>{class t{constructor(){this.dialogRef=A(Vo),this.data=A(Uo)}ngOnInit(){this.dialogRef.updateSize("400px")}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=Dt({type:t,selectors:[["mifosx-loans-account-view-guarantor-details-dialog"]],decls:41,vars:28,consts:[["mat-dialog-title",""],["mat-dialog-content","",1,"layout-column"],[1,"layout-row-wrap","responsive-column"],[1,"flex-fill"],[1,"flex-50"],[1,"layout-row","layout-xs-column","layout-align-center","gap-2percent"],["mat-raised-button","","mat-dialog-close",""]],template:function(i,a){i&1&&(s(0,"h1",0),c(1),p(2,"translate"),l(),s(3,"div",1)(4,"div",2)(5,"div",3)(6,"span",4),c(7),p(8,"translate"),l(),s(9,"span",4),c(10),l()(),s(11,"div",3)(12,"span",4),c(13),p(14,"translate"),l(),s(15,"span",4),c(16),l()(),s(17,"div",3)(18,"span",4),c(19),p(20,"translate"),l(),s(21,"span",4),c(22),l()(),s(23,"div",3)(24,"span",4),c(25),p(26,"translate"),l(),s(27,"span",4),c(28),l()(),s(29,"div",3)(30,"span",4),c(31),p(32,"translate"),l(),s(33,"span",4),M(34,LT,3,3,"span"),M(35,NT,3,3,"span"),l()(),M(36,kT,7,6,"div",3),l()(),s(37,"mat-dialog-actions",5)(38,"button",6),c(39),p(40,"translate"),l()()),i&2&&(o(),b(m(2,14,"labels.heading.Guarantor Detail")),o(6),v("",m(8,16,"labels.inputs.First Name"),":"),o(3),b(a.data.guarantorData.firstname),o(3),v("",m(14,18,"labels.inputs.Last Name"),":"),o(3),b(a.data.guarantorData.lastname),o(3),v("",m(20,20,"labels.inputs.Relationship"),":"),o(3),b(a.data.guarantorData.clientRelationshipType.name),o(3),v("",m(26,22,"labels.inputs.Guarantor Type"),":"),o(3),b(a.data.guarantorData.guarantorType.value),o(3),v("",m(32,24,"labels.inputs.Status"),":"),o(3),O(a.data.guarantorData.status?34:-1),o(),O(a.data.guarantorData.status?-1:35),o(),O((a.data.loanData==null||a.data.loanData.delinquent==null?null:a.data.loanData.delinquent.availableDisbursementAmountWithOverApplied)!==void 0?36:-1),o(3),b(m(40,26,"labels.buttons.Cancel")))},dependencies:[wt,Tt,Wt,Ur,Ho,Go,Kl,Pt],encapsulation:2})}}return t})();function FT(t,n){t&1&&(s(0,"span"),c(1),p(2,"translate"),l()),t&2&&(o(),b(m(2,1,"labels.inputs.Not Available")))}function RT(t,n){t&1&&(s(0,"span"),c(1),p(2,"translate"),l()),t&2&&(o(),b(m(2,1,"labels.inputs.Unassigned")))}function BT(t,n){t&1&&(s(0,"span"),T(1,"fa-icon",5),l())}function qT(t,n){t&1&&(s(0,"span"),c(1),p(2,"translate"),l()),t&2&&(o(),v(" ",m(2,1,"labels.inputs.Not Provided")," "))}function jT(t,n){t&1&&(s(0,"span"),c(1),p(2,"translate"),l()),t&2&&(o(),b(m(2,1,"labels.inputs.Not Provided")))}function zT(t,n){t&1&&(s(0,"th",24),c(1),p(2,"translate"),l()),t&2&&(o(),b(m(2,1,"labels.inputs.name")))}function VT(t,n){if(t&1&&(s(0,"span"),c(1),l()),t&2){let e=P().$implicit;o(),$t(" ",e.firstname," \xA0 ",e.lastname," ")}}function UT(t,n){if(t&1&&(s(0,"td",25),M(1,VT,2,2,"span"),l()),t&2){let e=n.$implicit;o(),O(e.guarantorFundingDetails?-1:1)}}function HT(t,n){t&1&&(s(0,"th",24),c(1),p(2,"translate"),l()),t&2&&(o(),b(m(2,1,"labels.inputs.Relationship")))}function GT(t,n){if(t&1&&(s(0,"span"),c(1),l()),t&2){let e=P().$implicit;o(),v(" ",e.clientRelationshipType==null?null:e.clientRelationshipType.name," ")}}function WT(t,n){if(t&1&&(s(0,"td",25),M(1,GT,2,1,"span"),l()),t&2){let e=n.$implicit;o(),O(e.guarantorFundingDetails?-1:1)}}function $T(t,n){t&1&&(s(0,"th",24),c(1),p(2,"translate"),l()),t&2&&(o(),b(m(2,1,"labels.inputs.Guarantor Type")))}function YT(t,n){if(t&1&&(s(0,"span"),c(1),l()),t&2){let e=P().$implicit;o(),v(" ",e.guarantorType.value," ")}}function ZT(t,n){if(t&1&&(s(0,"td",25),M(1,YT,2,1,"span"),l()),t&2){let e=n.$implicit;o(),O(e.guarantorFundingDetails?-1:1)}}function KT(t,n){t&1&&(s(0,"th",24),c(1),p(2,"translate"),l()),t&2&&(o(),b(m(2,1,"labels.inputs.Deposit Account")))}function JT(t,n){t&1&&T(0,"span")}function XT(t,n){if(t&1&&(s(0,"td",25),M(1,JT,1,0,"span"),l()),t&2){let e=n.$implicit;o(),O(e.guarantorFundingDetails?-1:1)}}function QT(t,n){t&1&&(s(0,"th",24),c(1),p(2,"translate"),l()),t&2&&(o(),b(m(2,1,"labels.inputs.Amount")))}function tP(t,n){t&1&&T(0,"span")}function eP(t,n){if(t&1&&(s(0,"td",25),M(1,tP,1,0,"span"),l()),t&2){let e=n.$implicit;o(),O(e.guarantorFundingDetails?-1:1)}}function nP(t,n){t&1&&(s(0,"th",24),c(1),p(2,"translate"),l()),t&2&&(o(),b(m(2,1,"labels.inputs.Remaining Amount")))}function iP(t,n){t&1&&T(0,"span")}function aP(t,n){if(t&1&&(s(0,"td",25),M(1,iP,1,0,"span"),l()),t&2){let e=n.$implicit;o(),O(e.guarantorFundingDetails?-1:1)}}function oP(t,n){t&1&&(s(0,"th",24),c(1),p(2,"translate"),l()),t&2&&(o(),b(m(2,1,"labels.inputs.Status")))}function rP(t,n){t&1&&(s(0,"span"),c(1),p(2,"translate"),l()),t&2&&(o(),v(" ",m(2,1,"labels.inputs.Active")," "))}function lP(t,n){t&1&&(s(0,"span"),c(1),p(2,"translate"),l()),t&2&&(o(),v(" ",m(2,1,"labels.inputs.Deleted")," "))}function sP(t,n){if(t&1&&(s(0,"span"),M(1,rP,3,3,"span"),M(2,lP,3,3,"span"),l()),t&2){let e=P().$implicit;o(),O(e.status?1:-1),o(),O(e.status?-1:2)}}function cP(t,n){if(t&1&&(s(0,"td",25),M(1,sP,3,2,"span"),l()),t&2){let e=n.$implicit;o(),O(e.guarantorFundingDetails?-1:1)}}function pP(t,n){t&1&&(s(0,"th",24),c(1),p(2,"translate"),l()),t&2&&(o(),b(m(2,1,"labels.inputs.Action")))}function mP(t,n){if(t&1){let e=xt();s(0,"button",28),it("click",function(){mt(e);let a=P(2).$implicit,r=P(2);return dt(r.viewGuarantorDetails(a))}),T(1,"fa-icon",29),l()}}function dP(t,n){t&1&&(s(0,"button",27),T(1,"fa-icon",30),l())}function uP(t,n){if(t&1){let e=xt();s(0,"button",32),it("click",function(){mt(e);let a=P(3).$implicit,r=P(2);return dt(r.deleteGuarantor(a.id))}),T(1,"fa-icon",33),l()}}function fP(t,n){t&1&&(s(0,"span"),k(1,uP,2,0,"button",31),l()),t&2&&(o(),x("mifosxHasPermission","DELETE_GUARANTOR"))}function hP(t,n){if(t&1&&(s(0,"span"),k(1,mP,2,0,"button",26),M(2,dP,2,0,"button",27),M(3,fP,2,1,"span"),l()),t&2){let e=P().$implicit;o(),x("mifosxHasPermission","READ_SAVINGSACCOUNT"),o(),O(e.status&&e.guarantorType.id===3&&e.id?2:-1),o(),O(e.status?3:-1)}}function gP(t,n){if(t&1&&(s(0,"td",25),M(1,hP,4,3,"span"),l()),t&2){let e=n.$implicit;o(),O(e.guarantorFundingDetails?-1:1)}}function _P(t,n){t&1&&T(0,"tr",34)}function CP(t,n){t&1&&T(0,"tr",35)}function bP(t,n){if(t&1){let e=xt();s(0,"div",4)(1,"div",6)(2,"div",7)(3,"div",8)(4,"h3"),c(5),p(6,"translate"),l()()(),s(7,"div",7)(8,"div",9)(9,"button",10),it("click",function(){mt(e);let a=P();return dt(a.toggleGuarantorsDetailsOverview())}),c(10),l()()()(),s(11,"table",11),p(12,"accountsFilter"),X(13,12),k(14,zT,3,3,"th",13)(15,UT,2,1,"td",14),Q(),X(16,15),k(17,HT,3,3,"th",13)(18,WT,2,1,"td",14),Q(),X(19,16),k(20,$T,3,3,"th",13)(21,ZT,2,1,"td",14),Q(),X(22,17),k(23,KT,3,3,"th",13)(24,XT,2,1,"td",14),Q(),X(25,18),k(26,QT,3,3,"th",13)(27,eP,2,1,"td",14),Q(),X(28,19),k(29,nP,3,3,"th",13)(30,aP,2,1,"td",14),Q(),X(31,20),k(32,oP,3,3,"th",13)(33,cP,2,1,"td",14),Q(),X(34,21),k(35,pP,3,3,"th",13)(36,gP,2,1,"td",14),Q(),k(37,_P,1,0,"tr",22)(38,CP,1,0,"tr",23),l()()}if(t&2){let e=P();o(5),b(m(6,5,"labels.heading.Guarantors Details")),o(5),v(" ",e.showDeletedGuarantorsAccounts?"Hide Deleted Guarantors":"Show Deleted Guarantors"," "),o(),x("dataSource",Ef(12,7,e.guarantorDetails,"guarantor",e.showDeletedGuarantorsAccounts)),o(26),x("matHeaderRowDef",e.guarantorsDisplayedColumns),o(),x("matRowDefColumns",e.guarantorsDisplayedColumns)}}var jm=(()=>{class t{constructor(){this.dialog=A(Gn),this.loansService=A(Mt),this.route=A(Et),this.router=A(le),this.showDeletedGuarantorsAccounts=!1,this.guarantorsDisplayedColumns=["fullname","relationship","guarantortype","depositAccount","amount","remainingAmount","status","action"],this.loanId=this.route.snapshot.params.loanId}ngOnInit(){this.guarantorDetails=this.dataObject.guarantors,this.loansService.getLoanDelinquencyDataForTemplate(this.loanId).subscribe(e=>{e.availableDisbursementAmountWithOverApplied!==void 0&&(this.dataObject.availableDisbursementAmountWithOverApplied=e.availableDisbursementAmountWithOverApplied),e.delinquent&&(this.dataObject.delinquent=e.delinquent)})}toggleGuarantorsDetailsOverview(){this.showDeletedGuarantorsAccounts=!this.showDeletedGuarantorsAccounts}deleteGuarantor(e){this.dialog.open(ra,{data:{deleteContext:`the guarantor id: ${e}`}}).afterClosed().subscribe(a=>{a.delete&&this.loansService.deleteGuarantor(this.loanId,e).subscribe(()=>{this.reload()})})}viewGuarantorDetails(e){this.dialog.open(qm,{data:{guarantorData:e}}).afterClosed().subscribe(()=>{})}reload(){let e=this.dataObject.clientId,i=this.router.url;this.router.navigateByUrl(`/clients/${e}/loans-accounts`,{skipLocationChange:!0}).then(()=>this.router.navigate([i]))}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=Dt({type:t,selectors:[["mifosx-view-guarantors"]],inputs:{dataObject:"dataObject"},decls:68,vars:45,consts:[[1,"container","mat-elevation-z8"],[1,"view-guarantors-account-tables","layout-row","gap-2percent"],[1,"flex-49"],[3,"externalId"],[1,"layout-row-wrap","responsive-column","flex-fill"],["icon","times"],[1,"heading-content"],[1,"layout-column","flex-50"],[1,"heading-name"],[1,"layout-row","align-flex-end"],["mat-raised-button","","color","primary",1,"f-right",3,"click"],["mat-table","",1,"flex-fill",3,"dataSource"],["matColumnDef","fullname"],["mat-header-cell","",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","relationship"],["matColumnDef","guarantortype"],["matColumnDef","depositAccount"],["matColumnDef","amount"],["matColumnDef","remainingAmount"],["matColumnDef","status"],["matColumnDef","action"],["mat-header-row","",4,"matHeaderRowDef"],["mat-row","",4,"matRowDef","matRowDefColumns"],["mat-header-cell",""],["mat-cell",""],["mat-raised-button","","class","account-action-button","color","primary",3,"click",4,"mifosxHasPermission"],["mat-raised-button","","color","primary",1,"account-action-button"],["mat-raised-button","","color","primary",1,"account-action-button",3,"click"],["icon","eye",1,"m-r-10"],["icon","edit",1,"m-r-10"],["mat-raised-button","","class","account-action-button","color","warn",3,"click",4,"mifosxHasPermission"],["mat-raised-button","","color","warn",1,"account-action-button",3,"click"],["icon","trash",1,"m-r-10"],["mat-header-row",""],["mat-row",""]],template:function(i,a){i&1&&(s(0,"div",0)(1,"mat-card")(2,"div",1)(3,"div",2)(4,"table")(5,"tbody")(6,"tr")(7,"td"),c(8),p(9,"translate"),l(),s(10,"td"),c(11),M(12,FT,3,3,"span"),l()(),s(13,"tr")(14,"td"),c(15),p(16,"translate"),l(),s(17,"td"),c(18),l()(),s(19,"tr")(20,"td"),c(21),p(22,"translate"),l(),s(23,"td"),c(24),M(25,RT,3,3,"span"),M(26,BT,2,0,"span"),l()(),s(27,"tr")(28,"td"),c(29),p(30,"translate"),l(),s(31,"td"),T(32,"mifosx-external-identifier",3),l()()()()(),s(33,"div",2)(34,"table")(35,"tbody")(36,"tr")(37,"td"),c(38),p(39,"translate"),l(),s(40,"td"),c(41),M(42,qT,3,3,"span"),l()(),s(43,"tr")(44,"td"),c(45),p(46,"translate"),l(),s(47,"td")(48,"span"),c(49),p(50,"formatNumber"),l()()(),s(51,"tr")(52,"td"),c(53),p(54,"translate"),l(),s(55,"td")(56,"span"),c(57),p(58,"formatNumber"),l()()(),s(59,"tr")(60,"td"),c(61),p(62,"translate"),l(),s(63,"td"),c(64),p(65,"formatNumber"),M(66,jT,3,3,"span"),l()()()()()(),M(67,bP,39,11,"div",4),l()()),i&2&&(o(8),b(m(9,23,"labels.inputs.Disbursement Date")),o(3),v(" ",a.dataObject.timeline.actualDisbursementDate," "),o(),O(a.dataObject.timeline.actualDisbursementDate?-1:12),o(3),b(m(16,25,"labels.inputs.Currency")),o(3),b(a.dataObject.currency.name),o(3),b(m(22,27,"labels.inputs.Loan Officer")),o(3),v(" ",a.dataObject.loanOfficerName," "),o(),O(a.dataObject.loanOfficerName?-1:25),o(),O(a.dataObject.loanOfficerName?26:-1),o(3),b(m(30,29,"labels.inputs.External Id")),o(3),x("externalId",ce(a.dataObject.externalId)),o(6),b(m(39,31,"labels.inputs.Loan Purpose")),o(3),v(" ",a.dataObject.loanPurposeName," "),o(),O(a.dataObject.loanPurposeName?-1:42),o(3),b(m(46,33,"labels.inputs.Approved Amount")),o(4),b(m(50,35,a.dataObject.approvedPrincipal)),o(4),b(m(54,37,"labels.inputs.Disburse Amount")),o(4),b(m(58,39,a.dataObject.principal)),o(4),b(m(62,41,"labels.inputs.Arrears By")),o(3),v(" ",m(65,43,a.dataObject.summary==null?null:a.dataObject.summary.totalOverdue)," "),o(2),O((a.dataObject.summary==null?null:a.dataObject.summary.totalOverdue)<0?66:-1),o(),O(a.guarantorDetails?67:-1))},dependencies:[wt,Tt,xe,Wt,Ae,un,Va,bn,yn,xn,Sn,vn,Dn,wn,Pn,Tn,An,Pt,a1,hn],styles:[".view-guarantors-account-tables[_ngcontent-%COMP%]{padding:1%;margin:1%}.view-guarantors-account-tables[_ngcontent-%COMP%] .table-headers[_ngcontent-%COMP%]{margin:0;padding:6px}.view-guarantors-account-tables[_ngcontent-%COMP%] td[_ngcontent-%COMP%]{padding:3px}table[_ngcontent-%COMP%]{width:100%}table[_ngcontent-%COMP%] .account-action-button[_ngcontent-%COMP%]{min-width:26px;padding:0 6px;margin:4px;line-height:25px}.heading-content[_ngcontent-%COMP%]{margin-bottom:1%;margin-top:1%;width:100%}.heading-name[_ngcontent-%COMP%]{display:block}.container[_ngcontent-%COMP%]{max-width:73rem}"]})}}return t})();var vP=()=>["../../general"];function xP(t,n){t&1&&(s(0,"mat-error"),c(1),p(2,"translate"),p(3,"translate"),s(4,"strong"),c(5),p(6,"translate"),l()()),t&2&&(o(),$t(" ",m(2,3,"labels.inputs.name")," ",m(3,5,"labels.commons.is")," "),o(4),b(m(6,7,"labels.commons.required")))}function yP(t,n){if(t&1&&(s(0,"mat-option",13),c(1),l()),t&2){let e=n.$implicit;x("value",e),o(),v(" ",e.displayName," ")}}function SP(t,n){if(t&1&&(s(0,"mat-option",13),c(1),l()),t&2){let e=n.$implicit;x("value",e.id),o(),v(" ",e.name," ")}}function DP(t,n){if(t&1&&(s(0,"mat-option",13),c(1),l()),t&2){let e=n.$implicit;x("value",e.id),o(),$t(" ",e.productName," - ",e.accountNo," ")}}function wP(t,n){if(t&1&&(s(0,"mat-form-field")(1,"mat-label"),c(2),p(3,"translate"),l(),s(4,"mat-select",15),ue(5,DP,2,3,"mat-option",13,Ce),l()(),s(7,"mat-form-field")(8,"mat-label"),c(9),p(10,"translate"),l(),T(11,"input",16),l()),t&2){let e=P(2);o(2),b(m(3,2,"labels.inputs.Account")),o(3),fe(e.accountOptions),o(4),b(m(10,4,"labels.inputs.Amount"))}}function TP(t,n){if(t&1){let e=xt();s(0,"mat-form-field",10)(1,"mat-label"),c(2),p(3,"translate"),l(),T(4,"input",11),M(5,xP,7,9,"mat-error"),l(),s(6,"mat-autocomplete",12,0),it("optionSelected",function(a){mt(e);let r=P();return dt(r.clientSelected(a.option.value))}),ue(8,yP,2,2,"mat-option",13,Ce),l(),s(10,"mat-form-field")(11,"mat-label"),c(12),p(13,"translate"),l(),s(14,"mat-select",14),ue(15,SP,2,2,"mat-option",13,Ce),l()(),M(17,wP,12,6)}if(t&2){let e=Lt(7),i=P();o(2),b(m(3,6,"labels.inputs.name")),o(2),x("matAutocomplete",e),o(),O(i.newGuarantorForm.controls.name.hasError("required")?5:-1),o(),x("displayWith",i.displayClient),o(2),fe(i.clientsData),o(4),b(m(13,8,"labels.inputs.Relationship")),o(3),fe(i.relationTypes),o(2),O((i.accountOptions==null?null:i.accountOptions.length)>0?17:-1)}}function PP(t,n){if(t&1&&(s(0,"mat-option",13),c(1),l()),t&2){let e=n.$implicit;x("value",e.id),o(),v(" ",e.name," ")}}function AP(t,n){t&1&&(s(0,"mat-error"),c(1),p(2,"translate"),p(3,"translate"),p(4,"translate"),s(5,"strong"),c(6),p(7,"translate"),l()()),t&2&&(o(),Xs(" ",m(2,4,"labels.inputs.First Name")," ",m(3,6,"labels.commons.is")," ",m(4,8,"labels.commons.is")," "),o(5),b(m(7,10,"labels.commons.required")))}function MP(t,n){t&1&&(s(0,"mat-error"),c(1),p(2,"translate"),p(3,"translate"),p(4,"translate"),s(5,"strong"),c(6),p(7,"translate"),l()()),t&2&&(o(),Xs(" ",m(2,4,"labels.inputs.Last Name")," ",m(3,6,"labels.commons.is")," ",m(4,8,"labels.commons.is")," "),o(5),b(m(7,10,"labels.commons.required")))}function OP(t,n){if(t&1){let e=xt();s(0,"mat-form-field")(1,"mat-label"),c(2),p(3,"translate"),l(),s(4,"mat-select",14),ue(5,PP,2,2,"mat-option",13,Ce),l()(),s(7,"mat-form-field")(8,"mat-label"),c(9),p(10,"translate"),l(),T(11,"input",17),M(12,AP,8,12,"mat-error"),l(),s(13,"mat-form-field")(14,"mat-label"),c(15),p(16,"translate"),l(),T(17,"input",18),M(18,MP,8,12,"mat-error"),l(),s(19,"mat-form-field",19),it("click",function(){mt(e);let a=Lt(26);return dt(a.open())}),s(20,"mat-label"),c(21),p(22,"translate"),l(),T(23,"input",20)(24,"mat-datepicker-toggle",21)(25,"mat-datepicker",null,1),l(),s(27,"mat-form-field")(28,"mat-label"),c(29),p(30,"translate"),l(),T(31,"input",22),l(),s(32,"mat-form-field")(33,"mat-label"),c(34),p(35,"translate"),l(),T(36,"input",23),l(),s(37,"mat-form-field")(38,"mat-label"),c(39),p(40,"translate"),l(),T(41,"input",24),l(),s(42,"mat-form-field")(43,"mat-label"),c(44),p(45,"translate"),l(),T(46,"input",25),l(),s(47,"mat-form-field")(48,"mat-label"),c(49),p(50,"translate"),l(),T(51,"input",26),l(),s(52,"mat-form-field")(53,"mat-label"),c(54),p(55,"translate"),l(),T(56,"input",27),l()}if(t&2){let e=Lt(26),i=P();o(2),b(m(3,16,"labels.inputs.Relationship")),o(3),fe(i.relationTypes),o(4),b(m(10,18,"labels.inputs.First Name")),o(3),O(i.newGuarantorForm.controls.firstname.hasError("required")?12:-1),o(3),b(m(16,20,"labels.inputs.Last Name")),o(3),O(i.newGuarantorForm.controls.lastname.hasError("required")?18:-1),o(3),b(m(22,22,"labels.inputs.Date Of Birth")),o(2),x("min",i.minDate)("max",i.maxDate)("matDatepicker",e),o(),x("for",e),o(5),v("",m(30,24,"labels.inputs.Address Line")," 1"),o(5),v("",m(35,26,"labels.inputs.Address Line")," 2"),o(5),b(m(40,28,"labels.inputs.City")),o(5),b(m(45,30,"labels.inputs.Zip")),o(5),b(m(50,32,"labels.inputs.Mobile")),o(5),v("",m(55,34,"labels.inputs.Residence Phone")," #")}}function IP(t,n){if(t&1&&(s(0,"button",28),c(1),p(2,"translate"),l()),t&2){let e=P();x("disabled",!e.newGuarantorForm.valid),o(),v(" ",m(2,2,"labels.buttons.Submit")," ")}}function EP(t,n){if(t&1&&(s(0,"div",9)(1,"div",29)(2,"div",30),c(3),p(4,"translate"),l()(),s(5,"div",31)(6,"div",32),c(7),p(8,"translate"),l(),s(9,"div",32),c(10),l()(),s(11,"div",31)(12,"div",32),c(13),p(14,"translate"),l(),s(15,"div",32),c(16),l()(),s(17,"div",31)(18,"div",32),c(19),p(20,"translate"),l(),s(21,"div",32),c(22),l()()()),t&2){let e=P();o(3),b(m(4,7,"labels.inputs.Client Details")),o(4),b(m(8,9,"labels.inputs.name")),o(3),b(e.newGuarantorForm.controls.name.value.displayName),o(3),b(m(14,11,"labels.inputs.Id")),o(3),b(e.newGuarantorForm.controls.name.value.id),o(3),b(m(20,13,"labels.inputs.Office")),o(3),b(e.newGuarantorForm.controls.name.value.officeName)}}var zm=(()=>{class t{constructor(){this.formBuilder=A(Te),this.loanService=A(Mt),this.route=A(Et),this.router=A(le),this.dateUtils=A(de),this.clientsService=A(ns),this.settingsService=A(oe),this.showClientDetailsForm=!1,this.minDate=new Date(1900,0,1),this.maxDate=new Date,this.clientsData=[],this.accountOptions=[],this.loanId=this.route.snapshot.params.loanId}ngOnInit(){this.maxDate=this.settingsService.businessDate,this.createNewGuarantorForm(),this.setNewGuarantorDetailsForm(),this.buildDependencies()}createNewGuarantorForm(){this.newGuarantorForm=this.formBuilder.group({existingClient:[""],name:["",Gt.required],clientRelationshipTypeId:[""],savingsId:[""],amount:[""]})}setNewGuarantorDetailsForm(){this.relationTypes=this.dataObject.allowedClientRelationshipTypes,this.newGuarantorForm.patchValue({existingClient:!0})}buildDependencies(){this.newGuarantorForm.get("existingClient").valueChanges.subscribe(()=>{this.showClientDetailsForm=!this.showClientDetailsForm,this.showClientDetailsForm?(this.newGuarantorForm.addControl("firstname",new pe("")),this.newGuarantorForm.addControl("lastname",new pe("")),this.newGuarantorForm.addControl("dob",new pe("")),this.newGuarantorForm.addControl("addressLine1",new pe("")),this.newGuarantorForm.addControl("addressLine2",new pe("")),this.newGuarantorForm.addControl("city",new pe("")),this.newGuarantorForm.addControl("zip",new pe("")),this.newGuarantorForm.addControl("mobileNumber",new pe("")),this.newGuarantorForm.addControl("housePhoneNumber",new pe("")),this.newGuarantorForm.removeControl("name"),this.newGuarantorForm.removeControl("savingsId"),this.newGuarantorForm.removeControl("amount")):(this.newGuarantorForm.addControl("name",new pe("")),this.newGuarantorForm.addControl("savingsId",new pe("")),this.newGuarantorForm.addControl("amount",new pe("")),this.newGuarantorForm.removeControl("firstname"),this.newGuarantorForm.removeControl("lastname"),this.newGuarantorForm.removeControl("dob"),this.newGuarantorForm.removeControl("addressLine1"),this.newGuarantorForm.removeControl("addressLine2"),this.newGuarantorForm.removeControl("city"),this.newGuarantorForm.removeControl("zip"),this.newGuarantorForm.removeControl("mobileNumber"),this.newGuarantorForm.removeControl("housePhoneNumber"))})}ngAfterViewInit(){this.newGuarantorForm.value.existingClient&&this.newGuarantorForm.get("name").valueChanges.subscribe(e=>{e.length>=2&&this.clientsService.getFilteredClients("displayName","ASC",!0,e).subscribe(i=>{this.clientsData=i.pageItems})})}clientSelected(e){this.accountOptions=[],this.loanService.guarantorAccountResource(this.loanId,e.id).subscribe(i=>{this.accountOptions=i.accountLinkingOptions})}displayClient(e){return e?e.displayName:void 0}submit(){let e=this.newGuarantorForm.value,i=this.settingsService.language.code,a=this.settingsService.dateFormat,r=this.newGuarantorForm.value.dob,u=this.newGuarantorForm.value.existingClient?this.dataObject.guarantorTypeOptions[0].id:this.dataObject.guarantorTypeOptions[2].id,d=ve(ie({},e),{locale:i,dateFormat:a,guarantorTypeId:u});this.newGuarantorForm.value.existingClient?d.entityId=this.newGuarantorForm.controls.name.value.id:e.dob instanceof Date&&(d.dob=this.dateUtils.formatDate(r,a)),delete d.existingClient,delete d.name,this.loanService.createNewGuarantor(this.loanId,d).subscribe(g=>{this.router.navigate(["../../general"],{relativeTo:this.route})})}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=Dt({type:t,selectors:[["mifosx-create-guarantor"]],inputs:{dataObject:"dataObject"},decls:16,vars:13,consts:[["clientsAutocomplete","matAutocomplete"],["dobDatePicker",""],[1,"container","mat-elevation-z8"],[3,"ngSubmit","formGroup"],[1,"layout-column"],["labelPosition","before","formControlName","existingClient"],[1,"layout-row","align-center","gap-5px","responsive-column"],["type","button","mat-raised-button","",3,"routerLink"],["mat-raised-button","","color","primary",3,"disabled",4,"mifosxHasPermission"],[1,"mat-table"],[1,"flex-30"],["matInput","","formControlName","name",3,"matAutocomplete"],["autoActiveFirstOption","",3,"optionSelected","displayWith"],[3,"value"],["formControlName","clientRelationshipTypeId"],["formControlName","savingsId"],["type","number","matInput","","required","","formControlName","amount"],["matInput","","required","","formControlName","firstname"],["matInput","","required","","formControlName","lastname"],[3,"click"],["matInput","","formControlName","dob",3,"min","max","matDatepicker"],["matSuffix","",3,"for"],["matInput","","formControlName","addressLine1"],["matInput","","formControlName","addressLine2"],["matInput","","formControlName","city"],["matInput","","formControlName","zip"],["type","number","matInput","","formControlName","mobileNumber"],["type","number","matInput","","formControlName","housePhoneNumber"],["mat-raised-button","","color","primary",3,"disabled"],[1,"mat-header-row"],[1,"mat-header-cell"],[1,"mat-row"],[1,"mat-cell"]],template:function(i,a){i&1&&(s(0,"div",2)(1,"mat-card")(2,"form",3),it("ngSubmit",function(){return a.submit()}),s(3,"mat-card-content")(4,"div",4)(5,"mat-checkbox",5),c(6),p(7,"translate"),l(),M(8,TP,18,10),M(9,OP,57,36),l(),s(10,"mat-card-actions",6)(11,"button",7),c(12),p(13,"translate"),l(),k(14,IP,3,4,"button",8),l()()(),M(15,EP,23,15,"div",9),l()()),i&2&&(o(2),x("formGroup",a.newGuarantorForm),o(4),v(" ",m(7,8,"labels.inputs.Existing Client")," "),o(2),O(a.showClientDetailsForm?-1:8),o(),O(a.showClientDetailsForm?9:-1),o(2),x("routerLink",Ut(12,vP)),o(),v(" ",m(13,10,"labels.buttons.Cancel")," "),o(2),x("mifosxHasPermission","CREATE_GUARANTOR"),o(),O(!(a.newGuarantorForm==null||a.newGuarantorForm.controls==null||a.newGuarantorForm.controls.name==null)&&a.newGuarantorForm.controls.name.value?15:-1))},dependencies:[wt,Tt,Re,we,Mi,he,Ee,je,Le,Ne,ae,xe,Oe,ze,_e,ge,Ve,Je,Pe,In,On,tn,en,Qe,Wt,Da,Ae,Xf,Jf,Pt],styles:[".container[_ngcontent-%COMP%] .mat-table[_ngcontent-%COMP%]{display:block;font-family:Tahoma,Verdana,sans-serif;width:100%}.container[_ngcontent-%COMP%] .mat-row[_ngcontent-%COMP%], .container[_ngcontent-%COMP%] .mat-header-row[_ngcontent-%COMP%]{display:flex;border-bottom-width:1px;border-bottom-style:solid;align-items:center;min-height:48px;padding:0 24px}.container[_ngcontent-%COMP%] .mat-cell[_ngcontent-%COMP%], .container[_ngcontent-%COMP%] .mat-header-cell[_ngcontent-%COMP%]{flex:1;overflow:hidden;word-wrap:break-word}.container[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{padding-left:0;margin-bottom:0}"]})}}return t})();var LP=()=>["../../general"];function NP(t,n){t&1&&(s(0,"mat-error"),c(1),p(2,"translate"),p(3,"translate"),s(4,"strong"),c(5),p(6,"translate"),l()()),t&2&&(o(),$t(" ",m(2,3,"labels.inputs.Disbursement Date")," ",m(3,5,"labels.commons.is")," "),o(4),b(m(6,7,"labels.commons.required")))}function kP(t,n){t&1&&(s(0,"mat-form-field")(1,"mat-label"),c(2),p(3,"translate"),l(),T(4,"input",13),l()),t&2&&(o(2),b(m(3,1,"labels.inputs.Fixed EMI amount")))}function FP(t,n){if(t&1&&(s(0,"button",14),c(1),p(2,"translate"),l()),t&2){let e=P();x("disabled",!e.disbursementForm.valid),o(),v(" ",m(2,2,"labels.buttons.Submit")," ")}}var Vm=(()=>{class t{constructor(){this.formBuilder=A(Te),this.route=A(Et),this.router=A(le),this.dateUtils=A(de),this.loanService=A(Mt),this.settingsService=A(oe),this.minDate=new Date(2e3,0,1),this.maxDate=new Date}ngOnInit(){this.maxDate=this.settingsService.businessDate,this.setDisbursementToSavingsForm(),this.dataObject.currency&&(this.currency=this.dataObject.currency);let e=this.route.snapshot.params.loanId;this.loanService.getLoanDelinquencyDataForTemplate(e).subscribe(i=>{i.availableDisbursementAmountWithOverApplied!==void 0&&(this.dataObject.availableDisbursementAmountWithOverApplied=i.availableDisbursementAmountWithOverApplied),i.delinquent&&(this.dataObject.delinquent=i.delinquent)})}setDisbursementToSavingsForm(){this.disbursementForm=this.formBuilder.group({actualDisbursementDate:[new Date,Gt.required],transactionAmount:[this.dataObject.amount,Gt.required],note:[""]}),this.dataObject.fixedEmiAmount&&this.disbursementForm.addControl("fixedEmiAmount",new pe(this.dataObject.fixedEmiAmount,[Gt.required]))}submit(){let e=this.disbursementForm.value,i=this.settingsService.language.code,a=this.settingsService.dateFormat,r=this.disbursementForm.value.actualDisbursementDate;e.actualDisbursementDate instanceof Date&&(e.actualDisbursementDate=this.dateUtils.formatDate(r,a));let u=ve(ie({},e),{dateFormat:a,locale:i}),d=this.route.snapshot.params.loanId;u.transactionAmount=u.transactionAmount*1,this.loanService.loanActionButtons(d,"disbursetosavings",u).subscribe(g=>{this.router.navigate(["../../general"],{relativeTo:this.route})})}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=Dt({type:t,selectors:[["mifosx-disburse-to-savings-account"]],inputs:{dataObject:"dataObject"},decls:32,vars:29,consts:[["disbursementDatePicker",""],[1,"container","mat-elevation-z8"],[3,"ngSubmit","formGroup"],[1,"layout-column"],[3,"click"],["matInput","","required","","formControlName","actualDisbursementDate",3,"min","max","matDatepicker"],["matSuffix","",3,"for"],[3,"currency","isRequired","inputFormControl","inputLabel"],["matInput","","readonly","",3,"value"],["matInput","","formControlName","note","cdkTextareaAutosize","","cdkAutosizeMinRows","2"],[1,"layout-row","align-center","gap-5px","responsive-column"],["type","button","mat-raised-button","",3,"routerLink"],["mat-raised-button","","color","primary",3,"disabled",4,"mifosxHasPermission"],["matInput","","type","number","formControlName","fixedEmiAmount"],["mat-raised-button","","color","primary",3,"disabled"]],template:function(i,a){if(i&1){let r=xt();s(0,"div",1)(1,"mat-card")(2,"form",2),it("ngSubmit",function(){return mt(r),dt(a.submit())}),s(3,"mat-card-content")(4,"div",3)(5,"mat-form-field",4),it("click",function(){mt(r);let d=Lt(12);return dt(d.open())}),s(6,"mat-label"),c(7),p(8,"translate"),l(),T(9,"input",5)(10,"mat-datepicker-toggle",6)(11,"mat-datepicker",null,0),M(13,NP,7,9,"mat-error"),l(),T(14,"mifosx-input-amount",7),s(15,"mat-form-field")(16,"mat-label"),c(17),p(18,"translate"),l(),T(19,"input",8),p(20,"formatNumber"),l(),M(21,kP,5,3,"mat-form-field"),s(22,"mat-form-field")(23,"mat-label"),c(24),p(25,"translate"),l(),T(26,"textarea",9),l()(),s(27,"mat-card-actions",10)(28,"button",11),c(29),p(30,"translate"),l(),k(31,FP,3,4,"button",12),l()()()()()}if(i&2){let r=Lt(12);o(2),x("formGroup",a.disbursementForm),o(5),b(m(8,18,"labels.inputs.Disbursement On")),o(2),x("min",a.minDate)("max",a.maxDate)("matDatepicker",r),o(),x("for",r),o(3),O(a.disbursementForm.controls.actualDisbursementDate.hasError("required")?13:-1),o(),x("currency",a.currency)("isRequired",!0)("inputFormControl",a.disbursementForm.controls.transactionAmount)("inputLabel","Transaction Amount"),o(3),b(m(18,20,"labels.inputs.Available Disbursement Amount (with Over Applied)")),o(2),x("value",m(20,22,a.dataObject.availableDisbursementAmountWithOverApplied)),o(2),O(a.dataObject.fixedEmiAmount?21:-1),o(3),b(m(25,24,"labels.inputs.Note")),o(4),x("routerLink",Ut(28,LP)),o(),v(" ",m(30,26,"labels.buttons.Cancel")," "),o(2),x("mifosxHasPermission","DISBURSETOSAVINGS_LOAN")}},dependencies:[wt,Tt,Re,we,Mi,he,Ee,je,Le,Ne,ae,xe,Oe,ze,_e,ge,Ve,Je,Pe,tn,en,Qe,Wt,Ae,Ri,Wn,Pt,hn],styles:[".container[_ngcontent-%COMP%]{max-width:37rem}"]})}}return t})();var RP=()=>["../../general"];function BP(t,n){t&1&&(s(0,"mat-error"),c(1),p(2,"translate"),p(3,"translate"),s(4,"strong"),c(5),p(6,"translate"),l()()),t&2&&(o(),$t(" ",m(2,3,"labels.inputs.Rejected Date")," ",m(3,5,"labels.commons.is")," "),o(4),b(m(6,7,"labels.commons.required")))}function qP(t,n){if(t&1&&(s(0,"button",11),c(1),p(2,"translate"),l()),t&2){let e=P();x("disabled",!e.rejectLoanForm.valid),o(),v(" ",m(2,2,"labels.buttons.Submit")," ")}}var Um=(()=>{class t{constructor(){this.formBuilder=A(Te),this.router=A(le),this.route=A(Et),this.loanService=A(Mt),this.dateUtils=A(de),this.settingsService=A(oe),this.minDate=new Date(2e3,0,1),this.maxDate=new Date,this.loanId=this.route.snapshot.params.loanId}ngOnInit(){this.maxDate=this.settingsService.businessDate,this.setRejectLoanForm()}setRejectLoanForm(){this.rejectLoanForm=this.formBuilder.group({rejectedOnDate:[new Date,Gt.required],note:[""]})}submit(){let e=this.rejectLoanForm.value,i=this.settingsService.language.code,a=this.settingsService.dateFormat,r=this.rejectLoanForm.value.rejectedOnDate;e.rejectedOnDate instanceof Date&&(e.rejectedOnDate=this.dateUtils.formatDate(r,a));let u=ve(ie({},e),{dateFormat:a,locale:i});this.loanService.loanActionButtons(this.loanId,"reject",u).subscribe(d=>{this.router.navigate(["../../general"],{relativeTo:this.route})})}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=Dt({type:t,selectors:[["mifosx-reject-loan"]],decls:24,vars:18,consts:[["rejectedDatePicker",""],[1,"container","mat-elevation-z8"],[3,"ngSubmit","formGroup"],[1,"layout-column"],[3,"click"],["matInput","","required","","formControlName","rejectedOnDate",3,"min","max","matDatepicker"],["matSuffix","",3,"for"],["matInput","","formControlName","note","cdkTextareaAutosize","","cdkAutosizeMinRows","2"],[1,"layout-row","align-center","gap-5px","responsive-column"],["type","button","mat-raised-button","",3,"routerLink"],["mat-raised-button","","color","primary",3,"disabled",4,"mifosxHasPermission"],["mat-raised-button","","color","primary",3,"disabled"]],template:function(i,a){if(i&1){let r=xt();s(0,"div",1)(1,"mat-card")(2,"form",2),it("ngSubmit",function(){return mt(r),dt(a.submit())}),s(3,"mat-card-content")(4,"div",3)(5,"mat-form-field",4),it("click",function(){mt(r);let d=Lt(12);return dt(d.open())}),s(6,"mat-label"),c(7),p(8,"translate"),l(),T(9,"input",5)(10,"mat-datepicker-toggle",6)(11,"mat-datepicker",null,0),M(13,BP,7,9,"mat-error"),l(),s(14,"mat-form-field")(15,"mat-label"),c(16),p(17,"translate"),l(),T(18,"textarea",7),l()(),s(19,"mat-card-actions",8)(20,"button",9),c(21),p(22,"translate"),l(),k(23,qP,3,4,"button",10),l()()()()()}if(i&2){let r=Lt(12);o(2),x("formGroup",a.rejectLoanForm),o(5),b(m(8,11,"labels.inputs.Rejected On")),o(2),x("min",a.minDate)("max",a.maxDate)("matDatepicker",r),o(),x("for",r),o(3),O(a.rejectLoanForm.controls.rejectedOnDate.hasError("required")?13:-1),o(3),b(m(17,13,"labels.inputs.Note")),o(4),x("routerLink",Ut(17,RP)),o(),v(" ",m(22,15,"labels.buttons.Cancel")," "),o(2),x("mifosxHasPermission","REJECT_LOAN")}},dependencies:[wt,Tt,Re,we,he,Ee,je,Le,Ne,ae,xe,Oe,ze,_e,ge,Ve,Je,Pe,tn,en,Qe,Wt,Ae,Wn,Pt],styles:[".container[_ngcontent-%COMP%]{max-width:37rem}"]})}}return t})();var jP=()=>["../../general"];function zP(t,n){t&1&&(s(0,"mat-error"),c(1),p(2,"translate"),s(3,"strong"),c(4),p(5,"translate"),l()()),t&2&&(o(),v(" ",m(2,2,"labels.inputs.Disbursed On Date")),o(3),b(m(5,4,"labels.commons.required")))}function VP(t,n){if(t&1&&(s(0,"mat-option",11),c(1),l()),t&2){let e=n.$implicit;x("value",e.id),o(),v(" ",e.name," ")}}function UP(t,n){t&1&&(s(0,"mat-form-field")(1,"mat-label"),c(2),p(3,"translate"),l(),T(4,"input",20),l(),s(5,"mat-form-field")(6,"mat-label"),c(7),p(8,"translate"),l(),T(9,"input",21),l(),s(10,"mat-form-field")(11,"mat-label"),c(12),p(13,"translate"),l(),T(14,"input",22),l(),s(15,"mat-form-field")(16,"mat-label"),c(17),p(18,"translate"),l(),T(19,"input",23),l(),s(20,"mat-form-field")(21,"mat-label"),c(22),p(23,"translate"),l(),T(24,"input",24),l()),t&2&&(o(2),v("",m(3,5,"labels.inputs.Account")," #"),o(5),v("",m(8,7,"labels.inputs.Cheque")," #"),o(5),b(m(13,9,"labels.inputs.Routing Code")),o(5),v("",m(18,11,"labels.inputs.Reciept")," #"),o(5),v("",m(23,13,"labels.inputs.Bank")," #"))}function HP(t,n){if(t&1&&(s(0,"button",25),c(1),p(2,"translate"),l()),t&2){let e=P();x("disabled",!e.disbursementLoanForm.valid),o(),v(" ",m(2,2,"labels.buttons.Submit")," ")}}var Hm=(()=>{class t{constructor(){this.formBuilder=A(Te),this.loanService=A(Mt),this.route=A(Et),this.router=A(le),this.dateUtils=A(de),this.settingsService=A(oe),this.showPaymentDetails=!1,this.minDate=new Date(2e3,0,1),this.maxDate=new Date,this.loanId=this.route.snapshot.params.loanId}ngOnInit(){this.maxDate=this.settingsService.maxFutureDate,this.createDisbursementLoanForm(),this.setDisbursementLoanDetails(),this.dataObject.currency&&(this.currency=this.dataObject.currency),this.loanService.getLoanDelinquencyDataForTemplate(this.loanId).subscribe(e=>{e.availableDisbursementAmountWithOverApplied!==void 0&&(this.dataObject.availableDisbursementAmountWithOverApplied=e.availableDisbursementAmountWithOverApplied),e.delinquent&&(this.dataObject.delinquent=e.delinquent)})}createDisbursementLoanForm(){this.disbursementLoanForm=this.formBuilder.group({actualDisbursementDate:[this.settingsService.businessDate,Gt.required],transactionAmount:["",Gt.required],externalId:"",paymentTypeId:"",note:""})}setDisbursementLoanDetails(){this.paymentTypes=this.dataObject.paymentTypeOptions,this.disbursementLoanForm.patchValue({transactionAmount:this.dataObject.amount})}addPaymentDetails(){this.showPaymentDetails=!this.showPaymentDetails,this.showPaymentDetails?(this.disbursementLoanForm.addControl("accountNumber",new pe("")),this.disbursementLoanForm.addControl("checkNumber",new pe("")),this.disbursementLoanForm.addControl("routingCode",new pe("")),this.disbursementLoanForm.addControl("receiptNumber",new pe("")),this.disbursementLoanForm.addControl("bankNumber",new pe(""))):(this.disbursementLoanForm.removeControl("accountNumber"),this.disbursementLoanForm.removeControl("checkNumber"),this.disbursementLoanForm.removeControl("routingCode"),this.disbursementLoanForm.removeControl("receiptNumber"),this.disbursementLoanForm.removeControl("bankNumber"))}submit(){let e=this.disbursementLoanForm.value,i=this.settingsService.language.code,a=this.settingsService.dateFormat,r=this.disbursementLoanForm.value.actualDisbursementDate;e.actualDisbursementDate instanceof Date&&(e.actualDisbursementDate=this.dateUtils.formatDate(r,a));let u=ve(ie({},e),{dateFormat:a,locale:i});u.transactionAmount=u.transactionAmount*1,this.loanService.loanActionButtons(this.loanId,"disburse",u).subscribe(d=>{this.router.navigate(["../../general"],{relativeTo:this.route})})}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=Dt({type:t,selectors:[["mifosx-disburse"]],inputs:{dataObject:"dataObject"},decls:51,vars:39,consts:[["actualDisbursementDatePicker",""],[1,"container","mat-elevation-z8"],[3,"ngSubmit","formGroup"],[1,"layout-column"],[3,"click"],["matInput","","required","","formControlName","actualDisbursementDate",3,"min","max","matDatepicker"],["matSuffix","",3,"for"],[3,"currency","isRequired","inputFormControl","inputLabel"],["matInput","","readonly","",3,"value"],["matInput","","formControlName","externalId"],["formControlName","paymentTypeId"],[3,"value"],[1,"flex-fill"],[1,"expandcollapsebutton","m-l-10","m-t-40","flex-75",3,"click"],[3,"className"],[1,"m-l-10"],["matInput","","formControlName","note","cdkTextareaAutosize","","cdkAutosizeMinRows","2"],[1,"layout-row","align-center","gap-5px","responsive-column"],["type","button","mat-raised-button","",3,"routerLink"],["mat-raised-button","","color","primary",3,"disabled",4,"mifosxHasPermission"],["matInput","","formControlName","accountNumber"],["matInput","","formControlName","checkNumber"],["matInput","","formControlName","routingCode"],["matInput","","formControlName","receiptNumber"],["matInput","","formControlName","bankNumber"],["mat-raised-button","","color","primary",3,"disabled"]],template:function(i,a){if(i&1){let r=xt();s(0,"div",1)(1,"mat-card")(2,"form",2),it("ngSubmit",function(){return mt(r),dt(a.submit())}),s(3,"mat-card-content")(4,"div",3)(5,"mat-form-field",4),it("click",function(){mt(r);let d=Lt(12);return dt(d.open())}),s(6,"mat-label"),c(7),p(8,"translate"),l(),T(9,"input",5)(10,"mat-datepicker-toggle",6)(11,"mat-datepicker",null,0),M(13,zP,6,6,"mat-error"),l(),T(14,"mifosx-input-amount",7),s(15,"mat-form-field")(16,"mat-label"),c(17),p(18,"translate"),l(),T(19,"input",8),p(20,"formatNumber"),l(),s(21,"mat-form-field")(22,"mat-label"),c(23),p(24,"translate"),l(),T(25,"input",9),l(),s(26,"mat-form-field")(27,"mat-label"),c(28),p(29,"translate"),l(),s(30,"mat-select",10),ue(31,VP,2,2,"mat-option",11,Ce),l()(),s(33,"div",12)(34,"span",13),it("click",function(){return mt(r),dt(a.addPaymentDetails())}),s(35,"mat-slide-toggle")(36,"div",14)(37,"span",15),c(38),p(39,"translate"),l()()()()(),M(40,UP,25,15),s(41,"mat-form-field")(42,"mat-label"),c(43),p(44,"translate"),l(),T(45,"textarea",16),l()(),s(46,"mat-card-actions",17)(47,"button",18),c(48),p(49,"translate"),l(),k(50,HP,3,4,"button",19),l()()()()()}if(i&2){let r=Lt(12);o(2),x("formGroup",a.disbursementLoanForm),o(5),b(m(8,22,"labels.inputs.Disbursed On")),o(2),x("min",a.minDate)("max",a.maxDate)("matDatepicker",r),o(),x("for",r),o(3),O(a.disbursementLoanForm.controls.actualDisbursementDate.hasError("required")?13:-1),o(),x("currency",a.currency)("isRequired",!0)("inputFormControl",a.disbursementLoanForm.controls.transactionAmount)("inputLabel","Transaction Amount"),o(3),b(m(18,24,"labels.inputs.Available Disbursement Amount (with Over Applied)")),o(2),x("value",m(20,26,a.dataObject.availableDisbursementAmountWithOverApplied)),o(4),b(m(24,28,"labels.inputs.External Id")),o(5),b(m(29,30,"labels.inputs.Payment Type")),o(3),fe(a.paymentTypes),o(5),x("className",a.showPaymentDetails?"enabled":"disabled"),o(2),b(m(39,32,"labels.inputs.Show Payment Details")),o(2),O(a.showPaymentDetails?40:-1),o(3),b(m(44,34,"labels.inputs.Note")),o(4),x("routerLink",Ut(38,jP)),o(),v(" ",m(49,36,"labels.buttons.Cancel")," "),o(2),x("mifosxHasPermission","DISBURSE_LOAN")}},dependencies:[wt,Tt,Re,we,he,Ee,je,Le,Ne,ae,xe,Oe,ze,_e,ge,Ve,Je,Pe,In,On,tn,en,Qe,Wt,Ae,Ri,ja,Wn,Pt,hn],styles:[".expandcollapsebutton[_ngcontent-%COMP%]{margin-top:-7px}.container[_ngcontent-%COMP%]{max-width:37rem}"]})}}return t})();var GP=()=>["../../../general"];function WP(t,n){t&1&&(s(0,"mat-error"),c(1),p(2,"translate"),p(3,"translate"),s(4,"strong"),c(5),p(6,"translate"),l()()),t&2&&(o(),$t(" ",m(2,3,"labels.inputs.Withdrawn On Date")," ",m(3,5,"labels.commons.is")," "),o(4),b(m(6,7,"labels.commons.required")))}function $P(t,n){if(t&1&&(s(0,"button",11),c(1),p(2,"translate"),l()),t&2){let e=P();x("disabled",!e.withdrawnByClientLoanForm.valid),o(),v(" ",m(2,2,"labels.buttons.Submit")," ")}}var Gm=(()=>{class t{constructor(){this.formBuilder=A(Te),this.loanService=A(Mt),this.route=A(Et),this.router=A(le),this.dateUtils=A(de),this.settingsService=A(oe),this.minDate=new Date(2e3,0,1),this.maxDate=new Date,this.loanId=this.route.snapshot.params.loanId}ngOnInit(){this.maxDate=this.settingsService.businessDate,this.createWithdrawnByClientLoanForm()}createWithdrawnByClientLoanForm(){this.withdrawnByClientLoanForm=this.formBuilder.group({withdrawnOnDate:[new Date,Gt.required],note:""})}submit(){let e=this.withdrawnByClientLoanForm.value,i=this.settingsService.language.code,a=this.settingsService.dateFormat,r=this.withdrawnByClientLoanForm.value.withdrawnOnDate;e.withdrawnOnDate instanceof Date&&(e.withdrawnOnDate=this.dateUtils.formatDate(r,a));let u=ve(ie({},e),{dateFormat:a,locale:i});this.loanService.loanActionButtons(this.loanId,"withdrawnByApplicant",u).subscribe(d=>{this.router.navigate(["../../general"],{relativeTo:this.route})})}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=Dt({type:t,selectors:[["mifosx-withdrawn-by-client"]],inputs:{dataObject:"dataObject"},decls:24,vars:18,consts:[["withdrawnOnDatePicker",""],[1,"container","mat-elevation-z8"],[3,"ngSubmit","formGroup"],[1,"layout-column"],[3,"click"],["matInput","","required","","formControlName","withdrawnOnDate",3,"min","max","matDatepicker"],["matSuffix","",3,"for"],["matInput","","formControlName","note","cdkTextareaAutosize","","cdkAutosizeMinRows","2"],[1,"layout-row","align-center","gap-5px","responsive-column"],["type","button","mat-raised-button","",3,"routerLink"],["mat-raised-button","","color","primary",3,"disabled",4,"mifosxHasPermission"],["mat-raised-button","","color","primary",3,"disabled"]],template:function(i,a){if(i&1){let r=xt();s(0,"div",1)(1,"mat-card")(2,"form",2),it("ngSubmit",function(){return mt(r),dt(a.submit())}),s(3,"mat-card-content")(4,"div",3)(5,"mat-form-field",4),it("click",function(){mt(r);let d=Lt(12);return dt(d.open())}),s(6,"mat-label"),c(7),p(8,"translate"),l(),T(9,"input",5)(10,"mat-datepicker-toggle",6)(11,"mat-datepicker",null,0),M(13,WP,7,9,"mat-error"),l(),s(14,"mat-form-field")(15,"mat-label"),c(16),p(17,"translate"),l(),T(18,"textarea",7),l()(),s(19,"mat-card-actions",8)(20,"button",9),c(21),p(22,"translate"),l(),k(23,$P,3,4,"button",10),l()()()()()}if(i&2){let r=Lt(12);o(2),x("formGroup",a.withdrawnByClientLoanForm),o(5),b(m(8,11,"labels.inputs.Withdrawn On")),o(2),x("min",a.minDate)("max",a.maxDate)("matDatepicker",r),o(),x("for",r),o(3),O(a.withdrawnByClientLoanForm.controls.withdrawnOnDate.hasError("required")?13:-1),o(3),b(m(17,13,"labels.inputs.Note")),o(4),x("routerLink",Ut(17,GP)),o(),v(" ",m(22,15,"labels.buttons.Cancel")," "),o(2),x("mifosxHasPermission","WITHDRAW_LOAN")}},dependencies:[wt,Tt,Re,we,he,Ee,je,Le,Ne,ae,xe,Oe,ze,_e,ge,Ve,Je,Pe,tn,en,Qe,Wt,Ae,Wn,Pt],styles:[".container[_ngcontent-%COMP%]{max-width:37rem}"]})}}return t})();var YP=()=>["../../loan-collateral"];function ZP(t,n){if(t&1&&(s(0,"mat-option",4),c(1),l()),t&2){let e=n.$implicit;x("value",e.id),o(),v(" ",e.name)}}function KP(t,n){t&1&&(s(0,"mat-error"),c(1),p(2,"translate"),p(3,"translate"),s(4,"strong"),c(5),p(6,"translate"),l()()),t&2&&(o(),$t(" ",m(2,3,"labels.inputs.Collateral Type")," ",m(3,5,"labels.commons.is")," "),o(4),b(m(6,7,"labels.commons.required")))}function JP(t,n){t&1&&(s(0,"mat-error"),c(1),p(2,"translate"),p(3,"translate"),s(4,"strong"),c(5),p(6,"translate"),l()()),t&2&&(o(),$t(" ",m(2,3,"labels.inputs.Value")," ",m(3,5,"labels.commons.is")," "),o(4),b(m(6,7,"labels.commons.required")))}function XP(t,n){if(t&1&&(s(0,"button",10),c(1),p(2,"translate"),l()),t&2){let e=P();x("disabled",!e.collateralForm.valid),o(),v(" ",m(2,2,"labels.buttons.Submit")," ")}}var Wm=(()=>{class t{constructor(){this.formBuilder=A(Te),this.router=A(le),this.route=A(Et),this.loanService=A(Mt)}ngOnInit(){this.createAddCollateralForm()}createAddCollateralForm(){this.collateralForm=this.formBuilder.group({collateralTypeId:["",Gt.required],value:["",Gt.required],description:[""]})}submit(){let e=this.collateralForm.value.collateralTypeId;this.collateralForm.patchValue({collateralTypeId:e});let i=this.route.snapshot.params.loanId,a=this.collateralForm.value;a.locale="en",this.loanService.createLoanCollateral(i,a).subscribe(r=>{this.router.navigate(["../../loan-collateral"],{relativeTo:this.route})})}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=Dt({type:t,selectors:[["mifosx-add-collateral"]],inputs:{dataObject:"dataObject"},decls:29,vars:18,consts:[[1,"container","mat-elevation-z8"],[3,"ngSubmit","formGroup"],[1,"layout-column"],["required","","formControlName","collateralTypeId"],[3,"value"],["matInput","","required","","formControlName","value"],["matInput","","formControlName","description","cdkTextareaAutosize","","cdkAutosizeMinRows","2"],[1,"layout-row","align-center","gap-5px","responsive-column"],["type","button","mat-raised-button","",3,"routerLink"],["mat-raised-button","","color","primary",3,"disabled",4,"mifosxHasPermission"],["mat-raised-button","","color","primary",3,"disabled"]],template:function(i,a){i&1&&(s(0,"div",0)(1,"mat-card")(2,"form",1),it("ngSubmit",function(){return a.submit()}),s(3,"mat-card-content")(4,"div",2)(5,"mat-form-field")(6,"mat-label"),c(7),p(8,"translate"),l(),s(9,"mat-select",3),ue(10,ZP,2,2,"mat-option",4,Ce),l(),M(12,KP,7,9,"mat-error"),l(),s(13,"mat-form-field")(14,"mat-label"),c(15),p(16,"translate"),l(),T(17,"input",5),M(18,JP,7,9,"mat-error"),l(),s(19,"mat-form-field")(20,"mat-label"),c(21),p(22,"translate"),l(),T(23,"textarea",6),l()(),s(24,"mat-card-actions",7)(25,"button",8),c(26),p(27,"translate"),l(),k(28,XP,3,4,"button",9),l()()()()()),i&2&&(o(2),x("formGroup",a.collateralForm),o(5),b(m(8,9,"labels.inputs.Collateral Type")),o(3),fe(a.dataObject.allowedCollateralTypes),o(2),O(a.collateralForm.controls.collateralTypeId.hasError("required")?12:-1),o(3),b(m(16,11,"labels.inputs.Value")),o(3),O(a.collateralForm.controls.value.hasError("required")?18:-1),o(3),b(m(22,13,"labels.inputs.Description")),o(4),x("routerLink",Ut(17,YP)),o(),v(" ",m(27,15,"labels.buttons.Cancel")," "),o(2),x("mifosxHasPermission","CREATE_COLLATERAL"))},dependencies:[wt,Tt,Re,we,he,Ee,je,Le,Ne,ae,xe,Oe,ze,_e,ge,Ve,Pe,In,On,Wt,Ae,Wn,Pt],styles:[".container[_ngcontent-%COMP%]{max-width:37rem}"]})}}return t})();var QP=()=>["../../general"];function tA(t,n){if(t&1){let e=xt();s(0,"button",7),it("click",function(){mt(e);let a=P();return dt(a.submit())}),c(1),p(2,"translate"),l()}t&2&&(o(),v(" ",m(2,1,"labels.buttons.Submit")," "))}var $m=(()=>{class t{constructor(){this.formBuilder=A(Te),this.loansService=A(Mt),this.router=A(le),this.route=A(Et),this.loanId=this.route.snapshot.params.loanId}ngOnInit(){this.note=this.formBuilder.control("",Gt.required)}submit(){let e="undodisbursal";this.actionName==="Undo Last Disbursal"&&(e="undolastdisbursal"),this.loansService.loanActionButtons(this.loanId,e,{note:this.note.value}).subscribe(i=>{this.router.navigate(["../../general"],{relativeTo:this.route})})}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=Dt({type:t,selectors:[["mifosx-undo-disbursal"]],inputs:{actionName:"actionName"},decls:14,vars:10,consts:[[1,"container","mat-elevation-z8"],[1,"layout-column"],[1,"flex-fill"],["matInput","","required","","cdkTextareaAutosize","","cdkAutosizeMinRows","2",3,"formControl"],[1,"layout-row","align-center","gap-5px","responsive-column"],["type","button","mat-raised-button","",3,"routerLink"],["mat-raised-button","","color","primary",3,"click",4,"mifosxHasPermission"],["mat-raised-button","","color","primary",3,"click"]],template:function(i,a){i&1&&(s(0,"div",0)(1,"mat-card")(2,"mat-card-content")(3,"div",1)(4,"mat-form-field",2)(5,"mat-label"),c(6),p(7,"translate"),l(),T(8,"textarea",3),l()(),s(9,"mat-card-actions",4)(10,"button",5),c(11),p(12,"translate"),l(),k(13,tA,3,3,"button",6),l()()()()),i&2&&(o(6),b(m(7,5,"labels.inputs.Note")),o(2),x("formControl",a.note),o(2),x("routerLink",Ut(9,QP)),o(),v(" ",m(12,7,"labels.buttons.Cancel")," "),o(2),x("mifosxHasPermission","DISBURSALUNDO_LOAN"))},dependencies:[wt,Tt,we,he,je,Wo,ae,xe,Oe,ze,_e,ge,Pe,Wt,Ae,Wn,Pt],styles:[".container[_ngcontent-%COMP%]{max-width:37rem}"]})}}return t})();var eA=["screenReport"],nA=()=>["../../general"];function iA(t,n){if(t&1&&(s(0,"mat-option",6),c(1),l()),t&2){let e=n.$implicit;x("value",e.id),o(),v(" ",e.name," ")}}function aA(t,n){t&1&&(s(0,"mat-error"),c(1),p(2,"translate"),p(3,"translate"),s(4,"strong"),c(5),p(6,"translate"),l()()),t&2&&(o(),$t(" ",m(2,3,"labels.inputs.Screen Report")," ",m(3,5,"labels.commons.is")," "),o(4),b(m(6,7,"labels.commons.required")))}var Ym=(()=>{class t{constructor(){this.formBuilder=A(Te),this.loansService=A(Mt),this.route=A(Et),this.sanitizer=A(Zl),this.renderer=A(Of),this.loanId=this.route.snapshot.params.loanId}ngOnInit(){this.templatesData=this.dataObject,this.createLoanScreenReportForm()}createLoanScreenReportForm(){this.loanScreenReportForm=this.formBuilder.group({templateId:[""]})}print(){let e=window.open("","Screen Report","height=400,width=600");e.document.write(""),e.document.write(""),e.document.write(this.template),e.document.write(""),e.print(),e.close()}generate(){let e=this.loanScreenReportForm.get("templateId").value;this.loansService.getTemplateData(e,this.loanId).subscribe(i=>{this.template=this.sanitizer.sanitize(Mf.HTML,i),this.renderer.setProperty(this.screenReportRef.nativeElement,"innerHTML",this.template)})}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=Dt({type:t,selectors:[["mifosx-loan-screen-reports"]],viewQuery:function(i,a){if(i&1&&mi(eA,7),i&2){let r;di(r=ui())&&(a.screenReportRef=r.first)}},inputs:{dataObject:"dataObject"},decls:34,vars:21,consts:[["output",""],["screenReport",""],[1,"container","m-b-20"],[3,"ngSubmit","formGroup"],[1,"flex-fill"],["formControlName","templateId"],[3,"value"],[1,"layout-row","align-center","gap-5px","responsive-column"],["type","button","mat-raised-button","",3,"routerLink"],["mat-raised-button","","color","primary",3,"disabled"],["icon","cogs","size","sm",1,"m-r-10"],[1,"container"],[1,"layout-column","gap-3percent"],[1,"layout-align-end"],["mat-stroked-button","","color","primary",3,"click","disabled"],["icon","file",1,"m-r-10"],[1,"screen-report"]],template:function(i,a){if(i&1){let r=xt();s(0,"div",2)(1,"mat-card")(2,"form",3),it("ngSubmit",function(){return mt(r),dt(a.generate())}),s(3,"mat-card-content")(4,"div")(5,"mat-form-field",4)(6,"mat-label"),c(7),p(8,"translate"),l(),s(9,"mat-select",5),ue(10,iA,2,2,"mat-option",6,Ce),l(),M(12,aA,7,9,"mat-error"),l()(),s(13,"mat-card-actions",7)(14,"button",8),c(15),p(16,"translate"),l(),s(17,"button",9),T(18,"fa-icon",10),c(19),p(20,"translate"),l()()()()()(),s(21,"div",11,0)(23,"mat-card",12)(24,"div",13)(25,"button",14),it("click",function(){return mt(r),dt(a.print())}),T(26,"fa-icon",15),c(27),p(28,"translate"),l()(),s(29,"div",16,1)(31,"p"),c(32),p(33,"translate"),l()()()()}i&2&&(o(2),x("formGroup",a.loanScreenReportForm),o(5),b(m(8,10,"labels.inputs.Loan Screen Reports")),o(3),fe(a.templatesData),o(2),O(a.loanScreenReportForm.controls.templateId.hasError("required")?12:-1),o(2),x("routerLink",Ut(20,nA)),o(),v(" ",m(16,12,"labels.buttons.Cancel")," "),o(2),x("disabled",!a.loanScreenReportForm.valid),o(2),v("",m(20,14,"labels.buttons.Generate Report")," "),o(6),x("disabled",!a.template),o(2),v(" ",m(28,16,"labels.buttons.Print")," "),o(5),b(m(33,18,"labels.text.Please select a screen report.")))},dependencies:[wt,Tt,Re,he,Ee,Le,Ne,ae,xe,Oe,ze,_e,ge,Ve,In,On,Wt,un,Pt],styles:[".container[_ngcontent-%COMP%]{max-width:37rem}.container[_ngcontent-%COMP%] .print[_ngcontent-%COMP%]{align-self:flex-end}.container[_ngcontent-%COMP%] .screen-report[_ngcontent-%COMP%]{text-align:center}"]})}}return t})();var oA=()=>["../../general"];function rA(t,n){t&1&&(s(0,"mat-error"),c(1),p(2,"translate"),p(3,"translate"),s(4,"strong"),c(5),p(6,"translate"),l()()),t&2&&(o(),$t(" ",m(2,3,"labels.inputs.Approved Date")," ",m(3,5,"labels.commons.is")," "),o(4),b(m(6,7,"labels.commons.required")))}function lA(t,n){t&1&&(s(0,"mat-error"),c(1),p(2,"translate"),p(3,"translate"),s(4,"strong"),c(5),p(6,"translate"),l()()),t&2&&(o(),$t(" ",m(2,3,"labels.inputs.Transaction Amount")," ",m(3,5,"labels.commons.is")," "),o(4),b(m(6,7,"labels.commons.required")))}function sA(t,n){if(t&1&&(s(0,"button",16),c(1),p(2,"translate"),l()),t&2){let e=P();x("disabled",!e.approveLoanForm.valid),o(),v(" ",m(2,2,"labels.buttons.Submit")," ")}}var Zm=(()=>{class t{constructor(){this.formBuilder=A(Te),this.route=A(Et),this.dateUtils=A(de),this.loanService=A(Mt),this.router=A(le),this.settingsService=A(oe),this.loanData=new Object,this.minDate=new Date(2e3,0,1),this.route.data.subscribe(e=>{this.loanData=e.actionButtonData,this.currency=e.actionButtonData.currency}),this.loanId=this.route.snapshot.params.loanId}ngOnInit(){this.setApproveLoanForm(),this.loanService.getApproveAssociationsDetails(this.loanId).subscribe(e=>{this.associationData=e,this.approveLoanForm.patchValue({expectedDisbursementDate:new Date(e.timeline.expectedDisbursementDate)})}),this.loanService.getLoanDelinquencyDataForTemplate(this.loanId).subscribe(e=>{e.availableDisbursementAmountWithOverApplied!==void 0&&(this.loanData.availableDisbursementAmountWithOverApplied=e.availableDisbursementAmountWithOverApplied),e.delinquent&&(this.loanData.delinquent=e.delinquent)})}setApproveLoanForm(){this.approveLoanForm=this.formBuilder.group({approvedOnDate:[this.settingsService.businessDate,Gt.required],expectedDisbursementDate:[""],approvedLoanAmount:[this.loanData.approvalAmount,Gt.required],note:[""]})}submit(){let e=this.approveLoanForm.value,i=this.settingsService.language.code,a=this.settingsService.dateFormat,r=this.approveLoanForm.value.approvedOnDate,u=this.approveLoanForm.value.expectedDisbursementDate;e.approvedOnDate instanceof Date&&(e.approvedOnDate=this.dateUtils.formatDate(r,a)),e.expectedDisbursementDate instanceof Date&&(e.expectedDisbursementDate=this.dateUtils.formatDate(u,a));let d=ve(ie({},e),{dateFormat:a,locale:i});this.loanService.loanActionButtons(this.loanId,"approve",d).subscribe(g=>{this.router.navigate(["../../general"],{relativeTo:this.route})})}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=Dt({type:t,selectors:[["mifosx-approve-loan"]],decls:45,vars:37,consts:[["approvedDatePicker",""],["disbursementDatePicker",""],[1,"container","mat-elevation-z8"],[3,"ngSubmit","formGroup"],[1,"layout-column"],[3,"click"],["matInput","","required","","formControlName","approvedOnDate",3,"min","matDatepicker"],["matSuffix","",3,"for"],["matInput","","formControlName","expectedDisbursementDate",3,"min","matDatepicker"],[3,"currency","isRequired","inputFormControl","inputLabel"],["matInput","","readonly","",3,"value"],["matInput","","type","number","required","","formControlName","approvedLoanAmount"],["matInput","","formControlName","note","cdkTextareaAutosize","","cdkAutosizeMinRows","2"],[1,"layout-row","align-center","gap-5px","responsive-column"],["type","button","mat-raised-button","",3,"routerLink"],["mat-raised-button","","color","primary",3,"disabled",4,"mifosxHasPermission"],["mat-raised-button","","color","primary",3,"disabled"]],template:function(i,a){if(i&1){let r=xt();s(0,"div",2)(1,"mat-card")(2,"form",3),it("ngSubmit",function(){return mt(r),dt(a.submit())}),s(3,"mat-card-content")(4,"div",4)(5,"mat-form-field",5),it("click",function(){mt(r);let d=Lt(12);return dt(d.open())}),s(6,"mat-label"),c(7),p(8,"translate"),l(),T(9,"input",6)(10,"mat-datepicker-toggle",7)(11,"mat-datepicker",null,0),M(13,rA,7,9,"mat-error"),l(),s(14,"mat-form-field",5),it("click",function(){mt(r);let d=Lt(21);return dt(d.open())}),s(15,"mat-label"),c(16),p(17,"translate"),l(),T(18,"input",8)(19,"mat-datepicker-toggle",7)(20,"mat-datepicker",null,1),l(),T(22,"mifosx-input-amount",9),s(23,"mat-form-field")(24,"mat-label"),c(25),p(26,"translate"),l(),T(27,"input",10),p(28,"formatNumber"),l(),s(29,"mat-form-field")(30,"mat-label"),c(31),p(32,"translate"),l(),T(33,"input",11),M(34,lA,7,9,"mat-error"),l(),s(35,"mat-form-field")(36,"mat-label"),c(37),p(38,"translate"),l(),T(39,"textarea",12),l()(),s(40,"mat-card-actions",13)(41,"button",14),c(42),p(43,"translate"),l(),k(44,sA,3,4,"button",15),l()()()()()}if(i&2){let r=Lt(12),u=Lt(21);o(2),x("formGroup",a.approveLoanForm),o(5),b(m(8,22,"labels.inputs.Approved On")),o(2),x("min",a.minDate)("matDatepicker",r),o(),x("for",r),o(3),O(a.approveLoanForm.controls.approvedOnDate.hasError("required")?13:-1),o(3),b(m(17,24,"labels.inputs.Expected disbursement on")),o(2),x("min",a.minDate)("matDatepicker",u),o(),x("for",u),o(3),x("currency",a.currency)("isRequired",!0)("inputFormControl",a.approveLoanForm.controls.approvedLoanAmount)("inputLabel","Approved Amount"),o(3),b(m(26,26,"labels.inputs.Available Disbursement Amount (with Over Applied)")),o(2),x("value",m(28,28,a.loanData.availableDisbursementAmountWithOverApplied)),o(4),b(m(32,30,"labels.inputs.Transaction Amount")),o(3),O(a.approveLoanForm.controls.approvedLoanAmount.hasError("required")?34:-1),o(3),b(m(38,32,"labels.inputs.Note")),o(4),x("routerLink",Ut(36,oA)),o(),v(" ",m(43,34,"labels.buttons.Cancel")," "),o(2),x("mifosxHasPermission","APPROVE_LOAN")}},dependencies:[wt,Tt,Re,we,Mi,he,Ee,je,Le,Ne,ae,xe,Oe,ze,_e,ge,Ve,Je,Pe,tn,en,Qe,Wt,Ae,Ri,Wn,Pt,hn],styles:[".container[_ngcontent-%COMP%]{max-width:37rem}"]})}}return t})();var cA=()=>["../../general"];function pA(t,n){if(t&1&&(s(0,"mat-option",5),c(1),l()),t&2){let e=n.$implicit;x("value",e.id),o(),v(" ",e.name+" ("+(e==null?null:e.currency.name)+")"," ")}}function mA(t,n){t&1&&(s(0,"mat-error"),c(1),p(2,"translate"),p(3,"translate"),s(4,"strong"),c(5),p(6,"translate"),l()()),t&2&&(o(),$t(" ",m(2,3,"labels.inputs.Charge")," ",m(3,5,"labels.commons.is")," "),o(4),b(m(6,7,"labels.commons.required")))}function dA(t,n){t&1&&(s(0,"mat-error"),c(1),p(2,"translate"),p(3,"translate"),s(4,"strong"),c(5),p(6,"translate"),l()()),t&2&&(o(),$t(" ",m(2,3,"labels.inputs.Amount")," ",m(3,5,"labels.commons.is")," "),o(4),b(m(6,7,"labels.commons.required")))}function uA(t,n){t&1&&(s(0,"mat-error"),c(1),p(2,"translate"),p(3,"translate"),s(4,"strong"),c(5),p(6,"translate"),l()()),t&2&&(o(),$t(" ",m(2,3,"labels.inputs.Due Date")," ",m(3,5,"labels.commons.is")," "),o(4),b(m(6,7,"labels.commons.required")))}function fA(t,n){if(t&1){let e=xt();s(0,"mat-form-field",12),it("click",function(){mt(e);let a=Lt(7);return dt(a.open())}),s(1,"mat-label"),c(2),p(3,"translate"),l(),T(4,"input",13)(5,"mat-datepicker-toggle",14)(6,"mat-datepicker",null,0),M(8,uA,7,9,"mat-error"),l()}if(t&2){let e=Lt(7),i=P();o(2),b(m(3,6,"labels.inputs.Due On")),o(2),x("min",i.minDate)("max",i.maxDate)("matDatepicker",e),o(),x("for",e),o(3),O(i.loanChargeForm.controls.dueDate.hasError("required")?8:-1)}}function hA(t,n){if(t&1&&(s(0,"button",15),c(1),p(2,"translate"),l()),t&2){let e=P();x("disabled",!e.loanChargeForm.valid),o(),v(" ",m(2,2,"labels.buttons.Submit")," ")}}var Km=(()=>{class t{constructor(){this.formBuilder=A(Te),this.route=A(Et),this.router=A(le),this.dateUtils=A(de),this.loansService=A(Mt),this.settingsService=A(oe),this.minDate=new Date(2e3,0,1),this.maxDate=new Date,this.route.data.subscribe(e=>{this.loanChargeOptions=e.actionButtonData.chargeOptions}),this.loanId=this.route.snapshot.params.loanId}ngOnInit(){this.maxDate=this.settingsService.maxFutureDate,this.createLoanChargeForm(),this.loanChargeForm.controls.chargeId.valueChanges.subscribe(e=>{let i=this.loanChargeOptions.find(a=>a.id===e);i.chargeTimeType.id===2?this.loanChargeForm.addControl("dueDate",new pe("",Gt.required)):this.loanChargeForm.removeControl("dueDate"),this.loanChargeForm.patchValue({amount:i.amount,chargeCalculation:i.chargeCalculationType.value,chargeTime:i.chargeTimeType.value})})}createLoanChargeForm(){this.loanChargeForm=this.formBuilder.group({chargeId:["",Gt.required],amount:["",Gt.required],chargeCalculation:[{value:"",disabled:!0}],chargeTime:[{value:"",disabled:!0}]})}submit(){let e=this.loanChargeForm.value,i=this.settingsService.language.code,a=this.settingsService.dateFormat,r=this.loanChargeForm.value.dueDate;e.dueDate instanceof Date&&(e.dueDate=this.dateUtils.formatDate(r,a));let u=ve(ie({},e),{dateFormat:a,locale:i});this.loansService.createLoanCharge(this.loanId,"charges",u).subscribe(d=>{this.router.navigate(["../../general"],{relativeTo:this.route})})}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=Dt({type:t,selectors:[["mifosx-add-loan-charge"]],decls:35,vars:22,consts:[["dueDatePicker",""],[1,"container","mat-elevation-z8"],[3,"ngSubmit","formGroup"],[1,"layout-column"],["required","","formControlName","chargeId"],[3,"value"],["type","number","required","","matInput","","formControlName","amount"],["matInput","","formControlName","chargeCalculation"],["matInput","","formControlName","chargeTime"],[1,"layout-row","layout-xs-column","layout-align-center","gap-5px"],["type","button","mat-raised-button","",3,"routerLink"],["mat-raised-button","","color","primary",3,"disabled",4,"mifosxHasPermission"],[3,"click"],["matInput","","required","","formControlName","dueDate",3,"min","max","matDatepicker"],["matSuffix","",3,"for"],["mat-raised-button","","color","primary",3,"disabled"]],template:function(i,a){i&1&&(s(0,"div",1)(1,"mat-card")(2,"form",2),it("ngSubmit",function(){return a.submit()}),s(3,"mat-card-content")(4,"div",3)(5,"mat-form-field")(6,"mat-label"),c(7),p(8,"translate"),l(),s(9,"mat-select",4),ue(10,pA,2,2,"mat-option",5,Ce),l(),M(12,mA,7,9,"mat-error"),l(),s(13,"mat-form-field")(14,"mat-label"),c(15),p(16,"translate"),l(),T(17,"input",6),M(18,dA,7,9,"mat-error"),l(),s(19,"mat-form-field")(20,"mat-label"),c(21),p(22,"translate"),l(),T(23,"input",7),l(),s(24,"mat-form-field")(25,"mat-label"),c(26),p(27,"translate"),l(),T(28,"input",8),l(),M(29,fA,9,8,"mat-form-field"),l(),s(30,"mat-card-actions",9)(31,"button",10),c(32),p(33,"translate"),l(),k(34,hA,3,4,"button",11),l()()()()()),i&2&&(o(2),x("formGroup",a.loanChargeForm),o(5),b(m(8,11,"labels.inputs.Charge")),o(3),fe(a.loanChargeOptions),o(2),O(a.loanChargeForm.controls.chargeId.hasError("required")?12:-1),o(3),b(m(16,13,"labels.inputs.Amount")),o(3),O(a.loanChargeForm.controls.amount.hasError("required")?18:-1),o(3),b(m(22,15,"labels.inputs.Charge Calculation")),o(5),b(m(27,17,"labels.inputs.Charge Time")),o(3),O(a.loanChargeForm.controls.dueDate?29:-1),o(2),x("routerLink",Ut(21,cA)),o(),v(" ",m(33,19,"labels.buttons.Cancel")," "),o(2),x("mifosxHasPermission","CREATE_LOANCHARGE"))},dependencies:[wt,Tt,Re,we,Mi,he,Ee,je,Le,Ne,ae,xe,Oe,ze,_e,ge,Ve,Je,Pe,In,On,tn,en,Qe,Wt,Ae,Pt],styles:[".container[_ngcontent-%COMP%]{max-width:37rem}"]})}}return t})();var gA=()=>["../../general"];function _A(t,n){if(t&1&&T(0,"mifosx-repayment-schedule-tab",2),t&2){let e=P();x("repaymentScheduleDetails",e.repaymentScheduleDetails)("forEditing",!0)}}var Jm=(()=>{class t{constructor(){this.loansService=A(Mt),this.router=A(le),this.route=A(Et),this.dialog=A(Gn),this.dateUtils=A(de),this.translateService=A(pa),this.settingsService=A(oe),this.wasChanged=!1,this.wasValidated=!1,this.repaymentScheduleDetails=null,this.repaymentScheduleChanges={},this.loanId=this.route.snapshot.params.loanId,this.getRepaymentSchedule()}ngOnInit(){this.repaymentScheduleChanges={}}getRepaymentSchedule(){this.loansService.getLoanAccountResource(this.loanId,"repaymentSchedule").subscribe({next:e=>{this.repaymentScheduleDetails=e.repaymentSchedule},error:e=>{console.error("Failed to load repayment schedule:",e)}})}applyPattern(){if(!this.repaymentScheduleDetails)return;let e=[];this.repaymentScheduleDetails.periods.forEach(u=>{u.period&&e.push({idx:u.period,dueDate:this.dateUtils.formatDate(u.dueDate,this.settingsService.dateFormat)})});let a={title:"Pattern Update",formfields:[new ic({controlName:"fromPeriod",label:"From Date",value:"",options:{label:"dueDate",value:"idx",data:e},required:!0}),new ic({controlName:"toPeriod",label:"To Date",value:"",options:{label:"dueDate",value:"idx",data:e},required:!0}),new Ti({controlName:"amount",label:"Installment Amount",value:"",type:"number",required:!0})]};this.dialog.open(_i,{data:a}).afterClosed().subscribe(u=>{if(u.data?.value&&this.repaymentScheduleDetails){let d=u.data.value.fromPeriod,g=u.data.value.toPeriod,_=u.data.value.amount,y=[];this.repaymentScheduleDetails.periods.forEach(I=>{let N=this.dateUtils.formatDate(I.dueDate,this.settingsService.dateFormat);I.period&&d<=I.period&&g>=I.period&&I.totalDueForPeriod!==_&&(I.totalDueForPeriod=_,this.repaymentScheduleChanges[N]={dueDate:N,installmentAmount:_},this.wasChanged=!0,I.changed=!0),y.push(I)}),this.repaymentScheduleDetails.periods=y}})}reset(){this.dialog.open(ma,{data:{heading:this.translateService.instant("labels.heading.Recover Original Schedule"),dialogContext:this.translateService.instant("labels.dialogContext.Are you sure you want recover the Original Schedule")}}).afterClosed().subscribe(i=>{i.confirm&&this.loansService.applyCommandLoanScheduleVariations(this.loanId,"deleteVariations",{}).subscribe({next:()=>{this.getRepaymentSchedule(),this.wasChanged=!1,this.wasValidated=!1},error:a=>{console.error("Failed to delete schedule variations:",a)}})})}validate(){this.repaymentScheduleDetails&&this.loansService.applyCommandLoanScheduleVariations(this.loanId,"calculateLoanSchedule",this.getPayload()).subscribe({next:e=>{this.repaymentScheduleDetails&&(this.repaymentScheduleDetails.periods=[],e.periods.forEach(i=>{i.changed=!0,this.repaymentScheduleDetails.periods.push(i),this.wasValidated=!0}))},error:e=>{console.error("Failed to calculate loan schedule:",e)}})}submit(){this.loansService.applyCommandLoanScheduleVariations(this.loanId,"addVariations",this.getPayload()).subscribe({next:()=>{this.router.navigate(["../../repayment-schedule"],{relativeTo:this.route})},error:e=>{console.error("Failed to add schedule variations:",e)}})}getPayload(){let e=[];Object.keys(this.repaymentScheduleChanges).forEach(r=>{e.push(this.repaymentScheduleChanges[r])});let i=this.settingsService.dateFormat,a=this.settingsService.language.code;return{exceptions:{modifiedinstallments:e},dateFormat:i,locale:a}}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=Dt({type:t,selectors:[["mifosx-edit-repayment-schedule"]],decls:21,vars:20,consts:[[1,"container","mat-elevation-z8"],[1,"m-b-10","layout-column"],[1,"flex-100",3,"repaymentScheduleDetails","forEditing"],[1,"layout-row","align-center","gap-5px","responsive-column"],["type","button","mat-raised-button","",3,"routerLink"],["type","button","mat-raised-button","",3,"click"],["type","button","color","primary","mat-raised-button","",3,"click"],["type","button","color","primary","mat-raised-button","",3,"click","disabled"]],template:function(i,a){i&1&&(s(0,"div",0)(1,"mat-card")(2,"mat-card-content")(3,"div",1),M(4,_A,1,2,"mifosx-repayment-schedule-tab",2),l(),s(5,"mat-card-actions",3)(6,"button",4),c(7),p(8,"translate"),l(),s(9,"button",5),it("click",function(){return a.reset()}),c(10),p(11,"translate"),l(),s(12,"button",6),it("click",function(){return a.applyPattern()}),c(13),p(14,"translate"),l(),s(15,"button",7),it("click",function(){return a.validate()}),c(16),p(17,"translate"),l(),s(18,"button",7),it("click",function(){return a.submit()}),c(19),p(20,"translate"),l()()()()()),i&2&&(o(4),O(a.repaymentScheduleDetails?4:-1),o(2),x("routerLink",Ut(19,gA)),o(),v(" ",m(8,9,"labels.buttons.Cancel")," "),o(3),b(m(11,11,"labels.buttons.Reset")),o(3),v(" ",m(14,13,"labels.buttons.Pattern")," "),o(2),x("disabled",!a.wasChanged),o(),v(" ",m(17,15,"labels.buttons.Validate")," "),o(2),x("disabled",!a.wasValidated),o(),v(" ",m(20,17,"labels.buttons.Submit")," "))},dependencies:[wt,Tt,ae,xe,Oe,ze,Wt,ho,Pt],encapsulation:2})}}return t})();var CA=()=>["../../general"];function bA(t,n){t&1&&(s(0,"mat-error"),c(1),p(2,"translate"),p(3,"translate"),s(4,"strong"),c(5),p(6,"translate"),l()()),t&2&&(o(),$t(" ",m(2,3,"labels.inputs.Transaction Date")," ",m(3,5,"labels.commons.is")," "),o(4),b(m(6,7,"labels.commons.required")))}function vA(t,n){if(t&1&&(s(0,"mat-option",8),c(1),l()),t&2){let e=n.$implicit;x("value",e.id),o(),v(" ",e.name," ")}}function xA(t,n){t&1&&(s(0,"mat-error"),c(1),p(2,"translate"),p(3,"translate"),s(4,"strong"),c(5),p(6,"translate"),l()()),t&2&&(o(),$t(" ",m(2,3,"labels.inputs.Reason for Charge-Off")," ",m(3,5,"labels.commons.is")," "),o(4),b(m(6,7,"labels.commons.required")))}function yA(t,n){if(t&1&&(s(0,"button",14),c(1),p(2,"translate"),l()),t&2){let e=P();x("disabled",!e.chargeoffLoanForm.valid),o(),v(" ",m(2,2,"labels.buttons.Submit")," ")}}var Xm=(()=>{class t{constructor(){this.formBuilder=A(Te),this.loanService=A(Mt),this.route=A(Et),this.router=A(le),this.dateUtils=A(de),this.settingsService=A(oe),this.showPaymentDetails=!1,this.minDate=new Date(2e3,0,1),this.maxDate=new Date,this.chargeOffReasonOptions=[],this.loanId=this.route.snapshot.params.loanId}ngOnInit(){this.maxDate=this.settingsService.businessDate,this.chargeOffReasonOptions=this.dataObject.chargeOffReasonOptions,this.createChargeoffLoanForm()}createChargeoffLoanForm(){this.chargeoffLoanForm=this.formBuilder.group({transactionDate:[this.settingsService.businessDate,Gt.required],externalId:"",chargeOffReasonId:"",note:""})}submit(){let e=this.chargeoffLoanForm.value,i=this.settingsService.language.code,a=this.settingsService.dateFormat,r=this.chargeoffLoanForm.value.transactionDate;e.transactionDate instanceof Date&&(e.transactionDate=this.dateUtils.formatDate(r,a));let u=ve(ie({},e),{dateFormat:a,locale:i});this.loanService.submitLoanActionButton(this.loanId,u,"charge-off").subscribe(g=>{this.router.navigate(["../../transactions"],{relativeTo:this.route})})}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=Dt({type:t,selectors:[["mifosx-charge-off"]],inputs:{dataObject:"dataObject"},decls:37,vars:25,consts:[["transactionDatePicker",""],[1,"container","mat-elevation-z8"],[3,"ngSubmit","formGroup"],[1,"layout-column"],[3,"click"],["matInput","","required","","formControlName","transactionDate",3,"min","max","matDatepicker"],["matSuffix","",3,"for"],["formControlName","chargeOffReasonId"],[3,"value"],["matInput","","formControlName","externalId"],["matInput","","formControlName","note","cdkTextareaAutosize","","cdkAutosizeMinRows","2"],[1,"layout-row","align-center","gap-5px","responsive-column"],["type","button","mat-raised-button","",3,"routerLink"],["mat-raised-button","","color","primary",3,"disabled",4,"mifosxHasPermission"],["mat-raised-button","","color","primary",3,"disabled"]],template:function(i,a){if(i&1){let r=xt();s(0,"div",1)(1,"mat-card")(2,"form",2),it("ngSubmit",function(){return mt(r),dt(a.submit())}),s(3,"mat-card-content")(4,"div",3)(5,"mat-form-field",4),it("click",function(){mt(r);let d=Lt(12);return dt(d.open())}),s(6,"mat-label"),c(7),p(8,"translate"),l(),T(9,"input",5)(10,"mat-datepicker-toggle",6)(11,"mat-datepicker",null,0),M(13,bA,7,9,"mat-error"),l(),s(14,"mat-form-field")(15,"mat-label"),c(16),p(17,"translate"),l(),s(18,"mat-select",7),ue(19,vA,2,2,"mat-option",8,Ce),l(),M(21,xA,7,9,"mat-error"),l(),s(22,"mat-form-field")(23,"mat-label"),c(24),p(25,"translate"),l(),T(26,"input",9),l(),s(27,"mat-form-field")(28,"mat-label"),c(29),p(30,"translate"),l(),T(31,"textarea",10),l()(),s(32,"mat-card-actions",11)(33,"button",12),c(34),p(35,"translate"),l(),k(36,yA,3,4,"button",13),l()()()()()}if(i&2){let r=Lt(12);o(2),x("formGroup",a.chargeoffLoanForm),o(5),b(m(8,14,"labels.inputs.Transaction Date")),o(2),x("min",a.minDate)("max",a.maxDate)("matDatepicker",r),o(),x("for",r),o(3),O(a.chargeoffLoanForm.controls.transactionDate.hasError("required")?13:-1),o(3),b(m(17,16,"labels.inputs.Reason for Charge-Off")),o(3),fe(a.chargeOffReasonOptions),o(2),O(a.chargeoffLoanForm.controls.chargeOffReasonId.hasError("required")?21:-1),o(3),b(m(25,18,"labels.inputs.External Id")),o(5),b(m(30,20,"labels.inputs.Note")),o(4),x("routerLink",Ut(24,CA)),o(),v(" ",m(35,22,"labels.buttons.Cancel")," "),o(2),x("mifosxHasPermission","CHARGEOFF_LOAN")}},dependencies:[wt,Tt,Re,we,he,Ee,je,Le,Ne,ae,xe,Oe,ze,_e,ge,Ve,Je,Pe,In,On,tn,en,Qe,Wt,Ae,Wn,Pt],styles:[".container[_ngcontent-%COMP%]{max-width:37rem}"]})}}return t})();var SA=()=>["../../general"];function DA(t,n){t&1&&(s(0,"mat-error"),c(1),p(2,"translate"),p(3,"translate"),s(4,"strong"),c(5),p(6,"translate"),l()()),t&2&&(o(),$t(" ",m(2,3,"labels.inputs.Settlement Date")," ",m(3,5,"labels.commons.is")," "),o(4),b(m(6,7,"labels.commons.required")))}function wA(t,n){t&1&&(s(0,"mat-error"),c(1),p(2,"translate"),p(3,"translate"),s(4,"strong"),c(5),p(6,"translate"),l()()),t&2&&(o(),$t(" ",m(2,3,"labels.inputs.Purchase Price Ratio")," ",m(3,5,"labels.commons.is")," "),o(4),b(m(6,7,"labels.commons.required")))}function TA(t,n){if(t&1&&(s(0,"mat-form-field")(1,"mat-label"),c(2),p(3,"translate"),l(),T(4,"input",11),M(5,wA,7,9,"mat-error"),l()),t&2){let e=P();o(2),b(m(3,2,"labels.inputs.Purchase Price Ratio")),o(3),O(e.saleLoanForm.controls.purchasePriceRatio.hasError("required")?5:-1)}}function PA(t,n){t&1&&(s(0,"mat-error"),c(1),p(2,"translate"),p(3,"translate"),s(4,"strong"),c(5),p(6,"translate"),l()()),t&2&&(o(),$t(" ",m(2,3,"labels.inputs.Owner External Id")," ",m(3,5,"labels.commons.is")," "),o(4),b(m(6,7,"labels.commons.required")))}function AA(t,n){if(t&1&&(s(0,"mat-form-field")(1,"mat-label"),c(2),p(3,"translate"),l(),T(4,"input",12),M(5,PA,7,9,"mat-error"),l()),t&2){let e=P();o(2),b(m(3,2,"labels.inputs.Owner External Id")),o(3),O(e.saleLoanForm.controls.ownerExternalId.hasError("required")?5:-1)}}function MA(t,n){if(t&1&&(s(0,"button",13),c(1),p(2,"translate"),l()),t&2){let e=P();x("disabled",!e.saleLoanForm.valid),o(),v(" ",m(2,2,"labels.buttons.Submit")," ")}}var Qm=(()=>{class t{constructor(){this.formBuilder=A(Te),this.externalAssetOwnerService=A(Wr),this.route=A(Et),this.router=A(le),this.dateUtils=A(de),this.settingsService=A(oe),this.BUYBACK_COMMAND="buyback",this.SALE_COMMAND="sale",this.minDate=new Date(2e3,0,1),this.maxDate=new Date,this.loanId=this.route.snapshot.params.loanId;let e=this.route.snapshot.params.action;this.command=e==="Sell Loan"?this.SALE_COMMAND:this.BUYBACK_COMMAND}ngOnInit(){this.minDate=this.settingsService.businessDate,this.maxDate=this.settingsService.maxAllowedDate,this.createSaleLoanForm()}isBuyBack(){return this.command===this.BUYBACK_COMMAND}createSaleLoanForm(){this.saleLoanForm=this.formBuilder.group({settlementDate:[this.settingsService.businessDate,Gt.required],purchasePriceRatio:["",Gt.required],transferExternalId:"",ownerExternalId:["",Gt.required]}),this.isBuyBack()&&(this.saleLoanForm.removeControl("purchasePriceRatio"),this.saleLoanForm.removeControl("ownerExternalId"))}submit(){let e=this.saleLoanForm.value,i=this.settingsService.language.code,a=this.settingsService.dateFormat,r=this.saleLoanForm.value.settlementDate;e.settlementDate instanceof Date&&(e.settlementDate=this.dateUtils.formatDate(r,a));let u=ve(ie({},e),{dateFormat:a,locale:i});this.externalAssetOwnerService.executeExternalAssetOwnerLoanCommand(this.loanId,u,this.command).subscribe(d=>{this.router.navigate(["../../external-asset-owner"],{relativeTo:this.route})})}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=Dt({type:t,selectors:[["mifosx-asset-transfer-loan"]],decls:26,vars:20,consts:[["settlementDatePicker",""],[1,"container","mat-elevation-z8"],[3,"ngSubmit","formGroup"],[1,"layout-column"],[3,"click"],["matInput","","required","","formControlName","settlementDate",3,"min","max","matDatepicker"],["matSuffix","",3,"for"],["matInput","","formControlName","transferExternalId"],[1,"layout-row","align-center","gap-5px","responsive-column"],["type","button","mat-raised-button","",3,"routerLink"],["mat-raised-button","","color","primary",3,"disabled",4,"mifosxHasPermission"],["type","number","matInput","","required","","formControlName","purchasePriceRatio"],["matInput","","formControlName","ownerExternalId"],["mat-raised-button","","color","primary",3,"disabled"]],template:function(i,a){if(i&1){let r=xt();s(0,"div",1)(1,"mat-card")(2,"form",2),it("ngSubmit",function(){return mt(r),dt(a.submit())}),s(3,"mat-card-content")(4,"div",3)(5,"mat-form-field",4),it("click",function(){mt(r);let d=Lt(12);return dt(d.open())}),s(6,"mat-label"),c(7),p(8,"translate"),l(),T(9,"input",5)(10,"mat-datepicker-toggle",6)(11,"mat-datepicker",null,0),M(13,DA,7,9,"mat-error"),l(),M(14,TA,6,4,"mat-form-field"),M(15,AA,6,4,"mat-form-field"),s(16,"mat-form-field")(17,"mat-label"),c(18),p(19,"translate"),l(),T(20,"input",7),l()(),s(21,"mat-card-actions",8)(22,"button",9),c(23),p(24,"translate"),l(),k(25,MA,3,4,"button",10),l()()()()()}if(i&2){let r=Lt(12);o(2),x("formGroup",a.saleLoanForm),o(5),b(m(8,13,"labels.inputs.Settlement Date")),o(2),x("min",a.minDate)("max",a.maxDate)("matDatepicker",r),o(),x("for",r),o(3),O(a.saleLoanForm.controls.settlementDate.hasError("required")?13:-1),o(),O(a.isBuyBack()?-1:14),o(),O(a.isBuyBack()?-1:15),o(3),b(m(19,15,"labels.inputs.Transfer External Id")),o(4),x("routerLink",Ut(19,SA)),o(),v(" ",m(24,17,"labels.buttons.Cancel")," "),o(2),x("mifosxHasPermission","SALE_LOAN")}},dependencies:[wt,Tt,Re,we,Mi,he,Ee,je,Le,Ne,ae,xe,Oe,ze,_e,ge,Ve,Je,Pe,tn,en,Qe,Wt,Ae,Pt],styles:[".container[_ngcontent-%COMP%]{max-width:37rem}"]})}}return t})();var gg=(()=>{class t{constructor(){this.dialogRef=A(Vo),this.data=A(Uo);let e=this.data;this.repaymentSchedule=e.repaymentSchedule,this.currencyCode=e.currencyCode}close(){this.dialogRef.close()}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=Dt({type:t,selectors:[["mifosx-re-age-preview-dialog"]],decls:9,vars:9,consts:[[1,"m-l-30"],[1,"mat-typography"],[3,"repaymentScheduleDetails","currencyCode","forEditing"],["align","center"],["mat-raised-button","","color","primary","type","button",3,"click"]],template:function(i,a){i&1&&(s(0,"h1",0),c(1),p(2,"translate"),l(),s(3,"mat-dialog-content",1),T(4,"mifosx-repayment-schedule-tab",2),l(),s(5,"mat-dialog-actions",3)(6,"button",4),it("click",function(){return a.close()}),c(7),p(8,"translate"),l()()),i&2&&(o(),b(m(2,5,"labels.heading.Repayment Schedule Preview")),o(3),x("repaymentScheduleDetails",a.repaymentSchedule)("currencyCode",a.currencyCode)("forEditing",!1),o(3),v(" ",m(8,7,"labels.buttons.Back")," "))},dependencies:[wt,Tt,Wt,Ho,Go,ho,Pt],encapsulation:2})}}return t})();var OA=()=>["../../general"];function IA(t,n){if(t&1&&(s(0,"mat-option",8),c(1),l()),t&2){let e=n.$implicit;x("value",e),o(),v(" ",e," ")}}function EA(t,n){t&1&&(s(0,"mat-error"),c(1),p(2,"translate"),p(3,"translate"),s(4,"strong"),c(5),p(6,"translate"),l()()),t&2&&(o(),$t(" ",m(2,3,"labels.inputs.Start Date")," ",m(3,5,"labels.commons.is")," "),o(4),b(m(6,7,"labels.commons.required")))}function LA(t,n){if(t&1&&(s(0,"mat-option",8),c(1),p(2,"translateKey"),l()),t&2){let e=n.$implicit;x("value",e.id),o(),v(" ",Ge(2,2,e.value,"catalogs")," ")}}function NA(t,n){if(t&1&&(s(0,"mat-option",8),c(1),l()),t&2){let e=n.$implicit;x("value",e.id),o(),v(" ",e.name," ")}}function kA(t,n){if(t&1&&T(0,"mifosx-input-amount",19),t&2){let e=P(2);x("currency",e.loanTransactionData.currency)("isRequired",!1)("inputFormControl",e.reagingLoanForm.controls.transactionAmount)("inputLabel","Transaction Amount")("minVal",0)}}function FA(t,n){if(t&1&&(s(0,"button",24),c(1),p(2,"translate"),l()),t&2){let e=P(2);x("disabled",!e.reagingLoanForm.valid),o(),v(" ",m(2,2,"labels.buttons.Submit")," ")}}function RA(t,n){if(t&1){let e=xt();s(0,"button",25),it("click",function(){mt(e);let a=P(2);return dt(a.preview())}),c(1),p(2,"translate"),l()}if(t&2){let e=P(2);x("disabled",!e.reagingLoanForm.valid),o(),v(" ",m(2,2,"labels.buttons.Preview")," ")}}function BA(t,n){if(t&1){let e=xt();s(0,"form",3),it("ngSubmit",function(){mt(e);let a=P();return dt(a.submit())}),s(1,"mat-card-content")(2,"div",4)(3,"mat-form-field")(4,"mat-label"),c(5),p(6,"translate"),l(),T(7,"input",5),l(),s(8,"mat-form-field")(9,"mat-label"),c(10),p(11,"translate"),l(),T(12,"input",6),l(),s(13,"mat-form-field")(14,"mat-label"),c(15),p(16,"translate"),l(),s(17,"mat-select",7),ue(18,IA,2,2,"mat-option",8,Ce),l()(),s(20,"mat-form-field",9),it("click",function(){mt(e);let a=Lt(27);return dt(a.open())}),s(21,"mat-label"),c(22),p(23,"translate"),l(),T(24,"input",10)(25,"mat-datepicker-toggle",11)(26,"mat-datepicker",null,0),M(28,EA,7,9,"mat-error"),l(),s(29,"mat-form-field")(30,"mat-label"),c(31),p(32,"translate"),l(),s(33,"mat-select",12),ue(34,LA,3,5,"mat-option",8,Ce),l()(),s(36,"mat-form-field")(37,"mat-label"),c(38),p(39,"translate"),l(),s(40,"mat-select",13),ue(41,NA,2,2,"mat-option",8,Ce),l()(),s(43,"mat-form-field")(44,"mat-label"),c(45),p(46,"translate"),l(),T(47,"input",14),l(),s(48,"mat-form-field")(49,"mat-label"),c(50),p(51,"translate"),l(),T(52,"input",15),l(),s(53,"div",16)(54,"span",17),it("click",function(){mt(e);let a=P();return dt(a.displayTransactionAmount())}),s(55,"mat-slide-toggle")(56,"div")(57,"span",18),c(58),p(59,"translate"),l()()()()(),M(60,kA,1,5,"mifosx-input-amount",19),l(),s(61,"mat-card-actions",20)(62,"button",21),c(63),p(64,"translate"),l(),k(65,FA,3,4,"button",22)(66,RA,3,4,"button",23),l()()()}if(t&2){let e=Lt(27),i=P();x("formGroup",i.reagingLoanForm),o(5),b(m(6,20,"labels.inputs.Number of Installments")),o(5),b(m(11,22,"labels.inputs.Frequency Number")),o(5),b(m(16,24,"labels.inputs.Frequency Type")),o(3),fe(i.periodFrequencyOptions),o(4),b(m(23,26,"labels.inputs.Start Date")),o(2),x("min",i.minDate)("max",i.maxDate)("matDatepicker",e),o(),x("for",e),o(3),O(i.reagingLoanForm.controls.startDate.hasError("required")?28:-1),o(3),b(m(32,28,"labels.inputs.Interest Handling")),o(3),fe(i.reAgeInterestHandlingOptions),o(4),b(m(39,30,"labels.inputs.Reason")),o(3),fe(i.reAgeReasonOptions),o(4),b(m(46,32,"labels.inputs.External Id")),o(5),b(m(51,34,"labels.inputs.Note")),o(8),b(m(59,36,"labels.inputs.Transaction Amount")),o(2),O(i.addTransactionAmount?60:-1),o(2),x("routerLink",Ut(40,OA)),o(),v(" ",m(64,38,"labels.buttons.Cancel")," "),o(2),x("mifosxHasPermission","REAGING_LOAN"),o(),x("mifosxHasPermission","REAGING_LOAN")}}var t0=(()=>{class t{constructor(){this.formBuilder=A(Te),this.route=A(Et),this.router=A(le),this.settingsService=A(oe),this.loanService=A(Mt),this.dateUtils=A(de),this.dialog=A(Gn),this.reAgeReasonOptions=[],this.periodFrequencyOptions=[],this.reAgeInterestHandlingOptions=[],this.minDate=new Date(2e3,0,1),this.maxDate=new Date,this.loanTransactionData=null,this.addTransactionAmount=!1,this.loanId=this.route.snapshot.params.loanId}ngOnInit(){this.loanTransactionData=this.dataObject,this.maxDate=this.settingsService.maxFutureDate,this.reAgeReasonOptions=this.dataObject.reAgeReasonOptions,this.reAgeInterestHandlingOptions=this.dataObject.reAgeInterestHandlingOptions,this.periodFrequencyOptions=this.dataObject.periodFrequencyOptions,this.createReagingLoanForm()}createReagingLoanForm(){this.reagingLoanForm=this.formBuilder.group({numberOfInstallments:[1,Gt.required],startDate:[this.settingsService.businessDate,Gt.required],frequencyNumber:[1,Gt.required],frequencyType:[,Gt.required],reAgeInterestHandling:[this.reAgeInterestHandlingOptions[0]],transactionAmount:[,[Gt.min(0)]],note:"",externalId:"",reasonCodeValueId:null})}prepareReagingData(){let e=ie({},this.reagingLoanForm.value),i=this.settingsService.language.code,a=this.settingsService.dateFormat,r=this.reagingLoanForm.value.startDate;return e.startDate instanceof Date&&(e.startDate=this.dateUtils.formatDate(r,a)),e.reAgeInterestHandling&&typeof e.reAgeInterestHandling=="object"&&(e.reAgeInterestHandling=e.reAgeInterestHandling.id),ve(ie({},e),{dateFormat:a,locale:i})}preview(){if(this.reagingLoanForm.invalid)return;let e=this.prepareReagingData();this.loanService.getReAgePreview(this.loanId,e).subscribe({next:i=>{let a=i.currency?.code||this.loanTransactionData.currency.code;if(!a){console.error("Currency code is not available in API response or loan details");return}this.dialog.open(gg,{data:{repaymentSchedule:i,currencyCode:a},width:"95%",maxWidth:"1400px",height:"90vh"})},error:i=>{console.error("Error loading re-age preview:",i)}})}displayTransactionAmount(){this.addTransactionAmount=!this.addTransactionAmount,this.reagingLoanForm.patchValue({transactionAmount:null})}submit(){let e=this.prepareReagingData();e.transactionAmount===null&&delete e.transactionAmount,this.loanService.submitLoanActionButton(this.loanId,e,"reAge").subscribe({next:i=>{this.router.navigate(["../../transactions"],{relativeTo:this.route})},error:i=>{console.error("Error submitting re-age:",i)}})}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=Dt({type:t,selectors:[["mifosx-loan-reaging"]],inputs:{dataObject:"dataObject"},decls:3,vars:1,consts:[["startDatePicker",""],[1,"container","mat-elevation-z8"],[3,"formGroup"],[3,"ngSubmit","formGroup"],[1,"layout-column"],["type","number","matInput","","required","","formControlName","numberOfInstallments"],["type","number","matInput","","required","","formControlName","frequencyNumber"],["formControlName","frequencyType"],[3,"value"],[3,"click"],["matInput","","required","","formControlName","startDate",3,"min","max","matDatepicker"],["matSuffix","",3,"for"],["formControlName","reAgeInterestHandling"],["formControlName","reasonCodeValueId"],["matInput","","formControlName","externalId"],["matInput","","formControlName","note"],[1,"flex-fill"],[1,"expandcollapsebutton","m-l-10","m-t-5","m-b-5","flex-75",3,"click"],[1,"m-l-10"],[3,"currency","isRequired","inputFormControl","inputLabel","minVal"],[1,"layout-row","align-center","gap-5px","responsive-column"],["type","button","mat-raised-button","",3,"routerLink"],["mat-raised-button","","color","primary",3,"disabled",4,"mifosxHasPermission"],["type","button","mat-raised-button","","color","accent",3,"disabled","click",4,"mifosxHasPermission"],["mat-raised-button","","color","primary",3,"disabled"],["type","button","mat-raised-button","","color","accent",3,"click","disabled"]],template:function(i,a){i&1&&(s(0,"div",1)(1,"mat-card"),M(2,BA,67,41,"form",2),l()()),i&2&&(o(2),O(a.loanTransactionData!==null?2:-1))},dependencies:[wt,Tt,Re,we,Mi,he,Ee,je,Le,Ne,ae,xe,Oe,ze,_e,ge,Ve,Je,Pe,In,On,tn,en,Qe,Wt,Ae,Ri,ja,Pt,qa],styles:[".container[_ngcontent-%COMP%]{max-width:37rem}"]})}}return t})();var _g=(()=>{class t{constructor(){this.dialogRef=A(Vo),this.data=A(Uo),this.repaymentSchedule=this.data.repaymentSchedule,this.currencyCode=this.data.currencyCode}close(){this.dialogRef.close()}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=Dt({type:t,selectors:[["mifosx-re-amortize-preview-dialog"]],decls:9,vars:9,consts:[["mat-dialog-title",""],[1,"mat-typography"],[3,"repaymentScheduleDetails","currencyCode","forEditing"],["align","end"],["mat-raised-button","","type","button",3,"click"]],template:function(i,a){i&1&&(s(0,"h1",0),c(1),p(2,"translate"),l(),s(3,"mat-dialog-content",1),T(4,"mifosx-repayment-schedule-tab",2),l(),s(5,"mat-dialog-actions",3)(6,"button",4),it("click",function(){return a.close()}),c(7),p(8,"translate"),l()()),i&2&&(o(),b(m(2,5,"labels.heading.Repayment Schedule Preview")),o(3),x("repaymentScheduleDetails",a.repaymentSchedule)("currencyCode",a.currencyCode)("forEditing",!1),o(3),v(" ",m(8,7,"labels.buttons.Go back")," "))},dependencies:[wt,Tt,Wt,Ur,Ho,Go,ho,Pt],encapsulation:2})}}return t})();var qA=()=>["../../general"];function jA(t,n){if(t&1&&(s(0,"mat-option",4),c(1),p(2,"translateKey"),l()),t&2){let e=n.$implicit;x("value",e.id),o(),v(" ",Ge(2,2,e.value,"catalogs")," ")}}function zA(t,n){if(t&1&&(s(0,"mat-option",4),c(1),l()),t&2){let e=n.$implicit;x("value",e.id),o(),v(" ",e.name," ")}}function VA(t,n){if(t&1&&(s(0,"button",12),c(1),p(2,"translate"),l()),t&2){let e=P();x("disabled",!e.reamortizeLoanForm.valid),o(),v(" ",m(2,2,"labels.buttons.Submit")," ")}}function UA(t,n){if(t&1){let e=xt();s(0,"button",13),it("click",function(){mt(e);let a=P();return dt(a.preview())}),c(1),p(2,"translate"),l()}if(t&2){let e=P();x("disabled",!e.reamortizeLoanForm.valid),o(),v(" ",m(2,2,"labels.buttons.Preview")," ")}}var e0=(()=>{class t{constructor(){this.formBuilder=A(Te),this.route=A(Et),this.router=A(le),this.loanService=A(Mt),this.settingsService=A(oe),this.dialog=A(Gn),this.reAmortizationReasonOptions=[],this.reAmortizationInterestHandlingOptions=[],this.loanId=this.route.snapshot.params.loanId}ngOnInit(){this.reAmortizationReasonOptions=this.dataObject?.reAmortizationReasonOptions||[],this.reAmortizationInterestHandlingOptions=this.dataObject?.reAmortizationInterestHandlingOptions||[],this.createReAmortizeLoanForm()}createReAmortizeLoanForm(){this.reamortizeLoanForm=this.formBuilder.group({reAmortizationInterestHandling:[this.reAmortizationInterestHandlingOptions[0]||null],reasonCodeValueId:null,note:"",externalId:""})}prepareReAmortizeData(){let e=this.reamortizeLoanForm.value,i=this.settingsService.language.code,a=this.settingsService.dateFormat;return ve(ie({},e),{dateFormat:a,locale:i})}prepareReAmortizePreviewData(){let e=ie({},this.reamortizeLoanForm.value),i=this.settingsService.language.code,a=this.settingsService.dateFormat,r=e.reAmortizationInterestHandling;return r&&typeof r=="object"&&(r=r.id),!r&&r!==0&&(r="default"),delete e.reAmortizationInterestHandling,ve(ie({},e),{reAmortizationInterestHandling:r,dateFormat:a,locale:i})}preview(){if(this.reamortizeLoanForm.invalid)return;let e=this.prepareReAmortizePreviewData();this.loanService.getReAmortizePreview(this.loanId,e).subscribe({next:i=>{let a=i.currency?.code;if(!a){console.error("Currency code is not available in API response");return}this.dialog.open(_g,{data:{repaymentSchedule:i,currencyCode:a},width:"95%",maxWidth:"1400px",height:"90vh"})},error:i=>{console.error("Error loading re-amortize preview:",i)}})}submit(){let e=this.prepareReAmortizeData();this.loanService.submitLoanActionButton(this.loanId,e,"reAmortize").subscribe(i=>{this.router.navigate(["../../transactions"],{relativeTo:this.route})})}trackByInterestHandlingOption(e,i){return i.id??e}trackByReasonOption(e,i){return i.id??e}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=Dt({type:t,selectors:[["mifosx-loan-reamortize"]],inputs:{dataObject:"dataObject"},decls:38,vars:20,consts:[[1,"container","mat-elevation-z8"],[3,"ngSubmit","formGroup"],[1,"layout-column"],["formControlName","reAmortizationInterestHandling"],[3,"value"],["formControlName","reasonCodeValueId"],["matInput","","formControlName","externalId"],["matInput","","formControlName","note"],[1,"layout-row","align-center","gap-5px","responsive-column"],["type","button","mat-raised-button","",3,"routerLink"],["mat-raised-button","","color","primary",3,"disabled",4,"mifosxHasPermission"],["type","button","mat-raised-button","","color","accent",3,"disabled","click",4,"mifosxHasPermission"],["mat-raised-button","","color","primary",3,"disabled"],["type","button","mat-raised-button","","color","accent",3,"click","disabled"]],template:function(i,a){i&1&&(s(0,"div",0)(1,"mat-card")(2,"form",1),it("ngSubmit",function(){return a.submit()}),s(3,"mat-card-content")(4,"div",2)(5,"mat-form-field")(6,"mat-label"),c(7),p(8,"translate"),l(),s(9,"mat-select",3),ue(10,jA,3,5,"mat-option",4,a.trackByInterestHandlingOption,!0),l()()(),s(12,"div",2)(13,"mat-form-field")(14,"mat-label"),c(15),p(16,"translate"),l(),s(17,"mat-select",5),ue(18,zA,2,2,"mat-option",4,a.trackByReasonOption,!0),l()()(),s(20,"div",2)(21,"mat-form-field")(22,"mat-label"),c(23),p(24,"translate"),l(),T(25,"input",6),l()(),s(26,"div",2)(27,"mat-form-field")(28,"mat-label"),c(29),p(30,"translate"),l(),T(31,"input",7),l()(),s(32,"mat-card-actions",8)(33,"button",9),c(34),p(35,"translate"),l(),k(36,VA,3,4,"button",10)(37,UA,3,4,"button",11),l()()()()()),i&2&&(o(2),x("formGroup",a.reamortizeLoanForm),o(5),b(m(8,9,"labels.inputs.Interest Handling")),o(3),fe(a.reAmortizationInterestHandlingOptions),o(5),b(m(16,11,"labels.inputs.Reason")),o(3),fe(a.reAmortizationReasonOptions),o(5),b(m(24,13,"labels.inputs.External Id")),o(6),b(m(30,15,"labels.inputs.Note")),o(4),x("routerLink",Ut(19,qA)),o(),v(" ",m(35,17,"labels.buttons.Cancel")," "),o(2),x("mifosxHasPermission","REAMORTIZE_LOAN"),o(),x("mifosxHasPermission","REAMORTIZE_LOAN"))},dependencies:[wt,Tt,Re,we,he,Ee,Le,Ne,ae,xe,Oe,ze,_e,ge,Pe,In,On,Wt,Ae,Pt,qa],styles:[".container[_ngcontent-%COMP%]{max-width:37rem}"]})}}return t})();var HA=()=>["../../general"];function GA(t,n){if(t&1&&(s(0,"div",3)(1,"span",13),c(2),p(3,"translateKey"),p(4,"dateFormat"),l()()),t&2){let e=P();o(2),$t("",Ge(3,2,"Maturity Date","inputs")," : ",m(4,5,e.maturityDate))}}function WA(t,n){t&1&&(s(0,"mat-error"),c(1),p(2,"translate"),s(3,"strong"),c(4),p(5,"translate"),l()()),t&2&&(o(),v(" ",m(2,2,"labels.inputs.Start Date")),o(3),b(m(5,4,"labels.commons.required")))}function $A(t,n){t&1&&(s(0,"mat-error"),c(1),p(2,"translate"),s(3,"strong"),c(4),p(5,"translate"),l()()),t&2&&(o(),v(" ",m(2,2,"labels.inputs.End Date")),o(3),b(m(5,4,"labels.commons.required")))}function YA(t,n){if(t&1&&(s(0,"button",14),c(1),p(2,"translate"),l()),t&2){let e=P();x("disabled",!e.interestPauseLoanForm.valid),o(),v(" ",m(2,2,"labels.buttons.Submit")," ")}}var n0=(()=>{class t{constructor(){this.formBuilder=A(Te),this.loanService=A(Mt),this.route=A(Et),this.router=A(le),this.dateUtils=A(de),this.settingsService=A(oe),this.showPaymentDetails=!1,this.minDate=new Date(2e3,0,1),this.maxDate=new Date,this.startDate=new Date,this.maturityDate=null,this.loanId=this.route.snapshot.params.loanId}ngOnInit(){this.maturityDate=new Date(this.dataObject.timeline.expectedMaturityDate),this.maxDate=new Date(this.dataObject.timeline.expectedMaturityDate),this.startDate=new Date(this.settingsService.businessDate),this.startDate>this.maxDate&&(this.startDate=this.maxDate),this.createInterestPauseLoanForm()}createInterestPauseLoanForm(){this.interestPauseLoanForm=this.formBuilder.group({startDate:[this.startDate,Gt.required],endDate:[this.startDate,Gt.required]})}submit(){let e=this.interestPauseLoanForm.value,i=this.settingsService.language.code,a=this.settingsService.dateFormat,r=this.interestPauseLoanForm.value.startDate;e.startDate instanceof Date&&(e.startDate=this.dateUtils.formatDate(r,a));let u=this.interestPauseLoanForm.value.endDate;e.endDate instanceof Date&&(e.endDate=this.dateUtils.formatDate(u,a));let d=ve(ie({},e),{dateFormat:a,locale:i});this.loanService.addInterestPauseToLoan(this.loanId,d).subscribe(g=>{this.router.navigate(["../../term-variations"],{relativeTo:this.route})})}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=Dt({type:t,selectors:[["mifosx-add-interest-pause"]],inputs:{dataObject:"dataObject"},decls:29,vars:24,consts:[["startDatePicker",""],["endDatePicker",""],[1,"container","mat-elevation-z8"],[1,"m-b-20","layout-column"],[3,"ngSubmit","formGroup"],[1,"layout-column"],[3,"click"],["matInput","","required","","formControlName","startDate",3,"min","max","matDatepicker"],["matSuffix","",3,"for"],["matInput","","required","","formControlName","endDate",3,"min","max","matDatepicker"],[1,"layout-row","align-center","gap-5px","responsive-column"],["type","button","mat-raised-button","",3,"routerLink"],["mat-raised-button","","color","primary",3,"disabled",4,"mifosxHasPermission"],[1,"m-r-10"],["mat-raised-button","","color","primary",3,"disabled"]],template:function(i,a){if(i&1){let r=xt();s(0,"div",2)(1,"mat-card"),M(2,GA,5,7,"div",3),s(3,"form",4),it("ngSubmit",function(){return mt(r),dt(a.submit())}),s(4,"mat-card-content")(5,"div",5)(6,"mat-form-field",6),it("click",function(){mt(r);let d=Lt(13);return dt(d.open())}),s(7,"mat-label"),c(8),p(9,"translate"),l(),T(10,"input",7)(11,"mat-datepicker-toggle",8)(12,"mat-datepicker",null,0),M(14,WA,6,6,"mat-error"),l(),s(15,"mat-form-field",6),it("click",function(){mt(r);let d=Lt(22);return dt(d.open())}),s(16,"mat-label"),c(17),p(18,"translate"),l(),T(19,"input",9)(20,"mat-datepicker-toggle",8)(21,"mat-datepicker",null,1),M(23,$A,6,6,"mat-error"),l()(),s(24,"mat-card-actions",10)(25,"button",11),c(26),p(27,"translate"),l(),k(28,YA,3,4,"button",12),l()()()()()}if(i&2){let r=Lt(13),u=Lt(22);o(2),O(a.maturityDate?2:-1),o(),x("formGroup",a.interestPauseLoanForm),o(5),b(m(9,17,"labels.inputs.Start Date")),o(2),x("min",a.minDate)("max",a.maxDate)("matDatepicker",r),o(),x("for",r),o(3),O(a.interestPauseLoanForm.controls.startDate.hasError("required")?14:-1),o(3),b(m(18,19,"labels.inputs.End Date")),o(2),x("min",a.interestPauseLoanForm.value.startDate)("max",a.maxDate)("matDatepicker",u),o(),x("for",u),o(3),O(a.interestPauseLoanForm.controls.endDate.hasError("required")?23:-1),o(2),x("routerLink",Ut(23,HA)),o(),v(" ",m(27,21,"labels.buttons.Cancel")," "),o(2),x("mifosxHasPermission","DISBURSE_LOAN")}},dependencies:[wt,Tt,Re,we,he,Ee,je,Le,Ne,ae,xe,Oe,ze,_e,ge,Ve,Je,Pe,tn,en,Qe,Wt,Ae,En,Pt,qa],styles:[".expandcollapsebutton[_ngcontent-%COMP%]{margin-top:-7px}.container[_ngcontent-%COMP%]{max-width:37rem}"]})}}return t})();var ZA=()=>["../../general"];function KA(t,n){if(t&1&&(s(0,"button",8),c(1),p(2,"translate"),l()),t&2){let e=P();x("disabled",!e.undoWriteOffLoanForm.valid),o(),v(" ",m(2,2,"labels.buttons.Submit")," ")}}var Cg=(()=>{class t{constructor(){this.formBuilder=A(Te),this.loanService=A(Mt),this.route=A(Et),this.router=A(le),this.dateUtils=A(de),this.settingsService=A(oe),this.alertService=A(Jl),this.minDate=new Date(2e3,0,1),this.maxDate=new Date,this.loanId=this.route.snapshot.params.loanId}ngOnInit(){this.maxDate=this.settingsService.businessDate,this.createUndoWriteOffLoanForm()}createUndoWriteOffLoanForm(){this.undoWriteOffLoanForm=this.formBuilder.group({note:[""]})}submit(){let e=this.undoWriteOffLoanForm.value,i=this.settingsService.language.code,a=this.settingsService.dateFormat,r=this.settingsService.businessDate,u=ve(ie({},e),{transactionDate:this.dateUtils.formatDate(r&&new Date(r),a),transactionAmount:0,dateFormat:a,locale:i});this.loanService.submitLoanActionButton(this.loanId,u,"undowriteoff").subscribe({next:d=>{this.router.navigate(["../../general"],{relativeTo:this.route})},error:d=>{console.error("Undo write-off failed:",d),this.alertService.alert({type:"Undo Write-off Failed",message:"An error occurred while processing the undo write-off transaction. Please try again or contact support if the problem persists."})}})}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=Dt({type:t,selectors:[["mifosx-undo-write-off"]],inputs:{dataObject:"dataObject"},decls:18,vars:13,consts:[[1,"container","mat-elevation-z8"],[3,"ngSubmit","formGroup"],[1,"layout-column"],[1,"m-b-20"],["matInput","","formControlName","note","cdkTextareaAutosize","","cdkAutosizeMinRows","2"],[1,"layout-row","align-center","gap-5px","responsive-column"],["type","button","mat-raised-button","",3,"routerLink"],["mat-raised-button","","color","primary",3,"disabled",4,"mifosxHasPermission"],["mat-raised-button","","color","primary",3,"disabled"]],template:function(i,a){i&1&&(s(0,"div",0)(1,"mat-card")(2,"form",1),it("ngSubmit",function(){return a.submit()}),s(3,"mat-card-content")(4,"div",2)(5,"p",3),c(6),p(7,"translate"),l(),s(8,"mat-form-field")(9,"mat-label"),c(10),p(11,"translate"),l(),T(12,"textarea",4),l()(),s(13,"mat-card-actions",5)(14,"button",6),c(15),p(16,"translate"),l(),k(17,KA,3,4,"button",7),l()()()()()),i&2&&(o(2),x("formGroup",a.undoWriteOffLoanForm),o(4),v(" ",m(7,6,"labels.text.Undo Write-off Description")," "),o(4),b(m(11,8,"labels.inputs.Note")),o(4),x("routerLink",Ut(12,ZA)),o(),v(" ",m(16,10,"labels.buttons.Cancel")," "),o(2),x("mifosxHasPermission","UNDOWRITEOFF_LOAN"))},dependencies:[wt,Tt,Re,we,he,Ee,Le,Ne,ae,xe,Oe,ze,_e,ge,Pe,Wt,Ae,Wn,Pt],styles:[".container[_ngcontent-%COMP%]{max-width:37rem}.mat-card[_ngcontent-%COMP%]{padding:20px}.layout-column[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:20px}.mat-card-actions[_ngcontent-%COMP%]{padding-top:20px}.gap-5px[_ngcontent-%COMP%]{gap:5px}@media (width <= 768px){.responsive-column[_ngcontent-%COMP%]{flex-direction:column;align-items:stretch}}.m-b-20[_ngcontent-%COMP%]{margin-bottom:20px}"]})}}return t})();function JA(t,n){if(t&1&&T(0,"mifosx-loans-account-close",0),t&2){let e=P();x("dataObject",e.actionButtonData)}}function XA(t,n){t&1&&T(0,"mifosx-undo-approval")}function QA(t,n){if(t&1&&T(0,"mifosx-assign-loan-officer",0),t&2){let e=P();x("dataObject",e.actionButtonData)}}function tM(t,n){if(t&1&&T(0,"mifosx-foreclosure",0),t&2){let e=P();x("dataObject",e.actionButtonData)}}function eM(t,n){if(t&1&&T(0,"mifosx-prepay-loan",0),t&2){let e=P();x("dataObject",e.actionButtonData)}}function nM(t,n){if(t&1&&T(0,"mifosx-make-repayment",0),t&2){let e=P();x("dataObject",e.actionButtonData)}}function iM(t,n){if(t&1&&T(0,"mifosx-make-repayment",0),t&2){let e=P();x("dataObject",e.actionButtonData)}}function aM(t,n){if(t&1&&T(0,"mifosx-make-repayment",0),t&2){let e=P();x("dataObject",e.actionButtonData)}}function oM(t,n){if(t&1&&T(0,"mifosx-make-repayment",0),t&2){let e=P();x("dataObject",e.actionButtonData)}}function rM(t,n){if(t&1&&T(0,"mifosx-make-repayment",0),t&2){let e=P();x("dataObject",e.actionButtonData)}}function lM(t,n){if(t&1&&T(0,"mifosx-make-repayment",0),t&2){let e=P();x("dataObject",e.actionButtonData)}}function sM(t,n){if(t&1&&T(0,"mifosx-make-repayment",0),t&2){let e=P();x("dataObject",e.actionButtonData)}}function cM(t,n){if(t&1&&T(0,"mifosx-loan-credit-balance-refund",0),t&2){let e=P();x("dataObject",e.actionButtonData)}}function pM(t,n){if(t&1&&T(0,"mifosx-waive-interest",0),t&2){let e=P();x("dataObject",e.actionButtonData)}}function mM(t,n){if(t&1&&T(0,"mifosx-write-off-page",0),t&2){let e=P();x("dataObject",e.actionButtonData)}}function dM(t,n){if(t&1&&T(0,"mifosx-close-as-rescheduled",0),t&2){let e=P();x("dataObject",e.actionButtonData)}}function uM(t,n){if(t&1&&T(0,"mifosx-loan-reschedule",0),t&2){let e=P();x("dataObject",e.actionButtonData)}}function fM(t,n){if(t&1&&T(0,"mifosx-recovery-repayment",0),t&2){let e=P();x("dataObject",e.actionButtonData)}}function hM(t,n){if(t&1&&T(0,"mifosx-view-guarantors",0),t&2){let e=P();x("dataObject",e.actionButtonData)}}function gM(t,n){if(t&1&&T(0,"mifosx-create-guarantor",0),t&2){let e=P();x("dataObject",e.actionButtonData)}}function _M(t,n){if(t&1&&T(0,"mifosx-disburse-to-savings-account",0),t&2){let e=P();x("dataObject",e.actionButtonData)}}function CM(t,n){t&1&&T(0,"mifosx-reject-loan")}function bM(t,n){if(t&1&&T(0,"mifosx-disburse",0),t&2){let e=P();x("dataObject",e.actionButtonData)}}function vM(t,n){t&1&&T(0,"mifosx-withdrawn-by-client")}function xM(t,n){if(t&1&&T(0,"mifosx-add-collateral",0),t&2){let e=P();x("dataObject",e.actionButtonData)}}function yM(t,n){if(t&1&&T(0,"mifosx-undo-disbursal",1),t&2){let e=P();x("actionName",e.actionName)}}function SM(t,n){if(t&1&&T(0,"mifosx-loan-screen-reports",0),t&2){let e=P();x("dataObject",e.actionButtonData)}}function DM(t,n){t&1&&T(0,"mifosx-approve-loan")}function wM(t,n){t&1&&T(0,"mifosx-add-loan-charge")}function TM(t,n){t&1&&T(0,"mifosx-edit-repayment-schedule")}function PM(t,n){if(t&1&&T(0,"mifosx-charge-off",0),t&2){let e=P();x("dataObject",e.actionButtonData)}}function AM(t,n){t&1&&T(0,"mifosx-asset-transfer-loan")}function MM(t,n){if(t&1&&T(0,"mifosx-loan-reaging",0),t&2){let e=P();x("dataObject",e.actionButtonData)}}function OM(t,n){if(t&1&&T(0,"mifosx-loan-reamortize",0),t&2){let e=P();x("dataObject",e.actionButtonData)}}function IM(t,n){if(t&1&&T(0,"mifosx-add-interest-pause",0),t&2){let e=P();x("dataObject",e.navigationData)}}function EM(t,n){if(t&1&&T(0,"mifosx-undo-write-off",0),t&2){let e=P();x("dataObject",e.actionButtonData)}}var i0=(()=>{class t{constructor(){this.route=A(Et),this.router=A(le),this.actions={Close:!1,"Undo Approval":!1,"Write Off":!1,"Add Collateral":!1,"Assign Loan Officer":!1,Foreclosure:!1,"Prepay Loan":!1,Reject:!1,"Disburse to Savings":!1,"Make Repayment":!1,"Waive Interest":!1,"Close (as Rescheduled)":!1,Reschedule:!1,"Recovery Payment":!1,"View Guarantors":!1,"Create Guarantor":!1,Disburse:!1,"Withdrawn by Client":!1,"Undo Disbursal":!1,"Undo Last Disbursal":!1,"Loan Screen Reports":!1,Approve:!1,"Add Loan Charge":!1,"Goodwill Credit":!1,"Merchant Issued Refund":!1,"Payout Refund":!1,"Credit Balance Refund":!1,"Edit Repayment Schedule":!1,"Charge-Off":!1,"Sell Loan":!1,"Buy Back Loan":!1,"Re-Age":!1,"Re-Amortize":!1,"Interest Payment Waiver":!1,"Add Interest Pause":!1,"Capitalized Income":!1,"Contract Termination":!1,"Buy Down Fee":!1,"Undo Write-off":!1};let e=this.router.currentNavigation();this.navigationData=e?.extras?.state?.data,this.route.data.subscribe(i=>{this.actionButtonData=i.actionButtonData?i.actionButtonData:{}}),this.route.params.subscribe(i=>{this.actionName=i.action,this.actionName==="Change Loan Officer"&&(this.actionName="Assign Loan Officer");for(let a of Object.keys(this.actions))this.actions[a]=!1;this.actions[this.actionName]=!0}),this.actionButtonData.actionName=this.actionName}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=Dt({type:t,selectors:[["mifosx-loan-account-actions"]],decls:36,vars:36,consts:[[3,"dataObject"],[3,"actionName"]],template:function(i,a){i&1&&(M(0,JA,1,1,"mifosx-loans-account-close",0),M(1,XA,1,0,"mifosx-undo-approval"),M(2,QA,1,1,"mifosx-assign-loan-officer",0),M(3,tM,1,1,"mifosx-foreclosure",0),M(4,eM,1,1,"mifosx-prepay-loan",0),M(5,nM,1,1,"mifosx-make-repayment",0),M(6,iM,1,1,"mifosx-make-repayment",0),M(7,aM,1,1,"mifosx-make-repayment",0),M(8,oM,1,1,"mifosx-make-repayment",0),M(9,rM,1,1,"mifosx-make-repayment",0),M(10,lM,1,1,"mifosx-make-repayment",0),M(11,sM,1,1,"mifosx-make-repayment",0),M(12,cM,1,1,"mifosx-loan-credit-balance-refund",0),M(13,pM,1,1,"mifosx-waive-interest",0),M(14,mM,1,1,"mifosx-write-off-page",0),M(15,dM,1,1,"mifosx-close-as-rescheduled",0),M(16,uM,1,1,"mifosx-loan-reschedule",0),M(17,fM,1,1,"mifosx-recovery-repayment",0),M(18,hM,1,1,"mifosx-view-guarantors",0),M(19,gM,1,1,"mifosx-create-guarantor",0),M(20,_M,1,1,"mifosx-disburse-to-savings-account",0),M(21,CM,1,0,"mifosx-reject-loan"),M(22,bM,1,1,"mifosx-disburse",0),M(23,vM,1,0,"mifosx-withdrawn-by-client"),M(24,xM,1,1,"mifosx-add-collateral",0),M(25,yM,1,1,"mifosx-undo-disbursal",1),M(26,SM,1,1,"mifosx-loan-screen-reports",0),M(27,DM,1,0,"mifosx-approve-loan"),M(28,wM,1,0,"mifosx-add-loan-charge"),M(29,TM,1,0,"mifosx-edit-repayment-schedule"),M(30,PM,1,1,"mifosx-charge-off",0),M(31,AM,1,0,"mifosx-asset-transfer-loan"),M(32,MM,1,1,"mifosx-loan-reaging",0),M(33,OM,1,1,"mifosx-loan-reamortize",0),M(34,IM,1,1,"mifosx-add-interest-pause",0),M(35,EM,1,1,"mifosx-undo-write-off",0)),i&2&&(O(a.actions.Close?0:-1),o(),O(a.actions["Undo Approval"]?1:-1),o(),O(a.actions["Assign Loan Officer"]?2:-1),o(),O(a.actions.Foreclosure?3:-1),o(),O(a.actions["Prepay Loan"]||a.actions["Contract Termination"]?4:-1),o(),O(a.actions["Make Repayment"]?5:-1),o(),O(a.actions["Capitalized Income"]?6:-1),o(),O(a.actions["Goodwill Credit"]?7:-1),o(),O(a.actions["Buy Down Fee"]?8:-1),o(),O(a.actions["Interest Payment Waiver"]?9:-1),o(),O(a.actions["Payout Refund"]?10:-1),o(),O(a.actions["Merchant Issued Refund"]?11:-1),o(),O(a.actions["Credit Balance Refund"]?12:-1),o(),O(a.actions["Waive Interest"]?13:-1),o(),O(a.actions["Write Off"]?14:-1),o(),O(a.actions["Close (as Rescheduled)"]?15:-1),o(),O(a.actions.Reschedule?16:-1),o(),O(a.actions["Recovery Payment"]?17:-1),o(),O(a.actions["View Guarantors"]?18:-1),o(),O(a.actions["Create Guarantor"]?19:-1),o(),O(a.actions["Disburse to Savings"]?20:-1),o(),O(a.actions.Reject?21:-1),o(),O(a.actions.Disburse?22:-1),o(),O(a.actions["Withdrawn by Client"]?23:-1),o(),O(a.actions["Add Collateral"]?24:-1),o(),O(a.actions["Undo Disbursal"]||a.actions["Undo Last Disbursal"]?25:-1),o(),O(a.actions["Loan Screen Reports"]?26:-1),o(),O(a.actions.Approve?27:-1),o(),O(a.actions["Add Loan Charge"]?28:-1),o(),O(a.actions["Edit Repayment Schedule"]?29:-1),o(),O(a.actions["Charge-Off"]?30:-1),o(),O(a.actions["Sell Loan"]||a.actions["Buy Back Loan"]?31:-1),o(),O(a.actions["Re-Age"]?32:-1),o(),O(a.actions["Re-Amortize"]?33:-1),o(),O(a.actions["Add Interest Pause"]?34:-1),o(),O(a.actions["Undo Write-off"]?35:-1))},dependencies:[wt,Tt,Pm,Am,Mm,Om,Im,Em,Lm,Nm,km,Fm,Rm,Bm,jm,zm,Vm,Um,Hm,Gm,Wm,$m,Ym,Zm,Km,Jm,Xm,Qm,t0,e0,n0,Cg],encapsulation:2})}}return t})();function LM(t,n){t&1&&(s(0,"th",8),c(1),p(2,"translate"),l()),t&2&&(o(),b(m(2,1,"labels.inputs.From Date")))}function NM(t,n){if(t&1&&(s(0,"td",9),c(1),p(2,"dateFormat"),l()),t&2){let e=n.$implicit;o(),b(m(2,1,e.fromDate))}}function kM(t,n){t&1&&(s(0,"th",8),c(1),p(2,"translate"),l()),t&2&&(o(),b(m(2,1,"labels.inputs.Interest Rate")))}function FM(t,n){if(t&1&&(s(0,"td",9),c(1),l()),t&2){let e=n.$implicit;o(),b(e.effectiveInterestRate)}}function RM(t,n){t&1&&T(0,"tr",10)}function BM(t,n){t&1&&T(0,"tr",11)}var a0=(()=>{class t{constructor(){this.route=A(Et),this.displayedColumns=["fromDate","interestRate"],this.route.parent.data.subscribe(e=>{this.loanDetails=e.loanDetailsData})}ngOnInit(){this.interestRateData=this.loanDetails.interestRatesPeriods}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=Dt({type:t,selectors:[["mifosx-floating-interest-rates"]],decls:10,vars:3,consts:[[1,"container"],["mat-table","",3,"dataSource"],["matColumnDef","fromDate"],["mat-header-cell","",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","interestRate"],["mat-header-row","",4,"matHeaderRowDef"],["mat-row","",4,"matRowDef","matRowDefColumns"],["mat-header-cell",""],["mat-cell",""],["mat-header-row",""],["mat-row",""]],template:function(i,a){i&1&&(s(0,"div",0)(1,"table",1),X(2,2),k(3,LM,3,3,"th",3)(4,NM,3,3,"td",4),Q(),X(5,5),k(6,kM,3,3,"th",3)(7,FM,2,1,"td",4),Q(),k(8,RM,1,0,"tr",6)(9,BM,1,0,"tr",7),l()()),i&2&&(o(),x("dataSource",a.interestRateData),o(7),x("matHeaderRowDef",a.displayedColumns),o(),x("matRowDefColumns",a.displayedColumns))},dependencies:[wt,Tt,bn,yn,xn,Sn,vn,Dn,wn,Pn,Tn,An,En,Pt],styles:["table[_ngcontent-%COMP%]{width:100%;margin:3% 0%}.container[_ngcontent-%COMP%]{padding-bottom:2%}"]})}}return t})();function qM(t,n){if(t&1&&(s(0,"div",1)(1,"span",2),c(2),p(3,"translate"),l(),s(4,"span",3),c(5),p(6,"yesNo"),l()()),t&2){let e=P();o(2),v("",m(3,2,"labels.inputs.Allow full term for each tranche"),":"),o(3),b(m(6,4,e.loanDetails.allowFullTermForTranche))}}function jM(t,n){if(t&1){let e=xt();s(0,"button",8),it("click",function(){mt(e);let a=P();return dt(a.addDisbursementDataEntry())}),T(1,"fa-icon",9),c(2),p(3,"translate"),l()}t&2&&(o(2),v("",m(3,1,"labels.buttons.Add")," "))}function zM(t,n){if(t&1){let e=xt();s(0,"button",8),it("click",function(){mt(e);let a=P();return dt(a.editDisbursementData())}),c(1),p(2,"translate"),l()}t&2&&(o(),v(" ",m(2,1,"labels.buttons.Apply Changes")," "))}function VM(t,n){t&1&&(s(0,"th",18),c(1),p(2,"translate"),l()),t&2&&(o(),b(m(2,1,"labels.inputs.Expected Disbursement On")))}function UM(t,n){if(t&1&&(s(0,"td",19),c(1),p(2,"dateFormat"),l()),t&2){let e=n.$implicit;o(),b(m(2,1,e.expectedDisbursementDate))}}function HM(t,n){t&1&&(s(0,"th",18),c(1),p(2,"translate"),l()),t&2&&(o(),b(m(2,1,"labels.inputs.Disbursed On")))}function GM(t,n){if(t&1&&(s(0,"span"),c(1),p(2,"dateFormat"),l()),t&2){let e=P().$implicit;o(),v(" ",m(2,1,e.actualDisbursementDate)," ")}}function WM(t,n){if(t&1&&(s(0,"td",19),M(1,GM,3,3,"span"),l()),t&2){let e=n.$implicit;o(),O(e.actualDisbursementDate?1:-1)}}function $M(t,n){t&1&&(s(0,"th",18),c(1),p(2,"translate"),l()),t&2&&(o(),b(m(2,1,"labels.inputs.Principal")))}function YM(t,n){if(t&1&&(s(0,"td",19),c(1),l()),t&2){let e=n.$implicit;o(),b(e.principal)}}function ZM(t,n){t&1&&(s(0,"th",18),c(1),p(2,"translate"),l()),t&2&&(o(),b(m(2,1,"labels.inputs.Actions")))}function KM(t,n){t&1&&(s(0,"span"),T(1,"i",22),l())}function JM(t,n){if(t&1){let e=xt();s(0,"button",23),p(1,"translate"),it("click",function(){mt(e);let a=P().index,r=P(2);return dt(r.editDisbursementDataEntry(a))}),T(2,"fa-icon",24),l()}t&2&&x("matTooltip",ce(m(1,2,"tooltips.Edit")))}function XM(t,n){if(t&1){let e=xt();s(0,"button",25),p(1,"translate"),it("click",function(){mt(e);let a=P().index,r=P(2);return dt(r.removeDisbursementDataEntry(a))}),T(2,"fa-icon",26),l()}t&2&&x("matTooltip",ce(m(1,2,"tooltips.Delete")))}function QM(t,n){if(t&1&&(s(0,"td",19),M(1,KM,2,0,"span"),M(2,JM,3,4,"button",20),M(3,XM,3,4,"button",21),l()),t&2){let e=n.$implicit,i=P(2);o(),O(e.actualDisbursementDate?1:-1),o(),O(!e.actualDisbursementDate&&i.showActionsTrancheButtons()?2:-1),o(),O(!e.actualDisbursementDate&&i.showActionsTrancheButtons()?3:-1)}}function tO(t,n){t&1&&T(0,"tr",27)}function eO(t,n){t&1&&T(0,"tr",28)}function nO(t,n){if(t&1&&(s(0,"table",7),X(1,10),k(2,VM,3,3,"th",11)(3,UM,3,3,"td",12),Q(),X(4,13),k(5,HM,3,3,"th",11)(6,WM,2,1,"td",12),Q(),X(7,14),k(8,$M,3,3,"th",11)(9,YM,2,1,"td",12),Q(),X(10,15),k(11,ZM,3,3,"th",11)(12,QM,4,3,"td",12),Q(),k(13,tO,1,0,"tr",16)(14,eO,1,0,"tr",17),l()),t&2){let e=P();x("dataSource",e.disbursementDataSource),o(13),x("matHeaderRowDef",e.expectedDisbursementColumns),o(),x("matRowDefColumns",e.expectedDisbursementColumns)}}function iO(t,n){t&1&&(s(0,"th",18),c(1),p(2,"translate"),l()),t&2&&(o(),b(m(2,1,"labels.inputs.Applicable From Date")))}function aO(t,n){if(t&1&&(s(0,"td",19),c(1),p(2,"dateFormat"),l()),t&2){let e=n.$implicit;o(),b(m(2,1,e.termVariationApplicableFrom))}}function oO(t,n){t&1&&(s(0,"th",18),c(1),p(2,"translate"),l()),t&2&&(o(),b(m(2,1,"labels.inputs.Installment Amount")))}function rO(t,n){if(t&1&&(s(0,"td",19),c(1),l()),t&2){let e=n.$implicit;o(),b(e.termValue)}}function lO(t,n){t&1&&T(0,"tr",27)}function sO(t,n){t&1&&T(0,"tr",28)}function cO(t,n){if(t&1&&(s(0,"div")(1,"h3"),c(2),p(3,"translate"),l(),s(4,"table",7),X(5,29),k(6,iO,3,3,"th",11)(7,aO,3,3,"td",12),Q(),X(8,30),k(9,oO,3,3,"th",11)(10,rO,2,1,"td",12),Q(),k(11,lO,1,0,"tr",16)(12,sO,1,0,"tr",17),l()()),t&2){let e=P();o(2),v("",m(3,4,"labels.heading.Installment Amount Variations"),":"),o(2),x("dataSource",e.loanDetails.emiAmountVariations),o(7),x("matHeaderRowDef",e.emivariationColumns),o(),x("matRowDefColumns",e.emivariationColumns)}}var o0=(()=>{class t{constructor(){this.route=A(Et),this.router=A(le),this.dialog=A(Gn),this.loanServices=A(Mt),this.settingsService=A(oe),this.dateUtils=A(de),this.expectedDisbursementColumns=["expected disbursement on","disbursed on","principal","action"],this.emivariationColumns=["emi amount variation from","fixed emi amount"],this.minDate=new Date(2e3,0,1),this.maxDate=new Date(2100,0,1),this.disbursementDataSource=[],this.totalMultiDisbursed=null,this.disallowExpectedDisbursements=!1,this.pristine=!0,this.route.parent.data.subscribe(e=>{this.loanId=e.loanDetailsData.id,this.loanDetails=e.loanDetailsData,this.disallowExpectedDisbursements=this.loanDetails.disallowExpectedDisbursements||!1,this.currentPrincipalAmount=this.loanDetails.approvedPrincipal})}ngOnInit(){this.maxDate=this.settingsService.maxFutureDate,this.status=this.loanDetails.status.value,this.disbursementDataSource=this.loanServices.getLoanDisbursementDetailsData(),this.disbursementDataSource.forEach(e=>{e.id||(this.pristine=!1)})}showAddTrancheButtons(){return this.return=!0,(this.status==="Closed (obligations met)"||this.status==="Overpaid"||this.status==="Closed (rescheduled)"||this.status==="Closed (written off)"||this.status==="Submitted and pending approval"||this.disallowExpectedDisbursements)&&(this.return=!1),this.calculateTotalDisbursedAmount(),!(this.totalMultiDisbursed===this.currentPrincipalAmount||this.return===!1)}showActionsTrancheButtons(){return!(this.status==="Closed (obligations met)"||this.status==="Overpaid"||this.status==="Closed (rescheduled)"||this.status==="Closed (written off)"||this.status==="Submitted and pending approval"||this.disallowExpectedDisbursements)}calculateTotalDisbursedAmount(){this.totalMultiDisbursed=0,this.count=0,this.disbursementDataSource.forEach(e=>{this.totalMultiDisbursed+=e.principal*1,this.count+=1})}buildForm(e,i){return[new la({controlName:"expectedDisbursementDate",label:"Expected Disbursement Date",value:e||"",type:"datetime-local",minDate:this.minDate,maxDate:this.maxDate,required:!0,order:1}),new Ti({controlName:"principal",label:"Principal",value:i,type:"number",required:!0,order:2})]}addDisbursementDataEntry(){this.calculateTotalDisbursedAmount();let e={title:"Add Disbursement Details",layout:{addButtonText:"Add"},formfields:this.buildForm(new Date,this.currentPrincipalAmount-this.totalMultiDisbursed)};this.dialog.open(_i,{data:e}).afterClosed().subscribe(a=>{if(a.data){let r=a.data.value.principal*1;this.totalMultiDisbursed+r<=this.currentPrincipalAmount&&(this.disbursementDataSource=this.disbursementDataSource.concat(a.data.value),this.loanServices.saveLoanDisbursementDetailsData(this.disbursementDataSource),this.pristine=!1)}})}editDisbursementDataEntry(e){let i=this.disbursementDataSource[e].principal*1,a=this.dateUtils.parseDate(this.disbursementDataSource[e].expectedDisbursementDate),r={title:"Edit Disbursement Details",layout:{addButtonText:"Save"},formfields:this.buildForm(a,i)};this.dialog.open(_i,{data:r}).afterClosed().subscribe(d=>{if(d.data){let g=d.data.value.principal*1;this.totalMultiDisbursed-i+g<=this.currentPrincipalAmount&&(this.disbursementDataSource[e].principal=g,this.disbursementDataSource[e].expectedDisbursementDate=d.data.value.expectedDisbursementDate,this.pristine=!1)}})}removeDisbursementDataEntry(e){this.dialog.open(ra,{data:{deleteContext:"this"}}).afterClosed().subscribe(a=>{if(a.delete){let r=this.disbursementDataSource[e].principal*1;this.disbursementDataSource.splice(e,1),this.disbursementDataSource=this.disbursementDataSource.concat([]),this.totalMultiDisbursed-=r,this.pristine=!1}})}editDisbursementData(){let e=[];this.disbursementDataSource.forEach(a=>{e.push({expectedDisbursementDate:this.dateUtils.formatDate(a.expectedDisbursementDate,this.settingsService.dateFormat),principal:a.principal,id:a.id})});let i={disbursementData:e,dateFormat:this.settingsService.dateFormat,locale:this.settingsService.language.code};this.loanServices.editDisbursements(this.loanId,i).toPromise().then(a=>{this.reload(),this.pristine=!0})}reload(){let e=this.router.url;this.router.navigateByUrl("/clients",{skipLocationChange:!0}).then(()=>this.router.navigate([e]))}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=Dt({type:t,selectors:[["mifosx-loan-tranche-details"]],decls:17,vars:14,consts:[[1,"container"],[1,"flex-fill"],[1,"flex-40"],[1,"flex-60"],["class","flex-fill",4,"ngIf"],[1,"layout-row","margin-t","layout-xs-column","layout-align-end","gap-2percent"],["mat-raised-button","","color","primary"],["mat-table","",3,"dataSource"],["mat-raised-button","","color","primary",3,"click"],["icon","plus",1,"m-r-10"],["matColumnDef","expected disbursement on"],["mat-header-cell","",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","disbursed on"],["matColumnDef","principal"],["matColumnDef","action"],["mat-header-row","",4,"matHeaderRowDef"],["mat-row","",4,"matRowDef","matRowDefColumns"],["mat-header-cell",""],["mat-cell",""],["type","button","mat-icon-button","","color","primary","matTooltipPosition","left",3,"matTooltip"],["type","button","mat-icon-button","","color","warn","matTooltipPosition","left",3,"matTooltip"],[1,"fa","fa-check"],["type","button","mat-icon-button","","color","primary","matTooltipPosition","left",3,"click","matTooltip"],["icon","edit"],["type","button","mat-icon-button","","color","warn","matTooltipPosition","left",3,"click","matTooltip"],["icon","trash"],["mat-header-row",""],["mat-row",""],["matColumnDef","emi amount variation from"],["matColumnDef","fixed emi amount"]],template:function(i,a){i&1&&(s(0,"div",0)(1,"div",1)(2,"span",2),c(3),p(4,"translate"),l(),s(5,"span",3),c(6),p(7,"formatNumber"),l()(),k(8,qM,7,6,"div",4),s(9,"h3"),c(10),p(11,"translate"),l(),s(12,"div",5),M(13,jM,4,3,"button",6),M(14,zM,3,3,"button",6),l(),M(15,nO,15,3,"table",7),M(16,cO,13,6,"div"),l()),i&2&&(o(3),v("",m(4,8,"labels.inputs.Maximum allowed outstanding balance"),":"),o(3),b(m(7,10,a.loanDetails.maxOutstandingLoanBalance)),o(2),x("ngIf",a.loanDetails.allowFullTermForTranche),o(2),b(m(11,12,"labels.heading.Loan Tranche Details")),o(3),O(a.showAddTrancheButtons()?13:-1),o(),O(a.pristine?-1:14),o(),O(a.disbursementDataSource.length>0?15:-1),o(),O(a.loanDetails.emiAmountVariations.length>0?16:-1))},dependencies:[wt,Lf,Tt,Wt,un,bn,yn,xn,Sn,vn,Dn,Ba,Oi,wn,Pn,Tn,An,En,Pt,hn,Hr],styles:["table[_ngcontent-%COMP%]{width:100%}.container[_ngcontent-%COMP%]{padding-top:1%;padding-bottom:2%}.container[_ngcontent-%COMP%] .delete-button[_ngcontent-%COMP%]{margin-left:1%}"]})}}return t})();var pO=()=>["../actions/Add Collateral"];function mO(t,n){if(t&1&&(s(0,"div",5)(1,"table")(2,"tbody")(3,"tr")(4,"td",7)(5,"b"),c(6),p(7,"translate"),l()(),s(8,"td",8),c(9),p(10,"formatNumber"),l(),s(11,"td",7)(12,"b"),c(13),p(14,"translate"),l()(),s(15,"td",8),c(16),p(17,"formatNumber"),l()()()()()),t&2){let e=P();o(6),v("",m(7,4,"labels.inputs.Number of Collaterals")," :"),o(3),v(" ",m(10,6,e.loanCollaterals==null?null:e.loanCollaterals.length)," "),o(4),v("",m(14,8,"labels.inputs.Total Amount")," :"),o(3),v(" ",m(17,10,e.totalAmount)," ")}}function dO(t,n){t&1&&(s(0,"th",17),c(1),p(2,"translate"),l()),t&2&&(o(),b(m(2,1,"labels.inputs.ID")))}function uO(t,n){if(t&1&&(s(0,"td",18),c(1),l()),t&2){let e=n.$implicit;o(),b(e.id)}}function fO(t,n){t&1&&(s(0,"th",17),c(1),p(2,"translate"),l()),t&2&&(o(),b(m(2,1,"labels.inputs.Currency")))}function hO(t,n){if(t&1&&(s(0,"td",18),c(1),l()),t&2){let e=n.$implicit;o(),b(e.currency.code)}}function gO(t,n){t&1&&(s(0,"th",17),c(1),p(2,"translate"),l()),t&2&&(o(),b(m(2,1,"labels.inputs.Description")))}function _O(t,n){if(t&1&&(s(0,"td",18),c(1),l()),t&2){let e=n.$implicit;o(),b(e.description)}}function CO(t,n){t&1&&(s(0,"th",17),c(1),p(2,"translate"),l()),t&2&&(o(),b(m(2,1,"labels.inputs.Value")))}function bO(t,n){if(t&1&&(s(0,"td",18),c(1),p(2,"formatNumber"),l()),t&2){let e=n.$implicit;o(),b(m(2,1,e.value))}}function vO(t,n){t&1&&T(0,"tr",19)}function xO(t,n){t&1&&T(0,"tr",20)}function yO(t,n){if(t&1&&(s(0,"table",6),X(1,9),k(2,dO,3,3,"th",10)(3,uO,2,1,"td",11),Q(),X(4,12),k(5,fO,3,3,"th",10)(6,hO,2,1,"td",11),Q(),X(7,13),k(8,gO,3,3,"th",10)(9,_O,2,1,"td",11),Q(),X(10,14),k(11,CO,3,3,"th",10)(12,bO,3,3,"td",11),Q(),k(13,vO,1,0,"tr",15)(14,xO,1,0,"tr",16),l()),t&2){let e=P();x("dataSource",e.loanCollaterals),o(13),x("matHeaderRowDef",e.displayedColumns),o(),x("matRowDefColumns",e.displayedColumns)}}var r0=(()=>{class t{constructor(){this.route=A(Et),this.loanCollaterals=[],this.displayedColumns=["id","currency","description","value"],this.route.data.subscribe(e=>{this.loanCollaterals=e.loanCollaterals})}ngOnInit(){this.totalAmount=0,this.loanCollaterals.forEach(e=>{this.totalAmount=this.totalAmount+e.value})}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=Dt({type:t,selectors:[["mifosx-loan-collateral-tab"]],decls:11,vars:10,consts:[[1,"tab-container","mat-typography"],[1,"layout-row","align-start-center"],[1,"flex-90"],[1,"layout-row","gap-20px","align-end","align-items-center","action-buttons"],["mat-raised-button","","color","primary",3,"routerLink"],[1,"layout-row","gap-32px","performance-history-container"],["mat-table","",3,"dataSource"],[1,"flex-25"],[1,"flex-25","left"],["matColumnDef","id"],["mat-header-cell","",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","currency"],["matColumnDef","description"],["matColumnDef","value"],["mat-header-row","",4,"matHeaderRowDef"],["mat-row","",4,"matRowDef","matRowDefColumns"],["mat-header-cell",""],["mat-cell",""],["mat-header-row",""],["mat-row",""]],template:function(i,a){i&1&&(s(0,"div",0)(1,"div",1)(2,"h3",2),c(3),p(4,"translate"),l(),s(5,"div",3)(6,"button",4),c(7),p(8,"translate"),l()()(),M(9,mO,18,12,"div",5),M(10,yO,15,3,"table",6),l()),i&2&&(o(3),b(m(4,5,"labels.inputs.Loan Collateral Details")),o(3),x("routerLink",Ut(9,pO)),o(),v(" ",m(8,7,"labels.buttons.Add Collateral")," "),o(2),O((a.loanCollaterals==null?null:a.loanCollaterals.length)>0?9:-1),o(),O((a.loanCollaterals==null?null:a.loanCollaterals.length)>0?10:-1))},dependencies:[wt,Tt,ae,Wt,bn,yn,xn,Sn,vn,Dn,wn,Pn,Tn,An,Pt,hn],styles:["table[_ngcontent-%COMP%]{width:100%;margin-top:3%}table[_ngcontent-%COMP%] .document-action-button[_ngcontent-%COMP%]{min-width:26px;padding:0 6px;margin:4px;line-height:25px}.tab-container[_ngcontent-%COMP%]{padding:1%;margin:1%}"]})}}return t})();var bg=(()=>{class t{constructor(){}dynamicSort(e){let i=1;return e[0]==="-"&&(i=-1,e=e.substr(1)),(a,r)=>(a[e]r[e]?1:0)*i}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275prov=sn({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();var SO=()=>["../","general"];function DO(t,n){if(t&1&&(s(0,"mat-option",7),c(1),l()),t&2){let e=n.$implicit;x("value",e.id),o(),v(" ",e.name," ")}}function wO(t,n){if(t&1&&(s(0,"mat-option",7),c(1),l()),t&2){let e=n.$implicit;x("value",e.id),o(),v(" ",e.displayName," ")}}function TO(t,n){if(t&1&&(s(0,"mat-form-field",15)(1,"mat-label"),c(2),p(3,"translate"),l(),s(4,"mat-select",27),p(5,"translate"),ue(6,wO,2,2,"mat-option",7,Ce),l()()),t&2){let e=P(2);o(2),b(m(3,3,"labels.inputs.Loan officer")),o(2),x("matTooltip",ce(m(5,5,"tooltips.Financial institution representative"))),o(2),fe(e.loanOfficerOptions)}}function PO(t,n){if(t&1&&(s(0,"mat-option",7),c(1),l()),t&2){let e=n.$implicit;x("value",e.id),o(),v(" ",e.name," ")}}function AO(t,n){if(t&1&&(s(0,"mat-option",7),c(1),l()),t&2){let e=n.$implicit;x("value",e.id),o(),v(" ",e.name," ")}}function MO(t,n){t&1&&(s(0,"mat-error"),c(1),p(2,"translate"),p(3,"translate"),s(4,"strong"),c(5),p(6,"translate"),l()()),t&2&&(o(),$t(" ",m(2,3,"labels.inputs.Submitted on")," ",m(3,5,"labels.commons.is")," "),o(4),b(m(6,7,"labels.commons.required")))}function OO(t,n){t&1&&(s(0,"mat-error"),c(1),p(2,"translate"),p(3,"translate"),s(4,"strong"),c(5),p(6,"translate"),l()()),t&2&&(o(),$t(" ",m(2,3,"labels.inputs.Disbursement on")," ",m(3,5,"labels.commons.is")," "),o(4),b(m(6,7,"labels.commons.required")))}function IO(t,n){if(t&1&&(s(0,"mat-option",7),c(1),l()),t&2){let e=n.$implicit;x("value",e.id),o(),$t(" (",e.accountNo,") ",e.productName," ")}}function EO(t,n){if(t&1){let e=xt();s(0,"div",8)(1,"mat-form-field",15)(2,"mat-label"),c(3),p(4,"translate"),l(),T(5,"input",16),p(6,"translate"),l(),M(7,TO,8,7,"mat-form-field",15),s(8,"mat-form-field",15)(9,"mat-label"),c(10),p(11,"translate"),l(),s(12,"mat-select",17),p(13,"translate"),ue(14,PO,2,2,"mat-option",7,Ce),l()(),s(16,"mat-form-field",15)(17,"mat-label"),c(18),p(19,"translate"),l(),s(20,"mat-select",18),ue(21,AO,2,2,"mat-option",7,Ce),l()(),s(23,"mat-form-field",19),it("click",function(){mt(e);let a=Lt(31);return dt(a.open())}),s(24,"mat-label"),c(25),p(26,"translate"),l(),T(27,"input",20),p(28,"translate"),T(29,"mat-datepicker-toggle",21)(30,"mat-datepicker",null,0),M(32,MO,7,9,"mat-error"),l(),s(33,"mat-form-field",19),it("click",function(){mt(e);let a=Lt(41);return dt(a.open())}),s(34,"mat-label"),c(35),p(36,"translate"),l(),T(37,"input",22),p(38,"translate"),T(39,"mat-datepicker-toggle",21)(40,"mat-datepicker",null,1),M(42,OO,7,9,"mat-error"),l(),T(43,"mat-divider",23),s(44,"h3",24),c(45),p(46,"translate"),l(),s(47,"mat-form-field",15)(48,"mat-label"),c(49),p(50,"translate"),l(),s(51,"mat-select",25),ue(52,IO,2,3,"mat-option",7,Ce),l()(),s(54,"mat-checkbox",26)(55,"p"),c(56),p(57,"translate"),l()()()}if(t&2){let e=Lt(31),i=Lt(41),a=P();o(3),b(m(4,27,"labels.inputs.External id")),o(2),x("matTooltip",ce(m(6,29,"tooltips.Provides an external id"))),o(2),O(a.loanProductSelected?7:-1),o(3),b(m(11,31,"labels.inputs.Loan Purpose")),o(2),x("matTooltip",ce(m(13,33,"tooltips.Provides an indication"))),o(2),fe(a.loanPurposeOptions),o(4),b(m(19,35,"labels.inputs.Fund")),o(3),fe(a.fundOptions),o(4),b(m(26,37,"labels.inputs.Submitted on")),o(2),x("matTooltip",ce(m(28,39,"tooltips.Date the loan account application")))("min",a.minDate)("max",a.maxDate)("matDatepicker",e),o(2),x("for",e),o(3),O(a.loansAccountDetailsForm.controls.submittedOnDate!=null&&a.loansAccountDetailsForm.controls.submittedOnDate.hasError("required")?32:-1),o(3),b(m(36,41,"labels.inputs.Disbursement on")),o(2),x("matTooltip",ce(m(38,43,"tooltips.Date that the loan account disbursed")))("min",a.loansAccountDetailsForm.value.submittedOnDate)("max",a.maxDate)("matDatepicker",i),o(2),x("for",i),o(3),O(a.loansAccountDetailsForm.controls.submittedOnDate!=null&&a.loansAccountDetailsForm.controls.submittedOnDate.hasError("required")?42:-1),o(3),b(m(46,45,"labels.heading.Savings Linkage")),o(4),b(m(50,47,"labels.inputs.Link savings")),o(3),fe(a.accountLinkingOptions),o(4),b(m(57,49,"labels.inputs.Create standing instructions at disbursement"))}}function LO(t,n){t&1&&(s(0,"button",14),c(1),p(2,"translate"),l()),t&2&&(x("routerLink",Ut(4,SO)),o(),v(" ",m(2,2,"labels.buttons.Cancel")," "))}var Oo=(()=>{class t{constructor(){this.formBuilder=A(Te),this.loansService=A(Mt),this.route=A(Et),this.translateService=A(pa),this.settingsService=A(oe),this.commons=A(bg),this.placeHolderLabel="",this.noEntriesFoundLabel="",this.minDate=new Date(2e3,0,1),this.maxDate=new Date(2100,0,1),this.isFieldOfficerPatched=!1,this.loanId=null,this.loanProductSelected=!1,this.productData=new Tf(1),this.filterFormCtrl=new pe(""),this._onDestroy=new wf,this.loansAccountProductTemplate=new Yl,this.loanId=this.route.snapshot.params.loanId,this.createLoansAccountDetailsForm()}ngOnInit(){this.placeHolderLabel=this.translateService.instant("labels.text.Search"),this.noEntriesFoundLabel=this.translateService.instant("labels.text.No data found"),this.maxDate=this.settingsService.maxFutureDate,this.buildDependencies(),this.loansAccountTemplate&&(this.productList=this.loansAccountTemplate.productOptions.sort(this.commons.dynamicSort("name")),this.loansAccountTemplate.loanProductId&&this.loansAccountDetailsForm.patchValue({productId:this.loansAccountTemplate.loanProductId,submittedOnDate:this.loansAccountTemplate.timeline.submittedOnDate&&new Date(this.loansAccountTemplate.timeline.submittedOnDate),loanOfficerId:this.loansAccountTemplate.loanOfficerId,loanPurposeId:this.loansAccountTemplate.loanPurposeId,fundId:this.loansAccountTemplate.fundId,expectedDisbursementDate:this.loansAccountTemplate.timeline.expectedDisbursementDate&&new Date(this.loansAccountTemplate.timeline.expectedDisbursementDate),externalId:this.loansAccountTemplate.externalId})),this.filterFormCtrl.valueChanges.pipe(Pf(this._onDestroy)).subscribe(()=>{this.searchItem()}),this.productData.next(this.productList.slice())}ngOnDestroy(){this._onDestroy.next(),this._onDestroy.complete()}searchItem(){if(this.productList){let e=this.filterFormCtrl.value.toLowerCase();e?this.productData.next(this.productList.filter(i=>i.name.toLowerCase().indexOf(e)>=0)):this.productData.next(this.productList.slice())}}createLoansAccountDetailsForm(){this.loansAccountDetailsForm=this.formBuilder.group({productId:["",Gt.required],loanOfficerId:[""],loanPurposeId:[""],fundId:[""],submittedOnDate:[this.settingsService.businessDate,Gt.required],expectedDisbursementDate:["",Gt.required],externalId:[""],linkAccountId:[""],createStandingInstructionAtDisbursement:[""]})}buildDependencies(){let e=this.loansAccountTemplate.clientId?this.loansAccountTemplate.clientId:this.loansAccountTemplate.group.id,i=!this.loansAccountTemplate.clientId;this.loansAccountDetailsForm.get("productId").valueChanges.subscribe(a=>{this.loansService.getLoansAccountTemplateResource(e,i,a).subscribe(r=>{this.loansAccountProductTemplate.emit(r),this.loanOfficerOptions=r.loanOfficerOptions,this.loanPurposeOptions=r.loanPurposeOptions,this.fundOptions=r.fundOptions,this.accountLinkingOptions=r.accountLinkingOptions,this.loanProductSelected=!0,r.createStandingInstructionAtDisbursement&&this.loansAccountDetailsForm.get("createStandingInstructionAtDisbursement").patchValue(r.createStandingInstructionAtDisbursement)})})}get loansAccountDetails(){return this.loansAccountDetailsForm.getRawValue()}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=Dt({type:t,selectors:[["mifosx-loans-account-details-step"]],inputs:{loansAccountTemplate:"loansAccountTemplate"},outputs:{loansAccountProductTemplate:"loansAccountProductTemplate"},decls:31,vars:33,consts:[["submitPicker",""],["disbursementPicker",""],[3,"formGroup"],[1,"layout-row-wrap","gap-2px","responsive-column"],[1,"flex-fill"],["required","","formControlName","productId",3,"matTooltip"],[3,"placeholderLabel","noEntriesFoundLabel","formControl"],[3,"value"],[1,"layout-row-wrap","layout-lt-md-column","gap-2percent"],[1,"layout-row","align-center","gap-2percent","margin-t","responsive-column"],["mat-raised-button","","matStepperPrevious","","disabled",""],["icon","arrow-left",1,"m-r-10"],["mat-raised-button","","matStepperNext","",3,"disabled"],["icon","arrow-right",1,"m-l-10"],["mat-raised-button","",3,"routerLink"],[1,"flex-48"],["matInput","","formControlName","externalId",3,"matTooltip"],["formControlName","loanPurposeId",3,"matTooltip"],["formControlName","fundId"],[1,"flex-48",3,"click"],["matInput","","required","","formControlName","submittedOnDate",3,"min","max","matDatepicker","matTooltip"],["matSuffix","",3,"for"],["matInput","","required","","formControlName","expectedDisbursementDate",3,"min","max","matDatepicker","matTooltip"],[1,"flex-98"],[1,"mat-h3","flex-fill"],["formControlName","linkAccountId"],["formControlName","createStandingInstructionAtDisbursement",1,"flex-48"],["formControlName","loanOfficerId",3,"matTooltip"]],template:function(i,a){if(i&1&&(s(0,"form",2)(1,"div",3)(2,"mat-form-field",4)(3,"mat-label"),c(4),p(5,"translate"),l(),s(6,"mat-select",5),p(7,"translate"),s(8,"mat-option"),T(9,"ngx-mat-select-search",6),l(),ue(10,DO,2,2,"mat-option",7,Ce),p(12,"async"),l(),s(13,"mat-error"),c(14),p(15,"translate"),p(16,"translate"),s(17,"strong"),c(18),p(19,"translate"),l()()()(),M(20,EO,58,51,"div",8),s(21,"div",9)(22,"button",10),T(23,"fa-icon",11),c(24),p(25,"translate"),l(),s(26,"button",12),c(27),p(28,"translate"),T(29,"fa-icon",13),l(),M(30,LO,3,5,"button",14),l()()),i&2){let r;x("formGroup",a.loansAccountDetailsForm),o(4),b(m(5,17,"labels.inputs.Product Name")),o(2),x("matTooltip",ce(m(7,19,"tooltips.Name of the loan product"))),o(3),x("placeholderLabel",ce(a.placeHolderLabel))("noEntriesFoundLabel",ce(a.noEntriesFoundLabel))("formControl",a.filterFormCtrl),o(),fe(m(12,21,a.productData)),o(4),$t(" ",m(15,23,"labels.inputs.Product Name")," ",m(16,25,"labels.commons.is")," "),o(4),b(m(19,27,"labels.commons.required")),o(2),O(a.loanProductSelected?20:-1),o(4),v(" ",m(25,29,"labels.buttons.Previous")," "),o(2),x("disabled",!((r=a.loansAccountDetailsForm.get("productId"))!=null&&r.value)||!((r=a.loansAccountDetailsForm.get("expectedDisbursementDate"))!=null&&r.value)||!((r=a.loansAccountDetailsForm.get("submittedOnDate"))!=null&&r.value)),o(),v(" ",m(28,31,"labels.buttons.Next")," "),o(3),O(a.loanId?30:-1)}},dependencies:[wt,Tt,Re,we,he,Ee,je,Wo,Le,Ne,ae,_e,ge,Ve,Je,Pe,In,On,tn,en,Qe,Wt,Da,Oi,i1,n1,$o,za,un,mo,Nf,Pt],styles:["h4[_ngcontent-%COMP%]{font-weight:500;margin:1em 0}h3[_ngcontent-%COMP%]{font-weight:500}mat-divider[_ngcontent-%COMP%]{margin:1em 0 2em}.margin-v[_ngcontent-%COMP%]{margin:1em 0}.margin-b[_ngcontent-%COMP%]{margin:0 0 1em}.margin-t[_ngcontent-%COMP%]{margin-top:1em}"]})}}return t})();var NO=t=>({data:t});function kO(t,n){if(t&1&&(s(0,"mat-option",3),c(1),l()),t&2){let e=n.$implicit;x("value",e),o(),v(" ",e.name," ")}}function FO(t,n){t&1&&(s(0,"mat-error"),c(1),p(2,"translate"),p(3,"translate"),s(4,"strong"),c(5),p(6,"translate"),l()()),t&2&&(o(),$t(" ",m(2,3,"labels.inputs.Quantity")," ",m(3,5,"labels.commons.is")," "),o(4),b(m(6,7,"labels.commons.required")))}function RO(t,n){if(t&1&&(s(0,"mat-error"),c(1),p(2,"translate"),s(3,"strong"),c(4),l()()),t&2){let e=P();o(),v(" ",m(2,2,"labels.inputs.Quantity can not be more than")," "),o(3),b(e.maxQuantity)}}var l0=(()=>{class t{constructor(){this.dialogRef=A(Vo),this.data=A(Uo),this.formBuilder=A(Te),this.layout={addButtonText:"Add"},this.maxQuantity=0,this.createAddCollateralForm()}ngOnInit(){this.dialogRef.updateSize("400px"),this.collateralTypeData=this.data.collateralOptions,this.buildDependencies()}createAddCollateralForm(){this.addCollateralForm=this.formBuilder.group({collateral:["",Gt.required],quantity:["",Gt.required],totalValue:[{value:"",disabled:!0}],totalCollateralValue:[{value:"",disabled:!0}]})}buildDependencies(){this.addCollateralForm.controls.collateral.valueChanges.subscribe(e=>{this.collateralData=e,this.maxQuantity=e.quantity}),this.addCollateralForm.controls.quantity.valueChanges.subscribe(e=>{this.addCollateralForm.patchValue({totalValue:this.collateralData.basePrice*e,totalCollateralValue:this.collateralData.basePrice*this.collateralData.pctToBase*e/100})})}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=Dt({type:t,selectors:[["mifosx-loans-account-add-collateral-dialog"]],decls:41,vars:39,consts:[["mat-dialog-title",""],["mat-dialog-content","",1,"layout-column",3,"formGroup"],["formControlName","collateral","required",""],[3,"value"],["type","number","matInput","","formControlName","quantity","required","",3,"max","min"],["type","text","matInput","","formControlName","totalValue",3,"disabled"],["type","text","matInput","","formControlName","totalCollateralValue",3,"disabled"],[1,"layout-row","layout-xs-column","layout-align-center","gap-2percent"],["mat-raised-button","","mat-dialog-close",""],["mat-raised-button","","color","primary",3,"mat-dialog-close","disabled"]],template:function(i,a){i&1&&(s(0,"h1",0),c(1),p(2,"translate"),l(),s(3,"div",1)(4,"mat-form-field")(5,"mat-label"),c(6),p(7,"translate"),l(),s(8,"mat-select",2),ue(9,kO,2,2,"mat-option",3,Ce),l(),s(11,"mat-error"),c(12),p(13,"translate"),p(14,"translate"),s(15,"strong"),c(16),p(17,"translate"),l()()(),s(18,"mat-form-field")(19,"mat-label"),c(20),p(21,"translate"),l(),T(22,"input",4),M(23,FO,7,9,"mat-error"),M(24,RO,5,4,"mat-error"),l(),s(25,"mat-form-field")(26,"mat-label"),c(27),p(28,"translate"),l(),T(29,"input",5),l(),s(30,"mat-form-field")(31,"mat-label"),c(32),p(33,"translate"),l(),T(34,"input",6),l()(),s(35,"mat-dialog-actions",7)(36,"button",8),c(37),p(38,"translate"),l(),s(39,"button",9),c(40),l()()),i&2&&(o(),b(m(2,19,"labels.heading.Add Loan Collateral")),o(2),x("formGroup",a.addCollateralForm),o(3),b(m(7,21,"labels.inputs.Collateral")),o(3),fe(a.collateralTypeData),o(3),$t(" ",m(13,23,"labels.inputs.Collateral")," ",m(14,25,"labels.commons.is")," "),o(4),b(m(17,27,"labels.commons.required")),o(4),b(m(21,29,"labels.inputs.Quantity")),o(2),x("max",a.maxQuantity)("min",0),o(),O(a.addCollateralForm.controls.quantity.hasError("required")?23:-1),o(),O(a.addCollateralForm.controls.quantity.hasError("max")?24:-1),o(3),b(m(28,31,"labels.inputs.Total Value")),o(2),x("disabled",!0),o(3),b(m(33,33,"labels.inputs.Total Collateral Value")),o(2),x("disabled",!0),o(3),b(m(38,35,"labels.buttons.Cancel")),o(2),x("mat-dialog-close",La(37,NO,a.addCollateralForm))("disabled",!a.addCollateralForm.valid||a.addCollateralForm.pristine),o(),v(" ",a.layout.addButtonText," "))},dependencies:[wt,Tt,we,Mi,he,Ee,je,Uf,Vf,Le,Ne,_e,ge,Ve,Pe,In,On,Wt,Ur,Ho,Go,Kl,Pt],encapsulation:2})}}return t})();var BO=()=>["../","general"];function qO(t,n){if(t&1&&T(0,"mifosx-input-amount",4),t&2){let e=P();x("currency",e.currency)("isRequired",!0)("inputFormControl",e.loansAccountTermsForm.controls.principalAmount)("inputLabel","Principal")}}function jO(t,n){t&1&&(s(0,"mat-error"),c(1),p(2,"translate"),p(3,"translate"),s(4,"strong"),c(5),p(6,"translate"),l()()),t&2&&(o(),$t(" ",m(2,3,"labels.inputs.Loan Term")," ",m(3,5,"labels.commons.is")," "),o(4),b(m(6,7,"labels.commons.required")))}function zO(t,n){if(t&1&&(s(0,"mat-option",10),c(1),p(2,"translateKey"),l()),t&2){let e=n.$implicit;x("value",e.id),o(),v(" ",Ge(2,2,e.value,"catalogs")," ")}}function VO(t,n){t&1&&(s(0,"mat-error"),c(1),p(2,"translate"),p(3,"translate"),s(4,"strong"),c(5),p(6,"translate"),l()()),t&2&&(o(),$t(" ",m(2,3,"labels.inputs.Frequency")," ",m(3,5,"labels.commons.is")," "),o(4),b(m(6,7,"labels.commons.required")))}function UO(t,n){t&1&&(s(0,"mat-form-field",11)(1,"mat-label"),c(2),p(3,"translate"),l(),T(4,"input",60),l()),t&2&&(o(2),b(m(3,1,"labels.inputs.Fixed Length")))}function HO(t,n){if(t&1&&(s(0,"span",12),c(1),p(2,"find"),l()),t&2){let e=P();o(),b(Ye(2,1,e.loansAccountTermsForm.value.loanTermFrequencyType,e.termFrequencyTypeData,"id","value"))}}function GO(t,n){t&1&&(s(0,"mat-error"),c(1),p(2,"translate"),p(3,"translate"),s(4,"strong"),c(5),p(6,"translate"),l()()),t&2&&(o(),$t(" ",m(2,3,"labels.inputs.Number of repayments")," ",m(3,5,"labels.commons.is")," "),o(4),b(m(6,7,"labels.commons.required")))}function WO(t,n){t&1&&(s(0,"mat-form-field",7)(1,"mat-label"),c(2),p(3,"translate"),l(),T(4,"input",61),l()),t&2&&(o(2),b(m(3,1,"labels.inputs.Installment Amount")))}function $O(t,n){t&1&&(s(0,"mat-error"),c(1),p(2,"translate"),p(3,"translate"),s(4,"strong"),c(5),p(6,"translate"),l()()),t&2&&(o(),$t(" ",m(2,3,"labels.inputs.Repaid every")," ",m(3,5,"labels.commons.is")," "),o(4),b(m(6,7,"labels.commons.required")))}function YO(t,n){if(t&1&&(s(0,"mat-option",10),c(1),p(2,"translateKey"),l()),t&2){let e=n.$implicit;x("value",e.id),o(),v(" ",Ge(2,2,e.value,"catalogs")," ")}}function ZO(t,n){if(t&1&&(s(0,"mat-option",10),c(1),p(2,"translateKey"),l()),t&2){let e=n.$implicit;x("value",e.id),o(),v(" ",Ge(2,2,e.value,"catalogs")," ")}}function KO(t,n){if(t&1&&(s(0,"mat-form-field",20)(1,"mat-label"),c(2),p(3,"translate"),l(),s(4,"mat-select",62),ue(5,ZO,3,5,"mat-option",10,Ce),l()()),t&2){let e=P();o(2),b(m(3,1,"labels.inputs.Select On")),o(3),fe(e.repaymentFrequencyNthDayTypeData)}}function JO(t,n){if(t&1&&(s(0,"mat-option",10),c(1),p(2,"translateKey"),l()),t&2){let e=n.$implicit;x("value",e.id),o(),v(" ",Ge(2,2,e.value,"catalogs")," ")}}function XO(t,n){if(t&1&&(s(0,"mat-form-field",20)(1,"mat-label"),c(2),p(3,"translate"),l(),s(4,"mat-select",63),ue(5,JO,3,5,"mat-option",10,Ce),l()()),t&2){let e=P();o(2),b(m(3,1,"labels.inputs.Select Day")),o(3),fe(e.repaymentFrequencyDaysOfWeekTypeData)}}function QO(t,n){t&1&&(s(0,"mat-checkbox",21),p(1,"translate"),c(2),p(3,"translate"),l()),t&2&&(x("matTooltip",ce(m(1,3,"tooltips.Leave this checkbox checked if the loan has Down Payment"))),o(2),v(" ",m(3,5,"labels.inputs.Enable Down Payment")," "))}function t6(t,n){if(t&1&&(s(0,"mat-option",10),c(1),p(2,"translateKey"),l()),t&2){let e=n.$implicit;x("value",e.id),o(),v(" ",Ge(2,2,e.value,"catalogs")," ")}}function e6(t,n){if(t&1&&(s(0,"mat-option",10),c(1),p(2,"translateKey"),l()),t&2){let e=n.$implicit;x("value",e.id),o(),v(" ",Ge(2,2,e.value,"catalogs")," ")}}function n6(t,n){if(t&1&&(s(0,"mat-option",10),c(1),p(2,"translateKey"),l()),t&2){let e=n.$implicit;x("value",e.id),o(),v(" ",Ge(2,2,e.value,"catalogs")," ")}}function i6(t,n){t&1&&(s(0,"mat-error"),c(1),p(2,"translate"),p(3,"translate"),s(4,"strong"),c(5),p(6,"translate"),l()()),t&2&&(o(),$t(" ",m(2,3,"labels.inputs.Amortization Type")," ",m(3,5,"labels.commons.is")," "),o(4),b(m(6,7,"labels.commons.required")))}function a6(t,n){t&1&&(s(0,"mat-form-field",7)(1,"mat-label"),c(2),p(3,"translate"),l(),T(4,"input",69),l()),t&2&&(o(2),b(m(3,1,"labels.inputs.Principal Percentage Per Installment")))}function o6(t,n){if(t&1&&(s(0,"mat-form-field",7)(1,"mat-label"),c(2),p(3,"translate"),l(),T(4,"input",64),l(),s(5,"mat-form-field",7)(6,"mat-label"),c(7),p(8,"translate"),l(),s(9,"mat-select",65),ue(10,t6,3,5,"mat-option",10,Ce),l(),s(12,"mat-error"),c(13),p(14,"translate"),p(15,"translate"),s(16,"strong"),c(17),p(18,"translate"),l()()(),s(19,"mat-form-field",7)(20,"mat-label"),c(21),p(22,"translate"),l(),s(23,"mat-select",66),p(24,"translate"),ue(25,e6,3,5,"mat-option",10,Ce),l()(),s(27,"mat-form-field",7)(28,"mat-label"),c(29),p(30,"translate"),l(),s(31,"mat-select",67),p(32,"translate"),ue(33,n6,3,5,"mat-option",10,Ce),l(),M(35,i6,7,9,"mat-error"),l(),M(36,a6,5,3,"mat-form-field",7),s(37,"mat-checkbox",68)(38,"p"),c(39),p(40,"translate"),l()()),t&2){let e=P();o(2),v("",m(3,15,"labels.inputs.Nominal interest rate")," %"),o(5),b(m(8,17,"labels.inputs.Frequency")),o(3),fe(e.interestRateFrequencyTypeData),o(3),$t(" ",m(14,19,"labels.inputs.Nominal interest rate frequency")," ",m(15,21,"labels.commons.is")," "),o(4),b(m(18,23,"labels.commons.required")),o(4),b(m(22,25,"labels.inputs.Interest method")),o(2),x("matTooltip",ce(m(24,27,"tooltips.The Interest method value"))),o(2),fe(e.interestTypeData),o(4),b(m(30,29,"labels.inputs.Amortization")),o(2),x("matTooltip",ce(m(32,31,"tooltips.The Amortization value"))),o(2),fe(e.amortizationTypeData),o(2),O(e.loansAccountTermsForm.controls.amortizationType.hasError("required")?35:-1),o(),O(e.isEqualPrincipalPayments()?36:-1),o(),x("checked",e.loansAccountTermsData==null?null:e.loansAccountTermsData.isEqualAmortization),o(2),b(m(40,33,"labels.inputs.Is Equal Amortization"))}}function r6(t,n){if(t&1&&(s(0,"mat-option",10),c(1),p(2,"translateKey"),l()),t&2){let e=n.$implicit;x("value",e.id),o(),v(" ",Ge(2,2,e.value,"catalogs")," ")}}function l6(t,n){if(t&1&&(s(0,"mat-option",10),c(1),p(2,"translateKey"),l()),t&2){let e=n.$implicit;x("value",e.id),o(),v(" ",Ge(2,2,e.value,"catalogs")," ")}}function s6(t,n){t&1&&(s(0,"mat-error"),c(1),p(2,"translate"),p(3,"translate"),s(4,"strong"),c(5),p(6,"translate"),l()()),t&2&&(o(),$t(" ",m(2,3,"labels.inputs.Amortization Type")," ",m(3,5,"labels.commons.is")," "),o(4),b(m(6,7,"labels.commons.required")))}function c6(t,n){if(t&1&&(s(0,"div",22)(1,"mat-form-field",23)(2,"mat-label"),c(3),p(4,"translate"),l(),s(5,"mat-select",70),ue(6,r6,3,5,"mat-option",10,Ce),l()(),s(8,"mat-form-field",23)(9,"mat-label"),c(10),p(11,"translate"),l(),s(12,"mat-select",67),p(13,"translate"),ue(14,l6,3,5,"mat-option",10,Ce),l(),M(16,s6,7,9,"mat-error"),l(),s(17,"mat-checkbox",71)(18,"p"),c(19),p(20,"translate"),l()()()),t&2){let e=P();o(3),b(m(4,6,"labels.inputs.Interest Method")),o(3),fe(e.interestTypeData),o(4),b(m(11,8,"labels.inputs.Amortization")),o(2),x("matTooltip",ce(m(13,10,"tooltips.The Amortization value"))),o(2),fe(e.amortizationTypeData),o(2),O(e.loansAccountTermsForm.controls.amortizationType.hasError("required")?16:-1),o(3),v("",m(20,12,"labels.inputs.Is Floating Rate"),"?")}}function p6(t,n){if(t&1&&(s(0,"div",23)(1,"div",72)(2,"span",35)(3,"p"),c(4),p(5,"translate"),l()(),s(6,"span",36)(7,"p"),c(8),p(9,"translateKey"),l()()()()),t&2){let e=P();o(4),b(m(5,2,"labels.inputs.Loan Schedule Type")),o(4),b(Ge(9,4,e.loanScheduleType.value,"catalogs"))}}function m6(t,n){if(t&1&&(s(0,"mat-option",10),c(1),p(2,"translateKey"),l()),t&2){let e=n.$implicit;x("value",e.code),o(),v(" ",Ge(2,2,e.name,"catalogs")," ")}}function d6(t,n){t&1&&(s(0,"mat-error"),c(1),p(2,"translate"),p(3,"translate"),s(4,"strong"),c(5),p(6,"translate"),l()()),t&2&&(o(),$t(" ",m(2,3,"labels.inputs.Repayment Strategy")," ",m(3,5,"labels.commons.is")," "),o(4),b(m(6,7,"labels.commons.required")))}function u6(t,n){if(t&1&&(s(0,"mat-option",10),c(1),p(2,"translateKey"),l()),t&2){let e=n.$implicit;x("value",e.id),o(),v(" ",Ge(2,2,e.value,"catalogs")," ")}}function f6(t,n){t&1&&(X(0,27),s(1,"mat-checkbox",73)(2,"p"),c(3),p(4,"translate"),l()(),Q()),t&2&&(o(3),b(m(4,1,"labels.inputs.Is interest recognition on disbursement date?")))}function h6(t,n){if(t&1&&(s(0,"div",33)(1,"p")(2,"span",74)(3,"b"),c(4),p(5,"translate"),l()(),s(6,"span",23),c(7),l()()()),t&2){let e=P();o(4),b(m(5,2,"labels.inputs.Delinquency Bucket")),o(3),b(e.loanProduct==null?null:e.loanProduct.delinquencyBucket.name)}}function g6(t,n){t&1&&(s(0,"div",23)(1,"mat-checkbox",75)(2,"p"),c(3),p(4,"translate"),l()()()),t&2&&(o(3),b(m(4,1,"labels.inputs.Enable installment level Delinquency")))}function _6(t,n){if(t&1&&(s(0,"mat-option",10),c(1),l()),t&2){let e=n.$implicit;x("value",e.id),o(),v(" ",e.accountNo," ")}}function C6(t,n){if(t&1&&(s(0,"mat-form-field",77)(1,"mat-label"),c(2),p(3,"translate"),l(),s(4,"mat-select",78),ue(5,_6,2,2,"mat-option",10,Ce),l()()),t&2){let e=P(2);o(2),b(m(3,1,"labels.inputs.Loan closed with Topup")),o(3),fe(e.clientActiveLoanData)}}function b6(t,n){if(t&1&&(X(0,23),s(1,"mat-checkbox",76)(2,"p"),c(3),p(4,"translate"),l()(),M(5,C6,7,3,"mat-form-field",77),Q()),t&2){let e=P();o(3),v("",m(4,2,"labels.inputs.Is Topup Loan"),"?"),o(2),O(e.loansAccountTermsForm.controls.isTopup.value?5:-1)}}function v6(t,n){if(t&1&&(s(0,"div",34)(1,"span",35),c(2),p(3,"translate"),l(),s(4,"span",36),c(5),p(6,"translateKey"),l()()),t&2){let e=P();o(2),b(m(3,2,"labels.inputs.Days in year")),o(3),b(Ge(6,4,e.loansAccountTermsData.daysInYearType.value,"catalogs"))}}function x6(t,n){if(t&1&&(s(0,"div",34)(1,"span",35),c(2),p(3,"translate"),l(),s(4,"span",36),c(5),p(6,"translateKey"),l()()),t&2){let e=P();o(2),b(m(3,2,"labels.inputs.Days in month")),o(3),b(Ge(6,4,e.loansAccountTermsData.daysInMonthType.value,"catalogs"))}}function y6(t,n){if(t&1&&(s(0,"div",34)(1,"span",35),c(2),p(3,"translate"),l(),s(4,"span",36),c(5),l()()),t&2){let e=P();o(2),b(m(3,2,"labels.inputs.Advance payments adjustment type")),o(3),b(e.loansAccountTermsData.interestRecalculationData.rescheduleStrategyType.value)}}function S6(t,n){if(t&1&&(s(0,"span"),c(1),l()),t&2){let e=P(2);o(),v(" on ",e.loansAccountTermsData.interestRecalculationData.recalculationRestFrequencyWeekday.value)}}function D6(t,n){if(t&1&&(s(0,"span"),c(1),l()),t&2){let e=P(2);o(),v("on day ",e.loansAccountTermsData.interestRecalculationData.recalculationRestFrequencyOnDay)}}function w6(t,n){if(t&1&&(s(0,"span"),c(1),l()),t&2){let e=P(2);o(),$t("on ",e.loansAccountTermsData.interestRecalculationData.recalculationRestFrequencyNthDay.value," ",e.loansAccountTermsData.interestRecalculationData.recalculationRestFrequencyWeekday.value)}}function T6(t,n){if(t&1&&(s(0,"div",34)(1,"span",35),c(2),p(3,"translate"),l(),s(4,"span",36),c(5),p(6,"translateKey"),l()(),s(7,"div",34)(8,"span",35),c(9),p(10,"translate"),l(),s(11,"span",36)(12,"span"),c(13),l(),M(14,S6,2,1,"span"),M(15,D6,2,1,"span"),M(16,w6,2,2,"span"),l()()),t&2){let e=P();o(2),b(m(3,7,"labels.inputs.Interest recalculation compounding on")),o(3),b(Ge(6,9,e.loansAccountTermsData.interestRecalculationData.interestRecalculationCompoundingType.value,"catalogs")),o(4),b(m(10,12,"labels.inputs.Frequency Interval for recalculation")),o(4),b(e.loansAccountTermsData.interestRecalculationData.recalculationRestFrequencyType.value),o(),O(e.loansAccountTermsData.interestRecalculationData.recalculationRestFrequencyType.id===3&&e.loansAccountTermsData.interestRecalculationData.recalculationRestFrequencyWeekday?14:-1),o(),O(e.loansAccountTermsData.interestRecalculationData.recalculationRestFrequencyType.id===4&&e.loansAccountTermsData.interestRecalculationData.recalculationRestFrequencyOnDay?15:-1),o(),O(e.loansAccountTermsData.interestRecalculationData.recalculationRestFrequencyType.id===4&&!e.loansAccountTermsData.interestRecalculationData.recalculationRestFrequencyOnDay&&e.loansAccountTermsData.interestRecalculationData.recalculationRestFrequencyNthDay?16:-1)}}function P6(t,n){if(t&1&&(s(0,"div",34)(1,"span",35),c(2),p(3,"translate"),l(),s(4,"span",36),c(5),l()()),t&2){let e=P();o(2),b(m(3,2,"labels.inputs.Frequency Interval for recalculation")),o(3),b(e.loansAccountTermsData.interestRecalculationData.recalculationRestFrequencyInterval)}}function A6(t,n){t&1&&(s(0,"div",34)(1,"h4",5),c(2),p(3,"translate"),l()()),t&2&&(o(2),b(m(3,1,"labels.heading.Loan Tranche Details")))}function M6(t,n){t&1&&(s(0,"mat-checkbox",79),p(1,"translate"),c(2),p(3,"translate"),l()),t&2&&(x("matTooltip",ce(m(1,3,"tooltips.Allow full term length for each tranche disbursement"))),o(2),v(" ",m(3,5,"labels.inputs.Allow full term for each tranche")," "))}function O6(t,n){t&1&&(s(0,"mat-error"),c(1),p(2,"translate"),p(3,"translate"),s(4,"strong"),c(5),p(6,"translate"),l()()),t&2&&(o(),$t(" ",m(2,3,"labels.inputs.Maximum allowed outstanding balance")," ",m(3,5,"labels.commons.is")," "),o(4),b(m(6,7,"labels.commons.required")))}function I6(t,n){t&1&&(s(0,"div",34)(1,"h4",5),c(2),p(3,"translate"),l()()),t&2&&(o(2),v(" ",m(3,1,"labels.heading.Loan Tranche Details are not allowed for this Loan Product")," "))}function E6(t,n){t&1&&(s(0,"th",87),c(1),p(2,"translate"),l()),t&2&&(o(),b(m(2,1,"labels.inputs.Expected Disbursement Date")))}function L6(t,n){if(t&1&&(s(0,"td",88),c(1),p(2,"dateFormat"),l()),t&2){let e=n.$implicit;o(),v(" ",m(2,1,e.expectedDisbursementDate)," ")}}function N6(t,n){t&1&&(s(0,"th",87),c(1),p(2,"translate"),l()),t&2&&(o(),b(m(2,1,"labels.inputs.Principal")))}function k6(t,n){if(t&1&&(s(0,"td",88),c(1),l()),t&2){let e=n.$implicit;o(),v(" ",e.principal," ")}}function F6(t,n){t&1&&(s(0,"th",87),c(1),p(2,"translate"),l()),t&2&&(o(),b(m(2,1,"labels.inputs.Actions")))}function R6(t,n){if(t&1){let e=xt();s(0,"td",88)(1,"button",89),p(2,"translate"),it("click",function(){let a=mt(e).index,r=P(2);return dt(r.removeDisbursementDataEntry(a))}),T(3,"fa-icon",90),l()()}t&2&&(o(),x("matTooltip",ce(m(2,2,"tooltips.Delete"))))}function B6(t,n){t&1&&T(0,"tr",91)}function q6(t,n){t&1&&T(0,"tr",92)}function j6(t,n){if(t&1){let e=xt();T(0,"mat-divider",27),M(1,A6,4,3,"div",34),M(2,M6,4,7,"mat-checkbox",79),s(3,"div",34)(4,"mat-form-field",23)(5,"mat-label"),c(6),p(7,"translate"),l(),T(8,"input",80),M(9,O6,7,9,"mat-error"),l(),s(10,"span",23)(11,"button",81),it("click",function(){mt(e);let a=P();return dt(a.addDisbursementDataEntry(a.disbursementData))}),T(12,"fa-icon",82),l()()(),M(13,I6,4,3,"div",34),s(14,"table",83),X(15,84),k(16,E6,3,3,"th",46)(17,L6,3,3,"td",47),Q(),X(18,85),k(19,N6,3,3,"th",46)(20,k6,2,1,"td",47),Q(),X(21,86),k(22,F6,3,3,"th",46)(23,R6,4,4,"td",47),Q(),k(24,B6,1,0,"tr",52)(25,q6,1,0,"tr",53),l()}if(t&2){let e=P();o(),O(e.allowAddDisbursementDetails()?1:-1),o(),O(e.isFullTermTrancheEditable()?2:-1),o(4),b(m(7,10,"labels.inputs.Maximum allowed outstanding balance")),o(3),O(e.loansAccountTermsForm.controls.maxOutstandingLoanBalance.hasError("required")?9:-1),o(2),x("disabled",e.isMultiDisbursedCompleted),o(2),O(e.allowAddDisbursementDetails()?-1:13),o(),x("dataSource",e.disbursementDataSource)("hidden",e.disbursementDataSource.length===0),o(10),x("matHeaderRowDef",e.disbursementDisplayedColumns),o(),x("matRowDefColumns",e.disbursementDisplayedColumns)}}function z6(t,n){if(t&1&&(s(0,"span"),c(1),l()),t&2){let e=P(2);o(),v(" on ",e.loansAccountTermsData.interestRecalculationData.recalculationCompoundingFrequencyWeekday.value," ")}}function V6(t,n){if(t&1&&(s(0,"span"),c(1),l()),t&2){let e=P(2);o(),v("on day ",e.loansAccountTermsData.interestRecalculationData.recalculationCompoundingFrequencyOnDay," ")}}function U6(t,n){if(t&1&&(s(0,"span"),c(1),l()),t&2){let e=P(2);o(),$t("on ",e.loansAccountTermsData.interestRecalculationData.recalculationCompoundingFrequencyNthDay.value," ",e.loansAccountTermsData.interestRecalculationData.recalculationCompoundingFrequencyWeekday.value," ")}}function H6(t,n){if(t&1&&(s(0,"div",37)(1,"span",35),c(2),p(3,"translate"),l(),s(4,"span",36),c(5),M(6,z6,2,1,"span"),M(7,V6,2,1,"span"),M(8,U6,2,2,"span"),l()()),t&2){let e=P();o(2),b(m(3,5,"labels.inputs.Frequency for compounding")),o(3),v("",e.loansAccountTermsData.interestRecalculationData.recalculationCompoundingFrequencyType.value," "),o(),O(e.loansAccountTermsData.interestRecalculationData.recalculationCompoundingFrequencyType.id===3&&e.loansAccountTermsData.interestRecalculationData.recalculationCompoundingFrequencyWeekday?6:-1),o(),O(e.loansAccountTermsData.interestRecalculationData.recalculationCompoundingFrequencyType.id===4&&e.loansAccountTermsData.interestRecalculationData.recalculationCompoundingFrequencyOnDay?7:-1),o(),O(e.loansAccountTermsData.interestRecalculationData.recalculationCompoundingFrequencyType.id===4&&!e.loansAccountTermsData.interestRecalculationData.recalculationCompoundingFrequencyOnDay&&e.loansAccountTermsData.interestRecalculationData.recalculationCompoundingFrequencyNthDay?8:-1)}}function G6(t,n){if(t&1&&(s(0,"div",37)(1,"span",35),c(2),p(3,"translate"),l(),s(4,"span",36),c(5),l()()),t&2){let e=P();o(2),b(m(3,2,"labels.inputs.Frequency Interval for compounding")),o(3),b(e.loansAccountTermsData.interestRecalculationData.recalculationCompoundingFrequencyInterval)}}function W6(t,n){t&1&&(s(0,"th",87),c(1),p(2,"translate"),l()),t&2&&(o(),b(m(2,1,"labels.inputs.name")))}function $6(t,n){if(t&1&&(s(0,"td",88),c(1),l()),t&2){let e=n.$implicit;o(),b(e.type.name)}}function Y6(t,n){t&1&&(s(0,"th",87),c(1),p(2,"translate"),l()),t&2&&(o(),b(m(2,1,"labels.inputs.Quantity")))}function Z6(t,n){if(t&1&&(s(0,"td",88),c(1),l()),t&2){let e=n.$implicit;o(),b(e.value)}}function K6(t,n){t&1&&(s(0,"th",87),c(1),p(2,"translate"),l()),t&2&&(o(),b(m(2,1,"labels.inputs.Total Value")))}function J6(t,n){if(t&1&&(s(0,"td",88),c(1),l()),t&2){let e=n.$implicit;o(),b(e.type.basePrice*e.value)}}function X6(t,n){t&1&&(s(0,"th",87),c(1),p(2,"translate"),l()),t&2&&(o(),b(m(2,1,"labels.inputs.Total Collateral Value")))}function Q6(t,n){if(t&1&&(s(0,"td",88),c(1),l()),t&2){let e=n.$implicit;o(),b(e.type.pctToBase*e.type.basePrice*e.value/100)}}function tI(t,n){t&1&&(s(0,"th",87),c(1),p(2,"translate"),l()),t&2&&(o(),b(m(2,1,"labels.inputs.Actions")))}function eI(t,n){if(t&1){let e=xt();s(0,"td",88)(1,"button",93),it("click",function(){let a=mt(e).index,r=P();return dt(r.deleteCollateral(a))}),T(2,"fa-icon",90),l()()}}function nI(t,n){t&1&&T(0,"tr",91)}function iI(t,n){t&1&&T(0,"tr",92)}function aI(t,n){t&1&&(s(0,"button",59),c(1),p(2,"translate"),l()),t&2&&(x("routerLink",Ut(4,BO)),o(),v(" ",m(2,2,"labels.buttons.Cancel")," "))}var Io=(()=>{class t{constructor(){this.formBuilder=A(Te),this.settingsService=A(oe),this.route=A(Et),this.dialog=A(Gn),this.minDate=new Date(2e3,0,1),this.maxDate=new Date(2100,0,1),this.disbursementDataSource=[],this.transactionProcessingStrategyOptions=[],this.repaymentStrategyDisabled=!1,this.isCollateralSufficient=!1,this.totalCollateralValue=0,this.collateralDataSource=[],this.loanCollateralDisplayedColumns=["type","value","totalValue","totalCollateralValue","action"],this.disbursementDisplayedColumns=["expectedDisbursementDate","principal","actions"],this.totalMultiDisbursed=0,this.isMultiDisbursedCompleted=!1,this.pristine=!0,this.loanId=null,this.loanScheduleType=null,this.loanProduct=null,this.interestRateFrequencyTypeData=[],this.productEnableDownPayment=!1,this.enableIncomeCapitalization=!1,this.enableBuyDownFee=!1,this.isProgressive=!1,this.loanId=this.route.snapshot.params.loanId,this.createloansAccountTermsForm()}ngOnChanges(){if(this.loansAccountProductTemplate){if(this.currency=this.loansAccountProductTemplate.currency,this.loansAccountTermsData=this.loansAccountProductTemplate,this.loanId!=null&&this.loansAccountTemplate.accountNo&&(this.loansAccountTermsData=this.loansAccountTemplate),this.productEnableDownPayment=this.loansAccountTermsData.product.enableDownPayment,this.enableIncomeCapitalization=this.loansAccountTermsData.product.enableIncomeCapitalization,this.enableBuyDownFee=this.loansAccountTermsData.product.enableBuyDownFee,this.isProgressive=this.loansAccountTermsData.loanScheduleType.code==Gr.LOAN_SCHEDULE_TYPE_PROGRESSIVE,this.loansAccountTermsData.product&&(this.loanProduct=this.loansAccountTermsData.product),this.interestRateFrequencyTypeData=this.loansAccountTermsData.interestRateFrequencyTypeOptions,this.loansAccountTermsForm.patchValue({principalAmount:this.loansAccountTermsData.principal,loanTermFrequency:this.loansAccountTermsData.termFrequency,loanTermFrequencyType:this.loansAccountTermsData.termPeriodFrequencyType.id,numberOfRepayments:this.loansAccountTermsData.numberOfRepayments,repaymentEvery:this.loansAccountTermsData.repaymentEvery,repaymentFrequencyType:this.loansAccountTermsData.repaymentFrequencyType.id,amortizationType:this.loansAccountTermsData.amortizationType.id,isEqualAmortization:this.loansAccountTermsData.isEqualAmortization,interestType:this.loansAccountTermsData.interestType.id,isFloatingInterestRate:this.loansAccountTermsData.isLoanProductLinkedToFloatingRate?!1:null,interestCalculationPeriodType:this.loansAccountTermsData.interestCalculationPeriodType.id,allowPartialPeriodInterestCalculation:this.loansAccountTermsData.allowPartialPeriodInterestCalculation,inArrearsTolerance:this.loansAccountTermsData.inArrearsTolerance,graceOnPrincipalPayment:this.loansAccountTermsData.graceOnPrincipalPayment,graceOnInterestPayment:this.loansAccountTermsData.graceOnInterestPayment,graceOnArrearsAgeing:this.loansAccountTermsData.graceOnArrearsAgeing,graceOnInterestCharged:this.loansAccountTermsData.graceOnInterestCharged,fixedEmiAmount:this.loansAccountTermsData.fixedEmiAmount,maxOutstandingLoanBalance:this.loansAccountTermsData.maxOutstandingLoanBalance,transactionProcessingStrategyCode:this.loansAccountTermsData.transactionProcessingStrategyCode,interestRateDifferential:this.loansAccountTermsData.interestRateDifferential,multiDisburseLoan:this.loansAccountTermsData.multiDisburseLoan,interestRateFrequencyType:this.loansAccountTermsData.interestRateFrequencyType.id,balloonRepaymentAmount:this.loansAccountTermsData.balloonRepaymentAmount,interestRecognitionOnDisbursementDate:this.loansAccountTermsData.interestRecognitionOnDisbursementDate||!1}),this.setAdvancedPaymentStrategyControls(),this.loansAccountTermsData.loanScheduleType.code==Gr.LOAN_SCHEDULE_TYPE_CUMULATIVE&&this.loansAccountTermsForm.removeControl("interestRecognitionOnDisbursementDate"),this.loansAccountTermsData.isLoanProductLinkedToFloatingRate&&this.loansAccountTermsForm.removeControl("interestRatePerPeriod"),this.multiDisburseLoan=this.loansAccountTermsData.multiDisburseLoan,this.loansAccountTermsData.disbursementDetails&&(this.disbursementDataSource=this.loansAccountTermsData.disbursementDetails,this.totalMultiDisbursed=0,this.disbursementDataSource.forEach(i=>{this.totalMultiDisbursed+=i.principal})),this.isDelinquencyEnabled()&&this.loansAccountTermsForm.addControl("enableInstallmentLevelDelinquency",new pe(this.loansAccountTermsData.enableInstallmentLevelDelinquency||this.loanProduct.enableInstallmentLevelDelinquency)),this.collateralDataSource=this.loansAccountTermsData.collateral||[],this.productEnableDownPayment){let i=this.loansAccountTermsData.enableDownPayment!==!1;this.loansAccountTermsForm.addControl("enableDownPayment",new pe(i))}if(this.isFullTermTrancheEditable()){let i=this.loansAccountTermsData.allowFullTermForTranche??this.loanProduct?.allowFullTermForTranche??!1;this.loansAccountTermsForm.patchValue({allowFullTermForTranche:i})}let e=this.loansAccountTermsData.product.allowAttributeOverrides;e.repaymentEvery||(this.loansAccountTermsForm.controls.repaymentEvery.disable(),this.loansAccountTermsForm.controls.repaymentFrequencyType.disable()),e.interestType||this.loansAccountTermsForm.controls.interestType.disable(),e.amortizationType||this.loansAccountTermsForm.controls.amortizationType.disable(),e.interestCalculationPeriodType||(this.loansAccountTermsForm.controls.interestCalculationPeriodType.disable(),this.loansAccountTermsForm.controls.allowPartialPeriodInterestCalculation.disable()),e.inArrearsTolerance||this.loansAccountTermsForm.controls.inArrearsTolerance.disable(),e.transactionProcessingStrategyCode||this.loansAccountTermsForm.controls.transactionProcessingStrategyCode.disable(),e.graceOnPrincipalAndInterestPayment||this.loansAccountTermsForm.controls.graceOnPrincipalPayment.disable(),e.graceOnPrincipalAndInterestPayment||this.loansAccountTermsForm.controls.graceOnInterestPayment.disable(),e.graceOnArrearsAgeing||this.loansAccountTermsForm.controls.graceOnArrearsAgeing.disable(),this.setOptions(),this.loansAccountTermsForm.removeControl("maxOutstandingLoanBalance"),this.allowAddDisbursementDetails()?this.loansAccountTermsForm.addControl("maxOutstandingLoanBalance",new pe(this.loansAccountTermsData?.maxOutstandingLoanBalance??null,Gt.required)):this.loansAccountTermsForm.addControl("maxOutstandingLoanBalance",new pe(this.loansAccountTermsData?.maxOutstandingLoanBalance??null))}}ngOnInit(){if(this.maxDate=this.settingsService.maxFutureDate,this.loansAccountTermsData=this.loansAccountProductTemplate,this.loanId!=null&&this.loansAccountTemplate.accountNo&&(this.loansAccountTermsData=this.loansAccountTemplate),this.loansAccountTermsData){if(this.loansAccountTermsData.loanProductId){let e=null;if(this.loansAccountTermsData.expectedFirstRepaymentOnDate){let i=new Date(this.loansAccountTermsData.expectedFirstRepaymentOnDate);e=this.formatDateToDDMMYYYY(i)}this.loansAccountTermsForm.patchValue({repaymentsStartingFromDate:this.loansAccountTermsData.expectedFirstRepaymentOnDate&&e})}this.loansAccountTermsForm.patchValue({principalAmount:this.loansAccountTermsData.principal,loanTermFrequency:this.loansAccountTermsData.termFrequency,loanTermFrequencyType:this.loansAccountTermsData.termPeriodFrequencyType.id,numberOfRepayments:this.loansAccountTermsData.numberOfRepayments,repaymentEvery:this.loansAccountTermsData.repaymentEvery,repaymentFrequencyType:this.loansAccountTermsData.repaymentFrequencyType.id,amortizationType:this.loansAccountTermsData.amortizationType.id,isEqualAmortization:this.loansAccountTermsData.isEqualAmortization,interestType:this.loansAccountTermsData.interestType.id,isFloatingInterestRate:this.loansAccountTermsData.isLoanProductLinkedToFloatingRate?!1:null,interestCalculationPeriodType:this.loansAccountTermsData.interestCalculationPeriodType.id,allowPartialPeriodInterestCalculation:this.loansAccountTermsData.allowPartialPeriodInterestCalculation,inArrearsTolerance:this.loansAccountTermsData.inArrearsTolerance,graceOnPrincipalPayment:this.loansAccountTermsData.graceOnPrincipalPayment,graceOnInterestPayment:this.loansAccountTermsData.graceOnInterestPayment,graceOnArrearsAgeing:this.loansAccountTermsData.graceOnArrearsAgeing,graceOnInterestCharged:this.loansAccountTermsData.graceOnInterestCharged,fixedEmiAmount:this.loansAccountTermsData.fixedEmiAmount,maxOutstandingLoanBalance:this.loansAccountTermsData.maxOutstandingLoanBalance,transactionProcessingStrategyCode:this.loansAccountTermsData.transactionProcessingStrategyCode,interestRateDifferential:this.loansAccountTermsData.interestRateDifferential,multiDisburseLoan:this.loansAccountTermsData.multiDisburseLoan,interestRateFrequencyType:this.loansAccountTermsData.interestRateFrequencyType.id,balloonRepaymentAmount:this.loansAccountTermsData.balloonRepaymentAmount,interestRecognitionOnDisbursementDate:this.loansAccountTermsData.interestRecognitionOnDisbursementDate||!1})}this.createloansAccountTermsForm(),this.setAdvancedPaymentStrategyControls(),this.setLoanTermListener(),this.loansAccountTermsForm.removeControl("maxOutstandingLoanBalance"),this.allowAddDisbursementDetails()?(this.loansAccountTermsForm.removeControl("maxOutstandingLoanBalance"),this.loansAccountTermsForm.addControl("maxOutstandingLoanBalance",new pe(this.loansAccountTermsData?.maxOutstandingLoanBalance??null,Gt.required))):this.loansAccountTermsForm.addControl("maxOutstandingLoanBalance",new pe(this.loansAccountTermsData?.maxOutstandingLoanBalance??null))}allowAddDisbursementDetails(){return this.multiDisburseLoan&&!this.loansAccountTermsData.disallowExpectedDisbursements}formatDateToDDMMYYYY(e){let i=e.getDate().toString().padStart(2,"0"),a=(e.getMonth()+1).toString().padStart(2,"0"),r=e.getFullYear();return`${i}-${a}-${r}`}setCustomValidators(){let e=this.loansAccountTermsForm.get("repaymentFrequencyNthDayType"),i=this.loansAccountTermsForm.get("repaymentFrequencyDayOfWeekType");this.loansAccountTermsForm.get("repaymentFrequencyType").valueChanges.subscribe(a=>{a===2?(e.setValidators([Gt.required]),i.setValidators([Gt.required])):(e.setValidators(null),i.setValidators(null)),e.updateValueAndValidity(),i.updateValueAndValidity()})}setLoanTermListener(){this.loansAccountTermsForm.get("numberOfRepayments").valueChanges.subscribe(e=>{let i=this.loansAccountTermsForm.value.repaymentEvery;this.calculateLoanTerm(e,i)}),this.loansAccountTermsForm.get("repaymentEvery").valueChanges.subscribe(e=>{let i=this.loansAccountTermsForm.value.numberOfRepayments;this.calculateLoanTerm(i,e)}),this.loansAccountTermsForm.get("loanTermFrequencyType").valueChanges.subscribe(e=>{this.loansAccountTermsForm.patchValue({repaymentFrequencyType:e})}),this.loansAccountTermsForm.get("amortizationType").valueChanges.subscribe(e=>{e===0?this.loansAccountTermsForm.addControl("fixedPrincipalPercentagePerInstallment",new pe("")):this.loansAccountTermsForm.removeControl("fixedPrincipalPercentagePerInstallment")})}setAdvancedPaymentStrategyControls(){this.loansAccountTermsData&&(this.loansAccountTermsForm.removeControl("interestRatePerPeriod"),this.loansAccountTermsForm.removeControl("fixedLength"),this.loansAccountTermsData.product.fixedLength?(this.loansAccountTermsForm.addControl("interestRatePerPeriod",new pe({value:0,disabled:!0},Gt.required)),this.loansAccountTermsForm.addControl("fixedLength",new pe(this.loansAccountTermsData.product.fixedLength))):this.loansAccountTermsForm.addControl("interestRatePerPeriod",new pe(this.loansAccountTermsData.interestRatePerPeriod,Gt.required)))}hasFixedLength(){return this.loansAccountTermsData?!!this.loansAccountTermsData.product?.fixedLength:!1}isEqualPrincipalPayments(){return this.loansAccountTermsForm.value.amortizationType===0}createloansAccountTermsForm(){this.loansAccountTermsForm=this.formBuilder.group({principalAmount:["",Gt.required],loanTermFrequency:[{value:"",disabled:!0},Gt.required],loanTermFrequencyType:["",Gt.required],numberOfRepayments:["",Gt.required],repaymentEvery:["",Gt.required],repaymentFrequencyType:[{value:"",disabled:!0},Gt.required],repaymentFrequencyNthDayType:[""],repaymentFrequencyDayOfWeekType:[""],repaymentsStartingFromDate:[""],interestChargedFromDate:[""],interestRatePerPeriod:[""],interestType:[""],isFloatingInterestRate:[null],isEqualAmortization:[""],amortizationType:["",Gt.required],interestCalculationPeriodType:[""],allowPartialPeriodInterestCalculation:[""],inArrearsTolerance:[""],graceOnInterestCharged:[""],graceOnPrincipalPayment:[""],graceOnInterestPayment:[""],graceOnArrearsAgeing:[""],loanIdToClose:[""],fixedEmiAmount:[""],isTopup:[""],maxOutstandingLoanBalance:[""],interestRateDifferential:[""],transactionProcessingStrategyCode:["",Gt.required],multiDisburseLoan:[!1],interestRateFrequencyType:[""],balloonRepaymentAmount:[""],interestRecognitionOnDisbursementDate:[!1],allowFullTermForTranche:[!1]})}calculateLoanTerm(e,i){let a=e*i;this.loansAccountTermsForm.patchValue({loanTermFrequency:a})}get disbursementData(){return{disbursementData:this.disbursementDataSource}}addDisbursementDataEntry(){let e=this.loansAccountTermsForm.get("principalAmount").value,i=[new la({controlName:"expectedDisbursementDate",label:"Expected Disbursement Date",value:new Date||"",type:"datetime-local",minDate:this.minDate,maxDate:this.maxDate,required:!0,order:1}),new Ti({controlName:"principal",label:`Principal(It should be less than equal to the ${e})`,value:"",type:"number",required:!0,order:2})],a={title:"Add Disbursement Details",layout:{addButtonText:"Add"},formfields:i};this.dialog.open(_i,{data:a}).afterClosed().subscribe(u=>{if(u.data){let d=u.data.value.principal*1;this.totalMultiDisbursed+d<=e&&(this.disbursementDataSource=this.disbursementDataSource.concat(u.data.value),this.totalMultiDisbursed+=d,this.isMultiDisbursedCompleted=this.totalMultiDisbursed===e,this.pristine=!1)}})}removeDisbursementDataEntry(e){let i=this.loansAccountTermsForm.get("principalAmount").value;this.dialog.open(ra,{data:{deleteContext:"this"}}).afterClosed().subscribe(r=>{if(r.delete){let u=this.disbursementDataSource[e].principal*1;this.disbursementDataSource.splice(e,1),this.disbursementDataSource=this.disbursementDataSource.concat([]),this.totalMultiDisbursed-=u,this.isMultiDisbursedCompleted=this.totalMultiDisbursed===i}})}addCollateral(){this.dialog.open(l0,{data:{collateralOptions:this.collateralOptions}}).afterClosed().subscribe(i=>{if(i.data){let a={type:i.data.value.collateral,value:i.data.value.quantity};this.totalCollateralValue+=a.type.pctToBase*a.type.basePrice*a.value/100,this.collateralDataSource=this.collateralDataSource.concat(a),this.collateralOptions=this.collateralOptions.filter(r=>r.collateralId!==i.data.value.collateral.collateralId),this.loanPrincipal{if(a.delete){let r=this.collateralDataSource.splice(e,1);this.collateralOptions=this.collateralOptions.concat(r[0].type),this.totalCollateralValue-=r[0].type.pctToBase*r[0].type.basePrice*r[0].value/100,this.collateralDataSource=this.collateralDataSource.concat([]),this.pristine=!1,this.loanPrincipal!Gr.isAdvancedPaymentAllocationStrategy(e.code)),this.repaymentStrategyDisabled=!1):(this.loansAccountProductTemplate.transactionProcessingStrategyOptions.some(e=>{Gr.isAdvancedPaymentAllocationStrategy(e.code)&&this.transactionProcessingStrategyOptions.push(e)}),this.repaymentStrategyDisabled=!0)}isDelinquencyEnabled(){return!!this.loanProduct?.delinquencyBucket?.name}get loansAccountTerms(){return this.loansAccountTermsForm.getRawValue()}get loanCollateral(){return{collateral:this.collateralDataSource}}isFullTermTrancheEditable(){return this.isProgressive&&this.multiDisburseLoan===!0}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=Dt({type:t,selectors:[["mifosx-loans-account-terms-step"]],inputs:{loansProductOptions:"loansProductOptions",loansAccountProductTemplate:"loansAccountProductTemplate",loansAccountTemplate:"loansAccountTemplate",loansAccountFormValid:"loansAccountFormValid",collateralOptions:"collateralOptions",loanPrincipal:"loanPrincipal"},features:[Vr],decls:218,vars:185,consts:[["repaymentsPicker",""],["interestPicker",""],[3,"formGroup"],[1,"layout-row-wrap","gap-2px","responsive-column"],[1,"flex-48",3,"currency","isRequired","inputFormControl","inputLabel"],[1,"mat-h4","flex-98"],[1,"fas","fa-question",3,"matTooltip"],[1,"flex-fill","flex-23"],["type","number","matInput","","required","","disabled","","formControlName","loanTermFrequency"],["required","","formControlName","loanTermFrequencyType"],[3,"value"],[1,"flex-fill","flex-20"],[1,"flex-20","label-field"],["type","number","matInput","","formControlName","numberOfRepayments",3,"matTooltip"],[1,"flex-fill","flex-23",3,"click"],["matInput","","formControlName","repaymentsStartingFromDate",3,"min","max","matTooltip","matDatepicker"],["matSuffix","",3,"for"],["matInput","","formControlName","interestChargedFromDate",3,"min","max","matDatepicker","matTooltip"],["type","number","matInput","","required","","formControlName","repaymentEvery",3,"matTooltip"],["formControlName","repaymentFrequencyType","disabled","","required",""],[1,"flex-fill","flex-14"],["labelPosition","before","formControlName","enableDownPayment",1,"margin-b","flex-73",3,"matTooltip"],[1,"flex-48","layout-row","layout-xs-column"],[1,"flex-48"],["formControlName","transactionProcessingStrategyCode",3,"matTooltip","disabled"],["formControlName","interestCalculationPeriodType",3,"matTooltip"],["formControlName","allowPartialPeriodInterestCalculation",1,"flex-98",3,"matTooltip"],[1,"flex-98"],["matInput","","type","number","formControlName","inArrearsTolerance",3,"matTooltip"],["matInput","","formControlName","graceOnInterestCharged",3,"matTooltip"],["type","number","matInput","","formControlName","graceOnPrincipalPayment"],["type","number","matInput","","formControlName","graceOnInterestPayment"],["type","number","matInput","","formControlName","graceOnArrearsAgeing"],[1,"flex-48","flex-fill"],[1,"flex-100","layout-row"],[1,"flex-40"],[1,"flex-60"],[1,"flex-fill"],[1,"flex-50"],[1,"layout-column","table-name","flex-50"],[1,"layout-column","flex-50"],[1,"layout-row","align-flex-end"],["mat-raised-button","","color","primary",3,"click"],["icon","plus",1,"m-r-10"],["mat-table","",1,"mat-elevation-z1",3,"dataSource"],["matColumnDef","type"],["mat-header-cell","",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","value"],["matColumnDef","totalValue"],["matColumnDef","totalCollateralValue"],["matColumnDef","action"],["mat-header-row","",4,"matHeaderRowDef"],["mat-row","",4,"matRowDef","matRowDefColumns"],[1,"layout-row","align-center","gap-2percent","margin-t","responsive-column"],["mat-raised-button","","matStepperPrevious",""],["icon","arrow-left",1,"m-r-10"],["mat-raised-button","","matStepperNext",""],["icon","arrow-right",1,"m-l-10"],["mat-raised-button","",3,"routerLink"],["type","number","matInput","","formControlName","fixedLength"],["type","number","matInput","","formControlName","fixedEmiAmount"],["formControlName","repaymentFrequencyNthDayType"],["formControlName","repaymentFrequencyDayOfWeekType"],["type","number","matInput","","formControlName","interestRatePerPeriod"],["formControlName","interestRateFrequencyType"],["formControlName","interestType",3,"matTooltip"],["required","","formControlName","amortizationType",3,"matTooltip"],["formControlName","isEqualAmortization",1,"flex-23",3,"checked"],["type","number","matInput","","formControlName","fixedPrincipalPercentagePerInstallment"],["formControlName","interestType"],["formControlName","isFloatingInterestRate",1,"flex-48"],[1,"layout-row"],["formControlName","interestRecognitionOnDisbursementDate",1,"flex-98"],[1,"flex-53"],["formControlName","enableInstallmentLevelDelinquency"],["formControlName","isTopup",1,"flex-20"],[1,"flex-fill","flex-24"],["formControlName","loanIdToClose"],["labelPosition","before","formControlName","allowFullTermForTranche",1,"flex-48","margin-v",3,"matTooltip"],["matInput","","type","number","formControlName","maxOutstandingLoanBalance"],["type","button","mat-icon-button","","color","primary","required","",3,"click","disabled"],["icon","plus-circle","size","lg"],["mat-table","",3,"dataSource","hidden"],["matColumnDef","expectedDisbursementDate"],["matColumnDef","principal"],["matColumnDef","actions"],["mat-header-cell",""],["mat-cell",""],["type","button","mat-icon-button","","color","warn","matTooltipPosition","left",3,"click","matTooltip"],["icon","trash"],["mat-header-row",""],["mat-row",""],["mat-icon-button","","color","warn",3,"click"]],template:function(i,a){if(i&1){let r=xt();s(0,"form",2)(1,"div",3),M(2,qO,1,4,"mifosx-input-amount",4),s(3,"h4",5),c(4),p(5,"translate"),T(6,"i",6),p(7,"translate"),l(),s(8,"mat-form-field",7)(9,"mat-label"),c(10),p(11,"translate"),l(),T(12,"input",8),M(13,jO,7,9,"mat-error"),l(),s(14,"mat-form-field",7)(15,"mat-label"),c(16),p(17,"translate"),l(),s(18,"mat-select",9),ue(19,zO,3,5,"mat-option",10,Ce),l(),M(21,VO,7,9,"mat-error"),l(),M(22,UO,5,3,"mat-form-field",11),M(23,HO,3,6,"span",12),s(24,"h4",5),c(25),p(26,"translate"),l(),s(27,"mat-form-field",7)(28,"mat-label"),c(29),p(30,"translate"),l(),T(31,"input",13),p(32,"translate"),M(33,GO,7,9,"mat-error"),l(),M(34,WO,5,3,"mat-form-field",7),s(35,"mat-form-field",14),it("click",function(){mt(r);let d=Lt(43);return dt(d.open())}),s(36,"mat-label"),c(37),p(38,"translate"),l(),T(39,"input",15),p(40,"translate"),T(41,"mat-datepicker-toggle",16)(42,"mat-datepicker",null,0),l(),s(44,"mat-form-field",14),it("click",function(){mt(r);let d=Lt(52);return dt(d.open())}),s(45,"mat-label"),c(46),p(47,"translate"),l(),T(48,"input",17),p(49,"translate"),T(50,"mat-datepicker-toggle",16)(51,"mat-datepicker",null,1),l(),s(53,"h4",5),c(54),p(55,"translate"),T(56,"i",6),p(57,"translate"),l(),s(58,"mat-form-field",7)(59,"mat-label"),c(60),p(61,"translate"),l(),T(62,"input",18),p(63,"translate"),M(64,$O,7,9,"mat-error"),l(),s(65,"mat-form-field",7)(66,"mat-label"),c(67),p(68,"translate"),l(),s(69,"mat-select",19),ue(70,YO,3,5,"mat-option",10,Ce),l()(),M(72,KO,7,3,"mat-form-field",20),M(73,XO,7,3,"mat-form-field",20),M(74,QO,4,7,"mat-checkbox",21),s(75,"h4",5),c(76),p(77,"translate"),l(),M(78,o6,41,35),M(79,c6,21,14,"div",22),s(80,"h4",5),c(81),p(82,"translate"),l(),M(83,p6,10,7,"div",23),s(84,"mat-form-field",23)(85,"mat-label"),c(86),p(87,"translate"),l(),s(88,"mat-select",24),p(89,"translate"),ue(90,m6,3,5,"mat-option",10,Ce),l(),M(92,d6,7,9,"mat-error"),l(),s(93,"h4",5),c(94),p(95,"translate"),l(),s(96,"mat-form-field",23)(97,"mat-label"),c(98),p(99,"translate"),l(),s(100,"mat-select",25),p(101,"translate"),ue(102,u6,3,5,"mat-option",10,Ce),l()(),s(104,"mat-checkbox",26),p(105,"translate"),s(106,"p"),c(107),p(108,"translate"),l()(),M(109,f6,5,3,"ng-container",27),s(110,"mat-form-field",23)(111,"mat-label"),c(112),p(113,"translate"),l(),T(114,"input",28),p(115,"translate"),l(),s(116,"mat-form-field",23)(117,"mat-label"),c(118),p(119,"translate"),l(),T(120,"input",29),p(121,"translate"),l(),s(122,"h4",5),c(123),p(124,"translate"),T(125,"i",6),p(126,"translate"),l(),s(127,"mat-form-field",7)(128,"mat-label"),c(129),p(130,"translate"),l(),T(131,"input",30),l(),s(132,"mat-form-field",7)(133,"mat-label"),c(134),p(135,"translate"),l(),T(136,"input",31),l(),s(137,"mat-form-field",23)(138,"mat-label"),c(139),p(140,"translate"),l(),T(141,"input",32),l(),M(142,h6,8,4,"div",33),M(143,g6,5,3,"div",23),M(144,b6,6,4,"ng-container",23),T(145,"mat-divider",27),s(146,"div",34)(147,"span",35)(148,"b"),c(149),p(150,"translate"),l()(),s(151,"span",36),c(152),p(153,"yesNo"),l()(),M(154,v6,7,7,"div",34),M(155,x6,7,7,"div",34),M(156,y6,6,4,"div",34),M(157,T6,17,14),M(158,P6,6,4,"div",34),s(159,"div",34)(160,"span",35)(161,"b"),c(162),p(163,"translate"),l()(),s(164,"span",35),c(165),p(166,"yesNo"),l()(),s(167,"div",34)(168,"span",35)(169,"b"),c(170),p(171,"translate"),l()(),s(172,"span",35),c(173),p(174,"yesNo"),l()(),M(175,j6,26,12),M(176,H6,9,7,"div",37),M(177,G6,6,4,"div",37),T(178,"mat-divider",27),s(179,"div",38)(180,"div",39)(181,"h4",5),c(182),p(183,"translate"),l()(),s(184,"div",40)(185,"div",41)(186,"button",42),it("click",function(){return mt(r),dt(a.addCollateral())}),T(187,"fa-icon",43),c(188),p(189,"translate"),l()()()(),s(190,"table",44),X(191,45),k(192,W6,3,3,"th",46)(193,$6,2,1,"td",47),Q(),X(194,48),k(195,Y6,3,3,"th",46)(196,Z6,2,1,"td",47),Q(),X(197,49),k(198,K6,3,3,"th",46)(199,J6,2,1,"td",47),Q(),X(200,50),k(201,X6,3,3,"th",46)(202,Q6,2,1,"td",47),Q(),X(203,51),k(204,tI,3,3,"th",46)(205,eI,3,0,"td",47),Q(),k(206,nI,1,0,"tr",52)(207,iI,1,0,"tr",53),l()(),s(208,"div",54)(209,"button",55),T(210,"fa-icon",56),c(211),p(212,"translate"),l(),s(213,"button",57),c(214),p(215,"translate"),T(216,"fa-icon",58),l(),M(217,aI,3,5,"button",59),l()()}if(i&2){let r=Lt(43),u=Lt(52);x("formGroup",a.loansAccountTermsForm),o(2),O(a.currency?2:-1),o(2),v(" ",m(5,97,"labels.heading.Term Options")," "),o(2),x("matTooltip",ce(m(7,99,"tooltips.The loan term parameter in loan accounts"))),o(4),b(m(11,101,"labels.inputs.Loan Term")),o(3),O(a.loansAccountTermsForm.controls.loanTermFrequency.hasError("required")?13:-1),o(3),b(m(17,103,"labels.inputs.Frequency")),o(3),fe(a.termFrequencyTypeData),o(2),O(a.loansAccountTermsForm.controls.loanTermFrequencyType.hasError("required")?21:-1),o(),O(a.hasFixedLength()?22:-1),o(),O(a.hasFixedLength()?23:-1),o(2),b(m(26,105,"labels.inputs.Repayments")),o(4),b(m(30,107,"labels.inputs.Number of repayments")),o(2),x("matTooltip",ce(m(32,109,"tooltips.Enter the total count of repayments"))),o(2),O(a.loansAccountTermsForm.controls.numberOfRepayments.hasError("required")?33:-1),o(),O(a.loansAccountTermsData!=null&&a.loansAccountTermsData.canDefineInstallmentAmount?34:-1),o(3),b(m(38,111,"labels.inputs.First repayment on")),o(2),x("matTooltip",ce(m(40,113,"tooltips.May be entered to override")))("min",a.minDate)("max",a.maxDate)("matDatepicker",r),o(2),x("for",r),o(5),b(m(47,115,"labels.inputs.Interest charged from")),o(2),x("matTooltip",ce(m(49,117,"tooltips.May be entered to override the date")))("min",a.minDate)("max",a.maxDate)("matDatepicker",u),o(2),x("for",u),o(4),v(" ",m(55,119,"labels.heading.Repaid Every")," "),o(2),x("matTooltip",ce(m(57,121,"tooltips.Fields are input to calculating the repayment schedule"))),o(4),b(m(61,123,"labels.inputs.Repaid every")),o(2),x("matTooltip",ce(m(63,125,"tooltips.Fields are input to calculating the repayment schedule"))),o(2),O(a.loansAccountTermsForm.controls.repaymentEvery.hasError("required")?64:-1),o(3),b(m(68,127,"labels.inputs.Frequency")),o(3),fe(a.termFrequencyTypeData),o(2),O(a.loansAccountTermsForm.controls.repaymentFrequencyType.value===2?72:-1),o(),O(a.loansAccountTermsForm.controls.repaymentFrequencyType.value===2?73:-1),o(),O(a.productEnableDownPayment?74:-1),o(2),b(m(77,129,"labels.inputs.Nominal interest rate")),o(2),O(a.loansAccountTermsData!=null&&a.loansAccountTermsData.isLoanProductLinkedToFloatingRate?-1:78),o(),O(a.loansAccountTermsData!=null&&a.loansAccountTermsData.isLoanProductLinkedToFloatingRate?79:-1),o(2),b(m(82,131,"labels.inputs.Loan Schedule")),o(2),O(a.loanScheduleType?83:-1),o(3),b(m(87,133,"labels.inputs.Repayment Strategy")),o(2),x("matTooltip",ce(m(89,135,"tooltips.The repayment strategy")))("disabled",a.repaymentStrategyDisabled),o(2),fe(a.transactionProcessingStrategyOptions),o(2),O(a.loansAccountTermsForm.controls.transactionProcessingStrategyCode.hasError("required")?92:-1),o(2),b(m(95,137,"labels.heading.Interest Calculations")),o(4),b(m(99,139,"labels.inputs.Interest calculation period")),o(2),x("matTooltip",ce(m(101,141,"tooltips.Daily - Will Calculate the interest"))),o(2),fe(a.interestCalculationPeriodTypeData),o(2),x("matTooltip",ce(m(105,143,"tooltips.To be used with SAME AS REPAYMENT PERIOD"))),o(3),b(m(108,145,"labels.inputs.Calculate interest for exact days in partial period")),o(2),O(a.isProgressive?109:-1),o(3),v("",m(113,147,"labels.inputs.Arrears tolerance")," "),o(2),x("matTooltip",ce(m(115,149,"tooltips.With Arrears tolerance"))),o(4),b(m(119,151,"labels.inputs.Interest free period")),o(2),x("matTooltip",ce(m(121,153,"tooltips.If the Interest Free Period"))),o(3),v(" ",m(124,155,"labels.heading.Moratorium")," "),o(2),x("matTooltip",ce(m(126,157,"tooltips.The moratorium information"))),o(4),b(m(130,159,"labels.inputs.Grace on principal payment")),o(5),b(m(135,161,"labels.inputs.Grace on interest payment")),o(5),b(m(140,163,"labels.inputs.On arrears ageing")),o(3),O(a.isDelinquencyEnabled()?142:-1),o(),O(a.isDelinquencyEnabled()?143:-1),o(),O(a.loansAccountTermsData!=null&&a.loansAccountTermsData.isTopup?144:-1),o(5),b(m(150,165,"labels.inputs.Recalculate Interest")),o(3),b(m(153,167,a.loansAccountTermsData==null?null:a.loansAccountTermsData.isInterestRecalculationEnabled)),o(2),O(a.loansAccountTermsData!=null&&a.loansAccountTermsData.isInterestRecalculationEnabled?154:-1),o(),O(a.loansAccountTermsData!=null&&a.loansAccountTermsData.isInterestRecalculationEnabled?155:-1),o(),O(a.loansAccountTermsData!=null&&a.loansAccountTermsData.isInterestRecalculationEnabled?156:-1),o(),O(a.loansAccountTermsData!=null&&a.loansAccountTermsData.isInterestRecalculationEnabled?157:-1),o(),O(a.loansAccountTermsData!=null&&a.loansAccountTermsData.isInterestRecalculationEnabled&&a.loansAccountTermsData.interestRecalculationData.recalculationRestFrequencyType.id!==1?158:-1),o(4),b(m(163,169,"labels.inputs.Enable income capitalization")),o(3),b(m(166,171,a.enableIncomeCapitalization)),o(5),b(m(171,173,"labels.inputs.Enable Buy down fee")),o(3),b(m(174,175,a.enableBuyDownFee)),o(2),O(a.multiDisburseLoan?175:-1),o(),O(a.loansAccountTermsData!=null&&a.loansAccountTermsData.isInterestRecalculationEnabled&&a.loansAccountTermsData.interestRecalculationData.interestRecalculationCompoundingType.id!==0?176:-1),o(),O(a.loansAccountTermsData!=null&&a.loansAccountTermsData.isInterestRecalculationEnabled&&a.loansAccountTermsData.interestRecalculationData.interestRecalculationCompoundingType.id!==0&&a.loansAccountTermsData.interestRecalculationData.recalculationCompoundingFrequencyType.id!==1?177:-1),o(5),b(m(183,177,"labels.heading.Collaterals Data")),o(6),v("",m(189,179,"labels.buttons.Add")," "),o(2),x("dataSource",a.collateralDataSource),o(16),x("matHeaderRowDef",a.loanCollateralDisplayedColumns),o(),x("matRowDefColumns",a.loanCollateralDisplayedColumns),o(4),v(" ",m(212,181,"labels.buttons.Previous")," "),o(3),v(" ",m(215,183,"labels.buttons.Next")," "),o(3),O(a.loanId?217:-1)}},dependencies:[wt,Tt,Re,we,Mi,he,Ee,je,Le,Ne,ae,_e,ge,Ve,Je,Pe,In,On,tn,en,Qe,Wt,Da,Ri,Oi,$o,Ba,un,bn,yn,xn,Sn,vn,Dn,wn,Pn,Tn,An,za,mo,En,Pt,qa,Pp,Hr],styles:["h4[_ngcontent-%COMP%]{font-weight:500;margin:1em 0}h3[_ngcontent-%COMP%]{font-weight:500}mat-divider[_ngcontent-%COMP%]{margin:1em 0 2em}.margin-v[_ngcontent-%COMP%]{margin:1em 0}.margin-b[_ngcontent-%COMP%]{margin:0 0 1em}.margin-t[_ngcontent-%COMP%]{margin-top:1em}"]})}}return t})();var oI=()=>["../","general"];function rI(t,n){if(t&1&&(s(0,"mat-option",3),c(1),l()),t&2){let e=n.$implicit;x("value",e),o(),v(" ",e.name," ")}}function lI(t,n){t&1&&(s(0,"th",29),c(1),p(2,"translate"),l()),t&2&&(o(),b(m(2,1,"labels.inputs.name")))}function sI(t,n){if(t&1&&(s(0,"td",30),c(1),l()),t&2){let e=n.$implicit;o(),v(" ",e.name+", "+((e.currency==null?null:e.currency.displaySymbol)||"")," ")}}function cI(t,n){t&1&&(s(0,"th",29),c(1),p(2,"translate"),l()),t&2&&(o(),b(m(2,1,"labels.inputs.Type")))}function pI(t,n){if(t&1&&(s(0,"td",30),c(1),l()),t&2){let e=n.$implicit;o(),v(" ",e.chargeCalculationType.value," ")}}function mI(t,n){t&1&&(s(0,"th",29),c(1),p(2,"translate"),l()),t&2&&(o(),b(m(2,1,"labels.inputs.Amount")))}function dI(t,n){if(t&1){let e=xt();s(0,"td",30),c(1),s(2,"button",31),it("click",function(){let a=mt(e).$implicit,r=P();return dt(r.editChargeAmount(a))}),T(3,"fa-icon",32),l()()}if(t&2){let e=n.$implicit;o(),v(" ",e.amount," ")}}function uI(t,n){t&1&&(s(0,"th",29),c(1),p(2,"translate"),l()),t&2&&(o(),b(m(2,1,"labels.inputs.Collected On")))}function fI(t,n){if(t&1&&(s(0,"td",30),c(1),l()),t&2){let e=n.$implicit;o(),v(" ",e.chargeTimeType.value," ")}}function hI(t,n){t&1&&(s(0,"th",29),c(1),p(2,"translate"),l()),t&2&&(o(),b(m(2,1,"labels.inputs.Date")))}function gI(t,n){if(t&1&&(s(0,"span"),c(1),p(2,"dateFormat"),l()),t&2){let e=P().$implicit;o(),v(" ",m(2,1,e.dueDate)||"Unassigned"," ")}}function _I(t,n){if(t&1&&(s(0,"span"),c(1),p(2,"dateFormat"),l()),t&2){let e=P().$implicit;o(),v(" ",m(2,1,e.feeOnMonthDay)||"Unassigned"," ")}}function CI(t,n){t&1&&(s(0,"span"),c(1),p(2,"translate"),l()),t&2&&(o(),v(" ",m(2,1,"labels.inputs.N/A")," "))}function bI(t,n){if(t&1){let e=xt();s(0,"button",31),it("click",function(){mt(e);let a=P().$implicit,r=P();return dt(r.editChargeDate(a))}),T(1,"fa-icon",32),l()}}function vI(t,n){if(t&1&&(s(0,"td",30),M(1,gI,3,3,"span"),M(2,_I,3,3,"span"),M(3,CI,3,3,"span"),M(4,bI,2,0,"button",33),l()),t&2){let e=n.$implicit;o(),O(e.chargeTimeType.value==="Specified due date"||e.chargeTimeType.value==="Weekly Fee"?1:-1),o(),O(e.chargeTimeType.value==="Monthly Fee"||e.chargeTimeType.value==="Annual Fee"?2:-1),o(),O(e.chargeTimeType.value==="Monthly Fee"||e.chargeTimeType.value==="Annual Fee"||e.chargeTimeType.value==="Specified due date"||e.chargeTimeType.value==="Weekly Fee"?-1:3),o(),O(e.chargeTimeType.value==="Weekly Fee"||e.chargeTimeType.value==="Annual Fee"||e.chargeTimeType.value==="Specified due date"?4:-1)}}function xI(t,n){t&1&&(s(0,"th",29),c(1),p(2,"translate"),l()),t&2&&(o(),b(m(2,1,"labels.inputs.Actions")))}function yI(t,n){if(t&1){let e=xt();s(0,"td",30)(1,"button",34),it("click",function(){let a=mt(e).$implicit,r=P();return dt(r.deleteCharge(a))}),T(2,"fa-icon",35),l()()}}function SI(t,n){t&1&&T(0,"tr",36)}function DI(t,n){t&1&&T(0,"tr",37)}function wI(t,n){t&1&&(s(0,"th",29),c(1),p(2,"translate"),l()),t&2&&(o(),b(m(2,1,"labels.inputs.name")))}function TI(t,n){if(t&1&&(s(0,"td",30),c(1),l()),t&2){let e=n.$implicit;o(),b(e.name+", "+((e.currency==null?null:e.currency.displaySymbol)||""))}}function PI(t,n){t&1&&(s(0,"th",29),c(1),p(2,"translate"),l()),t&2&&(o(),b(m(2,1,"labels.inputs.Type")))}function AI(t,n){if(t&1&&(s(0,"td",30),c(1),l()),t&2){let e=n.$implicit;o(),b(e.chargeCalculationType.value)}}function MI(t,n){t&1&&(s(0,"th",29),c(1),p(2,"translate"),l()),t&2&&(o(),b(m(2,1,"labels.inputs.Amount")))}function OI(t,n){if(t&1&&(s(0,"td",30),c(1),p(2,"formatNumber"),l()),t&2){let e=n.$implicit;o(),b(m(2,1,e.amount))}}function II(t,n){t&1&&(s(0,"th",29),c(1),p(2,"translate"),l()),t&2&&(o(),b(m(2,1,"labels.inputs.Collected On")))}function EI(t,n){if(t&1&&(s(0,"td",30),c(1),l()),t&2){let e=n.$implicit;o(),b(e.chargeTimeType.value)}}function LI(t,n){t&1&&T(0,"tr",36)}function NI(t,n){t&1&&T(0,"tr",37)}function kI(t,n){t&1&&(s(0,"button",28),c(1),p(2,"translate"),l()),t&2&&(x("routerLink",Ut(4,oI)),o(),v(" ",m(2,2,"labels.buttons.Cancel")," "))}var Eo=(()=>{class t{constructor(){this.dialog=A(Gn),this.dateUtils=A(de),this.route=A(Et),this.settingsService=A(oe),this.chargesDataSource=[],this.overDueChargesDataSource=[],this.collateralDataSource=[],this.chargesDisplayedColumns=["name","chargeCalculationType","amount","chargeTimeType","date","action"],this.overdueChargesDisplayedColumns=["name","type","amount","collectedon"],this.selectAllItems=!1,this.loanPurposeOptions=[],this.displayedColumn=["check","id","name","purpose","amount"],this.pristine=!0,this.isCollateralSufficient=!1,this.totalCollateralValue=0,this.loanId=null,this.loanId=this.route.snapshot.params.loanId}ngOnInit(){this.loansAccountTemplate&&this.loansAccountTemplate.charges&&(this.chargesDataSource=this.loansAccountTemplate.charges.map(e=>ve(ie({},e),{id:e.id,chargeId:e.chargeId}))||[]),this.dataSource=new Li(this.activeClientMembers)}ngOnChanges(){if(this.loansAccountProductTemplate){this.loanPurposeOptions=this.loansAccountProductTemplate.loanPurposeOptions,this.chargeData=this.loansAccountProductTemplate.chargeOptions;let e=this.loansAccountTemplate?.gsimData?.groupId!=null;!this.loansSavingsAccountLinked&&!e&&(this.chargeData=this.chargeData.filter(a=>a.chargePaymentMode?.value!="Account transfer")),this.loansAccountProductTemplate.overdueCharges&&(this.overDueChargesDataSource=this.loansAccountProductTemplate.overdueCharges);let i=this.loanId!=null;this.loansAccountProductTemplate.charges&&this.loansAccountProductTemplate.charges.length>0&&this.chargesDataSource.length===0?this.chargesDataSource=this.loansAccountProductTemplate.charges.map(a=>ve(ie({},a),{chargeId:a.chargeId||a.id}))||[]:i&&this.loansAccountTemplate&&this.loansAccountTemplate.charges&&(this.chargesDataSource=this.loansAccountTemplate.charges.map(a=>ve(ie({},a),{id:a.id,chargeId:a.chargeId}))||[])}}addCharge(e){let i=ve(ie({},e.value),{chargeId:e.value.id||e.value.chargeId});this.chargesDataSource=this.chargesDataSource.concat([i]),e.value="",this.pristine=!1}editChargeAmount(e){let i=[new Ti({controlName:"amount",label:"Amount",value:e.amount,type:"number",required:!1})],a={title:"Edit Charge Amount",layout:{addButtonText:"Confirm"},formfields:i};this.dialog.open(_i,{data:a}).afterClosed().subscribe(u=>{if(u.data){let d=ve(ie({},e),{amount:u.data.value.amount});this.chargesDataSource.splice(this.chargesDataSource.indexOf(e),1,d),this.chargesDataSource=this.chargesDataSource.concat([])}}),this.pristine=!1}editChargeDate(e){let i=[new la({controlName:"date",label:"Date",value:e.dueDate||e.feeOnMonthDay||"",type:"datetime-local",required:!1})],a={title:"Edit Charge Date",layout:{addButtonText:"Confirm"},formfields:i};this.dialog.open(_i,{data:a}).afterClosed().subscribe(u=>{if(u.data){let d,g=this.settingsService.dateFormat,_=this.dateUtils.formatDate(u.data.value.date,g);switch(e.chargeTimeType.value){case"Specified due date":case"Weekly Fee":d=ve(ie({},e),{dueDate:_});break;case"Annual Fee":d=ve(ie({},e),{feeOnMonthDay:_});break}this.chargesDataSource.splice(this.chargesDataSource.indexOf(e),1,d),this.chargesDataSource=this.chargesDataSource.concat([])}}),this.pristine=!1}editChargeFeeInterval(e){let i=[new Ti({controlName:"feeInterval",label:"Fee Interval",value:e.feeInterval,type:"text",required:!1})],a={title:"Edit Charge Fee Interval",layout:{addButtonText:"Confirm"},formfields:i};this.dialog.open(_i,{data:a}).afterClosed().subscribe(u=>{if(u.data){let d=ve(ie({},e),{feeInterval:u.data.value.feeInterval});this.chargesDataSource.splice(this.chargesDataSource.indexOf(e),1,d),this.chargesDataSource=this.chargesDataSource.concat([])}}),this.pristine=!1}deleteCharge(e){this.dialog.open(ra,{data:{deleteContext:`charge ${e.name}`}}).afterClosed().subscribe(a=>{a.delete&&(this.chargesDataSource.splice(this.chargesDataSource.indexOf(e),1),this.chargesDataSource=this.chargesDataSource.concat([]),this.pristine=!1)})}get isValid(){return!0}get loansAccountCharges(){return{charges:this.getUniqueCharges(this.chargesDataSource).map(i=>ve(ie({},i),{chargeId:i.chargeId??i.id}))}}getUniqueCharges(e){let i=new Map;for(let a of e??[]){let r=a.chargeId??a.id;r!=null&&i.set(r,ve(ie({},a),{chargeId:r}))}return Array.from(i.values())}get selectedClientMembers(){return{selectedMembers:this.activeClientMembers.filter(e=>e.selected)}}toggleSelects(){for(let e of this.activeClientMembers)e.selected=this.selectAllItems}toggleSelect(){let e=this.activeClientMembers.length;this.selectAllItems=e===0?!1:this.activeClientMembers.filter(i=>i.selected).length===e}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=Dt({type:t,selectors:[["mifosx-loans-account-charges-step"]],inputs:{loansAccountProductTemplate:"loansAccountProductTemplate",loansAccountTemplate:"loansAccountTemplate",loansAccountFormValid:"loansAccountFormValid",activeClientMembers:"activeClientMembers",loansSavingsAccountLinked:"loansSavingsAccountLinked"},features:[Vr],decls:64,vars:24,consts:[["charge",""],[1,"layout-row-wrap","gap-2px","responsive-column"],[1,"flex-48"],[3,"value"],[1,"flex-48","align-center"],["type","button","mat-raised-button","","color","primary",3,"click","disabled"],["icon","plus",1,"m-r-10"],["mat-table","",1,"flex-98","mat-elevation-z1",3,"dataSource","hidden"],["matColumnDef","name"],["mat-header-cell","",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","chargeCalculationType"],["matColumnDef","amount"],["matColumnDef","chargeTimeType"],["matColumnDef","date"],["matColumnDef","action"],["mat-header-row","",4,"matHeaderRowDef"],["mat-row","",4,"matRowDef","matRowDefColumns"],[1,"flex-98"],[1,"mat-h4","flex-98"],["mat-table","",1,"mat-elevation-z1",3,"dataSource"],["matColumnDef","type"],["matColumnDef","collectedon"],[1,"layout-row","responsive-column","align-center","gap-2px","margin-t"],["mat-raised-button","","matStepperPrevious",""],["icon","arrow-left",1,"m-r-10"],["mat-raised-button","","matStepperNext",""],["icon","arrow-right",1,"m-l-10"],["mat-raised-button","",3,"routerLink"],["mat-header-cell",""],["mat-cell",""],["mat-icon-button","","color","primary",3,"click"],["icon","pen"],["mat-icon-button","","color","primary"],["mat-icon-button","","color","warn",3,"click"],["icon","trash"],["mat-header-row",""],["mat-row",""]],template:function(i,a){if(i&1){let r=xt();s(0,"div",1)(1,"mat-form-field",2)(2,"mat-label"),c(3),p(4,"translate"),l(),s(5,"mat-select",null,0),ue(7,rI,2,2,"mat-option",3,Ce),l()(),s(9,"div",4)(10,"button",5),it("click",function(){mt(r);let d=Lt(6);return dt(a.addCharge(d))}),T(11,"fa-icon",6),c(12),p(13,"translate"),l()(),s(14,"table",7),X(15,8),k(16,lI,3,3,"th",9)(17,sI,2,1,"td",10),Q(),X(18,11),k(19,cI,3,3,"th",9)(20,pI,2,1,"td",10),Q(),X(21,12),k(22,mI,3,3,"th",9)(23,dI,4,1,"td",10),Q(),X(24,13),k(25,uI,3,3,"th",9)(26,fI,2,1,"td",10),Q(),X(27,14),k(28,hI,3,3,"th",9)(29,vI,5,4,"td",10),Q(),X(30,15),k(31,xI,3,3,"th",9)(32,yI,3,0,"td",10),Q(),k(33,SI,1,0,"tr",16)(34,DI,1,0,"tr",17),l(),T(35,"mat-divider",18),s(36,"h4",19),c(37),p(38,"translate"),l(),s(39,"table",20),X(40,8),k(41,wI,3,3,"th",9)(42,TI,2,1,"td",10),Q(),X(43,21),k(44,PI,3,3,"th",9)(45,AI,2,1,"td",10),Q(),X(46,12),k(47,MI,3,3,"th",9)(48,OI,3,3,"td",10),Q(),X(49,22),k(50,II,3,3,"th",9)(51,EI,2,1,"td",10),Q(),k(52,LI,1,0,"tr",16)(53,NI,1,0,"tr",17),l()(),s(54,"div",23)(55,"button",24),T(56,"fa-icon",25),c(57),p(58,"translate"),l(),s(59,"button",26),c(60),p(61,"translate"),T(62,"fa-icon",27),l(),M(63,kI,3,5,"button",28),l()}if(i&2){let r=Lt(6);o(3),b(m(4,14,"labels.inputs.Charge")),o(4),fe(a.chargeData),o(3),x("disabled",!r.value),o(2),v(" ",m(13,16,"labels.buttons.Add")," "),o(2),x("dataSource",a.chargesDataSource)("hidden",a.chargesDataSource.length===0),o(19),x("matHeaderRowDef",a.chargesDisplayedColumns),o(),x("matRowDefColumns",a.chargesDisplayedColumns),o(3),b(m(38,18,"labels.heading.Overdue Charges")),o(2),x("dataSource",a.overDueChargesDataSource),o(13),x("matHeaderRowDef",a.overdueChargesDisplayedColumns),o(),x("matRowDefColumns",a.overdueChargesDisplayedColumns),o(4),v(" ",m(58,20,"labels.buttons.Previous")," "),o(3),v(" ",m(61,22,"labels.buttons.Next")," "),o(3),O(a.loanId?63:-1)}},dependencies:[wt,Tt,ae,_e,ge,In,On,Wt,un,bn,yn,xn,Sn,vn,Dn,Ba,wn,Pn,Tn,An,$o,za,mo,En,Pt,hn],styles:["table[_ngcontent-%COMP%]{width:100%}.mat-elevation-z1[_ngcontent-%COMP%]{margin:1em 0 1.5em}.margin-t[_ngcontent-%COMP%]{margin-top:1em}h4[_ngcontent-%COMP%]{font-weight:500;margin:1em 0}h3[_ngcontent-%COMP%]{font-weight:500}mat-divider[_ngcontent-%COMP%]{margin:1em 0}.margin-v[_ngcontent-%COMP%]{margin:1em 0}.margin-b[_ngcontent-%COMP%]{margin:0 0 1em}.tableName[_ngcontent-%COMP%]{padding-left:2%}"]})}}return t})();function FI(t,n){if(t&1&&(s(0,"mat-option",14),c(1),l()),t&2){let e=n.$implicit;x("value",e.id),o(),v(" ",e.value," ")}}function RI(t,n){if(t&1&&(s(0,"mat-select",11),ue(1,FI,2,2,"mat-option",14,Ce),l()),t&2){let e=P(2).$implicit;x("formControlName",ce(e.controlName)),o(),fe(e.columnValues)}}function BI(t,n){if(t&1&&T(0,"input",12),t&2){let e=P(2).$implicit;x("formControlName",ce(e.controlName))}}function qI(t,n){if(t&1&&T(0,"input",13),t&2){let e=P(2).$implicit;x("formControlName",ce(e.controlName))}}function jI(t,n){if(t&1&&T(0,"textarea",13),t&2){let e=P(2).$implicit;x("formControlName",ce(e.controlName))}}function zI(t,n){if(t&1){let e=xt();s(0,"span",15),it("click",function(){mt(e);let a=Lt(4);return dt(a.open())}),T(1,"input",16)(2,"mat-datepicker-toggle",17)(3,"mat-datepicker",null,0),l()}if(t&2){let e=Lt(4),i=P(2).$implicit;o(),x("formControlName",ce(i.controlName))("matDatepicker",e),o(),x("for",e)}}function VI(t,n){if(t&1&&(s(0,"mat-form-field",9)(1,"mat-label"),c(2),l(),M(3,RI,3,2,"mat-select",11),M(4,BI,1,2,"input",12),M(5,qI,1,2,"input",13),M(6,jI,1,2,"textarea",13),M(7,zI,5,4,"span"),l()),t&2){let e=P().$implicit,i=P();o(2),b(i.getInputName(e)),o(),O(i.isDropdown(e.columnDisplayType)?3:-1),o(),O(i.isNumeric(e.columnDisplayType)?4:-1),o(),O(i.isString(e.columnDisplayType)?5:-1),o(),O(i.isText(e.columnDisplayType)?6:-1),o(),O(i.isDate(e.columnDisplayType)?7:-1)}}function UI(t,n){if(t&1&&(s(0,"mat-checkbox",10),c(1),l()),t&2){let e=P().$implicit,i=P();x("formControlName",ce(e.controlName)),o(),v(" ",i.getInputName(e)," ")}}function HI(t,n){if(t&1&&(s(0,"div",3),M(1,VI,8,6,"mat-form-field",9),M(2,UI,2,3,"mat-checkbox",10),l()),t&2){let e=n.$implicit,i=P();o(),O(i.isBoolean(e.columnDisplayType)?-1:1),o(),O(i.isBoolean(e.columnDisplayType)?2:-1)}}var Ss=(()=>{class t{constructor(){this.formBuilder=A(Te),this.settingsService=A(oe),this.dateUtils=A(de),this.datatableInputs=[]}ngOnInit(){this.datatableInputs=this.datatableData.columnHeaderData.filter(i=>i.columnName!=="id"&&i.columnName!=="loan_id"&&i.columnName!=="created_at"&&i.columnName!=="updated_at");let e={};this.datatableInputs.forEach(i=>{i.controlName=this.getInputName(i),i.isColumnNullable?e[i.controlName]=new pe(""):this.isNumeric(i.columnDisplayType)?e[i.controlName]=new pe(0,[Gt.required]):e[i.controlName]=new pe("",[Gt.required])}),this.datatableForm=this.formBuilder.group(e)}getInputName(e){return e.columnName&&e.columnName.includes("_cd_")?e.columnName.split("_cd_")[0]:e.columnName}isNumeric(e){return this.isColumnType(e,"INTEGER")||this.isColumnType(e,"DECIMAL")}isDate(e){return this.isColumnType(e,"DATE")||this.isColumnType(e,"DATETIME")}isBoolean(e){return this.isColumnType(e,"BOOLEAN")}isDropdown(e){return this.isColumnType(e,"CODELOOKUP")}isString(e){return this.isColumnType(e,"STRING")}isText(e){return this.isColumnType(e,"TEXT")}isColumnType(e,i){return e===i}get payload(){let e=this.settingsService.dateFormat,i=this.datatableForm.value,a={locale:this.settingsService.language.code},r=!1;return this.datatableInputs.forEach(d=>{let g=this.getInputName(d);this.isNumeric(d.columnDisplayType)?a[d.columnName]=i[g]*1:this.isDate(d.columnDisplayType)?(a[d.columnName]=this.dateUtils.formatDate(i[g],e),r=!0):a[d.columnName]=i[g]}),r&&(a.dateFormat=e),{registeredTableName:this.datatableData.registeredTableName,data:a}}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=Dt({type:t,selectors:[["mifosx-loans-account-datatable-step"]],inputs:{datatableData:"datatableData"},decls:13,vars:7,consts:[["datePicker",""],[3,"formGroup"],[1,"layout-row-wrap","gap-2px","responsive-column"],[1,"flex-48"],[1,"layout-row","align-center","gap-2percent","margin-t","responsive-column"],["mat-raised-button","","matStepperPrevious","","disabled",""],["icon","arrow-left",1,"m-r-10"],["mat-raised-button","","matStepperNext",""],["icon","arrow-right",1,"m-l-10"],[1,"flex-100"],["labelPosition","before",1,"margin-v",3,"formControlName"],[3,"formControlName"],["matInput","","type","number",3,"formControlName"],["matInput","",3,"formControlName"],[3,"value"],[3,"click"],["matInput","",1,"date-picker",3,"matDatepicker","formControlName"],["matSuffix","",3,"for"]],template:function(i,a){i&1&&(s(0,"form",1)(1,"div",2),ue(2,HI,3,2,"div",3,Ce),l(),s(4,"div",4)(5,"button",5),T(6,"fa-icon",6),c(7),p(8,"translate"),l(),s(9,"button",7),c(10),p(11,"translate"),T(12,"fa-icon",8),l()()()),i&2&&(x("formGroup",a.datatableForm),o(2),fe(a.datatableInputs),o(5),v(" ",m(8,3,"labels.buttons.Previous")," "),o(3),v(" ",m(11,5,"labels.buttons.Next")," "))},dependencies:[wt,Tt,Re,we,Mi,he,Ee,Le,Ne,_e,ge,Je,Pe,In,On,tn,en,Qe,Wt,Da,za,un,mo,Pt],styles:[".date-picker[_ngcontent-%COMP%]{width:92%}mat-checkbox[_ngcontent-%COMP%]{margin-top:30px}"]})}}return t})();var GI=()=>["../","general"];function WI(t,n){t&1&&(s(0,"button",9),c(1),p(2,"translate"),l()),t&2&&(x("routerLink",Ut(4,GI)),o(),v(" ",m(2,2,"labels.buttons.Cancel")," "))}var el=(()=>{class t{constructor(){this.loansService=A(Mt),this.settingsService=A(oe),this.route=A(Et),this.repaymentScheduleDetails=null,this.loanId=null,this.loanId=this.route.snapshot.params.loanId}showRepaymentInfo(){this.repaymentScheduleDetails=null;let e=this.settingsService.language.code,i=this.settingsService.dateFormat,a=this.loansService.buildLoanRequestPayload(this.loansAccount,this.loansAccountTemplate,this.loansAccountProductTemplate.calendarOptions,e,i);delete a.enableInstallmentLevelDelinquency,delete a.externalId,this.loansService.calculateLoanSchedule(a).subscribe(r=>{this.repaymentScheduleDetails=r})}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=Dt({type:t,selectors:[["mifosx-loans-account-schedule-step"]],inputs:{currencyCode:"currencyCode",loansAccountTemplate:"loansAccountTemplate",loansAccountProductTemplate:"loansAccountProductTemplate",loansAccount:"loansAccount"},decls:16,vars:12,consts:[[1,"layout-row-wrap","responsive-column"],["mat-flat-button","","color","primary",3,"click"],["icon","calendar",1,"m-r-10"],[1,"flex-100",3,"repaymentScheduleDetails","currencyCode"],[1,"layout-row","responsive-column","align-center","gap-2px","margin-t"],["mat-raised-button","","matStepperPrevious",""],["icon","arrow-left",1,"m-r-10"],["mat-raised-button","","matStepperNext",""],["icon","arrow-right",1,"m-l-10"],["mat-raised-button","",3,"routerLink"]],template:function(i,a){i&1&&(s(0,"div",0)(1,"button",1),it("click",function(){return a.showRepaymentInfo()}),T(2,"fa-icon",2),c(3),p(4,"translate"),l(),T(5,"mifosx-repayment-schedule-tab",3),l(),s(6,"div",4)(7,"button",5),T(8,"fa-icon",6),c(9),p(10,"translate"),l(),s(11,"button",7),c(12),p(13,"translate"),T(14,"fa-icon",8),l(),M(15,WI,3,5,"button",9),l()),i&2&&(o(3),v("",m(4,6,"labels.inputs.Generate Repayment Schedule")," "),o(2),x("repaymentScheduleDetails",a.repaymentScheduleDetails)("currencyCode",a.currencyCode),o(4),v(" ",m(10,8,"labels.buttons.Previous")," "),o(3),v(" ",m(13,10,"labels.buttons.Next")," "),o(3),O(a.loanId?15:-1))},dependencies:[wt,Tt,ae,Wt,un,ho,za,mo,Pt],encapsulation:2})}}return t})();var $I=()=>["../.."];function YI(t,n){if(t&1&&(s(0,"div",3)(1,"span",4),c(2),p(3,"translate"),l(),s(4,"span",5),c(5),p(6,"find"),l()()),t&2){let e=P();o(2),v("",m(3,2,"labels.inputs.Loan officer"),":"),o(3),b(Ye(6,4,e.loansAccount.loanOfficerId,e.loansAccountProductTemplate.loanOfficerOptions,"id","displayName"))}}function ZI(t,n){if(t&1&&(s(0,"div",3)(1,"span",4),c(2),p(3,"translate"),l(),s(4,"span",5),c(5),p(6,"find"),l()()),t&2){let e=P();o(2),v("",m(3,2,"labels.inputs.Loan purpose"),":"),o(3),b(Ye(6,4,e.loansAccount.loanPurposeId,e.loansAccountProductTemplate.loanPurposeOptions,"id","name"))}}function KI(t,n){if(t&1&&(s(0,"div",3)(1,"span",4),c(2),p(3,"translate"),l(),s(4,"span",5),c(5),p(6,"find"),l()()),t&2){let e=P();o(2),v("",m(3,2,"labels.inputs.Fund"),":"),o(3),b(Ye(6,4,e.loansAccount.fundId,e.loansAccountProductTemplate.fundOptions,"id","name"))}}function JI(t,n){if(t&1&&(s(0,"div",3)(1,"span",4),c(2),p(3,"translate"),l(),s(4,"span",5),T(5,"mifosx-external-identifier",16),l()()),t&2){let e=P();o(2),v("",m(3,3,"labels.inputs.External id"),":"),o(3),x("externalId",ce(e.loansAccount.externalId))}}function XI(t,n){t&1&&(s(0,"th",26),c(1),p(2,"translate"),l()),t&2&&(o(),b(m(2,1,"labels.inputs.Client ID")))}function QI(t,n){if(t&1&&(s(0,"td",27),c(1),l()),t&2){let e=n.$implicit;o(),b(e.id)}}function tE(t,n){t&1&&(s(0,"th",26),c(1),p(2,"translate"),l()),t&2&&(o(),b(m(2,1,"labels.inputs.Client Name")))}function eE(t,n){if(t&1&&(s(0,"td",27),c(1),l()),t&2){let e=n.$implicit;o(),b(e.displayName)}}function nE(t,n){t&1&&(s(0,"th",26),c(1),p(2,"translate"),l()),t&2&&(o(),b(m(2,1,"labels.inputs.Loan Purpose")))}function iE(t,n){if(t&1&&(s(0,"td",27),c(1),l()),t&2){let e=n.$implicit;o(),b(e.purpose)}}function aE(t,n){t&1&&(s(0,"th",26),c(1),p(2,"translate"),l()),t&2&&(o(),b(m(2,1,"labels.inputs.Original Loan")))}function oE(t,n){if(t&1&&(s(0,"td",27),c(1),p(2,"currency"),l()),t&2){let e=n.$implicit,i=P(2);o(),v(" ",Ye(2,1,e.principal,i.loansAccountProductTemplate.currency.code,"symbol-narrow","1.2-2")," ")}}function rE(t,n){t&1&&T(0,"tr",28)}function lE(t,n){t&1&&T(0,"tr",29)}function sE(t,n){if(t&1&&(s(0,"h3",7),c(1),p(2,"translate"),l(),T(3,"mat-divider",3),s(4,"div",5)(5,"table",17,0),X(7,18),k(8,XI,3,3,"th",19)(9,QI,2,1,"td",20),Q(),X(10,21),k(11,tE,3,3,"th",19)(12,eE,2,1,"td",20),Q(),X(13,22),k(14,nE,3,3,"th",19)(15,iE,2,1,"td",20),Q(),X(16,23),k(17,aE,3,3,"th",19)(18,oE,3,6,"td",20),Q(),k(19,rE,1,0,"tr",24)(20,lE,1,0,"tr",25),l()()),t&2){let e=P();o(),b(m(2,4,"labels.heading.Client Members")),o(4),x("dataSource",e.dataSource),o(14),x("matHeaderRowDef",e.membersDisplayedColumns),o(),x("matRowDefColumns",e.membersDisplayedColumns)}}function cE(t,n){if(t&1&&(s(0,"div",3)(1,"span",4),c(2),p(3,"translate"),l(),s(4,"span",5),c(5),p(6,"yesNo"),l()()),t&2){let e=P();o(2),v("",m(3,2,"labels.inputs.Enable Down Payments"),":"),o(3),b(m(6,4,e.loansAccount.enableDownPayment))}}function pE(t,n){if(t&1&&(s(0,"div",3)(1,"span",4),c(2),p(3,"translate"),l(),s(4,"span",5),c(5),p(6,"dateFormat"),l()()),t&2){let e=P();o(2),v("",m(3,2,"labels.inputs.First repayment on"),":"),o(3),b(m(6,4,e.loansAccount.repaymentsStartingFromDate))}}function mE(t,n){if(t&1&&(s(0,"div",3)(1,"span",4),c(2),p(3,"translate"),l(),s(4,"span",5),c(5),p(6,"dateFormat"),l()()),t&2){let e=P();o(2),v("",m(3,2,"labels.inputs.Interest charged from"),":"),o(3),b(m(6,4,e.loansAccount.interestChargedFromDate))}}function dE(t,n){if(t&1&&(s(0,"div",3)(1,"span",4),c(2),p(3,"translate"),l(),s(4,"span",5),c(5),l()()),t&2){let e=P();o(2),v("",m(3,3,"labels.inputs.Nominal interest rate"),":"),o(3),$t("",e.loansAccount.interestRatePerPeriod,"\xA0\xA0",e.loansAccountProductTemplate.interestRateFrequencyType.value)}}function uE(t,n){if(t&1&&(s(0,"div",3)(1,"span",4),c(2),p(3,"translate"),l(),s(4,"span",5),c(5),l()()),t&2){let e=P();o(2),v("",m(3,2,"labels.inputs.Interest method"),": "),o(3),b(e.loansAccount.interestType)}}function fE(t,n){if(t&1&&(s(0,"div",3)(1,"span",4),c(2),p(3,"translate"),l(),s(4,"span",5),c(5),l()()),t&2){let e=P();o(2),v("",m(3,2,"labels.inputs.Is Equal Amortization"),":"),o(3),b(e.loansAccount.isEqualAmortization)}}function hE(t,n){if(t&1&&(s(0,"div",3)(1,"span",4),c(2),p(3,"translate"),l(),s(4,"span",5),c(5),l()()),t&2){let e=P();o(2),v("",m(3,2,"labels.inputs.Calculate interest for exact days in partial period"),":"),o(3),b(e.loansAccount.allowPartialPeriodInterestCalculation)}}function gE(t,n){if(t&1&&(s(0,"div",3)(1,"span",4),c(2),p(3,"translate"),l(),s(4,"span",5),c(5),l()()),t&2){let e=P();o(2),v("",m(3,2,"labels.inputs.Arrears tolerance"),": "),o(3),b(e.loansAccount.inArrearsTolerance)}}function _E(t,n){if(t&1&&(s(0,"div",3)(1,"span",4),c(2),p(3,"translate"),l(),s(4,"span",5),c(5),l()()),t&2){let e=P();o(2),v("",m(3,2,"labels.inputs.Interest free period"),": "),o(3),b(e.loansAccount.graceOnInterestCharged)}}function CE(t,n){if(t&1&&(s(0,"div",3)(1,"span",4),c(2),p(3,"translate"),l(),s(4,"span",5),c(5),l()()),t&2){let e=P();o(2),v("",m(3,2,"labels.inputs.On principal payment"),": "),o(3),b(e.loansAccount.graceOnPrincipalPayment)}}function bE(t,n){if(t&1&&(s(0,"div",3)(1,"span",4),c(2),p(3,"translate"),l(),s(4,"span",5),c(5),l()()),t&2){let e=P();o(2),v("",m(3,2,"labels.inputs.On interest payment"),": "),o(3),b(e.loansAccount.graceOnInterestPayment)}}function vE(t,n){if(t&1&&(s(0,"div",3)(1,"span",4),c(2),p(3,"translate"),l(),s(4,"span",5),c(5),l()()),t&2){let e=P();o(2),v("",m(3,2,"labels.inputs.On Arrears Aging"),": "),o(3),b(e.loansAccount.graceOnArrearsAgeing)}}function xE(t,n){if(t&1&&(s(0,"div",3)(1,"span",4),c(2),p(3,"translate"),l(),s(4,"span",5),c(5),l()()),t&2){let e=P();o(2),v("",m(3,2,"labels.inputs.Is Topup Loan"),"? "),o(3),b(e.loansAccount.isTopup)}}function yE(t,n){if(t&1&&(s(0,"div",3)(1,"span",4),c(2),p(3,"translate"),l(),s(4,"span",5),c(5),l()()),t&2){let e=P();o(2),v("",m(3,2,"labels.inputs.Days in month"),": "),o(3),b(e.loansAccountProductTemplate==null?null:e.loansAccountProductTemplate.daysInMonthType.value)}}function SE(t,n){t&1&&(s(0,"th",26),c(1),p(2,"translate"),l()),t&2&&(o(),b(m(2,1,"labels.inputs.name")))}function DE(t,n){if(t&1&&(s(0,"td",27),c(1),l()),t&2){let e=n.$implicit;o(),v(" ",e.name+", "+((e.currency==null?null:e.currency.displaySymbol)||"")," ")}}function wE(t,n){t&1&&(s(0,"th",26),c(1),p(2,"translate"),l()),t&2&&(o(),b(m(2,1,"labels.inputs.Type")))}function TE(t,n){if(t&1&&(s(0,"td",27),c(1),l()),t&2){let e=n.$implicit;o(),v(" ",e.chargeCalculationType.value," ")}}function PE(t,n){t&1&&(s(0,"th",26),c(1),p(2,"translate"),l()),t&2&&(o(),b(m(2,1,"labels.inputs.Amount")))}function AE(t,n){if(t&1&&(s(0,"td",27),c(1),l()),t&2){let e=n.$implicit;o(),v(" ",e.amount," ")}}function ME(t,n){t&1&&(s(0,"th",26),c(1),p(2,"translate"),l()),t&2&&(o(),b(m(2,1,"labels.inputs.Collected On")))}function OE(t,n){if(t&1&&(s(0,"td",27),c(1),l()),t&2){let e=n.$implicit;o(),v(" ",e.chargeTimeType.value," ")}}function IE(t,n){t&1&&(s(0,"th",26),c(1),p(2,"translate"),l()),t&2&&(o(),b(m(2,1,"labels.inputs.Date")))}function EE(t,n){if(t&1&&(s(0,"span"),c(1),p(2,"dateFormat"),l()),t&2){let e=P().$implicit;o(),v(" ",m(2,1,e.dueDate)||"Unassigned"," ")}}function LE(t,n){if(t&1&&(s(0,"span"),c(1),p(2,"dateFormat"),l()),t&2){let e=P().$implicit;o(),v(" ",m(2,1,e.feeOnMonthDay)||"Unassigned"," ")}}function NE(t,n){t&1&&(s(0,"span"),c(1),p(2,"translate"),l()),t&2&&(o(),v(" ",m(2,1,"labels.inputs.N/A")," "))}function kE(t,n){if(t&1&&(s(0,"td",27),M(1,EE,3,3,"span"),M(2,LE,3,3,"span"),M(3,NE,3,3,"span"),l()),t&2){let e=n.$implicit;o(),O(e.chargeTimeType.value==="Specified due date"||e.chargeTimeType.value==="Weekly Fee"?1:-1),o(),O(e.chargeTimeType.value==="Monthly Fee"||e.chargeTimeType.value==="Annual Fee"?2:-1),o(),O(e.chargeTimeType.value==="Monthly Fee"||e.chargeTimeType.value==="Annual Fee"||e.chargeTimeType.value==="Specified due date"||e.chargeTimeType.value==="Weekly Fee"?-1:3)}}function FE(t,n){t&1&&T(0,"tr",28)}function RE(t,n){t&1&&T(0,"tr",29)}function BE(t,n){if(t&1&&(s(0,"div",9)(1,"h3",2),c(2),p(3,"translate"),l(),T(4,"mat-divider",3),s(5,"table",30),X(6,21),k(7,SE,3,3,"th",19)(8,DE,2,1,"td",20),Q(),X(9,31),k(10,wE,3,3,"th",19)(11,TE,2,1,"td",20),Q(),X(12,32),k(13,PE,3,3,"th",19)(14,AE,2,1,"td",20),Q(),X(15,33),k(16,ME,3,3,"th",19)(17,OE,2,1,"td",20),Q(),X(18,34),k(19,IE,3,3,"th",19)(20,kE,4,3,"td",20),Q(),k(21,FE,1,0,"tr",24)(22,RE,1,0,"tr",25),l()()),t&2){let e=P();o(2),b(m(3,4,"labels.heading.Charges")),o(3),x("dataSource",e.loansAccount.charges),o(16),x("matHeaderRowDef",e.chargesDisplayedColumns),o(),x("matRowDefColumns",e.chargesDisplayedColumns)}}function qE(t,n){t&1&&(s(0,"th",26),c(1),p(2,"translate"),l()),t&2&&(o(),b(m(2,1,"labels.inputs.name")))}function jE(t,n){if(t&1&&(s(0,"td",27),c(1),l()),t&2){let e=n.$implicit;o(),b(e.name+", "+((e.currency==null?null:e.currency.displaySymbol)||""))}}function zE(t,n){t&1&&(s(0,"th",26),c(1),p(2,"translate"),l()),t&2&&(o(),b(m(2,1,"labels.inputs.Type")))}function VE(t,n){if(t&1&&(s(0,"td",27),c(1),l()),t&2){let e=n.$implicit;o(),b(e.chargeCalculationType.value)}}function UE(t,n){t&1&&(s(0,"th",26),c(1),p(2,"translate"),l()),t&2&&(o(),b(m(2,1,"labels.inputs.Amount")))}function HE(t,n){if(t&1&&(s(0,"td",27),c(1),p(2,"formatNumber"),l()),t&2){let e=n.$implicit;o(),b(m(2,1,e.amount))}}function GE(t,n){t&1&&(s(0,"th",26),c(1),p(2,"translate"),l()),t&2&&(o(),b(m(2,1,"labels.inputs.Collected On")))}function WE(t,n){if(t&1&&(s(0,"td",27),c(1),l()),t&2){let e=n.$implicit;o(),b(e.chargeTimeType.value)}}function $E(t,n){t&1&&T(0,"tr",28)}function YE(t,n){t&1&&T(0,"tr",29)}function ZE(t,n){if(t&1&&(s(0,"div",10)(1,"h3",35),c(2),p(3,"translate"),l(),T(4,"mat-divider",36),s(5,"table",37),X(6,21),k(7,qE,3,3,"th",19)(8,jE,2,1,"td",20),Q(),X(9,38),k(10,zE,3,3,"th",19)(11,VE,2,1,"td",20),Q(),X(12,32),k(13,UE,3,3,"th",19)(14,HE,3,3,"td",20),Q(),X(15,39),k(16,GE,3,3,"th",19)(17,WE,2,1,"td",20),Q(),k(18,$E,1,0,"tr",24)(19,YE,1,0,"tr",25),l()()),t&2){let e=P();o(2),b(m(3,4,"labels.heading.Overdue Charges")),o(3),x("dataSource",e.loansAccountProductTemplate.overdueCharges),o(13),x("matHeaderRowDef",e.overdueChargesDisplayedColumns),o(),x("matRowDefColumns",e.overdueChargesDisplayedColumns)}}var nl=(()=>{class t{constructor(){this.loansAccountTemplate=[],this.submitEvent=new Yl,this.chargesDisplayedColumns=["name","chargeCalculationType","amount","chargeTimeType","date"],this.overdueChargesDisplayedColumns=["name","type","amount","collectedon"],this.membersDisplayedColumns=["id","name","purpose","principal"],this.loanPurposeOptions=[],this.productEnableDownPayment=!1}ngOnChanges(e){this.productEnableDownPayment=this.loansAccountProductTemplate.product.enableDownPayment,this.activeClientMembers&&(this.loanPurposeOptions=this.loansAccountProductTemplate.loanPurposeOptions,this.dataSource=new Li(this.activeClientMembers.filter(i=>i.selected).map(i=>ve(ie({},i),{purpose:this.loanPurposeOptions.find(a=>a.id===i.loanPurposeId)?.name}))),this.loansAccount.principalAmount=this.activeClientMembers.filter(i=>i.selected).reduce((i,a)=>i+(a.principal??0),0))}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=Dt({type:t,selectors:[["mifosx-loans-account-preview-step"]],inputs:{loansAccountTemplate:"loansAccountTemplate",loansAccountProductTemplate:"loansAccountProductTemplate",loansAccount:"loansAccount",activeClientMembers:"activeClientMembers"},outputs:{submitEvent:"submitEvent"},features:[Vr],decls:145,vars:161,consts:[["membersTable",""],[1,"content","responsive-column"],[1,"mat-h3","flex-fill"],[1,"flex-fill"],[1,"flex-40"],[1,"flex-60"],[3,"chars","textValue"],[1,"mat-h3","margin-t","flex-fill"],[1,"m-l-5"],[1,"layout-row-wrap","responsive-column","flex-fill","margin-t"],[1,"flex-fill","layout-row-wrap","layout-xs-column","margin-t"],[1,"layout-row","responsive-column","align-center","gap-2px","margin-t"],["mat-raised-button","","matStepperPrevious",""],["icon","arrow-left",1,"m-r-10"],["mat-raised-button","",3,"routerLink"],["mat-raised-button","","color","primary",3,"click"],[3,"externalId"],["mat-table","",3,"dataSource"],["matColumnDef","id"],["mat-header-cell","",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","name"],["matColumnDef","purpose"],["matColumnDef","principal"],["mat-header-row","",4,"matHeaderRowDef"],["mat-row","",4,"matRowDef","matRowDefColumns"],["mat-header-cell",""],["mat-cell",""],["mat-header-row",""],["mat-row",""],["mat-table","",1,"flex-fill","mat-elevation-z1",3,"dataSource"],["matColumnDef","chargeCalculationType"],["matColumnDef","amount"],["matColumnDef","chargeTimeType"],["matColumnDef","date"],[1,"mat-h3","flex-98"],[1,"flex-98"],["mat-table","",1,"mat-elevation-z1",3,"dataSource"],["matColumnDef","type"],["matColumnDef","collectedon"]],template:function(i,a){i&1&&(s(0,"div",1)(1,"h3",2),c(2),p(3,"translate"),l(),s(4,"div",3)(5,"span",4),c(6),p(7,"translate"),l(),s(8,"span",5),T(9,"mifosx-long-text",6),p(10,"find"),l()(),M(11,YI,7,9,"div",3),M(12,ZI,7,9,"div",3),M(13,KI,7,9,"div",3),s(14,"div",3)(15,"span",4),c(16),p(17,"translate"),l(),s(18,"span",5),c(19),p(20,"dateFormat"),l()(),s(21,"div",3)(22,"span",4),c(23),p(24,"translate"),l(),s(25,"span",5),c(26),p(27,"dateFormat"),l()(),M(28,JI,6,5,"div",3),M(29,sE,21,6),s(30,"h3",7),c(31),p(32,"translate"),l(),T(33,"mat-divider",3),s(34,"div",3)(35,"span",4),c(36),p(37,"translate"),l(),s(38,"span",5),c(39),p(40,"currency"),s(41,"span",8),c(42),l()()(),s(43,"div",3)(44,"span",4),c(45),p(46,"translate"),l(),s(47,"span",5),c(48),p(49,"find"),l()(),s(50,"div",3)(51,"span",4),c(52),p(53,"translate"),l(),s(54,"span",5),c(55),l()(),s(56,"div",3)(57,"span",4),c(58),p(59,"translate"),l(),s(60,"span",5),c(61),p(62,"find"),p(63,"find"),p(64,"find"),l()(),M(65,cE,7,6,"div",3),M(66,pE,7,6,"div",3),M(67,mE,7,6,"div",3),M(68,dE,6,5,"div",3),M(69,uE,6,4,"div",3),M(70,fE,6,4,"div",3),s(71,"div",3)(72,"span",4),c(73),p(74,"translate"),l(),s(75,"span",5),c(76),p(77,"find"),l()(),s(78,"div",3)(79,"span",4),c(80),p(81,"translate"),l(),s(82,"span",5),c(83),p(84,"find"),l()(),M(85,hE,6,4,"div",3),M(86,gE,6,4,"div",3),M(87,_E,6,4,"div",3),s(88,"div",3)(89,"span",4),c(90),p(91,"translate"),l(),s(92,"span",5),c(93),p(94,"find"),l()(),s(95,"div",3)(96,"span",4),c(97),p(98,"translate"),l(),s(99,"span",5),c(100),p(101,"formatNumber"),l()(),s(102,"div",3)(103,"span",4),c(104),p(105,"translate"),l(),s(106,"span",5),c(107),p(108,"formatNumber"),l()(),s(109,"h3",7),c(110),p(111,"translate"),l(),T(112,"mat-divider",3),M(113,CE,6,4,"div",3),M(114,bE,6,4,"div",3),M(115,vE,6,4,"div",3),s(116,"div",3)(117,"span",4),c(118),p(119,"translate"),l(),s(120,"span",5),c(121),p(122,"yesNo"),l()(),M(123,xE,6,4,"div",3),s(124,"div",3)(125,"span",4),c(126),p(127,"translate"),l(),s(128,"span",5),c(129),p(130,"yesNo"),l()(),M(131,yE,6,4,"div",3),M(132,BE,23,6,"div",9),M(133,ZE,20,6,"div",10),l(),s(134,"div",11)(135,"button",12),T(136,"fa-icon",13),c(137),p(138,"translate"),l(),s(139,"button",14),c(140),p(141,"translate"),l(),s(142,"button",15),it("click",function(){return a.submitEvent.emit()}),c(143),p(144,"translate"),l()()),i&2&&(o(2),b(m(3,63,"labels.heading.Details")),o(4),v("",m(7,65,"labels.inputs.Product"),":"),o(3),x("textValue",If(` - `,Ye(10,67,a.loansAccount.productId,a.loansAccountTemplate.productOptions,"id","name")))("chars",60),o(2),O(a.loansAccount.loanOfficerId?11:-1),o(),O(a.loansAccount.loanPurposeId?12:-1),o(),O(a.loansAccount.fundId?13:-1),o(3),v("",m(17,72,"labels.inputs.Submitted on"),":"),o(3),b(m(20,74,a.loansAccount.submittedOnDate)),o(4),v("",m(24,76,"labels.inputs.Disbursement on"),":"),o(3),b(m(27,78,a.loansAccount.expectedDisbursementDate)),o(2),O(a.loansAccount.externalId?28:-1),o(),O(a.activeClientMembers?29:-1),o(2),b(m(32,80,"labels.heading.Terms")),o(5),v("",m(37,82,"labels.inputs.Principal"),":"),o(3),v(" ",Ye(40,84,a.loansAccount.principalAmount,a.loansAccountProductTemplate.currency.code,"symbol-narrow","1.2-2")," "),o(3),b(a.loansAccountProductTemplate.currency.code),o(3),v("",m(46,89,"labels.inputs.Loan Term"),":"),o(3),$t("",a.loansAccount.loanTermFrequency," ",Ye(49,91,a.loansAccount.loanTermFrequencyType,a.loansAccountProductTemplate.termFrequencyTypeOptions,"id","name")),o(4),v("",m(53,96,"labels.inputs.Number of repayments"),":"),o(3),b(a.loansAccount.numberOfRepayments),o(3),v("",m(59,98,"labels.inputs.Repaid every"),":"),o(3),Qs("",a.loansAccount.repaymentEvery," ",Ye(62,100,a.loansAccount.repaymentFrequencyType,a.loansAccountProductTemplate.termFrequencyTypeOptions,"id","name")," ",Ye(63,105,a.loansAccount.repaymentFrequencyNthDayType,a.loansAccountProductTemplate.repaymentFrequencyNthDayTypeOptions,"id","name")," ",Ye(64,110,a.loansAccount.repaymentFrequencyDayOfWeekType,a.loansAccountProductTemplate.repaymentFrequencyDaysOfWeekTypeOptions,"id","name")),o(4),O(a.productEnableDownPayment?65:-1),o(),O(a.loansAccount.repaymentsStartingFromDate?66:-1),o(),O(a.loansAccount.interestChargedFromDate?67:-1),o(),O(a.loansAccount.interestRatePerPeriod?68:-1),o(),O(a.loansAccount.interestType?69:-1),o(),O(a.loansAccount.isEqualAmortization?70:-1),o(3),b(m(74,115,"labels.inputs.Amortization")),o(3),b(Ye(77,117,a.loansAccount.amortizationType,a.loansAccountProductTemplate.amortizationTypeOptions,"id","value")),o(4),v("",m(81,122,"labels.inputs.Interest calculation period"),": "),o(3),b(Ye(84,124,a.loansAccount.interestCalculationPeriodType,a.loansAccountProductTemplate.interestCalculationPeriodTypeOptions,"id","value")),o(2),O(a.loansAccount.allowPartialPeriodInterestCalculation?85:-1),o(),O(a.loansAccount.inArrearsTolerance?86:-1),o(),O(a.loansAccount.graceOnInterestCharged?87:-1),o(3),v("",m(91,129,"labels.inputs.Repayment strategy"),": "),o(3),b(Ye(94,131,a.loansAccount.transactionProcessingStrategyCode,a.loansAccountProductTemplate.transactionProcessingStrategyOptions,"code","name")),o(4),v(" ",m(98,136,"labels.inputs.Installment Amount")," "),o(3),v(" ",m(101,138,a.loansAccount.fixedEmiAmount)," "),o(4),v(" ",m(105,140,"labels.inputs.Balloon Repayment Amount")," "),o(3),v(" ",m(108,142,a.loansAccount.balloonRepaymentAmount)," "),o(3),b(m(111,144,"labels.heading.Moratorium")),o(3),O(a.loansAccount.graceOnPrincipalPayment?113:-1),o(),O(a.loansAccount.graceOnInterestPayment?114:-1),o(),O(a.loansAccount.graceOnArrearsAgeing?115:-1),o(3),v(" ",m(119,146,"labels.inputs.Enable installment level Delinquency")," "),o(3),v(" ",m(122,148,a.loansAccount.enableInstallmentLevelDelinquency)," "),o(2),O(a.loansAccount.isTopup?123:-1),o(3),v("",m(127,150,"labels.inputs.Recalculate Interest"),": "),o(3),b(m(130,152,a.loansAccountProductTemplate==null?null:a.loansAccountProductTemplate.isInterestRecalculationEnabled)),o(2),O(a.loansAccountProductTemplate!=null&&a.loansAccountProductTemplate.daysInMonthType?131:-1),o(),O(a.loansAccount.charges.length?132:-1),o(),O(a.loansAccountProductTemplate.overdueCharges.length?133:-1),o(4),v(" ",m(138,154,"labels.buttons.Previous")," "),o(2),x("routerLink",Ut(160,$I)),o(),v(" ",m(141,156,"labels.buttons.Cancel")," "),o(3),v(" ",m(144,158,"labels.buttons.Submit")," "))},dependencies:[wt,Tt,ae,Wt,Mp,Va,$o,bn,yn,xn,Sn,vn,Dn,wn,Pn,Tn,An,za,un,Sa,En,Pt,Pp,hn,Hr],styles:["table[_ngcontent-%COMP%]{width:100%}.mat-elevation-z1[_ngcontent-%COMP%]{margin:1em 0 1.5em}h2[_ngcontent-%COMP%], h3[_ngcontent-%COMP%], h4[_ngcontent-%COMP%]{margin:0;font-weight:500}span[_ngcontent-%COMP%]{margin:.5em 0}mat-divider[_ngcontent-%COMP%]{margin:0 0 .5em}.margin-t[_ngcontent-%COMP%]{margin-top:1em}"]})}}return t})();var KE=["dtloan"];function JE(t,n){t&1&&T(0,"fa-icon",20)}function XE(t,n){t&1&&T(0,"fa-icon",20)}function QE(t,n){t&1&&T(0,"fa-icon",21)}function t7(t,n){t&1&&T(0,"fa-icon",22)}function e7(t,n){t&1&&T(0,"fa-icon",23)}function n7(t,n){t&1&&(c(0),p(1,"translate")),t&2&&b(m(1,1,"labels.inputs.DETAILS"))}function i7(t,n){t&1&&(c(0),p(1,"translate")),t&2&&b(m(1,1,"labels.inputs.TERMS"))}function a7(t,n){t&1&&(c(0),p(1,"translate")),t&2&&b(m(1,1,"labels.inputs.CHARGES"))}function o7(t,n){t&1&&(c(0),p(1,"translate")),t&2&&b(m(1,1,"labels.inputs.REPAYMENT SCHEDULE"))}function r7(t,n){if(t&1&&(s(0,"mat-step",18),k(1,o7,2,3,"ng-template",14),T(2,"mifosx-loans-account-schedule-step",24,4),l()),t&2){let e=P();o(2),x("loansAccountTemplate",e.loansAccountTemplate)("loansAccountProductTemplate",e.loansAccountProductTemplate)("loansAccount",e.loansAccount)("currencyCode",e.currencyCode)}}function l7(t,n){if(t&1&&c(0),t&2){let e=P().$implicit;b(e.registeredTableName)}}function s7(t,n){if(t&1&&(s(0,"mat-step"),k(1,l7,1,1,"ng-template",14),T(2,"mifosx-loans-account-datatable-step",25,5),l()),t&2){let e=n.$implicit;o(2),x("datatableData",e)}}function c7(t,n){t&1&&(c(0),p(1,"translate")),t&2&&b(m(1,1,"labels.inputs.PREVIEW"))}function p7(t,n){if(t&1){let e=xt();s(0,"mat-step",19),k(1,c7,2,3,"ng-template",14),s(2,"mifosx-loans-account-preview-step",26),it("submitEvent",function(){mt(e);let a=P();return dt(a.submit())}),l()()}if(t&2){let e=P();o(2),x("loansAccountTemplate",e.loansAccountTemplate)("loansAccountProductTemplate",e.loansAccountProductTemplate)("loansAccount",e.loansAccount)}}var s0=(()=>{class t{constructor(){this.route=A(Et),this.router=A(le),this.loansService=A(Mt),this.settingsService=A(oe),this.clientService=A(ns),this.loansAccountProductTemplate=null,this.datatables=[],this.route.data.subscribe(e=>{this.loansAccountTemplate=e.loansAccountTemplate})}setTemplate(e){this.loansAccountProductTemplate=e,this.currencyCode=this.loansAccountProductTemplate.currency.code;let i=this.loansAccountTemplate.clientId;i?this.clientService.getCollateralTemplate(i).subscribe(d=>{this.collateralOptions=d}):console.error("No collateral data requested from Fineract, collateral might misbehave");let a=this.loansAccountTemplate.clientId?this.loansAccountTemplate.clientId:this.loansAccountTemplate.group.id,r=!this.loansAccountTemplate.clientId,u=this.loansAccountProductTemplate.loanProductId;this.loansService.getLoansAccountTemplateResource(a,r,u).subscribe(d=>{this.multiDisburseLoan=d.multiDisburseLoan}),this.setDatatables()}setDatatables(){this.datatables=[],this.loansAccountProductTemplate.datatables&&this.loansAccountProductTemplate.datatables.forEach(e=>{this.datatables.push(e)})}get loansAccountDetailsForm(){return this.loansAccountDetailsStep.loansAccountDetailsForm}get loansAccountTermsForm(){return this.loansAccountTermsStep.loansAccountTermsForm}get loansAccountFormValid(){return this.loansAccountDetailsForm.valid&&this.loansAccountTermsForm.valid}get loansSavingsAccountLinked(){return this.loansAccountDetailsStep.loansAccountDetailsForm.get("linkAccountId").value}get loanPrincipal(){return this.loansAccountTermsStep.loansAccountTermsForm.value.principal}get loansAccount(){return ie(ie(ie(ie(ie({},this.loansAccountDetailsStep.loansAccountDetails),this.loansAccountTermsStep.loansAccountTerms),this.loansAccountChargesStep.loansAccountCharges),this.loansAccountTermsStep.loanCollateral),this.loansAccountTermsStep.disbursementData)}submit(){let e=this.settingsService.language.code,i=this.settingsService.dateFormat,a=this.loansService.buildLoanRequestPayload(this.loansAccount,this.loansAccountTemplate,this.loansAccountProductTemplate.calendarOptions,e,i);if(this.loansAccountProductTemplate.datatables&&this.loansAccountProductTemplate.datatables.length>0){let r=[];this.loanDatatables.forEach(u=>{r.push(u.payload)}),a.datatables=r}this.loansService.createLoansAccount(a).subscribe(r=>{this.router.navigate(["../",r.resourceId,"general"],{relativeTo:this.route})})}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=Dt({type:t,selectors:[["mifosx-create-loans-account"]],viewQuery:function(i,a){if(i&1&&(mi(Oo,7),mi(Io,7),mi(Eo,7),mi(KE,5)),i&2){let r;di(r=ui())&&(a.loansAccountDetailsStep=r.first),di(r=ui())&&(a.loansAccountTermsStep=r.first),di(r=ui())&&(a.loansAccountChargesStep=r.first),di(r=ui())&&(a.loanDatatables=r)}},decls:24,vars:15,consts:[["loansAccountStepper",""],["loansAccountDetailsForm",""],["loanAccountTerms",""],["loanAccountCharges",""],["loanAccountSchedule",""],["dtloan",""],[1,"container"],["orientation","vertical","labelPosition","bottom",1,"mat-elevation-z8",3,"linear"],["matStepperIcon","number"],["matStepperIcon","edit"],["matStepperIcon","done"],["matStepperIcon","error"],["matStepperIcon","preview"],[3,"stepControl"],["matStepLabel",""],[3,"loansAccountProductTemplate","loansAccountTemplate"],[3,"loansAccountProductTemplate","loansAccountTemplate","collateralOptions","loansAccountFormValid","loanPrincipal"],[3,"loansAccountProductTemplate","loansAccountTemplate","loansAccountFormValid","loansSavingsAccountLinked"],["state","repayment","completed",""],["state","preview","completed",""],["icon","pencil-alt","size","sm"],["icon","check","size","sm"],["icon","exclamation-triangle","size","lg"],["icon","eye","size","sm"],[3,"loansAccountTemplate","loansAccountProductTemplate","loansAccount","currencyCode"],[3,"datatableData"],[3,"submitEvent","loansAccountTemplate","loansAccountProductTemplate","loansAccount"]],template:function(i,a){if(i&1){let r=xt();s(0,"div",6)(1,"mat-stepper",7,0),k(3,JE,1,0,"ng-template",8)(4,XE,1,0,"ng-template",9)(5,QE,1,0,"ng-template",10)(6,t7,1,0,"ng-template",11)(7,e7,1,0,"ng-template",12),s(8,"mat-step",13),k(9,n7,2,3,"ng-template",14),s(10,"mifosx-loans-account-details-step",15,1),it("loansAccountProductTemplate",function(d){return mt(r),dt(a.setTemplate(d))}),l()(),s(12,"mat-step",13),k(13,i7,2,3,"ng-template",14),T(14,"mifosx-loans-account-terms-step",16,2),l(),s(16,"mat-step"),k(17,a7,2,3,"ng-template",14),T(18,"mifosx-loans-account-charges-step",17,3),l(),M(20,r7,4,4,"mat-step",18),ue(21,s7,4,1,"mat-step",null,Ce),M(23,p7,3,3,"mat-step",19),l()()}if(i&2){let r=Lt(11);o(),x("linear",!1),o(7),x("stepControl",r),o(2),x("loansAccountTemplate",a.loansAccountTemplate),o(2),x("stepControl",a.loansAccountTermsForm),o(2),x("loansAccountProductTemplate",a.loansAccountProductTemplate)("loansAccountTemplate",a.loansAccountTemplate)("collateralOptions",a.collateralOptions)("loansAccountFormValid",a.loansAccountFormValid)("loanPrincipal",a.loanPrincipal),o(4),x("loansAccountProductTemplate",a.loansAccountProductTemplate)("loansAccountTemplate",a.loansAccountTemplate)("loansAccountFormValid",a.loansAccountFormValid)("loansSavingsAccountLinked",a.loansSavingsAccountLinked),o(2),O(a.loansAccountFormValid?20:-1),o(),fe(a.datatables),o(2),O(a.loansAccountFormValid?23:-1)}},dependencies:[wt,Tt,es,Ql,un,ts,Xl,Oo,Io,Eo,el,Ss,nl,Pt],encapsulation:2})}}return t})();var c0=(()=>{class t{constructor(){this.route=A(Et),this.loansService=A(Mt),this.settingsService=A(oe),this.entityType="loans",this.entityId=this.route.parent.snapshot.params.loanId,this.route.data.subscribe(e=>{this.getLoanDocumentsData(e.loanDocuments)})}ngOnInit(){this.route.parent.params.subscribe(e=>{this.entityId=e.loanId})}getLoanDocumentsData(e){e.forEach(i=>{i.docUrl=this.settingsService.serverUrl+"/loans/"+i.parentEntityId+"/documents/"+i.id+"/attachment?tenantIdentifier="+qf.fineractPlatformTenantId,i.fileName&&(i.fileName.toLowerCase().indexOf(".jpg")!==-1||i.fileName.toLowerCase().indexOf(".jpeg")!==-1||i.fileName.toLowerCase().indexOf(".png")!==-1)&&(i.fileIsImage=!0),i.type&&i.type.toLowerCase().indexOf("image")!==-1&&(i.fileIsImage=!0)}),this.entityDocuments=e}uploadDocument(e){return this.loansService.loadLoanDocument(this.entityId,e)}deleteDocument(e){this.loansService.deleteLoanDocument(this.entityId,e).subscribe(i=>{})}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=Dt({type:t,selectors:[["mifosx-loan-documents-tab"]],decls:1,vars:5,consts:[[3,"entityType","entityId","entityDocuments","callbackUpload","callbackDelete"]],template:function(i,a){i&1&&T(0,"mifosx-entity-documents-tab",0),i&2&&x("entityType",a.entityType)("entityId",a.entityId)("entityDocuments",a.entityDocuments)("callbackUpload",a.uploadDocument)("callbackDelete",a.deleteDocument)},dependencies:[wt,Tt,s1],styles:["table[_ngcontent-%COMP%]{width:100%;margin-top:3%}table[_ngcontent-%COMP%] .document-action-button[_ngcontent-%COMP%]{min-width:26px;padding:0 6px;margin:4px;line-height:25px}.tab-container[_ngcontent-%COMP%]{padding:1%;margin:1%}"]})}}return t})();var m7=["instructionsTable"];function d7(t,n){t&1&&(s(0,"th",16),c(1),p(2,"translate"),l()),t&2&&(o(),b(m(2,1,"labels.inputs.Client")))}function u7(t,n){if(t&1&&(s(0,"td",17),c(1),l()),t&2){let e=n.$implicit;o(),$t(" ",e.fromClient.displayName,"-",e.fromClient.id," ")}}function f7(t,n){t&1&&(s(0,"th",16),c(1),p(2,"translate"),l()),t&2&&(o(),b(m(2,1,"labels.inputs.From Account")))}function h7(t,n){if(t&1&&(s(0,"td",17),c(1),l()),t&2){let e=n.$implicit;o(),$t(" ",e.fromAccount.accountNo," (",e.fromAccountType.value,") ")}}function g7(t,n){t&1&&(s(0,"th",16),c(1),p(2,"translate"),l()),t&2&&(o(),b(m(2,1,"labels.inputs.Beneficiary")))}function _7(t,n){if(t&1&&(s(0,"span"),c(1),l()),t&2){let e=P().$implicit;o(),v(" ",e.toClient.displayName," ")}}function C7(t,n){t&1&&(s(0,"span"),c(1),p(2,"translate"),l()),t&2&&(o(),b(m(2,1,"labels.inputs.Own Account")))}function b7(t,n){if(t&1&&(s(0,"td",17),M(1,_7,2,1,"span"),M(2,C7,3,3,"span"),l()),t&2){let e=n.$implicit;o(),O(e.fromClient.id!==e.toClient.id?1:-1),o(),O(e.fromClient.id===e.toClient.id?2:-1)}}function v7(t,n){t&1&&(s(0,"th",16),c(1),p(2,"translate"),l()),t&2&&(o(),b(m(2,1,"labels.inputs.To Account")))}function x7(t,n){if(t&1&&(s(0,"td",17),c(1),l()),t&2){let e=n.$implicit;o(),$t(" ",e.toAccount.accountNo," (",e.toAccountType.value,") ")}}function y7(t,n){t&1&&(s(0,"th",16),c(1),p(2,"translate"),l()),t&2&&(o(),b(m(2,1,"labels.inputs.Amount")))}function S7(t,n){if(t&1&&(s(0,"td",17),c(1),l()),t&2){let e=n.$implicit;o(),$t("",e.instructionType.value,"/",e.amount)}}function D7(t,n){t&1&&(s(0,"th",16),c(1),p(2,"translate"),l()),t&2&&(o(),b(m(2,1,"labels.inputs.Validity")))}function w7(t,n){if(t&1&&(s(0,"td",17),c(1),p(2,"dateFormat"),p(3,"dateFormat"),l()),t&2){let e=n.$implicit;o(),$t(" ",m(2,2,e.validFrom)," to ",m(3,4,e.validTill)," ")}}function T7(t,n){t&1&&(s(0,"th",16),c(1),p(2,"translate"),l()),t&2&&(o(),b(m(2,1,"labels.inputs.Actions")))}function P7(t,n){t&1&&(s(0,"button",19),p(1,"translate"),T(2,"i",20),l()),t&2&&x("matTooltip",ce(m(1,2,"tooltips.Edit Standing Instruction")))}function A7(t,n){t&1&&(s(0,"span"),k(1,P7,3,4,"button",18),l()),t&2&&(o(),x("mifosxHasPermission","UPDATE_STANDINGINSTRUCTION"))}function M7(t,n){if(t&1){let e=xt();s(0,"button",22),p(1,"translate"),it("click",function(){mt(e);let a=P(2).$implicit,r=P();return dt(r.deleteStandingInstruction(a.id))}),T(2,"i",23),l()}t&2&&x("matTooltip",ce(m(1,2,"tooltips.Delete Standing Instruction")))}function O7(t,n){t&1&&(s(0,"span"),k(1,M7,3,4,"button",21),l()),t&2&&(o(),x("mifosxHasPermission","DELETE_STANDINGINSTRUCTION"))}function I7(t,n){t&1&&(s(0,"button",19),p(1,"translate"),T(2,"i",24),l()),t&2&&x("matTooltip",ce(m(1,2,"tooltips.View Standing Instruction")))}function E7(t,n){if(t&1&&(s(0,"td",17),M(1,A7,2,1,"span"),M(2,O7,2,1,"span"),k(3,I7,3,4,"button",18),l()),t&2){let e=n.$implicit;o(),O(e.status.value!=="Deleted"?1:-1),o(),O(e.status.value!=="Deleted"?2:-1),o(),x("mifosxHasPermission","READ_STANDINGINSTRUCTION")}}function L7(t,n){t&1&&T(0,"tr",25)}function N7(t,n){t&1&&T(0,"tr",26)}var p0=(()=>{class t{constructor(){this.route=A(Et),this.loansService=A(Mt),this.dialog=A(Gn),this.accountTransfersService=A(g1),this.settingsService=A(oe),this.dataSource=new Li,this.displayedColumns=["client","fromAccount","beneficiary","toAccount","amount","validity","actions"],this.route.parent.data.subscribe(e=>{this.loanDetailsData=e.loanDetailsData})}ngOnInit(){this.getStandingInstructions()}getStandingInstructions(){let e=this.loanDetailsData.clientId,i=this.loanDetailsData.clientName,a=this.loanDetailsData.id,r=this.settingsService.language.code,u=this.settingsService.dateFormat;this.loansService.getStandingInstructions(e,i,a,r,u).subscribe(d=>{this.instructionsData=d.pageItems,this.dataSource.data=this.instructionsData,this.instructionTableRef.renderRows()})}deleteStandingInstruction(e){this.dialog.open(ra,{data:{deleteContext:`standing instruction id: ${e}`}}).afterClosed().subscribe(a=>{a.delete&&this.accountTransfersService.deleteStandingInstrucions(e).subscribe(()=>{})})}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=Dt({type:t,selectors:[["mifosx-standing-instructions-tab"]],viewQuery:function(i,a){if(i&1&&mi(m7,7),i&2){let r;di(r=ui())&&(a.instructionTableRef=r.first)}},decls:31,vars:6,consts:[["instructionsTable",""],[1,"tab-container","mat-typography"],[1,"m-b-10"],[1,"mat-elevation-z1","m-b-25"],["mat-table","",3,"dataSource"],["matColumnDef","client"],["mat-header-cell","",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","fromAccount"],["matColumnDef","beneficiary"],["matColumnDef","toAccount"],["matColumnDef","amount"],["matColumnDef","validity"],["matColumnDef","actions"],["mat-header-row","",4,"matHeaderRowDef"],["mat-row","",4,"matRowDef","matRowDefColumns"],["mat-header-cell",""],["mat-cell",""],["class","account-action-button","mat-raised-button","","color","primary",3,"matTooltip",4,"mifosxHasPermission"],["mat-raised-button","","color","primary",1,"account-action-button",3,"matTooltip"],[1,"fa","fa-edit"],["class","account-action-button","mat-raised-button","","color","warn",3,"matTooltip","click",4,"mifosxHasPermission"],["mat-raised-button","","color","warn",1,"account-action-button",3,"click","matTooltip"],[1,"fa","fa-times"],[1,"fa","fa-eye"],["mat-header-row",""],["mat-row",""]],template:function(i,a){i&1&&(s(0,"div",1)(1,"div",2)(2,"h3"),c(3),p(4,"translate"),l()(),s(5,"div",3)(6,"table",4,0),X(8,5),k(9,d7,3,3,"th",6)(10,u7,2,2,"td",7),Q(),X(11,8),k(12,f7,3,3,"th",6)(13,h7,2,2,"td",7),Q(),X(14,9),k(15,g7,3,3,"th",6)(16,b7,3,2,"td",7),Q(),X(17,10),k(18,v7,3,3,"th",6)(19,x7,2,2,"td",7),Q(),X(20,11),k(21,y7,3,3,"th",6)(22,S7,2,2,"td",7),Q(),X(23,12),k(24,D7,3,3,"th",6)(25,w7,4,6,"td",7),Q(),X(26,13),k(27,T7,3,3,"th",6)(28,E7,4,3,"td",7),Q(),k(29,L7,1,0,"tr",14)(30,N7,1,0,"tr",15),l()()()),i&2&&(o(3),b(m(4,4,"labels.heading.All Standing Instructions")),o(3),x("dataSource",a.dataSource),o(23),x("matHeaderRowDef",a.displayedColumns),o(),x("matRowDefColumns",a.displayedColumns))},dependencies:[wt,Tt,Wt,Ae,bn,yn,xn,Sn,vn,Dn,Oi,wn,Pn,Tn,An,En,Pt],styles:[".tab-container[_ngcontent-%COMP%]{padding:1%;margin:1%}.tab-container[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{margin:1% auto}.tab-container[_ngcontent-%COMP%] .action-button[_ngcontent-%COMP%]{margin-left:auto}.tab-container[_ngcontent-%COMP%] table[_ngcontent-%COMP%]{width:100%}.tab-container[_ngcontent-%COMP%] table[_ngcontent-%COMP%] .account-action-button[_ngcontent-%COMP%]{min-width:26px;padding:0 6px;margin:4px;line-height:25px}"]})}}return t})();function k7(t,n){t&1&&T(0,"fa-icon",15)}function F7(t,n){t&1&&T(0,"fa-icon",15)}function R7(t,n){t&1&&T(0,"fa-icon",16)}function B7(t,n){t&1&&T(0,"fa-icon",17)}function q7(t,n){t&1&&T(0,"fa-icon",18)}function j7(t,n){t&1&&(c(0),p(1,"translate")),t&2&&b(m(1,1,"labels.inputs.DETAILS"))}function z7(t,n){t&1&&(c(0),p(1,"translate")),t&2&&b(m(1,1,"labels.inputs.TERMS"))}function V7(t,n){t&1&&(c(0),p(1,"translate")),t&2&&b(m(1,1,"labels.inputs.CHARGES"))}function U7(t,n){t&1&&(c(0),p(1,"translate")),t&2&&b(m(1,1,"labels.inputs.REPAYMENT SCHEDULE"))}function H7(t,n){t&1&&(c(0),p(1,"translate")),t&2&&b(m(1,1,"labels.inputs.PREVIEW"))}function G7(t,n){if(t&1){let e=xt();s(0,"mat-step",14),k(1,H7,2,3,"ng-template",9),s(2,"mifosx-loans-account-preview-step",19),it("submitEvent",function(){mt(e);let a=P();return dt(a.submit())}),l()()}if(t&2){let e=P();o(2),x("loansAccountTemplate",e.loansAccountAndTemplate)("loansAccountProductTemplate",e.loansAccountProductTemplate)("loansAccount",e.loansAccount)}}var Oc=(()=>{class t{constructor(){this.route=A(Et),this.router=A(le),this.dateUtils=A(de),this.loansService=A(Mt),this.settingsService=A(oe),this.route.data.subscribe(e=>{this.loansAccountAndTemplate=e.loansAccountAndTemplate}),this.loanId=this.route.snapshot.params.loanId}setTemplate(e){this.loansAccountProductTemplate=e,this.currencyCode=this.loansAccountProductTemplate.currency.code,this.loansAccountProductTemplate.loanProductId&&this.loansService.getLoansCollateralTemplateResource(this.loansAccountProductTemplate.loanProductId).subscribe(i=>{this.collateralOptions=i.loanCollateralOptions})}get loansAccountDetailsForm(){return this.loansAccountDetailsStep.loansAccountDetailsForm}get loansAccountTermsForm(){return this.loansAccountTermsStep.loansAccountTermsForm}get loansAccountFormValidAndNotPristine(){return this.loansAccountDetailsForm.valid&&this.loansAccountTermsForm.valid&&(!this.loansAccountDetailsForm.pristine||!this.loansAccountTermsForm.pristine||!this.loansAccountTermsStep.pristine||!this.loansAccountChargesStep.pristine)}get loansAccount(){return ie(ie(ie(ie(ie({},this.loansAccountDetailsStep.loansAccountDetails),this.loansAccountTermsStep.loansAccountTerms),this.loansAccountChargesStep.loansAccountCharges),this.loansAccountTermsStep.loanCollateral),this.loansAccountTermsStep.disbursementData)}submit(){let e=this.settingsService.language.code,i=this.settingsService.dateFormat,a="individual",r=new Map;(this.loansAccount.charges??[]).forEach(d=>{let g=d.chargeId;g!=null&&r.set(g,d)});let u=ve(ie({},this.loansAccount),{clientId:this.loansAccountAndTemplate.clientId,charges:Array.from(r.values()).map(d=>{let g={chargeId:d.chargeId,amount:d.amount,dueDate:d.dueDate&&this.dateUtils.formatDate(d.dueDate,i)};return d.id&&d.id!==d.chargeId&&(g.id=d.id),g}),collateral:this.loansAccount.collateral.map(d=>({type:d.type,value:d.value,description:d.description})),disbursementData:this.loansAccount.disbursementData.map(d=>({expectedDisbursementDate:this.dateUtils.formatDate(d.expectedDisbursementDate,i),principal:d.principal})),interestChargedFromDate:this.dateUtils.formatDate(this.loansAccount.interestChargedFromDate,i),repaymentsStartingFromDate:this.dateUtils.formatDate(this.loansAccount.repaymentsStartingFromDate,i),submittedOnDate:this.dateUtils.formatDate(this.loansAccount.submittedOnDate,i),expectedDisbursementDate:this.dateUtils.formatDate(this.loansAccount.expectedDisbursementDate,i),dateFormat:i,locale:e,loanType:a});delete u.isValid,u.syncRepaymentsWithMeeting&&(u.calendarId=this.loansAccountProductTemplate.calendarOptions[0].id,delete u.syncRepaymentsWithMeeting),u.recalculationRestFrequencyDate&&(u.recalculationRestFrequencyDate=this.dateUtils.formatDate(this.loansAccount.recalculationRestFrequencyDate,i)),u.interestCalculationPeriodType===0&&(u.allowPartialPeriodInterestCalculation=!1),(!u.isLoanProductLinkedToFloatingRate||u.isLoanProductLinkedToFloatingRate===!1)&&delete u.isFloatingInterestRate,u.principal=u.principalAmount,delete u.principalAmount,delete u.multiDisburseLoan,u.allowPartialPeriodInterestCalcualtion=u.allowPartialPeriodInterestCalculation,delete u.allowPartialPeriodInterestCalculation,this.loansService.updateLoansAccount(this.loanId,u).subscribe(d=>{this.router.navigate(["../"],{relativeTo:this.route})})}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=Dt({type:t,selectors:[["mifosx-edit-loans-account"]],viewQuery:function(i,a){if(i&1&&(mi(Oo,7),mi(Io,7),mi(Eo,7)),i&2){let r;di(r=ui())&&(a.loansAccountDetailsStep=r.first),di(r=ui())&&(a.loansAccountTermsStep=r.first),di(r=ui())&&(a.loansAccountChargesStep=r.first)}},decls:21,vars:15,consts:[["loansAccountStepper",""],[1,"container"],["orientation","vertical","labelPosition","bottom",1,"mat-elevation-z8",3,"linear"],["matStepperIcon","number"],["matStepperIcon","edit"],["matStepperIcon","done"],["matStepperIcon","error"],["matStepperIcon","preview"],[3,"stepControl"],["matStepLabel",""],[3,"loansAccountProductTemplate","loansAccountTemplate"],[3,"loansAccountProductTemplate","loansAccountTemplate","collateralOptions"],[3,"loansAccountProductTemplate","loansAccountTemplate","loansAccountFormValid"],[3,"loansAccountTemplate","loansAccountProductTemplate","loansAccount","currencyCode"],["state","preview","completed",""],["icon","pencil-alt","size","sm"],["icon","check","size","sm"],["icon","exclamation-triangle","size","lg"],["icon","eye","size","sm"],[3,"submitEvent","loansAccountTemplate","loansAccountProductTemplate","loansAccount"]],template:function(i,a){if(i&1){let r=xt();s(0,"div",1)(1,"mat-stepper",2,0),k(3,k7,1,0,"ng-template",3)(4,F7,1,0,"ng-template",4)(5,R7,1,0,"ng-template",5)(6,B7,1,0,"ng-template",6)(7,q7,1,0,"ng-template",7),s(8,"mat-step",8),k(9,j7,2,3,"ng-template",9),s(10,"mifosx-loans-account-details-step",10),it("loansAccountProductTemplate",function(d){return mt(r),dt(a.setTemplate(d))}),l()(),s(11,"mat-step",8),k(12,z7,2,3,"ng-template",9),T(13,"mifosx-loans-account-terms-step",11),l(),s(14,"mat-step"),k(15,V7,2,3,"ng-template",9),T(16,"mifosx-loans-account-charges-step",12),l(),s(17,"mat-step"),k(18,U7,2,3,"ng-template",9),T(19,"mifosx-loans-account-schedule-step",13),l(),M(20,G7,3,3,"mat-step",14),l()()}i&2&&(o(),x("linear",!1),o(7),x("stepControl",a.loansAccountDetailsForm),o(2),x("loansAccountTemplate",a.loansAccountAndTemplate),o(),x("stepControl",a.loansAccountTermsForm),o(2),x("loansAccountProductTemplate",a.loansAccountProductTemplate)("loansAccountTemplate",a.loansAccountAndTemplate)("collateralOptions",a.collateralOptions),o(3),x("loansAccountProductTemplate",a.loansAccountProductTemplate)("loansAccountTemplate",a.loansAccountAndTemplate)("loansAccountFormValid",a.loansAccountFormValidAndNotPristine),o(3),x("loansAccountTemplate",a.loansAccountAndTemplate)("loansAccountProductTemplate",a.loansAccountProductTemplate)("loansAccount",a.loansAccount)("currencyCode",a.currencyCode),o(),O(a.loansAccountFormValidAndNotPristine?20:-1))},dependencies:[wt,Tt,es,Ql,un,ts,Xl,Oo,Io,Eo,el,nl,Pt],encapsulation:2})}}return t})();var W7=()=>["../"];function $7(t,n){if(t&1){let e=xt();s(0,"button",10),it("click",function(){mt(e);let a=P(2);return dt(a.editCharge())}),T(1,"fa-icon",11),c(2),p(3,"translate"),l()}t&2&&(o(2),v(" ",m(3,1,"labels.buttons.Edit")," "))}function Y7(t,n){if(t&1){let e=xt();s(0,"button",12),it("click",function(){mt(e);let a=P(3);return dt(a.payCharge())}),T(1,"fa-icon",13),c(2),p(3,"translate"),l()}t&2&&(o(2),v(" ",m(3,1,"labels.buttons.Pay")," "))}function Z7(t,n){t&1&&(s(0,"span"),k(1,Y7,4,3,"button",9),l()),t&2&&(o(),x("mifosxHasPermission","PAY_SAVINGSACCOUNTCHARGE"))}function K7(t,n){if(t&1){let e=xt();s(0,"button",10),it("click",function(){mt(e);let a=P(3);return dt(a.waiveCharge())}),T(1,"fa-icon",11),c(2),p(3,"translate"),l()}t&2&&(o(2),v(" ",m(3,1,"labels.buttons.Waive")," "))}function J7(t,n){t&1&&(s(0,"span"),k(1,K7,4,3,"button",8),l()),t&2&&(o(),x("mifosxHasPermission","WAIVE_SAVINGSACCOUNTCHARGE"))}function X7(t,n){if(t&1){let e=xt();s(0,"button",12),it("click",function(){mt(e);let a=P(2);return dt(a.adjustmentCharge())}),T(1,"fa-icon",14),c(2),p(3,"translate"),l()}t&2&&(o(2),v(" ",m(3,1,"labels.buttons.Adjustment")," "))}function Q7(t,n){if(t&1&&(s(0,"div",0),k(1,$7,4,3,"button",8),M(2,Z7,2,1,"span"),M(3,J7,2,1,"span"),s(4,"span"),k(5,X7,4,3,"button",9),l()()),t&2){let e=P();o(),x("mifosxHasPermission","WAIVE_SAVINGSACCOUNTCHARGE"),o(),O(e.allowPayCharge?2:-1),o(),O(e.allowWaive?3:-1),o(2),x("mifosxHasPermission","ADJUSTMENT_LOANCHARGE")}}function t8(t,n){if(t&1){let e=xt();s(0,"button",10),it("click",function(){mt(e);let a=P(2);return dt(a.editCharge())}),T(1,"fa-icon",16),c(2),p(3,"translate"),l()}t&2&&(o(2),v(" ",m(3,1,"labels.buttons.Edit")," "))}function e8(t,n){if(t&1){let e=xt();s(0,"button",17),it("click",function(){mt(e);let a=P(2);return dt(a.deleteCharge())}),T(1,"fa-icon",18),c(2),p(3,"translate"),l()}t&2&&(o(2),v(" ",m(3,1,"labels.buttons.Delete")," "))}function n8(t,n){t&1&&(s(0,"div",0),k(1,t8,4,3,"button",8)(2,e8,4,3,"button",15),l()),t&2&&(o(),x("mifosxHasPermission","UPDATE_SAVINGSACCOUNTCHARGE"),o(),x("mifosxHasPermission","DELETE_SAVINGSACCOUNTCHARGE"))}var m0=(()=>{class t{constructor(){this.loansService=A(Mt),this.route=A(Et),this.dateUtils=A(de),this.router=A(le),this.translateService=A(pa),this.dialog=A(Gn),this.settingsService=A(oe),this.allowPayCharge=!0,this.allowWaive=!0,this.route.data.subscribe(e=>{this.chargeData=e.loansAccountCharge,this.allowPayCharge=this.chargeData.chargePayable&&!this.chargeData.paid,this.allowWaive=!this.chargeData.chargeTimeType.waived,this.loansAccountData=e.loanDetailsData})}payCharge(){let e=[new la({controlName:"transactionDate",label:"Payment Date",value:"",type:"date",required:!0})],i={title:`Pay Charge ${this.chargeData.id}`,layout:{addButtonText:"Confirm"},formfields:e};this.dialog.open(_i,{data:i}).afterClosed().subscribe(r=>{if(r.data){let u=this.settingsService.language.code,d=this.settingsService.dateFormat,g=r.data.value.transactionDate,_={transactionDate:this.dateUtils.formatDate(g,d),dateFormat:d,locale:u};this.loansService.executeLoansAccountChargesCommand(this.chargeData.loanId,"pay",_,this.chargeData.id).subscribe(()=>{this.reload()})}})}waiveCharge(){this.dialog.open(ma,{data:{heading:this.translateService.instant("labels.heading.Waive Charge"),dialogContext:this.translateService.instant("labels.dialogContext.Are you sure you want to waive charge with id:")` ${this.chargeData.id}`,type:"Basic"}}).afterClosed().subscribe(i=>{i.confirm&&this.loansService.executeLoansAccountChargesCommand(this.chargeData.loanId,"waive",{},this.chargeData.id).subscribe(()=>{this.reload()})})}editCharge(){let e=[new Ti({controlName:"amount",label:"Amount",value:this.chargeData.amount||this.chargeData.amountOrPercentage,type:"number",required:!0}),new la({controlName:"dueDate",label:"Due Date",value:new Date(this.chargeData.dueDate),type:"date",maxDate:this.settingsService.maxAllowedDate,required:!0})],i={title:"Edit Charge",layout:{addButtonText:"Confirm"},formfields:e};this.dialog.open(_i,{data:i}).afterClosed().subscribe(r=>{if(r.data){let u=this.settingsService.language.code,d=this.settingsService.dateFormat,g=this.dateUtils.formatDate(r.data.value.dueDate,d),y={amount:r.data.value.amount,dueDate:g,dateFormat:d,locale:u};this.loansService.editLoansAccountCharge(this.loansAccountData.id,y,this.chargeData.id).subscribe(()=>{this.reload()})}})}deleteCharge(){this.dialog.open(ra,{data:{deleteContext:`charge id:${this.chargeData.id}`}}).afterClosed().subscribe(i=>{i.delete&&this.loansService.deleteLoansAccountCharge(this.loansAccountData.id,this.chargeData.id).subscribe(()=>{this.reload()})})}loanChargeColor(){return this.chargeData.paid?"paid":"not-paid"}adjustmentCharge(){this.router.navigate(["adjustment"],{relativeTo:this.route})}reload(){let e=this.loansAccountData.clientId,i=this.router.url;this.router.navigateByUrl(`/clients/${e}/loans-accounts`,{skipLocationChange:!0}).then(()=>this.router.navigate([i]))}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=Dt({type:t,selectors:[["mifosx-view-charge"]],decls:72,vars:64,consts:[[1,"layout-row","align-end","gap-2percent","layout-xs-column","container","m-b-20"],[1,"container"],[1,"layout-row-wrap"],[1,"flex-100",3,"ngClass"],[1,"flex-50","mat-body-strong"],[1,"flex-50"],[1,"layout-row","layout-align-center","gap-2percent","column-on-mobile"],["type","button","mat-raised-button","","color","primary",3,"routerLink"],["mat-raised-button","","color","primary",3,"click",4,"mifosxHasPermission"],["mat-raised-button","","color","accent",3,"click",4,"mifosxHasPermission"],["mat-raised-button","","color","primary",3,"click"],["icon","flag",1,"m-r-10"],["mat-raised-button","","color","accent",3,"click"],["icon","dollar-sign",1,"m-r-10"],["icon","pen",1,"m-r-10"],["mat-raised-button","","color","warn",3,"click",4,"mifosxHasPermission"],["icon","edit",1,"m-r-10"],["mat-raised-button","","color","warn",3,"click"],["icon","trash",1,"m-r-10"]],template:function(i,a){i&1&&(M(0,Q7,6,4,"div",0),M(1,n8,3,2,"div",0),s(2,"div",1)(3,"mat-card")(4,"mat-card-content")(5,"div",2),T(6,"div",3),s(7,"div",4),c(8),p(9,"translate"),l(),s(10,"div",5),c(11),l(),s(12,"div",4),c(13),p(14,"translate"),l(),s(15,"div",5),c(16),l(),s(17,"div",4),c(18),p(19,"translate"),l(),s(20,"div",5),c(21),l(),s(22,"div",4),c(23),p(24,"translate"),l(),s(25,"div",5),c(26),l(),s(27,"div",4),c(28),p(29,"translate"),l(),s(30,"div",5),c(31),p(32,"dateFormat"),l(),s(33,"div",4),c(34),p(35,"translate"),l(),s(36,"div",5),c(37),l(),s(38,"div",4),c(39),p(40,"translate"),l(),s(41,"div",5),c(42),p(43,"formatNumber"),l(),s(44,"div",4),c(45),p(46,"translate"),l(),s(47,"div",5),c(48),p(49,"formatNumber"),l(),s(50,"div",4),c(51),p(52,"translate"),l(),s(53,"div",5),c(54),p(55,"formatNumber"),l(),s(56,"div",4),c(57),p(58,"translate"),l(),s(59,"div",5),c(60),p(61,"formatNumber"),l(),s(62,"div",4),c(63),p(64,"translate"),l(),s(65,"div",5),c(66),p(67,"dateFormat"),l()(),s(68,"div",6)(69,"button",7),c(70),p(71,"translate"),l()()()()()),i&2&&(O(a.loansAccountData.status.value==="Active"&&a.chargeData.amountOutstanding!==0?0:-1),o(),O(a.loansAccountData.status.value==="Submitted and pending approval"?1:-1),o(5),x("ngClass",a.loanChargeColor()),o(2),v(" ",m(9,27,"labels.inputs.name")," "),o(3),v(" ",a.chargeData.name," "),o(2),v(" ",m(14,29,"labels.inputs.Charge Type")," "),o(3),v(" ",a.chargeData.penalty?"Penalty":"Fees"," "),o(2),v(" ",m(19,31,"labels.inputs.Currency")," "),o(3),v(" ",a.chargeData.currency.displayLabel," "),o(2),v(" ",m(24,33,"labels.inputs.Payment due at")," "),o(3),v(" ",a.chargeData.chargeTimeType.value," "),o(2),v(" ",m(29,35,"labels.inputs.Payment due as of")," "),o(3),v(" ",m(32,37,a.chargeData.dueDate)," "),o(3),v(" ",m(35,39,"labels.inputs.Calculation Type")," "),o(3),v(" ",a.chargeData.chargeCalculationType.value," "),o(2),v(" ",m(40,41,"labels.inputs.Due")," "),o(3),v(" ",m(43,43,a.chargeData.amount)," "),o(3),v(" ",m(46,45,"labels.inputs.Paid")," "),o(3),v(" ",m(49,47,a.chargeData.amountPaid)," "),o(3),v(" ",m(52,49,"labels.inputs.Waived")," "),o(3),v(" ",m(55,51,a.chargeData.amountWaived)," "),o(3),v(" ",m(58,53,"labels.inputs.Outstanding")," "),o(3),v(" ",m(61,55,a.chargeData.amountOutstanding)," "),o(3),v(" ",m(64,57,"labels.inputs.Submitted On Date")," "),o(3),v(" ",m(67,59,a.chargeData.submittedOnDate)," "),o(3),x("routerLink",Ut(63,W7)),o(),v(" ",m(71,61,"labels.buttons.Back")," "))},dependencies:[wt,ca,Tt,ae,xe,Oe,Wt,Ae,un,En,Pt,hn],styles:["body[_ngcontent-%COMP%] table[_ngcontent-%COMP%] tbody[_ngcontent-%COMP%] tr[_ngcontent-%COMP%]:nth-child(2n){background-color:#f2f2f2}.bg-black[_ngcontent-%COMP%]{background-color:#000}.bg-light-grey[_ngcontent-%COMP%]{background-color:#e5e5e5}.bg-medium-grey[_ngcontent-%COMP%]{background-color:#ccc}.bg-grey[_ngcontent-%COMP%]{background-color:#999}.bg-dark-grey[_ngcontent-%COMP%]{background-color:#222}.bg-white[_ngcontent-%COMP%], .bg-fff[_ngcontent-%COMP%]{background-color:#fff}.bg-none[_ngcontent-%COMP%], .no-bg[_ngcontent-%COMP%]{background:none;background-image:none;background-color:transparent}.bg-facebook[_ngcontent-%COMP%]{background-color:#47639e}.bg-twitter[_ngcontent-%COMP%]{background-color:#02a8f3}body[_ngcontent-%COMP%] table[_ngcontent-%COMP%]{border:1px solid rgba(0,0,0,.12)}.no-border[_ngcontent-%COMP%]{border:none}.no-border-t[_ngcontent-%COMP%]{border-top:none}.no-border-r[_ngcontent-%COMP%]{border-right:none}.no-border-b[_ngcontent-%COMP%]{border-bottom:none}.no-border-l[_ngcontent-%COMP%]{border-left:none}.no-border-lr[_ngcontent-%COMP%], .no-border-rl[_ngcontent-%COMP%]{border-left:none;border-right:none}.no-border-tb[_ngcontent-%COMP%], .no-border-bt[_ngcontent-%COMP%]{border-top:none;border-bottom:none}.no-border-tl[_ngcontent-%COMP%], .no-border-lt[_ngcontent-%COMP%]{border-top:none;border-left:none}.no-border-tr[_ngcontent-%COMP%], .no-border-rt[_ngcontent-%COMP%]{border-top:none;border-right:none}.no-border-bl[_ngcontent-%COMP%], .no-border-lb[_ngcontent-%COMP%]{border-bottom:none;border-left:none}.no-border-br[_ngcontent-%COMP%], .no-border-rb[_ngcontent-%COMP%]{border-bottom:none;border-right:none}.border-dashed[_ngcontent-%COMP%], .border-dotted[_ngcontent-%COMP%]{border-style:dashed}.border-black[_ngcontent-%COMP%]{border-color:#000}.border-light-grey[_ngcontent-%COMP%]{border-color:#e5e5e5}.border-medium-grey[_ngcontent-%COMP%]{border-color:#ccc}.border-grey[_ngcontent-%COMP%]{border-color:#999}.border-dark-grey[_ngcontent-%COMP%]{border-color:#2222}.border-white[_ngcontent-%COMP%], .border-fff[_ngcontent-%COMP%]{border-color:#fff}.no-border-radius[_ngcontent-%COMP%]{border-radius:0}.radius3[_ngcontent-%COMP%]{border-radius:3px}.radius5[_ngcontent-%COMP%]{border-radius:5px}.radius10[_ngcontent-%COMP%]{border-radius:10px}.column-mandatory[_ngcontent-%COMP%]{color:#5cb85c;text-align:center}.not-column-mandatory[_ngcontent-%COMP%]{color:#666f73;text-align:center}.cdk-drag-placeholder[_ngcontent-%COMP%]{background:#3498db}.yes[_ngcontent-%COMP%]{color:#5cb85c!important;background-color:#5cb85c;height:4px;cursor:none}.no[_ngcontent-%COMP%]{color:red;background-color:red;height:4px;cursor:none}.strike[_ngcontent-%COMP%]{text-decoration:line-through;color:red}.transfer[_ngcontent-%COMP%]{color:#16a085}.linked[_ngcontent-%COMP%]{color:#4461e2}.accrual[_ngcontent-%COMP%]{color:#999}.fa-question[_ngcontent-%COMP%]{color:#4461e2}.enabled[_ngcontent-%COMP%]{color:#32cd32}.disabled[_ngcontent-%COMP%]{color:#f44366}.v-mid[_ngcontent-%COMP%], .v-m[_ngcontent-%COMP%]{vertical-align:middle}.v-top[_ngcontent-%COMP%], .v-t[_ngcontent-%COMP%]{vertical-align:top}.v-bottom[_ngcontent-%COMP%], .v-b[_ngcontent-%COMP%]{vertical-align:bottom}.v-super[_ngcontent-%COMP%]{vertical-align:super}.r-amount[_ngcontent-%COMP%]{text-align:right!important;padding-right:5px!important}.left[_ngcontent-%COMP%]{text-align:left!important}.right[_ngcontent-%COMP%]{text-align:right!important}.center[_ngcontent-%COMP%]{text-align:center!important}.amount-plus[_ngcontent-%COMP%]{color:#000}.amount-minus[_ngcontent-%COMP%]{color:#4461e2}.block[_ngcontent-%COMP%]{display:block}.inline[_ngcontent-%COMP%]{display:inline}.in-block[_ngcontent-%COMP%]{display:inline-block;zoom:1}.d-none[_ngcontent-%COMP%], .hide[_ngcontent-%COMP%], .hidden[_ngcontent-%COMP%]{display:none}.t-0[_ngcontent-%COMP%]{top:0}.b-0[_ngcontent-%COMP%]{bottom:0}.l-0[_ngcontent-%COMP%]{left:0}.r-0[_ngcontent-%COMP%]{right:0}.tb-0[_ngcontent-%COMP%]{top:0;bottom:0}.lr-0[_ngcontent-%COMP%]{left:0;right:0}.f-left[_ngcontent-%COMP%]{float:left}.f-right[_ngcontent-%COMP%]{float:right}.f-none[_ngcontent-%COMP%]{float:none}textarea[_ngcontent-%COMP%]{resize:both}textarea.vertical[_ngcontent-%COMP%], textarea.horizontal[_ngcontent-%COMP%]{resize:vertical}textarea.noresize[_ngcontent-%COMP%]{resize:none}.full-input[_ngcontent-%COMP%] input[_ngcontent-%COMP%], .full-input[_ngcontent-%COMP%] select[_ngcontent-%COMP%], .full-input[_ngcontent-%COMP%] textarea[_ngcontent-%COMP%]{width:100%}.normal[_ngcontent-%COMP%] input[_ngcontent-%COMP%], .normal[_ngcontent-%COMP%] select[_ngcontent-%COMP%], .normal[_ngcontent-%COMP%] textarea[_ngcontent-%COMP%], .full-input[_ngcontent-%COMP%] [type=checkbox][_ngcontent-%COMP%], .full-input[_ngcontent-%COMP%] [type=radio][_ngcontent-%COMP%]{width:auto}.mat-tab-body-content[_ngcontent-%COMP%]{margin-bottom:20px}.mat-datepicker-input[_ngcontent-%COMP%]{margin-top:5px;margin-bottom:5px}.loader-wrapper[_ngcontent-%COMP%]{height:100vh;width:100vw}.loader-wrapper[_ngcontent-%COMP%] .triangle[_ngcontent-%COMP%]{width:0;height:0;border-style:solid;position:absolute;animation:_ngcontent-%COMP%_rotate .8s infinite .2s}.loader-wrapper[_ngcontent-%COMP%] .bottom[_ngcontent-%COMP%]{border-width:0 90px 90px;border-color:transparent transparent #1fb050;bottom:calc(50% - 100px);left:calc(50% - 90px)}.loader-wrapper[_ngcontent-%COMP%] .top[_ngcontent-%COMP%]{border-width:90px 90px 0;border-color:#b4d575 transparent transparent;top:calc(50% - 100px);left:calc(50% - 90px)}.loader-wrapper[_ngcontent-%COMP%] .left[_ngcontent-%COMP%]{border-width:90px 0 90px 90px;border-color:transparent transparent transparent #1074b9;top:calc(50% - 90px);left:calc(50% - 100px)}.loader-wrapper[_ngcontent-%COMP%] .right[_ngcontent-%COMP%]{border-width:90px 90px 90px 0;border-color:transparent #1daeec transparent transparent;top:calc(50% - 90px);right:calc(50% - 100px)}@keyframes _ngcontent-%COMP%_rotate{0%{transform:rotate(0)}to{transform:rotate(360deg)}}body[_ngcontent-%COMP%]{margin:0}.container[_ngcontent-%COMP%]{margin:0 auto}.mb-05[_ngcontent-%COMP%]{margin-bottom:.5rem}.mr-05[_ngcontent-%COMP%]{margin-right:.5rem}.mb-1[_ngcontent-%COMP%]{margin-bottom:1rem}.mt-1[_ngcontent-%COMP%]{margin-top:1rem}.m-5[_ngcontent-%COMP%]{margin:5px}.m-t-5[_ngcontent-%COMP%]{margin-top:5px}.m-r-5[_ngcontent-%COMP%]{margin-right:5px}.m-b-5[_ngcontent-%COMP%]{margin-bottom:5px}.m-l-5[_ngcontent-%COMP%]{margin-left:5px}.m-v-5[_ngcontent-%COMP%]{margin:5px 0}.m-h-5[_ngcontent-%COMP%]{margin:0 5px}.m-10[_ngcontent-%COMP%]{margin:10px}.m-t-10[_ngcontent-%COMP%]{margin-top:10px}.m-r-10[_ngcontent-%COMP%]{margin-right:10px}.m-b-10[_ngcontent-%COMP%]{margin-bottom:10px}.m-l-10[_ngcontent-%COMP%]{margin-left:10px}.m-v-10[_ngcontent-%COMP%]{margin:10px 0}.m-h-10[_ngcontent-%COMP%]{margin:0 10px}.m-15[_ngcontent-%COMP%]{margin:15px}.m-t-15[_ngcontent-%COMP%]{margin-top:15px}.m-r-15[_ngcontent-%COMP%]{margin-right:15px}.m-b-15[_ngcontent-%COMP%]{margin-bottom:15px}.m-l-15[_ngcontent-%COMP%]{margin-left:15px}.m-v-15[_ngcontent-%COMP%]{margin:15px 0}.m-h-15[_ngcontent-%COMP%]{margin:0 15px}.m-20[_ngcontent-%COMP%]{margin:20px}.m-t-20[_ngcontent-%COMP%]{margin-top:20px}.m-r-20[_ngcontent-%COMP%]{margin-right:20px}.m-b-20[_ngcontent-%COMP%]{margin-bottom:20px}.m-l-20[_ngcontent-%COMP%]{margin-left:20px}.m-v-20[_ngcontent-%COMP%]{margin:20px 0}.m-h-20[_ngcontent-%COMP%]{margin:0 20px}.m-25[_ngcontent-%COMP%]{margin:25px}.m-t-25[_ngcontent-%COMP%]{margin-top:25px}.m-r-25[_ngcontent-%COMP%]{margin-right:25px}.m-b-25[_ngcontent-%COMP%]{margin-bottom:25px}.m-l-25[_ngcontent-%COMP%]{margin-left:25px}.m-v-25[_ngcontent-%COMP%]{margin:25px 0}.m-h-25[_ngcontent-%COMP%]{margin:0 25px}.m-30[_ngcontent-%COMP%]{margin:30px}.m-t-30[_ngcontent-%COMP%]{margin-top:30px}.m-r-30[_ngcontent-%COMP%]{margin-right:30px}.m-b-30[_ngcontent-%COMP%]{margin-bottom:30px}.m-l-30[_ngcontent-%COMP%]{margin-left:30px}.m-v-30[_ngcontent-%COMP%]{margin:30px 0}.m-h-30[_ngcontent-%COMP%]{margin:0 30px}.m-35[_ngcontent-%COMP%]{margin:35px}.m-t-35[_ngcontent-%COMP%]{margin-top:35px}.m-r-35[_ngcontent-%COMP%]{margin-right:35px}.m-b-35[_ngcontent-%COMP%]{margin-bottom:35px}.m-l-35[_ngcontent-%COMP%]{margin-left:35px}.m-v-35[_ngcontent-%COMP%]{margin:35px 0}.m-h-35[_ngcontent-%COMP%]{margin:0 35px}.m-40[_ngcontent-%COMP%]{margin:40px}.m-t-40[_ngcontent-%COMP%]{margin-top:40px}.m-r-40[_ngcontent-%COMP%]{margin-right:40px}.m-b-40[_ngcontent-%COMP%]{margin-bottom:40px}.m-l-40[_ngcontent-%COMP%]{margin-left:40px}.m-v-40[_ngcontent-%COMP%]{margin:40px 0}.m-h-40[_ngcontent-%COMP%]{margin:0 40px}.m-45[_ngcontent-%COMP%]{margin:45px}.m-t-45[_ngcontent-%COMP%]{margin-top:45px}.m-r-45[_ngcontent-%COMP%]{margin-right:45px}.m-b-45[_ngcontent-%COMP%]{margin-bottom:45px}.m-l-45[_ngcontent-%COMP%]{margin-left:45px}.m-v-45[_ngcontent-%COMP%]{margin:45px 0}.m-h-45[_ngcontent-%COMP%]{margin:0 45px}.m-50[_ngcontent-%COMP%]{margin:50px}.m-t-50[_ngcontent-%COMP%]{margin-top:50px}.m-r-50[_ngcontent-%COMP%]{margin-right:50px}.m-b-50[_ngcontent-%COMP%]{margin-bottom:50px}.m-l-50[_ngcontent-%COMP%]{margin-left:50px}.m-v-50[_ngcontent-%COMP%]{margin:50px 0}.m-h-50[_ngcontent-%COMP%]{margin:0 50px}.m-55[_ngcontent-%COMP%]{margin:55px}.m-t-55[_ngcontent-%COMP%]{margin-top:55px}.m-r-55[_ngcontent-%COMP%]{margin-right:55px}.m-b-55[_ngcontent-%COMP%]{margin-bottom:55px}.m-l-55[_ngcontent-%COMP%]{margin-left:55px}.m-v-55[_ngcontent-%COMP%]{margin:55px 0}.m-h-55[_ngcontent-%COMP%]{margin:0 55px}.m-60[_ngcontent-%COMP%]{margin:60px}.m-t-60[_ngcontent-%COMP%]{margin-top:60px}.m-r-60[_ngcontent-%COMP%]{margin-right:60px}.m-b-60[_ngcontent-%COMP%]{margin-bottom:60px}.m-l-60[_ngcontent-%COMP%]{margin-left:60px}.m-v-60[_ngcontent-%COMP%]{margin:60px 0}.m-h-60[_ngcontent-%COMP%]{margin:0 60px}.m-65[_ngcontent-%COMP%]{margin:65px}.m-t-65[_ngcontent-%COMP%]{margin-top:65px}.m-r-65[_ngcontent-%COMP%]{margin-right:65px}.m-b-65[_ngcontent-%COMP%]{margin-bottom:65px}.m-l-65[_ngcontent-%COMP%]{margin-left:65px}.m-v-65[_ngcontent-%COMP%]{margin:65px 0}.m-h-65[_ngcontent-%COMP%]{margin:0 65px}.m-70[_ngcontent-%COMP%]{margin:70px}.m-t-70[_ngcontent-%COMP%]{margin-top:70px}.m-r-70[_ngcontent-%COMP%]{margin-right:70px}.m-b-70[_ngcontent-%COMP%]{margin-bottom:70px}.m-l-70[_ngcontent-%COMP%]{margin-left:70px}.m-v-70[_ngcontent-%COMP%]{margin:70px 0}.m-h-70[_ngcontent-%COMP%]{margin:0 70px}.m-75[_ngcontent-%COMP%]{margin:75px}.m-t-75[_ngcontent-%COMP%]{margin-top:75px}.m-r-75[_ngcontent-%COMP%]{margin-right:75px}.m-b-75[_ngcontent-%COMP%]{margin-bottom:75px}.m-l-75[_ngcontent-%COMP%]{margin-left:75px}.m-v-75[_ngcontent-%COMP%]{margin:75px 0}.m-h-75[_ngcontent-%COMP%]{margin:0 75px}.m-80[_ngcontent-%COMP%]{margin:80px}.m-t-80[_ngcontent-%COMP%]{margin-top:80px}.m-r-80[_ngcontent-%COMP%]{margin-right:80px}.m-b-80[_ngcontent-%COMP%]{margin-bottom:80px}.m-l-80[_ngcontent-%COMP%]{margin-left:80px}.m-v-80[_ngcontent-%COMP%]{margin:80px 0}.m-h-80[_ngcontent-%COMP%]{margin:0 80px}.no-m[_ngcontent-%COMP%]{margin:0}.no-m-t[_ngcontent-%COMP%]{margin-top:0}.no-m-r[_ngcontent-%COMP%]{margin-right:0}.no-m-b[_ngcontent-%COMP%]{margin-bottom:0}.no-m-l[_ngcontent-%COMP%]{margin-left:0}.no-m-v[_ngcontent-%COMP%], .no-m-h[_ngcontent-%COMP%], .no-margin[_ngcontent-%COMP%]{margin:0}.no-m-lr[_ngcontent-%COMP%], .no-m-rl[_ngcontent-%COMP%]{margin-left:0;margin-right:0}.no-m-tb[_ngcontent-%COMP%], .no-m-bt[_ngcontent-%COMP%]{margin-top:0;margin-bottom:0}.m-t-only[_ngcontent-%COMP%]{margin-left:0;margin-right:0;margin-bottom:0}.m-b-only[_ngcontent-%COMP%]{margin-left:0;margin-right:0;margin-top:0}.m-l-only[_ngcontent-%COMP%]{margin-right:0;margin-top:0;margin-bottom:0}.m-r-only[_ngcontent-%COMP%]{margin-left:0;margin-top:0;margin-bottom:0}.m-auto[_ngcontent-%COMP%]{margin-left:auto;margin-right:auto}.ls-0[_ngcontent-%COMP%]{margin-left:10px;margin-right:10px}html[_ngcontent-%COMP%], body[_ngcontent-%COMP%]{-webkit-tap-highlight-color:transparent}div[_ngcontent-%COMP%]{box-sizing:border-box}.color-inherit[_ngcontent-%COMP%]{color:inherit}.no-shadow[_ngcontent-%COMP%]{box-shadow:none}.pointer[_ngcontent-%COMP%]{cursor:pointer}.nolist[_ngcontent-%COMP%]{list-style:none}.actions-menu[_ngcontent-%COMP%]{color:#fff}.alert[_ngcontent-%COMP%]{background-color:#e8f4fd;padding:6px 16px;font-size:.875rem;font-family:Roboto,Helvetica Neue,sans-serif;font-weight:400;line-height:1.43;border-radius:4px;letter-spacing:normal;margin:10px}.alert[_ngcontent-%COMP%] .message[_ngcontent-%COMP%]{padding:8px 0;font-size:18px}.alert[_ngcontent-%COMP%] .alert-check[_ngcontent-%COMP%]{color:#359ff4;margin-right:2px;font-size:1.4rem} .mat-tooltip{font-size:15px;color:#fff!important;background-color:#4461e2b3;border:1px solid rgb(25.7777777778,51.5555555556,166.2222222222);max-width:400px!important;white-space:pre-line!important}.loading[_ngcontent-%COMP%]{position:absolute;min-width:100%;width:100px;height:12px;background:linear-gradient(125deg,#fff,#4461e2,#fff);animation:grow 4s linear infinite,move 4s linear infinite}mat-card-title[_ngcontent-%COMP%]{font-weight:600;font-size:x-large;padding-left:20px;padding-top:20px}html[_ngcontent-%COMP%], body[_ngcontent-%COMP%]{overflow:hidden}.overflow-x-scroll[_ngcontent-%COMP%]{max-width:100%;overflow-x:auto}.overflow-no[_ngcontent-%COMP%]{overflow:hidden}.overflow-auto[_ngcontent-%COMP%]{overflow:auto}.overflow-scroll[_ngcontent-%COMP%]{overflow:scroll}.table-container[_ngcontent-%COMP%]{overflow-x:auto;max-width:100%}body[_ngcontent-%COMP%], .no-p[_ngcontent-%COMP%]{padding:0}.no-p-t[_ngcontent-%COMP%]{padding-top:0}.no-p-r[_ngcontent-%COMP%]{padding-right:0}.no-p-b[_ngcontent-%COMP%]{padding-bottom:0}.no-p-l[_ngcontent-%COMP%]{padding-left:0}.no-p-v[_ngcontent-%COMP%], .no-p-h[_ngcontent-%COMP%]{padding:0}.p-5[_ngcontent-%COMP%]{padding:5px}.p-t-5[_ngcontent-%COMP%]{padding-top:5px}.p-r-5[_ngcontent-%COMP%]{padding-right:5px}.p-b-5[_ngcontent-%COMP%]{padding-bottom:5px}.p-l-5[_ngcontent-%COMP%]{padding-left:5px}.p-v-5[_ngcontent-%COMP%]{padding:5px 0}.p-h-5[_ngcontent-%COMP%]{padding:0 5px}.p-10[_ngcontent-%COMP%]{padding:10px}.p-t-10[_ngcontent-%COMP%]{padding-top:10px}.p-b-10[_ngcontent-%COMP%]{padding-bottom:10px}.p-v-10[_ngcontent-%COMP%]{padding:10px 0}.p-h-10[_ngcontent-%COMP%]{padding:0 10px}.p-15[_ngcontent-%COMP%]{padding:15px}.p-t-15[_ngcontent-%COMP%]{padding-top:15px}.p-r-15[_ngcontent-%COMP%]{padding-right:15px}.p-b-15[_ngcontent-%COMP%]{padding-bottom:15px}.p-l-15[_ngcontent-%COMP%]{padding-left:15px}.p-v-15[_ngcontent-%COMP%]{padding:15px 0}.p-h-15[_ngcontent-%COMP%]{padding:0 15px}.p-20[_ngcontent-%COMP%]{padding:20px}.p-t-20[_ngcontent-%COMP%]{padding-top:20px}.p-r-20[_ngcontent-%COMP%]{padding-right:20px}.p-b-20[_ngcontent-%COMP%]{padding-bottom:20px}.p-l-20[_ngcontent-%COMP%]{padding-left:20px}.p-v-20[_ngcontent-%COMP%]{padding:20px 0}.p-h-20[_ngcontent-%COMP%]{padding:0 20px}.p-25[_ngcontent-%COMP%]{padding:25px}.p-t-25[_ngcontent-%COMP%]{padding-top:25px}.p-r-25[_ngcontent-%COMP%]{padding-right:25px}.p-b-25[_ngcontent-%COMP%]{padding-bottom:25px}.p-l-25[_ngcontent-%COMP%]{padding-left:25px}.p-v-25[_ngcontent-%COMP%]{padding:25px 0}.p-h-25[_ngcontent-%COMP%]{padding:0 25px}.p-30[_ngcontent-%COMP%]{padding:30px}.p-t-30[_ngcontent-%COMP%]{padding-top:30px}.p-r-30[_ngcontent-%COMP%]{padding-right:30px}.p-b-30[_ngcontent-%COMP%]{padding-bottom:30px}.p-l-30[_ngcontent-%COMP%]{padding-left:30px}.p-v-30[_ngcontent-%COMP%]{padding:30px 0}.p-h-30[_ngcontent-%COMP%]{padding:0 30px}.p-35[_ngcontent-%COMP%]{padding:35px}.p-t-35[_ngcontent-%COMP%]{padding-top:35px}.p-r-35[_ngcontent-%COMP%]{padding-right:35px}.p-b-35[_ngcontent-%COMP%]{padding-bottom:35px}.p-l-35[_ngcontent-%COMP%]{padding-left:35px}.p-v-35[_ngcontent-%COMP%]{padding:35px 0}.p-h-35[_ngcontent-%COMP%]{padding:0 35px}.p-40[_ngcontent-%COMP%]{padding:40px}.p-t-40[_ngcontent-%COMP%]{padding-top:40px}.p-r-40[_ngcontent-%COMP%]{padding-right:40px}.p-b-40[_ngcontent-%COMP%]{padding-bottom:40px}.p-l-40[_ngcontent-%COMP%]{padding-left:40px}.p-v-40[_ngcontent-%COMP%]{padding-top:40px;padding-bottom:40px}.p-h-40[_ngcontent-%COMP%]{padding:0 40px}.p-45[_ngcontent-%COMP%]{padding:45px}.p-t-45[_ngcontent-%COMP%]{padding-top:45px}.p-r-45[_ngcontent-%COMP%]{padding-right:45px}.p-b-45[_ngcontent-%COMP%]{padding-bottom:45px}.p-l-45[_ngcontent-%COMP%]{padding-left:45px}.p-v-45[_ngcontent-%COMP%]{padding:45px 0}.p-h-45[_ngcontent-%COMP%]{padding:0 45px}.p-50[_ngcontent-%COMP%]{padding:50px}.p-t-50[_ngcontent-%COMP%]{padding-top:50px}.p-r-50[_ngcontent-%COMP%]{padding-right:50px}.p-b-50[_ngcontent-%COMP%]{padding-bottom:50px}.p-l-50[_ngcontent-%COMP%]{padding-left:50px}.p-v-50[_ngcontent-%COMP%]{padding:50px 0}.p-h-50[_ngcontent-%COMP%]{padding:0 50px}.p-55[_ngcontent-%COMP%]{padding:55px}.p-t-55[_ngcontent-%COMP%]{padding-top:55px}.p-r-55[_ngcontent-%COMP%]{padding-right:55px}.p-b-55[_ngcontent-%COMP%]{padding-bottom:55px}.p-l-55[_ngcontent-%COMP%]{padding-left:55px}.p-v-55[_ngcontent-%COMP%]{padding:55px 0}.p-h-55[_ngcontent-%COMP%]{padding:0 55px}.p-60[_ngcontent-%COMP%]{padding:60px}.p-t-60[_ngcontent-%COMP%]{padding-top:60px}.p-r-60[_ngcontent-%COMP%]{padding-right:60px}.p-b-60[_ngcontent-%COMP%]{padding-bottom:60px}.p-l-60[_ngcontent-%COMP%]{padding-left:60px}.p-v-60[_ngcontent-%COMP%]{padding:60px 0}.p-h-60[_ngcontent-%COMP%]{padding:0 60px}.p-65[_ngcontent-%COMP%]{padding:65px}.p-t-65[_ngcontent-%COMP%]{padding-top:65px}.p-r-65[_ngcontent-%COMP%]{padding-right:65px}.p-b-65[_ngcontent-%COMP%]{padding-bottom:65px}.p-l-65[_ngcontent-%COMP%]{padding-left:65px}.p-v-65[_ngcontent-%COMP%]{padding:65px 0}.p-h-65[_ngcontent-%COMP%]{padding:0 65px}.p-70[_ngcontent-%COMP%]{padding:70px}.p-t-70[_ngcontent-%COMP%]{padding-top:70px}.p-r-70[_ngcontent-%COMP%]{padding-right:70px}.p-b-70[_ngcontent-%COMP%]{padding-bottom:70px}.p-l-70[_ngcontent-%COMP%]{padding-left:70px}.p-v-70[_ngcontent-%COMP%]{padding:70px 0}.p-h-70[_ngcontent-%COMP%]{padding:0 70px}.p-75[_ngcontent-%COMP%]{padding:75px}.p-t-75[_ngcontent-%COMP%]{padding-top:75px}.p-r-75[_ngcontent-%COMP%]{padding-right:75px}.p-b-75[_ngcontent-%COMP%]{padding-bottom:75px}.p-l-75[_ngcontent-%COMP%]{padding-left:75px}.p-v-75[_ngcontent-%COMP%]{padding:75px 0}.p-h-75[_ngcontent-%COMP%]{padding:0 75px}.p-80[_ngcontent-%COMP%]{padding:80px}.p-t-80[_ngcontent-%COMP%]{padding-top:80px}.p-r-80[_ngcontent-%COMP%]{padding-right:80px}.p-b-80[_ngcontent-%COMP%]{padding-bottom:80px}.p-l-80[_ngcontent-%COMP%]{padding-left:80px}.p-v-80[_ngcontent-%COMP%]{padding:80px 0}.p-h-80[_ngcontent-%COMP%]{padding:0 80px}.no-padding[_ngcontent-%COMP%]{padding:0!important}.no-pad-lr[_ngcontent-%COMP%], .no-pad-rl[_ngcontent-%COMP%]{padding-left:0;padding-right:0}.no-pad-tb[_ngcontent-%COMP%], .no-pad-bt[_ngcontent-%COMP%]{padding-top:0;padding-bottom:0}.pad-t-only[_ngcontent-%COMP%]{padding-left:0;padding-right:0;padding-bottom:0}.pad-b-only[_ngcontent-%COMP%]{padding-left:0;padding-right:0;padding-top:0}.pad-l-only[_ngcontent-%COMP%]{padding-right:0;padding-top:0;padding-bottom:0}.pad-r-only[_ngcontent-%COMP%]{padding-left:0;padding-top:0;padding-bottom:0}html[_ngcontent-%COMP%], body[_ngcontent-%COMP%], .rel[_ngcontent-%COMP%], .relative[_ngcontent-%COMP%]{position:relative}.abs[_ngcontent-%COMP%], .absolute[_ngcontent-%COMP%]{position:absolute}.fixed[_ngcontent-%COMP%]{position:fixed}.status-active[_ngcontent-%COMP%]{color:#5cb85c}.status-inactive[_ngcontent-%COMP%]{color:#666f73}.status-deleted[_ngcontent-%COMP%]{color:#000}.status-pending[_ngcontent-%COMP%]{color:orange}.status-approved[_ngcontent-%COMP%]{color:#4461e2}.status-overpaid[_ngcontent-%COMP%]{color:purple}.status-chargeoff[_ngcontent-%COMP%]{color:#f39c12}.status-active-overdue[_ngcontent-%COMP%], .status-block[_ngcontent-%COMP%]{color:red}.status-matured[_ngcontent-%COMP%]{color:#ff4000}.subStatus-contract-termination[_ngcontent-%COMP%]{color:#b3b3b3}.mat-step-header[_ngcontent-%COMP%] .mat-step-icon-state-done[_ngcontent-%COMP%]{background-color:#2af72a}.mat-step-header[_ngcontent-%COMP%] .mat-step-icon-state-done[_ngcontent-%COMP%] .status-transfer-progress[_ngcontent-%COMP%]{color:#ff4000}.mat-step-header[_ngcontent-%COMP%] .mat-step-icon-state-done[_ngcontent-%COMP%] .status-transfer-hold[_ngcontent-%COMP%]{color:#df0101}html[_ngcontent-%COMP%], body[_ngcontent-%COMP%]{-webkit-font-smoothing:antialiased}html[_ngcontent-%COMP%]{font-size:16px}body[_ngcontent-%COMP%]{font-family:Roboto,Helvetica Neue,sans-serif;font-weight:400;font-size:14px;color:#000000de;line-height:1.5;letter-spacing:normal}.mat-h1[_ngcontent-%COMP%], .mat-headline[_ngcontent-%COMP%], .mat-typography[_ngcontent-%COMP%] .mat-h1[_ngcontent-%COMP%], .mat-typography[_ngcontent-%COMP%] .mat-headline[_ngcontent-%COMP%], .mat-typography[_ngcontent-%COMP%] h1[_ngcontent-%COMP%]{font:400 24px/32px Roboto,Helvetica Neue,sans-serif;letter-spacing:normal;margin:0 0 16px}.lh-1[_ngcontent-%COMP%]{line-height:1}.lh-13[_ngcontent-%COMP%]{line-height:1.3}.lh-15[_ngcontent-%COMP%]{line-height:1.5}.bold[_ngcontent-%COMP%], .strong[_ngcontent-%COMP%]{font-weight:700}.no-bold[_ngcontent-%COMP%]{font-weight:400}.italic[_ngcontent-%COMP%], .em[_ngcontent-%COMP%]{font-style:italic}.strike[_ngcontent-%COMP%]{text-decoration:line-through}.normal[_ngcontent-%COMP%]{font-weight:400;font-style:normal}.uppercase[_ngcontent-%COMP%]{text-transform:uppercase}.text-left[_ngcontent-%COMP%]{text-align:left}.text-center[_ngcontent-%COMP%]{text-align:center}.text-right[_ngcontent-%COMP%]{text-align:right}.w100[_ngcontent-%COMP%]{font-weight:100}.w200[_ngcontent-%COMP%]{font-weight:200}.w300[_ngcontent-%COMP%]{font-weight:300}.w400[_ngcontent-%COMP%]{font-weight:400}.w500[_ngcontent-%COMP%]{font-weight:500}.w600[_ngcontent-%COMP%]{font-weight:600}.w700[_ngcontent-%COMP%]{font-weight:700}.w800[_ngcontent-%COMP%]{font-weight:800}.w900[_ngcontent-%COMP%]{font-weight:900}.f9[_ngcontent-%COMP%]{font-size:9px}.f10[_ngcontent-%COMP%]{font-size:10px}.f11[_ngcontent-%COMP%]{font-size:11px}.f12[_ngcontent-%COMP%]{font-size:12px}.f13[_ngcontent-%COMP%]{font-size:13px}.f14[_ngcontent-%COMP%]{font-size:14px}.f15[_ngcontent-%COMP%]{font-size:15px}.f16[_ngcontent-%COMP%]{font-size:16px}.f17[_ngcontent-%COMP%]{font-size:17px}.f18[_ngcontent-%COMP%]{font-size:18px;line-height:30px}.f19[_ngcontent-%COMP%]{font-size:19px}.f20[_ngcontent-%COMP%]{font-size:20px}.f30[_ngcontent-%COMP%]{font-size:30px}.f40[_ngcontent-%COMP%]{font-size:40px}.f50[_ngcontent-%COMP%]{font-size:50px}.f60[_ngcontent-%COMP%]{font-size:60px}.size-small[_ngcontent-%COMP%]{font-size:75%}.size-normal[_ngcontent-%COMP%]{font-size:100%}.size-medium[_ngcontent-%COMP%]{font-size:125%}.size-big[_ngcontent-%COMP%], .size-large[_ngcontent-%COMP%]{font-size:150%}.size-huge[_ngcontent-%COMP%]{font-size:200%}.inherit[_ngcontent-%COMP%]{font:inherit}.text-shadow[_ngcontent-%COMP%]{text-shadow:1px 1px 1px rgba(0,0,0,.4)}.text-rgb-2[_ngcontent-%COMP%]{color:#0003}.text-rgb-3[_ngcontent-%COMP%]{color:#0000004d}.text-rgb-4[_ngcontent-%COMP%]{color:#0006}.text-rgb-5[_ngcontent-%COMP%]{color:#00000080}.no-ul[_ngcontent-%COMP%], .no-ul[_ngcontent-%COMP%]:hover, .no-ul[_ngcontent-%COMP%] a[_ngcontent-%COMP%], .no-ul[_ngcontent-%COMP%] a[_ngcontent-%COMP%]:hover{text-decoration:none}.no-wrap[_ngcontent-%COMP%]{white-space:nowrap}.auto-cell-size[_ngcontent-%COMP%]{white-space:nowrap;width:1%}.ls-0[_ngcontent-%COMP%]{letter-spacing:-3px;white-space:nowrap}.label-field[_ngcontent-%COMP%]{margin-top:32px}.wrap-content[_ngcontent-%COMP%]{overflow-wrap:break-word;word-wrap:break-word}.no-break-content[_ngcontent-%COMP%]{overflow-wrap:anywhere!important}.fit[_ngcontent-%COMP%]{max-width:100%}.half-width[_ngcontent-%COMP%]{width:50%}.full-width[_ngcontent-%COMP%]{width:100%}.full-height[_ngcontent-%COMP%]{height:100%}html[_ngcontent-%COMP%], body[_ngcontent-%COMP%]{width:100%;height:100%;min-height:100%}body[_ngcontent-%COMP%] table[_ngcontent-%COMP%]{width:100%}.container[_ngcontent-%COMP%]{max-width:74rem;width:90%}.mw300[_ngcontent-%COMP%]{max-width:300px}.mw400[_ngcontent-%COMP%]{max-width:400px}.mw500[_ngcontent-%COMP%]{max-width:500px}.mw600[_ngcontent-%COMP%]{max-width:600px}.fullwidth[_ngcontent-%COMP%]{width:100%}.zindex-1[_ngcontent-%COMP%]{z-index:1}.zindex-2[_ngcontent-%COMP%]{z-index:2}.zindex-3[_ngcontent-%COMP%]{z-index:3}.zindex-4[_ngcontent-%COMP%]{z-index:4}.container[_ngcontent-%COMP%]{max-width:37rem}.container[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] div[_ngcontent-%COMP%]{margin:1rem 0;word-wrap:break-word}.paid[_ngcontent-%COMP%]{background-color:#5cb85c;height:4px}.not-paid[_ngcontent-%COMP%]{background-color:red;height:4px}"]})}}return t})();var i8=()=>["../"];function a8(t,n){if(t&1){let e=xt();s(0,"span")(1,"button",13),T(2,"fa-icon",14),c(3),p(4,"translate"),l(),s(5,"button",15),it("click",function(){mt(e);let a=P(2);return dt(a.undoTransaction())}),T(6,"fa-icon",16),c(7),p(8,"translate"),l()()}if(t&2){let e=P(2);o(),x("routerLink","edit")("disabled",!e.allowEdition),o(2),v("",m(4,5,"Edit")," "),o(2),x("disabled",!e.allowUndo),o(2),v("",m(8,7,"Undo")," ")}}function o8(t,n){if(t&1){let e=xt();s(0,"span")(1,"button",15),it("click",function(){mt(e);let a=P(2);return dt(a.chargebackTransaction())}),T(2,"fa-icon",16),c(3),p(4,"translate"),l()()}if(t&2){let e=P(2);o(),x("disabled",!e.allowChargeback),o(2),v("",m(4,2,"Chargeback")," ")}}function r8(t,n){t&1&&(s(0,"div",0),k(1,a8,9,9,"span",12)(2,o8,5,4,"span",12),l()),t&2&&(o(),x("mifosxHasPermission","ADJUST_LOAN"),o(),x("mifosxHasPermission","CHARGEBACK_LOAN"))}function l8(t,n){t&1&&(s(0,"div",4),c(1),p(2,"translateKey"),l()),t&2&&(o(),v(" ",Ge(2,1,"Repayment Transaction","catalogs")," "))}function s8(t,n){if(t&1&&(s(0,"div",5)(1,"a",17),c(2),l()()),t&2){let e=P();o(),x("href",e.loanTransactionRelatedLink(e.transactionData.toLoanTransactionRelation.fromLoanTransaction),od),o(),v(" ",e.transactionData.toLoanTransactionRelation.fromLoanTransaction," ")}}function c8(t,n){t&1&&(s(0,"div",4),c(1),p(2,"translate"),l()),t&2&&(o(),v(" ",m(2,1,"External Id")," "))}function p8(t,n){if(t&1&&(s(0,"div",5),T(1,"mifosx-external-identifier",18),l()),t&2){let e=P();o(),x("externalId",ce(e.transactionData.externalId))}}function m8(t,n){t&1&&(s(0,"div",4),c(1),p(2,"translateKey"),l()),t&2&&(o(),v(" ",Ge(2,1,"Classification","catalogs")," "))}function d8(t,n){if(t&1&&(s(0,"div",6),c(1),l()),t&2){let e=P();o(),v(" ",e.transactionData.classification.name," ")}}function u8(t,n){t&1&&T(0,"mat-divider",7),t&2&&x("inset",!0)}function f8(t,n){t&1&&(s(0,"th",28),c(1),p(2,"translate"),l()),t&2&&(o(),b(m(2,1,"labels.inputs.Relation Type")))}function h8(t,n){if(t&1&&(s(0,"td",29),c(1),p(2,"translate"),l()),t&2){let e=n.$implicit;x("matTooltip",e.paymentType),o(),v(" ",m(2,2,e.relationType)," ")}}function g8(t,n){t&1&&(s(0,"th",28),c(1),p(2,"translate"),l()),t&2&&(o(),b(m(2,1,"labels.inputs.Transaction")))}function _8(t,n){if(t&1&&(s(0,"td",30)(1,"a",17),c(2),l()()),t&2){let e=n.$implicit,i=P(2);o(),x("href",i.loanTransactionRelatedLink(e.toLoanTransaction),od),o(),v(" ",e.toLoanTransaction," ")}}function C8(t,n){t&1&&(s(0,"th",28),c(1),p(2,"translate"),l()),t&2&&(o(),b(m(2,1,"labels.inputs.Amount")))}function b8(t,n){if(t&1&&(s(0,"td",30),c(1),p(2,"currency"),l()),t&2){let e=n.$implicit,i=P(2);o(),v(" ",Ye(2,1,e.amount,i.transactionData.currency.code,"symbol-narrow","1.2-2")," ")}}function v8(t,n){t&1&&T(0,"tr",31)}function x8(t,n){t&1&&T(0,"tr",32)}function y8(t,n){if(t&1&&(s(0,"div",8),c(1),p(2,"translate"),T(3,"br"),s(4,"table",19),X(5,20),k(6,f8,3,3,"th",21)(7,h8,3,4,"td",22),Q(),X(8,23),k(9,g8,3,3,"th",21)(10,_8,3,2,"td",24),Q(),X(11,25),k(12,C8,3,3,"th",21)(13,b8,3,6,"td",24),Q(),k(14,v8,1,0,"tr",26)(15,x8,1,0,"tr",27),l()()),t&2){let e=P();o(),v(" ",m(2,4,"Linked Transactions")," "),o(3),x("dataSource",e.transactionRelations),o(10),x("matHeaderRowDef",e.displayedColumns),o(),x("matRowDefColumns",e.displayedColumns)}}function S8(t,n){if(t&1&&T(0,"mifosx-transaction-payment-detail",9),t&2){let e=P();x("paymentDetailData",e.transactionData.paymentDetailData)}}var d0=(()=>{class t{constructor(){this.loansService=A(Mt),this.route=A(Et),this.dateUtils=A(de),this.router=A(le),this.dialog=A(Gn),this.translateService=A(pa),this.settingsService=A(oe),this.organizationService=A(Op),this.alertService=A(Jl),this.allowEdition=!0,this.allowUndo=!0,this.allowChargeback=!0,this.existTransactionRelations=!1,this.paymentTypeOptions=[],this.transactionRelations=new Li,this.displayedColumns=["relationType","toTransaction","amount"],this.isFullRelated=!1,this.amountRelationsAllowed=0,this.route.data.subscribe(e=>{this.transactionData=e.loansAccountTransaction,this.transactionType=this.transactionData.type,this.allowEdition=!this.transactionData.manuallyReversed&&!this.allowTransactionEdition(this.transactionData.type.id),this.allowUndo=this.allowUndoTransaction(this.transactionData.manuallyReversed,this.transactionType),this.allowChargeback=this.allowChargebackTransaction(this.transactionType)&&!this.transactionData.manuallyReversed;let i=!1;if(this.transactionData.transactionRelations){this.transactionRelations.data=this.transactionData.transactionRelations,this.existTransactionRelations=this.transactionData.transactionRelations.length>0;let a=0;this.transactionData.transactionRelations.forEach(r=>{r.relationType==="CHARGEBACK"&&(a+=r.amount,i=!0)}),this.amountRelationsAllowed=this.transactionData.amount-a,this.isFullRelated=this.amountRelationsAllowed===0,this.allowChargeback=this.allowChargebackTransaction(this.transactionType)&&!this.isFullRelated}this.allowChargeback||(this.allowEdition=!1),(this.existTransactionRelations&&i||this.transactionType.reAge||this.transactionType.reAmortize)&&(this.allowUndo=!1)}),this.clientId=this.route.snapshot.params.clientId,this.loanId=this.route.snapshot.params.loanId}ngOnInit(){this.allowChargeback&&this.organizationService.getPaymentTypesWithCode().toPromise().then(e=>{this.paymentTypeOptions=e})}allowTransactionEdition(e){return e===20||e===21||e===22||e===23||e===28}allowChargebackTransaction(e){return e.repayment||e.interestPaymentWaiver||e.goodwillCredit||e.payoutRefund||e.merchantIssuedRefund||e.downPayment}allowUndoTransaction(e,i){return!(e||i.interestRefund)}isWriteOff(e){return e.writeOff||e.code==="loanTransactionType.writeOff"}undoTransaction(){let e=this.route.snapshot.params.loanId;if(this.transactionType.contractTermination){let i=[new Ti({controlName:"note",label:"Note",value:"",type:"text",required:!1,order:1}),new Ti({controlName:"reversalExternalId",label:"externalId",value:"",type:"text",required:!1,order:2})],a={title:this.translateService.instant("labels.heading.Undo Transaction"),layout:{addButtonText:"Undo"},formfields:i,pristine:!1};this.dialog.open(_i,{data:a,width:"50rem"}).afterClosed().subscribe(u=>{if(u.data){let d={note:u.data.value.note,reversalExternalId:u.data.value.reversalExternalId};this.loansService.loanActionButtons(e,"undoContractTermination",d).subscribe(()=>{this.router.navigate(["../"],{relativeTo:this.route})})}})}else this.dialog.open(ma,{data:{heading:this.translateService.instant("labels.heading.Undo Transaction"),dialogContext:this.translateService.instant("labels.dialogContext.Are you sure you want undo the transaction")+`${this.transactionData.id}`}}).afterClosed().subscribe(a=>{if(a.confirm){let r=this.settingsService.language.code,u=this.settingsService.dateFormat,d={transactionDate:this.dateUtils.formatDate(this.transactionData.date&&new Date(this.transactionData.date),u),transactionAmount:0,dateFormat:u,locale:r},g=this.isWriteOff(this.transactionType)?"undowriteoff":"undo",_=g==="undowriteoff"?null:this.transactionData.id;this.loansService.executeLoansAccountTransactionsCommand(e,g,d,_).subscribe(()=>{this.router.navigate(["../"],{relativeTo:this.route})})}})}chargebackTransaction(){let e=this.route.snapshot.params.loanId,i=[new ic({controlName:"paymentTypeId",label:"Payment Type",value:"",options:{label:"name",value:"id",data:this.paymentTypeOptions},required:!0,order:1}),new Ti({controlName:"amount",label:"Amount",value:this.amountRelationsAllowed,type:"number",required:!0,max:this.amountRelationsAllowed,order:2})],a={title:`Chargeback ${this.transactionType.value} Transaction`,layout:{addButtonText:"Chargeback"},formfields:i};this.dialog.open(_i,{data:a}).afterClosed().subscribe(u=>{if(u.data)if(u.data.value.amount<=this.amountRelationsAllowed){let d=this.settingsService.language.code,g={transactionAmount:u.data.value.amount,paymentTypeId:u.data.value.paymentTypeId,locale:d};this.loansService.executeLoansAccountTransactionsCommand(e,"chargeback",g,this.transactionData.id).subscribe(()=>{this.router.navigate(["../"],{relativeTo:this.route})})}else this.alertService.alert({type:"BusinessRule",message:"Chargeback amount must be lower or equal to: "+this.amountRelationsAllowed})})}loanTransactionRelatedLink(e){return`/#/clients/${this.clientId}/loans-accounts/${this.loanId}/transactions/${e}`}loanTransactionColor(){return this.transactionData.manuallyReversed?"undo":this.existTransactionRelations?"linked":"active"}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=Dt({type:t,selectors:[["mifosx-view-transaction"]],decls:47,vars:51,consts:[[1,"container","m-b-20","transaction-buttons","layout-align-end","gap-2percent"],[1,"container"],[1,"layout-row-wrap","card-content"],[1,"flex-100",3,"ngClass"],[1,"flex-50","mat-body-strong"],[1,"flex-50"],[1,"flex-50","no-break-content"],[3,"inset"],[1,"mat-body-strong","flex-100"],[3,"paymentDetailData"],[1,"layout-row","layout-align-center","gap-2percent","column-on-mobile"],["type","button","mat-raised-button","","color","primary",3,"routerLink"],[4,"mifosxHasPermission"],["mat-raised-button","","color","primary",3,"routerLink","disabled"],["icon","edit",1,"m-r-10"],["mat-raised-button","","color","warn",3,"click","disabled"],["icon","undo",1,"m-r-10"],[3,"href"],["completed","true",3,"externalId"],["mat-table","",3,"dataSource"],["matColumnDef","relationType"],["mat-header-cell","",4,"matHeaderCellDef"],["mat-cell","",3,"matTooltip",4,"matCellDef"],["matColumnDef","toTransaction"],["mat-cell","",4,"matCellDef"],["matColumnDef","amount"],["mat-header-row","",4,"matHeaderRowDef"],["mat-row","",4,"matRowDef","matRowDefColumns"],["mat-header-cell",""],["mat-cell","",3,"matTooltip"],["mat-cell",""],["mat-header-row",""],["mat-row",""]],template:function(i,a){i&1&&(M(0,r8,3,2,"div",0),s(1,"div",1)(2,"mat-card")(3,"mat-card-content")(4,"div",2),T(5,"div",3),s(6,"div",4),c(7),p(8,"translateKey"),l(),s(9,"div",5),c(10),l(),M(11,l8,3,4,"div",4),M(12,s8,3,2,"div",5),s(13,"div",4),c(14),p(15,"translateKey"),l(),s(16,"div",5),c(17),p(18,"translateKey"),l(),s(19,"div",4),c(20),p(21,"translateKey"),l(),s(22,"div",5),c(23),p(24,"dateFormat"),l(),s(25,"div",4),c(26),p(27,"translateKey"),l(),s(28,"div",5),c(29),l(),s(30,"div",4),c(31),p(32,"translateKey"),l(),s(33,"div",5),c(34),p(35,"currency"),l(),M(36,c8,3,3,"div",4),M(37,p8,2,2,"div",5),M(38,m8,3,4,"div",4),M(39,d8,2,1,"div",6),M(40,u8,1,1,"mat-divider",7),M(41,y8,16,6,"div",8),M(42,S8,1,1,"mifosx-transaction-payment-detail",9),l(),s(43,"div",10)(44,"button",11),c(45),p(46,"translate"),l()()()()()),i&2&&(O(a.transactionData.type.contra?-1:0),o(5),x("ngClass",a.loanTransactionColor()),o(2),v(" ",Ge(8,23,"Transaction Id","catalogs")," "),o(3),v(" ",a.transactionData.id," "),o(),O(a.transactionData.toLoanTransactionRelation?11:-1),o(),O(a.transactionData.toLoanTransactionRelation?12:-1),o(2),v(" ",Ge(15,26,"Type","catalogs")," "),o(3),v(" ",Ge(18,29,a.transactionData.type.value,"catalogs")," "),o(3),v(" ",Ge(21,32,"Transaction Date","catalogs")," "),o(3),v(" ",m(24,35,a.transactionData.date)," "),o(3),v(" ",Ge(27,37,"Currency","catalogs")," "),o(3),v(" ",a.transactionData.currency.name," "),o(2),v(" ",Ge(32,40,"Amount","catalogs")," "),o(3),v(" ",Ye(35,43,a.transactionData.amount,a.transactionData.currency.code,"symbol-narrow","1.2-2")," "),o(2),O(a.transactionData.externalId?36:-1),o(),O(a.transactionData.externalId?37:-1),o(),O(a.transactionData.classification?38:-1),o(),O(a.transactionData.classification?39:-1),o(),O(a.existTransactionRelations?40:-1),o(),O(a.existTransactionRelations?41:-1),o(),O(a.transactionData.paymentDetailData?42:-1),o(2),x("routerLink",Ut(50,i8)),o(),v(" ",m(46,48,"labels.buttons.Back")," "))},dependencies:[wt,ca,Tt,ae,xe,Oe,Wt,Ae,un,Va,$o,bn,yn,xn,Sn,vn,Dn,Oi,wn,Pn,Tn,An,u1,Sa,En,Pt,qa],styles:["body[_ngcontent-%COMP%] table[_ngcontent-%COMP%] tbody[_ngcontent-%COMP%] tr[_ngcontent-%COMP%]:nth-child(2n){background-color:#f2f2f2}.bg-black[_ngcontent-%COMP%]{background-color:#000}.bg-light-grey[_ngcontent-%COMP%]{background-color:#e5e5e5}.bg-medium-grey[_ngcontent-%COMP%]{background-color:#ccc}.bg-grey[_ngcontent-%COMP%]{background-color:#999}.bg-dark-grey[_ngcontent-%COMP%]{background-color:#222}.bg-white[_ngcontent-%COMP%], .bg-fff[_ngcontent-%COMP%]{background-color:#fff}.bg-none[_ngcontent-%COMP%], .no-bg[_ngcontent-%COMP%]{background:none;background-image:none;background-color:transparent}.bg-facebook[_ngcontent-%COMP%]{background-color:#47639e}.bg-twitter[_ngcontent-%COMP%]{background-color:#02a8f3}body[_ngcontent-%COMP%] table[_ngcontent-%COMP%]{border:1px solid rgba(0,0,0,.12)}.no-border[_ngcontent-%COMP%]{border:none}.no-border-t[_ngcontent-%COMP%]{border-top:none}.no-border-r[_ngcontent-%COMP%]{border-right:none}.no-border-b[_ngcontent-%COMP%]{border-bottom:none}.no-border-l[_ngcontent-%COMP%]{border-left:none}.no-border-lr[_ngcontent-%COMP%], .no-border-rl[_ngcontent-%COMP%]{border-left:none;border-right:none}.no-border-tb[_ngcontent-%COMP%], .no-border-bt[_ngcontent-%COMP%]{border-top:none;border-bottom:none}.no-border-tl[_ngcontent-%COMP%], .no-border-lt[_ngcontent-%COMP%]{border-top:none;border-left:none}.no-border-tr[_ngcontent-%COMP%], .no-border-rt[_ngcontent-%COMP%]{border-top:none;border-right:none}.no-border-bl[_ngcontent-%COMP%], .no-border-lb[_ngcontent-%COMP%]{border-bottom:none;border-left:none}.no-border-br[_ngcontent-%COMP%], .no-border-rb[_ngcontent-%COMP%]{border-bottom:none;border-right:none}.border-dashed[_ngcontent-%COMP%], .border-dotted[_ngcontent-%COMP%]{border-style:dashed}.border-black[_ngcontent-%COMP%]{border-color:#000}.border-light-grey[_ngcontent-%COMP%]{border-color:#e5e5e5}.border-medium-grey[_ngcontent-%COMP%]{border-color:#ccc}.border-grey[_ngcontent-%COMP%]{border-color:#999}.border-dark-grey[_ngcontent-%COMP%]{border-color:#2222}.border-white[_ngcontent-%COMP%], .border-fff[_ngcontent-%COMP%]{border-color:#fff}.no-border-radius[_ngcontent-%COMP%]{border-radius:0}.radius3[_ngcontent-%COMP%]{border-radius:3px}.radius5[_ngcontent-%COMP%]{border-radius:5px}.radius10[_ngcontent-%COMP%]{border-radius:10px}.column-mandatory[_ngcontent-%COMP%]{color:#5cb85c;text-align:center}.not-column-mandatory[_ngcontent-%COMP%]{color:#666f73;text-align:center}.cdk-drag-placeholder[_ngcontent-%COMP%]{background:#3498db}.yes[_ngcontent-%COMP%]{color:#5cb85c!important;background-color:#5cb85c;height:4px;cursor:none}.no[_ngcontent-%COMP%]{color:red;background-color:red;height:4px;cursor:none}.strike[_ngcontent-%COMP%]{text-decoration:line-through;color:red}.transfer[_ngcontent-%COMP%]{color:#16a085}.linked[_ngcontent-%COMP%]{color:#4461e2}.accrual[_ngcontent-%COMP%]{color:#999}.fa-question[_ngcontent-%COMP%]{color:#4461e2}.enabled[_ngcontent-%COMP%]{color:#32cd32}.disabled[_ngcontent-%COMP%]{color:#f44366}.v-mid[_ngcontent-%COMP%], .v-m[_ngcontent-%COMP%]{vertical-align:middle}.v-top[_ngcontent-%COMP%], .v-t[_ngcontent-%COMP%]{vertical-align:top}.v-bottom[_ngcontent-%COMP%], .v-b[_ngcontent-%COMP%]{vertical-align:bottom}.v-super[_ngcontent-%COMP%]{vertical-align:super}.r-amount[_ngcontent-%COMP%]{text-align:right!important;padding-right:5px!important}.left[_ngcontent-%COMP%]{text-align:left!important}.right[_ngcontent-%COMP%]{text-align:right!important}.center[_ngcontent-%COMP%]{text-align:center!important}.amount-plus[_ngcontent-%COMP%]{color:#000}.amount-minus[_ngcontent-%COMP%]{color:#4461e2}.block[_ngcontent-%COMP%]{display:block}.inline[_ngcontent-%COMP%]{display:inline}.in-block[_ngcontent-%COMP%]{display:inline-block;zoom:1}.d-none[_ngcontent-%COMP%], .hide[_ngcontent-%COMP%], .hidden[_ngcontent-%COMP%]{display:none}.t-0[_ngcontent-%COMP%]{top:0}.b-0[_ngcontent-%COMP%]{bottom:0}.l-0[_ngcontent-%COMP%]{left:0}.r-0[_ngcontent-%COMP%]{right:0}.tb-0[_ngcontent-%COMP%]{top:0;bottom:0}.lr-0[_ngcontent-%COMP%]{left:0;right:0}.f-left[_ngcontent-%COMP%]{float:left}.f-right[_ngcontent-%COMP%]{float:right}.f-none[_ngcontent-%COMP%]{float:none}textarea[_ngcontent-%COMP%]{resize:both}textarea.vertical[_ngcontent-%COMP%], textarea.horizontal[_ngcontent-%COMP%]{resize:vertical}textarea.noresize[_ngcontent-%COMP%]{resize:none}.full-input[_ngcontent-%COMP%] input[_ngcontent-%COMP%], .full-input[_ngcontent-%COMP%] select[_ngcontent-%COMP%], .full-input[_ngcontent-%COMP%] textarea[_ngcontent-%COMP%]{width:100%}.normal[_ngcontent-%COMP%] input[_ngcontent-%COMP%], .normal[_ngcontent-%COMP%] select[_ngcontent-%COMP%], .normal[_ngcontent-%COMP%] textarea[_ngcontent-%COMP%], .full-input[_ngcontent-%COMP%] [type=checkbox][_ngcontent-%COMP%], .full-input[_ngcontent-%COMP%] [type=radio][_ngcontent-%COMP%]{width:auto}.mat-tab-body-content[_ngcontent-%COMP%]{margin-bottom:20px}.mat-datepicker-input[_ngcontent-%COMP%]{margin-top:5px;margin-bottom:5px}.loader-wrapper[_ngcontent-%COMP%]{height:100vh;width:100vw}.loader-wrapper[_ngcontent-%COMP%] .triangle[_ngcontent-%COMP%]{width:0;height:0;border-style:solid;position:absolute;animation:_ngcontent-%COMP%_rotate .8s infinite .2s}.loader-wrapper[_ngcontent-%COMP%] .bottom[_ngcontent-%COMP%]{border-width:0 90px 90px;border-color:transparent transparent #1fb050;bottom:calc(50% - 100px);left:calc(50% - 90px)}.loader-wrapper[_ngcontent-%COMP%] .top[_ngcontent-%COMP%]{border-width:90px 90px 0;border-color:#b4d575 transparent transparent;top:calc(50% - 100px);left:calc(50% - 90px)}.loader-wrapper[_ngcontent-%COMP%] .left[_ngcontent-%COMP%]{border-width:90px 0 90px 90px;border-color:transparent transparent transparent #1074b9;top:calc(50% - 90px);left:calc(50% - 100px)}.loader-wrapper[_ngcontent-%COMP%] .right[_ngcontent-%COMP%]{border-width:90px 90px 90px 0;border-color:transparent #1daeec transparent transparent;top:calc(50% - 90px);right:calc(50% - 100px)}@keyframes _ngcontent-%COMP%_rotate{0%{transform:rotate(0)}to{transform:rotate(360deg)}}body[_ngcontent-%COMP%]{margin:0}.container[_ngcontent-%COMP%]{margin:0 auto}.mb-05[_ngcontent-%COMP%]{margin-bottom:.5rem}.mr-05[_ngcontent-%COMP%]{margin-right:.5rem}.mb-1[_ngcontent-%COMP%]{margin-bottom:1rem}.mt-1[_ngcontent-%COMP%]{margin-top:1rem}.m-5[_ngcontent-%COMP%]{margin:5px}.m-t-5[_ngcontent-%COMP%]{margin-top:5px}.m-r-5[_ngcontent-%COMP%]{margin-right:5px}.m-b-5[_ngcontent-%COMP%]{margin-bottom:5px}.m-l-5[_ngcontent-%COMP%]{margin-left:5px}.m-v-5[_ngcontent-%COMP%]{margin:5px 0}.m-h-5[_ngcontent-%COMP%]{margin:0 5px}.m-10[_ngcontent-%COMP%]{margin:10px}.m-t-10[_ngcontent-%COMP%]{margin-top:10px}.m-r-10[_ngcontent-%COMP%]{margin-right:10px}.m-b-10[_ngcontent-%COMP%]{margin-bottom:10px}.m-l-10[_ngcontent-%COMP%]{margin-left:10px}.m-v-10[_ngcontent-%COMP%]{margin:10px 0}.m-h-10[_ngcontent-%COMP%]{margin:0 10px}.m-15[_ngcontent-%COMP%]{margin:15px}.m-t-15[_ngcontent-%COMP%]{margin-top:15px}.m-r-15[_ngcontent-%COMP%]{margin-right:15px}.m-b-15[_ngcontent-%COMP%]{margin-bottom:15px}.m-l-15[_ngcontent-%COMP%]{margin-left:15px}.m-v-15[_ngcontent-%COMP%]{margin:15px 0}.m-h-15[_ngcontent-%COMP%]{margin:0 15px}.m-20[_ngcontent-%COMP%]{margin:20px}.m-t-20[_ngcontent-%COMP%]{margin-top:20px}.m-r-20[_ngcontent-%COMP%]{margin-right:20px}.m-b-20[_ngcontent-%COMP%]{margin-bottom:20px}.m-l-20[_ngcontent-%COMP%]{margin-left:20px}.m-v-20[_ngcontent-%COMP%]{margin:20px 0}.m-h-20[_ngcontent-%COMP%]{margin:0 20px}.m-25[_ngcontent-%COMP%]{margin:25px}.m-t-25[_ngcontent-%COMP%]{margin-top:25px}.m-r-25[_ngcontent-%COMP%]{margin-right:25px}.m-b-25[_ngcontent-%COMP%]{margin-bottom:25px}.m-l-25[_ngcontent-%COMP%]{margin-left:25px}.m-v-25[_ngcontent-%COMP%]{margin:25px 0}.m-h-25[_ngcontent-%COMP%]{margin:0 25px}.m-30[_ngcontent-%COMP%]{margin:30px}.m-t-30[_ngcontent-%COMP%]{margin-top:30px}.m-r-30[_ngcontent-%COMP%]{margin-right:30px}.m-b-30[_ngcontent-%COMP%]{margin-bottom:30px}.m-l-30[_ngcontent-%COMP%]{margin-left:30px}.m-v-30[_ngcontent-%COMP%]{margin:30px 0}.m-h-30[_ngcontent-%COMP%]{margin:0 30px}.m-35[_ngcontent-%COMP%]{margin:35px}.m-t-35[_ngcontent-%COMP%]{margin-top:35px}.m-r-35[_ngcontent-%COMP%]{margin-right:35px}.m-b-35[_ngcontent-%COMP%]{margin-bottom:35px}.m-l-35[_ngcontent-%COMP%]{margin-left:35px}.m-v-35[_ngcontent-%COMP%]{margin:35px 0}.m-h-35[_ngcontent-%COMP%]{margin:0 35px}.m-40[_ngcontent-%COMP%]{margin:40px}.m-t-40[_ngcontent-%COMP%]{margin-top:40px}.m-r-40[_ngcontent-%COMP%]{margin-right:40px}.m-b-40[_ngcontent-%COMP%]{margin-bottom:40px}.m-l-40[_ngcontent-%COMP%]{margin-left:40px}.m-v-40[_ngcontent-%COMP%]{margin:40px 0}.m-h-40[_ngcontent-%COMP%]{margin:0 40px}.m-45[_ngcontent-%COMP%]{margin:45px}.m-t-45[_ngcontent-%COMP%]{margin-top:45px}.m-r-45[_ngcontent-%COMP%]{margin-right:45px}.m-b-45[_ngcontent-%COMP%]{margin-bottom:45px}.m-l-45[_ngcontent-%COMP%]{margin-left:45px}.m-v-45[_ngcontent-%COMP%]{margin:45px 0}.m-h-45[_ngcontent-%COMP%]{margin:0 45px}.m-50[_ngcontent-%COMP%]{margin:50px}.m-t-50[_ngcontent-%COMP%]{margin-top:50px}.m-r-50[_ngcontent-%COMP%]{margin-right:50px}.m-b-50[_ngcontent-%COMP%]{margin-bottom:50px}.m-l-50[_ngcontent-%COMP%]{margin-left:50px}.m-v-50[_ngcontent-%COMP%]{margin:50px 0}.m-h-50[_ngcontent-%COMP%]{margin:0 50px}.m-55[_ngcontent-%COMP%]{margin:55px}.m-t-55[_ngcontent-%COMP%]{margin-top:55px}.m-r-55[_ngcontent-%COMP%]{margin-right:55px}.m-b-55[_ngcontent-%COMP%]{margin-bottom:55px}.m-l-55[_ngcontent-%COMP%]{margin-left:55px}.m-v-55[_ngcontent-%COMP%]{margin:55px 0}.m-h-55[_ngcontent-%COMP%]{margin:0 55px}.m-60[_ngcontent-%COMP%]{margin:60px}.m-t-60[_ngcontent-%COMP%]{margin-top:60px}.m-r-60[_ngcontent-%COMP%]{margin-right:60px}.m-b-60[_ngcontent-%COMP%]{margin-bottom:60px}.m-l-60[_ngcontent-%COMP%]{margin-left:60px}.m-v-60[_ngcontent-%COMP%]{margin:60px 0}.m-h-60[_ngcontent-%COMP%]{margin:0 60px}.m-65[_ngcontent-%COMP%]{margin:65px}.m-t-65[_ngcontent-%COMP%]{margin-top:65px}.m-r-65[_ngcontent-%COMP%]{margin-right:65px}.m-b-65[_ngcontent-%COMP%]{margin-bottom:65px}.m-l-65[_ngcontent-%COMP%]{margin-left:65px}.m-v-65[_ngcontent-%COMP%]{margin:65px 0}.m-h-65[_ngcontent-%COMP%]{margin:0 65px}.m-70[_ngcontent-%COMP%]{margin:70px}.m-t-70[_ngcontent-%COMP%]{margin-top:70px}.m-r-70[_ngcontent-%COMP%]{margin-right:70px}.m-b-70[_ngcontent-%COMP%]{margin-bottom:70px}.m-l-70[_ngcontent-%COMP%]{margin-left:70px}.m-v-70[_ngcontent-%COMP%]{margin:70px 0}.m-h-70[_ngcontent-%COMP%]{margin:0 70px}.m-75[_ngcontent-%COMP%]{margin:75px}.m-t-75[_ngcontent-%COMP%]{margin-top:75px}.m-r-75[_ngcontent-%COMP%]{margin-right:75px}.m-b-75[_ngcontent-%COMP%]{margin-bottom:75px}.m-l-75[_ngcontent-%COMP%]{margin-left:75px}.m-v-75[_ngcontent-%COMP%]{margin:75px 0}.m-h-75[_ngcontent-%COMP%]{margin:0 75px}.m-80[_ngcontent-%COMP%]{margin:80px}.m-t-80[_ngcontent-%COMP%]{margin-top:80px}.m-r-80[_ngcontent-%COMP%]{margin-right:80px}.m-b-80[_ngcontent-%COMP%]{margin-bottom:80px}.m-l-80[_ngcontent-%COMP%]{margin-left:80px}.m-v-80[_ngcontent-%COMP%]{margin:80px 0}.m-h-80[_ngcontent-%COMP%]{margin:0 80px}.no-m[_ngcontent-%COMP%]{margin:0}.no-m-t[_ngcontent-%COMP%]{margin-top:0}.no-m-r[_ngcontent-%COMP%]{margin-right:0}.no-m-b[_ngcontent-%COMP%]{margin-bottom:0}.no-m-l[_ngcontent-%COMP%]{margin-left:0}.no-m-v[_ngcontent-%COMP%], .no-m-h[_ngcontent-%COMP%], .no-margin[_ngcontent-%COMP%]{margin:0}.no-m-lr[_ngcontent-%COMP%], .no-m-rl[_ngcontent-%COMP%]{margin-left:0;margin-right:0}.no-m-tb[_ngcontent-%COMP%], .no-m-bt[_ngcontent-%COMP%]{margin-top:0;margin-bottom:0}.m-t-only[_ngcontent-%COMP%]{margin-left:0;margin-right:0;margin-bottom:0}.m-b-only[_ngcontent-%COMP%]{margin-left:0;margin-right:0;margin-top:0}.m-l-only[_ngcontent-%COMP%]{margin-right:0;margin-top:0;margin-bottom:0}.m-r-only[_ngcontent-%COMP%]{margin-left:0;margin-top:0;margin-bottom:0}.m-auto[_ngcontent-%COMP%]{margin-left:auto;margin-right:auto}.ls-0[_ngcontent-%COMP%]{margin-left:10px;margin-right:10px}html[_ngcontent-%COMP%], body[_ngcontent-%COMP%]{-webkit-tap-highlight-color:transparent}div[_ngcontent-%COMP%]{box-sizing:border-box}.color-inherit[_ngcontent-%COMP%]{color:inherit}.no-shadow[_ngcontent-%COMP%]{box-shadow:none}.pointer[_ngcontent-%COMP%]{cursor:pointer}.nolist[_ngcontent-%COMP%]{list-style:none}.actions-menu[_ngcontent-%COMP%]{color:#fff}.alert[_ngcontent-%COMP%]{background-color:#e8f4fd;padding:6px 16px;font-size:.875rem;font-family:Roboto,Helvetica Neue,sans-serif;font-weight:400;line-height:1.43;border-radius:4px;letter-spacing:normal;margin:10px}.alert[_ngcontent-%COMP%] .message[_ngcontent-%COMP%]{padding:8px 0;font-size:18px}.alert[_ngcontent-%COMP%] .alert-check[_ngcontent-%COMP%]{color:#359ff4;margin-right:2px;font-size:1.4rem} .mat-tooltip{font-size:15px;color:#fff!important;background-color:#4461e2b3;border:1px solid rgb(25.7777777778,51.5555555556,166.2222222222);max-width:400px!important;white-space:pre-line!important}.loading[_ngcontent-%COMP%]{position:absolute;min-width:100%;width:100px;height:12px;background:linear-gradient(125deg,#fff,#4461e2,#fff);animation:grow 4s linear infinite,move 4s linear infinite}mat-card-title[_ngcontent-%COMP%]{font-weight:600;font-size:x-large;padding-left:20px;padding-top:20px}html[_ngcontent-%COMP%], body[_ngcontent-%COMP%]{overflow:hidden}.overflow-x-scroll[_ngcontent-%COMP%]{max-width:100%;overflow-x:auto}.overflow-no[_ngcontent-%COMP%]{overflow:hidden}.overflow-auto[_ngcontent-%COMP%]{overflow:auto}.overflow-scroll[_ngcontent-%COMP%]{overflow:scroll}.table-container[_ngcontent-%COMP%]{overflow-x:auto;max-width:100%}body[_ngcontent-%COMP%], .no-p[_ngcontent-%COMP%]{padding:0}.no-p-t[_ngcontent-%COMP%]{padding-top:0}.no-p-r[_ngcontent-%COMP%]{padding-right:0}.no-p-b[_ngcontent-%COMP%]{padding-bottom:0}.no-p-l[_ngcontent-%COMP%]{padding-left:0}.no-p-v[_ngcontent-%COMP%], .no-p-h[_ngcontent-%COMP%]{padding:0}.p-5[_ngcontent-%COMP%]{padding:5px}.p-t-5[_ngcontent-%COMP%]{padding-top:5px}.p-r-5[_ngcontent-%COMP%]{padding-right:5px}.p-b-5[_ngcontent-%COMP%]{padding-bottom:5px}.p-l-5[_ngcontent-%COMP%]{padding-left:5px}.p-v-5[_ngcontent-%COMP%]{padding:5px 0}.p-h-5[_ngcontent-%COMP%]{padding:0 5px}.p-10[_ngcontent-%COMP%]{padding:10px}.p-t-10[_ngcontent-%COMP%]{padding-top:10px}.p-b-10[_ngcontent-%COMP%]{padding-bottom:10px}.p-v-10[_ngcontent-%COMP%]{padding:10px 0}.p-h-10[_ngcontent-%COMP%]{padding:0 10px}.p-15[_ngcontent-%COMP%]{padding:15px}.p-t-15[_ngcontent-%COMP%]{padding-top:15px}.p-r-15[_ngcontent-%COMP%]{padding-right:15px}.p-b-15[_ngcontent-%COMP%]{padding-bottom:15px}.p-l-15[_ngcontent-%COMP%]{padding-left:15px}.p-v-15[_ngcontent-%COMP%]{padding:15px 0}.p-h-15[_ngcontent-%COMP%]{padding:0 15px}.p-20[_ngcontent-%COMP%]{padding:20px}.p-t-20[_ngcontent-%COMP%]{padding-top:20px}.p-r-20[_ngcontent-%COMP%]{padding-right:20px}.p-b-20[_ngcontent-%COMP%]{padding-bottom:20px}.p-l-20[_ngcontent-%COMP%]{padding-left:20px}.p-v-20[_ngcontent-%COMP%]{padding:20px 0}.p-h-20[_ngcontent-%COMP%]{padding:0 20px}.p-25[_ngcontent-%COMP%]{padding:25px}.p-t-25[_ngcontent-%COMP%]{padding-top:25px}.p-r-25[_ngcontent-%COMP%]{padding-right:25px}.p-b-25[_ngcontent-%COMP%]{padding-bottom:25px}.p-l-25[_ngcontent-%COMP%]{padding-left:25px}.p-v-25[_ngcontent-%COMP%]{padding:25px 0}.p-h-25[_ngcontent-%COMP%]{padding:0 25px}.p-30[_ngcontent-%COMP%]{padding:30px}.p-t-30[_ngcontent-%COMP%]{padding-top:30px}.p-r-30[_ngcontent-%COMP%]{padding-right:30px}.p-b-30[_ngcontent-%COMP%]{padding-bottom:30px}.p-l-30[_ngcontent-%COMP%]{padding-left:30px}.p-v-30[_ngcontent-%COMP%]{padding:30px 0}.p-h-30[_ngcontent-%COMP%]{padding:0 30px}.p-35[_ngcontent-%COMP%]{padding:35px}.p-t-35[_ngcontent-%COMP%]{padding-top:35px}.p-r-35[_ngcontent-%COMP%]{padding-right:35px}.p-b-35[_ngcontent-%COMP%]{padding-bottom:35px}.p-l-35[_ngcontent-%COMP%]{padding-left:35px}.p-v-35[_ngcontent-%COMP%]{padding:35px 0}.p-h-35[_ngcontent-%COMP%]{padding:0 35px}.p-40[_ngcontent-%COMP%]{padding:40px}.p-t-40[_ngcontent-%COMP%]{padding-top:40px}.p-r-40[_ngcontent-%COMP%]{padding-right:40px}.p-b-40[_ngcontent-%COMP%]{padding-bottom:40px}.p-l-40[_ngcontent-%COMP%]{padding-left:40px}.p-v-40[_ngcontent-%COMP%]{padding-top:40px;padding-bottom:40px}.p-h-40[_ngcontent-%COMP%]{padding:0 40px}.p-45[_ngcontent-%COMP%]{padding:45px}.p-t-45[_ngcontent-%COMP%]{padding-top:45px}.p-r-45[_ngcontent-%COMP%]{padding-right:45px}.p-b-45[_ngcontent-%COMP%]{padding-bottom:45px}.p-l-45[_ngcontent-%COMP%]{padding-left:45px}.p-v-45[_ngcontent-%COMP%]{padding:45px 0}.p-h-45[_ngcontent-%COMP%]{padding:0 45px}.p-50[_ngcontent-%COMP%]{padding:50px}.p-t-50[_ngcontent-%COMP%]{padding-top:50px}.p-r-50[_ngcontent-%COMP%]{padding-right:50px}.p-b-50[_ngcontent-%COMP%]{padding-bottom:50px}.p-l-50[_ngcontent-%COMP%]{padding-left:50px}.p-v-50[_ngcontent-%COMP%]{padding:50px 0}.p-h-50[_ngcontent-%COMP%]{padding:0 50px}.p-55[_ngcontent-%COMP%]{padding:55px}.p-t-55[_ngcontent-%COMP%]{padding-top:55px}.p-r-55[_ngcontent-%COMP%]{padding-right:55px}.p-b-55[_ngcontent-%COMP%]{padding-bottom:55px}.p-l-55[_ngcontent-%COMP%]{padding-left:55px}.p-v-55[_ngcontent-%COMP%]{padding:55px 0}.p-h-55[_ngcontent-%COMP%]{padding:0 55px}.p-60[_ngcontent-%COMP%]{padding:60px}.p-t-60[_ngcontent-%COMP%]{padding-top:60px}.p-r-60[_ngcontent-%COMP%]{padding-right:60px}.p-b-60[_ngcontent-%COMP%]{padding-bottom:60px}.p-l-60[_ngcontent-%COMP%]{padding-left:60px}.p-v-60[_ngcontent-%COMP%]{padding:60px 0}.p-h-60[_ngcontent-%COMP%]{padding:0 60px}.p-65[_ngcontent-%COMP%]{padding:65px}.p-t-65[_ngcontent-%COMP%]{padding-top:65px}.p-r-65[_ngcontent-%COMP%]{padding-right:65px}.p-b-65[_ngcontent-%COMP%]{padding-bottom:65px}.p-l-65[_ngcontent-%COMP%]{padding-left:65px}.p-v-65[_ngcontent-%COMP%]{padding:65px 0}.p-h-65[_ngcontent-%COMP%]{padding:0 65px}.p-70[_ngcontent-%COMP%]{padding:70px}.p-t-70[_ngcontent-%COMP%]{padding-top:70px}.p-r-70[_ngcontent-%COMP%]{padding-right:70px}.p-b-70[_ngcontent-%COMP%]{padding-bottom:70px}.p-l-70[_ngcontent-%COMP%]{padding-left:70px}.p-v-70[_ngcontent-%COMP%]{padding:70px 0}.p-h-70[_ngcontent-%COMP%]{padding:0 70px}.p-75[_ngcontent-%COMP%]{padding:75px}.p-t-75[_ngcontent-%COMP%]{padding-top:75px}.p-r-75[_ngcontent-%COMP%]{padding-right:75px}.p-b-75[_ngcontent-%COMP%]{padding-bottom:75px}.p-l-75[_ngcontent-%COMP%]{padding-left:75px}.p-v-75[_ngcontent-%COMP%]{padding:75px 0}.p-h-75[_ngcontent-%COMP%]{padding:0 75px}.p-80[_ngcontent-%COMP%]{padding:80px}.p-t-80[_ngcontent-%COMP%]{padding-top:80px}.p-r-80[_ngcontent-%COMP%]{padding-right:80px}.p-b-80[_ngcontent-%COMP%]{padding-bottom:80px}.p-l-80[_ngcontent-%COMP%]{padding-left:80px}.p-v-80[_ngcontent-%COMP%]{padding:80px 0}.p-h-80[_ngcontent-%COMP%]{padding:0 80px}.no-padding[_ngcontent-%COMP%]{padding:0!important}.no-pad-lr[_ngcontent-%COMP%], .no-pad-rl[_ngcontent-%COMP%]{padding-left:0;padding-right:0}.no-pad-tb[_ngcontent-%COMP%], .no-pad-bt[_ngcontent-%COMP%]{padding-top:0;padding-bottom:0}.pad-t-only[_ngcontent-%COMP%]{padding-left:0;padding-right:0;padding-bottom:0}.pad-b-only[_ngcontent-%COMP%]{padding-left:0;padding-right:0;padding-top:0}.pad-l-only[_ngcontent-%COMP%]{padding-right:0;padding-top:0;padding-bottom:0}.pad-r-only[_ngcontent-%COMP%]{padding-left:0;padding-top:0;padding-bottom:0}html[_ngcontent-%COMP%], body[_ngcontent-%COMP%], .rel[_ngcontent-%COMP%], .relative[_ngcontent-%COMP%]{position:relative}.abs[_ngcontent-%COMP%], .absolute[_ngcontent-%COMP%]{position:absolute}.fixed[_ngcontent-%COMP%]{position:fixed}.status-active[_ngcontent-%COMP%]{color:#5cb85c}.status-inactive[_ngcontent-%COMP%]{color:#666f73}.status-deleted[_ngcontent-%COMP%]{color:#000}.status-pending[_ngcontent-%COMP%]{color:orange}.status-approved[_ngcontent-%COMP%]{color:#4461e2}.status-overpaid[_ngcontent-%COMP%]{color:purple}.status-chargeoff[_ngcontent-%COMP%]{color:#f39c12}.status-active-overdue[_ngcontent-%COMP%], .status-block[_ngcontent-%COMP%]{color:red}.status-matured[_ngcontent-%COMP%]{color:#ff4000}.subStatus-contract-termination[_ngcontent-%COMP%]{color:#b3b3b3}.mat-step-header[_ngcontent-%COMP%] .mat-step-icon-state-done[_ngcontent-%COMP%]{background-color:#2af72a}.mat-step-header[_ngcontent-%COMP%] .mat-step-icon-state-done[_ngcontent-%COMP%] .status-transfer-progress[_ngcontent-%COMP%]{color:#ff4000}.mat-step-header[_ngcontent-%COMP%] .mat-step-icon-state-done[_ngcontent-%COMP%] .status-transfer-hold[_ngcontent-%COMP%]{color:#df0101}html[_ngcontent-%COMP%], body[_ngcontent-%COMP%]{-webkit-font-smoothing:antialiased}html[_ngcontent-%COMP%]{font-size:16px}body[_ngcontent-%COMP%]{font-family:Roboto,Helvetica Neue,sans-serif;font-weight:400;font-size:14px;color:#000000de;line-height:1.5;letter-spacing:normal}.mat-h1[_ngcontent-%COMP%], .mat-headline[_ngcontent-%COMP%], .mat-typography[_ngcontent-%COMP%] .mat-h1[_ngcontent-%COMP%], .mat-typography[_ngcontent-%COMP%] .mat-headline[_ngcontent-%COMP%], .mat-typography[_ngcontent-%COMP%] h1[_ngcontent-%COMP%]{font:400 24px/32px Roboto,Helvetica Neue,sans-serif;letter-spacing:normal;margin:0 0 16px}.lh-1[_ngcontent-%COMP%]{line-height:1}.lh-13[_ngcontent-%COMP%]{line-height:1.3}.lh-15[_ngcontent-%COMP%]{line-height:1.5}.bold[_ngcontent-%COMP%], .strong[_ngcontent-%COMP%]{font-weight:700}.no-bold[_ngcontent-%COMP%]{font-weight:400}.italic[_ngcontent-%COMP%], .em[_ngcontent-%COMP%]{font-style:italic}.strike[_ngcontent-%COMP%]{text-decoration:line-through}.normal[_ngcontent-%COMP%]{font-weight:400;font-style:normal}.uppercase[_ngcontent-%COMP%]{text-transform:uppercase}.text-left[_ngcontent-%COMP%]{text-align:left}.text-center[_ngcontent-%COMP%]{text-align:center}.text-right[_ngcontent-%COMP%]{text-align:right}.w100[_ngcontent-%COMP%]{font-weight:100}.w200[_ngcontent-%COMP%]{font-weight:200}.w300[_ngcontent-%COMP%]{font-weight:300}.w400[_ngcontent-%COMP%]{font-weight:400}.w500[_ngcontent-%COMP%]{font-weight:500}.w600[_ngcontent-%COMP%]{font-weight:600}.w700[_ngcontent-%COMP%]{font-weight:700}.w800[_ngcontent-%COMP%]{font-weight:800}.w900[_ngcontent-%COMP%]{font-weight:900}.f9[_ngcontent-%COMP%]{font-size:9px}.f10[_ngcontent-%COMP%]{font-size:10px}.f11[_ngcontent-%COMP%]{font-size:11px}.f12[_ngcontent-%COMP%]{font-size:12px}.f13[_ngcontent-%COMP%]{font-size:13px}.f14[_ngcontent-%COMP%]{font-size:14px}.f15[_ngcontent-%COMP%]{font-size:15px}.f16[_ngcontent-%COMP%]{font-size:16px}.f17[_ngcontent-%COMP%]{font-size:17px}.f18[_ngcontent-%COMP%]{font-size:18px;line-height:30px}.f19[_ngcontent-%COMP%]{font-size:19px}.f20[_ngcontent-%COMP%]{font-size:20px}.f30[_ngcontent-%COMP%]{font-size:30px}.f40[_ngcontent-%COMP%]{font-size:40px}.f50[_ngcontent-%COMP%]{font-size:50px}.f60[_ngcontent-%COMP%]{font-size:60px}.size-small[_ngcontent-%COMP%]{font-size:75%}.size-normal[_ngcontent-%COMP%]{font-size:100%}.size-medium[_ngcontent-%COMP%]{font-size:125%}.size-big[_ngcontent-%COMP%], .size-large[_ngcontent-%COMP%]{font-size:150%}.size-huge[_ngcontent-%COMP%]{font-size:200%}.inherit[_ngcontent-%COMP%]{font:inherit}.text-shadow[_ngcontent-%COMP%]{text-shadow:1px 1px 1px rgba(0,0,0,.4)}.text-rgb-2[_ngcontent-%COMP%]{color:#0003}.text-rgb-3[_ngcontent-%COMP%]{color:#0000004d}.text-rgb-4[_ngcontent-%COMP%]{color:#0006}.text-rgb-5[_ngcontent-%COMP%]{color:#00000080}.no-ul[_ngcontent-%COMP%], .no-ul[_ngcontent-%COMP%]:hover, .no-ul[_ngcontent-%COMP%] a[_ngcontent-%COMP%], .no-ul[_ngcontent-%COMP%] a[_ngcontent-%COMP%]:hover{text-decoration:none}.no-wrap[_ngcontent-%COMP%]{white-space:nowrap}.auto-cell-size[_ngcontent-%COMP%]{white-space:nowrap;width:1%}.ls-0[_ngcontent-%COMP%]{letter-spacing:-3px;white-space:nowrap}.label-field[_ngcontent-%COMP%]{margin-top:32px}.wrap-content[_ngcontent-%COMP%]{overflow-wrap:break-word;word-wrap:break-word}.no-break-content[_ngcontent-%COMP%]{overflow-wrap:anywhere!important}.fit[_ngcontent-%COMP%]{max-width:100%}.half-width[_ngcontent-%COMP%]{width:50%}.full-width[_ngcontent-%COMP%]{width:100%}.full-height[_ngcontent-%COMP%]{height:100%}html[_ngcontent-%COMP%], body[_ngcontent-%COMP%]{width:100%;height:100%;min-height:100%}body[_ngcontent-%COMP%] table[_ngcontent-%COMP%]{width:100%}.container[_ngcontent-%COMP%]{max-width:74rem;width:90%}.mw300[_ngcontent-%COMP%]{max-width:300px}.mw400[_ngcontent-%COMP%]{max-width:400px}.mw500[_ngcontent-%COMP%]{max-width:500px}.mw600[_ngcontent-%COMP%]{max-width:600px}.fullwidth[_ngcontent-%COMP%]{width:100%}.zindex-1[_ngcontent-%COMP%]{z-index:1}.zindex-2[_ngcontent-%COMP%]{z-index:2}.zindex-3[_ngcontent-%COMP%]{z-index:3}.zindex-4[_ngcontent-%COMP%]{z-index:4}.container[_ngcontent-%COMP%]{max-width:37rem}.container[_ngcontent-%COMP%] .card-content[_ngcontent-%COMP%] div[_ngcontent-%COMP%]{margin:1rem 0;word-wrap:break-word}.container[_ngcontent-%COMP%] .card-content[_ngcontent-%COMP%] mifosx-transaction-payment-detail[_ngcontent-%COMP%]{width:100%;margin-bottom:20px}.transaction-buttons[_ngcontent-%COMP%]{margin-top:3%}.loan-relation[_ngcontent-%COMP%]{background-color:#d7dada}.active[_ngcontent-%COMP%]{background-color:#5cb85c;height:4px}.linked[_ngcontent-%COMP%]{background-color:#4461e2;height:4px}.undo[_ngcontent-%COMP%]{background-color:red;height:4px}"]})}}return t})();var D8=()=>["../"];function w8(t,n){t&1&&(s(0,"mat-error"),c(1),p(2,"translate"),p(3,"translate"),s(4,"strong"),c(5),p(6,"translate"),l()()),t&2&&(o(),$t(" ",m(2,3,"labels.inputs.Transaction Date")," ",m(3,5,"labels.commons.is")," "),o(4),v(" ",m(6,7,"labels.commons.required")," "))}function T8(t,n){if(t&1&&(s(0,"mat-option",10),c(1),l()),t&2){let e=n.$implicit;x("value",e.id),o(),v(" ",e.name," ")}}function P8(t,n){t&1&&(s(0,"mat-form-field")(1,"mat-label"),c(2),p(3,"translate"),l(),T(4,"input",18),l()),t&2&&(o(2),b(m(3,1,"labels.inputs.Account Number")))}function A8(t,n){t&1&&(s(0,"mat-form-field")(1,"mat-label"),c(2),p(3,"translate"),l(),T(4,"input",19),l()),t&2&&(o(2),b(m(3,1,"labels.inputs.Cheque")))}function M8(t,n){t&1&&(s(0,"mat-form-field")(1,"mat-label"),c(2),p(3,"translate"),l(),T(4,"input",20),l()),t&2&&(o(2),b(m(3,1,"labels.inputs.Routing Code")))}function O8(t,n){t&1&&(s(0,"mat-form-field")(1,"mat-label"),c(2),p(3,"translate"),l(),T(4,"input",21),l()),t&2&&(o(2),b(m(3,1,"labels.inputs.Receipt Number")))}function I8(t,n){t&1&&(s(0,"mat-form-field")(1,"mat-label"),c(2),p(3,"translate"),l(),T(4,"input",22),l()),t&2&&(o(2),b(m(3,1,"labels.inputs.Bank")))}var u0=(()=>{class t{constructor(){this.formBuilder=A(Te),this.route=A(Et),this.router=A(le),this.dateUtils=A(de),this.loansService=A(Mt),this.settingsService=A(oe),this.minDate=new Date(2e3,0,1),this.maxDate=new Date,this.showPaymentDetails=!1,this.route.data.subscribe(e=>{this.transactionTemplateData=e.loansAccountTransactionTemplate,e.loansAccountTransactionTemplate.currency&&(this.currency=e.loansAccountTransactionTemplate.currency),this.paymentTypeOptions=this.transactionTemplateData.paymentTypeOptions}),this.loanAccountId=this.route.snapshot.params.loanId}ngOnInit(){this.maxDate=this.settingsService.businessDate,this.createEditTransactionForm(),this.editTransactionForm.patchValue({transactionDate:this.transactionTemplateData.date&&new Date(this.transactionTemplateData.date),transactionAmount:this.transactionTemplateData.amount,externalId:this.transactionTemplateData.externalId,paymentTypeId:this.transactionTemplateData.paymentTypeId})}createEditTransactionForm(){this.editTransactionForm=this.formBuilder.group({transactionDate:["",Gt.required],transactionAmount:["",Gt.required],externalId:[""],paymentTypeId:[""]})}addPaymentDetails(){this.showPaymentDetails=!this.showPaymentDetails,this.showPaymentDetails?(this.editTransactionForm.addControl("accountNumber",new pe("")),this.editTransactionForm.addControl("checkNumber",new pe("")),this.editTransactionForm.addControl("routingCode",new pe("")),this.editTransactionForm.addControl("receiptNumber",new pe("")),this.editTransactionForm.addControl("bankNumber",new pe(""))):(this.editTransactionForm.removeControl("accountNumber"),this.editTransactionForm.removeControl("checkNumber"),this.editTransactionForm.removeControl("routingCode"),this.editTransactionForm.removeControl("receiptNumber"),this.editTransactionForm.removeControl("bankNumber"))}submit(){let e=this.editTransactionForm.value,i=this.settingsService.language.code,a=this.settingsService.dateFormat,r=this.editTransactionForm.value.transactionDate;e.transactionDate instanceof Date&&(e.transactionDate=this.dateUtils.formatDate(r,a));let u=ve(ie({},e),{dateFormat:a,locale:i});u.transactionAmount=u.transactionAmount*1,this.loansService.executeLoansAccountTransactionsCommand(this.loanAccountId,"modify",u,this.transactionTemplateData.id).subscribe(d=>{this.router.navigate(["../"],{relativeTo:this.route})})}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=Dt({type:t,selectors:[["mifosx-edit-transaction"]],decls:45,vars:37,consts:[["dueDatePicker",""],[1,"container"],[3,"ngSubmit","formGroup"],[1,"layout-column"],[3,"click"],["matInput","","formControlName","transactionDate","required","",3,"min","max","matDatepicker"],["matSuffix","",3,"for"],[3,"currency","isRequired","inputFormControl","inputLabel"],["matInput","","formControlName","externalId"],["formControlName","paymentTypeId"],[3,"value"],[1,"flex-fill"],[1,"expandcollapsebutton","m-l-10","m-t-40","flex-75",3,"click"],[3,"className"],[1,"m-l-10"],[1,"layout-row","layout-xs-column","layout-align-center","gap-5px"],["type","button","mat-raised-button","",3,"routerLink"],["mat-raised-button","","color","primary",3,"disabled"],["type","number","formControlName","accountNumber","matInput",""],["type","number","formControlName","checkNumber","matInput",""],["formControlName","routingCode","matInput",""],["formControlName","receiptNumber","matInput",""],["formControlName","bankNumber","matInput",""]],template:function(i,a){if(i&1){let r=xt();s(0,"div",1)(1,"mat-card")(2,"form",2),it("ngSubmit",function(){return mt(r),dt(a.submit())}),s(3,"mat-card-content",3)(4,"mat-form-field",4),it("click",function(){mt(r);let d=Lt(11);return dt(d.open())}),s(5,"mat-label"),c(6),p(7,"translate"),l(),T(8,"input",5)(9,"mat-datepicker-toggle",6)(10,"mat-datepicker",null,0),M(12,w8,7,9,"mat-error"),l(),T(13,"mifosx-input-amount",7),s(14,"mat-form-field")(15,"mat-label"),c(16),p(17,"translate"),l(),T(18,"input",8),l(),s(19,"mat-form-field")(20,"mat-label"),c(21),p(22,"translate"),l(),s(23,"mat-select",9),ue(24,T8,2,2,"mat-option",10,Ce),l()(),s(26,"div",11)(27,"span",12),it("click",function(){return mt(r),dt(a.addPaymentDetails())}),s(28,"mat-slide-toggle")(29,"div",13)(30,"span",14),c(31),p(32,"translate"),l()()()()(),M(33,P8,5,3,"mat-form-field"),M(34,A8,5,3,"mat-form-field"),M(35,M8,5,3,"mat-form-field"),M(36,O8,5,3,"mat-form-field"),M(37,I8,5,3,"mat-form-field"),s(38,"mat-card-actions",15)(39,"button",16),c(40),p(41,"translate"),l(),s(42,"button",17),c(43),p(44,"translate"),l()()()()()()}if(i&2){let r=Lt(11);o(2),x("formGroup",a.editTransactionForm),o(4),b(m(7,24,"labels.inputs.Transaction Date")),o(2),x("min",a.minDate)("max",a.maxDate)("matDatepicker",r),o(),x("for",r),o(3),O(a.editTransactionForm.controls.transactionDate.hasError("required")?12:-1),o(),x("currency",a.currency)("isRequired",!0)("inputFormControl",a.editTransactionForm.controls.transactionAmount)("inputLabel","Transaction Amount"),o(3),b(m(17,26,"labels.inputs.External Id")),o(5),b(m(22,28,"labels.inputs.Payment Type")),o(3),fe(a.paymentTypeOptions),o(5),x("className",a.showPaymentDetails?"enabled":"disabled"),o(2),b(m(32,30,"labels.inputs.Show Payment Details")),o(2),O(a.editTransactionForm.controls.accountNumber?33:-1),o(),O(a.editTransactionForm.controls.checkNumber?34:-1),o(),O(a.editTransactionForm.controls.routingCode?35:-1),o(),O(a.editTransactionForm.controls.receiptNumber?36:-1),o(),O(a.editTransactionForm.controls.bankNumber?37:-1),o(2),x("routerLink",Ut(36,D8)),o(),v(" ",m(41,32,"labels.buttons.Cancel")," "),o(2),x("disabled",!a.editTransactionForm.valid),o(),v(" ",m(44,34,"labels.buttons.Submit")," ")}},dependencies:[wt,Tt,Re,we,Mi,he,Ee,je,Le,Ne,ae,xe,Oe,ze,_e,ge,Ve,Je,Pe,In,On,tn,en,Qe,Wt,Ri,ja,Pt],styles:[".container[_ngcontent-%COMP%]{width:37rem;margin-top:3%;padding-bottom:2%}"]})}}return t})();var E8=()=>["../../../general"],f0=(()=>{class t{constructor(){this.sanitizer=A(Zl),this.route=A(Et),this.route.data.subscribe(e=>{this.transactionRecieptData=e.loansTransactionReciept})}ngOnInit(){let e=this.transactionRecieptData.headers.get("Content-Type"),i=new Blob([this.transactionRecieptData.body],{type:e}),a=URL.createObjectURL(i);this.pentahoUrl=this.sanitizer.bypassSecurityTrustResourceUrl(a)}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=Dt({type:t,selectors:[["mifosx-view-reciept"]],decls:7,vars:6,consts:[[1,"container"],[1,"back-button"],["type","button","color","primary","mat-raised-button","",3,"routerLink"],["icon","arrow-left",1,"m-r-10"],["frameborder","0","width","100%","height","600px;",3,"src"]],template:function(i,a){i&1&&(s(0,"mat-card",0)(1,"div",1)(2,"button",2),T(3,"fa-icon",3),c(4),p(5,"translate"),l()(),T(6,"iframe",4),l()),i&2&&(o(2),x("routerLink",Ut(5,E8)),o(2),v("",m(5,3,"labels.buttons.Back")," "),o(2),x("src",a.pentahoUrl,hp))},dependencies:[wt,Tt,ae,xe,Wt,un,Pt],styles:[".container[_ngcontent-%COMP%]{max-width:50rem}.container[_ngcontent-%COMP%] .back-button[_ngcontent-%COMP%]{max-height:2%;margin-bottom:2%}"]})}}return t})();var L8=()=>["../"];function N8(t,n){if(t&1&&T(0,"iframe",13),t&2){let e=P();x("src",e.pentahoUrl,hp)}}var h0=(()=>{class t{constructor(){this.sanitizer=A(Zl),this.reportsService=A(Ip),this.formBuilder=A(Te),this.dateUtils=A(de),this.route=A(Et),this.settingsService=A(oe),this.minDate=new Date(2e3,0,1),this.maxDate=new Date,this.hideOutput=!0,this.route.parent.parent.data.subscribe(e=>{this.loansAccountId=e.loanDetailsData.accountNo})}ngOnInit(){this.maxDate=this.settingsService.businessDate,this.createTransactionsReportForm()}createTransactionsReportForm(){this.transactionsReportForm=this.formBuilder.group({fromDate:["",Gt.required],toDate:[this.settingsService.businessDate,Gt.required]})}generate(){let e=this.settingsService.dateFormat,i={"output-type":"PDF",R_startDate:this.dateUtils.formatDate(this.transactionsReportForm.value.fromDate,e),R_endDate:this.dateUtils.formatDate(this.transactionsReportForm.value.toDate,e),R_selectLoan:this.loansAccountId};this.reportsService.getPentahoRunReportData("Client Loan Account Schedule",i,"default","en",e).subscribe(a=>{let r=a.headers.get("Content-Type"),u=new Blob([a.body],{type:r}),d=URL.createObjectURL(u);this.pentahoUrl=this.sanitizer.bypassSecurityTrustResourceUrl(d),this.hideOutput=!1})}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=Dt({type:t,selectors:[["mifosx-export-transactions"]],decls:41,vars:43,consts:[["fromDatePicker",""],["toDatePicker",""],[1,"layout-column","m-t-20",3,"ngSubmit","formGroup"],[1,"layout-row","layout-align-center","gap-3percent"],[1,"flex-fill",3,"click"],["matInput","","required","","formControlName","fromDate",3,"min","max","matDatepicker"],["matSuffix","",3,"for"],[1,"flex-fill","flex-30",3,"click"],["matInput","","required","","formControlName","toDate",3,"min","max","matDatepicker"],[1,"generate-button","layout-row","layout-xs-column","layout-align-center","gap-5percent"],["type","button","mat-raised-button","",3,"routerLink"],["mat-raised-button","","color","primary",3,"disabled"],["icon","cogs",1,"m-r-10"],["frameborder","0","width","100%","height","750px;",3,"src"]],template:function(i,a){if(i&1){let r=xt();s(0,"form",2),it("ngSubmit",function(){return mt(r),dt(a.generate())}),s(1,"div",3)(2,"mat-form-field",4),it("click",function(){mt(r);let d=Lt(9);return dt(d.open())}),s(3,"mat-label"),c(4),p(5,"translate"),l(),T(6,"input",5)(7,"mat-datepicker-toggle",6)(8,"mat-datepicker",null,0),s(10,"mat-error"),c(11),p(12,"translate"),p(13,"translate"),s(14,"strong"),c(15),p(16,"translate"),l()()(),s(17,"mat-form-field",7),it("click",function(){mt(r);let d=Lt(24);return dt(d.open())}),s(18,"mat-label"),c(19),p(20,"translate"),l(),T(21,"input",8)(22,"mat-datepicker-toggle",6)(23,"mat-datepicker",null,1),s(25,"mat-error"),c(26),p(27,"translate"),p(28,"translate"),s(29,"strong"),c(30),p(31,"translate"),l()()()(),s(32,"div",9)(33,"button",10),c(34),p(35,"translate"),l(),s(36,"button",11),T(37,"fa-icon",12),c(38),p(39,"translate"),l()()(),M(40,N8,1,1,"iframe",13)}if(i&2){let r=Lt(9),u=Lt(24);x("formGroup",a.transactionsReportForm),o(4),b(m(5,22,"labels.inputs.From Date")),o(2),x("min",a.minDate)("max",a.maxDate)("matDatepicker",r),o(),x("for",r),o(4),$t(" ",m(12,24,"labels.inputs.From date")," ",m(13,26,"labels.commons.is")," "),o(4),v(" ",m(16,28,"labels.commons.required")," "),o(4),b(m(20,30,"labels.inputs.To Date")),o(2),x("min",a.minDate)("max",a.maxDate)("matDatepicker",u),o(),x("for",u),o(4),$t(" ",m(27,32,"labels.inputs.To date")," ",m(28,34,"labels.commons.is")," "),o(4),v(" ",m(31,36,"labels.commons.required")," "),o(3),x("routerLink",Ut(42,L8)),o(),b(m(35,38,"labels.buttons.Cancel")),o(2),x("disabled",!a.transactionsReportForm.valid),o(2),v("",m(39,40,"labels.buttons.Generate Report")," \xA0 "),o(2),O(a.hideOutput?-1:40)}},dependencies:[wt,Tt,Re,we,he,Ee,je,Le,Ne,ae,_e,ge,Ve,Je,Pe,tn,en,Qe,Wt,un,Pt],styles:[".generate-button[_ngcontent-%COMP%]{max-height:2%;padding:1% 0 2% 6%;align-self:center}"]})}}return t})();var k8=t=>["../../",t,"general"];function F8(t,n){t&1&&(s(0,"th",12),c(1),p(2,"translate"),l()),t&2&&(o(),b(m(2,1,"labels.inputs.Loan Id")))}function R8(t,n){if(t&1&&(s(0,"td",13),c(1),l()),t&2){let e=n.$implicit;o(),v(" ",e.childLoanId," ")}}function B8(t,n){t&1&&(s(0,"th",12),c(1),p(2,"translate"),l()),t&2&&(o(),b(m(2,1,"labels.inputs.Client ID")))}function q8(t,n){if(t&1&&(s(0,"td",13),c(1),l()),t&2){let e=n.$implicit;o(),b(e.clientId)}}function j8(t,n){t&1&&(s(0,"th",12),c(1),p(2,"translate"),l()),t&2&&(o(),b(m(2,1,"labels.inputs.Client Name")))}function z8(t,n){if(t&1&&(s(0,"td",13),c(1),l()),t&2){let e=n.$implicit;o(),b(e.clientName)}}function V8(t,n){t&1&&(s(0,"th",12),c(1),p(2,"translate"),l()),t&2&&(o(),b(m(2,1,"labels.inputs.Loan Account Number")))}function U8(t,n){if(t&1&&(s(0,"td",13),c(1),l()),t&2){let e=n.$implicit;o(),b(e.childLoanAccountNo)}}function H8(t,n){t&1&&(s(0,"th",12),c(1),p(2,"translate"),l()),t&2&&(o(),b(m(2,1,"labels.inputs.Client Principal Loan")))}function G8(t,n){if(t&1&&(s(0,"td",13),c(1),l()),t&2){let e=n.$implicit;o(),b(e.childPrincipalAmount)}}function W8(t,n){t&1&&(s(0,"th",12),c(1),p(2,"translate"),l()),t&2&&(o(),b(m(2,1,"labels.inputs.Group Principal Loan")))}function $8(t,n){if(t&1&&(s(0,"td",13),c(1),l()),t&2){let e=n.$implicit;o(),b(e.parentPrincipalAmount)}}function Y8(t,n){t&1&&T(0,"tr",14)}function Z8(t,n){if(t&1&&T(0,"tr",15),t&2){let e=n.$implicit;x("routerLink",La(1,k8,e.childLoanId))}}var g0=(()=>{class t{constructor(){this.route=A(Et),this.dialog=A(Gn),this.displayedColumns=["loanId","clientId","clientName","loanAccountNumber","clientPrincipalLoan","groupPrincipalLoan"],this.route.data.subscribe(e=>{this.glimOverviewData=e.glimData})}ngOnInit(){this.setLoanClientChargeOverview()}setLoanClientChargeOverview(){this.dataSource=new Li(this.glimOverviewData)}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=Dt({type:t,selectors:[["mifosx-glim-account"]],viewQuery:function(i,a){if(i&1&&mi(Do,7),i&2){let r;di(r=ui())&&(a.paginator=r.first)}},decls:26,vars:6,consts:[[1,"loan-card"],["mat-table","",3,"dataSource"],["matColumnDef","loanId"],["mat-header-cell","",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","clientId"],["matColumnDef","clientName"],["matColumnDef","loanAccountNumber"],["matColumnDef","clientPrincipalLoan"],["matColumnDef","groupPrincipalLoan"],["mat-header-row","",4,"matHeaderRowDef"],["mat-row","",3,"routerLink",4,"matRowDef","matRowDefColumns"],["mat-header-cell",""],["mat-cell",""],["mat-header-row",""],["mat-row","",3,"routerLink"]],template:function(i,a){i&1&&(s(0,"mat-card",0)(1,"mat-card-content")(2,"h2"),c(3),p(4,"translate"),l(),s(5,"table",1),X(6,2),k(7,F8,3,3,"th",3)(8,R8,2,1,"td",4),Q(),X(9,5),k(10,B8,3,3,"th",3)(11,q8,2,1,"td",4),Q(),X(12,6),k(13,j8,3,3,"th",3)(14,z8,2,1,"td",4),Q(),X(15,7),k(16,V8,3,3,"th",3)(17,U8,2,1,"td",4),Q(),X(18,8),k(19,H8,3,3,"th",3)(20,G8,2,1,"td",4),Q(),X(21,9),k(22,W8,3,3,"th",3)(23,$8,2,1,"td",4),Q(),k(24,Y8,1,0,"tr",10)(25,Z8,1,3,"tr",11),l()()()),i&2&&(o(3),b(m(4,4,"labels.heading.GLIM Account Overview")),o(2),x("dataSource",a.dataSource),o(19),x("matHeaderRowDef",a.displayedColumns),o(),x("matRowDefColumns",a.displayedColumns))},dependencies:[wt,Tt,ae,xe,Oe,bn,yn,xn,Sn,vn,Dn,wn,Pn,Tn,An,Pt],styles:[".loan-card[_ngcontent-%COMP%]{margin:0 auto;max-width:80rem;width:90%;padding:0}.loan-card[_ngcontent-%COMP%] .header[_ngcontent-%COMP%]{padding:1%}.loan-card[_ngcontent-%COMP%] .header[_ngcontent-%COMP%] .header-title-group[_ngcontent-%COMP%] .loan-card-title[_ngcontent-%COMP%]{color:#fff;width:90%}.loan-card[_ngcontent-%COMP%] .header[_ngcontent-%COMP%] .header-title-group[_ngcontent-%COMP%] .loan-card-title[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{color:#fff}.loan-card[_ngcontent-%COMP%] .header[_ngcontent-%COMP%] .profile-image-container[_ngcontent-%COMP%]{margin:1%}.loan-card[_ngcontent-%COMP%] .header[_ngcontent-%COMP%] .profile-image-container[_ngcontent-%COMP%] .profile-image[_ngcontent-%COMP%]{object-fit:cover;border-radius:20px}.loan-card[_ngcontent-%COMP%] .header[_ngcontent-%COMP%] .loan-actions[_ngcontent-%COMP%]{align-self:flex-end;margin:0 1%}.loan-card[_ngcontent-%COMP%] .header[_ngcontent-%COMP%] .loan-span[_ngcontent-%COMP%]{margin:0 .5%}.loan-card[_ngcontent-%COMP%] .navigation-tabs[_ngcontent-%COMP%]{overflow:auto}.loans-overview[_ngcontent-%COMP%]{font-size:14px}"]})}}return t})();var K8=()=>["../","general"];function J8(t,n){if(t&1){let e=xt();s(0,"th",17)(1,"mat-checkbox",18),it("change",function(){mt(e);let a=P(2);return dt(a.toggleSelects())}),nc("ngModelChange",function(a){mt(e);let r=P(2);return ec(r.selectAllItems,a)||(r.selectAllItems=a),dt(a)}),l()()}if(t&2){let e=P(2);o(),tc("ngModel",e.selectAllItems)}}function X8(t,n){if(t&1){let e=xt();s(0,"td",19)(1,"mat-checkbox",18),it("change",function(){mt(e);let a=P(2);return dt(a.toggleSelect())}),nc("ngModelChange",function(a){let r=mt(e).$implicit;return ec(r.selected,a)||(r.selected=a),dt(a)}),l()()}if(t&2){let e=n.$implicit;o(),tc("ngModel",e.selected)}}function Q8(t,n){t&1&&(s(0,"th",17),c(1),p(2,"translate"),l()),t&2&&(o(),b(m(2,1,"labels.inputs.Client ID")))}function tL(t,n){if(t&1&&(s(0,"td",19),c(1),l()),t&2){let e=n.$implicit;o(),b(e.id)}}function eL(t,n){t&1&&(s(0,"th",17),c(1),p(2,"translate"),l()),t&2&&(o(),b(m(2,1,"labels.inputs.Client Name")))}function nL(t,n){if(t&1&&(s(0,"td",19),c(1),l()),t&2){let e=n.$implicit;o(),b(e.displayName)}}function iL(t,n){t&1&&(s(0,"th",17),c(1),p(2,"translate"),l()),t&2&&(o(),b(m(2,1,"labels.inputs.Loan Purpose")))}function aL(t,n){if(t&1&&(s(0,"mat-option",21),c(1),l()),t&2){let e=n.$implicit;x("value",e.id),o(),v(" ",e.name," ")}}function oL(t,n){if(t&1){let e=xt();s(0,"td",19)(1,"mat-form-field")(2,"mat-label"),c(3),p(4,"translate"),l(),s(5,"mat-select",20),nc("ngModelChange",function(a){let r=mt(e).$implicit;return ec(r.loanPurposeId,a)||(r.loanPurposeId=a),dt(a)}),ue(6,aL,2,2,"mat-option",21,Ce),l()()()}if(t&2){let e=n.$implicit,i=P(2);o(3),b(m(4,2,"labels.inputs.Select Purpose")),o(2),tc("ngModel",e.loanPurposeId),o(),fe(i.loanPurposeOptions)}}function rL(t,n){t&1&&(s(0,"th",17),c(1),p(2,"translate"),l()),t&2&&(o(),b(m(2,1,"labels.inputs.Original Loan")))}function lL(t,n){if(t&1){let e=xt();s(0,"td",19)(1,"mat-form-field")(2,"input",22),nc("ngModelChange",function(a){let r=mt(e).$implicit;return ec(r.principal,a)||(r.principal=a),dt(a)}),l()()()}if(t&2){let e=n.$implicit;o(2),tc("ngModel",e.principal)}}function sL(t,n){t&1&&T(0,"tr",23)}function cL(t,n){t&1&&T(0,"tr",24)}function pL(t,n){if(t&1&&(s(0,"div",0)(1,"table",7),X(2,8),k(3,J8,2,1,"th",9)(4,X8,2,1,"td",10),Q(),X(5,11),k(6,Q8,3,3,"th",9)(7,tL,2,1,"td",10),Q(),X(8,12),k(9,eL,3,3,"th",9)(10,nL,2,1,"td",10),Q(),X(11,13),k(12,iL,3,3,"th",9)(13,oL,8,4,"td",10),Q(),X(14,14),k(15,rL,3,3,"th",9)(16,lL,3,1,"td",10),Q(),k(17,sL,1,0,"tr",15)(18,cL,1,0,"tr",16),l()()),t&2){let e=P();o(),x("dataSource",e.dataSource),o(16),x("matHeaderRowDef",e.displayedColumn),o(),x("matRowDefColumns",e.displayedColumn)}}function mL(t,n){t&1&&(s(0,"button",6),c(1),p(2,"translate"),l()),t&2&&(x("routerLink",Ut(4,K8)),o(),v(" ",m(2,2,"labels.buttons.Cancel")," "))}var Ic=(()=>{class t{constructor(){this.route=A(Et),this.loanId=null,this.selectAllItems=!1,this.loanPurposeOptions=[],this.displayedColumn=["check","id","name","purpose","amount"],this.loanId=this.route.snapshot.params.loanId}ngOnInit(){this.dataSource=new Li(this.activeClientMembers)}get isValid(){return!this.activeClientMembers||this.selectedClientMembers?.selectedMembers?.reduce((e,i)=>e+(i.principal??0),0)>0}get selectedClientMembers(){return{selectedMembers:this.activeClientMembers.filter(e=>e.selected)}}toggleSelects(){for(let e of this.activeClientMembers)e.selected=this.selectAllItems}toggleSelect(){let e=this.activeClientMembers.length;this.selectAllItems=e===0?!1:this.activeClientMembers.filter(i=>i.selected).length===e}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=Dt({type:t,selectors:[["mifosx-loans-active-client-members"]],inputs:{activeClientMembers:"activeClientMembers",loansAccountFormValid:"loansAccountFormValid"},decls:11,vars:9,consts:[[1,"layout-row-wrap","gap-2percent","layout-xs-column"],[1,"layout-row","responsive-column","align-center","gap-2px","margin-t"],["mat-raised-button","","matStepperPrevious",""],["icon","arrow-left",1,"m-r-10"],["mat-raised-button","","matStepperNext","",3,"disabled"],["icon","arrow-right",1,"m-l-10"],["mat-raised-button","",3,"routerLink"],["mat-table","",1,"flex-98",3,"dataSource"],["matColumnDef","check"],["mat-header-cell","",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","id"],["matColumnDef","name"],["matColumnDef","purpose"],["matColumnDef","amount"],["mat-header-row","",4,"matHeaderRowDef"],["mat-row","",4,"matRowDef","matRowDefColumns"],["mat-header-cell",""],[3,"change","ngModelChange","ngModel"],["mat-cell",""],[3,"ngModelChange","ngModel"],[3,"value"],["type","number","matInput","",3,"ngModelChange","ngModel"],["mat-header-row",""],["mat-row",""]],template:function(i,a){i&1&&(M(0,pL,19,3,"div",0),s(1,"div",1)(2,"button",2),T(3,"fa-icon",3),c(4),p(5,"translate"),l(),s(6,"button",4),c(7),p(8,"translate"),T(9,"fa-icon",5),l(),M(10,mL,3,5,"button",6),l()),i&2&&(O(a.activeClientMembers?0:-1),o(4),v(" ",m(5,5,"labels.buttons.Previous")," "),o(2),x("disabled",!a.loansAccountFormValid),o(),v(" ",m(8,7,"labels.buttons.Next")," "),o(3),O(a.loanId?10:-1))},dependencies:[wt,Tt,we,Mi,he,ae,_e,ge,Pe,In,On,Wt,Da,bn,yn,xn,Sn,Hf,zf,vn,Dn,wn,Pn,Tn,An,za,un,mo,Pt],styles:["table[_ngcontent-%COMP%]{width:100%}.mat-elevation-z1[_ngcontent-%COMP%]{margin:1em 0 1.5em}.margin-t[_ngcontent-%COMP%]{margin-top:1em}h4[_ngcontent-%COMP%]{font-weight:500;margin:1em 0}h3[_ngcontent-%COMP%]{font-weight:500}mat-divider[_ngcontent-%COMP%]{margin:1em 0}.margin-v[_ngcontent-%COMP%]{margin:1em 0}.margin-b[_ngcontent-%COMP%]{margin:0 0 1em}.tableName[_ngcontent-%COMP%]{padding-left:2%}"]})}}return t})();var dL=["dtloan"];function uL(t,n){t&1&&T(0,"fa-icon",20)}function fL(t,n){t&1&&T(0,"fa-icon",20)}function hL(t,n){t&1&&T(0,"fa-icon",21)}function gL(t,n){t&1&&T(0,"fa-icon",22)}function _L(t,n){t&1&&T(0,"fa-icon",23)}function CL(t,n){t&1&&(c(0),p(1,"translate")),t&2&&b(m(1,1,"labels.inputs.DETAILS"))}function bL(t,n){t&1&&(c(0),p(1,"translate")),t&2&&b(m(1,1,"labels.inputs.TERMS"))}function vL(t,n){t&1&&(c(0),p(1,"translate")),t&2&&b(m(1,1,"labels.inputs.CHARGES"))}function xL(t,n){t&1&&(c(0),p(1,"translate")),t&2&&b(m(1,1,"labels.heading.Active Client Members"))}function yL(t,n){t&1&&(c(0),p(1,"translate")),t&2&&b(m(1,1,"labels.inputs.REPAYMENT SCHEDULE"))}function SL(t,n){if(t&1&&(s(0,"mat-step",18),k(1,yL,2,3,"ng-template",13),T(2,"mifosx-loans-account-schedule-step",24,3),l()),t&2){let e=P();o(2),x("loansAccountTemplate",e.loansAccountTemplate)("loansAccountProductTemplate",e.loansAccountProductTemplate)("loansAccount",e.loansAccount)("currencyCode",e.currencyCode)}}function DL(t,n){if(t&1&&c(0),t&2){let e=P().$implicit;b(e.registeredTableName)}}function wL(t,n){if(t&1&&(s(0,"mat-step"),k(1,DL,1,1,"ng-template",13),T(2,"mifosx-loans-account-datatable-step",25,4),l()),t&2){let e=n.$implicit;o(2),x("datatableData",e)}}function TL(t,n){t&1&&(c(0),p(1,"translate")),t&2&&b(m(1,1,"labels.inputs.PREVIEW"))}function PL(t,n){if(t&1){let e=xt();s(0,"mat-step",19),k(1,TL,2,3,"ng-template",13),s(2,"mifosx-loans-account-preview-step",26),it("submitEvent",function(){mt(e);let a=P();return dt(a.submit())}),l()()}if(t&2){let e=P();o(2),x("loansAccountTemplate",e.loansAccountTemplate)("loansAccountProductTemplate",e.loansAccountProductTemplate)("loansAccount",e.loansAccount)("activeClientMembers",e.activeClientMembers)}}var _0=(()=>{class t{constructor(){this.route=A(Et),this.router=A(le),this.loansService=A(Mt),this.settingsService=A(oe),this.clientService=A(ns),this.dateUtils=A(de),this.i18nService=A(Yf),this.loansAccountProductTemplate=null,this.datatables=[],this.route.data.subscribe(e=>{this.loansAccountTemplate=e.loansAccountTemplate,this.dataSource=e.groupsData.activeClientMembers})}setTemplate(e){this.loansAccountProductTemplate=e,this.currencyCode=this.loansAccountProductTemplate.currency.code;let i=this.loansAccountTemplate.clientId;i?this.clientService.getCollateralTemplate(i).subscribe(d=>{this.collateralOptions=d}):console.error("No collateral data requested from Fineract, collateral might misbehave");let a=this.loansAccountTemplate.clientId?this.loansAccountTemplate.clientId:this.loansAccountTemplate.group.id,r=!this.loansAccountTemplate.clientId,u=this.loansAccountProductTemplate.loanProductId;this.loansService.getLoansAccountTemplateResource(a,r,u).subscribe(d=>{this.multiDisburseLoan=d.multiDisburseLoan}),this.setDatatables()}setDatatables(){this.datatables=[],this.loansAccountProductTemplate.datatables&&this.loansAccountProductTemplate.datatables.forEach(e=>{this.datatables.push(e)})}get loansAccountDetailsForm(){return this.loansAccountDetailsStep.loansAccountDetailsForm}get loansAccountTermsForm(){return this.loansAccountTermsStep.loansAccountTermsForm}get activeClientMembers(){return this.dataSource}get loansAccountFormValid(){return this.loansAccountDetailsForm.valid&&this.loansAccountTermsForm.valid&&this.loansActiveClientMembers.isValid}get loanPrincipal(){return this.loansAccountTermsStep.loansAccountTermsForm.value.principal}get loansAccount(){return this.selectedMembers=this.loansActiveClientMembers.selectedClientMembers,ie(ie(ie(ie(ie({},this.loansAccountDetailsStep.loansAccountDetails),this.loansAccountTermsStep.loansAccountTerms),this.loansAccountChargesStep.loansAccountCharges),this.loansAccountTermsStep.loanCollateral),this.loansAccountTermsStep.disbursementData)}setData(e,i){let a=this.settingsService.language.code,r=this.settingsService.dateFormat,u=ve(ie({},this.loansAccount),{charges:(this.loansAccount.charges??[]).map(d=>{let g=d.chargeId??d.id;if(g==null)return null;let _={chargeId:g,amount:d.amount};return d.id&&d.id!==g&&(_.id=d.id),d.dueDate&&(_.dueDate=this.dateUtils.formatDate(d.dueDate,r)),d.feeInterval!==void 0&&(_.feeInterval=d.feeInterval),d.feeOnMonthDay!==void 0&&(_.feeOnMonthDay=d.feeOnMonthDay),_}).filter(Boolean),clientId:e.id,totalLoan:i,loanType:"glim",amortizationType:1,isParentAccount:!0,principal:e.principal,syncDisbursementWithMeeting:!1,expectedDisbursementDate:this.dateUtils.formatDate(this.loansAccount.expectedDisbursementDate,r),submittedOnDate:this.dateUtils.formatDate(this.loansAccount.submittedOnDate,r),dateFormat:r,locale:a});return u.groupId=this.loansAccountTemplate.group.id,delete u.principalAmount,delete u.allowPartialPeriodInterestCalculation,delete u.multiDisburseLoan,delete u.isFloatingInterestRate,JSON.stringify(u)}buildRequestData(){let e=[],i=this.selectedMembers?.selectedMembers??[],a=this.totalLoanAmount();for(let r=0;rNumber(r.id)));for(let r of e){let u=Number(r.id),d=Number(r.linkAccountOwnerId);if(r.linkAccountId&&r.linkAccountOwnerId&&d!==u){this.i18nService.translate("errors.linkedSavingsAccountOwnership").subscribe(g=>{this.notify({defaultUserMessage:g,errors:[]},{memberId:u})});return}if(!i.has(u)){this.i18nService.translate("errors.clientNotInGSIM",{id:u}).subscribe(g=>{this.notify({defaultUserMessage:g,errors:[]},{memberId:u})});return}}let a=this.buildRequestData();this.loansService.createGlimAccount(a).subscribe(r=>{let u=JSON.parse(r[0].body);u.glimId?this.router.navigate(["../",u.glimId],{relativeTo:this.route}):this.notify(u,{batchSize:a.length})})}notify(e,i){let a=[String(e?.defaultUserMessage??"")];if(Array.isArray(e?.errors))for(let r of e.errors)a.push(String(r?.developerMessage??""));i&&a.push(`Context: ${JSON.stringify(i)}`),console.error(a.join(" ").trim())}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=Dt({type:t,selectors:[["mifosx-create-glim-account"]],viewQuery:function(i,a){if(i&1&&(mi(Oo,7),mi(Io,7),mi(Eo,7),mi(Ic,7),mi(dL,5)),i&2){let r;di(r=ui())&&(a.loansAccountDetailsStep=r.first),di(r=ui())&&(a.loansAccountTermsStep=r.first),di(r=ui())&&(a.loansAccountChargesStep=r.first),di(r=ui())&&(a.loansActiveClientMembers=r.first),di(r=ui())&&(a.loanDatatables=r)}},decls:26,vars:16,consts:[["loansAccountStepper",""],["loanAccountTerms",""],["loanAccountCharges",""],["loanAccountSchedule",""],["dtloan",""],[1,"container"],["orientation","vertical","labelPosition","bottom",1,"mat-elevation-z8",3,"linear"],["matStepperIcon","number"],["matStepperIcon","edit"],["matStepperIcon","done"],["matStepperIcon","error"],["matStepperIcon","preview"],[3,"stepControl"],["matStepLabel",""],[3,"loansAccountProductTemplate","loansAccountTemplate"],[3,"loansAccountProductTemplate","loansAccountTemplate","collateralOptions","loansAccountFormValid","loanPrincipal"],[3,"loansAccountProductTemplate","loansAccountTemplate","loansAccountFormValid"],[3,"activeClientMembers","loansAccountFormValid"],["state","repayment","completed",""],["state","preview","completed",""],["icon","pencil-alt","size","sm"],["icon","check","size","sm"],["icon","exclamation-triangle","size","lg"],["icon","eye","size","sm"],[3,"loansAccountTemplate","loansAccountProductTemplate","loansAccount","currencyCode"],[3,"datatableData"],[3,"submitEvent","loansAccountTemplate","loansAccountProductTemplate","loansAccount","activeClientMembers"]],template:function(i,a){if(i&1){let r=xt();s(0,"div",5)(1,"mat-stepper",6,0),k(3,uL,1,0,"ng-template",7)(4,fL,1,0,"ng-template",8)(5,hL,1,0,"ng-template",9)(6,gL,1,0,"ng-template",10)(7,_L,1,0,"ng-template",11),s(8,"mat-step",12),k(9,CL,2,3,"ng-template",13),s(10,"mifosx-loans-account-details-step",14),it("loansAccountProductTemplate",function(d){return mt(r),dt(a.setTemplate(d))}),l()(),s(11,"mat-step",12),k(12,bL,2,3,"ng-template",13),T(13,"mifosx-loans-account-terms-step",15,1),l(),s(15,"mat-step"),k(16,vL,2,3,"ng-template",13),T(17,"mifosx-loans-account-charges-step",16,2),l(),s(19,"mat-step"),k(20,xL,2,3,"ng-template",13),T(21,"mifosx-loans-active-client-members",17),l(),M(22,SL,4,4,"mat-step",18),ue(23,wL,4,1,"mat-step",null,Ce),M(25,PL,3,4,"mat-step",19),l()()}i&2&&(o(),x("linear",!1),o(7),x("stepControl",a.loansAccountDetailsForm),o(2),x("loansAccountTemplate",a.loansAccountTemplate),o(),x("stepControl",a.loansAccountTermsForm),o(2),x("loansAccountProductTemplate",a.loansAccountProductTemplate)("loansAccountTemplate",a.loansAccountTemplate)("collateralOptions",a.collateralOptions)("loansAccountFormValid",a.loansAccountFormValid)("loanPrincipal",a.loanPrincipal),o(4),x("loansAccountProductTemplate",a.loansAccountProductTemplate)("loansAccountTemplate",a.loansAccountTemplate)("loansAccountFormValid",a.loansAccountFormValid),o(4),x("activeClientMembers",a.activeClientMembers)("loansAccountFormValid",a.loansAccountFormValid),o(),O(a.loansAccountFormValid?22:-1),o(),fe(a.datatables),o(2),O(a.loansAccountFormValid?25:-1))},dependencies:[wt,Tt,es,Ql,un,ts,Xl,Oo,Io,Eo,Ic,el,Ss,nl,Pt],encapsulation:2})}}return t})();function AL(t,n){t&1&&(s(0,"div",1),T(1,"mat-spinner",2),l())}function ML(t,n){t&1&&(s(0,"div",3),c(1),p(2,"translate"),l()),t&2&&(o(),v(" ",m(2,1,"labels.messages.No Data Found")," "))}function OL(t,n){t&1&&(s(0,"th",16),c(1),p(2,"translate"),l()),t&2&&(o(),b(m(2,1,"labels.heading.Date")))}function IL(t,n){if(t&1&&(s(0,"td",17),c(1),p(2,"dateFormat"),l()),t&2){let e=n.$implicit;o(),v(" ",m(2,1,e.buyDownFeeDate)," ")}}function EL(t,n){t&1&&(s(0,"th",16),c(1),p(2,"translate"),l()),t&2&&(o(),b(m(2,1,"labels.heading.Fee Amount")))}function LL(t,n){if(t&1&&(s(0,"td",18),c(1),p(2,"formatNumber"),l()),t&2){let e=n.$implicit;o(),v(" ",Ge(2,1,e.buyDownFeeAmount,"0.00")," ")}}function NL(t,n){t&1&&(s(0,"th",16),c(1),p(2,"translate"),l()),t&2&&(o(),b(m(2,1,"labels.heading.Amortized Amount")))}function kL(t,n){if(t&1&&(s(0,"td",18),c(1),p(2,"formatNumber"),l()),t&2){let e=n.$implicit;o(),v(" ",Ge(2,1,e.amortizedAmount,"0.00")," ")}}function FL(t,n){t&1&&(s(0,"th",16),c(1),p(2,"translate"),l()),t&2&&(o(),b(m(2,1,"labels.heading.Not Yet Amortized Amount")))}function RL(t,n){if(t&1&&(s(0,"td",18),c(1),p(2,"formatNumber"),l()),t&2){let e=n.$implicit;o(),v(" ",Ge(2,1,e.notYetAmortizedAmount,"0.00")," ")}}function BL(t,n){t&1&&(s(0,"th",16),c(1),p(2,"translate"),l()),t&2&&(o(),b(m(2,1,"labels.heading.Adjusted Amount")))}function qL(t,n){if(t&1&&(s(0,"td",18),c(1),p(2,"formatNumber"),l()),t&2){let e=n.$implicit;o(),v(" ",Ge(2,1,e.adjustedAmount,"0.00")," ")}}function jL(t,n){t&1&&(s(0,"th",16),c(1),p(2,"translate"),l()),t&2&&(o(),b(m(2,1,"labels.heading.Charged Off Amount")))}function zL(t,n){if(t&1&&(s(0,"td",18),c(1),p(2,"formatNumber"),l()),t&2){let e=n.$implicit;o(),v(" ",Ge(2,1,e.chargedOffAmount,"0.00")," ")}}function VL(t,n){t&1&&T(0,"tr",19)}function UL(t,n){t&1&&T(0,"tr",20)}function HL(t,n){if(t&1&&(s(0,"table",4),X(1,5),k(2,OL,3,3,"th",6)(3,IL,3,3,"td",7),Q(),X(4,8),k(5,EL,3,3,"th",6)(6,LL,3,4,"td",9),Q(),X(7,10),k(8,NL,3,3,"th",6)(9,kL,3,4,"td",9),Q(),X(10,11),k(11,FL,3,3,"th",6)(12,RL,3,4,"td",9),Q(),X(13,12),k(14,BL,3,3,"th",6)(15,qL,3,4,"td",9),Q(),X(16,13),k(17,jL,3,3,"th",6)(18,zL,3,4,"td",9),Q(),k(19,VL,1,0,"tr",14)(20,UL,1,0,"tr",15),l()),t&2){let e=P(2);x("dataSource",e.buyDownFeeData),o(19),x("matHeaderRowDef",e.buyDownFeeColumns),o(),x("matRowDefColumns",e.buyDownFeeColumns)}}function GL(t,n){if(t&1&&(s(0,"div"),M(1,ML,3,3,"div",3),M(2,HL,21,3,"table",4),l()),t&2){let e=P();o(),O(e.buyDownFeeData.length===0?1:-1),o(),O(e.buyDownFeeData.length>0?2:-1)}}var vg=(()=>{class t{constructor(){this.route=A(Et),this.loansService=A(Mt),this.buyDownFeeData=[],this.isLoading=!0,this.buyDownFeeColumns=["buyDownFeeDate","buyDownFeeAmount","amortizedAmount","notYetAmortizedAmount","adjustedAmount","chargedOffAmount"]}ngOnInit(){this.getLoanId(),this.loadBuyDownFees()}getLoanId(){if(this.route.snapshot.data&&this.route.snapshot.data.loanId){this.loanId=this.route.snapshot.data.loanId;return}let e=this.route;for(;e;){if(e.snapshot.paramMap.has("loanId")){this.loanId=e.snapshot.paramMap.get("loanId");return}if(e.parent)e=e.parent;else break}console.error("Could not find loanId in route parameters")}loadBuyDownFees(){if(!this.loanId){console.error("Cannot load buy down fees: loanId is undefined"),this.isLoading=!1;return}this.isLoading=!0,this.loansService.getBuyDownFeeData(this.loanId).subscribe({next:e=>{this.buyDownFeeData=e||[],this.isLoading=!1},error:e=>{console.error("Error loading buy down fees:",e),this.isLoading=!1}})}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=Dt({type:t,selectors:[["mifosx-loan-buy-down-fees-tab"]],decls:6,vars:5,consts:[[1,"container"],[1,"loading-indicator"],["diameter","30"],[1,"no-data"],["mat-table","",3,"dataSource"],["matColumnDef","buyDownFeeDate"],["mat-header-cell","",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","buyDownFeeAmount"],["mat-cell","","class","r-amount",4,"matCellDef"],["matColumnDef","amortizedAmount"],["matColumnDef","notYetAmortizedAmount"],["matColumnDef","adjustedAmount"],["matColumnDef","chargedOffAmount"],["mat-header-row","",4,"matHeaderRowDef"],["mat-row","",4,"matRowDef","matRowDefColumns"],["mat-header-cell",""],["mat-cell",""],["mat-cell","",1,"r-amount"],["mat-header-row",""],["mat-row",""]],template:function(i,a){i&1&&(s(0,"div",0)(1,"h3"),c(2),p(3,"translate"),l(),M(4,AL,2,0,"div",1),M(5,GL,3,2,"div"),l()),i&2&&(o(2),b(m(3,3,"labels.heading.Buy Down Fees")),o(2),O(a.isLoading?4:-1),o(),O(a.isLoading?-1:5))},dependencies:[wt,Tt,bn,yn,xn,Sn,vn,Dn,wn,Pn,Tn,An,En,Pt,hn],encapsulation:2})}}return t})();var il=(()=>{class t{constructor(){this.loansService=A(Mt)}resolve(e){let i=e.paramMap.get("loanId")||e.parent.paramMap.get("loanId");if(!isNaN(+i))return this.loansService.getLoanAccountAssociationDetails(i)}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275prov=sn({token:t,factory:t.\u0275fac})}}return t})();var yu=(()=>{class t{constructor(){this.loansService=A(Mt)}resolve(e){let i=e.paramMap.get("loanId")||e.parent.paramMap.get("loanId");return this.loansService.getLoanNotes(i)}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275prov=sn({token:t,factory:t.\u0275fac})}}return t})();var C0=(()=>{class t{constructor(){this.loansService=A(Mt)}resolve(){return this.loansService.getLoanDataTables()}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275prov=sn({token:t,factory:t.\u0275fac})}}return t})();var Su=(()=>{class t{constructor(){this.loansService=A(Mt)}resolve(e){let i=e.paramMap.get("loanId")||e.parent.parent.paramMap.get("loanId"),a=e.paramMap.get("datatableName");return this.loansService.getLoanDatatable(i,a)}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275prov=sn({token:t,factory:t.\u0275fac})}}return t})();var Du=(()=>{class t{constructor(){this.loansService=A(Mt)}resolve(e){let i=e.paramMap.get("loanId")||e.parent.paramMap.get("loanId"),a=e.paramMap.get("action");return a==="Assign Loan Officer"||a==="Change Loan Officer"?this.loansService.getLoanTemplate(i):a==="Make Repayment"?this.loansService.getLoanActionTemplate(i,"repayment"):a==="Goodwill Credit"?this.loansService.getLoanActionTemplate(i,"goodwillCredit"):a==="Interest Payment Waiver"?this.loansService.getLoanActionTemplate(i,"interestPaymentWaiver"):a==="Payout Refund"?this.loansService.getLoanActionTemplate(i,"payoutRefund"):a==="Merchant Issued Refund"?this.loansService.getLoanActionTemplate(i,"merchantIssuedRefund"):a==="Credit Balance Refund"?this.loansService.getLoanActionTemplate(i,"creditBalanceRefund"):a==="Waive Interest"?this.loansService.getLoanActionTemplate(i,"waiveinterest"):a==="Write Off"?this.loansService.getLoanActionTemplate(i,"writeoff"):a==="Close"?this.loansService.getLoanActionTemplate(i,"close"):a==="Close (as Rescheduled)"?this.loansService.getLoanActionTemplate(i,"close-rescheduled"):a==="Reschedule"?this.loansService.rescheduleLoanTemplate():a==="Prepay Loan"?this.loansService.getLoanPrepayLoanActionTemplate(i,null):a==="Add Collateral"?this.loansService.getLoanCollateralTemplate(i):a==="Disburse to Savings"?this.loansService.getLoanActionTemplate(i,"disburseToSavings"):a==="Recovery Payment"?this.loansService.getLoanActionTemplate(i,"recoverypayment"):a==="View Guarantors"?this.loansService.getLoanAccountResource(i,"guarantors"):a==="Create Guarantor"?this.loansService.getGuarantorTemplate(i):a==="Disburse"?this.loansService.getLoanActionTemplate(i,"disburse"):a==="Loan Screen Reports"?this.loansService.getLoanScreenReportsData():a==="Approve"?this.loansService.getLoanApprovalTemplate(i):a==="Add Loan Charge"?this.loansService.getLoanChargeTemplateResource(i):a==="Foreclosure"?this.loansService.getLoanForeclosureActionTemplate(i):a==="Charge-Off"?this.loansService.getLoanActionTemplate(i,"charge-off"):a==="Capitalized Income"?this.loansService.getLoanActionTemplate(i,"capitalizedIncome"):a==="Contract Termination"?this.loansService.getLoanActionTemplate(i,"contractTermination"):a==="Buy Down Fee"?this.loansService.getLoanActionTemplate(i,"buyDownFee"):a==="Re-Age"?this.loansService.getLoanActionTemplate(i,"reAge"):a==="Re-Amortize"?this.loansService.getLoanActionTemplate(i,"reAmortization"):void 0}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275prov=sn({token:t,factory:t.\u0275fac})}}return t})();var wu=(()=>{class t{constructor(){this.loansService=A(Mt)}resolve(e){let i=e.parent.parent.paramMap.get("clientId")||e.parent.parent.paramMap.get("groupId"),a=!!e.parent.parent.paramMap.get("groupId");return this.loansService.getLoansAccountTemplateResource(i,a)}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275prov=sn({token:t,factory:t.\u0275fac})}}return t})();var Tu=(()=>{class t{constructor(){this.loansService=A(Mt)}resolve(e){let i=e.paramMap.get("loanId")||e.parent.paramMap.get("loanId");return this.loansService.getLoanDocuments(i)}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275prov=sn({token:t,factory:t.\u0275fac})}}return t})();var b0=(()=>{class t{constructor(){this.loansService=A(Mt)}resolve(e){let i=e.paramMap.get("loanId")||e.parent.paramMap.get("loanId");return this.loansService.getLoansAccountAndTemplateResource(i)}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275prov=sn({token:t,factory:t.\u0275fac})}}return t})();var v0=(()=>{class t{constructor(){this.loansService=A(Mt)}resolve(e){let i=e.paramMap.get("loanId"),a=e.paramMap.get("id");return this.loansService.getLoansAccountCharge(i,a)}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275prov=sn({token:t,factory:t.\u0275fac})}}return t})();var Pu=(()=>{class t{constructor(){this.loansService=A(Mt)}resolve(e){let i=e.paramMap.get("loanId"),a=e.paramMap.get("id");return this.loansService.getLoansAccountTransaction(i,a)}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275prov=sn({token:t,factory:t.\u0275fac})}}return t})();var Au=(()=>{class t{constructor(){this.reportsService=A(Ip)}resolve(e){let a={"output-type":"PDF",R_transactionId:e.paramMap.get("id")};return this.reportsService.getPentahoRunReportData("Loan Transaction Receipt",a,"default","en","dd MMMM yyyy")}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275prov=sn({token:t,factory:t.\u0275fac})}}return t})();var Mu=(()=>{class t{constructor(){this.loansService=A(Mt)}resolve(e){let i=e.paramMap.get("loanId"),a=e.paramMap.get("id");return this.loansService.getLoansAccountTransactionTemplate(i,a)}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275prov=sn({token:t,factory:t.\u0275fac})}}return t})();var Ou=(()=>{class t{constructor(){this.loansService=A(Mt)}resolve(e){let i=e.paramMap.get("groupId"),a=e.paramMap.get("glimId");return this.loansService.getGLIMAccountData(a,i)}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275prov=sn({token:t,factory:t.\u0275fac})}}return t})();var Iu=(()=>{class t{constructor(){this.loansService=A(Mt)}resolve(e){let i=e.paramMap.get("groupId");return this.loansService.getGLIMLoanAccountTemplate(i)}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275prov=sn({token:t,factory:t.\u0275fac})}}return t})();var Eu=(()=>{class t{constructor(){this.loansService=A(Mt)}resolve(e){let i=e.paramMap.get("loanId")||e.parent.paramMap.get("loanId");return this.loansService.getDelinquencyTags(i)}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275prov=sn({token:t,factory:t.\u0275fac})}}return t})();var WL=t=>({data:t});function $L(t,n){t&1&&(s(0,"mat-error"),c(1),p(2,"translate"),p(3,"translate"),s(4,"strong"),c(5),p(6,"translate"),l()()),t&2&&(o(),$t(" ",m(2,3,"labels.inputs.Start Date")," ",m(3,5,"labels.commons.is")," "),o(4),b(m(6,7,"labels.commons.required")))}function YL(t,n){t&1&&(s(0,"mat-error"),c(1),p(2,"translate"),p(3,"translate"),s(4,"strong"),c(5),p(6,"translate"),l()()),t&2&&(o(),$t(" ",m(2,3,"labels.inputs.End Date")," ",m(3,5,"labels.commons.is")," "),o(4),b(m(6,7,"labels.commons.required")))}var x0=(()=>{class t{constructor(){this.dialogRef=A(Vo),this.data=A(Uo),this.formBuilder=A(Te),this.minDate=new Date(2e3,0,1),this.maxDate=new Date(2100,0,1),this.createDelinquencyActionForm()}createDelinquencyActionForm(){this.delinquencyActionForm=this.formBuilder.group({startDate:[new Date,Gt.required],endDate:["",Gt.required]})}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=Dt({type:t,selectors:[["mifosx-loan-delinquency-action-dialog"]],decls:29,vars:30,consts:[["validFromDatePicker",""],["validTillDatePicker",""],["mat-dialog-title",""],["mat-dialog-content","",1,"layout-column",3,"formGroup"],[1,"flex-48",3,"click"],["matInput","","required","","formControlName","startDate",3,"min","max","matDatepicker"],["matSuffix","",3,"for"],["matInput","","required","","formControlName","endDate",3,"min","max","matDatepicker"],[1,"layout-row","layout-xs-column","layout-align-center","gap-2percent"],["mat-raised-button","","mat-dialog-close",""],["mat-raised-button","","color","primary",3,"mat-dialog-close","disabled"]],template:function(i,a){if(i&1){let r=xt();s(0,"h2",2),c(1),p(2,"translate"),l(),s(3,"div",3)(4,"mat-form-field",4),it("click",function(){mt(r);let d=Lt(11);return dt(d.open())}),s(5,"mat-label"),c(6),p(7,"translate"),l(),T(8,"input",5)(9,"mat-datepicker-toggle",6)(10,"mat-datepicker",null,0),M(12,$L,7,9,"mat-error"),l(),s(13,"mat-form-field",4),it("click",function(){mt(r);let d=Lt(20);return dt(d.open())}),s(14,"mat-label"),c(15),p(16,"translate"),l(),T(17,"input",7)(18,"mat-datepicker-toggle",6)(19,"mat-datepicker",null,1),M(21,YL,7,9,"mat-error"),l()(),s(22,"mat-dialog-actions",8)(23,"button",9),c(24),p(25,"translate"),l(),s(26,"button",10),c(27),p(28,"translate"),l()()}if(i&2){let r=Lt(11),u=Lt(20);o(),b(m(2,18,"labels.heading.Loan Delinquency Actions")),o(2),x("formGroup",a.delinquencyActionForm),o(3),b(m(7,20,"labels.inputs.Start Date")),o(2),x("min",a.minDate)("max",a.maxDate)("matDatepicker",r),o(),x("for",r),o(3),O(a.delinquencyActionForm.controls.startDate.hasError("required")?12:-1),o(3),b(m(16,22,"labels.inputs.End Date")),o(2),x("min",a.delinquencyActionForm.value.startDate)("max",a.maxDate)("matDatepicker",u),o(),x("for",u),o(3),O(a.delinquencyActionForm.controls.endDate.hasError("required")?21:-1),o(3),b(m(25,24,"labels.buttons.Cancel")),o(2),x("mat-dialog-close",La(28,WL,a.delinquencyActionForm))("disabled",!a.delinquencyActionForm.valid||a.delinquencyActionForm.pristine),o(),v(" ",m(28,26,"labels.buttons.Submit")," ")}},dependencies:[wt,Tt,we,he,Ee,je,Le,Ne,_e,ge,Ve,Je,Pe,tn,en,Qe,Wt,Ur,Ho,Go,Kl,Pt],encapsulation:2})}}return t})();function ZL(t,n){t&1&&(s(0,"th",11),c(1),p(2,"translate"),l()),t&2&&(o(),b(m(2,1,"labels.inputs.Delinquency Classification")))}function KL(t,n){if(t&1&&(s(0,"span"),c(1),l()),t&2){let e=P().$implicit;o(),$t("( ",e.delinquencyRange.minimumAgeDays," - ",e.delinquencyRange.maximumAgeDays," )")}}function JL(t,n){if(t&1&&(s(0,"span"),c(1),l()),t&2){let e=P().$implicit;o(),v("( ",e.delinquencyRange.minimumAgeDays," )")}}function XL(t,n){if(t&1&&(s(0,"td",12),c(1),M(2,KL,2,2,"span"),M(3,JL,2,1,"span"),l()),t&2){let e=n.$implicit;o(),v(" ",e.delinquencyRange.classification," "),o(),O(e.delinquencyRange.maximumAgeDays?2:-1),o(),O(e.delinquencyRange.maximumAgeDays?-1:3)}}function QL(t,n){t&1&&(s(0,"th",11),c(1),p(2,"translate"),l()),t&2&&(o(),b(m(2,1,"labels.inputs.Added On")))}function tN(t,n){if(t&1&&(s(0,"span"),c(1),p(2,"dateFormat"),l()),t&2){let e=P().$implicit;o(),v(" ",m(2,1,e.addedOnDate)," ")}}function eN(t,n){if(t&1&&(s(0,"td",12),M(1,tN,3,3,"span"),l()),t&2){let e=n.$implicit;o(),O(e.addedOnDate?1:-1)}}function nN(t,n){t&1&&(s(0,"th",11),c(1),p(2,"translate"),l()),t&2&&(o(),b(m(2,1,"labels.inputs.Lifted On")))}function iN(t,n){if(t&1&&(s(0,"span"),c(1),p(2,"dateFormat"),l()),t&2){let e=P().$implicit;o(),v(" ",m(2,1,e.liftedOnDate)," ")}}function aN(t,n){if(t&1&&(s(0,"td",12),M(1,iN,3,3,"span"),l()),t&2){let e=n.$implicit;o(),O(e.liftedOnDate?1:-1)}}function oN(t,n){t&1&&T(0,"tr",13)}function rN(t,n){t&1&&T(0,"tr",14)}function lN(t,n){if(t&1&&(s(0,"table",1),X(1,4),k(2,ZL,3,3,"th",5)(3,XL,4,3,"td",6),Q(),X(4,7),k(5,QL,3,3,"th",5)(6,eN,2,1,"td",6),Q(),X(7,8),k(8,nN,3,3,"th",5)(9,aN,2,1,"td",6),Q(),k(10,oN,1,0,"tr",9)(11,rN,1,0,"tr",10),l()),t&2){let e=P();x("dataSource",e.loanDelinquencyTags),o(10),x("matHeaderRowDef",e.loanDelinquencyTagsColumns),o(),x("matRowDefColumns",e.loanDelinquencyTagsColumns)}}function sN(t,n){t&1&&(s(0,"th",11),c(1),p(2,"translate"),l()),t&2&&(o(),b(m(2,1,"labels.inputs.Delinquency Classification")))}function cN(t,n){if(t&1&&(s(0,"td",12),c(1),l()),t&2){let e=n.$implicit;o(),b(e.classification)}}function pN(t,n){t&1&&(s(0,"th",11),c(1),p(2,"translate"),l()),t&2&&(o(),b(m(2,1,"labels.inputs.Days")))}function mN(t,n){if(t&1&&(s(0,"td",12),c(1),p(2,"formatNumber"),l()),t&2){let e=n.$implicit;o(),b(m(2,1,e.minimumAgeDays))}}function dN(t,n){t&1&&(s(0,"th",11),c(1),p(2,"translate"),l()),t&2&&(o(),b(m(2,1,"labels.inputs.Amount")))}function uN(t,n){if(t&1&&(s(0,"td",12),c(1),p(2,"currency"),l()),t&2){let e=n.$implicit,i=P(2);o(),v(" ",Ye(2,1,e.delinquentAmount,i.currency.code,"symbol-narrow","1.2-2")," ")}}function fN(t,n){t&1&&T(0,"tr",13)}function hN(t,n){t&1&&T(0,"tr",14)}function gN(t,n){if(t&1&&(s(0,"div")(1,"h3"),c(2),p(3,"translate"),l(),s(4,"table",1),X(5,4),k(6,sN,3,3,"th",5)(7,cN,2,1,"td",6),Q(),X(8,15),k(9,pN,3,3,"th",5)(10,mN,3,3,"td",6),Q(),X(11,16),k(12,dN,3,3,"th",5)(13,uN,3,6,"td",6),Q(),k(14,fN,1,0,"tr",9)(15,hN,1,0,"tr",10),l()()),t&2){let e=P();o(2),b(m(3,4,"labels.heading.Loan Delinquency Installment Tags")),o(2),x("dataSource",e.installmentLevelDelinquency),o(10),x("matHeaderRowDef",e.installmentDelinquencyTagsColumns),o(),x("matRowDefColumns",e.installmentDelinquencyTagsColumns)}}function _N(t,n){if(t&1){let e=xt();s(0,"button",18),it("click",function(){mt(e);let a=P(2);return dt(a.createDelinquencyAction())}),T(1,"fa-icon",19),c(2),p(3,"translate"),l()}t&2&&(o(2),v("",m(3,1,"labels.buttons.Pause Delinquency Classification")," "))}function CN(t,n){t&1&&(s(0,"div",2),k(1,_N,4,3,"button",17),l()),t&2&&(o(),x("mifosxHasPermission","CREATE_DELINQUENCY_ACTION"))}function bN(t,n){t&1&&(s(0,"th",11),c(1),p(2,"translate"),l()),t&2&&(o(),b(m(2,1,"labels.inputs.Action")))}function vN(t,n){if(t&1&&(s(0,"td",26),c(1),l()),t&2){let e=n.$implicit,i=P(2);x("ngClass",ce(i.actionClass(e.action))),o(),b(e.action)}}function xN(t,n){t&1&&(s(0,"th",11),c(1),p(2,"translate"),l()),t&2&&(o(),b(m(2,1,"labels.inputs.Start Date")))}function yN(t,n){if(t&1&&(s(0,"td",12),c(1),p(2,"dateFormat"),l()),t&2){let e=n.$implicit;o(),b(m(2,1,e.startDate))}}function SN(t,n){t&1&&(s(0,"th",11),c(1),p(2,"translate"),l()),t&2&&(o(),b(m(2,1,"labels.inputs.End Date")))}function DN(t,n){if(t&1&&(s(0,"td",12),c(1),p(2,"dateFormat"),l()),t&2){let e=n.$implicit;o(),b(m(2,1,e.endDate))}}function wN(t,n){t&1&&(s(0,"th",11),c(1),p(2,"translate"),l()),t&2&&(o(),b(m(2,1,"labels.inputs.Created On")))}function TN(t,n){if(t&1&&(s(0,"td",12),c(1),p(2,"datetimeFormat"),l()),t&2){let e=n.$implicit;o(),b(m(2,1,e.createdOn))}}function PN(t,n){t&1&&(s(0,"th",11),c(1),p(2,"translate"),l()),t&2&&(o(),b(m(2,1,"labels.inputs.Actions")))}function AN(t,n){if(t&1){let e=xt();s(0,"button",28),p(1,"translate"),it("click",function(){mt(e);let a=P(2).$implicit,r=P(2);return dt(r.resumeDelinquencyClassification(a))}),T(2,"fa-icon",29),l()}t&2&&x("matTooltip",ce(m(1,2,"tooltips.Resume Delinquency Classification")))}function MN(t,n){t&1&&(s(0,"span"),k(1,AN,3,4,"button",27),l()),t&2&&(o(),x("mifosxHasPermission","CREATE_DELINQUENCY_ACTION"))}function ON(t,n){if(t&1&&(s(0,"td",12),M(1,MN,2,1,"span"),l()),t&2){let e=n.$implicit,i=P(2);o(),O(i.isCurrentAndPauseAction(e)?1:-1)}}function IN(t,n){t&1&&T(0,"tr",13)}function EN(t,n){t&1&&T(0,"tr",14)}function LN(t,n){if(t&1&&(s(0,"div",3)(1,"h3"),c(2),p(3,"translate"),l(),s(4,"table",1),X(5,20),k(6,bN,3,3,"th",5)(7,vN,2,3,"td",21),Q(),X(8,22),k(9,xN,3,3,"th",5)(10,yN,3,3,"td",6),Q(),X(11,23),k(12,SN,3,3,"th",5)(13,DN,3,3,"td",6),Q(),X(14,24),k(15,wN,3,3,"th",5)(16,TN,3,3,"td",6),Q(),X(17,25),k(18,PN,3,3,"th",5)(19,ON,2,1,"td",6),Q(),k(20,IN,1,0,"tr",9)(21,EN,1,0,"tr",10),l()()),t&2){let e=P();o(2),b(m(3,4,"labels.heading.Loan Delinquency Actions")),o(2),x("dataSource",e.loanDelinquencyActions),o(16),x("matHeaderRowDef",e.loanDelinquencyActionsColumns),o(),x("matRowDefColumns",e.loanDelinquencyActionsColumns)}}var y0=(()=>{class t{constructor(){this.route=A(Et),this.loansServices=A(Mt),this.dateUtils=A(de),this.settingsService=A(oe),this.translateService=A(pa),this.dialog=A(Gn),this.loanDelinquencyTags=[],this.loanDelinquencyActions=[],this.installmentLevelDelinquency=[],this.loanDelinquencyTagsColumns=["classification","addedOn","liftedOn"],this.loanDelinquencyActionsColumns=["action","startDate","endDate","createdOn","actions"],this.installmentDelinquencyTagsColumns=["classification","minimumAgeDays","amount"],this.allowPause=!0,this.loanId=this.route.parent.parent.snapshot.params.loanId,this.route.parent.data.subscribe(e=>{this.loanDelinquencyTags=e.loanDelinquencyTagsData,this.loanDelinquencyActions=e.loanDelinquencyActions||[],this.validateDelinquencyActions();let i=e.loanDelinquencyData.delinquent||null;this.currency=e.loanDelinquencyData.currency,this.installmentLevelDelinquency=[],i!=null&&(this.installmentLevelDelinquency=i.installmentLevelDelinquency||[])})}ngOnInit(){this.locale=this.settingsService.language.code,this.dateFormat=this.settingsService.dateFormat,this.currentLoanDelinquencyAction=null,this.validateDelinquencyActions()}validateDelinquencyActions(){if(this.loanDelinquencyActions.length>0){let e=this.settingsService.businessDate;this.currentLoanDelinquencyAction=this.loanDelinquencyActions[this.loanDelinquencyActions.length-1],this.allowPause=this.currentLoanDelinquencyAction.action==="RESUME"}}createDelinquencyAction(){let e="pause";this.dialog.open(x0,{data:{action:e}}).afterClosed().subscribe(a=>{let r=a.data.value.startDate,u=a.data.value.endDate;this.sendDelinquencyAction(e,r,u)})}resumeDelinquencyClassification(e){this.dialog.open(ma,{data:{heading:this.translateService.instant("labels.heading.Loan Delinquency Classification"),dialogContext:this.translateService.instant("labels.dialogContext.Are you sure you want resume the Delinquency Classification for Loan")+this.loanId,type:"Mild"}}).afterClosed().subscribe(a=>{a.confirm&&this.sendDelinquencyAction("resume",new Date,null)})}sendDelinquencyAction(e,i,a){let r={action:e,locale:this.locale,dateFormat:this.dateFormat,startDate:this.dateUtils.formatDate(i,this.dateFormat)};e==="pause"&&(r={action:e,locale:this.locale,dateFormat:this.dateFormat,startDate:this.dateUtils.formatDate(i,this.dateFormat),endDate:this.dateUtils.formatDate(a,this.dateFormat)}),this.loansServices.createDelinquencyActions(this.loanId,r).subscribe(u=>{this.loansServices.getDelinquencyActions(this.loanId).subscribe(d=>{this.loanDelinquencyActions=d,this.validateDelinquencyActions()})})}isCurrentAndPauseAction(e){if(this.currentLoanDelinquencyAction!=null&&this.currentLoanDelinquencyAction.id===e.id&&e.action==="PAUSE"){let i=this.settingsService.businessDate,a=this.dateUtils.parseDate(e.startDate);if(ir)return this.allowPause=!0,!1}return!0}return!1}actionClass(e){return e==="PAUSE"?"status-pending":"status-active"}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=Dt({type:t,selectors:[["mifosx-loan-delinquency-tags-tab"]],decls:8,vars:7,consts:[[1,"container"],["mat-table","",3,"dataSource"],[1,"layout-row","m-t-20","m-b-10","align-end","align-items-center"],[1,"m-t-10"],["matColumnDef","classification"],["mat-header-cell","",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","addedOn"],["matColumnDef","liftedOn"],["mat-header-row","",4,"matHeaderRowDef"],["mat-row","",4,"matRowDef","matRowDefColumns"],["mat-header-cell",""],["mat-cell",""],["mat-header-row",""],["mat-row",""],["matColumnDef","minimumAgeDays"],["matColumnDef","amount"],["mat-raised-button","","color","primary",3,"click",4,"mifosxHasPermission"],["mat-raised-button","","color","primary",3,"click"],["icon","pause",1,"m-r-10"],["matColumnDef","action"],["mat-cell","",3,"ngClass",4,"matCellDef"],["matColumnDef","startDate"],["matColumnDef","endDate"],["matColumnDef","createdOn"],["matColumnDef","actions"],["mat-cell","",3,"ngClass"],["mat-button","","color","primary",3,"matTooltip","click",4,"mifosxHasPermission"],["mat-button","","color","primary",3,"click","matTooltip"],["icon","play",1,"m-r-10"]],template:function(i,a){i&1&&(s(0,"div",0)(1,"h3"),c(2),p(3,"translate"),l(),M(4,lN,12,3,"table",1),M(5,gN,16,6,"div"),M(6,CN,2,1,"div",2),M(7,LN,22,6,"div",3),l()),i&2&&(o(2),b(m(3,5,"labels.heading.Loan Delinquency Tags")),o(2),O(a.loanDelinquencyTags.length>0?4:-1),o(),O(a.installmentLevelDelinquency.length>0?5:-1),o(),O(a.allowPause?6:-1),o(),O(a.loanDelinquencyActions.length>0?7:-1))},dependencies:[wt,ca,Tt,Wt,Ae,bn,yn,xn,Sn,vn,Dn,wn,Pn,Tn,An,un,Oi,Sa,En,Pt,o1,hn],styles:["table[_ngcontent-%COMP%]{width:100%}.container[_ngcontent-%COMP%]{padding-top:1%;padding-bottom:2%}.container[_ngcontent-%COMP%] .delete-button[_ngcontent-%COMP%]{margin-left:1%}"]})}}return t})();var xg=(()=>{class t{constructor(){this.loansService=A(Mt)}resolve(e){let i=e.paramMap.get("loanId")||e.parent.paramMap.get("loanId");return this.loansService.loanRescheduleRequests(i)}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275prov=sn({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();var NN=()=>["../actions/Reschedule"];function kN(t,n){t&1&&(s(0,"th",13),c(1,"#"),l())}function FN(t,n){if(t&1&&(s(0,"td",14),c(1),l()),t&2){let e=n.$implicit;o(),b(e.id)}}function RN(t,n){t&1&&(s(0,"th",13),c(1),p(2,"translate"),l()),t&2&&(o(),b(m(2,1,"labels.inputs.Status")))}function BN(t,n){if(t&1&&(s(0,"td",14)(1,"div",15),p(2,"statusLookup"),T(3,"fa-icon",16),s(4,"span",17),c(5),p(6,"translate"),l()()()),t&2){let e=n.$implicit;o(),x("ngClass",m(2,2,e.statusEnum.code)),o(4),v(" ",m(6,4,e.statusEnum.value)," ")}}function qN(t,n){t&1&&(s(0,"th",13),c(1),p(2,"translate"),l()),t&2&&(o(),b(m(2,1,"labels.inputs.From Date")))}function jN(t,n){if(t&1&&(s(0,"td",14),c(1),p(2,"dateFormat"),l()),t&2){let e=n.$implicit;o(),v(" ",m(2,1,e.rescheduleFromDate)," ")}}function zN(t,n){t&1&&(s(0,"th",13),c(1),p(2,"translate"),l()),t&2&&(o(),b(m(2,1,"labels.inputs.Reason")))}function VN(t,n){if(t&1&&(s(0,"td",14),c(1),l()),t&2){let e=n.$implicit;o(),v(" ",e.rescheduleReasonCodeValue.name," ")}}function UN(t,n){t&1&&(s(0,"th",13),c(1),p(2,"translate"),l()),t&2&&(o(),b(m(2,1,"labels.inputs.Actions")))}function HN(t,n){if(t&1){let e=xt();s(0,"span")(1,"button",18),p(2,"translate"),it("click",function(){mt(e);let a=P().$implicit,r=P();return dt(r.manageRequest(a,"Reject"))}),T(3,"fa-icon",19),l(),s(4,"button",20),p(5,"translate"),it("click",function(){mt(e);let a=P().$implicit,r=P();return dt(r.manageRequest(a,"Approve"))}),T(6,"fa-icon",21),l()()}t&2&&(o(),x("matTooltip",ce(m(2,4,"tooltips.Reject Reschedule"))),o(3),x("matTooltip",ce(m(5,6,"tooltips.Approve Reschedule"))))}function GN(t,n){if(t&1&&(s(0,"td",14),M(1,HN,7,8,"span"),l()),t&2){let e=n.$implicit;o(),O(e.statusEnum.pendingApproval?1:-1)}}function WN(t,n){t&1&&T(0,"tr",22)}function $N(t,n){t&1&&T(0,"tr",23)}var S0=(()=>{class t{constructor(){this.route=A(Et),this.router=A(le),this.loansServices=A(Mt),this.settingsService=A(oe),this.dateUtils=A(de),this.translateService=A(pa),this.dialog=A(Gn),this.loanRescheduleDataColumns=["id","rescheduleFromDate","reason","status","actions"],this.clientId=this.route.parent.parent.snapshot.paramMap.get("clientId"),this.route.parent.data.subscribe(e=>{this.loanRescheduleData=e.loanRescheduleData})}manageRequest(e,i){this.dialog.open(ma,{data:{heading:`${i}`+this.translateService.instant("labels.heading.Loan Reschedule"),dialogContext:this.translateService.instant("labels.dialogContext.Are you sure you want")+`${i}`+this.translateService.instant("labels.dialogContext.the Loan Reschedule")+`${e.id}`}}).afterClosed().subscribe(r=>{if(r.confirm){let u=this.settingsService.language.code,d=this.settingsService.dateFormat,g={dateFormat:d,locale:u};i==="Approve"?g.approvedOnDate=this.dateUtils.formatDate(this.settingsService.businessDate,d):g.rejectedOnDate=this.dateUtils.formatDate(this.settingsService.businessDate,d),this.loansServices.applyCommandLoanRescheduleRequests(e.id,i.toLowerCase(),g).subscribe(_=>{this.reload()})}})}reload(){let e=this.router.url;this.router.navigateByUrl(`/clients/${this.clientId}/loans-accounts`,{skipLocationChange:!0}).then(()=>this.router.navigate([e]))}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=Dt({type:t,selectors:[["mifosx-reschedule-loan-tab"]],inputs:{loanStatus:"loanStatus"},decls:23,vars:8,consts:[[1,"container"],[1,"layout-row","gap-20px","align-end","align-items-center","action-buttons"],["mat-raised-button","","color","primary",3,"routerLink"],["mat-table","",3,"dataSource"],["matColumnDef","id"],["mat-header-cell","",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","status"],["matColumnDef","rescheduleFromDate"],["matColumnDef","reason"],["matColumnDef","actions"],["mat-header-row","",4,"matHeaderRowDef"],["mat-row","",4,"matRowDef","matRowDefColumns"],["mat-header-cell",""],["mat-cell",""],[3,"ngClass"],["icon","stop"],[1,"m-l-10","status"],["mat-raised-button","","color","warn","matTooltipPosition","left",1,"action-button",3,"click","matTooltip"],["icon","trash"],["mat-raised-button","","color","primary","matTooltipPosition","right",1,"action-button",3,"click","matTooltip"],["icon","check"],["mat-header-row",""],["mat-row",""]],template:function(i,a){i&1&&(s(0,"div",0)(1,"div",1)(2,"button",2),c(3),p(4,"translate"),l()(),s(5,"table",3),X(6,4),k(7,kN,2,0,"th",5)(8,FN,2,1,"td",6),Q(),X(9,7),k(10,RN,3,3,"th",5)(11,BN,7,6,"td",6),Q(),X(12,8),k(13,qN,3,3,"th",5)(14,jN,3,3,"td",6),Q(),X(15,9),k(16,zN,3,3,"th",5)(17,VN,2,1,"td",6),Q(),X(18,10),k(19,UN,3,3,"th",5)(20,GN,2,1,"td",6),Q(),k(21,WN,1,0,"tr",11)(22,$N,1,0,"tr",12),l()()),i&2&&(o(2),x("routerLink",Ut(7,NN)),o(),v(" ",m(4,5,"labels.buttons.Reschedule")," "),o(2),x("dataSource",a.loanRescheduleData),o(16),x("matHeaderRowDef",a.loanRescheduleDataColumns),o(),x("matRowDefColumns",a.loanRescheduleDataColumns))},dependencies:[wt,ca,Tt,ae,Wt,bn,yn,xn,Sn,vn,Dn,un,Oi,wn,Pn,Tn,An,En,Pt,Ap],styles:["table[_ngcontent-%COMP%]{width:100%}table[_ngcontent-%COMP%] .action-button[_ngcontent-%COMP%]{min-width:26px;padding:0 0 3px;margin:0 2%;line-height:25px}.container[_ngcontent-%COMP%]{padding-top:1%;padding-bottom:2%}.container[_ngcontent-%COMP%] .action-buttons[_ngcontent-%COMP%]{padding-bottom:1rem;padding-top:1rem}"]})}}return t})();var YN=()=>["../.."];function ZN(t,n){t&1&&(s(0,"mat-error"),c(1),p(2,"translate"),p(3,"translate"),s(4,"strong"),c(5),p(6,"translate"),l()()),t&2&&(o(),$t(" ",m(2,3,"labels.inputs.Amount")," ",m(3,5,"labels.commons.is")," "),o(4),b(m(6,7,"labels.commons.required")))}function KN(t,n){if(t&1&&(s(0,"mat-option",9),c(1),l()),t&2){let e=n.$implicit;x("value",e.id),o(),v(" ",e.name," ")}}function JN(t,n){t&1&&(s(0,"mat-form-field")(1,"mat-label"),c(2),p(3,"translate"),l(),T(4,"input",18),l(),s(5,"mat-form-field")(6,"mat-label"),c(7),p(8,"translate"),l(),T(9,"input",19),l(),s(10,"mat-form-field")(11,"mat-label"),c(12),p(13,"translate"),l(),T(14,"input",20),l(),s(15,"mat-form-field")(16,"mat-label"),c(17),p(18,"translate"),l(),T(19,"input",21),l(),s(20,"mat-form-field")(21,"mat-label"),c(22),p(23,"translate"),l(),T(24,"input",22),l()),t&2&&(o(2),v(" ",m(3,5,"labels.inputs.Account")," #"),o(5),v("",m(8,7,"labels.inputs.Cheque")," #"),o(5),b(m(13,9,"labels.inputs.Routing Code")),o(5),v("",m(18,11,"labels.inputs.Reciept")," #"),o(5),v("",m(23,13,"labels.inputs.Bank")," #"))}function XN(t,n){if(t&1&&(s(0,"button",23),c(1),p(2,"translate"),l()),t&2){let e=P();x("disabled",!e.adjustLoanChargeForm.valid),o(),v(" ",m(2,2,"labels.buttons.Submit")," ")}}var D0=(()=>{class t{constructor(){this.formBuilder=A(Te),this.loanService=A(Mt),this.route=A(Et),this.router=A(le),this.settingsService=A(oe),this.organizationService=A(Op),this.paymentTypes=[],this.chargeData=[],this.loanDetailsData=[],this.showPaymentDetails=!1,this.minDate=new Date(2e3,0,1),this.maxDate=new Date,this.loanId=this.route.snapshot.params.loanId,this.chargeId=this.route.snapshot.params.id,this.route.data.subscribe(e=>{this.chargeData=e.loansAccountCharge,this.loanDetailsData=e.loanDetailsData})}ngOnInit(){this.maxDate=this.settingsService.maxAllowedDate,this.createAdjustLoanChargeForm(),this.setRepaymentLoanDetails()}createAdjustLoanChargeForm(){this.adjustLoanChargeForm=this.formBuilder.group({amount:[this.chargeData.amount,Gt.required],externalId:"",paymentTypeId:"",note:""})}setRepaymentLoanDetails(){this.organizationService.getPaymentTypes().subscribe(e=>{this.paymentTypes=e})}addPaymentDetails(){this.showPaymentDetails=!this.showPaymentDetails,this.showPaymentDetails?(this.adjustLoanChargeForm.addControl("accountNumber",new pe("")),this.adjustLoanChargeForm.addControl("checkNumber",new pe("")),this.adjustLoanChargeForm.addControl("routingCode",new pe("")),this.adjustLoanChargeForm.addControl("receiptNumber",new pe("")),this.adjustLoanChargeForm.addControl("bankNumber",new pe(""))):(this.adjustLoanChargeForm.removeControl("accountNumber"),this.adjustLoanChargeForm.removeControl("checkNumber"),this.adjustLoanChargeForm.removeControl("routingCode"),this.adjustLoanChargeForm.removeControl("receiptNumber"),this.adjustLoanChargeForm.removeControl("bankNumber"))}submit(){let e=this.adjustLoanChargeForm.value,i=this.settingsService.language.code,a=ve(ie({},e),{locale:i});this.loanService.executeLoansAccountChargesCommand(this.loanId,"adjustment",a,this.chargeId).subscribe(u=>{this.router.navigate(["../.."],{relativeTo:this.route})})}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=Dt({type:t,selectors:[["mifosx-adjust-loan-charge"]],decls:44,vars:26,consts:[[1,"container","mat-elevation-z8"],[3,"ngSubmit","formGroup"],[1,"layout-column"],["appearance","fill"],["matTextSuffix","",1,"m-l-10"],[1,"flex-auto"],["type","number","matInput","","required","","formControlName","amount",1,"right-input"],["matInput","","formControlName","externalId"],["formControlName","paymentTypeId"],[3,"value"],[1,"flex-fill"],[1,"expandcollapsebutton","m-l-10","m-t-40","flex-75",3,"click"],[3,"className"],[1,"m-l-10"],["matInput","","formControlName","note","cdkTextareaAutosize","","cdkAutosizeMinRows","2"],[1,"layout-row","align-center","gap-5px","responsive-column"],["type","button","mat-raised-button","",3,"routerLink"],["mat-raised-button","","color","primary",3,"disabled",4,"mifosxHasPermission"],["matInput","","formControlName","accountNumber"],["matInput","","formControlName","checkNumber"],["matInput","","formControlName","routingCode"],["matInput","","formControlName","receiptNumber"],["matInput","","formControlName","bankNumber"],["mat-raised-button","","color","primary",3,"disabled"]],template:function(i,a){i&1&&(s(0,"div",0)(1,"mat-card")(2,"form",1),it("ngSubmit",function(){return a.submit()}),s(3,"mat-card-content")(4,"div",2)(5,"mat-form-field",3)(6,"mat-label"),c(7),p(8,"translate"),l(),s(9,"span",4),c(10),l(),T(11,"span",5)(12,"input",6),M(13,ZN,7,9,"mat-error"),l(),s(14,"mat-form-field")(15,"mat-label"),c(16),p(17,"translate"),l(),T(18,"input",7),l(),s(19,"mat-form-field")(20,"mat-label"),c(21),p(22,"translate"),l(),s(23,"mat-select",8),ue(24,KN,2,2,"mat-option",9,Ce),l()(),s(26,"div",10)(27,"span",11),it("click",function(){return a.addPaymentDetails()}),s(28,"mat-slide-toggle")(29,"div",12)(30,"span",13),c(31),p(32,"translate"),l()()()()(),M(33,JN,25,15),s(34,"mat-form-field")(35,"mat-label"),c(36),p(37,"translate"),l(),T(38,"textarea",14),l()(),s(39,"mat-card-actions",15)(40,"button",16),c(41),p(42,"translate"),l(),k(43,XN,3,4,"button",17),l()()()()()),i&2&&(o(2),x("formGroup",a.adjustLoanChargeForm),o(5),b(m(8,13,"labels.inputs.Amount")),o(3),b(a.loanDetailsData.currency.code),o(3),O(a.adjustLoanChargeForm.controls.amount.hasError("required")?13:-1),o(3),b(m(17,15,"labels.inputs.External Id")),o(5),b(m(22,17,"labels.inputs.Payment Type")),o(3),fe(a.paymentTypes),o(5),x("className",a.showPaymentDetails?"enabled":"disabled"),o(2),b(m(32,19,"labels.inputs.Show Payment Details")),o(2),O(a.showPaymentDetails?33:-1),o(3),b(m(37,21,"labels.inputs.Note")),o(4),x("routerLink",Ut(25,YN)),o(),v(" ",m(42,23,"labels.buttons.Cancel")," "),o(2),x("mifosxHasPermission","ADJUSTMENT_LOANCHARGE"))},dependencies:[wt,Tt,Re,we,Mi,he,Ee,je,Le,Ne,ae,xe,Oe,ze,_e,ge,Ve,Je,Pe,In,On,Wt,Ae,ja,Wn,Pt],styles:[".expandcollapsebutton[_ngcontent-%COMP%]{margin-top:-7px}.container[_ngcontent-%COMP%]{max-width:37rem}.right-input[_ngcontent-%COMP%]{text-align:right}.right-label[_ngcontent-%COMP%]{padding-right:25px!important}"]})}}return t})();var yg=(()=>{class t{constructor(){this.systemService=A(_p)}resolve(e){return this.systemService.getConfigurationByName("loan-arrears-delinquency-display-data")}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275prov=sn({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();var QN=t=>["/","journal-entry","view-transfer",t];function tk(t,n){if(t&1&&(s(0,"div",1)(1,"h3"),c(2),p(3,"translate"),l(),s(4,"div",6)(5,"table")(6,"tbody")(7,"tr")(8,"td",7)(9,"b"),c(10),p(11,"translate"),l()(),s(12,"td",8)(13,"div",9),T(14,"fa-icon",10),s(15,"span",11),c(16),l()()(),s(17,"td",7)(18,"b"),c(19),p(20,"translate"),l()(),s(21,"td",8),T(22,"mifosx-external-identifier",12),l()(),s(23,"tr")(24,"td",7)(25,"b"),c(26),p(27,"translate"),l()(),s(28,"td",8),c(29),p(30,"dateFormat"),l(),s(31,"td",7)(32,"b"),c(33),p(34,"translate"),l()(),s(35,"td",8),c(36),p(37,"dateFormat"),l()(),s(38,"tr")(39,"td",7)(40,"b"),c(41),p(42,"translate"),l()(),s(43,"td",13)(44,"table")(45,"tbody")(46,"tr")(47,"td",14)(48,"b"),c(49),p(50,"translate"),l()(),s(51,"td",15),c(52),p(53,"formatNumber"),l()(),s(54,"tr")(55,"td",14)(56,"b"),c(57),p(58,"translate"),l()(),s(59,"td",15),c(60),p(61,"formatNumber"),l()(),s(62,"tr")(63,"td",14)(64,"b"),c(65),p(66,"translate"),l()(),s(67,"td",15),c(68),p(69,"formatNumber"),l()(),s(70,"tr")(71,"td",14)(72,"b"),c(73),p(74,"translate"),l()(),s(75,"td",15),c(76),p(77,"formatNumber"),l()(),s(78,"tr")(79,"td",14)(80,"b"),c(81),p(82,"translate"),l()(),s(83,"td",15),c(84),p(85,"formatNumber"),l()(),s(86,"tr")(87,"td",14)(88,"b"),c(89),p(90,"translate"),l()(),s(91,"td",15),c(92),p(93,"formatNumber"),l()()()()()()()()()()),t&2){let e=P();o(2),b(m(3,24,"labels.heading.Active Asset Transfer")),o(8),v("",m(11,26,"labels.inputs.Status")," :"),o(3),x("ngClass",e.itemStatus(e.activeTransferData.status)),o(3),b(e.activeTransferData.status),o(3),v("",m(20,28,"labels.inputs.Owner External Id")," :"),o(3),x("externalId",ce(e.activeTransferData.owner.externalId)),o(4),v("",m(27,30,"labels.inputs.Settlement Date")," :"),o(3),v(" ",m(30,32,e.activeTransferData.settlementDate)," "),o(4),v("",m(34,34,"labels.inputs.Effective Date")," :"),o(3),v(" ",m(37,36,e.activeTransferData.effectiveFrom)," "),o(5),v("",m(42,38,"labels.inputs.Details")," :"),o(8),v("",m(50,40,"labels.inputs.Principal Outstanding")," :"),o(3),v(" ",m(53,42,e.activeTransferData.details.totalPrincipalOutstanding)," "),o(5),v("",m(58,44,"labels.inputs.Interest Outstanding")," :"),o(3),v(" ",m(61,46,e.activeTransferData.details.totalInterestOutstanding)," "),o(5),v("",m(66,48,"labels.inputs.Fees Outstanding")," :"),o(3),v(" ",m(69,50,e.activeTransferData.details.totalFeeChargesOutstanding)," "),o(5),v("",m(74,52,"labels.inputs.Penalties Outstanding")," :"),o(3),v(" ",m(77,54,e.activeTransferData.details.totalPenaltyChargesOutstanding)," "),o(5),v("",m(82,56,"labels.inputs.Outstanding")," :"),o(3),v(" ",m(85,58,e.activeTransferData.details.totalOutstanding)," "),o(5),v("",m(90,60,"labels.inputs.Overpaid")," :"),o(3),b(m(93,62,e.activeTransferData.details.totalOverpaid))}}function ek(t,n){if(t&1){let e=xt();s(0,"button",17),it("click",function(){mt(e);let a=P(2);return dt(a.saleLoan())}),T(1,"fa-icon",18),c(2),p(3,"translate"),l()}t&2&&(o(2),v("",m(3,1,"labels.buttons.Sell Loan")," "))}function nk(t,n){t&1&&(s(0,"div",4),k(1,ek,4,3,"button",16),l()),t&2&&(o(),x("mifosxHasPermission","SALE_LOAN"))}function ik(t,n){if(t&1){let e=xt();s(0,"button",20),it("click",function(){mt(e);let a=P(2);return dt(a.cancelSaleLoan())}),T(1,"fa-icon",21),c(2),p(3,"translate"),l()}t&2&&(o(2),v("",m(3,1,"labels.buttons.Cancel Sell Loan")," "))}function ak(t,n){t&1&&(s(0,"div",4),k(1,ik,4,3,"button",19),l()),t&2&&(o(),x("mifosxHasPermission","SALE_LOAN"))}function ok(t,n){if(t&1){let e=xt();s(0,"button",17),it("click",function(){mt(e);let a=P(2);return dt(a.buyBackLoan())}),T(1,"fa-icon",18),c(2),p(3,"translate"),l()}t&2&&(o(2),v("",m(3,1,"labels.buttons.Buy Back Loan")," "))}function rk(t,n){t&1&&(s(0,"div",4),k(1,ok,4,3,"button",16),l()),t&2&&(o(),x("mifosxHasPermission","SALE_LOAN"))}function lk(t,n){t&1&&(s(0,"th",35),c(1),p(2,"translate"),l()),t&2&&(o(),b(m(2,1,"labels.inputs.Status")))}function sk(t,n){if(t&1&&(s(0,"td",36)(1,"div",9),T(2,"fa-icon",10),s(3,"span",37),c(4),p(5,"translate"),l()()()),t&2){let e=n.$implicit,i=P(2);o(),x("ngClass",i.itemStatus(e.status)),o(3),v(" ",m(5,2,i.itemCurrentStatus(e))," ")}}function ck(t,n){t&1&&(s(0,"th",35),c(1),p(2,"translate"),l()),t&2&&(o(),b(m(2,1,"labels.inputs.Effective From")))}function pk(t,n){if(t&1&&(s(0,"td",36),c(1),p(2,"dateFormat"),l()),t&2){let e=n.$implicit;o(),b(m(2,1,e.effectiveFrom))}}function mk(t,n){t&1&&(s(0,"th",35),c(1),p(2,"translate"),l()),t&2&&(o(),b(m(2,1,"labels.inputs.Owner External Id")))}function dk(t,n){if(t&1&&(s(0,"td",36),T(1,"mifosx-external-identifier",38),l()),t&2){let e=n.$implicit;o(),x("externalId",ce(e.owner.externalId))}}function uk(t,n){t&1&&(s(0,"th",35),c(1),p(2,"translate"),l()),t&2&&(o(),b(m(2,1,"labels.inputs.Transfer External Id")))}function fk(t,n){if(t&1&&(s(0,"td",36),T(1,"mifosx-external-identifier",38),l()),t&2){let e=n.$implicit;o(),x("externalId",ce(e.transferExternalId))}}function hk(t,n){t&1&&(s(0,"th",35),c(1),p(2,"translate"),l()),t&2&&(o(),b(m(2,1,"labels.inputs.Settlement Date")))}function gk(t,n){if(t&1&&(s(0,"td",36),c(1),p(2,"dateFormat"),l()),t&2){let e=n.$implicit;o(),b(m(2,1,e.settlementDate))}}function _k(t,n){t&1&&(s(0,"th",35),c(1),p(2,"translate"),l()),t&2&&(o(),b(m(2,1,"labels.inputs.Purchase Price Ratio")))}function Ck(t,n){if(t&1&&(s(0,"td",36),c(1),p(2,"number"),l()),t&2){let e=n.$implicit;o(),b(m(2,1,e.purchasePriceRatio))}}function bk(t,n){t&1&&(s(0,"th",39),c(1),p(2,"translate"),l()),t&2&&(o(),b(m(2,1,"labels.inputs.Actions")))}function vk(t,n){if(t&1){let e=xt();s(0,"button",42),p(1,"translate"),it("click",function(a){mt(e);let r=P(3);return dt(r.routeJournalEntry(a))}),T(2,"i",43),l()}if(t&2){let e=P().$implicit;x("matTooltip",ce(m(1,3,"tooltips.View Journal Entries")))("routerLink",La(5,QN,e.transferId))}}function xk(t,n){if(t&1&&(s(0,"td",40),M(1,vk,3,7,"button",41),l()),t&2){let e=n.$implicit,i=P(2);o(),O(i.isPendingOrCanceled(e)?-1:1)}}function yk(t,n){t&1&&T(0,"tr",44)}function Sk(t,n){t&1&&T(0,"tr",45)}function Dk(t,n){if(t&1&&(s(0,"table",5),X(1,22),k(2,lk,3,3,"th",23)(3,sk,6,4,"td",24),Q(),X(4,25),k(5,ck,3,3,"th",23)(6,pk,3,3,"td",24),Q(),X(7,26),k(8,mk,3,3,"th",23)(9,dk,2,2,"td",24),Q(),X(10,27),k(11,uk,3,3,"th",23)(12,fk,2,2,"td",24),Q(),X(13,28),k(14,hk,3,3,"th",23)(15,gk,3,3,"td",24),Q(),X(16,29),k(17,_k,3,3,"th",23)(18,Ck,3,3,"td",24),Q(),X(19,30),k(20,bk,3,3,"th",31)(21,xk,2,1,"td",32),Q(),k(22,yk,1,0,"tr",33)(23,Sk,1,0,"tr",34),l()),t&2){let e=P();x("dataSource",e.loanTransfersData),o(22),x("matHeaderRowDef",e.loanTransferColumns),o(),x("matRowDefColumns",e.loanTransferColumns)}}var w0=(()=>{class t{constructor(){this.route=A(Et),this.router=A(le),this.dialog=A(Gn),this.externalAssetOwner=A(Ep),this.externalAssetOwnerService=A(Wr),this.defaultDate="9999-12-31",this.loanTransfersData=[],this.loanTransferColumns=["status","effectiveFrom","ownerExternalId","transferExternalId","settlementDate","purchasePriceRatio","actions"],this.existActiveTransfer=!1,this.route.data.subscribe(e=>{this.loanTransfersData=e.loanTransfersData.empty?[]:e.loanTransfersData.content,this.activeTransferData=e.activeTransferData||null,this.existActiveTransfer=e.activeTransferData&&e.activeTransferData.transferId!=null})}ngOnInit(){this.currentItem=null,this.loanTransfersData.length>0&&(this.currentItem=this.loanTransfersData[this.loanTransfersData.length-1])}itemCurrentStatus(e){return this.externalAssetOwner.itemCurrentStatus(e)}itemStatus(e){return this.externalAssetOwner.itemStatus(e)}isPending(e){return this.externalAssetOwner.isPending(e)}isPendingOrCanceled(e){return this.externalAssetOwner.isPendingOrCanceled(e)}isBuyBackPending(e){return this.externalAssetOwner.isBuyBackPending(e)}canBeCancelled(){return this.externalAssetOwner.validateStatus(this.currentItem,"PENDING")}canBeSold(){return this.externalAssetOwner.canBeSold(this.currentItem)}canBeBuyed(){return this.externalAssetOwner.validateStatus(this.currentItem,"ACTIVE")}saleLoan(){this.router.navigate(["../actions/Sell Loan"],{relativeTo:this.route})}cancelSaleLoan(){this.dialog.open(Kf,{data:{cancelContext:`the Asset Transfer with the Owner External Id ${this.currentItem.owner.externalId} `}}).afterClosed().subscribe(i=>{if(i.cancel){let a={transferExternalId:this.currentItem.transferExternalId};this.externalAssetOwnerService.executeExternalAssetOwnerTransferCommand(this.currentItem.transferId,a,"cancel").subscribe(r=>{this.reload()})}})}buyBackLoan(){this.router.navigate(["../actions/Buy Back Loan"],{relativeTo:this.route})}routeJournalEntry(e){e.stopPropagation()}reload(){let e=this.router.url;this.router.navigateByUrl("/",{skipLocationChange:!0}).then(()=>this.router.navigate([e]))}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=Dt({type:t,selectors:[["mifosx-external-asset-owner-tab"]],decls:10,vars:8,consts:[[1,"tab-container","mat-typography"],[1,"flex-fill"],[1,"layout-row","align-start-center"],[1,"flex-90"],[1,"flex-10"],["mat-table","","mat-sort","",3,"dataSource"],[1,"layout-row","gap-32px","asset-transfer-container"],[1,"flex-25"],[1,"flex-25","left"],[3,"ngClass"],["icon","stop"],[1,"m-l-10","external-asset-owner-status"],["completed","true",3,"externalId"],[1,"flex-75","left"],[1,"flex-50"],[1,"flex-50","r-amount"],["mat-raised-button","","class","f-right","color","primary",3,"click",4,"mifosxHasPermission"],["mat-raised-button","","color","primary",1,"f-right",3,"click"],["icon","dollar-sign",1,"m-r-10"],["mat-raised-button","","class","f-right","color","warn",3,"click",4,"mifosxHasPermission"],["mat-raised-button","","color","warn",1,"f-right",3,"click"],["icon","trash",1,"m-r-10"],["matColumnDef","status"],["mat-header-cell","",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","effectiveFrom"],["matColumnDef","ownerExternalId"],["matColumnDef","transferExternalId"],["matColumnDef","settlementDate"],["matColumnDef","purchasePriceRatio"],["matColumnDef","actions"],["mat-header-cell","","class","center",4,"matHeaderCellDef"],["mat-cell","","class","center td-min-space",4,"matCellDef"],["mat-header-row","",4,"matHeaderRowDef"],["mat-row","",4,"matRowDef","matRowDefColumns"],["mat-header-cell",""],["mat-cell",""],[1,"m-l-10","status"],[3,"externalId"],["mat-header-cell","",1,"center"],["mat-cell","",1,"center","td-min-space"],["mat-raised-button","","color","primary","matTooltipPosition","left",1,"account-action-button",3,"matTooltip","routerLink"],["mat-raised-button","","color","primary","matTooltipPosition","left",1,"account-action-button",3,"click","matTooltip","routerLink"],[1,"fa","fa-arrow-circle-right"],["mat-header-row",""],["mat-row",""]],template:function(i,a){i&1&&(s(0,"div",0),M(1,tk,94,64,"div",1),s(2,"div",2)(3,"h3",3),c(4),p(5,"translate"),l(),M(6,nk,2,1,"div",4),M(7,ak,2,1,"div",4),M(8,rk,2,1,"div",4),l(),M(9,Dk,24,3,"table",5),l()),i&2&&(o(),O(a.existActiveTransfer?1:-1),o(3),b(m(5,6,"labels.heading.External Asset Owner")),o(2),O(a.canBeSold()?6:-1),o(),O(a.canBeCancelled()?7:-1),o(),O(a.canBeBuyed()?8:-1),o(),O(a.loanTransfersData.length>0?9:-1))},dependencies:[wt,ca,Tt,ae,Wt,Ae,un,Va,bn,yn,xn,Sn,vn,Dn,Oi,wn,Pn,Tn,An,kf,En,Pt,hn],styles:[".tab-container[_ngcontent-%COMP%]{padding:1% 1% 2%;margin:1%}.tab-container[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{margin:1% auto}.tab-container[_ngcontent-%COMP%] .transaction-buttons[_ngcontent-%COMP%]{padding-bottom:1rem;padding-top:1rem}.tab-container[_ngcontent-%COMP%] .transaction-buttons[_ngcontent-%COMP%] .accruals[_ngcontent-%COMP%]{padding-top:1%}.tab-container[_ngcontent-%COMP%] .asset-transfer-container[_ngcontent-%COMP%]{border:1px solid;padding:1%;margin-bottom:20px}.tab-container[_ngcontent-%COMP%] table[_ngcontent-%COMP%]{width:100%}.tab-container[_ngcontent-%COMP%] table[_ngcontent-%COMP%] .select-row[_ngcontent-%COMP%]:hover{cursor:pointer}.external-asset-owner-status[_ngcontent-%COMP%]{color:#000}.account-action-button[_ngcontent-%COMP%]{min-width:26px;padding:0 0 3px;margin:0 2%;line-height:25px}"]})}}return t})();var Lu=(()=>{class t{constructor(){this.externalAssetOwnerService=A(Wr)}resolve(e){let i=e.paramMap.get("loanId")||e.parent.paramMap.get("loanId");return this.externalAssetOwnerService.retrieveExternalAssetOwnerTransfers(i)}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275prov=sn({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();var Sg=(()=>{class t{constructor(){this.externalAssetOwnerService=A(Wr)}resolve(e){let i=e.paramMap.get("loanId")||e.parent.paramMap.get("loanId");return this.externalAssetOwnerService.retrieveExternalAssetOwnerActiveTransfer(i)}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275prov=sn({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();var Dg=(()=>{class t{constructor(){this.loansService=A(Mt)}resolve(e){let i=e.paramMap.get("loanId")||e.parent.paramMap.get("loanId");return this.loansService.getLoanCollaterals(i)}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275prov=sn({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();var Nu=(()=>{class t{constructor(){this.loansService=A(Mt)}resolve(e){let i=e.paramMap.get("loanId")||e.parent.paramMap.get("loanId");return this.loansService.getDelinquencyData(i)}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275prov=sn({token:t,factory:t.\u0275fac})}}return t})();var wg=(()=>{class t{constructor(){this.loansService=A(Mt)}resolve(e){let i=e.paramMap.get("loanId")||e.parent.paramMap.get("loanId");return this.loansService.getDelinquencyActions(i)}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275prov=sn({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();function wk(t,n){t&1&&(s(0,"th",13),c(1,"#"),l())}function Tk(t,n){if(t&1&&(s(0,"td",14),c(1),l()),t&2){let e=n.index;o(),b(e+1)}}function Pk(t,n){t&1&&(s(0,"th",13),c(1),p(2,"translate"),l()),t&2&&(o(),b(m(2,1,"labels.inputs.Start Date")))}function Ak(t,n){if(t&1&&(s(0,"td",14),c(1),p(2,"dateFormat"),l()),t&2){let e=n.$implicit;o(),b(m(2,1,e.termVariationApplicableFrom))}}function Mk(t,n){t&1&&(s(0,"th",13),c(1),p(2,"translate"),l()),t&2&&(o(),b(m(2,1,"labels.inputs.End Date")))}function Ok(t,n){if(t&1&&(s(0,"td",14),c(1),p(2,"dateFormat"),l()),t&2){let e=n.$implicit;o(),b(m(2,1,e.dateValue))}}function Ik(t,n){t&1&&(s(0,"th",13),c(1),p(2,"translate"),l()),t&2&&(o(),b(m(2,1,"labels.inputs.Value")))}function Ek(t,n){if(t&1&&(s(0,"td",14),c(1),p(2,"formatNumber"),l()),t&2){let e=n.$implicit;o(),b(m(2,1,e.decimalValue))}}function Lk(t,n){t&1&&(s(0,"th",13),c(1),p(2,"translate"),l()),t&2&&(o(),b(m(2,1,"labels.inputs.Days")))}function Nk(t,n){if(t&1&&(s(0,"td",14),c(1),p(2,"formatNumber"),l()),t&2){let e=n.$implicit;o(),b(m(2,1,e.days))}}function kk(t,n){t&1&&(s(0,"th",13),c(1),p(2,"translate"),l()),t&2&&(o(),b(m(2,1,"labels.inputs.Actions")))}function Fk(t,n){if(t&1){let e=xt();s(0,"span")(1,"button",15),p(2,"translate"),it("click",function(){mt(e);let a=P().$implicit,r=P(2);return dt(r.manageRequest(a,"Edit"))}),T(3,"fa-icon",16),l(),s(4,"button",17),p(5,"translate"),it("click",function(){mt(e);let a=P().$implicit,r=P(2);return dt(r.manageRequest(a,"Delete"))}),T(6,"fa-icon",18),l()()}t&2&&(o(),x("matTooltip",ce(m(2,4,"tooltips.Edit"))),o(3),x("matTooltip",ce(m(5,6,"tooltips.Delete"))))}function Rk(t,n){if(t&1&&(s(0,"td",14),M(1,Fk,7,8,"span"),l()),t&2){let e=n.$implicit,i=P(2);o(),O(i.allowActions(e.termType.value)?1:-1)}}function Bk(t,n){t&1&&T(0,"tr",19)}function qk(t,n){t&1&&T(0,"tr",20)}function jk(t,n){if(t&1&&(s(0,"div")(1,"h3",1),c(2),p(3,"translate"),l(),s(4,"table",2),X(5,3),k(6,wk,2,0,"th",4)(7,Tk,2,1,"td",5),Q(),X(8,6),k(9,Pk,3,3,"th",4)(10,Ak,3,3,"td",5),Q(),X(11,7),k(12,Mk,3,3,"th",4)(13,Ok,3,3,"td",5),Q(),X(14,8),k(15,Ik,3,3,"th",4)(16,Ek,3,3,"td",5),Q(),X(17,9),k(18,Lk,3,3,"th",4)(19,Nk,3,3,"td",5),Q(),X(20,10),k(21,kk,3,3,"th",4)(22,Rk,2,1,"td",5),Q(),k(23,Bk,1,0,"tr",11)(24,qk,1,0,"tr",12),l()()),t&2){let e=n.$implicit,i=P();o(2),b(m(3,4,"labels.heading."+e.label)),o(2),x("dataSource",e.data),o(19),x("matHeaderRowDef",i.loanDTermVariationsColumns),o(),x("matRowDefColumns",i.loanDTermVariationsColumns)}}var T0=(()=>{class t{constructor(){this.route=A(Et),this.router=A(le),this.dates=A(de),this.settingsService=A(oe),this.loansService=A(Mt),this.dialog=A(Gn),this.loanTermVariationsData=[],this.loanDTermVariationsColumns=["row","startDate","endDate","days","actions"],this.emiAmountData=[],this.interestRateData=[],this.dueDateData=[],this.deleteInstallmentData=[],this.insertInstallmentData=[],this.principalAmountData=[],this.graceOnInterestData=[],this.graceOnPrincipalData=[],this.extendRepaymentPeriodData=[],this.interestRateFromInstallmentData=[],this.interestPausesData=[],this.invalidData=[];let e=this.dates;this.interestPausesData=[],this.clientId=this.route.parent.parent.snapshot.paramMap.get("clientId"),this.route.data.subscribe(i=>{this.loanId=i.loanDetailsData.id,this.loanTermVariationsData=[],i.loanDetailsData.loanTermVariations?.forEach(a=>{switch(a.days=e.calculateDiff(new Date(a.termVariationApplicableFrom),new Date(a.dateValue))+1,a.termType.value){case"emiAmount":this.emiAmountData.push(a);break;case"interestRate":this.interestRateData.push(a);break;case"deleteInstallment":this.deleteInstallmentData.push(a);break;case"dueDate":this.dueDateData.push(a);break;case"insertInstallment":this.insertInstallmentData.push(a);break;case"principalAmount":this.principalAmountData.push(a);break;case"graceOnInterest":this.graceOnInterestData.push(a);break;case"graceOnPrincipal":this.graceOnPrincipalData.push(a);break;case"extendRepaymentPeriod":this.extendRepaymentPeriodData.push(a);break;case"interestRateForInstallment":this.interestRateFromInstallmentData.push(a);break;case"interestPause":this.interestPausesData.push(a);break;default:this.invalidData.push(a);break}}),this.deleteInstallmentData.length>0&&this.loanTermVariationsData.push({label:"Delete Installment",data:this.deleteInstallmentData}),this.dueDateData.length>0&&this.loanTermVariationsData.push({label:"Due Date",data:this.dueDateData}),this.emiAmountData.length>0&&this.loanTermVariationsData.push({label:"EMI Amount",data:this.emiAmountData}),this.extendRepaymentPeriodData.length>0&&this.loanTermVariationsData.push({label:"Extend Repayment Period",data:this.extendRepaymentPeriodData}),this.graceOnInterestData.length>0&&this.loanTermVariationsData.push({label:"Grace On Interest",data:this.graceOnInterestData}),this.graceOnPrincipalData.length>0&&this.loanTermVariationsData.push({label:"Grace On Principal",data:this.graceOnPrincipalData}),this.insertInstallmentData.length>0&&this.loanTermVariationsData.push({label:"Insert Installment",data:this.insertInstallmentData}),this.interestPausesData.length>0&&this.loanTermVariationsData.push({label:"Interest Pauses",data:this.interestPausesData}),this.interestRateData.length>0&&this.loanTermVariationsData.push({label:"Interest Rate",data:this.interestRateData}),this.interestRateFromInstallmentData.length>0&&this.loanTermVariationsData.push({label:"Interest Rate From Installment",data:this.interestRateFromInstallmentData}),this.principalAmountData.length>0&&this.loanTermVariationsData.push({label:"Principal Amount",data:this.principalAmountData})})}manageRequest(e,i){i==="Delete"?this.deleteInterestPause(e):i==="Edit"&&this.updateInterestPause(e)}deleteInterestPause(e){this.dialog.open(ra,{data:{deleteContext:`interest pause from ${e.startDate} to ${e.endDate}`}}).afterClosed().subscribe(a=>{a.delete&&this.loansService.deleteInterestPause(this.loanId,e.id).subscribe(r=>{this.reload()})})}updateInterestPause(e){let i=this.dates.parseDate(e.startDate),a=this.dates.parseDate(e.endDate),r=[new la({controlName:"startDate",label:"Start Date",value:i,maxDate:this.settingsService.maxFutureDate,required:!0}),new la({controlName:"endDate",label:"End Date",value:a,maxDate:this.settingsService.maxFutureDate,required:!0})],u={title:"Edit Interest Pause id: "+e.id,formfields:r,layout:{addButtonText:"Submit"}};this.dialog.open(_i,{data:u,width:"50rem"}).afterClosed().subscribe(g=>{if(g.data&&g.data.value.startDate<=g.data.value.endDate){let _=this.settingsService.language.code,y=this.settingsService.dateFormat,I={startDate:this.dates.formatDate(g.data.value.startDate,y),endDate:this.dates.formatDate(g.data.value.endDate,y),locale:_,dateFormat:y};this.loansService.updateInterestPause(this.loanId,e.id,I).subscribe(N=>{this.reload()})}})}reload(){let e=this.router.url;this.router.navigateByUrl(`/clients/${this.clientId}/loans-accounts`,{skipLocationChange:!0}).then(()=>this.router.navigate([e]))}allowActions(e){return e==="interestPause"}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=Dt({type:t,selectors:[["mifosx-loan-term-variations-tab"]],decls:3,vars:0,consts:[[1,"container"],[1,"m-t-20"],["mat-table","",3,"dataSource"],["matColumnDef","row"],["mat-header-cell","",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","startDate"],["matColumnDef","endDate"],["matColumnDef","value"],["matColumnDef","days"],["matColumnDef","actions"],["mat-header-row","",4,"matHeaderRowDef"],["mat-row","",4,"matRowDef","matRowDefColumns"],["mat-header-cell",""],["mat-cell",""],["mat-icon-button","","color","primary","matTooltipPosition","right",1,"button",3,"click","matTooltip"],["icon","edit","size","lg"],["mat-icon-button","","color","warn","matTooltipPosition","left",1,"button",3,"click","matTooltip"],["icon","trash","size","lg"],["mat-header-row",""],["mat-row",""]],template:function(i,a){i&1&&(s(0,"div",0),ue(1,jk,25,6,"div",null,Ce),l()),i&2&&(o(),fe(a.loanTermVariationsData))},dependencies:[wt,Tt,bn,yn,xn,Sn,vn,Dn,Ba,Oi,un,wn,Pn,Tn,An,En,Pt,hn],styles:["table[_ngcontent-%COMP%]{width:100%}table[_ngcontent-%COMP%] .action-button[_ngcontent-%COMP%]{min-width:26px;padding:0 0 3px;margin:0 2%;line-height:25px}.container[_ngcontent-%COMP%]{padding-top:1%;padding-bottom:2%}.container[_ngcontent-%COMP%] .delete-button[_ngcontent-%COMP%]{margin-left:1%}"]})}}return t})();var ku=(()=>{class t{constructor(){this.loansService=A(Mt)}resolve(e){let i=e.paramMap.get("loanId")||e.parent.paramMap.get("loanId");if(!isNaN(+i))return this.loansService.getInterestPausesOfLoan(i)}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275prov=sn({token:t,factory:t.\u0275fac})}}return t})();function zk(t,n){t&1&&(s(0,"th",10),c(1),p(2,"translate"),l()),t&2&&(o(),b(m(2,1,"labels.inputs.Amount")))}function Vk(t,n){if(t&1&&(s(0,"td",11),c(1),p(2,"formatNumber"),l()),t&2){let e=n.$implicit;o(),v(" ",m(2,1,e.amount)," ")}}function Uk(t,n){t&1&&(s(0,"th",10),c(1),p(2,"translate"),l()),t&2&&(o(),b(m(2,1,"labels.inputs.Amortized Amount")))}function Hk(t,n){if(t&1&&(s(0,"td",11),c(1),p(2,"formatNumber"),l()),t&2){let e=n.$implicit;o(),v(" ",m(2,1,e.amortizedAmount)," ")}}function Gk(t,n){t&1&&(s(0,"th",10),c(1),p(2,"translate"),l()),t&2&&(o(),b(m(2,1,"labels.inputs.Unrecognized Amount")))}function Wk(t,n){if(t&1&&(s(0,"td",11),c(1),p(2,"formatNumber"),l()),t&2){let e=n.$implicit;o(),v(" ",m(2,1,e.unrecognizedAmount)," ")}}function $k(t,n){t&1&&(s(0,"th",10),c(1),p(2,"translate"),l()),t&2&&(o(),b(m(2,1,"labels.inputs.Adjustment Amount")))}function Yk(t,n){if(t&1&&(s(0,"td",11),c(1),p(2,"formatNumber"),l()),t&2){let e=n.$implicit;o(),v(" ",Ge(2,1,e.amountAdjustment,"-")," ")}}function Zk(t,n){t&1&&T(0,"tr",12)}function Kk(t,n){t&1&&T(0,"tr",13)}function Jk(t,n){if(t&1&&(s(0,"table",1),X(1,2),k(2,zk,3,3,"th",3)(3,Vk,3,3,"td",4),Q(),X(4,5),k(5,Uk,3,3,"th",3)(6,Hk,3,3,"td",4),Q(),X(7,6),k(8,Gk,3,3,"th",3)(9,Wk,3,3,"td",4),Q(),X(10,7),k(11,$k,3,3,"th",3)(12,Yk,3,4,"td",4),Q(),k(13,Zk,1,0,"tr",8)(14,Kk,1,0,"tr",9),l()),t&2){let e=P();x("dataSource",e.capitalizedIncomeData),o(13),x("matHeaderRowDef",e.capitalizedIncomeColumns),o(),x("matRowDefColumns",e.capitalizedIncomeColumns)}}var Tg=(()=>{class t{constructor(){this.route=A(Et),this.capitalizedIncomeData=[],this.capitalizedIncomeColumns=["amount","amortizedAmount","unrecognizedAmount","amountAdjustment"],this.loanId=this.route.parent.parent.snapshot.params.loanId,this.capitalizedIncomeData=[],this.route.parent.data.subscribe(e=>{e.loanDeferredIncomeData.capitalizedIncomeData.forEach(i=>{this.capitalizedIncomeData.push({amount:i.amount,amortizedAmount:i.amortizedAmount??0,unrecognizedAmount:i.unrecognizedAmount??0,amountAdjustment:i.amountAdjustment??0})})})}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=Dt({type:t,selectors:[["mifosx-loan-deferred-income-tab"]],decls:6,vars:7,consts:[[1,"container"],["mat-table","",3,"dataSource"],["matColumnDef","amount"],["mat-header-cell","","class","center",4,"matHeaderCellDef"],["mat-cell","","class","r-amount",4,"matCellDef"],["matColumnDef","amortizedAmount"],["matColumnDef","unrecognizedAmount"],["matColumnDef","amountAdjustment"],["mat-header-row","",4,"matHeaderRowDef"],["mat-row","",4,"matRowDef","matRowDefColumns"],["mat-header-cell","",1,"center"],["mat-cell","",1,"r-amount"],["mat-header-row",""],["mat-row",""]],template:function(i,a){i&1&&(s(0,"div",0)(1,"h3"),c(2),p(3,"translate"),p(4,"translate"),l(),M(5,Jk,15,3,"table",1),l()),i&2&&(o(2),$t("",m(3,3,"labels.inputs.Deferred income")," - ",m(4,5,"labels.menus.Capitalized Income")),o(3),O(a.capitalizedIncomeData.length>0?5:-1))},dependencies:[wt,Tt,bn,yn,xn,Sn,vn,Dn,wn,Pn,Tn,An,Pt,hn],encapsulation:2})}}return t})();var Fu=(()=>{class t{constructor(){this.loansService=A(Mt)}resolve(e){let i=e.paramMap.get("loanId")||e.parent.paramMap.get("loanId");return this.loansService.getDeferredIncomeData(i)}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275prov=sn({token:t,factory:t.\u0275fac})}}return t})();var Ru=(()=>{class t{constructor(){this.loansService=A(Mt)}resolve(e){let i=e.paramMap.get("loanId")||e.parent.paramMap.get("loanId");return i?this.loansService.getBuyDownFeeData(i):(console.error("LoanBuyDownFeesDataResolver: Could not find loanId in route parameters"),new Df(a=>{a.next([]),a.complete()}))}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275prov=sn({token:t,factory:t.\u0275fac})}}return t})();var Xk=[{path:"",data:{title:"Loans",breadcrumb:"Loans",routeParamBreadcrumb:!1},children:[{path:"create",data:{title:"Create Loans Account",breadcrumb:"Create Loans Account"},component:s0,resolve:{loansAccountTemplate:wu}},{path:":loanId",data:{title:"Loan View",routeParamBreadcrumb:"loanId"},component:Np,resolve:{loanDetailsData:il,loanDatatables:C0,loanArrearsDelinquencyConfig:yg},children:[{path:"",redirectTo:"general",pathMatch:"full"},{path:"general",component:kp,data:{title:"General",breadcrumb:"General",routeParamBreadcrumb:!1},resolve:{loanDetailsData:il,loanDatatables:C0}},{path:"accountdetail",component:Fp,data:{title:"Account Detail",breadcrumb:"Account Detail",routeParamBreadcrumb:!1}},{path:"original-schedule",component:Sm,data:{title:"Original Schedule",breadcrumb:"Original Schedule",routeParamBreadcrumb:!1}},{path:"repayment-schedule",component:ho,data:{title:"Repayment Schedule",breadcrumb:"Repayment Schedule",routeParamBreadcrumb:!1}},{path:"transactions",data:{title:"Loans Account Transactions",breadcrumb:"Transactions",routeParamBreadcrumb:!1},children:[{path:"",component:ym},{path:"export",component:h0}]},{path:"deferred-income",data:{title:"Loans Deferred Income",breadcrumb:"Deferred income",routeParamBreadcrumb:!1},resolve:{loanDeferredIncomeData:Fu},children:[{path:"",component:Tg}]},{path:"delinquencytags",data:{title:"Loans Delinquency Tags",breadcrumb:"Delinquency Tags",routeParamBreadcrumb:!1},resolve:{loanDelinquencyTagsData:Eu,loanDelinquencyData:Nu,loanDelinquencyActions:wg},children:[{path:"",component:y0}]},{path:"loan-reschedules",data:{},resolve:{loanRescheduleData:xg},children:[{path:"",component:S0}]},{path:"loan-collateral",component:r0,data:{title:"Loan Collateral Details",breadcrumb:"Loan Collateral Details",routeParamBreadcrumb:!1},resolve:{loanCollaterals:Dg}},{path:"term-variations",component:T0,data:{title:"Loan Term Variations",breadcrumb:"Loan Term Variations",routeParamBreadcrumb:!1},resolve:{loanDetailsData:il,interestPausesData:ku}},{path:"loan-tranche-details",component:o0,data:{title:"Loan Tranche Details",breadcrumb:"Loan Tranche Details",routeParamBreadcrumb:!1}},{path:"overdue-charges",component:Dm,data:{title:"Overdue Charges",breadcrumb:"Overdue Charges",routeParamBreadcrumb:!1}},{path:"floating-interest-rates",component:a0,data:{title:"Floating Interest Rates",breadcrumb:"Floating Interest Rates",routeParamBreadcrumb:!1}},{path:"charges",data:{title:"Loans Account Charges",breadcrumb:"Charges",routeParamBreadcrumb:!1},component:wm},{path:"loan-documents",component:c0,data:{title:"Loan Documents",breadcrumb:"Loan Documents",routeParamBreadcrumb:!1},resolve:{loanDocuments:Tu}},{path:"notes",component:Rp,data:{title:"Notes",breadcrumb:"Notes",routeParamBreadcrumb:!1},resolve:{loanNotes:yu}},{path:"standing-instruction",component:p0,data:{title:"Standing Instructions",breadcrumb:"Standing Instructions",routeParamBreadcrumb:!1}},{path:"external-asset-owner",component:w0,data:{title:"External Asset Owner",breadcrumb:"External Asset Owner",routeParamBreadcrumb:!1},resolve:{activeTransferData:Sg,loanTransfersData:Lu}},{path:"datatables",children:[{path:":datatableName",component:Tm,data:{title:"Data Table View",routeParamBreadcrumb:"datatableName"},resolve:{loanDatatable:Su}}]},{path:"buy-down-fees",component:vg,data:{title:"Buy Down Fees",breadcrumb:"Buy Down Fees",routeParamBreadcrumb:!1},resolve:{loanBuyDownFeesData:Ru}}]},{path:":loanId/transactions/:id",data:{title:"Loans Account Transactions",breadcrumb:"Transactions",routeParamBreadcrumb:!1},resolve:{loanDetailsAssociationData:il},children:[{path:"",data:{routeParamBreadcrumb:"id"},component:d0,resolve:{loansAccountTransaction:Pu}},{path:"edit",component:u0,data:{breadcrumb:"Edit",routeParamBreadcrumb:!1},resolve:{loansAccountTransactionTemplate:Mu}},{path:"reciept",component:f0,data:{breadcrumb:"Reciept",routeParamBreadcrumb:!1},resolve:{loansTransactionReciept:Au}}]},{path:":loanId/edit-loans-account",data:{title:"Modify Loans Account",breadcrumb:"Modify Loans Account",routeParamBreadcrumb:"Edit"},component:Oc,resolve:{loansAccountAndTemplate:b0}},{path:":loanId/charges",data:{title:"Loans Account Charges",breadcrumb:"Charges",routeParamBreadcrumb:!1},children:[{path:"",redirectTo:"../charges",pathMatch:"prefix"},{path:":id",data:{routeParamBreadcrumb:"id"},component:m0,resolve:{loansAccountCharge:v0,loanDetailsData:il}},{path:":id/adjustment",data:{routeParamBreadcrumb:"id",breadcrumb:"Adjustment"},component:D0,resolve:{loansAccountCharge:v0,loanDetailsData:il}}]},{path:":loanId/actions/:action",component:i0,data:{title:"Loan Account Actions",breadcrumb:"action",routeParamBreadcrumb:"action"},resolve:{actionButtonData:Du}},{path:":loanId/transfer-funds",loadChildren:()=>import("./account-transfers.module-EE4IYF6L.js").then(t=>t.AccountTransfersModule)},{path:"edit-loans-account",data:{title:"Modify Loans Account",breadcrumb:"Modify Loans Account",routeParamBreadcrumb:"Edit"},component:Oc,resolve:{loansAccountAndTemplate:b0}}]},{path:"glim-account",data:{title:"Loans",breadcrumb:"Loans",routeParamBreadcrumb:!1},children:[{path:"create",data:{title:"Create GLIM Application",breadcrumb:"Create GLIM Application",routeParamBreadcrumb:!1},component:_0,resolve:{loansAccountTemplate:Iu,groupsData:b1}},{path:":glimId",data:{title:"GSIM Account View",routeParamBreadcrumb:"savingAccountId"},component:g0,resolve:{glimData:Ou,groupsData:ld}}]}],Pg=(()=>{class t{static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275mod=gp({type:t})}static{this.\u0275inj=fp({providers:[il,yu,C0,Su,Eu,Du,wu,Tu,b0,v0,Pu,Mu,Au,_1,ld,Ou,C1,Iu,Lu,Nu,ku,Fu,Ru],imports:[rd.forChild(Xk),rd]})}}return t})();var Ag=(()=>{class t{constructor(){this.externalAssetOwner=A(Ep)}itemStatus(e){return this.externalAssetOwner.itemStatus(e)}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=Dt({type:t,selectors:[["mifosx-external-asset-transfer"]],inputs:{transferData:"transferData"},decls:89,vars:61,consts:[[1,"m-l-5","flex-25"],[1,"flex-25","m-l-5","left"],[3,"ngClass"],["icon","stop"],[1,"m-l-5","status"],["completed","true",3,"externalId"],[1,"flex-75","left"],[1,"flex-50","m-l-5"],[1,"flex-50","r-amount"]],template:function(i,a){i&1&&(s(0,"table")(1,"tbody")(2,"tr")(3,"td",0)(4,"b"),c(5),p(6,"translate"),l()(),s(7,"td",1)(8,"div",2),T(9,"fa-icon",3),s(10,"span",4),c(11),l()()(),s(12,"td",0)(13,"b"),c(14),p(15,"translate"),l()(),s(16,"td",1),T(17,"mifosx-external-identifier",5),l()(),s(18,"tr")(19,"td",0)(20,"b"),c(21),p(22,"translate"),l()(),s(23,"td",0),c(24),p(25,"dateFormat"),l(),s(26,"td",0)(27,"b"),c(28),p(29,"translate"),l()(),s(30,"td",0),c(31),p(32,"dateFormat"),l()(),s(33,"tr")(34,"td",0)(35,"b"),c(36),p(37,"translate"),l()(),s(38,"td",6)(39,"table")(40,"tbody")(41,"tr")(42,"td",7)(43,"b"),c(44),p(45,"translate"),l()(),s(46,"td",8),c(47),p(48,"formatNumber"),l()(),s(49,"tr")(50,"td",7)(51,"b"),c(52),p(53,"translate"),l()(),s(54,"td",8),c(55),p(56,"formatNumber"),l()(),s(57,"tr")(58,"td",7)(59,"b"),c(60),p(61,"translate"),l()(),s(62,"td",8),c(63),p(64,"formatNumber"),l()(),s(65,"tr")(66,"td",7)(67,"b"),c(68),p(69,"translate"),l()(),s(70,"td",8),c(71),p(72,"formatNumber"),l()(),s(73,"tr")(74,"td",7)(75,"b"),c(76),p(77,"translate"),l()(),s(78,"td",8),c(79),p(80,"formatNumber"),l()(),s(81,"tr")(82,"td",7)(83,"b"),c(84),p(85,"translate"),l()(),s(86,"td",8),c(87),p(88,"formatNumber"),l()()()()()()()()),i&2&&(o(5),v("",m(6,23,"labels.inputs.Status")," :"),o(3),x("ngClass",a.itemStatus(a.transferData.status)),o(3),b(a.transferData.status),o(3),v("",m(15,25,"labels.inputs.Owner External Id")," :"),o(3),x("externalId",ce(a.transferData.owner.externalId)),o(4),v("",m(22,27,"labels.inputs.Settlement Date")," :"),o(3),v(" ",m(25,29,a.transferData.settlementDate)," "),o(4),v("",m(29,31,"labels.inputs.Effective Date")," :"),o(3),v(" ",m(32,33,a.transferData.effectiveFrom)," "),o(5),v("",m(37,35,"labels.inputs.Details")," :"),o(8),v("",m(45,37,"labels.inputs.Principal Outstanding")," :"),o(3),b(m(48,39,a.transferData.details.totalPrincipalOutstanding)),o(5),v("",m(53,41,"labels.inputs.Interest Outstanding")," :"),o(3),b(m(56,43,a.transferData.details.totalInterestOutstanding)),o(5),v("",m(61,45,"labels.inputs.Fees Outstanding")," :"),o(3),v(" ",m(64,47,a.transferData.details.totalFeeChargesOutstanding)," "),o(5),v("",m(69,49,"labels.inputs.Penalties Outstanding")," :"),o(3),v(" ",m(72,51,a.transferData.details.totalPenaltyChargesOutstanding)," "),o(5),v("",m(77,53,"labels.inputs.Outstanding")," :"),o(3),b(m(80,55,a.transferData.details.totalOutstanding)),o(5),v("",m(85,57,"labels.inputs.Overpaid")," :"),o(3),b(m(88,59,a.transferData.details.totalOverpaid)))},dependencies:[wt,ca,Tt,un,Va,En,Pt,hn],styles:[".asset-transfer-container[_ngcontent-%COMP%]{height:150px}.asset-transfer-container[_ngcontent-%COMP%] .status[_ngcontent-%COMP%]{color:#000}"]})}}return t})();var slt=(()=>{class t{static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275mod=gp({type:t})}static{this.\u0275inj=fp({imports:[f1,c1,Pg,r1,Bf,Km,Np,kp,Fp,Rp,wm,Dm,Sm,ho,i0,Pm,ym,Tm,Am,Mm,Om,Im,Em,Nm,a0,km,o0,Fm,Rm,r0,s0,Oo,Io,Eo,nl,l0,Bm,jm,zm,qm,Um,Hm,Gm,Wm,$m,c0,p0,Oc,Ym,Zm,m0,d0,u0,f0,h0,Lm,g0,_0,y0,el,Jm,Vm,Ss,S0,D0,Xm,Qm,w0,Ag,x0,t0,e0,T0,n0,Ic]})}}return t})();export{slt as LoansModule}; + `,Ye(10,67,a.loansAccount.productId,a.loansAccountTemplate.productOptions,"id","name")))("chars",60),o(2),O(a.loansAccount.loanOfficerId?11:-1),o(),O(a.loansAccount.loanPurposeId?12:-1),o(),O(a.loansAccount.fundId?13:-1),o(3),v("",m(17,72,"labels.inputs.Submitted on"),":"),o(3),b(m(20,74,a.loansAccount.submittedOnDate)),o(4),v("",m(24,76,"labels.inputs.Disbursement on"),":"),o(3),b(m(27,78,a.loansAccount.expectedDisbursementDate)),o(2),O(a.loansAccount.externalId?28:-1),o(),O(a.activeClientMembers?29:-1),o(2),b(m(32,80,"labels.heading.Terms")),o(5),v("",m(37,82,"labels.inputs.Principal"),":"),o(3),v(" ",Ye(40,84,a.loansAccount.principalAmount,a.loansAccountProductTemplate.currency.code,"symbol-narrow","1.2-2")," "),o(3),b(a.loansAccountProductTemplate.currency.code),o(3),v("",m(46,89,"labels.inputs.Loan Term"),":"),o(3),$t("",a.loansAccount.loanTermFrequency," ",Ye(49,91,a.loansAccount.loanTermFrequencyType,a.loansAccountProductTemplate.termFrequencyTypeOptions,"id","name")),o(4),v("",m(53,96,"labels.inputs.Number of repayments"),":"),o(3),b(a.loansAccount.numberOfRepayments),o(3),v("",m(59,98,"labels.inputs.Repaid every"),":"),o(3),Qs("",a.loansAccount.repaymentEvery," ",Ye(62,100,a.loansAccount.repaymentFrequencyType,a.loansAccountProductTemplate.termFrequencyTypeOptions,"id","name")," ",Ye(63,105,a.loansAccount.repaymentFrequencyNthDayType,a.loansAccountProductTemplate.repaymentFrequencyNthDayTypeOptions,"id","name")," ",Ye(64,110,a.loansAccount.repaymentFrequencyDayOfWeekType,a.loansAccountProductTemplate.repaymentFrequencyDaysOfWeekTypeOptions,"id","name")),o(4),O(a.productEnableDownPayment?65:-1),o(),O(a.loansAccount.repaymentsStartingFromDate?66:-1),o(),O(a.loansAccount.interestChargedFromDate?67:-1),o(),O(a.loansAccount.interestRatePerPeriod?68:-1),o(),O(a.loansAccount.interestType?69:-1),o(),O(a.loansAccount.isEqualAmortization?70:-1),o(3),b(m(74,115,"labels.inputs.Amortization")),o(3),b(Ye(77,117,a.loansAccount.amortizationType,a.loansAccountProductTemplate.amortizationTypeOptions,"id","value")),o(4),v("",m(81,122,"labels.inputs.Interest calculation period"),": "),o(3),b(Ye(84,124,a.loansAccount.interestCalculationPeriodType,a.loansAccountProductTemplate.interestCalculationPeriodTypeOptions,"id","value")),o(2),O(a.loansAccount.allowPartialPeriodInterestCalculation?85:-1),o(),O(a.loansAccount.inArrearsTolerance?86:-1),o(),O(a.loansAccount.graceOnInterestCharged?87:-1),o(3),v("",m(91,129,"labels.inputs.Repayment strategy"),": "),o(3),b(Ye(94,131,a.loansAccount.transactionProcessingStrategyCode,a.loansAccountProductTemplate.transactionProcessingStrategyOptions,"code","name")),o(4),v(" ",m(98,136,"labels.inputs.Installment Amount")," "),o(3),v(" ",m(101,138,a.loansAccount.fixedEmiAmount)," "),o(4),v(" ",m(105,140,"labels.inputs.Balloon Repayment Amount")," "),o(3),v(" ",m(108,142,a.loansAccount.balloonRepaymentAmount)," "),o(3),b(m(111,144,"labels.heading.Moratorium")),o(3),O(a.loansAccount.graceOnPrincipalPayment?113:-1),o(),O(a.loansAccount.graceOnInterestPayment?114:-1),o(),O(a.loansAccount.graceOnArrearsAgeing?115:-1),o(3),v(" ",m(119,146,"labels.inputs.Enable installment level Delinquency")," "),o(3),v(" ",m(122,148,a.loansAccount.enableInstallmentLevelDelinquency)," "),o(2),O(a.loansAccount.isTopup?123:-1),o(3),v("",m(127,150,"labels.inputs.Recalculate Interest"),": "),o(3),b(m(130,152,a.loansAccountProductTemplate==null?null:a.loansAccountProductTemplate.isInterestRecalculationEnabled)),o(2),O(a.loansAccountProductTemplate!=null&&a.loansAccountProductTemplate.daysInMonthType?131:-1),o(),O(a.loansAccount.charges.length?132:-1),o(),O(a.loansAccountProductTemplate.overdueCharges.length?133:-1),o(4),v(" ",m(138,154,"labels.buttons.Previous")," "),o(2),x("routerLink",Ut(160,$I)),o(),v(" ",m(141,156,"labels.buttons.Cancel")," "),o(3),v(" ",m(144,158,"labels.buttons.Submit")," "))},dependencies:[wt,Tt,ae,Wt,Mp,Va,$o,bn,yn,xn,Sn,vn,Dn,wn,Pn,Tn,An,za,un,Sa,En,Pt,Pp,hn,Hr],styles:["table[_ngcontent-%COMP%]{width:100%}.mat-elevation-z1[_ngcontent-%COMP%]{margin:1em 0 1.5em}h2[_ngcontent-%COMP%], h3[_ngcontent-%COMP%], h4[_ngcontent-%COMP%]{margin:0;font-weight:500}span[_ngcontent-%COMP%]{margin:.5em 0}mat-divider[_ngcontent-%COMP%]{margin:0 0 .5em}.margin-t[_ngcontent-%COMP%]{margin-top:1em}"]})}}return t})();var KE=["dtloan"];function JE(t,n){t&1&&T(0,"fa-icon",20)}function XE(t,n){t&1&&T(0,"fa-icon",20)}function QE(t,n){t&1&&T(0,"fa-icon",21)}function t7(t,n){t&1&&T(0,"fa-icon",22)}function e7(t,n){t&1&&T(0,"fa-icon",23)}function n7(t,n){t&1&&(c(0),p(1,"translate")),t&2&&b(m(1,1,"labels.inputs.DETAILS"))}function i7(t,n){t&1&&(c(0),p(1,"translate")),t&2&&b(m(1,1,"labels.inputs.TERMS"))}function a7(t,n){t&1&&(c(0),p(1,"translate")),t&2&&b(m(1,1,"labels.inputs.CHARGES"))}function o7(t,n){t&1&&(c(0),p(1,"translate")),t&2&&b(m(1,1,"labels.inputs.REPAYMENT SCHEDULE"))}function r7(t,n){if(t&1&&(s(0,"mat-step",18),k(1,o7,2,3,"ng-template",14),T(2,"mifosx-loans-account-schedule-step",24,4),l()),t&2){let e=P();o(2),x("loansAccountTemplate",e.loansAccountTemplate)("loansAccountProductTemplate",e.loansAccountProductTemplate)("loansAccount",e.loansAccount)("currencyCode",e.currencyCode)}}function l7(t,n){if(t&1&&c(0),t&2){let e=P().$implicit;b(e.registeredTableName)}}function s7(t,n){if(t&1&&(s(0,"mat-step"),k(1,l7,1,1,"ng-template",14),T(2,"mifosx-loans-account-datatable-step",25,5),l()),t&2){let e=n.$implicit;o(2),x("datatableData",e)}}function c7(t,n){t&1&&(c(0),p(1,"translate")),t&2&&b(m(1,1,"labels.inputs.PREVIEW"))}function p7(t,n){if(t&1){let e=xt();s(0,"mat-step",19),k(1,c7,2,3,"ng-template",14),s(2,"mifosx-loans-account-preview-step",26),it("submitEvent",function(){mt(e);let a=P();return dt(a.submit())}),l()()}if(t&2){let e=P();o(2),x("loansAccountTemplate",e.loansAccountTemplate)("loansAccountProductTemplate",e.loansAccountProductTemplate)("loansAccount",e.loansAccount)}}var s0=(()=>{class t{constructor(){this.route=A(Et),this.router=A(le),this.loansService=A(Mt),this.settingsService=A(oe),this.clientService=A(ns),this.loansAccountProductTemplate=null,this.datatables=[],this.route.data.subscribe(e=>{this.loansAccountTemplate=e.loansAccountTemplate})}setTemplate(e){this.loansAccountProductTemplate=e,this.currencyCode=this.loansAccountProductTemplate.currency.code;let i=this.loansAccountTemplate.clientId;i?this.clientService.getCollateralTemplate(i).subscribe(d=>{this.collateralOptions=d}):console.error("No collateral data requested from Fineract, collateral might misbehave");let a=this.loansAccountTemplate.clientId?this.loansAccountTemplate.clientId:this.loansAccountTemplate.group.id,r=!this.loansAccountTemplate.clientId,u=this.loansAccountProductTemplate.loanProductId;this.loansService.getLoansAccountTemplateResource(a,r,u).subscribe(d=>{this.multiDisburseLoan=d.multiDisburseLoan}),this.setDatatables()}setDatatables(){this.datatables=[],this.loansAccountProductTemplate.datatables&&this.loansAccountProductTemplate.datatables.forEach(e=>{this.datatables.push(e)})}get loansAccountDetailsForm(){return this.loansAccountDetailsStep.loansAccountDetailsForm}get loansAccountTermsForm(){return this.loansAccountTermsStep.loansAccountTermsForm}get loansAccountFormValid(){return this.loansAccountDetailsForm.valid&&this.loansAccountTermsForm.valid}get loansSavingsAccountLinked(){return this.loansAccountDetailsStep.loansAccountDetailsForm.get("linkAccountId").value}get loanPrincipal(){return this.loansAccountTermsStep.loansAccountTermsForm.value.principal}get loansAccount(){return ie(ie(ie(ie(ie({},this.loansAccountDetailsStep.loansAccountDetails),this.loansAccountTermsStep.loansAccountTerms),this.loansAccountChargesStep.loansAccountCharges),this.loansAccountTermsStep.loanCollateral),this.loansAccountTermsStep.disbursementData)}submit(){let e=this.settingsService.language.code,i=this.settingsService.dateFormat,a=this.loansService.buildLoanRequestPayload(this.loansAccount,this.loansAccountTemplate,this.loansAccountProductTemplate.calendarOptions,e,i);if(this.loansAccountProductTemplate.datatables&&this.loansAccountProductTemplate.datatables.length>0){let r=[];this.loanDatatables.forEach(u=>{r.push(u.payload)}),a.datatables=r}this.loansService.createLoansAccount(a).subscribe(r=>{this.router.navigate(["../",r.resourceId,"general"],{relativeTo:this.route})})}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=Dt({type:t,selectors:[["mifosx-create-loans-account"]],viewQuery:function(i,a){if(i&1&&(mi(Oo,7),mi(Io,7),mi(Eo,7),mi(KE,5)),i&2){let r;di(r=ui())&&(a.loansAccountDetailsStep=r.first),di(r=ui())&&(a.loansAccountTermsStep=r.first),di(r=ui())&&(a.loansAccountChargesStep=r.first),di(r=ui())&&(a.loanDatatables=r)}},decls:24,vars:15,consts:[["loansAccountStepper",""],["loansAccountDetailsForm",""],["loanAccountTerms",""],["loanAccountCharges",""],["loanAccountSchedule",""],["dtloan",""],[1,"container"],["orientation","vertical","labelPosition","bottom",1,"mat-elevation-z8",3,"linear"],["matStepperIcon","number"],["matStepperIcon","edit"],["matStepperIcon","done"],["matStepperIcon","error"],["matStepperIcon","preview"],[3,"stepControl"],["matStepLabel",""],[3,"loansAccountProductTemplate","loansAccountTemplate"],[3,"loansAccountProductTemplate","loansAccountTemplate","collateralOptions","loansAccountFormValid","loanPrincipal"],[3,"loansAccountProductTemplate","loansAccountTemplate","loansAccountFormValid","loansSavingsAccountLinked"],["state","repayment","completed",""],["state","preview","completed",""],["icon","pencil-alt","size","sm"],["icon","check","size","sm"],["icon","exclamation-triangle","size","lg"],["icon","eye","size","sm"],[3,"loansAccountTemplate","loansAccountProductTemplate","loansAccount","currencyCode"],[3,"datatableData"],[3,"submitEvent","loansAccountTemplate","loansAccountProductTemplate","loansAccount"]],template:function(i,a){if(i&1){let r=xt();s(0,"div",6)(1,"mat-stepper",7,0),k(3,JE,1,0,"ng-template",8)(4,XE,1,0,"ng-template",9)(5,QE,1,0,"ng-template",10)(6,t7,1,0,"ng-template",11)(7,e7,1,0,"ng-template",12),s(8,"mat-step",13),k(9,n7,2,3,"ng-template",14),s(10,"mifosx-loans-account-details-step",15,1),it("loansAccountProductTemplate",function(d){return mt(r),dt(a.setTemplate(d))}),l()(),s(12,"mat-step",13),k(13,i7,2,3,"ng-template",14),T(14,"mifosx-loans-account-terms-step",16,2),l(),s(16,"mat-step"),k(17,a7,2,3,"ng-template",14),T(18,"mifosx-loans-account-charges-step",17,3),l(),M(20,r7,4,4,"mat-step",18),ue(21,s7,4,1,"mat-step",null,Ce),M(23,p7,3,3,"mat-step",19),l()()}if(i&2){let r=Lt(11);o(),x("linear",!1),o(7),x("stepControl",r),o(2),x("loansAccountTemplate",a.loansAccountTemplate),o(2),x("stepControl",a.loansAccountTermsForm),o(2),x("loansAccountProductTemplate",a.loansAccountProductTemplate)("loansAccountTemplate",a.loansAccountTemplate)("collateralOptions",a.collateralOptions)("loansAccountFormValid",a.loansAccountFormValid)("loanPrincipal",a.loanPrincipal),o(4),x("loansAccountProductTemplate",a.loansAccountProductTemplate)("loansAccountTemplate",a.loansAccountTemplate)("loansAccountFormValid",a.loansAccountFormValid)("loansSavingsAccountLinked",a.loansSavingsAccountLinked),o(2),O(a.loansAccountFormValid?20:-1),o(),fe(a.datatables),o(2),O(a.loansAccountFormValid?23:-1)}},dependencies:[wt,Tt,es,Ql,un,ts,Xl,Oo,Io,Eo,el,Ss,nl,Pt],encapsulation:2})}}return t})();var c0=(()=>{class t{constructor(){this.route=A(Et),this.loansService=A(Mt),this.settingsService=A(oe),this.entityType="loans",this.entityId=this.route.parent.snapshot.params.loanId,this.route.data.subscribe(e=>{this.getLoanDocumentsData(e.loanDocuments)})}ngOnInit(){this.route.parent.params.subscribe(e=>{this.entityId=e.loanId})}getLoanDocumentsData(e){e.forEach(i=>{i.docUrl=this.settingsService.serverUrl+"/loans/"+i.parentEntityId+"/documents/"+i.id+"/attachment?tenantIdentifier="+qf.fineractPlatformTenantId,i.fileName&&(i.fileName.toLowerCase().indexOf(".jpg")!==-1||i.fileName.toLowerCase().indexOf(".jpeg")!==-1||i.fileName.toLowerCase().indexOf(".png")!==-1)&&(i.fileIsImage=!0),i.type&&i.type.toLowerCase().indexOf("image")!==-1&&(i.fileIsImage=!0)}),this.entityDocuments=e}uploadDocument(e){return this.loansService.loadLoanDocument(this.entityId,e)}deleteDocument(e){this.loansService.deleteLoanDocument(this.entityId,e).subscribe(i=>{})}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=Dt({type:t,selectors:[["mifosx-loan-documents-tab"]],decls:1,vars:5,consts:[[3,"entityType","entityId","entityDocuments","callbackUpload","callbackDelete"]],template:function(i,a){i&1&&T(0,"mifosx-entity-documents-tab",0),i&2&&x("entityType",a.entityType)("entityId",a.entityId)("entityDocuments",a.entityDocuments)("callbackUpload",a.uploadDocument)("callbackDelete",a.deleteDocument)},dependencies:[wt,Tt,s1],styles:["table[_ngcontent-%COMP%]{width:100%;margin-top:3%}table[_ngcontent-%COMP%] .document-action-button[_ngcontent-%COMP%]{min-width:26px;padding:0 6px;margin:4px;line-height:25px}.tab-container[_ngcontent-%COMP%]{padding:1%;margin:1%}"]})}}return t})();var m7=["instructionsTable"];function d7(t,n){t&1&&(s(0,"th",16),c(1),p(2,"translate"),l()),t&2&&(o(),b(m(2,1,"labels.inputs.Client")))}function u7(t,n){if(t&1&&(s(0,"td",17),c(1),l()),t&2){let e=n.$implicit;o(),$t(" ",e.fromClient.displayName,"-",e.fromClient.id," ")}}function f7(t,n){t&1&&(s(0,"th",16),c(1),p(2,"translate"),l()),t&2&&(o(),b(m(2,1,"labels.inputs.From Account")))}function h7(t,n){if(t&1&&(s(0,"td",17),c(1),l()),t&2){let e=n.$implicit;o(),$t(" ",e.fromAccount.accountNo," (",e.fromAccountType.value,") ")}}function g7(t,n){t&1&&(s(0,"th",16),c(1),p(2,"translate"),l()),t&2&&(o(),b(m(2,1,"labels.inputs.Beneficiary")))}function _7(t,n){if(t&1&&(s(0,"span"),c(1),l()),t&2){let e=P().$implicit;o(),v(" ",e.toClient.displayName," ")}}function C7(t,n){t&1&&(s(0,"span"),c(1),p(2,"translate"),l()),t&2&&(o(),b(m(2,1,"labels.inputs.Own Account")))}function b7(t,n){if(t&1&&(s(0,"td",17),M(1,_7,2,1,"span"),M(2,C7,3,3,"span"),l()),t&2){let e=n.$implicit;o(),O(e.fromClient.id!==e.toClient.id?1:-1),o(),O(e.fromClient.id===e.toClient.id?2:-1)}}function v7(t,n){t&1&&(s(0,"th",16),c(1),p(2,"translate"),l()),t&2&&(o(),b(m(2,1,"labels.inputs.To Account")))}function x7(t,n){if(t&1&&(s(0,"td",17),c(1),l()),t&2){let e=n.$implicit;o(),$t(" ",e.toAccount.accountNo," (",e.toAccountType.value,") ")}}function y7(t,n){t&1&&(s(0,"th",16),c(1),p(2,"translate"),l()),t&2&&(o(),b(m(2,1,"labels.inputs.Amount")))}function S7(t,n){if(t&1&&(s(0,"td",17),c(1),l()),t&2){let e=n.$implicit;o(),$t("",e.instructionType.value,"/",e.amount)}}function D7(t,n){t&1&&(s(0,"th",16),c(1),p(2,"translate"),l()),t&2&&(o(),b(m(2,1,"labels.inputs.Validity")))}function w7(t,n){if(t&1&&(s(0,"td",17),c(1),p(2,"dateFormat"),p(3,"dateFormat"),l()),t&2){let e=n.$implicit;o(),$t(" ",m(2,2,e.validFrom)," to ",m(3,4,e.validTill)," ")}}function T7(t,n){t&1&&(s(0,"th",16),c(1),p(2,"translate"),l()),t&2&&(o(),b(m(2,1,"labels.inputs.Actions")))}function P7(t,n){t&1&&(s(0,"button",19),p(1,"translate"),T(2,"i",20),l()),t&2&&x("matTooltip",ce(m(1,2,"tooltips.Edit Standing Instruction")))}function A7(t,n){t&1&&(s(0,"span"),k(1,P7,3,4,"button",18),l()),t&2&&(o(),x("mifosxHasPermission","UPDATE_STANDINGINSTRUCTION"))}function M7(t,n){if(t&1){let e=xt();s(0,"button",22),p(1,"translate"),it("click",function(){mt(e);let a=P(2).$implicit,r=P();return dt(r.deleteStandingInstruction(a.id))}),T(2,"i",23),l()}t&2&&x("matTooltip",ce(m(1,2,"tooltips.Delete Standing Instruction")))}function O7(t,n){t&1&&(s(0,"span"),k(1,M7,3,4,"button",21),l()),t&2&&(o(),x("mifosxHasPermission","DELETE_STANDINGINSTRUCTION"))}function I7(t,n){t&1&&(s(0,"button",19),p(1,"translate"),T(2,"i",24),l()),t&2&&x("matTooltip",ce(m(1,2,"tooltips.View Standing Instruction")))}function E7(t,n){if(t&1&&(s(0,"td",17),M(1,A7,2,1,"span"),M(2,O7,2,1,"span"),k(3,I7,3,4,"button",18),l()),t&2){let e=n.$implicit;o(),O(e.status.value!=="Deleted"?1:-1),o(),O(e.status.value!=="Deleted"?2:-1),o(),x("mifosxHasPermission","READ_STANDINGINSTRUCTION")}}function L7(t,n){t&1&&T(0,"tr",25)}function N7(t,n){t&1&&T(0,"tr",26)}var p0=(()=>{class t{constructor(){this.route=A(Et),this.loansService=A(Mt),this.dialog=A(Gn),this.accountTransfersService=A(g1),this.settingsService=A(oe),this.dataSource=new Li,this.displayedColumns=["client","fromAccount","beneficiary","toAccount","amount","validity","actions"],this.route.parent.data.subscribe(e=>{this.loanDetailsData=e.loanDetailsData})}ngOnInit(){this.getStandingInstructions()}getStandingInstructions(){let e=this.loanDetailsData.clientId,i=this.loanDetailsData.clientName,a=this.loanDetailsData.id,r=this.settingsService.language.code,u=this.settingsService.dateFormat;this.loansService.getStandingInstructions(e,i,a,r,u).subscribe(d=>{this.instructionsData=d.pageItems,this.dataSource.data=this.instructionsData,this.instructionTableRef.renderRows()})}deleteStandingInstruction(e){this.dialog.open(ra,{data:{deleteContext:`standing instruction id: ${e}`}}).afterClosed().subscribe(a=>{a.delete&&this.accountTransfersService.deleteStandingInstrucions(e).subscribe(()=>{})})}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=Dt({type:t,selectors:[["mifosx-standing-instructions-tab"]],viewQuery:function(i,a){if(i&1&&mi(m7,7),i&2){let r;di(r=ui())&&(a.instructionTableRef=r.first)}},decls:31,vars:6,consts:[["instructionsTable",""],[1,"tab-container","mat-typography"],[1,"m-b-10"],[1,"mat-elevation-z1","m-b-25"],["mat-table","",3,"dataSource"],["matColumnDef","client"],["mat-header-cell","",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","fromAccount"],["matColumnDef","beneficiary"],["matColumnDef","toAccount"],["matColumnDef","amount"],["matColumnDef","validity"],["matColumnDef","actions"],["mat-header-row","",4,"matHeaderRowDef"],["mat-row","",4,"matRowDef","matRowDefColumns"],["mat-header-cell",""],["mat-cell",""],["class","account-action-button","mat-raised-button","","color","primary",3,"matTooltip",4,"mifosxHasPermission"],["mat-raised-button","","color","primary",1,"account-action-button",3,"matTooltip"],[1,"fa","fa-edit"],["class","account-action-button","mat-raised-button","","color","warn",3,"matTooltip","click",4,"mifosxHasPermission"],["mat-raised-button","","color","warn",1,"account-action-button",3,"click","matTooltip"],[1,"fa","fa-times"],[1,"fa","fa-eye"],["mat-header-row",""],["mat-row",""]],template:function(i,a){i&1&&(s(0,"div",1)(1,"div",2)(2,"h3"),c(3),p(4,"translate"),l()(),s(5,"div",3)(6,"table",4,0),X(8,5),k(9,d7,3,3,"th",6)(10,u7,2,2,"td",7),Q(),X(11,8),k(12,f7,3,3,"th",6)(13,h7,2,2,"td",7),Q(),X(14,9),k(15,g7,3,3,"th",6)(16,b7,3,2,"td",7),Q(),X(17,10),k(18,v7,3,3,"th",6)(19,x7,2,2,"td",7),Q(),X(20,11),k(21,y7,3,3,"th",6)(22,S7,2,2,"td",7),Q(),X(23,12),k(24,D7,3,3,"th",6)(25,w7,4,6,"td",7),Q(),X(26,13),k(27,T7,3,3,"th",6)(28,E7,4,3,"td",7),Q(),k(29,L7,1,0,"tr",14)(30,N7,1,0,"tr",15),l()()()),i&2&&(o(3),b(m(4,4,"labels.heading.All Standing Instructions")),o(3),x("dataSource",a.dataSource),o(23),x("matHeaderRowDef",a.displayedColumns),o(),x("matRowDefColumns",a.displayedColumns))},dependencies:[wt,Tt,Wt,Ae,bn,yn,xn,Sn,vn,Dn,Oi,wn,Pn,Tn,An,En,Pt],styles:[".tab-container[_ngcontent-%COMP%]{padding:1%;margin:1%}.tab-container[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{margin:1% auto}.tab-container[_ngcontent-%COMP%] .action-button[_ngcontent-%COMP%]{margin-left:auto}.tab-container[_ngcontent-%COMP%] table[_ngcontent-%COMP%]{width:100%}.tab-container[_ngcontent-%COMP%] table[_ngcontent-%COMP%] .account-action-button[_ngcontent-%COMP%]{min-width:26px;padding:0 6px;margin:4px;line-height:25px}"]})}}return t})();function k7(t,n){t&1&&T(0,"fa-icon",15)}function F7(t,n){t&1&&T(0,"fa-icon",15)}function R7(t,n){t&1&&T(0,"fa-icon",16)}function B7(t,n){t&1&&T(0,"fa-icon",17)}function q7(t,n){t&1&&T(0,"fa-icon",18)}function j7(t,n){t&1&&(c(0),p(1,"translate")),t&2&&b(m(1,1,"labels.inputs.DETAILS"))}function z7(t,n){t&1&&(c(0),p(1,"translate")),t&2&&b(m(1,1,"labels.inputs.TERMS"))}function V7(t,n){t&1&&(c(0),p(1,"translate")),t&2&&b(m(1,1,"labels.inputs.CHARGES"))}function U7(t,n){t&1&&(c(0),p(1,"translate")),t&2&&b(m(1,1,"labels.inputs.REPAYMENT SCHEDULE"))}function H7(t,n){t&1&&(c(0),p(1,"translate")),t&2&&b(m(1,1,"labels.inputs.PREVIEW"))}function G7(t,n){if(t&1){let e=xt();s(0,"mat-step",14),k(1,H7,2,3,"ng-template",9),s(2,"mifosx-loans-account-preview-step",19),it("submitEvent",function(){mt(e);let a=P();return dt(a.submit())}),l()()}if(t&2){let e=P();o(2),x("loansAccountTemplate",e.loansAccountAndTemplate)("loansAccountProductTemplate",e.loansAccountProductTemplate)("loansAccount",e.loansAccount)}}var Oc=(()=>{class t{constructor(){this.route=A(Et),this.router=A(le),this.dateUtils=A(de),this.loansService=A(Mt),this.settingsService=A(oe),this.route.data.subscribe(e=>{this.loansAccountAndTemplate=e.loansAccountAndTemplate}),this.loanId=this.route.snapshot.params.loanId}setTemplate(e){this.loansAccountProductTemplate=e,this.currencyCode=this.loansAccountProductTemplate.currency.code,this.loansAccountProductTemplate.loanProductId&&this.loansService.getLoansCollateralTemplateResource(this.loansAccountProductTemplate.loanProductId).subscribe(i=>{this.collateralOptions=i.loanCollateralOptions})}get loansAccountDetailsForm(){return this.loansAccountDetailsStep.loansAccountDetailsForm}get loansAccountTermsForm(){return this.loansAccountTermsStep.loansAccountTermsForm}get loansAccountFormValidAndNotPristine(){return this.loansAccountDetailsForm.valid&&this.loansAccountTermsForm.valid&&(!this.loansAccountDetailsForm.pristine||!this.loansAccountTermsForm.pristine||!this.loansAccountTermsStep.pristine||!this.loansAccountChargesStep.pristine)}get loansAccount(){return ie(ie(ie(ie(ie({},this.loansAccountDetailsStep.loansAccountDetails),this.loansAccountTermsStep.loansAccountTerms),this.loansAccountChargesStep.loansAccountCharges),this.loansAccountTermsStep.loanCollateral),this.loansAccountTermsStep.disbursementData)}submit(){let e=this.settingsService.language.code,i=this.settingsService.dateFormat,a="individual",r=new Map;(this.loansAccount.charges??[]).forEach(d=>{let g=d.chargeId;g!=null&&r.set(g,d)});let u=ve(ie({},this.loansAccount),{clientId:this.loansAccountAndTemplate.clientId,charges:Array.from(r.values()).map(d=>{let g={chargeId:d.chargeId,amount:d.amount,dueDate:d.dueDate&&this.dateUtils.formatDate(d.dueDate,i)};return d.id&&d.id!==d.chargeId&&(g.id=d.id),g}),collateral:this.loansAccount.collateral.map(d=>({type:d.type,value:d.value,description:d.description})),disbursementData:this.loansAccount.disbursementData.map(d=>({expectedDisbursementDate:this.dateUtils.formatDate(d.expectedDisbursementDate,i),principal:d.principal})),interestChargedFromDate:this.dateUtils.formatDate(this.loansAccount.interestChargedFromDate,i),repaymentsStartingFromDate:this.dateUtils.formatDate(this.loansAccount.repaymentsStartingFromDate,i),submittedOnDate:this.dateUtils.formatDate(this.loansAccount.submittedOnDate,i),expectedDisbursementDate:this.dateUtils.formatDate(this.loansAccount.expectedDisbursementDate,i),dateFormat:i,locale:e,loanType:a});delete u.isValid,u.syncRepaymentsWithMeeting&&(u.calendarId=this.loansAccountProductTemplate.calendarOptions[0].id,delete u.syncRepaymentsWithMeeting),u.recalculationRestFrequencyDate&&(u.recalculationRestFrequencyDate=this.dateUtils.formatDate(this.loansAccount.recalculationRestFrequencyDate,i)),u.interestCalculationPeriodType===0&&(u.allowPartialPeriodInterestCalculation=!1),(!u.isLoanProductLinkedToFloatingRate||u.isLoanProductLinkedToFloatingRate===!1)&&delete u.isFloatingInterestRate,u.principal=u.principalAmount,delete u.principalAmount,delete u.multiDisburseLoan,u.allowPartialPeriodInterestCalcualtion=u.allowPartialPeriodInterestCalculation,delete u.allowPartialPeriodInterestCalculation,this.loansService.updateLoansAccount(this.loanId,u).subscribe(d=>{this.router.navigate(["../"],{relativeTo:this.route})})}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=Dt({type:t,selectors:[["mifosx-edit-loans-account"]],viewQuery:function(i,a){if(i&1&&(mi(Oo,7),mi(Io,7),mi(Eo,7)),i&2){let r;di(r=ui())&&(a.loansAccountDetailsStep=r.first),di(r=ui())&&(a.loansAccountTermsStep=r.first),di(r=ui())&&(a.loansAccountChargesStep=r.first)}},decls:21,vars:15,consts:[["loansAccountStepper",""],[1,"container"],["orientation","vertical","labelPosition","bottom",1,"mat-elevation-z8",3,"linear"],["matStepperIcon","number"],["matStepperIcon","edit"],["matStepperIcon","done"],["matStepperIcon","error"],["matStepperIcon","preview"],[3,"stepControl"],["matStepLabel",""],[3,"loansAccountProductTemplate","loansAccountTemplate"],[3,"loansAccountProductTemplate","loansAccountTemplate","collateralOptions"],[3,"loansAccountProductTemplate","loansAccountTemplate","loansAccountFormValid"],[3,"loansAccountTemplate","loansAccountProductTemplate","loansAccount","currencyCode"],["state","preview","completed",""],["icon","pencil-alt","size","sm"],["icon","check","size","sm"],["icon","exclamation-triangle","size","lg"],["icon","eye","size","sm"],[3,"submitEvent","loansAccountTemplate","loansAccountProductTemplate","loansAccount"]],template:function(i,a){if(i&1){let r=xt();s(0,"div",1)(1,"mat-stepper",2,0),k(3,k7,1,0,"ng-template",3)(4,F7,1,0,"ng-template",4)(5,R7,1,0,"ng-template",5)(6,B7,1,0,"ng-template",6)(7,q7,1,0,"ng-template",7),s(8,"mat-step",8),k(9,j7,2,3,"ng-template",9),s(10,"mifosx-loans-account-details-step",10),it("loansAccountProductTemplate",function(d){return mt(r),dt(a.setTemplate(d))}),l()(),s(11,"mat-step",8),k(12,z7,2,3,"ng-template",9),T(13,"mifosx-loans-account-terms-step",11),l(),s(14,"mat-step"),k(15,V7,2,3,"ng-template",9),T(16,"mifosx-loans-account-charges-step",12),l(),s(17,"mat-step"),k(18,U7,2,3,"ng-template",9),T(19,"mifosx-loans-account-schedule-step",13),l(),M(20,G7,3,3,"mat-step",14),l()()}i&2&&(o(),x("linear",!1),o(7),x("stepControl",a.loansAccountDetailsForm),o(2),x("loansAccountTemplate",a.loansAccountAndTemplate),o(),x("stepControl",a.loansAccountTermsForm),o(2),x("loansAccountProductTemplate",a.loansAccountProductTemplate)("loansAccountTemplate",a.loansAccountAndTemplate)("collateralOptions",a.collateralOptions),o(3),x("loansAccountProductTemplate",a.loansAccountProductTemplate)("loansAccountTemplate",a.loansAccountAndTemplate)("loansAccountFormValid",a.loansAccountFormValidAndNotPristine),o(3),x("loansAccountTemplate",a.loansAccountAndTemplate)("loansAccountProductTemplate",a.loansAccountProductTemplate)("loansAccount",a.loansAccount)("currencyCode",a.currencyCode),o(),O(a.loansAccountFormValidAndNotPristine?20:-1))},dependencies:[wt,Tt,es,Ql,un,ts,Xl,Oo,Io,Eo,el,nl,Pt],encapsulation:2})}}return t})();var W7=()=>["../"];function $7(t,n){if(t&1){let e=xt();s(0,"button",10),it("click",function(){mt(e);let a=P(2);return dt(a.editCharge())}),T(1,"fa-icon",11),c(2),p(3,"translate"),l()}t&2&&(o(2),v(" ",m(3,1,"labels.buttons.Edit")," "))}function Y7(t,n){if(t&1){let e=xt();s(0,"button",12),it("click",function(){mt(e);let a=P(3);return dt(a.payCharge())}),T(1,"fa-icon",13),c(2),p(3,"translate"),l()}t&2&&(o(2),v(" ",m(3,1,"labels.buttons.Pay")," "))}function Z7(t,n){t&1&&(s(0,"span"),k(1,Y7,4,3,"button",9),l()),t&2&&(o(),x("mifosxHasPermission","PAY_SAVINGSACCOUNTCHARGE"))}function K7(t,n){if(t&1){let e=xt();s(0,"button",10),it("click",function(){mt(e);let a=P(3);return dt(a.waiveCharge())}),T(1,"fa-icon",11),c(2),p(3,"translate"),l()}t&2&&(o(2),v(" ",m(3,1,"labels.buttons.Waive")," "))}function J7(t,n){t&1&&(s(0,"span"),k(1,K7,4,3,"button",8),l()),t&2&&(o(),x("mifosxHasPermission","WAIVE_SAVINGSACCOUNTCHARGE"))}function X7(t,n){if(t&1){let e=xt();s(0,"button",12),it("click",function(){mt(e);let a=P(2);return dt(a.adjustmentCharge())}),T(1,"fa-icon",14),c(2),p(3,"translate"),l()}t&2&&(o(2),v(" ",m(3,1,"labels.buttons.Adjustment")," "))}function Q7(t,n){if(t&1&&(s(0,"div",0),k(1,$7,4,3,"button",8),M(2,Z7,2,1,"span"),M(3,J7,2,1,"span"),s(4,"span"),k(5,X7,4,3,"button",9),l()()),t&2){let e=P();o(),x("mifosxHasPermission","WAIVE_SAVINGSACCOUNTCHARGE"),o(),O(e.allowPayCharge?2:-1),o(),O(e.allowWaive?3:-1),o(2),x("mifosxHasPermission","ADJUSTMENT_LOANCHARGE")}}function t8(t,n){if(t&1){let e=xt();s(0,"button",10),it("click",function(){mt(e);let a=P(2);return dt(a.editCharge())}),T(1,"fa-icon",16),c(2),p(3,"translate"),l()}t&2&&(o(2),v(" ",m(3,1,"labels.buttons.Edit")," "))}function e8(t,n){if(t&1){let e=xt();s(0,"button",17),it("click",function(){mt(e);let a=P(2);return dt(a.deleteCharge())}),T(1,"fa-icon",18),c(2),p(3,"translate"),l()}t&2&&(o(2),v(" ",m(3,1,"labels.buttons.Delete")," "))}function n8(t,n){t&1&&(s(0,"div",0),k(1,t8,4,3,"button",8)(2,e8,4,3,"button",15),l()),t&2&&(o(),x("mifosxHasPermission","UPDATE_SAVINGSACCOUNTCHARGE"),o(),x("mifosxHasPermission","DELETE_SAVINGSACCOUNTCHARGE"))}var m0=(()=>{class t{constructor(){this.loansService=A(Mt),this.route=A(Et),this.dateUtils=A(de),this.router=A(le),this.translateService=A(pa),this.dialog=A(Gn),this.settingsService=A(oe),this.allowPayCharge=!0,this.allowWaive=!0,this.route.data.subscribe(e=>{this.chargeData=e.loansAccountCharge,this.allowPayCharge=this.chargeData.chargePayable&&!this.chargeData.paid,this.allowWaive=!this.chargeData.chargeTimeType.waived,this.loansAccountData=e.loanDetailsData})}payCharge(){let e=[new la({controlName:"transactionDate",label:"Payment Date",value:"",type:"date",required:!0})],i={title:`Pay Charge ${this.chargeData.id}`,layout:{addButtonText:"Confirm"},formfields:e};this.dialog.open(_i,{data:i}).afterClosed().subscribe(r=>{if(r.data){let u=this.settingsService.language.code,d=this.settingsService.dateFormat,g=r.data.value.transactionDate,_={transactionDate:this.dateUtils.formatDate(g,d),dateFormat:d,locale:u};this.loansService.executeLoansAccountChargesCommand(this.chargeData.loanId,"pay",_,this.chargeData.id).subscribe(()=>{this.reload()})}})}waiveCharge(){this.dialog.open(ma,{data:{heading:this.translateService.instant("labels.heading.Waive Charge"),dialogContext:this.translateService.instant("labels.dialogContext.Are you sure you want to waive charge with id:")` ${this.chargeData.id}`,type:"Basic"}}).afterClosed().subscribe(i=>{i.confirm&&this.loansService.executeLoansAccountChargesCommand(this.chargeData.loanId,"waive",{},this.chargeData.id).subscribe(()=>{this.reload()})})}editCharge(){let e=[new Ti({controlName:"amount",label:"Amount",value:this.chargeData.amount||this.chargeData.amountOrPercentage,type:"number",required:!0}),new la({controlName:"dueDate",label:"Due Date",value:new Date(this.chargeData.dueDate),type:"date",maxDate:this.settingsService.maxAllowedDate,required:!0})],i={title:"Edit Charge",layout:{addButtonText:"Confirm"},formfields:e};this.dialog.open(_i,{data:i}).afterClosed().subscribe(r=>{if(r.data){let u=this.settingsService.language.code,d=this.settingsService.dateFormat,g=this.dateUtils.formatDate(r.data.value.dueDate,d),y={amount:r.data.value.amount,dueDate:g,dateFormat:d,locale:u};this.loansService.editLoansAccountCharge(this.loansAccountData.id,y,this.chargeData.id).subscribe(()=>{this.reload()})}})}deleteCharge(){this.dialog.open(ra,{data:{deleteContext:`charge id:${this.chargeData.id}`}}).afterClosed().subscribe(i=>{i.delete&&this.loansService.deleteLoansAccountCharge(this.loansAccountData.id,this.chargeData.id).subscribe(()=>{this.reload()})})}loanChargeColor(){return this.chargeData.paid?"paid":"not-paid"}adjustmentCharge(){this.router.navigate(["adjustment"],{relativeTo:this.route})}reload(){let e=this.loansAccountData.clientId,i=this.router.url;this.router.navigateByUrl(`/clients/${e}/loans-accounts`,{skipLocationChange:!0}).then(()=>this.router.navigate([i]))}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=Dt({type:t,selectors:[["mifosx-view-charge"]],decls:72,vars:64,consts:[[1,"layout-row","align-end","gap-2percent","layout-xs-column","container","m-b-20"],[1,"container"],[1,"layout-row-wrap"],[1,"flex-100",3,"ngClass"],[1,"flex-50","mat-body-strong"],[1,"flex-50"],[1,"layout-row","layout-align-center","gap-2percent","column-on-mobile"],["type","button","mat-raised-button","","color","primary",3,"routerLink"],["mat-raised-button","","color","primary",3,"click",4,"mifosxHasPermission"],["mat-raised-button","","color","accent",3,"click",4,"mifosxHasPermission"],["mat-raised-button","","color","primary",3,"click"],["icon","flag",1,"m-r-10"],["mat-raised-button","","color","accent",3,"click"],["icon","dollar-sign",1,"m-r-10"],["icon","pen",1,"m-r-10"],["mat-raised-button","","color","warn",3,"click",4,"mifosxHasPermission"],["icon","edit",1,"m-r-10"],["mat-raised-button","","color","warn",3,"click"],["icon","trash",1,"m-r-10"]],template:function(i,a){i&1&&(M(0,Q7,6,4,"div",0),M(1,n8,3,2,"div",0),s(2,"div",1)(3,"mat-card")(4,"mat-card-content")(5,"div",2),T(6,"div",3),s(7,"div",4),c(8),p(9,"translate"),l(),s(10,"div",5),c(11),l(),s(12,"div",4),c(13),p(14,"translate"),l(),s(15,"div",5),c(16),l(),s(17,"div",4),c(18),p(19,"translate"),l(),s(20,"div",5),c(21),l(),s(22,"div",4),c(23),p(24,"translate"),l(),s(25,"div",5),c(26),l(),s(27,"div",4),c(28),p(29,"translate"),l(),s(30,"div",5),c(31),p(32,"dateFormat"),l(),s(33,"div",4),c(34),p(35,"translate"),l(),s(36,"div",5),c(37),l(),s(38,"div",4),c(39),p(40,"translate"),l(),s(41,"div",5),c(42),p(43,"formatNumber"),l(),s(44,"div",4),c(45),p(46,"translate"),l(),s(47,"div",5),c(48),p(49,"formatNumber"),l(),s(50,"div",4),c(51),p(52,"translate"),l(),s(53,"div",5),c(54),p(55,"formatNumber"),l(),s(56,"div",4),c(57),p(58,"translate"),l(),s(59,"div",5),c(60),p(61,"formatNumber"),l(),s(62,"div",4),c(63),p(64,"translate"),l(),s(65,"div",5),c(66),p(67,"dateFormat"),l()(),s(68,"div",6)(69,"button",7),c(70),p(71,"translate"),l()()()()()),i&2&&(O(a.loansAccountData.status.value==="Active"&&a.chargeData.amountOutstanding!==0?0:-1),o(),O(a.loansAccountData.status.value==="Submitted and pending approval"?1:-1),o(5),x("ngClass",a.loanChargeColor()),o(2),v(" ",m(9,27,"labels.inputs.name")," "),o(3),v(" ",a.chargeData.name," "),o(2),v(" ",m(14,29,"labels.inputs.Charge Type")," "),o(3),v(" ",a.chargeData.penalty?"Penalty":"Fees"," "),o(2),v(" ",m(19,31,"labels.inputs.Currency")," "),o(3),v(" ",a.chargeData.currency.displayLabel," "),o(2),v(" ",m(24,33,"labels.inputs.Payment due at")," "),o(3),v(" ",a.chargeData.chargeTimeType.value," "),o(2),v(" ",m(29,35,"labels.inputs.Payment due as of")," "),o(3),v(" ",m(32,37,a.chargeData.dueDate)," "),o(3),v(" ",m(35,39,"labels.inputs.Calculation Type")," "),o(3),v(" ",a.chargeData.chargeCalculationType.value," "),o(2),v(" ",m(40,41,"labels.inputs.Due")," "),o(3),v(" ",m(43,43,a.chargeData.amount)," "),o(3),v(" ",m(46,45,"labels.inputs.Paid")," "),o(3),v(" ",m(49,47,a.chargeData.amountPaid)," "),o(3),v(" ",m(52,49,"labels.inputs.Waived")," "),o(3),v(" ",m(55,51,a.chargeData.amountWaived)," "),o(3),v(" ",m(58,53,"labels.inputs.Outstanding")," "),o(3),v(" ",m(61,55,a.chargeData.amountOutstanding)," "),o(3),v(" ",m(64,57,"labels.inputs.Submitted On Date")," "),o(3),v(" ",m(67,59,a.chargeData.submittedOnDate)," "),o(3),x("routerLink",Ut(63,W7)),o(),v(" ",m(71,61,"labels.buttons.Back")," "))},dependencies:[wt,ca,Tt,ae,xe,Oe,Wt,Ae,un,En,Pt,hn],styles:["body[_ngcontent-%COMP%] table[_ngcontent-%COMP%] tbody[_ngcontent-%COMP%] tr[_ngcontent-%COMP%]:nth-child(2n){background-color:#f2f2f2}.bg-black[_ngcontent-%COMP%]{background-color:#000}.bg-light-grey[_ngcontent-%COMP%]{background-color:#e5e5e5}.bg-medium-grey[_ngcontent-%COMP%]{background-color:#ccc}.bg-grey[_ngcontent-%COMP%]{background-color:#999}.bg-dark-grey[_ngcontent-%COMP%]{background-color:#222}.bg-white[_ngcontent-%COMP%], .bg-fff[_ngcontent-%COMP%]{background-color:#fff}.bg-none[_ngcontent-%COMP%], .no-bg[_ngcontent-%COMP%]{background:none;background-image:none;background-color:transparent}.bg-facebook[_ngcontent-%COMP%]{background-color:#47639e}.bg-twitter[_ngcontent-%COMP%]{background-color:#02a8f3}body[_ngcontent-%COMP%] table[_ngcontent-%COMP%]{border:1px solid rgba(0,0,0,.12)}.no-border[_ngcontent-%COMP%]{border:none}.no-border-t[_ngcontent-%COMP%]{border-top:none}.no-border-r[_ngcontent-%COMP%]{border-right:none}.no-border-b[_ngcontent-%COMP%]{border-bottom:none}.no-border-l[_ngcontent-%COMP%]{border-left:none}.no-border-lr[_ngcontent-%COMP%], .no-border-rl[_ngcontent-%COMP%]{border-left:none;border-right:none}.no-border-tb[_ngcontent-%COMP%], .no-border-bt[_ngcontent-%COMP%]{border-top:none;border-bottom:none}.no-border-tl[_ngcontent-%COMP%], .no-border-lt[_ngcontent-%COMP%]{border-top:none;border-left:none}.no-border-tr[_ngcontent-%COMP%], .no-border-rt[_ngcontent-%COMP%]{border-top:none;border-right:none}.no-border-bl[_ngcontent-%COMP%], .no-border-lb[_ngcontent-%COMP%]{border-bottom:none;border-left:none}.no-border-br[_ngcontent-%COMP%], .no-border-rb[_ngcontent-%COMP%]{border-bottom:none;border-right:none}.border-dashed[_ngcontent-%COMP%], .border-dotted[_ngcontent-%COMP%]{border-style:dashed}.border-black[_ngcontent-%COMP%]{border-color:#000}.border-light-grey[_ngcontent-%COMP%]{border-color:#e5e5e5}.border-medium-grey[_ngcontent-%COMP%]{border-color:#ccc}.border-grey[_ngcontent-%COMP%]{border-color:#999}.border-dark-grey[_ngcontent-%COMP%]{border-color:#2222}.border-white[_ngcontent-%COMP%], .border-fff[_ngcontent-%COMP%]{border-color:#fff}.no-border-radius[_ngcontent-%COMP%]{border-radius:0}.radius3[_ngcontent-%COMP%]{border-radius:3px}.radius5[_ngcontent-%COMP%]{border-radius:5px}.radius10[_ngcontent-%COMP%]{border-radius:10px}.column-mandatory[_ngcontent-%COMP%]{color:#5cb85c;text-align:center}.not-column-mandatory[_ngcontent-%COMP%]{color:#666f73;text-align:center}.cdk-drag-placeholder[_ngcontent-%COMP%]{background:#3498db}.yes[_ngcontent-%COMP%]{color:#5cb85c!important;background-color:#5cb85c;height:4px;cursor:none}.no[_ngcontent-%COMP%]{color:red;background-color:red;height:4px;cursor:none}.strike[_ngcontent-%COMP%]{text-decoration:line-through;color:red}.transfer[_ngcontent-%COMP%]{color:#16a085}.linked[_ngcontent-%COMP%]{color:#4461e2}.accrual[_ngcontent-%COMP%]{color:#999}.fa-question[_ngcontent-%COMP%]{color:#4461e2}.enabled[_ngcontent-%COMP%]{color:#32cd32}.disabled[_ngcontent-%COMP%]{color:#f44366}.v-mid[_ngcontent-%COMP%], .v-m[_ngcontent-%COMP%]{vertical-align:middle}.v-top[_ngcontent-%COMP%], .v-t[_ngcontent-%COMP%]{vertical-align:top}.v-bottom[_ngcontent-%COMP%], .v-b[_ngcontent-%COMP%]{vertical-align:bottom}.v-super[_ngcontent-%COMP%]{vertical-align:super}.r-amount[_ngcontent-%COMP%]{text-align:right!important;padding-right:5px!important}.left[_ngcontent-%COMP%]{text-align:left!important}.right[_ngcontent-%COMP%]{text-align:right!important}.center[_ngcontent-%COMP%]{text-align:center!important}.amount-plus[_ngcontent-%COMP%]{color:#000}.amount-minus[_ngcontent-%COMP%]{color:#4461e2}.block[_ngcontent-%COMP%]{display:block}.inline[_ngcontent-%COMP%]{display:inline}.in-block[_ngcontent-%COMP%]{display:inline-block;zoom:1}.d-none[_ngcontent-%COMP%], .hide[_ngcontent-%COMP%], .hidden[_ngcontent-%COMP%]{display:none}.t-0[_ngcontent-%COMP%]{top:0}.b-0[_ngcontent-%COMP%]{bottom:0}.l-0[_ngcontent-%COMP%]{left:0}.r-0[_ngcontent-%COMP%]{right:0}.tb-0[_ngcontent-%COMP%]{top:0;bottom:0}.lr-0[_ngcontent-%COMP%]{left:0;right:0}.f-left[_ngcontent-%COMP%]{float:left}.f-right[_ngcontent-%COMP%]{float:right}.f-none[_ngcontent-%COMP%]{float:none}textarea[_ngcontent-%COMP%]{resize:both}textarea.vertical[_ngcontent-%COMP%], textarea.horizontal[_ngcontent-%COMP%]{resize:vertical}textarea.noresize[_ngcontent-%COMP%]{resize:none}.full-input[_ngcontent-%COMP%] input[_ngcontent-%COMP%], .full-input[_ngcontent-%COMP%] select[_ngcontent-%COMP%], .full-input[_ngcontent-%COMP%] textarea[_ngcontent-%COMP%]{width:100%}.normal[_ngcontent-%COMP%] input[_ngcontent-%COMP%], .normal[_ngcontent-%COMP%] select[_ngcontent-%COMP%], .normal[_ngcontent-%COMP%] textarea[_ngcontent-%COMP%], .full-input[_ngcontent-%COMP%] [type=checkbox][_ngcontent-%COMP%], .full-input[_ngcontent-%COMP%] [type=radio][_ngcontent-%COMP%]{width:auto}.mat-tab-body-content[_ngcontent-%COMP%]{margin-bottom:20px}.mat-datepicker-input[_ngcontent-%COMP%]{margin-top:5px;margin-bottom:5px}.loader-wrapper[_ngcontent-%COMP%]{height:100vh;width:100vw}.loader-wrapper[_ngcontent-%COMP%] .triangle[_ngcontent-%COMP%]{width:0;height:0;border-style:solid;position:absolute;animation:_ngcontent-%COMP%_rotate .8s infinite .2s}.loader-wrapper[_ngcontent-%COMP%] .bottom[_ngcontent-%COMP%]{border-width:0 90px 90px;border-color:transparent transparent #1fb050;bottom:calc(50% - 100px);left:calc(50% - 90px)}.loader-wrapper[_ngcontent-%COMP%] .top[_ngcontent-%COMP%]{border-width:90px 90px 0;border-color:#b4d575 transparent transparent;top:calc(50% - 100px);left:calc(50% - 90px)}.loader-wrapper[_ngcontent-%COMP%] .left[_ngcontent-%COMP%]{border-width:90px 0 90px 90px;border-color:transparent transparent transparent #1074b9;top:calc(50% - 90px);left:calc(50% - 100px)}.loader-wrapper[_ngcontent-%COMP%] .right[_ngcontent-%COMP%]{border-width:90px 90px 90px 0;border-color:transparent #1daeec transparent transparent;top:calc(50% - 90px);right:calc(50% - 100px)}@keyframes _ngcontent-%COMP%_rotate{0%{transform:rotate(0)}to{transform:rotate(360deg)}}body[_ngcontent-%COMP%]{margin:0}.container[_ngcontent-%COMP%]{margin:0 auto}.mb-05[_ngcontent-%COMP%]{margin-bottom:.5rem}.mr-05[_ngcontent-%COMP%]{margin-right:.5rem}.mb-1[_ngcontent-%COMP%]{margin-bottom:1rem}.mt-1[_ngcontent-%COMP%]{margin-top:1rem}.m-5[_ngcontent-%COMP%]{margin:5px}.m-t-5[_ngcontent-%COMP%]{margin-top:5px}.m-r-5[_ngcontent-%COMP%]{margin-right:5px}.m-b-5[_ngcontent-%COMP%]{margin-bottom:5px}.m-l-5[_ngcontent-%COMP%]{margin-left:5px}.m-v-5[_ngcontent-%COMP%]{margin:5px 0}.m-h-5[_ngcontent-%COMP%]{margin:0 5px}.m-10[_ngcontent-%COMP%]{margin:10px}.m-t-10[_ngcontent-%COMP%]{margin-top:10px}.m-r-10[_ngcontent-%COMP%]{margin-right:10px}.m-b-10[_ngcontent-%COMP%]{margin-bottom:10px}.m-l-10[_ngcontent-%COMP%]{margin-left:10px}.m-v-10[_ngcontent-%COMP%]{margin:10px 0}.m-h-10[_ngcontent-%COMP%]{margin:0 10px}.m-15[_ngcontent-%COMP%]{margin:15px}.m-t-15[_ngcontent-%COMP%]{margin-top:15px}.m-r-15[_ngcontent-%COMP%]{margin-right:15px}.m-b-15[_ngcontent-%COMP%]{margin-bottom:15px}.m-l-15[_ngcontent-%COMP%]{margin-left:15px}.m-v-15[_ngcontent-%COMP%]{margin:15px 0}.m-h-15[_ngcontent-%COMP%]{margin:0 15px}.m-20[_ngcontent-%COMP%]{margin:20px}.m-t-20[_ngcontent-%COMP%]{margin-top:20px}.m-r-20[_ngcontent-%COMP%]{margin-right:20px}.m-b-20[_ngcontent-%COMP%]{margin-bottom:20px}.m-l-20[_ngcontent-%COMP%]{margin-left:20px}.m-v-20[_ngcontent-%COMP%]{margin:20px 0}.m-h-20[_ngcontent-%COMP%]{margin:0 20px}.m-25[_ngcontent-%COMP%]{margin:25px}.m-t-25[_ngcontent-%COMP%]{margin-top:25px}.m-r-25[_ngcontent-%COMP%]{margin-right:25px}.m-b-25[_ngcontent-%COMP%]{margin-bottom:25px}.m-l-25[_ngcontent-%COMP%]{margin-left:25px}.m-v-25[_ngcontent-%COMP%]{margin:25px 0}.m-h-25[_ngcontent-%COMP%]{margin:0 25px}.m-30[_ngcontent-%COMP%]{margin:30px}.m-t-30[_ngcontent-%COMP%]{margin-top:30px}.m-r-30[_ngcontent-%COMP%]{margin-right:30px}.m-b-30[_ngcontent-%COMP%]{margin-bottom:30px}.m-l-30[_ngcontent-%COMP%]{margin-left:30px}.m-v-30[_ngcontent-%COMP%]{margin:30px 0}.m-h-30[_ngcontent-%COMP%]{margin:0 30px}.m-35[_ngcontent-%COMP%]{margin:35px}.m-t-35[_ngcontent-%COMP%]{margin-top:35px}.m-r-35[_ngcontent-%COMP%]{margin-right:35px}.m-b-35[_ngcontent-%COMP%]{margin-bottom:35px}.m-l-35[_ngcontent-%COMP%]{margin-left:35px}.m-v-35[_ngcontent-%COMP%]{margin:35px 0}.m-h-35[_ngcontent-%COMP%]{margin:0 35px}.m-40[_ngcontent-%COMP%]{margin:40px}.m-t-40[_ngcontent-%COMP%]{margin-top:40px}.m-r-40[_ngcontent-%COMP%]{margin-right:40px}.m-b-40[_ngcontent-%COMP%]{margin-bottom:40px}.m-l-40[_ngcontent-%COMP%]{margin-left:40px}.m-v-40[_ngcontent-%COMP%]{margin:40px 0}.m-h-40[_ngcontent-%COMP%]{margin:0 40px}.m-45[_ngcontent-%COMP%]{margin:45px}.m-t-45[_ngcontent-%COMP%]{margin-top:45px}.m-r-45[_ngcontent-%COMP%]{margin-right:45px}.m-b-45[_ngcontent-%COMP%]{margin-bottom:45px}.m-l-45[_ngcontent-%COMP%]{margin-left:45px}.m-v-45[_ngcontent-%COMP%]{margin:45px 0}.m-h-45[_ngcontent-%COMP%]{margin:0 45px}.m-50[_ngcontent-%COMP%]{margin:50px}.m-t-50[_ngcontent-%COMP%]{margin-top:50px}.m-r-50[_ngcontent-%COMP%]{margin-right:50px}.m-b-50[_ngcontent-%COMP%]{margin-bottom:50px}.m-l-50[_ngcontent-%COMP%]{margin-left:50px}.m-v-50[_ngcontent-%COMP%]{margin:50px 0}.m-h-50[_ngcontent-%COMP%]{margin:0 50px}.m-55[_ngcontent-%COMP%]{margin:55px}.m-t-55[_ngcontent-%COMP%]{margin-top:55px}.m-r-55[_ngcontent-%COMP%]{margin-right:55px}.m-b-55[_ngcontent-%COMP%]{margin-bottom:55px}.m-l-55[_ngcontent-%COMP%]{margin-left:55px}.m-v-55[_ngcontent-%COMP%]{margin:55px 0}.m-h-55[_ngcontent-%COMP%]{margin:0 55px}.m-60[_ngcontent-%COMP%]{margin:60px}.m-t-60[_ngcontent-%COMP%]{margin-top:60px}.m-r-60[_ngcontent-%COMP%]{margin-right:60px}.m-b-60[_ngcontent-%COMP%]{margin-bottom:60px}.m-l-60[_ngcontent-%COMP%]{margin-left:60px}.m-v-60[_ngcontent-%COMP%]{margin:60px 0}.m-h-60[_ngcontent-%COMP%]{margin:0 60px}.m-65[_ngcontent-%COMP%]{margin:65px}.m-t-65[_ngcontent-%COMP%]{margin-top:65px}.m-r-65[_ngcontent-%COMP%]{margin-right:65px}.m-b-65[_ngcontent-%COMP%]{margin-bottom:65px}.m-l-65[_ngcontent-%COMP%]{margin-left:65px}.m-v-65[_ngcontent-%COMP%]{margin:65px 0}.m-h-65[_ngcontent-%COMP%]{margin:0 65px}.m-70[_ngcontent-%COMP%]{margin:70px}.m-t-70[_ngcontent-%COMP%]{margin-top:70px}.m-r-70[_ngcontent-%COMP%]{margin-right:70px}.m-b-70[_ngcontent-%COMP%]{margin-bottom:70px}.m-l-70[_ngcontent-%COMP%]{margin-left:70px}.m-v-70[_ngcontent-%COMP%]{margin:70px 0}.m-h-70[_ngcontent-%COMP%]{margin:0 70px}.m-75[_ngcontent-%COMP%]{margin:75px}.m-t-75[_ngcontent-%COMP%]{margin-top:75px}.m-r-75[_ngcontent-%COMP%]{margin-right:75px}.m-b-75[_ngcontent-%COMP%]{margin-bottom:75px}.m-l-75[_ngcontent-%COMP%]{margin-left:75px}.m-v-75[_ngcontent-%COMP%]{margin:75px 0}.m-h-75[_ngcontent-%COMP%]{margin:0 75px}.m-80[_ngcontent-%COMP%]{margin:80px}.m-t-80[_ngcontent-%COMP%]{margin-top:80px}.m-r-80[_ngcontent-%COMP%]{margin-right:80px}.m-b-80[_ngcontent-%COMP%]{margin-bottom:80px}.m-l-80[_ngcontent-%COMP%]{margin-left:80px}.m-v-80[_ngcontent-%COMP%]{margin:80px 0}.m-h-80[_ngcontent-%COMP%]{margin:0 80px}.no-m[_ngcontent-%COMP%]{margin:0}.no-m-t[_ngcontent-%COMP%]{margin-top:0}.no-m-r[_ngcontent-%COMP%]{margin-right:0}.no-m-b[_ngcontent-%COMP%]{margin-bottom:0}.no-m-l[_ngcontent-%COMP%]{margin-left:0}.no-m-v[_ngcontent-%COMP%], .no-m-h[_ngcontent-%COMP%], .no-margin[_ngcontent-%COMP%]{margin:0}.no-m-lr[_ngcontent-%COMP%], .no-m-rl[_ngcontent-%COMP%]{margin-left:0;margin-right:0}.no-m-tb[_ngcontent-%COMP%], .no-m-bt[_ngcontent-%COMP%]{margin-top:0;margin-bottom:0}.m-t-only[_ngcontent-%COMP%]{margin-left:0;margin-right:0;margin-bottom:0}.m-b-only[_ngcontent-%COMP%]{margin-left:0;margin-right:0;margin-top:0}.m-l-only[_ngcontent-%COMP%]{margin-right:0;margin-top:0;margin-bottom:0}.m-r-only[_ngcontent-%COMP%]{margin-left:0;margin-top:0;margin-bottom:0}.m-auto[_ngcontent-%COMP%]{margin-left:auto;margin-right:auto}.ls-0[_ngcontent-%COMP%]{margin-left:10px;margin-right:10px}html[_ngcontent-%COMP%], body[_ngcontent-%COMP%]{-webkit-tap-highlight-color:transparent}div[_ngcontent-%COMP%]{box-sizing:border-box}.color-inherit[_ngcontent-%COMP%]{color:inherit}.no-shadow[_ngcontent-%COMP%]{box-shadow:none}.pointer[_ngcontent-%COMP%]{cursor:pointer}.nolist[_ngcontent-%COMP%]{list-style:none}.actions-menu[_ngcontent-%COMP%]{color:#fff}.alert[_ngcontent-%COMP%]{background-color:#e8f4fd;padding:6px 16px;font-size:.875rem;font-family:Roboto,Helvetica Neue,sans-serif;font-weight:400;line-height:1.43;border-radius:4px;letter-spacing:normal;margin:10px}.alert[_ngcontent-%COMP%] .message[_ngcontent-%COMP%]{padding:8px 0;font-size:18px}.alert[_ngcontent-%COMP%] .alert-check[_ngcontent-%COMP%]{color:#359ff4;margin-right:2px;font-size:1.4rem} .mat-tooltip{font-size:15px;color:#fff!important;background-color:#4461e2b3;border:1px solid rgb(25.7777777778,51.5555555556,166.2222222222);max-width:400px!important;white-space:pre-line!important}.loading[_ngcontent-%COMP%]{position:absolute;min-width:100%;width:100px;height:12px;background:linear-gradient(125deg,#fff,#4461e2,#fff);animation:grow 4s linear infinite,move 4s linear infinite}mat-card-title[_ngcontent-%COMP%]{font-weight:600;font-size:x-large;padding-left:20px;padding-top:20px}html[_ngcontent-%COMP%], body[_ngcontent-%COMP%]{overflow:hidden}.overflow-x-scroll[_ngcontent-%COMP%]{max-width:100%;overflow-x:auto}.overflow-no[_ngcontent-%COMP%]{overflow:hidden}.overflow-auto[_ngcontent-%COMP%]{overflow:auto}.overflow-scroll[_ngcontent-%COMP%]{overflow:scroll}.table-container[_ngcontent-%COMP%]{overflow-x:auto;max-width:100%}body[_ngcontent-%COMP%], .no-p[_ngcontent-%COMP%]{padding:0}.no-p-t[_ngcontent-%COMP%]{padding-top:0}.no-p-r[_ngcontent-%COMP%]{padding-right:0}.no-p-b[_ngcontent-%COMP%]{padding-bottom:0}.no-p-l[_ngcontent-%COMP%]{padding-left:0}.no-p-v[_ngcontent-%COMP%], .no-p-h[_ngcontent-%COMP%]{padding:0}.p-5[_ngcontent-%COMP%]{padding:5px}.p-t-5[_ngcontent-%COMP%]{padding-top:5px}.p-r-5[_ngcontent-%COMP%]{padding-right:5px}.p-b-5[_ngcontent-%COMP%]{padding-bottom:5px}.p-l-5[_ngcontent-%COMP%]{padding-left:5px}.p-v-5[_ngcontent-%COMP%]{padding:5px 0}.p-h-5[_ngcontent-%COMP%]{padding:0 5px}.p-10[_ngcontent-%COMP%]{padding:10px}.p-t-10[_ngcontent-%COMP%]{padding-top:10px}.p-b-10[_ngcontent-%COMP%]{padding-bottom:10px}.p-v-10[_ngcontent-%COMP%]{padding:10px 0}.p-h-10[_ngcontent-%COMP%]{padding:0 10px}.p-15[_ngcontent-%COMP%]{padding:15px}.p-t-15[_ngcontent-%COMP%]{padding-top:15px}.p-r-15[_ngcontent-%COMP%]{padding-right:15px}.p-b-15[_ngcontent-%COMP%]{padding-bottom:15px}.p-l-15[_ngcontent-%COMP%]{padding-left:15px}.p-v-15[_ngcontent-%COMP%]{padding:15px 0}.p-h-15[_ngcontent-%COMP%]{padding:0 15px}.p-20[_ngcontent-%COMP%]{padding:20px}.p-t-20[_ngcontent-%COMP%]{padding-top:20px}.p-r-20[_ngcontent-%COMP%]{padding-right:20px}.p-b-20[_ngcontent-%COMP%]{padding-bottom:20px}.p-l-20[_ngcontent-%COMP%]{padding-left:20px}.p-v-20[_ngcontent-%COMP%]{padding:20px 0}.p-h-20[_ngcontent-%COMP%]{padding:0 20px}.p-25[_ngcontent-%COMP%]{padding:25px}.p-t-25[_ngcontent-%COMP%]{padding-top:25px}.p-r-25[_ngcontent-%COMP%]{padding-right:25px}.p-b-25[_ngcontent-%COMP%]{padding-bottom:25px}.p-l-25[_ngcontent-%COMP%]{padding-left:25px}.p-v-25[_ngcontent-%COMP%]{padding:25px 0}.p-h-25[_ngcontent-%COMP%]{padding:0 25px}.p-30[_ngcontent-%COMP%]{padding:30px}.p-t-30[_ngcontent-%COMP%]{padding-top:30px}.p-r-30[_ngcontent-%COMP%]{padding-right:30px}.p-b-30[_ngcontent-%COMP%]{padding-bottom:30px}.p-l-30[_ngcontent-%COMP%]{padding-left:30px}.p-v-30[_ngcontent-%COMP%]{padding:30px 0}.p-h-30[_ngcontent-%COMP%]{padding:0 30px}.p-35[_ngcontent-%COMP%]{padding:35px}.p-t-35[_ngcontent-%COMP%]{padding-top:35px}.p-r-35[_ngcontent-%COMP%]{padding-right:35px}.p-b-35[_ngcontent-%COMP%]{padding-bottom:35px}.p-l-35[_ngcontent-%COMP%]{padding-left:35px}.p-v-35[_ngcontent-%COMP%]{padding:35px 0}.p-h-35[_ngcontent-%COMP%]{padding:0 35px}.p-40[_ngcontent-%COMP%]{padding:40px}.p-t-40[_ngcontent-%COMP%]{padding-top:40px}.p-r-40[_ngcontent-%COMP%]{padding-right:40px}.p-b-40[_ngcontent-%COMP%]{padding-bottom:40px}.p-l-40[_ngcontent-%COMP%]{padding-left:40px}.p-v-40[_ngcontent-%COMP%]{padding-top:40px;padding-bottom:40px}.p-h-40[_ngcontent-%COMP%]{padding:0 40px}.p-45[_ngcontent-%COMP%]{padding:45px}.p-t-45[_ngcontent-%COMP%]{padding-top:45px}.p-r-45[_ngcontent-%COMP%]{padding-right:45px}.p-b-45[_ngcontent-%COMP%]{padding-bottom:45px}.p-l-45[_ngcontent-%COMP%]{padding-left:45px}.p-v-45[_ngcontent-%COMP%]{padding:45px 0}.p-h-45[_ngcontent-%COMP%]{padding:0 45px}.p-50[_ngcontent-%COMP%]{padding:50px}.p-t-50[_ngcontent-%COMP%]{padding-top:50px}.p-r-50[_ngcontent-%COMP%]{padding-right:50px}.p-b-50[_ngcontent-%COMP%]{padding-bottom:50px}.p-l-50[_ngcontent-%COMP%]{padding-left:50px}.p-v-50[_ngcontent-%COMP%]{padding:50px 0}.p-h-50[_ngcontent-%COMP%]{padding:0 50px}.p-55[_ngcontent-%COMP%]{padding:55px}.p-t-55[_ngcontent-%COMP%]{padding-top:55px}.p-r-55[_ngcontent-%COMP%]{padding-right:55px}.p-b-55[_ngcontent-%COMP%]{padding-bottom:55px}.p-l-55[_ngcontent-%COMP%]{padding-left:55px}.p-v-55[_ngcontent-%COMP%]{padding:55px 0}.p-h-55[_ngcontent-%COMP%]{padding:0 55px}.p-60[_ngcontent-%COMP%]{padding:60px}.p-t-60[_ngcontent-%COMP%]{padding-top:60px}.p-r-60[_ngcontent-%COMP%]{padding-right:60px}.p-b-60[_ngcontent-%COMP%]{padding-bottom:60px}.p-l-60[_ngcontent-%COMP%]{padding-left:60px}.p-v-60[_ngcontent-%COMP%]{padding:60px 0}.p-h-60[_ngcontent-%COMP%]{padding:0 60px}.p-65[_ngcontent-%COMP%]{padding:65px}.p-t-65[_ngcontent-%COMP%]{padding-top:65px}.p-r-65[_ngcontent-%COMP%]{padding-right:65px}.p-b-65[_ngcontent-%COMP%]{padding-bottom:65px}.p-l-65[_ngcontent-%COMP%]{padding-left:65px}.p-v-65[_ngcontent-%COMP%]{padding:65px 0}.p-h-65[_ngcontent-%COMP%]{padding:0 65px}.p-70[_ngcontent-%COMP%]{padding:70px}.p-t-70[_ngcontent-%COMP%]{padding-top:70px}.p-r-70[_ngcontent-%COMP%]{padding-right:70px}.p-b-70[_ngcontent-%COMP%]{padding-bottom:70px}.p-l-70[_ngcontent-%COMP%]{padding-left:70px}.p-v-70[_ngcontent-%COMP%]{padding:70px 0}.p-h-70[_ngcontent-%COMP%]{padding:0 70px}.p-75[_ngcontent-%COMP%]{padding:75px}.p-t-75[_ngcontent-%COMP%]{padding-top:75px}.p-r-75[_ngcontent-%COMP%]{padding-right:75px}.p-b-75[_ngcontent-%COMP%]{padding-bottom:75px}.p-l-75[_ngcontent-%COMP%]{padding-left:75px}.p-v-75[_ngcontent-%COMP%]{padding:75px 0}.p-h-75[_ngcontent-%COMP%]{padding:0 75px}.p-80[_ngcontent-%COMP%]{padding:80px}.p-t-80[_ngcontent-%COMP%]{padding-top:80px}.p-r-80[_ngcontent-%COMP%]{padding-right:80px}.p-b-80[_ngcontent-%COMP%]{padding-bottom:80px}.p-l-80[_ngcontent-%COMP%]{padding-left:80px}.p-v-80[_ngcontent-%COMP%]{padding:80px 0}.p-h-80[_ngcontent-%COMP%]{padding:0 80px}.no-padding[_ngcontent-%COMP%]{padding:0!important}.no-pad-lr[_ngcontent-%COMP%], .no-pad-rl[_ngcontent-%COMP%]{padding-left:0;padding-right:0}.no-pad-tb[_ngcontent-%COMP%], .no-pad-bt[_ngcontent-%COMP%]{padding-top:0;padding-bottom:0}.pad-t-only[_ngcontent-%COMP%]{padding-left:0;padding-right:0;padding-bottom:0}.pad-b-only[_ngcontent-%COMP%]{padding-left:0;padding-right:0;padding-top:0}.pad-l-only[_ngcontent-%COMP%]{padding-right:0;padding-top:0;padding-bottom:0}.pad-r-only[_ngcontent-%COMP%]{padding-left:0;padding-top:0;padding-bottom:0}html[_ngcontent-%COMP%], body[_ngcontent-%COMP%], .rel[_ngcontent-%COMP%], .relative[_ngcontent-%COMP%]{position:relative}.abs[_ngcontent-%COMP%], .absolute[_ngcontent-%COMP%]{position:absolute}.fixed[_ngcontent-%COMP%]{position:fixed}.status-active[_ngcontent-%COMP%]{color:#5cb85c}.status-inactive[_ngcontent-%COMP%]{color:#666f73}.status-deleted[_ngcontent-%COMP%]{color:#000}.status-pending[_ngcontent-%COMP%]{color:orange}.status-approved[_ngcontent-%COMP%]{color:#4461e2}.status-overpaid[_ngcontent-%COMP%]{color:purple}.status-chargeoff[_ngcontent-%COMP%]{color:#f39c12}.status-active-overdue[_ngcontent-%COMP%], .status-block[_ngcontent-%COMP%]{color:red}.status-matured[_ngcontent-%COMP%]{color:#ff4000}.subStatus-contract-termination[_ngcontent-%COMP%]{color:#b3b3b3}.mat-step-header[_ngcontent-%COMP%] .mat-step-icon-state-done[_ngcontent-%COMP%]{background-color:#2af72a}.mat-step-header[_ngcontent-%COMP%] .mat-step-icon-state-done[_ngcontent-%COMP%] .status-transfer-progress[_ngcontent-%COMP%]{color:#ff4000}.mat-step-header[_ngcontent-%COMP%] .mat-step-icon-state-done[_ngcontent-%COMP%] .status-transfer-hold[_ngcontent-%COMP%]{color:#df0101}html[_ngcontent-%COMP%], body[_ngcontent-%COMP%]{-webkit-font-smoothing:antialiased}html[_ngcontent-%COMP%]{font-size:16px}body[_ngcontent-%COMP%]{font-family:Roboto,Helvetica Neue,sans-serif;font-weight:400;font-size:14px;color:#000000de;line-height:1.5;letter-spacing:normal}.mat-h1[_ngcontent-%COMP%], .mat-headline[_ngcontent-%COMP%], .mat-typography[_ngcontent-%COMP%] .mat-h1[_ngcontent-%COMP%], .mat-typography[_ngcontent-%COMP%] .mat-headline[_ngcontent-%COMP%], .mat-typography[_ngcontent-%COMP%] h1[_ngcontent-%COMP%]{font:400 24px/32px Roboto,Helvetica Neue,sans-serif;letter-spacing:normal;margin:0 0 16px}.lh-1[_ngcontent-%COMP%]{line-height:1}.lh-13[_ngcontent-%COMP%]{line-height:1.3}.lh-15[_ngcontent-%COMP%]{line-height:1.5}.bold[_ngcontent-%COMP%], .strong[_ngcontent-%COMP%]{font-weight:700}.no-bold[_ngcontent-%COMP%]{font-weight:400}.italic[_ngcontent-%COMP%], .em[_ngcontent-%COMP%]{font-style:italic}.strike[_ngcontent-%COMP%]{text-decoration:line-through}.normal[_ngcontent-%COMP%]{font-weight:400;font-style:normal}.uppercase[_ngcontent-%COMP%]{text-transform:uppercase}.text-left[_ngcontent-%COMP%]{text-align:left}.text-center[_ngcontent-%COMP%]{text-align:center}.text-right[_ngcontent-%COMP%]{text-align:right}.w100[_ngcontent-%COMP%]{font-weight:100}.w200[_ngcontent-%COMP%]{font-weight:200}.w300[_ngcontent-%COMP%]{font-weight:300}.w400[_ngcontent-%COMP%]{font-weight:400}.w500[_ngcontent-%COMP%]{font-weight:500}.w600[_ngcontent-%COMP%]{font-weight:600}.w700[_ngcontent-%COMP%]{font-weight:700}.w800[_ngcontent-%COMP%]{font-weight:800}.w900[_ngcontent-%COMP%]{font-weight:900}.f9[_ngcontent-%COMP%]{font-size:9px}.f10[_ngcontent-%COMP%]{font-size:10px}.f11[_ngcontent-%COMP%]{font-size:11px}.f12[_ngcontent-%COMP%]{font-size:12px}.f13[_ngcontent-%COMP%]{font-size:13px}.f14[_ngcontent-%COMP%]{font-size:14px}.f15[_ngcontent-%COMP%]{font-size:15px}.f16[_ngcontent-%COMP%]{font-size:16px}.f17[_ngcontent-%COMP%]{font-size:17px}.f18[_ngcontent-%COMP%]{font-size:18px;line-height:30px}.f19[_ngcontent-%COMP%]{font-size:19px}.f20[_ngcontent-%COMP%]{font-size:20px}.f30[_ngcontent-%COMP%]{font-size:30px}.f40[_ngcontent-%COMP%]{font-size:40px}.f50[_ngcontent-%COMP%]{font-size:50px}.f60[_ngcontent-%COMP%]{font-size:60px}.size-small[_ngcontent-%COMP%]{font-size:75%}.size-normal[_ngcontent-%COMP%]{font-size:100%}.size-medium[_ngcontent-%COMP%]{font-size:125%}.size-big[_ngcontent-%COMP%], .size-large[_ngcontent-%COMP%]{font-size:150%}.size-huge[_ngcontent-%COMP%]{font-size:200%}.inherit[_ngcontent-%COMP%]{font:inherit}.text-shadow[_ngcontent-%COMP%]{text-shadow:1px 1px 1px rgba(0,0,0,.4)}.text-rgb-2[_ngcontent-%COMP%]{color:#0003}.text-rgb-3[_ngcontent-%COMP%]{color:#0000004d}.text-rgb-4[_ngcontent-%COMP%]{color:#0006}.text-rgb-5[_ngcontent-%COMP%]{color:#00000080}.no-ul[_ngcontent-%COMP%], .no-ul[_ngcontent-%COMP%]:hover, .no-ul[_ngcontent-%COMP%] a[_ngcontent-%COMP%], .no-ul[_ngcontent-%COMP%] a[_ngcontent-%COMP%]:hover{text-decoration:none}.no-wrap[_ngcontent-%COMP%]{white-space:nowrap}.auto-cell-size[_ngcontent-%COMP%]{white-space:nowrap;width:1%}.ls-0[_ngcontent-%COMP%]{letter-spacing:-3px;white-space:nowrap}.label-field[_ngcontent-%COMP%]{margin-top:32px}.wrap-content[_ngcontent-%COMP%]{overflow-wrap:break-word;word-wrap:break-word}.no-break-content[_ngcontent-%COMP%]{overflow-wrap:anywhere!important}.fit[_ngcontent-%COMP%]{max-width:100%}.half-width[_ngcontent-%COMP%]{width:50%}.full-width[_ngcontent-%COMP%]{width:100%}.full-height[_ngcontent-%COMP%]{height:100%}html[_ngcontent-%COMP%], body[_ngcontent-%COMP%]{width:100%;height:100%;min-height:100%}body[_ngcontent-%COMP%] table[_ngcontent-%COMP%]{width:100%}.container[_ngcontent-%COMP%]{max-width:74rem;width:90%}.mw300[_ngcontent-%COMP%]{max-width:300px}.mw400[_ngcontent-%COMP%]{max-width:400px}.mw500[_ngcontent-%COMP%]{max-width:500px}.mw600[_ngcontent-%COMP%]{max-width:600px}.fullwidth[_ngcontent-%COMP%]{width:100%}.zindex-1[_ngcontent-%COMP%]{z-index:1}.zindex-2[_ngcontent-%COMP%]{z-index:2}.zindex-3[_ngcontent-%COMP%]{z-index:3}.zindex-4[_ngcontent-%COMP%]{z-index:4}.container[_ngcontent-%COMP%]{max-width:37rem}.container[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] div[_ngcontent-%COMP%]{margin:1rem 0;word-wrap:break-word}.paid[_ngcontent-%COMP%]{background-color:#5cb85c;height:4px}.not-paid[_ngcontent-%COMP%]{background-color:red;height:4px}"]})}}return t})();var i8=()=>["../"];function a8(t,n){if(t&1){let e=xt();s(0,"span")(1,"button",13),T(2,"fa-icon",14),c(3),p(4,"translate"),l(),s(5,"button",15),it("click",function(){mt(e);let a=P(2);return dt(a.undoTransaction())}),T(6,"fa-icon",16),c(7),p(8,"translate"),l()()}if(t&2){let e=P(2);o(),x("routerLink","edit")("disabled",!e.allowEdition),o(2),v("",m(4,5,"Edit")," "),o(2),x("disabled",!e.allowUndo),o(2),v("",m(8,7,"Undo")," ")}}function o8(t,n){if(t&1){let e=xt();s(0,"span")(1,"button",15),it("click",function(){mt(e);let a=P(2);return dt(a.chargebackTransaction())}),T(2,"fa-icon",16),c(3),p(4,"translate"),l()()}if(t&2){let e=P(2);o(),x("disabled",!e.allowChargeback),o(2),v("",m(4,2,"Chargeback")," ")}}function r8(t,n){t&1&&(s(0,"div",0),k(1,a8,9,9,"span",12)(2,o8,5,4,"span",12),l()),t&2&&(o(),x("mifosxHasPermission","ADJUST_LOAN"),o(),x("mifosxHasPermission","CHARGEBACK_LOAN"))}function l8(t,n){t&1&&(s(0,"div",4),c(1),p(2,"translateKey"),l()),t&2&&(o(),v(" ",Ge(2,1,"Repayment Transaction","catalogs")," "))}function s8(t,n){if(t&1&&(s(0,"div",5)(1,"a",17),c(2),l()()),t&2){let e=P();o(),x("href",e.loanTransactionRelatedLink(e.transactionData.toLoanTransactionRelation.fromLoanTransaction),od),o(),v(" ",e.transactionData.toLoanTransactionRelation.fromLoanTransaction," ")}}function c8(t,n){t&1&&(s(0,"div",4),c(1),p(2,"translate"),l()),t&2&&(o(),v(" ",m(2,1,"External Id")," "))}function p8(t,n){if(t&1&&(s(0,"div",5),T(1,"mifosx-external-identifier",18),l()),t&2){let e=P();o(),x("externalId",ce(e.transactionData.externalId))}}function m8(t,n){t&1&&(s(0,"div",4),c(1),p(2,"translateKey"),l()),t&2&&(o(),v(" ",Ge(2,1,"Classification","catalogs")," "))}function d8(t,n){if(t&1&&(s(0,"div",6),c(1),l()),t&2){let e=P();o(),v(" ",e.transactionData.classification.name," ")}}function u8(t,n){t&1&&T(0,"mat-divider",7),t&2&&x("inset",!0)}function f8(t,n){t&1&&(s(0,"th",28),c(1),p(2,"translate"),l()),t&2&&(o(),b(m(2,1,"labels.inputs.Relation Type")))}function h8(t,n){if(t&1&&(s(0,"td",29),c(1),p(2,"translate"),l()),t&2){let e=n.$implicit;x("matTooltip",e.paymentType),o(),v(" ",m(2,2,e.relationType)," ")}}function g8(t,n){t&1&&(s(0,"th",28),c(1),p(2,"translate"),l()),t&2&&(o(),b(m(2,1,"labels.inputs.Transaction")))}function _8(t,n){if(t&1&&(s(0,"td",30)(1,"a",17),c(2),l()()),t&2){let e=n.$implicit,i=P(2);o(),x("href",i.loanTransactionRelatedLink(e.toLoanTransaction),od),o(),v(" ",e.toLoanTransaction," ")}}function C8(t,n){t&1&&(s(0,"th",28),c(1),p(2,"translate"),l()),t&2&&(o(),b(m(2,1,"labels.inputs.Amount")))}function b8(t,n){if(t&1&&(s(0,"td",30),c(1),p(2,"currency"),l()),t&2){let e=n.$implicit,i=P(2);o(),v(" ",Ye(2,1,e.amount,i.transactionData.currency.code,"symbol-narrow","1.2-2")," ")}}function v8(t,n){t&1&&T(0,"tr",31)}function x8(t,n){t&1&&T(0,"tr",32)}function y8(t,n){if(t&1&&(s(0,"div",8),c(1),p(2,"translate"),T(3,"br"),s(4,"table",19),X(5,20),k(6,f8,3,3,"th",21)(7,h8,3,4,"td",22),Q(),X(8,23),k(9,g8,3,3,"th",21)(10,_8,3,2,"td",24),Q(),X(11,25),k(12,C8,3,3,"th",21)(13,b8,3,6,"td",24),Q(),k(14,v8,1,0,"tr",26)(15,x8,1,0,"tr",27),l()()),t&2){let e=P();o(),v(" ",m(2,4,"Linked Transactions")," "),o(3),x("dataSource",e.transactionRelations),o(10),x("matHeaderRowDef",e.displayedColumns),o(),x("matRowDefColumns",e.displayedColumns)}}function S8(t,n){if(t&1&&T(0,"mifosx-transaction-payment-detail",9),t&2){let e=P();x("paymentDetailData",e.transactionData.paymentDetailData)}}var d0=(()=>{class t{constructor(){this.loansService=A(Mt),this.route=A(Et),this.dateUtils=A(de),this.router=A(le),this.dialog=A(Gn),this.translateService=A(pa),this.settingsService=A(oe),this.organizationService=A(Op),this.alertService=A(Jl),this.allowEdition=!0,this.allowUndo=!0,this.allowChargeback=!0,this.existTransactionRelations=!1,this.paymentTypeOptions=[],this.transactionRelations=new Li,this.displayedColumns=["relationType","toTransaction","amount"],this.isFullRelated=!1,this.amountRelationsAllowed=0,this.route.data.subscribe(e=>{this.transactionData=e.loansAccountTransaction,this.transactionType=this.transactionData.type,this.allowEdition=!this.transactionData.manuallyReversed&&!this.allowTransactionEdition(this.transactionData.type.id),this.allowUndo=this.allowUndoTransaction(this.transactionData.manuallyReversed,this.transactionType),this.allowChargeback=this.allowChargebackTransaction(this.transactionType)&&!this.transactionData.manuallyReversed;let i=!1;if(this.transactionData.transactionRelations){this.transactionRelations.data=this.transactionData.transactionRelations,this.existTransactionRelations=this.transactionData.transactionRelations.length>0;let a=0;this.transactionData.transactionRelations.forEach(r=>{r.relationType==="CHARGEBACK"&&(a+=r.amount,i=!0)}),this.amountRelationsAllowed=this.transactionData.amount-a,this.isFullRelated=this.amountRelationsAllowed===0,this.allowChargeback=this.allowChargebackTransaction(this.transactionType)&&!this.isFullRelated}this.allowChargeback||(this.allowEdition=!1),(this.existTransactionRelations&&i||this.transactionType.reAge||this.transactionType.reAmortize)&&(this.allowUndo=!1)}),this.clientId=this.route.snapshot.params.clientId,this.loanId=this.route.snapshot.params.loanId}ngOnInit(){this.allowChargeback&&this.organizationService.getPaymentTypesWithCode().toPromise().then(e=>{this.paymentTypeOptions=e})}allowTransactionEdition(e){return e===20||e===21||e===22||e===23||e===28}allowChargebackTransaction(e){return e.repayment||e.interestPaymentWaiver||e.goodwillCredit||e.payoutRefund||e.merchantIssuedRefund||e.downPayment}allowUndoTransaction(e,i){return!(e||i.interestRefund)}isWriteOff(e){return e.writeOff||e.code==="loanTransactionType.writeOff"}undoTransaction(){let e=this.route.snapshot.params.loanId;if(this.transactionType.contractTermination){let i=[new Ti({controlName:"note",label:"Note",value:"",type:"text",required:!1,order:1}),new Ti({controlName:"reversalExternalId",label:"externalId",value:"",type:"text",required:!1,order:2})],a={title:this.translateService.instant("labels.heading.Undo Transaction"),layout:{addButtonText:"Undo"},formfields:i,pristine:!1};this.dialog.open(_i,{data:a,width:"50rem"}).afterClosed().subscribe(u=>{if(u.data){let d={note:u.data.value.note,reversalExternalId:u.data.value.reversalExternalId};this.loansService.loanActionButtons(e,"undoContractTermination",d).subscribe(()=>{this.router.navigate(["../"],{relativeTo:this.route})})}})}else this.dialog.open(ma,{data:{heading:this.translateService.instant("labels.heading.Undo Transaction"),dialogContext:this.translateService.instant("labels.dialogContext.Are you sure you want undo the transaction")+`${this.transactionData.id}`}}).afterClosed().subscribe(a=>{if(a.confirm){let r=this.settingsService.language.code,u=this.settingsService.dateFormat,d={transactionDate:this.dateUtils.formatDate(this.transactionData.date&&new Date(this.transactionData.date),u),transactionAmount:0,dateFormat:u,locale:r},g=this.isWriteOff(this.transactionType)?"undowriteoff":"undo",_=g==="undowriteoff"?null:this.transactionData.id;this.loansService.executeLoansAccountTransactionsCommand(e,g,d,_).subscribe(()=>{this.router.navigate(["../"],{relativeTo:this.route})})}})}chargebackTransaction(){let e=this.route.snapshot.params.loanId,i=[new ic({controlName:"paymentTypeId",label:"Payment Type",value:"",options:{label:"name",value:"id",data:this.paymentTypeOptions},required:!0,order:1}),new Ti({controlName:"amount",label:"Amount",value:this.amountRelationsAllowed,type:"number",required:!0,max:this.amountRelationsAllowed,order:2})],a={title:`Chargeback ${this.transactionType.value} Transaction`,layout:{addButtonText:"Chargeback"},formfields:i};this.dialog.open(_i,{data:a}).afterClosed().subscribe(u=>{if(u.data)if(u.data.value.amount<=this.amountRelationsAllowed){let d=this.settingsService.language.code,g={transactionAmount:u.data.value.amount,paymentTypeId:u.data.value.paymentTypeId,locale:d};this.loansService.executeLoansAccountTransactionsCommand(e,"chargeback",g,this.transactionData.id).subscribe(()=>{this.router.navigate(["../"],{relativeTo:this.route})})}else this.alertService.alert({type:"BusinessRule",message:"Chargeback amount must be lower or equal to: "+this.amountRelationsAllowed})})}loanTransactionRelatedLink(e){return`/#/clients/${this.clientId}/loans-accounts/${this.loanId}/transactions/${e}`}loanTransactionColor(){return this.transactionData.manuallyReversed?"undo":this.existTransactionRelations?"linked":"active"}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=Dt({type:t,selectors:[["mifosx-view-transaction"]],decls:47,vars:51,consts:[[1,"container","m-b-20","transaction-buttons","layout-align-end","gap-2percent"],[1,"container"],[1,"layout-row-wrap","card-content"],[1,"flex-100",3,"ngClass"],[1,"flex-50","mat-body-strong"],[1,"flex-50"],[1,"flex-50","no-break-content"],[3,"inset"],[1,"mat-body-strong","flex-100"],[3,"paymentDetailData"],[1,"layout-row","layout-align-center","gap-2percent","column-on-mobile"],["type","button","mat-raised-button","","color","primary",3,"routerLink"],[4,"mifosxHasPermission"],["mat-raised-button","","color","primary",3,"routerLink","disabled"],["icon","edit",1,"m-r-10"],["mat-raised-button","","color","warn",3,"click","disabled"],["icon","undo",1,"m-r-10"],[3,"href"],["completed","true",3,"externalId"],["mat-table","",3,"dataSource"],["matColumnDef","relationType"],["mat-header-cell","",4,"matHeaderCellDef"],["mat-cell","",3,"matTooltip",4,"matCellDef"],["matColumnDef","toTransaction"],["mat-cell","",4,"matCellDef"],["matColumnDef","amount"],["mat-header-row","",4,"matHeaderRowDef"],["mat-row","",4,"matRowDef","matRowDefColumns"],["mat-header-cell",""],["mat-cell","",3,"matTooltip"],["mat-cell",""],["mat-header-row",""],["mat-row",""]],template:function(i,a){i&1&&(M(0,r8,3,2,"div",0),s(1,"div",1)(2,"mat-card")(3,"mat-card-content")(4,"div",2),T(5,"div",3),s(6,"div",4),c(7),p(8,"translateKey"),l(),s(9,"div",5),c(10),l(),M(11,l8,3,4,"div",4),M(12,s8,3,2,"div",5),s(13,"div",4),c(14),p(15,"translateKey"),l(),s(16,"div",5),c(17),p(18,"translateKey"),l(),s(19,"div",4),c(20),p(21,"translateKey"),l(),s(22,"div",5),c(23),p(24,"dateFormat"),l(),s(25,"div",4),c(26),p(27,"translateKey"),l(),s(28,"div",5),c(29),l(),s(30,"div",4),c(31),p(32,"translateKey"),l(),s(33,"div",5),c(34),p(35,"currency"),l(),M(36,c8,3,3,"div",4),M(37,p8,2,2,"div",5),M(38,m8,3,4,"div",4),M(39,d8,2,1,"div",6),M(40,u8,1,1,"mat-divider",7),M(41,y8,16,6,"div",8),M(42,S8,1,1,"mifosx-transaction-payment-detail",9),l(),s(43,"div",10)(44,"button",11),c(45),p(46,"translate"),l()()()()()),i&2&&(O(a.transactionData.type.contra?-1:0),o(5),x("ngClass",a.loanTransactionColor()),o(2),v(" ",Ge(8,23,"Transaction Id","catalogs")," "),o(3),v(" ",a.transactionData.id," "),o(),O(a.transactionData.toLoanTransactionRelation?11:-1),o(),O(a.transactionData.toLoanTransactionRelation?12:-1),o(2),v(" ",Ge(15,26,"Type","catalogs")," "),o(3),v(" ",Ge(18,29,a.transactionData.type.value,"catalogs")," "),o(3),v(" ",Ge(21,32,"Transaction Date","catalogs")," "),o(3),v(" ",m(24,35,a.transactionData.date)," "),o(3),v(" ",Ge(27,37,"Currency","catalogs")," "),o(3),v(" ",a.transactionData.currency.name," "),o(2),v(" ",Ge(32,40,"Amount","catalogs")," "),o(3),v(" ",Ye(35,43,a.transactionData.amount,a.transactionData.currency.code,"symbol-narrow","1.2-2")," "),o(2),O(a.transactionData.externalId?36:-1),o(),O(a.transactionData.externalId?37:-1),o(),O(a.transactionData.classification?38:-1),o(),O(a.transactionData.classification?39:-1),o(),O(a.existTransactionRelations?40:-1),o(),O(a.existTransactionRelations?41:-1),o(),O(a.transactionData.paymentDetailData?42:-1),o(2),x("routerLink",Ut(50,i8)),o(),v(" ",m(46,48,"labels.buttons.Back")," "))},dependencies:[wt,ca,Tt,ae,xe,Oe,Wt,Ae,un,Va,$o,bn,yn,xn,Sn,vn,Dn,Oi,wn,Pn,Tn,An,u1,Sa,En,Pt,qa],styles:["body[_ngcontent-%COMP%] table[_ngcontent-%COMP%] tbody[_ngcontent-%COMP%] tr[_ngcontent-%COMP%]:nth-child(2n){background-color:#f2f2f2}.bg-black[_ngcontent-%COMP%]{background-color:#000}.bg-light-grey[_ngcontent-%COMP%]{background-color:#e5e5e5}.bg-medium-grey[_ngcontent-%COMP%]{background-color:#ccc}.bg-grey[_ngcontent-%COMP%]{background-color:#999}.bg-dark-grey[_ngcontent-%COMP%]{background-color:#222}.bg-white[_ngcontent-%COMP%], .bg-fff[_ngcontent-%COMP%]{background-color:#fff}.bg-none[_ngcontent-%COMP%], .no-bg[_ngcontent-%COMP%]{background:none;background-image:none;background-color:transparent}.bg-facebook[_ngcontent-%COMP%]{background-color:#47639e}.bg-twitter[_ngcontent-%COMP%]{background-color:#02a8f3}body[_ngcontent-%COMP%] table[_ngcontent-%COMP%]{border:1px solid rgba(0,0,0,.12)}.no-border[_ngcontent-%COMP%]{border:none}.no-border-t[_ngcontent-%COMP%]{border-top:none}.no-border-r[_ngcontent-%COMP%]{border-right:none}.no-border-b[_ngcontent-%COMP%]{border-bottom:none}.no-border-l[_ngcontent-%COMP%]{border-left:none}.no-border-lr[_ngcontent-%COMP%], .no-border-rl[_ngcontent-%COMP%]{border-left:none;border-right:none}.no-border-tb[_ngcontent-%COMP%], .no-border-bt[_ngcontent-%COMP%]{border-top:none;border-bottom:none}.no-border-tl[_ngcontent-%COMP%], .no-border-lt[_ngcontent-%COMP%]{border-top:none;border-left:none}.no-border-tr[_ngcontent-%COMP%], .no-border-rt[_ngcontent-%COMP%]{border-top:none;border-right:none}.no-border-bl[_ngcontent-%COMP%], .no-border-lb[_ngcontent-%COMP%]{border-bottom:none;border-left:none}.no-border-br[_ngcontent-%COMP%], .no-border-rb[_ngcontent-%COMP%]{border-bottom:none;border-right:none}.border-dashed[_ngcontent-%COMP%], .border-dotted[_ngcontent-%COMP%]{border-style:dashed}.border-black[_ngcontent-%COMP%]{border-color:#000}.border-light-grey[_ngcontent-%COMP%]{border-color:#e5e5e5}.border-medium-grey[_ngcontent-%COMP%]{border-color:#ccc}.border-grey[_ngcontent-%COMP%]{border-color:#999}.border-dark-grey[_ngcontent-%COMP%]{border-color:#2222}.border-white[_ngcontent-%COMP%], .border-fff[_ngcontent-%COMP%]{border-color:#fff}.no-border-radius[_ngcontent-%COMP%]{border-radius:0}.radius3[_ngcontent-%COMP%]{border-radius:3px}.radius5[_ngcontent-%COMP%]{border-radius:5px}.radius10[_ngcontent-%COMP%]{border-radius:10px}.column-mandatory[_ngcontent-%COMP%]{color:#5cb85c;text-align:center}.not-column-mandatory[_ngcontent-%COMP%]{color:#666f73;text-align:center}.cdk-drag-placeholder[_ngcontent-%COMP%]{background:#3498db}.yes[_ngcontent-%COMP%]{color:#5cb85c!important;background-color:#5cb85c;height:4px;cursor:none}.no[_ngcontent-%COMP%]{color:red;background-color:red;height:4px;cursor:none}.strike[_ngcontent-%COMP%]{text-decoration:line-through;color:red}.transfer[_ngcontent-%COMP%]{color:#16a085}.linked[_ngcontent-%COMP%]{color:#4461e2}.accrual[_ngcontent-%COMP%]{color:#999}.fa-question[_ngcontent-%COMP%]{color:#4461e2}.enabled[_ngcontent-%COMP%]{color:#32cd32}.disabled[_ngcontent-%COMP%]{color:#f44366}.v-mid[_ngcontent-%COMP%], .v-m[_ngcontent-%COMP%]{vertical-align:middle}.v-top[_ngcontent-%COMP%], .v-t[_ngcontent-%COMP%]{vertical-align:top}.v-bottom[_ngcontent-%COMP%], .v-b[_ngcontent-%COMP%]{vertical-align:bottom}.v-super[_ngcontent-%COMP%]{vertical-align:super}.r-amount[_ngcontent-%COMP%]{text-align:right!important;padding-right:5px!important}.left[_ngcontent-%COMP%]{text-align:left!important}.right[_ngcontent-%COMP%]{text-align:right!important}.center[_ngcontent-%COMP%]{text-align:center!important}.amount-plus[_ngcontent-%COMP%]{color:#000}.amount-minus[_ngcontent-%COMP%]{color:#4461e2}.block[_ngcontent-%COMP%]{display:block}.inline[_ngcontent-%COMP%]{display:inline}.in-block[_ngcontent-%COMP%]{display:inline-block;zoom:1}.d-none[_ngcontent-%COMP%], .hide[_ngcontent-%COMP%], .hidden[_ngcontent-%COMP%]{display:none}.t-0[_ngcontent-%COMP%]{top:0}.b-0[_ngcontent-%COMP%]{bottom:0}.l-0[_ngcontent-%COMP%]{left:0}.r-0[_ngcontent-%COMP%]{right:0}.tb-0[_ngcontent-%COMP%]{top:0;bottom:0}.lr-0[_ngcontent-%COMP%]{left:0;right:0}.f-left[_ngcontent-%COMP%]{float:left}.f-right[_ngcontent-%COMP%]{float:right}.f-none[_ngcontent-%COMP%]{float:none}textarea[_ngcontent-%COMP%]{resize:both}textarea.vertical[_ngcontent-%COMP%], textarea.horizontal[_ngcontent-%COMP%]{resize:vertical}textarea.noresize[_ngcontent-%COMP%]{resize:none}.full-input[_ngcontent-%COMP%] input[_ngcontent-%COMP%], .full-input[_ngcontent-%COMP%] select[_ngcontent-%COMP%], .full-input[_ngcontent-%COMP%] textarea[_ngcontent-%COMP%]{width:100%}.normal[_ngcontent-%COMP%] input[_ngcontent-%COMP%], .normal[_ngcontent-%COMP%] select[_ngcontent-%COMP%], .normal[_ngcontent-%COMP%] textarea[_ngcontent-%COMP%], .full-input[_ngcontent-%COMP%] [type=checkbox][_ngcontent-%COMP%], .full-input[_ngcontent-%COMP%] [type=radio][_ngcontent-%COMP%]{width:auto}.mat-tab-body-content[_ngcontent-%COMP%]{margin-bottom:20px}.mat-datepicker-input[_ngcontent-%COMP%]{margin-top:5px;margin-bottom:5px}.loader-wrapper[_ngcontent-%COMP%]{height:100vh;width:100vw}.loader-wrapper[_ngcontent-%COMP%] .triangle[_ngcontent-%COMP%]{width:0;height:0;border-style:solid;position:absolute;animation:_ngcontent-%COMP%_rotate .8s infinite .2s}.loader-wrapper[_ngcontent-%COMP%] .bottom[_ngcontent-%COMP%]{border-width:0 90px 90px;border-color:transparent transparent #1fb050;bottom:calc(50% - 100px);left:calc(50% - 90px)}.loader-wrapper[_ngcontent-%COMP%] .top[_ngcontent-%COMP%]{border-width:90px 90px 0;border-color:#b4d575 transparent transparent;top:calc(50% - 100px);left:calc(50% - 90px)}.loader-wrapper[_ngcontent-%COMP%] .left[_ngcontent-%COMP%]{border-width:90px 0 90px 90px;border-color:transparent transparent transparent #1074b9;top:calc(50% - 90px);left:calc(50% - 100px)}.loader-wrapper[_ngcontent-%COMP%] .right[_ngcontent-%COMP%]{border-width:90px 90px 90px 0;border-color:transparent #1daeec transparent transparent;top:calc(50% - 90px);right:calc(50% - 100px)}@keyframes _ngcontent-%COMP%_rotate{0%{transform:rotate(0)}to{transform:rotate(360deg)}}body[_ngcontent-%COMP%]{margin:0}.container[_ngcontent-%COMP%]{margin:0 auto}.mb-05[_ngcontent-%COMP%]{margin-bottom:.5rem}.mr-05[_ngcontent-%COMP%]{margin-right:.5rem}.mb-1[_ngcontent-%COMP%]{margin-bottom:1rem}.mt-1[_ngcontent-%COMP%]{margin-top:1rem}.m-5[_ngcontent-%COMP%]{margin:5px}.m-t-5[_ngcontent-%COMP%]{margin-top:5px}.m-r-5[_ngcontent-%COMP%]{margin-right:5px}.m-b-5[_ngcontent-%COMP%]{margin-bottom:5px}.m-l-5[_ngcontent-%COMP%]{margin-left:5px}.m-v-5[_ngcontent-%COMP%]{margin:5px 0}.m-h-5[_ngcontent-%COMP%]{margin:0 5px}.m-10[_ngcontent-%COMP%]{margin:10px}.m-t-10[_ngcontent-%COMP%]{margin-top:10px}.m-r-10[_ngcontent-%COMP%]{margin-right:10px}.m-b-10[_ngcontent-%COMP%]{margin-bottom:10px}.m-l-10[_ngcontent-%COMP%]{margin-left:10px}.m-v-10[_ngcontent-%COMP%]{margin:10px 0}.m-h-10[_ngcontent-%COMP%]{margin:0 10px}.m-15[_ngcontent-%COMP%]{margin:15px}.m-t-15[_ngcontent-%COMP%]{margin-top:15px}.m-r-15[_ngcontent-%COMP%]{margin-right:15px}.m-b-15[_ngcontent-%COMP%]{margin-bottom:15px}.m-l-15[_ngcontent-%COMP%]{margin-left:15px}.m-v-15[_ngcontent-%COMP%]{margin:15px 0}.m-h-15[_ngcontent-%COMP%]{margin:0 15px}.m-20[_ngcontent-%COMP%]{margin:20px}.m-t-20[_ngcontent-%COMP%]{margin-top:20px}.m-r-20[_ngcontent-%COMP%]{margin-right:20px}.m-b-20[_ngcontent-%COMP%]{margin-bottom:20px}.m-l-20[_ngcontent-%COMP%]{margin-left:20px}.m-v-20[_ngcontent-%COMP%]{margin:20px 0}.m-h-20[_ngcontent-%COMP%]{margin:0 20px}.m-25[_ngcontent-%COMP%]{margin:25px}.m-t-25[_ngcontent-%COMP%]{margin-top:25px}.m-r-25[_ngcontent-%COMP%]{margin-right:25px}.m-b-25[_ngcontent-%COMP%]{margin-bottom:25px}.m-l-25[_ngcontent-%COMP%]{margin-left:25px}.m-v-25[_ngcontent-%COMP%]{margin:25px 0}.m-h-25[_ngcontent-%COMP%]{margin:0 25px}.m-30[_ngcontent-%COMP%]{margin:30px}.m-t-30[_ngcontent-%COMP%]{margin-top:30px}.m-r-30[_ngcontent-%COMP%]{margin-right:30px}.m-b-30[_ngcontent-%COMP%]{margin-bottom:30px}.m-l-30[_ngcontent-%COMP%]{margin-left:30px}.m-v-30[_ngcontent-%COMP%]{margin:30px 0}.m-h-30[_ngcontent-%COMP%]{margin:0 30px}.m-35[_ngcontent-%COMP%]{margin:35px}.m-t-35[_ngcontent-%COMP%]{margin-top:35px}.m-r-35[_ngcontent-%COMP%]{margin-right:35px}.m-b-35[_ngcontent-%COMP%]{margin-bottom:35px}.m-l-35[_ngcontent-%COMP%]{margin-left:35px}.m-v-35[_ngcontent-%COMP%]{margin:35px 0}.m-h-35[_ngcontent-%COMP%]{margin:0 35px}.m-40[_ngcontent-%COMP%]{margin:40px}.m-t-40[_ngcontent-%COMP%]{margin-top:40px}.m-r-40[_ngcontent-%COMP%]{margin-right:40px}.m-b-40[_ngcontent-%COMP%]{margin-bottom:40px}.m-l-40[_ngcontent-%COMP%]{margin-left:40px}.m-v-40[_ngcontent-%COMP%]{margin:40px 0}.m-h-40[_ngcontent-%COMP%]{margin:0 40px}.m-45[_ngcontent-%COMP%]{margin:45px}.m-t-45[_ngcontent-%COMP%]{margin-top:45px}.m-r-45[_ngcontent-%COMP%]{margin-right:45px}.m-b-45[_ngcontent-%COMP%]{margin-bottom:45px}.m-l-45[_ngcontent-%COMP%]{margin-left:45px}.m-v-45[_ngcontent-%COMP%]{margin:45px 0}.m-h-45[_ngcontent-%COMP%]{margin:0 45px}.m-50[_ngcontent-%COMP%]{margin:50px}.m-t-50[_ngcontent-%COMP%]{margin-top:50px}.m-r-50[_ngcontent-%COMP%]{margin-right:50px}.m-b-50[_ngcontent-%COMP%]{margin-bottom:50px}.m-l-50[_ngcontent-%COMP%]{margin-left:50px}.m-v-50[_ngcontent-%COMP%]{margin:50px 0}.m-h-50[_ngcontent-%COMP%]{margin:0 50px}.m-55[_ngcontent-%COMP%]{margin:55px}.m-t-55[_ngcontent-%COMP%]{margin-top:55px}.m-r-55[_ngcontent-%COMP%]{margin-right:55px}.m-b-55[_ngcontent-%COMP%]{margin-bottom:55px}.m-l-55[_ngcontent-%COMP%]{margin-left:55px}.m-v-55[_ngcontent-%COMP%]{margin:55px 0}.m-h-55[_ngcontent-%COMP%]{margin:0 55px}.m-60[_ngcontent-%COMP%]{margin:60px}.m-t-60[_ngcontent-%COMP%]{margin-top:60px}.m-r-60[_ngcontent-%COMP%]{margin-right:60px}.m-b-60[_ngcontent-%COMP%]{margin-bottom:60px}.m-l-60[_ngcontent-%COMP%]{margin-left:60px}.m-v-60[_ngcontent-%COMP%]{margin:60px 0}.m-h-60[_ngcontent-%COMP%]{margin:0 60px}.m-65[_ngcontent-%COMP%]{margin:65px}.m-t-65[_ngcontent-%COMP%]{margin-top:65px}.m-r-65[_ngcontent-%COMP%]{margin-right:65px}.m-b-65[_ngcontent-%COMP%]{margin-bottom:65px}.m-l-65[_ngcontent-%COMP%]{margin-left:65px}.m-v-65[_ngcontent-%COMP%]{margin:65px 0}.m-h-65[_ngcontent-%COMP%]{margin:0 65px}.m-70[_ngcontent-%COMP%]{margin:70px}.m-t-70[_ngcontent-%COMP%]{margin-top:70px}.m-r-70[_ngcontent-%COMP%]{margin-right:70px}.m-b-70[_ngcontent-%COMP%]{margin-bottom:70px}.m-l-70[_ngcontent-%COMP%]{margin-left:70px}.m-v-70[_ngcontent-%COMP%]{margin:70px 0}.m-h-70[_ngcontent-%COMP%]{margin:0 70px}.m-75[_ngcontent-%COMP%]{margin:75px}.m-t-75[_ngcontent-%COMP%]{margin-top:75px}.m-r-75[_ngcontent-%COMP%]{margin-right:75px}.m-b-75[_ngcontent-%COMP%]{margin-bottom:75px}.m-l-75[_ngcontent-%COMP%]{margin-left:75px}.m-v-75[_ngcontent-%COMP%]{margin:75px 0}.m-h-75[_ngcontent-%COMP%]{margin:0 75px}.m-80[_ngcontent-%COMP%]{margin:80px}.m-t-80[_ngcontent-%COMP%]{margin-top:80px}.m-r-80[_ngcontent-%COMP%]{margin-right:80px}.m-b-80[_ngcontent-%COMP%]{margin-bottom:80px}.m-l-80[_ngcontent-%COMP%]{margin-left:80px}.m-v-80[_ngcontent-%COMP%]{margin:80px 0}.m-h-80[_ngcontent-%COMP%]{margin:0 80px}.no-m[_ngcontent-%COMP%]{margin:0}.no-m-t[_ngcontent-%COMP%]{margin-top:0}.no-m-r[_ngcontent-%COMP%]{margin-right:0}.no-m-b[_ngcontent-%COMP%]{margin-bottom:0}.no-m-l[_ngcontent-%COMP%]{margin-left:0}.no-m-v[_ngcontent-%COMP%], .no-m-h[_ngcontent-%COMP%], .no-margin[_ngcontent-%COMP%]{margin:0}.no-m-lr[_ngcontent-%COMP%], .no-m-rl[_ngcontent-%COMP%]{margin-left:0;margin-right:0}.no-m-tb[_ngcontent-%COMP%], .no-m-bt[_ngcontent-%COMP%]{margin-top:0;margin-bottom:0}.m-t-only[_ngcontent-%COMP%]{margin-left:0;margin-right:0;margin-bottom:0}.m-b-only[_ngcontent-%COMP%]{margin-left:0;margin-right:0;margin-top:0}.m-l-only[_ngcontent-%COMP%]{margin-right:0;margin-top:0;margin-bottom:0}.m-r-only[_ngcontent-%COMP%]{margin-left:0;margin-top:0;margin-bottom:0}.m-auto[_ngcontent-%COMP%]{margin-left:auto;margin-right:auto}.ls-0[_ngcontent-%COMP%]{margin-left:10px;margin-right:10px}html[_ngcontent-%COMP%], body[_ngcontent-%COMP%]{-webkit-tap-highlight-color:transparent}div[_ngcontent-%COMP%]{box-sizing:border-box}.color-inherit[_ngcontent-%COMP%]{color:inherit}.no-shadow[_ngcontent-%COMP%]{box-shadow:none}.pointer[_ngcontent-%COMP%]{cursor:pointer}.nolist[_ngcontent-%COMP%]{list-style:none}.actions-menu[_ngcontent-%COMP%]{color:#fff}.alert[_ngcontent-%COMP%]{background-color:#e8f4fd;padding:6px 16px;font-size:.875rem;font-family:Roboto,Helvetica Neue,sans-serif;font-weight:400;line-height:1.43;border-radius:4px;letter-spacing:normal;margin:10px}.alert[_ngcontent-%COMP%] .message[_ngcontent-%COMP%]{padding:8px 0;font-size:18px}.alert[_ngcontent-%COMP%] .alert-check[_ngcontent-%COMP%]{color:#359ff4;margin-right:2px;font-size:1.4rem} .mat-tooltip{font-size:15px;color:#fff!important;background-color:#4461e2b3;border:1px solid rgb(25.7777777778,51.5555555556,166.2222222222);max-width:400px!important;white-space:pre-line!important}.loading[_ngcontent-%COMP%]{position:absolute;min-width:100%;width:100px;height:12px;background:linear-gradient(125deg,#fff,#4461e2,#fff);animation:grow 4s linear infinite,move 4s linear infinite}mat-card-title[_ngcontent-%COMP%]{font-weight:600;font-size:x-large;padding-left:20px;padding-top:20px}html[_ngcontent-%COMP%], body[_ngcontent-%COMP%]{overflow:hidden}.overflow-x-scroll[_ngcontent-%COMP%]{max-width:100%;overflow-x:auto}.overflow-no[_ngcontent-%COMP%]{overflow:hidden}.overflow-auto[_ngcontent-%COMP%]{overflow:auto}.overflow-scroll[_ngcontent-%COMP%]{overflow:scroll}.table-container[_ngcontent-%COMP%]{overflow-x:auto;max-width:100%}body[_ngcontent-%COMP%], .no-p[_ngcontent-%COMP%]{padding:0}.no-p-t[_ngcontent-%COMP%]{padding-top:0}.no-p-r[_ngcontent-%COMP%]{padding-right:0}.no-p-b[_ngcontent-%COMP%]{padding-bottom:0}.no-p-l[_ngcontent-%COMP%]{padding-left:0}.no-p-v[_ngcontent-%COMP%], .no-p-h[_ngcontent-%COMP%]{padding:0}.p-5[_ngcontent-%COMP%]{padding:5px}.p-t-5[_ngcontent-%COMP%]{padding-top:5px}.p-r-5[_ngcontent-%COMP%]{padding-right:5px}.p-b-5[_ngcontent-%COMP%]{padding-bottom:5px}.p-l-5[_ngcontent-%COMP%]{padding-left:5px}.p-v-5[_ngcontent-%COMP%]{padding:5px 0}.p-h-5[_ngcontent-%COMP%]{padding:0 5px}.p-10[_ngcontent-%COMP%]{padding:10px}.p-t-10[_ngcontent-%COMP%]{padding-top:10px}.p-b-10[_ngcontent-%COMP%]{padding-bottom:10px}.p-v-10[_ngcontent-%COMP%]{padding:10px 0}.p-h-10[_ngcontent-%COMP%]{padding:0 10px}.p-15[_ngcontent-%COMP%]{padding:15px}.p-t-15[_ngcontent-%COMP%]{padding-top:15px}.p-r-15[_ngcontent-%COMP%]{padding-right:15px}.p-b-15[_ngcontent-%COMP%]{padding-bottom:15px}.p-l-15[_ngcontent-%COMP%]{padding-left:15px}.p-v-15[_ngcontent-%COMP%]{padding:15px 0}.p-h-15[_ngcontent-%COMP%]{padding:0 15px}.p-20[_ngcontent-%COMP%]{padding:20px}.p-t-20[_ngcontent-%COMP%]{padding-top:20px}.p-r-20[_ngcontent-%COMP%]{padding-right:20px}.p-b-20[_ngcontent-%COMP%]{padding-bottom:20px}.p-l-20[_ngcontent-%COMP%]{padding-left:20px}.p-v-20[_ngcontent-%COMP%]{padding:20px 0}.p-h-20[_ngcontent-%COMP%]{padding:0 20px}.p-25[_ngcontent-%COMP%]{padding:25px}.p-t-25[_ngcontent-%COMP%]{padding-top:25px}.p-r-25[_ngcontent-%COMP%]{padding-right:25px}.p-b-25[_ngcontent-%COMP%]{padding-bottom:25px}.p-l-25[_ngcontent-%COMP%]{padding-left:25px}.p-v-25[_ngcontent-%COMP%]{padding:25px 0}.p-h-25[_ngcontent-%COMP%]{padding:0 25px}.p-30[_ngcontent-%COMP%]{padding:30px}.p-t-30[_ngcontent-%COMP%]{padding-top:30px}.p-r-30[_ngcontent-%COMP%]{padding-right:30px}.p-b-30[_ngcontent-%COMP%]{padding-bottom:30px}.p-l-30[_ngcontent-%COMP%]{padding-left:30px}.p-v-30[_ngcontent-%COMP%]{padding:30px 0}.p-h-30[_ngcontent-%COMP%]{padding:0 30px}.p-35[_ngcontent-%COMP%]{padding:35px}.p-t-35[_ngcontent-%COMP%]{padding-top:35px}.p-r-35[_ngcontent-%COMP%]{padding-right:35px}.p-b-35[_ngcontent-%COMP%]{padding-bottom:35px}.p-l-35[_ngcontent-%COMP%]{padding-left:35px}.p-v-35[_ngcontent-%COMP%]{padding:35px 0}.p-h-35[_ngcontent-%COMP%]{padding:0 35px}.p-40[_ngcontent-%COMP%]{padding:40px}.p-t-40[_ngcontent-%COMP%]{padding-top:40px}.p-r-40[_ngcontent-%COMP%]{padding-right:40px}.p-b-40[_ngcontent-%COMP%]{padding-bottom:40px}.p-l-40[_ngcontent-%COMP%]{padding-left:40px}.p-v-40[_ngcontent-%COMP%]{padding-top:40px;padding-bottom:40px}.p-h-40[_ngcontent-%COMP%]{padding:0 40px}.p-45[_ngcontent-%COMP%]{padding:45px}.p-t-45[_ngcontent-%COMP%]{padding-top:45px}.p-r-45[_ngcontent-%COMP%]{padding-right:45px}.p-b-45[_ngcontent-%COMP%]{padding-bottom:45px}.p-l-45[_ngcontent-%COMP%]{padding-left:45px}.p-v-45[_ngcontent-%COMP%]{padding:45px 0}.p-h-45[_ngcontent-%COMP%]{padding:0 45px}.p-50[_ngcontent-%COMP%]{padding:50px}.p-t-50[_ngcontent-%COMP%]{padding-top:50px}.p-r-50[_ngcontent-%COMP%]{padding-right:50px}.p-b-50[_ngcontent-%COMP%]{padding-bottom:50px}.p-l-50[_ngcontent-%COMP%]{padding-left:50px}.p-v-50[_ngcontent-%COMP%]{padding:50px 0}.p-h-50[_ngcontent-%COMP%]{padding:0 50px}.p-55[_ngcontent-%COMP%]{padding:55px}.p-t-55[_ngcontent-%COMP%]{padding-top:55px}.p-r-55[_ngcontent-%COMP%]{padding-right:55px}.p-b-55[_ngcontent-%COMP%]{padding-bottom:55px}.p-l-55[_ngcontent-%COMP%]{padding-left:55px}.p-v-55[_ngcontent-%COMP%]{padding:55px 0}.p-h-55[_ngcontent-%COMP%]{padding:0 55px}.p-60[_ngcontent-%COMP%]{padding:60px}.p-t-60[_ngcontent-%COMP%]{padding-top:60px}.p-r-60[_ngcontent-%COMP%]{padding-right:60px}.p-b-60[_ngcontent-%COMP%]{padding-bottom:60px}.p-l-60[_ngcontent-%COMP%]{padding-left:60px}.p-v-60[_ngcontent-%COMP%]{padding:60px 0}.p-h-60[_ngcontent-%COMP%]{padding:0 60px}.p-65[_ngcontent-%COMP%]{padding:65px}.p-t-65[_ngcontent-%COMP%]{padding-top:65px}.p-r-65[_ngcontent-%COMP%]{padding-right:65px}.p-b-65[_ngcontent-%COMP%]{padding-bottom:65px}.p-l-65[_ngcontent-%COMP%]{padding-left:65px}.p-v-65[_ngcontent-%COMP%]{padding:65px 0}.p-h-65[_ngcontent-%COMP%]{padding:0 65px}.p-70[_ngcontent-%COMP%]{padding:70px}.p-t-70[_ngcontent-%COMP%]{padding-top:70px}.p-r-70[_ngcontent-%COMP%]{padding-right:70px}.p-b-70[_ngcontent-%COMP%]{padding-bottom:70px}.p-l-70[_ngcontent-%COMP%]{padding-left:70px}.p-v-70[_ngcontent-%COMP%]{padding:70px 0}.p-h-70[_ngcontent-%COMP%]{padding:0 70px}.p-75[_ngcontent-%COMP%]{padding:75px}.p-t-75[_ngcontent-%COMP%]{padding-top:75px}.p-r-75[_ngcontent-%COMP%]{padding-right:75px}.p-b-75[_ngcontent-%COMP%]{padding-bottom:75px}.p-l-75[_ngcontent-%COMP%]{padding-left:75px}.p-v-75[_ngcontent-%COMP%]{padding:75px 0}.p-h-75[_ngcontent-%COMP%]{padding:0 75px}.p-80[_ngcontent-%COMP%]{padding:80px}.p-t-80[_ngcontent-%COMP%]{padding-top:80px}.p-r-80[_ngcontent-%COMP%]{padding-right:80px}.p-b-80[_ngcontent-%COMP%]{padding-bottom:80px}.p-l-80[_ngcontent-%COMP%]{padding-left:80px}.p-v-80[_ngcontent-%COMP%]{padding:80px 0}.p-h-80[_ngcontent-%COMP%]{padding:0 80px}.no-padding[_ngcontent-%COMP%]{padding:0!important}.no-pad-lr[_ngcontent-%COMP%], .no-pad-rl[_ngcontent-%COMP%]{padding-left:0;padding-right:0}.no-pad-tb[_ngcontent-%COMP%], .no-pad-bt[_ngcontent-%COMP%]{padding-top:0;padding-bottom:0}.pad-t-only[_ngcontent-%COMP%]{padding-left:0;padding-right:0;padding-bottom:0}.pad-b-only[_ngcontent-%COMP%]{padding-left:0;padding-right:0;padding-top:0}.pad-l-only[_ngcontent-%COMP%]{padding-right:0;padding-top:0;padding-bottom:0}.pad-r-only[_ngcontent-%COMP%]{padding-left:0;padding-top:0;padding-bottom:0}html[_ngcontent-%COMP%], body[_ngcontent-%COMP%], .rel[_ngcontent-%COMP%], .relative[_ngcontent-%COMP%]{position:relative}.abs[_ngcontent-%COMP%], .absolute[_ngcontent-%COMP%]{position:absolute}.fixed[_ngcontent-%COMP%]{position:fixed}.status-active[_ngcontent-%COMP%]{color:#5cb85c}.status-inactive[_ngcontent-%COMP%]{color:#666f73}.status-deleted[_ngcontent-%COMP%]{color:#000}.status-pending[_ngcontent-%COMP%]{color:orange}.status-approved[_ngcontent-%COMP%]{color:#4461e2}.status-overpaid[_ngcontent-%COMP%]{color:purple}.status-chargeoff[_ngcontent-%COMP%]{color:#f39c12}.status-active-overdue[_ngcontent-%COMP%], .status-block[_ngcontent-%COMP%]{color:red}.status-matured[_ngcontent-%COMP%]{color:#ff4000}.subStatus-contract-termination[_ngcontent-%COMP%]{color:#b3b3b3}.mat-step-header[_ngcontent-%COMP%] .mat-step-icon-state-done[_ngcontent-%COMP%]{background-color:#2af72a}.mat-step-header[_ngcontent-%COMP%] .mat-step-icon-state-done[_ngcontent-%COMP%] .status-transfer-progress[_ngcontent-%COMP%]{color:#ff4000}.mat-step-header[_ngcontent-%COMP%] .mat-step-icon-state-done[_ngcontent-%COMP%] .status-transfer-hold[_ngcontent-%COMP%]{color:#df0101}html[_ngcontent-%COMP%], body[_ngcontent-%COMP%]{-webkit-font-smoothing:antialiased}html[_ngcontent-%COMP%]{font-size:16px}body[_ngcontent-%COMP%]{font-family:Roboto,Helvetica Neue,sans-serif;font-weight:400;font-size:14px;color:#000000de;line-height:1.5;letter-spacing:normal}.mat-h1[_ngcontent-%COMP%], .mat-headline[_ngcontent-%COMP%], .mat-typography[_ngcontent-%COMP%] .mat-h1[_ngcontent-%COMP%], .mat-typography[_ngcontent-%COMP%] .mat-headline[_ngcontent-%COMP%], .mat-typography[_ngcontent-%COMP%] h1[_ngcontent-%COMP%]{font:400 24px/32px Roboto,Helvetica Neue,sans-serif;letter-spacing:normal;margin:0 0 16px}.lh-1[_ngcontent-%COMP%]{line-height:1}.lh-13[_ngcontent-%COMP%]{line-height:1.3}.lh-15[_ngcontent-%COMP%]{line-height:1.5}.bold[_ngcontent-%COMP%], .strong[_ngcontent-%COMP%]{font-weight:700}.no-bold[_ngcontent-%COMP%]{font-weight:400}.italic[_ngcontent-%COMP%], .em[_ngcontent-%COMP%]{font-style:italic}.strike[_ngcontent-%COMP%]{text-decoration:line-through}.normal[_ngcontent-%COMP%]{font-weight:400;font-style:normal}.uppercase[_ngcontent-%COMP%]{text-transform:uppercase}.text-left[_ngcontent-%COMP%]{text-align:left}.text-center[_ngcontent-%COMP%]{text-align:center}.text-right[_ngcontent-%COMP%]{text-align:right}.w100[_ngcontent-%COMP%]{font-weight:100}.w200[_ngcontent-%COMP%]{font-weight:200}.w300[_ngcontent-%COMP%]{font-weight:300}.w400[_ngcontent-%COMP%]{font-weight:400}.w500[_ngcontent-%COMP%]{font-weight:500}.w600[_ngcontent-%COMP%]{font-weight:600}.w700[_ngcontent-%COMP%]{font-weight:700}.w800[_ngcontent-%COMP%]{font-weight:800}.w900[_ngcontent-%COMP%]{font-weight:900}.f9[_ngcontent-%COMP%]{font-size:9px}.f10[_ngcontent-%COMP%]{font-size:10px}.f11[_ngcontent-%COMP%]{font-size:11px}.f12[_ngcontent-%COMP%]{font-size:12px}.f13[_ngcontent-%COMP%]{font-size:13px}.f14[_ngcontent-%COMP%]{font-size:14px}.f15[_ngcontent-%COMP%]{font-size:15px}.f16[_ngcontent-%COMP%]{font-size:16px}.f17[_ngcontent-%COMP%]{font-size:17px}.f18[_ngcontent-%COMP%]{font-size:18px;line-height:30px}.f19[_ngcontent-%COMP%]{font-size:19px}.f20[_ngcontent-%COMP%]{font-size:20px}.f30[_ngcontent-%COMP%]{font-size:30px}.f40[_ngcontent-%COMP%]{font-size:40px}.f50[_ngcontent-%COMP%]{font-size:50px}.f60[_ngcontent-%COMP%]{font-size:60px}.size-small[_ngcontent-%COMP%]{font-size:75%}.size-normal[_ngcontent-%COMP%]{font-size:100%}.size-medium[_ngcontent-%COMP%]{font-size:125%}.size-big[_ngcontent-%COMP%], .size-large[_ngcontent-%COMP%]{font-size:150%}.size-huge[_ngcontent-%COMP%]{font-size:200%}.inherit[_ngcontent-%COMP%]{font:inherit}.text-shadow[_ngcontent-%COMP%]{text-shadow:1px 1px 1px rgba(0,0,0,.4)}.text-rgb-2[_ngcontent-%COMP%]{color:#0003}.text-rgb-3[_ngcontent-%COMP%]{color:#0000004d}.text-rgb-4[_ngcontent-%COMP%]{color:#0006}.text-rgb-5[_ngcontent-%COMP%]{color:#00000080}.no-ul[_ngcontent-%COMP%], .no-ul[_ngcontent-%COMP%]:hover, .no-ul[_ngcontent-%COMP%] a[_ngcontent-%COMP%], .no-ul[_ngcontent-%COMP%] a[_ngcontent-%COMP%]:hover{text-decoration:none}.no-wrap[_ngcontent-%COMP%]{white-space:nowrap}.auto-cell-size[_ngcontent-%COMP%]{white-space:nowrap;width:1%}.ls-0[_ngcontent-%COMP%]{letter-spacing:-3px;white-space:nowrap}.label-field[_ngcontent-%COMP%]{margin-top:32px}.wrap-content[_ngcontent-%COMP%]{overflow-wrap:break-word;word-wrap:break-word}.no-break-content[_ngcontent-%COMP%]{overflow-wrap:anywhere!important}.fit[_ngcontent-%COMP%]{max-width:100%}.half-width[_ngcontent-%COMP%]{width:50%}.full-width[_ngcontent-%COMP%]{width:100%}.full-height[_ngcontent-%COMP%]{height:100%}html[_ngcontent-%COMP%], body[_ngcontent-%COMP%]{width:100%;height:100%;min-height:100%}body[_ngcontent-%COMP%] table[_ngcontent-%COMP%]{width:100%}.container[_ngcontent-%COMP%]{max-width:74rem;width:90%}.mw300[_ngcontent-%COMP%]{max-width:300px}.mw400[_ngcontent-%COMP%]{max-width:400px}.mw500[_ngcontent-%COMP%]{max-width:500px}.mw600[_ngcontent-%COMP%]{max-width:600px}.fullwidth[_ngcontent-%COMP%]{width:100%}.zindex-1[_ngcontent-%COMP%]{z-index:1}.zindex-2[_ngcontent-%COMP%]{z-index:2}.zindex-3[_ngcontent-%COMP%]{z-index:3}.zindex-4[_ngcontent-%COMP%]{z-index:4}.container[_ngcontent-%COMP%]{max-width:37rem}.container[_ngcontent-%COMP%] .card-content[_ngcontent-%COMP%] div[_ngcontent-%COMP%]{margin:1rem 0;word-wrap:break-word}.container[_ngcontent-%COMP%] .card-content[_ngcontent-%COMP%] mifosx-transaction-payment-detail[_ngcontent-%COMP%]{width:100%;margin-bottom:20px}.transaction-buttons[_ngcontent-%COMP%]{margin-top:3%}.loan-relation[_ngcontent-%COMP%]{background-color:#d7dada}.active[_ngcontent-%COMP%]{background-color:#5cb85c;height:4px}.linked[_ngcontent-%COMP%]{background-color:#4461e2;height:4px}.undo[_ngcontent-%COMP%]{background-color:red;height:4px}"]})}}return t})();var D8=()=>["../"];function w8(t,n){t&1&&(s(0,"mat-error"),c(1),p(2,"translate"),p(3,"translate"),s(4,"strong"),c(5),p(6,"translate"),l()()),t&2&&(o(),$t(" ",m(2,3,"labels.inputs.Transaction Date")," ",m(3,5,"labels.commons.is")," "),o(4),v(" ",m(6,7,"labels.commons.required")," "))}function T8(t,n){if(t&1&&(s(0,"mat-option",10),c(1),l()),t&2){let e=n.$implicit;x("value",e.id),o(),v(" ",e.name," ")}}function P8(t,n){t&1&&(s(0,"mat-form-field")(1,"mat-label"),c(2),p(3,"translate"),l(),T(4,"input",18),l()),t&2&&(o(2),b(m(3,1,"labels.inputs.Account Number")))}function A8(t,n){t&1&&(s(0,"mat-form-field")(1,"mat-label"),c(2),p(3,"translate"),l(),T(4,"input",19),l()),t&2&&(o(2),b(m(3,1,"labels.inputs.Cheque")))}function M8(t,n){t&1&&(s(0,"mat-form-field")(1,"mat-label"),c(2),p(3,"translate"),l(),T(4,"input",20),l()),t&2&&(o(2),b(m(3,1,"labels.inputs.Routing Code")))}function O8(t,n){t&1&&(s(0,"mat-form-field")(1,"mat-label"),c(2),p(3,"translate"),l(),T(4,"input",21),l()),t&2&&(o(2),b(m(3,1,"labels.inputs.Receipt Number")))}function I8(t,n){t&1&&(s(0,"mat-form-field")(1,"mat-label"),c(2),p(3,"translate"),l(),T(4,"input",22),l()),t&2&&(o(2),b(m(3,1,"labels.inputs.Bank")))}var u0=(()=>{class t{constructor(){this.formBuilder=A(Te),this.route=A(Et),this.router=A(le),this.dateUtils=A(de),this.loansService=A(Mt),this.settingsService=A(oe),this.minDate=new Date(2e3,0,1),this.maxDate=new Date,this.showPaymentDetails=!1,this.route.data.subscribe(e=>{this.transactionTemplateData=e.loansAccountTransactionTemplate,e.loansAccountTransactionTemplate.currency&&(this.currency=e.loansAccountTransactionTemplate.currency),this.paymentTypeOptions=this.transactionTemplateData.paymentTypeOptions}),this.loanAccountId=this.route.snapshot.params.loanId}ngOnInit(){this.maxDate=this.settingsService.businessDate,this.createEditTransactionForm(),this.editTransactionForm.patchValue({transactionDate:this.transactionTemplateData.date&&new Date(this.transactionTemplateData.date),transactionAmount:this.transactionTemplateData.amount,externalId:this.transactionTemplateData.externalId,paymentTypeId:this.transactionTemplateData.paymentTypeId})}createEditTransactionForm(){this.editTransactionForm=this.formBuilder.group({transactionDate:["",Gt.required],transactionAmount:["",Gt.required],externalId:[""],paymentTypeId:[""]})}addPaymentDetails(){this.showPaymentDetails=!this.showPaymentDetails,this.showPaymentDetails?(this.editTransactionForm.addControl("accountNumber",new pe("")),this.editTransactionForm.addControl("checkNumber",new pe("")),this.editTransactionForm.addControl("routingCode",new pe("")),this.editTransactionForm.addControl("receiptNumber",new pe("")),this.editTransactionForm.addControl("bankNumber",new pe(""))):(this.editTransactionForm.removeControl("accountNumber"),this.editTransactionForm.removeControl("checkNumber"),this.editTransactionForm.removeControl("routingCode"),this.editTransactionForm.removeControl("receiptNumber"),this.editTransactionForm.removeControl("bankNumber"))}submit(){let e=this.editTransactionForm.value,i=this.settingsService.language.code,a=this.settingsService.dateFormat,r=this.editTransactionForm.value.transactionDate;e.transactionDate instanceof Date&&(e.transactionDate=this.dateUtils.formatDate(r,a));let u=ve(ie({},e),{dateFormat:a,locale:i});u.transactionAmount=u.transactionAmount*1,this.loansService.executeLoansAccountTransactionsCommand(this.loanAccountId,"modify",u,this.transactionTemplateData.id).subscribe(d=>{this.router.navigate(["../"],{relativeTo:this.route})})}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=Dt({type:t,selectors:[["mifosx-edit-transaction"]],decls:45,vars:37,consts:[["dueDatePicker",""],[1,"container"],[3,"ngSubmit","formGroup"],[1,"layout-column"],[3,"click"],["matInput","","formControlName","transactionDate","required","",3,"min","max","matDatepicker"],["matSuffix","",3,"for"],[3,"currency","isRequired","inputFormControl","inputLabel"],["matInput","","formControlName","externalId"],["formControlName","paymentTypeId"],[3,"value"],[1,"flex-fill"],[1,"expandcollapsebutton","m-l-10","m-t-40","flex-75",3,"click"],[3,"className"],[1,"m-l-10"],[1,"layout-row","layout-xs-column","layout-align-center","gap-5px"],["type","button","mat-raised-button","",3,"routerLink"],["mat-raised-button","","color","primary",3,"disabled"],["type","number","formControlName","accountNumber","matInput",""],["type","number","formControlName","checkNumber","matInput",""],["formControlName","routingCode","matInput",""],["formControlName","receiptNumber","matInput",""],["formControlName","bankNumber","matInput",""]],template:function(i,a){if(i&1){let r=xt();s(0,"div",1)(1,"mat-card")(2,"form",2),it("ngSubmit",function(){return mt(r),dt(a.submit())}),s(3,"mat-card-content",3)(4,"mat-form-field",4),it("click",function(){mt(r);let d=Lt(11);return dt(d.open())}),s(5,"mat-label"),c(6),p(7,"translate"),l(),T(8,"input",5)(9,"mat-datepicker-toggle",6)(10,"mat-datepicker",null,0),M(12,w8,7,9,"mat-error"),l(),T(13,"mifosx-input-amount",7),s(14,"mat-form-field")(15,"mat-label"),c(16),p(17,"translate"),l(),T(18,"input",8),l(),s(19,"mat-form-field")(20,"mat-label"),c(21),p(22,"translate"),l(),s(23,"mat-select",9),ue(24,T8,2,2,"mat-option",10,Ce),l()(),s(26,"div",11)(27,"span",12),it("click",function(){return mt(r),dt(a.addPaymentDetails())}),s(28,"mat-slide-toggle")(29,"div",13)(30,"span",14),c(31),p(32,"translate"),l()()()()(),M(33,P8,5,3,"mat-form-field"),M(34,A8,5,3,"mat-form-field"),M(35,M8,5,3,"mat-form-field"),M(36,O8,5,3,"mat-form-field"),M(37,I8,5,3,"mat-form-field"),s(38,"mat-card-actions",15)(39,"button",16),c(40),p(41,"translate"),l(),s(42,"button",17),c(43),p(44,"translate"),l()()()()()()}if(i&2){let r=Lt(11);o(2),x("formGroup",a.editTransactionForm),o(4),b(m(7,24,"labels.inputs.Transaction Date")),o(2),x("min",a.minDate)("max",a.maxDate)("matDatepicker",r),o(),x("for",r),o(3),O(a.editTransactionForm.controls.transactionDate.hasError("required")?12:-1),o(),x("currency",a.currency)("isRequired",!0)("inputFormControl",a.editTransactionForm.controls.transactionAmount)("inputLabel","Transaction Amount"),o(3),b(m(17,26,"labels.inputs.External Id")),o(5),b(m(22,28,"labels.inputs.Payment Type")),o(3),fe(a.paymentTypeOptions),o(5),x("className",a.showPaymentDetails?"enabled":"disabled"),o(2),b(m(32,30,"labels.inputs.Show Payment Details")),o(2),O(a.editTransactionForm.controls.accountNumber?33:-1),o(),O(a.editTransactionForm.controls.checkNumber?34:-1),o(),O(a.editTransactionForm.controls.routingCode?35:-1),o(),O(a.editTransactionForm.controls.receiptNumber?36:-1),o(),O(a.editTransactionForm.controls.bankNumber?37:-1),o(2),x("routerLink",Ut(36,D8)),o(),v(" ",m(41,32,"labels.buttons.Cancel")," "),o(2),x("disabled",!a.editTransactionForm.valid),o(),v(" ",m(44,34,"labels.buttons.Submit")," ")}},dependencies:[wt,Tt,Re,we,Mi,he,Ee,je,Le,Ne,ae,xe,Oe,ze,_e,ge,Ve,Je,Pe,In,On,tn,en,Qe,Wt,Ri,ja,Pt],styles:[".container[_ngcontent-%COMP%]{width:37rem;margin-top:3%;padding-bottom:2%}"]})}}return t})();var E8=()=>["../../../general"],f0=(()=>{class t{constructor(){this.sanitizer=A(Zl),this.route=A(Et),this.route.data.subscribe(e=>{this.transactionRecieptData=e.loansTransactionReciept})}ngOnInit(){let e=this.transactionRecieptData.headers.get("Content-Type"),i=new Blob([this.transactionRecieptData.body],{type:e}),a=URL.createObjectURL(i);this.pentahoUrl=this.sanitizer.bypassSecurityTrustResourceUrl(a)}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=Dt({type:t,selectors:[["mifosx-view-reciept"]],decls:7,vars:6,consts:[[1,"container"],[1,"back-button"],["type","button","color","primary","mat-raised-button","",3,"routerLink"],["icon","arrow-left",1,"m-r-10"],["frameborder","0","width","100%","height","600px;",3,"src"]],template:function(i,a){i&1&&(s(0,"mat-card",0)(1,"div",1)(2,"button",2),T(3,"fa-icon",3),c(4),p(5,"translate"),l()(),T(6,"iframe",4),l()),i&2&&(o(2),x("routerLink",Ut(5,E8)),o(2),v("",m(5,3,"labels.buttons.Back")," "),o(2),x("src",a.pentahoUrl,hp))},dependencies:[wt,Tt,ae,xe,Wt,un,Pt],styles:[".container[_ngcontent-%COMP%]{max-width:50rem}.container[_ngcontent-%COMP%] .back-button[_ngcontent-%COMP%]{max-height:2%;margin-bottom:2%}"]})}}return t})();var L8=()=>["../"];function N8(t,n){if(t&1&&T(0,"iframe",13),t&2){let e=P();x("src",e.pentahoUrl,hp)}}var h0=(()=>{class t{constructor(){this.sanitizer=A(Zl),this.reportsService=A(Ip),this.formBuilder=A(Te),this.dateUtils=A(de),this.route=A(Et),this.settingsService=A(oe),this.minDate=new Date(2e3,0,1),this.maxDate=new Date,this.hideOutput=!0,this.route.parent.parent.data.subscribe(e=>{this.loansAccountId=e.loanDetailsData.accountNo})}ngOnInit(){this.maxDate=this.settingsService.businessDate,this.createTransactionsReportForm()}createTransactionsReportForm(){this.transactionsReportForm=this.formBuilder.group({fromDate:["",Gt.required],toDate:[this.settingsService.businessDate,Gt.required]})}generate(){let e=this.settingsService.dateFormat,i={"output-type":"PDF",R_startDate:this.dateUtils.formatDate(this.transactionsReportForm.value.fromDate,e),R_endDate:this.dateUtils.formatDate(this.transactionsReportForm.value.toDate,e),R_selectLoan:this.loansAccountId};this.reportsService.getPentahoRunReportData("Client Loan Account Schedule",i,"default","en",e).subscribe(a=>{let r=a.headers.get("Content-Type"),u=new Blob([a.body],{type:r}),d=URL.createObjectURL(u);this.pentahoUrl=this.sanitizer.bypassSecurityTrustResourceUrl(d),this.hideOutput=!1})}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=Dt({type:t,selectors:[["mifosx-export-transactions"]],decls:41,vars:43,consts:[["fromDatePicker",""],["toDatePicker",""],[1,"layout-column","m-t-20",3,"ngSubmit","formGroup"],[1,"layout-row","layout-align-center","gap-3percent"],[1,"flex-fill",3,"click"],["matInput","","required","","formControlName","fromDate",3,"min","max","matDatepicker"],["matSuffix","",3,"for"],[1,"flex-fill","flex-30",3,"click"],["matInput","","required","","formControlName","toDate",3,"min","max","matDatepicker"],[1,"generate-button","layout-row","layout-xs-column","layout-align-center","gap-5percent"],["type","button","mat-raised-button","",3,"routerLink"],["mat-raised-button","","color","primary",3,"disabled"],["icon","cogs",1,"m-r-10"],["frameborder","0","width","100%","height","750px;",3,"src"]],template:function(i,a){if(i&1){let r=xt();s(0,"form",2),it("ngSubmit",function(){return mt(r),dt(a.generate())}),s(1,"div",3)(2,"mat-form-field",4),it("click",function(){mt(r);let d=Lt(9);return dt(d.open())}),s(3,"mat-label"),c(4),p(5,"translate"),l(),T(6,"input",5)(7,"mat-datepicker-toggle",6)(8,"mat-datepicker",null,0),s(10,"mat-error"),c(11),p(12,"translate"),p(13,"translate"),s(14,"strong"),c(15),p(16,"translate"),l()()(),s(17,"mat-form-field",7),it("click",function(){mt(r);let d=Lt(24);return dt(d.open())}),s(18,"mat-label"),c(19),p(20,"translate"),l(),T(21,"input",8)(22,"mat-datepicker-toggle",6)(23,"mat-datepicker",null,1),s(25,"mat-error"),c(26),p(27,"translate"),p(28,"translate"),s(29,"strong"),c(30),p(31,"translate"),l()()()(),s(32,"div",9)(33,"button",10),c(34),p(35,"translate"),l(),s(36,"button",11),T(37,"fa-icon",12),c(38),p(39,"translate"),l()()(),M(40,N8,1,1,"iframe",13)}if(i&2){let r=Lt(9),u=Lt(24);x("formGroup",a.transactionsReportForm),o(4),b(m(5,22,"labels.inputs.From Date")),o(2),x("min",a.minDate)("max",a.maxDate)("matDatepicker",r),o(),x("for",r),o(4),$t(" ",m(12,24,"labels.inputs.From date")," ",m(13,26,"labels.commons.is")," "),o(4),v(" ",m(16,28,"labels.commons.required")," "),o(4),b(m(20,30,"labels.inputs.To Date")),o(2),x("min",a.minDate)("max",a.maxDate)("matDatepicker",u),o(),x("for",u),o(4),$t(" ",m(27,32,"labels.inputs.To date")," ",m(28,34,"labels.commons.is")," "),o(4),v(" ",m(31,36,"labels.commons.required")," "),o(3),x("routerLink",Ut(42,L8)),o(),b(m(35,38,"labels.buttons.Cancel")),o(2),x("disabled",!a.transactionsReportForm.valid),o(2),v("",m(39,40,"labels.buttons.Generate Report")," \xA0 "),o(2),O(a.hideOutput?-1:40)}},dependencies:[wt,Tt,Re,we,he,Ee,je,Le,Ne,ae,_e,ge,Ve,Je,Pe,tn,en,Qe,Wt,un,Pt],styles:[".generate-button[_ngcontent-%COMP%]{max-height:2%;padding:1% 0 2% 6%;align-self:center}"]})}}return t})();var k8=t=>["../../",t,"general"];function F8(t,n){t&1&&(s(0,"th",12),c(1),p(2,"translate"),l()),t&2&&(o(),b(m(2,1,"labels.inputs.Loan Id")))}function R8(t,n){if(t&1&&(s(0,"td",13),c(1),l()),t&2){let e=n.$implicit;o(),v(" ",e.childLoanId," ")}}function B8(t,n){t&1&&(s(0,"th",12),c(1),p(2,"translate"),l()),t&2&&(o(),b(m(2,1,"labels.inputs.Client ID")))}function q8(t,n){if(t&1&&(s(0,"td",13),c(1),l()),t&2){let e=n.$implicit;o(),b(e.clientId)}}function j8(t,n){t&1&&(s(0,"th",12),c(1),p(2,"translate"),l()),t&2&&(o(),b(m(2,1,"labels.inputs.Client Name")))}function z8(t,n){if(t&1&&(s(0,"td",13),c(1),l()),t&2){let e=n.$implicit;o(),b(e.clientName)}}function V8(t,n){t&1&&(s(0,"th",12),c(1),p(2,"translate"),l()),t&2&&(o(),b(m(2,1,"labels.inputs.Loan Account Number")))}function U8(t,n){if(t&1&&(s(0,"td",13),c(1),l()),t&2){let e=n.$implicit;o(),b(e.childLoanAccountNo)}}function H8(t,n){t&1&&(s(0,"th",12),c(1),p(2,"translate"),l()),t&2&&(o(),b(m(2,1,"labels.inputs.Client Principal Loan")))}function G8(t,n){if(t&1&&(s(0,"td",13),c(1),l()),t&2){let e=n.$implicit;o(),b(e.childPrincipalAmount)}}function W8(t,n){t&1&&(s(0,"th",12),c(1),p(2,"translate"),l()),t&2&&(o(),b(m(2,1,"labels.inputs.Group Principal Loan")))}function $8(t,n){if(t&1&&(s(0,"td",13),c(1),l()),t&2){let e=n.$implicit;o(),b(e.parentPrincipalAmount)}}function Y8(t,n){t&1&&T(0,"tr",14)}function Z8(t,n){if(t&1&&T(0,"tr",15),t&2){let e=n.$implicit;x("routerLink",La(1,k8,e.childLoanId))}}var g0=(()=>{class t{constructor(){this.route=A(Et),this.dialog=A(Gn),this.displayedColumns=["loanId","clientId","clientName","loanAccountNumber","clientPrincipalLoan","groupPrincipalLoan"],this.route.data.subscribe(e=>{this.glimOverviewData=e.glimData})}ngOnInit(){this.setLoanClientChargeOverview()}setLoanClientChargeOverview(){this.dataSource=new Li(this.glimOverviewData)}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=Dt({type:t,selectors:[["mifosx-glim-account"]],viewQuery:function(i,a){if(i&1&&mi(Do,7),i&2){let r;di(r=ui())&&(a.paginator=r.first)}},decls:26,vars:6,consts:[[1,"loan-card"],["mat-table","",3,"dataSource"],["matColumnDef","loanId"],["mat-header-cell","",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","clientId"],["matColumnDef","clientName"],["matColumnDef","loanAccountNumber"],["matColumnDef","clientPrincipalLoan"],["matColumnDef","groupPrincipalLoan"],["mat-header-row","",4,"matHeaderRowDef"],["mat-row","",3,"routerLink",4,"matRowDef","matRowDefColumns"],["mat-header-cell",""],["mat-cell",""],["mat-header-row",""],["mat-row","",3,"routerLink"]],template:function(i,a){i&1&&(s(0,"mat-card",0)(1,"mat-card-content")(2,"h2"),c(3),p(4,"translate"),l(),s(5,"table",1),X(6,2),k(7,F8,3,3,"th",3)(8,R8,2,1,"td",4),Q(),X(9,5),k(10,B8,3,3,"th",3)(11,q8,2,1,"td",4),Q(),X(12,6),k(13,j8,3,3,"th",3)(14,z8,2,1,"td",4),Q(),X(15,7),k(16,V8,3,3,"th",3)(17,U8,2,1,"td",4),Q(),X(18,8),k(19,H8,3,3,"th",3)(20,G8,2,1,"td",4),Q(),X(21,9),k(22,W8,3,3,"th",3)(23,$8,2,1,"td",4),Q(),k(24,Y8,1,0,"tr",10)(25,Z8,1,3,"tr",11),l()()()),i&2&&(o(3),b(m(4,4,"labels.heading.GLIM Account Overview")),o(2),x("dataSource",a.dataSource),o(19),x("matHeaderRowDef",a.displayedColumns),o(),x("matRowDefColumns",a.displayedColumns))},dependencies:[wt,Tt,ae,xe,Oe,bn,yn,xn,Sn,vn,Dn,wn,Pn,Tn,An,Pt],styles:[".loan-card[_ngcontent-%COMP%]{margin:0 auto;max-width:80rem;width:90%;padding:0}.loan-card[_ngcontent-%COMP%] .header[_ngcontent-%COMP%]{padding:1%}.loan-card[_ngcontent-%COMP%] .header[_ngcontent-%COMP%] .header-title-group[_ngcontent-%COMP%] .loan-card-title[_ngcontent-%COMP%]{color:#fff;width:90%}.loan-card[_ngcontent-%COMP%] .header[_ngcontent-%COMP%] .header-title-group[_ngcontent-%COMP%] .loan-card-title[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{color:#fff}.loan-card[_ngcontent-%COMP%] .header[_ngcontent-%COMP%] .profile-image-container[_ngcontent-%COMP%]{margin:1%}.loan-card[_ngcontent-%COMP%] .header[_ngcontent-%COMP%] .profile-image-container[_ngcontent-%COMP%] .profile-image[_ngcontent-%COMP%]{object-fit:cover;border-radius:20px}.loan-card[_ngcontent-%COMP%] .header[_ngcontent-%COMP%] .loan-actions[_ngcontent-%COMP%]{align-self:flex-end;margin:0 1%}.loan-card[_ngcontent-%COMP%] .header[_ngcontent-%COMP%] .loan-span[_ngcontent-%COMP%]{margin:0 .5%}.loan-card[_ngcontent-%COMP%] .navigation-tabs[_ngcontent-%COMP%]{overflow:auto}.loans-overview[_ngcontent-%COMP%]{font-size:14px}"]})}}return t})();var K8=()=>["../","general"];function J8(t,n){if(t&1){let e=xt();s(0,"th",17)(1,"mat-checkbox",18),it("change",function(){mt(e);let a=P(2);return dt(a.toggleSelects())}),nc("ngModelChange",function(a){mt(e);let r=P(2);return ec(r.selectAllItems,a)||(r.selectAllItems=a),dt(a)}),l()()}if(t&2){let e=P(2);o(),tc("ngModel",e.selectAllItems)}}function X8(t,n){if(t&1){let e=xt();s(0,"td",19)(1,"mat-checkbox",18),it("change",function(){mt(e);let a=P(2);return dt(a.toggleSelect())}),nc("ngModelChange",function(a){let r=mt(e).$implicit;return ec(r.selected,a)||(r.selected=a),dt(a)}),l()()}if(t&2){let e=n.$implicit;o(),tc("ngModel",e.selected)}}function Q8(t,n){t&1&&(s(0,"th",17),c(1),p(2,"translate"),l()),t&2&&(o(),b(m(2,1,"labels.inputs.Client ID")))}function tL(t,n){if(t&1&&(s(0,"td",19),c(1),l()),t&2){let e=n.$implicit;o(),b(e.id)}}function eL(t,n){t&1&&(s(0,"th",17),c(1),p(2,"translate"),l()),t&2&&(o(),b(m(2,1,"labels.inputs.Client Name")))}function nL(t,n){if(t&1&&(s(0,"td",19),c(1),l()),t&2){let e=n.$implicit;o(),b(e.displayName)}}function iL(t,n){t&1&&(s(0,"th",17),c(1),p(2,"translate"),l()),t&2&&(o(),b(m(2,1,"labels.inputs.Loan Purpose")))}function aL(t,n){if(t&1&&(s(0,"mat-option",21),c(1),l()),t&2){let e=n.$implicit;x("value",e.id),o(),v(" ",e.name," ")}}function oL(t,n){if(t&1){let e=xt();s(0,"td",19)(1,"mat-form-field")(2,"mat-label"),c(3),p(4,"translate"),l(),s(5,"mat-select",20),nc("ngModelChange",function(a){let r=mt(e).$implicit;return ec(r.loanPurposeId,a)||(r.loanPurposeId=a),dt(a)}),ue(6,aL,2,2,"mat-option",21,Ce),l()()()}if(t&2){let e=n.$implicit,i=P(2);o(3),b(m(4,2,"labels.inputs.Select Purpose")),o(2),tc("ngModel",e.loanPurposeId),o(),fe(i.loanPurposeOptions)}}function rL(t,n){t&1&&(s(0,"th",17),c(1),p(2,"translate"),l()),t&2&&(o(),b(m(2,1,"labels.inputs.Original Loan")))}function lL(t,n){if(t&1){let e=xt();s(0,"td",19)(1,"mat-form-field")(2,"input",22),nc("ngModelChange",function(a){let r=mt(e).$implicit;return ec(r.principal,a)||(r.principal=a),dt(a)}),l()()()}if(t&2){let e=n.$implicit;o(2),tc("ngModel",e.principal)}}function sL(t,n){t&1&&T(0,"tr",23)}function cL(t,n){t&1&&T(0,"tr",24)}function pL(t,n){if(t&1&&(s(0,"div",0)(1,"table",7),X(2,8),k(3,J8,2,1,"th",9)(4,X8,2,1,"td",10),Q(),X(5,11),k(6,Q8,3,3,"th",9)(7,tL,2,1,"td",10),Q(),X(8,12),k(9,eL,3,3,"th",9)(10,nL,2,1,"td",10),Q(),X(11,13),k(12,iL,3,3,"th",9)(13,oL,8,4,"td",10),Q(),X(14,14),k(15,rL,3,3,"th",9)(16,lL,3,1,"td",10),Q(),k(17,sL,1,0,"tr",15)(18,cL,1,0,"tr",16),l()()),t&2){let e=P();o(),x("dataSource",e.dataSource),o(16),x("matHeaderRowDef",e.displayedColumn),o(),x("matRowDefColumns",e.displayedColumn)}}function mL(t,n){t&1&&(s(0,"button",6),c(1),p(2,"translate"),l()),t&2&&(x("routerLink",Ut(4,K8)),o(),v(" ",m(2,2,"labels.buttons.Cancel")," "))}var Ic=(()=>{class t{constructor(){this.route=A(Et),this.loanId=null,this.selectAllItems=!1,this.loanPurposeOptions=[],this.displayedColumn=["check","id","name","purpose","amount"],this.loanId=this.route.snapshot.params.loanId}ngOnInit(){this.dataSource=new Li(this.activeClientMembers)}get isValid(){return!this.activeClientMembers||this.selectedClientMembers?.selectedMembers?.reduce((e,i)=>e+(i.principal??0),0)>0}get selectedClientMembers(){return{selectedMembers:this.activeClientMembers.filter(e=>e.selected)}}toggleSelects(){for(let e of this.activeClientMembers)e.selected=this.selectAllItems}toggleSelect(){let e=this.activeClientMembers.length;this.selectAllItems=e===0?!1:this.activeClientMembers.filter(i=>i.selected).length===e}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=Dt({type:t,selectors:[["mifosx-loans-active-client-members"]],inputs:{activeClientMembers:"activeClientMembers",loansAccountFormValid:"loansAccountFormValid"},decls:11,vars:9,consts:[[1,"layout-row-wrap","gap-2percent","layout-xs-column"],[1,"layout-row","responsive-column","align-center","gap-2px","margin-t"],["mat-raised-button","","matStepperPrevious",""],["icon","arrow-left",1,"m-r-10"],["mat-raised-button","","matStepperNext","",3,"disabled"],["icon","arrow-right",1,"m-l-10"],["mat-raised-button","",3,"routerLink"],["mat-table","",1,"flex-98",3,"dataSource"],["matColumnDef","check"],["mat-header-cell","",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","id"],["matColumnDef","name"],["matColumnDef","purpose"],["matColumnDef","amount"],["mat-header-row","",4,"matHeaderRowDef"],["mat-row","",4,"matRowDef","matRowDefColumns"],["mat-header-cell",""],[3,"change","ngModelChange","ngModel"],["mat-cell",""],[3,"ngModelChange","ngModel"],[3,"value"],["type","number","matInput","",3,"ngModelChange","ngModel"],["mat-header-row",""],["mat-row",""]],template:function(i,a){i&1&&(M(0,pL,19,3,"div",0),s(1,"div",1)(2,"button",2),T(3,"fa-icon",3),c(4),p(5,"translate"),l(),s(6,"button",4),c(7),p(8,"translate"),T(9,"fa-icon",5),l(),M(10,mL,3,5,"button",6),l()),i&2&&(O(a.activeClientMembers?0:-1),o(4),v(" ",m(5,5,"labels.buttons.Previous")," "),o(2),x("disabled",!a.loansAccountFormValid),o(),v(" ",m(8,7,"labels.buttons.Next")," "),o(3),O(a.loanId?10:-1))},dependencies:[wt,Tt,we,Mi,he,ae,_e,ge,Pe,In,On,Wt,Da,bn,yn,xn,Sn,Hf,zf,vn,Dn,wn,Pn,Tn,An,za,un,mo,Pt],styles:["table[_ngcontent-%COMP%]{width:100%}.mat-elevation-z1[_ngcontent-%COMP%]{margin:1em 0 1.5em}.margin-t[_ngcontent-%COMP%]{margin-top:1em}h4[_ngcontent-%COMP%]{font-weight:500;margin:1em 0}h3[_ngcontent-%COMP%]{font-weight:500}mat-divider[_ngcontent-%COMP%]{margin:1em 0}.margin-v[_ngcontent-%COMP%]{margin:1em 0}.margin-b[_ngcontent-%COMP%]{margin:0 0 1em}.tableName[_ngcontent-%COMP%]{padding-left:2%}"]})}}return t})();var dL=["dtloan"];function uL(t,n){t&1&&T(0,"fa-icon",20)}function fL(t,n){t&1&&T(0,"fa-icon",20)}function hL(t,n){t&1&&T(0,"fa-icon",21)}function gL(t,n){t&1&&T(0,"fa-icon",22)}function _L(t,n){t&1&&T(0,"fa-icon",23)}function CL(t,n){t&1&&(c(0),p(1,"translate")),t&2&&b(m(1,1,"labels.inputs.DETAILS"))}function bL(t,n){t&1&&(c(0),p(1,"translate")),t&2&&b(m(1,1,"labels.inputs.TERMS"))}function vL(t,n){t&1&&(c(0),p(1,"translate")),t&2&&b(m(1,1,"labels.inputs.CHARGES"))}function xL(t,n){t&1&&(c(0),p(1,"translate")),t&2&&b(m(1,1,"labels.heading.Active Client Members"))}function yL(t,n){t&1&&(c(0),p(1,"translate")),t&2&&b(m(1,1,"labels.inputs.REPAYMENT SCHEDULE"))}function SL(t,n){if(t&1&&(s(0,"mat-step",18),k(1,yL,2,3,"ng-template",13),T(2,"mifosx-loans-account-schedule-step",24,3),l()),t&2){let e=P();o(2),x("loansAccountTemplate",e.loansAccountTemplate)("loansAccountProductTemplate",e.loansAccountProductTemplate)("loansAccount",e.loansAccount)("currencyCode",e.currencyCode)}}function DL(t,n){if(t&1&&c(0),t&2){let e=P().$implicit;b(e.registeredTableName)}}function wL(t,n){if(t&1&&(s(0,"mat-step"),k(1,DL,1,1,"ng-template",13),T(2,"mifosx-loans-account-datatable-step",25,4),l()),t&2){let e=n.$implicit;o(2),x("datatableData",e)}}function TL(t,n){t&1&&(c(0),p(1,"translate")),t&2&&b(m(1,1,"labels.inputs.PREVIEW"))}function PL(t,n){if(t&1){let e=xt();s(0,"mat-step",19),k(1,TL,2,3,"ng-template",13),s(2,"mifosx-loans-account-preview-step",26),it("submitEvent",function(){mt(e);let a=P();return dt(a.submit())}),l()()}if(t&2){let e=P();o(2),x("loansAccountTemplate",e.loansAccountTemplate)("loansAccountProductTemplate",e.loansAccountProductTemplate)("loansAccount",e.loansAccount)("activeClientMembers",e.activeClientMembers)}}var _0=(()=>{class t{constructor(){this.route=A(Et),this.router=A(le),this.loansService=A(Mt),this.settingsService=A(oe),this.clientService=A(ns),this.dateUtils=A(de),this.i18nService=A(Yf),this.loansAccountProductTemplate=null,this.datatables=[],this.route.data.subscribe(e=>{this.loansAccountTemplate=e.loansAccountTemplate,this.dataSource=e.groupsData.activeClientMembers})}setTemplate(e){this.loansAccountProductTemplate=e,this.currencyCode=this.loansAccountProductTemplate.currency.code;let i=this.loansAccountTemplate.clientId;i?this.clientService.getCollateralTemplate(i).subscribe(d=>{this.collateralOptions=d}):console.error("No collateral data requested from Fineract, collateral might misbehave");let a=this.loansAccountTemplate.clientId?this.loansAccountTemplate.clientId:this.loansAccountTemplate.group.id,r=!this.loansAccountTemplate.clientId,u=this.loansAccountProductTemplate.loanProductId;this.loansService.getLoansAccountTemplateResource(a,r,u).subscribe(d=>{this.multiDisburseLoan=d.multiDisburseLoan}),this.setDatatables()}setDatatables(){this.datatables=[],this.loansAccountProductTemplate.datatables&&this.loansAccountProductTemplate.datatables.forEach(e=>{this.datatables.push(e)})}get loansAccountDetailsForm(){return this.loansAccountDetailsStep.loansAccountDetailsForm}get loansAccountTermsForm(){return this.loansAccountTermsStep.loansAccountTermsForm}get activeClientMembers(){return this.dataSource}get loansAccountFormValid(){return this.loansAccountDetailsForm.valid&&this.loansAccountTermsForm.valid&&this.loansActiveClientMembers.isValid}get loanPrincipal(){return this.loansAccountTermsStep.loansAccountTermsForm.value.principal}get loansAccount(){return this.selectedMembers=this.loansActiveClientMembers.selectedClientMembers,ie(ie(ie(ie(ie({},this.loansAccountDetailsStep.loansAccountDetails),this.loansAccountTermsStep.loansAccountTerms),this.loansAccountChargesStep.loansAccountCharges),this.loansAccountTermsStep.loanCollateral),this.loansAccountTermsStep.disbursementData)}setData(e,i){let a=this.settingsService.language.code,r=this.settingsService.dateFormat,u=ve(ie({},this.loansAccount),{charges:(this.loansAccount.charges??[]).map(d=>{let g=d.chargeId??d.id;if(g==null)return null;let _={chargeId:g,amount:d.amount};return d.id&&d.id!==g&&(_.id=d.id),d.dueDate&&(_.dueDate=this.dateUtils.formatDate(d.dueDate,r)),d.feeInterval!==void 0&&(_.feeInterval=d.feeInterval),d.feeOnMonthDay!==void 0&&(_.feeOnMonthDay=d.feeOnMonthDay),_}).filter(Boolean),clientId:e.id,totalLoan:i,loanType:"glim",amortizationType:1,isParentAccount:!0,principal:e.principal,syncDisbursementWithMeeting:!1,expectedDisbursementDate:this.dateUtils.formatDate(this.loansAccount.expectedDisbursementDate,r),submittedOnDate:this.dateUtils.formatDate(this.loansAccount.submittedOnDate,r),dateFormat:r,locale:a});return u.groupId=this.loansAccountTemplate.group.id,delete u.principalAmount,delete u.allowPartialPeriodInterestCalculation,delete u.multiDisburseLoan,delete u.isFloatingInterestRate,JSON.stringify(u)}buildRequestData(){let e=[],i=this.selectedMembers?.selectedMembers??[],a=this.totalLoanAmount();for(let r=0;rNumber(r.id)));for(let r of e){let u=Number(r.id),d=Number(r.linkAccountOwnerId);if(r.linkAccountId&&r.linkAccountOwnerId&&d!==u){this.i18nService.translate("errors.linkedSavingsAccountOwnership").subscribe(g=>{this.notify({defaultUserMessage:g,errors:[]},{memberId:u})});return}if(!i.has(u)){this.i18nService.translate("errors.clientNotInGSIM",{id:u}).subscribe(g=>{this.notify({defaultUserMessage:g,errors:[]},{memberId:u})});return}}let a=this.buildRequestData();this.loansService.createGlimAccount(a).subscribe(r=>{let u=JSON.parse(r[0].body);u.glimId?this.router.navigate(["../",u.glimId],{relativeTo:this.route}):this.notify(u,{batchSize:a.length})})}notify(e,i){let a=[String(e?.defaultUserMessage??"")];if(Array.isArray(e?.errors))for(let r of e.errors)a.push(String(r?.developerMessage??""));i&&a.push(`Context: ${JSON.stringify(i)}`),console.error(a.join(" ").trim())}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=Dt({type:t,selectors:[["mifosx-create-glim-account"]],viewQuery:function(i,a){if(i&1&&(mi(Oo,7),mi(Io,7),mi(Eo,7),mi(Ic,7),mi(dL,5)),i&2){let r;di(r=ui())&&(a.loansAccountDetailsStep=r.first),di(r=ui())&&(a.loansAccountTermsStep=r.first),di(r=ui())&&(a.loansAccountChargesStep=r.first),di(r=ui())&&(a.loansActiveClientMembers=r.first),di(r=ui())&&(a.loanDatatables=r)}},decls:26,vars:16,consts:[["loansAccountStepper",""],["loanAccountTerms",""],["loanAccountCharges",""],["loanAccountSchedule",""],["dtloan",""],[1,"container"],["orientation","vertical","labelPosition","bottom",1,"mat-elevation-z8",3,"linear"],["matStepperIcon","number"],["matStepperIcon","edit"],["matStepperIcon","done"],["matStepperIcon","error"],["matStepperIcon","preview"],[3,"stepControl"],["matStepLabel",""],[3,"loansAccountProductTemplate","loansAccountTemplate"],[3,"loansAccountProductTemplate","loansAccountTemplate","collateralOptions","loansAccountFormValid","loanPrincipal"],[3,"loansAccountProductTemplate","loansAccountTemplate","loansAccountFormValid"],[3,"activeClientMembers","loansAccountFormValid"],["state","repayment","completed",""],["state","preview","completed",""],["icon","pencil-alt","size","sm"],["icon","check","size","sm"],["icon","exclamation-triangle","size","lg"],["icon","eye","size","sm"],[3,"loansAccountTemplate","loansAccountProductTemplate","loansAccount","currencyCode"],[3,"datatableData"],[3,"submitEvent","loansAccountTemplate","loansAccountProductTemplate","loansAccount","activeClientMembers"]],template:function(i,a){if(i&1){let r=xt();s(0,"div",5)(1,"mat-stepper",6,0),k(3,uL,1,0,"ng-template",7)(4,fL,1,0,"ng-template",8)(5,hL,1,0,"ng-template",9)(6,gL,1,0,"ng-template",10)(7,_L,1,0,"ng-template",11),s(8,"mat-step",12),k(9,CL,2,3,"ng-template",13),s(10,"mifosx-loans-account-details-step",14),it("loansAccountProductTemplate",function(d){return mt(r),dt(a.setTemplate(d))}),l()(),s(11,"mat-step",12),k(12,bL,2,3,"ng-template",13),T(13,"mifosx-loans-account-terms-step",15,1),l(),s(15,"mat-step"),k(16,vL,2,3,"ng-template",13),T(17,"mifosx-loans-account-charges-step",16,2),l(),s(19,"mat-step"),k(20,xL,2,3,"ng-template",13),T(21,"mifosx-loans-active-client-members",17),l(),M(22,SL,4,4,"mat-step",18),ue(23,wL,4,1,"mat-step",null,Ce),M(25,PL,3,4,"mat-step",19),l()()}i&2&&(o(),x("linear",!1),o(7),x("stepControl",a.loansAccountDetailsForm),o(2),x("loansAccountTemplate",a.loansAccountTemplate),o(),x("stepControl",a.loansAccountTermsForm),o(2),x("loansAccountProductTemplate",a.loansAccountProductTemplate)("loansAccountTemplate",a.loansAccountTemplate)("collateralOptions",a.collateralOptions)("loansAccountFormValid",a.loansAccountFormValid)("loanPrincipal",a.loanPrincipal),o(4),x("loansAccountProductTemplate",a.loansAccountProductTemplate)("loansAccountTemplate",a.loansAccountTemplate)("loansAccountFormValid",a.loansAccountFormValid),o(4),x("activeClientMembers",a.activeClientMembers)("loansAccountFormValid",a.loansAccountFormValid),o(),O(a.loansAccountFormValid?22:-1),o(),fe(a.datatables),o(2),O(a.loansAccountFormValid?25:-1))},dependencies:[wt,Tt,es,Ql,un,ts,Xl,Oo,Io,Eo,Ic,el,Ss,nl,Pt],encapsulation:2})}}return t})();function AL(t,n){t&1&&(s(0,"div",1),T(1,"mat-spinner",2),l())}function ML(t,n){t&1&&(s(0,"div",3),c(1),p(2,"translate"),l()),t&2&&(o(),v(" ",m(2,1,"labels.messages.No Data Found")," "))}function OL(t,n){t&1&&(s(0,"th",16),c(1),p(2,"translate"),l()),t&2&&(o(),b(m(2,1,"labels.heading.Date")))}function IL(t,n){if(t&1&&(s(0,"td",17),c(1),p(2,"dateFormat"),l()),t&2){let e=n.$implicit;o(),v(" ",m(2,1,e.buyDownFeeDate)," ")}}function EL(t,n){t&1&&(s(0,"th",16),c(1),p(2,"translate"),l()),t&2&&(o(),b(m(2,1,"labels.heading.Fee Amount")))}function LL(t,n){if(t&1&&(s(0,"td",18),c(1),p(2,"formatNumber"),l()),t&2){let e=n.$implicit;o(),v(" ",Ge(2,1,e.buyDownFeeAmount,"0.00")," ")}}function NL(t,n){t&1&&(s(0,"th",16),c(1),p(2,"translate"),l()),t&2&&(o(),b(m(2,1,"labels.heading.Amortized Amount")))}function kL(t,n){if(t&1&&(s(0,"td",18),c(1),p(2,"formatNumber"),l()),t&2){let e=n.$implicit;o(),v(" ",Ge(2,1,e.amortizedAmount,"0.00")," ")}}function FL(t,n){t&1&&(s(0,"th",16),c(1),p(2,"translate"),l()),t&2&&(o(),b(m(2,1,"labels.heading.Not Yet Amortized Amount")))}function RL(t,n){if(t&1&&(s(0,"td",18),c(1),p(2,"formatNumber"),l()),t&2){let e=n.$implicit;o(),v(" ",Ge(2,1,e.notYetAmortizedAmount,"0.00")," ")}}function BL(t,n){t&1&&(s(0,"th",16),c(1),p(2,"translate"),l()),t&2&&(o(),b(m(2,1,"labels.heading.Adjusted Amount")))}function qL(t,n){if(t&1&&(s(0,"td",18),c(1),p(2,"formatNumber"),l()),t&2){let e=n.$implicit;o(),v(" ",Ge(2,1,e.adjustedAmount,"0.00")," ")}}function jL(t,n){t&1&&(s(0,"th",16),c(1),p(2,"translate"),l()),t&2&&(o(),b(m(2,1,"labels.heading.Charged Off Amount")))}function zL(t,n){if(t&1&&(s(0,"td",18),c(1),p(2,"formatNumber"),l()),t&2){let e=n.$implicit;o(),v(" ",Ge(2,1,e.chargedOffAmount,"0.00")," ")}}function VL(t,n){t&1&&T(0,"tr",19)}function UL(t,n){t&1&&T(0,"tr",20)}function HL(t,n){if(t&1&&(s(0,"table",4),X(1,5),k(2,OL,3,3,"th",6)(3,IL,3,3,"td",7),Q(),X(4,8),k(5,EL,3,3,"th",6)(6,LL,3,4,"td",9),Q(),X(7,10),k(8,NL,3,3,"th",6)(9,kL,3,4,"td",9),Q(),X(10,11),k(11,FL,3,3,"th",6)(12,RL,3,4,"td",9),Q(),X(13,12),k(14,BL,3,3,"th",6)(15,qL,3,4,"td",9),Q(),X(16,13),k(17,jL,3,3,"th",6)(18,zL,3,4,"td",9),Q(),k(19,VL,1,0,"tr",14)(20,UL,1,0,"tr",15),l()),t&2){let e=P(2);x("dataSource",e.buyDownFeeData),o(19),x("matHeaderRowDef",e.buyDownFeeColumns),o(),x("matRowDefColumns",e.buyDownFeeColumns)}}function GL(t,n){if(t&1&&(s(0,"div"),M(1,ML,3,3,"div",3),M(2,HL,21,3,"table",4),l()),t&2){let e=P();o(),O(e.buyDownFeeData.length===0?1:-1),o(),O(e.buyDownFeeData.length>0?2:-1)}}var vg=(()=>{class t{constructor(){this.route=A(Et),this.loansService=A(Mt),this.buyDownFeeData=[],this.isLoading=!0,this.buyDownFeeColumns=["buyDownFeeDate","buyDownFeeAmount","amortizedAmount","notYetAmortizedAmount","adjustedAmount","chargedOffAmount"]}ngOnInit(){this.getLoanId(),this.loadBuyDownFees()}getLoanId(){if(this.route.snapshot.data&&this.route.snapshot.data.loanId){this.loanId=this.route.snapshot.data.loanId;return}let e=this.route;for(;e;){if(e.snapshot.paramMap.has("loanId")){this.loanId=e.snapshot.paramMap.get("loanId");return}if(e.parent)e=e.parent;else break}console.error("Could not find loanId in route parameters")}loadBuyDownFees(){if(!this.loanId){console.error("Cannot load buy down fees: loanId is undefined"),this.isLoading=!1;return}this.isLoading=!0,this.loansService.getBuyDownFeeData(this.loanId).subscribe({next:e=>{this.buyDownFeeData=e||[],this.isLoading=!1},error:e=>{console.error("Error loading buy down fees:",e),this.isLoading=!1}})}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=Dt({type:t,selectors:[["mifosx-loan-buy-down-fees-tab"]],decls:6,vars:5,consts:[[1,"container"],[1,"loading-indicator"],["diameter","30"],[1,"no-data"],["mat-table","",3,"dataSource"],["matColumnDef","buyDownFeeDate"],["mat-header-cell","",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","buyDownFeeAmount"],["mat-cell","","class","r-amount",4,"matCellDef"],["matColumnDef","amortizedAmount"],["matColumnDef","notYetAmortizedAmount"],["matColumnDef","adjustedAmount"],["matColumnDef","chargedOffAmount"],["mat-header-row","",4,"matHeaderRowDef"],["mat-row","",4,"matRowDef","matRowDefColumns"],["mat-header-cell",""],["mat-cell",""],["mat-cell","",1,"r-amount"],["mat-header-row",""],["mat-row",""]],template:function(i,a){i&1&&(s(0,"div",0)(1,"h3"),c(2),p(3,"translate"),l(),M(4,AL,2,0,"div",1),M(5,GL,3,2,"div"),l()),i&2&&(o(2),b(m(3,3,"labels.heading.Buy Down Fees")),o(2),O(a.isLoading?4:-1),o(),O(a.isLoading?-1:5))},dependencies:[wt,Tt,bn,yn,xn,Sn,vn,Dn,wn,Pn,Tn,An,En,Pt,hn],encapsulation:2})}}return t})();var il=(()=>{class t{constructor(){this.loansService=A(Mt)}resolve(e){let i=e.paramMap.get("loanId")||e.parent.paramMap.get("loanId");if(!isNaN(+i))return this.loansService.getLoanAccountAssociationDetails(i)}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275prov=sn({token:t,factory:t.\u0275fac})}}return t})();var yu=(()=>{class t{constructor(){this.loansService=A(Mt)}resolve(e){let i=e.paramMap.get("loanId")||e.parent.paramMap.get("loanId");return this.loansService.getLoanNotes(i)}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275prov=sn({token:t,factory:t.\u0275fac})}}return t})();var C0=(()=>{class t{constructor(){this.loansService=A(Mt)}resolve(){return this.loansService.getLoanDataTables()}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275prov=sn({token:t,factory:t.\u0275fac})}}return t})();var Su=(()=>{class t{constructor(){this.loansService=A(Mt)}resolve(e){let i=e.paramMap.get("loanId")||e.parent.parent.paramMap.get("loanId"),a=e.paramMap.get("datatableName");return this.loansService.getLoanDatatable(i,a)}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275prov=sn({token:t,factory:t.\u0275fac})}}return t})();var Du=(()=>{class t{constructor(){this.loansService=A(Mt)}resolve(e){let i=e.paramMap.get("loanId")||e.parent.paramMap.get("loanId"),a=e.paramMap.get("action");return a==="Assign Loan Officer"||a==="Change Loan Officer"?this.loansService.getLoanTemplate(i):a==="Make Repayment"?this.loansService.getLoanActionTemplate(i,"repayment"):a==="Goodwill Credit"?this.loansService.getLoanActionTemplate(i,"goodwillCredit"):a==="Interest Payment Waiver"?this.loansService.getLoanActionTemplate(i,"interestPaymentWaiver"):a==="Payout Refund"?this.loansService.getLoanActionTemplate(i,"payoutRefund"):a==="Merchant Issued Refund"?this.loansService.getLoanActionTemplate(i,"merchantIssuedRefund"):a==="Credit Balance Refund"?this.loansService.getLoanActionTemplate(i,"creditBalanceRefund"):a==="Waive Interest"?this.loansService.getLoanActionTemplate(i,"waiveinterest"):a==="Write Off"?this.loansService.getLoanActionTemplate(i,"writeoff"):a==="Close"?this.loansService.getLoanActionTemplate(i,"close"):a==="Close (as Rescheduled)"?this.loansService.getLoanActionTemplate(i,"close-rescheduled"):a==="Reschedule"?this.loansService.rescheduleLoanTemplate():a==="Prepay Loan"?this.loansService.getLoanPrepayLoanActionTemplate(i,null):a==="Add Collateral"?this.loansService.getLoanCollateralTemplate(i):a==="Disburse to Savings"?this.loansService.getLoanActionTemplate(i,"disburseToSavings"):a==="Recovery Payment"?this.loansService.getLoanActionTemplate(i,"recoverypayment"):a==="View Guarantors"?this.loansService.getLoanAccountResource(i,"guarantors"):a==="Create Guarantor"?this.loansService.getGuarantorTemplate(i):a==="Disburse"?this.loansService.getLoanActionTemplate(i,"disburse"):a==="Loan Screen Reports"?this.loansService.getLoanScreenReportsData():a==="Approve"?this.loansService.getLoanApprovalTemplate(i):a==="Add Loan Charge"?this.loansService.getLoanChargeTemplateResource(i):a==="Foreclosure"?this.loansService.getLoanForeclosureActionTemplate(i):a==="Charge-Off"?this.loansService.getLoanActionTemplate(i,"charge-off"):a==="Capitalized Income"?this.loansService.getLoanActionTemplate(i,"capitalizedIncome"):a==="Contract Termination"?this.loansService.getLoanActionTemplate(i,"contractTermination"):a==="Buy Down Fee"?this.loansService.getLoanActionTemplate(i,"buyDownFee"):a==="Re-Age"?this.loansService.getLoanActionTemplate(i,"reAge"):a==="Re-Amortize"?this.loansService.getLoanActionTemplate(i,"reAmortization"):void 0}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275prov=sn({token:t,factory:t.\u0275fac})}}return t})();var wu=(()=>{class t{constructor(){this.loansService=A(Mt)}resolve(e){let i=e.parent.parent.paramMap.get("clientId")||e.parent.parent.paramMap.get("groupId"),a=!!e.parent.parent.paramMap.get("groupId");return this.loansService.getLoansAccountTemplateResource(i,a)}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275prov=sn({token:t,factory:t.\u0275fac})}}return t})();var Tu=(()=>{class t{constructor(){this.loansService=A(Mt)}resolve(e){let i=e.paramMap.get("loanId")||e.parent.paramMap.get("loanId");return this.loansService.getLoanDocuments(i)}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275prov=sn({token:t,factory:t.\u0275fac})}}return t})();var b0=(()=>{class t{constructor(){this.loansService=A(Mt)}resolve(e){let i=e.paramMap.get("loanId")||e.parent.paramMap.get("loanId");return this.loansService.getLoansAccountAndTemplateResource(i)}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275prov=sn({token:t,factory:t.\u0275fac})}}return t})();var v0=(()=>{class t{constructor(){this.loansService=A(Mt)}resolve(e){let i=e.paramMap.get("loanId"),a=e.paramMap.get("id");return this.loansService.getLoansAccountCharge(i,a)}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275prov=sn({token:t,factory:t.\u0275fac})}}return t})();var Pu=(()=>{class t{constructor(){this.loansService=A(Mt)}resolve(e){let i=e.paramMap.get("loanId"),a=e.paramMap.get("id");return this.loansService.getLoansAccountTransaction(i,a)}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275prov=sn({token:t,factory:t.\u0275fac})}}return t})();var Au=(()=>{class t{constructor(){this.reportsService=A(Ip)}resolve(e){let a={"output-type":"PDF",R_transactionId:e.paramMap.get("id")};return this.reportsService.getPentahoRunReportData("Loan Transaction Receipt",a,"default","en","dd MMMM yyyy")}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275prov=sn({token:t,factory:t.\u0275fac})}}return t})();var Mu=(()=>{class t{constructor(){this.loansService=A(Mt)}resolve(e){let i=e.paramMap.get("loanId"),a=e.paramMap.get("id");return this.loansService.getLoansAccountTransactionTemplate(i,a)}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275prov=sn({token:t,factory:t.\u0275fac})}}return t})();var Ou=(()=>{class t{constructor(){this.loansService=A(Mt)}resolve(e){let i=e.paramMap.get("groupId"),a=e.paramMap.get("glimId");return this.loansService.getGLIMAccountData(a,i)}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275prov=sn({token:t,factory:t.\u0275fac})}}return t})();var Iu=(()=>{class t{constructor(){this.loansService=A(Mt)}resolve(e){let i=e.paramMap.get("groupId");return this.loansService.getGLIMLoanAccountTemplate(i)}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275prov=sn({token:t,factory:t.\u0275fac})}}return t})();var Eu=(()=>{class t{constructor(){this.loansService=A(Mt)}resolve(e){let i=e.paramMap.get("loanId")||e.parent.paramMap.get("loanId");return this.loansService.getDelinquencyTags(i)}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275prov=sn({token:t,factory:t.\u0275fac})}}return t})();var WL=t=>({data:t});function $L(t,n){t&1&&(s(0,"mat-error"),c(1),p(2,"translate"),p(3,"translate"),s(4,"strong"),c(5),p(6,"translate"),l()()),t&2&&(o(),$t(" ",m(2,3,"labels.inputs.Start Date")," ",m(3,5,"labels.commons.is")," "),o(4),b(m(6,7,"labels.commons.required")))}function YL(t,n){t&1&&(s(0,"mat-error"),c(1),p(2,"translate"),p(3,"translate"),s(4,"strong"),c(5),p(6,"translate"),l()()),t&2&&(o(),$t(" ",m(2,3,"labels.inputs.End Date")," ",m(3,5,"labels.commons.is")," "),o(4),b(m(6,7,"labels.commons.required")))}var x0=(()=>{class t{constructor(){this.dialogRef=A(Vo),this.data=A(Uo),this.formBuilder=A(Te),this.minDate=new Date(2e3,0,1),this.maxDate=new Date(2100,0,1),this.createDelinquencyActionForm()}createDelinquencyActionForm(){this.delinquencyActionForm=this.formBuilder.group({startDate:[new Date,Gt.required],endDate:["",Gt.required]})}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=Dt({type:t,selectors:[["mifosx-loan-delinquency-action-dialog"]],decls:29,vars:30,consts:[["validFromDatePicker",""],["validTillDatePicker",""],["mat-dialog-title",""],["mat-dialog-content","",1,"layout-column",3,"formGroup"],[1,"flex-48",3,"click"],["matInput","","required","","formControlName","startDate",3,"min","max","matDatepicker"],["matSuffix","",3,"for"],["matInput","","required","","formControlName","endDate",3,"min","max","matDatepicker"],[1,"layout-row","layout-xs-column","layout-align-center","gap-2percent"],["mat-raised-button","","mat-dialog-close",""],["mat-raised-button","","color","primary",3,"mat-dialog-close","disabled"]],template:function(i,a){if(i&1){let r=xt();s(0,"h2",2),c(1),p(2,"translate"),l(),s(3,"div",3)(4,"mat-form-field",4),it("click",function(){mt(r);let d=Lt(11);return dt(d.open())}),s(5,"mat-label"),c(6),p(7,"translate"),l(),T(8,"input",5)(9,"mat-datepicker-toggle",6)(10,"mat-datepicker",null,0),M(12,$L,7,9,"mat-error"),l(),s(13,"mat-form-field",4),it("click",function(){mt(r);let d=Lt(20);return dt(d.open())}),s(14,"mat-label"),c(15),p(16,"translate"),l(),T(17,"input",7)(18,"mat-datepicker-toggle",6)(19,"mat-datepicker",null,1),M(21,YL,7,9,"mat-error"),l()(),s(22,"mat-dialog-actions",8)(23,"button",9),c(24),p(25,"translate"),l(),s(26,"button",10),c(27),p(28,"translate"),l()()}if(i&2){let r=Lt(11),u=Lt(20);o(),b(m(2,18,"labels.heading.Loan Delinquency Actions")),o(2),x("formGroup",a.delinquencyActionForm),o(3),b(m(7,20,"labels.inputs.Start Date")),o(2),x("min",a.minDate)("max",a.maxDate)("matDatepicker",r),o(),x("for",r),o(3),O(a.delinquencyActionForm.controls.startDate.hasError("required")?12:-1),o(3),b(m(16,22,"labels.inputs.End Date")),o(2),x("min",a.delinquencyActionForm.value.startDate)("max",a.maxDate)("matDatepicker",u),o(),x("for",u),o(3),O(a.delinquencyActionForm.controls.endDate.hasError("required")?21:-1),o(3),b(m(25,24,"labels.buttons.Cancel")),o(2),x("mat-dialog-close",La(28,WL,a.delinquencyActionForm))("disabled",!a.delinquencyActionForm.valid||a.delinquencyActionForm.pristine),o(),v(" ",m(28,26,"labels.buttons.Submit")," ")}},dependencies:[wt,Tt,we,he,Ee,je,Le,Ne,_e,ge,Ve,Je,Pe,tn,en,Qe,Wt,Ur,Ho,Go,Kl,Pt],encapsulation:2})}}return t})();function ZL(t,n){t&1&&(s(0,"th",11),c(1),p(2,"translate"),l()),t&2&&(o(),b(m(2,1,"labels.inputs.Delinquency Classification")))}function KL(t,n){if(t&1&&(s(0,"span"),c(1),l()),t&2){let e=P().$implicit;o(),$t("( ",e.delinquencyRange.minimumAgeDays," - ",e.delinquencyRange.maximumAgeDays," )")}}function JL(t,n){if(t&1&&(s(0,"span"),c(1),l()),t&2){let e=P().$implicit;o(),v("( ",e.delinquencyRange.minimumAgeDays," )")}}function XL(t,n){if(t&1&&(s(0,"td",12),c(1),M(2,KL,2,2,"span"),M(3,JL,2,1,"span"),l()),t&2){let e=n.$implicit;o(),v(" ",e.delinquencyRange.classification," "),o(),O(e.delinquencyRange.maximumAgeDays?2:-1),o(),O(e.delinquencyRange.maximumAgeDays?-1:3)}}function QL(t,n){t&1&&(s(0,"th",11),c(1),p(2,"translate"),l()),t&2&&(o(),b(m(2,1,"labels.inputs.Added On")))}function tN(t,n){if(t&1&&(s(0,"span"),c(1),p(2,"dateFormat"),l()),t&2){let e=P().$implicit;o(),v(" ",m(2,1,e.addedOnDate)," ")}}function eN(t,n){if(t&1&&(s(0,"td",12),M(1,tN,3,3,"span"),l()),t&2){let e=n.$implicit;o(),O(e.addedOnDate?1:-1)}}function nN(t,n){t&1&&(s(0,"th",11),c(1),p(2,"translate"),l()),t&2&&(o(),b(m(2,1,"labels.inputs.Lifted On")))}function iN(t,n){if(t&1&&(s(0,"span"),c(1),p(2,"dateFormat"),l()),t&2){let e=P().$implicit;o(),v(" ",m(2,1,e.liftedOnDate)," ")}}function aN(t,n){if(t&1&&(s(0,"td",12),M(1,iN,3,3,"span"),l()),t&2){let e=n.$implicit;o(),O(e.liftedOnDate?1:-1)}}function oN(t,n){t&1&&T(0,"tr",13)}function rN(t,n){t&1&&T(0,"tr",14)}function lN(t,n){if(t&1&&(s(0,"table",1),X(1,4),k(2,ZL,3,3,"th",5)(3,XL,4,3,"td",6),Q(),X(4,7),k(5,QL,3,3,"th",5)(6,eN,2,1,"td",6),Q(),X(7,8),k(8,nN,3,3,"th",5)(9,aN,2,1,"td",6),Q(),k(10,oN,1,0,"tr",9)(11,rN,1,0,"tr",10),l()),t&2){let e=P();x("dataSource",e.loanDelinquencyTags),o(10),x("matHeaderRowDef",e.loanDelinquencyTagsColumns),o(),x("matRowDefColumns",e.loanDelinquencyTagsColumns)}}function sN(t,n){t&1&&(s(0,"th",11),c(1),p(2,"translate"),l()),t&2&&(o(),b(m(2,1,"labels.inputs.Delinquency Classification")))}function cN(t,n){if(t&1&&(s(0,"td",12),c(1),l()),t&2){let e=n.$implicit;o(),b(e.classification)}}function pN(t,n){t&1&&(s(0,"th",11),c(1),p(2,"translate"),l()),t&2&&(o(),b(m(2,1,"labels.inputs.Days")))}function mN(t,n){if(t&1&&(s(0,"td",12),c(1),p(2,"formatNumber"),l()),t&2){let e=n.$implicit;o(),b(m(2,1,e.minimumAgeDays))}}function dN(t,n){t&1&&(s(0,"th",11),c(1),p(2,"translate"),l()),t&2&&(o(),b(m(2,1,"labels.inputs.Amount")))}function uN(t,n){if(t&1&&(s(0,"td",12),c(1),p(2,"currency"),l()),t&2){let e=n.$implicit,i=P(2);o(),v(" ",Ye(2,1,e.delinquentAmount,i.currency.code,"symbol-narrow","1.2-2")," ")}}function fN(t,n){t&1&&T(0,"tr",13)}function hN(t,n){t&1&&T(0,"tr",14)}function gN(t,n){if(t&1&&(s(0,"div")(1,"h3"),c(2),p(3,"translate"),l(),s(4,"table",1),X(5,4),k(6,sN,3,3,"th",5)(7,cN,2,1,"td",6),Q(),X(8,15),k(9,pN,3,3,"th",5)(10,mN,3,3,"td",6),Q(),X(11,16),k(12,dN,3,3,"th",5)(13,uN,3,6,"td",6),Q(),k(14,fN,1,0,"tr",9)(15,hN,1,0,"tr",10),l()()),t&2){let e=P();o(2),b(m(3,4,"labels.heading.Loan Delinquency Installment Tags")),o(2),x("dataSource",e.installmentLevelDelinquency),o(10),x("matHeaderRowDef",e.installmentDelinquencyTagsColumns),o(),x("matRowDefColumns",e.installmentDelinquencyTagsColumns)}}function _N(t,n){if(t&1){let e=xt();s(0,"button",18),it("click",function(){mt(e);let a=P(2);return dt(a.createDelinquencyAction())}),T(1,"fa-icon",19),c(2),p(3,"translate"),l()}t&2&&(o(2),v("",m(3,1,"labels.buttons.Pause Delinquency Classification")," "))}function CN(t,n){t&1&&(s(0,"div",2),k(1,_N,4,3,"button",17),l()),t&2&&(o(),x("mifosxHasPermission","CREATE_DELINQUENCY_ACTION"))}function bN(t,n){t&1&&(s(0,"th",11),c(1),p(2,"translate"),l()),t&2&&(o(),b(m(2,1,"labels.inputs.Action")))}function vN(t,n){if(t&1&&(s(0,"td",26),c(1),l()),t&2){let e=n.$implicit,i=P(2);x("ngClass",ce(i.actionClass(e.action))),o(),b(e.action)}}function xN(t,n){t&1&&(s(0,"th",11),c(1),p(2,"translate"),l()),t&2&&(o(),b(m(2,1,"labels.inputs.Start Date")))}function yN(t,n){if(t&1&&(s(0,"td",12),c(1),p(2,"dateFormat"),l()),t&2){let e=n.$implicit;o(),b(m(2,1,e.startDate))}}function SN(t,n){t&1&&(s(0,"th",11),c(1),p(2,"translate"),l()),t&2&&(o(),b(m(2,1,"labels.inputs.End Date")))}function DN(t,n){if(t&1&&(s(0,"td",12),c(1),p(2,"dateFormat"),l()),t&2){let e=n.$implicit;o(),b(m(2,1,e.endDate))}}function wN(t,n){t&1&&(s(0,"th",11),c(1),p(2,"translate"),l()),t&2&&(o(),b(m(2,1,"labels.inputs.Created On")))}function TN(t,n){if(t&1&&(s(0,"td",12),c(1),p(2,"datetimeFormat"),l()),t&2){let e=n.$implicit;o(),b(m(2,1,e.createdOn))}}function PN(t,n){t&1&&(s(0,"th",11),c(1),p(2,"translate"),l()),t&2&&(o(),b(m(2,1,"labels.inputs.Actions")))}function AN(t,n){if(t&1){let e=xt();s(0,"button",28),p(1,"translate"),it("click",function(){mt(e);let a=P(2).$implicit,r=P(2);return dt(r.resumeDelinquencyClassification(a))}),T(2,"fa-icon",29),l()}t&2&&x("matTooltip",ce(m(1,2,"tooltips.Resume Delinquency Classification")))}function MN(t,n){t&1&&(s(0,"span"),k(1,AN,3,4,"button",27),l()),t&2&&(o(),x("mifosxHasPermission","CREATE_DELINQUENCY_ACTION"))}function ON(t,n){if(t&1&&(s(0,"td",12),M(1,MN,2,1,"span"),l()),t&2){let e=n.$implicit,i=P(2);o(),O(i.isCurrentAndPauseAction(e)?1:-1)}}function IN(t,n){t&1&&T(0,"tr",13)}function EN(t,n){t&1&&T(0,"tr",14)}function LN(t,n){if(t&1&&(s(0,"div",3)(1,"h3"),c(2),p(3,"translate"),l(),s(4,"table",1),X(5,20),k(6,bN,3,3,"th",5)(7,vN,2,3,"td",21),Q(),X(8,22),k(9,xN,3,3,"th",5)(10,yN,3,3,"td",6),Q(),X(11,23),k(12,SN,3,3,"th",5)(13,DN,3,3,"td",6),Q(),X(14,24),k(15,wN,3,3,"th",5)(16,TN,3,3,"td",6),Q(),X(17,25),k(18,PN,3,3,"th",5)(19,ON,2,1,"td",6),Q(),k(20,IN,1,0,"tr",9)(21,EN,1,0,"tr",10),l()()),t&2){let e=P();o(2),b(m(3,4,"labels.heading.Loan Delinquency Actions")),o(2),x("dataSource",e.loanDelinquencyActions),o(16),x("matHeaderRowDef",e.loanDelinquencyActionsColumns),o(),x("matRowDefColumns",e.loanDelinquencyActionsColumns)}}var y0=(()=>{class t{constructor(){this.route=A(Et),this.loansServices=A(Mt),this.dateUtils=A(de),this.settingsService=A(oe),this.translateService=A(pa),this.dialog=A(Gn),this.loanDelinquencyTags=[],this.loanDelinquencyActions=[],this.installmentLevelDelinquency=[],this.loanDelinquencyTagsColumns=["classification","addedOn","liftedOn"],this.loanDelinquencyActionsColumns=["action","startDate","endDate","createdOn","actions"],this.installmentDelinquencyTagsColumns=["classification","minimumAgeDays","amount"],this.allowPause=!0,this.loanId=this.route.parent.parent.snapshot.params.loanId,this.route.parent.data.subscribe(e=>{this.loanDelinquencyTags=e.loanDelinquencyTagsData,this.loanDelinquencyActions=e.loanDelinquencyActions||[],this.validateDelinquencyActions();let i=e.loanDelinquencyData.delinquent||null;this.currency=e.loanDelinquencyData.currency,this.installmentLevelDelinquency=[],i!=null&&(this.installmentLevelDelinquency=i.installmentLevelDelinquency||[])})}ngOnInit(){this.locale=this.settingsService.language.code,this.dateFormat=this.settingsService.dateFormat,this.currentLoanDelinquencyAction=null,this.validateDelinquencyActions()}validateDelinquencyActions(){if(this.loanDelinquencyActions.length>0){let e=this.settingsService.businessDate;this.currentLoanDelinquencyAction=this.loanDelinquencyActions[this.loanDelinquencyActions.length-1],this.allowPause=this.currentLoanDelinquencyAction.action==="RESUME"}}createDelinquencyAction(){let e="pause";this.dialog.open(x0,{data:{action:e}}).afterClosed().subscribe(a=>{let r=a.data.value.startDate,u=a.data.value.endDate;this.sendDelinquencyAction(e,r,u)})}resumeDelinquencyClassification(e){this.dialog.open(ma,{data:{heading:this.translateService.instant("labels.heading.Loan Delinquency Classification"),dialogContext:this.translateService.instant("labels.dialogContext.Are you sure you want resume the Delinquency Classification for Loan")+this.loanId,type:"Mild"}}).afterClosed().subscribe(a=>{a.confirm&&this.sendDelinquencyAction("resume",new Date,null)})}sendDelinquencyAction(e,i,a){let r={action:e,locale:this.locale,dateFormat:this.dateFormat,startDate:this.dateUtils.formatDate(i,this.dateFormat)};e==="pause"&&(r={action:e,locale:this.locale,dateFormat:this.dateFormat,startDate:this.dateUtils.formatDate(i,this.dateFormat),endDate:this.dateUtils.formatDate(a,this.dateFormat)}),this.loansServices.createDelinquencyActions(this.loanId,r).subscribe(u=>{this.loansServices.getDelinquencyActions(this.loanId).subscribe(d=>{this.loanDelinquencyActions=d,this.validateDelinquencyActions()})})}isCurrentAndPauseAction(e){if(this.currentLoanDelinquencyAction!=null&&this.currentLoanDelinquencyAction.id===e.id&&e.action==="PAUSE"){let i=this.settingsService.businessDate,a=this.dateUtils.parseDate(e.startDate);if(ir)return this.allowPause=!0,!1}return!0}return!1}actionClass(e){return e==="PAUSE"?"status-pending":"status-active"}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=Dt({type:t,selectors:[["mifosx-loan-delinquency-tags-tab"]],decls:8,vars:7,consts:[[1,"container"],["mat-table","",3,"dataSource"],[1,"layout-row","m-t-20","m-b-10","align-end","align-items-center"],[1,"m-t-10"],["matColumnDef","classification"],["mat-header-cell","",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","addedOn"],["matColumnDef","liftedOn"],["mat-header-row","",4,"matHeaderRowDef"],["mat-row","",4,"matRowDef","matRowDefColumns"],["mat-header-cell",""],["mat-cell",""],["mat-header-row",""],["mat-row",""],["matColumnDef","minimumAgeDays"],["matColumnDef","amount"],["mat-raised-button","","color","primary",3,"click",4,"mifosxHasPermission"],["mat-raised-button","","color","primary",3,"click"],["icon","pause",1,"m-r-10"],["matColumnDef","action"],["mat-cell","",3,"ngClass",4,"matCellDef"],["matColumnDef","startDate"],["matColumnDef","endDate"],["matColumnDef","createdOn"],["matColumnDef","actions"],["mat-cell","",3,"ngClass"],["mat-button","","color","primary",3,"matTooltip","click",4,"mifosxHasPermission"],["mat-button","","color","primary",3,"click","matTooltip"],["icon","play",1,"m-r-10"]],template:function(i,a){i&1&&(s(0,"div",0)(1,"h3"),c(2),p(3,"translate"),l(),M(4,lN,12,3,"table",1),M(5,gN,16,6,"div"),M(6,CN,2,1,"div",2),M(7,LN,22,6,"div",3),l()),i&2&&(o(2),b(m(3,5,"labels.heading.Loan Delinquency Tags")),o(2),O(a.loanDelinquencyTags.length>0?4:-1),o(),O(a.installmentLevelDelinquency.length>0?5:-1),o(),O(a.allowPause?6:-1),o(),O(a.loanDelinquencyActions.length>0?7:-1))},dependencies:[wt,ca,Tt,Wt,Ae,bn,yn,xn,Sn,vn,Dn,wn,Pn,Tn,An,un,Oi,Sa,En,Pt,o1,hn],styles:["table[_ngcontent-%COMP%]{width:100%}.container[_ngcontent-%COMP%]{padding-top:1%;padding-bottom:2%}.container[_ngcontent-%COMP%] .delete-button[_ngcontent-%COMP%]{margin-left:1%}"]})}}return t})();var xg=(()=>{class t{constructor(){this.loansService=A(Mt)}resolve(e){let i=e.paramMap.get("loanId")||e.parent.paramMap.get("loanId");return this.loansService.loanRescheduleRequests(i)}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275prov=sn({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();var NN=()=>["../actions/Reschedule"];function kN(t,n){t&1&&(s(0,"th",13),c(1,"#"),l())}function FN(t,n){if(t&1&&(s(0,"td",14),c(1),l()),t&2){let e=n.$implicit;o(),b(e.id)}}function RN(t,n){t&1&&(s(0,"th",13),c(1),p(2,"translate"),l()),t&2&&(o(),b(m(2,1,"labels.inputs.Status")))}function BN(t,n){if(t&1&&(s(0,"td",14)(1,"div",15),p(2,"statusLookup"),T(3,"fa-icon",16),s(4,"span",17),c(5),p(6,"translate"),l()()()),t&2){let e=n.$implicit;o(),x("ngClass",m(2,2,e.statusEnum.code)),o(4),v(" ",m(6,4,e.statusEnum.value)," ")}}function qN(t,n){t&1&&(s(0,"th",13),c(1),p(2,"translate"),l()),t&2&&(o(),b(m(2,1,"labels.inputs.From Date")))}function jN(t,n){if(t&1&&(s(0,"td",14),c(1),p(2,"dateFormat"),l()),t&2){let e=n.$implicit;o(),v(" ",m(2,1,e.rescheduleFromDate)," ")}}function zN(t,n){t&1&&(s(0,"th",13),c(1),p(2,"translate"),l()),t&2&&(o(),b(m(2,1,"labels.inputs.Reason")))}function VN(t,n){if(t&1&&(s(0,"td",14),c(1),l()),t&2){let e=n.$implicit;o(),v(" ",e.rescheduleReasonCodeValue.name," ")}}function UN(t,n){t&1&&(s(0,"th",13),c(1),p(2,"translate"),l()),t&2&&(o(),b(m(2,1,"labels.inputs.Actions")))}function HN(t,n){if(t&1){let e=xt();s(0,"span")(1,"button",18),p(2,"translate"),it("click",function(){mt(e);let a=P().$implicit,r=P();return dt(r.manageRequest(a,"Reject"))}),T(3,"fa-icon",19),l(),s(4,"button",20),p(5,"translate"),it("click",function(){mt(e);let a=P().$implicit,r=P();return dt(r.manageRequest(a,"Approve"))}),T(6,"fa-icon",21),l()()}t&2&&(o(),x("matTooltip",ce(m(2,4,"tooltips.Reject Reschedule"))),o(3),x("matTooltip",ce(m(5,6,"tooltips.Approve Reschedule"))))}function GN(t,n){if(t&1&&(s(0,"td",14),M(1,HN,7,8,"span"),l()),t&2){let e=n.$implicit;o(),O(e.statusEnum.pendingApproval?1:-1)}}function WN(t,n){t&1&&T(0,"tr",22)}function $N(t,n){t&1&&T(0,"tr",23)}var S0=(()=>{class t{constructor(){this.route=A(Et),this.router=A(le),this.loansServices=A(Mt),this.settingsService=A(oe),this.dateUtils=A(de),this.translateService=A(pa),this.dialog=A(Gn),this.loanRescheduleDataColumns=["id","rescheduleFromDate","reason","status","actions"],this.clientId=this.route.parent.parent.snapshot.paramMap.get("clientId"),this.route.parent.data.subscribe(e=>{this.loanRescheduleData=e.loanRescheduleData})}manageRequest(e,i){this.dialog.open(ma,{data:{heading:`${i}`+this.translateService.instant("labels.heading.Loan Reschedule"),dialogContext:this.translateService.instant("labels.dialogContext.Are you sure you want")+`${i}`+this.translateService.instant("labels.dialogContext.the Loan Reschedule")+`${e.id}`}}).afterClosed().subscribe(r=>{if(r.confirm){let u=this.settingsService.language.code,d=this.settingsService.dateFormat,g={dateFormat:d,locale:u};i==="Approve"?g.approvedOnDate=this.dateUtils.formatDate(this.settingsService.businessDate,d):g.rejectedOnDate=this.dateUtils.formatDate(this.settingsService.businessDate,d),this.loansServices.applyCommandLoanRescheduleRequests(e.id,i.toLowerCase(),g).subscribe(_=>{this.reload()})}})}reload(){let e=this.router.url;this.router.navigateByUrl(`/clients/${this.clientId}/loans-accounts`,{skipLocationChange:!0}).then(()=>this.router.navigate([e]))}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=Dt({type:t,selectors:[["mifosx-reschedule-loan-tab"]],inputs:{loanStatus:"loanStatus"},decls:23,vars:8,consts:[[1,"container"],[1,"layout-row","gap-20px","align-end","align-items-center","action-buttons"],["mat-raised-button","","color","primary",3,"routerLink"],["mat-table","",3,"dataSource"],["matColumnDef","id"],["mat-header-cell","",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","status"],["matColumnDef","rescheduleFromDate"],["matColumnDef","reason"],["matColumnDef","actions"],["mat-header-row","",4,"matHeaderRowDef"],["mat-row","",4,"matRowDef","matRowDefColumns"],["mat-header-cell",""],["mat-cell",""],[3,"ngClass"],["icon","stop"],[1,"m-l-10","status"],["mat-raised-button","","color","warn","matTooltipPosition","left",1,"action-button",3,"click","matTooltip"],["icon","trash"],["mat-raised-button","","color","primary","matTooltipPosition","right",1,"action-button",3,"click","matTooltip"],["icon","check"],["mat-header-row",""],["mat-row",""]],template:function(i,a){i&1&&(s(0,"div",0)(1,"div",1)(2,"button",2),c(3),p(4,"translate"),l()(),s(5,"table",3),X(6,4),k(7,kN,2,0,"th",5)(8,FN,2,1,"td",6),Q(),X(9,7),k(10,RN,3,3,"th",5)(11,BN,7,6,"td",6),Q(),X(12,8),k(13,qN,3,3,"th",5)(14,jN,3,3,"td",6),Q(),X(15,9),k(16,zN,3,3,"th",5)(17,VN,2,1,"td",6),Q(),X(18,10),k(19,UN,3,3,"th",5)(20,GN,2,1,"td",6),Q(),k(21,WN,1,0,"tr",11)(22,$N,1,0,"tr",12),l()()),i&2&&(o(2),x("routerLink",Ut(7,NN)),o(),v(" ",m(4,5,"labels.buttons.Reschedule")," "),o(2),x("dataSource",a.loanRescheduleData),o(16),x("matHeaderRowDef",a.loanRescheduleDataColumns),o(),x("matRowDefColumns",a.loanRescheduleDataColumns))},dependencies:[wt,ca,Tt,ae,Wt,bn,yn,xn,Sn,vn,Dn,un,Oi,wn,Pn,Tn,An,En,Pt,Ap],styles:["table[_ngcontent-%COMP%]{width:100%}table[_ngcontent-%COMP%] .action-button[_ngcontent-%COMP%]{min-width:26px;padding:0 0 3px;margin:0 2%;line-height:25px}.container[_ngcontent-%COMP%]{padding-top:1%;padding-bottom:2%}.container[_ngcontent-%COMP%] .action-buttons[_ngcontent-%COMP%]{padding-bottom:1rem;padding-top:1rem}"]})}}return t})();var YN=()=>["../.."];function ZN(t,n){t&1&&(s(0,"mat-error"),c(1),p(2,"translate"),p(3,"translate"),s(4,"strong"),c(5),p(6,"translate"),l()()),t&2&&(o(),$t(" ",m(2,3,"labels.inputs.Amount")," ",m(3,5,"labels.commons.is")," "),o(4),b(m(6,7,"labels.commons.required")))}function KN(t,n){if(t&1&&(s(0,"mat-option",9),c(1),l()),t&2){let e=n.$implicit;x("value",e.id),o(),v(" ",e.name," ")}}function JN(t,n){t&1&&(s(0,"mat-form-field")(1,"mat-label"),c(2),p(3,"translate"),l(),T(4,"input",18),l(),s(5,"mat-form-field")(6,"mat-label"),c(7),p(8,"translate"),l(),T(9,"input",19),l(),s(10,"mat-form-field")(11,"mat-label"),c(12),p(13,"translate"),l(),T(14,"input",20),l(),s(15,"mat-form-field")(16,"mat-label"),c(17),p(18,"translate"),l(),T(19,"input",21),l(),s(20,"mat-form-field")(21,"mat-label"),c(22),p(23,"translate"),l(),T(24,"input",22),l()),t&2&&(o(2),v(" ",m(3,5,"labels.inputs.Account")," #"),o(5),v("",m(8,7,"labels.inputs.Cheque")," #"),o(5),b(m(13,9,"labels.inputs.Routing Code")),o(5),v("",m(18,11,"labels.inputs.Reciept")," #"),o(5),v("",m(23,13,"labels.inputs.Bank")," #"))}function XN(t,n){if(t&1&&(s(0,"button",23),c(1),p(2,"translate"),l()),t&2){let e=P();x("disabled",!e.adjustLoanChargeForm.valid),o(),v(" ",m(2,2,"labels.buttons.Submit")," ")}}var D0=(()=>{class t{constructor(){this.formBuilder=A(Te),this.loanService=A(Mt),this.route=A(Et),this.router=A(le),this.settingsService=A(oe),this.organizationService=A(Op),this.paymentTypes=[],this.chargeData=[],this.loanDetailsData=[],this.showPaymentDetails=!1,this.minDate=new Date(2e3,0,1),this.maxDate=new Date,this.loanId=this.route.snapshot.params.loanId,this.chargeId=this.route.snapshot.params.id,this.route.data.subscribe(e=>{this.chargeData=e.loansAccountCharge,this.loanDetailsData=e.loanDetailsData})}ngOnInit(){this.maxDate=this.settingsService.maxAllowedDate,this.createAdjustLoanChargeForm(),this.setRepaymentLoanDetails()}createAdjustLoanChargeForm(){this.adjustLoanChargeForm=this.formBuilder.group({amount:[this.chargeData.amount,Gt.required],externalId:"",paymentTypeId:"",note:""})}setRepaymentLoanDetails(){this.organizationService.getPaymentTypes().subscribe(e=>{this.paymentTypes=e})}addPaymentDetails(){this.showPaymentDetails=!this.showPaymentDetails,this.showPaymentDetails?(this.adjustLoanChargeForm.addControl("accountNumber",new pe("")),this.adjustLoanChargeForm.addControl("checkNumber",new pe("")),this.adjustLoanChargeForm.addControl("routingCode",new pe("")),this.adjustLoanChargeForm.addControl("receiptNumber",new pe("")),this.adjustLoanChargeForm.addControl("bankNumber",new pe(""))):(this.adjustLoanChargeForm.removeControl("accountNumber"),this.adjustLoanChargeForm.removeControl("checkNumber"),this.adjustLoanChargeForm.removeControl("routingCode"),this.adjustLoanChargeForm.removeControl("receiptNumber"),this.adjustLoanChargeForm.removeControl("bankNumber"))}submit(){let e=this.adjustLoanChargeForm.value,i=this.settingsService.language.code,a=ve(ie({},e),{locale:i});this.loanService.executeLoansAccountChargesCommand(this.loanId,"adjustment",a,this.chargeId).subscribe(u=>{this.router.navigate(["../.."],{relativeTo:this.route})})}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=Dt({type:t,selectors:[["mifosx-adjust-loan-charge"]],decls:44,vars:26,consts:[[1,"container","mat-elevation-z8"],[3,"ngSubmit","formGroup"],[1,"layout-column"],["appearance","fill"],["matTextSuffix","",1,"m-l-10"],[1,"flex-auto"],["type","number","matInput","","required","","formControlName","amount",1,"right-input"],["matInput","","formControlName","externalId"],["formControlName","paymentTypeId"],[3,"value"],[1,"flex-fill"],[1,"expandcollapsebutton","m-l-10","m-t-40","flex-75",3,"click"],[3,"className"],[1,"m-l-10"],["matInput","","formControlName","note","cdkTextareaAutosize","","cdkAutosizeMinRows","2"],[1,"layout-row","align-center","gap-5px","responsive-column"],["type","button","mat-raised-button","",3,"routerLink"],["mat-raised-button","","color","primary",3,"disabled",4,"mifosxHasPermission"],["matInput","","formControlName","accountNumber"],["matInput","","formControlName","checkNumber"],["matInput","","formControlName","routingCode"],["matInput","","formControlName","receiptNumber"],["matInput","","formControlName","bankNumber"],["mat-raised-button","","color","primary",3,"disabled"]],template:function(i,a){i&1&&(s(0,"div",0)(1,"mat-card")(2,"form",1),it("ngSubmit",function(){return a.submit()}),s(3,"mat-card-content")(4,"div",2)(5,"mat-form-field",3)(6,"mat-label"),c(7),p(8,"translate"),l(),s(9,"span",4),c(10),l(),T(11,"span",5)(12,"input",6),M(13,ZN,7,9,"mat-error"),l(),s(14,"mat-form-field")(15,"mat-label"),c(16),p(17,"translate"),l(),T(18,"input",7),l(),s(19,"mat-form-field")(20,"mat-label"),c(21),p(22,"translate"),l(),s(23,"mat-select",8),ue(24,KN,2,2,"mat-option",9,Ce),l()(),s(26,"div",10)(27,"span",11),it("click",function(){return a.addPaymentDetails()}),s(28,"mat-slide-toggle")(29,"div",12)(30,"span",13),c(31),p(32,"translate"),l()()()()(),M(33,JN,25,15),s(34,"mat-form-field")(35,"mat-label"),c(36),p(37,"translate"),l(),T(38,"textarea",14),l()(),s(39,"mat-card-actions",15)(40,"button",16),c(41),p(42,"translate"),l(),k(43,XN,3,4,"button",17),l()()()()()),i&2&&(o(2),x("formGroup",a.adjustLoanChargeForm),o(5),b(m(8,13,"labels.inputs.Amount")),o(3),b(a.loanDetailsData.currency.code),o(3),O(a.adjustLoanChargeForm.controls.amount.hasError("required")?13:-1),o(3),b(m(17,15,"labels.inputs.External Id")),o(5),b(m(22,17,"labels.inputs.Payment Type")),o(3),fe(a.paymentTypes),o(5),x("className",a.showPaymentDetails?"enabled":"disabled"),o(2),b(m(32,19,"labels.inputs.Show Payment Details")),o(2),O(a.showPaymentDetails?33:-1),o(3),b(m(37,21,"labels.inputs.Note")),o(4),x("routerLink",Ut(25,YN)),o(),v(" ",m(42,23,"labels.buttons.Cancel")," "),o(2),x("mifosxHasPermission","ADJUSTMENT_LOANCHARGE"))},dependencies:[wt,Tt,Re,we,Mi,he,Ee,je,Le,Ne,ae,xe,Oe,ze,_e,ge,Ve,Je,Pe,In,On,Wt,Ae,ja,Wn,Pt],styles:[".expandcollapsebutton[_ngcontent-%COMP%]{margin-top:-7px}.container[_ngcontent-%COMP%]{max-width:37rem}.right-input[_ngcontent-%COMP%]{text-align:right}.right-label[_ngcontent-%COMP%]{padding-right:25px!important}"]})}}return t})();var yg=(()=>{class t{constructor(){this.systemService=A(_p)}resolve(e){return this.systemService.getConfigurationByName("loan-arrears-delinquency-display-data")}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275prov=sn({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();var QN=t=>["/","journal-entry","view-transfer",t];function tk(t,n){if(t&1&&(s(0,"div",1)(1,"h3"),c(2),p(3,"translate"),l(),s(4,"div",6)(5,"table")(6,"tbody")(7,"tr")(8,"td",7)(9,"b"),c(10),p(11,"translate"),l()(),s(12,"td",8)(13,"div",9),T(14,"fa-icon",10),s(15,"span",11),c(16),l()()(),s(17,"td",7)(18,"b"),c(19),p(20,"translate"),l()(),s(21,"td",8),T(22,"mifosx-external-identifier",12),l()(),s(23,"tr")(24,"td",7)(25,"b"),c(26),p(27,"translate"),l()(),s(28,"td",8),c(29),p(30,"dateFormat"),l(),s(31,"td",7)(32,"b"),c(33),p(34,"translate"),l()(),s(35,"td",8),c(36),p(37,"dateFormat"),l()(),s(38,"tr")(39,"td",7)(40,"b"),c(41),p(42,"translate"),l()(),s(43,"td",13)(44,"table")(45,"tbody")(46,"tr")(47,"td",14)(48,"b"),c(49),p(50,"translate"),l()(),s(51,"td",15),c(52),p(53,"formatNumber"),l()(),s(54,"tr")(55,"td",14)(56,"b"),c(57),p(58,"translate"),l()(),s(59,"td",15),c(60),p(61,"formatNumber"),l()(),s(62,"tr")(63,"td",14)(64,"b"),c(65),p(66,"translate"),l()(),s(67,"td",15),c(68),p(69,"formatNumber"),l()(),s(70,"tr")(71,"td",14)(72,"b"),c(73),p(74,"translate"),l()(),s(75,"td",15),c(76),p(77,"formatNumber"),l()(),s(78,"tr")(79,"td",14)(80,"b"),c(81),p(82,"translate"),l()(),s(83,"td",15),c(84),p(85,"formatNumber"),l()(),s(86,"tr")(87,"td",14)(88,"b"),c(89),p(90,"translate"),l()(),s(91,"td",15),c(92),p(93,"formatNumber"),l()()()()()()()()()()),t&2){let e=P();o(2),b(m(3,24,"labels.heading.Active Asset Transfer")),o(8),v("",m(11,26,"labels.inputs.Status")," :"),o(3),x("ngClass",e.itemStatus(e.activeTransferData.status)),o(3),b(e.activeTransferData.status),o(3),v("",m(20,28,"labels.inputs.Owner External Id")," :"),o(3),x("externalId",ce(e.activeTransferData.owner.externalId)),o(4),v("",m(27,30,"labels.inputs.Settlement Date")," :"),o(3),v(" ",m(30,32,e.activeTransferData.settlementDate)," "),o(4),v("",m(34,34,"labels.inputs.Effective Date")," :"),o(3),v(" ",m(37,36,e.activeTransferData.effectiveFrom)," "),o(5),v("",m(42,38,"labels.inputs.Details")," :"),o(8),v("",m(50,40,"labels.inputs.Principal Outstanding")," :"),o(3),v(" ",m(53,42,e.activeTransferData.details.totalPrincipalOutstanding)," "),o(5),v("",m(58,44,"labels.inputs.Interest Outstanding")," :"),o(3),v(" ",m(61,46,e.activeTransferData.details.totalInterestOutstanding)," "),o(5),v("",m(66,48,"labels.inputs.Fees Outstanding")," :"),o(3),v(" ",m(69,50,e.activeTransferData.details.totalFeeChargesOutstanding)," "),o(5),v("",m(74,52,"labels.inputs.Penalties Outstanding")," :"),o(3),v(" ",m(77,54,e.activeTransferData.details.totalPenaltyChargesOutstanding)," "),o(5),v("",m(82,56,"labels.inputs.Outstanding")," :"),o(3),v(" ",m(85,58,e.activeTransferData.details.totalOutstanding)," "),o(5),v("",m(90,60,"labels.inputs.Overpaid")," :"),o(3),b(m(93,62,e.activeTransferData.details.totalOverpaid))}}function ek(t,n){if(t&1){let e=xt();s(0,"button",17),it("click",function(){mt(e);let a=P(2);return dt(a.saleLoan())}),T(1,"fa-icon",18),c(2),p(3,"translate"),l()}t&2&&(o(2),v("",m(3,1,"labels.buttons.Sell Loan")," "))}function nk(t,n){t&1&&(s(0,"div",4),k(1,ek,4,3,"button",16),l()),t&2&&(o(),x("mifosxHasPermission","SALE_LOAN"))}function ik(t,n){if(t&1){let e=xt();s(0,"button",20),it("click",function(){mt(e);let a=P(2);return dt(a.cancelSaleLoan())}),T(1,"fa-icon",21),c(2),p(3,"translate"),l()}t&2&&(o(2),v("",m(3,1,"labels.buttons.Cancel Sell Loan")," "))}function ak(t,n){t&1&&(s(0,"div",4),k(1,ik,4,3,"button",19),l()),t&2&&(o(),x("mifosxHasPermission","SALE_LOAN"))}function ok(t,n){if(t&1){let e=xt();s(0,"button",17),it("click",function(){mt(e);let a=P(2);return dt(a.buyBackLoan())}),T(1,"fa-icon",18),c(2),p(3,"translate"),l()}t&2&&(o(2),v("",m(3,1,"labels.buttons.Buy Back Loan")," "))}function rk(t,n){t&1&&(s(0,"div",4),k(1,ok,4,3,"button",16),l()),t&2&&(o(),x("mifosxHasPermission","SALE_LOAN"))}function lk(t,n){t&1&&(s(0,"th",35),c(1),p(2,"translate"),l()),t&2&&(o(),b(m(2,1,"labels.inputs.Status")))}function sk(t,n){if(t&1&&(s(0,"td",36)(1,"div",9),T(2,"fa-icon",10),s(3,"span",37),c(4),p(5,"translate"),l()()()),t&2){let e=n.$implicit,i=P(2);o(),x("ngClass",i.itemStatus(e.status)),o(3),v(" ",m(5,2,i.itemCurrentStatus(e))," ")}}function ck(t,n){t&1&&(s(0,"th",35),c(1),p(2,"translate"),l()),t&2&&(o(),b(m(2,1,"labels.inputs.Effective From")))}function pk(t,n){if(t&1&&(s(0,"td",36),c(1),p(2,"dateFormat"),l()),t&2){let e=n.$implicit;o(),b(m(2,1,e.effectiveFrom))}}function mk(t,n){t&1&&(s(0,"th",35),c(1),p(2,"translate"),l()),t&2&&(o(),b(m(2,1,"labels.inputs.Owner External Id")))}function dk(t,n){if(t&1&&(s(0,"td",36),T(1,"mifosx-external-identifier",38),l()),t&2){let e=n.$implicit;o(),x("externalId",ce(e.owner.externalId))}}function uk(t,n){t&1&&(s(0,"th",35),c(1),p(2,"translate"),l()),t&2&&(o(),b(m(2,1,"labels.inputs.Transfer External Id")))}function fk(t,n){if(t&1&&(s(0,"td",36),T(1,"mifosx-external-identifier",38),l()),t&2){let e=n.$implicit;o(),x("externalId",ce(e.transferExternalId))}}function hk(t,n){t&1&&(s(0,"th",35),c(1),p(2,"translate"),l()),t&2&&(o(),b(m(2,1,"labels.inputs.Settlement Date")))}function gk(t,n){if(t&1&&(s(0,"td",36),c(1),p(2,"dateFormat"),l()),t&2){let e=n.$implicit;o(),b(m(2,1,e.settlementDate))}}function _k(t,n){t&1&&(s(0,"th",35),c(1),p(2,"translate"),l()),t&2&&(o(),b(m(2,1,"labels.inputs.Purchase Price Ratio")))}function Ck(t,n){if(t&1&&(s(0,"td",36),c(1),p(2,"number"),l()),t&2){let e=n.$implicit;o(),b(m(2,1,e.purchasePriceRatio))}}function bk(t,n){t&1&&(s(0,"th",39),c(1),p(2,"translate"),l()),t&2&&(o(),b(m(2,1,"labels.inputs.Actions")))}function vk(t,n){if(t&1){let e=xt();s(0,"button",42),p(1,"translate"),it("click",function(a){mt(e);let r=P(3);return dt(r.routeJournalEntry(a))}),T(2,"i",43),l()}if(t&2){let e=P().$implicit;x("matTooltip",ce(m(1,3,"tooltips.View Journal Entries")))("routerLink",La(5,QN,e.transferId))}}function xk(t,n){if(t&1&&(s(0,"td",40),M(1,vk,3,7,"button",41),l()),t&2){let e=n.$implicit,i=P(2);o(),O(i.isPendingOrCanceled(e)?-1:1)}}function yk(t,n){t&1&&T(0,"tr",44)}function Sk(t,n){t&1&&T(0,"tr",45)}function Dk(t,n){if(t&1&&(s(0,"table",5),X(1,22),k(2,lk,3,3,"th",23)(3,sk,6,4,"td",24),Q(),X(4,25),k(5,ck,3,3,"th",23)(6,pk,3,3,"td",24),Q(),X(7,26),k(8,mk,3,3,"th",23)(9,dk,2,2,"td",24),Q(),X(10,27),k(11,uk,3,3,"th",23)(12,fk,2,2,"td",24),Q(),X(13,28),k(14,hk,3,3,"th",23)(15,gk,3,3,"td",24),Q(),X(16,29),k(17,_k,3,3,"th",23)(18,Ck,3,3,"td",24),Q(),X(19,30),k(20,bk,3,3,"th",31)(21,xk,2,1,"td",32),Q(),k(22,yk,1,0,"tr",33)(23,Sk,1,0,"tr",34),l()),t&2){let e=P();x("dataSource",e.loanTransfersData),o(22),x("matHeaderRowDef",e.loanTransferColumns),o(),x("matRowDefColumns",e.loanTransferColumns)}}var w0=(()=>{class t{constructor(){this.route=A(Et),this.router=A(le),this.dialog=A(Gn),this.externalAssetOwner=A(Ep),this.externalAssetOwnerService=A(Wr),this.defaultDate="9999-12-31",this.loanTransfersData=[],this.loanTransferColumns=["status","effectiveFrom","ownerExternalId","transferExternalId","settlementDate","purchasePriceRatio","actions"],this.existActiveTransfer=!1,this.route.data.subscribe(e=>{this.loanTransfersData=e.loanTransfersData.empty?[]:e.loanTransfersData.content,this.activeTransferData=e.activeTransferData||null,this.existActiveTransfer=e.activeTransferData&&e.activeTransferData.transferId!=null})}ngOnInit(){this.currentItem=null,this.loanTransfersData.length>0&&(this.currentItem=this.loanTransfersData[this.loanTransfersData.length-1])}itemCurrentStatus(e){return this.externalAssetOwner.itemCurrentStatus(e)}itemStatus(e){return this.externalAssetOwner.itemStatus(e)}isPending(e){return this.externalAssetOwner.isPending(e)}isPendingOrCanceled(e){return this.externalAssetOwner.isPendingOrCanceled(e)}isBuyBackPending(e){return this.externalAssetOwner.isBuyBackPending(e)}canBeCancelled(){return this.externalAssetOwner.validateStatus(this.currentItem,"PENDING")}canBeSold(){return this.externalAssetOwner.canBeSold(this.currentItem)}canBeBuyed(){return this.externalAssetOwner.validateStatus(this.currentItem,"ACTIVE")}saleLoan(){this.router.navigate(["../actions/Sell Loan"],{relativeTo:this.route})}cancelSaleLoan(){this.dialog.open(Kf,{data:{cancelContext:`the Asset Transfer with the Owner External Id ${this.currentItem.owner.externalId} `}}).afterClosed().subscribe(i=>{if(i.cancel){let a={transferExternalId:this.currentItem.transferExternalId};this.externalAssetOwnerService.executeExternalAssetOwnerTransferCommand(this.currentItem.transferId,a,"cancel").subscribe(r=>{this.reload()})}})}buyBackLoan(){this.router.navigate(["../actions/Buy Back Loan"],{relativeTo:this.route})}routeJournalEntry(e){e.stopPropagation()}reload(){let e=this.router.url;this.router.navigateByUrl("/",{skipLocationChange:!0}).then(()=>this.router.navigate([e]))}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=Dt({type:t,selectors:[["mifosx-external-asset-owner-tab"]],decls:10,vars:8,consts:[[1,"tab-container","mat-typography"],[1,"flex-fill"],[1,"layout-row","align-start-center"],[1,"flex-90"],[1,"flex-10"],["mat-table","","mat-sort","",3,"dataSource"],[1,"layout-row","gap-32px","asset-transfer-container"],[1,"flex-25"],[1,"flex-25","left"],[3,"ngClass"],["icon","stop"],[1,"m-l-10","external-asset-owner-status"],["completed","true",3,"externalId"],[1,"flex-75","left"],[1,"flex-50"],[1,"flex-50","r-amount"],["mat-raised-button","","class","f-right","color","primary",3,"click",4,"mifosxHasPermission"],["mat-raised-button","","color","primary",1,"f-right",3,"click"],["icon","dollar-sign",1,"m-r-10"],["mat-raised-button","","class","f-right","color","warn",3,"click",4,"mifosxHasPermission"],["mat-raised-button","","color","warn",1,"f-right",3,"click"],["icon","trash",1,"m-r-10"],["matColumnDef","status"],["mat-header-cell","",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","effectiveFrom"],["matColumnDef","ownerExternalId"],["matColumnDef","transferExternalId"],["matColumnDef","settlementDate"],["matColumnDef","purchasePriceRatio"],["matColumnDef","actions"],["mat-header-cell","","class","center",4,"matHeaderCellDef"],["mat-cell","","class","center td-min-space",4,"matCellDef"],["mat-header-row","",4,"matHeaderRowDef"],["mat-row","",4,"matRowDef","matRowDefColumns"],["mat-header-cell",""],["mat-cell",""],[1,"m-l-10","status"],[3,"externalId"],["mat-header-cell","",1,"center"],["mat-cell","",1,"center","td-min-space"],["mat-raised-button","","color","primary","matTooltipPosition","left",1,"account-action-button",3,"matTooltip","routerLink"],["mat-raised-button","","color","primary","matTooltipPosition","left",1,"account-action-button",3,"click","matTooltip","routerLink"],[1,"fa","fa-arrow-circle-right"],["mat-header-row",""],["mat-row",""]],template:function(i,a){i&1&&(s(0,"div",0),M(1,tk,94,64,"div",1),s(2,"div",2)(3,"h3",3),c(4),p(5,"translate"),l(),M(6,nk,2,1,"div",4),M(7,ak,2,1,"div",4),M(8,rk,2,1,"div",4),l(),M(9,Dk,24,3,"table",5),l()),i&2&&(o(),O(a.existActiveTransfer?1:-1),o(3),b(m(5,6,"labels.heading.External Asset Owner")),o(2),O(a.canBeSold()?6:-1),o(),O(a.canBeCancelled()?7:-1),o(),O(a.canBeBuyed()?8:-1),o(),O(a.loanTransfersData.length>0?9:-1))},dependencies:[wt,ca,Tt,ae,Wt,Ae,un,Va,bn,yn,xn,Sn,vn,Dn,Oi,wn,Pn,Tn,An,kf,En,Pt,hn],styles:[".tab-container[_ngcontent-%COMP%]{padding:1% 1% 2%;margin:1%}.tab-container[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{margin:1% auto}.tab-container[_ngcontent-%COMP%] .transaction-buttons[_ngcontent-%COMP%]{padding-bottom:1rem;padding-top:1rem}.tab-container[_ngcontent-%COMP%] .transaction-buttons[_ngcontent-%COMP%] .accruals[_ngcontent-%COMP%]{padding-top:1%}.tab-container[_ngcontent-%COMP%] .asset-transfer-container[_ngcontent-%COMP%]{border:1px solid;padding:1%;margin-bottom:20px}.tab-container[_ngcontent-%COMP%] table[_ngcontent-%COMP%]{width:100%}.tab-container[_ngcontent-%COMP%] table[_ngcontent-%COMP%] .select-row[_ngcontent-%COMP%]:hover{cursor:pointer}.external-asset-owner-status[_ngcontent-%COMP%]{color:#000}.account-action-button[_ngcontent-%COMP%]{min-width:26px;padding:0 0 3px;margin:0 2%;line-height:25px}"]})}}return t})();var Lu=(()=>{class t{constructor(){this.externalAssetOwnerService=A(Wr)}resolve(e){let i=e.paramMap.get("loanId")||e.parent.paramMap.get("loanId");return this.externalAssetOwnerService.retrieveExternalAssetOwnerTransfers(i)}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275prov=sn({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();var Sg=(()=>{class t{constructor(){this.externalAssetOwnerService=A(Wr)}resolve(e){let i=e.paramMap.get("loanId")||e.parent.paramMap.get("loanId");return this.externalAssetOwnerService.retrieveExternalAssetOwnerActiveTransfer(i)}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275prov=sn({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();var Dg=(()=>{class t{constructor(){this.loansService=A(Mt)}resolve(e){let i=e.paramMap.get("loanId")||e.parent.paramMap.get("loanId");return this.loansService.getLoanCollaterals(i)}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275prov=sn({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();var Nu=(()=>{class t{constructor(){this.loansService=A(Mt)}resolve(e){let i=e.paramMap.get("loanId")||e.parent.paramMap.get("loanId");return this.loansService.getDelinquencyData(i)}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275prov=sn({token:t,factory:t.\u0275fac})}}return t})();var wg=(()=>{class t{constructor(){this.loansService=A(Mt)}resolve(e){let i=e.paramMap.get("loanId")||e.parent.paramMap.get("loanId");return this.loansService.getDelinquencyActions(i)}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275prov=sn({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();function wk(t,n){t&1&&(s(0,"th",13),c(1,"#"),l())}function Tk(t,n){if(t&1&&(s(0,"td",14),c(1),l()),t&2){let e=n.index;o(),b(e+1)}}function Pk(t,n){t&1&&(s(0,"th",13),c(1),p(2,"translate"),l()),t&2&&(o(),b(m(2,1,"labels.inputs.Start Date")))}function Ak(t,n){if(t&1&&(s(0,"td",14),c(1),p(2,"dateFormat"),l()),t&2){let e=n.$implicit;o(),b(m(2,1,e.termVariationApplicableFrom))}}function Mk(t,n){t&1&&(s(0,"th",13),c(1),p(2,"translate"),l()),t&2&&(o(),b(m(2,1,"labels.inputs.End Date")))}function Ok(t,n){if(t&1&&(s(0,"td",14),c(1),p(2,"dateFormat"),l()),t&2){let e=n.$implicit;o(),b(m(2,1,e.dateValue))}}function Ik(t,n){t&1&&(s(0,"th",13),c(1),p(2,"translate"),l()),t&2&&(o(),b(m(2,1,"labels.inputs.Value")))}function Ek(t,n){if(t&1&&(s(0,"td",14),c(1),p(2,"formatNumber"),l()),t&2){let e=n.$implicit;o(),b(m(2,1,e.decimalValue))}}function Lk(t,n){t&1&&(s(0,"th",13),c(1),p(2,"translate"),l()),t&2&&(o(),b(m(2,1,"labels.inputs.Days")))}function Nk(t,n){if(t&1&&(s(0,"td",14),c(1),p(2,"formatNumber"),l()),t&2){let e=n.$implicit;o(),b(m(2,1,e.days))}}function kk(t,n){t&1&&(s(0,"th",13),c(1),p(2,"translate"),l()),t&2&&(o(),b(m(2,1,"labels.inputs.Actions")))}function Fk(t,n){if(t&1){let e=xt();s(0,"span")(1,"button",15),p(2,"translate"),it("click",function(){mt(e);let a=P().$implicit,r=P(2);return dt(r.manageRequest(a,"Edit"))}),T(3,"fa-icon",16),l(),s(4,"button",17),p(5,"translate"),it("click",function(){mt(e);let a=P().$implicit,r=P(2);return dt(r.manageRequest(a,"Delete"))}),T(6,"fa-icon",18),l()()}t&2&&(o(),x("matTooltip",ce(m(2,4,"tooltips.Edit"))),o(3),x("matTooltip",ce(m(5,6,"tooltips.Delete"))))}function Rk(t,n){if(t&1&&(s(0,"td",14),M(1,Fk,7,8,"span"),l()),t&2){let e=n.$implicit,i=P(2);o(),O(i.allowActions(e.termType.value)?1:-1)}}function Bk(t,n){t&1&&T(0,"tr",19)}function qk(t,n){t&1&&T(0,"tr",20)}function jk(t,n){if(t&1&&(s(0,"div")(1,"h3",1),c(2),p(3,"translate"),l(),s(4,"table",2),X(5,3),k(6,wk,2,0,"th",4)(7,Tk,2,1,"td",5),Q(),X(8,6),k(9,Pk,3,3,"th",4)(10,Ak,3,3,"td",5),Q(),X(11,7),k(12,Mk,3,3,"th",4)(13,Ok,3,3,"td",5),Q(),X(14,8),k(15,Ik,3,3,"th",4)(16,Ek,3,3,"td",5),Q(),X(17,9),k(18,Lk,3,3,"th",4)(19,Nk,3,3,"td",5),Q(),X(20,10),k(21,kk,3,3,"th",4)(22,Rk,2,1,"td",5),Q(),k(23,Bk,1,0,"tr",11)(24,qk,1,0,"tr",12),l()()),t&2){let e=n.$implicit,i=P();o(2),b(m(3,4,"labels.heading."+e.label)),o(2),x("dataSource",e.data),o(19),x("matHeaderRowDef",i.loanDTermVariationsColumns),o(),x("matRowDefColumns",i.loanDTermVariationsColumns)}}var T0=(()=>{class t{constructor(){this.route=A(Et),this.router=A(le),this.dates=A(de),this.settingsService=A(oe),this.loansService=A(Mt),this.dialog=A(Gn),this.loanTermVariationsData=[],this.loanDTermVariationsColumns=["row","startDate","endDate","days","actions"],this.emiAmountData=[],this.interestRateData=[],this.dueDateData=[],this.deleteInstallmentData=[],this.insertInstallmentData=[],this.principalAmountData=[],this.graceOnInterestData=[],this.graceOnPrincipalData=[],this.extendRepaymentPeriodData=[],this.interestRateFromInstallmentData=[],this.interestPausesData=[],this.invalidData=[];let e=this.dates;this.interestPausesData=[],this.clientId=this.route.parent.parent.snapshot.paramMap.get("clientId"),this.route.data.subscribe(i=>{this.loanId=i.loanDetailsData.id,this.loanTermVariationsData=[],i.loanDetailsData.loanTermVariations?.forEach(a=>{switch(a.days=e.calculateDiff(new Date(a.termVariationApplicableFrom),new Date(a.dateValue))+1,a.termType.value){case"emiAmount":this.emiAmountData.push(a);break;case"interestRate":this.interestRateData.push(a);break;case"deleteInstallment":this.deleteInstallmentData.push(a);break;case"dueDate":this.dueDateData.push(a);break;case"insertInstallment":this.insertInstallmentData.push(a);break;case"principalAmount":this.principalAmountData.push(a);break;case"graceOnInterest":this.graceOnInterestData.push(a);break;case"graceOnPrincipal":this.graceOnPrincipalData.push(a);break;case"extendRepaymentPeriod":this.extendRepaymentPeriodData.push(a);break;case"interestRateForInstallment":this.interestRateFromInstallmentData.push(a);break;case"interestPause":this.interestPausesData.push(a);break;default:this.invalidData.push(a);break}}),this.deleteInstallmentData.length>0&&this.loanTermVariationsData.push({label:"Delete Installment",data:this.deleteInstallmentData}),this.dueDateData.length>0&&this.loanTermVariationsData.push({label:"Due Date",data:this.dueDateData}),this.emiAmountData.length>0&&this.loanTermVariationsData.push({label:"EMI Amount",data:this.emiAmountData}),this.extendRepaymentPeriodData.length>0&&this.loanTermVariationsData.push({label:"Extend Repayment Period",data:this.extendRepaymentPeriodData}),this.graceOnInterestData.length>0&&this.loanTermVariationsData.push({label:"Grace On Interest",data:this.graceOnInterestData}),this.graceOnPrincipalData.length>0&&this.loanTermVariationsData.push({label:"Grace On Principal",data:this.graceOnPrincipalData}),this.insertInstallmentData.length>0&&this.loanTermVariationsData.push({label:"Insert Installment",data:this.insertInstallmentData}),this.interestPausesData.length>0&&this.loanTermVariationsData.push({label:"Interest Pauses",data:this.interestPausesData}),this.interestRateData.length>0&&this.loanTermVariationsData.push({label:"Interest Rate",data:this.interestRateData}),this.interestRateFromInstallmentData.length>0&&this.loanTermVariationsData.push({label:"Interest Rate From Installment",data:this.interestRateFromInstallmentData}),this.principalAmountData.length>0&&this.loanTermVariationsData.push({label:"Principal Amount",data:this.principalAmountData})})}manageRequest(e,i){i==="Delete"?this.deleteInterestPause(e):i==="Edit"&&this.updateInterestPause(e)}deleteInterestPause(e){this.dialog.open(ra,{data:{deleteContext:`interest pause from ${e.startDate} to ${e.endDate}`}}).afterClosed().subscribe(a=>{a.delete&&this.loansService.deleteInterestPause(this.loanId,e.id).subscribe(r=>{this.reload()})})}updateInterestPause(e){let i=this.dates.parseDate(e.startDate),a=this.dates.parseDate(e.endDate),r=[new la({controlName:"startDate",label:"Start Date",value:i,maxDate:this.settingsService.maxFutureDate,required:!0}),new la({controlName:"endDate",label:"End Date",value:a,maxDate:this.settingsService.maxFutureDate,required:!0})],u={title:"Edit Interest Pause id: "+e.id,formfields:r,layout:{addButtonText:"Submit"}};this.dialog.open(_i,{data:u,width:"50rem"}).afterClosed().subscribe(g=>{if(g.data&&g.data.value.startDate<=g.data.value.endDate){let _=this.settingsService.language.code,y=this.settingsService.dateFormat,I={startDate:this.dates.formatDate(g.data.value.startDate,y),endDate:this.dates.formatDate(g.data.value.endDate,y),locale:_,dateFormat:y};this.loansService.updateInterestPause(this.loanId,e.id,I).subscribe(N=>{this.reload()})}})}reload(){let e=this.router.url;this.router.navigateByUrl(`/clients/${this.clientId}/loans-accounts`,{skipLocationChange:!0}).then(()=>this.router.navigate([e]))}allowActions(e){return e==="interestPause"}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=Dt({type:t,selectors:[["mifosx-loan-term-variations-tab"]],decls:3,vars:0,consts:[[1,"container"],[1,"m-t-20"],["mat-table","",3,"dataSource"],["matColumnDef","row"],["mat-header-cell","",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","startDate"],["matColumnDef","endDate"],["matColumnDef","value"],["matColumnDef","days"],["matColumnDef","actions"],["mat-header-row","",4,"matHeaderRowDef"],["mat-row","",4,"matRowDef","matRowDefColumns"],["mat-header-cell",""],["mat-cell",""],["mat-icon-button","","color","primary","matTooltipPosition","right",1,"button",3,"click","matTooltip"],["icon","edit","size","lg"],["mat-icon-button","","color","warn","matTooltipPosition","left",1,"button",3,"click","matTooltip"],["icon","trash","size","lg"],["mat-header-row",""],["mat-row",""]],template:function(i,a){i&1&&(s(0,"div",0),ue(1,jk,25,6,"div",null,Ce),l()),i&2&&(o(),fe(a.loanTermVariationsData))},dependencies:[wt,Tt,bn,yn,xn,Sn,vn,Dn,Ba,Oi,un,wn,Pn,Tn,An,En,Pt,hn],styles:["table[_ngcontent-%COMP%]{width:100%}table[_ngcontent-%COMP%] .action-button[_ngcontent-%COMP%]{min-width:26px;padding:0 0 3px;margin:0 2%;line-height:25px}.container[_ngcontent-%COMP%]{padding-top:1%;padding-bottom:2%}.container[_ngcontent-%COMP%] .delete-button[_ngcontent-%COMP%]{margin-left:1%}"]})}}return t})();var ku=(()=>{class t{constructor(){this.loansService=A(Mt)}resolve(e){let i=e.paramMap.get("loanId")||e.parent.paramMap.get("loanId");if(!isNaN(+i))return this.loansService.getInterestPausesOfLoan(i)}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275prov=sn({token:t,factory:t.\u0275fac})}}return t})();function zk(t,n){t&1&&(s(0,"th",10),c(1),p(2,"translate"),l()),t&2&&(o(),b(m(2,1,"labels.inputs.Amount")))}function Vk(t,n){if(t&1&&(s(0,"td",11),c(1),p(2,"formatNumber"),l()),t&2){let e=n.$implicit;o(),v(" ",m(2,1,e.amount)," ")}}function Uk(t,n){t&1&&(s(0,"th",10),c(1),p(2,"translate"),l()),t&2&&(o(),b(m(2,1,"labels.inputs.Amortized Amount")))}function Hk(t,n){if(t&1&&(s(0,"td",11),c(1),p(2,"formatNumber"),l()),t&2){let e=n.$implicit;o(),v(" ",m(2,1,e.amortizedAmount)," ")}}function Gk(t,n){t&1&&(s(0,"th",10),c(1),p(2,"translate"),l()),t&2&&(o(),b(m(2,1,"labels.inputs.Unrecognized Amount")))}function Wk(t,n){if(t&1&&(s(0,"td",11),c(1),p(2,"formatNumber"),l()),t&2){let e=n.$implicit;o(),v(" ",m(2,1,e.unrecognizedAmount)," ")}}function $k(t,n){t&1&&(s(0,"th",10),c(1),p(2,"translate"),l()),t&2&&(o(),b(m(2,1,"labels.inputs.Adjustment Amount")))}function Yk(t,n){if(t&1&&(s(0,"td",11),c(1),p(2,"formatNumber"),l()),t&2){let e=n.$implicit;o(),v(" ",Ge(2,1,e.amountAdjustment,"-")," ")}}function Zk(t,n){t&1&&T(0,"tr",12)}function Kk(t,n){t&1&&T(0,"tr",13)}function Jk(t,n){if(t&1&&(s(0,"table",1),X(1,2),k(2,zk,3,3,"th",3)(3,Vk,3,3,"td",4),Q(),X(4,5),k(5,Uk,3,3,"th",3)(6,Hk,3,3,"td",4),Q(),X(7,6),k(8,Gk,3,3,"th",3)(9,Wk,3,3,"td",4),Q(),X(10,7),k(11,$k,3,3,"th",3)(12,Yk,3,4,"td",4),Q(),k(13,Zk,1,0,"tr",8)(14,Kk,1,0,"tr",9),l()),t&2){let e=P();x("dataSource",e.capitalizedIncomeData),o(13),x("matHeaderRowDef",e.capitalizedIncomeColumns),o(),x("matRowDefColumns",e.capitalizedIncomeColumns)}}var Tg=(()=>{class t{constructor(){this.route=A(Et),this.capitalizedIncomeData=[],this.capitalizedIncomeColumns=["amount","amortizedAmount","unrecognizedAmount","amountAdjustment"],this.loanId=this.route.parent.parent.snapshot.params.loanId,this.capitalizedIncomeData=[],this.route.parent.data.subscribe(e=>{e.loanDeferredIncomeData.capitalizedIncomeData.forEach(i=>{this.capitalizedIncomeData.push({amount:i.amount,amortizedAmount:i.amortizedAmount??0,unrecognizedAmount:i.unrecognizedAmount??0,amountAdjustment:i.amountAdjustment??0})})})}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=Dt({type:t,selectors:[["mifosx-loan-deferred-income-tab"]],decls:6,vars:7,consts:[[1,"container"],["mat-table","",3,"dataSource"],["matColumnDef","amount"],["mat-header-cell","","class","center",4,"matHeaderCellDef"],["mat-cell","","class","r-amount",4,"matCellDef"],["matColumnDef","amortizedAmount"],["matColumnDef","unrecognizedAmount"],["matColumnDef","amountAdjustment"],["mat-header-row","",4,"matHeaderRowDef"],["mat-row","",4,"matRowDef","matRowDefColumns"],["mat-header-cell","",1,"center"],["mat-cell","",1,"r-amount"],["mat-header-row",""],["mat-row",""]],template:function(i,a){i&1&&(s(0,"div",0)(1,"h3"),c(2),p(3,"translate"),p(4,"translate"),l(),M(5,Jk,15,3,"table",1),l()),i&2&&(o(2),$t("",m(3,3,"labels.inputs.Deferred income")," - ",m(4,5,"labels.menus.Capitalized Income")),o(3),O(a.capitalizedIncomeData.length>0?5:-1))},dependencies:[wt,Tt,bn,yn,xn,Sn,vn,Dn,wn,Pn,Tn,An,Pt,hn],encapsulation:2})}}return t})();var Fu=(()=>{class t{constructor(){this.loansService=A(Mt)}resolve(e){let i=e.paramMap.get("loanId")||e.parent.paramMap.get("loanId");return this.loansService.getDeferredIncomeData(i)}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275prov=sn({token:t,factory:t.\u0275fac})}}return t})();var Ru=(()=>{class t{constructor(){this.loansService=A(Mt)}resolve(e){let i=e.paramMap.get("loanId")||e.parent.paramMap.get("loanId");return i?this.loansService.getBuyDownFeeData(i):(console.error("LoanBuyDownFeesDataResolver: Could not find loanId in route parameters"),new Df(a=>{a.next([]),a.complete()}))}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275prov=sn({token:t,factory:t.\u0275fac})}}return t})();var Xk=[{path:"",data:{title:"Loans",breadcrumb:"Loans",routeParamBreadcrumb:!1},children:[{path:"create",data:{title:"Create Loans Account",breadcrumb:"Create Loans Account"},component:s0,resolve:{loansAccountTemplate:wu}},{path:":loanId",data:{title:"Loan View",routeParamBreadcrumb:"loanId"},component:Np,resolve:{loanDetailsData:il,loanDatatables:C0,loanArrearsDelinquencyConfig:yg},children:[{path:"",redirectTo:"general",pathMatch:"full"},{path:"general",component:kp,data:{title:"General",breadcrumb:"General",routeParamBreadcrumb:!1},resolve:{loanDetailsData:il,loanDatatables:C0}},{path:"accountdetail",component:Fp,data:{title:"Account Detail",breadcrumb:"Account Detail",routeParamBreadcrumb:!1}},{path:"original-schedule",component:Sm,data:{title:"Original Schedule",breadcrumb:"Original Schedule",routeParamBreadcrumb:!1}},{path:"repayment-schedule",component:ho,data:{title:"Repayment Schedule",breadcrumb:"Repayment Schedule",routeParamBreadcrumb:!1}},{path:"transactions",data:{title:"Loans Account Transactions",breadcrumb:"Transactions",routeParamBreadcrumb:!1},children:[{path:"",component:ym},{path:"export",component:h0}]},{path:"deferred-income",data:{title:"Loans Deferred Income",breadcrumb:"Deferred income",routeParamBreadcrumb:!1},resolve:{loanDeferredIncomeData:Fu},children:[{path:"",component:Tg}]},{path:"delinquencytags",data:{title:"Loans Delinquency Tags",breadcrumb:"Delinquency Tags",routeParamBreadcrumb:!1},resolve:{loanDelinquencyTagsData:Eu,loanDelinquencyData:Nu,loanDelinquencyActions:wg},children:[{path:"",component:y0}]},{path:"loan-reschedules",data:{},resolve:{loanRescheduleData:xg},children:[{path:"",component:S0}]},{path:"loan-collateral",component:r0,data:{title:"Loan Collateral Details",breadcrumb:"Loan Collateral Details",routeParamBreadcrumb:!1},resolve:{loanCollaterals:Dg}},{path:"term-variations",component:T0,data:{title:"Loan Term Variations",breadcrumb:"Loan Term Variations",routeParamBreadcrumb:!1},resolve:{loanDetailsData:il,interestPausesData:ku}},{path:"loan-tranche-details",component:o0,data:{title:"Loan Tranche Details",breadcrumb:"Loan Tranche Details",routeParamBreadcrumb:!1}},{path:"overdue-charges",component:Dm,data:{title:"Overdue Charges",breadcrumb:"Overdue Charges",routeParamBreadcrumb:!1}},{path:"floating-interest-rates",component:a0,data:{title:"Floating Interest Rates",breadcrumb:"Floating Interest Rates",routeParamBreadcrumb:!1}},{path:"charges",data:{title:"Loans Account Charges",breadcrumb:"Charges",routeParamBreadcrumb:!1},component:wm},{path:"loan-documents",component:c0,data:{title:"Loan Documents",breadcrumb:"Loan Documents",routeParamBreadcrumb:!1},resolve:{loanDocuments:Tu}},{path:"notes",component:Rp,data:{title:"Notes",breadcrumb:"Notes",routeParamBreadcrumb:!1},resolve:{loanNotes:yu}},{path:"standing-instruction",component:p0,data:{title:"Standing Instructions",breadcrumb:"Standing Instructions",routeParamBreadcrumb:!1}},{path:"external-asset-owner",component:w0,data:{title:"External Asset Owner",breadcrumb:"External Asset Owner",routeParamBreadcrumb:!1},resolve:{activeTransferData:Sg,loanTransfersData:Lu}},{path:"datatables",children:[{path:":datatableName",component:Tm,data:{title:"Data Table View",routeParamBreadcrumb:"datatableName"},resolve:{loanDatatable:Su}}]},{path:"buy-down-fees",component:vg,data:{title:"Buy Down Fees",breadcrumb:"Buy Down Fees",routeParamBreadcrumb:!1},resolve:{loanBuyDownFeesData:Ru}}]},{path:":loanId/transactions/:id",data:{title:"Loans Account Transactions",breadcrumb:"Transactions",routeParamBreadcrumb:!1},resolve:{loanDetailsAssociationData:il},children:[{path:"",data:{routeParamBreadcrumb:"id"},component:d0,resolve:{loansAccountTransaction:Pu}},{path:"edit",component:u0,data:{breadcrumb:"Edit",routeParamBreadcrumb:!1},resolve:{loansAccountTransactionTemplate:Mu}},{path:"reciept",component:f0,data:{breadcrumb:"Reciept",routeParamBreadcrumb:!1},resolve:{loansTransactionReciept:Au}}]},{path:":loanId/edit-loans-account",data:{title:"Modify Loans Account",breadcrumb:"Modify Loans Account",routeParamBreadcrumb:"Edit"},component:Oc,resolve:{loansAccountAndTemplate:b0}},{path:":loanId/charges",data:{title:"Loans Account Charges",breadcrumb:"Charges",routeParamBreadcrumb:!1},children:[{path:"",redirectTo:"../charges",pathMatch:"prefix"},{path:":id",data:{routeParamBreadcrumb:"id"},component:m0,resolve:{loansAccountCharge:v0,loanDetailsData:il}},{path:":id/adjustment",data:{routeParamBreadcrumb:"id",breadcrumb:"Adjustment"},component:D0,resolve:{loansAccountCharge:v0,loanDetailsData:il}}]},{path:":loanId/actions/:action",component:i0,data:{title:"Loan Account Actions",breadcrumb:"action",routeParamBreadcrumb:"action"},resolve:{actionButtonData:Du}},{path:":loanId/transfer-funds",loadChildren:()=>import("./account-transfers.module-IS46QWMU.js").then(t=>t.AccountTransfersModule)},{path:"edit-loans-account",data:{title:"Modify Loans Account",breadcrumb:"Modify Loans Account",routeParamBreadcrumb:"Edit"},component:Oc,resolve:{loansAccountAndTemplate:b0}}]},{path:"glim-account",data:{title:"Loans",breadcrumb:"Loans",routeParamBreadcrumb:!1},children:[{path:"create",data:{title:"Create GLIM Application",breadcrumb:"Create GLIM Application",routeParamBreadcrumb:!1},component:_0,resolve:{loansAccountTemplate:Iu,groupsData:b1}},{path:":glimId",data:{title:"GSIM Account View",routeParamBreadcrumb:"savingAccountId"},component:g0,resolve:{glimData:Ou,groupsData:ld}}]}],Pg=(()=>{class t{static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275mod=gp({type:t})}static{this.\u0275inj=fp({providers:[il,yu,C0,Su,Eu,Du,wu,Tu,b0,v0,Pu,Mu,Au,_1,ld,Ou,C1,Iu,Lu,Nu,ku,Fu,Ru],imports:[rd.forChild(Xk),rd]})}}return t})();var Ag=(()=>{class t{constructor(){this.externalAssetOwner=A(Ep)}itemStatus(e){return this.externalAssetOwner.itemStatus(e)}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=Dt({type:t,selectors:[["mifosx-external-asset-transfer"]],inputs:{transferData:"transferData"},decls:89,vars:61,consts:[[1,"m-l-5","flex-25"],[1,"flex-25","m-l-5","left"],[3,"ngClass"],["icon","stop"],[1,"m-l-5","status"],["completed","true",3,"externalId"],[1,"flex-75","left"],[1,"flex-50","m-l-5"],[1,"flex-50","r-amount"]],template:function(i,a){i&1&&(s(0,"table")(1,"tbody")(2,"tr")(3,"td",0)(4,"b"),c(5),p(6,"translate"),l()(),s(7,"td",1)(8,"div",2),T(9,"fa-icon",3),s(10,"span",4),c(11),l()()(),s(12,"td",0)(13,"b"),c(14),p(15,"translate"),l()(),s(16,"td",1),T(17,"mifosx-external-identifier",5),l()(),s(18,"tr")(19,"td",0)(20,"b"),c(21),p(22,"translate"),l()(),s(23,"td",0),c(24),p(25,"dateFormat"),l(),s(26,"td",0)(27,"b"),c(28),p(29,"translate"),l()(),s(30,"td",0),c(31),p(32,"dateFormat"),l()(),s(33,"tr")(34,"td",0)(35,"b"),c(36),p(37,"translate"),l()(),s(38,"td",6)(39,"table")(40,"tbody")(41,"tr")(42,"td",7)(43,"b"),c(44),p(45,"translate"),l()(),s(46,"td",8),c(47),p(48,"formatNumber"),l()(),s(49,"tr")(50,"td",7)(51,"b"),c(52),p(53,"translate"),l()(),s(54,"td",8),c(55),p(56,"formatNumber"),l()(),s(57,"tr")(58,"td",7)(59,"b"),c(60),p(61,"translate"),l()(),s(62,"td",8),c(63),p(64,"formatNumber"),l()(),s(65,"tr")(66,"td",7)(67,"b"),c(68),p(69,"translate"),l()(),s(70,"td",8),c(71),p(72,"formatNumber"),l()(),s(73,"tr")(74,"td",7)(75,"b"),c(76),p(77,"translate"),l()(),s(78,"td",8),c(79),p(80,"formatNumber"),l()(),s(81,"tr")(82,"td",7)(83,"b"),c(84),p(85,"translate"),l()(),s(86,"td",8),c(87),p(88,"formatNumber"),l()()()()()()()()),i&2&&(o(5),v("",m(6,23,"labels.inputs.Status")," :"),o(3),x("ngClass",a.itemStatus(a.transferData.status)),o(3),b(a.transferData.status),o(3),v("",m(15,25,"labels.inputs.Owner External Id")," :"),o(3),x("externalId",ce(a.transferData.owner.externalId)),o(4),v("",m(22,27,"labels.inputs.Settlement Date")," :"),o(3),v(" ",m(25,29,a.transferData.settlementDate)," "),o(4),v("",m(29,31,"labels.inputs.Effective Date")," :"),o(3),v(" ",m(32,33,a.transferData.effectiveFrom)," "),o(5),v("",m(37,35,"labels.inputs.Details")," :"),o(8),v("",m(45,37,"labels.inputs.Principal Outstanding")," :"),o(3),b(m(48,39,a.transferData.details.totalPrincipalOutstanding)),o(5),v("",m(53,41,"labels.inputs.Interest Outstanding")," :"),o(3),b(m(56,43,a.transferData.details.totalInterestOutstanding)),o(5),v("",m(61,45,"labels.inputs.Fees Outstanding")," :"),o(3),v(" ",m(64,47,a.transferData.details.totalFeeChargesOutstanding)," "),o(5),v("",m(69,49,"labels.inputs.Penalties Outstanding")," :"),o(3),v(" ",m(72,51,a.transferData.details.totalPenaltyChargesOutstanding)," "),o(5),v("",m(77,53,"labels.inputs.Outstanding")," :"),o(3),b(m(80,55,a.transferData.details.totalOutstanding)),o(5),v("",m(85,57,"labels.inputs.Overpaid")," :"),o(3),b(m(88,59,a.transferData.details.totalOverpaid)))},dependencies:[wt,ca,Tt,un,Va,En,Pt,hn],styles:[".asset-transfer-container[_ngcontent-%COMP%]{height:150px}.asset-transfer-container[_ngcontent-%COMP%] .status[_ngcontent-%COMP%]{color:#000}"]})}}return t})();var slt=(()=>{class t{static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275mod=gp({type:t})}static{this.\u0275inj=fp({imports:[f1,c1,Pg,r1,Bf,Km,Np,kp,Fp,Rp,wm,Dm,Sm,ho,i0,Pm,ym,Tm,Am,Mm,Om,Im,Em,Nm,a0,km,o0,Fm,Rm,r0,s0,Oo,Io,Eo,nl,l0,Bm,jm,zm,qm,Um,Hm,Gm,Wm,$m,c0,p0,Oc,Ym,Zm,m0,d0,u0,f0,h0,Lm,g0,_0,y0,el,Jm,Vm,Ss,S0,D0,Xm,Qm,w0,Ag,x0,t0,e0,T0,n0,Ic]})}}return t})();export{slt as LoansModule}; diff --git a/browser/main.js b/browser/main.js index 51172525e..77b3abf40 100644 --- a/browser/main.js +++ b/browser/main.js @@ -1,4 +1,4 @@ -import{a as JF,b as Rk,c as Ia,d as Xg,e as li,f as Nk}from"./chunk-7VHKCFQO.js";import{a as lr,b as BT,c as RT,d as mf}from"./chunk-JJ2I2MEQ.js";import{$ as gg,$a as Bc,$b as NF,$d as vi,$e as ri,$f as go,A as hl,Aa as vF,Ab as yg,Ac as x0,Ad as b0,Ae as Pp,Af as Yr,Ag as kk,B as lf,Ba as xF,Bb as DF,Bc as eo,Bd as Be,Be as Tp,Bf as Lr,C as Nl,Ca as vg,Cb as Sg,Cc as Po,Cd as ut,Ce as ck,Cf as nr,Cg as Jg,D as Eo,Da as X,Db as xp,Dc as Ht,Dd as za,De as Za,Df as or,Dg as ta,E as Fo,Ea as Z,Eb as wg,Ec as Un,Ed as y0,Ee as er,Ef as ar,Eg as rs,F as sF,Fa as _l,Fb as ue,Fc as Wn,Fd as ai,Fe as Mp,Ff as vk,Fg as To,G as Re,Ga as Y,Gb as Ll,Gc as ho,Gd as Fe,Ge as Dp,Gf as xk,Gg as ls,H as Hi,Ha as bF,Hb as EF,Hc as Nn,Hd as Ln,He as Tr,Hf as zg,Hg as Kg,I as u0,Ia as R,Ib as IF,Ic as kg,Id as ze,Ie as Mr,If as T0,Ig as Bk,J as gl,Ja as w,Jb as OF,Jc as HF,Jd as ft,Je as oc,Jf as M0,K as T,Ka as yF,Kb as Pg,Kc as GF,Kd as gr,Ke as Dr,Kf as Hg,Kg as oo,L as V,La as SF,Lb as Tg,Lc as yi,Ld as gt,Le as Er,Lf as bk,M as q,Ma as g0,Mb as AF,Mc as he,Md as ca,Me as xl,Mf as Gg,N as na,Na as Ee,Nc as yp,Nd as si,Ne as Vo,Nf as D0,O as cF,Oa as Te,Ob as rn,Oc as un,Od as pi,Oe as Ep,Of as E0,P as Cp,Pa as Me,Pb as AT,Pc as jF,Pd as mi,Pe as pa,Pf as yk,Q as pF,Qa as xe,Qb as FF,Qc as wr,Qd as di,Qe as kt,Qf as Sk,R as mF,Ra as vp,Rb as ko,Rc as Zt,Rd as fi,Re as pk,Rf as jg,S as dF,Sa as Cl,Sb as bp,Sc as At,Sd as Pi,Se as P0,Sf as wk,T as Uo,Ta as wF,Tb as kF,Tc as pf,Td as Fi,Te as os,Tf as Pk,U as hg,Ua as c,Ub as BF,Uc as Wo,Ud as Ke,Ue as tr,Uf as Ea,V as sf,Va as h,Vb as RF,Vc as $F,Vd as YF,Ve as ir,Vf as as,W as uF,Wa as v,Wb as Zs,Wc as st,Wd as KF,We as mk,Wf as ac,X as OT,Xa as le,Xb as wo,Xc as se,Xd as ke,Xe as dk,Xf as $g,Y as fF,Ya as ea,Yb as Is,Yc as Ue,Yd as Rg,Ye as uk,Yf as Jr,Z as hF,Za as PF,Zb as Sr,Zc as Xe,Ze as Ip,Zf as Qn,_ as f0,_a as kc,_b as fr,_c as Os,_d as an,_e as It,_f as On,a as of,aa as gF,ab as Rc,ac as Lo,ad as it,ae as S0,af as fk,ag as po,b as af,ba as h0,bb as Le,bc as Wa,bd as Sp,be as wp,bf as ma,bg as ha,c as Nr,ca as a,cb as _0,cc as hr,cd as tt,ce as ii,cf as da,cg as Oi,d as Na,da as bi,db as xg,dc as ud,dd as tn,de as Ri,df as ua,dg as An,e as K7,ea as pd,eb as oe,ec as Mg,ed as _n,ee as Ng,ef as fa,eg as Tk,f as X7,fa as _F,fb as Nt,fc as cf,fd as Ze,fe as Lg,ff as Ji,g as Z7,ga as CF,gb as Ka,gc as Dg,gd as la,ge as tc,gf as qi,gg as I0,h as rf,ha as _g,hb as p,hc as Ie,hd as Va,he as ic,hf as _t,hg as Mk,i as sd,ia as Zo,ib as m,ic as ra,id as et,ie as nc,if as Ct,ig as Dk,j as eF,ja as me,jb as Ot,jc as Eg,jd as UF,je as XF,jf as vt,jg as Ek,k as Mn,ka as Gi,kb as yr,kc as qe,kd as Da,ke as ZF,kg as Ik,l as tF,la as md,lb as $t,lc as Ae,ld as dt,le as ek,lf as xt,lg as Ug,m as iF,ma as Cg,mb as ti,mc as La,md as Bg,me as w0,mf as bt,mg as Ok,n as d0,na as F,nb as ts,nc as gn,nd as qa,ne as Yo,ng as Ak,o as cd,oa as br,ob as TF,oc as Ig,od as WF,oe as Vg,of as yt,og as Wg,p as nF,pa as Dn,pb as C0,pc as Og,pd as nt,pe as tk,pf as St,pg as Ir,q as fl,qa as dd,qb as co,qc as wi,qd as ec,qe as ik,qg as rr,r as Fc,ra as E,rb as is,rc as ve,rd as fe,re as Pr,rf as wt,rg as vn,s as fg,sa as I,sb as Wr,sc as Ag,sd as $e,se as qg,sf as Pt,sg as $i,t as Oo,ta as Pe,tb as Ks,tc as FT,td as Qo,te as nk,tg as Qg,u as oF,ua as Se,ub as Xs,uc as LF,ud as Qr,ue as ok,uf as Tt,ug as Or,v as Ao,va as we,vb as ns,vc as VF,vd as Je,ve as ak,vf as hk,w as Js,wa as g,wb as MF,wc as kT,wd as vl,we as rk,wf as gk,wg as Fk,x as aF,xa as l,xb as Xa,xc as Fg,xd as Et,xe as lk,xf as Wt,xg as Ui,y as rF,ya as r,yb as bg,yc as qF,yd as sa,ye as sk,yf as _k,yg as Yg,z as lF,za as b,zb as v0,zc as zF,zd as QF,ze as As,zf as Ck,zg as rc}from"./chunk-OX7PN44D.js";import{a as at,b as qt,c as Ds,d as Y7,e as pt,f as ET,g as Es,h as qn,i as IT,j as J7,k as ug}from"./chunk-PHUH23IY.js";var vd=pt((B0,xf)=>{(function(){var e,o="4.17.21",t=200,n="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",i="Expected a function",s="Invalid `variable` option passed into `_.template`",d="__lodash_hash_undefined__",u=500,f="__lodash_placeholder__",_=1,C=2,x=4,y=1,P=2,S=1,M=2,D=4,k=8,z=16,U=32,J=64,re=128,ee=256,ae=512,ce=30,_e="...",de=800,j=16,W=1,pe=2,O=3,B=1/0,L=9007199254740991,N=17976931348623157e292,G=NaN,$=4294967295,ne=$-1,be=$>>>1,ye=[["ary",re],["bind",S],["bindKey",M],["curry",k],["curryRight",z],["flip",ae],["partial",U],["partialRight",J],["rearg",ee]],Ne="[object Arguments]",te="[object Array]",Oe="[object AsyncFunction]",K="[object Boolean]",Q="[object Date]",Ce="[object DOMException]",Ve="[object Error]",mt="[object Function]",Ye="[object GeneratorFunction]",rt="[object Map]",Qt="[object Number]",zt="[object Null]",Qe="[object Object]",Vt="[object Promise]",Bt="[object Proxy]",Ut="[object RegExp]",Jt="[object Set]",ei="[object String]",ni="[object Symbol]",Ei="[object Undefined]",Ai="[object WeakMap]",Ni="[object WeakSet]",cn="[object ArrayBuffer]",ji="[object DataView]",Ki="[object Float32Array]",Xn="[object Float64Array]",fn="[object Int8Array]",Xi="[object Int16Array]",hn="[object Int32Array]",zi="[object Uint8Array]",Li="[object Uint8ClampedArray]",Yn="[object Uint16Array]",sn="[object Uint32Array]",bn=/\b__p \+= '';/g,Il=/\b(__p \+=) '' \+/g,xn=/(__e\(.*?\)|\b__t\)) \+\n'';/g,wn=/&(?:amp|lt|gt|quot|#39);/g,Aa=/[&<>"']/g,zn=RegExp(wn.source),Hn=RegExp(Aa.source),el=/<%-([\s\S]+?)%>/g,In=/<%([\s\S]+?)%>/g,Pn=/<%=([\s\S]+?)%>/g,cr=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Vn=/^\w*$/,Tn=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,tl=/[\\^$.*+?()[\]{}|]/g,Gn=RegExp(tl.source),Rt=/^\s+/,ui=/\s/,_i=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,ki=/\{\n\/\* \[wrapped with (.+)\] \*/,yo=/,? & /,Yi=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,ln=/[()=,{}\[\]\/\s]/,qo=/\\(\\)?/g,yn=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,nn=/\w*$/,Ro=/^[-+]0x[0-9a-f]+$/i,ro=/^0b[01]+$/i,lo=/^\[object .+?Constructor\]$/,Go=/^0o[0-7]+$/i,Pa=/^(?:0|[1-9]\d*)$/,Ya=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,pr=/($^)/,ja=/['\n\r\u2028\u2029\\]/g,Ja="\\ud800-\\udfff",ht="\\u0300-\\u036f",oi="\\ufe20-\\ufe2f",Mi="\\u20d0-\\u20ff",xi=ht+oi+Mi,Vi="\\u2700-\\u27bf",pn="a-z\\xdf-\\xf6\\xf8-\\xff",dn="\\xac\\xb1\\xd7\\xf7",mo="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",jn="\\u2000-\\u206f",Fn=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",$n="A-Z\\xc0-\\xd6\\xd8-\\xde",va="\\ufe0e\\ufe0f",Ta=dn+mo+jn+Fn,Mo="['\u2019]",jo="["+Ja+"]",mr="["+Ta+"]",Br="["+xi+"]",il="\\d+",$l="["+Vi+"]",js="["+pn+"]",Ym="[^"+Ja+Ta+il+Vi+pn+$n+"]",$s="\\ud83c[\\udffb-\\udfff]",Io="(?:"+Br+"|"+$s+")",No="[^"+Ja+"]",Jm="(?:\\ud83c[\\udde6-\\uddff]){2}",bs="[\\ud800-\\udbff][\\udc00-\\udfff]",ys="["+$n+"]",jr="\\u200d",Ul="(?:"+js+"|"+Ym+")",Us="(?:"+ys+"|"+Ym+")",lp="(?:"+Mo+"(?:d|ll|m|re|s|t|ve))?",Km="(?:"+Mo+"(?:D|LL|M|RE|S|T|VE))?",Sc=Io+"?",Ss="["+va+"]?",Th="(?:"+jr+"(?:"+[No,Jm,bs].join("|")+")"+Ss+Sc+")*",Jd="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",zu="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",Xm=Ss+Sc+Th,Kd="(?:"+[$l,Jm,bs].join("|")+")"+Xm,Mh="(?:"+[No+Br+"?",Br,Jm,bs,jo].join("|")+")",Xd=RegExp(Mo,"g"),Zd=RegExp(Br,"g"),SP=RegExp($s+"(?="+$s+")|"+Mh+Xm,"g"),CZ=RegExp([ys+"?"+js+"+"+lp+"(?="+[mr,ys,"$"].join("|")+")",Us+"+"+Km+"(?="+[mr,ys+Ul,"$"].join("|")+")",ys+"?"+Ul+"+"+lp,ys+"+"+Km,zu,Jd,il,Kd].join("|"),"g"),vZ=RegExp("["+jr+Ja+xi+va+"]"),xZ=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,bZ=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],yZ=-1,xa={};xa[Ki]=xa[Xn]=xa[fn]=xa[Xi]=xa[hn]=xa[zi]=xa[Li]=xa[Yn]=xa[sn]=!0,xa[Ne]=xa[te]=xa[cn]=xa[K]=xa[ji]=xa[Q]=xa[Ve]=xa[mt]=xa[rt]=xa[Qt]=xa[Qe]=xa[Ut]=xa[Jt]=xa[ei]=xa[Ai]=!1;var aa={};aa[Ne]=aa[te]=aa[cn]=aa[ji]=aa[K]=aa[Q]=aa[Ki]=aa[Xn]=aa[fn]=aa[Xi]=aa[hn]=aa[rt]=aa[Qt]=aa[Qe]=aa[Ut]=aa[Jt]=aa[ei]=aa[ni]=aa[zi]=aa[Li]=aa[Yn]=aa[sn]=!0,aa[Ve]=aa[mt]=aa[Ai]=!1;var SZ={\u00C0:"A",\u00C1:"A",\u00C2:"A",\u00C3:"A",\u00C4:"A",\u00C5:"A",\u00E0:"a",\u00E1:"a",\u00E2:"a",\u00E3:"a",\u00E4:"a",\u00E5:"a",\u00C7:"C",\u00E7:"c",\u00D0:"D",\u00F0:"d",\u00C8:"E",\u00C9:"E",\u00CA:"E",\u00CB:"E",\u00E8:"e",\u00E9:"e",\u00EA:"e",\u00EB:"e",\u00CC:"I",\u00CD:"I",\u00CE:"I",\u00CF:"I",\u00EC:"i",\u00ED:"i",\u00EE:"i",\u00EF:"i",\u00D1:"N",\u00F1:"n",\u00D2:"O",\u00D3:"O",\u00D4:"O",\u00D5:"O",\u00D6:"O",\u00D8:"O",\u00F2:"o",\u00F3:"o",\u00F4:"o",\u00F5:"o",\u00F6:"o",\u00F8:"o",\u00D9:"U",\u00DA:"U",\u00DB:"U",\u00DC:"U",\u00F9:"u",\u00FA:"u",\u00FB:"u",\u00FC:"u",\u00DD:"Y",\u00FD:"y",\u00FF:"y",\u00C6:"Ae",\u00E6:"ae",\u00DE:"Th",\u00FE:"th",\u00DF:"ss",\u0100:"A",\u0102:"A",\u0104:"A",\u0101:"a",\u0103:"a",\u0105:"a",\u0106:"C",\u0108:"C",\u010A:"C",\u010C:"C",\u0107:"c",\u0109:"c",\u010B:"c",\u010D:"c",\u010E:"D",\u0110:"D",\u010F:"d",\u0111:"d",\u0112:"E",\u0114:"E",\u0116:"E",\u0118:"E",\u011A:"E",\u0113:"e",\u0115:"e",\u0117:"e",\u0119:"e",\u011B:"e",\u011C:"G",\u011E:"G",\u0120:"G",\u0122:"G",\u011D:"g",\u011F:"g",\u0121:"g",\u0123:"g",\u0124:"H",\u0126:"H",\u0125:"h",\u0127:"h",\u0128:"I",\u012A:"I",\u012C:"I",\u012E:"I",\u0130:"I",\u0129:"i",\u012B:"i",\u012D:"i",\u012F:"i",\u0131:"i",\u0134:"J",\u0135:"j",\u0136:"K",\u0137:"k",\u0138:"k",\u0139:"L",\u013B:"L",\u013D:"L",\u013F:"L",\u0141:"L",\u013A:"l",\u013C:"l",\u013E:"l",\u0140:"l",\u0142:"l",\u0143:"N",\u0145:"N",\u0147:"N",\u014A:"N",\u0144:"n",\u0146:"n",\u0148:"n",\u014B:"n",\u014C:"O",\u014E:"O",\u0150:"O",\u014D:"o",\u014F:"o",\u0151:"o",\u0154:"R",\u0156:"R",\u0158:"R",\u0155:"r",\u0157:"r",\u0159:"r",\u015A:"S",\u015C:"S",\u015E:"S",\u0160:"S",\u015B:"s",\u015D:"s",\u015F:"s",\u0161:"s",\u0162:"T",\u0164:"T",\u0166:"T",\u0163:"t",\u0165:"t",\u0167:"t",\u0168:"U",\u016A:"U",\u016C:"U",\u016E:"U",\u0170:"U",\u0172:"U",\u0169:"u",\u016B:"u",\u016D:"u",\u016F:"u",\u0171:"u",\u0173:"u",\u0174:"W",\u0175:"w",\u0176:"Y",\u0177:"y",\u0178:"Y",\u0179:"Z",\u017B:"Z",\u017D:"Z",\u017A:"z",\u017C:"z",\u017E:"z",\u0132:"IJ",\u0133:"ij",\u0152:"Oe",\u0153:"oe",\u0149:"'n",\u017F:"s"},wZ={"&":"&","<":"<",">":">",'"':""","'":"'"},PZ={"&":"&","<":"<",">":">",""":'"',"'":"'"},TZ={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},MZ=parseFloat,DZ=parseInt,HO=typeof global=="object"&&global&&global.Object===Object&&global,EZ=typeof self=="object"&&self&&self.Object===Object&&self,vr=HO||EZ||Function("return this")(),wP=typeof B0=="object"&&B0&&!B0.nodeType&&B0,Zm=wP&&typeof xf=="object"&&xf&&!xf.nodeType&&xf,GO=Zm&&Zm.exports===wP,PP=GO&&HO.process,Wl=(function(){try{var Yt=Zm&&Zm.require&&Zm.require("util").types;return Yt||PP&&PP.binding&&PP.binding("util")}catch{}})(),jO=Wl&&Wl.isArrayBuffer,$O=Wl&&Wl.isDate,UO=Wl&&Wl.isMap,WO=Wl&&Wl.isRegExp,QO=Wl&&Wl.isSet,YO=Wl&&Wl.isTypedArray;function Ol(Yt,Si,hi){switch(hi.length){case 0:return Yt.call(Si);case 1:return Yt.call(Si,hi[0]);case 2:return Yt.call(Si,hi[0],hi[1]);case 3:return Yt.call(Si,hi[0],hi[1],hi[2])}return Yt.apply(Si,hi)}function IZ(Yt,Si,hi,mn){for(var Zn=-1,zo=Yt==null?0:Yt.length;++Zn-1}function TP(Yt,Si,hi){for(var mn=-1,Zn=Yt==null?0:Yt.length;++mn-1;);return hi}function nA(Yt,Si){for(var hi=Yt.length;hi--&&e0(Si,Yt[hi],0)>-1;);return hi}function VZ(Yt,Si){for(var hi=Yt.length,mn=0;hi--;)Yt[hi]===Si&&++mn;return mn}var qZ=IP(SZ),zZ=IP(wZ);function HZ(Yt){return"\\"+TZ[Yt]}function GZ(Yt,Si){return Yt==null?e:Yt[Si]}function t0(Yt){return vZ.test(Yt)}function jZ(Yt){return xZ.test(Yt)}function $Z(Yt){for(var Si,hi=[];!(Si=Yt.next()).done;)hi.push(Si.value);return hi}function kP(Yt){var Si=-1,hi=Array(Yt.size);return Yt.forEach(function(mn,Zn){hi[++Si]=[Zn,mn]}),hi}function oA(Yt,Si){return function(hi){return Yt(Si(hi))}}function pp(Yt,Si){for(var hi=-1,mn=Yt.length,Zn=0,zo=[];++hi-1}function Aee(A,H){var ie=this.__data__,De=$h(ie,A);return De<0?(++this.size,ie.push([A,H])):ie[De][1]=H,this}wc.prototype.clear=Dee,wc.prototype.delete=Eee,wc.prototype.get=Iee,wc.prototype.has=Oee,wc.prototype.set=Aee;function Pc(A){var H=-1,ie=A==null?0:A.length;for(this.clear();++H=H?A:H)),A}function Kl(A,H,ie,De,He,ct){var Ft,jt=H&_,Xt=H&C,Di=H&x;if(ie&&(Ft=He?ie(A,De,He,ct):ie(A)),Ft!==e)return Ft;if(!Fa(A))return A;var Ii=no(A);if(Ii){if(Ft=Rte(A),!jt)return pl(A,Ft)}else{var Bi=Ur(A),Zi=Bi==mt||Bi==Ye;if(_p(A))return qA(A,jt);if(Bi==Qe||Bi==Ne||Zi&&!He){if(Ft=Xt||Zi?{}:a7(A),!jt)return Xt?Pte(A,Qee(Ft,A)):wte(A,gA(Ft,A))}else{if(!aa[Bi])return He?A:{};Ft=Nte(A,Bi,jt)}}ct||(ct=new Ps);var Cn=ct.get(A);if(Cn)return Cn;ct.set(A,Ft),k7(A)?A.forEach(function(Rn){Ft.add(Kl(Rn,H,ie,Rn,A,ct))}):A7(A)&&A.forEach(function(Rn,xo){Ft.set(xo,Kl(Rn,H,ie,xo,A,ct))});var Bn=Di?Xt?rT:aT:Xt?dl:xr,so=Ii?e:Bn(A);return Ql(so||A,function(Rn,xo){so&&(xo=Rn,Rn=A[xo]),Qu(Ft,xo,Kl(Rn,H,ie,xo,A,ct))}),Ft}function Yee(A){var H=xr(A);return function(ie){return _A(ie,A,H)}}function _A(A,H,ie){var De=ie.length;if(A==null)return!De;for(A=ia(A);De--;){var He=ie[De],ct=H[He],Ft=A[He];if(Ft===e&&!(He in A)||!ct(Ft))return!1}return!0}function CA(A,H,ie){if(typeof A!="function")throw new Yl(i);return tf(function(){A.apply(e,ie)},H)}function Yu(A,H,ie,De){var He=-1,ct=Dh,Ft=!0,jt=A.length,Xt=[],Di=H.length;if(!jt)return Xt;ie&&(H=Ma(H,Al(ie))),De?(ct=TP,Ft=!1):H.length>=t&&(ct=Hu,Ft=!1,H=new id(H));e:for(;++HeHe?0:He+ie),De=De===e||De>He?He:ao(De),De<0&&(De+=He),De=ie>De?0:R7(De);ie0&&ie(jt)?H>1?Rr(jt,H-1,ie,De,He):cp(He,jt):De||(He[He.length]=jt)}return He}var zP=UA(),bA=UA(!0);function Ws(A,H){return A&&zP(A,H,xr)}function HP(A,H){return A&&bA(A,H,xr)}function Wh(A,H){return sp(H,function(ie){return Ic(A[ie])})}function od(A,H){H=hp(H,A);for(var ie=0,De=H.length;A!=null&&ieH}function Xee(A,H){return A!=null&&Xo.call(A,H)}function Zee(A,H){return A!=null&&H in ia(A)}function ete(A,H,ie){return A>=$r(H,ie)&&A=120&&Ii.length>=120)?new id(Ft&&Ii):e}Ii=A[0];var Bi=-1,Zi=jt[0];e:for(;++Bi-1;)jt!==A&&Lh.call(jt,Xt,1),Lh.call(A,Xt,1);return A}function AA(A,H){for(var ie=A?H.length:0,De=ie-1;ie--;){var He=H[ie];if(ie==De||He!==ct){var ct=He;Ec(He)?Lh.call(A,He,1):XP(A,He)}}return A}function YP(A,H){return A+zh(dA()*(H-A+1))}function ute(A,H,ie,De){for(var He=-1,ct=ur(qh((H-A)/(ie||1)),0),Ft=hi(ct);ct--;)Ft[De?ct:++He]=A,A+=ie;return Ft}function JP(A,H){var ie="";if(!A||H<1||H>L)return ie;do H%2&&(ie+=A),H=zh(H/2),H&&(A+=A);while(H);return ie}function uo(A,H){return uT(s7(A,H,ul),A+"")}function fte(A){return hA(m0(A))}function hte(A,H){var ie=m0(A);return og(ie,nd(H,0,ie.length))}function Xu(A,H,ie,De){if(!Fa(A))return A;H=hp(H,A);for(var He=-1,ct=H.length,Ft=ct-1,jt=A;jt!=null&&++HeHe?0:He+H),ie=ie>He?He:ie,ie<0&&(ie+=He),He=H>ie?0:ie-H>>>0,H>>>=0;for(var ct=hi(He);++De>>1,Ft=A[ct];Ft!==null&&!kl(Ft)&&(ie?Ft<=H:Ft=t){var Di=H?null:Ete(A);if(Di)return Ih(Di);Ft=!1,He=Hu,Xt=new id}else Xt=H?[]:jt;e:for(;++De=De?A:Xl(A,H,ie)}var VA=ree||function(A){return vr.clearTimeout(A)};function qA(A,H){if(H)return A.slice();var ie=A.length,De=lA?lA(ie):new A.constructor(ie);return A.copy(De),De}function iT(A){var H=new A.constructor(A.byteLength);return new Rh(H).set(new Rh(A)),H}function xte(A,H){var ie=H?iT(A.buffer):A.buffer;return new A.constructor(ie,A.byteOffset,A.byteLength)}function bte(A){var H=new A.constructor(A.source,nn.exec(A));return H.lastIndex=A.lastIndex,H}function yte(A){return Wu?ia(Wu.call(A)):{}}function zA(A,H){var ie=H?iT(A.buffer):A.buffer;return new A.constructor(ie,A.byteOffset,A.length)}function HA(A,H){if(A!==H){var ie=A!==e,De=A===null,He=A===A,ct=kl(A),Ft=H!==e,jt=H===null,Xt=H===H,Di=kl(H);if(!jt&&!Di&&!ct&&A>H||ct&&Ft&&Xt&&!jt&&!Di||De&&Ft&&Xt||!ie&&Xt||!He)return 1;if(!De&&!ct&&!Di&&A=jt)return Xt;var Di=ie[De];return Xt*(Di=="desc"?-1:1)}}return A.index-H.index}function GA(A,H,ie,De){for(var He=-1,ct=A.length,Ft=ie.length,jt=-1,Xt=H.length,Di=ur(ct-Ft,0),Ii=hi(Xt+Di),Bi=!De;++jt1?ie[He-1]:e,Ft=He>2?ie[2]:e;for(ct=A.length>3&&typeof ct=="function"?(He--,ct):e,Ft&&ol(ie[0],ie[1],Ft)&&(ct=He<3?e:ct,He=1),H=ia(H);++De-1?He[ct?H[Ft]:Ft]:e}}function YA(A){return Dc(function(H){var ie=H.length,De=ie,He=Jl.prototype.thru;for(A&&H.reverse();De--;){var ct=H[De];if(typeof ct!="function")throw new Yl(i);if(He&&!Ft&&ig(ct)=="wrapper")var Ft=new Jl([],!0)}for(De=Ft?De:ie;++De1&&Do.reverse(),Ii&&Xtjt))return!1;var Di=ct.get(A),Ii=ct.get(H);if(Di&&Ii)return Di==H&&Ii==A;var Bi=-1,Zi=!0,Cn=ie&P?new id:e;for(ct.set(A,H),ct.set(H,A);++Bi1?"& ":"")+H[De],H=H.join(ie>2?", ":" "),A.replace(_i,`{ +import{a as JF,b as Rk,c as Ia,d as Xg,e as li,f as Nk}from"./chunk-5UY4RGU3.js";import{a as lr,b as BT,c as RT,d as mf}from"./chunk-IOMOX4OB.js";import{$ as gg,$a as Bc,$b as NF,$d as vi,$e as ri,$f as go,A as hl,Aa as vF,Ab as yg,Ac as x0,Ad as b0,Ae as Pp,Af as Yr,Ag as kk,B as lf,Ba as xF,Bb as DF,Bc as eo,Bd as Be,Be as Tp,Bf as Lr,C as Nl,Ca as vg,Cb as Sg,Cc as Po,Cd as ut,Ce as ck,Cf as nr,Cg as Jg,D as Eo,Da as X,Db as xp,Dc as Ht,Dd as za,De as Za,Df as or,Dg as ta,E as Fo,Ea as Z,Eb as wg,Ec as Un,Ed as y0,Ee as er,Ef as ar,Eg as rs,F as sF,Fa as _l,Fb as ue,Fc as Wn,Fd as ai,Fe as Mp,Ff as vk,Fg as To,G as Re,Ga as Y,Gb as Ll,Gc as ho,Gd as Fe,Ge as Dp,Gf as xk,Gg as ls,H as Hi,Ha as bF,Hb as EF,Hc as Nn,Hd as Ln,He as Tr,Hf as zg,Hg as Kg,I as u0,Ia as R,Ib as IF,Ic as kg,Id as ze,Ie as Mr,If as T0,Ig as Bk,J as gl,Ja as w,Jb as OF,Jc as HF,Jd as ft,Je as oc,Jf as M0,K as T,Ka as yF,Kb as Pg,Kc as GF,Kd as gr,Ke as Dr,Kf as Hg,Kg as oo,L as V,La as SF,Lb as Tg,Lc as yi,Ld as gt,Le as Er,Lf as bk,M as q,Ma as g0,Mb as AF,Mc as he,Md as ca,Me as xl,Mf as Gg,N as na,Na as Ee,Nc as yp,Nd as si,Ne as Vo,Nf as D0,O as cF,Oa as Te,Ob as rn,Oc as un,Od as pi,Oe as Ep,Of as E0,P as Cp,Pa as Me,Pb as AT,Pc as jF,Pd as mi,Pe as pa,Pf as yk,Q as pF,Qa as xe,Qb as FF,Qc as wr,Qd as di,Qe as kt,Qf as Sk,R as mF,Ra as vp,Rb as ko,Rc as Zt,Rd as fi,Re as pk,Rf as jg,S as dF,Sa as Cl,Sb as bp,Sc as At,Sd as Pi,Se as P0,Sf as wk,T as Uo,Ta as wF,Tb as kF,Tc as pf,Td as Fi,Te as os,Tf as Pk,U as hg,Ua as c,Ub as BF,Uc as Wo,Ud as Ke,Ue as tr,Uf as Ea,V as sf,Va as h,Vb as RF,Vc as $F,Vd as YF,Ve as ir,Vf as as,W as uF,Wa as v,Wb as Zs,Wc as st,Wd as KF,We as mk,Wf as ac,X as OT,Xa as le,Xb as wo,Xc as se,Xd as ke,Xe as dk,Xf as $g,Y as fF,Ya as ea,Yb as Is,Yc as Ue,Yd as Rg,Ye as uk,Yf as Jr,Z as hF,Za as PF,Zb as Sr,Zc as Xe,Ze as Ip,Zf as Qn,_ as f0,_a as kc,_b as fr,_c as Os,_d as an,_e as It,_f as On,a as of,aa as gF,ab as Rc,ac as Lo,ad as it,ae as S0,af as fk,ag as po,b as af,ba as h0,bb as Le,bc as Wa,bd as Sp,be as wp,bf as ma,bg as ha,c as Nr,ca as a,cb as _0,cc as hr,cd as tt,ce as ii,cf as da,cg as Oi,d as Na,da as bi,db as xg,dc as ud,dd as tn,de as Ri,df as ua,dg as An,e as K7,ea as pd,eb as oe,ec as Mg,ed as _n,ee as Ng,ef as fa,eg as Tk,f as X7,fa as _F,fb as Nt,fc as cf,fd as Ze,fe as Lg,ff as Ji,g as Z7,ga as CF,gb as Ka,gc as Dg,gd as la,ge as tc,gf as qi,gg as I0,h as rf,ha as _g,hb as p,hc as Ie,hd as Va,he as ic,hf as _t,hg as Mk,i as sd,ia as Zo,ib as m,ic as ra,id as et,ie as nc,if as Ct,ig as Dk,j as eF,ja as me,jb as Ot,jc as Eg,jd as UF,je as XF,jf as vt,jg as Ek,k as Mn,ka as Gi,kb as yr,kc as qe,kd as Da,ke as ZF,kg as Ik,l as tF,la as md,lb as $t,lc as Ae,ld as dt,le as ek,lf as xt,lg as Ug,m as iF,ma as Cg,mb as ti,mc as La,md as Bg,me as w0,mf as bt,mg as Ok,n as d0,na as F,nb as ts,nc as gn,nd as qa,ne as Yo,ng as Ak,o as cd,oa as br,ob as TF,oc as Ig,od as WF,oe as Vg,of as yt,og as Wg,p as nF,pa as Dn,pb as C0,pc as Og,pd as nt,pe as tk,pf as St,pg as Ir,q as fl,qa as dd,qb as co,qc as wi,qd as ec,qe as ik,qg as rr,r as Fc,ra as E,rb as is,rc as ve,rd as fe,re as Pr,rf as wt,rg as vn,s as fg,sa as I,sb as Wr,sc as Ag,sd as $e,se as qg,sf as Pt,sg as $i,t as Oo,ta as Pe,tb as Ks,tc as FT,td as Qo,te as nk,tg as Qg,u as oF,ua as Se,ub as Xs,uc as LF,ud as Qr,ue as ok,uf as Tt,ug as Or,v as Ao,va as we,vb as ns,vc as VF,vd as Je,ve as ak,vf as hk,w as Js,wa as g,wb as MF,wc as kT,wd as vl,we as rk,wf as gk,wg as Fk,x as aF,xa as l,xb as Xa,xc as Fg,xd as Et,xe as lk,xf as Wt,xg as Ui,y as rF,ya as r,yb as bg,yc as qF,yd as sa,ye as sk,yf as _k,yg as Yg,z as lF,za as b,zb as v0,zc as zF,zd as QF,ze as As,zf as Ck,zg as rc}from"./chunk-BQBWZIWL.js";import{a as at,b as qt,c as Ds,d as Y7,e as pt,f as ET,g as Es,h as qn,i as IT,j as J7,k as ug}from"./chunk-PHUH23IY.js";var vd=pt((B0,xf)=>{(function(){var e,o="4.17.21",t=200,n="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",i="Expected a function",s="Invalid `variable` option passed into `_.template`",d="__lodash_hash_undefined__",u=500,f="__lodash_placeholder__",_=1,C=2,x=4,y=1,P=2,S=1,M=2,D=4,k=8,z=16,U=32,J=64,re=128,ee=256,ae=512,ce=30,_e="...",de=800,j=16,W=1,pe=2,O=3,B=1/0,L=9007199254740991,N=17976931348623157e292,G=NaN,$=4294967295,ne=$-1,be=$>>>1,ye=[["ary",re],["bind",S],["bindKey",M],["curry",k],["curryRight",z],["flip",ae],["partial",U],["partialRight",J],["rearg",ee]],Ne="[object Arguments]",te="[object Array]",Oe="[object AsyncFunction]",K="[object Boolean]",Q="[object Date]",Ce="[object DOMException]",Ve="[object Error]",mt="[object Function]",Ye="[object GeneratorFunction]",rt="[object Map]",Qt="[object Number]",zt="[object Null]",Qe="[object Object]",Vt="[object Promise]",Bt="[object Proxy]",Ut="[object RegExp]",Jt="[object Set]",ei="[object String]",ni="[object Symbol]",Ei="[object Undefined]",Ai="[object WeakMap]",Ni="[object WeakSet]",cn="[object ArrayBuffer]",ji="[object DataView]",Ki="[object Float32Array]",Xn="[object Float64Array]",fn="[object Int8Array]",Xi="[object Int16Array]",hn="[object Int32Array]",zi="[object Uint8Array]",Li="[object Uint8ClampedArray]",Yn="[object Uint16Array]",sn="[object Uint32Array]",bn=/\b__p \+= '';/g,Il=/\b(__p \+=) '' \+/g,xn=/(__e\(.*?\)|\b__t\)) \+\n'';/g,wn=/&(?:amp|lt|gt|quot|#39);/g,Aa=/[&<>"']/g,zn=RegExp(wn.source),Hn=RegExp(Aa.source),el=/<%-([\s\S]+?)%>/g,In=/<%([\s\S]+?)%>/g,Pn=/<%=([\s\S]+?)%>/g,cr=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Vn=/^\w*$/,Tn=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,tl=/[\\^$.*+?()[\]{}|]/g,Gn=RegExp(tl.source),Rt=/^\s+/,ui=/\s/,_i=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,ki=/\{\n\/\* \[wrapped with (.+)\] \*/,yo=/,? & /,Yi=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,ln=/[()=,{}\[\]\/\s]/,qo=/\\(\\)?/g,yn=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,nn=/\w*$/,Ro=/^[-+]0x[0-9a-f]+$/i,ro=/^0b[01]+$/i,lo=/^\[object .+?Constructor\]$/,Go=/^0o[0-7]+$/i,Pa=/^(?:0|[1-9]\d*)$/,Ya=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,pr=/($^)/,ja=/['\n\r\u2028\u2029\\]/g,Ja="\\ud800-\\udfff",ht="\\u0300-\\u036f",oi="\\ufe20-\\ufe2f",Mi="\\u20d0-\\u20ff",xi=ht+oi+Mi,Vi="\\u2700-\\u27bf",pn="a-z\\xdf-\\xf6\\xf8-\\xff",dn="\\xac\\xb1\\xd7\\xf7",mo="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",jn="\\u2000-\\u206f",Fn=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",$n="A-Z\\xc0-\\xd6\\xd8-\\xde",va="\\ufe0e\\ufe0f",Ta=dn+mo+jn+Fn,Mo="['\u2019]",jo="["+Ja+"]",mr="["+Ta+"]",Br="["+xi+"]",il="\\d+",$l="["+Vi+"]",js="["+pn+"]",Ym="[^"+Ja+Ta+il+Vi+pn+$n+"]",$s="\\ud83c[\\udffb-\\udfff]",Io="(?:"+Br+"|"+$s+")",No="[^"+Ja+"]",Jm="(?:\\ud83c[\\udde6-\\uddff]){2}",bs="[\\ud800-\\udbff][\\udc00-\\udfff]",ys="["+$n+"]",jr="\\u200d",Ul="(?:"+js+"|"+Ym+")",Us="(?:"+ys+"|"+Ym+")",lp="(?:"+Mo+"(?:d|ll|m|re|s|t|ve))?",Km="(?:"+Mo+"(?:D|LL|M|RE|S|T|VE))?",Sc=Io+"?",Ss="["+va+"]?",Th="(?:"+jr+"(?:"+[No,Jm,bs].join("|")+")"+Ss+Sc+")*",Jd="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",zu="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",Xm=Ss+Sc+Th,Kd="(?:"+[$l,Jm,bs].join("|")+")"+Xm,Mh="(?:"+[No+Br+"?",Br,Jm,bs,jo].join("|")+")",Xd=RegExp(Mo,"g"),Zd=RegExp(Br,"g"),SP=RegExp($s+"(?="+$s+")|"+Mh+Xm,"g"),CZ=RegExp([ys+"?"+js+"+"+lp+"(?="+[mr,ys,"$"].join("|")+")",Us+"+"+Km+"(?="+[mr,ys+Ul,"$"].join("|")+")",ys+"?"+Ul+"+"+lp,ys+"+"+Km,zu,Jd,il,Kd].join("|"),"g"),vZ=RegExp("["+jr+Ja+xi+va+"]"),xZ=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,bZ=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],yZ=-1,xa={};xa[Ki]=xa[Xn]=xa[fn]=xa[Xi]=xa[hn]=xa[zi]=xa[Li]=xa[Yn]=xa[sn]=!0,xa[Ne]=xa[te]=xa[cn]=xa[K]=xa[ji]=xa[Q]=xa[Ve]=xa[mt]=xa[rt]=xa[Qt]=xa[Qe]=xa[Ut]=xa[Jt]=xa[ei]=xa[Ai]=!1;var aa={};aa[Ne]=aa[te]=aa[cn]=aa[ji]=aa[K]=aa[Q]=aa[Ki]=aa[Xn]=aa[fn]=aa[Xi]=aa[hn]=aa[rt]=aa[Qt]=aa[Qe]=aa[Ut]=aa[Jt]=aa[ei]=aa[ni]=aa[zi]=aa[Li]=aa[Yn]=aa[sn]=!0,aa[Ve]=aa[mt]=aa[Ai]=!1;var SZ={\u00C0:"A",\u00C1:"A",\u00C2:"A",\u00C3:"A",\u00C4:"A",\u00C5:"A",\u00E0:"a",\u00E1:"a",\u00E2:"a",\u00E3:"a",\u00E4:"a",\u00E5:"a",\u00C7:"C",\u00E7:"c",\u00D0:"D",\u00F0:"d",\u00C8:"E",\u00C9:"E",\u00CA:"E",\u00CB:"E",\u00E8:"e",\u00E9:"e",\u00EA:"e",\u00EB:"e",\u00CC:"I",\u00CD:"I",\u00CE:"I",\u00CF:"I",\u00EC:"i",\u00ED:"i",\u00EE:"i",\u00EF:"i",\u00D1:"N",\u00F1:"n",\u00D2:"O",\u00D3:"O",\u00D4:"O",\u00D5:"O",\u00D6:"O",\u00D8:"O",\u00F2:"o",\u00F3:"o",\u00F4:"o",\u00F5:"o",\u00F6:"o",\u00F8:"o",\u00D9:"U",\u00DA:"U",\u00DB:"U",\u00DC:"U",\u00F9:"u",\u00FA:"u",\u00FB:"u",\u00FC:"u",\u00DD:"Y",\u00FD:"y",\u00FF:"y",\u00C6:"Ae",\u00E6:"ae",\u00DE:"Th",\u00FE:"th",\u00DF:"ss",\u0100:"A",\u0102:"A",\u0104:"A",\u0101:"a",\u0103:"a",\u0105:"a",\u0106:"C",\u0108:"C",\u010A:"C",\u010C:"C",\u0107:"c",\u0109:"c",\u010B:"c",\u010D:"c",\u010E:"D",\u0110:"D",\u010F:"d",\u0111:"d",\u0112:"E",\u0114:"E",\u0116:"E",\u0118:"E",\u011A:"E",\u0113:"e",\u0115:"e",\u0117:"e",\u0119:"e",\u011B:"e",\u011C:"G",\u011E:"G",\u0120:"G",\u0122:"G",\u011D:"g",\u011F:"g",\u0121:"g",\u0123:"g",\u0124:"H",\u0126:"H",\u0125:"h",\u0127:"h",\u0128:"I",\u012A:"I",\u012C:"I",\u012E:"I",\u0130:"I",\u0129:"i",\u012B:"i",\u012D:"i",\u012F:"i",\u0131:"i",\u0134:"J",\u0135:"j",\u0136:"K",\u0137:"k",\u0138:"k",\u0139:"L",\u013B:"L",\u013D:"L",\u013F:"L",\u0141:"L",\u013A:"l",\u013C:"l",\u013E:"l",\u0140:"l",\u0142:"l",\u0143:"N",\u0145:"N",\u0147:"N",\u014A:"N",\u0144:"n",\u0146:"n",\u0148:"n",\u014B:"n",\u014C:"O",\u014E:"O",\u0150:"O",\u014D:"o",\u014F:"o",\u0151:"o",\u0154:"R",\u0156:"R",\u0158:"R",\u0155:"r",\u0157:"r",\u0159:"r",\u015A:"S",\u015C:"S",\u015E:"S",\u0160:"S",\u015B:"s",\u015D:"s",\u015F:"s",\u0161:"s",\u0162:"T",\u0164:"T",\u0166:"T",\u0163:"t",\u0165:"t",\u0167:"t",\u0168:"U",\u016A:"U",\u016C:"U",\u016E:"U",\u0170:"U",\u0172:"U",\u0169:"u",\u016B:"u",\u016D:"u",\u016F:"u",\u0171:"u",\u0173:"u",\u0174:"W",\u0175:"w",\u0176:"Y",\u0177:"y",\u0178:"Y",\u0179:"Z",\u017B:"Z",\u017D:"Z",\u017A:"z",\u017C:"z",\u017E:"z",\u0132:"IJ",\u0133:"ij",\u0152:"Oe",\u0153:"oe",\u0149:"'n",\u017F:"s"},wZ={"&":"&","<":"<",">":">",'"':""","'":"'"},PZ={"&":"&","<":"<",">":">",""":'"',"'":"'"},TZ={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},MZ=parseFloat,DZ=parseInt,HO=typeof global=="object"&&global&&global.Object===Object&&global,EZ=typeof self=="object"&&self&&self.Object===Object&&self,vr=HO||EZ||Function("return this")(),wP=typeof B0=="object"&&B0&&!B0.nodeType&&B0,Zm=wP&&typeof xf=="object"&&xf&&!xf.nodeType&&xf,GO=Zm&&Zm.exports===wP,PP=GO&&HO.process,Wl=(function(){try{var Yt=Zm&&Zm.require&&Zm.require("util").types;return Yt||PP&&PP.binding&&PP.binding("util")}catch{}})(),jO=Wl&&Wl.isArrayBuffer,$O=Wl&&Wl.isDate,UO=Wl&&Wl.isMap,WO=Wl&&Wl.isRegExp,QO=Wl&&Wl.isSet,YO=Wl&&Wl.isTypedArray;function Ol(Yt,Si,hi){switch(hi.length){case 0:return Yt.call(Si);case 1:return Yt.call(Si,hi[0]);case 2:return Yt.call(Si,hi[0],hi[1]);case 3:return Yt.call(Si,hi[0],hi[1],hi[2])}return Yt.apply(Si,hi)}function IZ(Yt,Si,hi,mn){for(var Zn=-1,zo=Yt==null?0:Yt.length;++Zn-1}function TP(Yt,Si,hi){for(var mn=-1,Zn=Yt==null?0:Yt.length;++mn-1;);return hi}function nA(Yt,Si){for(var hi=Yt.length;hi--&&e0(Si,Yt[hi],0)>-1;);return hi}function VZ(Yt,Si){for(var hi=Yt.length,mn=0;hi--;)Yt[hi]===Si&&++mn;return mn}var qZ=IP(SZ),zZ=IP(wZ);function HZ(Yt){return"\\"+TZ[Yt]}function GZ(Yt,Si){return Yt==null?e:Yt[Si]}function t0(Yt){return vZ.test(Yt)}function jZ(Yt){return xZ.test(Yt)}function $Z(Yt){for(var Si,hi=[];!(Si=Yt.next()).done;)hi.push(Si.value);return hi}function kP(Yt){var Si=-1,hi=Array(Yt.size);return Yt.forEach(function(mn,Zn){hi[++Si]=[Zn,mn]}),hi}function oA(Yt,Si){return function(hi){return Yt(Si(hi))}}function pp(Yt,Si){for(var hi=-1,mn=Yt.length,Zn=0,zo=[];++hi-1}function Aee(A,H){var ie=this.__data__,De=$h(ie,A);return De<0?(++this.size,ie.push([A,H])):ie[De][1]=H,this}wc.prototype.clear=Dee,wc.prototype.delete=Eee,wc.prototype.get=Iee,wc.prototype.has=Oee,wc.prototype.set=Aee;function Pc(A){var H=-1,ie=A==null?0:A.length;for(this.clear();++H=H?A:H)),A}function Kl(A,H,ie,De,He,ct){var Ft,jt=H&_,Xt=H&C,Di=H&x;if(ie&&(Ft=He?ie(A,De,He,ct):ie(A)),Ft!==e)return Ft;if(!Fa(A))return A;var Ii=no(A);if(Ii){if(Ft=Rte(A),!jt)return pl(A,Ft)}else{var Bi=Ur(A),Zi=Bi==mt||Bi==Ye;if(_p(A))return qA(A,jt);if(Bi==Qe||Bi==Ne||Zi&&!He){if(Ft=Xt||Zi?{}:a7(A),!jt)return Xt?Pte(A,Qee(Ft,A)):wte(A,gA(Ft,A))}else{if(!aa[Bi])return He?A:{};Ft=Nte(A,Bi,jt)}}ct||(ct=new Ps);var Cn=ct.get(A);if(Cn)return Cn;ct.set(A,Ft),k7(A)?A.forEach(function(Rn){Ft.add(Kl(Rn,H,ie,Rn,A,ct))}):A7(A)&&A.forEach(function(Rn,xo){Ft.set(xo,Kl(Rn,H,ie,xo,A,ct))});var Bn=Di?Xt?rT:aT:Xt?dl:xr,so=Ii?e:Bn(A);return Ql(so||A,function(Rn,xo){so&&(xo=Rn,Rn=A[xo]),Qu(Ft,xo,Kl(Rn,H,ie,xo,A,ct))}),Ft}function Yee(A){var H=xr(A);return function(ie){return _A(ie,A,H)}}function _A(A,H,ie){var De=ie.length;if(A==null)return!De;for(A=ia(A);De--;){var He=ie[De],ct=H[He],Ft=A[He];if(Ft===e&&!(He in A)||!ct(Ft))return!1}return!0}function CA(A,H,ie){if(typeof A!="function")throw new Yl(i);return tf(function(){A.apply(e,ie)},H)}function Yu(A,H,ie,De){var He=-1,ct=Dh,Ft=!0,jt=A.length,Xt=[],Di=H.length;if(!jt)return Xt;ie&&(H=Ma(H,Al(ie))),De?(ct=TP,Ft=!1):H.length>=t&&(ct=Hu,Ft=!1,H=new id(H));e:for(;++HeHe?0:He+ie),De=De===e||De>He?He:ao(De),De<0&&(De+=He),De=ie>De?0:R7(De);ie0&&ie(jt)?H>1?Rr(jt,H-1,ie,De,He):cp(He,jt):De||(He[He.length]=jt)}return He}var zP=UA(),bA=UA(!0);function Ws(A,H){return A&&zP(A,H,xr)}function HP(A,H){return A&&bA(A,H,xr)}function Wh(A,H){return sp(H,function(ie){return Ic(A[ie])})}function od(A,H){H=hp(H,A);for(var ie=0,De=H.length;A!=null&&ieH}function Xee(A,H){return A!=null&&Xo.call(A,H)}function Zee(A,H){return A!=null&&H in ia(A)}function ete(A,H,ie){return A>=$r(H,ie)&&A=120&&Ii.length>=120)?new id(Ft&&Ii):e}Ii=A[0];var Bi=-1,Zi=jt[0];e:for(;++Bi-1;)jt!==A&&Lh.call(jt,Xt,1),Lh.call(A,Xt,1);return A}function AA(A,H){for(var ie=A?H.length:0,De=ie-1;ie--;){var He=H[ie];if(ie==De||He!==ct){var ct=He;Ec(He)?Lh.call(A,He,1):XP(A,He)}}return A}function YP(A,H){return A+zh(dA()*(H-A+1))}function ute(A,H,ie,De){for(var He=-1,ct=ur(qh((H-A)/(ie||1)),0),Ft=hi(ct);ct--;)Ft[De?ct:++He]=A,A+=ie;return Ft}function JP(A,H){var ie="";if(!A||H<1||H>L)return ie;do H%2&&(ie+=A),H=zh(H/2),H&&(A+=A);while(H);return ie}function uo(A,H){return uT(s7(A,H,ul),A+"")}function fte(A){return hA(m0(A))}function hte(A,H){var ie=m0(A);return og(ie,nd(H,0,ie.length))}function Xu(A,H,ie,De){if(!Fa(A))return A;H=hp(H,A);for(var He=-1,ct=H.length,Ft=ct-1,jt=A;jt!=null&&++HeHe?0:He+H),ie=ie>He?He:ie,ie<0&&(ie+=He),He=H>ie?0:ie-H>>>0,H>>>=0;for(var ct=hi(He);++De>>1,Ft=A[ct];Ft!==null&&!kl(Ft)&&(ie?Ft<=H:Ft=t){var Di=H?null:Ete(A);if(Di)return Ih(Di);Ft=!1,He=Hu,Xt=new id}else Xt=H?[]:jt;e:for(;++De=De?A:Xl(A,H,ie)}var VA=ree||function(A){return vr.clearTimeout(A)};function qA(A,H){if(H)return A.slice();var ie=A.length,De=lA?lA(ie):new A.constructor(ie);return A.copy(De),De}function iT(A){var H=new A.constructor(A.byteLength);return new Rh(H).set(new Rh(A)),H}function xte(A,H){var ie=H?iT(A.buffer):A.buffer;return new A.constructor(ie,A.byteOffset,A.byteLength)}function bte(A){var H=new A.constructor(A.source,nn.exec(A));return H.lastIndex=A.lastIndex,H}function yte(A){return Wu?ia(Wu.call(A)):{}}function zA(A,H){var ie=H?iT(A.buffer):A.buffer;return new A.constructor(ie,A.byteOffset,A.length)}function HA(A,H){if(A!==H){var ie=A!==e,De=A===null,He=A===A,ct=kl(A),Ft=H!==e,jt=H===null,Xt=H===H,Di=kl(H);if(!jt&&!Di&&!ct&&A>H||ct&&Ft&&Xt&&!jt&&!Di||De&&Ft&&Xt||!ie&&Xt||!He)return 1;if(!De&&!ct&&!Di&&A=jt)return Xt;var Di=ie[De];return Xt*(Di=="desc"?-1:1)}}return A.index-H.index}function GA(A,H,ie,De){for(var He=-1,ct=A.length,Ft=ie.length,jt=-1,Xt=H.length,Di=ur(ct-Ft,0),Ii=hi(Xt+Di),Bi=!De;++jt1?ie[He-1]:e,Ft=He>2?ie[2]:e;for(ct=A.length>3&&typeof ct=="function"?(He--,ct):e,Ft&&ol(ie[0],ie[1],Ft)&&(ct=He<3?e:ct,He=1),H=ia(H);++De-1?He[ct?H[Ft]:Ft]:e}}function YA(A){return Dc(function(H){var ie=H.length,De=ie,He=Jl.prototype.thru;for(A&&H.reverse();De--;){var ct=H[De];if(typeof ct!="function")throw new Yl(i);if(He&&!Ft&&ig(ct)=="wrapper")var Ft=new Jl([],!0)}for(De=Ft?De:ie;++De1&&Do.reverse(),Ii&&Xtjt))return!1;var Di=ct.get(A),Ii=ct.get(H);if(Di&&Ii)return Di==H&&Ii==A;var Bi=-1,Zi=!0,Cn=ie&P?new id:e;for(ct.set(A,H),ct.set(H,A);++Bi1?"& ":"")+H[De],H=H.join(ie>2?", ":" "),A.replace(_i,`{ /* [wrapped with `+H+`] */ `)}function Vte(A){return no(A)||ld(A)||!!(pA&&A&&A[pA])}function Ec(A,H){var ie=typeof A;return H=H??L,!!H&&(ie=="number"||ie!="symbol"&&Pa.test(A))&&A>-1&&A%1==0&&A0){if(++H>=de)return arguments[0]}else H=0;return A.apply(e,arguments)}}function og(A,H){var ie=-1,De=A.length,He=De-1;for(H=H===e?De:H;++ie1?A[H-1]:e;return ie=typeof ie=="function"?(A.pop(),ie):e,x7(A,ie)});function b7(A){var H=ot(A);return H.__chain__=!0,H}function Jie(A,H){return H(A),A}function ag(A,H){return H(A)}var Kie=Dc(function(A){var H=A.length,ie=H?A[0]:0,De=this.__wrapped__,He=function(ct){return qP(ct,A)};return H>1||this.__actions__.length||!(De instanceof So)||!Ec(ie)?this.thru(He):(De=De.slice(ie,+ie+(H?1:0)),De.__actions__.push({func:ag,args:[He],thisArg:e}),new Jl(De,this.__chain__).thru(function(ct){return H&&!ct.length&&ct.push(e),ct}))});function Xie(){return b7(this)}function Zie(){return new Jl(this.value(),this.__chain__)}function ene(){this.__values__===e&&(this.__values__=B7(this.value()));var A=this.__index__>=this.__values__.length,H=A?e:this.__values__[this.__index__++];return{done:A,value:H}}function tne(){return this}function ine(A){for(var H,ie=this;ie instanceof jh;){var De=f7(ie);De.__index__=0,De.__values__=e,H?He.__wrapped__=De:H=De;var He=De;ie=ie.__wrapped__}return He.__wrapped__=A,H}function nne(){var A=this.__wrapped__;if(A instanceof So){var H=A;return this.__actions__.length&&(H=new So(this)),H=H.reverse(),H.__actions__.push({func:ag,args:[fT],thisArg:e}),new Jl(H,this.__chain__)}return this.thru(fT)}function one(){return NA(this.__wrapped__,this.__actions__)}var ane=Kh(function(A,H,ie){Xo.call(A,ie)?++A[ie]:Tc(A,ie,1)});function rne(A,H,ie){var De=no(A)?JO:Jee;return ie&&ol(A,H,ie)&&(H=e),De(A,kn(H,3))}function lne(A,H){var ie=no(A)?sp:xA;return ie(A,kn(H,3))}var sne=QA(h7),cne=QA(g7);function pne(A,H){return Rr(rg(A,H),1)}function mne(A,H){return Rr(rg(A,H),B)}function dne(A,H,ie){return ie=ie===e?1:ao(ie),Rr(rg(A,H),ie)}function y7(A,H){var ie=no(A)?Ql:up;return ie(A,kn(H,3))}function S7(A,H){var ie=no(A)?OZ:vA;return ie(A,kn(H,3))}var une=Kh(function(A,H,ie){Xo.call(A,ie)?A[ie].push(H):Tc(A,ie,[H])});function fne(A,H,ie,De){A=ml(A)?A:m0(A),ie=ie&&!De?ao(ie):0;var He=A.length;return ie<0&&(ie=ur(He+ie,0)),mg(A)?ie<=He&&A.indexOf(H,ie)>-1:!!He&&e0(A,H,ie)>-1}var hne=uo(function(A,H,ie){var De=-1,He=typeof H=="function",ct=ml(A)?hi(A.length):[];return up(A,function(Ft){ct[++De]=He?Ol(H,Ft,ie):Ju(Ft,H,ie)}),ct}),gne=Kh(function(A,H,ie){Tc(A,ie,H)});function rg(A,H){var ie=no(A)?Ma:TA;return ie(A,kn(H,3))}function _ne(A,H,ie,De){return A==null?[]:(no(H)||(H=H==null?[]:[H]),ie=De?e:ie,no(ie)||(ie=ie==null?[]:[ie]),IA(A,H,ie))}var Cne=Kh(function(A,H,ie){A[ie?0:1].push(H)},function(){return[[],[]]});function vne(A,H,ie){var De=no(A)?MP:eA,He=arguments.length<3;return De(A,kn(H,4),ie,He,up)}function xne(A,H,ie){var De=no(A)?AZ:eA,He=arguments.length<3;return De(A,kn(H,4),ie,He,vA)}function bne(A,H){var ie=no(A)?sp:xA;return ie(A,cg(kn(H,3)))}function yne(A){var H=no(A)?hA:fte;return H(A)}function Sne(A,H,ie){(ie?ol(A,H,ie):H===e)?H=1:H=ao(H);var De=no(A)?$ee:hte;return De(A,H)}function wne(A){var H=no(A)?Uee:_te;return H(A)}function Pne(A){if(A==null)return 0;if(ml(A))return mg(A)?i0(A):A.length;var H=Ur(A);return H==rt||H==Jt?A.size:UP(A).length}function Tne(A,H,ie){var De=no(A)?DP:Cte;return ie&&ol(A,H,ie)&&(H=e),De(A,kn(H,3))}var Mne=uo(function(A,H){if(A==null)return[];var ie=H.length;return ie>1&&ol(A,H[0],H[1])?H=[]:ie>2&&ol(H[0],H[1],H[2])&&(H=[H[0]]),IA(A,Rr(H,1),[])}),lg=lee||function(){return vr.Date.now()};function Dne(A,H){if(typeof H!="function")throw new Yl(i);return A=ao(A),function(){if(--A<1)return H.apply(this,arguments)}}function w7(A,H,ie){return H=ie?e:H,H=A&&H==null?A.length:H,Mc(A,re,e,e,e,e,H)}function P7(A,H){var ie;if(typeof H!="function")throw new Yl(i);return A=ao(A),function(){return--A>0&&(ie=H.apply(this,arguments)),A<=1&&(H=e),ie}}var gT=uo(function(A,H,ie){var De=S;if(ie.length){var He=pp(ie,c0(gT));De|=U}return Mc(A,De,H,ie,He)}),T7=uo(function(A,H,ie){var De=S|M;if(ie.length){var He=pp(ie,c0(T7));De|=U}return Mc(H,De,A,ie,He)});function M7(A,H,ie){H=ie?e:H;var De=Mc(A,k,e,e,e,e,e,H);return De.placeholder=M7.placeholder,De}function D7(A,H,ie){H=ie?e:H;var De=Mc(A,z,e,e,e,e,e,H);return De.placeholder=D7.placeholder,De}function E7(A,H,ie){var De,He,ct,Ft,jt,Xt,Di=0,Ii=!1,Bi=!1,Zi=!0;if(typeof A!="function")throw new Yl(i);H=es(H)||0,Fa(ie)&&(Ii=!!ie.leading,Bi="maxWait"in ie,ct=Bi?ur(es(ie.maxWait)||0,H):ct,Zi="trailing"in ie?!!ie.trailing:Zi);function Cn(Ua){var Ms=De,Ac=He;return De=He=e,Di=Ua,Ft=A.apply(Ac,Ms),Ft}function Bn(Ua){return Di=Ua,jt=tf(xo,H),Ii?Cn(Ua):Ft}function so(Ua){var Ms=Ua-Xt,Ac=Ua-Di,Q7=H-Ms;return Bi?$r(Q7,ct-Ac):Q7}function Rn(Ua){var Ms=Ua-Xt,Ac=Ua-Di;return Xt===e||Ms>=H||Ms<0||Bi&&Ac>=ct}function xo(){var Ua=lg();if(Rn(Ua))return Do(Ua);jt=tf(xo,so(Ua))}function Do(Ua){return jt=e,Zi&&De?Cn(Ua):(De=He=e,Ft)}function Bl(){jt!==e&&VA(jt),Di=0,De=Xt=He=jt=e}function al(){return jt===e?Ft:Do(lg())}function Rl(){var Ua=lg(),Ms=Rn(Ua);if(De=arguments,He=this,Xt=Ua,Ms){if(jt===e)return Bn(Xt);if(Bi)return VA(jt),jt=tf(xo,H),Cn(Xt)}return jt===e&&(jt=tf(xo,H)),Ft}return Rl.cancel=Bl,Rl.flush=al,Rl}var Ene=uo(function(A,H){return CA(A,1,H)}),Ine=uo(function(A,H,ie){return CA(A,es(H)||0,ie)});function One(A){return Mc(A,ae)}function sg(A,H){if(typeof A!="function"||H!=null&&typeof H!="function")throw new Yl(i);var ie=function(){var De=arguments,He=H?H.apply(this,De):De[0],ct=ie.cache;if(ct.has(He))return ct.get(He);var Ft=A.apply(this,De);return ie.cache=ct.set(He,Ft)||ct,Ft};return ie.cache=new(sg.Cache||Pc),ie}sg.Cache=Pc;function cg(A){if(typeof A!="function")throw new Yl(i);return function(){var H=arguments;switch(H.length){case 0:return!A.call(this);case 1:return!A.call(this,H[0]);case 2:return!A.call(this,H[0],H[1]);case 3:return!A.call(this,H[0],H[1],H[2])}return!A.apply(this,H)}}function Ane(A){return P7(2,A)}var Fne=vte(function(A,H){H=H.length==1&&no(H[0])?Ma(H[0],Al(kn())):Ma(Rr(H,1),Al(kn()));var ie=H.length;return uo(function(De){for(var He=-1,ct=$r(De.length,ie);++He=H}),ld=SA((function(){return arguments})())?SA:function(A){return Ra(A)&&Xo.call(A,"callee")&&!cA.call(A,"callee")},no=hi.isArray,Qne=jO?Al(jO):ite;function ml(A){return A!=null&&pg(A.length)&&!Ic(A)}function $a(A){return Ra(A)&&ml(A)}function Yne(A){return A===!0||A===!1||Ra(A)&&nl(A)==K}var _p=cee||DT,Jne=$O?Al($O):nte;function Kne(A){return Ra(A)&&A.nodeType===1&&!nf(A)}function Xne(A){if(A==null)return!0;if(ml(A)&&(no(A)||typeof A=="string"||typeof A.splice=="function"||_p(A)||p0(A)||ld(A)))return!A.length;var H=Ur(A);if(H==rt||H==Jt)return!A.size;if(ef(A))return!UP(A).length;for(var ie in A)if(Xo.call(A,ie))return!1;return!0}function Zne(A,H){return Ku(A,H)}function eoe(A,H,ie){ie=typeof ie=="function"?ie:e;var De=ie?ie(A,H):e;return De===e?Ku(A,H,e,ie):!!De}function CT(A){if(!Ra(A))return!1;var H=nl(A);return H==Ve||H==Ce||typeof A.message=="string"&&typeof A.name=="string"&&!nf(A)}function toe(A){return typeof A=="number"&&mA(A)}function Ic(A){if(!Fa(A))return!1;var H=nl(A);return H==mt||H==Ye||H==Oe||H==Bt}function O7(A){return typeof A=="number"&&A==ao(A)}function pg(A){return typeof A=="number"&&A>-1&&A%1==0&&A<=L}function Fa(A){var H=typeof A;return A!=null&&(H=="object"||H=="function")}function Ra(A){return A!=null&&typeof A=="object"}var A7=UO?Al(UO):ate;function ioe(A,H){return A===H||$P(A,H,sT(H))}function noe(A,H,ie){return ie=typeof ie=="function"?ie:e,$P(A,H,sT(H),ie)}function ooe(A){return F7(A)&&A!=+A}function aoe(A){if(Hte(A))throw new Zn(n);return wA(A)}function roe(A){return A===null}function loe(A){return A==null}function F7(A){return typeof A=="number"||Ra(A)&&nl(A)==Qt}function nf(A){if(!Ra(A)||nl(A)!=Qe)return!1;var H=Nh(A);if(H===null)return!0;var ie=Xo.call(H,"constructor")&&H.constructor;return typeof ie=="function"&&ie instanceof ie&&Fh.call(ie)==nee}var vT=WO?Al(WO):rte;function soe(A){return O7(A)&&A>=-L&&A<=L}var k7=QO?Al(QO):lte;function mg(A){return typeof A=="string"||!no(A)&&Ra(A)&&nl(A)==ei}function kl(A){return typeof A=="symbol"||Ra(A)&&nl(A)==ni}var p0=YO?Al(YO):ste;function coe(A){return A===e}function poe(A){return Ra(A)&&Ur(A)==Ai}function moe(A){return Ra(A)&&nl(A)==Ni}var doe=tg(WP),uoe=tg(function(A,H){return A<=H});function B7(A){if(!A)return[];if(ml(A))return mg(A)?ws(A):pl(A);if(Gu&&A[Gu])return $Z(A[Gu]());var H=Ur(A),ie=H==rt?kP:H==Jt?Ih:m0;return ie(A)}function Oc(A){if(!A)return A===0?A:0;if(A=es(A),A===B||A===-B){var H=A<0?-1:1;return H*N}return A===A?A:0}function ao(A){var H=Oc(A),ie=H%1;return H===H?ie?H-ie:H:0}function R7(A){return A?nd(ao(A),0,$):0}function es(A){if(typeof A=="number")return A;if(kl(A))return G;if(Fa(A)){var H=typeof A.valueOf=="function"?A.valueOf():A;A=Fa(H)?H+"":H}if(typeof A!="string")return A===0?A:+A;A=tA(A);var ie=ro.test(A);return ie||Go.test(A)?DZ(A.slice(2),ie?2:8):Ro.test(A)?G:+A}function N7(A){return Qs(A,dl(A))}function foe(A){return A?nd(ao(A),-L,L):A===0?A:0}function $o(A){return A==null?"":Fl(A)}var hoe=l0(function(A,H){if(ef(H)||ml(H)){Qs(H,xr(H),A);return}for(var ie in H)Xo.call(H,ie)&&Qu(A,ie,H[ie])}),L7=l0(function(A,H){Qs(H,dl(H),A)}),dg=l0(function(A,H,ie,De){Qs(H,dl(H),A,De)}),goe=l0(function(A,H,ie,De){Qs(H,xr(H),A,De)}),_oe=Dc(qP);function Coe(A,H){var ie=r0(A);return H==null?ie:gA(ie,H)}var voe=uo(function(A,H){A=ia(A);var ie=-1,De=H.length,He=De>2?H[2]:e;for(He&&ol(H[0],H[1],He)&&(De=1);++ie1),ct}),Qs(A,rT(A),ie),De&&(ie=Kl(ie,_|C|x,Ite));for(var He=H.length;He--;)XP(ie,H[He]);return ie});function Noe(A,H){return q7(A,cg(kn(H)))}var Loe=Dc(function(A,H){return A==null?{}:mte(A,H)});function q7(A,H){if(A==null)return{};var ie=Ma(rT(A),function(De){return[De]});return H=kn(H),OA(A,ie,function(De,He){return H(De,He[0])})}function Voe(A,H,ie){H=hp(H,A);var De=-1,He=H.length;for(He||(He=1,A=e);++DeH){var De=A;A=H,H=De}if(ie||A%1||H%1){var He=dA();return $r(A+He*(H-A+MZ("1e-"+((He+"").length-1))),H)}return YP(A,H)}var Joe=s0(function(A,H,ie){return H=H.toLowerCase(),A+(ie?G7(H):H)});function G7(A){return yT($o(A).toLowerCase())}function j7(A){return A=$o(A),A&&A.replace(Ya,qZ).replace(Zd,"")}function Koe(A,H,ie){A=$o(A),H=Fl(H);var De=A.length;ie=ie===e?De:nd(ao(ie),0,De);var He=ie;return ie-=H.length,ie>=0&&A.slice(ie,He)==H}function Xoe(A){return A=$o(A),A&&Hn.test(A)?A.replace(Aa,zZ):A}function Zoe(A){return A=$o(A),A&&Gn.test(A)?A.replace(tl,"\\$&"):A}var eae=s0(function(A,H,ie){return A+(ie?"-":"")+H.toLowerCase()}),tae=s0(function(A,H,ie){return A+(ie?" ":"")+H.toLowerCase()}),iae=WA("toLowerCase");function nae(A,H,ie){A=$o(A),H=ao(H);var De=H?i0(A):0;if(!H||De>=H)return A;var He=(H-De)/2;return eg(zh(He),ie)+A+eg(qh(He),ie)}function oae(A,H,ie){A=$o(A),H=ao(H);var De=H?i0(A):0;return H&&De>>0,ie?(A=$o(A),A&&(typeof H=="string"||H!=null&&!vT(H))&&(H=Fl(H),!H&&t0(A))?gp(ws(A),0,ie):A.split(H,ie)):[]}var mae=s0(function(A,H,ie){return A+(ie?" ":"")+yT(H)});function dae(A,H,ie){return A=$o(A),ie=ie==null?0:nd(ao(ie),0,A.length),H=Fl(H),A.slice(ie,ie+H.length)==H}function uae(A,H,ie){var De=ot.templateSettings;ie&&ol(A,H,ie)&&(H=e),A=$o(A),H=dg({},H,De,e7);var He=dg({},H.imports,De.imports,e7),ct=xr(He),Ft=FP(He,ct),jt,Xt,Di=0,Ii=H.interpolate||pr,Bi="__p += '",Zi=BP((H.escape||pr).source+"|"+Ii.source+"|"+(Ii===Pn?yn:pr).source+"|"+(H.evaluate||pr).source+"|$","g"),Cn="//# sourceURL="+(Xo.call(H,"sourceURL")?(H.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++yZ+"]")+` `;A.replace(Zi,function(Rn,xo,Do,Bl,al,Rl){return Do||(Do=Bl),Bi+=A.slice(Di,Rl).replace(ja,HZ),xo&&(jt=!0,Bi+=`' + @@ -47,7 +47,7 @@ use chrome, FireFox or Internet Explorer 11`)}var d=e("safe-buffer"),u=e("random `,t.NAME_START_CHAR=":A-Z_a-z\xC0-\xD6\xD8-\xF6\xF8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\u{10000}-\u{EFFFF}",t.NAME_CHAR="-"+t.NAME_START_CHAR+".0-9\xB7\u0300-\u036F\u203F-\u2040",t.CHAR_RE=new RegExp("^["+t.CHAR+"]$","u"),t.S_RE=new RegExp("^["+t.S+"]+$","u"),t.NAME_START_CHAR_RE=new RegExp("^["+t.NAME_START_CHAR+"]$","u"),t.NAME_CHAR_RE=new RegExp("^["+t.NAME_CHAR+"]$","u"),t.NAME_RE=new RegExp("^["+t.NAME_START_CHAR+"]["+t.NAME_CHAR+"]*$","u"),t.NMTOKEN_RE=new RegExp("^["+t.NAME_CHAR+"]+$","u");function n(i){return i>=65&&i<=90||i>=97&&i<=122||i===58||i===95||i===8204||i===8205||i>=192&&i<=214||i>=216&&i<=246||i>=248&&i<=767||i>=880&&i<=893||i>=895&&i<=8191||i>=8304&&i<=8591||i>=11264&&i<=12271||i>=12289&&i<=55295||i>=63744&&i<=64975||i>=65008&&i<=65533||i>=65536&&i<=983039}t.S_LIST=[32,10,13,9],t.isChar=function(i){return i>=32&&i<=55295||i===10||i===13||i===9||i>=57344&&i<=65533||i>=65536&&i<=1114111},t.isS=function(i){return i===32||i===10||i===13||i===9},t.isNameStartChar=n,t.isNameChar=function(i){return n(i)||i>=48&&i<=57||i===45||i===46||i===183||i>=768&&i<=879||i>=8255&&i<=8256}},{}],544:[function(e,o,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CHAR="-\uD7FF\uE000-\uFFFD\u{10000}-\u{10FFFF}",t.RESTRICTED_CHAR="-\b\v\f-\x7F-\x84\x86-\x9F",t.S=` \r `,t.NAME_START_CHAR=":A-Z_a-z\xC0-\xD6\xD8-\xF6\xF8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\u{10000}-\u{EFFFF}",t.NAME_CHAR="-"+t.NAME_START_CHAR+".0-9\xB7\u0300-\u036F\u203F-\u2040",t.CHAR_RE=new RegExp("^["+t.CHAR+"]$","u"),t.RESTRICTED_CHAR_RE=new RegExp("^["+t.RESTRICTED_CHAR+"]$","u"),t.S_RE=new RegExp("^["+t.S+"]+$","u"),t.NAME_START_CHAR_RE=new RegExp("^["+t.NAME_START_CHAR+"]$","u"),t.NAME_CHAR_RE=new RegExp("^["+t.NAME_CHAR+"]$","u"),t.NAME_RE=new RegExp("^["+t.NAME_START_CHAR+"]["+t.NAME_CHAR+"]*$","u"),t.NMTOKEN_RE=new RegExp("^["+t.NAME_CHAR+"]+$","u");function n(i){return i>=65&&i<=90||i>=97&&i<=122||i===58||i===95||i===8204||i===8205||i>=192&&i<=214||i>=216&&i<=246||i>=248&&i<=767||i>=880&&i<=893||i>=895&&i<=8191||i>=8304&&i<=8591||i>=11264&&i<=12271||i>=12289&&i<=55295||i>=63744&&i<=64975||i>=65008&&i<=65533||i>=65536&&i<=983039}t.S_LIST=[32,10,13,9],t.isChar=function(i){return i>=1&&i<=55295||i>=57344&&i<=65533||i>=65536&&i<=1114111},t.isRestrictedChar=function(i){return i>=1&&i<=8||i===11||i===12||i>=14&&i<=31||i>=127&&i<=132||i>=134&&i<=159},t.isCharAndNotRestricted=function(i){return i===9||i===10||i===13||i>31&&i<127||i===133||i>159&&i<=55295||i>=57344&&i<=65533||i>=65536&&i<=1114111},t.isS=function(i){return i===32||i===10||i===13||i===9},t.isNameStartChar=n,t.isNameChar=function(i){return n(i)||i>=48&&i<=57||i===45||i===46||i===183||i>=768&&i<=879||i>=8255&&i<=8256}},{}],545:[function(e,o,t){"use strict";function n(i){return i>=65&&i<=90||i===95||i>=97&&i<=122||i>=192&&i<=214||i>=216&&i<=246||i>=248&&i<=767||i>=880&&i<=893||i>=895&&i<=8191||i>=8204&&i<=8205||i>=8304&&i<=8591||i>=11264&&i<=12271||i>=12289&&i<=55295||i>=63744&&i<=64975||i>=65008&&i<=65533||i>=65536&&i<=983039}Object.defineProperty(t,"__esModule",{value:!0}),t.NC_NAME_START_CHAR="A-Z_a-z\xC0-\xD6\xD8-\xF6\xF8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\u{10000}-\u{EFFFF}",t.NC_NAME_CHAR="-"+t.NC_NAME_START_CHAR+".0-9\xB7\u0300-\u036F\u203F-\u2040",t.NC_NAME_START_CHAR_RE=new RegExp("^["+t.NC_NAME_START_CHAR+"]$","u"),t.NC_NAME_CHAR_RE=new RegExp("^["+t.NC_NAME_CHAR+"]$","u"),t.NC_NAME_RE=new RegExp("^["+t.NC_NAME_START_CHAR+"]["+t.NC_NAME_CHAR+"]*$","u"),t.isNCNameStartChar=n,t.isNCNameChar=function(i){return n(i)||i===45||i===46||i>=48&&i<=57||i===183||i>=768&&i<=879||i>=8255&&i<=8256}},{}]},{},[15])(15)})});function Lk(e){return new Fo(3e3,!1)}function lre(){return new Fo(3100,!1)}function sre(){return new Fo(3101,!1)}function cre(e){return new Fo(3001,!1)}function pre(e){return new Fo(3003,!1)}function mre(e){return new Fo(3004,!1)}function qk(e,o){return new Fo(3005,!1)}function zk(){return new Fo(3006,!1)}function Hk(){return new Fo(3007,!1)}function Gk(e,o){return new Fo(3008,!1)}function jk(e){return new Fo(3002,!1)}function $k(e,o,t,n,i){return new Fo(3010,!1)}function Uk(){return new Fo(3011,!1)}function Wk(){return new Fo(3012,!1)}function Qk(){return new Fo(3200,!1)}function Yk(){return new Fo(3202,!1)}function Jk(){return new Fo(3013,!1)}function Kk(e){return new Fo(3014,!1)}function Xk(e){return new Fo(3015,!1)}function Zk(e){return new Fo(3016,!1)}function e8(e,o){return new Fo(3404,!1)}function dre(e){return new Fo(3502,!1)}function t8(e){return new Fo(3503,!1)}function i8(){return new Fo(3300,!1)}function n8(e){return new Fo(3504,!1)}function o8(e){return new Fo(3301,!1)}function a8(e,o){return new Fo(3302,!1)}function r8(e){return new Fo(3303,!1)}function l8(e,o){return new Fo(3400,!1)}function s8(e){return new Fo(3401,!1)}function c8(e){return new Fo(3402,!1)}function p8(e,o){return new Fo(3505,!1)}function Nc(e){switch(e.length){case 0:return new ud;case 1:return e[0];default:return new Mg(e)}}function qT(e,o,t=new Map,n=new Map){let i=[],s=[],d=-1,u=null;if(o.forEach(f=>{let _=f.get("offset"),C=_==d,x=C&&u||new Map;f.forEach((y,P)=>{let S=P,M=y;if(P!=="offset")switch(S=e.normalizePropertyName(S,i),M){case cf:M=t.get(P);break;case Is:M=n.get(P);break;default:M=e.normalizeStyleValue(P,S,M,i);break}x.set(S,M)}),C||s.push(x),u=x,d=_}),i.length)throw dre(i);return s}function Zg(e,o,t,n){switch(o){case"start":e.onStart(()=>n(t&&NT(t,"start",e)));break;case"done":e.onDone(()=>n(t&&NT(t,"done",e)));break;case"destroy":e.onDestroy(()=>n(t&&NT(t,"destroy",e)));break}}function NT(e,o,t){let n=t.totalTime,i=!!t.disabled,s=e_(e.element,e.triggerName,e.fromState,e.toState,o||e.phaseName,n??e.totalTime,i),d=e._data;return d!=null&&(s._data=d),s}function e_(e,o,t,n,i="",s=0,d){return{element:e,triggerName:o,fromState:t,toState:n,phaseName:i,totalTime:s,disabled:!!d}}function bl(e,o,t){let n=e.get(o);return n||e.set(o,n=t),n}function zT(e){let o=e.indexOf(":"),t=e.substring(1,o),n=e.slice(o+1);return[t,n]}var ure=typeof document>"u"?null:document.documentElement;function t_(e){let o=e.parentNode||e.host||null;return o===ure?null:o}function fre(e){return e.substring(1,6)=="ebkit"}var fd=null,Vk=!1;function m8(e){fd||(fd=hre()||{},Vk=fd.style?"WebkitAppearance"in fd.style:!1);let o=!0;return fd.style&&!fre(e)&&(o=e in fd.style,!o&&Vk&&(o="Webkit"+e.charAt(0).toUpperCase()+e.slice(1)in fd.style)),o}function hre(){return typeof document<"u"?document.body:null}function HT(e,o){for(;o;){if(o===e)return!0;o=t_(o)}return!1}function GT(e,o,t){if(t)return Array.from(e.querySelectorAll(o));let n=e.querySelector(o);return n?[n]:[]}var gre=1e3,jT="{{",_re="}}",$T="ng-enter",i_="ng-leave",df="ng-trigger",uf=".ng-trigger",UT="ng-animating",n_=".ng-animating";function lc(e){if(typeof e=="number")return e;let o=e.match(/^(-?[\.\d]+)(m?s)/);return!o||o.length<2?0:LT(parseFloat(o[1]),o[2])}function LT(e,o){switch(o){case"s":return e*gre;default:return e}}function ff(e,o,t){return e.hasOwnProperty("duration")?e:vre(e,o,t)}var Cre=/^(-?[\.\d]+)(m?s)(?:\s+(-?[\.\d]+)(m?s))?(?:\s+([-a-z]+(?:\(.+?\))?))?$/i;function vre(e,o,t){let n,i=0,s="";if(typeof e=="string"){let d=e.match(Cre);if(d===null)return o.push(Lk(e)),{duration:0,delay:0,easing:""};n=LT(parseFloat(d[1]),d[2]);let u=d[3];u!=null&&(i=LT(parseFloat(u),d[4]));let f=d[5];f&&(s=f)}else n=e;if(!t){let d=!1,u=o.length;n<0&&(o.push(lre()),d=!0),i<0&&(o.push(sre()),d=!0),d&&o.splice(u,0,Lk(e))}return{duration:n,delay:i,easing:s}}function d8(e){return e.length?e[0]instanceof Map?e:e.map(o=>new Map(Object.entries(o))):[]}function Fs(e,o,t){o.forEach((n,i)=>{let s=o_(i);t&&!t.has(i)&&t.set(i,e.style[s]),e.style[s]=n})}function Op(e,o){o.forEach((t,n)=>{let i=o_(n);e.style[i]=""})}function O0(e){return Array.isArray(e)?e.length==1?e[0]:NF(e):e}function u8(e,o,t){let n=o.params||{},i=WT(e);i.length&&i.forEach(s=>{n.hasOwnProperty(s)||t.push(cre(s))})}var VT=new RegExp(`${jT}\\s*(.+?)\\s*${_re}`,"g");function WT(e){let o=[];if(typeof e=="string"){let t;for(;t=VT.exec(e);)o.push(t[1]);VT.lastIndex=0}return o}function A0(e,o,t){let n=`${e}`,i=n.replace(VT,(s,d)=>{let u=o[d];return u==null&&(t.push(pre(d)),u=""),u.toString()});return i==n?e:i}var xre=/-+([a-z0-9])/g;function o_(e){return e.replace(xre,(...o)=>o[1].toUpperCase())}function f8(e,o){return e===0||o===0}function h8(e,o,t){if(t.size&&o.length){let n=o[0],i=[];if(t.forEach((s,d)=>{n.has(d)||i.push(d),n.set(d,s)}),i.length)for(let s=1;sd.set(u,a_(e,u)))}}return o}function yl(e,o,t){switch(o.type){case wo.Trigger:return e.visitTrigger(o,t);case wo.State:return e.visitState(o,t);case wo.Transition:return e.visitTransition(o,t);case wo.Sequence:return e.visitSequence(o,t);case wo.Group:return e.visitGroup(o,t);case wo.Animate:return e.visitAnimate(o,t);case wo.Keyframes:return e.visitKeyframes(o,t);case wo.Style:return e.visitStyle(o,t);case wo.Reference:return e.visitReference(o,t);case wo.AnimateChild:return e.visitAnimateChild(o,t);case wo.AnimateRef:return e.visitAnimateRef(o,t);case wo.Query:return e.visitQuery(o,t);case wo.Stagger:return e.visitStagger(o,t);default:throw mre(o.type)}}function a_(e,o){return window.getComputedStyle(e)[o]}var p4=(()=>{class e{validateStyleProperty(t){return m8(t)}containsElement(t,n){return HT(t,n)}getParentElement(t){return t_(t)}query(t,n,i){return GT(t,n,i)}computeStyle(t,n,i){return i||""}animate(t,n,i,s,d,u=[],f){return new ud(i,s)}static \u0275fac=function(n){return new(n||e)};static \u0275prov=Re({token:e,factory:e.\u0275fac})}return e})(),gd=class{static NOOP=new p4},_d=class{};var bre=new Set(["width","height","minWidth","minHeight","maxWidth","maxHeight","left","top","bottom","right","fontSize","outlineWidth","outlineOffset","paddingTop","paddingLeft","paddingBottom","paddingRight","marginTop","marginLeft","marginBottom","marginRight","borderRadius","borderWidth","borderTopWidth","borderLeftWidth","borderRightWidth","borderBottomWidth","textIndent","perspective"]),p_=class extends _d{normalizePropertyName(o,t){return o_(o)}normalizeStyleValue(o,t,n,i){let s="",d=n.toString().trim();if(bre.has(t)&&n!==0&&n!=="0")if(typeof n=="number")s="px";else{let u=n.match(/^[+-]?[\d\.]+([a-z]*)$/);u&&u[1].length==0&&i.push(qk(o,n))}return d+s}};var m_="*";function yre(e,o){let t=[];return typeof e=="string"?e.split(/\s*,\s*/).forEach(n=>Sre(n,t,o)):t.push(e),t}function Sre(e,o,t){if(e[0]==":"){let f=wre(e,t);if(typeof f=="function"){o.push(f);return}e=f}let n=e.match(/^(\*|[-\w]+)\s*()\s*(\*|[-\w]+)$/);if(n==null||n.length<4)return t.push(Xk(e)),o;let i=n[1],s=n[2],d=n[3];o.push(g8(i,d));let u=i==m_&&d==m_;s[0]=="<"&&!u&&o.push(g8(d,i))}function wre(e,o){switch(e){case":enter":return"void => *";case":leave":return"* => void";case":increment":return(t,n)=>parseFloat(n)>parseFloat(t);case":decrement":return(t,n)=>parseFloat(n) *"}}var r_=new Set(["true","1"]),l_=new Set(["false","0"]);function g8(e,o){let t=r_.has(e)||l_.has(e),n=r_.has(o)||l_.has(o);return(i,s)=>{let d=e==m_||e==i,u=o==m_||o==s;return!d&&t&&typeof i=="boolean"&&(d=i?r_.has(e):l_.has(e)),!u&&n&&typeof s=="boolean"&&(u=s?r_.has(o):l_.has(o)),d&&u}}var T8=":self",Pre=new RegExp(`s*${T8}s*,?`,"g");function M8(e,o,t,n){return new ZT(e).build(o,t,n)}var _8="",ZT=class{_driver;constructor(o){this._driver=o}build(o,t,n){let i=new e4(t);return this._resetContextStyleTimingState(i),yl(this,O0(o),i)}_resetContextStyleTimingState(o){o.currentQuerySelector=_8,o.collectedStyles=new Map,o.collectedStyles.set(_8,new Map),o.currentTime=0}visitTrigger(o,t){let n=t.queryCount=0,i=t.depCount=0,s=[],d=[];return o.name.charAt(0)=="@"&&t.errors.push(zk()),o.definitions.forEach(u=>{if(this._resetContextStyleTimingState(t),u.type==wo.State){let f=u,_=f.name;_.toString().split(/\s*,\s*/).forEach(C=>{f.name=C,s.push(this.visitState(f,t))}),f.name=_}else if(u.type==wo.Transition){let f=this.visitTransition(u,t);n+=f.queryCount,i+=f.depCount,d.push(f)}else t.errors.push(Hk())}),{type:wo.Trigger,name:o.name,states:s,transitions:d,queryCount:n,depCount:i,options:null}}visitState(o,t){let n=this.visitStyle(o.styles,t),i=o.options&&o.options.params||null;if(n.containsDynamicStyles){let s=new Set,d=i||{};n.styles.forEach(u=>{u instanceof Map&&u.forEach(f=>{WT(f).forEach(_=>{d.hasOwnProperty(_)||s.add(_)})})}),s.size&&t.errors.push(Gk(o.name,[...s.values()]))}return{type:wo.State,name:o.name,style:n,options:i?{params:i}:null}}visitTransition(o,t){t.queryCount=0,t.depCount=0;let n=yl(this,O0(o.animation),t),i=yre(o.expr,t.errors);return{type:wo.Transition,matchers:i,animation:n,queryCount:t.queryCount,depCount:t.depCount,options:hd(o.options)}}visitSequence(o,t){return{type:wo.Sequence,steps:o.steps.map(n=>yl(this,n,t)),options:hd(o.options)}}visitGroup(o,t){let n=t.currentTime,i=0,s=o.steps.map(d=>{t.currentTime=n;let u=yl(this,d,t);return i=Math.max(i,t.currentTime),u});return t.currentTime=i,{type:wo.Group,steps:s,options:hd(o.options)}}visitAnimate(o,t){let n=Ere(o.timings,t.errors);t.currentAnimateTimings=n;let i,s=o.styles?o.styles:Lo({});if(s.type==wo.Keyframes)i=this.visitKeyframes(s,t);else{let d=o.styles,u=!1;if(!d){u=!0;let _={};n.easing&&(_.easing=n.easing),d=Lo(_)}t.currentTime+=n.duration+n.delay;let f=this.visitStyle(d,t);f.isEmptyStep=u,i=f}return t.currentAnimateTimings=null,{type:wo.Animate,timings:n,style:i,options:null}}visitStyle(o,t){let n=this._makeStyleAst(o,t);return this._validateStyleAst(n,t),n}_makeStyleAst(o,t){let n=[],i=Array.isArray(o.styles)?o.styles:[o.styles];for(let u of i)typeof u=="string"?u===Is?n.push(u):t.errors.push(jk(u)):n.push(new Map(Object.entries(u)));let s=!1,d=null;return n.forEach(u=>{if(u instanceof Map&&(u.has("easing")&&(d=u.get("easing"),u.delete("easing")),!s)){for(let f of u.values())if(f.toString().indexOf(jT)>=0){s=!0;break}}}),{type:wo.Style,styles:n,easing:d,offset:o.offset,containsDynamicStyles:s,options:null}}_validateStyleAst(o,t){let n=t.currentAnimateTimings,i=t.currentTime,s=t.currentTime;n&&s>0&&(s-=n.duration+n.delay),o.styles.forEach(d=>{typeof d!="string"&&d.forEach((u,f)=>{let _=t.collectedStyles.get(t.currentQuerySelector),C=_.get(f),x=!0;C&&(s!=i&&s>=C.startTime&&i<=C.endTime&&(t.errors.push($k(f,C.startTime,C.endTime,s,i)),x=!1),s=C.startTime),x&&_.set(f,{startTime:s,endTime:i}),t.options&&u8(u,t.options,t.errors)})})}visitKeyframes(o,t){let n={type:wo.Keyframes,styles:[],options:null};if(!t.currentAnimateTimings)return t.errors.push(Uk()),n;let i=1,s=0,d=[],u=!1,f=!1,_=0,C=o.steps.map(k=>{let z=this._makeStyleAst(k,t),U=z.offset!=null?z.offset:Dre(z.styles),J=0;return U!=null&&(s++,J=z.offset=U),f=f||J<0||J>1,u=u||J<_,_=J,d.push(J),z});f&&t.errors.push(Wk()),u&&t.errors.push(Qk());let x=o.steps.length,y=0;s>0&&s{let U=y>0?z==P?1:y*z:d[z],J=U*D;t.currentTime=S+M.delay+J,M.duration=J,this._validateStyleAst(k,t),k.offset=U,n.styles.push(k)}),n}visitReference(o,t){return{type:wo.Reference,animation:yl(this,O0(o.animation),t),options:hd(o.options)}}visitAnimateChild(o,t){return t.depCount++,{type:wo.AnimateChild,options:hd(o.options)}}visitAnimateRef(o,t){return{type:wo.AnimateRef,animation:this.visitReference(o.animation,t),options:hd(o.options)}}visitQuery(o,t){let n=t.currentQuerySelector,i=o.options||{};t.queryCount++,t.currentQuery=o;let[s,d]=Tre(o.selector);t.currentQuerySelector=n.length?n+" "+s:s,bl(t.collectedStyles,t.currentQuerySelector,new Map);let u=yl(this,O0(o.animation),t);return t.currentQuery=null,t.currentQuerySelector=n,{type:wo.Query,selector:s,limit:i.limit||0,optional:!!i.optional,includeSelf:d,animation:u,originalSelector:o.selector,options:hd(o.options)}}visitStagger(o,t){t.currentQuery||t.errors.push(Jk());let n=o.timings==="full"?{duration:0,delay:0,easing:"full"}:ff(o.timings,t.errors,!0);return{type:wo.Stagger,animation:yl(this,O0(o.animation),t),timings:n,options:null}}};function Tre(e){let o=!!e.split(/\s*,\s*/).find(t=>t==T8);return o&&(e=e.replace(Pre,"")),e=e.replace(/@\*/g,uf).replace(/@\w+/g,t=>uf+"-"+t.slice(1)).replace(/:animating/g,n_),[e,o]}function Mre(e){return e?at({},e):null}var e4=class{errors;queryCount=0;depCount=0;currentTransition=null;currentQuery=null;currentQuerySelector=null;currentAnimateTimings=null;currentTime=0;collectedStyles=new Map;options=null;unsupportedCSSPropertiesFound=new Set;constructor(o){this.errors=o}};function Dre(e){if(typeof e=="string")return null;let o=null;if(Array.isArray(e))e.forEach(t=>{if(t instanceof Map&&t.has("offset")){let n=t;o=parseFloat(n.get("offset")),n.delete("offset")}});else if(e instanceof Map&&e.has("offset")){let t=e;o=parseFloat(t.get("offset")),t.delete("offset")}return o}function Ere(e,o){if(e.hasOwnProperty("duration"))return e;if(typeof e=="number"){let s=ff(e,o).duration;return QT(s,0,"")}let t=e;if(t.split(/\s+/).some(s=>s.charAt(0)=="{"&&s.charAt(1)=="{")){let s=QT(0,0,"");return s.dynamic=!0,s.strValue=t,s}let i=ff(t,o);return QT(i.duration,i.delay,i.easing)}function hd(e){return e?(e=at({},e),e.params&&(e.params=Mre(e.params))):e={},e}function QT(e,o,t){return{duration:e,delay:o,easing:t}}function m4(e,o,t,n,i,s,d=null,u=!1){return{type:1,element:e,keyframes:o,preStyleProps:t,postStyleProps:n,duration:i,delay:s,totalTime:i+s,easing:d,subTimeline:u}}var gf=class{_map=new Map;get(o){return this._map.get(o)||[]}append(o,t){let n=this._map.get(o);n||this._map.set(o,n=[]),n.push(...t)}has(o){return this._map.has(o)}clear(){this._map.clear()}},Ire=1,Ore=":enter",Are=new RegExp(Ore,"g"),Fre=":leave",kre=new RegExp(Fre,"g");function D8(e,o,t,n,i,s=new Map,d=new Map,u,f,_=[]){return new t4().buildKeyframes(e,o,t,n,i,s,d,u,f,_)}var t4=class{buildKeyframes(o,t,n,i,s,d,u,f,_,C=[]){_=_||new gf;let x=new i4(o,t,_,i,s,C,[]);x.options=f;let y=f.delay?lc(f.delay):0;x.currentTimeline.delayNextStep(y),x.currentTimeline.setStyles([d],null,x.errors,f),yl(this,n,x);let P=x.timelines.filter(S=>S.containsAnimation());if(P.length&&u.size){let S;for(let M=P.length-1;M>=0;M--){let D=P[M];if(D.element===t){S=D;break}}S&&!S.allowOnlyTimelineStyles()&&S.setStyles([u],null,x.errors,f)}return P.length?P.map(S=>S.buildKeyframes()):[m4(t,[],[],[],0,y,"",!1)]}visitTrigger(o,t){}visitState(o,t){}visitTransition(o,t){}visitAnimateChild(o,t){let n=t.subInstructions.get(t.element);if(n){let i=t.createSubContext(o.options),s=t.currentTimeline.currentTime,d=this._visitSubInstructions(n,i,i.options);s!=d&&t.transformIntoNewTimeline(d)}t.previousNode=o}visitAnimateRef(o,t){let n=t.createSubContext(o.options);n.transformIntoNewTimeline(),this._applyAnimationRefDelays([o.options,o.animation.options],t,n),this.visitReference(o.animation,n),t.transformIntoNewTimeline(n.currentTimeline.currentTime),t.previousNode=o}_applyAnimationRefDelays(o,t,n){for(let i of o){let s=i?.delay;if(s){let d=typeof s=="number"?s:lc(A0(s,i?.params??{},t.errors));n.delayNextStep(d)}}}_visitSubInstructions(o,t,n){let s=t.currentTimeline.currentTime,d=n.duration!=null?lc(n.duration):null,u=n.delay!=null?lc(n.delay):null;return d!==0&&o.forEach(f=>{let _=t.appendInstructionToTimeline(f,d,u);s=Math.max(s,_.duration+_.delay)}),s}visitReference(o,t){t.updateOptions(o.options,!0),yl(this,o.animation,t),t.previousNode=o}visitSequence(o,t){let n=t.subContextCount,i=t,s=o.options;if(s&&(s.params||s.delay)&&(i=t.createSubContext(s),i.transformIntoNewTimeline(),s.delay!=null)){i.previousNode.type==wo.Style&&(i.currentTimeline.snapshotCurrentStyles(),i.previousNode=d_);let d=lc(s.delay);i.delayNextStep(d)}o.steps.length&&(o.steps.forEach(d=>yl(this,d,i)),i.currentTimeline.applyStylesToKeyframe(),i.subContextCount>n&&i.transformIntoNewTimeline()),t.previousNode=o}visitGroup(o,t){let n=[],i=t.currentTimeline.currentTime,s=o.options&&o.options.delay?lc(o.options.delay):0;o.steps.forEach(d=>{let u=t.createSubContext(o.options);s&&u.delayNextStep(s),yl(this,d,u),i=Math.max(i,u.currentTimeline.currentTime),n.push(u.currentTimeline)}),n.forEach(d=>t.currentTimeline.mergeTimelineCollectedStyles(d)),t.transformIntoNewTimeline(i),t.previousNode=o}_visitTiming(o,t){if(o.dynamic){let n=o.strValue,i=t.params?A0(n,t.params,t.errors):n;return ff(i,t.errors)}else return{duration:o.duration,delay:o.delay,easing:o.easing}}visitAnimate(o,t){let n=t.currentAnimateTimings=this._visitTiming(o.timings,t),i=t.currentTimeline;n.delay&&(t.incrementTime(n.delay),i.snapshotCurrentStyles());let s=o.style;s.type==wo.Keyframes?this.visitKeyframes(s,t):(t.incrementTime(n.duration),this.visitStyle(s,t),i.applyStylesToKeyframe()),t.currentAnimateTimings=null,t.previousNode=o}visitStyle(o,t){let n=t.currentTimeline,i=t.currentAnimateTimings;!i&&n.hasCurrentStyleProperties()&&n.forwardFrame();let s=i&&i.easing||o.easing;o.isEmptyStep?n.applyEmptyStep(s):n.setStyles(o.styles,s,t.errors,t.options),t.previousNode=o}visitKeyframes(o,t){let n=t.currentAnimateTimings,i=t.currentTimeline.duration,s=n.duration,u=t.createSubContext().currentTimeline;u.easing=n.easing,o.styles.forEach(f=>{let _=f.offset||0;u.forwardTime(_*s),u.setStyles(f.styles,f.easing,t.errors,t.options),u.applyStylesToKeyframe()}),t.currentTimeline.mergeTimelineCollectedStyles(u),t.transformIntoNewTimeline(i+s),t.previousNode=o}visitQuery(o,t){let n=t.currentTimeline.currentTime,i=o.options||{},s=i.delay?lc(i.delay):0;s&&(t.previousNode.type===wo.Style||n==0&&t.currentTimeline.hasCurrentStyleProperties())&&(t.currentTimeline.snapshotCurrentStyles(),t.previousNode=d_);let d=n,u=t.invokeQuery(o.selector,o.originalSelector,o.limit,o.includeSelf,!!i.optional,t.errors);t.currentQueryTotal=u.length;let f=null;u.forEach((_,C)=>{t.currentQueryIndex=C;let x=t.createSubContext(o.options,_);s&&x.delayNextStep(s),_===t.element&&(f=x.currentTimeline),yl(this,o.animation,x),x.currentTimeline.applyStylesToKeyframe();let y=x.currentTimeline.currentTime;d=Math.max(d,y)}),t.currentQueryIndex=0,t.currentQueryTotal=0,t.transformIntoNewTimeline(d),f&&(t.currentTimeline.mergeTimelineCollectedStyles(f),t.currentTimeline.snapshotCurrentStyles()),t.previousNode=o}visitStagger(o,t){let n=t.parentContext,i=t.currentTimeline,s=o.timings,d=Math.abs(s.duration),u=d*(t.currentQueryTotal-1),f=d*t.currentQueryIndex;switch(s.duration<0?"reverse":s.easing){case"reverse":f=u-f;break;case"full":f=n.currentStaggerTime;break}let C=t.currentTimeline;f&&C.delayNextStep(f);let x=C.currentTime;yl(this,o.animation,t),t.previousNode=o,n.currentStaggerTime=i.currentTime-x+(i.startTime-n.currentTimeline.startTime)}},d_={},i4=class e{_driver;element;subInstructions;_enterClassName;_leaveClassName;errors;timelines;parentContext=null;currentTimeline;currentAnimateTimings=null;previousNode=d_;subContextCount=0;options={};currentQueryIndex=0;currentQueryTotal=0;currentStaggerTime=0;constructor(o,t,n,i,s,d,u,f){this._driver=o,this.element=t,this.subInstructions=n,this._enterClassName=i,this._leaveClassName=s,this.errors=d,this.timelines=u,this.currentTimeline=f||new u_(this._driver,t,0),u.push(this.currentTimeline)}get params(){return this.options.params}updateOptions(o,t){if(!o)return;let n=o,i=this.options;n.duration!=null&&(i.duration=lc(n.duration)),n.delay!=null&&(i.delay=lc(n.delay));let s=n.params;if(s){let d=i.params;d||(d=this.options.params={}),Object.keys(s).forEach(u=>{(!t||!d.hasOwnProperty(u))&&(d[u]=A0(s[u],d,this.errors))})}}_copyOptions(){let o={};if(this.options){let t=this.options.params;if(t){let n=o.params={};Object.keys(t).forEach(i=>{n[i]=t[i]})}}return o}createSubContext(o=null,t,n){let i=t||this.element,s=new e(this._driver,i,this.subInstructions,this._enterClassName,this._leaveClassName,this.errors,this.timelines,this.currentTimeline.fork(i,n||0));return s.previousNode=this.previousNode,s.currentAnimateTimings=this.currentAnimateTimings,s.options=this._copyOptions(),s.updateOptions(o),s.currentQueryIndex=this.currentQueryIndex,s.currentQueryTotal=this.currentQueryTotal,s.parentContext=this,this.subContextCount++,s}transformIntoNewTimeline(o){return this.previousNode=d_,this.currentTimeline=this.currentTimeline.fork(this.element,o),this.timelines.push(this.currentTimeline),this.currentTimeline}appendInstructionToTimeline(o,t,n){let i={duration:t??o.duration,delay:this.currentTimeline.currentTime+(n??0)+o.delay,easing:""},s=new n4(this._driver,o.element,o.keyframes,o.preStyleProps,o.postStyleProps,i,o.stretchStartingKeyframe);return this.timelines.push(s),i}incrementTime(o){this.currentTimeline.forwardTime(this.currentTimeline.duration+o)}delayNextStep(o){o>0&&this.currentTimeline.delayNextStep(o)}invokeQuery(o,t,n,i,s,d){let u=[];if(i&&u.push(this.element),o.length>0){o=o.replace(Are,"."+this._enterClassName),o=o.replace(kre,"."+this._leaveClassName);let f=n!=1,_=this._driver.query(this.element,o,f);n!==0&&(_=n<0?_.slice(_.length+n,_.length):_.slice(0,n)),u.push(..._)}return!s&&u.length==0&&d.push(Kk(t)),u}},u_=class e{_driver;element;startTime;_elementTimelineStylesLookup;duration=0;easing=null;_previousKeyframe=new Map;_currentKeyframe=new Map;_keyframes=new Map;_styleSummary=new Map;_localTimelineStyles=new Map;_globalTimelineStyles;_pendingStyles=new Map;_backFill=new Map;_currentEmptyStepKeyframe=null;constructor(o,t,n,i){this._driver=o,this.element=t,this.startTime=n,this._elementTimelineStylesLookup=i,this._elementTimelineStylesLookup||(this._elementTimelineStylesLookup=new Map),this._globalTimelineStyles=this._elementTimelineStylesLookup.get(t),this._globalTimelineStyles||(this._globalTimelineStyles=this._localTimelineStyles,this._elementTimelineStylesLookup.set(t,this._localTimelineStyles)),this._loadKeyframe()}containsAnimation(){switch(this._keyframes.size){case 0:return!1;case 1:return this.hasCurrentStyleProperties();default:return!0}}hasCurrentStyleProperties(){return this._currentKeyframe.size>0}get currentTime(){return this.startTime+this.duration}delayNextStep(o){let t=this._keyframes.size===1&&this._pendingStyles.size;this.duration||t?(this.forwardTime(this.currentTime+o),t&&this.snapshotCurrentStyles()):this.startTime+=o}fork(o,t){return this.applyStylesToKeyframe(),new e(this._driver,o,t||this.currentTime,this._elementTimelineStylesLookup)}_loadKeyframe(){this._currentKeyframe&&(this._previousKeyframe=this._currentKeyframe),this._currentKeyframe=this._keyframes.get(this.duration),this._currentKeyframe||(this._currentKeyframe=new Map,this._keyframes.set(this.duration,this._currentKeyframe))}forwardFrame(){this.duration+=Ire,this._loadKeyframe()}forwardTime(o){this.applyStylesToKeyframe(),this.duration=o,this._loadKeyframe()}_updateStyle(o,t){this._localTimelineStyles.set(o,t),this._globalTimelineStyles.set(o,t),this._styleSummary.set(o,{time:this.currentTime,value:t})}allowOnlyTimelineStyles(){return this._currentEmptyStepKeyframe!==this._currentKeyframe}applyEmptyStep(o){o&&this._previousKeyframe.set("easing",o);for(let[t,n]of this._globalTimelineStyles)this._backFill.set(t,n||Is),this._currentKeyframe.set(t,Is);this._currentEmptyStepKeyframe=this._currentKeyframe}setStyles(o,t,n,i){t&&this._previousKeyframe.set("easing",t);let s=i&&i.params||{},d=Bre(o,this._globalTimelineStyles);for(let[u,f]of d){let _=A0(f,s,n);this._pendingStyles.set(u,_),this._localTimelineStyles.has(u)||this._backFill.set(u,this._globalTimelineStyles.get(u)??Is),this._updateStyle(u,_)}}applyStylesToKeyframe(){this._pendingStyles.size!=0&&(this._pendingStyles.forEach((o,t)=>{this._currentKeyframe.set(t,o)}),this._pendingStyles.clear(),this._localTimelineStyles.forEach((o,t)=>{this._currentKeyframe.has(t)||this._currentKeyframe.set(t,o)}))}snapshotCurrentStyles(){for(let[o,t]of this._localTimelineStyles)this._pendingStyles.set(o,t),this._updateStyle(o,t)}getFinalKeyframe(){return this._keyframes.get(this.duration)}get properties(){let o=[];for(let t in this._currentKeyframe)o.push(t);return o}mergeTimelineCollectedStyles(o){o._styleSummary.forEach((t,n)=>{let i=this._styleSummary.get(n);(!i||t.time>i.time)&&this._updateStyle(n,t.value)})}buildKeyframes(){this.applyStylesToKeyframe();let o=new Set,t=new Set,n=this._keyframes.size===1&&this.duration===0,i=[];this._keyframes.forEach((u,f)=>{let _=new Map([...this._backFill,...u]);_.forEach((C,x)=>{C===cf?o.add(x):C===Is&&t.add(x)}),n||_.set("offset",f/this.duration),i.push(_)});let s=[...o.values()],d=[...t.values()];if(n){let u=i[0],f=new Map(u);u.set("offset",0),f.set("offset",1),i=[u,f]}return m4(this.element,i,s,d,this.duration,this.startTime,this.easing,!1)}},n4=class extends u_{keyframes;preStyleProps;postStyleProps;_stretchStartingKeyframe;timings;constructor(o,t,n,i,s,d,u=!1){super(o,t,d.delay),this.keyframes=n,this.preStyleProps=i,this.postStyleProps=s,this._stretchStartingKeyframe=u,this.timings={duration:d.duration,delay:d.delay,easing:d.easing}}containsAnimation(){return this.keyframes.length>1}buildKeyframes(){let o=this.keyframes,{delay:t,duration:n,easing:i}=this.timings;if(this._stretchStartingKeyframe&&t){let s=[],d=n+t,u=t/d,f=new Map(o[0]);f.set("offset",0),s.push(f);let _=new Map(o[0]);_.set("offset",C8(u)),s.push(_);let C=o.length-1;for(let x=1;x<=C;x++){let y=new Map(o[x]),P=y.get("offset"),S=t+P*n;y.set("offset",C8(S/d)),s.push(y)}n=d,t=0,i="",o=s}return m4(this.element,o,this.preStyleProps,this.postStyleProps,n,t,i,!0)}};function C8(e,o=3){let t=Math.pow(10,o-1);return Math.round(e*t)/t}function Bre(e,o){let t=new Map,n;return e.forEach(i=>{if(i==="*"){n??=o.keys();for(let s of n)t.set(s,Is)}else for(let[s,d]of i)t.set(s,d)}),t}function v8(e,o,t,n,i,s,d,u,f,_,C,x,y){return{type:0,element:e,triggerName:o,isRemovalTransition:i,fromState:t,fromStyles:s,toState:n,toStyles:d,timelines:u,queriedElements:f,preStyleProps:_,postStyleProps:C,totalTime:x,errors:y}}var YT={},f_=class{_triggerName;ast;_stateStyles;constructor(o,t,n){this._triggerName=o,this.ast=t,this._stateStyles=n}match(o,t,n,i){return Rre(this.ast.matchers,o,t,n,i)}buildStyles(o,t,n){let i=this._stateStyles.get("*");return o!==void 0&&(i=this._stateStyles.get(o?.toString())||i),i?i.buildStyles(t,n):new Map}build(o,t,n,i,s,d,u,f,_,C){let x=[],y=this.ast.options&&this.ast.options.params||YT,P=u&&u.params||YT,S=this.buildStyles(n,P,x),M=f&&f.params||YT,D=this.buildStyles(i,M,x),k=new Set,z=new Map,U=new Map,J=i==="void",re={params:E8(M,y),delay:this.ast.options?.delay},ee=C?[]:D8(o,t,this.ast.animation,s,d,S,D,re,_,x),ae=0;return ee.forEach(ce=>{ae=Math.max(ce.duration+ce.delay,ae)}),x.length?v8(t,this._triggerName,n,i,J,S,D,[],[],z,U,ae,x):(ee.forEach(ce=>{let _e=ce.element,de=bl(z,_e,new Set);ce.preStyleProps.forEach(W=>de.add(W));let j=bl(U,_e,new Set);ce.postStyleProps.forEach(W=>j.add(W)),_e!==t&&k.add(_e)}),v8(t,this._triggerName,n,i,J,S,D,ee,[...k.values()],z,U,ae))}};function Rre(e,o,t,n,i){return e.some(s=>s(o,t,n,i))}function E8(e,o){let t=at({},o);return Object.entries(e).forEach(([n,i])=>{i!=null&&(t[n]=i)}),t}var o4=class{styles;defaultParams;normalizer;constructor(o,t,n){this.styles=o,this.defaultParams=t,this.normalizer=n}buildStyles(o,t){let n=new Map,i=E8(o,this.defaultParams);return this.styles.styles.forEach(s=>{typeof s!="string"&&s.forEach((d,u)=>{d&&(d=A0(d,i,t));let f=this.normalizer.normalizePropertyName(u,t);d=this.normalizer.normalizeStyleValue(u,f,d,t),n.set(u,d)})}),n}};function Nre(e,o,t){return new a4(e,o,t)}var a4=class{name;ast;_normalizer;transitionFactories=[];fallbackTransition;states=new Map;constructor(o,t,n){this.name=o,this.ast=t,this._normalizer=n,t.states.forEach(i=>{let s=i.options&&i.options.params||{};this.states.set(i.name,new o4(i.style,s,n))}),x8(this.states,"true","1"),x8(this.states,"false","0"),t.transitions.forEach(i=>{this.transitionFactories.push(new f_(o,i,this.states))}),this.fallbackTransition=Lre(o,this.states)}get containsQueries(){return this.ast.queryCount>0}matchTransition(o,t,n,i){return this.transitionFactories.find(d=>d.match(o,t,n,i))||null}matchStyles(o,t,n){return this.fallbackTransition.buildStyles(o,t,n)}};function Lre(e,o,t){let n=[(d,u)=>!0],i={type:wo.Sequence,steps:[],options:null},s={type:wo.Transition,animation:i,matchers:n,options:null,queryCount:0,depCount:0};return new f_(e,s,o)}function x8(e,o,t){e.has(o)?e.has(t)||e.set(t,e.get(o)):e.has(t)&&e.set(o,e.get(t))}var Vre=new gf,r4=class{bodyNode;_driver;_normalizer;_animations=new Map;_playersById=new Map;players=[];constructor(o,t,n){this.bodyNode=o,this._driver=t,this._normalizer=n}register(o,t){let n=[],i=[],s=M8(this._driver,t,n,i);if(n.length)throw t8(n);this._animations.set(o,s)}_buildPlayer(o,t,n){let i=o.element,s=qT(this._normalizer,o.keyframes,t,n);return this._driver.animate(i,s,o.duration,o.delay,o.easing,[],!0)}create(o,t,n={}){let i=[],s=this._animations.get(o),d,u=new Map;if(s?(d=D8(this._driver,t,s,$T,i_,new Map,new Map,n,Vre,i),d.forEach(C=>{let x=bl(u,C.element,new Map);C.postStyleProps.forEach(y=>x.set(y,null))})):(i.push(i8()),d=[]),i.length)throw n8(i);u.forEach((C,x)=>{C.forEach((y,P)=>{C.set(P,this._driver.computeStyle(x,P,Is))})});let f=d.map(C=>{let x=u.get(C.element);return this._buildPlayer(C,new Map,x)}),_=Nc(f);return this._playersById.set(o,_),_.onDestroy(()=>this.destroy(o)),this.players.push(_),_}destroy(o){let t=this._getPlayer(o);t.destroy(),this._playersById.delete(o);let n=this.players.indexOf(t);n>=0&&this.players.splice(n,1)}_getPlayer(o){let t=this._playersById.get(o);if(!t)throw o8(o);return t}listen(o,t,n,i){let s=e_(t,"","","");return Zg(this._getPlayer(o),n,s,i),()=>{}}command(o,t,n,i){if(n=="register"){this.register(o,i[0]);return}if(n=="create"){let d=i[0]||{};this.create(o,t,d);return}let s=this._getPlayer(o);switch(n){case"play":s.play();break;case"pause":s.pause();break;case"reset":s.reset();break;case"restart":s.restart();break;case"finish":s.finish();break;case"init":s.init();break;case"setPosition":s.setPosition(parseFloat(i[0]));break;case"destroy":this.destroy(o);break}}},b8="ng-animate-queued",qre=".ng-animate-queued",JT="ng-animate-disabled",zre=".ng-animate-disabled",Hre="ng-star-inserted",Gre=".ng-star-inserted",jre=[],I8={namespaceId:"",setForRemoval:!1,setForMove:!1,hasAnimation:!1,removedBeforeQueried:!1},$re={namespaceId:"",setForMove:!1,setForRemoval:!1,hasAnimation:!1,removedBeforeQueried:!0},ks="__ng_removed",_f=class{namespaceId;value;options;get params(){return this.options.params}constructor(o,t=""){this.namespaceId=t;let n=o&&o.hasOwnProperty("value"),i=n?o.value:o;if(this.value=Wre(i),n){let s=o,{value:d}=s,u=Y7(s,["value"]);this.options=u}else this.options={};this.options.params||(this.options.params={})}absorbOptions(o){let t=o.params;if(t){let n=this.options.params;Object.keys(t).forEach(i=>{n[i]==null&&(n[i]=t[i])})}}},hf="void",KT=new _f(hf),l4=class{id;hostElement;_engine;players=[];_triggers=new Map;_queue=[];_elementListeners=new Map;_hostClassName;constructor(o,t,n){this.id=o,this.hostElement=t,this._engine=n,this._hostClassName="ng-tns-"+o,ss(t,this._hostClassName)}listen(o,t,n,i){if(!this._triggers.has(t))throw a8(n,t);if(n==null||n.length==0)throw r8(t);if(!Qre(n))throw l8(n,t);let s=bl(this._elementListeners,o,[]),d={name:t,phase:n,callback:i};s.push(d);let u=bl(this._engine.statesByElement,o,new Map);return u.has(t)||(ss(o,df),ss(o,df+"-"+t),u.set(t,KT)),()=>{this._engine.afterFlush(()=>{let f=s.indexOf(d);f>=0&&s.splice(f,1),this._triggers.has(t)||u.delete(t)})}}register(o,t){return this._triggers.has(o)?!1:(this._triggers.set(o,t),!0)}_getTrigger(o){let t=this._triggers.get(o);if(!t)throw s8(o);return t}trigger(o,t,n,i=!0){let s=this._getTrigger(t),d=new Cf(this.id,t,o),u=this._engine.statesByElement.get(o);u||(ss(o,df),ss(o,df+"-"+t),this._engine.statesByElement.set(o,u=new Map));let f=u.get(t),_=new _f(n,this.id);if(!(n&&n.hasOwnProperty("value"))&&f&&_.absorbOptions(f.options),u.set(t,_),f||(f=KT),!(_.value===hf)&&f.value===_.value){if(!Kre(f.params,_.params)){let M=[],D=s.matchStyles(f.value,f.params,M),k=s.matchStyles(_.value,_.params,M);M.length?this._engine.reportError(M):this._engine.afterFlush(()=>{Op(o,D),Fs(o,k)})}return}let y=bl(this._engine.playersByElement,o,[]);y.forEach(M=>{M.namespaceId==this.id&&M.triggerName==t&&M.queued&&M.destroy()});let P=s.matchTransition(f.value,_.value,o,_.params),S=!1;if(!P){if(!i)return;P=s.fallbackTransition,S=!0}return this._engine.totalQueuedPlayers++,this._queue.push({element:o,triggerName:t,transition:P,fromState:f,toState:_,player:d,isFallbackTransition:S}),S||(ss(o,b8),d.onStart(()=>{F0(o,b8)})),d.onDone(()=>{let M=this.players.indexOf(d);M>=0&&this.players.splice(M,1);let D=this._engine.playersByElement.get(o);if(D){let k=D.indexOf(d);k>=0&&D.splice(k,1)}}),this.players.push(d),y.push(d),d}deregister(o){this._triggers.delete(o),this._engine.statesByElement.forEach(t=>t.delete(o)),this._elementListeners.forEach((t,n)=>{this._elementListeners.set(n,t.filter(i=>i.name!=o))})}clearElementCache(o){this._engine.statesByElement.delete(o),this._elementListeners.delete(o);let t=this._engine.playersByElement.get(o);t&&(t.forEach(n=>n.destroy()),this._engine.playersByElement.delete(o))}_signalRemovalForInnerTriggers(o,t){let n=this._engine.driver.query(o,uf,!0);n.forEach(i=>{if(i[ks])return;let s=this._engine.fetchNamespacesByElement(i);s.size?s.forEach(d=>d.triggerLeaveAnimation(i,t,!1,!0)):this.clearElementCache(i)}),this._engine.afterFlushAnimationsDone(()=>n.forEach(i=>this.clearElementCache(i)))}triggerLeaveAnimation(o,t,n,i){let s=this._engine.statesByElement.get(o),d=new Map;if(s){let u=[];if(s.forEach((f,_)=>{if(d.set(_,f.value),this._triggers.has(_)){let C=this.trigger(o,_,hf,i);C&&u.push(C)}}),u.length)return this._engine.markElementAsRemoved(this.id,o,!0,t,d),n&&Nc(u).onDone(()=>this._engine.processLeaveNode(o)),!0}return!1}prepareLeaveAnimationListeners(o){let t=this._elementListeners.get(o),n=this._engine.statesByElement.get(o);if(t&&n){let i=new Set;t.forEach(s=>{let d=s.name;if(i.has(d))return;i.add(d);let f=this._triggers.get(d).fallbackTransition,_=n.get(d)||KT,C=new _f(hf),x=new Cf(this.id,d,o);this._engine.totalQueuedPlayers++,this._queue.push({element:o,triggerName:d,transition:f,fromState:_,toState:C,player:x,isFallbackTransition:!0})})}}removeNode(o,t){let n=this._engine;if(o.childElementCount&&this._signalRemovalForInnerTriggers(o,t),this.triggerLeaveAnimation(o,t,!0))return;let i=!1;if(n.totalAnimations){let s=n.players.length?n.playersByQueriedElement.get(o):[];if(s&&s.length)i=!0;else{let d=o;for(;d=d.parentNode;)if(n.statesByElement.get(d)){i=!0;break}}}if(this.prepareLeaveAnimationListeners(o),i)n.markElementAsRemoved(this.id,o,!1,t);else{let s=o[ks];(!s||s===I8)&&(n.afterFlush(()=>this.clearElementCache(o)),n.destroyInnerAnimations(o),n._onRemovalComplete(o,t))}}insertNode(o,t){ss(o,this._hostClassName)}drainQueuedTransitions(o){let t=[];return this._queue.forEach(n=>{let i=n.player;if(i.destroyed)return;let s=n.element,d=this._elementListeners.get(s);d&&d.forEach(u=>{if(u.name==n.triggerName){let f=e_(s,n.triggerName,n.fromState.value,n.toState.value);f._data=o,Zg(n.player,u.phase,f,u.callback)}}),i.markedForDestroy?this._engine.afterFlush(()=>{i.destroy()}):t.push(n)}),this._queue=[],t.sort((n,i)=>{let s=n.transition.ast.depCount,d=i.transition.ast.depCount;return s==0||d==0?s-d:this._engine.driver.containsElement(n.element,i.element)?1:-1})}destroy(o){this.players.forEach(t=>t.destroy()),this._signalRemovalForInnerTriggers(this.hostElement,o)}},s4=class{bodyNode;driver;_normalizer;players=[];newHostElements=new Map;playersByElement=new Map;playersByQueriedElement=new Map;statesByElement=new Map;disabledNodes=new Set;totalAnimations=0;totalQueuedPlayers=0;_namespaceLookup={};_namespaceList=[];_flushFns=[];_whenQuietFns=[];namespacesByHostElement=new Map;collectedEnterElements=[];collectedLeaveElements=[];onRemovalComplete=(o,t)=>{};_onRemovalComplete(o,t){this.onRemovalComplete(o,t)}constructor(o,t,n){this.bodyNode=o,this.driver=t,this._normalizer=n}get queuedPlayers(){let o=[];return this._namespaceList.forEach(t=>{t.players.forEach(n=>{n.queued&&o.push(n)})}),o}createNamespace(o,t){let n=new l4(o,t,this);return this.bodyNode&&this.driver.containsElement(this.bodyNode,t)?this._balanceNamespaceList(n,t):(this.newHostElements.set(t,n),this.collectEnterElement(t)),this._namespaceLookup[o]=n}_balanceNamespaceList(o,t){let n=this._namespaceList,i=this.namespacesByHostElement;if(n.length-1>=0){let d=!1,u=this.driver.getParentElement(t);for(;u;){let f=i.get(u);if(f){let _=n.indexOf(f);n.splice(_+1,0,o),d=!0;break}u=this.driver.getParentElement(u)}d||n.unshift(o)}else n.push(o);return i.set(t,o),o}register(o,t){let n=this._namespaceLookup[o];return n||(n=this.createNamespace(o,t)),n}registerTrigger(o,t,n){let i=this._namespaceLookup[o];i&&i.register(t,n)&&this.totalAnimations++}destroy(o,t){o&&(this.afterFlush(()=>{}),this.afterFlushAnimationsDone(()=>{let n=this._fetchNamespace(o);this.namespacesByHostElement.delete(n.hostElement);let i=this._namespaceList.indexOf(n);i>=0&&this._namespaceList.splice(i,1),n.destroy(t),delete this._namespaceLookup[o]}))}_fetchNamespace(o){return this._namespaceLookup[o]}fetchNamespacesByElement(o){let t=new Set,n=this.statesByElement.get(o);if(n){for(let i of n.values())if(i.namespaceId){let s=this._fetchNamespace(i.namespaceId);s&&t.add(s)}}return t}trigger(o,t,n,i){if(s_(t)){let s=this._fetchNamespace(o);if(s)return s.trigger(t,n,i),!0}return!1}insertNode(o,t,n,i){if(!s_(t))return;let s=t[ks];if(s&&s.setForRemoval){s.setForRemoval=!1,s.setForMove=!0;let d=this.collectedLeaveElements.indexOf(t);d>=0&&this.collectedLeaveElements.splice(d,1)}if(o){let d=this._fetchNamespace(o);d&&d.insertNode(t,n)}i&&this.collectEnterElement(t)}collectEnterElement(o){this.collectedEnterElements.push(o)}markElementAsDisabled(o,t){t?this.disabledNodes.has(o)||(this.disabledNodes.add(o),ss(o,JT)):this.disabledNodes.has(o)&&(this.disabledNodes.delete(o),F0(o,JT))}removeNode(o,t,n){if(s_(t)){let i=o?this._fetchNamespace(o):null;i?i.removeNode(t,n):this.markElementAsRemoved(o,t,!1,n);let s=this.namespacesByHostElement.get(t);s&&s.id!==o&&s.removeNode(t,n)}else this._onRemovalComplete(t,n)}markElementAsRemoved(o,t,n,i,s){this.collectedLeaveElements.push(t),t[ks]={namespaceId:o,setForRemoval:i,hasAnimation:n,removedBeforeQueried:!1,previousTriggersValues:s}}listen(o,t,n,i,s){return s_(t)?this._fetchNamespace(o).listen(t,n,i,s):()=>{}}_buildInstruction(o,t,n,i,s){return o.transition.build(this.driver,o.element,o.fromState.value,o.toState.value,n,i,o.fromState.options,o.toState.options,t,s)}destroyInnerAnimations(o){let t=this.driver.query(o,uf,!0);t.forEach(n=>this.destroyActiveAnimationsForElement(n)),this.playersByQueriedElement.size!=0&&(t=this.driver.query(o,n_,!0),t.forEach(n=>this.finishActiveQueriedAnimationOnElement(n)))}destroyActiveAnimationsForElement(o){let t=this.playersByElement.get(o);t&&t.forEach(n=>{n.queued?n.markedForDestroy=!0:n.destroy()})}finishActiveQueriedAnimationOnElement(o){let t=this.playersByQueriedElement.get(o);t&&t.forEach(n=>n.finish())}whenRenderingDone(){return new Promise(o=>{if(this.players.length)return Nc(this.players).onDone(()=>o());o()})}processLeaveNode(o){let t=o[ks];if(t&&t.setForRemoval){if(o[ks]=I8,t.namespaceId){this.destroyInnerAnimations(o);let n=this._fetchNamespace(t.namespaceId);n&&n.clearElementCache(o)}this._onRemovalComplete(o,t.setForRemoval)}o.classList?.contains(JT)&&this.markElementAsDisabled(o,!1),this.driver.query(o,zre,!0).forEach(n=>{this.markElementAsDisabled(n,!1)})}flush(o=-1){let t=[];if(this.newHostElements.size&&(this.newHostElements.forEach((n,i)=>this._balanceNamespaceList(n,i)),this.newHostElements.clear()),this.totalAnimations&&this.collectedEnterElements.length)for(let n=0;nn()),this._flushFns=[],this._whenQuietFns.length){let n=this._whenQuietFns;this._whenQuietFns=[],t.length?Nc(t).onDone(()=>{n.forEach(i=>i())}):n.forEach(i=>i())}}reportError(o){throw c8(o)}_flushAnimations(o,t){let n=new gf,i=[],s=new Map,d=[],u=new Map,f=new Map,_=new Map,C=new Set;this.disabledNodes.forEach(L=>{C.add(L);let N=this.driver.query(L,qre,!0);for(let G=0;G{let G=$T+M++;S.set(N,G),L.forEach($=>ss($,G))});let D=[],k=new Set,z=new Set;for(let L=0;Lk.add($)):z.add(N))}let U=new Map,J=w8(y,Array.from(k));J.forEach((L,N)=>{let G=i_+M++;U.set(N,G),L.forEach($=>ss($,G))}),o.push(()=>{P.forEach((L,N)=>{let G=S.get(N);L.forEach($=>F0($,G))}),J.forEach((L,N)=>{let G=U.get(N);L.forEach($=>F0($,G))}),D.forEach(L=>{this.processLeaveNode(L)})});let re=[],ee=[];for(let L=this._namespaceList.length-1;L>=0;L--)this._namespaceList[L].drainQueuedTransitions(t).forEach(G=>{let $=G.player,ne=G.element;if(re.push($),this.collectedEnterElements.length){let Q=ne[ks];if(Q&&Q.setForMove){if(Q.previousTriggersValues&&Q.previousTriggersValues.has(G.triggerName)){let Ce=Q.previousTriggersValues.get(G.triggerName),Ve=this.statesByElement.get(G.element);if(Ve&&Ve.has(G.triggerName)){let mt=Ve.get(G.triggerName);mt.value=Ce,Ve.set(G.triggerName,mt)}}$.destroy();return}}let be=!x||!this.driver.containsElement(x,ne),ye=U.get(ne),Ne=S.get(ne),te=this._buildInstruction(G,n,Ne,ye,be);if(te.errors&&te.errors.length){ee.push(te);return}if(be){$.onStart(()=>Op(ne,te.fromStyles)),$.onDestroy(()=>Fs(ne,te.toStyles)),i.push($);return}if(G.isFallbackTransition){$.onStart(()=>Op(ne,te.fromStyles)),$.onDestroy(()=>Fs(ne,te.toStyles)),i.push($);return}let Oe=[];te.timelines.forEach(Q=>{Q.stretchStartingKeyframe=!0,this.disabledNodes.has(Q.element)||Oe.push(Q)}),te.timelines=Oe,n.append(ne,te.timelines);let K={instruction:te,player:$,element:ne};d.push(K),te.queriedElements.forEach(Q=>bl(u,Q,[]).push($)),te.preStyleProps.forEach((Q,Ce)=>{if(Q.size){let Ve=f.get(Ce);Ve||f.set(Ce,Ve=new Set),Q.forEach((mt,Ye)=>Ve.add(Ye))}}),te.postStyleProps.forEach((Q,Ce)=>{let Ve=_.get(Ce);Ve||_.set(Ce,Ve=new Set),Q.forEach((mt,Ye)=>Ve.add(Ye))})});if(ee.length){let L=[];ee.forEach(N=>{L.push(p8(N.triggerName,N.errors))}),re.forEach(N=>N.destroy()),this.reportError(L)}let ae=new Map,ce=new Map;d.forEach(L=>{let N=L.element;n.has(N)&&(ce.set(N,N),this._beforeAnimationBuild(L.player.namespaceId,L.instruction,ae))}),i.forEach(L=>{let N=L.element;this._getPreviousPlayers(N,!1,L.namespaceId,L.triggerName,null).forEach($=>{bl(ae,N,[]).push($),$.destroy()})});let _e=D.filter(L=>P8(L,f,_)),de=new Map;S8(de,this.driver,z,_,Is).forEach(L=>{P8(L,f,_)&&_e.push(L)});let W=new Map;P.forEach((L,N)=>{S8(W,this.driver,new Set(L),f,cf)}),_e.forEach(L=>{let N=de.get(L),G=W.get(L);de.set(L,new Map([...N?.entries()??[],...G?.entries()??[]]))});let pe=[],O=[],B={};d.forEach(L=>{let{element:N,player:G,instruction:$}=L;if(n.has(N)){if(C.has(N)){G.onDestroy(()=>Fs(N,$.toStyles)),G.disabled=!0,G.overrideTotalTime($.totalTime),i.push(G);return}let ne=B;if(ce.size>1){let ye=N,Ne=[];for(;ye=ye.parentNode;){let te=ce.get(ye);if(te){ne=te;break}Ne.push(ye)}Ne.forEach(te=>ce.set(te,ne))}let be=this._buildAnimation(G.namespaceId,$,ae,s,W,de);if(G.setRealPlayer(be),ne===B)pe.push(G);else{let ye=this.playersByElement.get(ne);ye&&ye.length&&(G.parentPlayer=Nc(ye)),i.push(G)}}else Op(N,$.fromStyles),G.onDestroy(()=>Fs(N,$.toStyles)),O.push(G),C.has(N)&&i.push(G)}),O.forEach(L=>{let N=s.get(L.element);if(N&&N.length){let G=Nc(N);L.setRealPlayer(G)}}),i.forEach(L=>{L.parentPlayer?L.syncPlayerEvents(L.parentPlayer):L.destroy()});for(let L=0;L!be.destroyed);ne.length?Yre(this,N,ne):this.processLeaveNode(N)}return D.length=0,pe.forEach(L=>{this.players.push(L),L.onDone(()=>{L.destroy();let N=this.players.indexOf(L);this.players.splice(N,1)}),L.play()}),pe}afterFlush(o){this._flushFns.push(o)}afterFlushAnimationsDone(o){this._whenQuietFns.push(o)}_getPreviousPlayers(o,t,n,i,s){let d=[];if(t){let u=this.playersByQueriedElement.get(o);u&&(d=u)}else{let u=this.playersByElement.get(o);if(u){let f=!s||s==hf;u.forEach(_=>{_.queued||!f&&_.triggerName!=i||d.push(_)})}}return(n||i)&&(d=d.filter(u=>!(n&&n!=u.namespaceId||i&&i!=u.triggerName))),d}_beforeAnimationBuild(o,t,n){let i=t.triggerName,s=t.element,d=t.isRemovalTransition?void 0:o,u=t.isRemovalTransition?void 0:i;for(let f of t.timelines){let _=f.element,C=_!==s,x=bl(n,_,[]);this._getPreviousPlayers(_,C,d,u,t.toState).forEach(P=>{let S=P.getRealPlayer();S.beforeDestroy&&S.beforeDestroy(),P.destroy(),x.push(P)})}Op(s,t.fromStyles)}_buildAnimation(o,t,n,i,s,d){let u=t.triggerName,f=t.element,_=[],C=new Set,x=new Set,y=t.timelines.map(S=>{let M=S.element;C.add(M);let D=M[ks];if(D&&D.removedBeforeQueried)return new ud(S.duration,S.delay);let k=M!==f,z=Jre((n.get(M)||jre).map(ae=>ae.getRealPlayer())).filter(ae=>{let ce=ae;return ce.element?ce.element===M:!1}),U=s.get(M),J=d.get(M),re=qT(this._normalizer,S.keyframes,U,J),ee=this._buildPlayer(S,re,z);if(S.subTimeline&&i&&x.add(M),k){let ae=new Cf(o,u,M);ae.setRealPlayer(ee),_.push(ae)}return ee});_.forEach(S=>{bl(this.playersByQueriedElement,S.element,[]).push(S),S.onDone(()=>Ure(this.playersByQueriedElement,S.element,S))}),C.forEach(S=>ss(S,UT));let P=Nc(y);return P.onDestroy(()=>{C.forEach(S=>F0(S,UT)),Fs(f,t.toStyles)}),x.forEach(S=>{bl(i,S,[]).push(P)}),P}_buildPlayer(o,t,n){return t.length>0?this.driver.animate(o.element,t,o.duration,o.delay,o.easing,n):new ud(o.duration,o.delay)}},Cf=class{namespaceId;triggerName;element;_player=new ud;_containsRealPlayer=!1;_queuedCallbacks=new Map;destroyed=!1;parentPlayer=null;markedForDestroy=!1;disabled=!1;queued=!0;totalTime=0;constructor(o,t,n){this.namespaceId=o,this.triggerName=t,this.element=n}setRealPlayer(o){this._containsRealPlayer||(this._player=o,this._queuedCallbacks.forEach((t,n)=>{t.forEach(i=>Zg(o,n,void 0,i))}),this._queuedCallbacks.clear(),this._containsRealPlayer=!0,this.overrideTotalTime(o.totalTime),this.queued=!1)}getRealPlayer(){return this._player}overrideTotalTime(o){this.totalTime=o}syncPlayerEvents(o){let t=this._player;t.triggerCallback&&o.onStart(()=>t.triggerCallback("start")),o.onDone(()=>this.finish()),o.onDestroy(()=>this.destroy())}_queueEvent(o,t){bl(this._queuedCallbacks,o,[]).push(t)}onDone(o){this.queued&&this._queueEvent("done",o),this._player.onDone(o)}onStart(o){this.queued&&this._queueEvent("start",o),this._player.onStart(o)}onDestroy(o){this.queued&&this._queueEvent("destroy",o),this._player.onDestroy(o)}init(){this._player.init()}hasStarted(){return this.queued?!1:this._player.hasStarted()}play(){!this.queued&&this._player.play()}pause(){!this.queued&&this._player.pause()}restart(){!this.queued&&this._player.restart()}finish(){this._player.finish()}destroy(){this.destroyed=!0,this._player.destroy()}reset(){!this.queued&&this._player.reset()}setPosition(o){this.queued||this._player.setPosition(o)}getPosition(){return this.queued?0:this._player.getPosition()}triggerCallback(o){let t=this._player;t.triggerCallback&&t.triggerCallback(o)}};function Ure(e,o,t){let n=e.get(o);if(n){if(n.length){let i=n.indexOf(t);n.splice(i,1)}n.length==0&&e.delete(o)}return n}function Wre(e){return e??null}function s_(e){return e&&e.nodeType===1}function Qre(e){return e=="start"||e=="done"}function y8(e,o){let t=e.style.display;return e.style.display=o??"none",t}function S8(e,o,t,n,i){let s=[];t.forEach(f=>s.push(y8(f)));let d=[];n.forEach((f,_)=>{let C=new Map;f.forEach(x=>{let y=o.computeStyle(_,x,i);C.set(x,y),(!y||y.length==0)&&(_[ks]=$re,d.push(_))}),e.set(_,C)});let u=0;return t.forEach(f=>y8(f,s[u++])),d}function w8(e,o){let t=new Map;if(e.forEach(u=>t.set(u,[])),o.length==0)return t;let n=1,i=new Set(o),s=new Map;function d(u){if(!u)return n;let f=s.get(u);if(f)return f;let _=u.parentNode;return t.has(_)?f=_:i.has(_)?f=n:f=d(_),s.set(u,f),f}return o.forEach(u=>{let f=d(u);f!==n&&t.get(f).push(u)}),t}function ss(e,o){e.classList?.add(o)}function F0(e,o){e.classList?.remove(o)}function Yre(e,o,t){Nc(t).onDone(()=>e.processLeaveNode(o))}function Jre(e){let o=[];return O8(e,o),o}function O8(e,o){for(let t=0;ti.add(s)):o.set(e,n),t.delete(e),!0}var k0=class{_driver;_normalizer;_transitionEngine;_timelineEngine;_triggerCache={};onRemovalComplete=(o,t)=>{};constructor(o,t,n){this._driver=t,this._normalizer=n,this._transitionEngine=new s4(o.body,t,n),this._timelineEngine=new r4(o.body,t,n),this._transitionEngine.onRemovalComplete=(i,s)=>this.onRemovalComplete(i,s)}registerTrigger(o,t,n,i,s){let d=o+"-"+i,u=this._triggerCache[d];if(!u){let f=[],_=[],C=M8(this._driver,s,f,_);if(f.length)throw e8(i,f);u=Nre(i,C,this._normalizer),this._triggerCache[d]=u}this._transitionEngine.registerTrigger(t,i,u)}register(o,t){this._transitionEngine.register(o,t)}destroy(o,t){this._transitionEngine.destroy(o,t)}onInsert(o,t,n,i){this._transitionEngine.insertNode(o,t,n,i)}onRemove(o,t,n){this._transitionEngine.removeNode(o,t,n)}disableAnimations(o,t){this._transitionEngine.markElementAsDisabled(o,t)}process(o,t,n,i){if(n.charAt(0)=="@"){let[s,d]=zT(n),u=i;this._timelineEngine.command(s,t,d,u)}else this._transitionEngine.trigger(o,t,n,i)}listen(o,t,n,i,s){if(n.charAt(0)=="@"){let[d,u]=zT(n);return this._timelineEngine.listen(d,t,u,s)}return this._transitionEngine.listen(o,t,n,i,s)}flush(o=-1){this._transitionEngine.flush(o)}get players(){return[...this._transitionEngine.players,...this._timelineEngine.players]}whenRenderingDone(){return this._transitionEngine.whenRenderingDone()}afterFlushAnimationsDone(o){this._transitionEngine.afterFlushAnimationsDone(o)}};function Xre(e,o){let t=null,n=null;return Array.isArray(o)&&o.length?(t=XT(o[0]),o.length>1&&(n=XT(o[o.length-1]))):o instanceof Map&&(t=XT(o)),t||n?new Zre(e,t,n):null}var Zre=(()=>{class e{_element;_startStyles;_endStyles;static initialStylesByElement=new WeakMap;_state=0;_initialStyles;constructor(t,n,i){this._element=t,this._startStyles=n,this._endStyles=i;let s=e.initialStylesByElement.get(t);s||e.initialStylesByElement.set(t,s=new Map),this._initialStyles=s}start(){this._state<1&&(this._startStyles&&Fs(this._element,this._startStyles,this._initialStyles),this._state=1)}finish(){this.start(),this._state<2&&(Fs(this._element,this._initialStyles),this._endStyles&&(Fs(this._element,this._endStyles),this._endStyles=null),this._state=1)}destroy(){this.finish(),this._state<3&&(e.initialStylesByElement.delete(this._element),this._startStyles&&(Op(this._element,this._startStyles),this._endStyles=null),this._endStyles&&(Op(this._element,this._endStyles),this._endStyles=null),Fs(this._element,this._initialStyles),this._state=3)}}return e})();function XT(e){let o=null;return e.forEach((t,n)=>{ele(n)&&(o=o||new Map,o.set(n,t))}),o}function ele(e){return e==="display"||e==="position"}var h_=class{element;keyframes;options;_specialStyles;_onDoneFns=[];_onStartFns=[];_onDestroyFns=[];_duration;_delay;_initialized=!1;_finished=!1;_started=!1;_destroyed=!1;_finalKeyframe;_originalOnDoneFns=[];_originalOnStartFns=[];domPlayer=null;time=0;parentPlayer=null;currentSnapshot=new Map;constructor(o,t,n,i){this.element=o,this.keyframes=t,this.options=n,this._specialStyles=i,this._duration=n.duration,this._delay=n.delay||0,this.time=this._duration+this._delay}_onFinish(){this._finished||(this._finished=!0,this._onDoneFns.forEach(o=>o()),this._onDoneFns=[])}init(){this._buildPlayer()&&this._preparePlayerBeforeStart()}_buildPlayer(){if(this._initialized)return this.domPlayer;this._initialized=!0;let o=this.keyframes,t=this._triggerWebAnimation(this.element,o,this.options);if(!t)return this._onFinish(),null;this.domPlayer=t,this._finalKeyframe=o.length?o[o.length-1]:new Map;let n=()=>this._onFinish();return t.addEventListener("finish",n),this.onDestroy(()=>{t.removeEventListener("finish",n)}),t}_preparePlayerBeforeStart(){this._delay?this._resetDomPlayerState():this.domPlayer?.pause()}_convertKeyframesToObject(o){let t=[];return o.forEach(n=>{t.push(Object.fromEntries(n))}),t}_triggerWebAnimation(o,t,n){let i=this._convertKeyframesToObject(t);try{return o.animate(i,n)}catch{return null}}onStart(o){this._originalOnStartFns.push(o),this._onStartFns.push(o)}onDone(o){this._originalOnDoneFns.push(o),this._onDoneFns.push(o)}onDestroy(o){this._onDestroyFns.push(o)}play(){let o=this._buildPlayer();o&&(this.hasStarted()||(this._onStartFns.forEach(t=>t()),this._onStartFns=[],this._started=!0,this._specialStyles&&this._specialStyles.start()),o.play())}pause(){this.init(),this.domPlayer?.pause()}finish(){this.init(),this.domPlayer&&(this._specialStyles&&this._specialStyles.finish(),this._onFinish(),this.domPlayer.finish())}reset(){this._resetDomPlayerState(),this._destroyed=!1,this._finished=!1,this._started=!1,this._onStartFns=this._originalOnStartFns,this._onDoneFns=this._originalOnDoneFns}_resetDomPlayerState(){this.domPlayer?.cancel()}restart(){this.reset(),this.play()}hasStarted(){return this._started}destroy(){this._destroyed||(this._destroyed=!0,this._resetDomPlayerState(),this._onFinish(),this._specialStyles&&this._specialStyles.destroy(),this._onDestroyFns.forEach(o=>o()),this._onDestroyFns=[])}setPosition(o){this.domPlayer||this.init(),this.domPlayer&&(this.domPlayer.currentTime=o*this.time)}getPosition(){return this.domPlayer?+(this.domPlayer.currentTime??0)/this.time:this._initialized?1:0}get totalTime(){return this._delay+this._duration}beforeDestroy(){let o=new Map;this.hasStarted()&&this._finalKeyframe.forEach((n,i)=>{i!=="offset"&&o.set(i,this._finished?n:a_(this.element,i))}),this.currentSnapshot=o}triggerCallback(o){let t=o==="start"?this._onStartFns:this._onDoneFns;t.forEach(n=>n()),t.length=0}},g_=class{validateStyleProperty(o){return!0}validateAnimatableStyleProperty(o){return!0}containsElement(o,t){return HT(o,t)}getParentElement(o){return t_(o)}query(o,t,n){return GT(o,t,n)}computeStyle(o,t,n){return a_(o,t)}animate(o,t,n,i,s,d=[]){let u=i==0?"both":"forwards",f={duration:n,delay:i,fill:u};s&&(f.easing=s);let _=new Map,C=d.filter(P=>P instanceof h_);f8(n,i)&&C.forEach(P=>{P.currentSnapshot.forEach((S,M)=>_.set(M,S))});let x=d8(t).map(P=>new Map(P));x=h8(o,x,_);let y=Xre(o,x);return new h_(o,x,f,y)}};var c_="@",A8="@.disabled",__=class{namespaceId;delegate;engine;_onDestroy;\u0275type=0;constructor(o,t,n,i){this.namespaceId=o,this.delegate=t,this.engine=n,this._onDestroy=i}get data(){return this.delegate.data}destroyNode(o){this.delegate.destroyNode?.(o)}destroy(){this.engine.destroy(this.namespaceId,this.delegate),this.engine.afterFlushAnimationsDone(()=>{queueMicrotask(()=>{this.delegate.destroy()})}),this._onDestroy?.()}createElement(o,t){return this.delegate.createElement(o,t)}createComment(o){return this.delegate.createComment(o)}createText(o){return this.delegate.createText(o)}appendChild(o,t){this.delegate.appendChild(o,t),this.engine.onInsert(this.namespaceId,t,o,!1)}insertBefore(o,t,n,i=!0){this.delegate.insertBefore(o,t,n),this.engine.onInsert(this.namespaceId,t,o,i)}removeChild(o,t,n,i){if(i){this.delegate.removeChild(o,t,n,i);return}this.parentNode(t)&&this.engine.onRemove(this.namespaceId,t,this.delegate)}selectRootElement(o,t){return this.delegate.selectRootElement(o,t)}parentNode(o){return this.delegate.parentNode(o)}nextSibling(o){return this.delegate.nextSibling(o)}setAttribute(o,t,n,i){this.delegate.setAttribute(o,t,n,i)}removeAttribute(o,t,n){this.delegate.removeAttribute(o,t,n)}addClass(o,t){this.delegate.addClass(o,t)}removeClass(o,t){this.delegate.removeClass(o,t)}setStyle(o,t,n,i){this.delegate.setStyle(o,t,n,i)}removeStyle(o,t,n){this.delegate.removeStyle(o,t,n)}setProperty(o,t,n){t.charAt(0)==c_&&t==A8?this.disableAnimations(o,!!n):this.delegate.setProperty(o,t,n)}setValue(o,t){this.delegate.setValue(o,t)}listen(o,t,n,i){return this.delegate.listen(o,t,n,i)}disableAnimations(o,t){this.engine.disableAnimations(o,t)}},c4=class extends __{factory;constructor(o,t,n,i,s){super(t,n,i,s),this.factory=o,this.namespaceId=t}setProperty(o,t,n){t.charAt(0)==c_?t.charAt(1)=="."&&t==A8?(n=n===void 0?!0:!!n,this.disableAnimations(o,n)):this.engine.process(this.namespaceId,o,t.slice(1),n):this.delegate.setProperty(o,t,n)}listen(o,t,n,i){if(t.charAt(0)==c_){let s=tle(o),d=t.slice(1),u="";return d.charAt(0)!=c_&&([d,u]=ile(d)),this.engine.listen(this.namespaceId,s,d,u,f=>{let _=f._data||-1;this.factory.scheduleListenerCallback(_,n,f)})}return this.delegate.listen(o,t,n,i)}};function tle(e){switch(e){case"body":return document.body;case"document":return document;case"window":return window;default:return e}}function ile(e){let o=e.indexOf("."),t=e.substring(0,o),n=e.slice(o+1);return[t,n]}var C_=class{delegate;engine;_zone;_currentId=0;_microtaskId=1;_animationCallbacksBuffer=[];_rendererCache=new Map;_cdRecurDepth=0;constructor(o,t,n){this.delegate=o,this.engine=t,this._zone=n,t.onRemovalComplete=(i,s)=>{s?.removeChild(null,i)}}createRenderer(o,t){let i=this.delegate.createRenderer(o,t);if(!o||!t?.data?.animation){let _=this._rendererCache,C=_.get(i);if(!C){let x=()=>_.delete(i);C=new __("",i,this.engine,x),_.set(i,C)}return C}let s=t.id,d=t.id+"-"+this._currentId;this._currentId++,this.engine.register(d,o);let u=_=>{Array.isArray(_)?_.forEach(u):this.engine.registerTrigger(s,d,o,_.name,_)};return t.data.animation.forEach(u),new c4(this,d,i,this.engine)}begin(){this._cdRecurDepth++,this.delegate.begin&&this.delegate.begin()}_scheduleCountTask(){queueMicrotask(()=>{this._microtaskId++})}scheduleListenerCallback(o,t,n){if(o>=0&&ot(n));return}let i=this._animationCallbacksBuffer;i.length==0&&queueMicrotask(()=>{this._zone.run(()=>{i.forEach(s=>{let[d,u]=s;d(u)}),this._animationCallbacksBuffer=[]})}),i.push([t,n])}end(){this._cdRecurDepth--,this._cdRecurDepth==0&&this._zone.runOutsideAngular(()=>{this._scheduleCountTask(),this.engine.flush(this._microtaskId)}),this.delegate.end&&this.delegate.end()}whenRenderingDone(){return this.engine.whenRenderingDone()}componentReplaced(o){this.engine.flush(),this.delegate.componentReplaced?.(o)}};var ole=(()=>{class e extends k0{constructor(t,n,i){super(t,n,i)}ngOnDestroy(){this.flush()}static \u0275fac=function(n){return new(n||e)(gl(pF),gl(gd),gl(_d))};static \u0275prov=Re({token:e,factory:e.\u0275fac})}return e})();function ale(){return new p_}function rle(e,o,t){return new C_(e,o,t)}var k8=[{provide:_d,useFactory:ale},{provide:k0,useClass:ole},{provide:CF,useFactory:rle,deps:[IF,k0,pd]}],lle=[{provide:gd,useClass:p4},{provide:OT,useValue:"NoopAnimations"},...k8],F8=[{provide:gd,useFactory:()=>new g_},{provide:OT,useFactory:()=>"BrowserAnimations"},...k8],v_=(()=>{class e{static withConfig(t){return{ngModule:e,providers:t.disableAnimations?lle:F8}}static \u0275fac=function(n){return new(n||e)};static \u0275mod=Gi({type:e});static \u0275inj=Hi({providers:F8,imports:[Pg]})}return e})();var Cd=(function(e){return e[e.Off=0]="Off",e[e.Error=1]="Error",e[e.Warning=2]="Warning",e[e.Info=3]="Info",e[e.Debug=4]="Debug",e})(Cd||{}),Bs=class e{static{this.level=Cd.Debug}static{this.outputs=[]}static enableProductionMode(){e.level=Cd.Warning}constructor(o){this.source=o}debug(...o){this.log(console.log,Cd.Debug,o)}info(...o){this.log(console.info,Cd.Info,o)}warn(...o){this.log(console.warn,Cd.Warning,o)}error(...o){this.log(console.error,Cd.Error,o)}log(o,t,n){if(t<=e.level){let i=this.source?["["+this.source+"]"].concat(n):n;o.apply(console,i),e.outputs.forEach(s=>s.apply(s,[this.source,t].concat(n)))}}};var B8=(()=>{class e{constructor(){this.timeoutDelay=un.session.timeout.idleTimeout||3e5,this.timeout$=new Nr,this.resetTimer$=new Nr,this.active=!1,this.$onSessionTimeout=this.timeout$.asObservable(),this.resetTimer$.subscribe(()=>{this.timerSubscription?.unsubscribe(),this.timerSubscription=nF(this.timeoutDelay).subscribe(()=>{this.timeout$.next(),this.stop()})})}start(){if(!this.active){this.active=!0,this.reset();let n=fl(...["mousemove","keydown","wheel","mousedown","scroll"].map(i=>cd(document,i)));this.userActionsSubscription=n.subscribe(()=>{this.reset()})}}stop(){this.active&&(this.active=!1,this.timerSubscription?.unsubscribe(),this.userActionsSubscription?.unsubscribe())}reset(){this.active&&this.resetTimer$.next()}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275prov=Re({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();var x_=(()=>{class e{constructor(){this.dialogRef=T(eo)}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275cmp=me({type:e,selectors:[["mifosx-session-timeout-dialog"]],decls:10,vars:9,consts:[["mat-dialog-title",""],["mat-raised-button","","color","primary","mat-dialog-close",""]],template:function(n,i){n&1&&(l(0,"h1",0),c(1),p(2,"translate"),r(),l(3,"mat-dialog-content"),c(4),p(5,"translate"),r(),l(6,"mat-dialog-actions")(7,"button",1),c(8),p(9,"translate"),r()()),n&2&&(a(),h(m(2,3,"labels.heading.Session Timeout")),a(3),v("",m(5,5,"labels.text.Session timed out after a period of inactivity"),"."),a(4),h(m(9,7,"labels.buttons.Close")))},dependencies:[ue,fe,ve,Wn,ho,Nn,Un,he],encapsulation:2})}}return e})();var Oa=(()=>{class e{constructor(){this.authenticationService=T(Wo),this.http=T(ko),this.route=T(Ie),this.router=T(qe),this.alertService=T(wr),this.translateService=T(yi),this.baseUrl=un.OIDC.oidcBaseUrl,this.authUrl=`${this.baseUrl}oauth/v2/authorize`,this.tokenUrl=`${this.baseUrl}oauth/v2/token`,this.clientId=un.OIDC.oidcClientId,this.api=un.OIDC.oidcApiUrl,this.frontUrl=un.OIDC.oidcFrontUrl,this.redirectUri=`${this.frontUrl}#/callback`,this.refreshTimeoutId=null}login(){return qn(this,null,function*(){let t=this.generateRandomString(),n=yield this.generateCodeChallenge(t);sessionStorage.setItem("code_verifier",t);let i=`${this.authUrl}?client_id=${encodeURIComponent(this.clientId)}&redirect_uri=${encodeURIComponent(this.redirectUri)}&response_type=code&scope=openid profile email offline_access&code_challenge=${n}&code_challenge_method=S256`;window.location.href=i})}logout(){let t=localStorage.getItem("id_token"),n=this.frontUrl+"#/login";if(this.refreshTimeoutId&&(clearTimeout(this.refreshTimeoutId),this.refreshTimeoutId=null),!t){window.location.href=n;return}sessionStorage.removeItem("mifosXCredentials"),sessionStorage.removeItem("mifosXZitadelTokenDetails"),localStorage.removeItem("access_token"),localStorage.removeItem("expires_in"),localStorage.removeItem("id_token"),localStorage.removeItem("refresh_token"),localStorage.removeItem("refresh_expires_in"),localStorage.removeItem("token_start_time"),localStorage.removeItem("code_verifier"),localStorage.removeItem("mifosXZitadel"),localStorage.removeItem("auth_code");let i=`${this.baseUrl}/oidc/v1/end_session?id_token_hint=${t}&post_logout_redirect_uri=${encodeURIComponent(n)}`;window.location.href=i}getAccessToken(){let t=sessionStorage.getItem("mifosXZitadelTokenDetails");return t?JSON.parse(t).access_token:null}generateRandomString(t=128){let n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-._~",i="";for(let s=0;sn.ok?n.json():(this.alertService.alert({type:"User Details",message:this.translateService.instant("errors.Username or password incorrect.")}),this.sesionEnd(),!1)).then(n=>{let s=n.object;this.authenticationService.saveZitadelCredentials(s),window.location.href="/#/home"}).catch(n=>{this.alertService.alert({type:"User Details",message:n})})}deletUser(t){fetch(`${this.api}authentication/user/${t}`,{method:"DELETE",headers:{"Content-Type":"application/json",Authorization:`Bearer ${this.getAccessToken()}`}}).then(n=>n.json()).then(n=>{n.status===200?this.router.navigate(["/appusers"]):alert(n.msg)}).catch(n=>{alert(n.msg)})}activeUser(t){fetch(`${this.api}authentication/user/act/${t}`,{method:"PUT",headers:{"Content-Type":"application/json",Authorization:`Bearer ${this.getAccessToken()}`},body:JSON.stringify({userId:t})}).then(n=>n.json()).then(n=>{window.location.reload()}).catch(n=>{alert(n.msg)})}desactiveUser(t){fetch(`${this.api}authentication/user/des/${t}`,{method:"PUT",headers:{"Content-Type":"application/json",Authorization:`Bearer ${this.getAccessToken()}`}}).then(n=>n.json()).then(n=>{window.location.reload()}).catch(n=>{alert(n.msg)})}getUsers(){let t=[];fetch(`${this.api}authentication/user`,{method:"GET",headers:{"Content-Type":"application/json",Authorization:`Bearer ${this.getAccessToken()}`}}).then(n=>n.json()).then(n=>{let i=n.data?.result;Array.isArray(i)&&i.forEach(s=>{let d=s.human;d&&t.push(d)})}).catch(n=>console.error(`Error retrieving users: ${n}`))}createRole(t,n,i){fetch(`${this.api}authentication/role`,{method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${this.getAccessToken()}`},body:JSON.stringify({roleKey:t,displayName:n,group:i})}).then(s=>s.json()).then(s=>{}).catch(s=>{alert(s.msg)})}updateRole(t,n,i){fetch(`${this.api}authentication/role`,{method:"PUT",headers:{"Content-Type":"application/json",Authorization:`Bearer ${this.getAccessToken()}`},body:JSON.stringify({roleKey:t,displayName:n,group:i})}).then(s=>s.json()).then(s=>{}).catch(s=>{alert(s.msg)})}deleteRole(t){fetch(`${this.api}authentication/role/${t}`,{method:"DELETE",headers:{"Content-Type":"application/json",Authorization:`Bearer ${this.getAccessToken()}`},body:JSON.stringify({roleKey:t})}).then(n=>n.json()).then(n=>{}).catch(n=>{alert(n.msg)})}refreshToken(){return new Promise((t,n)=>{let i=localStorage.getItem("refresh_token");if(!i)return n("Sin refresh_token");let s=new URLSearchParams;s.set("grant_type","refresh_token"),s.set("refresh_token",i),s.set("client_id",this.clientId),fetch(this.tokenUrl,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:s.toString()}).then(d=>d.ok?d.json():d.text().then(u=>{throw new Error(u)})).then(d=>{if(!d||!d.access_token||!d.expires_in)throw new Error("The server's response does not contain the expected fields.");localStorage.setItem("access_token",d.access_token),localStorage.setItem("id_token",d.id_token??""),localStorage.setItem("refresh_token",d.refresh_token??""),localStorage.setItem("expires_in",d.expires_in.toString()),localStorage.setItem("refresh_expires_in",d.refresh_expires_in?.toString()??""),localStorage.setItem("token_start_time",Date.now().toString()),this.scheduleRefresh(d.expires_in),t()}).catch(d=>{setTimeout(()=>{},3e5),n(d)})})}scheduleRefresh(t){let n=(t-3539)*1e3;if(n<=0){this.refreshToken();return}this.refreshTimeoutId&&clearTimeout(this.refreshTimeoutId),this.refreshTimeoutId=setTimeout(()=>{this.refreshToken()},n)}sesionEnd(){return qn(this,null,function*(){let t=localStorage.getItem("id_token"),n=this.frontUrl+"#/login";if(this.refreshTimeoutId&&(clearTimeout(this.refreshTimeoutId),this.refreshTimeoutId=null),!t){window.location.href=n;return}let i=`${this.baseUrl}oidc/v1/end_session?id_token_hint=${t}&post_logout_redirect_uri=${encodeURIComponent(n)}`;try{let s=yield fetch(i,{method:"GET",credentials:"include"});s.ok||console.error("Error en logout:",s.status,s.statusText)}catch(s){console.error("Error de red en logout:",s)}finally{sessionStorage.removeItem("mifosXCredentials"),sessionStorage.removeItem("mifosXZitadelTokenDetails"),localStorage.removeItem("access_token"),localStorage.removeItem("expires_in"),localStorage.removeItem("id_token"),localStorage.removeItem("refresh_token"),localStorage.removeItem("refresh_expires_in"),localStorage.removeItem("token_start_time"),localStorage.removeItem("code_verifier"),localStorage.removeItem("mifosXZitadel"),localStorage.removeItem("auth_code")}})}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275prov=Re({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();function ple(e){let o=e,t=Math.floor(Math.abs(e)),n=e.toString().replace(/^[^.]*\.?/,"").length;return t===1&&n===0?1:t===Math.floor(t)&&t>=2&&t<=4&&n===0?3:n!==0?4:5}var R8=["cs",[["dop.","odp."]],void 0,[["N","P","\xDA","S","\u010C","P","S"],["ne","po","\xFAt","st","\u010Dt","p\xE1","so"],["ned\u011Ble","pond\u011Bl\xED","\xFAter\xFD","st\u0159eda","\u010Dtvrtek","p\xE1tek","sobota"],["ne","po","\xFAt","st","\u010Dt","p\xE1","so"]],void 0,[["1","2","3","4","5","6","7","8","9","10","11","12"],["led","\xFAno","b\u0159e","dub","kv\u011B","\u010Dvn","\u010Dvc","srp","z\xE1\u0159","\u0159\xEDj","lis","pro"],["ledna","\xFAnora","b\u0159ezna","dubna","kv\u011Btna","\u010Dervna","\u010Dervence","srpna","z\xE1\u0159\xED","\u0159\xEDjna","listopadu","prosince"]],[["1","2","3","4","5","6","7","8","9","10","11","12"],["led","\xFAno","b\u0159e","dub","kv\u011B","\u010Dvn","\u010Dvc","srp","z\xE1\u0159","\u0159\xEDj","lis","pro"],["leden","\xFAnor","b\u0159ezen","duben","kv\u011Bten","\u010Derven","\u010Dervenec","srpen","z\xE1\u0159\xED","\u0159\xEDjen","listopad","prosinec"]],[["p\u0159.n.l.","n.l."],["p\u0159. n. l.","n. l."],["p\u0159ed na\u0161\xEDm letopo\u010Dtem","na\u0161eho letopo\u010Dtu"]],1,[6,0],["dd.MM.yy","d. M. y","d. MMMM y","EEEE d. MMMM y"],["H:mm","H:mm:ss","H:mm:ss z","H:mm:ss zzzz"],["{1} {0}",void 0,void 0,void 0],[",","\xA0",";","%","+","-","E","\xD7","\u2030","\u221E","NaN",":"],["#,##0.###","#,##0\xA0%","#,##0.00\xA0\xA4","#E0"],"CZK","K\u010D","\u010Desk\xE1 koruna",{AUD:["AU$","$"],BYN:[void 0,"\u0440."],CSK:["K\u010Ds"],CZK:["K\u010D"],ILS:[void 0,"\u20AA"],INR:[void 0,"\u20B9"],JPY:["JP\xA5","\xA5"],PHP:[void 0,"\u20B1"],RON:[void 0,"L"],RUR:[void 0,"\u0440."],TWD:["NT$"],USD:["US$","$"],VND:[void 0,"\u20AB"],XEU:["ECU"],XXX:[]},"ltr",ple];function mle(e){let o=e,t=Math.floor(Math.abs(e)),n=e.toString().replace(/^[^.]*\.?/,"").length;return t===1&&n===0?1:5}var N8=["en",[["a","p"],["AM","PM"]],[["AM","PM"]],[["S","M","T","W","T","F","S"],["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],["Su","Mo","Tu","We","Th","Fr","Sa"]],void 0,[["J","F","M","A","M","J","J","A","S","O","N","D"],["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],["January","February","March","April","May","June","July","August","September","October","November","December"]],void 0,[["B","A"],["BC","AD"],["Before Christ","Anno Domini"]],0,[6,0],["M/d/yy","MMM d, y","MMMM d, y","EEEE, MMMM d, y"],["h:mm a","h:mm:ss a","h:mm:ss a z","h:mm:ss a zzzz"],["{1}, {0}",void 0,"{1} 'at' {0}",void 0],[".",",",";","%","+","-","E","\xD7","\u2030","\u221E","NaN",":"],["#,##0.###","#,##0%","\xA4#,##0.00","#E0"],"USD","$","US Dollar",{},"ltr",mle];function dle(e){let o=e,t=Math.floor(Math.abs(e)),n=e.toString().replace(/^[^.]*\.?/,"").length,i=parseInt(e.toString().replace(/^[^e]*(e([-+]?\d+))?/,"$2"))||0;return o===1?1:i===0&&t!==0&&t%1e6===0&&n===0||!(i>=0&&i<=5)?4:5}var L8=["es",[["a.\xA0m.","p.\xA0m."]],void 0,[["D","L","M","X","J","V","S"],["dom","lun","mar","mi\xE9","jue","vie","s\xE1b"],["domingo","lunes","martes","mi\xE9rcoles","jueves","viernes","s\xE1bado"],["DO","LU","MA","MI","JU","VI","SA"]],void 0,[["E","F","M","A","M","J","J","A","S","O","N","D"],["ene","feb","mar","abr","may","jun","jul","ago","sept","oct","nov","dic"],["enero","febrero","marzo","abril","mayo","junio","julio","agosto","septiembre","octubre","noviembre","diciembre"]],void 0,[["a. C.","d. C."],void 0,["antes de Cristo","despu\xE9s de Cristo"]],1,[6,0],["d/M/yy","d MMM y","d 'de' MMMM 'de' y","EEEE, d 'de' MMMM 'de' y"],["H:mm","H:mm:ss","H:mm:ss z","H:mm:ss (zzzz)"],["{1}, {0}",void 0,void 0,void 0],[",",".",";","%","+","-","E","\xD7","\u2030","\u221E","NaN",":"],["#,##0.###","#,##0\xA0%","#,##0.00\xA0\xA4","#E0"],"EUR","\u20AC","euro",{AUD:[void 0,"$"],BRL:[void 0,"R$"],BYN:[void 0,"\u0440."],CAD:[void 0,"$"],CNY:[void 0,"\xA5"],EGP:[],ESP:["\u20A7"],GBP:[void 0,"\xA3"],HKD:[void 0,"$"],ILS:[void 0,"\u20AA"],INR:[void 0,"\u20B9"],JPY:[void 0,"\xA5"],KRW:[void 0,"\u20A9"],MXN:[void 0,"$"],NZD:[void 0,"$"],PHP:[void 0,"\u20B1"],RON:[void 0,"L"],THB:["\u0E3F"],TWD:[void 0,"NT$"],USD:["US$","$"],XAF:[],XCD:[void 0,"$"],XOF:[]},"ltr",dle];function ule(e){let o=e,t=Math.floor(Math.abs(e)),n=e.toString().replace(/^[^.]*\.?/,"").length;return t===1&&n===0?1:5}var V8=["de",[["AM","PM"]],void 0,[["S","M","D","M","D","F","S"],["So.","Mo.","Di.","Mi.","Do.","Fr.","Sa."],["Sonntag","Montag","Dienstag","Mittwoch","Donnerstag","Freitag","Samstag"],["So.","Mo.","Di.","Mi.","Do.","Fr.","Sa."]],[["S","M","D","M","D","F","S"],["So","Mo","Di","Mi","Do","Fr","Sa"],["Sonntag","Montag","Dienstag","Mittwoch","Donnerstag","Freitag","Samstag"],["So.","Mo.","Di.","Mi.","Do.","Fr.","Sa."]],[["J","F","M","A","M","J","J","A","S","O","N","D"],["Jan.","Feb.","M\xE4rz","Apr.","Mai","Juni","Juli","Aug.","Sept.","Okt.","Nov.","Dez."],["Januar","Februar","M\xE4rz","April","Mai","Juni","Juli","August","September","Oktober","November","Dezember"]],[["J","F","M","A","M","J","J","A","S","O","N","D"],["Jan","Feb","M\xE4r","Apr","Mai","Jun","Jul","Aug","Sep","Okt","Nov","Dez"],["Januar","Februar","M\xE4rz","April","Mai","Juni","Juli","August","September","Oktober","November","Dezember"]],[["v. Chr.","n. Chr."]],1,[6,0],["dd.MM.yy","dd.MM.y","d. MMMM y","EEEE, d. MMMM y"],["HH:mm","HH:mm:ss","HH:mm:ss z","HH:mm:ss zzzz"],["{1}, {0}",void 0,"{1} 'um' {0}",void 0],[",",".",";","%","+","-","E","\xB7","\u2030","\u221E","NaN",":"],["#,##0.###","#,##0\xA0%","#,##0.00\xA0\xA4","#E0"],"EUR","\u20AC","Euro",{ATS:["\xF6S"],AUD:["AU$","$"],BGM:["BGK"],BGO:["BGJ"],BYN:[void 0,"\u0440."],CUC:[void 0,"Cub$"],DEM:["DM"],FKP:[void 0,"Fl\xA3"],GHS:[void 0,"\u20B5"],GNF:[void 0,"F.G."],KMF:[void 0,"FC"],PHP:[void 0,"\u20B1"],RON:[void 0,"L"],RUR:[void 0,"\u0440."],RWF:[void 0,"F.Rw"],SYP:[],THB:["\u0E3F"],TWD:["NT$"],XXX:[],ZMW:[void 0,"K"]},"ltr",ule];function fle(e){let o=e,t=Math.floor(Math.abs(e)),n=e.toString().replace(/^[^.]*\.?/,"").length,i=parseInt(e.toString().replace(/^[^e]*(e([-+]?\d+))?/,"$2"))||0;return t===0||t===1?1:i===0&&t!==0&&t%1e6===0&&n===0||!(i>=0&&i<=5)?4:5}var q8=["fr",[["AM","PM"]],void 0,[["D","L","M","M","J","V","S"],["dim.","lun.","mar.","mer.","jeu.","ven.","sam."],["dimanche","lundi","mardi","mercredi","jeudi","vendredi","samedi"],["di","lu","ma","me","je","ve","sa"]],void 0,[["J","F","M","A","M","J","J","A","S","O","N","D"],["janv.","f\xE9vr.","mars","avr.","mai","juin","juil.","ao\xFBt","sept.","oct.","nov.","d\xE9c."],["janvier","f\xE9vrier","mars","avril","mai","juin","juillet","ao\xFBt","septembre","octobre","novembre","d\xE9cembre"]],void 0,[["av. J.-C.","ap. J.-C."],void 0,["avant J\xE9sus-Christ","apr\xE8s J\xE9sus-Christ"]],1,[6,0],["dd/MM/y","d MMM y","d MMMM y","EEEE d MMMM y"],["HH:mm","HH:mm:ss","HH:mm:ss z","HH:mm:ss zzzz"],["{1} {0}","{1}, {0}","{1} '\xE0' {0}",void 0],[",","\u202F",";","%","+","-","E","\xD7","\u2030","\u221E","NaN",":"],["#,##0.###","#,##0\xA0%","#,##0.00\xA0\xA4","#E0"],"EUR","\u20AC","euro",{ARS:["$AR","$"],AUD:["$AU","$"],BEF:["FB"],BMD:["$BM","$"],BND:["$BN","$"],BYN:[void 0,"\u0440."],BZD:["$BZ","$"],CAD:["$CA","$"],CLP:["$CL","$"],CNY:[void 0,"\xA5"],COP:["$CO","$"],CYP:["\xA3CY"],EGP:[void 0,"\xA3E"],FJD:["$FJ","$"],FKP:["\xA3FK","\xA3"],FRF:["F"],GBP:["\xA3GB","\xA3"],GIP:["\xA3GI","\xA3"],HKD:[void 0,"$"],IEP:["\xA3IE"],ILP:["\xA3IL"],ITL:["\u20A4IT"],JPY:[void 0,"\xA5"],KMF:[void 0,"FC"],LBP:["\xA3LB","\xA3L"],MTP:["\xA3MT"],MXN:["$MX","$"],NAD:["$NA","$"],NIO:[void 0,"$C"],NZD:["$NZ","$"],PHP:[void 0,"\u20B1"],RHD:["$RH"],RON:[void 0,"L"],RWF:[void 0,"FR"],SBD:["$SB","$"],SGD:["$SG","$"],SRD:["$SR","$"],TOP:[void 0,"$T"],TTD:["$TT","$"],TWD:[void 0,"NT$"],USD:["$US","$"],UYU:["$UY","$"],WST:["$WS"],XCD:[void 0,"$"],XPF:["FCFP"],ZMW:[void 0,"Kw"]},"ltr",fle];function hle(e){let o=e,t=Math.floor(Math.abs(e)),n=e.toString().replace(/^[^.]*\.?/,"").length,i=parseInt(e.toString().replace(/^[^e]*(e([-+]?\d+))?/,"$2"))||0;return t===1&&n===0?1:i===0&&t!==0&&t%1e6===0&&n===0||!(i>=0&&i<=5)?4:5}var z8=["it",[["m.","p."],["AM","PM"]],void 0,[["D","L","M","M","G","V","S"],["dom","lun","mar","mer","gio","ven","sab"],["domenica","luned\xEC","marted\xEC","mercoled\xEC","gioved\xEC","venerd\xEC","sabato"],["dom","lun","mar","mer","gio","ven","sab"]],void 0,[["G","F","M","A","M","G","L","A","S","O","N","D"],["gen","feb","mar","apr","mag","giu","lug","ago","set","ott","nov","dic"],["gennaio","febbraio","marzo","aprile","maggio","giugno","luglio","agosto","settembre","ottobre","novembre","dicembre"]],void 0,[["aC","dC"],["a.C.","d.C."],["avanti Cristo","dopo Cristo"]],1,[6,0],["dd/MM/yy","d MMM y","d MMMM y","EEEE d MMMM y"],["HH:mm","HH:mm:ss","HH:mm:ss z","HH:mm:ss zzzz"],["{1}, {0}",void 0,"{1} {0}",void 0],[",",".",";","%","+","-","E","\xD7","\u2030","\u221E","NaN",":"],["#,##0.###","#,##0%","#,##0.00\xA0\xA4","#E0"],"EUR","\u20AC","euro",{BRL:[void 0,"R$"],BYN:[void 0,"Br"],EGP:[void 0,"\xA3E"],HKD:[void 0,"$"],INR:[void 0,"\u20B9"],JPY:[void 0,"\xA5"],KRW:[void 0,"\u20A9"],MXN:[void 0,"$"],NOK:[void 0,"NKr"],THB:["\u0E3F"],TWD:[void 0,"NT$"],USD:[void 0,"$"],VND:[void 0,"\u20AB"]},"ltr",hle];function gle(e){let o=e;return 5}var H8=["ko",[["AM","PM"],void 0,["\uC624\uC804","\uC624\uD6C4"]],void 0,[["\uC77C","\uC6D4","\uD654","\uC218","\uBAA9","\uAE08","\uD1A0"],void 0,["\uC77C\uC694\uC77C","\uC6D4\uC694\uC77C","\uD654\uC694\uC77C","\uC218\uC694\uC77C","\uBAA9\uC694\uC77C","\uAE08\uC694\uC77C","\uD1A0\uC694\uC77C"],["\uC77C","\uC6D4","\uD654","\uC218","\uBAA9","\uAE08","\uD1A0"]],void 0,[["1\uC6D4","2\uC6D4","3\uC6D4","4\uC6D4","5\uC6D4","6\uC6D4","7\uC6D4","8\uC6D4","9\uC6D4","10\uC6D4","11\uC6D4","12\uC6D4"]],void 0,[["BC","AD"],void 0,["\uAE30\uC6D0\uC804","\uC11C\uAE30"]],0,[6,0],["yy. M. d.","y. M. d.","y\uB144 M\uC6D4 d\uC77C","y\uB144 M\uC6D4 d\uC77C EEEE"],["a h:mm","a h:mm:ss","a h\uC2DC m\uBD84 s\uCD08 z","a h\uC2DC m\uBD84 s\uCD08 zzzz"],["{1} {0}",void 0,void 0,void 0],[".",",",";","%","+","-","E","\xD7","\u2030","\u221E","NaN",":"],["#,##0.###","#,##0%","\xA4#,##0.00","#E0"],"KRW","\u20A9","\uB300\uD55C\uBBFC\uAD6D \uC6D0",{AUD:["AU$","$"],BYN:[void 0,"\u0440."],JPY:["JP\xA5","\xA5"],PHP:[void 0,"\u20B1"],RON:[void 0,"L"],TWD:["NT$"],USD:["US$","$"]},"ltr",gle];function _le(e){let o=e,t=parseInt(e.toString().replace(/^[^.]*\.?/,""),10)||0;return o%10===1&&!(o%100>=11&&o%100<=19)?1:o%10===Math.floor(o%10)&&o%10>=2&&o%10<=9&&!(o%100>=11&&o%100<=19)?3:t!==0?4:5}var G8=["lt",[["pr.\xA0p.","pop."],["prie\u0161piet","popiet"]],void 0,[["S","P","A","T","K","P","\u0160"],["sk","pr","an","tr","kt","pn","\u0161t"],["sekmadienis","pirmadienis","antradienis","tre\u010Diadienis","ketvirtadienis","penktadienis","\u0161e\u0161tadienis"],["Sk","Pr","An","Tr","Kt","Pn","\u0160t"]],void 0,[["S","V","K","B","G","B","L","R","R","S","L","G"],["saus.","vas.","kov.","bal.","geg.","bir\u017E.","liep.","rugp.","rugs.","spal.","lapkr.","gruod."],["sausio","vasario","kovo","baland\u017Eio","gegu\u017E\u0117s","bir\u017Eelio","liepos","rugpj\u016B\u010Dio","rugs\u0117jo","spalio","lapkri\u010Dio","gruod\u017Eio"]],[["S","V","K","B","G","B","L","R","R","S","L","G"],["saus.","vas.","kov.","bal.","geg.","bir\u017E.","liep.","rugp.","rugs.","spal.","lapkr.","gruod."],["sausis","vasaris","kovas","balandis","gegu\u017E\u0117","bir\u017Eelis","liepa","rugpj\u016Btis","rugs\u0117jis","spalis","lapkritis","gruodis"]],[["pr. Kr.","po Kr."],void 0,["prie\u0161 Krist\u0173","po Kristaus"]],1,[6,0],["y-MM-dd",void 0,"y 'm'. MMMM d 'd'.","y 'm'. MMMM d 'd'., EEEE"],["HH:mm","HH:mm:ss","HH:mm:ss z","HH:mm:ss zzzz"],["{1} {0}",void 0,void 0,void 0],[",","\xA0",";","%","+","\u2212","\xD710^","\xD7","\u2030","\u221E","NaN",":"],["#,##0.###","#,##0\xA0%","#,##0.00\xA0\xA4","#E0"],"EUR","\u20AC","Euras",{AUD:[void 0,"$"],BDT:[],BRL:[void 0,"R$"],BYN:[void 0,"Br"],CAD:[void 0,"$"],CNY:[void 0,"\xA5"],GBP:[void 0,"\xA3"],HKD:[void 0,"$"],ILS:[],INR:[],JPY:[void 0,"\xA5"],KHR:[],KRW:[void 0,"\u20A9"],LAK:[],MNT:[],MXN:[void 0,"$"],NZD:[void 0,"$"],PHP:[void 0,"\u20B1"],PLN:[void 0,"zl"],PYG:[void 0,"Gs"],RUB:[void 0,"rb"],TWD:[void 0,"$"],USD:[void 0,"$"],VND:[],XAF:[],XCD:[void 0,"$"],XOF:[],XPF:[]},"ltr",_le];function Cle(e){let o=e,t=e.toString().replace(/^[^.]*\.?/,"").length,n=parseInt(e.toString().replace(/^[^.]*\.?/,""),10)||0;return o%10===0||o%100===Math.floor(o%100)&&o%100>=11&&o%100<=19||t===2&&n%100===Math.floor(n%100)&&n%100>=11&&n%100<=19?0:o%10===1&&o%100!==11||t===2&&n%10===1&&n%100!==11||t!==2&&n%10===1?1:5}var j8=["lv",[["priek\u0161p.","p\u0113cp."],void 0,["priek\u0161pusdien\u0101","p\u0113cpusdien\u0101"]],[["priek\u0161p.","p\u0113cpusd."],void 0,["priek\u0161pusdiena","p\u0113cpusdiena"]],[["S","P","O","T","C","P","S"],["sv\u0113td.","pirmd.","otrd.","tre\u0161d.","ceturtd.","piektd.","sestd."],["sv\u0113tdiena","pirmdiena","otrdiena","tre\u0161diena","ceturtdiena","piektdiena","sestdiena"],["Sv","Pr","Ot","Tr","Ce","Pk","Se"]],[["S","P","O","T","C","P","S"],["Sv\u0113td.","Pirmd.","Otrd.","Tre\u0161d.","Ceturtd.","Piektd.","Sestd."],["Sv\u0113tdiena","Pirmdiena","Otrdiena","Tre\u0161diena","Ceturtdiena","Piektdiena","Sestdiena"],["Sv","Pr","Ot","Tr","Ce","Pk","Se"]],[["J","F","M","A","M","J","J","A","S","O","N","D"],["janv.","febr.","marts","apr.","maijs","j\u016Bn.","j\u016Bl.","aug.","sept.","okt.","nov.","dec."],["janv\u0101ris","febru\u0101ris","marts","apr\u012Blis","maijs","j\u016Bnijs","j\u016Blijs","augusts","septembris","oktobris","novembris","decembris"]],void 0,[["p.m.\u0113.","m.\u0113."],void 0,["pirms m\u016Bsu \u0113ras","m\u016Bsu \u0113r\u0101"]],1,[6,0],["dd.MM.yy","y. 'gada' d. MMM","y. 'gada' d. MMMM","EEEE, y. 'gada' d. MMMM"],["HH:mm","HH:mm:ss","HH:mm:ss z","HH:mm:ss zzzz"],["{1} {0}",void 0,void 0,void 0],[",","\xA0",";","%","+","-","E","\xD7","\u2030","\u221E","NS",":"],["#,##0.###","#,##0%","#,##0.00\xA0\xA4","#E0"],"EUR","\u20AC","eiro",{AUD:["AU$","$"],BYN:[void 0,"\u0440."],GHS:[],LVL:["Ls"],PHP:[void 0,"\u20B1"],THB:["\u0E3F"],TWD:["NT$"]},"ltr",Cle];function vle(e){return e===1?1:5}var $8=["ne",[["\u092A\u0942\u0930\u094D\u0935\u093E\u0939\u094D\u0928","\u0905\u092A\u0930\u093E\u0939\u094D\u0928"]],void 0,[["\u0906","\u0938\u094B","\u092E","\u092C\u0941","\u092C\u093F","\u0936\u0941","\u0936"],["\u0906\u0907\u0924","\u0938\u094B\u092E","\u092E\u0919\u094D\u0917\u0932","\u092C\u0941\u0927","\u092C\u093F\u0939\u093F","\u0936\u0941\u0915\u094D\u0930","\u0936\u0928\u093F"],["\u0906\u0907\u0924\u092C\u093E\u0930","\u0938\u094B\u092E\u092C\u093E\u0930","\u092E\u0919\u094D\u0917\u0932\u092C\u093E\u0930","\u092C\u0941\u0927\u092C\u093E\u0930","\u092C\u093F\u0939\u093F\u092C\u093E\u0930","\u0936\u0941\u0915\u094D\u0930\u092C\u093E\u0930","\u0936\u0928\u093F\u092C\u093E\u0930"],["\u0906\u0907\u0924","\u0938\u094B\u092E","\u092E\u0919\u094D\u0917\u0932","\u092C\u0941\u0927","\u092C\u093F\u0939\u093F","\u0936\u0941\u0915\u094D\u0930","\u0936\u0928\u093F"]],void 0,[["\u091C\u0928","\u092B\u0947\u092C","\u092E\u093E\u0930\u094D\u091A","\u0905\u092A\u094D\u0930","\u092E\u0947","\u091C\u0941\u0928","\u091C\u0941\u0932","\u0905\u0917","\u0938\u0947\u092A","\u0905\u0915\u094D\u091F\u094B","\u0928\u094B\u092D\u0947","\u0921\u093F\u0938\u0947"],["\u091C\u0928\u0935\u0930\u0940","\u092B\u0947\u092C\u094D\u0930\u0941\u0905\u0930\u0940","\u092E\u093E\u0930\u094D\u091A","\u0905\u092A\u094D\u0930\u093F\u0932","\u092E\u0947","\u091C\u0941\u0928","\u091C\u0941\u0932\u093E\u0908","\u0905\u0917\u0938\u094D\u091F","\u0938\u0947\u092A\u094D\u091F\u0947\u092E\u094D\u092C\u0930","\u0905\u0915\u094D\u091F\u094B\u092C\u0930","\u0928\u094B\u092D\u0947\u092E\u094D\u092C\u0930","\u0921\u093F\u0938\u0947\u092E\u094D\u092C\u0930"]],[["\u091C\u0928","\u092B\u0947\u0947\u092C","\u092E\u093E\u0930\u094D\u091A","\u0905\u092A\u094D\u0930","\u092E\u0947","\u091C\u0941\u0928","\u091C\u0941\u0932","\u0905\u0917","\u0938\u0947\u092A","\u0905\u0915\u094D\u091F\u094B","\u0928\u094B\u092D\u0947","\u0921\u093F\u0938\u0947"],["\u091C\u0928\u0935\u0930\u0940","\u092B\u0947\u092C\u094D\u0930\u0941\u0905\u0930\u0940","\u092E\u093E\u0930\u094D\u091A","\u0905\u092A\u094D\u0930\u093F\u0932","\u092E\u0947","\u091C\u0941\u0928","\u091C\u0941\u0932\u093E\u0908","\u0905\u0917\u0938\u094D\u091F","\u0938\u0947\u092A\u094D\u091F\u0947\u092E\u094D\u092C\u0930","\u0905\u0915\u094D\u091F\u094B\u092C\u0930","\u0928\u094B\u092D\u0947\u092E\u094D\u092C\u0930","\u0921\u093F\u0938\u0947\u092E\u094D\u092C\u0930"]],[["\u0908\u0938\u093E \u092A\u0942\u0930\u094D\u0935","\u0938\u0928\u094D"]],0,[6,0],["yy/M/d","y MMM d","y MMMM d","y MMMM d, EEEE"],["HH:mm","HH:mm:ss","HH:mm:ss z","HH:mm:ss zzzz"],["{1}, {0}",void 0,"{1} {0}",void 0],[".",",",";","%","+","-","E","\xD7","\u2030","\u221E","NaN",":"],["#,##,##0.###","#,##,##0%","\xA4\xA0#,##,##0.00","#E0"],"NPR","\u0928\u0947\u0930\u0942","\u0928\u0947\u092A\u093E\u0932\u0940 \u0930\u0942\u092A\u0948\u092F\u093E\u0901",{BYN:[void 0,"\u0440."],JPY:["JP\xA5","\xA5"],NPR:["\u0928\u0947\u0930\u0942","\u0930\u0942"],PHP:[void 0,"\u20B1"],THB:["\u0E3F"],USD:["US$","$"]},"ltr",vle];function xle(e){let o=e,t=Math.floor(Math.abs(e)),n=e.toString().replace(/^[^.]*\.?/,"").length,i=parseInt(e.toString().replace(/^[^e]*(e([-+]?\d+))?/,"$2"))||0;return t===Math.floor(t)&&t>=0&&t<=1?1:i===0&&t!==0&&t%1e6===0&&n===0||!(i>=0&&i<=5)?4:5}var U8=["pt",[["AM","PM"]],void 0,[["D","S","T","Q","Q","S","S"],["dom.","seg.","ter.","qua.","qui.","sex.","s\xE1b."],["domingo","segunda-feira","ter\xE7a-feira","quarta-feira","quinta-feira","sexta-feira","s\xE1bado"],["dom.","seg.","ter.","qua.","qui.","sex.","s\xE1b."]],void 0,[["J","F","M","A","M","J","J","A","S","O","N","D"],["jan.","fev.","mar.","abr.","mai.","jun.","jul.","ago.","set.","out.","nov.","dez."],["janeiro","fevereiro","mar\xE7o","abril","maio","junho","julho","agosto","setembro","outubro","novembro","dezembro"]],void 0,[["a.C.","d.C."],void 0,["antes de Cristo","depois de Cristo"]],0,[6,0],["dd/MM/y","d 'de' MMM 'de' y","d 'de' MMMM 'de' y","EEEE, d 'de' MMMM 'de' y"],["HH:mm","HH:mm:ss","HH:mm:ss z","HH:mm:ss zzzz"],["{1} {0}",void 0,void 0,void 0],[",",".",";","%","+","-","E","\xD7","\u2030","\u221E","NaN",":"],["#,##0.###","#,##0%","\xA4\xA0#,##0.00","#E0"],"BRL","R$","Real brasileiro",{AUD:["AU$","$"],BYN:[void 0,"\u0440."],JPY:["JP\xA5","\xA5"],PHP:[void 0,"\u20B1"],PTE:["Esc."],RON:[void 0,"L"],SYP:[void 0,"S\xA3"],THB:["\u0E3F"],TWD:["NT$"],USD:["US$","$"]},"ltr",xle];function ble(e){let o=e,t=Math.floor(Math.abs(e)),n=e.toString().replace(/^[^.]*\.?/,"").length;return t===1&&n===0?1:5}var W8=["sw",[["am","pm"],["AM","PM"]],[["AM","PM"]],[["S","M","T","W","T","F","S"],["Jumapili","Jumatatu","Jumanne","Jumatano","Alhamisi","Ijumaa","Jumamosi"]],void 0,[["J","F","M","A","M","J","J","A","S","O","N","D"],["Jan","Feb","Mac","Apr","Mei","Jun","Jul","Ago","Sep","Okt","Nov","Des"],["Januari","Februari","Machi","Aprili","Mei","Juni","Julai","Agosti","Septemba","Oktoba","Novemba","Desemba"]],void 0,[["KK","BK"],void 0,["Kabla ya Kristo","Baada ya Kristo"]],1,[6,0],["dd/MM/y","d MMM y","d MMMM y","EEEE, d MMMM y"],["HH:mm","HH:mm:ss","HH:mm:ss z","HH:mm:ss zzzz"],["{1} {0}",void 0,void 0,void 0],[".",",",";","%","+","-","E","\xD7","\u2030","\u221E","NaN",":"],["#,##0.###","#,##0%","\xA4\xA0#,##0.00","#E0"],"TZS","TSh","Shilingi ya Tanzania",{BYN:[void 0,"\u0440."],JPY:["JP\xA5","\xA5"],KES:["Ksh"],PHP:[void 0,"\u20B1"],THB:["\u0E3F"],TWD:["NT$"],TZS:["TSh"],USD:["US$","$"]},"ltr",ble];var Sle=new Bs("MifosX");Ll(R8);Ll(N8);Ll(L8);Ll(V8);Ll(q8);Ll(z8);Ll(H8);Ll(G8);Ll(j8);Ll($8);Ll(U8);Ll(W8);var Q8=(()=>{class e{constructor(t,n,i,s,d,u,f,_,C,x,y,P,S,M){this.router=t,this.activatedRoute=n,this.titleService=i,this.translateService=s,this.themeStorageService=d,this.snackBar=u,this.alertService=f,this.settingsService=_,this.authenticationService=C,this.themingService=x,this.dateUtils=y,this.idle=P,this.dialog=S,this.authService=M,this.destroy$=new Nr}login(){this.authService.login()}ngOnInit(){this.themingService.theme.subscribe(i=>{this.cssClass=i}),this.themingService.setInitialDarkMode(),this.themingService.setDarkMode(!!this.settingsService.themeDarkEnabled),un.production&&Bs.enableProductionMode(),Sle.debug("init"),this.translateService.addLangs(un.supportedLanguages.split(",")),this.settingsService.language?this.translateService.use(this.settingsService.languageCode):this.translateService.use(un.defaultLanguage),this.i18nService=new JF(this.translateService);let t=this.router.events.pipe(Fc(i=>i instanceof Dg));fl(this.translateService.onLangChange,t).pipe(Mn(()=>{let i=this.activatedRoute;for(;i.firstChild;)i=i.firstChild;return i}),Fc(i=>i.outlet==="primary"),iF(i=>i.data),Nl(this.destroy$)).subscribe(i=>{let s=i.title?`labels.text.${i.title}`:"APP_NAME";this.i18nService.translate(s).pipe(oF(1)).subscribe(d=>{this.titleService.setTitle(d)})});let n=[];if(localStorage.getItem("mifosXLocation")){let i=JSON.parse(localStorage.getItem("mifosXLocation")),s=i.length;n=s>100?i.slice(s-100):i}t.pipe(Nl(this.destroy$)).subscribe(()=>{n.push(this.router.url),localStorage.setItem("mifosXLocation",JSON.stringify(n))}),this.alertService.alertEvent.subscribe(i=>{this.snackBar.open(`${i.message}`,"Close",{duration:2e3,horizontalPosition:"right",verticalPosition:"top"})}),this.buttonConfig=new YF,localStorage.getItem("mifosXLanguage")||this.settingsService.setDefaultLanguage(),localStorage.getItem("mifosXDateFormat")||this.settingsService.setDateFormat("dd MMMM yyyy"),this.settingsService.setBusinessDate(this.dateUtils.formatDate(new Date,At.businessDateFormat)),this.settingsService.servers||this.settingsService.setServers(un.baseApiUrls.split(",")),localStorage.getItem("mifosXTenantIdentifier")||this.settingsService.setTenantIdentifier(un.fineractPlatformTenantId||"default"),this.settingsService.setTenantIdentifiers(un.fineractPlatformTenantIds.split(",")),un.session.timeout.idleTimeout>0&&(this.authSubscription=this.authenticationService.isAuthenticated$.subscribe(i=>{i?this.idle.start():this.idle.stop()}),this.idle.$onSessionTimeout.subscribe(()=>{this.alertService.alert({type:"Session timeout",message:this.translateService.instant("labels.text.Session timed out")}),this.dialog.open(x_),setTimeout(()=>{un.OIDC.oidcServerEnabled?this.authService.logout():this.logout()},1e3)}))}ngOnDestroy(){this.destroy$.next(),this.destroy$.complete(),this.authSubscription&&this.authSubscription.unsubscribe()}logout(){this.authenticationService.logout().subscribe(()=>this.router.navigate(["/login"],{replaceUrl:!0}))}help(){window.open("https://mifosforge.jira.com/wiki/spaces/docs/pages/52035622/User+Manual","_blank")}onKeydownHandler(t){let n=this.buttonConfig.buttonCombinations.find(i=>i.ctrlKey===t.ctrlKey&&i.shiftKey===t.shiftKey&&i.altKey===t.altKey&&i.key===t.key);if(n!==void 0)switch(n.id){case"logout":this.logout();break;case"help":this.help();break;case"runReport":document.getElementById("runReport").click();break;case"cancel":let i=document.querySelectorAll("button"),s=Array.prototype.filter.call(i,function(f){return f.textContent.trim()==="Cancel"});s.length>0&&s[0].click();break;case"submit":let d=document.querySelectorAll("button"),u=Array.prototype.filter.call(d,function(f){return f.textContent.trim()==="Submit"});u.length>0&&u[0].click();break;default:this.router.navigate([n.route],{relativeTo:this.activatedRoute})}}static{this.\u0275fac=function(n){return new(n||e)(Zo(qe),Zo(Ie),Zo(RF),Zo(yi),Zo(jF),Zo(x0),Zo(wr),Zo(At),Zo(Wo),Zo(KF),Zo(Zt),Zo(B8),Zo(Ht),Zo(Oa))}}static{this.\u0275cmp=me({type:e,selectors:[["mifosx-web-app"]],hostVars:2,hostBindings:function(n,i){n&1&&R("keydown",function(d){return i.onKeydownHandler(d)},gF),n&2&&wF(i.cssClass)},standalone:!1,decls:1,vars:0,template:function(n,i){n&1&&b(0,"router-outlet")},dependencies:[ra],encapsulation:2,data:{animation:[Sr("opacityScale",[hr(":enter",[Lo({opacity:0,transform:"scale(.95)"}),fr("100ms ease-out",Lo({opacity:1,transform:"scale(1)"}))]),hr(":leave",[Lo({opacity:1,transform:"scale(1)"}),fr("75ms ease-in",Lo({opacity:0,transform:"scale(.95)"}))])])]}})}}return e})();var b_=(()=>{class e{constructor(){this.location=T(C0)}goBack(){this.location.back()}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275cmp=me({type:e,selectors:[["mifosx-not-found"]],decls:11,vars:6,consts:[[1,"not-found-container"],["id","title"],["id","subtitle",1,"f30"],[1,"back-button","m-t-20"],["type","button","mat-raised-button","",3,"click"],["icon","arrow-left",1,"m-r-10"]],template:function(n,i){n&1&&(l(0,"div",0)(1,"div",1),c(2,"404"),r(),l(3,"div",2),c(4),p(5,"translate"),r(),l(6,"div",3)(7,"button",4),R("click",function(){return i.goBack()}),b(8,"fa-icon",5),c(9),p(10,"translate"),r()()()),n&2&&(a(4),h(m(5,2,"not_found_subtitle")),a(5),v(" ",m(10,4,"labels.buttons.Back")," "))},dependencies:[ue,fe,ve,ke,he],styles:["body[_ngcontent-%COMP%] table[_ngcontent-%COMP%] tbody[_ngcontent-%COMP%] tr[_ngcontent-%COMP%]:nth-child(2n){background-color:#f2f2f2}.bg-black[_ngcontent-%COMP%]{background-color:#000}.bg-light-grey[_ngcontent-%COMP%]{background-color:#e5e5e5}.bg-medium-grey[_ngcontent-%COMP%]{background-color:#ccc}.bg-grey[_ngcontent-%COMP%]{background-color:#999}.bg-dark-grey[_ngcontent-%COMP%]{background-color:#222}.bg-white[_ngcontent-%COMP%], .bg-fff[_ngcontent-%COMP%]{background-color:#fff}.bg-none[_ngcontent-%COMP%], .no-bg[_ngcontent-%COMP%]{background:none;background-image:none;background-color:transparent}.bg-facebook[_ngcontent-%COMP%]{background-color:#47639e}.bg-twitter[_ngcontent-%COMP%]{background-color:#02a8f3}body[_ngcontent-%COMP%] table[_ngcontent-%COMP%]{border:1px solid rgba(0,0,0,.12)}.no-border[_ngcontent-%COMP%]{border:none}.no-border-t[_ngcontent-%COMP%]{border-top:none}.no-border-r[_ngcontent-%COMP%]{border-right:none}.no-border-b[_ngcontent-%COMP%]{border-bottom:none}.no-border-l[_ngcontent-%COMP%]{border-left:none}.no-border-lr[_ngcontent-%COMP%], .no-border-rl[_ngcontent-%COMP%]{border-left:none;border-right:none}.no-border-tb[_ngcontent-%COMP%], .no-border-bt[_ngcontent-%COMP%]{border-top:none;border-bottom:none}.no-border-tl[_ngcontent-%COMP%], .no-border-lt[_ngcontent-%COMP%]{border-top:none;border-left:none}.no-border-tr[_ngcontent-%COMP%], .no-border-rt[_ngcontent-%COMP%]{border-top:none;border-right:none}.no-border-bl[_ngcontent-%COMP%], .no-border-lb[_ngcontent-%COMP%]{border-bottom:none;border-left:none}.no-border-br[_ngcontent-%COMP%], .no-border-rb[_ngcontent-%COMP%]{border-bottom:none;border-right:none}.border-dashed[_ngcontent-%COMP%], .border-dotted[_ngcontent-%COMP%]{border-style:dashed}.border-black[_ngcontent-%COMP%]{border-color:#000}.border-light-grey[_ngcontent-%COMP%]{border-color:#e5e5e5}.border-medium-grey[_ngcontent-%COMP%]{border-color:#ccc}.border-grey[_ngcontent-%COMP%]{border-color:#999}.border-dark-grey[_ngcontent-%COMP%]{border-color:#2222}.border-white[_ngcontent-%COMP%], .border-fff[_ngcontent-%COMP%]{border-color:#fff}.no-border-radius[_ngcontent-%COMP%]{border-radius:0}.radius3[_ngcontent-%COMP%]{border-radius:3px}.radius5[_ngcontent-%COMP%]{border-radius:5px}.radius10[_ngcontent-%COMP%]{border-radius:10px}.column-mandatory[_ngcontent-%COMP%]{color:#5cb85c;text-align:center}.not-column-mandatory[_ngcontent-%COMP%]{color:#666f73;text-align:center}.cdk-drag-placeholder[_ngcontent-%COMP%]{background:#3498db}.yes[_ngcontent-%COMP%]{color:#5cb85c!important;background-color:#5cb85c;height:4px;cursor:none}.no[_ngcontent-%COMP%]{color:red;background-color:red;height:4px;cursor:none}.strike[_ngcontent-%COMP%]{text-decoration:line-through;color:red}.transfer[_ngcontent-%COMP%]{color:#16a085}.linked[_ngcontent-%COMP%]{color:#4461e2}.accrual[_ngcontent-%COMP%]{color:#999}.fa-question[_ngcontent-%COMP%]{color:#4461e2}.enabled[_ngcontent-%COMP%]{color:#32cd32}.disabled[_ngcontent-%COMP%]{color:#f44366}.v-mid[_ngcontent-%COMP%], .v-m[_ngcontent-%COMP%]{vertical-align:middle}.v-top[_ngcontent-%COMP%], .v-t[_ngcontent-%COMP%]{vertical-align:top}.v-bottom[_ngcontent-%COMP%], .v-b[_ngcontent-%COMP%]{vertical-align:bottom}.v-super[_ngcontent-%COMP%]{vertical-align:super}.r-amount[_ngcontent-%COMP%]{text-align:right!important;padding-right:5px!important}.left[_ngcontent-%COMP%]{text-align:left!important}.right[_ngcontent-%COMP%]{text-align:right!important}.center[_ngcontent-%COMP%]{text-align:center!important}.amount-plus[_ngcontent-%COMP%]{color:#000}.amount-minus[_ngcontent-%COMP%]{color:#4461e2}.block[_ngcontent-%COMP%]{display:block}.inline[_ngcontent-%COMP%]{display:inline}.in-block[_ngcontent-%COMP%]{display:inline-block;zoom:1}.d-none[_ngcontent-%COMP%], .hide[_ngcontent-%COMP%], .hidden[_ngcontent-%COMP%]{display:none}.t-0[_ngcontent-%COMP%]{top:0}.b-0[_ngcontent-%COMP%]{bottom:0}.l-0[_ngcontent-%COMP%]{left:0}.r-0[_ngcontent-%COMP%]{right:0}.tb-0[_ngcontent-%COMP%]{top:0;bottom:0}.lr-0[_ngcontent-%COMP%]{left:0;right:0}.f-left[_ngcontent-%COMP%]{float:left}.f-right[_ngcontent-%COMP%]{float:right}.f-none[_ngcontent-%COMP%]{float:none}textarea[_ngcontent-%COMP%]{resize:both}textarea.vertical[_ngcontent-%COMP%], textarea.horizontal[_ngcontent-%COMP%]{resize:vertical}textarea.noresize[_ngcontent-%COMP%]{resize:none}.full-input[_ngcontent-%COMP%] input[_ngcontent-%COMP%], .full-input[_ngcontent-%COMP%] select[_ngcontent-%COMP%], .full-input[_ngcontent-%COMP%] textarea[_ngcontent-%COMP%]{width:100%}.normal[_ngcontent-%COMP%] input[_ngcontent-%COMP%], .normal[_ngcontent-%COMP%] select[_ngcontent-%COMP%], .normal[_ngcontent-%COMP%] textarea[_ngcontent-%COMP%], .full-input[_ngcontent-%COMP%] [type=checkbox][_ngcontent-%COMP%], .full-input[_ngcontent-%COMP%] [type=radio][_ngcontent-%COMP%]{width:auto}.mat-tab-body-content[_ngcontent-%COMP%]{margin-bottom:20px}.mat-datepicker-input[_ngcontent-%COMP%]{margin-top:5px;margin-bottom:5px}.loader-wrapper[_ngcontent-%COMP%]{height:100vh;width:100vw}.loader-wrapper[_ngcontent-%COMP%] .triangle[_ngcontent-%COMP%]{width:0;height:0;border-style:solid;position:absolute;animation:_ngcontent-%COMP%_rotate .8s infinite .2s}.loader-wrapper[_ngcontent-%COMP%] .bottom[_ngcontent-%COMP%]{border-width:0 90px 90px;border-color:transparent transparent #1fb050;bottom:calc(50% - 100px);left:calc(50% - 90px)}.loader-wrapper[_ngcontent-%COMP%] .top[_ngcontent-%COMP%]{border-width:90px 90px 0;border-color:#b4d575 transparent transparent;top:calc(50% - 100px);left:calc(50% - 90px)}.loader-wrapper[_ngcontent-%COMP%] .left[_ngcontent-%COMP%]{border-width:90px 0 90px 90px;border-color:transparent transparent transparent #1074b9;top:calc(50% - 90px);left:calc(50% - 100px)}.loader-wrapper[_ngcontent-%COMP%] .right[_ngcontent-%COMP%]{border-width:90px 90px 90px 0;border-color:transparent #1daeec transparent transparent;top:calc(50% - 90px);right:calc(50% - 100px)}@keyframes _ngcontent-%COMP%_rotate{0%{transform:rotate(0)}to{transform:rotate(360deg)}}body[_ngcontent-%COMP%]{margin:0}.container[_ngcontent-%COMP%]{margin:0 auto}.mb-05[_ngcontent-%COMP%]{margin-bottom:.5rem}.mr-05[_ngcontent-%COMP%]{margin-right:.5rem}.mb-1[_ngcontent-%COMP%]{margin-bottom:1rem}.mt-1[_ngcontent-%COMP%]{margin-top:1rem}.m-5[_ngcontent-%COMP%]{margin:5px}.m-t-5[_ngcontent-%COMP%]{margin-top:5px}.m-r-5[_ngcontent-%COMP%]{margin-right:5px}.m-b-5[_ngcontent-%COMP%]{margin-bottom:5px}.m-l-5[_ngcontent-%COMP%]{margin-left:5px}.m-v-5[_ngcontent-%COMP%]{margin:5px 0}.m-h-5[_ngcontent-%COMP%]{margin:0 5px}.m-10[_ngcontent-%COMP%]{margin:10px}.m-t-10[_ngcontent-%COMP%]{margin-top:10px}.m-r-10[_ngcontent-%COMP%]{margin-right:10px}.m-b-10[_ngcontent-%COMP%]{margin-bottom:10px}.m-l-10[_ngcontent-%COMP%]{margin-left:10px}.m-v-10[_ngcontent-%COMP%]{margin:10px 0}.m-h-10[_ngcontent-%COMP%]{margin:0 10px}.m-15[_ngcontent-%COMP%]{margin:15px}.m-t-15[_ngcontent-%COMP%]{margin-top:15px}.m-r-15[_ngcontent-%COMP%]{margin-right:15px}.m-b-15[_ngcontent-%COMP%]{margin-bottom:15px}.m-l-15[_ngcontent-%COMP%]{margin-left:15px}.m-v-15[_ngcontent-%COMP%]{margin:15px 0}.m-h-15[_ngcontent-%COMP%]{margin:0 15px}.m-20[_ngcontent-%COMP%]{margin:20px}.m-t-20[_ngcontent-%COMP%]{margin-top:20px}.m-r-20[_ngcontent-%COMP%]{margin-right:20px}.m-b-20[_ngcontent-%COMP%]{margin-bottom:20px}.m-l-20[_ngcontent-%COMP%]{margin-left:20px}.m-v-20[_ngcontent-%COMP%]{margin:20px 0}.m-h-20[_ngcontent-%COMP%]{margin:0 20px}.m-25[_ngcontent-%COMP%]{margin:25px}.m-t-25[_ngcontent-%COMP%]{margin-top:25px}.m-r-25[_ngcontent-%COMP%]{margin-right:25px}.m-b-25[_ngcontent-%COMP%]{margin-bottom:25px}.m-l-25[_ngcontent-%COMP%]{margin-left:25px}.m-v-25[_ngcontent-%COMP%]{margin:25px 0}.m-h-25[_ngcontent-%COMP%]{margin:0 25px}.m-30[_ngcontent-%COMP%]{margin:30px}.m-t-30[_ngcontent-%COMP%]{margin-top:30px}.m-r-30[_ngcontent-%COMP%]{margin-right:30px}.m-b-30[_ngcontent-%COMP%]{margin-bottom:30px}.m-l-30[_ngcontent-%COMP%]{margin-left:30px}.m-v-30[_ngcontent-%COMP%]{margin:30px 0}.m-h-30[_ngcontent-%COMP%]{margin:0 30px}.m-35[_ngcontent-%COMP%]{margin:35px}.m-t-35[_ngcontent-%COMP%]{margin-top:35px}.m-r-35[_ngcontent-%COMP%]{margin-right:35px}.m-b-35[_ngcontent-%COMP%]{margin-bottom:35px}.m-l-35[_ngcontent-%COMP%]{margin-left:35px}.m-v-35[_ngcontent-%COMP%]{margin:35px 0}.m-h-35[_ngcontent-%COMP%]{margin:0 35px}.m-40[_ngcontent-%COMP%]{margin:40px}.m-t-40[_ngcontent-%COMP%]{margin-top:40px}.m-r-40[_ngcontent-%COMP%]{margin-right:40px}.m-b-40[_ngcontent-%COMP%]{margin-bottom:40px}.m-l-40[_ngcontent-%COMP%]{margin-left:40px}.m-v-40[_ngcontent-%COMP%]{margin:40px 0}.m-h-40[_ngcontent-%COMP%]{margin:0 40px}.m-45[_ngcontent-%COMP%]{margin:45px}.m-t-45[_ngcontent-%COMP%]{margin-top:45px}.m-r-45[_ngcontent-%COMP%]{margin-right:45px}.m-b-45[_ngcontent-%COMP%]{margin-bottom:45px}.m-l-45[_ngcontent-%COMP%]{margin-left:45px}.m-v-45[_ngcontent-%COMP%]{margin:45px 0}.m-h-45[_ngcontent-%COMP%]{margin:0 45px}.m-50[_ngcontent-%COMP%]{margin:50px}.m-t-50[_ngcontent-%COMP%]{margin-top:50px}.m-r-50[_ngcontent-%COMP%]{margin-right:50px}.m-b-50[_ngcontent-%COMP%]{margin-bottom:50px}.m-l-50[_ngcontent-%COMP%]{margin-left:50px}.m-v-50[_ngcontent-%COMP%]{margin:50px 0}.m-h-50[_ngcontent-%COMP%]{margin:0 50px}.m-55[_ngcontent-%COMP%]{margin:55px}.m-t-55[_ngcontent-%COMP%]{margin-top:55px}.m-r-55[_ngcontent-%COMP%]{margin-right:55px}.m-b-55[_ngcontent-%COMP%]{margin-bottom:55px}.m-l-55[_ngcontent-%COMP%]{margin-left:55px}.m-v-55[_ngcontent-%COMP%]{margin:55px 0}.m-h-55[_ngcontent-%COMP%]{margin:0 55px}.m-60[_ngcontent-%COMP%]{margin:60px}.m-t-60[_ngcontent-%COMP%]{margin-top:60px}.m-r-60[_ngcontent-%COMP%]{margin-right:60px}.m-b-60[_ngcontent-%COMP%]{margin-bottom:60px}.m-l-60[_ngcontent-%COMP%]{margin-left:60px}.m-v-60[_ngcontent-%COMP%]{margin:60px 0}.m-h-60[_ngcontent-%COMP%]{margin:0 60px}.m-65[_ngcontent-%COMP%]{margin:65px}.m-t-65[_ngcontent-%COMP%]{margin-top:65px}.m-r-65[_ngcontent-%COMP%]{margin-right:65px}.m-b-65[_ngcontent-%COMP%]{margin-bottom:65px}.m-l-65[_ngcontent-%COMP%]{margin-left:65px}.m-v-65[_ngcontent-%COMP%]{margin:65px 0}.m-h-65[_ngcontent-%COMP%]{margin:0 65px}.m-70[_ngcontent-%COMP%]{margin:70px}.m-t-70[_ngcontent-%COMP%]{margin-top:70px}.m-r-70[_ngcontent-%COMP%]{margin-right:70px}.m-b-70[_ngcontent-%COMP%]{margin-bottom:70px}.m-l-70[_ngcontent-%COMP%]{margin-left:70px}.m-v-70[_ngcontent-%COMP%]{margin:70px 0}.m-h-70[_ngcontent-%COMP%]{margin:0 70px}.m-75[_ngcontent-%COMP%]{margin:75px}.m-t-75[_ngcontent-%COMP%]{margin-top:75px}.m-r-75[_ngcontent-%COMP%]{margin-right:75px}.m-b-75[_ngcontent-%COMP%]{margin-bottom:75px}.m-l-75[_ngcontent-%COMP%]{margin-left:75px}.m-v-75[_ngcontent-%COMP%]{margin:75px 0}.m-h-75[_ngcontent-%COMP%]{margin:0 75px}.m-80[_ngcontent-%COMP%]{margin:80px}.m-t-80[_ngcontent-%COMP%]{margin-top:80px}.m-r-80[_ngcontent-%COMP%]{margin-right:80px}.m-b-80[_ngcontent-%COMP%]{margin-bottom:80px}.m-l-80[_ngcontent-%COMP%]{margin-left:80px}.m-v-80[_ngcontent-%COMP%]{margin:80px 0}.m-h-80[_ngcontent-%COMP%]{margin:0 80px}.no-m[_ngcontent-%COMP%]{margin:0}.no-m-t[_ngcontent-%COMP%]{margin-top:0}.no-m-r[_ngcontent-%COMP%]{margin-right:0}.no-m-b[_ngcontent-%COMP%]{margin-bottom:0}.no-m-l[_ngcontent-%COMP%]{margin-left:0}.no-m-v[_ngcontent-%COMP%], .no-m-h[_ngcontent-%COMP%], .no-margin[_ngcontent-%COMP%]{margin:0}.no-m-lr[_ngcontent-%COMP%], .no-m-rl[_ngcontent-%COMP%]{margin-left:0;margin-right:0}.no-m-tb[_ngcontent-%COMP%], .no-m-bt[_ngcontent-%COMP%]{margin-top:0;margin-bottom:0}.m-t-only[_ngcontent-%COMP%]{margin-left:0;margin-right:0;margin-bottom:0}.m-b-only[_ngcontent-%COMP%]{margin-left:0;margin-right:0;margin-top:0}.m-l-only[_ngcontent-%COMP%]{margin-right:0;margin-top:0;margin-bottom:0}.m-r-only[_ngcontent-%COMP%]{margin-left:0;margin-top:0;margin-bottom:0}.m-auto[_ngcontent-%COMP%]{margin-left:auto;margin-right:auto}.ls-0[_ngcontent-%COMP%]{margin-left:10px;margin-right:10px}html[_ngcontent-%COMP%], body[_ngcontent-%COMP%]{-webkit-tap-highlight-color:transparent}div[_ngcontent-%COMP%]{box-sizing:border-box}.color-inherit[_ngcontent-%COMP%]{color:inherit}.no-shadow[_ngcontent-%COMP%]{box-shadow:none}.pointer[_ngcontent-%COMP%]{cursor:pointer}.nolist[_ngcontent-%COMP%]{list-style:none}.actions-menu[_ngcontent-%COMP%]{color:#fff}.alert[_ngcontent-%COMP%]{background-color:#e8f4fd;padding:6px 16px;font-size:.875rem;font-family:Roboto,Helvetica Neue,sans-serif;font-weight:400;line-height:1.43;border-radius:4px;letter-spacing:normal;margin:10px}.alert[_ngcontent-%COMP%] .message[_ngcontent-%COMP%]{padding:8px 0;font-size:18px}.alert[_ngcontent-%COMP%] .alert-check[_ngcontent-%COMP%]{color:#359ff4;margin-right:2px;font-size:1.4rem} .mat-tooltip{font-size:15px;color:#fff!important;background-color:#4461e2b3;border:1px solid rgb(25.7777777778,51.5555555556,166.2222222222);max-width:400px!important;white-space:pre-line!important}.loading[_ngcontent-%COMP%]{position:absolute;min-width:100%;width:100px;height:12px;background:linear-gradient(125deg,#fff,#4461e2,#fff);animation:grow 4s linear infinite,move 4s linear infinite}mat-card-title[_ngcontent-%COMP%]{font-weight:600;font-size:x-large;padding-left:20px;padding-top:20px}html[_ngcontent-%COMP%], body[_ngcontent-%COMP%]{overflow:hidden}.overflow-x-scroll[_ngcontent-%COMP%]{max-width:100%;overflow-x:auto}.overflow-no[_ngcontent-%COMP%]{overflow:hidden}.overflow-auto[_ngcontent-%COMP%]{overflow:auto}.overflow-scroll[_ngcontent-%COMP%]{overflow:scroll}.table-container[_ngcontent-%COMP%]{overflow-x:auto;max-width:100%}body[_ngcontent-%COMP%], .no-p[_ngcontent-%COMP%]{padding:0}.no-p-t[_ngcontent-%COMP%]{padding-top:0}.no-p-r[_ngcontent-%COMP%]{padding-right:0}.no-p-b[_ngcontent-%COMP%]{padding-bottom:0}.no-p-l[_ngcontent-%COMP%]{padding-left:0}.no-p-v[_ngcontent-%COMP%], .no-p-h[_ngcontent-%COMP%]{padding:0}.p-5[_ngcontent-%COMP%]{padding:5px}.p-t-5[_ngcontent-%COMP%]{padding-top:5px}.p-r-5[_ngcontent-%COMP%]{padding-right:5px}.p-b-5[_ngcontent-%COMP%]{padding-bottom:5px}.p-l-5[_ngcontent-%COMP%]{padding-left:5px}.p-v-5[_ngcontent-%COMP%]{padding:5px 0}.p-h-5[_ngcontent-%COMP%]{padding:0 5px}.p-10[_ngcontent-%COMP%]{padding:10px}.p-t-10[_ngcontent-%COMP%]{padding-top:10px}.p-b-10[_ngcontent-%COMP%]{padding-bottom:10px}.p-v-10[_ngcontent-%COMP%]{padding:10px 0}.p-h-10[_ngcontent-%COMP%]{padding:0 10px}.p-15[_ngcontent-%COMP%]{padding:15px}.p-t-15[_ngcontent-%COMP%]{padding-top:15px}.p-r-15[_ngcontent-%COMP%]{padding-right:15px}.p-b-15[_ngcontent-%COMP%]{padding-bottom:15px}.p-l-15[_ngcontent-%COMP%]{padding-left:15px}.p-v-15[_ngcontent-%COMP%]{padding:15px 0}.p-h-15[_ngcontent-%COMP%]{padding:0 15px}.p-20[_ngcontent-%COMP%]{padding:20px}.p-t-20[_ngcontent-%COMP%]{padding-top:20px}.p-r-20[_ngcontent-%COMP%]{padding-right:20px}.p-b-20[_ngcontent-%COMP%]{padding-bottom:20px}.p-l-20[_ngcontent-%COMP%]{padding-left:20px}.p-v-20[_ngcontent-%COMP%]{padding:20px 0}.p-h-20[_ngcontent-%COMP%]{padding:0 20px}.p-25[_ngcontent-%COMP%]{padding:25px}.p-t-25[_ngcontent-%COMP%]{padding-top:25px}.p-r-25[_ngcontent-%COMP%]{padding-right:25px}.p-b-25[_ngcontent-%COMP%]{padding-bottom:25px}.p-l-25[_ngcontent-%COMP%]{padding-left:25px}.p-v-25[_ngcontent-%COMP%]{padding:25px 0}.p-h-25[_ngcontent-%COMP%]{padding:0 25px}.p-30[_ngcontent-%COMP%]{padding:30px}.p-t-30[_ngcontent-%COMP%]{padding-top:30px}.p-r-30[_ngcontent-%COMP%]{padding-right:30px}.p-b-30[_ngcontent-%COMP%]{padding-bottom:30px}.p-l-30[_ngcontent-%COMP%]{padding-left:30px}.p-v-30[_ngcontent-%COMP%]{padding:30px 0}.p-h-30[_ngcontent-%COMP%]{padding:0 30px}.p-35[_ngcontent-%COMP%]{padding:35px}.p-t-35[_ngcontent-%COMP%]{padding-top:35px}.p-r-35[_ngcontent-%COMP%]{padding-right:35px}.p-b-35[_ngcontent-%COMP%]{padding-bottom:35px}.p-l-35[_ngcontent-%COMP%]{padding-left:35px}.p-v-35[_ngcontent-%COMP%]{padding:35px 0}.p-h-35[_ngcontent-%COMP%]{padding:0 35px}.p-40[_ngcontent-%COMP%]{padding:40px}.p-t-40[_ngcontent-%COMP%]{padding-top:40px}.p-r-40[_ngcontent-%COMP%]{padding-right:40px}.p-b-40[_ngcontent-%COMP%]{padding-bottom:40px}.p-l-40[_ngcontent-%COMP%]{padding-left:40px}.p-v-40[_ngcontent-%COMP%]{padding-top:40px;padding-bottom:40px}.p-h-40[_ngcontent-%COMP%]{padding:0 40px}.p-45[_ngcontent-%COMP%]{padding:45px}.p-t-45[_ngcontent-%COMP%]{padding-top:45px}.p-r-45[_ngcontent-%COMP%]{padding-right:45px}.p-b-45[_ngcontent-%COMP%]{padding-bottom:45px}.p-l-45[_ngcontent-%COMP%]{padding-left:45px}.p-v-45[_ngcontent-%COMP%]{padding:45px 0}.p-h-45[_ngcontent-%COMP%]{padding:0 45px}.p-50[_ngcontent-%COMP%]{padding:50px}.p-t-50[_ngcontent-%COMP%]{padding-top:50px}.p-r-50[_ngcontent-%COMP%]{padding-right:50px}.p-b-50[_ngcontent-%COMP%]{padding-bottom:50px}.p-l-50[_ngcontent-%COMP%]{padding-left:50px}.p-v-50[_ngcontent-%COMP%]{padding:50px 0}.p-h-50[_ngcontent-%COMP%]{padding:0 50px}.p-55[_ngcontent-%COMP%]{padding:55px}.p-t-55[_ngcontent-%COMP%]{padding-top:55px}.p-r-55[_ngcontent-%COMP%]{padding-right:55px}.p-b-55[_ngcontent-%COMP%]{padding-bottom:55px}.p-l-55[_ngcontent-%COMP%]{padding-left:55px}.p-v-55[_ngcontent-%COMP%]{padding:55px 0}.p-h-55[_ngcontent-%COMP%]{padding:0 55px}.p-60[_ngcontent-%COMP%]{padding:60px}.p-t-60[_ngcontent-%COMP%]{padding-top:60px}.p-r-60[_ngcontent-%COMP%]{padding-right:60px}.p-b-60[_ngcontent-%COMP%]{padding-bottom:60px}.p-l-60[_ngcontent-%COMP%]{padding-left:60px}.p-v-60[_ngcontent-%COMP%]{padding:60px 0}.p-h-60[_ngcontent-%COMP%]{padding:0 60px}.p-65[_ngcontent-%COMP%]{padding:65px}.p-t-65[_ngcontent-%COMP%]{padding-top:65px}.p-r-65[_ngcontent-%COMP%]{padding-right:65px}.p-b-65[_ngcontent-%COMP%]{padding-bottom:65px}.p-l-65[_ngcontent-%COMP%]{padding-left:65px}.p-v-65[_ngcontent-%COMP%]{padding:65px 0}.p-h-65[_ngcontent-%COMP%]{padding:0 65px}.p-70[_ngcontent-%COMP%]{padding:70px}.p-t-70[_ngcontent-%COMP%]{padding-top:70px}.p-r-70[_ngcontent-%COMP%]{padding-right:70px}.p-b-70[_ngcontent-%COMP%]{padding-bottom:70px}.p-l-70[_ngcontent-%COMP%]{padding-left:70px}.p-v-70[_ngcontent-%COMP%]{padding:70px 0}.p-h-70[_ngcontent-%COMP%]{padding:0 70px}.p-75[_ngcontent-%COMP%]{padding:75px}.p-t-75[_ngcontent-%COMP%]{padding-top:75px}.p-r-75[_ngcontent-%COMP%]{padding-right:75px}.p-b-75[_ngcontent-%COMP%]{padding-bottom:75px}.p-l-75[_ngcontent-%COMP%]{padding-left:75px}.p-v-75[_ngcontent-%COMP%]{padding:75px 0}.p-h-75[_ngcontent-%COMP%]{padding:0 75px}.p-80[_ngcontent-%COMP%]{padding:80px}.p-t-80[_ngcontent-%COMP%]{padding-top:80px}.p-r-80[_ngcontent-%COMP%]{padding-right:80px}.p-b-80[_ngcontent-%COMP%]{padding-bottom:80px}.p-l-80[_ngcontent-%COMP%]{padding-left:80px}.p-v-80[_ngcontent-%COMP%]{padding:80px 0}.p-h-80[_ngcontent-%COMP%]{padding:0 80px}.no-padding[_ngcontent-%COMP%]{padding:0!important}.no-pad-lr[_ngcontent-%COMP%], .no-pad-rl[_ngcontent-%COMP%]{padding-left:0;padding-right:0}.no-pad-tb[_ngcontent-%COMP%], .no-pad-bt[_ngcontent-%COMP%]{padding-top:0;padding-bottom:0}.pad-t-only[_ngcontent-%COMP%]{padding-left:0;padding-right:0;padding-bottom:0}.pad-b-only[_ngcontent-%COMP%]{padding-left:0;padding-right:0;padding-top:0}.pad-l-only[_ngcontent-%COMP%]{padding-right:0;padding-top:0;padding-bottom:0}.pad-r-only[_ngcontent-%COMP%]{padding-left:0;padding-top:0;padding-bottom:0}html[_ngcontent-%COMP%], body[_ngcontent-%COMP%], .rel[_ngcontent-%COMP%], .relative[_ngcontent-%COMP%]{position:relative}.abs[_ngcontent-%COMP%], .absolute[_ngcontent-%COMP%]{position:absolute}.fixed[_ngcontent-%COMP%]{position:fixed}.status-active[_ngcontent-%COMP%]{color:#5cb85c}.status-inactive[_ngcontent-%COMP%]{color:#666f73}.status-deleted[_ngcontent-%COMP%]{color:#000}.status-pending[_ngcontent-%COMP%]{color:orange}.status-approved[_ngcontent-%COMP%]{color:#4461e2}.status-overpaid[_ngcontent-%COMP%]{color:purple}.status-chargeoff[_ngcontent-%COMP%]{color:#f39c12}.status-active-overdue[_ngcontent-%COMP%], .status-block[_ngcontent-%COMP%]{color:red}.status-matured[_ngcontent-%COMP%]{color:#ff4000}.subStatus-contract-termination[_ngcontent-%COMP%]{color:#b3b3b3}.mat-step-header[_ngcontent-%COMP%] .mat-step-icon-state-done[_ngcontent-%COMP%]{background-color:#2af72a}.mat-step-header[_ngcontent-%COMP%] .mat-step-icon-state-done[_ngcontent-%COMP%] .status-transfer-progress[_ngcontent-%COMP%]{color:#ff4000}.mat-step-header[_ngcontent-%COMP%] .mat-step-icon-state-done[_ngcontent-%COMP%] .status-transfer-hold[_ngcontent-%COMP%]{color:#df0101}html[_ngcontent-%COMP%], body[_ngcontent-%COMP%]{-webkit-font-smoothing:antialiased}html[_ngcontent-%COMP%]{font-size:16px}body[_ngcontent-%COMP%]{font-family:Roboto,Helvetica Neue,sans-serif;font-weight:400;font-size:14px;color:#000000de;line-height:1.5;letter-spacing:normal}.mat-h1[_ngcontent-%COMP%], .mat-headline[_ngcontent-%COMP%], .mat-typography[_ngcontent-%COMP%] .mat-h1[_ngcontent-%COMP%], .mat-typography[_ngcontent-%COMP%] .mat-headline[_ngcontent-%COMP%], .mat-typography[_ngcontent-%COMP%] h1[_ngcontent-%COMP%]{font:400 24px/32px Roboto,Helvetica Neue,sans-serif;letter-spacing:normal;margin:0 0 16px}.lh-1[_ngcontent-%COMP%]{line-height:1}.lh-13[_ngcontent-%COMP%]{line-height:1.3}.lh-15[_ngcontent-%COMP%]{line-height:1.5}.bold[_ngcontent-%COMP%], .strong[_ngcontent-%COMP%]{font-weight:700}.no-bold[_ngcontent-%COMP%]{font-weight:400}.italic[_ngcontent-%COMP%], .em[_ngcontent-%COMP%]{font-style:italic}.strike[_ngcontent-%COMP%]{text-decoration:line-through}.normal[_ngcontent-%COMP%]{font-weight:400;font-style:normal}.uppercase[_ngcontent-%COMP%]{text-transform:uppercase}.text-left[_ngcontent-%COMP%]{text-align:left}.text-center[_ngcontent-%COMP%]{text-align:center}.text-right[_ngcontent-%COMP%]{text-align:right}.w100[_ngcontent-%COMP%]{font-weight:100}.w200[_ngcontent-%COMP%]{font-weight:200}.w300[_ngcontent-%COMP%]{font-weight:300}.w400[_ngcontent-%COMP%]{font-weight:400}.w500[_ngcontent-%COMP%]{font-weight:500}.w600[_ngcontent-%COMP%]{font-weight:600}.w700[_ngcontent-%COMP%]{font-weight:700}.w800[_ngcontent-%COMP%]{font-weight:800}.w900[_ngcontent-%COMP%]{font-weight:900}.f9[_ngcontent-%COMP%]{font-size:9px}.f10[_ngcontent-%COMP%]{font-size:10px}.f11[_ngcontent-%COMP%]{font-size:11px}.f12[_ngcontent-%COMP%]{font-size:12px}.f13[_ngcontent-%COMP%]{font-size:13px}.f14[_ngcontent-%COMP%]{font-size:14px}.f15[_ngcontent-%COMP%]{font-size:15px}.f16[_ngcontent-%COMP%]{font-size:16px}.f17[_ngcontent-%COMP%]{font-size:17px}.f18[_ngcontent-%COMP%]{font-size:18px;line-height:30px}.f19[_ngcontent-%COMP%]{font-size:19px}.f20[_ngcontent-%COMP%]{font-size:20px}.f30[_ngcontent-%COMP%]{font-size:30px}.f40[_ngcontent-%COMP%]{font-size:40px}.f50[_ngcontent-%COMP%]{font-size:50px}.f60[_ngcontent-%COMP%]{font-size:60px}.size-small[_ngcontent-%COMP%]{font-size:75%}.size-normal[_ngcontent-%COMP%]{font-size:100%}.size-medium[_ngcontent-%COMP%]{font-size:125%}.size-big[_ngcontent-%COMP%], .size-large[_ngcontent-%COMP%]{font-size:150%}.size-huge[_ngcontent-%COMP%]{font-size:200%}.inherit[_ngcontent-%COMP%]{font:inherit}.text-shadow[_ngcontent-%COMP%]{text-shadow:1px 1px 1px rgba(0,0,0,.4)}.text-rgb-2[_ngcontent-%COMP%]{color:#0003}.text-rgb-3[_ngcontent-%COMP%]{color:#0000004d}.text-rgb-4[_ngcontent-%COMP%]{color:#0006}.text-rgb-5[_ngcontent-%COMP%]{color:#00000080}.no-ul[_ngcontent-%COMP%], .no-ul[_ngcontent-%COMP%]:hover, .no-ul[_ngcontent-%COMP%] a[_ngcontent-%COMP%], .no-ul[_ngcontent-%COMP%] a[_ngcontent-%COMP%]:hover{text-decoration:none}.no-wrap[_ngcontent-%COMP%]{white-space:nowrap}.auto-cell-size[_ngcontent-%COMP%]{white-space:nowrap;width:1%}.ls-0[_ngcontent-%COMP%]{letter-spacing:-3px;white-space:nowrap}.label-field[_ngcontent-%COMP%]{margin-top:32px}.wrap-content[_ngcontent-%COMP%]{overflow-wrap:break-word;word-wrap:break-word}.no-break-content[_ngcontent-%COMP%]{overflow-wrap:anywhere!important}.fit[_ngcontent-%COMP%]{max-width:100%}.half-width[_ngcontent-%COMP%]{width:50%}.full-width[_ngcontent-%COMP%]{width:100%}.full-height[_ngcontent-%COMP%]{height:100%}html[_ngcontent-%COMP%], body[_ngcontent-%COMP%]{width:100%;height:100%;min-height:100%}body[_ngcontent-%COMP%] table[_ngcontent-%COMP%]{width:100%}.container[_ngcontent-%COMP%]{max-width:74rem;width:90%}.mw300[_ngcontent-%COMP%]{max-width:300px}.mw400[_ngcontent-%COMP%]{max-width:400px}.mw500[_ngcontent-%COMP%]{max-width:500px}.mw600[_ngcontent-%COMP%]{max-width:600px}.fullwidth[_ngcontent-%COMP%]{width:100%}.zindex-1[_ngcontent-%COMP%]{z-index:1}.zindex-2[_ngcontent-%COMP%]{z-index:2}.zindex-3[_ngcontent-%COMP%]{z-index:3}.zindex-4[_ngcontent-%COMP%]{z-index:4}.not-found-container[_ngcontent-%COMP%]{height:100%;display:flex;flex-direction:column;justify-content:center;align-items:center;background:#3498db;color:#fff}#title[_ngcontent-%COMP%]{font-size:160px;font-weight:bolder}"]})}}return e})();var wle=new Bs("ErrorHandlerInterceptor"),vf=(()=>{class e{constructor(){this.alertService=T(wr),this.translate=T(yi)}intercept(t,n){return n.handle(t).pipe(fg(i=>this.handleError(i,t)))}handleError(t,n){let i=t.status,s=t.error.developerMessage||t.message;t.error.errors&&t.error.errors[0]&&(s=t.error.errors[0].defaultUserMessage||t.error.errors[0].developerMessage);let d=i===404&&n.url.includes("/clients/")&&n.url.includes("/images");if(!un.production&&!d&&wle.error(`Request Error: ${s}`),i===401||un.oauth.enabled&&i===400)this.alertService.alert({type:"Authentication Error",message:"Invalid User Details. Please try again!"});else if(i===403&&s==="The provided one time token is invalid")this.alertService.alert({type:"Invalid Token",message:"Invalid Token. Please try again!"});else if(i===400)this.alertService.alert({type:"Bad Request",message:s||"Invalid parameters were passed in the request!"});else if(i===403)this.alertService.alert({type:"Unauthorized Request",message:s||"You are not authorized for this request!"});else if(i===404){if(d)return X7;this.alertService.alert({type:this.translate.instant("error.resource.not.found"),message:s||"Resource does not exist!"})}else i===500?this.alertService.alert({type:"Internal Server Error",message:"Internal Server Error. Please try again later."}):i===501?this.alertService.alert({type:this.translate.instant("error.resource.notImplemented.type"),message:this.translate.instant("error.resource.notImplemented.message")}):this.alertService.alert({type:"Unknown Error",message:"Unknown Error. Please try again later."});throw t}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275prov=Re({token:e,factory:e.\u0275fac})}}return e})();var Y8=Es(vd());var d4=new Bs("HttpCacheService"),y_=(()=>{class e{constructor(){this.cachePersistenceStorageKey="mifosXHttpCache",this.cachedData={},this.storage=null,this.loadCacheData()}setCacheData(t,n,i){this.cachedData[t]={lastUpdated:i||new Date,data:n},d4.debug(`Cache set for key: "${t}"`),this.saveCacheData()}getCacheData(t){let n=this.cachedData[t];return n?(d4.debug(`Cache hit for key: "${t}"`),n.data):null}getHttpCacheEntry(t){return this.cachedData[t]||null}clearCache(t){delete this.cachedData[t],d4.debug(`Cache cleared for key: "${t}"`),this.saveCacheData()}cleanCache(t){t?(0,Y8.each)(this.cachedData,(n,i)=>{t>=n.lastUpdated&&delete this.cachedData[i]}):this.cachedData={},this.saveCacheData()}setPersistence(t){this.cleanCache(),this.storage=t==="local"?window.localStorage:t==="session"?window.sessionStorage:null,this.loadCacheData()}saveCacheData(){this.storage&&(this.storage[this.cachePersistenceStorageKey]=JSON.stringify(this.cachedData))}loadCacheData(){let t=this.storage?this.storage[this.cachePersistenceStorageKey]:null;this.cachedData=t?JSON.parse(t):{}}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275prov=Re({token:e,factory:e.\u0275fac})}}return e})();var S_=(()=>{class e{constructor(t){this.httpCacheService=t,this.forceUpdate=!1}configure(t){let n=new e(this.httpCacheService);return t&&t.update&&(n.forceUpdate=!0),n}intercept(t,n){return t.method!=="GET"?n.handle(t):new af(i=>{let s=this.forceUpdate?null:this.httpCacheService.getCacheData(t.urlWithParams);s!==null?(i.next(new AT(s)),i.complete()):n.handle(t).subscribe(d=>{un.httpCacheEnabled&&d instanceof AT&&this.httpCacheService.setCacheData(t.urlWithParams,d),i.next(d)},d=>i.error(d),()=>i.complete())})}static{this.\u0275fac=function(n){return new(n||e)(gl(y_))}}static{this.\u0275prov=Re({token:e,factory:e.\u0275fac})}}return e})();var bf=(()=>{class e{constructor(){this.settingsService=T(At)}intercept(t,n){let i=this.settingsService.serverUrl;return/^\/(v[1-9][0-9]*\/).*$/.test(t.url)&&(i=this.settingsService.baseServerUrl),t.url.includes("/actuator/")&&(i=this.settingsService.serverHost),!t.url.includes("http:")&&!t.url.includes("https:")&&(t=t.clone({url:i+t.url})),n.handle(t)}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275prov=Re({token:e,factory:e.\u0275fac})}}return e})();var u4=class{constructor(o,t){this.next=o,this.interceptor=t}handle(o){return this.interceptor.intercept(o,this.next)}},f4=new u0("HTTP_DYNAMIC_INTERCEPTORS"),J8=(()=>{class e extends ko{constructor(t,n,i=[]){super(t),this.httpHandler=t,this.injector=n,this.interceptors=i,this.interceptors||(this.interceptors=[this.injector.get(bf),this.injector.get(vf)])}cache(t){let n=this.injector.get(S_).configure({update:t});return this.addInterceptor(n)}skipErrorHandler(){return this.removeInterceptor(vf)}disableApiPrefix(){return this.removeInterceptor(bf)}request(t,n,i){let s=this.interceptors.reduceRight((d,u)=>new u4(d,u),this.httpHandler);return new ko(s).request(t,n,i)}removeInterceptor(t){return new e(this.httpHandler,this.injector,this.interceptors.filter(n=>!(n instanceof t)))}addInterceptor(t){return new e(this.httpHandler,this.injector,this.interceptors.concat([t]))}static{this.\u0275fac=function(n){return new(n||e)(gl(Tg),gl(Cp),gl(f4,8))}}static{this.\u0275prov=Re({token:e,factory:e.\u0275fac})}}return e})();var sc=(()=>{class e{constructor(){this.requestsRunning=0,this.updateProgressBar=new bi}getRequestsRunning(){return this.requestsRunning}increase(){this.requestsRunning++,this.requestsRunning===1&&this.updateProgressBar.emit("indeterminate")}decrease(){this.requestsRunning>0&&(this.requestsRunning--,this.requestsRunning===0&&this.updateProgressBar.emit("none"))}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275prov=Re({token:e,factory:e.\u0275fac})}}return e})();var Mle=new Bs("AuthenticationGuard"),w_=(()=>{class e{constructor(){this.router=T(qe),this.authenticationService=T(Wo)}canActivate(){return this.authenticationService.isAuthenticated()?!0:(Mle.debug("User not authenticated, redirecting to login..."),this.authenticationService.logout(),this.router.navigate(["/login"],{replaceUrl:!0}),!1)}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275prov=Re({token:e,factory:e.\u0275fac})}}return e})();var K8=(()=>{class e{constructor(){this.progressBarService=T(sc)}intercept(t,n){return this.progressBarService.increase(),n.handle(t).pipe(Js(()=>{this.progressBarService.decrease()}))}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275prov=Re({token:e,factory:e.\u0275fac})}}return e})();var X8=(()=>{class e extends Eg{shouldDetach(t){return!1}store(t,n){}shouldAttach(t){return!1}retrieve(t){return null}shouldReuseRoute(t,n){return t.routeConfig===n.routeConfig||t.data.reuse}static{this.\u0275fac=(()=>{let t;return function(i){return(t||(t=hg(e)))(i||e)}})()}static{this.\u0275prov=Re({token:e,factory:e.\u0275fac})}}return e})();var Lc=class{constructor(o,t,n){this.overlayRef=o,this.positionStrategy=t,this.config=n,this.afterClosedSubject=new Nr,n.disableClose||(this.overlayRef.backdropClick().subscribe(()=>{}),this.overlayRef.keydownEvents().pipe(Fc(i=>i.key==="Escape")).subscribe(()=>{}))}close(o){this.afterClosedSubject.next(o),this.afterClosedSubject.complete(),this.overlayRef.dispose()}afterClosed(){return this.afterClosedSubject.asObservable()}positionChanges(){return this.positionStrategy.positionChanges}};var Z8=(()=>{class e{constructor(){this.popoverRef=T(Lc),this.cd=T(ts),this.subscription=new of;let t=this.popoverRef;this.arrowSize=t.config.arrowSize,this.subscription=t.positionChanges().subscribe(n=>{let{offsetX:i,offsetY:s}=n.connectionPair;this.offsetTop=s>=0?s*-1:null,this.offsetLeft=i<0?i*-1:null,this.offsetBottom=s<0?s:null,this.offsetRight=i>=0?i:null,this.cd.detectChanges()})}ngOnDestroy(){this.subscription.unsubscribe()}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275dir=md({type:e,selectors:[["","mifosxPopoverArrow",""]],hostVars:12,hostBindings:function(n,i){n&2&&vp("width",i.arrowSize,"px")("height",i.arrowSize,"px")("top",i.offsetTop,"px")("right",i.offsetRight,"px")("bottom",i.offsetBottom,"px")("left",i.offsetLeft,"px")}})}}return e})();var P_=(()=>{class e extends VF{attachComponentPortal(t){return this.portalOutlet.attachComponentPortal(t)}attachTemplatePortal(t){return this.portalOutlet.attachTemplatePortal(t)}static{this.\u0275fac=(()=>{let t;return function(i){return(t||(t=hg(e)))(i||e)}})()}static{this.\u0275cmp=me({type:e,selectors:[["mifosx-popover"]],viewQuery:function(n,i){if(n&1&&Ee(kT,7),n&2){let s;Te(s=Me())&&(i.portalOutlet=s.first)}},features:[Cg],decls:2,vars:0,consts:[["cdkPortalOutlet",""],["mifosxPopoverArrow","",1,"arrow"]],template:function(n,i){n&1&&(_l(0,0),b(1,"div",1))},dependencies:[ue,fe,kT,Z8],styles:["[_nghost-%COMP%]{position:relative;background:#fff;border-radius:8px;padding:20px}.arrow[_ngcontent-%COMP%]{position:absolute;background:inherit;z-index:-1}.center[_nghost-%COMP%] .arrow[_ngcontent-%COMP%], .center [_nghost-%COMP%] .arrow[_ngcontent-%COMP%]{left:50%}.top.left[_nghost-%COMP%] .arrow[_ngcontent-%COMP%], .top.left [_nghost-%COMP%] .arrow[_ngcontent-%COMP%], .top.center[_nghost-%COMP%] .arrow[_ngcontent-%COMP%], .top.center [_nghost-%COMP%] .arrow[_ngcontent-%COMP%]{transform-origin:top left;transform:rotate(45deg)}.top.right[_nghost-%COMP%] .arrow[_ngcontent-%COMP%], .top.right [_nghost-%COMP%] .arrow[_ngcontent-%COMP%]{transform-origin:top right;transform:rotate(-45deg)}.bottom.left[_nghost-%COMP%] .arrow[_ngcontent-%COMP%], .bottom.left [_nghost-%COMP%] .arrow[_ngcontent-%COMP%], .bottom.center[_nghost-%COMP%] .arrow[_ngcontent-%COMP%], .bottom.center [_nghost-%COMP%] .arrow[_ngcontent-%COMP%]{transform-origin:bottom left;transform:rotate(-45deg)}.bottom.right[_nghost-%COMP%] .arrow[_ngcontent-%COMP%], .bottom.right [_nghost-%COMP%] .arrow[_ngcontent-%COMP%]{transform-origin:bottom right;transform:rotate(45deg)}.center.left[_nghost-%COMP%] .arrow[_ngcontent-%COMP%], .center.left [_nghost-%COMP%] .arrow[_ngcontent-%COMP%]{left:0%;top:50%;transform-origin:center left;transform:rotate(-45deg)}.center.right[_nghost-%COMP%] .arrow[_ngcontent-%COMP%], .center.right [_nghost-%COMP%] .arrow[_ngcontent-%COMP%]{left:98%;top:50%;transform-origin:center left;transform:rotate(-45deg)}"]})}}return e})();var Dle=new u0("popover.data"),Ele={backdropClass:"",disableClose:!1,panelClass:"",arrowOffset:30,arrowSize:20},Wi=(()=>{class e{constructor(){this.overlay=T(qF),this.injector=T(Cp)}open(t,n,i,s,d={}){let u=Object.assign({},Ele,d),f=u.arrowSize,_=u.arrowOffset,C=f/2,x,y;i==="bottom"?y=[{overlayX:"center",overlayY:"top",originX:"center",originY:"bottom",panelClass:["top","center"],offsetY:C},{overlayX:"start",overlayY:"top",originX:"center",originY:"bottom",panelClass:["top","left"],offsetX:-1*_,offsetY:C},{overlayX:"end",overlayY:"top",originX:"center",originY:"bottom",panelClass:["top","right"],offsetX:_,offsetY:C}]:i==="top"?y=[{overlayX:"center",overlayY:"bottom",originX:"center",originY:"top",panelClass:["bottom","center"],offsetY:-1*C},{overlayX:"start",overlayY:"bottom",originX:"center",originY:"top",panelClass:["bottom","left"],offsetX:-1*_,offsetY:-1*C},{overlayX:"end",overlayY:"bottom",originX:"center",originY:"top",panelClass:["bottom","right"],offsetX:_,offsetY:-1*C}]:i==="right"?y=[{originX:"end",originY:"center",overlayX:"start",overlayY:"center",panelClass:["center","left"],offsetX:.5*_,offsetY:-1*C}]:i==="left"&&(y=[{originX:"start",originY:"center",overlayX:"end",overlayY:"center",panelClass:["center","right"],offsetX:-.5*_,offsetY:-1*C}]),s===!0?x=!0:x=!1;let P=this.overlay.position().flexibleConnectedTo(n).withPush(!1).withFlexibleDimensions(!1).withPositions(y),S=this.overlay.create({hasBackdrop:x,backdropClass:d.backdropClass,panelClass:d.panelClass,positionStrategy:P,scrollStrategy:this.overlay.scrollStrategies.reposition()}),M=new Lc(S,P,u),D=S.attach(new FT(P_,null,Cp.create({parent:this.injector,providers:[{provide:Lc,useValue:M}]}))).instance;return t instanceof _F?D.attachTemplatePortal(new LF(t,null,{$implicit:d.data,popover:M})):D.attachComponentPortal(new FT(t,null,Cp.create({parent:this.injector,providers:[{provide:Dle,useValue:d.data},{provide:Lc,useValue:M}]}))),M}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275prov=Re({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();var Qi=(()=>{class e{constructor(){this.showToolbar=!1,this.showToolbarAdmin=!1,this.showSideNav=!1,this.showSideNavChartofAccounts=!1,this.showBreadcrumbs=!1,this.showHome=!1,this.showHomeSearchActivity=!1,this.showCreateOffice=!1,this.showOfficeList=!1,this.showOfficeTable=!1,this.showOfficeForm=!1,this.showAddEditCurrency=!1,this.showCurrencyPage=!1,this.showCurrencyList=!1,this.showCurrencyForm=!1,this.showCreateHoliday=!1,this.showHolidayPage=!1,this.showHolidayFilter=!1,this.showCreateEmployee=!1,this.showEmployeeList=!1,this.showEmployeeTable=!1,this.showEmployeeForm=!1,this.showDefineWorkingDays=!1,this.showDatatables=!1,this.showDatatablesPage=!1,this.showDatatablesList=!1,this.showDatatablesForm=!1,this.showSystemCodes=!1,this.showSystemCodesPage=!1,this.showSystemCodesList=!1,this.showSystemCodesForm=!1,this.showRolesandPermission=!1,this.showRolesandPermissionPage=!1,this.showRolesandPermissionList=!1,this.showUsers=!1,this.showUsersList=!1,this.showUsersForm=!1,this.showMakerCheckerTable=!1,this.showMakerCheckerTablePage=!1,this.showMakerCheckerTableList=!1,this.showConfigurations=!1,this.showConfigurationsPage=!1,this.showConfigurationsList=!1,this.showSchedulerJobs=!1,this.showSchedulerJobsPage=!1,this.showSchedulerJobsList=!1,this.showChartofAccounts=!1,this.showChartofAccountsPage=!1,this.showChartofAccountsList=!1,this.showChartofAccountsForm=!1,this.showAccountsLinked=!1,this.showAccountsLinkedPage=!1,this.showAccountsLinkedList=!1,this.showMigrateOpeningBalances=!1,this.showClosingEntries=!1,this.showClosingEntriesPage=!1,this.showClosingEntriesList=!1,this.showCreateJournalEntries=!1,this.showCharges=!1,this.showChargesPage=!1,this.showChargesList=!1,this.showLoanProducts=!1,this.showLoanProductsPage=!1,this.showLoanProductsList=!1,this.showSavingsProducts=!1,this.showSavingsProductsPage=!1,this.showSavingsProductsList=!1,this.showShareProducts=!1,this.showShareProductsPage=!1,this.showShareProductsList=!1,this.showFixedDepositProducts=!1,this.showFixedDepositProductsPage=!1,this.showFixedDepositProductsList=!1,this.showRecurringDepositProducts=!1,this.showRecurringDepositProductsPage=!1,this.showRecurringDepositProductsList=!1,this.showManageFunds=!1,this.showManageReports=!1}closeConfigWizard(){this.showToolbar=!1,this.showToolbarAdmin=!1,this.showSideNav=!1,this.showSideNavChartofAccounts=!1,this.showBreadcrumbs=!1,this.showHome=!1,this.showHomeSearchActivity=!1,this.showCreateOffice=!1,this.showOfficeList=!1,this.showOfficeTable=!1,this.showOfficeForm=!1,this.showAddEditCurrency=!1,this.showCurrencyPage=!1,this.showCurrencyList=!1,this.showCurrencyForm=!1,this.showCreateHoliday=!1,this.showHolidayPage=!1,this.showHolidayFilter=!1,this.showCreateEmployee=!1,this.showEmployeeList=!1,this.showEmployeeTable=!1,this.showEmployeeForm=!1,this.showDefineWorkingDays=!1,this.showDatatables=!1,this.showDatatablesPage=!1,this.showDatatablesList=!1,this.showDatatablesForm=!1,this.showSystemCodes=!1,this.showSystemCodesPage=!1,this.showSystemCodesList=!1,this.showSystemCodesForm=!1,this.showRolesandPermission=!1,this.showRolesandPermissionPage=!1,this.showRolesandPermissionList=!1,this.showUsers=!1,this.showUsersList=!1,this.showUsersForm=!1,this.showMakerCheckerTable=!1,this.showMakerCheckerTablePage=!1,this.showMakerCheckerTableList=!1,this.showConfigurations=!1,this.showConfigurationsPage=!1,this.showConfigurationsList=!1,this.showSchedulerJobs=!1,this.showSchedulerJobsPage=!1,this.showSchedulerJobsList=!1,this.showChartofAccounts=!1,this.showChartofAccountsPage=!1,this.showChartofAccountsList=!1,this.showChartofAccountsForm=!1,this.showAccountsLinked=!1,this.showAccountsLinkedPage=!1,this.showAccountsLinkedList=!1,this.showMigrateOpeningBalances=!1,this.showClosingEntries=!1,this.showClosingEntriesPage=!1,this.showClosingEntriesList=!1,this.showCreateJournalEntries=!1,this.showCharges=!1,this.showChargesPage=!1,this.showChargesList=!1,this.showLoanProducts=!1,this.showLoanProductsPage=!1,this.showLoanProductsList=!1,this.showSavingsProducts=!1,this.showSavingsProductsPage=!1,this.showSavingsProductsList=!1,this.showShareProducts=!1,this.showShareProductsPage=!1,this.showShareProductsList=!1,this.showFixedDepositProducts=!1,this.showFixedDepositProductsPage=!1,this.showFixedDepositProductsList=!1,this.showRecurringDepositProducts=!1,this.showRecurringDepositProductsPage=!1,this.showRecurringDepositProductsList=!1,this.showManageFunds=!1,this.showManageReports=!1}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275prov=Re({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();var eB=[{path:"/clients",icon:"user",toolTip:"Clients"},{path:"/groups",icon:"users",toolTip:"Groups"},{path:"/centers",icon:"building",toolTip:"Centers"},{path:"/accounting",icon:"money-bill-alt",toolTip:"Accounting"},{path:"/reports",icon:"chart-bar",toolTip:"Reports"},{path:"/appusers",icon:"users",toolTip:"Users"},{path:"/organization",icon:"id-badge",toolTip:"Organization"},{path:"/system",icon:"cog",toolTip:"System"},{path:"/products",icon:"book",toolTip:"Products"},{path:"/templates",icon:"address-card",toolTip:"Templates"}];var Ile=["logo"],Ole=["templateLogo"],Ale=["chartOfAccounts"],Fle=["templateChartOfAccounts"],kle=(e,o)=>({"sidebar-full":e,"sidebar-compact":o}),Ble=()=>["/home"],Rle=()=>["/settings"],Nle=()=>["/dashboard"],Vc=()=>({exact:!1}),Lle=()=>["/navigation"],Vle=()=>["/checker-inbox-and-tasks/checker-inbox"],qle=()=>["/collections/collection-sheet"],zle=()=>["/collections/individual-collection-sheet"],Hle=()=>["/notifications"],Gle=()=>["/accounting/journal-entries/frequent-postings"],jle=()=>["/accounting/journal-entries/create"],$le=()=>["/accounting/chart-of-accounts"],Ule=e=>[e];function Wle(e,o){if(e&1&&(l(0,"div",34)(1,"button",53),b(2,"fa-icon",54),r()()),e&2){let t=o.$implicit,n=w();a(),g("matTooltipPosition",n.tooltipPosition)("matTooltip",t.toolTip)("routerLink",Nt(4,Ule,t.path)),a(),g("icon",t.icon)}}function Qle(e,o){if(e&1){let t=Y();l(0,"h2"),c(1),p(2,"translate"),r(),l(3,"p",55),c(4),p(5,"translate"),r(),l(6,"div",56)(7,"button",57),R("click",function(){let i=V(t).popover,s=w();return i.close(),q(s.configurationWizardService.closeConfigWizard())}),c(8),p(9,"translate"),r(),l(10,"button",58),R("click",function(){let i=V(t).popover,s=w();return i.close(),q(s.previousStep())}),c(11),p(12,"translate"),r(),l(13,"button",58),R("click",function(){let i=V(t).popover,s=w(),d=xe(14),u=xe(123);return i.close(),q(s.showPopover(u,d,"bottom",!0))}),c(14),p(15,"translate"),r()()}e&2&&(a(),h(m(2,5,"labels.text.Home")),a(3),h(m(5,7,"labels.text.Welcome page logo from anywhere")),a(4),v(" ",m(9,9,"labels.buttons.Close")," "),a(3),v(" ",m(12,11,"labels.buttons.Back")," "),a(3),v(" ",m(15,13,"labels.buttons.Next")," "))}function Yle(e,o){if(e&1){let t=Y();l(0,"h2"),c(1),p(2,"translate"),r(),l(3,"p",55),c(4),p(5,"translate"),r(),l(6,"div",56)(7,"button",57),R("click",function(){let i=V(t).popover,s=w();return i.close(),q(s.configurationWizardService.closeConfigWizard())}),c(8),p(9,"translate"),r(),l(10,"button",58),R("click",function(){let i=V(t).popover,s=w(),d=xe(5),u=xe(121);return i.close(),q(s.showPopover(u,d,"bottom",!0))}),c(11),p(12,"translate"),r(),l(13,"button",58),R("click",function(){let i=V(t).popover,s=w(),d=xe(23),u=xe(125);return i.close(),q(s.showPopover(u,d,"bottom",!0))}),c(14),p(15,"translate"),r()()}e&2&&(a(),h(m(2,5,"labels.menus.User Panel")),a(3),h(m(5,7,"labels.text.Section Buttons")),a(4),v(" ",m(9,9,"labels.buttons.Close")," "),a(3),v(" ",m(12,11,"labels.buttons.Back")," "),a(3),v(" ",m(15,13,"labels.buttons.Next")," "))}function Jle(e,o){if(e&1){let t=Y();l(0,"h2"),c(1),p(2,"translate"),r(),l(3,"p",55),c(4),p(5,"translate"),r(),l(6,"div",56)(7,"button",57),R("click",function(){let i=V(t).popover,s=w();return i.close(),q(s.configurationWizardService.closeConfigWizard())}),c(8),p(9,"translate"),r(),l(10,"button",58),R("click",function(){let i=V(t).popover,s=w(),d=xe(14),u=xe(123);return i.close(),q(s.showPopover(u,d,"bottom",!0))}),c(11),p(12,"translate"),r(),l(13,"button",58),R("click",function(){let i=V(t).popover,s=w(),d=xe(43),u=xe(127);return i.close(),q(s.showPopover(u,d,"bottom",!0))}),c(14),p(15,"translate"),r()()}e&2&&(a(),h(m(2,5,"labels.menus.Frequently Accessed")),a(3),h(m(5,7,"labels.text.Shortcut to the frequently accessed components")),a(4),v(" ",m(9,9,"labels.buttons.Close")," "),a(3),v(" ",m(12,11,"labels.buttons.Back")," "),a(3),v(" ",m(15,13,"labels.buttons.Next")," "))}function Kle(e,o){if(e&1){let t=Y();l(0,"h2"),c(1),p(2,"translate"),r(),l(3,"p",55),c(4),p(5,"translate"),r(),l(6,"div",56)(7,"button",57),R("click",function(){let i=V(t).popover,s=w();return i.close(),q(s.configurationWizardService.closeConfigWizard())}),c(8),p(9,"translate"),r(),l(10,"button",58),R("click",function(){let i=V(t).popover,s=w(),d=xe(23),u=xe(125);return i.close(),q(s.showPopover(u,d,"bottom",!0))}),c(11),p(12,"translate"),r(),l(13,"button",58),R("click",function(){let i=V(t).popover,s=w(),d=xe(51),u=xe(129);return i.close(),q(s.showPopover(u,d,"bottom",!0))}),c(14),p(15,"translate"),r()()}e&2&&(a(),h(m(2,5,"labels.menus.Dashboard")),a(3),h(m(5,7,"labels.text.User Dashboard Component")),a(4),v(" ",m(9,9,"labels.buttons.Close")," "),a(3),v(" ",m(12,11,"labels.buttons.Back")," "),a(3),v(" ",m(15,13,"labels.buttons.Next")," "))}function Xle(e,o){if(e&1){let t=Y();l(0,"h2"),c(1),p(2,"translate"),r(),l(3,"p",55),c(4),p(5,"translate"),r(),l(6,"div",56)(7,"button",57),R("click",function(){let i=V(t).popover,s=w();return i.close(),q(s.configurationWizardService.closeConfigWizard())}),c(8),p(9,"translate"),r(),l(10,"button",58),R("click",function(){let i=V(t).popover,s=w(),d=xe(43),u=xe(127);return i.close(),q(s.showPopover(u,d,"bottom",!0))}),c(11),p(12,"translate"),r(),l(13,"button",58),R("click",function(){let i=V(t).popover,s=w(),d=xe(87),u=xe(131);return i.close(),q(s.showPopover(u,d,"top",!0))}),c(14),p(15,"translate"),r()()}e&2&&(a(),h(m(2,5,"labels.menus.Navigation")),a(3),h(m(5,7,"labels.text.User Entity navigation screen")),a(4),v(" ",m(9,9,"labels.buttons.Close")," "),a(3),v(" ",m(12,11,"labels.buttons.Back")," "),a(3),v(" ",m(15,13,"labels.buttons.Next")," "))}function Zle(e,o){if(e&1){let t=Y();l(0,"h2"),c(1),p(2,"translate"),r(),l(3,"p",55),c(4),p(5,"translate"),r(),l(6,"div",56)(7,"button",57),R("click",function(){let i=V(t).popover,s=w();return i.close(),q(s.configurationWizardService.closeConfigWizard())}),c(8),p(9,"translate"),r(),l(10,"button",58),R("click",function(){let i=V(t).popover,s=w(),d=xe(51),u=xe(129);return i.close(),q(s.showPopover(u,d,"bottom",!0))}),c(11),p(12,"translate"),r(),l(13,"button",58),R("click",function(){let i=V(t).popover,s=w(),d=xe(95),u=xe(133);return i.close(),q(s.showPopover(u,d,"top",!0))}),c(14),p(15,"translate"),r()()}e&2&&(a(),h(m(2,5,"labels.menus.Frequent Postings")),a(3),h(m(5,7,"labels.text.Shortcut accounting rules")),a(4),v(" ",m(9,9,"labels.buttons.Close")," "),a(3),v(" ",m(12,11,"labels.buttons.Back")," "),a(3),v(" ",m(15,13,"labels.buttons.Next")," "))}function ese(e,o){if(e&1){let t=Y();l(0,"h2"),c(1),p(2,"translate"),r(),l(3,"p",55),c(4),p(5,"translate"),r(),l(6,"div",56)(7,"button",57),R("click",function(){let i=V(t).popover,s=w();return i.close(),q(s.configurationWizardService.closeConfigWizard())}),c(8),p(9,"translate"),r(),l(10,"button",58),R("click",function(){let i=V(t).popover,s=w(),d=xe(87),u=xe(131);return i.close(),q(s.showPopover(u,d,"top",!0))}),c(11),p(12,"translate"),r(),l(13,"button",58),R("click",function(){let i=V(t).popover,s=w(),d=xe(103),u=xe(135);return i.close(),q(s.showPopover(u,d,"top",!0))}),c(14),p(15,"translate"),r()()}e&2&&(a(),h(m(2,5,"labels.menus.Create Journal Entry")),a(3),h(m(5,7,"labels.text.Shortcut entry screen")),a(4),v(" ",m(9,9,"labels.buttons.Close")," "),a(3),v(" ",m(12,11,"labels.buttons.Back")," "),a(3),v(" ",m(15,13,"labels.buttons.Next")," "))}function tse(e,o){if(e&1){let t=Y();l(0,"h2"),c(1),p(2,"translate"),r(),l(3,"p",55),c(4),p(5,"translate"),r(),l(6,"div",56)(7,"button",57),R("click",function(){let i=V(t).popover,s=w();return i.close(),q(s.configurationWizardService.closeConfigWizard())}),c(8),p(9,"translate"),r(),l(10,"button",58),R("click",function(){let i=V(t).popover,s=w(),d=xe(95),u=xe(133);return i.close(),q(s.showPopover(u,d,"top",!0))}),c(11),p(12,"translate"),r(),l(13,"button",58),R("click",function(){let i=V(t).popover,s=w();return i.close(),q(s.nextStep())}),c(14),p(15,"translate"),r()()}e&2&&(a(),h(m(2,5,"labels.menus.Chart of Accounts")),a(3),h(m(5,7,"labels.text.Shortcut accounts screen")),a(4),v(" ",m(9,9,"labels.buttons.Close")," "),a(3),v(" ",m(12,11,"labels.buttons.Back")," "),a(3),v(" ",m(15,13,"labels.buttons.Next")," "))}var T_=(()=>{class e{constructor(){this.router=T(qe),this.dialog=T(Ht),this.authenticationService=T(Wo),this.settingsService=T(At),this.configurationWizardService=T(Qi),this.popoverService=T(Wi),this.authService=T(Oa),this.tooltipPosition="after",this.mappedActivities=[],this.frequentActivities=eB,this.userActivity=JSON.parse(localStorage.getItem("mifosXLocation"))}ngOnInit(){let t=this.authenticationService.getCredentials();this.username=t.username,this.setMappedAcitivites()}logout(){un.OIDC.oidcServerEnabled?this.authService.logout():this.authenticationService.logout().subscribe(()=>this.router.navigate(["/login"],{replaceUrl:!0}))}help(){window.open("https://mifosforge.jira.com/wiki/spaces/docs/pages/52035622/User+Manual","_blank")}showKeyboardShortcuts(){this.dialog.open(rk).afterClosed().subscribe(n=>{})}getFrequentActivities(){let t={},n=this.userActivity?.length;for(;n;){let d=this.userActivity[--n];t[d]=(t[d]||0)+1}return Object.entries(t).sort((d,u)=>u[1]-d[1]).map(d=>d[0]).filter(d=>!["/","/login","/home","/dashboard"].includes(d)).slice(0,3)}setMappedAcitivites(){this.getFrequentActivities().forEach(n=>{n.includes("/clients")?this.pushActivity("/clients"):n.includes("/groups")?this.pushActivity("/groups"):n.includes("/centers")?this.pushActivity("/centers"):n.includes("/accounting")?this.pushActivity("/accounting"):n.includes("/reports")?this.pushActivity("/reports"):n.includes("/appusers")?this.pushActivity("/appusers"):n.includes("/organization")?this.pushActivity("/organization"):n.includes("/system")?this.pushActivity("/system"):n.includes("/products")?this.pushActivity("/products"):n.includes("/templates")&&this.pushActivity("/templates")}),this.mappedActivities.reverse()}pushActivity(t){let n=this.frequentActivities.find(i=>i.path===t);this.mappedActivities.includes(n)||this.mappedActivities.push(n)}showPopover(t,n,i,s){setTimeout(()=>this.popoverService.open(t,n,i,s,{}),200)}ngAfterViewInit(){this.configurationWizardService.showSideNav===!0&&setTimeout(()=>{this.showPopover(this.templateLogo,this.logo.nativeElement,"bottom",!0)}),this.configurationWizardService.showSideNavChartofAccounts===!0&&setTimeout(()=>{this.showPopover(this.templateChartOfAccounts,this.chartOfAccounts.nativeElement,"top",!0)})}nextStep(){this.configurationWizardService.showSideNav=!1,this.configurationWizardService.showSideNavChartofAccounts=!1,this.configurationWizardService.showBreadcrumbs=!0,this.router.routeReuseStrategy.shouldReuseRoute=()=>!1,this.router.onSameUrlNavigation="reload",this.router.navigate(["/home"])}previousStep(){this.configurationWizardService.showSideNav=!1,this.configurationWizardService.showSideNavChartofAccounts=!1,this.configurationWizardService.showToolbarAdmin=!0,this.router.routeReuseStrategy.shouldReuseRoute=()=>!1,this.router.onSameUrlNavigation="reload",this.router.navigate(["/home"])}get tenantIdentifier(){return!this.settingsService.tenantIdentifier||this.settingsService.tenantIdentifier===""?"default":this.settingsService.tenantIdentifier}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275cmp=me({type:e,selectors:[["mifosx-sidenav"]],viewQuery:function(n,i){if(n&1&&(Ee(Ile,5),Ee(Ole,5),Ee(Ale,5),Ee(Fle,5)),n&2){let s;Te(s=Me())&&(i.logo=s.first),Te(s=Me())&&(i.templateLogo=s.first),Te(s=Me())&&(i.chartOfAccounts=s.first),Te(s=Me())&&(i.templateChartOfAccounts=s.first)}},inputs:{sidenavCollapsed:"sidenavCollapsed"},decls:136,vars:151,consts:[["logo",""],["userPanel",""],["frequentlyAccessed",""],["dashboard",""],["navigation",""],["frequentPostings",""],["createJournalEntry",""],["chartOfAccounts",""],["templateLogo",""],["templateUserPanel",""],["templateFrequentlyAccessed",""],["templateDashboard",""],["templateNavigation",""],["templateFrequentPostings",""],["templateCreateJournalEntry",""],["templateChartOfAccounts",""],[3,"ngClass"],[1,"navigation-panel","layout-column"],[1,"app-brand",3,"routerLink"],["src","assets/images/MifosX_logo.png","alt","app-logo",1,"app-logo"],[1,"app-logo-text","text-muted"],[1,"app-user"],[1,"app-user-photo"],["src","assets/images/user_placeholder.png","alt","app-user-photo"],[1,"app-user-name","mb-05"],[1,"app-user-controls"],["mat-icon-button","",1,"xs-button",3,"matTooltip","routerLink"],["icon","cog"],["mat-icon-button","",1,"xs-button",3,"click","matTooltip"],["icon","sign-out-alt"],[1,"app-sidenav"],[1,"mt-1","mb-1","nav-item-sep"],[1,"text-muted","icon-menu-title"],[1,"icon-menu"],[1,"icon-menu-item"],[1,"nav-item-sep"],[1,"text-muted"],["routerLinkActive","active-menu",3,"routerLink","matTooltipPosition","matTooltip","routerLinkActiveOptions"],["matListIcon",""],["icon","tachometer-alt","size","sm"],["matLine",""],["icon","location-arrow","size","sm"],[1,"fa","fa-check"],[1,"fa","fa-tasks"],["icon","bell","size","sm"],["icon","sync","size","sm"],["icon","plus","size","sm"],["icon","sitemap","size","sm"],[3,"click","matTooltipPosition","matTooltip"],["icon","keyboard","size","sm"],[3,"matTooltipPosition","matTooltip"],["matListIcon","",3,"click"],["icon","question-circle","size","sm"],["mat-raised-button","",3,"matTooltipPosition","matTooltip","routerLink"],["size","lg",3,"icon"],[1,"mw300"],[1,"layout-row","align-end","gap-2px","responsive-column"],["mat-raised-button","","color","warn",3,"click"],["mat-raised-button","","color","primary",3,"click"]],template:function(n,i){if(n&1){let s=Y();l(0,"div",16)(1,"div",17)(2,"div",18),b(3,"img",19),l(4,"span",20,0),c(6),p(7,"translate"),r()(),l(8,"div",21)(9,"div",22),b(10,"img",23),r(),l(11,"span",24),c(12),r(),l(13,"div",25,1)(15,"button",26),p(16,"translate"),b(17,"fa-icon",27),r(),l(18,"button",28),p(19,"translate"),R("click",function(){return V(s),q(i.logout())}),b(20,"fa-icon",29),r()()(),l(21,"div",30)(22,"div",null,2)(24,"div",31),b(25,"mat-divider"),l(26,"span",32),c(27),p(28,"translate"),r()()(),l(29,"div",33),Se(30,Wle,3,6,"div",34,Pe),r(),l(32,"div",35),b(33,"mat-divider"),l(34,"span",36),c(35),p(36,"translate"),r()(),l(37,"mat-nav-list")(38,"mat-list-item",37),p(39,"translate"),l(40,"mat-icon",38),b(41,"fa-icon",39),r(),l(42,"a",40,3),c(44),p(45,"translate"),r()(),l(46,"mat-list-item",37),p(47,"translate"),l(48,"mat-icon",38),b(49,"fa-icon",41),r(),l(50,"a",40,4),c(52),p(53,"translate"),r()(),l(54,"mat-list-item",37),p(55,"translate"),l(56,"mat-icon",38),b(57,"i",42),r(),l(58,"a",40),c(59),p(60,"translate"),r()(),l(61,"mat-list-item",37),p(62,"translate"),l(63,"mat-icon",38),b(64,"i",43),r(),l(65,"a",40),c(66),p(67,"translate"),r()(),l(68,"mat-list-item",37),p(69,"translate"),l(70,"mat-icon",38),b(71,"i",43),r(),l(72,"a",40),c(73),p(74,"translate"),r()(),l(75,"mat-list-item",37),p(76,"translate"),l(77,"mat-icon",38),b(78,"fa-icon",44),r(),l(79,"a",40),c(80),p(81,"translate"),r()(),l(82,"mat-list-item",37),p(83,"translate"),l(84,"mat-icon",38),b(85,"fa-icon",45),r(),l(86,"a",40,5),c(88),p(89,"translate"),r()(),l(90,"mat-list-item",37),p(91,"translate"),l(92,"mat-icon",38),b(93,"fa-icon",46),r(),l(94,"a",40,6),c(96),p(97,"translate"),r()(),l(98,"mat-list-item",37),p(99,"translate"),l(100,"mat-icon",38),b(101,"fa-icon",47),r(),l(102,"a",40,7),c(104),p(105,"translate"),r()(),l(106,"mat-list-item",48),p(107,"translate"),R("click",function(){return V(s),q(i.showKeyboardShortcuts())}),l(108,"mat-icon",38),b(109,"fa-icon",49),r(),l(110,"a",40),c(111),p(112,"translate"),r()(),l(113,"mat-list-item",50),p(114,"translate"),l(115,"mat-icon",51),R("click",function(){return V(s),q(i.help())}),b(116,"fa-icon",52),r(),l(117,"a",40),c(118),p(119,"translate"),r()()()()()(),F(120,Qle,16,15,"ng-template",null,8,ti)(122,Yle,16,15,"ng-template",null,9,ti)(124,Jle,16,15,"ng-template",null,10,ti)(126,Kle,16,15,"ng-template",null,11,ti)(128,Xle,16,15,"ng-template",null,12,ti)(130,Zle,16,15,"ng-template",null,13,ti)(132,ese,16,15,"ng-template",null,14,ti)(134,tse,16,15,"ng-template",null,15,ti)}n&2&&(g("ngClass",Ka(128,kle,!i.sidenavCollapsed,i.sidenavCollapsed)),a(2),g("routerLink",oe(131,Ble)),a(4),h(m(7,74,"APP_NAME")),a(6),le(" ",i.tenantIdentifier," / ",i.username," "),a(3),g("matTooltip",Le(m(16,76,"tooltips.Settings")))("routerLink",oe(132,Rle)),a(3),g("matTooltip",Le(m(19,78,"tooltips.Sign Out"))),a(9),h(m(28,80,"labels.menus.Frequently Accessed")),a(3),we(i.mappedActivities),a(5),h(m(36,82,"labels.menus.Main Items")),a(3),g("matTooltip",Le(m(39,84,"tooltips.Dashboard")))("routerLink",oe(133,Nle))("matTooltipPosition",i.tooltipPosition)("routerLinkActiveOptions",oe(134,Vc)),a(6),h(m(45,86,"labels.menus.Dashboard")),a(2),g("matTooltip",Le(m(47,88,"tooltips.Navigation")))("routerLink",oe(135,Lle))("matTooltipPosition",i.tooltipPosition)("routerLinkActiveOptions",oe(136,Vc)),a(6),h(m(53,90,"labels.menus.Navigation")),a(2),g("matTooltip",Le(m(55,92,"tooltips.Checker Inbox and Tasks")))("routerLink",oe(137,Vle))("matTooltipPosition",i.tooltipPosition)("routerLinkActiveOptions",oe(138,Vc)),a(5),h(m(60,94,"labels.menus.Checker Inbox and Tasks")),a(2),g("matTooltip",Le(m(62,96,"labels.menus.Collection Sheet")))("routerLink",oe(139,qle))("matTooltipPosition",i.tooltipPosition)("routerLinkActiveOptions",oe(140,Vc)),a(5),h(m(67,98,"labels.menus.Collection Sheet")),a(2),g("matTooltip",Le(m(69,100,"tooltips.Individual Collection Sheet")))("routerLink",oe(141,zle))("matTooltipPosition",i.tooltipPosition)("routerLinkActiveOptions",oe(142,Vc)),a(5),h(m(74,102,"labels.menus.Individual Collection Sheet")),a(2),g("matTooltip",Le(m(76,104,"tooltips.Notifications")))("routerLink",oe(143,Hle))("matTooltipPosition",i.tooltipPosition)("routerLinkActiveOptions",oe(144,Vc)),a(5),h(m(81,106,"labels.menus.Notifications")),a(2),g("matTooltip",Le(m(83,108,"tooltips.Frequent Postings")))("routerLink",oe(145,Gle))("matTooltipPosition",i.tooltipPosition)("routerLinkActiveOptions",oe(146,Vc)),a(6),h(m(89,110,"labels.menus.Frequent Postings")),a(2),g("matTooltip",Le(m(91,112,"tooltips.Create Journal Entry")))("routerLink",oe(147,jle))("matTooltipPosition",i.tooltipPosition)("routerLinkActiveOptions",oe(148,Vc)),a(6),h(m(97,114,"labels.menus.Create Journal Entry")),a(2),g("matTooltip",Le(m(99,116,"tooltips.Chart Of Accounts")))("routerLink",oe(149,$le))("matTooltipPosition",i.tooltipPosition)("routerLinkActiveOptions",oe(150,Vc)),a(6),h(m(105,118,"labels.menus.Chart of Accounts")),a(2),g("matTooltip",Le(m(107,120,"tooltips.Keyboard Shortcuts")))("matTooltipPosition",i.tooltipPosition),a(5),h(m(112,122,"labels.menus.Keyboard Shortcuts")),a(2),g("matTooltip",Le(m(114,124,"tooltips.Help")))("matTooltipPosition",i.tooltipPosition),a(5),h(m(119,126,"labels.menus.Help")))},dependencies:[ue,co,fe,Ae,ve,wi,si,ke,Ri,pa,Vo,La,Yo,ca,he],styles:[".sidebar-full[_ngcontent-%COMP%] .navigation-panel[_ngcontent-%COMP%], .sidebar-compact[_ngcontent-%COMP%] .navigation-panel[_ngcontent-%COMP%]{width:100%;height:100%;padding-top:20%;overflow-x:hidden}.sidebar-full[_ngcontent-%COMP%] img[_ngcontent-%COMP%], .sidebar-compact[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{max-width:100%}.sidebar-full[_ngcontent-%COMP%] .app-brand[_ngcontent-%COMP%], .sidebar-compact[_ngcontent-%COMP%] .app-brand[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;max-width:15rem;z-index:9999;cursor:pointer}.sidebar-full[_ngcontent-%COMP%] .app-brand[_ngcontent-%COMP%] .app-logo[_ngcontent-%COMP%], .sidebar-compact[_ngcontent-%COMP%] .app-brand[_ngcontent-%COMP%] .app-logo[_ngcontent-%COMP%]{width:auto;height:42px;margin-right:8px}.sidebar-full[_ngcontent-%COMP%] .app-brand[_ngcontent-%COMP%] .app-logo-text[_ngcontent-%COMP%], .sidebar-compact[_ngcontent-%COMP%] .app-brand[_ngcontent-%COMP%] .app-logo-text[_ngcontent-%COMP%]{width:auto;height:auto;font-size:2rem;font-weight:400}.sidebar-full[_ngcontent-%COMP%] .app-user[_ngcontent-%COMP%], .sidebar-compact[_ngcontent-%COMP%] .app-user[_ngcontent-%COMP%]{text-align:center;width:100%;padding:1rem 0 .4rem}.sidebar-full[_ngcontent-%COMP%] .app-user[_ngcontent-%COMP%] .app-user-photo[_ngcontent-%COMP%], .sidebar-compact[_ngcontent-%COMP%] .app-user[_ngcontent-%COMP%] .app-user-photo[_ngcontent-%COMP%]{width:72px;margin:0 auto 8px;height:72px;border:1px solid hsla(210,8%,51%,.13);padding:4px;border-radius:50%}.sidebar-full[_ngcontent-%COMP%] .app-user[_ngcontent-%COMP%] img[_ngcontent-%COMP%], .sidebar-compact[_ngcontent-%COMP%] .app-user[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{width:100%;height:100%;border-radius:50%}.sidebar-full[_ngcontent-%COMP%] .app-user[_ngcontent-%COMP%] .app-user-name[_ngcontent-%COMP%], .sidebar-compact[_ngcontent-%COMP%] .app-user[_ngcontent-%COMP%] .app-user-name[_ngcontent-%COMP%]{display:block;font-size:.875rem;font-weight:300;margin-left:-2px}.sidebar-full[_ngcontent-%COMP%] .app-user[_ngcontent-%COMP%] .app-user-controls[_ngcontent-%COMP%] .mat-icon-button[_ngcontent-%COMP%] .xs-button[_ngcontent-%COMP%], .sidebar-compact[_ngcontent-%COMP%] .app-user[_ngcontent-%COMP%] .app-user-controls[_ngcontent-%COMP%] .mat-icon-button[_ngcontent-%COMP%] .xs-button[_ngcontent-%COMP%]{height:20px;width:20px;line-height:20px;margin:5px}.sidebar-full[_ngcontent-%COMP%] .app-user[_ngcontent-%COMP%] .app-user-controls[_ngcontent-%COMP%] .text-muted[_ngcontent-%COMP%], .sidebar-compact[_ngcontent-%COMP%] .app-user[_ngcontent-%COMP%] .app-user-controls[_ngcontent-%COMP%] .text-muted[_ngcontent-%COMP%]{color:#0000008a}.sidebar-full[_ngcontent-%COMP%] .nav-item-sep[_ngcontent-%COMP%] span[_ngcontent-%COMP%], .sidebar-compact[_ngcontent-%COMP%] .nav-item-sep[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{padding:16px 0 0 16px;display:block;font-size:12px}.sidebar-full[_ngcontent-%COMP%] .app-sidenav[_ngcontent-%COMP%] .icon-menu[_ngcontent-%COMP%], .sidebar-compact[_ngcontent-%COMP%] .app-sidenav[_ngcontent-%COMP%] .icon-menu[_ngcontent-%COMP%]{display:flex;flex-direction:column;justify-content:space-evenly}.sidebar-full[_ngcontent-%COMP%] .app-sidenav[_ngcontent-%COMP%] .icon-menu[_ngcontent-%COMP%] .mat-divider[_ngcontent-%COMP%], .sidebar-compact[_ngcontent-%COMP%] .app-sidenav[_ngcontent-%COMP%] .icon-menu[_ngcontent-%COMP%] .mat-divider[_ngcontent-%COMP%]{margin:0 -24px}.sidebar-full[_ngcontent-%COMP%] .app-sidenav[_ngcontent-%COMP%] .icon-menu[_ngcontent-%COMP%] .icon-menu-title[_ngcontent-%COMP%], .sidebar-compact[_ngcontent-%COMP%] .app-sidenav[_ngcontent-%COMP%] .icon-menu[_ngcontent-%COMP%] .icon-menu-title[_ngcontent-%COMP%]{padding-left:0;margin-left:-8px}.sidebar-full[_ngcontent-%COMP%] .app-sidenav[_ngcontent-%COMP%] .icon-menu[_ngcontent-%COMP%] .icon-menu-item[_ngcontent-%COMP%], .sidebar-compact[_ngcontent-%COMP%] .app-sidenav[_ngcontent-%COMP%] .icon-menu[_ngcontent-%COMP%] .icon-menu-item[_ngcontent-%COMP%]{display:inline-block}.sidebar-full[_ngcontent-%COMP%] .app-sidenav[_ngcontent-%COMP%] .icon-menu[_ngcontent-%COMP%] .icon-menu-item[_ngcontent-%COMP%] button[_ngcontent-%COMP%], .sidebar-compact[_ngcontent-%COMP%] .app-sidenav[_ngcontent-%COMP%] .icon-menu[_ngcontent-%COMP%] .icon-menu-item[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{min-width:auto;margin:4px}.sidebar-full[_ngcontent-%COMP%] .app-sidenav[_ngcontent-%COMP%] .nav-item-sep[_ngcontent-%COMP%], .sidebar-compact[_ngcontent-%COMP%] .app-sidenav[_ngcontent-%COMP%] .nav-item-sep[_ngcontent-%COMP%]{padding:0;margin:1rem 0}.sidebar-full[_ngcontent-%COMP%] .app-sidenav[_ngcontent-%COMP%] .mat-nav-list[_ngcontent-%COMP%], .sidebar-compact[_ngcontent-%COMP%] .app-sidenav[_ngcontent-%COMP%] .mat-nav-list[_ngcontent-%COMP%]{margin:0;padding:0;list-style:none}.sidebar-full[_ngcontent-%COMP%] .app-sidenav[_ngcontent-%COMP%] .mat-nav-list[_ngcontent-%COMP%] .mat-list-item[_ngcontent-%COMP%] .mat-list-icon[_ngcontent-%COMP%], .sidebar-compact[_ngcontent-%COMP%] .app-sidenav[_ngcontent-%COMP%] .mat-nav-list[_ngcontent-%COMP%] .mat-list-item[_ngcontent-%COMP%] .mat-list-icon[_ngcontent-%COMP%]{height:30px;font-size:22px}.sidebar-compact[_ngcontent-%COMP%] .app-brand[_ngcontent-%COMP%] .app-logo[_ngcontent-%COMP%]{margin:auto}.sidebar-compact[_ngcontent-%COMP%] .app-brand[_ngcontent-%COMP%] .app-logo-text[_ngcontent-%COMP%], .sidebar-compact[_ngcontent-%COMP%] .app-user[_ngcontent-%COMP%], .sidebar-compact[_ngcontent-%COMP%] .app-sidenav[_ngcontent-%COMP%] .nav-item-sep[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{display:none}.sidebar-compact[_ngcontent-%COMP%] .app-sidenav[_ngcontent-%COMP%] .icon-menu[_ngcontent-%COMP%]{padding:8px 0 0;width:4rem}.sidebar-compact[_ngcontent-%COMP%] .app-sidenav[_ngcontent-%COMP%] .icon-menu[_ngcontent-%COMP%] .nav-item-sep[_ngcontent-%COMP%], .sidebar-compact[_ngcontent-%COMP%] .app-sidenav[_ngcontent-%COMP%] .icon-menu[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{display:none}.sidebar-full[_ngcontent-%COMP%] .navigation-panel[_ngcontent-%COMP%]{padding-top:5%}.sidebar-full[_ngcontent-%COMP%] .app-sidenav[_ngcontent-%COMP%] .icon-menu[_ngcontent-%COMP%]{flex-direction:row}"]})}}return e})();var ise=()=>({show:1}),nse=()=>({show:2}),ose=()=>({show:3}),ase=()=>({show:4}),rse=()=>({show:5}),lse=()=>({show:6}),sse=()=>({show:0}),M_=(()=>{class e{constructor(){this.dialogRef=T(eo),this.data=T(Po)}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275cmp=me({type:e,selectors:[["mifosx-configuration-wizard"]],decls:36,vars:44,consts:[[1,"config-wizard-container"],["mat-dialog-title",""],[1,"config-wizard-content"],[1,"description"],[1,"buttons-grid"],["mat-raised-button","","color","primary",3,"mat-dialog-close"],[1,"progress-section"],[1,"progress-label"],["mode","determinate","value","0"],[1,"config-wizard-actions"],["mat-raised-button","","color","warn",3,"mat-dialog-close"]],template:function(n,i){n&1&&(l(0,"div",0)(1,"h1",1),c(2),p(3,"translate"),r(),l(4,"mat-dialog-content",2)(5,"p",3),c(6),p(7,"translate"),r(),l(8,"div",4)(9,"button",5),c(10),p(11,"translate"),r(),l(12,"button",5),c(13),p(14,"translate"),r(),l(15,"button",5),c(16),p(17,"translate"),r(),l(18,"button",5),c(19),p(20,"translate"),r(),l(21,"button",5),c(22),p(23,"translate"),r(),l(24,"button",5),c(25),p(26,"translate"),r()(),l(27,"div",6)(28,"h3",7),c(29),p(30,"translate"),r(),b(31,"mat-progress-bar",8),r()(),l(32,"mat-dialog-actions",9)(33,"button",10),c(34),p(35,"translate"),r()()()),n&2&&(a(2),h(m(3,17,"labels.heading.Welcome to Mifos")),a(4),h(m(7,19,"labels.heading.Configure Mifos Organization Needs")),a(3),g("mat-dialog-close",oe(37,ise)),a(),v(" ",m(11,21,"labels.buttons.Home Screen Tour")," "),a(2),g("mat-dialog-close",oe(38,nse)),a(),v(" ",m(14,23,"labels.buttons.Setup Organization")," "),a(2),g("mat-dialog-close",oe(39,ose)),a(),v(" ",m(17,25,"labels.buttons.Setup System")," "),a(2),g("mat-dialog-close",oe(40,ase)),a(),v(" ",m(20,27,"labels.buttons.Setup Accounting")," "),a(2),g("mat-dialog-close",oe(41,rse)),a(),v(" ",m(23,29,"labels.buttons.Setup Products")," "),a(2),g("mat-dialog-close",oe(42,lse)),a(),v(" ",m(26,31,"labels.buttons.Setup Funds and Reports")," "),a(4),v("",m(30,33,"labels.heading.Progress Bar"),": 0%"),a(4),g("mat-dialog-close",oe(43,sse)),a(),v(" ",m(35,35,"labels.buttons.Close Config. Wizard")," "))},dependencies:[ue,fe,ve,Wn,ho,Un,os,Nn,he],styles:[".config-wizard-container[_ngcontent-%COMP%]{padding:24px;max-width:800px}.config-wizard-container[_ngcontent-%COMP%] h1[_ngcontent-%COMP%]{margin:0 0 24px;text-align:center;font-size:28px;font-weight:500}.config-wizard-actions[_ngcontent-%COMP%]{padding:16px 0 0!important;margin:0!important;justify-content:center;border-top:1px solid #e0e0e0}.config-wizard-actions[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{min-width:180px;height:40px}.config-wizard-content[_ngcontent-%COMP%]{padding:0!important;margin-bottom:24px}.config-wizard-content[_ngcontent-%COMP%] .description[_ngcontent-%COMP%]{text-align:center;font-size:16px;margin:0 0 32px;color:#555}.config-wizard-content[_ngcontent-%COMP%] .buttons-grid[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;gap:16px;margin-bottom:32px}.config-wizard-content[_ngcontent-%COMP%] .buttons-grid[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{flex:1 1 calc(33.333% - 11px);min-width:180px;height:48px;text-transform:none}@media (width < 768px){.config-wizard-content[_ngcontent-%COMP%] .buttons-grid[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{flex:1 1 calc(50% - 8px)}}@media (width < 480px){.config-wizard-content[_ngcontent-%COMP%] .buttons-grid[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{flex:1 1 100%}}.config-wizard-content[_ngcontent-%COMP%] .progress-section[_ngcontent-%COMP%]{margin-top:32px}.config-wizard-content[_ngcontent-%COMP%] .progress-section[_ngcontent-%COMP%] .progress-label[_ngcontent-%COMP%]{font-size:14px;font-weight:500;margin:0 0 12px;color:#333}.config-wizard-content[_ngcontent-%COMP%] .progress-section[_ngcontent-%COMP%] mat-progress-bar[_ngcontent-%COMP%]{height:8px;border-radius:4px}"]})}}return e})();var cse=["institution"],pse=["templateInstitution"],mse=["appMenu"],dse=["templateAppMenu"],use=["notificationsTray"],tB=()=>["/accounting"],fse=()=>["/reports"],hse=()=>["/reports","Client"],gse=()=>["/reports","Loan"],_se=()=>["/reports","Savings"],Cse=()=>["/reports","Fund"],vse=()=>["/reports","Accounting"],xse=()=>["/organization"],bse=()=>["/system"],yse=()=>["/products"],Sse=()=>["/profile"],wse=()=>["/settings"];function Pse(e,o){if(e&1){let t=Y();l(0,"button",60),p(1,"translate"),R("click",function(){V(t);let i=w();return q(i.toggleSidenav())}),b(2,"fa-icon",61),r()}e&2&&g("matTooltip",Le(m(1,2,"tooltips.Toggle Hide/Open")))}function Tse(e,o){e&1&&b(0,"fa-icon",63)}function Mse(e,o){e&1&&b(0,"fa-icon",64)}function Dse(e,o){if(e&1){let t=Y();l(0,"button",62),p(1,"translate"),R("click",function(){V(t);let i=w();return q(i.toggleSidenavCollapse())}),E(2,Tse,1,0,"fa-icon",63),E(3,Mse,1,0,"fa-icon",64),r()}if(e&2){let t=w();g("matTooltip",Le(m(1,4,"tooltips.Toggle Collapse"))),a(2),I(t.sidenavCollapsed?-1:2),a(),I(t.sidenavCollapsed?3:-1)}}function Ese(e,o){if(e&1&&(l(0,"a",65,22),b(3,"fa-icon",66),c(4),p(5,"translate"),r()),e&2){w();let t=xe(36);g("matMenuTriggerFor",t),a(4),v(" ",m(5,2,"labels.menus.Institution")," ")}}function Ise(e,o){e&1&&(l(0,"a",67,23),b(2,"fa-icon",68),c(3),p(4,"translate"),r()),e&2&&(g("routerLink",oe(4,tB)),a(3),v(" ",m(4,2,"labels.menus.Accounting")," "))}function Ose(e,o){if(e&1&&(l(0,"a",65,24),b(3,"fa-icon",69),c(4),p(5,"translate"),r()),e&2){w();let t=xe(57);g("matMenuTriggerFor",t),a(4),v(" ",m(5,2,"labels.menus.Reports")," ")}}function Ase(e,o){if(e&1&&(l(0,"a",65,25),b(3,"fa-icon",70),c(4),p(5,"translate"),r()),e&2){w();let t=xe(77);g("matMenuTriggerFor",t),a(4),v(" ",m(5,2,"labels.menus.Admin")," ")}}function Fse(e,o){if(e&1){let t=Y();l(0,"a",71,26),R("click",function(){V(t);let i=w();return q(i.openDialog())}),b(2,"fa-icon",72),c(3),p(4,"translate"),r()}e&2&&(a(3),v(" ",m(4,1,"labels.menus.Configuration Wizard")," "))}function kse(e,o){if(e&1){let t=Y();l(0,"h2"),c(1),p(2,"translate"),r(),l(3,"p",73),c(4),p(5,"translate"),r(),l(6,"div",74)(7,"button",75),R("click",function(){let i=V(t).popover,s=w();return i.close(),q(s.configurationWizardService.closeConfigWizard())}),c(8),p(9,"translate"),r(),l(10,"button",76),R("click",function(){let i=V(t).popover,s=w(),d=xe(122);return i.close(),q(s.showPopover(d,s.accounting))}),c(11),p(12,"translate"),r()()}e&2&&(a(),h(m(2,4,"labels.menus.Institution")),a(3),h(m(5,6,"labels.text.Button for individual account")),a(4),v(" ",m(9,8,"labels.buttons.Close")," "),a(3),v(" ",m(12,10,"labels.buttons.Next")," "))}function Bse(e,o){if(e&1){let t=Y();l(0,"h2"),c(1),p(2,"translate"),r(),l(3,"p",73),c(4),p(5,"translate"),r(),l(6,"div",74)(7,"button",75),R("click",function(){let i=V(t).popover,s=w();return i.close(),q(s.configurationWizardService.closeConfigWizard())}),c(8),p(9,"translate"),r(),l(10,"button",76),R("click",function(){let i=V(t).popover,s=w(),d=xe(120);return i.close(),q(s.showPopover(d,s.institution))}),c(11),p(12,"translate"),r(),l(13,"button",76),R("click",function(){let i=V(t).popover,s=w(),d=xe(124);return i.close(),q(s.showPopover(d,s.reports))}),c(14),p(15,"translate"),r()()}e&2&&(a(),h(m(2,5,"labels.menus.Accounting")),a(3),h(m(5,7,"labels.text.Button for accounting department")),a(4),v(" ",m(9,9,"labels.buttons.Close")," "),a(3),v(" ",m(12,11,"labels.buttons.Back")," "),a(3),v(" ",m(15,13,"labels.buttons.Next")," "))}function Rse(e,o){if(e&1){let t=Y();l(0,"h2"),c(1),p(2,"translate"),r(),l(3,"p",73),c(4),p(5,"translate"),r(),l(6,"div",74)(7,"button",75),R("click",function(){let i=V(t).popover,s=w();return i.close(),q(s.configurationWizardService.closeConfigWizard())}),c(8),p(9,"translate"),r(),l(10,"button",76),R("click",function(){let i=V(t).popover,s=w(),d=xe(122);return i.close(),q(s.showPopover(d,s.accounting))}),c(11),p(12,"translate"),r(),l(13,"button",76),R("click",function(){let i=V(t).popover,s=w(),d=xe(126);return i.close(),q(s.showPopover(d,s.admin))}),c(14),p(15,"translate"),r()()}e&2&&(a(),h(m(2,5,"labels.menus.Reports")),a(3),h(m(5,7,"labels.text.Dropdown system reports")),a(4),v(" ",m(9,9,"labels.buttons.Close")," "),a(3),v(" ",m(12,11,"labels.buttons.Back")," "),a(3),v(" ",m(15,13,"labels.buttons.Next")," "))}function Nse(e,o){if(e&1){let t=Y();l(0,"h2"),c(1),p(2,"translate"),r(),l(3,"p",73),c(4),p(5,"translate"),r(),l(6,"div",74)(7,"button",75),R("click",function(){let i=V(t).popover,s=w();return i.close(),q(s.configurationWizardService.closeConfigWizard())}),c(8),p(9,"translate"),r(),l(10,"button",76),R("click",function(){let i=V(t).popover,s=w(),d=xe(124);return i.close(),q(s.showPopover(d,s.reports))}),c(11),p(12,"translate"),r(),l(13,"button",76),R("click",function(){let i=V(t).popover,s=w(),d=xe(128);return i.close(),q(s.showPopover(d,s.selfService))}),c(14),p(15,"translate"),r()()}e&2&&(a(),h(m(2,5,"labels.menus.Admin")),a(3),h(m(5,7,"labels.text.Setup organization including users")),a(4),v(" ",m(9,9,"labels.buttons.Close")," "),a(3),v(" ",m(12,11,"labels.buttons.Back")," "),a(3),v(" ",m(15,13,"labels.buttons.Next")," "))}function Lse(e,o){if(e&1){let t=Y();l(0,"div",74)(1,"button",75),R("click",function(){let i=V(t).popover,s=w();return i.close(),q(s.configurationWizardService.closeConfigWizard())}),c(2),p(3,"translate"),r(),l(4,"button",76),R("click",function(){let i=V(t).popover,s=w(),d=xe(126);return i.close(),q(s.showPopover(d,s.admin))}),c(5),p(6,"translate"),r(),l(7,"button",76),R("click",function(){let i=V(t).popover,s=w(),d=xe(130);return i.close(),q(s.showPopover(d,s.configWizard))}),c(8),p(9,"translate"),r()()}e&2&&(a(2),v(" ",m(3,3,"labels.buttons.Close")," "),a(3),v(" ",m(6,5,"labels.buttons.Back")," "),a(3),v(" ",m(9,7,"labels.buttons.Next")," "))}function Vse(e,o){if(e&1){let t=Y();l(0,"h2"),c(1),p(2,"translate"),r(),l(3,"p",73),c(4),p(5,"translate"),r(),l(6,"div",74)(7,"button",75),R("click",function(){let i=V(t).popover,s=w();return i.close(),q(s.configurationWizardService.closeConfigWizard())}),c(8),p(9,"translate"),r(),l(10,"button",76),R("click",function(){let i=V(t).popover,s=w(),d=xe(128);return i.close(),q(s.showPopover(d,s.selfService))}),c(11),p(12,"translate"),r(),l(13,"button",76),R("click",function(){let i=V(t).popover,s=w(),d=xe(12),u=xe(132);return i.close(),q(s.showPopover(u,d))}),c(14),p(15,"translate"),r()()}e&2&&(a(),h(m(2,5,"labels.menus.Configuration Wizard")),a(3),h(m(5,7,"labels.text.Initial setup and application tour")),a(4),v(" ",m(9,9,"labels.buttons.Close")," "),a(3),v(" ",m(12,11,"labels.buttons.Back")," "),a(3),v(" ",m(15,13,"labels.buttons.Next")," "))}function qse(e,o){if(e&1){let t=Y();l(0,"h2"),c(1),p(2,"translate"),r(),l(3,"p",73),c(4),p(5,"translate"),r(),l(6,"div",74)(7,"button",75),R("click",function(){let i=V(t).popover,s=w();return i.close(),q(s.configurationWizardService.closeConfigWizard())}),c(8),p(9,"translate"),r(),l(10,"button",76),R("click",function(){let i=V(t).popover,s=w(),d=xe(130);return i.close(),q(s.showPopover(d,s.configWizard))}),c(11),p(12,"translate"),r(),l(13,"button",76),R("click",function(){let i=V(t).popover,s=w(),d=xe(15),u=xe(134);return i.close(),q(s.showPopover(u,d))}),c(14),p(15,"translate"),r()()}e&2&&(a(),h(m(2,5,"labels.menus.Global Search")),a(3),h(m(5,7,"labels.text.Navigate system selecting entity")),a(4),v(" ",m(9,9,"labels.buttons.Close")," "),a(3),v(" ",m(12,11,"labels.buttons.Back")," "),a(3),v(" ",m(15,13,"labels.buttons.Next")," "))}function zse(e,o){if(e&1){let t=Y();l(0,"h2"),c(1),p(2,"translate"),r(),l(3,"p",73),c(4),p(5,"translate"),r(),l(6,"div",74)(7,"button",75),R("click",function(){let i=V(t).popover,s=w();return i.close(),q(s.configurationWizardService.closeConfigWizard())}),c(8),p(9,"translate"),r(),l(10,"button",76),R("click",function(){let i=V(t).popover,s=w(),d=xe(12),u=xe(132);return i.close(),q(s.showPopover(u,d))}),c(11),p(12,"translate"),r(),l(13,"button",76),R("click",function(){let i=V(t).popover,s=w(),d=xe(21),u=xe(136);return i.close(),q(s.showPopover(u,d))}),c(14),p(15,"translate"),r()()}e&2&&(a(),h(m(2,5,"labels.menus.Language Selector")),a(3),h(m(5,7,"labels.text.Organization available languages")),a(4),v(" ",m(9,9,"labels.buttons.Close")," "),a(3),v(" ",m(12,11,"labels.buttons.Back")," "),a(3),v(" ",m(15,13,"labels.buttons.Next")," "))}function Hse(e,o){if(e&1){let t=Y();l(0,"h2"),c(1),p(2,"translate"),r(),l(3,"p",73),c(4),p(5,"translate"),r(),l(6,"div",74)(7,"button",75),R("click",function(){let i=V(t).popover,s=w();return i.close(),q(s.configurationWizardService.closeConfigWizard())}),c(8),p(9,"translate"),r(),l(10,"button",76),R("click",function(){let i=V(t).popover,s=w(),d=xe(15),u=xe(134);return i.close(),q(s.showPopover(u,d))}),c(11),p(12,"translate"),r(),l(13,"button",76),R("click",function(){let i=V(t).popover,s=w(),d=xe(25),u=xe(138);return i.close(),q(s.showPopover(u,d))}),c(14),p(15,"translate"),r()()}e&2&&(a(),h(m(2,5,"labels.menus.Notifications")),a(3),h(m(5,7,"labels.text.This shows all the notifications.")),a(4),v(" ",m(9,9,"labels.buttons.Close")," "),a(3),v(" ",m(12,11,"labels.buttons.Back")," "),a(3),v(" ",m(15,13,"labels.buttons.Next")," "))}function Gse(e,o){if(e&1){let t=Y();l(0,"h2"),c(1),p(2,"translate"),r(),l(3,"p",73),c(4),p(5,"translate"),r(),l(6,"div",74)(7,"button",75),R("click",function(){let i=V(t).popover,s=w();return i.close(),q(s.configurationWizardService.closeConfigWizard())}),c(8),p(9,"translate"),r(),l(10,"button",76),R("click",function(){let i=V(t).popover,s=w(),d=xe(21),u=xe(136);return i.close(),q(s.showPopover(u,d))}),c(11),p(12,"translate"),r(),l(13,"button",76),R("click",function(){let i=V(t).popover,s=w(),d=xe(28),u=xe(140);return i.close(),q(s.showPopover(u,d))}),c(14),p(15,"translate"),r()()}e&2&&(a(),h(m(2,5,"labels.menus.Theme Picker")),a(3),h(m(5,7,"labels.text.Choose to work with a dark or bright background")),a(4),v(" ",m(9,9,"labels.buttons.Close")," "),a(3),v(" ",m(12,11,"labels.buttons.Back")," "),a(3),v(" ",m(15,13,"labels.buttons.Next")," "))}function jse(e,o){if(e&1){let t=Y();l(0,"h2"),c(1),p(2,"translate"),r(),l(3,"p",73),c(4),p(5,"translate"),r(),l(6,"div",74)(7,"button",75),R("click",function(){let i=V(t).popover,s=w();return i.close(),q(s.configurationWizardService.closeConfigWizard())}),c(8),p(9,"translate"),r(),l(10,"button",76),R("click",function(){let i=V(t).popover,s=w(),d=xe(25),u=xe(138);return i.close(),q(s.showPopover(u,d))}),c(11),p(12,"translate"),r(),l(13,"button",76),R("click",function(){let i=V(t).popover,s=w();return i.close(),q(s.nextStep())}),c(14),p(15,"translate"),r()()}e&2&&(a(),h(m(2,5,"labels.menus.Application Menu")),a(3),h(m(5,7,"labels.text.User settings and sign out button")),a(4),v(" ",m(9,9,"labels.buttons.Close")," "),a(3),v(" ",m(12,11,"labels.buttons.Back")," "),a(3),v(" ",m(15,13,"labels.buttons.Next")," "))}var D_=(()=>{class e{constructor(){this.breakpointObserver=T(Ig),this.router=T(qe),this.authenticationService=T(Wo),this.popoverService=T(Wi),this.configurationWizardService=T(Qi),this.dialog=T(Ht),this.changeDetector=T(ts),this.authService=T(Oa),this.isHandset$=this.breakpointObserver.observe(Og.Handset).pipe(Mn(t=>t.matches)),this.sidenavCollapsed=!0,this.collapse=new bi}ngOnInit(){this.isHandset$.subscribe(t=>{t&&this.sidenavCollapsed&&this.toggleSidenavCollapse(!1)})}ngAfterContentChecked(){this.changeDetector.detectChanges()}toggleSidenav(){this.sidenav.toggle()}toggleSidenavCollapse(t){this.sidenavCollapsed=t||!this.sidenavCollapsed,this.collapse.emit(this.sidenavCollapsed)}logout(){un.OIDC.oidcServerEnabled?this.authService.logout():this.authenticationService.logout().subscribe(()=>this.router.navigate(["/login"],{replaceUrl:!0}))}help(){window.open("https://mifosforge.jira.com/wiki/spaces/docs/pages/52035622/User+Manual","_blank")}showPopover(t,n){n&&setTimeout(()=>this.popoverService.open(t,n,"bottom",!0,{}),200)}nextStep(){this.configurationWizardService.showToolbar=!1,this.configurationWizardService.showToolbarAdmin=!1,this.configurationWizardService.showSideNav=!0,this.router.routeReuseStrategy.shouldReuseRoute=()=>!1,this.router.onSameUrlNavigation="reload",this.router.navigate(["/home"])}openDialog(){this.dialog.open(M_,{}).afterClosed().subscribe(n=>{if(n)switch(n.show){case 1:this.configurationWizardService.showToolbar=!0,this.router.routeReuseStrategy.shouldReuseRoute=()=>!1,this.router.onSameUrlNavigation="reload",this.router.navigate(["/home"]);break;case 2:this.configurationWizardService.showCreateOffice=!0,this.router.navigate(["/organization"]);break;case 3:this.configurationWizardService.showDatatables=!0,this.router.navigate(["/system"]);break;case 4:this.configurationWizardService.showChartofAccounts=!0,this.router.navigate(["/accounting"]);break;case 5:this.configurationWizardService.showCharges=!0,this.router.navigate(["/products"]);break;case 6:this.configurationWizardService.showManageFunds=!0,this.router.navigate(["/organization"]);break;case 0:break;default:break}})}ngAfterViewInit(){this.configurationWizardService.showToolbar===!0&&setTimeout(()=>{this.showPopover(this.templateInstitution,this.institution.nativeElement)}),(this.configurationWizardService.showSideNav===!0||this.configurationWizardService.showSideNavChartofAccounts===!0)&&this.toggleSidenavCollapse(),this.configurationWizardService.showToolbarAdmin===!0&&setTimeout(()=>{this.showPopover(this.templateAppMenu,this.appMenu.nativeElement)})}navigateMenu(t){this.router.navigate([t])}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275cmp=me({type:e,selectors:[["mifosx-toolbar"]],viewQuery:function(n,i){if(n&1&&(Ee(cse,5),Ee(pse,5),Ee(mse,5),Ee(dse,5),Ee(use,5)),n&2){let s;Te(s=Me())&&(i.institution=s.first),Te(s=Me())&&(i.templateInstitution=s.first),Te(s=Me())&&(i.appMenu=s.first),Te(s=Me())&&(i.templateAppMenu=s.first),Te(s=Me())&&(i.notificationsTray=s.first)}},inputs:{sidenav:"sidenav"},outputs:{collapse:"collapse"},decls:141,vars:105,consts:[["globalSearch",""],["languageSelector",""],["notifications",""],["notificationsTray",""],["themeToggle",""],["appMenu",""],["languageMenu","matMenu"],["institutionMenu","matMenu"],["reportsMenu","matMenu"],["adminMenu","matMenu"],["applicationMenu","matMenu"],["templateInstitution",""],["templateAccounting",""],["templateReports",""],["templateAdmin",""],["templateSelfService",""],["templateConfigWizard",""],["templateGlobalSearch",""],["templateLanguageSelector",""],["templateNotifications",""],["templateThemePicker",""],["templateAppMenu",""],["institution","","institutionMenuTrigger","matMenuTrigger"],["accounting",""],["reports","","reportsMenuTrigger","matMenuTrigger"],["admin","","adminMenuTrigger","matMenuTrigger"],["configWizard",""],["color","primary","id","mifosx-toolbar",1,"layout-row"],["mat-icon-button","","tabindex","0",3,"matTooltip"],["mat-icon-button","","tabindex","0",1,"hide-lt-md",3,"matTooltip"],[1,"tab-nav-bar"],["class","tab-link","tabindex","0",3,"matMenuTriggerFor",4,"mifosxHasPermission"],[1,"hide-lt-md"],["class","tab-link accounting-link","tabindex","0",3,"routerLink",4,"mifosxHasPermission"],["class","tab-link","tabindex","0",3,"click",4,"mifosxHasPermission"],[1,"toolbar-spacer"],[1,"white-text-search"],["tabindex","0"],[1,"white-text-language"],["tabindex","0",1,"ml-1","language","hide-lt-md"],["mat-icon-button","","tabindex","0",3,"matMenuTriggerFor"],[1,"lg-icon"],["tabindex","0",1,"hide-lt-md"],["mat-icon-button","","tabindex","0",1,"ml-1","img-button",3,"matMenuTriggerFor"],["src","assets/images/user_placeholder.png",3,"alt"],[1,"ml-1","language"],[3,"overlapTrigger"],["mat-menu-item","","routerLink","/clients","tabindex","0"],["mat-menu-item","","routerLink","/groups","tabindex","0"],["mat-menu-item","","routerLink","/centers","tabindex","0"],["mat-menu-item","","tabindex","0",3,"routerLink"],["mat-menu-item","","tabindex","0",3,"matMenuTriggerFor"],["mat-menu-item","","tabindex","0",3,"click"],["mat-menu-item","","routerLink","/templates","tabindex","0"],["matListIcon",""],["icon","question-circle","size","sm"],["icon","user","size","sm"],["icon","cog","size","sm"],["mat-menu-item","","id","logout","tabindex","0",3,"click"],["icon","sign-out-alt","size","sm"],["mat-icon-button","","tabindex","0",3,"click","matTooltip"],["icon","bars","size","lg"],["mat-icon-button","","tabindex","0",1,"hide-lt-md",3,"click","matTooltip"],["icon","chevron-left"],["icon","chevron-right"],["tabindex","0",1,"tab-link",3,"matMenuTriggerFor"],["icon","university","size","lg",1,"mr-05"],["tabindex","0",1,"tab-link","accounting-link",3,"routerLink"],["icon","money-bill-alt","size","lg",1,"mr-05"],["icon","chart-bar","size","lg",1,"mr-05"],["icon","shield-alt","size","lg",1,"mr-05"],["tabindex","0",1,"tab-link",3,"click"],["icon","info","size","lg",1,"mr-05"],[1,"mw300"],[1,"layout-row","align-end","gap-2px","responsive-column"],["mat-raised-button","","color","warn",3,"click"],["mat-raised-button","","color","primary",3,"click"]],template:function(n,i){if(n&1){let s=Y();l(0,"mat-toolbar",27),E(1,Pse,3,4,"button",28),E(2,Dse,4,6,"button",29),l(3,"div",30),F(4,Ese,6,4,"a",31),l(5,"span",32),F(6,Ise,5,5,"a",33)(7,Ose,6,4,"a",31)(8,Ase,6,4,"a",31)(9,Fse,5,3,"a",34),r()(),b(10,"span",35),l(11,"div",36,0),b(13,"mifosx-search-tool",37),r(),l(14,"div",38,1),b(16,"mifosx-language-selector",39),r(),l(17,"button",40)(18,"mat-icon",41),c(19,"language"),r()(),l(20,"div",null,2),b(22,"mifosx-notifications-tray",42,3),r(),l(24,"div",null,4),b(26,"mifosx-theme-toggle",37),r(),l(27,"div",null,5)(29,"button",43),b(30,"img",44),p(31,"translate"),r()()(),l(32,"mat-menu",null,6),b(34,"mifosx-language-selector",45),r(),l(35,"mat-menu",46,7)(37,"button",47),c(38),p(39,"translate"),r(),l(40,"button",48),c(41),p(42,"translate"),r(),l(43,"button",49),c(44),p(45,"translate"),r(),l(46,"span",32)(47,"button",50),c(48),p(49,"translate"),r(),l(50,"button",51),c(51),p(52,"translate"),r(),l(53,"button",51),c(54),p(55,"translate"),r()()(),l(56,"mat-menu",46,8)(58,"button",50),c(59),p(60,"translate"),r(),l(61,"button",50),c(62),p(63,"translate"),r(),l(64,"button",50),c(65),p(66,"translate"),r(),l(67,"button",50),c(68),p(69,"translate"),r(),l(70,"button",50),c(71),p(72,"translate"),r(),l(73,"button",50),c(74),p(75,"translate"),r()(),l(76,"mat-menu",46,9)(78,"button",52),R("click",function(){return V(s),q(i.navigateMenu("/appusers"))}),c(79),p(80,"translate"),r(),l(81,"button",50),c(82),p(83,"translate"),r(),l(84,"button",50),c(85),p(86,"translate"),r(),l(87,"button",50),c(88),p(89,"translate"),r(),l(90,"button",53),c(91),p(92,"translate"),r()(),l(93,"mat-menu",46,10)(95,"button",52),R("click",function(){return V(s),q(i.help())}),l(96,"mat-icon",54),b(97,"fa-icon",55),r(),l(98,"span"),c(99),p(100,"translate"),r()(),l(101,"button",50)(102,"mat-icon"),b(103,"fa-icon",56),r(),l(104,"span"),c(105),p(106,"translate"),r()(),l(107,"button",50)(108,"mat-icon"),b(109,"fa-icon",57),r(),l(110,"span"),c(111),p(112,"translate"),r()(),l(113,"button",58),R("click",function(){return V(s),q(i.logout())}),l(114,"mat-icon"),b(115,"fa-icon",59),r(),l(116,"span"),c(117),p(118,"translate"),r()()(),F(119,kse,13,12,"ng-template",null,11,ti)(121,Bse,16,15,"ng-template",null,12,ti)(123,Rse,16,15,"ng-template",null,13,ti)(125,Nse,16,15,"ng-template",null,14,ti)(127,Lse,10,9,"ng-template",null,15,ti)(129,Vse,16,15,"ng-template",null,16,ti)(131,qse,16,15,"ng-template",null,17,ti)(133,zse,16,15,"ng-template",null,18,ti)(135,Hse,16,15,"ng-template",null,19,ti)(137,Gse,16,15,"ng-template",null,20,ti)(139,jse,16,15,"ng-template",null,21,ti)}if(n&2){let s=xe(33),d=xe(57),u=xe(77),f=xe(94);a(),I(i.sidenavCollapsed?-1:1),a(),I(i.sidenav.opened?2:-1),a(2),g("mifosxHasPermission","READ_INSTITUTION"),a(2),g("mifosxHasPermission","READ_ACCOUNTING"),a(),g("mifosxHasPermission","READ_REPORTS"),a(),g("mifosxHasPermission","READ_ADMIN"),a(),g("mifosxHasPermission","READ_CONFIG_WIZARD"),a(8),g("matMenuTriggerFor",s),a(12),g("matMenuTriggerFor",f),a(),g("alt",m(31,49,"labels.headings.User Profile")),a(5),g("overlapTrigger",!1),a(3),h(m(39,51,"labels.menus.Clients")),a(3),h(m(42,53,"labels.menus.Groups")),a(3),h(m(45,55,"labels.menus.Centers")),a(3),g("routerLink",oe(93,tB)),a(),v(" ",m(49,57,"labels.menus.Accounting")," "),a(2),g("matMenuTriggerFor",d),a(),v(" ",m(52,59,"labels.menus.Reports")," "),a(2),g("matMenuTriggerFor",u),a(),h(m(55,61,"labels.menus.Admin")),a(2),g("overlapTrigger",!1),a(2),g("routerLink",oe(94,fse)),a(),h(m(60,63,"labels.menus.All")),a(2),g("routerLink",oe(95,hse)),a(),v(" ",m(63,65,"labels.menus.Clients")," "),a(2),g("routerLink",oe(96,gse)),a(),h(m(66,67,"labels.menus.Loans")),a(2),g("routerLink",oe(97,_se)),a(),v(" ",m(69,69,"labels.menus.Savings")," "),a(2),g("routerLink",oe(98,Cse)),a(),h(m(72,71,"labels.menus.Funds")),a(2),g("routerLink",oe(99,vse)),a(),v(" ",m(75,73,"labels.menus.Accounting")," "),a(2),g("overlapTrigger",!1),a(3),h(m(80,75,"labels.menus.Users")),a(2),g("routerLink",oe(100,xse)),a(),v(" ",m(83,77,"labels.menus.Organization")," "),a(2),g("routerLink",oe(101,bse)),a(),h(m(86,79,"labels.menus.System")),a(2),g("routerLink",oe(102,yse)),a(),h(m(89,81,"labels.menus.Products")),a(3),h(m(92,83,"labels.menus.Templates")),a(2),g("overlapTrigger",!1),a(6),h(m(100,85,"labels.menus.Help")),a(2),g("routerLink",oe(103,Sse)),a(4),h(m(106,87,"labels.menus.Profile")),a(2),g("routerLink",oe(104,wse)),a(4),h(m(112,89,"labels.menus.Settings")),a(6),h(m(118,91,"labels.menus.Sign Out"))}},dependencies:[ue,fe,Ae,ve,Ke,vk,wi,si,ke,nc,ak,Lg,Yo,ok,Kg,ic,tc,he],styles:["#mifosx-toolbar[_ngcontent-%COMP%]{position:relative;box-shadow:0 3px 1px -2px #0003,0 2px 2px #00000024,0 1px 5px #0000001f}#mifosx-toolbar[_ngcontent-%COMP%] .tab-nav-bar[_ngcontent-%COMP%]{display:flex;align-items:center;padding:0 1rem}#mifosx-toolbar[_ngcontent-%COMP%] .tab-link[_ngcontent-%COMP%]{min-width:auto;padding:15px 1rem;text-decoration:none;font-weight:500;font-size:14px;color:#ffffffb3;cursor:pointer}#mifosx-toolbar[_ngcontent-%COMP%] .tab-link[_ngcontent-%COMP%]:hover{color:#fff}#mifosx-toolbar[_ngcontent-%COMP%] .search-bar[_ngcontent-%COMP%] .search[_ngcontent-%COMP%]{max-width:400px;width:100%;font-size:1rem}#mifosx-toolbar[_ngcontent-%COMP%] .language[_ngcontent-%COMP%]{min-width:80px;width:80px;font-size:.875rem;margin-top:.375rem}#mifosx-toolbar[_ngcontent-%COMP%] .img-button[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{width:32px;height:32px;border-radius:50%}#mifosx-toolbar[_ngcontent-%COMP%] .ml-1[_ngcontent-%COMP%]{margin-left:1rem}#mifosx-toolbar[_ngcontent-%COMP%] .mr-1[_ngcontent-%COMP%]{margin-right:1rem}.lg-icon[_ngcontent-%COMP%]{display:none}@media (width <= 959px){.lg-icon[_ngcontent-%COMP%]{display:block;margin-left:5px}}.toolbar-spacer[_ngcontent-%COMP%]{flex:1 1 auto}.white-text-language[_ngcontent-%COMP%] mifosx-language-selector{color:#fff!important}.white-text-language[_ngcontent-%COMP%] mifosx-language-selector *{background-color:transparent!important;color:#fff!important}.white-text-search[_ngcontent-%COMP%] mifosx-search-tool{color:#fff!important}.white-text-search[_ngcontent-%COMP%] mifosx-search-tool *{background-color:transparent!important;color:#fff!important;margin-bottom:0}"]})}}return e})();var $se=["breadcrumb"],Use=["templateBreadcrumb"];function Wse(e,o){if(e&1&&(l(0,"a",8),c(1),r()),e&2){let t=w(2).$implicit,n=w(2);g("routerLink",t.url),a(),h(n.getTranslate(t.label))}}function Qse(e,o){if(e&1&&(l(0,"span"),c(1),r()),e&2){let t=w(2).$implicit,n=w(2);a(),h(n.getTranslate(t.label))}}function Yse(e,o){if(e&1&&(l(0,"span",7),E(1,Wse,2,2,"a",8),E(2,Qse,2,1,"span"),r()),e&2){let t=w().$implicit;a(),I(t.url?1:-1),a(),I(t.url?-1:2)}}function Jse(e,o){if(e&1&&(l(0,"span"),c(1),r()),e&2){let t=w().$implicit,n=w(2);a(),h(n.getTranslate(t.label))}}function Kse(e,o){if(e&1&&(l(0,"li",6),E(1,Yse,3,2,"span",7),E(2,Jse,2,1,"span"),r()),e&2){let t=o.$index,n=o.$count;a(),I(t!==n-1?1:-1),a(),I(t===n-1?2:-1)}}function Xse(e,o){if(e&1&&(l(0,"span",5),Se(1,Kse,3,2,"li",6,Pe),r()),e&2){let t=w();a(),we(t.breadcrumbs)}}function Zse(e,o){if(e&1){let t=Y();l(0,"h2"),c(1),p(2,"translate"),r(),l(3,"p",9),c(4),p(5,"translate"),r(),l(6,"div",10)(7,"button",11),R("click",function(){let i=V(t).popover,s=w();return i.close(),q(s.configurationWizardService.closeConfigWizard())}),c(8),p(9,"translate"),r(),l(10,"button",12),R("click",function(){let i=V(t).popover,s=w();return i.close(),q(s.previousStep())}),c(11),p(12,"translate"),r(),l(13,"button",12),R("click",function(){let i=V(t).popover,s=w();return i.close(),q(s.nextStep())}),c(14),p(15,"translate"),r()()}e&2&&(a(),h(m(2,5,"labels.menus.Breadcrumbs")),a(3),h(m(5,7,"labels.text.User's current location")),a(4),v(" ",m(9,9,"labels.buttons.Close")," "),a(3),v(" ",m(12,11,"labels.buttons.Back")," "),a(3),v(" ",m(15,13,"labels.buttons.Next")," "))}var iB="breadcrumb",h4="routeParamBreadcrumb",g4="routeResolveBreadcrumb",nB="addBreadcrumbLink",E_=(()=>{class e{constructor(){this.activatedRoute=T(Ie),this.router=T(qe),this.configurationWizardService=T(Qi),this.popoverService=T(Wi),this.translateService=T(yi),this.generateBreadcrumbs()}generateBreadcrumbs(){this.router.events.pipe(Fc(n=>n instanceof Dg)).subscribe(()=>{this.breadcrumbs=[];let n=this.activatedRoute.root,i="";for(;n.children.length>0;){let s=n.children,d,u;s.forEach(f=>{if(n=f,d=!1,f.outlet!=="primary")return;let _=f.snapshot.url.map(y=>y.path).join("/");if(i+=`/${_}`,i==="/"&&(d="Home"),f.routeConfig&&f.routeConfig.data){if(f.snapshot.data.hasOwnProperty(g4)&&f.snapshot.data[g4])d=f.snapshot.data,f.snapshot.data[g4].forEach(y=>{d=d[y]});else if(f.snapshot.data.hasOwnProperty(h4)&&f.snapshot.paramMap.get(f.snapshot.data[h4])){d=f.snapshot.paramMap.get(f.snapshot.data[h4]);let y=f.snapshot.data;if(y.breadcrumb==="Clients")d=this.printableValue(y.clientViewData.displayName),i+="/general";else if(y.breadcrumb==="Groups")d=y.groupViewData.name;else if(y.breadcrumb==="Centers")d=y.centerViewData.name;else if(y.breadcrumb==="Loans")d=this.printableValue(y.loanDetailsData.loanProductName)+" ("+y.loanDetailsData.accountNo+")";else if(y.breadcrumb==="Savings"){let P=y.savingsAccountData?.savingsProductName??"",S=y.savingsAccountData?.accountNo??"";d=this.printableValue(P)+(S?" ("+S+")":"")}else y.breadcrumb==="Fixed Deposits"?d=this.printableValue(y.fixedDepositsAccountData.depositProductName)+" ("+y.fixedDepositsAccountData.accountNo+")":y.breadcrumb==="Loan Products"?d=this.printableValue(y.loanProduct.name):y.breadcrumb==="Charges"?d=y.loansAccountCharge.name:y.breadcrumb==="Saving Products"?d=y.savingProduct.name:y.breadcrumb==="Share Products"?d=y.shareProduct.name:y.breadcrumb==="Fixed Deposit Products"?d=y.fixedDepositProduct.name:y.breadcrumb==="Recurring Deposit Products"?d=y.recurringDepositProduct.name:y.breadcrumb==="Floating Rates"?d=y.floatingRate.name:y.breadcrumb==="Tax Components"?d=y.taxComponent.name:y.breadcrumb==="Tax Groups"&&(d=y.taxGroup.name)}else f.snapshot.data.hasOwnProperty(iB)&&(d=f.snapshot.data[iB]);f.snapshot.data.hasOwnProperty(nB)?u=f.snapshot.data[nB]:u=i}if(u!==void 0&&u.length>8&&u.search("/clients/")>0){let P=u.replace("/general/","/");P=P.replace("//","/"),P+="/general",P=P.replace("/general/general","/general"),u=P}let x={label:d,url:u};d&&this.breadcrumbs.push(x)})}})}printableValue(t){return t.length<=30?t:t.substring(0,30)+"..."}showPopover(t,n,i,s){setTimeout(()=>this.popoverService.open(t,n,i,s,{}),200)}ngAfterViewInit(){this.configurationWizardService.showBreadcrumbs===!0&&setTimeout(()=>{this.showPopover(this.templateBreadcrumb,this.breadcrumb.nativeElement,"bottom",!0)})}nextStep(){this.configurationWizardService.showBreadcrumbs=!1,this.configurationWizardService.showHome=!0,this.router.routeReuseStrategy.shouldReuseRoute=()=>!1,this.router.onSameUrlNavigation="reload",this.router.navigate(["/home"])}previousStep(){this.configurationWizardService.showBreadcrumbs=!1,this.configurationWizardService.showSideNavChartofAccounts=!0,this.router.routeReuseStrategy.shouldReuseRoute=()=>!1,this.router.onSameUrlNavigation="reload",this.router.navigate(["/home"])}getTranslate(t){let n="labels.text."+t,i=this.translateService.instant(n);return i!==n?i:t}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275cmp=me({type:e,selectors:[["mifosx-breadcrumb"]],viewQuery:function(n,i){if(n&1&&(Ee($se,5),Ee(Use,5)),n&2){let s;Te(s=Me())&&(i.breadcrumb=s.first),Te(s=Me())&&(i.templateBreadcrumb=s.first)}},decls:8,vars:2,consts:[["breadcrumb",""],["templateBreadcrumb",""],[1,"breadcrumb-wrapper"],[1,"breadcrumb"],[1,"breadcrumb-title"],[1,"separator"],[1,"breadcrumb-label"],[1,"breadcrumb-link"],[3,"routerLink"],[1,"mw300"],[1,"layout-row","align-end","gap-2px","responsive-column"],["mat-raised-button","","color","warn",3,"click"],["mat-raised-button","","color","primary",3,"click"]],template:function(n,i){n&1&&(l(0,"nav",2)(1,"ul",3)(2,"span",4,0),c(4),r(),E(5,Xse,3,0,"span",5),r()(),F(6,Zse,16,15,"ng-template",null,1,ti)),n&2&&(a(4),h(i.getTranslate(i.breadcrumbs[(i.breadcrumbs==null?null:i.breadcrumbs.length)-1].label)),a(),I(i.breadcrumbs.length-1!==0?5:-1))},dependencies:[ue,fe,Ae,ve,he],styles:['body[_ngcontent-%COMP%] table[_ngcontent-%COMP%] tbody[_ngcontent-%COMP%] tr[_ngcontent-%COMP%]:nth-child(2n){background-color:#f2f2f2}.bg-black[_ngcontent-%COMP%]{background-color:#000}.bg-light-grey[_ngcontent-%COMP%]{background-color:#e5e5e5}.bg-medium-grey[_ngcontent-%COMP%]{background-color:#ccc}.bg-grey[_ngcontent-%COMP%]{background-color:#999}.bg-dark-grey[_ngcontent-%COMP%]{background-color:#222}.bg-white[_ngcontent-%COMP%], .bg-fff[_ngcontent-%COMP%]{background-color:#fff}.bg-none[_ngcontent-%COMP%], .no-bg[_ngcontent-%COMP%]{background:none;background-image:none;background-color:transparent}.bg-facebook[_ngcontent-%COMP%]{background-color:#47639e}.bg-twitter[_ngcontent-%COMP%]{background-color:#02a8f3}body[_ngcontent-%COMP%] table[_ngcontent-%COMP%]{border:1px solid rgba(0,0,0,.12)}.no-border[_ngcontent-%COMP%]{border:none}.no-border-t[_ngcontent-%COMP%]{border-top:none}.no-border-r[_ngcontent-%COMP%]{border-right:none}.no-border-b[_ngcontent-%COMP%]{border-bottom:none}.no-border-l[_ngcontent-%COMP%]{border-left:none}.no-border-lr[_ngcontent-%COMP%], .no-border-rl[_ngcontent-%COMP%]{border-left:none;border-right:none}.no-border-tb[_ngcontent-%COMP%], .no-border-bt[_ngcontent-%COMP%]{border-top:none;border-bottom:none}.no-border-tl[_ngcontent-%COMP%], .no-border-lt[_ngcontent-%COMP%]{border-top:none;border-left:none}.no-border-tr[_ngcontent-%COMP%], .no-border-rt[_ngcontent-%COMP%]{border-top:none;border-right:none}.no-border-bl[_ngcontent-%COMP%], .no-border-lb[_ngcontent-%COMP%]{border-bottom:none;border-left:none}.no-border-br[_ngcontent-%COMP%], .no-border-rb[_ngcontent-%COMP%]{border-bottom:none;border-right:none}.border-dashed[_ngcontent-%COMP%], .border-dotted[_ngcontent-%COMP%]{border-style:dashed}.border-black[_ngcontent-%COMP%]{border-color:#000}.border-light-grey[_ngcontent-%COMP%]{border-color:#e5e5e5}.border-medium-grey[_ngcontent-%COMP%]{border-color:#ccc}.border-grey[_ngcontent-%COMP%]{border-color:#999}.border-dark-grey[_ngcontent-%COMP%]{border-color:#2222}.border-white[_ngcontent-%COMP%], .border-fff[_ngcontent-%COMP%]{border-color:#fff}.no-border-radius[_ngcontent-%COMP%]{border-radius:0}.radius3[_ngcontent-%COMP%]{border-radius:3px}.radius5[_ngcontent-%COMP%]{border-radius:5px}.radius10[_ngcontent-%COMP%]{border-radius:10px}.column-mandatory[_ngcontent-%COMP%]{color:#5cb85c;text-align:center}.not-column-mandatory[_ngcontent-%COMP%]{color:#666f73;text-align:center}.cdk-drag-placeholder[_ngcontent-%COMP%]{background:#3498db}.yes[_ngcontent-%COMP%]{color:#5cb85c!important;background-color:#5cb85c;height:4px;cursor:none}.no[_ngcontent-%COMP%]{color:red;background-color:red;height:4px;cursor:none}.strike[_ngcontent-%COMP%]{text-decoration:line-through;color:red}.transfer[_ngcontent-%COMP%]{color:#16a085}.linked[_ngcontent-%COMP%]{color:#4461e2}.accrual[_ngcontent-%COMP%]{color:#999}.fa-question[_ngcontent-%COMP%]{color:#4461e2}.enabled[_ngcontent-%COMP%]{color:#32cd32}.disabled[_ngcontent-%COMP%]{color:#f44366}.v-mid[_ngcontent-%COMP%], .v-m[_ngcontent-%COMP%]{vertical-align:middle}.v-top[_ngcontent-%COMP%], .v-t[_ngcontent-%COMP%]{vertical-align:top}.v-bottom[_ngcontent-%COMP%], .v-b[_ngcontent-%COMP%]{vertical-align:bottom}.v-super[_ngcontent-%COMP%]{vertical-align:super}.r-amount[_ngcontent-%COMP%]{text-align:right!important;padding-right:5px!important}.left[_ngcontent-%COMP%]{text-align:left!important}.right[_ngcontent-%COMP%]{text-align:right!important}.center[_ngcontent-%COMP%]{text-align:center!important}.amount-plus[_ngcontent-%COMP%]{color:#000}.amount-minus[_ngcontent-%COMP%]{color:#4461e2}.block[_ngcontent-%COMP%]{display:block}.inline[_ngcontent-%COMP%]{display:inline}.in-block[_ngcontent-%COMP%]{display:inline-block;zoom:1}.d-none[_ngcontent-%COMP%], .hide[_ngcontent-%COMP%], .hidden[_ngcontent-%COMP%]{display:none}.t-0[_ngcontent-%COMP%]{top:0}.b-0[_ngcontent-%COMP%]{bottom:0}.l-0[_ngcontent-%COMP%]{left:0}.r-0[_ngcontent-%COMP%]{right:0}.tb-0[_ngcontent-%COMP%]{top:0;bottom:0}.lr-0[_ngcontent-%COMP%]{left:0;right:0}.f-left[_ngcontent-%COMP%]{float:left}.f-right[_ngcontent-%COMP%]{float:right}.f-none[_ngcontent-%COMP%]{float:none}textarea[_ngcontent-%COMP%]{resize:both}textarea.vertical[_ngcontent-%COMP%], textarea.horizontal[_ngcontent-%COMP%]{resize:vertical}textarea.noresize[_ngcontent-%COMP%]{resize:none}.full-input[_ngcontent-%COMP%] input[_ngcontent-%COMP%], .full-input[_ngcontent-%COMP%] select[_ngcontent-%COMP%], .full-input[_ngcontent-%COMP%] textarea[_ngcontent-%COMP%]{width:100%}.normal[_ngcontent-%COMP%] input[_ngcontent-%COMP%], .normal[_ngcontent-%COMP%] select[_ngcontent-%COMP%], .normal[_ngcontent-%COMP%] textarea[_ngcontent-%COMP%], .full-input[_ngcontent-%COMP%] [type=checkbox][_ngcontent-%COMP%], .full-input[_ngcontent-%COMP%] [type=radio][_ngcontent-%COMP%]{width:auto}.mat-tab-body-content[_ngcontent-%COMP%]{margin-bottom:20px}.mat-datepicker-input[_ngcontent-%COMP%]{margin-top:5px;margin-bottom:5px}.loader-wrapper[_ngcontent-%COMP%]{height:100vh;width:100vw}.loader-wrapper[_ngcontent-%COMP%] .triangle[_ngcontent-%COMP%]{width:0;height:0;border-style:solid;position:absolute;animation:_ngcontent-%COMP%_rotate .8s infinite .2s}.loader-wrapper[_ngcontent-%COMP%] .bottom[_ngcontent-%COMP%]{border-width:0 90px 90px;border-color:transparent transparent #1fb050;bottom:calc(50% - 100px);left:calc(50% - 90px)}.loader-wrapper[_ngcontent-%COMP%] .top[_ngcontent-%COMP%]{border-width:90px 90px 0;border-color:#b4d575 transparent transparent;top:calc(50% - 100px);left:calc(50% - 90px)}.loader-wrapper[_ngcontent-%COMP%] .left[_ngcontent-%COMP%]{border-width:90px 0 90px 90px;border-color:transparent transparent transparent #1074b9;top:calc(50% - 90px);left:calc(50% - 100px)}.loader-wrapper[_ngcontent-%COMP%] .right[_ngcontent-%COMP%]{border-width:90px 90px 90px 0;border-color:transparent #1daeec transparent transparent;top:calc(50% - 90px);right:calc(50% - 100px)}@keyframes _ngcontent-%COMP%_rotate{0%{transform:rotate(0)}to{transform:rotate(360deg)}}body[_ngcontent-%COMP%]{margin:0}.container[_ngcontent-%COMP%]{margin:0 auto}.mb-05[_ngcontent-%COMP%]{margin-bottom:.5rem}.mr-05[_ngcontent-%COMP%]{margin-right:.5rem}.mb-1[_ngcontent-%COMP%]{margin-bottom:1rem}.mt-1[_ngcontent-%COMP%]{margin-top:1rem}.m-5[_ngcontent-%COMP%]{margin:5px}.m-t-5[_ngcontent-%COMP%]{margin-top:5px}.m-r-5[_ngcontent-%COMP%]{margin-right:5px}.m-b-5[_ngcontent-%COMP%]{margin-bottom:5px}.m-l-5[_ngcontent-%COMP%]{margin-left:5px}.m-v-5[_ngcontent-%COMP%]{margin:5px 0}.m-h-5[_ngcontent-%COMP%]{margin:0 5px}.m-10[_ngcontent-%COMP%]{margin:10px}.m-t-10[_ngcontent-%COMP%]{margin-top:10px}.m-r-10[_ngcontent-%COMP%]{margin-right:10px}.m-b-10[_ngcontent-%COMP%]{margin-bottom:10px}.m-l-10[_ngcontent-%COMP%]{margin-left:10px}.m-v-10[_ngcontent-%COMP%]{margin:10px 0}.m-h-10[_ngcontent-%COMP%]{margin:0 10px}.m-15[_ngcontent-%COMP%]{margin:15px}.m-t-15[_ngcontent-%COMP%]{margin-top:15px}.m-r-15[_ngcontent-%COMP%]{margin-right:15px}.m-b-15[_ngcontent-%COMP%]{margin-bottom:15px}.m-l-15[_ngcontent-%COMP%]{margin-left:15px}.m-v-15[_ngcontent-%COMP%]{margin:15px 0}.m-h-15[_ngcontent-%COMP%]{margin:0 15px}.m-20[_ngcontent-%COMP%]{margin:20px}.m-t-20[_ngcontent-%COMP%]{margin-top:20px}.m-r-20[_ngcontent-%COMP%]{margin-right:20px}.m-b-20[_ngcontent-%COMP%]{margin-bottom:20px}.m-l-20[_ngcontent-%COMP%]{margin-left:20px}.m-v-20[_ngcontent-%COMP%]{margin:20px 0}.m-h-20[_ngcontent-%COMP%]{margin:0 20px}.m-25[_ngcontent-%COMP%]{margin:25px}.m-t-25[_ngcontent-%COMP%]{margin-top:25px}.m-r-25[_ngcontent-%COMP%]{margin-right:25px}.m-b-25[_ngcontent-%COMP%]{margin-bottom:25px}.m-l-25[_ngcontent-%COMP%]{margin-left:25px}.m-v-25[_ngcontent-%COMP%]{margin:25px 0}.m-h-25[_ngcontent-%COMP%]{margin:0 25px}.m-30[_ngcontent-%COMP%]{margin:30px}.m-t-30[_ngcontent-%COMP%]{margin-top:30px}.m-r-30[_ngcontent-%COMP%]{margin-right:30px}.m-b-30[_ngcontent-%COMP%]{margin-bottom:30px}.m-l-30[_ngcontent-%COMP%]{margin-left:30px}.m-v-30[_ngcontent-%COMP%]{margin:30px 0}.m-h-30[_ngcontent-%COMP%]{margin:0 30px}.m-35[_ngcontent-%COMP%]{margin:35px}.m-t-35[_ngcontent-%COMP%]{margin-top:35px}.m-r-35[_ngcontent-%COMP%]{margin-right:35px}.m-b-35[_ngcontent-%COMP%]{margin-bottom:35px}.m-l-35[_ngcontent-%COMP%]{margin-left:35px}.m-v-35[_ngcontent-%COMP%]{margin:35px 0}.m-h-35[_ngcontent-%COMP%]{margin:0 35px}.m-40[_ngcontent-%COMP%]{margin:40px}.m-t-40[_ngcontent-%COMP%]{margin-top:40px}.m-r-40[_ngcontent-%COMP%]{margin-right:40px}.m-b-40[_ngcontent-%COMP%]{margin-bottom:40px}.m-l-40[_ngcontent-%COMP%]{margin-left:40px}.m-v-40[_ngcontent-%COMP%]{margin:40px 0}.m-h-40[_ngcontent-%COMP%]{margin:0 40px}.m-45[_ngcontent-%COMP%]{margin:45px}.m-t-45[_ngcontent-%COMP%]{margin-top:45px}.m-r-45[_ngcontent-%COMP%]{margin-right:45px}.m-b-45[_ngcontent-%COMP%]{margin-bottom:45px}.m-l-45[_ngcontent-%COMP%]{margin-left:45px}.m-v-45[_ngcontent-%COMP%]{margin:45px 0}.m-h-45[_ngcontent-%COMP%]{margin:0 45px}.m-50[_ngcontent-%COMP%]{margin:50px}.m-t-50[_ngcontent-%COMP%]{margin-top:50px}.m-r-50[_ngcontent-%COMP%]{margin-right:50px}.m-b-50[_ngcontent-%COMP%]{margin-bottom:50px}.m-l-50[_ngcontent-%COMP%]{margin-left:50px}.m-v-50[_ngcontent-%COMP%]{margin:50px 0}.m-h-50[_ngcontent-%COMP%]{margin:0 50px}.m-55[_ngcontent-%COMP%]{margin:55px}.m-t-55[_ngcontent-%COMP%]{margin-top:55px}.m-r-55[_ngcontent-%COMP%]{margin-right:55px}.m-b-55[_ngcontent-%COMP%]{margin-bottom:55px}.m-l-55[_ngcontent-%COMP%]{margin-left:55px}.m-v-55[_ngcontent-%COMP%]{margin:55px 0}.m-h-55[_ngcontent-%COMP%]{margin:0 55px}.m-60[_ngcontent-%COMP%]{margin:60px}.m-t-60[_ngcontent-%COMP%]{margin-top:60px}.m-r-60[_ngcontent-%COMP%]{margin-right:60px}.m-b-60[_ngcontent-%COMP%]{margin-bottom:60px}.m-l-60[_ngcontent-%COMP%]{margin-left:60px}.m-v-60[_ngcontent-%COMP%]{margin:60px 0}.m-h-60[_ngcontent-%COMP%]{margin:0 60px}.m-65[_ngcontent-%COMP%]{margin:65px}.m-t-65[_ngcontent-%COMP%]{margin-top:65px}.m-r-65[_ngcontent-%COMP%]{margin-right:65px}.m-b-65[_ngcontent-%COMP%]{margin-bottom:65px}.m-l-65[_ngcontent-%COMP%]{margin-left:65px}.m-v-65[_ngcontent-%COMP%]{margin:65px 0}.m-h-65[_ngcontent-%COMP%]{margin:0 65px}.m-70[_ngcontent-%COMP%]{margin:70px}.m-t-70[_ngcontent-%COMP%]{margin-top:70px}.m-r-70[_ngcontent-%COMP%]{margin-right:70px}.m-b-70[_ngcontent-%COMP%]{margin-bottom:70px}.m-l-70[_ngcontent-%COMP%]{margin-left:70px}.m-v-70[_ngcontent-%COMP%]{margin:70px 0}.m-h-70[_ngcontent-%COMP%]{margin:0 70px}.m-75[_ngcontent-%COMP%]{margin:75px}.m-t-75[_ngcontent-%COMP%]{margin-top:75px}.m-r-75[_ngcontent-%COMP%]{margin-right:75px}.m-b-75[_ngcontent-%COMP%]{margin-bottom:75px}.m-l-75[_ngcontent-%COMP%]{margin-left:75px}.m-v-75[_ngcontent-%COMP%]{margin:75px 0}.m-h-75[_ngcontent-%COMP%]{margin:0 75px}.m-80[_ngcontent-%COMP%]{margin:80px}.m-t-80[_ngcontent-%COMP%]{margin-top:80px}.m-r-80[_ngcontent-%COMP%]{margin-right:80px}.m-b-80[_ngcontent-%COMP%]{margin-bottom:80px}.m-l-80[_ngcontent-%COMP%]{margin-left:80px}.m-v-80[_ngcontent-%COMP%]{margin:80px 0}.m-h-80[_ngcontent-%COMP%]{margin:0 80px}.no-m[_ngcontent-%COMP%]{margin:0}.no-m-t[_ngcontent-%COMP%]{margin-top:0}.no-m-r[_ngcontent-%COMP%]{margin-right:0}.no-m-b[_ngcontent-%COMP%]{margin-bottom:0}.no-m-l[_ngcontent-%COMP%]{margin-left:0}.no-m-v[_ngcontent-%COMP%], .no-m-h[_ngcontent-%COMP%], .no-margin[_ngcontent-%COMP%]{margin:0}.no-m-lr[_ngcontent-%COMP%], .no-m-rl[_ngcontent-%COMP%]{margin-left:0;margin-right:0}.no-m-tb[_ngcontent-%COMP%], .no-m-bt[_ngcontent-%COMP%]{margin-top:0;margin-bottom:0}.m-t-only[_ngcontent-%COMP%]{margin-left:0;margin-right:0;margin-bottom:0}.m-b-only[_ngcontent-%COMP%]{margin-left:0;margin-right:0;margin-top:0}.m-l-only[_ngcontent-%COMP%]{margin-right:0;margin-top:0;margin-bottom:0}.m-r-only[_ngcontent-%COMP%]{margin-left:0;margin-top:0;margin-bottom:0}.m-auto[_ngcontent-%COMP%]{margin-left:auto;margin-right:auto}.ls-0[_ngcontent-%COMP%]{margin-left:10px;margin-right:10px}html[_ngcontent-%COMP%], body[_ngcontent-%COMP%]{-webkit-tap-highlight-color:transparent}div[_ngcontent-%COMP%]{box-sizing:border-box}.color-inherit[_ngcontent-%COMP%]{color:inherit}.no-shadow[_ngcontent-%COMP%]{box-shadow:none}.pointer[_ngcontent-%COMP%]{cursor:pointer}.nolist[_ngcontent-%COMP%]{list-style:none}.actions-menu[_ngcontent-%COMP%]{color:#fff}.alert[_ngcontent-%COMP%]{background-color:#e8f4fd;padding:6px 16px;font-size:.875rem;font-family:Roboto,Helvetica Neue,sans-serif;font-weight:400;line-height:1.43;border-radius:4px;letter-spacing:normal;margin:10px}.alert[_ngcontent-%COMP%] .message[_ngcontent-%COMP%]{padding:8px 0;font-size:18px}.alert[_ngcontent-%COMP%] .alert-check[_ngcontent-%COMP%]{color:#359ff4;margin-right:2px;font-size:1.4rem} .mat-tooltip{font-size:15px;color:#fff!important;background-color:#4461e2b3;border:1px solid rgb(25.7777777778,51.5555555556,166.2222222222);max-width:400px!important;white-space:pre-line!important}.loading[_ngcontent-%COMP%]{position:absolute;min-width:100%;width:100px;height:12px;background:linear-gradient(125deg,#fff,#4461e2,#fff);animation:grow 4s linear infinite,move 4s linear infinite}mat-card-title[_ngcontent-%COMP%]{font-weight:600;font-size:x-large;padding-left:20px;padding-top:20px}html[_ngcontent-%COMP%], body[_ngcontent-%COMP%]{overflow:hidden}.overflow-x-scroll[_ngcontent-%COMP%]{max-width:100%;overflow-x:auto}.overflow-no[_ngcontent-%COMP%]{overflow:hidden}.overflow-auto[_ngcontent-%COMP%]{overflow:auto}.overflow-scroll[_ngcontent-%COMP%]{overflow:scroll}.table-container[_ngcontent-%COMP%]{overflow-x:auto;max-width:100%}body[_ngcontent-%COMP%], .no-p[_ngcontent-%COMP%]{padding:0}.no-p-t[_ngcontent-%COMP%]{padding-top:0}.no-p-r[_ngcontent-%COMP%]{padding-right:0}.no-p-b[_ngcontent-%COMP%]{padding-bottom:0}.no-p-l[_ngcontent-%COMP%]{padding-left:0}.no-p-v[_ngcontent-%COMP%], .no-p-h[_ngcontent-%COMP%]{padding:0}.p-5[_ngcontent-%COMP%]{padding:5px}.p-t-5[_ngcontent-%COMP%]{padding-top:5px}.p-r-5[_ngcontent-%COMP%]{padding-right:5px}.p-b-5[_ngcontent-%COMP%]{padding-bottom:5px}.p-l-5[_ngcontent-%COMP%]{padding-left:5px}.p-v-5[_ngcontent-%COMP%]{padding:5px 0}.p-h-5[_ngcontent-%COMP%]{padding:0 5px}.p-10[_ngcontent-%COMP%]{padding:10px}.p-t-10[_ngcontent-%COMP%]{padding-top:10px}.p-b-10[_ngcontent-%COMP%]{padding-bottom:10px}.p-v-10[_ngcontent-%COMP%]{padding:10px 0}.p-h-10[_ngcontent-%COMP%]{padding:0 10px}.p-15[_ngcontent-%COMP%]{padding:15px}.p-t-15[_ngcontent-%COMP%]{padding-top:15px}.p-r-15[_ngcontent-%COMP%]{padding-right:15px}.p-b-15[_ngcontent-%COMP%]{padding-bottom:15px}.p-l-15[_ngcontent-%COMP%]{padding-left:15px}.p-v-15[_ngcontent-%COMP%]{padding:15px 0}.p-h-15[_ngcontent-%COMP%]{padding:0 15px}.p-20[_ngcontent-%COMP%]{padding:20px}.p-t-20[_ngcontent-%COMP%]{padding-top:20px}.p-r-20[_ngcontent-%COMP%]{padding-right:20px}.p-b-20[_ngcontent-%COMP%]{padding-bottom:20px}.p-l-20[_ngcontent-%COMP%]{padding-left:20px}.p-v-20[_ngcontent-%COMP%]{padding:20px 0}.p-h-20[_ngcontent-%COMP%]{padding:0 20px}.p-25[_ngcontent-%COMP%]{padding:25px}.p-t-25[_ngcontent-%COMP%]{padding-top:25px}.p-r-25[_ngcontent-%COMP%]{padding-right:25px}.p-b-25[_ngcontent-%COMP%]{padding-bottom:25px}.p-l-25[_ngcontent-%COMP%]{padding-left:25px}.p-v-25[_ngcontent-%COMP%]{padding:25px 0}.p-h-25[_ngcontent-%COMP%]{padding:0 25px}.p-30[_ngcontent-%COMP%]{padding:30px}.p-t-30[_ngcontent-%COMP%]{padding-top:30px}.p-r-30[_ngcontent-%COMP%]{padding-right:30px}.p-b-30[_ngcontent-%COMP%]{padding-bottom:30px}.p-l-30[_ngcontent-%COMP%]{padding-left:30px}.p-v-30[_ngcontent-%COMP%]{padding:30px 0}.p-h-30[_ngcontent-%COMP%]{padding:0 30px}.p-35[_ngcontent-%COMP%]{padding:35px}.p-t-35[_ngcontent-%COMP%]{padding-top:35px}.p-r-35[_ngcontent-%COMP%]{padding-right:35px}.p-b-35[_ngcontent-%COMP%]{padding-bottom:35px}.p-l-35[_ngcontent-%COMP%]{padding-left:35px}.p-v-35[_ngcontent-%COMP%]{padding:35px 0}.p-h-35[_ngcontent-%COMP%]{padding:0 35px}.p-40[_ngcontent-%COMP%]{padding:40px}.p-t-40[_ngcontent-%COMP%]{padding-top:40px}.p-r-40[_ngcontent-%COMP%]{padding-right:40px}.p-b-40[_ngcontent-%COMP%]{padding-bottom:40px}.p-l-40[_ngcontent-%COMP%]{padding-left:40px}.p-v-40[_ngcontent-%COMP%]{padding-top:40px;padding-bottom:40px}.p-h-40[_ngcontent-%COMP%]{padding:0 40px}.p-45[_ngcontent-%COMP%]{padding:45px}.p-t-45[_ngcontent-%COMP%]{padding-top:45px}.p-r-45[_ngcontent-%COMP%]{padding-right:45px}.p-b-45[_ngcontent-%COMP%]{padding-bottom:45px}.p-l-45[_ngcontent-%COMP%]{padding-left:45px}.p-v-45[_ngcontent-%COMP%]{padding:45px 0}.p-h-45[_ngcontent-%COMP%]{padding:0 45px}.p-50[_ngcontent-%COMP%]{padding:50px}.p-t-50[_ngcontent-%COMP%]{padding-top:50px}.p-r-50[_ngcontent-%COMP%]{padding-right:50px}.p-b-50[_ngcontent-%COMP%]{padding-bottom:50px}.p-l-50[_ngcontent-%COMP%]{padding-left:50px}.p-v-50[_ngcontent-%COMP%]{padding:50px 0}.p-h-50[_ngcontent-%COMP%]{padding:0 50px}.p-55[_ngcontent-%COMP%]{padding:55px}.p-t-55[_ngcontent-%COMP%]{padding-top:55px}.p-r-55[_ngcontent-%COMP%]{padding-right:55px}.p-b-55[_ngcontent-%COMP%]{padding-bottom:55px}.p-l-55[_ngcontent-%COMP%]{padding-left:55px}.p-v-55[_ngcontent-%COMP%]{padding:55px 0}.p-h-55[_ngcontent-%COMP%]{padding:0 55px}.p-60[_ngcontent-%COMP%]{padding:60px}.p-t-60[_ngcontent-%COMP%]{padding-top:60px}.p-r-60[_ngcontent-%COMP%]{padding-right:60px}.p-b-60[_ngcontent-%COMP%]{padding-bottom:60px}.p-l-60[_ngcontent-%COMP%]{padding-left:60px}.p-v-60[_ngcontent-%COMP%]{padding:60px 0}.p-h-60[_ngcontent-%COMP%]{padding:0 60px}.p-65[_ngcontent-%COMP%]{padding:65px}.p-t-65[_ngcontent-%COMP%]{padding-top:65px}.p-r-65[_ngcontent-%COMP%]{padding-right:65px}.p-b-65[_ngcontent-%COMP%]{padding-bottom:65px}.p-l-65[_ngcontent-%COMP%]{padding-left:65px}.p-v-65[_ngcontent-%COMP%]{padding:65px 0}.p-h-65[_ngcontent-%COMP%]{padding:0 65px}.p-70[_ngcontent-%COMP%]{padding:70px}.p-t-70[_ngcontent-%COMP%]{padding-top:70px}.p-r-70[_ngcontent-%COMP%]{padding-right:70px}.p-b-70[_ngcontent-%COMP%]{padding-bottom:70px}.p-l-70[_ngcontent-%COMP%]{padding-left:70px}.p-v-70[_ngcontent-%COMP%]{padding:70px 0}.p-h-70[_ngcontent-%COMP%]{padding:0 70px}.p-75[_ngcontent-%COMP%]{padding:75px}.p-t-75[_ngcontent-%COMP%]{padding-top:75px}.p-r-75[_ngcontent-%COMP%]{padding-right:75px}.p-b-75[_ngcontent-%COMP%]{padding-bottom:75px}.p-l-75[_ngcontent-%COMP%]{padding-left:75px}.p-v-75[_ngcontent-%COMP%]{padding:75px 0}.p-h-75[_ngcontent-%COMP%]{padding:0 75px}.p-80[_ngcontent-%COMP%]{padding:80px}.p-t-80[_ngcontent-%COMP%]{padding-top:80px}.p-r-80[_ngcontent-%COMP%]{padding-right:80px}.p-b-80[_ngcontent-%COMP%]{padding-bottom:80px}.p-l-80[_ngcontent-%COMP%]{padding-left:80px}.p-v-80[_ngcontent-%COMP%]{padding:80px 0}.p-h-80[_ngcontent-%COMP%]{padding:0 80px}.no-padding[_ngcontent-%COMP%]{padding:0!important}.no-pad-lr[_ngcontent-%COMP%], .no-pad-rl[_ngcontent-%COMP%]{padding-left:0;padding-right:0}.no-pad-tb[_ngcontent-%COMP%], .no-pad-bt[_ngcontent-%COMP%]{padding-top:0;padding-bottom:0}.pad-t-only[_ngcontent-%COMP%]{padding-left:0;padding-right:0;padding-bottom:0}.pad-b-only[_ngcontent-%COMP%]{padding-left:0;padding-right:0;padding-top:0}.pad-l-only[_ngcontent-%COMP%]{padding-right:0;padding-top:0;padding-bottom:0}.pad-r-only[_ngcontent-%COMP%]{padding-left:0;padding-top:0;padding-bottom:0}html[_ngcontent-%COMP%], body[_ngcontent-%COMP%], .rel[_ngcontent-%COMP%], .relative[_ngcontent-%COMP%]{position:relative}.abs[_ngcontent-%COMP%], .absolute[_ngcontent-%COMP%]{position:absolute}.fixed[_ngcontent-%COMP%]{position:fixed}.status-active[_ngcontent-%COMP%]{color:#5cb85c}.status-inactive[_ngcontent-%COMP%]{color:#666f73}.status-deleted[_ngcontent-%COMP%]{color:#000}.status-pending[_ngcontent-%COMP%]{color:orange}.status-approved[_ngcontent-%COMP%]{color:#4461e2}.status-overpaid[_ngcontent-%COMP%]{color:purple}.status-chargeoff[_ngcontent-%COMP%]{color:#f39c12}.status-active-overdue[_ngcontent-%COMP%], .status-block[_ngcontent-%COMP%]{color:red}.status-matured[_ngcontent-%COMP%]{color:#ff4000}.subStatus-contract-termination[_ngcontent-%COMP%]{color:#b3b3b3}.mat-step-header[_ngcontent-%COMP%] .mat-step-icon-state-done[_ngcontent-%COMP%]{background-color:#2af72a}.mat-step-header[_ngcontent-%COMP%] .mat-step-icon-state-done[_ngcontent-%COMP%] .status-transfer-progress[_ngcontent-%COMP%]{color:#ff4000}.mat-step-header[_ngcontent-%COMP%] .mat-step-icon-state-done[_ngcontent-%COMP%] .status-transfer-hold[_ngcontent-%COMP%]{color:#df0101}html[_ngcontent-%COMP%], body[_ngcontent-%COMP%]{-webkit-font-smoothing:antialiased}html[_ngcontent-%COMP%]{font-size:16px}body[_ngcontent-%COMP%]{font-family:Roboto,Helvetica Neue,sans-serif;font-weight:400;font-size:14px;color:#000000de;line-height:1.5;letter-spacing:normal}.mat-h1[_ngcontent-%COMP%], .mat-headline[_ngcontent-%COMP%], .mat-typography[_ngcontent-%COMP%] .mat-h1[_ngcontent-%COMP%], .mat-typography[_ngcontent-%COMP%] .mat-headline[_ngcontent-%COMP%], .mat-typography[_ngcontent-%COMP%] h1[_ngcontent-%COMP%]{font:400 24px/32px Roboto,Helvetica Neue,sans-serif;letter-spacing:normal;margin:0 0 16px}.lh-1[_ngcontent-%COMP%]{line-height:1}.lh-13[_ngcontent-%COMP%]{line-height:1.3}.lh-15[_ngcontent-%COMP%]{line-height:1.5}.bold[_ngcontent-%COMP%], .strong[_ngcontent-%COMP%]{font-weight:700}.no-bold[_ngcontent-%COMP%]{font-weight:400}.italic[_ngcontent-%COMP%], .em[_ngcontent-%COMP%]{font-style:italic}.strike[_ngcontent-%COMP%]{text-decoration:line-through}.normal[_ngcontent-%COMP%]{font-weight:400;font-style:normal}.uppercase[_ngcontent-%COMP%]{text-transform:uppercase}.text-left[_ngcontent-%COMP%]{text-align:left}.text-center[_ngcontent-%COMP%]{text-align:center}.text-right[_ngcontent-%COMP%]{text-align:right}.w100[_ngcontent-%COMP%]{font-weight:100}.w200[_ngcontent-%COMP%]{font-weight:200}.w300[_ngcontent-%COMP%]{font-weight:300}.w400[_ngcontent-%COMP%]{font-weight:400}.w500[_ngcontent-%COMP%]{font-weight:500}.w600[_ngcontent-%COMP%]{font-weight:600}.w700[_ngcontent-%COMP%]{font-weight:700}.w800[_ngcontent-%COMP%]{font-weight:800}.w900[_ngcontent-%COMP%]{font-weight:900}.f9[_ngcontent-%COMP%]{font-size:9px}.f10[_ngcontent-%COMP%]{font-size:10px}.f11[_ngcontent-%COMP%]{font-size:11px}.f12[_ngcontent-%COMP%]{font-size:12px}.f13[_ngcontent-%COMP%]{font-size:13px}.f14[_ngcontent-%COMP%]{font-size:14px}.f15[_ngcontent-%COMP%]{font-size:15px}.f16[_ngcontent-%COMP%]{font-size:16px}.f17[_ngcontent-%COMP%]{font-size:17px}.f18[_ngcontent-%COMP%]{font-size:18px;line-height:30px}.f19[_ngcontent-%COMP%]{font-size:19px}.f20[_ngcontent-%COMP%]{font-size:20px}.f30[_ngcontent-%COMP%]{font-size:30px}.f40[_ngcontent-%COMP%]{font-size:40px}.f50[_ngcontent-%COMP%]{font-size:50px}.f60[_ngcontent-%COMP%]{font-size:60px}.size-small[_ngcontent-%COMP%]{font-size:75%}.size-normal[_ngcontent-%COMP%]{font-size:100%}.size-medium[_ngcontent-%COMP%]{font-size:125%}.size-big[_ngcontent-%COMP%], .size-large[_ngcontent-%COMP%]{font-size:150%}.size-huge[_ngcontent-%COMP%]{font-size:200%}.inherit[_ngcontent-%COMP%]{font:inherit}.text-shadow[_ngcontent-%COMP%]{text-shadow:1px 1px 1px rgba(0,0,0,.4)}.text-rgb-2[_ngcontent-%COMP%]{color:#0003}.text-rgb-3[_ngcontent-%COMP%]{color:#0000004d}.text-rgb-4[_ngcontent-%COMP%]{color:#0006}.text-rgb-5[_ngcontent-%COMP%]{color:#00000080}.no-ul[_ngcontent-%COMP%], .no-ul[_ngcontent-%COMP%]:hover, .no-ul[_ngcontent-%COMP%] a[_ngcontent-%COMP%], .no-ul[_ngcontent-%COMP%] a[_ngcontent-%COMP%]:hover{text-decoration:none}.no-wrap[_ngcontent-%COMP%]{white-space:nowrap}.auto-cell-size[_ngcontent-%COMP%]{white-space:nowrap;width:1%}.ls-0[_ngcontent-%COMP%]{letter-spacing:-3px;white-space:nowrap}.label-field[_ngcontent-%COMP%]{margin-top:32px}.wrap-content[_ngcontent-%COMP%]{overflow-wrap:break-word;word-wrap:break-word}.no-break-content[_ngcontent-%COMP%]{overflow-wrap:anywhere!important}.fit[_ngcontent-%COMP%]{max-width:100%}.half-width[_ngcontent-%COMP%]{width:50%}.full-width[_ngcontent-%COMP%]{width:100%}.full-height[_ngcontent-%COMP%]{height:100%}html[_ngcontent-%COMP%], body[_ngcontent-%COMP%]{width:100%;height:100%;min-height:100%}body[_ngcontent-%COMP%] table[_ngcontent-%COMP%]{width:100%}.container[_ngcontent-%COMP%]{max-width:74rem;width:90%}.mw300[_ngcontent-%COMP%]{max-width:300px}.mw400[_ngcontent-%COMP%]{max-width:400px}.mw500[_ngcontent-%COMP%]{max-width:500px}.mw600[_ngcontent-%COMP%]{max-width:600px}.fullwidth[_ngcontent-%COMP%]{width:100%}.zindex-1[_ngcontent-%COMP%]{z-index:1}.zindex-2[_ngcontent-%COMP%]{z-index:2}.zindex-3[_ngcontent-%COMP%]{z-index:3}.zindex-4[_ngcontent-%COMP%]{z-index:4}.breadcrumb-wrapper[_ngcontent-%COMP%]{margin:0 auto;max-width:84rem;width:90%;word-wrap:break-word}.breadcrumb-wrapper[_ngcontent-%COMP%] .breadcrumb[_ngcontent-%COMP%]{list-style:none;padding:0;margin:1.5rem 0;line-height:40px}.breadcrumb-wrapper[_ngcontent-%COMP%] .breadcrumb[_ngcontent-%COMP%] .breadcrumb-title[_ngcontent-%COMP%]{font-size:1.25rem;font-weight:400}.breadcrumb-wrapper[_ngcontent-%COMP%] .breadcrumb[_ngcontent-%COMP%] .separator[_ngcontent-%COMP%]:before{content:"";border:1.5px solid #d7dada;margin:0 .6rem;font-size:1.25rem;font-weight:400}.breadcrumb-wrapper[_ngcontent-%COMP%] .breadcrumb[_ngcontent-%COMP%] .breadcrumb-label[_ngcontent-%COMP%]{display:inline;font-size:1rem}.breadcrumb-wrapper[_ngcontent-%COMP%] .breadcrumb[_ngcontent-%COMP%] .breadcrumb-label[_ngcontent-%COMP%] .breadcrumb-link[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{text-decoration:none;color:#4461e2}.breadcrumb-wrapper[_ngcontent-%COMP%] .breadcrumb[_ngcontent-%COMP%] .breadcrumb-label[_ngcontent-%COMP%] .breadcrumb-link[_ngcontent-%COMP%] a[_ngcontent-%COMP%]:hover{text-decoration:underline}.breadcrumb-wrapper[_ngcontent-%COMP%] .breadcrumb[_ngcontent-%COMP%] .breadcrumb-label[_ngcontent-%COMP%] .breadcrumb-link[_ngcontent-%COMP%]:after{content:"/";margin:0 .4rem}']})}}return e})();var I_=(()=>{class e{constructor(){}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275cmp=me({type:e,selectors:[["mifosx-content"]],decls:2,vars:0,consts:[["id","push"]],template:function(n,i){n&1&&b(0,"router-outlet")(1,"div",0)},dependencies:[ue,fe,ra],styles:["mifosx-content[_ngcontent-%COMP%]{min-height:100%;height:auto!important;height:100%;margin:0 auto -30px}#push[_ngcontent-%COMP%]{height:30px}"]})}}return e})();var ece=(e,o)=>({"sidebar-full":e,"sidebar-compact":o});function tce(e,o){e&1&&(l(0,"div"),b(1,"div",7),r())}var O_=(()=>{class e{constructor(){this.breakpointObserver=T(Ig),this.progressBarService=T(sc),this.cdr=T(ts),this.isHandset$=this.breakpointObserver.observe(Og.Handset).pipe(Mn(t=>t.matches)),this.sidenavCollapsed=!0}ngOnInit(){this.progressBar$=this.progressBarService.updateProgressBar.subscribe(t=>{this.progressBarMode=t,this.cdr.detectChanges()})}toggleCollapse(t){this.sidenavCollapsed=t,this.cdr.detectChanges()}ngOnDestroy(){this.progressBar$&&this.progressBar$.unsubscribe()}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275cmp=me({type:e,selectors:[["mifosx-shell"]],decls:13,vars:17,consts:[["sidenav",""],["id","mifosx-shell-container","autosize",""],[1,"sidebar-panel",3,"ngClass","mode","opened"],[3,"sidenavCollapsed"],[1,"sidenav"],[3,"collapse","sidenav"],[3,"styleClass"],[1,"loading"]],template:function(n,i){if(n&1){let s=Y();l(0,"mat-sidenav-container",1)(1,"mat-sidenav",2,0),p(3,"async"),p(4,"async"),p(5,"async"),b(6,"mifosx-sidenav",3),r(),l(7,"mat-sidenav-content",4)(8,"mifosx-toolbar",5),R("collapse",function(u){return V(s),q(i.toggleCollapse(u))}),r(),E(9,tce,2,0,"div"),b(10,"mifosx-breadcrumb")(11,"mifosx-content")(12,"mifosx-footer",6),r()()}if(n&2){let s=xe(2);a(),g("ngClass",Ka(14,ece,!i.sidenavCollapsed,i.sidenavCollapsed))("mode",m(3,8,i.isHandset$)?"over":"side")("opened",m(4,10,i.isHandset$)===!1),Dn("role",m(5,12,i.isHandset$)?"dialog":"navigation"),a(5),g("sidenavCollapsed",i.sidenavCollapsed),a(2),g("sidenav",s),a(),I(i.progressBarMode!=="none"?9:-1),a(3),g("styleClass","main-page")}},dependencies:[ue,co,fe,uk,dk,T_,mk,D_,E_,I_,Ng,Xa],styles:["#mifosx-shell-container[_ngcontent-%COMP%]{max-width:100%;height:100vh}#mifosx-shell-container[_ngcontent-%COMP%] .sidebar-panel[_ngcontent-%COMP%]{min-height:100vh;overflow:auto;box-shadow:0 3px 1px -2px #0003,0 2px 2px #00000024,0 1px 5px #0000001f}#mifosx-shell-container[_ngcontent-%COMP%] .sidebar-full[_ngcontent-%COMP%]{width:15rem}#mifosx-shell-container[_ngcontent-%COMP%] .sidebar-compact[_ngcontent-%COMP%]{width:4rem}.sidenav[_ngcontent-%COMP%]{overflow-x:hidden}@keyframes _ngcontent-%COMP%_move{0%{left:0}16.7%{left:0}33.3%{left:760px}50%{left:1330px}66.7%{left:760px}83.3%{left:0}to{left:0}}@keyframes _ngcontent-%COMP%_grow{0%{width:190px}16.7%{width:760px}33.3%{width:760px}50%{width:190px}66.7%{width:760px}83.3%{width:760px}to{width:190px}}"]})}}return e})();var oB=(()=>{class e{constructor(){let t=T(e,{optional:!0,skipSelf:!0});if(t)throw new Error(`${t} has already been loaded. Import Core module in the AppModule only.`)}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275mod=Gi({type:e})}static{this.\u0275inj=Hi({providers:[Wo,w_,pf,{provide:bp,useClass:pf,multi:!0},y_,{provide:bp,useClass:bf,multi:!0},{provide:bp,useClass:vf,multi:!0},{provide:bp,useClass:S_,multi:!0},{provide:ko,useClass:J8,deps:[Tg,Cp,[new dF,f4]]},sc,{provide:bp,useClass:K8,multi:!0},{provide:Eg,useClass:X8},kF(BF())],imports:[oo,yp,gn,O_,T_,D_,E_,I_,oo]})}}return e})();var _o=class{static withShell(o){return{path:"",component:O_,children:o,canActivate:[w_]}}};var A_=[{activity:"client",path:"/clients"},{activity:"groups",path:"/groups"},{activity:"centers",path:"/centers"},{activity:"accounting",path:"/accounting"},{activity:"users",path:"/appusers"},{activity:"organization",path:"/organization"},{activity:"system",path:"/system"},{activity:"templates",path:"/templates"},{activity:"create group",path:""},{activity:"create center",path:"/centers/create"},{activity:"configuration",path:"/system/global-configurations"},{activity:"create loan product",path:"/products/loan-products/create"},{activity:"create saving product",path:"/products/saving-products/create"},{activity:"roles",path:"/system/roles-and-permissions"},{activity:"add role",path:"/system/roles-and-permissions/add"},{activity:"configure maker checker tasks",path:""},{activity:"loan products",path:"/products/loan-products"},{activity:"charges",path:"/products/charges"},{activity:"saving products",path:"/products/saving-products"},{activity:"offices",path:"/organization/offices"},{activity:"create office",path:"/organization/offices/create"},{activity:"currency configurations",path:"/organization/currencies"},{activity:"user settings",path:""},{activity:"employees",path:"/organization/employees"},{activity:"create employee",path:"/organization/employees/create"},{activity:"manage funds",path:""},{activity:"chart of accounts",path:"/accounting/chart-of-accounts"},{activity:"frequent postings",path:"/accounting/frequent-postings"},{activity:"journal entry",path:"/accounting/journal-entries"},{activity:"search transaction",path:""},{activity:"account closure",path:"/accounting/closing-entries"},{activity:"accounting rules",path:"/accounting/accounting-rules"},{activity:"add accounting rule",path:"/accounting/accounting-rules/create"},{activity:"data tables",path:"/system/data-tables"},{activity:"create data table",path:"/system/data-tables/create"},{activity:"add code",path:"/system/codes/create"},{activity:"jobs",path:"/system/scheduler-jobs"},{activity:"codes",path:"/system/codes"},{activity:"reports",path:"/reports"},{activity:"create report",path:""},{activity:"holidays",path:"/organization/holidays"},{activity:"create holiday",path:""},{activity:"add member",path:"/clients/:clientId/family-members/add"},{activity:"create charge",path:""},{activity:"enter collection sheet",path:""},{activity:"product mix",path:"/products/products-mix"},{activity:"add product mix",path:""},{activity:"bulk loan reassignment",path:"/accounting/closing-entries/create"},{activity:"audit",path:"/products/audit-trails"},{activity:"create accounting closure",path:""},{activity:"navigation",path:"/navigation"},{activity:"",path:"home"}];var F_=(()=>{class e{constructor(){this.dialogRef=T(eo),this.title=un.warningDialog.title,this.content=un.warningDialog.content,this.buttonText=un.warningDialog.buttonText}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275cmp=me({type:e,selectors:[["mifosx-warning-dialog"]],decls:10,vars:9,consts:[["mat-dialog-title",""],["mat-raised-button","","color","primary","mat-dialog-close",""]],template:function(n,i){n&1&&(l(0,"h1",0),c(1),p(2,"translate"),r(),l(3,"mat-dialog-content"),c(4),p(5,"translate"),r(),l(6,"mat-dialog-actions")(7,"button",1),c(8),p(9,"translate"),r()()),n&2&&(a(),h(m(2,3,"labels.text."+i.title)),a(3),h(m(5,5,"labels.text.Warning message")),a(4),h(m(9,7,"labels.buttons."+i.buttonText)))},dependencies:[ue,fe,ve,Wn,ho,Nn,Un,he],encapsulation:2})}}return e})();var ice=()=>({nextStep:!1}),nce=()=>({nextStep:!0}),cs=(()=>{class e{constructor(){this.dialogRef=T(eo),this.data=T(Po);let t=this.data;this.stepPercentage=t.stepPercentage,this.nextStepName=t.nextStepName,this.previousStepName=t.previousStepName}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275cmp=me({type:e,selectors:[["mifosx-next-step-dialog"]],decls:20,vars:23,consts:[["mat-dialog-title",""],[1,"mw600"],["mode","determinate",3,"value"],["mat-raised-button","","color","warn",3,"mat-dialog-close"],["mat-raised-button","","color","primary",3,"mat-dialog-close"]],template:function(n,i){n&1&&(l(0,"h1",0),c(1),p(2,"translate"),r(),l(3,"mat-dialog-content")(4,"h3",1),c(5),p(6,"translate"),r(),l(7,"h3"),c(8),p(9,"translate"),r(),l(10,"h3"),c(11),p(12,"translate"),r(),b(13,"mat-progress-bar",2),r(),l(14,"mat-dialog-actions")(15,"button",3),c(16),p(17,"translate"),r(),l(18,"button",4),c(19),r()()),n&2&&(a(),h(m(2,11,"labels.heading.Welcome to Mifos")),a(4),h(m(6,13,"labels.heading.Configure Mifos Organization Needs")),a(3),le("",m(9,15,"labels.heading.Successfully completed")," ",i.previousStepName),a(3),le("",m(12,17,"labels.heading.Progress Bar")," : ",i.stepPercentage,"%"),a(2),g("value",i.stepPercentage),a(2),g("mat-dialog-close",oe(21,ice)),a(),v(" ",m(17,19,"labels.buttons.Close Config. Wizard")," "),a(2),g("mat-dialog-close",oe(22,nce)),a(),h(i.nextStepName))},dependencies:[ue,fe,ve,Wn,ho,os,Nn,Un,he],encapsulation:2})}}return e})();var oce=["buttonDashboard"],ace=["templateButtonDashboard"],rce=["searchActivity"],lce=["templateSearchActivity"],sce=()=>["/dashboard"];function cce(e,o){if(e&1&&(l(0,"mat-option",14)(1,"span"),c(2),r()()),e&2){let t=o.$implicit;g("routerLink",t.path),a(2),h(t.activity)}}function pce(e,o){if(e&1){let t=Y();l(0,"button",19),R("click",function(){V(t);let i=w(),s=i.popover,d=i.prev,u=w();return s.close(),q(u.showPopover(d.template,d.target,"bottom",!0))}),c(1),p(2,"translate"),r()}e&2&&(a(),v(" ",m(2,1,"labels.buttons.Back")," "))}function mce(e,o){if(e&1){let t=Y();l(0,"button",19),R("click",function(){V(t);let i=w(),s=i.popover,d=i.next,u=w();return s.close(),q(u.showPopover(d.template,d.target,"bottom",!0))}),c(1),p(2,"translate"),r()}e&2&&(a(),v(" ",m(2,1,"labels.buttons.Next")," "))}function dce(e,o){if(e&1){let t=Y();l(0,"div",16)(1,"button",17),R("click",function(){let i=V(t).popover,s=w();return i.close(),q(s.configurationWizardService.closeConfigWizard())}),c(2),p(3,"translate"),r(),E(4,pce,3,3,"button",18),E(5,mce,3,3,"button",18),r()}if(e&2){let t=o.prev,n=o.next;a(2),v(" ",m(3,3,"labels.buttons.Close")," "),a(2),I(t?4:-1),a(),I(n?5:-1)}}function uce(e,o){if(e&1){let t=Y();l(0,"h2"),c(1),p(2,"translate"),r(),l(3,"p",20),c(4),p(5,"translate"),r(),l(6,"div",16)(7,"button",17),R("click",function(){let i=V(t).popover,s=w();return i.close(),q(s.configurationWizardService.closeConfigWizard())}),c(8),p(9,"translate"),r(),l(10,"button",19),R("click",function(){let i=V(t).popover,s=w();return i.close(),q(s.previousStep())}),c(11),p(12,"translate"),r(),l(13,"button",19),R("click",function(){let i=V(t).popover,s=w(),d=xe(14),u=xe(32);return i.close(),q(s.showPopover(u,d,"top",!0))}),c(14),p(15,"translate"),r()()}e&2&&(a(),h(m(2,5,"labels.heading.Dashboard")),a(3),h(m(5,7,"labels.text.This will navigate the user to the dashboard component.")),a(4),v(" ",m(9,9,"labels.buttons.Close")," "),a(3),v(" ",m(12,11,"labels.buttons.Back")," "),a(3),v(" ",m(15,13,"labels.buttons.Next")," "))}function fce(e,o){if(e&1){let t=Y();l(0,"h2"),c(1),p(2,"translate"),r(),l(3,"p",20),c(4),p(5,"translate"),r(),l(6,"div",16)(7,"button",17),R("click",function(){let i=V(t).popover,s=w();return i.close(),q(s.configurationWizardService.closeConfigWizard())}),c(8),p(9,"translate"),r(),l(10,"button",19),R("click",function(){let i=V(t).popover,s=w(),d=xe(2),u=xe(30);return i.close(),q(s.showPopover(u,d,"bottom",!0))}),c(11),p(12,"translate"),r(),l(13,"button",19),R("click",function(){let i=V(t).popover,s=w();return i.close(),q(s.nextStep())}),c(14),p(15,"translate"),r()()}e&2&&(a(),h(m(2,5,"labels.heading.Search Activity")),a(3),h(m(5,7,"labels.text.This will navigate the user to the searched activity.")),a(4),v(" ",m(9,9,"labels.buttons.Close")," "),a(3),v(" ",m(12,11,"labels.buttons.Back")," "),a(3),v(" ",m(15,13,"labels.buttons.Next")," "))}var k_=(()=>{class e{constructor(){this.authenticationService=T(Wo),this.activatedRoute=T(Ie),this.router=T(qe),this.dialog=T(Ht),this.configurationWizardService=T(Qi),this.popoverService=T(Wi),this.searchText=new it,this.allActivities=A_}ngOnInit(){let t=this.authenticationService.getCredentials();this.username=t.username,this.setFilteredActivities(),this.authenticationService.hasDialogBeenShown()||(this.dialog.open(F_),this.authenticationService.showDialog())}setFilteredActivities(){this.filteredActivities=this.searchText.valueChanges.pipe(Mn(t=>typeof t=="string"?t:t.activity),Mn(t=>t?this.filterActivity(t):this.allActivities))}filterActivity(t){let n=t.toLowerCase();return this.allActivities.filter(i=>i.activity.toLowerCase().indexOf(n)===0)}showPopover(t,n,i,s){setTimeout(()=>this.popoverService.open(t,n,i,s,{}),200)}ngAfterViewInit(){this.configurationWizardService.showHome===!0&&setTimeout(()=>{this.showPopover(this.templateButtonDashboard,this.buttonDashboard.nativeElement,"bottom",!0)}),this.configurationWizardService.showHomeSearchActivity===!0&&setTimeout(()=>{this.showPopover(this.templateSearchActivity,this.searchActivity.nativeElement,"bottom",!0)})}nextStep(){this.configurationWizardService.showHome=!1,this.configurationWizardService.showHomeSearchActivity=!1,this.openNextStepDialog()}openNextStepDialog(){this.dialog.open(cs,{data:{nextStepName:"Setup Organization",previousStepName:"Home Tour",stepPercentage:10}}).afterClosed().subscribe(n=>{n.nextStep?(this.configurationWizardService.showHome=!1,this.configurationWizardService.showHomeSearchActivity=!1,this.configurationWizardService.showCreateOffice=!0,this.router.navigate(["/organization"])):(this.configurationWizardService.showHome=!1,this.configurationWizardService.showHomeSearchActivity=!1,this.router.navigate(["/home"]))})}previousStep(){this.configurationWizardService.showHome=!1,this.configurationWizardService.showHomeSearchActivity=!1,this.configurationWizardService.showBreadcrumbs=!0,this.router.routeReuseStrategy.shouldReuseRoute=()=>!1,this.router.onSameUrlNavigation="reload",this.router.navigate(["/home"])}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275cmp=me({type:e,selectors:[["mifosx-home"]],viewQuery:function(n,i){if(n&1&&(Ee(oce,5),Ee(ace,5),Ee(rce,5),Ee(lce,5)),n&2){let s;Te(s=Me())&&(i.buttonDashboard=s.first),Te(s=Me())&&(i.templateButtonDashboard=s.first),Te(s=Me())&&(i.searchActivity=s.first),Te(s=Me())&&(i.templateSearchActivity=s.first)}},decls:33,vars:16,consts:[["buttonDashboard",""],["searchActivity",""],["activitySearch","matAutocomplete"],["popoverButtons",""],["templateButtonDashboard",""],["templateSearchActivity",""],[1,"layout-row","align-end","gap-2px","responsive-column","container","m-b-20"],[1,"in-block"],["mat-raised-button","","color","primary",3,"routerLink"],["icon","tachometer-alt",1,"m-r-10"],[1,"container"],[1,"title"],[1,"layout-column"],["matInput","",3,"matAutocomplete","formControl"],[3,"routerLink"],["mat-card-image","","src","assets/images/mifos_lg-logo.png","alt","Mifos X"],[1,"layout-row","align-end","gap-2px","responsive-column"],["mat-raised-button","","color","warn",3,"click"],["mat-raised-button","","color","primary"],["mat-raised-button","","color","primary",3,"click"],[1,"mw300"]],template:function(n,i){if(n&1&&(l(0,"div",6)(1,"div",7,0)(3,"button",8),b(4,"fa-icon",9),c(5),p(6,"translate"),r()()(),l(7,"div",10)(8,"mat-card")(9,"mat-card-header")(10,"mat-card-title",11),c(11),p(12,"translate"),r()(),l(13,"mat-card-content",null,1)(15,"div",12)(16,"mat-form-field")(17,"mat-label"),c(18),p(19,"translate"),r(),b(20,"input",13),r()(),l(21,"mat-autocomplete",null,2),Se(23,cce,3,2,"mat-option",14,Pe),p(25,"async"),r()(),b(26,"img",15),r()(),F(27,dce,6,5,"ng-template",null,3,ti)(29,uce,16,15,"ng-template",null,4,ti)(31,fce,16,15,"ng-template",null,5,ti)),n&2){let s=xe(22);a(3),g("routerLink",oe(15,sce)),a(2),v(" ",m(6,7,"labels.buttons.Dashboard")," "),a(6),le(" ",m(12,9,"labels.text.Welcome"),", ",i.username,"! "),a(7),h(m(19,11,"labels.placeholders.Search Activity")),a(2),g("matAutocomplete",s)("formControl",i.searchText),a(3),we(m(25,13,i.filteredActivities))}},dependencies:[ue,fe,st,Ue,_n,Ae,$e,Je,Fe,Be,ze,ft,ve,ke,sa,Qo,er,Za,QF,Xa,he],styles:[".container[_ngcontent-%COMP%]{max-width:37rem}.container[_ngcontent-%COMP%] .title[_ngcontent-%COMP%]{font-size:1.25rem;font-weight:500;margin-left:-15px}.mat-list-base[_ngcontent-%COMP%]{padding-top:0}a[_ngcontent-%COMP%]{text-decoration:none;color:#000}"]})}}return e})();var R0=(()=>{class e{constructor(){this.http=T(ko)}getCollectedAmount(t){let n=new rn().set("R_officeId",t.toString()).set("genericResultSet","false");return this.http.get("/runreports/Demand Vs Collection",{params:n})}getDisbursedAmount(t){let n=new rn().set("R_officeId",t.toString()).set("genericResultSet","false");return this.http.get("/runreports/Disbursal Vs Awaitingdisbursal",{params:n})}getClientTrendsByDay(t){let n=new rn().set("R_officeId",t.toString()).set("genericResultSet","false");return this.http.get("/runreports/ClientTrendsByDay",{params:n})}getClientTrendsByWeek(t){let n=new rn().set("R_officeId",t.toString()).set("genericResultSet","false");return this.http.get("/runreports/ClientTrendsByWeek",{params:n})}getClientTrendsByMonth(t){let n=new rn().set("R_officeId",t.toString()).set("genericResultSet","false");return this.http.get("/runreports/ClientTrendsByMonth",{params:n})}getLoanTrendsByDay(t){let n=new rn().set("R_officeId",t.toString()).set("genericResultSet","false");return this.http.get("/runreports/LoanTrendsByDay",{params:n})}getLoanTrendsByWeek(t){let n=new rn().set("R_officeId",t.toString()).set("genericResultSet","false");return this.http.get("/runreports/LoanTrendsByWeek",{params:n})}getLoanTrendsByMonth(t){let n=new rn().set("R_officeId",t.toString()).set("genericResultSet","false");return this.http.get("/runreports/LoanTrendsByMonth",{params:n})}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275prov=Re({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();function wf(e){return e+.5|0}var Ap=(e,o,t)=>Math.max(Math.min(e,t),o);function yf(e){return Ap(wf(e*2.55),0,255)}function Fp(e){return Ap(wf(e*255),0,255)}function qc(e){return Ap(wf(e/2.55)/100,0,1)}function aB(e){return Ap(wf(e*100),0,100)}var ps={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,A:10,B:11,C:12,D:13,E:14,F:15,a:10,b:11,c:12,d:13,e:14,f:15},C4=[..."0123456789ABCDEF"],hce=e=>C4[e&15],gce=e=>C4[(e&240)>>4]+C4[e&15],B_=e=>(e&240)>>4===(e&15),_ce=e=>B_(e.r)&&B_(e.g)&&B_(e.b)&&B_(e.a);function Cce(e){var o=e.length,t;return e[0]==="#"&&(o===4||o===5?t={r:255&ps[e[1]]*17,g:255&ps[e[2]]*17,b:255&ps[e[3]]*17,a:o===5?ps[e[4]]*17:255}:(o===7||o===9)&&(t={r:ps[e[1]]<<4|ps[e[2]],g:ps[e[3]]<<4|ps[e[4]],b:ps[e[5]]<<4|ps[e[6]],a:o===9?ps[e[7]]<<4|ps[e[8]]:255})),t}var vce=(e,o)=>e<255?o(e):"";function xce(e){var o=_ce(e)?hce:gce;return e?"#"+o(e.r)+o(e.g)+o(e.b)+vce(e.a,o):void 0}var bce=/^(hsla?|hwb|hsv)\(\s*([-+.e\d]+)(?:deg)?[\s,]+([-+.e\d]+)%[\s,]+([-+.e\d]+)%(?:[\s,]+([-+.e\d]+)(%)?)?\s*\)$/;function cB(e,o,t){let n=o*Math.min(t,1-t),i=(s,d=(s+e/30)%12)=>t-n*Math.max(Math.min(d-3,9-d,1),-1);return[i(0),i(8),i(4)]}function yce(e,o,t){let n=(i,s=(i+e/60)%6)=>t-t*o*Math.max(Math.min(s,4-s,1),0);return[n(5),n(3),n(1)]}function Sce(e,o,t){let n=cB(e,1,.5),i;for(o+t>1&&(i=1/(o+t),o*=i,t*=i),i=0;i<3;i++)n[i]*=1-o-t,n[i]+=o;return n}function wce(e,o,t,n,i){return e===i?(o-t)/n+(o.5?C/(2-s-d):C/(s+d),f=wce(t,n,i,C,s),f=f*60+.5),[f|0,_||0,u]}function x4(e,o,t,n){return(Array.isArray(o)?e(o[0],o[1],o[2]):e(o,t,n)).map(Fp)}function b4(e,o,t){return x4(cB,e,o,t)}function Pce(e,o,t){return x4(Sce,e,o,t)}function Tce(e,o,t){return x4(yce,e,o,t)}function pB(e){return(e%360+360)%360}function Mce(e){let o=bce.exec(e),t=255,n;if(!o)return;o[5]!==n&&(t=o[6]?yf(+o[5]):Fp(+o[5]));let i=pB(+o[2]),s=+o[3]/100,d=+o[4]/100;return o[1]==="hwb"?n=Pce(i,s,d):o[1]==="hsv"?n=Tce(i,s,d):n=b4(i,s,d),{r:n[0],g:n[1],b:n[2],a:t}}function Dce(e,o){var t=v4(e);t[0]=pB(t[0]+o),t=b4(t),e.r=t[0],e.g=t[1],e.b=t[2]}function Ece(e){if(!e)return;let o=v4(e),t=o[0],n=aB(o[1]),i=aB(o[2]);return e.a<255?`hsla(${t}, ${n}%, ${i}%, ${qc(e.a)})`:`hsl(${t}, ${n}%, ${i}%)`}var rB={x:"dark",Z:"light",Y:"re",X:"blu",W:"gr",V:"medium",U:"slate",A:"ee",T:"ol",S:"or",B:"ra",C:"lateg",D:"ights",R:"in",Q:"turquois",E:"hi",P:"ro",O:"al",N:"le",M:"de",L:"yello",F:"en",K:"ch",G:"arks",H:"ea",I:"ightg",J:"wh"},lB={OiceXe:"f0f8ff",antiquewEte:"faebd7",aqua:"ffff",aquamarRe:"7fffd4",azuY:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"0",blanKedOmond:"ffebcd",Xe:"ff",XeviTet:"8a2be2",bPwn:"a52a2a",burlywood:"deb887",caMtXe:"5f9ea0",KartYuse:"7fff00",KocTate:"d2691e",cSO:"ff7f50",cSnflowerXe:"6495ed",cSnsilk:"fff8dc",crimson:"dc143c",cyan:"ffff",xXe:"8b",xcyan:"8b8b",xgTMnPd:"b8860b",xWay:"a9a9a9",xgYF:"6400",xgYy:"a9a9a9",xkhaki:"bdb76b",xmagFta:"8b008b",xTivegYF:"556b2f",xSange:"ff8c00",xScEd:"9932cc",xYd:"8b0000",xsOmon:"e9967a",xsHgYF:"8fbc8f",xUXe:"483d8b",xUWay:"2f4f4f",xUgYy:"2f4f4f",xQe:"ced1",xviTet:"9400d3",dAppRk:"ff1493",dApskyXe:"bfff",dimWay:"696969",dimgYy:"696969",dodgerXe:"1e90ff",fiYbrick:"b22222",flSOwEte:"fffaf0",foYstWAn:"228b22",fuKsia:"ff00ff",gaRsbSo:"dcdcdc",ghostwEte:"f8f8ff",gTd:"ffd700",gTMnPd:"daa520",Way:"808080",gYF:"8000",gYFLw:"adff2f",gYy:"808080",honeyMw:"f0fff0",hotpRk:"ff69b4",RdianYd:"cd5c5c",Rdigo:"4b0082",ivSy:"fffff0",khaki:"f0e68c",lavFMr:"e6e6fa",lavFMrXsh:"fff0f5",lawngYF:"7cfc00",NmoncEffon:"fffacd",ZXe:"add8e6",ZcSO:"f08080",Zcyan:"e0ffff",ZgTMnPdLw:"fafad2",ZWay:"d3d3d3",ZgYF:"90ee90",ZgYy:"d3d3d3",ZpRk:"ffb6c1",ZsOmon:"ffa07a",ZsHgYF:"20b2aa",ZskyXe:"87cefa",ZUWay:"778899",ZUgYy:"778899",ZstAlXe:"b0c4de",ZLw:"ffffe0",lime:"ff00",limegYF:"32cd32",lRF:"faf0e6",magFta:"ff00ff",maPon:"800000",VaquamarRe:"66cdaa",VXe:"cd",VScEd:"ba55d3",VpurpN:"9370db",VsHgYF:"3cb371",VUXe:"7b68ee",VsprRggYF:"fa9a",VQe:"48d1cc",VviTetYd:"c71585",midnightXe:"191970",mRtcYam:"f5fffa",mistyPse:"ffe4e1",moccasR:"ffe4b5",navajowEte:"ffdead",navy:"80",Tdlace:"fdf5e6",Tive:"808000",TivedBb:"6b8e23",Sange:"ffa500",SangeYd:"ff4500",ScEd:"da70d6",pOegTMnPd:"eee8aa",pOegYF:"98fb98",pOeQe:"afeeee",pOeviTetYd:"db7093",papayawEp:"ffefd5",pHKpuff:"ffdab9",peru:"cd853f",pRk:"ffc0cb",plum:"dda0dd",powMrXe:"b0e0e6",purpN:"800080",YbeccapurpN:"663399",Yd:"ff0000",Psybrown:"bc8f8f",PyOXe:"4169e1",saddNbPwn:"8b4513",sOmon:"fa8072",sandybPwn:"f4a460",sHgYF:"2e8b57",sHshell:"fff5ee",siFna:"a0522d",silver:"c0c0c0",skyXe:"87ceeb",UXe:"6a5acd",UWay:"708090",UgYy:"708090",snow:"fffafa",sprRggYF:"ff7f",stAlXe:"4682b4",tan:"d2b48c",teO:"8080",tEstN:"d8bfd8",tomato:"ff6347",Qe:"40e0d0",viTet:"ee82ee",JHt:"f5deb3",wEte:"ffffff",wEtesmoke:"f5f5f5",Lw:"ffff00",LwgYF:"9acd32"};function Ice(){let e={},o=Object.keys(lB),t=Object.keys(rB),n,i,s,d,u;for(n=0;n>16&255,s>>8&255,s&255]}return e}var R_;function Oce(e){R_||(R_=Ice(),R_.transparent=[0,0,0,0]);let o=R_[e.toLowerCase()];return o&&{r:o[0],g:o[1],b:o[2],a:o.length===4?o[3]:255}}var Ace=/^rgba?\(\s*([-+.\d]+)(%)?[\s,]+([-+.e\d]+)(%)?[\s,]+([-+.e\d]+)(%)?(?:[\s,/]+([-+.e\d]+)(%)?)?\s*\)$/;function Fce(e){let o=Ace.exec(e),t=255,n,i,s;if(o){if(o[7]!==n){let d=+o[7];t=o[8]?yf(d):Ap(d*255,0,255)}return n=+o[1],i=+o[3],s=+o[5],n=255&(o[2]?yf(n):Ap(n,0,255)),i=255&(o[4]?yf(i):Ap(i,0,255)),s=255&(o[6]?yf(s):Ap(s,0,255)),{r:n,g:i,b:s,a:t}}}function kce(e){return e&&(e.a<255?`rgba(${e.r}, ${e.g}, ${e.b}, ${qc(e.a)})`:`rgb(${e.r}, ${e.g}, ${e.b})`)}var _4=e=>e<=.0031308?e*12.92:Math.pow(e,1/2.4)*1.055-.055,N0=e=>e<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4);function Bce(e,o,t){let n=N0(qc(e.r)),i=N0(qc(e.g)),s=N0(qc(e.b));return{r:Fp(_4(n+t*(N0(qc(o.r))-n))),g:Fp(_4(i+t*(N0(qc(o.g))-i))),b:Fp(_4(s+t*(N0(qc(o.b))-s))),a:e.a+t*(o.a-e.a)}}function N_(e,o,t){if(e){let n=v4(e);n[o]=Math.max(0,Math.min(n[o]+n[o]*t,o===0?360:1)),n=b4(n),e.r=n[0],e.g=n[1],e.b=n[2]}}function mB(e,o){return e&&Object.assign(o||{},e)}function sB(e){var o={r:0,g:0,b:0,a:255};return Array.isArray(e)?e.length>=3&&(o={r:e[0],g:e[1],b:e[2],a:255},e.length>3&&(o.a=Fp(e[3]))):(o=mB(e,{r:0,g:0,b:0,a:1}),o.a=Fp(o.a)),o}function Rce(e){return e.charAt(0)==="r"?Fce(e):Mce(e)}var Sf=class e{constructor(o){if(o instanceof e)return o;let t=typeof o,n;t==="object"?n=sB(o):t==="string"&&(n=Cce(o)||Oce(o)||Rce(o)),this._rgb=n,this._valid=!!n}get valid(){return this._valid}get rgb(){var o=mB(this._rgb);return o&&(o.a=qc(o.a)),o}set rgb(o){this._rgb=sB(o)}rgbString(){return this._valid?kce(this._rgb):void 0}hexString(){return this._valid?xce(this._rgb):void 0}hslString(){return this._valid?Ece(this._rgb):void 0}mix(o,t){if(o){let n=this.rgb,i=o.rgb,s,d=t===s?.5:t,u=2*d-1,f=n.a-i.a,_=((u*f===-1?u:(u+f)/(1+u*f))+1)/2;s=1-_,n.r=255&_*n.r+s*i.r+.5,n.g=255&_*n.g+s*i.g+.5,n.b=255&_*n.b+s*i.b+.5,n.a=d*n.a+(1-d)*i.a,this.rgb=n}return this}interpolate(o,t){return o&&(this._rgb=Bce(this._rgb,o._rgb,t)),this}clone(){return new e(this.rgb)}alpha(o){return this._rgb.a=Fp(o),this}clearer(o){let t=this._rgb;return t.a*=1-o,this}greyscale(){let o=this._rgb,t=wf(o.r*.3+o.g*.59+o.b*.11);return o.r=o.g=o.b=t,this}opaquer(o){let t=this._rgb;return t.a*=1+o,this}negate(){let o=this._rgb;return o.r=255-o.r,o.g=255-o.g,o.b=255-o.b,this}lighten(o){return N_(this._rgb,2,o),this}darken(o){return N_(this._rgb,2,-o),this}saturate(o){return N_(this._rgb,1,o),this}desaturate(o){return N_(this._rgb,1,-o),this}rotate(o){return Dce(this._rgb,o),this}};function mc(){}var yB=(()=>{let e=0;return()=>e++})();function Co(e){return e==null}function ga(e){if(Array.isArray&&Array.isArray(e))return!0;let o=Object.prototype.toString.call(e);return o.slice(0,7)==="[object"&&o.slice(-6)==="Array]"}function bo(e){return e!==null&&Object.prototype.toString.call(e)==="[object Object]"}function ka(e){return(typeof e=="number"||e instanceof Number)&&isFinite(+e)}function Sl(e,o){return ka(e)?e:o}function Kn(e,o){return typeof e>"u"?o:e}var SB=(e,o)=>typeof e=="string"&&e.endsWith("%")?parseFloat(e)/100:+e/o,P4=(e,o)=>typeof e=="string"&&e.endsWith("%")?parseFloat(e)/100*o:+e;function oa(e,o,t){if(e&&typeof e.call=="function")return e.apply(t,o)}function Jo(e,o,t,n){let i,s,d;if(ga(e))if(s=e.length,n)for(i=s-1;i>=0;i--)o.call(t,e[i],i);else for(i=0;ie,x:e=>e.x,y:e=>e.y};function Vce(e){let o=e.split("."),t=[],n="";for(let i of o)n+=i,n.endsWith("\\")?n=n.slice(0,-1)+".":(t.push(n),n="");return t}function qce(e){let o=Vce(e);return t=>{for(let n of o){if(n==="")break;t=t&&t[n]}return t}}function Gc(e,o){return(dB[o]||(dB[o]=qce(o)))(e)}function $_(e){return e.charAt(0).toUpperCase()+e.slice(1)}var H0=e=>typeof e<"u",zc=e=>typeof e=="function",T4=(e,o)=>{if(e.size!==o.size)return!1;for(let t of e)if(!o.has(t))return!1;return!0};function PB(e){return e.type==="mouseup"||e.type==="click"||e.type==="contextmenu"}var Bo=Math.PI,_a=2*Bo,zce=_a+Bo,H_=Number.POSITIVE_INFINITY,Hce=Bo/180,Ha=Bo/2,xd=Bo/4,uB=Bo*2/3,Hc=Math.log10,Rs=Math.sign;function G0(e,o,t){return Math.abs(e-o)i-s).pop(),o}function Gce(e){return typeof e=="symbol"||typeof e=="object"&&e!==null&&!(Symbol.toPrimitive in e||"toString"in e||"valueOf"in e)}function Sd(e){return!Gce(e)&&!isNaN(parseFloat(e))&&isFinite(e)}function MB(e,o){let t=Math.round(e);return t-o<=e&&t+o>=e}function D4(e,o,t){let n,i,s;for(n=0,i=e.length;nf&&_=Math.min(o,t)-n&&e<=Math.max(o,t)+n}function W_(e,o,t){t=t||(d=>e[d]1;)s=i+n>>1,t(s)?i=s:n=s;return{lo:i,hi:n}}var cc=(e,o,t,n)=>W_(e,t,n?i=>{let s=e[i][o];return se[i][o]W_(e,t,n=>e[n][o]>=t);function IB(e,o,t){let n=0,i=e.length;for(;nn&&e[i-1]>t;)i--;return n>0||i{let n="_onData"+$_(t),i=e[t];Object.defineProperty(e,t,{configurable:!0,enumerable:!1,value(...s){let d=i.apply(this,s);return e._chartjs.listeners.forEach(u=>{typeof u[n]=="function"&&u[n](...s)}),d}})})}function O4(e,o){let t=e._chartjs;if(!t)return;let n=t.listeners,i=n.indexOf(o);i!==-1&&n.splice(i,1),!(n.length>0)&&(OB.forEach(s=>{delete e[s]}),delete e._chartjs)}function A4(e){let o=new Set(e);return o.size===e.length?e:Array.from(o)}var F4=(function(){return typeof window>"u"?function(e){return e()}:window.requestAnimationFrame})();function k4(e,o){let t=[],n=!1;return function(...i){t=i,n||(n=!0,F4.call(window,()=>{n=!1,e.apply(o,t)}))}}function FB(e,o){let t;return function(...n){return o?(clearTimeout(t),t=setTimeout(e,o,n)):e.apply(this,n),o}}var Q_=e=>e==="start"?"left":e==="end"?"right":"center",qr=(e,o,t)=>e==="start"?o:e==="end"?t:(o+t)/2,kB=(e,o,t,n)=>e===(n?"left":"right")?t:e==="center"?(o+t)/2:o;function B4(e,o,t){let n=o.length,i=0,s=n;if(e._sorted){let{iScale:d,vScale:u,_parsed:f}=e,_=e.dataset&&e.dataset.options?e.dataset.options.spanGaps:null,C=d.axis,{min:x,max:y,minDefined:P,maxDefined:S}=d.getUserBounds();if(P){if(i=Math.min(cc(f,C,x).lo,t?n:cc(o,C,d.getPixelForValue(x)).lo),_){let M=f.slice(0,i+1).reverse().findIndex(D=>!Co(D[u.axis]));i-=Math.max(0,M)}i=_r(i,0,n-1)}if(S){let M=Math.max(cc(f,d.axis,y,!0).hi+1,t?0:cc(o,C,d.getPixelForValue(y),!0).hi+1);if(_){let D=f.slice(M-1).findIndex(k=>!Co(k[u.axis]));M+=Math.max(0,D)}s=_r(M,i,n)-i}else s=n-i}return{start:i,count:s}}function R4(e){let{xScale:o,yScale:t,_scaleRanges:n}=e,i={xmin:o.min,xmax:o.max,ymin:t.min,ymax:t.max};if(!n)return e._scaleRanges=i,!0;let s=n.xmin!==o.min||n.xmax!==o.max||n.ymin!==t.min||n.ymax!==t.max;return Object.assign(n,i),s}var L_=e=>e===0||e===1,fB=(e,o,t)=>-(Math.pow(2,10*(e-=1))*Math.sin((e-o)*_a/t)),hB=(e,o,t)=>Math.pow(2,-10*e)*Math.sin((e-o)*_a/t)+1,L0={linear:e=>e,easeInQuad:e=>e*e,easeOutQuad:e=>-e*(e-2),easeInOutQuad:e=>(e/=.5)<1?.5*e*e:-.5*(--e*(e-2)-1),easeInCubic:e=>e*e*e,easeOutCubic:e=>(e-=1)*e*e+1,easeInOutCubic:e=>(e/=.5)<1?.5*e*e*e:.5*((e-=2)*e*e+2),easeInQuart:e=>e*e*e*e,easeOutQuart:e=>-((e-=1)*e*e*e-1),easeInOutQuart:e=>(e/=.5)<1?.5*e*e*e*e:-.5*((e-=2)*e*e*e-2),easeInQuint:e=>e*e*e*e*e,easeOutQuint:e=>(e-=1)*e*e*e*e+1,easeInOutQuint:e=>(e/=.5)<1?.5*e*e*e*e*e:.5*((e-=2)*e*e*e*e+2),easeInSine:e=>-Math.cos(e*Ha)+1,easeOutSine:e=>Math.sin(e*Ha),easeInOutSine:e=>-.5*(Math.cos(Bo*e)-1),easeInExpo:e=>e===0?0:Math.pow(2,10*(e-1)),easeOutExpo:e=>e===1?1:-Math.pow(2,-10*e)+1,easeInOutExpo:e=>L_(e)?e:e<.5?.5*Math.pow(2,10*(e*2-1)):.5*(-Math.pow(2,-10*(e*2-1))+2),easeInCirc:e=>e>=1?e:-(Math.sqrt(1-e*e)-1),easeOutCirc:e=>Math.sqrt(1-(e-=1)*e),easeInOutCirc:e=>(e/=.5)<1?-.5*(Math.sqrt(1-e*e)-1):.5*(Math.sqrt(1-(e-=2)*e)+1),easeInElastic:e=>L_(e)?e:fB(e,.075,.3),easeOutElastic:e=>L_(e)?e:hB(e,.075,.3),easeInOutElastic(e){return L_(e)?e:e<.5?.5*fB(e*2,.1125,.45):.5+.5*hB(e*2-1,.1125,.45)},easeInBack(e){return e*e*((1.70158+1)*e-1.70158)},easeOutBack(e){return(e-=1)*e*((1.70158+1)*e+1.70158)+1},easeInOutBack(e){let o=1.70158;return(e/=.5)<1?.5*(e*e*(((o*=1.525)+1)*e-o)):.5*((e-=2)*e*(((o*=1.525)+1)*e+o)+2)},easeInBounce:e=>1-L0.easeOutBounce(1-e),easeOutBounce(e){return e<1/2.75?7.5625*e*e:e<2/2.75?7.5625*(e-=1.5/2.75)*e+.75:e<2.5/2.75?7.5625*(e-=2.25/2.75)*e+.9375:7.5625*(e-=2.625/2.75)*e+.984375},easeInOutBounce:e=>e<.5?L0.easeInBounce(e*2)*.5:L0.easeOutBounce(e*2-1)*.5+.5};function N4(e){if(e&&typeof e=="object"){let o=e.toString();return o==="[object CanvasPattern]"||o==="[object CanvasGradient]"}return!1}function L4(e){return N4(e)?e:new Sf(e)}function y4(e){return N4(e)?e:new Sf(e).saturate(.5).darken(.1).hexString()}var $ce=["x","y","borderWidth","radius","tension"],Uce=["color","borderColor","backgroundColor"];function Wce(e){e.set("animation",{delay:void 0,duration:1e3,easing:"easeOutQuart",fn:void 0,from:void 0,loop:void 0,to:void 0,type:void 0}),e.describe("animation",{_fallback:!1,_indexable:!1,_scriptable:o=>o!=="onProgress"&&o!=="onComplete"&&o!=="fn"}),e.set("animations",{colors:{type:"color",properties:Uce},numbers:{type:"number",properties:$ce}}),e.describe("animations",{_fallback:"animation"}),e.set("transitions",{active:{animation:{duration:400}},resize:{animation:{duration:0}},show:{animations:{colors:{from:"transparent"},visible:{type:"boolean",duration:0}}},hide:{animations:{colors:{to:"transparent"},visible:{type:"boolean",easing:"linear",fn:o=>o|0}}}})}function Qce(e){e.set("layout",{autoPadding:!0,padding:{top:0,right:0,bottom:0,left:0}})}var gB=new Map;function Yce(e,o){o=o||{};let t=e+JSON.stringify(o),n=gB.get(t);return n||(n=new Intl.NumberFormat(e,o),gB.set(t,n)),n}function $0(e,o,t){return Yce(o,t).format(e)}var BB={values(e){return ga(e)?e:""+e},numeric(e,o,t){if(e===0)return"0";let n=this.chart.options.locale,i,s=e;if(t.length>1){let _=Math.max(Math.abs(t[0].value),Math.abs(t[t.length-1].value));(_<1e-4||_>1e15)&&(i="scientific"),s=Jce(e,t)}let d=Hc(Math.abs(s)),u=isNaN(d)?1:Math.max(Math.min(-1*Math.floor(d),20),0),f={notation:i,minimumFractionDigits:u,maximumFractionDigits:u};return Object.assign(f,this.options.ticks.format),$0(e,n,f)},logarithmic(e,o,t){if(e===0)return"0";let n=t[o].significand||e/Math.pow(10,Math.floor(Hc(e)));return[1,2,3,5,10,15].includes(n)||o>.8*t.length?BB.numeric.call(this,e,o,t):""}};function Jce(e,o){let t=o.length>3?o[2].value-o[1].value:o[1].value-o[0].value;return Math.abs(t)>=1&&e!==Math.floor(e)&&(t=e-Math.floor(e)),t}var Df={formatters:BB};function Kce(e){e.set("scale",{display:!0,offset:!1,reverse:!1,beginAtZero:!1,bounds:"ticks",clip:!0,grace:0,grid:{display:!0,lineWidth:1,drawOnChartArea:!0,drawTicks:!0,tickLength:8,tickWidth:(o,t)=>t.lineWidth,tickColor:(o,t)=>t.color,offset:!1},border:{display:!0,dash:[],dashOffset:0,width:1},title:{display:!1,text:"",padding:{top:4,bottom:4}},ticks:{minRotation:0,maxRotation:50,mirror:!1,textStrokeWidth:0,textStrokeColor:"",padding:3,display:!0,autoSkip:!0,autoSkipPadding:3,labelOffset:0,callback:Df.formatters.values,minor:{},major:{},align:"center",crossAlign:"near",showLabelBackdrop:!1,backdropColor:"rgba(255, 255, 255, 0.75)",backdropPadding:2}}),e.route("scale.ticks","color","","color"),e.route("scale.grid","color","","borderColor"),e.route("scale.border","color","","borderColor"),e.route("scale.title","color","","color"),e.describe("scale",{_fallback:!1,_scriptable:o=>!o.startsWith("before")&&!o.startsWith("after")&&o!=="callback"&&o!=="parser",_indexable:o=>o!=="borderDash"&&o!=="tickBorderDash"&&o!=="dash"}),e.describe("scales",{_fallback:"scale"}),e.describe("scale.ticks",{_scriptable:o=>o!=="backdropPadding"&&o!=="callback",_indexable:o=>o!=="backdropPadding"})}var Rp=Object.create(null),Y_=Object.create(null);function Pf(e,o){if(!o)return e;let t=o.split(".");for(let n=0,i=t.length;nn.chart.platform.getDevicePixelRatio(),this.elements={},this.events=["mousemove","mouseout","click","touchstart","touchmove"],this.font={family:"'Helvetica Neue', 'Helvetica', 'Arial', sans-serif",size:12,style:"normal",lineHeight:1.2,weight:null},this.hover={},this.hoverBackgroundColor=(n,i)=>y4(i.backgroundColor),this.hoverBorderColor=(n,i)=>y4(i.borderColor),this.hoverColor=(n,i)=>y4(i.color),this.indexAxis="x",this.interaction={mode:"nearest",intersect:!0,includeInvisible:!1},this.maintainAspectRatio=!0,this.onHover=null,this.onClick=null,this.parsing=!0,this.plugins={},this.responsive=!0,this.scale=void 0,this.scales={},this.showLine=!0,this.drawActiveElementsOnTop=!0,this.describe(o),this.apply(t)}set(o,t){return S4(this,o,t)}get(o){return Pf(this,o)}describe(o,t){return S4(Y_,o,t)}override(o,t){return S4(Rp,o,t)}route(o,t,n,i){let s=Pf(this,o),d=Pf(this,n),u="_"+t;Object.defineProperties(s,{[u]:{value:s[t],writable:!0},[t]:{enumerable:!0,get(){let f=this[u],_=d[i];return bo(f)?Object.assign({},_,f):Kn(f,_)},set(f){this[u]=f}}})}apply(o){o.forEach(t=>t(this))}},ba=new w4({_scriptable:e=>!e.startsWith("on"),_indexable:e=>e!=="events",hover:{_fallback:"interaction"},interaction:{_scriptable:!1,_indexable:!1}},[Wce,Qce,Kce]);function Xce(e){return!e||Co(e.size)||Co(e.family)?null:(e.style?e.style+" ":"")+(e.weight?e.weight+" ":"")+e.size+"px "+e.family}function Tf(e,o,t,n,i){let s=o[i];return s||(s=o[i]=e.measureText(i).width,t.push(i)),s>n&&(n=s),n}function RB(e,o,t,n){n=n||{};let i=n.data=n.data||{},s=n.garbageCollect=n.garbageCollect||[];n.font!==o&&(i=n.data={},s=n.garbageCollect=[],n.font=o),e.save(),e.font=o;let d=0,u=t.length,f,_,C,x,y;for(f=0;ft.length){for(f=0;f0&&e.stroke()}}function pc(e,o,t){return t=t||.5,!o||e&&e.x>o.left-t&&e.xo.top-t&&e.y0&&s.strokeColor!=="",f,_;for(e.save(),e.font=i.string,Zce(e,s),f=0;f+e||0;function K_(e,o){let t={},n=bo(o),i=n?Object.keys(o):o,s=bo(e)?n?d=>Kn(e[d],e[o[d]]):d=>e[d]:()=>e;for(let d of i)t[d]=ape(s(d));return t}function z4(e){return K_(e,{top:"y",right:"x",bottom:"y",left:"x"})}function Vp(e){return K_(e,["topLeft","topRight","bottomLeft","bottomRight"])}function zr(e){let o=z4(e);return o.width=o.left+o.right,o.height=o.top+o.bottom,o}function sr(e,o){e=e||{},o=o||ba.font;let t=Kn(e.size,o.size);typeof t=="string"&&(t=parseInt(t,10));let n=Kn(e.style,o.style);n&&!(""+n).match(npe)&&(console.warn('Invalid font style specified: "'+n+'"'),n=void 0);let i={family:Kn(e.family,o.family),lineHeight:ope(Kn(e.lineHeight,o.lineHeight),t),size:t,style:n,weight:Kn(e.weight,o.weight),string:""};return i.string=Xce(i),i}function W0(e,o,t,n){let i=!0,s,d,u;for(s=0,d=e.length;st&&u===0?0:u+f;return{min:d(n,-Math.abs(s)),max:d(i,s)}}function jc(e,o){return Object.assign(Object.create(e),o)}function X_(e,o=[""],t,n,i=()=>e[0]){let s=t||e;typeof n>"u"&&(n=HB("_fallback",e));let d={[Symbol.toStringTag]:"Object",_cacheable:!0,_scopes:e,_rootScopes:s,_fallback:n,_getTarget:i,override:u=>X_([u,...e],o,s,n)};return new Proxy(d,{deleteProperty(u,f){return delete u[f],delete u._keys,delete e[0][f],!0},get(u,f){return qB(u,f,()=>upe(f,o,e,u))},getOwnPropertyDescriptor(u,f){return Reflect.getOwnPropertyDescriptor(u._scopes[0],f)},getPrototypeOf(){return Reflect.getPrototypeOf(e[0])},has(u,f){return CB(u).includes(f)},ownKeys(u){return CB(u)},set(u,f,_){let C=u._storage||(u._storage=i());return u[f]=C[f]=_,delete u._keys,!0}})}function yd(e,o,t,n){let i={_cacheable:!1,_proxy:e,_context:o,_subProxy:t,_stack:new Set,_descriptors:H4(e,n),setContext:s=>yd(e,s,t,n),override:s=>yd(e.override(s),o,t,n)};return new Proxy(i,{deleteProperty(s,d){return delete s[d],delete e[d],!0},get(s,d,u){return qB(s,d,()=>lpe(s,d,u))},getOwnPropertyDescriptor(s,d){return s._descriptors.allKeys?Reflect.has(e,d)?{enumerable:!0,configurable:!0}:void 0:Reflect.getOwnPropertyDescriptor(e,d)},getPrototypeOf(){return Reflect.getPrototypeOf(e)},has(s,d){return Reflect.has(e,d)},ownKeys(){return Reflect.ownKeys(e)},set(s,d,u){return e[d]=u,delete s[d],!0}})}function H4(e,o={scriptable:!0,indexable:!0}){let{_scriptable:t=o.scriptable,_indexable:n=o.indexable,_allKeys:i=o.allKeys}=e;return{allKeys:i,scriptable:t,indexable:n,isScriptable:zc(t)?t:()=>t,isIndexable:zc(n)?n:()=>n}}var rpe=(e,o)=>e?e+$_(o):o,G4=(e,o)=>bo(o)&&e!=="adapters"&&(Object.getPrototypeOf(o)===null||o.constructor===Object);function qB(e,o,t){if(Object.prototype.hasOwnProperty.call(e,o)||o==="constructor")return e[o];let n=t();return e[o]=n,n}function lpe(e,o,t){let{_proxy:n,_context:i,_subProxy:s,_descriptors:d}=e,u=n[o];return zc(u)&&d.isScriptable(o)&&(u=spe(o,u,e,t)),ga(u)&&u.length&&(u=cpe(o,u,e,d.isIndexable)),G4(o,u)&&(u=yd(u,i,s&&s[o],d)),u}function spe(e,o,t,n){let{_proxy:i,_context:s,_subProxy:d,_stack:u}=t;if(u.has(e))throw new Error("Recursion detected: "+Array.from(u).join("->")+"->"+e);u.add(e);let f=o(s,d||n);return u.delete(e),G4(e,f)&&(f=j4(i._scopes,i,e,f)),f}function cpe(e,o,t,n){let{_proxy:i,_context:s,_subProxy:d,_descriptors:u}=t;if(typeof s.index<"u"&&n(e))return o[s.index%o.length];if(bo(o[0])){let f=o,_=i._scopes.filter(C=>C!==f);o=[];for(let C of f){let x=j4(_,i,e,C);o.push(yd(x,s,d&&d[e],u))}}return o}function zB(e,o,t){return zc(e)?e(o,t):e}var ppe=(e,o)=>e===!0?o:typeof e=="string"?Gc(o,e):void 0;function mpe(e,o,t,n,i){for(let s of o){let d=ppe(t,s);if(d){e.add(d);let u=zB(d._fallback,t,i);if(typeof u<"u"&&u!==t&&u!==n)return u}else if(d===!1&&typeof n<"u"&&t!==n)return null}return!1}function j4(e,o,t,n){let i=o._rootScopes,s=zB(o._fallback,t,n),d=[...e,...i],u=new Set;u.add(n);let f=_B(u,d,t,s||t,n);return f===null||typeof s<"u"&&s!==t&&(f=_B(u,d,s,f,n),f===null)?!1:X_(Array.from(u),[""],i,s,()=>dpe(o,t,n))}function _B(e,o,t,n,i){for(;t;)t=mpe(e,o,t,n,i);return t}function dpe(e,o,t){let n=e._getTarget();o in n||(n[o]={});let i=n[o];return ga(i)&&bo(t)?t:i||{}}function upe(e,o,t,n){let i;for(let s of o)if(i=HB(rpe(s,e),t),typeof i<"u")return G4(e,i)?j4(t,n,e,i):i}function HB(e,o){for(let t of o){if(!t)continue;let n=t[e];if(typeof n<"u")return n}}function CB(e){let o=e._keys;return o||(o=e._keys=fpe(e._scopes)),o}function fpe(e){let o=new Set;for(let t of e)for(let n of Object.keys(t).filter(i=>!i.startsWith("_")))o.add(n);return Array.from(o)}function $4(e,o,t,n){let{iScale:i}=e,{key:s="r"}=this._parsing,d=new Array(n),u,f,_,C;for(u=0,f=n;uoe==="x"?"y":"x";function gpe(e,o,t,n){let i=e.skip?o:e,s=o,d=t.skip?o:t,u=G_(s,i),f=G_(d,s),_=u/(u+f),C=f/(u+f);_=isNaN(_)?0:_,C=isNaN(C)?0:C;let x=n*_,y=n*C;return{previous:{x:s.x-x*(d.x-i.x),y:s.y-x*(d.y-i.y)},next:{x:s.x+y*(d.x-i.x),y:s.y+y*(d.y-i.y)}}}function _pe(e,o,t){let n=e.length,i,s,d,u,f,_=q0(e,0);for(let C=0;C!_.skip)),o.cubicInterpolationMode==="monotone")vpe(e,i);else{let _=n?e[e.length-1]:e[0];for(s=0,d=e.length;se.ownerDocument.defaultView.getComputedStyle(e,null);function bpe(e,o){return tC(e).getPropertyValue(o)}var ype=["top","right","bottom","left"];function bd(e,o,t){let n={};t=t?"-"+t:"";for(let i=0;i<4;i++){let s=ype[i];n[s]=parseFloat(e[o+"-"+s+t])||0}return n.width=n.left+n.right,n.height=n.top+n.bottom,n}var Spe=(e,o,t)=>(e>0||o>0)&&(!t||!t.shadowRoot);function wpe(e,o){let t=e.touches,n=t&&t.length?t[0]:e,{offsetX:i,offsetY:s}=n,d=!1,u,f;if(Spe(i,s,e.target))u=i,f=s;else{let _=o.getBoundingClientRect();u=n.clientX-_.left,f=n.clientY-_.top,d=!0}return{x:u,y:f,box:d}}function qp(e,o){if("native"in e)return e;let{canvas:t,currentDevicePixelRatio:n}=o,i=tC(t),s=i.boxSizing==="border-box",d=bd(i,"padding"),u=bd(i,"border","width"),{x:f,y:_,box:C}=wpe(e,t),x=d.left+(C&&u.left),y=d.top+(C&&u.top),{width:P,height:S}=o;return s&&(P-=d.width+u.width,S-=d.height+u.height),{x:Math.round((f-x)/P*t.width/n),y:Math.round((_-y)/S*t.height/n)}}function Ppe(e,o,t){let n,i;if(o===void 0||t===void 0){let s=e&&eC(e);if(!s)o=e.clientWidth,t=e.clientHeight;else{let d=s.getBoundingClientRect(),u=tC(s),f=bd(u,"border","width"),_=bd(u,"padding");o=d.width-_.width-f.width,t=d.height-_.height-f.height,n=j_(u.maxWidth,s,"clientWidth"),i=j_(u.maxHeight,s,"clientHeight")}}return{width:o,height:t,maxWidth:n||H_,maxHeight:i||H_}}var Bp=e=>Math.round(e*10)/10;function $B(e,o,t,n){let i=tC(e),s=bd(i,"margin"),d=j_(i.maxWidth,e,"clientWidth")||H_,u=j_(i.maxHeight,e,"clientHeight")||H_,f=Ppe(e,o,t),{width:_,height:C}=f;if(i.boxSizing==="content-box"){let y=bd(i,"border","width"),P=bd(i,"padding");_-=P.width+y.width,C-=P.height+y.height}return _=Math.max(0,_-s.width),C=Math.max(0,n?_/n:C-s.height),_=Bp(Math.min(_,d,f.maxWidth)),C=Bp(Math.min(C,u,f.maxHeight)),_&&!C&&(C=Bp(_/2)),(o!==void 0||t!==void 0)&&n&&f.height&&C>f.height&&(C=f.height,_=Bp(Math.floor(C*n))),{width:_,height:C}}function U4(e,o,t){let n=o||1,i=Bp(e.height*n),s=Bp(e.width*n);e.height=Bp(e.height),e.width=Bp(e.width);let d=e.canvas;return d.style&&(t||!d.style.height&&!d.style.width)&&(d.style.height=`${e.height}px`,d.style.width=`${e.width}px`),e.currentDevicePixelRatio!==n||d.height!==i||d.width!==s?(e.currentDevicePixelRatio=n,d.height=i,d.width=s,e.ctx.setTransform(n,0,0,n,0,0),!0):!1}var UB=(function(){let e=!1;try{let o={get passive(){return e=!0,!1}};Z_()&&(window.addEventListener("test",null,o),window.removeEventListener("test",null,o))}catch{}return e})();function W4(e,o){let t=bpe(e,o),n=t&&t.match(/^(\d+)(\.\d+)?px$/);return n?+n[1]:void 0}function kp(e,o,t,n){return{x:e.x+t*(o.x-e.x),y:e.y+t*(o.y-e.y)}}function WB(e,o,t,n){return{x:e.x+t*(o.x-e.x),y:n==="middle"?t<.5?e.y:o.y:n==="after"?t<1?e.y:o.y:t>0?o.y:e.y}}function QB(e,o,t,n){let i={x:e.cp2x,y:e.cp2y},s={x:o.cp1x,y:o.cp1y},d=kp(e,i,t),u=kp(i,s,t),f=kp(s,o,t),_=kp(d,u,t),C=kp(u,f,t);return kp(_,C,t)}var Tpe=function(e,o){return{x(t){return e+e+o-t},setWidth(t){o=t},textAlign(t){return t==="center"?t:t==="right"?"left":"right"},xPlus(t,n){return t-n},leftForLtr(t,n){return t-n}}},Mpe=function(){return{x(e){return e},setWidth(e){},textAlign(e){return e},xPlus(e,o){return e+o},leftForLtr(e,o){return e}}};function wd(e,o,t){return e?Tpe(o,t):Mpe()}function Q4(e,o){let t,n;(o==="ltr"||o==="rtl")&&(t=e.canvas.style,n=[t.getPropertyValue("direction"),t.getPropertyPriority("direction")],t.setProperty("direction",o,"important"),e.prevTextDirection=n)}function Y4(e,o){o!==void 0&&(delete e.prevTextDirection,e.canvas.style.setProperty("direction",o[0],o[1]))}function YB(e){return e==="angle"?{between:j0,compare:jce,normalize:Vr}:{between:dc,compare:(o,t)=>o-t,normalize:o=>o}}function vB({start:e,end:o,count:t,loop:n,style:i}){return{start:e%t,end:o%t,loop:n&&(o-e+1)%t===0,style:i}}function Dpe(e,o,t){let{property:n,start:i,end:s}=t,{between:d,normalize:u}=YB(n),f=o.length,{start:_,end:C,loop:x}=e,y,P;if(x){for(_+=f,C+=f,y=0,P=f;yf(i,U,k)&&u(i,U)!==0,re=()=>u(s,k)===0||f(s,U,k),ee=()=>M||J(),ae=()=>!M||re();for(let ce=C,_e=C;ce<=x;++ce)z=o[ce%d],!z.skip&&(k=_(z[n]),k!==U&&(M=f(k,i,s),D===null&&ee()&&(D=u(k,i)===0?ce:_e),D!==null&&ae()&&(S.push(vB({start:D,end:ce,loop:y,count:d,style:P})),D=null),_e=ce,U=k));return D!==null&&S.push(vB({start:D,end:x,loop:y,count:d,style:P})),S}function K4(e,o){let t=[],n=e.segments;for(let i=0;ii&&e[s%o].skip;)s--;return s%=o,{start:i,end:s}}function Ipe(e,o,t,n){let i=e.length,s=[],d=o,u=e[o],f;for(f=o+1;f<=t;++f){let _=e[f%i];_.skip||_.stop?u.skip||(n=!1,s.push({start:o%i,end:(f-1)%i,loop:n}),o=d=_.stop?f:null):(d=f,u.skip&&(o=f)),u=_}return d!==null&&s.push({start:o%i,end:d%i,loop:n}),s}function JB(e,o){let t=e.points,n=e.options.spanGaps,i=t.length;if(!i)return[];let s=!!e._loop,{start:d,end:u}=Epe(t,i,s,n);if(n===!0)return xB(e,[{start:d,end:u,loop:s}],t,o);let f=uu({chart:o,initial:t.initial,numSteps:d,currentStep:Math.min(n-t.start,d)}))}_refresh(){this._request||(this._running=!0,this._request=F4.call(window,()=>{this._update(),this._request=null,this._running&&this._refresh()}))}_update(o=Date.now()){let t=0;this._charts.forEach((n,i)=>{if(!n.running||!n.items.length)return;let s=n.items,d=s.length-1,u=!1,f;for(;d>=0;--d)f=s[d],f._active?(f._total>n.duration&&(n.duration=f._total),f.tick(o),u=!0):(s[d]=s[s.length-1],s.pop());u&&(i.draw(),this._notify(i,n,o,"progress")),s.length||(n.running=!1,this._notify(i,n,o,"complete"),n.initial=!1),t+=s.length}),this._lastDate=o,t===0&&(this._running=!1)}_getAnims(o){let t=this._charts,n=t.get(o);return n||(n={running:!1,initial:!0,items:[],listeners:{complete:[],progress:[]}},t.set(o,n)),n}listen(o,t,n){this._getAnims(o).listeners[t].push(n)}add(o,t){!t||!t.length||this._getAnims(o).items.push(...t)}has(o){return this._getAnims(o).items.length>0}start(o){let t=this._charts.get(o);t&&(t.running=!0,t.start=Date.now(),t.duration=t.items.reduce((n,i)=>Math.max(n,i._duration),0),this._refresh())}running(o){if(!this._running)return!1;let t=this._charts.get(o);return!(!t||!t.running||!t.items.length)}stop(o){let t=this._charts.get(o);if(!t||!t.items.length)return;let n=t.items,i=n.length-1;for(;i>=0;--i)n[i].cancel();t.items=[],this._notify(o,t,Date.now(),"complete")}remove(o){return this._charts.delete(o)}},$c=new pM,KB="transparent",kpe={boolean(e,o,t){return t>.5?o:e},color(e,o,t){let n=L4(e||KB),i=n.valid&&L4(o||KB);return i&&i.valid?i.mix(n,t).hexString():o},number(e,o,t){return e+(o-e)*t}},mM=class{constructor(o,t,n,i){let s=t[n];i=W0([o.to,i,s,o.from]);let d=W0([o.from,s,i]);this._active=!0,this._fn=o.fn||kpe[o.type||typeof d],this._easing=L0[o.easing]||L0.linear,this._start=Math.floor(Date.now()+(o.delay||0)),this._duration=this._total=Math.floor(o.duration),this._loop=!!o.loop,this._target=t,this._prop=n,this._from=d,this._to=i,this._promises=void 0}active(){return this._active}update(o,t,n){if(this._active){this._notify(!1);let i=this._target[this._prop],s=n-this._start,d=this._duration-s;this._start=n,this._duration=Math.floor(Math.max(d,o.duration)),this._total+=s,this._loop=!!o.loop,this._to=W0([o.to,t,i,o.from]),this._from=W0([o.from,i,t])}}cancel(){this._active&&(this.tick(Date.now()),this._active=!1,this._notify(!1))}tick(o){let t=o-this._start,n=this._duration,i=this._prop,s=this._from,d=this._loop,u=this._to,f;if(this._active=s!==u&&(d||t1?2-f:f,f=this._easing(Math.min(1,Math.max(0,f))),this._target[i]=this._fn(s,u,f)}wait(){let o=this._promises||(this._promises=[]);return new Promise((t,n)=>{o.push({res:t,rej:n})})}_notify(o){let t=o?"res":"rej",n=this._promises||[];for(let i=0;i{let s=o[i];if(!bo(s))return;let d={};for(let u of t)d[u]=s[u];(ga(s.properties)&&s.properties||[i]).forEach(u=>{(u===i||!n.has(u))&&n.set(u,d)})})}_animateOptions(o,t){let n=t.options,i=Rpe(o,n);if(!i)return[];let s=this._createAnimations(i,n);return n.$shared&&Bpe(o.options.$animations,n).then(()=>{o.options=n},()=>{}),s}_createAnimations(o,t){let n=this._properties,i=[],s=o.$animations||(o.$animations={}),d=Object.keys(t),u=Date.now(),f;for(f=d.length-1;f>=0;--f){let _=d[f];if(_.charAt(0)==="$")continue;if(_==="options"){i.push(...this._animateOptions(o,t));continue}let C=t[_],x=s[_],y=n.get(_);if(x)if(y&&x.active()){x.update(y,C,u);continue}else x.cancel();if(!y||!y.duration){o[_]=C;continue}s[_]=x=new mM(y,o,_,C),i.push(x)}return i}update(o,t){if(this._properties.size===0){Object.assign(o,t);return}let n=this._createAnimations(o,t);if(n.length)return $c.add(this._chart,n),!0}};function Bpe(e,o){let t=[],n=Object.keys(o);for(let i=0;i0||!t&&s<0)return i.index}return null}function tR(e,o){let{chart:t,_cachedMeta:n}=e,i=t._stacks||(t._stacks={}),{iScale:s,vScale:d,index:u}=n,f=s.axis,_=d.axis,C=qpe(s,d,n),x=o.length,y;for(let P=0;Pt[n].axis===o).shift()}function Gpe(e,o){return jc(e,{active:!1,dataset:void 0,datasetIndex:o,index:o,mode:"default",type:"dataset"})}function jpe(e,o,t){return jc(e,{active:!1,dataIndex:o,parsed:void 0,raw:void 0,element:t,index:o,mode:"default",type:"data"})}function Of(e,o){let t=e.controller.index,n=e.vScale&&e.vScale.axis;if(n){o=o||e._parsed;for(let i of o){let s=i._stacks;if(!s||s[n]===void 0||s[n][t]===void 0)return;delete s[n][t],s[n]._visualValues!==void 0&&s[n]._visualValues[t]!==void 0&&delete s[n]._visualValues[t]}}}var tM=e=>e==="reset"||e==="none",iR=(e,o)=>o?e:Object.assign({},e),$pe=(e,o,t)=>e&&!o.hidden&&o._stacked&&{keys:KR(t,!0),values:null},Hp=(()=>{class e{static defaults={};static datasetElementType=null;static dataElementType=null;constructor(t,n){this.chart=t,this._ctx=t.ctx,this.index=n,this._cachedDataOpts={},this._cachedMeta=this.getMeta(),this._type=this._cachedMeta.type,this.options=void 0,this._parsing=!1,this._data=void 0,this._objectData=void 0,this._sharedOptions=void 0,this._drawStart=void 0,this._drawCount=void 0,this.enableOptionSharing=!1,this.supportsDecimation=!1,this.$context=void 0,this._syncList=[],this.datasetElementType=new.target.datasetElementType,this.dataElementType=new.target.dataElementType,this.initialize()}initialize(){let t=this._cachedMeta;this.configure(),this.linkScales(),t._stacked=Z4(t.vScale,t),this.addElements(),this.options.fill&&!this.chart.isPluginEnabled("filler")&&console.warn("Tried to use the 'fill' option without the 'Filler' plugin enabled. Please import and register the 'Filler' plugin and make sure it is not disabled in the options")}updateIndex(t){this.index!==t&&Of(this._cachedMeta),this.index=t}linkScales(){let t=this.chart,n=this._cachedMeta,i=this.getDataset(),s=(y,P,S,M)=>y==="x"?P:y==="r"?M:S,d=n.xAxisID=Kn(i.xAxisID,eM(t,"x")),u=n.yAxisID=Kn(i.yAxisID,eM(t,"y")),f=n.rAxisID=Kn(i.rAxisID,eM(t,"r")),_=n.indexAxis,C=n.iAxisID=s(_,d,u,f),x=n.vAxisID=s(_,u,d,f);n.xScale=this.getScaleForId(d),n.yScale=this.getScaleForId(u),n.rScale=this.getScaleForId(f),n.iScale=this.getScaleForId(C),n.vScale=this.getScaleForId(x)}getDataset(){return this.chart.data.datasets[this.index]}getMeta(){return this.chart.getDatasetMeta(this.index)}getScaleForId(t){return this.chart.scales[t]}_getOtherScale(t){let n=this._cachedMeta;return t===n.iScale?n.vScale:n.iScale}reset(){this._update("reset")}_destroy(){let t=this._cachedMeta;this._data&&O4(this._data,this),t._stacked&&Of(t)}_dataCheck(){let t=this.getDataset(),n=t.data||(t.data=[]),i=this._data;if(bo(n)){let s=this._cachedMeta;this._data=Vpe(n,s)}else if(i!==n){if(i){O4(i,this);let s=this._cachedMeta;Of(s),s._parsed=[]}n&&Object.isExtensible(n)&&AB(n,this),this._syncList=[],this._data=n}}addElements(){let t=this._cachedMeta;this._dataCheck(),this.datasetElementType&&(t.dataset=new this.datasetElementType)}buildOrUpdateElements(t){let n=this._cachedMeta,i=this.getDataset(),s=!1;this._dataCheck();let d=n._stacked;n._stacked=Z4(n.vScale,n),n.stack!==i.stack&&(s=!0,Of(n),n.stack=i.stack),this._resyncElements(t),(s||d!==n._stacked)&&(tR(this,n._parsed),n._stacked=Z4(n.vScale,n))}configure(){let t=this.chart.config,n=t.datasetScopeKeys(this._type),i=t.getOptionScopes(this.getDataset(),n,!0);this.options=t.createResolver(i,this.getContext()),this._parsing=this.options.parsing,this._cachedDataOpts={}}parse(t,n){let{_cachedMeta:i,_data:s}=this,{iScale:d,_stacked:u}=i,f=d.axis,_=t===0&&n===s.length?!0:i._sorted,C=t>0&&i._parsed[t-1],x,y,P;if(this._parsing===!1)i._parsed=s,i._sorted=!0,P=s;else{ga(s[t])?P=this.parseArrayData(i,s,t,n):bo(s[t])?P=this.parseObjectData(i,s,t,n):P=this.parsePrimitiveData(i,s,t,n);let S=()=>y[f]===null||C&&y[f]D||y=0;--P)if(!M()){this.updateRangeFromParsed(C,t,S,_);break}}return C}getAllParsedValues(t){let n=this._cachedMeta._parsed,i=[],s,d,u;for(s=0,d=n.length;s=0&&tthis.getContext(i,s,n),D=C.resolveNamedOptions(P,S,M,y);return D.$shared&&(D.$shared=_,d[u]=Object.freeze(iR(D,_))),D}_resolveAnimations(t,n,i){let s=this.chart,d=this._cachedDataOpts,u=`animation-${n}`,f=d[u];if(f)return f;let _;if(s.options.animation!==!1){let x=this.chart.config,y=x.datasetAnimationScopeKeys(this._type,n),P=x.getOptionScopes(this.getDataset(),y);_=x.createResolver(P,this.getContext(t,i,n))}let C=new pC(s,_&&_.animations);return _&&_._cacheable&&(d[u]=Object.freeze(C)),C}getSharedOptions(t){if(t.$shared)return this._sharedOptions||(this._sharedOptions=Object.assign({},t))}includeOptions(t,n){return!n||tM(t)||this.chart._animationsDisabled}_getSharedOptions(t,n){let i=this.resolveDataElementOptions(t,n),s=this._sharedOptions,d=this.getSharedOptions(i),u=this.includeOptions(n,d)||d!==s;return this.updateSharedOptions(d,n,i),{sharedOptions:d,includeOptions:u}}updateElement(t,n,i,s){tM(s)?Object.assign(t,i):this._resolveAnimations(n,s).update(t,i)}updateSharedOptions(t,n,i){t&&!tM(n)&&this._resolveAnimations(void 0,n).update(t,i)}_setStyle(t,n,i,s){t.active=s;let d=this.getStyle(n,s);this._resolveAnimations(n,i,s).update(t,{options:!s&&this.getSharedOptions(d)||d})}removeHoverStyle(t,n,i){this._setStyle(t,i,"active",!1)}setHoverStyle(t,n,i){this._setStyle(t,i,"active",!0)}_removeDatasetHoverStyle(){let t=this._cachedMeta.dataset;t&&this._setStyle(t,void 0,"active",!1)}_setDatasetHoverStyle(){let t=this._cachedMeta.dataset;t&&this._setStyle(t,void 0,"active",!0)}_resyncElements(t){let n=this._data,i=this._cachedMeta.data;for(let[f,_,C]of this._syncList)this[f](_,C);this._syncList=[];let s=i.length,d=n.length,u=Math.min(d,s);u&&this.parse(0,u),d>s?this._insertElements(s,d-s,t):d{for(C.length+=n,f=C.length-1;f>=u;f--)C[f]=C[f-n]};for(_(d),f=t;fi-s))}return e._cache.$bar}function Wpe(e){let o=e.iScale,t=Upe(o,e.type),n=o._length,i,s,d,u,f=()=>{d===32767||d===-32768||(H0(u)&&(n=Math.min(n,Math.abs(d-u)||n)),u=d)};for(i=0,s=t.length;i0?i[e-1]:null,u=eMath.abs(u)&&(f=u,_=d),o[t.axis]=_,o._custom={barStart:f,barEnd:_,start:i,end:s,min:d,max:u}}function XR(e,o,t,n){return ga(e)?Jpe(e,o,t,n):o[t.axis]=t.parse(e,n),o}function nR(e,o,t,n){let i=e.iScale,s=e.vScale,d=i.getLabels(),u=i===s,f=[],_,C,x,y;for(_=t,C=t+n;_=t?1:-1)}function Xpe(e){let o,t,n,i,s;return e.horizontal?(o=e.base>e.x,t="left",n="right"):(o=e.base{class e extends Hp{static id="bar";static defaults={datasetElementType:!1,dataElementType:"bar",categoryPercentage:.8,barPercentage:.9,grouped:!0,animations:{numbers:{type:"number",properties:["x","y","base","width","height"]}}};static overrides={scales:{_index_:{type:"category",offset:!0,grid:{offset:!0}},_value_:{type:"linear",beginAtZero:!0}}};parsePrimitiveData(t,n,i,s){return nR(t,n,i,s)}parseArrayData(t,n,i,s){return nR(t,n,i,s)}parseObjectData(t,n,i,s){let{iScale:d,vScale:u}=t,{xAxisKey:f="x",yAxisKey:_="y"}=this._parsing,C=d.axis==="x"?f:_,x=u.axis==="x"?f:_,y=[],P,S,M,D;for(P=i,S=i+s;Px.controller.options.grouped),d=i.options.stacked,u=[],f=this._cachedMeta.controller.getParsed(n),_=f&&f[i.axis],C=x=>{let y=x._parsed.find(S=>S[i.axis]===_),P=y&&y[x.vScale.axis];if(Co(P)||isNaN(P))return!0};for(let x of s)if(!(n!==void 0&&C(x))&&((d===!1||u.indexOf(x.stack)===-1||d===void 0&&x.stack===void 0)&&u.push(x.stack),x.index===t))break;return u.length||u.push(void 0),u}_getStackCount(t){return this._getStacks(void 0,t).length}_getAxisCount(){return this._getAxis().length}getFirstScaleIdForIndexAxis(){let t=this.chart.scales,n=this.chart.options.indexAxis;return Object.keys(t).filter(i=>t[i].axis===n).shift()}_getAxis(){let t={},n=this.getFirstScaleIdForIndexAxis();for(let i of this.chart.data.datasets)t[Kn(this.chart.options.indexAxis==="x"?i.xAxisID:i.yAxisID,n)]=!0;return Object.keys(t)}_getStackIndex(t,n,i){let s=this._getStacks(t,i),d=n!==void 0?s.indexOf(n):-1;return d===-1?s.length-1:d}_getRuler(){let t=this.options,n=this._cachedMeta,i=n.iScale,s=[],d,u;for(d=0,u=n.data.length;d{class e extends Hp{static id="bubble";static defaults={datasetElementType:!1,dataElementType:"point",animations:{numbers:{type:"number",properties:["x","y","borderWidth","radius"]}}};static overrides={scales:{x:{type:"linear"},y:{type:"linear"}}};initialize(){this.enableOptionSharing=!0,super.initialize()}parsePrimitiveData(t,n,i,s){let d=super.parsePrimitiveData(t,n,i,s);for(let u=0;u=0;--i)n=Math.max(n,t[i].size(this.resolveDataElementOptions(i))/2);return n>0&&n}getLabelAndValue(t){let n=this._cachedMeta,i=this.chart.data.labels||[],{xScale:s,yScale:d}=n,u=this.getParsed(t),f=s.getLabelForValue(u.x),_=d.getLabelForValue(u.y),C=u._custom;return{label:i[t]||"",value:"("+f+", "+_+(C?", "+C:"")+")"}}update(t){let n=this._cachedMeta.data;this.updateElements(n,0,n.length,t)}updateElements(t,n,i,s){let d=s==="reset",{iScale:u,vScale:f}=this._cachedMeta,{sharedOptions:_,includeOptions:C}=this._getSharedOptions(n,s),x=u.axis,y=f.axis;for(let P=n;Pj0(U,u,f,!0)?1:Math.max(J,J*t,re,re*t),S=(U,J,re)=>j0(U,u,f,!0)?-1:Math.min(J,J*t,re,re*t),M=P(0,_,x),D=P(Ha,C,y),k=S(Bo,_,x),z=S(Bo+Ha,C,y);n=(M-k)/2,i=(D-z)/2,s=-(M+k)/2,d=-(D+z)/2}return{ratioX:n,ratioY:i,offsetX:s,offsetY:d}}var OM=(()=>{class e extends Hp{static id="doughnut";static defaults={datasetElementType:!1,dataElementType:"arc",animation:{animateRotate:!0,animateScale:!1},animations:{numbers:{type:"number",properties:["circumference","endAngle","innerRadius","outerRadius","startAngle","x","y","offset","borderWidth","spacing"]}},cutout:"50%",rotation:0,circumference:360,radius:"100%",spacing:0,indexAxis:"r"};static descriptors={_scriptable:t=>t!=="spacing",_indexable:t=>t!=="spacing"&&!t.startsWith("borderDash")&&!t.startsWith("hoverBorderDash")};static overrides={aspectRatio:1,plugins:{legend:{labels:{generateLabels(t){let n=t.data,{labels:{pointStyle:i,textAlign:s,color:d,useBorderRadius:u,borderRadius:f}}=t.legend.options;return n.labels.length&&n.datasets.length?n.labels.map((_,C)=>{let y=t.getDatasetMeta(0).controller.getStyle(C);return{text:_,fillStyle:y.backgroundColor,fontColor:d,hidden:!t.getDataVisibility(C),lineDash:y.borderDash,lineDashOffset:y.borderDashOffset,lineJoin:y.borderJoinStyle,lineWidth:y.borderWidth,strokeStyle:y.borderColor,textAlign:s,pointStyle:i,borderRadius:u&&(f||y.borderRadius),index:C}}):[]}},onClick(t,n,i){i.chart.toggleDataVisibility(n.index),i.chart.update()}}}};constructor(t,n){super(t,n),this.enableOptionSharing=!0,this.innerRadius=void 0,this.outerRadius=void 0,this.offsetX=void 0,this.offsetY=void 0}linkScales(){}parse(t,n){let i=this.getDataset().data,s=this._cachedMeta;if(this._parsing===!1)s._parsed=i;else{let d=_=>+i[_];if(bo(i[t])){let{key:_="value"}=this._parsing;d=C=>+Gc(i[C],_)}let u,f;for(u=t,f=t+n;u0&&!isNaN(t)?_a*(Math.abs(t)/n):0}getLabelAndValue(t){let n=this._cachedMeta,i=this.chart,s=i.data.labels||[],d=$0(n._parsed[t],i.options.locale);return{label:s[t]||"",value:d}}getMaxBorderWidth(t){let n=0,i=this.chart,s,d,u,f,_;if(!t){for(s=0,d=i.data.datasets.length;s{class e extends Hp{static id="line";static defaults={datasetElementType:"line",dataElementType:"point",showLine:!0,spanGaps:!1};static overrides={scales:{_index_:{type:"category"},_value_:{type:"linear"}}};initialize(){this.enableOptionSharing=!0,this.supportsDecimation=!0,super.initialize()}update(t){let n=this._cachedMeta,{dataset:i,data:s=[],_dataset:d}=n,u=this.chart._animationsDisabled,{start:f,count:_}=B4(n,s,u);this._drawStart=f,this._drawCount=_,R4(n)&&(f=0,_=s.length),i._chart=this.chart,i._datasetIndex=this.index,i._decimated=!!d._decimated,i.points=s;let C=this.resolveDatasetElementOptions(t);this.options.showLine||(C.borderWidth=0),C.segment=this.options.segment,this.updateElement(i,void 0,{animated:!u,options:C},t),this.updateElements(s,f,_,t)}updateElements(t,n,i,s){let d=s==="reset",{iScale:u,vScale:f,_stacked:_,_dataset:C}=this._cachedMeta,{sharedOptions:x,includeOptions:y}=this._getSharedOptions(n,s),P=u.axis,S=f.axis,{spanGaps:M,segment:D}=this.options,k=Sd(M)?M:Number.POSITIVE_INFINITY,z=this.chart._animationsDisabled||d||s==="none",U=n+i,J=t.length,re=n>0&&this.getParsed(n-1);for(let ee=0;ee=U){ce.skip=!0;continue}let _e=this.getParsed(ee),de=Co(_e[S]),j=ce[P]=u.getPixelForValue(_e[P],ee),W=ce[S]=d||de?f.getBasePixel():f.getPixelForValue(_?this.applyStack(f,_e,_):_e[S],ee);ce.skip=isNaN(j)||isNaN(W)||de,ce.stop=ee>0&&Math.abs(_e[P]-re[P])>k,D&&(ce.parsed=_e,ce.raw=C.data[ee]),y&&(ce.options=x||this.resolveDataElementOptions(ee,ae.active?"active":s)),z||this.updateElement(ae,ee,ce,s),re=_e}}getMaxOverflow(){let t=this._cachedMeta,n=t.dataset,i=n.options&&n.options.borderWidth||0,s=t.data||[];if(!s.length)return i;let d=s[0].size(this.resolveDataElementOptions(0)),u=s[s.length-1].size(this.resolveDataElementOptions(s.length-1));return Math.max(i,d,u)/2}draw(){let t=this._cachedMeta;t.dataset.updateControlPoints(this.chart.chartArea,t.iScale.axis),super.draw()}}return e})(),ZR=(()=>{class e extends Hp{static id="polarArea";static defaults={dataElementType:"arc",animation:{animateRotate:!0,animateScale:!0},animations:{numbers:{type:"number",properties:["x","y","startAngle","endAngle","innerRadius","outerRadius"]}},indexAxis:"r",startAngle:0};static overrides={aspectRatio:1,plugins:{legend:{labels:{generateLabels(t){let n=t.data;if(n.labels.length&&n.datasets.length){let{labels:{pointStyle:i,color:s}}=t.legend.options;return n.labels.map((d,u)=>{let _=t.getDatasetMeta(0).controller.getStyle(u);return{text:d,fillStyle:_.backgroundColor,strokeStyle:_.borderColor,fontColor:s,lineWidth:_.borderWidth,pointStyle:i,hidden:!t.getDataVisibility(u),index:u}})}return[]}},onClick(t,n,i){i.chart.toggleDataVisibility(n.index),i.chart.update()}}},scales:{r:{type:"radialLinear",angleLines:{display:!1},beginAtZero:!0,grid:{circular:!0},pointLabels:{display:!1},startAngle:0}}};constructor(t,n){super(t,n),this.innerRadius=void 0,this.outerRadius=void 0}getLabelAndValue(t){let n=this._cachedMeta,i=this.chart,s=i.data.labels||[],d=$0(n._parsed[t].r,i.options.locale);return{label:s[t]||"",value:d}}parseObjectData(t,n,i,s){return $4.bind(this)(t,n,i,s)}update(t){let n=this._cachedMeta.data;this._updateRadius(),this.updateElements(n,0,n.length,t)}getMinMax(){let t=this._cachedMeta,n={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY};return t.data.forEach((i,s)=>{let d=this.getParsed(s).r;!isNaN(d)&&this.chart.getDataVisibility(s)&&(dn.max&&(n.max=d))}),n}_updateRadius(){let t=this.chart,n=t.chartArea,i=t.options,s=Math.min(n.right-n.left,n.bottom-n.top),d=Math.max(s/2,0),u=Math.max(i.cutoutPercentage?d/100*i.cutoutPercentage:1,0),f=(d-u)/t.getVisibleDatasetCount();this.outerRadius=d-f*this.index,this.innerRadius=this.outerRadius-f}updateElements(t,n,i,s){let d=s==="reset",u=this.chart,_=u.options.animation,C=this._cachedMeta.rScale,x=C.xCenter,y=C.yCenter,P=C.getIndexAngle(0)-.5*Bo,S=P,M,D=360/this.countVisibleElements();for(M=0;M{!isNaN(this.getParsed(s).r)&&this.chart.getDataVisibility(s)&&n++}),n}_computeAngle(t,n,i){return this.chart.getDataVisibility(t)?ms(this.resolveDataElementOptions(t,n).angle||i):0}}return e})(),rme=(()=>{class e extends OM{static id="pie";static defaults={cutout:0,rotation:0,circumference:360,radius:"100%"}}return e})(),lme=(()=>{class e extends Hp{static id="radar";static defaults={datasetElementType:"line",dataElementType:"point",indexAxis:"r",showLine:!0,elements:{line:{fill:"start"}}};static overrides={aspectRatio:1,scales:{r:{type:"radialLinear"}}};getLabelAndValue(t){let n=this._cachedMeta.vScale,i=this.getParsed(t);return{label:n.getLabels()[t],value:""+n.getLabelForValue(i[n.axis])}}parseObjectData(t,n,i,s){return $4.bind(this)(t,n,i,s)}update(t){let n=this._cachedMeta,i=n.dataset,s=n.data||[],d=n.iScale.getLabels();if(i.points=s,t!=="resize"){let u=this.resolveDatasetElementOptions(t);this.options.showLine||(u.borderWidth=0);let f={_loop:!0,_fullLoop:d.length===s.length,options:u};this.updateElement(i,void 0,f,t)}this.updateElements(s,0,s.length,t)}updateElements(t,n,i,s){let d=this._cachedMeta.rScale,u=s==="reset";for(let f=n;f{class e extends Hp{static id="scatter";static defaults={datasetElementType:!1,dataElementType:"point",showLine:!1,fill:!1};static overrides={interaction:{mode:"point"},scales:{x:{type:"linear"},y:{type:"linear"}}};getLabelAndValue(t){let n=this._cachedMeta,i=this.chart.data.labels||[],{xScale:s,yScale:d}=n,u=this.getParsed(t),f=s.getLabelForValue(u.x),_=d.getLabelForValue(u.y);return{label:i[t]||"",value:"("+f+", "+_+")"}}update(t){let n=this._cachedMeta,{data:i=[]}=n,s=this.chart._animationsDisabled,{start:d,count:u}=B4(n,i,s);if(this._drawStart=d,this._drawCount=u,R4(n)&&(d=0,u=i.length),this.options.showLine){this.datasetElementType||this.addElements();let{dataset:f,_dataset:_}=n;f._chart=this.chart,f._datasetIndex=this.index,f._decimated=!!_._decimated,f.points=i;let C=this.resolveDatasetElementOptions(t);C.segment=this.options.segment,this.updateElement(f,void 0,{animated:!s,options:C},t)}else this.datasetElementType&&(delete n.dataset,this.datasetElementType=!1);this.updateElements(i,d,u,t)}addElements(){let{showLine:t}=this.options;!this.datasetElementType&&t&&(this.datasetElementType=this.chart.registry.getElement("line")),super.addElements()}updateElements(t,n,i,s){let d=s==="reset",{iScale:u,vScale:f,_stacked:_,_dataset:C}=this._cachedMeta,x=this.resolveDataElementOptions(n,s),y=this.getSharedOptions(x),P=this.includeOptions(s,y),S=u.axis,M=f.axis,{spanGaps:D,segment:k}=this.options,z=Sd(D)?D:Number.POSITIVE_INFINITY,U=this.chart._animationsDisabled||d||s==="none",J=n>0&&this.getParsed(n-1);for(let re=n;re0&&Math.abs(ae[S]-J[S])>z,k&&(ce.parsed=ae,ce.raw=C.data[re]),P&&(ce.options=y||this.resolveDataElementOptions(re,ee.active?"active":s)),U||this.updateElement(ee,re,ce,s),J=ae}this.updateSharedOptions(y,s,x)}getMaxOverflow(){let t=this._cachedMeta,n=t.data||[];if(!this.options.showLine){let f=0;for(let _=n.length-1;_>=0;--_)f=Math.max(f,n[_].size(this.resolveDataElementOptions(_))/2);return f>0&&f}let i=t.dataset,s=i.options&&i.options.borderWidth||0;if(!n.length)return s;let d=n[0].size(this.resolveDataElementOptions(0)),u=n[n.length-1].size(this.resolveDataElementOptions(n.length-1));return Math.max(s,d,u)/2}}return e})(),cme=Object.freeze({__proto__:null,BarController:ime,BubbleController:nme,DoughnutController:OM,LineController:ame,PieController:rme,PolarAreaController:ZR,RadarController:lme,ScatterController:sme});function Pd(){throw new Error("This method is not implemented: Check that a complete date adapter is provided.")}var dM=class e{static override(o){Object.assign(e.prototype,o)}options;constructor(o){this.options=o||{}}init(){}formats(){return Pd()}parse(){return Pd()}format(){return Pd()}add(){return Pd()}diff(){return Pd()}startOf(){return Pd()}endOf(){return Pd()}},pme={_date:dM};function mme(e,o,t,n){let{controller:i,data:s,_sorted:d}=e,u=i._cachedMeta.iScale,f=e.dataset&&e.dataset.options?e.dataset.options.spanGaps:null;if(u&&o===u.axis&&o!=="r"&&d&&s.length){let _=u._reversePixels?EB:cc;if(n){if(i._sharedOptions){let C=s[0],x=typeof C.getRange=="function"&&C.getRange(o);if(x){let y=_(s,o,t-x),P=_(s,o,t+x);return{lo:y.lo,hi:P.hi}}}}else{let C=_(s,o,t);if(f){let{vScale:x}=i._cachedMeta,{_parsed:y}=e,P=y.slice(0,C.lo+1).reverse().findIndex(M=>!Co(M[x.axis]));C.lo-=Math.max(0,P);let S=y.slice(C.hi).findIndex(M=>!Co(M[x.axis]));C.hi+=Math.max(0,S)}return C}}return{lo:0,hi:s.length-1}}function zf(e,o,t,n,i){let s=e.getSortedVisibleDatasetMetas(),d=t[o];for(let u=0,f=s.length;u{f[d]&&f[d](o[t],i)&&(s.push({element:f,datasetIndex:_,index:C}),u=u||f.inRange(o.x,o.y,i))}),n&&!u?[]:s}var hme={evaluateInteractionItems:zf,modes:{index(e,o,t,n){let i=qp(o,e),s=t.axis||"x",d=t.includeInvisible||!1,u=t.intersect?nM(e,i,s,n,d):oM(e,i,s,!1,n,d),f=[];return u.length?(e.getSortedVisibleDatasetMetas().forEach(_=>{let C=u[0].index,x=_.data[C];x&&!x.skip&&f.push({element:x,datasetIndex:_.index,index:C})}),f):[]},dataset(e,o,t,n){let i=qp(o,e),s=t.axis||"xy",d=t.includeInvisible||!1,u=t.intersect?nM(e,i,s,n,d):oM(e,i,s,!1,n,d);if(u.length>0){let f=u[0].datasetIndex,_=e.getDatasetMeta(f).data;u=[];for(let C=0;C<_.length;++C)u.push({element:_[C],datasetIndex:f,index:C})}return u},point(e,o,t,n){let i=qp(o,e),s=t.axis||"xy",d=t.includeInvisible||!1;return nM(e,i,s,n,d)},nearest(e,o,t,n){let i=qp(o,e),s=t.axis||"xy",d=t.includeInvisible||!1;return oM(e,i,s,t.intersect,n,d)},x(e,o,t,n){let i=qp(o,e);return rR(e,i,"x",t.intersect,n)},y(e,o,t,n){let i=qp(o,e);return rR(e,i,"y",t.intersect,n)}}},e9=["left","top","right","bottom"];function Af(e,o){return e.filter(t=>t.pos===o)}function lR(e,o){return e.filter(t=>e9.indexOf(t.pos)===-1&&t.box.axis===o)}function Ff(e,o){return e.sort((t,n)=>{let i=o?n:t,s=o?t:n;return i.weight===s.weight?i.index-s.index:i.weight-s.weight})}function gme(e){let o=[],t,n,i,s,d,u;for(t=0,n=(e||[]).length;t_.box.fullSize),!0),n=Ff(Af(o,"left"),!0),i=Ff(Af(o,"right")),s=Ff(Af(o,"top"),!0),d=Ff(Af(o,"bottom")),u=lR(o,"x"),f=lR(o,"y");return{fullSize:t,leftAndTop:n.concat(s),rightAndBottom:i.concat(f).concat(d).concat(u),chartArea:Af(o,"chartArea"),vertical:n.concat(i).concat(f),horizontal:s.concat(d).concat(u)}}function sR(e,o,t,n){return Math.max(e[t],o[t])+Math.max(e[n],o[n])}function t9(e,o){e.top=Math.max(e.top,o.top),e.left=Math.max(e.left,o.left),e.bottom=Math.max(e.bottom,o.bottom),e.right=Math.max(e.right,o.right)}function xme(e,o,t,n){let{pos:i,box:s}=t,d=e.maxPadding;if(!bo(i)){t.size&&(e[i]-=t.size);let x=n[t.stack]||{size:0,count:1};x.size=Math.max(x.size,t.horizontal?s.height:s.width),t.size=x.size/x.count,e[i]+=t.size}s.getPadding&&t9(d,s.getPadding());let u=Math.max(0,o.outerWidth-sR(d,e,"left","right")),f=Math.max(0,o.outerHeight-sR(d,e,"top","bottom")),_=u!==e.w,C=f!==e.h;return e.w=u,e.h=f,t.horizontal?{same:_,other:C}:{same:C,other:_}}function bme(e){let o=e.maxPadding;function t(n){let i=Math.max(o[n]-e[n],0);return e[n]+=i,i}e.y+=t("top"),e.x+=t("left"),t("right"),t("bottom")}function yme(e,o){let t=o.maxPadding;function n(i){let s={left:0,top:0,right:0,bottom:0};return i.forEach(d=>{s[d]=Math.max(o[d],t[d])}),s}return n(e?["left","right"]:["top","bottom"])}function Rf(e,o,t,n){let i=[],s,d,u,f,_,C;for(s=0,d=e.length,_=0;s{typeof M.beforeLayout=="function"&&M.beforeLayout()});let C=f.reduce((M,D)=>D.box.options&&D.box.options.display===!1?M:M+1,0)||1,x=Object.freeze({outerWidth:o,outerHeight:t,padding:i,availableWidth:s,availableHeight:d,vBoxMaxWidth:s/2/C,hBoxMaxHeight:d/2}),y=Object.assign({},i);t9(y,zr(n));let P=Object.assign({maxPadding:y,w:s,h:d,x:i.left,y:i.top},i),S=Cme(f.concat(_),x);Rf(u.fullSize,P,x,S),Rf(f,P,x,S),Rf(_,P,x,S)&&Rf(f,P,x,S),bme(P),cR(u.leftAndTop,P,x,S),P.x+=P.w,P.y+=P.h,cR(u.rightAndBottom,P,x,S),e.chartArea={left:P.left,top:P.top,right:P.left+P.w,bottom:P.top+P.h,height:P.h,width:P.w},Jo(u.chartArea,M=>{let D=M.box;Object.assign(D,e.chartArea),D.update(P.w,P.h,{left:0,top:0,right:0,bottom:0})})}},mC=class{acquireContext(o,t){}releaseContext(o){return!1}addEventListener(o,t,n){}removeEventListener(o,t,n){}getDevicePixelRatio(){return 1}getMaximumSize(o,t,n,i){return t=Math.max(0,t||o.width),n=n||o.height,{width:t,height:Math.max(0,i?Math.floor(t/i):n)}}isAttached(o){return!0}updateConfig(o){}},uM=class extends mC{acquireContext(o){return o&&o.getContext&&o.getContext("2d")||null}updateConfig(o){o.options.animation=!1}},sC="$chartjs",Sme={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"},pR=e=>e===null||e==="";function wme(e,o){let t=e.style,n=e.getAttribute("height"),i=e.getAttribute("width");if(e[sC]={initial:{height:n,width:i,style:{display:t.display,height:t.height,width:t.width}}},t.display=t.display||"block",t.boxSizing=t.boxSizing||"border-box",pR(i)){let s=W4(e,"width");s!==void 0&&(e.width=s)}if(pR(n))if(e.style.height==="")e.height=e.width/(o||2);else{let s=W4(e,"height");s!==void 0&&(e.height=s)}return e}var i9=UB?{passive:!0}:!1;function Pme(e,o,t){e&&e.addEventListener(o,t,i9)}function Tme(e,o,t){e&&e.canvas&&e.canvas.removeEventListener(o,t,i9)}function Mme(e,o){let t=Sme[e.type]||e.type,{x:n,y:i}=qp(e,o);return{type:t,chart:o,native:e,x:n!==void 0?n:null,y:i!==void 0?i:null}}function dC(e,o){for(let t of e)if(t===o||t.contains(o))return!0}function Dme(e,o,t){let n=e.canvas,i=new MutationObserver(s=>{let d=!1;for(let u of s)d=d||dC(u.addedNodes,n),d=d&&!dC(u.removedNodes,n);d&&t()});return i.observe(document,{childList:!0,subtree:!0}),i}function Eme(e,o,t){let n=e.canvas,i=new MutationObserver(s=>{let d=!1;for(let u of s)d=d||dC(u.removedNodes,n),d=d&&!dC(u.addedNodes,n);d&&t()});return i.observe(document,{childList:!0,subtree:!0}),i}var Lf=new Map,mR=0;function n9(){let e=window.devicePixelRatio;e!==mR&&(mR=e,Lf.forEach((o,t)=>{t.currentDevicePixelRatio!==e&&o()}))}function Ime(e,o){Lf.size||window.addEventListener("resize",n9),Lf.set(e,o)}function Ome(e){Lf.delete(e),Lf.size||window.removeEventListener("resize",n9)}function Ame(e,o,t){let n=e.canvas,i=n&&eC(n);if(!i)return;let s=k4((u,f)=>{let _=i.clientWidth;t(u,f),_{let f=u[0],_=f.contentRect.width,C=f.contentRect.height;_===0&&C===0||s(_,C)});return d.observe(i),Ime(e,s),d}function aM(e,o,t){t&&t.disconnect(),o==="resize"&&Ome(e)}function Fme(e,o,t){let n=e.canvas,i=k4(s=>{e.ctx!==null&&t(Mme(s,e))},e);return Pme(n,o,i),i}var fM=class extends mC{acquireContext(o,t){let n=o&&o.getContext&&o.getContext("2d");return n&&n.canvas===o?(wme(o,t),n):null}releaseContext(o){let t=o.canvas;if(!t[sC])return!1;let n=t[sC].initial;["height","width"].forEach(s=>{let d=n[s];Co(d)?t.removeAttribute(s):t.setAttribute(s,d)});let i=n.style||{};return Object.keys(i).forEach(s=>{t.style[s]=i[s]}),t.width=t.width,delete t[sC],!0}addEventListener(o,t,n){this.removeEventListener(o,t);let i=o.$proxies||(o.$proxies={}),d={attach:Dme,detach:Eme,resize:Ame}[t]||Fme;i[t]=d(o,t,n)}removeEventListener(o,t){let n=o.$proxies||(o.$proxies={}),i=n[t];if(!i)return;({attach:aM,detach:aM,resize:aM}[t]||Tme)(o,t,i),n[t]=void 0}getDevicePixelRatio(){return window.devicePixelRatio}getMaximumSize(o,t,n,i){return $B(o,t,n,i)}isAttached(o){let t=o&&eC(o);return!!(t&&t.isConnected)}};function kme(e){return!Z_()||typeof OffscreenCanvas<"u"&&e instanceof OffscreenCanvas?uM:fM}var Ns=class{static defaults={};static defaultRoutes=void 0;x;y;active=!1;options;$animations;tooltipPosition(o){let{x:t,y:n}=this.getProps(["x","y"],o);return{x:t,y:n}}hasValue(){return Sd(this.x)&&Sd(this.y)}getProps(o,t){let n=this.$animations;if(!t||!n)return this;let i={};return o.forEach(s=>{i[s]=n[s]&&n[s].active()?n[s]._to:this[s]}),i}};function Bme(e,o){let t=e.options.ticks,n=Rme(e),i=Math.min(t.maxTicksLimit||n,n),s=t.major.enabled?Lme(o):[],d=s.length,u=s[0],f=s[d-1],_=[];if(d>i)return Vme(o,_,s,d/i),_;let C=Nme(s,o,i);if(d>0){let x,y,P=d>1?Math.round((f-u)/(d-1)):null;for(nC(o,_,C,Co(P)?0:u-P,u),x=0,y=d-1;xi)return f}return Math.max(i,1)}function Lme(e){let o=[],t,n;for(t=0,n=e.length;te==="left"?"right":e==="right"?"left":e,dR=(e,o,t)=>o==="top"||o==="left"?e[o]+t:e[o]-t,uR=(e,o)=>Math.min(o||e,e);function fR(e,o){let t=[],n=e.length/o,i=e.length,s=0;for(;sd+u)))return f}function Gme(e,o){Jo(e,t=>{let n=t.gc,i=n.length/2,s;if(i>o){for(s=0;sn?n:t,n=i&&t>n?t:n,{min:Sl(t,Sl(n,t)),max:Sl(n,Sl(t,n))}}getPadding(){return{left:this.paddingLeft||0,top:this.paddingTop||0,right:this.paddingRight||0,bottom:this.paddingBottom||0}}getTicks(){return this.ticks}getLabels(){let o=this.chart.data;return this.options.labels||(this.isHorizontal()?o.xLabels:o.yLabels)||o.labels||[]}getLabelItems(o=this.chart.chartArea){return this._labelItems||(this._labelItems=this._computeLabelItems(o))}beforeLayout(){this._cache={},this._dataLimitsCached=!1}beforeUpdate(){oa(this.options.beforeUpdate,[this])}update(o,t,n){let{beginAtZero:i,grace:s,ticks:d}=this.options,u=d.sampleSize;this.beforeUpdate(),this.maxWidth=o,this.maxHeight=t,this._margins=n=Object.assign({left:0,right:0,top:0,bottom:0},n),this.ticks=null,this._labelSizes=null,this._gridLineItems=null,this._labelItems=null,this.beforeSetDimensions(),this.setDimensions(),this.afterSetDimensions(),this._maxLength=this.isHorizontal()?this.width+n.left+n.right:this.height+n.top+n.bottom,this._dataLimitsCached||(this.beforeDataLimits(),this.determineDataLimits(),this.afterDataLimits(),this._range=VB(this,s,i),this._dataLimitsCached=!0),this.beforeBuildTicks(),this.ticks=this.buildTicks()||[],this.afterBuildTicks();let f=u=s||n<=1||!this.isHorizontal()){this.labelRotation=i;return}let C=this._getLabelSizes(),x=C.widest.width,y=C.highest.height,P=_r(this.chart.width-x,0,this.maxWidth);u=o.offset?this.maxWidth/n:P/(n-1),x+6>u&&(u=P/(n-(o.offset?.5:1)),f=this.maxHeight-kf(o.grid)-t.padding-hR(o.title,this.chart.options.font),_=Math.sqrt(x*x+y*y),d=U_(Math.min(Math.asin(_r((C.highest.height+6)/u,-1,1)),Math.asin(_r(f/_,-1,1))-Math.asin(_r(y/_,-1,1)))),d=Math.max(i,Math.min(s,d))),this.labelRotation=d}afterCalculateLabelRotation(){oa(this.options.afterCalculateLabelRotation,[this])}afterAutoSkip(){}beforeFit(){oa(this.options.beforeFit,[this])}fit(){let o={width:0,height:0},{chart:t,options:{ticks:n,title:i,grid:s}}=this,d=this._isVisible(),u=this.isHorizontal();if(d){let f=hR(i,t.options.font);if(u?(o.width=this.maxWidth,o.height=kf(s)+f):(o.height=this.maxHeight,o.width=kf(s)+f),n.display&&this.ticks.length){let{first:_,last:C,widest:x,highest:y}=this._getLabelSizes(),P=n.padding*2,S=ms(this.labelRotation),M=Math.cos(S),D=Math.sin(S);if(u){let k=n.mirror?0:D*x.width+M*y.height;o.height=Math.min(this.maxHeight,o.height+k+P)}else{let k=n.mirror?0:M*x.width+D*y.height;o.width=Math.min(this.maxWidth,o.width+k+P)}this._calculatePadding(_,C,D,M)}}this._handleMargins(),u?(this.width=this._length=t.width-this._margins.left-this._margins.right,this.height=o.height):(this.width=o.width,this.height=this._length=t.height-this._margins.top-this._margins.bottom)}_calculatePadding(o,t,n,i){let{ticks:{align:s,padding:d},position:u}=this.options,f=this.labelRotation!==0,_=u!=="top"&&this.axis==="x";if(this.isHorizontal()){let C=this.getPixelForTick(0)-this.left,x=this.right-this.getPixelForTick(this.ticks.length-1),y=0,P=0;f?_?(y=i*o.width,P=n*t.height):(y=n*o.height,P=i*t.width):s==="start"?P=t.width:s==="end"?y=o.width:s!=="inner"&&(y=o.width/2,P=t.width/2),this.paddingLeft=Math.max((y-C+d)*this.width/(this.width-C),0),this.paddingRight=Math.max((P-x+d)*this.width/(this.width-x),0)}else{let C=t.height/2,x=o.height/2;s==="start"?(C=0,x=o.height):s==="end"&&(C=t.height,x=0),this.paddingTop=C+d,this.paddingBottom=x+d}}_handleMargins(){this._margins&&(this._margins.left=Math.max(this.paddingLeft,this._margins.left),this._margins.top=Math.max(this.paddingTop,this._margins.top),this._margins.right=Math.max(this.paddingRight,this._margins.right),this._margins.bottom=Math.max(this.paddingBottom,this._margins.bottom))}afterFit(){oa(this.options.afterFit,[this])}isHorizontal(){let{axis:o,position:t}=this.options;return t==="top"||t==="bottom"||o==="x"}isFullSize(){return this.options.fullSize}_convertTicksToLabels(o){this.beforeTickToLabelConversion(),this.generateTickLabels(o);let t,n;for(t=0,n=o.length;t({width:d[_e]||0,height:u[_e]||0});return{first:ce(0),last:ce(t-1),widest:ce(ee),highest:ce(ae),widths:d,heights:u}}getLabelForValue(o){return o}getPixelForValue(o,t){return NaN}getValueForPixel(o){}getPixelForTick(o){let t=this.ticks;return o<0||o>t.length-1?null:this.getPixelForValue(t[o].value)}getPixelForDecimal(o){this._reversePixels&&(o=1-o);let t=this._startPixel+o*this._length;return DB(this._alignToPixels?Np(this.chart,t,0):t)}getDecimalForPixel(o){let t=(o-this._startPixel)/this._length;return this._reversePixels?1-t:t}getBasePixel(){return this.getPixelForValue(this.getBaseValue())}getBaseValue(){let{min:o,max:t}=this;return o<0&&t<0?t:o>0&&t>0?o:0}getContext(o){let t=this.ticks||[];if(o>=0&&ou*i?u/n:f/i:f*i0}_computeGridLineItems(o){let t=this.axis,n=this.chart,i=this.options,{grid:s,position:d,border:u}=i,f=s.offset,_=this.isHorizontal(),x=this.ticks.length+(f?1:0),y=kf(s),P=[],S=u.setContext(this.getContext()),M=S.display?S.width:0,D=M/2,k=function(L){return Np(n,L,M)},z,U,J,re,ee,ae,ce,_e,de,j,W,pe;if(d==="top")z=k(this.bottom),ae=this.bottom-y,_e=z-D,j=k(o.top)+D,pe=o.bottom;else if(d==="bottom")z=k(this.top),j=o.top,pe=k(o.bottom)-D,ae=z+D,_e=this.top+y;else if(d==="left")z=k(this.right),ee=this.right-y,ce=z-D,de=k(o.left)+D,W=o.right;else if(d==="right")z=k(this.left),de=o.left,W=k(o.right)-D,ee=z+D,ce=this.left+y;else if(t==="x"){if(d==="center")z=k((o.top+o.bottom)/2+.5);else if(bo(d)){let L=Object.keys(d)[0],N=d[L];z=k(this.chart.scales[L].getPixelForValue(N))}j=o.top,pe=o.bottom,ae=z+D,_e=ae+y}else if(t==="y"){if(d==="center")z=k((o.left+o.right)/2);else if(bo(d)){let L=Object.keys(d)[0],N=d[L];z=k(this.chart.scales[L].getPixelForValue(N))}ee=z-D,ce=ee-y,de=o.left,W=o.right}let O=Kn(i.ticks.maxTicksLimit,x),B=Math.max(1,Math.ceil(x/O));for(U=0;U0&&(K-=te/2);break}be={left:K,top:Oe,width:te+ye.width,height:Ne+ye.height,color:B.backdropColor}}D.push({label:J,font:_e,textOffset:W,options:{rotation:M,color:N,strokeColor:G,strokeWidth:$,textAlign:ne,textBaseline:pe,translation:[re,ee],backdrop:be}})}return D}_getXAxisLabelAlignment(){let{position:o,ticks:t}=this.options;if(-ms(this.labelRotation))return o==="top"?"left":"right";let i="center";return t.align==="start"?i="left":t.align==="end"?i="right":t.align==="inner"&&(i="inner"),i}_getYAxisLabelAlignment(o){let{position:t,ticks:{crossAlign:n,mirror:i,padding:s}}=this.options,d=this._getLabelSizes(),u=o+s,f=d.widest.width,_,C;return t==="left"?i?(C=this.right+s,n==="near"?_="left":n==="center"?(_="center",C+=f/2):(_="right",C+=f)):(C=this.right-u,n==="near"?_="right":n==="center"?(_="center",C-=f/2):(_="left",C=this.left)):t==="right"?i?(C=this.left+s,n==="near"?_="right":n==="center"?(_="center",C-=f/2):(_="left",C-=f)):(C=this.left+u,n==="near"?_="left":n==="center"?(_="center",C+=f/2):(_="right",C=this.right)):_="right",{textAlign:_,x:C}}_computeLabelArea(){if(this.options.ticks.mirror)return;let o=this.chart,t=this.options.position;if(t==="left"||t==="right")return{top:0,left:this.left,bottom:o.height,right:this.right};if(t==="top"||t==="bottom")return{top:this.top,left:0,bottom:this.bottom,right:o.width}}drawBackground(){let{ctx:o,options:{backgroundColor:t},left:n,top:i,width:s,height:d}=this;t&&(o.save(),o.fillStyle=t,o.fillRect(n,i,s,d),o.restore())}getLineWidthForValue(o){let t=this.options.grid;if(!this._isVisible()||!t.display)return 0;let i=this.ticks.findIndex(s=>s.value===o);return i>=0?t.setContext(this.getContext(i)).lineWidth:0}drawGrid(o){let t=this.options.grid,n=this.ctx,i=this._gridLineItems||(this._gridLineItems=this._computeGridLineItems(o)),s,d,u=(f,_,C)=>{!C.width||!C.color||(n.save(),n.lineWidth=C.width,n.strokeStyle=C.color,n.setLineDash(C.borderDash||[]),n.lineDashOffset=C.borderDashOffset,n.beginPath(),n.moveTo(f.x,f.y),n.lineTo(_.x,_.y),n.stroke(),n.restore())};if(t.display)for(s=0,d=i.length;s{this.draw(s)}}]:[{z:n,draw:s=>{this.drawBackground(),this.drawGrid(s),this.drawTitle()}},{z:i,draw:()=>{this.drawBorder()}},{z:t,draw:s=>{this.drawLabels(s)}}]}getMatchingVisibleMetas(o){let t=this.chart.getSortedVisibleDatasetMetas(),n=this.axis+"AxisID",i=[],s,d;for(s=0,d=t.length;s{let n=t.split("."),i=n.pop(),s=[e].concat(n).join("."),d=o[t].split("."),u=d.pop(),f=d.join(".");ba.route(s,i,f,u)})}function Jme(e){return"id"in e&&"defaults"in e}var hM=class{constructor(){this.controllers=new Y0(Hp,"datasets",!0),this.elements=new Y0(Ns,"elements"),this.plugins=new Y0(Object,"plugins"),this.scales=new Y0(Md,"scales"),this._typedRegistries=[this.controllers,this.scales,this.elements]}add(...o){this._each("register",o)}remove(...o){this._each("unregister",o)}addControllers(...o){this._each("register",o,this.controllers)}addElements(...o){this._each("register",o,this.elements)}addPlugins(...o){this._each("register",o,this.plugins)}addScales(...o){this._each("register",o,this.scales)}getController(o){return this._get(o,this.controllers,"controller")}getElement(o){return this._get(o,this.elements,"element")}getPlugin(o){return this._get(o,this.plugins,"plugin")}getScale(o){return this._get(o,this.scales,"scale")}removeControllers(...o){this._each("unregister",o,this.controllers)}removeElements(...o){this._each("unregister",o,this.elements)}removePlugins(...o){this._each("unregister",o,this.plugins)}removeScales(...o){this._each("unregister",o,this.scales)}_each(o,t,n){[...t].forEach(i=>{let s=n||this._getRegistryForType(i);n||s.isForType(i)||s===this.plugins&&i.id?this._exec(o,s,i):Jo(i,d=>{let u=n||this._getRegistryForType(d);this._exec(o,u,d)})})}_exec(o,t,n){let i=$_(o);oa(n["before"+i],[],n),t[o](n),oa(n["after"+i],[],n)}_getRegistryForType(o){for(let t=0;ts.filter(u=>!d.some(f=>u.plugin.id===f.plugin.id));this._notify(i(t,n),o,"stop"),this._notify(i(n,t),o,"start")}};function Kme(e){let o={},t=[],n=Object.keys(fc.plugins.items);for(let s=0;s1&&gR(e[0].toLowerCase());if(n)return n}throw new Error(`Cannot determine type of '${e}' axis. Please provide 'axis' or 'position' option.`)}function _R(e,o,t){if(t[o+"AxisID"]===e)return{axis:o}}function ode(e,o){if(o.data&&o.data.datasets){let t=o.data.datasets.filter(n=>n.xAxisID===e||n.yAxisID===e);if(t.length)return _R(e,"x",t[0])||_R(e,"y",t[0])}return{}}function ade(e,o){let t=Rp[e.type]||{scales:{}},n=o.scales||{},i=_M(e.type,o),s=Object.create(null);return Object.keys(n).forEach(d=>{let u=n[d];if(!bo(u))return console.error(`Invalid scale configuration for scale: ${d}`);if(u._proxy)return console.warn(`Ignoring resolver passed as options for scale: ${d}`);let f=CM(d,u,ode(d,e),ba.scales[u.type]),_=ide(f,i),C=t.scales||{};s[d]=z0(Object.create(null),[{axis:f},u,C[f],C[_]])}),e.data.datasets.forEach(d=>{let u=d.type||e.type,f=d.indexAxis||_M(u,o),C=(Rp[u]||{}).scales||{};Object.keys(C).forEach(x=>{let y=tde(x,f),P=d[y+"AxisID"]||y;s[P]=s[P]||Object.create(null),z0(s[P],[{axis:y},n[P],C[x]])})}),Object.keys(s).forEach(d=>{let u=s[d];z0(u,[ba.scales[u.type],ba.scale])}),s}function o9(e){let o=e.options||(e.options={});o.plugins=Kn(o.plugins,{}),o.scales=ade(e,o)}function a9(e){return e=e||{},e.datasets=e.datasets||[],e.labels=e.labels||[],e}function rde(e){return e=e||{},e.data=a9(e.data),o9(e),e}var CR=new Map,r9=new Set;function oC(e,o){let t=CR.get(e);return t||(t=o(),CR.set(e,t),r9.add(t)),t}var Bf=(e,o,t)=>{let n=Gc(o,t);n!==void 0&&e.add(n)},vM=class{constructor(o){this._config=rde(o),this._scopeCache=new Map,this._resolverCache=new Map}get platform(){return this._config.platform}get type(){return this._config.type}set type(o){this._config.type=o}get data(){return this._config.data}set data(o){this._config.data=a9(o)}get options(){return this._config.options}set options(o){this._config.options=o}get plugins(){return this._config.plugins}update(){let o=this._config;this.clearCache(),o9(o)}clearCache(){this._scopeCache.clear(),this._resolverCache.clear()}datasetScopeKeys(o){return oC(o,()=>[[`datasets.${o}`,""]])}datasetAnimationScopeKeys(o,t){return oC(`${o}.transition.${t}`,()=>[[`datasets.${o}.transitions.${t}`,`transitions.${t}`],[`datasets.${o}`,""]])}datasetElementScopeKeys(o,t){return oC(`${o}-${t}`,()=>[[`datasets.${o}.elements.${t}`,`datasets.${o}`,`elements.${t}`,""]])}pluginScopeKeys(o){let t=o.id,n=this.type;return oC(`${n}-plugin-${t}`,()=>[[`plugins.${t}`,...o.additionalOptionScopes||[]]])}_cachedScopes(o,t){let n=this._scopeCache,i=n.get(o);return(!i||t)&&(i=new Map,n.set(o,i)),i}getOptionScopes(o,t,n){let{options:i,type:s}=this,d=this._cachedScopes(o,n),u=d.get(t);if(u)return u;let f=new Set;t.forEach(C=>{o&&(f.add(o),C.forEach(x=>Bf(f,o,x))),C.forEach(x=>Bf(f,i,x)),C.forEach(x=>Bf(f,Rp[s]||{},x)),C.forEach(x=>Bf(f,ba,x)),C.forEach(x=>Bf(f,Y_,x))});let _=Array.from(f);return _.length===0&&_.push(Object.create(null)),r9.has(t)&&d.set(t,_),_}chartOptionScopes(){let{options:o,type:t}=this;return[o,Rp[t]||{},ba.datasets[t]||{},{type:t},ba,Y_]}resolveNamedOptions(o,t,n,i=[""]){let s={$shared:!0},{resolver:d,subPrefixes:u}=vR(this._resolverCache,o,i),f=d;if(sde(d,t)){s.$shared=!1,n=zc(n)?n():n;let _=this.createResolver(o,n,u);f=yd(d,n,_)}for(let _ of t)s[_]=f[_];return s}createResolver(o,t,n=[""],i){let{resolver:s}=vR(this._resolverCache,o,n);return bo(t)?yd(s,t,void 0,i):s}};function vR(e,o,t){let n=e.get(o);n||(n=new Map,e.set(o,n));let i=t.join(),s=n.get(i);return s||(s={resolver:X_(o,t),subPrefixes:t.filter(u=>!u.toLowerCase().includes("hover"))},n.set(i,s)),s}var lde=e=>bo(e)&&Object.getOwnPropertyNames(e).some(o=>zc(e[o]));function sde(e,o){let{isScriptable:t,isIndexable:n}=H4(e);for(let i of o){let s=t(i),d=n(i),u=(d||s)&&e[i];if(s&&(zc(u)||lde(u))||d&&ga(u))return!0}return!1}var cde="4.5.1",pde=["top","bottom","left","right","chartArea"];function xR(e,o){return e==="top"||e==="bottom"||pde.indexOf(e)===-1&&o==="x"}function bR(e,o){return function(t,n){return t[e]===n[e]?t[o]-n[o]:t[e]-n[e]}}function yR(e){let o=e.chart,t=o.options.animation;o.notifyPlugins("afterRender"),oa(t&&t.onComplete,[e],o)}function mde(e){let o=e.chart,t=o.options.animation;oa(t&&t.onProgress,[e],o)}function l9(e){return Z_()&&typeof e=="string"?e=document.getElementById(e):e&&e.length&&(e=e[0]),e&&e.canvas&&(e=e.canvas),e}var cC={},SR=e=>{let o=l9(e);return Object.values(cC).filter(t=>t.canvas===o).pop()};function dde(e,o,t){let n=Object.keys(e);for(let i of n){let s=+i;if(s>=o){let d=e[i];delete e[i],(t>0||s>o)&&(e[s+t]=d)}}}function ude(e,o,t,n){return!t||e.type==="mouseout"?null:n?o:e}var Tl=(()=>{class e{static defaults=ba;static instances=cC;static overrides=Rp;static registry=fc;static version=cde;static getChart=SR;static register(...t){fc.add(...t),wR()}static unregister(...t){fc.remove(...t),wR()}constructor(t,n){let i=this.config=new vM(n),s=l9(t),d=SR(s);if(d)throw new Error("Canvas is already in use. Chart with ID '"+d.id+"' must be destroyed before the canvas with ID '"+d.canvas.id+"' can be reused.");let u=i.createResolver(i.chartOptionScopes(),this.getContext());this.platform=new(i.platform||kme(s)),this.platform.updateConfig(i);let f=this.platform.acquireContext(s,u.aspectRatio),_=f&&f.canvas,C=_&&_.height,x=_&&_.width;if(this.id=yB(),this.ctx=f,this.canvas=_,this.width=x,this.height=C,this._options=u,this._aspectRatio=this.aspectRatio,this._layers=[],this._metasets=[],this._stacks=void 0,this.boxes=[],this.currentDevicePixelRatio=void 0,this.chartArea=void 0,this._active=[],this._lastEvent=void 0,this._listeners={},this._responsiveListeners=void 0,this._sortedMetasets=[],this.scales={},this._plugins=new gM,this.$proxies={},this._hiddenIndices={},this.attached=!1,this._animationsDisabled=void 0,this.$context=void 0,this._doResize=FB(y=>this.update(y),u.resizeDelay||0),this._dataChanges=[],cC[this.id]=this,!f||!_){console.error("Failed to create chart: can't acquire context from the given item");return}$c.listen(this,"complete",yR),$c.listen(this,"progress",mde),this._initialize(),this.attached&&this.update()}get aspectRatio(){let{options:{aspectRatio:t,maintainAspectRatio:n},width:i,height:s,_aspectRatio:d}=this;return Co(t)?n&&d?d:s?i/s:null:t}get data(){return this.config.data}set data(t){this.config.data=t}get options(){return this._options}set options(t){this.config.options=t}get registry(){return fc}_initialize(){return this.notifyPlugins("beforeInit"),this.options.responsive?this.resize():U4(this,this.options.devicePixelRatio),this.bindEvents(),this.notifyPlugins("afterInit"),this}clear(){return V4(this.canvas,this.ctx),this}stop(){return $c.stop(this),this}resize(t,n){$c.running(this)?this._resizeBeforeDraw={width:t,height:n}:this._resize(t,n)}_resize(t,n){let i=this.options,s=this.canvas,d=i.maintainAspectRatio&&this.aspectRatio,u=this.platform.getMaximumSize(s,t,n,d),f=i.devicePixelRatio||this.platform.getDevicePixelRatio(),_=this.width?"resize":"attach";this.width=u.width,this.height=u.height,this._aspectRatio=this.aspectRatio,U4(this,f,!0)&&(this.notifyPlugins("resize",{size:u}),oa(i.onResize,[this,u],this),this.attached&&this._doResize(_)&&this.render())}ensureScalesHaveIDs(){let n=this.options.scales||{};Jo(n,(i,s)=>{i.id=s})}buildOrUpdateScales(){let t=this.options,n=t.scales,i=this.scales,s=Object.keys(i).reduce((u,f)=>(u[f]=!1,u),{}),d=[];n&&(d=d.concat(Object.keys(n).map(u=>{let f=n[u],_=CM(u,f),C=_==="r",x=_==="x";return{options:f,dposition:C?"chartArea":x?"bottom":"left",dtype:C?"radialLinear":x?"category":"linear"}}))),Jo(d,u=>{let f=u.options,_=f.id,C=CM(_,f),x=Kn(f.type,u.dtype);(f.position===void 0||xR(f.position,C)!==xR(u.dposition))&&(f.position=u.dposition),s[_]=!0;let y=null;if(_ in i&&i[_].type===x)y=i[_];else{let P=fc.getScale(x);y=new P({id:_,type:x,ctx:this.ctx,chart:this}),i[y.id]=y}y.init(f,t)}),Jo(s,(u,f)=>{u||delete i[f]}),Jo(i,u=>{Kr.configure(this,u,u.options),Kr.addBox(this,u)})}_updateMetasets(){let t=this._metasets,n=this.data.datasets.length,i=t.length;if(t.sort((s,d)=>s.index-d.index),i>n){for(let s=n;sn.length&&delete this._stacks,t.forEach((i,s)=>{n.filter(d=>d===i._dataset).length===0&&this._destroyDatasetMeta(s)})}buildOrUpdateControllers(){let t=[],n=this.data.datasets,i,s;for(this._removeUnreferencedMetasets(),i=0,s=n.length;i{this.getDatasetMeta(n).controller.reset()},this)}reset(){this._resetElements(),this.notifyPlugins("reset")}update(t){let n=this.config;n.update();let i=this._options=n.createResolver(n.chartOptionScopes(),this.getContext()),s=this._animationsDisabled=!i.animation;if(this._updateScales(),this._checkEventBindings(),this._updateHiddenIndices(),this._plugins.invalidate(),this.notifyPlugins("beforeUpdate",{mode:t,cancelable:!0})===!1)return;let d=this.buildOrUpdateControllers();this.notifyPlugins("beforeElementsUpdate");let u=0;for(let C=0,x=this.data.datasets.length;C{C.reset()}),this._updateDatasets(t),this.notifyPlugins("afterUpdate",{mode:t}),this._layers.sort(bR("z","_idx"));let{_active:f,_lastEvent:_}=this;_?this._eventHandler(_,!0):f.length&&this._updateHoverStyles(f,f,!0),this.render()}_updateScales(){Jo(this.scales,t=>{Kr.removeBox(this,t)}),this.ensureScalesHaveIDs(),this.buildOrUpdateScales()}_checkEventBindings(){let t=this.options,n=new Set(Object.keys(this._listeners)),i=new Set(t.events);(!T4(n,i)||!!this._responsiveListeners!==t.responsive)&&(this.unbindEvents(),this.bindEvents())}_updateHiddenIndices(){let{_hiddenIndices:t}=this,n=this._getUniformDataChanges()||[];for(let{method:i,start:s,count:d}of n){let u=i==="_removeElements"?-d:d;dde(t,s,u)}}_getUniformDataChanges(){let t=this._dataChanges;if(!t||!t.length)return;this._dataChanges=[];let n=this.data.datasets.length,i=d=>new Set(t.filter(u=>u[0]===d).map((u,f)=>f+","+u.splice(1).join(","))),s=i(0);for(let d=1;dd.split(",")).map(d=>({method:d[1],start:+d[2],count:+d[3]}))}_updateLayout(t){if(this.notifyPlugins("beforeLayout",{cancelable:!0})===!1)return;Kr.update(this,this.width,this.height,t);let n=this.chartArea,i=n.width<=0||n.height<=0;this._layers=[],Jo(this.boxes,s=>{i&&s.position==="chartArea"||(s.configure&&s.configure(),this._layers.push(...s._layers()))},this),this._layers.forEach((s,d)=>{s._idx=d}),this.notifyPlugins("afterLayout")}_updateDatasets(t){if(this.notifyPlugins("beforeDatasetsUpdate",{mode:t,cancelable:!0})!==!1){for(let n=0,i=this.data.datasets.length;n=0;--n)this._drawDataset(t[n]);this.notifyPlugins("afterDatasetsDraw")}_drawDataset(t){let n=this.ctx,i={meta:t,index:t.index,cancelable:!0},s=X4(this,t);this.notifyPlugins("beforeDatasetDraw",i)!==!1&&(s&&Ef(n,s),t.controller.draw(),s&&If(n),i.cancelable=!1,this.notifyPlugins("afterDatasetDraw",i))}isPointInArea(t){return pc(t,this.chartArea,this._minPadding)}getElementsAtEventForMode(t,n,i,s){let d=hme.modes[n];return typeof d=="function"?d(this,t,i,s):[]}getDatasetMeta(t){let n=this.data.datasets[t],i=this._metasets,s=i.filter(d=>d&&d._dataset===n).pop();return s||(s={type:null,data:[],dataset:null,controller:null,hidden:null,xAxisID:null,yAxisID:null,order:n&&n.order||0,index:t,_dataset:n,_parsed:[],_sorted:!1},i.push(s)),s}getContext(){return this.$context||(this.$context=jc(null,{chart:this,type:"chart"}))}getVisibleDatasetCount(){return this.getSortedVisibleDatasetMetas().length}isDatasetVisible(t){let n=this.data.datasets[t];if(!n)return!1;let i=this.getDatasetMeta(t);return typeof i.hidden=="boolean"?!i.hidden:!n.hidden}setDatasetVisibility(t,n){let i=this.getDatasetMeta(t);i.hidden=!n}toggleDataVisibility(t){this._hiddenIndices[t]=!this._hiddenIndices[t]}getDataVisibility(t){return!this._hiddenIndices[t]}_updateVisibility(t,n,i){let s=i?"show":"hide",d=this.getDatasetMeta(t),u=d.controller._resolveAnimations(void 0,s);H0(n)?(d.data[n].hidden=!i,this.update()):(this.setDatasetVisibility(t,i),u.update(d,{visible:i}),this.update(f=>f.datasetIndex===t?s:void 0))}hide(t,n){this._updateVisibility(t,n,!1)}show(t,n){this._updateVisibility(t,n,!0)}_destroyDatasetMeta(t){let n=this._metasets[t];n&&n.controller&&n.controller._destroy(),delete this._metasets[t]}_stop(){let t,n;for(this.stop(),$c.remove(this),t=0,n=this.data.datasets.length;t{n.addEventListener(this,d,u),t[d]=u},s=(d,u,f)=>{d.offsetX=u,d.offsetY=f,this._eventHandler(d)};Jo(this.options.events,d=>i(d,s))}bindResponsiveEvents(){this._responsiveListeners||(this._responsiveListeners={});let t=this._responsiveListeners,n=this.platform,i=(_,C)=>{n.addEventListener(this,_,C),t[_]=C},s=(_,C)=>{t[_]&&(n.removeEventListener(this,_,C),delete t[_])},d=(_,C)=>{this.canvas&&this.resize(_,C)},u,f=()=>{s("attach",f),this.attached=!0,this.resize(),i("resize",d),i("detach",u)};u=()=>{this.attached=!1,s("resize",d),this._stop(),this._resize(0,0),i("attach",f)},n.isAttached(this.canvas)?f():u()}unbindEvents(){Jo(this._listeners,(t,n)=>{this.platform.removeEventListener(this,n,t)}),this._listeners={},Jo(this._responsiveListeners,(t,n)=>{this.platform.removeEventListener(this,n,t)}),this._responsiveListeners=void 0}updateHoverStyle(t,n,i){let s=i?"set":"remove",d,u,f,_;for(n==="dataset"&&(d=this.getDatasetMeta(t[0].datasetIndex),d.controller["_"+s+"DatasetHoverStyle"]()),f=0,_=t.length;f<_;++f){u=t[f];let C=u&&this.getDatasetMeta(u.datasetIndex).controller;C&&C[s+"HoverStyle"](u.element,u.datasetIndex,u.index)}}getActiveElements(){return this._active||[]}setActiveElements(t){let n=this._active||[],i=t.map(({datasetIndex:d,index:u})=>{let f=this.getDatasetMeta(d);if(!f)throw new Error("No dataset found at index "+d);return{datasetIndex:d,element:f.data[u],index:u}});!Mf(i,n)&&(this._active=i,this._lastEvent=null,this._updateHoverStyles(i,n))}notifyPlugins(t,n,i){return this._plugins.notify(this,t,n,i)}isPluginEnabled(t){return this._plugins._cache.filter(n=>n.plugin.id===t).length===1}_updateHoverStyles(t,n,i){let s=this.options.hover,d=(_,C)=>_.filter(x=>!C.some(y=>x.datasetIndex===y.datasetIndex&&x.index===y.index)),u=d(n,t),f=i?t:d(t,n);u.length&&this.updateHoverStyle(u,s.mode,!1),f.length&&s.mode&&this.updateHoverStyle(f,s.mode,!0)}_eventHandler(t,n){let i={event:t,replay:n,cancelable:!0,inChartArea:this.isPointInArea(t)},s=u=>(u.options.events||this.options.events).includes(t.native.type);if(this.notifyPlugins("beforeEvent",i,s)===!1)return;let d=this._handleEvent(t,n,i.inChartArea);return i.cancelable=!1,this.notifyPlugins("afterEvent",i,s),(d||i.changed)&&this.render(),this}_handleEvent(t,n,i){let{_active:s=[],options:d}=this,u=n,f=this._getActiveElements(t,s,i,u),_=PB(t),C=ude(t,this._lastEvent,i,_);i&&(this._lastEvent=null,oa(d.onHover,[t,f,this],this),_&&oa(d.onClick,[t,f,this],this));let x=!Mf(f,s);return(x||n)&&(this._active=f,this._updateHoverStyles(f,s,n)),this._lastEvent=C,x}_getActiveElements(t,n,i,s){if(t.type==="mouseout")return[];if(!i)return n;let d=this.options.hover;return this.getElementsAtEventForMode(t,d.mode,d,s)}}return e})();function wR(){return Jo(Tl.instances,e=>e._plugins.invalidate())}function fde(e,o,t){let{startAngle:n,x:i,y:s,outerRadius:d,innerRadius:u,options:f}=o,{borderWidth:_,borderJoinStyle:C}=f,x=Math.min(_/d,Vr(n-t));if(e.beginPath(),e.arc(i,s,d-_/2,n+x/2,t-x/2),u>0){let y=Math.min(_/u,Vr(n-t));e.arc(i,s,u+_/2,t-y/2,n+y/2,!0)}else{let y=Math.min(_/2,d*Vr(n-t));if(C==="round")e.arc(i,s,y,t-Bo/2,n+Bo/2,!0);else if(C==="bevel"){let P=2*y*y,S=-P*Math.cos(t+Bo/2)+i,M=-P*Math.sin(t+Bo/2)+s,D=P*Math.cos(n+Bo/2)+i,k=P*Math.sin(n+Bo/2)+s;e.lineTo(S,M),e.lineTo(D,k)}}e.closePath(),e.moveTo(0,0),e.rect(0,0,e.canvas.width,e.canvas.height),e.clip("evenodd")}function hde(e,o,t){let{startAngle:n,pixelMargin:i,x:s,y:d,outerRadius:u,innerRadius:f}=o,_=i/u;e.beginPath(),e.arc(s,d,u,n-_,t+_),f>i?(_=i/f,e.arc(s,d,f,t+_,n-_,!0)):e.arc(s,d,i,t+Ha,n-Ha),e.closePath(),e.clip()}function gde(e){return K_(e,["outerStart","outerEnd","innerStart","innerEnd"])}function _de(e,o,t,n){let i=gde(e.options.borderRadius),s=(t-o)/2,d=Math.min(s,n*o/2),u=f=>{let _=(t-Math.min(s,f))*n/2;return _r(f,0,Math.min(s,_))};return{outerStart:u(i.outerStart),outerEnd:u(i.outerEnd),innerStart:_r(i.innerStart,0,d),innerEnd:_r(i.innerEnd,0,d)}}function Q0(e,o,t,n){return{x:t+e*Math.cos(o),y:n+e*Math.sin(o)}}function uC(e,o,t,n,i,s){let{x:d,y:u,startAngle:f,pixelMargin:_,innerRadius:C}=o,x=Math.max(o.outerRadius+n+t-_,0),y=C>0?C+n+t+_:0,P=0,S=i-f;if(n){let B=C>0?C-n:0,L=x>0?x-n:0,N=(B+L)/2,G=N!==0?S*N/(N+n):S;P=(S-G)/2}let M=Math.max(.001,S*x-t/Bo)/x,D=(S-M)/2,k=f+D+P,z=i-D-P,{outerStart:U,outerEnd:J,innerStart:re,innerEnd:ee}=_de(o,y,x,z-k),ae=x-U,ce=x-J,_e=k+U/ae,de=z-J/ce,j=y+re,W=y+ee,pe=k+re/j,O=z-ee/W;if(e.beginPath(),s){let B=(_e+de)/2;if(e.arc(d,u,x,_e,B),e.arc(d,u,x,B,de),J>0){let $=Q0(ce,de,d,u);e.arc($.x,$.y,J,de,z+Ha)}let L=Q0(W,z,d,u);if(e.lineTo(L.x,L.y),ee>0){let $=Q0(W,O,d,u);e.arc($.x,$.y,ee,z+Ha,O+Math.PI)}let N=(z-ee/y+(k+re/y))/2;if(e.arc(d,u,y,z-ee/y,N,!0),e.arc(d,u,y,N,k+re/y,!0),re>0){let $=Q0(j,pe,d,u);e.arc($.x,$.y,re,pe+Math.PI,k-Ha)}let G=Q0(ae,k,d,u);if(e.lineTo(G.x,G.y),U>0){let $=Q0(ae,_e,d,u);e.arc($.x,$.y,U,k-Ha,_e)}}else{e.moveTo(d,u);let B=Math.cos(_e)*x+d,L=Math.sin(_e)*x+u;e.lineTo(B,L);let N=Math.cos(de)*x+d,G=Math.sin(de)*x+u;e.lineTo(N,G)}e.closePath()}function Cde(e,o,t,n,i){let{fullCircles:s,startAngle:d,circumference:u}=o,f=o.endAngle;if(s){uC(e,o,t,n,f,i);for(let _=0;_=Bo&&P===0&&C!=="miter"&&fde(e,o,M),s||(uC(e,o,t,n,M,i),e.stroke())}var xM=class extends Ns{static id="arc";static defaults={borderAlign:"center",borderColor:"#fff",borderDash:[],borderDashOffset:0,borderJoinStyle:void 0,borderRadius:0,borderWidth:2,offset:0,spacing:0,angle:void 0,circular:!0,selfJoin:!1};static defaultRoutes={backgroundColor:"backgroundColor"};static descriptors={_scriptable:!0,_indexable:o=>o!=="borderDash"};circumference;endAngle;fullCircles;innerRadius;outerRadius;pixelMargin;startAngle;constructor(o){super(),this.options=void 0,this.circumference=void 0,this.startAngle=void 0,this.endAngle=void 0,this.innerRadius=void 0,this.outerRadius=void 0,this.pixelMargin=0,this.fullCircles=0,o&&Object.assign(this,o)}inRange(o,t,n){let i=this.getProps(["x","y"],n),{angle:s,distance:d}=I4(i,{x:o,y:t}),{startAngle:u,endAngle:f,innerRadius:_,outerRadius:C,circumference:x}=this.getProps(["startAngle","endAngle","innerRadius","outerRadius","circumference"],n),y=(this.options.spacing+this.options.borderWidth)/2,P=Kn(x,f-u),S=j0(s,u,f)&&u!==f,M=P>=_a||S,D=dc(d,_+y,C+y);return M&&D}getCenterPoint(o){let{x:t,y:n,startAngle:i,endAngle:s,innerRadius:d,outerRadius:u}=this.getProps(["x","y","startAngle","endAngle","innerRadius","outerRadius"],o),{offset:f,spacing:_}=this.options,C=(i+s)/2,x=(d+u+_+f)/2;return{x:t+Math.cos(C)*x,y:n+Math.sin(C)*x}}tooltipPosition(o){return this.getCenterPoint(o)}draw(o){let{options:t,circumference:n}=this,i=(t.offset||0)/4,s=(t.spacing||0)/2,d=t.circular;if(this.pixelMargin=t.borderAlign==="inner"?.33:0,this.fullCircles=n>_a?Math.floor(n/_a):0,n===0||this.innerRadius<0||this.outerRadius<0)return;o.save();let u=(this.startAngle+this.endAngle)/2;o.translate(Math.cos(u)*i,Math.sin(u)*i);let f=1-Math.sin(Math.min(Bo,n||0)),_=i*f;o.fillStyle=t.backgroundColor,o.strokeStyle=t.borderColor,Cde(o,this,_,s,d),vde(o,this,_,s,d),o.restore()}};function s9(e,o,t=o){e.lineCap=Kn(t.borderCapStyle,o.borderCapStyle),e.setLineDash(Kn(t.borderDash,o.borderDash)),e.lineDashOffset=Kn(t.borderDashOffset,o.borderDashOffset),e.lineJoin=Kn(t.borderJoinStyle,o.borderJoinStyle),e.lineWidth=Kn(t.borderWidth,o.borderWidth),e.strokeStyle=Kn(t.borderColor,o.borderColor)}function xde(e,o,t){e.lineTo(t.x,t.y)}function bde(e){return e.stepped?NB:e.tension||e.cubicInterpolationMode==="monotone"?LB:xde}function c9(e,o,t={}){let n=e.length,{start:i=0,end:s=n-1}=t,{start:d,end:u}=o,f=Math.max(i,d),_=Math.min(s,u),C=iu&&s>u;return{count:n,start:f,loop:o.loop,ilen:_(d+(_?u-J:J))%s,U=()=>{M!==D&&(e.lineTo(C,D),e.lineTo(C,M),e.lineTo(C,k))};for(f&&(P=i[z(0)],e.moveTo(P.x,P.y)),y=0;y<=u;++y){if(P=i[z(y)],P.skip)continue;let J=P.x,re=P.y,ee=J|0;ee===S?(reD&&(D=re),C=(x*C+J)/++x):(U(),e.lineTo(J,re),S=ee,x=0,M=D=re),k=re}U()}function bM(e){let o=e.options,t=o.borderDash&&o.borderDash.length;return!e._decimated&&!e._loop&&!o.tension&&o.cubicInterpolationMode!=="monotone"&&!o.stepped&&!t?Sde:yde}function wde(e){return e.stepped?WB:e.tension||e.cubicInterpolationMode==="monotone"?QB:kp}function Pde(e,o,t,n){let i=o._path;i||(i=o._path=new Path2D,o.path(i,t,n)&&i.closePath()),s9(e,o.options),e.stroke(i)}function Tde(e,o,t,n){let{segments:i,options:s}=o,d=bM(o);for(let u of i)s9(e,s,u.style),e.beginPath(),d(e,o,u,{start:t,end:t+n-1})&&e.closePath(),e.stroke()}var Mde=typeof Path2D=="function";function Dde(e,o,t,n){Mde&&!o.options.segment?Pde(e,o,t,n):Tde(e,o,t,n)}var gC=(()=>{class e extends Ns{static id="line";static defaults={borderCapStyle:"butt",borderDash:[],borderDashOffset:0,borderJoinStyle:"miter",borderWidth:3,capBezierPoints:!0,cubicInterpolationMode:"default",fill:!1,spanGaps:!1,stepped:!1,tension:0};static defaultRoutes={backgroundColor:"backgroundColor",borderColor:"borderColor"};static descriptors={_scriptable:!0,_indexable:t=>t!=="borderDash"&&t!=="fill"};constructor(t){super(),this.animated=!0,this.options=void 0,this._chart=void 0,this._loop=void 0,this._fullLoop=void 0,this._path=void 0,this._points=void 0,this._segments=void 0,this._decimated=!1,this._pointsUpdated=!1,this._datasetIndex=void 0,t&&Object.assign(this,t)}updateControlPoints(t,n){let i=this.options;if((i.tension||i.cubicInterpolationMode==="monotone")&&!i.stepped&&!this._pointsUpdated){let s=i.spanGaps?this._loop:this._fullLoop;jB(this._points,i,t,s,n),this._pointsUpdated=!0}}set points(t){this._points=t,delete this._segments,delete this._path,this._pointsUpdated=!1}get points(){return this._points}get segments(){return this._segments||(this._segments=JB(this,this.options.segment))}first(){let t=this.segments,n=this.points;return t.length&&n[t[0].start]}last(){let t=this.segments,n=this.points,i=t.length;return i&&n[t[i-1].end]}interpolate(t,n){let i=this.options,s=t[n],d=this.points,u=K4(this,{property:n,start:s,end:s});if(!u.length)return;let f=[],_=wde(i),C,x;for(C=0,x=u.length;C{class e extends Ns{static id="point";parsed;skip;stop;static defaults={borderWidth:1,hitRadius:1,hoverBorderWidth:1,hoverRadius:4,pointStyle:"circle",radius:3,rotation:0};static defaultRoutes={backgroundColor:"backgroundColor",borderColor:"borderColor"};constructor(t){super(),this.options=void 0,this.parsed=void 0,this.skip=void 0,this.stop=void 0,t&&Object.assign(this,t)}inRange(t,n,i){let s=this.options,{x:d,y:u}=this.getProps(["x","y"],i);return Math.pow(t-d,2)+Math.pow(n-u,2)e.replace("rgb(","rgba(").replace(")",", 0.5)"));function m9(e){return SM[e%SM.length]}function d9(e){return TR[e%TR.length]}function Rde(e,o){return e.borderColor=m9(o),e.backgroundColor=d9(o),++o}function Nde(e,o){return e.backgroundColor=e.data.map(()=>m9(o++)),o}function Lde(e,o){return e.backgroundColor=e.data.map(()=>d9(o++)),o}function Vde(e){let o=0;return(t,n)=>{let i=e.getDatasetMeta(n).controller;i instanceof OM?o=Nde(t,o):i instanceof ZR?o=Lde(t,o):i&&(o=Rde(t,o))}}function MR(e){let o;for(o in e)if(e[o].borderColor||e[o].backgroundColor)return!0;return!1}function qde(e){return e&&(e.borderColor||e.backgroundColor)}function zde(){return ba.borderColor!=="rgba(0,0,0,0.1)"||ba.backgroundColor!=="rgba(0,0,0,0.1)"}var Hde={id:"colors",defaults:{enabled:!0,forceOverride:!1},beforeLayout(e,o,t){if(!t.enabled)return;let{data:{datasets:n},options:i}=e.config,{elements:s}=i,d=MR(n)||qde(i)||s&&MR(s)||zde();if(!t.forceOverride&&d)return;let u=Vde(e);n.forEach(u)}};function Gde(e,o,t,n,i){let s=i.samples||n;if(s>=t)return e.slice(o,o+t);let d=[],u=(t-2)/(s-2),f=0,_=o+t-1,C=o,x,y,P,S,M;for(d[f++]=e[C],x=0;xP&&(P=S,y=e[z],M=z);d[f++]=y,C=M}return d[f++]=e[_],d}function jde(e,o,t,n){let i=0,s=0,d,u,f,_,C,x,y,P,S,M,D=[],k=o+t-1,z=e[o].x,J=e[k].x-z;for(d=o;dM&&(M=_,y=d),i=(s*i+u.x)/++s;else{let ee=d-1;if(!Co(x)&&!Co(y)){let ae=Math.min(x,y),ce=Math.max(x,y);ae!==P&&ae!==ee&&D.push(qt(at({},e[ae]),{x:i})),ce!==P&&ce!==ee&&D.push(qt(at({},e[ce]),{x:i}))}d>0&&ee!==P&&D.push(e[ee]),D.push(u),C=re,s=0,S=M=_,x=y=P=d}}return D}function u9(e){if(e._decimated){let o=e._data;delete e._decimated,delete e._data,Object.defineProperty(e,"data",{configurable:!0,enumerable:!0,writable:!0,value:o})}}function DR(e){e.data.datasets.forEach(o=>{u9(o)})}function $de(e,o){let t=o.length,n=0,i,{iScale:s}=e,{min:d,max:u,minDefined:f,maxDefined:_}=s.getUserBounds();return f&&(n=_r(cc(o,s.axis,d).lo,0,t-1)),_?i=_r(cc(o,s.axis,u).hi+1,n,t)-n:i=t-n,{start:n,count:i}}var Ude={id:"decimation",defaults:{algorithm:"min-max",enabled:!1},beforeElementsUpdate:(e,o,t)=>{if(!t.enabled){DR(e);return}let n=e.width;e.data.datasets.forEach((i,s)=>{let{_data:d,indexAxis:u}=i,f=e.getDatasetMeta(s),_=d||i.data;if(W0([u,e.options.indexAxis])==="y"||!f.controller.supportsDecimation)return;let C=e.scales[f.xAxisID];if(C.type!=="linear"&&C.type!=="time"||e.options.parsing)return;let{start:x,count:y}=$de(f,_),P=t.threshold||4*n;if(y<=P){u9(i);return}Co(d)&&(i._data=_,delete i.data,Object.defineProperty(i,"data",{configurable:!0,enumerable:!0,get:function(){return this._decimated},set:function(M){this._data=M}}));let S;switch(t.algorithm){case"lttb":S=Gde(_,x,y,n,t);break;case"min-max":S=jde(_,x,y,n);break;default:throw new Error(`Unsupported decimation algorithm '${t.algorithm}'`)}i._decimated=S})},destroy(e){DR(e)}};function Wde(e,o,t){let n=e.segments,i=e.points,s=o.points,d=[];for(let u of n){let{start:f,end:_}=u;_=_C(f,_,i);let C=wM(t,i[f],i[_],u.loop);if(!o.segments){d.push({source:u,target:C,start:i[f],end:i[_]});continue}let x=K4(o,C);for(let y of x){let P=wM(t,s[y.start],s[y.end],y.loop),S=J4(u,i,P);for(let M of S)d.push({source:M,target:y,start:{[t]:ER(C,P,"start",Math.max)},end:{[t]:ER(C,P,"end",Math.min)}})}}return d}function wM(e,o,t,n){if(n)return;let i=o[e],s=t[e];return e==="angle"&&(i=Vr(i),s=Vr(s)),{property:e,start:i,end:s}}function Qde(e,o){let{x:t=null,y:n=null}=e||{},i=o.points,s=[];return o.segments.forEach(({start:d,end:u})=>{u=_C(d,u,i);let f=i[d],_=i[u];n!==null?(s.push({x:f.x,y:n}),s.push({x:_.x,y:n})):t!==null&&(s.push({x:t,y:f.y}),s.push({x:t,y:_.y}))}),s}function _C(e,o,t){for(;o>e;o--){let n=t[o];if(!isNaN(n.x)&&!isNaN(n.y))break}return o}function ER(e,o,t,n){return e&&o?n(e[t],o[t]):e?e[t]:o?o[t]:0}function f9(e,o){let t=[],n=!1;return ga(e)?(n=!0,t=e):t=Qde(e,o),t.length?new gC({points:t,options:{tension:0},_loop:n,_fullLoop:n}):null}function IR(e){return e&&e.fill!==!1}function Yde(e,o,t){let i=e[o].fill,s=[o],d;if(!t)return i;for(;i!==!1&&s.indexOf(i)===-1;){if(!ka(i))return i;if(d=e[i],!d)return!1;if(d.visible)return i;s.push(i),i=d.fill}return!1}function Jde(e,o,t){let n=e0e(e);if(bo(n))return isNaN(n.value)?!1:n;let i=parseFloat(n);return ka(i)&&Math.floor(i)===i?Kde(n[0],o,i,t):["origin","start","end","stack","shape"].indexOf(n)>=0&&n}function Kde(e,o,t,n){return(e==="-"||e==="+")&&(t=o+t),t===o||t<0||t>=n?!1:t}function Xde(e,o){let t=null;return e==="start"?t=o.bottom:e==="end"?t=o.top:bo(e)?t=o.getPixelForValue(e.value):o.getBasePixel&&(t=o.getBasePixel()),t}function Zde(e,o,t){let n;return e==="start"?n=t:e==="end"?n=o.options.reverse?o.min:o.max:bo(e)?n=e.value:n=o.getBaseValue(),n}function e0e(e){let o=e.options,t=o.fill,n=Kn(t&&t.target,t);return n===void 0&&(n=!!o.backgroundColor),n===!1||n===null?!1:n===!0?"origin":n}function t0e(e){let{scale:o,index:t,line:n}=e,i=[],s=n.segments,d=n.points,u=i0e(o,t);u.push(f9({x:null,y:o.bottom},n));for(let f=0;f=0;--d){let u=i[d].$filler;u&&(u.line.updateControlPoints(s,u.axis),n&&u.fill&&sM(e.ctx,u,s))}},beforeDatasetsDraw(e,o,t){if(t.drawTime!=="beforeDatasetsDraw")return;let n=e.getSortedVisibleDatasetMetas();for(let i=n.length-1;i>=0;--i){let s=n[i].$filler;IR(s)&&sM(e.ctx,s,e.chartArea)}},beforeDatasetDraw(e,o,t){let n=o.meta.$filler;!IR(n)||t.drawTime!=="beforeDatasetDraw"||sM(e.ctx,n,e.chartArea)},defaults:{propagate:!0,drawTime:"beforeDatasetDraw"}},kR=(e,o)=>{let{boxHeight:t=o,boxWidth:n=o}=e;return e.usePointStyle&&(t=Math.min(t,o),n=e.pointStyleWidth||Math.min(n,o)),{boxWidth:n,boxHeight:t,itemHeight:Math.max(o,t)}},u0e=(e,o)=>e!==null&&o!==null&&e.datasetIndex===o.datasetIndex&&e.index===o.index,hC=class extends Ns{constructor(o){super(),this._added=!1,this.legendHitBoxes=[],this._hoveredItem=null,this.doughnutMode=!1,this.chart=o.chart,this.options=o.options,this.ctx=o.ctx,this.legendItems=void 0,this.columnSizes=void 0,this.lineWidths=void 0,this.maxHeight=void 0,this.maxWidth=void 0,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.height=void 0,this.width=void 0,this._margins=void 0,this.position=void 0,this.weight=void 0,this.fullSize=void 0}update(o,t,n){this.maxWidth=o,this.maxHeight=t,this._margins=n,this.setDimensions(),this.buildLabels(),this.fit()}setDimensions(){this.isHorizontal()?(this.width=this.maxWidth,this.left=this._margins.left,this.right=this.width):(this.height=this.maxHeight,this.top=this._margins.top,this.bottom=this.height)}buildLabels(){let o=this.options.labels||{},t=oa(o.generateLabels,[this.chart],this)||[];o.filter&&(t=t.filter(n=>o.filter(n,this.chart.data))),o.sort&&(t=t.sort((n,i)=>o.sort(n,i,this.chart.data))),this.options.reverse&&t.reverse(),this.legendItems=t}fit(){let{options:o,ctx:t}=this;if(!o.display){this.width=this.height=0;return}let n=o.labels,i=sr(n.font),s=i.size,d=this._computeTitleHeight(),{boxWidth:u,itemHeight:f}=kR(n,s),_,C;t.font=i.string,this.isHorizontal()?(_=this.maxWidth,C=this._fitRows(d,s,u,f)+10):(C=this.maxHeight,_=this._fitCols(d,i,u,f)+10),this.width=Math.min(_,o.maxWidth||this.maxWidth),this.height=Math.min(C,o.maxHeight||this.maxHeight)}_fitRows(o,t,n,i){let{ctx:s,maxWidth:d,options:{labels:{padding:u}}}=this,f=this.legendHitBoxes=[],_=this.lineWidths=[0],C=i+u,x=o;s.textAlign="left",s.textBaseline="middle";let y=-1,P=-C;return this.legendItems.forEach((S,M)=>{let D=n+t/2+s.measureText(S.text).width;(M===0||_[_.length-1]+D+2*u>d)&&(x+=C,_[_.length-(M>0?0:1)]=0,P+=C,y++),f[M]={left:0,top:P,row:y,width:D,height:i},_[_.length-1]+=D+u}),x}_fitCols(o,t,n,i){let{ctx:s,maxHeight:d,options:{labels:{padding:u}}}=this,f=this.legendHitBoxes=[],_=this.columnSizes=[],C=d-o,x=u,y=0,P=0,S=0,M=0;return this.legendItems.forEach((D,k)=>{let{itemWidth:z,itemHeight:U}=f0e(n,t,s,D,i);k>0&&P+U+2*u>C&&(x+=y+u,_.push({width:y,height:P}),S+=y+u,M++,y=P=0),f[k]={left:S,top:P,col:M,width:z,height:U},y=Math.max(y,z),P+=U+u}),x+=y,_.push({width:y,height:P}),x}adjustHitBoxes(){if(!this.options.display)return;let o=this._computeTitleHeight(),{legendHitBoxes:t,options:{align:n,labels:{padding:i},rtl:s}}=this,d=wd(s,this.left,this.width);if(this.isHorizontal()){let u=0,f=qr(n,this.left+i,this.right-this.lineWidths[u]);for(let _ of t)u!==_.row&&(u=_.row,f=qr(n,this.left+i,this.right-this.lineWidths[u])),_.top+=this.top+o+i,_.left=d.leftForLtr(d.x(f),_.width),f+=_.width+i}else{let u=0,f=qr(n,this.top+o+i,this.bottom-this.columnSizes[u].height);for(let _ of t)_.col!==u&&(u=_.col,f=qr(n,this.top+o+i,this.bottom-this.columnSizes[u].height)),_.top=f,_.left+=this.left+i,_.left=d.leftForLtr(d.x(_.left),_.width),f+=_.height+i}}isHorizontal(){return this.options.position==="top"||this.options.position==="bottom"}draw(){if(this.options.display){let o=this.ctx;Ef(o,this),this._draw(),If(o)}}_draw(){let{options:o,columnSizes:t,lineWidths:n,ctx:i}=this,{align:s,labels:d}=o,u=ba.color,f=wd(o.rtl,this.left,this.width),_=sr(d.font),{padding:C}=d,x=_.size,y=x/2,P;this.drawTitle(),i.textAlign=f.textAlign("left"),i.textBaseline="middle",i.lineWidth=.5,i.font=_.string;let{boxWidth:S,boxHeight:M,itemHeight:D}=kR(d,x),k=function(ee,ae,ce){if(isNaN(S)||S<=0||isNaN(M)||M<0)return;i.save();let _e=Kn(ce.lineWidth,1);if(i.fillStyle=Kn(ce.fillStyle,u),i.lineCap=Kn(ce.lineCap,"butt"),i.lineDashOffset=Kn(ce.lineDashOffset,0),i.lineJoin=Kn(ce.lineJoin,"miter"),i.lineWidth=_e,i.strokeStyle=Kn(ce.strokeStyle,u),i.setLineDash(Kn(ce.lineDash,[])),d.usePointStyle){let de={radius:M*Math.SQRT2/2,pointStyle:ce.pointStyle,rotation:ce.rotation,borderWidth:_e},j=f.xPlus(ee,S/2),W=ae+y;q4(i,de,j,W,d.pointStyleWidth&&S)}else{let de=ae+Math.max((x-M)/2,0),j=f.leftForLtr(ee,S),W=Vp(ce.borderRadius);i.beginPath(),Object.values(W).some(pe=>pe!==0)?U0(i,{x:j,y:de,w:S,h:M,radius:W}):i.rect(j,de,S,M),i.fill(),_e!==0&&i.stroke()}i.restore()},z=function(ee,ae,ce){Lp(i,ce.text,ee,ae+D/2,_,{strikethrough:ce.hidden,textAlign:f.textAlign(ce.textAlign)})},U=this.isHorizontal(),J=this._computeTitleHeight();U?P={x:qr(s,this.left+C,this.right-n[0]),y:this.top+C+J,line:0}:P={x:this.left+C,y:qr(s,this.top+J+C,this.bottom-t[0].height),line:0},Q4(this.ctx,o.textDirection);let re=D+C;this.legendItems.forEach((ee,ae)=>{i.strokeStyle=ee.fontColor,i.fillStyle=ee.fontColor;let ce=i.measureText(ee.text).width,_e=f.textAlign(ee.textAlign||(ee.textAlign=d.textAlign)),de=S+y+ce,j=P.x,W=P.y;f.setWidth(this.width),U?ae>0&&j+de+C>this.right&&(W=P.y+=re,P.line++,j=P.x=qr(s,this.left+C,this.right-n[P.line])):ae>0&&W+re>this.bottom&&(j=P.x=j+t[P.line].width+C,P.line++,W=P.y=qr(s,this.top+J+C,this.bottom-t[P.line].height));let pe=f.x(j);if(k(pe,W,ee),j=kB(_e,j+S+y,U?j+de:this.right,o.rtl),z(f.x(j),W,ee),U)P.x+=de+C;else if(typeof ee.text!="string"){let O=_.lineHeight;P.y+=h9(ee,O)+C}else P.y+=re}),Y4(this.ctx,o.textDirection)}drawTitle(){let o=this.options,t=o.title,n=sr(t.font),i=zr(t.padding);if(!t.display)return;let s=wd(o.rtl,this.left,this.width),d=this.ctx,u=t.position,f=n.size/2,_=i.top+f,C,x=this.left,y=this.width;if(this.isHorizontal())y=Math.max(...this.lineWidths),C=this.top+_,x=qr(o.align,x,this.right-y);else{let S=this.columnSizes.reduce((M,D)=>Math.max(M,D.height),0);C=_+qr(o.align,this.top,this.bottom-S-o.labels.padding-this._computeTitleHeight())}let P=qr(u,x,x+y);d.textAlign=s.textAlign(Q_(u)),d.textBaseline="middle",d.strokeStyle=t.color,d.fillStyle=t.color,d.font=n.string,Lp(d,t.text,P,C,n)}_computeTitleHeight(){let o=this.options.title,t=sr(o.font),n=zr(o.padding);return o.display?t.lineHeight+n.height:0}_getLegendItemAt(o,t){let n,i,s;if(dc(o,this.left,this.right)&&dc(t,this.top,this.bottom)){for(s=this.legendHitBoxes,n=0;ns.length>d.length?s:d)),o+t.size/2+n.measureText(i).width}function g0e(e,o,t){let n=e;return typeof o.text!="string"&&(n=h9(o,t)),n}function h9(e,o){let t=e.text?e.text.length:0;return o*t}function _0e(e,o){return!!((e==="mousemove"||e==="mouseout")&&(o.onHover||o.onLeave)||o.onClick&&(e==="click"||e==="mouseup"))}var C0e={id:"legend",_element:hC,start(e,o,t){let n=e.legend=new hC({ctx:e.ctx,options:t,chart:e});Kr.configure(e,n,t),Kr.addBox(e,n)},stop(e){Kr.removeBox(e,e.legend),delete e.legend},beforeUpdate(e,o,t){let n=e.legend;Kr.configure(e,n,t),n.options=t},afterUpdate(e){let o=e.legend;o.buildLabels(),o.adjustHitBoxes()},afterEvent(e,o){o.replay||e.legend.handleEvent(o.event)},defaults:{display:!0,position:"top",align:"center",fullSize:!0,reverse:!1,weight:1e3,onClick(e,o,t){let n=o.datasetIndex,i=t.chart;i.isDatasetVisible(n)?(i.hide(n),o.hidden=!0):(i.show(n),o.hidden=!1)},onHover:null,onLeave:null,labels:{color:e=>e.chart.options.color,boxWidth:40,padding:10,generateLabels(e){let o=e.data.datasets,{labels:{usePointStyle:t,pointStyle:n,textAlign:i,color:s,useBorderRadius:d,borderRadius:u}}=e.legend.options;return e._getSortedDatasetMetas().map(f=>{let _=f.controller.getStyle(t?0:void 0),C=zr(_.borderWidth);return{text:o[f.index].label,fillStyle:_.backgroundColor,fontColor:s,hidden:!f.visible,lineCap:_.borderCapStyle,lineDash:_.borderDash,lineDashOffset:_.borderDashOffset,lineJoin:_.borderJoinStyle,lineWidth:(C.width+C.height)/4,strokeStyle:_.borderColor,pointStyle:n||_.pointStyle,rotation:_.rotation,textAlign:i||_.textAlign,borderRadius:d&&(u||_.borderRadius),datasetIndex:f.index}},this)}},title:{color:e=>e.chart.options.color,display:!1,position:"center",text:""}},descriptors:{_scriptable:e=>!e.startsWith("on"),labels:{_scriptable:e=>!["generateLabels","filter","sort"].includes(e)}}},Vf=class extends Ns{constructor(o){super(),this.chart=o.chart,this.options=o.options,this.ctx=o.ctx,this._padding=void 0,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.width=void 0,this.height=void 0,this.position=void 0,this.weight=void 0,this.fullSize=void 0}update(o,t){let n=this.options;if(this.left=0,this.top=0,!n.display){this.width=this.height=this.right=this.bottom=0;return}this.width=this.right=o,this.height=this.bottom=t;let i=ga(n.text)?n.text.length:1;this._padding=zr(n.padding);let s=i*sr(n.font).lineHeight+this._padding.height;this.isHorizontal()?this.height=s:this.width=s}isHorizontal(){let o=this.options.position;return o==="top"||o==="bottom"}_drawArgs(o){let{top:t,left:n,bottom:i,right:s,options:d}=this,u=d.align,f=0,_,C,x;return this.isHorizontal()?(C=qr(u,n,s),x=t+o,_=s-n):(d.position==="left"?(C=n+o,x=qr(u,i,t),f=Bo*-.5):(C=s-o,x=qr(u,t,i),f=Bo*.5),_=i-t),{titleX:C,titleY:x,maxWidth:_,rotation:f}}draw(){let o=this.ctx,t=this.options;if(!t.display)return;let n=sr(t.font),s=n.lineHeight/2+this._padding.top,{titleX:d,titleY:u,maxWidth:f,rotation:_}=this._drawArgs(s);Lp(o,t.text,0,0,n,{color:t.color,maxWidth:f,rotation:_,textAlign:Q_(t.align),textBaseline:"middle",translation:[d,u]})}};function v0e(e,o){let t=new Vf({ctx:e.ctx,options:o,chart:e});Kr.configure(e,t,o),Kr.addBox(e,t),e.titleBlock=t}var x0e={id:"title",_element:Vf,start(e,o,t){v0e(e,t)},stop(e){let o=e.titleBlock;Kr.removeBox(e,o),delete e.titleBlock},beforeUpdate(e,o,t){let n=e.titleBlock;Kr.configure(e,n,t),n.options=t},defaults:{align:"center",display:!1,font:{weight:"bold"},fullSize:!0,padding:10,position:"top",text:"",weight:2e3},defaultRoutes:{color:"color"},descriptors:{_scriptable:!0,_indexable:!1}},aC=new WeakMap,b0e={id:"subtitle",start(e,o,t){let n=new Vf({ctx:e.ctx,options:t,chart:e});Kr.configure(e,n,t),Kr.addBox(e,n),aC.set(e,n)},stop(e){Kr.removeBox(e,aC.get(e)),aC.delete(e)},beforeUpdate(e,o,t){let n=aC.get(e);Kr.configure(e,n,t),n.options=t},defaults:{align:"center",display:!1,font:{weight:"normal"},fullSize:!0,padding:0,position:"top",text:"",weight:1500},defaultRoutes:{color:"color"},descriptors:{_scriptable:!0,_indexable:!1}},Nf={average(e){if(!e.length)return!1;let o,t,n=new Set,i=0,s=0;for(o=0,t=e.length;ou+f)/n.size,y:i/s}},nearest(e,o){if(!e.length)return!1;let t=o.x,n=o.y,i=Number.POSITIVE_INFINITY,s,d,u;for(s=0,d=e.length;s-1?e.split(` -`):e}function y0e(e,o){let{element:t,datasetIndex:n,index:i}=o,s=e.getDatasetMeta(n).controller,{label:d,value:u}=s.getLabelAndValue(i);return{chart:e,label:d,parsed:s.getParsed(i),raw:e.data.datasets[n].data[i],formattedValue:u,dataset:s.getDataset(),dataIndex:i,datasetIndex:n,element:t}}function BR(e,o){let t=e.chart.ctx,{body:n,footer:i,title:s}=e,{boxWidth:d,boxHeight:u}=o,f=sr(o.bodyFont),_=sr(o.titleFont),C=sr(o.footerFont),x=s.length,y=i.length,P=n.length,S=zr(o.padding),M=S.height,D=0,k=n.reduce((J,re)=>J+re.before.length+re.lines.length+re.after.length,0);if(k+=e.beforeBody.length+e.afterBody.length,x&&(M+=x*_.lineHeight+(x-1)*o.titleSpacing+o.titleMarginBottom),k){let J=o.displayColors?Math.max(u,f.lineHeight):f.lineHeight;M+=P*J+(k-P)*f.lineHeight+(k-1)*o.bodySpacing}y&&(M+=o.footerMarginTop+y*C.lineHeight+(y-1)*o.footerSpacing);let z=0,U=function(J){D=Math.max(D,t.measureText(J).width+z)};return t.save(),t.font=_.string,Jo(e.title,U),t.font=f.string,Jo(e.beforeBody.concat(e.afterBody),U),z=o.displayColors?d+2+o.boxPadding:0,Jo(n,J=>{Jo(J.before,U),Jo(J.lines,U),Jo(J.after,U)}),z=0,t.font=C.string,Jo(e.footer,U),t.restore(),D+=S.width,{width:D,height:M}}function S0e(e,o){let{y:t,height:n}=o;return te.height-n/2?"bottom":"center"}function w0e(e,o,t,n){let{x:i,width:s}=n,d=t.caretSize+t.caretPadding;if(e==="left"&&i+s+d>o.width||e==="right"&&i-s-d<0)return!0}function P0e(e,o,t,n){let{x:i,width:s}=t,{width:d,chartArea:{left:u,right:f}}=e,_="center";return n==="center"?_=i<=(u+f)/2?"left":"right":i<=s/2?_="left":i>=d-s/2&&(_="right"),w0e(_,e,o,t)&&(_="center"),_}function RR(e,o,t){let n=t.yAlign||o.yAlign||S0e(e,t);return{xAlign:t.xAlign||o.xAlign||P0e(e,o,t,n),yAlign:n}}function T0e(e,o){let{x:t,width:n}=e;return o==="right"?t-=n:o==="center"&&(t-=n/2),t}function M0e(e,o,t){let{y:n,height:i}=e;return o==="top"?n+=t:o==="bottom"?n-=i+t:n-=i/2,n}function NR(e,o,t,n){let{caretSize:i,caretPadding:s,cornerRadius:d}=e,{xAlign:u,yAlign:f}=t,_=i+s,{topLeft:C,topRight:x,bottomLeft:y,bottomRight:P}=Vp(d),S=T0e(o,u),M=M0e(o,f,_);return f==="center"?u==="left"?S+=_:u==="right"&&(S-=_):u==="left"?S-=Math.max(C,y)+i:u==="right"&&(S+=Math.max(x,P)+i),{x:_r(S,0,n.width-o.width),y:_r(M,0,n.height-o.height)}}function rC(e,o,t){let n=zr(t.padding);return o==="center"?e.x+e.width/2:o==="right"?e.x+e.width-n.right:e.x+n.left}function LR(e){return uc([],Uc(e))}function D0e(e,o,t){return jc(e,{tooltip:o,tooltipItems:t,type:"tooltip"})}function VR(e,o){let t=o&&o.dataset&&o.dataset.tooltip&&o.dataset.tooltip.callbacks;return t?e.override(t):e}var g9={beforeTitle:mc,title(e){if(e.length>0){let o=e[0],t=o.chart.data.labels,n=t?t.length:0;if(this&&this.options&&this.options.mode==="dataset")return o.dataset.label||"";if(o.label)return o.label;if(n>0&&o.dataIndex"u"?g9[o].call(t,n):i}var qR=(()=>{class e extends Ns{static positioners=Nf;constructor(t){super(),this.opacity=0,this._active=[],this._eventPosition=void 0,this._size=void 0,this._cachedAnimations=void 0,this._tooltipItems=[],this.$animations=void 0,this.$context=void 0,this.chart=t.chart,this.options=t.options,this.dataPoints=void 0,this.title=void 0,this.beforeBody=void 0,this.body=void 0,this.afterBody=void 0,this.footer=void 0,this.xAlign=void 0,this.yAlign=void 0,this.x=void 0,this.y=void 0,this.height=void 0,this.width=void 0,this.caretX=void 0,this.caretY=void 0,this.labelColors=void 0,this.labelPointStyles=void 0,this.labelTextColors=void 0}initialize(t){this.options=t,this._cachedAnimations=void 0,this.$context=void 0}_resolveAnimations(){let t=this._cachedAnimations;if(t)return t;let n=this.chart,i=this.options.setContext(this.getContext()),s=i.enabled&&n.options.animation&&i.animations,d=new pC(this.chart,s);return s._cacheable&&(this._cachedAnimations=Object.freeze(d)),d}getContext(){return this.$context||(this.$context=D0e(this.chart.getContext(),this,this._tooltipItems))}getTitle(t,n){let{callbacks:i}=n,s=wl(i,"beforeTitle",this,t),d=wl(i,"title",this,t),u=wl(i,"afterTitle",this,t),f=[];return f=uc(f,Uc(s)),f=uc(f,Uc(d)),f=uc(f,Uc(u)),f}getBeforeBody(t,n){return LR(wl(n.callbacks,"beforeBody",this,t))}getBody(t,n){let{callbacks:i}=n,s=[];return Jo(t,d=>{let u={before:[],lines:[],after:[]},f=VR(i,d);uc(u.before,Uc(wl(f,"beforeLabel",this,d))),uc(u.lines,wl(f,"label",this,d)),uc(u.after,Uc(wl(f,"afterLabel",this,d))),s.push(u)}),s}getAfterBody(t,n){return LR(wl(n.callbacks,"afterBody",this,t))}getFooter(t,n){let{callbacks:i}=n,s=wl(i,"beforeFooter",this,t),d=wl(i,"footer",this,t),u=wl(i,"afterFooter",this,t),f=[];return f=uc(f,Uc(s)),f=uc(f,Uc(d)),f=uc(f,Uc(u)),f}_createItems(t){let n=this._active,i=this.chart.data,s=[],d=[],u=[],f=[],_,C;for(_=0,C=n.length;_t.filter(x,y,P,i))),t.itemSort&&(f=f.sort((x,y)=>t.itemSort(x,y,i))),Jo(f,x=>{let y=VR(t.callbacks,x);s.push(wl(y,"labelColor",this,x)),d.push(wl(y,"labelPointStyle",this,x)),u.push(wl(y,"labelTextColor",this,x))}),this.labelColors=s,this.labelPointStyles=d,this.labelTextColors=u,this.dataPoints=f,f}update(t,n){let i=this.options.setContext(this.getContext()),s=this._active,d,u=[];if(!s.length)this.opacity!==0&&(d={opacity:0});else{let f=Nf[i.position].call(this,s,this._eventPosition);u=this._createItems(i),this.title=this.getTitle(u,i),this.beforeBody=this.getBeforeBody(u,i),this.body=this.getBody(u,i),this.afterBody=this.getAfterBody(u,i),this.footer=this.getFooter(u,i);let _=this._size=BR(this,i),C=Object.assign({},f,_),x=RR(this.chart,i,C),y=NR(i,C,x,this.chart);this.xAlign=x.xAlign,this.yAlign=x.yAlign,d={opacity:1,x:y.x,y:y.y,width:_.width,height:_.height,caretX:f.x,caretY:f.y}}this._tooltipItems=u,this.$context=void 0,d&&this._resolveAnimations().update(this,d),t&&i.external&&i.external.call(this,{chart:this.chart,tooltip:this,replay:n})}drawCaret(t,n,i,s){let d=this.getCaretPosition(t,i,s);n.lineTo(d.x1,d.y1),n.lineTo(d.x2,d.y2),n.lineTo(d.x3,d.y3)}getCaretPosition(t,n,i){let{xAlign:s,yAlign:d}=this,{caretSize:u,cornerRadius:f}=i,{topLeft:_,topRight:C,bottomLeft:x,bottomRight:y}=Vp(f),{x:P,y:S}=t,{width:M,height:D}=n,k,z,U,J,re,ee;return d==="center"?(re=S+D/2,s==="left"?(k=P,z=k-u,J=re+u,ee=re-u):(k=P+M,z=k+u,J=re-u,ee=re+u),U=k):(s==="left"?z=P+Math.max(_,x)+u:s==="right"?z=P+M-Math.max(C,y)-u:z=this.caretX,d==="top"?(J=S,re=J-u,k=z-u,U=z+u):(J=S+D,re=J+u,k=z+u,U=z-u),ee=J),{x1:k,x2:z,x3:U,y1:J,y2:re,y3:ee}}drawTitle(t,n,i){let s=this.title,d=s.length,u,f,_;if(d){let C=wd(i.rtl,this.x,this.width);for(t.x=rC(this,i.titleAlign,i),n.textAlign=C.textAlign(i.titleAlign),n.textBaseline="middle",u=sr(i.titleFont),f=i.titleSpacing,n.fillStyle=i.titleColor,n.font=u.string,_=0;_U!==0)?(t.beginPath(),t.fillStyle=d.multiKeyBackground,U0(t,{x:D,y:M,w:C,h:_,radius:z}),t.fill(),t.stroke(),t.fillStyle=u.backgroundColor,t.beginPath(),U0(t,{x:k,y:M+1,w:C-2,h:_-2,radius:z}),t.fill()):(t.fillStyle=d.multiKeyBackground,t.fillRect(D,M,C,_),t.strokeRect(D,M,C,_),t.fillStyle=u.backgroundColor,t.fillRect(k,M+1,C-2,_-2))}t.fillStyle=this.labelTextColors[i]}drawBody(t,n,i){let{body:s}=this,{bodySpacing:d,bodyAlign:u,displayColors:f,boxHeight:_,boxWidth:C,boxPadding:x}=i,y=sr(i.bodyFont),P=y.lineHeight,S=0,M=wd(i.rtl,this.x,this.width),D=function(_e){n.fillText(_e,M.x(t.x+S),t.y+P/2),t.y+=P+d},k=M.textAlign(u),z,U,J,re,ee,ae,ce;for(n.textAlign=u,n.textBaseline="middle",n.font=y.string,t.x=rC(this,k,i),n.fillStyle=i.bodyColor,Jo(this.beforeBody,D),S=f&&k!=="right"?u==="center"?C/2+x:C+2+x:0,re=0,ae=s.length;re0&&n.stroke()}_updateAnimationTarget(t){let n=this.chart,i=this.$animations,s=i&&i.x,d=i&&i.y;if(s||d){let u=Nf[t.position].call(this,this._active,this._eventPosition);if(!u)return;let f=this._size=BR(this,t),_=Object.assign({},u,this._size),C=RR(n,t,_),x=NR(t,_,C,n);(s._to!==x.x||d._to!==x.y)&&(this.xAlign=C.xAlign,this.yAlign=C.yAlign,this.width=f.width,this.height=f.height,this.caretX=u.x,this.caretY=u.y,this._resolveAnimations().update(this,x))}}_willRender(){return!!this.opacity}draw(t){let n=this.options.setContext(this.getContext()),i=this.opacity;if(!i)return;this._updateAnimationTarget(n);let s={width:this.width,height:this.height},d={x:this.x,y:this.y};i=Math.abs(i)<.001?0:i;let u=zr(n.padding),f=this.title.length||this.beforeBody.length||this.body.length||this.afterBody.length||this.footer.length;n.enabled&&f&&(t.save(),t.globalAlpha=i,this.drawBackground(d,t,s,n),Q4(t,n.textDirection),d.y+=u.top,this.drawTitle(d,t,n),this.drawBody(d,t,n),this.drawFooter(d,t,n),Y4(t,n.textDirection),t.restore())}getActiveElements(){return this._active||[]}setActiveElements(t,n){let i=this._active,s=t.map(({datasetIndex:f,index:_})=>{let C=this.chart.getDatasetMeta(f);if(!C)throw new Error("Cannot find a dataset at index "+f);return{datasetIndex:f,element:C.data[_],index:_}}),d=!Mf(i,s),u=this._positionChanged(s,n);(d||u)&&(this._active=s,this._eventPosition=n,this._ignoreReplayEvents=!0,this.update(!0))}handleEvent(t,n,i=!0){if(n&&this._ignoreReplayEvents)return!1;this._ignoreReplayEvents=!1;let s=this.options,d=this._active||[],u=this._getActiveElements(t,d,n,i),f=this._positionChanged(u,t),_=n||!Mf(u,d)||f;return _&&(this._active=u,(s.enabled||s.external)&&(this._eventPosition={x:t.x,y:t.y},this.update(!0,n))),_}_getActiveElements(t,n,i,s){let d=this.options;if(t.type==="mouseout")return[];if(!s)return n.filter(f=>this.chart.data.datasets[f.datasetIndex]&&this.chart.getDatasetMeta(f.datasetIndex).controller.getParsed(f.index)!==void 0);let u=this.chart.getElementsAtEventForMode(t,d.mode,d,i);return d.reverse&&u.reverse(),u}_positionChanged(t,n){let{caretX:i,caretY:s,options:d}=this,u=Nf[d.position].call(this,t,n);return u!==!1&&(i!==u.x||s!==u.y)}}return e})(),E0e={id:"tooltip",_element:qR,positioners:Nf,afterInit(e,o,t){t&&(e.tooltip=new qR({chart:e,options:t}))},beforeUpdate(e,o,t){e.tooltip&&e.tooltip.initialize(t)},reset(e,o,t){e.tooltip&&e.tooltip.initialize(t)},afterDraw(e){let o=e.tooltip;if(o&&o._willRender()){let t={tooltip:o};if(e.notifyPlugins("beforeTooltipDraw",qt(at({},t),{cancelable:!0}))===!1)return;o.draw(e.ctx),e.notifyPlugins("afterTooltipDraw",t)}},afterEvent(e,o){if(e.tooltip){let t=o.replay;e.tooltip.handleEvent(o.event,t,o.inChartArea)&&(o.changed=!0)}},defaults:{enabled:!0,external:null,position:"average",backgroundColor:"rgba(0,0,0,0.8)",titleColor:"#fff",titleFont:{weight:"bold"},titleSpacing:2,titleMarginBottom:6,titleAlign:"left",bodyColor:"#fff",bodySpacing:2,bodyFont:{},bodyAlign:"left",footerColor:"#fff",footerSpacing:2,footerMarginTop:6,footerFont:{weight:"bold"},footerAlign:"left",padding:6,caretPadding:2,caretSize:5,cornerRadius:6,boxHeight:(e,o)=>o.bodyFont.size,boxWidth:(e,o)=>o.bodyFont.size,multiKeyBackground:"#fff",displayColors:!0,boxPadding:0,borderColor:"rgba(0,0,0,0)",borderWidth:0,animation:{duration:400,easing:"easeOutQuart"},animations:{numbers:{type:"number",properties:["x","y","width","height","caretX","caretY"]},opacity:{easing:"linear",duration:200}},callbacks:g9},defaultRoutes:{bodyFont:"font",footerFont:"font",titleFont:"font"},descriptors:{_scriptable:e=>e!=="filter"&&e!=="itemSort"&&e!=="external",_indexable:!1,callbacks:{_scriptable:!1,_indexable:!1},animation:{_fallback:!1},animations:{_fallback:"animation"}},additionalOptionScopes:["interaction"]},I0e=Object.freeze({__proto__:null,Colors:Hde,Decimation:Ude,Filler:d0e,Legend:C0e,SubTitle:b0e,Title:x0e,Tooltip:E0e}),O0e=(e,o,t,n)=>(typeof o=="string"?(t=e.push(o)-1,n.unshift({index:t,label:o})):isNaN(o)&&(t=null),t);function A0e(e,o,t,n){let i=e.indexOf(o);if(i===-1)return O0e(e,o,t,n);let s=e.lastIndexOf(o);return i!==s?t:i}var F0e=(e,o)=>e===null?null:_r(Math.round(e),0,o);function zR(e){let o=this.getLabels();return e>=0&&e{class e extends Md{static id="category";static defaults={ticks:{callback:zR}};constructor(t){super(t),this._startValue=void 0,this._valueRange=0,this._addedLabels=[]}init(t){let n=this._addedLabels;if(n.length){let i=this.getLabels();for(let{index:s,label:d}of n)i[s]===d&&i.splice(s,1);this._addedLabels=[]}super.init(t)}parse(t,n){if(Co(t))return null;let i=this.getLabels();return n=isFinite(n)&&i[n]===t?n:A0e(i,t,Kn(n,t),this._addedLabels),F0e(n,i.length-1)}determineDataLimits(){let{minDefined:t,maxDefined:n}=this.getUserBounds(),{min:i,max:s}=this.getMinMax(!0);this.options.bounds==="ticks"&&(t||(i=0),n||(s=this.getLabels().length-1)),this.min=i,this.max=s}buildTicks(){let t=this.min,n=this.max,i=this.options.offset,s=[],d=this.getLabels();d=t===0&&n===d.length-1?d:d.slice(t,n+1),this._valueRange=Math.max(d.length-(i?0:1),1),this._startValue=this.min-(i?.5:0);for(let u=t;u<=n;u++)s.push({value:u});return s}getLabelForValue(t){return zR.call(this,t)}configure(){super.configure(),this.isHorizontal()||(this._reversePixels=!this._reversePixels)}getPixelForValue(t){return typeof t!="number"&&(t=this.parse(t)),t===null?NaN:this.getPixelForDecimal((t-this._startValue)/this._valueRange)}getPixelForTick(t){let n=this.ticks;return t<0||t>n.length-1?null:this.getPixelForValue(n[t].value)}getValueForPixel(t){return Math.round(this._startValue+this.getDecimalForPixel(t)*this._valueRange)}getBasePixel(){return this.bottom}}return e})();function B0e(e,o){let t=[],{bounds:i,step:s,min:d,max:u,precision:f,count:_,maxTicks:C,maxDigits:x,includeBounds:y}=e,P=s||1,S=C-1,{min:M,max:D}=o,k=!Co(d),z=!Co(u),U=!Co(_),J=(D-M)/(x+1),re=M4((D-M)/S/P)*P,ee,ae,ce,_e;if(re<1e-14&&!k&&!z)return[{value:M},{value:D}];_e=Math.ceil(D/re)-Math.floor(M/re),_e>S&&(re=M4(_e*re/S/P)*P),Co(f)||(ee=Math.pow(10,f),re=Math.ceil(re*ee)/ee),i==="ticks"?(ae=Math.floor(M/re)*re,ce=Math.ceil(D/re)*re):(ae=M,ce=D),k&&z&&s&&MB((u-d)/s,re/1e3)?(_e=Math.round(Math.min((u-d)/re,C)),re=(u-d)/_e,ae=d,ce=u):U?(ae=k?d:ae,ce=z?u:ce,_e=_-1,re=(ce-ae)/_e):(_e=(ce-ae)/re,G0(_e,Math.round(_e),re/1e3)?_e=Math.round(_e):_e=Math.ceil(_e));let de=Math.max(E4(re),E4(ae));ee=Math.pow(10,Co(f)?de:f),ae=Math.round(ae*ee)/ee,ce=Math.round(ce*ee)/ee;let j=0;for(k&&(y&&ae!==d?(t.push({value:d}),aeu)break;t.push({value:W})}return z&&y&&ce!==u?t.length&&G0(t[t.length-1].value,u,HR(u,J,e))?t[t.length-1].value=u:t.push({value:u}):(!z||ce===u)&&t.push({value:ce}),t}function HR(e,o,{horizontal:t,minRotation:n}){let i=ms(n),s=(t?Math.sin(i):Math.cos(i))||.001,d=.75*o*(""+e).length;return Math.min(o/s,d)}var J0=class extends Md{constructor(o){super(o),this.start=void 0,this.end=void 0,this._startValue=void 0,this._endValue=void 0,this._valueRange=0}parse(o,t){return Co(o)||(typeof o=="number"||o instanceof Number)&&!isFinite(+o)?null:+o}handleTickRangeOptions(){let{beginAtZero:o}=this.options,{minDefined:t,maxDefined:n}=this.getUserBounds(),{min:i,max:s}=this,d=f=>i=t?i:f,u=f=>s=n?s:f;if(o){let f=Rs(i),_=Rs(s);f<0&&_<0?u(0):f>0&&_>0&&d(0)}if(i===s){let f=s===0?1:Math.abs(s*.05);u(s+f),o||d(i-f)}this.min=i,this.max=s}getTickLimit(){let o=this.options.ticks,{maxTicksLimit:t,stepSize:n}=o,i;return n?(i=Math.ceil(this.max/n)-Math.floor(this.min/n)+1,i>1e3&&(console.warn(`scales.${this.id}.ticks.stepSize: ${n} would result generating up to ${i} ticks. Limiting to 1000.`),i=1e3)):(i=this.computeTickLimit(),t=t||11),t&&(i=Math.min(t,i)),i}computeTickLimit(){return Number.POSITIVE_INFINITY}buildTicks(){let o=this.options,t=o.ticks,n=this.getTickLimit();n=Math.max(2,n);let i={maxTicks:n,bounds:o.bounds,min:o.min,max:o.max,precision:t.precision,step:t.stepSize,count:t.count,maxDigits:this._maxDigits(),horizontal:this.isHorizontal(),minRotation:t.minRotation||0,includeBounds:t.includeBounds!==!1},s=this._range||this,d=B0e(i,s);return o.bounds==="ticks"&&D4(d,this,"value"),o.reverse?(d.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),d}configure(){let o=this.ticks,t=this.min,n=this.max;if(super.configure(),this.options.offset&&o.length){let i=(n-t)/Math.max(o.length-1,1)/2;t-=i,n+=i}this._startValue=t,this._endValue=n,this._valueRange=n-t}getLabelForValue(o){return $0(o,this.chart.options.locale,this.options.ticks.format)}},PM=class extends J0{static id="linear";static defaults={ticks:{callback:Df.formatters.numeric}};determineDataLimits(){let{min:o,max:t}=this.getMinMax(!0);this.min=ka(o)?o:0,this.max=ka(t)?t:1,this.handleTickRangeOptions()}computeTickLimit(){let o=this.isHorizontal(),t=o?this.width:this.height,n=ms(this.options.ticks.minRotation),i=(o?Math.sin(n):Math.cos(n))||.001,s=this._resolveTickFontOptions(0);return Math.ceil(t/Math.min(40,s.lineHeight/i))}getPixelForValue(o){return o===null?NaN:this.getPixelForDecimal((o-this._startValue)/this._valueRange)}getValueForPixel(o){return this._startValue+this.getDecimalForPixel(o)*this._valueRange}},qf=e=>Math.floor(Hc(e)),Td=(e,o)=>Math.pow(10,qf(e)+o);function GR(e){return e/Math.pow(10,qf(e))===1}function jR(e,o,t){let n=Math.pow(10,t),i=Math.floor(e/n);return Math.ceil(o/n)-i}function R0e(e,o){let t=o-e,n=qf(t);for(;jR(e,o,n)>10;)n++;for(;jR(e,o,n)<10;)n--;return Math.min(n,qf(e))}function N0e(e,{min:o,max:t}){o=Sl(e.min,o);let n=[],i=qf(o),s=R0e(o,t),d=s<0?Math.pow(10,Math.abs(s)):1,u=Math.pow(10,s),f=i>s?Math.pow(10,i):0,_=Math.round((o-f)*d)/d,C=Math.floor((o-f)/u/10)*u*10,x=Math.floor((_-C)/Math.pow(10,s)),y=Sl(e.min,Math.round((f+C+x*Math.pow(10,s))*d)/d);for(;y=10?x=x<15?15:20:x++,x>=20&&(s++,x=2,d=s>=0?1:d),y=Math.round((f+C+x*Math.pow(10,s))*d)/d;let P=Sl(e.max,y);return n.push({value:P,major:GR(P),significand:x}),n}var TM=class extends Md{static id="logarithmic";static defaults={ticks:{callback:Df.formatters.logarithmic,major:{enabled:!0}}};constructor(o){super(o),this.start=void 0,this.end=void 0,this._startValue=void 0,this._valueRange=0}parse(o,t){let n=J0.prototype.parse.apply(this,[o,t]);if(n===0){this._zero=!0;return}return ka(n)&&n>0?n:null}determineDataLimits(){let{min:o,max:t}=this.getMinMax(!0);this.min=ka(o)?Math.max(0,o):null,this.max=ka(t)?Math.max(0,t):null,this.options.beginAtZero&&(this._zero=!0),this._zero&&this.min!==this._suggestedMin&&!ka(this._userMin)&&(this.min=o===Td(this.min,0)?Td(this.min,-1):Td(this.min,0)),this.handleTickRangeOptions()}handleTickRangeOptions(){let{minDefined:o,maxDefined:t}=this.getUserBounds(),n=this.min,i=this.max,s=u=>n=o?n:u,d=u=>i=t?i:u;n===i&&(n<=0?(s(1),d(10)):(s(Td(n,-1)),d(Td(i,1)))),n<=0&&s(Td(i,-1)),i<=0&&d(Td(n,1)),this.min=n,this.max=i}buildTicks(){let o=this.options,t={min:this._userMin,max:this._userMax},n=N0e(t,this);return o.bounds==="ticks"&&D4(n,this,"value"),o.reverse?(n.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),n}getLabelForValue(o){return o===void 0?"0":$0(o,this.chart.options.locale,this.options.ticks.format)}configure(){let o=this.min;super.configure(),this._startValue=Hc(o),this._valueRange=Hc(this.max)-Hc(o)}getPixelForValue(o){return(o===void 0||o===0)&&(o=this.min),o===null||isNaN(o)?NaN:this.getPixelForDecimal(o===this.min?0:(Hc(o)-this._startValue)/this._valueRange)}getValueForPixel(o){let t=this.getDecimalForPixel(o);return Math.pow(10,this._startValue+t*this._valueRange)}};function MM(e){let o=e.ticks;if(o.display&&e.display){let t=zr(o.backdropPadding);return Kn(o.font&&o.font.size,ba.font.size)+t.height}return 0}function L0e(e,o,t){return t=ga(t)?t:[t],{w:RB(e,o.string,t),h:t.length*o.lineHeight}}function $R(e,o,t,n,i){return e===n||e===i?{start:o-t/2,end:o+t/2}:ei?{start:o-t,end:o}:{start:o,end:o+t}}function V0e(e){let o={l:e.left+e._padding.left,r:e.right-e._padding.right,t:e.top+e._padding.top,b:e.bottom-e._padding.bottom},t=Object.assign({},o),n=[],i=[],s=e._pointLabels.length,d=e.options.pointLabels,u=d.centerPointLabels?Bo/s:0;for(let f=0;fo.r&&(u=(n.end-o.r)/s,e.r=Math.max(e.r,o.r+u)),i.starto.b&&(f=(i.end-o.b)/d,e.b=Math.max(e.b,o.b+f))}function z0e(e,o,t){let n=e.drawingArea,{extra:i,additionalAngle:s,padding:d,size:u}=t,f=e.getPointPosition(o,n+i+d,s),_=Math.round(U_(Vr(f.angle+Ha))),C=U0e(f.y,u.h,_),x=j0e(_),y=$0e(f.x,u.w,x);return{visible:!0,x:f.x,y:C,textAlign:x,left:y,top:C,right:y+u.w,bottom:C+u.h}}function H0e(e,o){if(!o)return!0;let{left:t,top:n,right:i,bottom:s}=e;return!(pc({x:t,y:n},o)||pc({x:t,y:s},o)||pc({x:i,y:n},o)||pc({x:i,y:s},o))}function G0e(e,o,t){let n=[],i=e._pointLabels.length,s=e.options,{centerPointLabels:d,display:u}=s.pointLabels,f={extra:MM(s)/2,additionalAngle:d?Bo/i:0},_;for(let C=0;C270||t<90)&&(e-=o),e}function W0e(e,o,t){let{left:n,top:i,right:s,bottom:d}=t,{backdropColor:u}=o;if(!Co(u)){let f=Vp(o.borderRadius),_=zr(o.backdropPadding);e.fillStyle=u;let C=n-_.left,x=i-_.top,y=s-n+_.width,P=d-i+_.height;Object.values(f).some(S=>S!==0)?(e.beginPath(),U0(e,{x:C,y:x,w:y,h:P,radius:f}),e.fill()):e.fillRect(C,x,y,P)}}function Q0e(e,o){let{ctx:t,options:{pointLabels:n}}=e;for(let i=o-1;i>=0;i--){let s=e._pointLabelItems[i];if(!s.visible)continue;let d=n.setContext(e.getPointLabelContext(i));W0e(t,d,s);let u=sr(d.font),{x:f,y:_,textAlign:C}=s;Lp(t,e._pointLabels[i],f,_+u.lineHeight/2,u,{color:d.color,textAlign:C,textBaseline:"middle"})}}function _9(e,o,t,n){let{ctx:i}=e;if(t)i.arc(e.xCenter,e.yCenter,o,0,_a);else{let s=e.getPointPosition(0,o);i.moveTo(s.x,s.y);for(let d=1;d{let i=oa(this.options.pointLabels.callback,[t,n],this);return i||i===0?i:""}).filter((t,n)=>this.chart.getDataVisibility(n))}fit(){let o=this.options;o.display&&o.pointLabels.display?V0e(this):this.setCenterPoint(0,0,0,0)}setCenterPoint(o,t,n,i){this.xCenter+=Math.floor((o-t)/2),this.yCenter+=Math.floor((n-i)/2),this.drawingArea-=Math.min(this.drawingArea/2,Math.max(o,t,n,i))}getIndexAngle(o){let t=_a/(this._pointLabels.length||1),n=this.options.startAngle||0;return Vr(o*t+ms(n))}getDistanceFromCenterForValue(o){if(Co(o))return NaN;let t=this.drawingArea/(this.max-this.min);return this.options.reverse?(this.max-o)*t:(o-this.min)*t}getValueForDistanceFromCenter(o){if(Co(o))return NaN;let t=o/(this.drawingArea/(this.max-this.min));return this.options.reverse?this.max-t:this.min+t}getPointLabelContext(o){let t=this._pointLabels||[];if(o>=0&&o{if(x!==0||x===0&&this.min<0){f=this.getDistanceFromCenterForValue(C.value);let y=this.getContext(x),P=i.setContext(y),S=s.setContext(y);Y0e(this,P,f,d,S)}}),n.display){for(o.save(),u=d-1;u>=0;u--){let C=n.setContext(this.getPointLabelContext(u)),{color:x,lineWidth:y}=C;!y||!x||(o.lineWidth=y,o.strokeStyle=x,o.setLineDash(C.borderDash),o.lineDashOffset=C.borderDashOffset,f=this.getDistanceFromCenterForValue(t.reverse?this.min:this.max),_=this.getPointPosition(u,f),o.beginPath(),o.moveTo(this.xCenter,this.yCenter),o.lineTo(_.x,_.y),o.stroke())}o.restore()}}drawBorder(){}drawLabels(){let o=this.ctx,t=this.options,n=t.ticks;if(!n.display)return;let i=this.getIndexAngle(0),s,d;o.save(),o.translate(this.xCenter,this.yCenter),o.rotate(i),o.textAlign="center",o.textBaseline="middle",this.ticks.forEach((u,f)=>{if(f===0&&this.min>=0&&!t.reverse)return;let _=n.setContext(this.getContext(f)),C=sr(_.font);if(s=this.getDistanceFromCenterForValue(this.ticks[f].value),_.showLabelBackdrop){o.font=C.string,d=o.measureText(u.label).width,o.fillStyle=_.backdropColor;let x=zr(_.backdropPadding);o.fillRect(-d/2-x.left,-s-C.size/2-x.top,d+x.width,C.size+x.height)}Lp(o,u.label,0,-s,C,{color:_.color,strokeColor:_.textStrokeColor,strokeWidth:_.textStrokeWidth})}),o.restore()}drawTitle(){}},CC={millisecond:{common:!0,size:1,steps:1e3},second:{common:!0,size:1e3,steps:60},minute:{common:!0,size:6e4,steps:60},hour:{common:!0,size:36e5,steps:24},day:{common:!0,size:864e5,steps:30},week:{common:!1,size:6048e5,steps:4},month:{common:!0,size:2628e6,steps:12},quarter:{common:!1,size:7884e6,steps:4},year:{common:!0,size:3154e7}},Pl=Object.keys(CC);function UR(e,o){return e-o}function WR(e,o){if(Co(o))return null;let t=e._adapter,{parser:n,round:i,isoWeekday:s}=e._parseOpts,d=o;return typeof n=="function"&&(d=n(d)),ka(d)||(d=typeof n=="string"?t.parse(d,n):t.parse(d)),d===null?null:(i&&(d=i==="week"&&(Sd(s)||s===!0)?t.startOf(d,"isoWeek",s):t.startOf(d,i)),+d)}function QR(e,o,t,n){let i=Pl.length;for(let s=Pl.indexOf(e);s=Pl.indexOf(t);s--){let d=Pl[s];if(CC[d].common&&e._adapter.diff(i,n,d)>=o-1)return d}return Pl[t?Pl.indexOf(t):0]}function X0e(e){for(let o=Pl.indexOf(e)+1,t=Pl.length;o=o?t[n]:t[i];e[s]=!0}}function Z0e(e,o,t,n){let i=e._adapter,s=+i.startOf(o[0].value,n),d=o[o.length-1].value,u,f;for(u=s;u<=d;u=+i.add(u,1,n))f=t[u],f>=0&&(o[f].major=!0);return o}function JR(e,o,t){let n=[],i={},s=o.length,d,u;for(d=0;d{class e extends Md{static id="time";static defaults={bounds:"data",adapters:{},time:{parser:!1,unit:!1,round:!1,isoWeekday:!1,minUnit:"millisecond",displayFormats:{}},ticks:{source:"auto",callback:!1,major:{enabled:!1}}};constructor(t){super(t),this._cache={data:[],labels:[],all:[]},this._unit="day",this._majorUnit=void 0,this._offsets={},this._normalized=!1,this._parseOpts=void 0}init(t,n={}){let i=t.time||(t.time={}),s=this._adapter=new pme._date(t.adapters.date);s.init(n),z0(i.displayFormats,s.formats()),this._parseOpts={parser:i.parser,round:i.round,isoWeekday:i.isoWeekday},super.init(t),this._normalized=n.normalized}parse(t,n){return t===void 0?null:WR(this,t)}beforeLayout(){super.beforeLayout(),this._cache={data:[],labels:[],all:[]}}determineDataLimits(){let t=this.options,n=this._adapter,i=t.time.unit||"day",{min:s,max:d,minDefined:u,maxDefined:f}=this.getUserBounds();function _(C){!u&&!isNaN(C.min)&&(s=Math.min(s,C.min)),!f&&!isNaN(C.max)&&(d=Math.max(d,C.max))}(!u||!f)&&(_(this._getLabelBounds()),(t.bounds!=="ticks"||t.ticks.source!=="labels")&&_(this.getMinMax(!1))),s=ka(s)&&!isNaN(s)?s:+n.startOf(Date.now(),i),d=ka(d)&&!isNaN(d)?d:+n.endOf(Date.now(),i)+1,this.min=Math.min(s,d-1),this.max=Math.max(s+1,d)}_getLabelBounds(){let t=this.getLabelTimestamps(),n=Number.POSITIVE_INFINITY,i=Number.NEGATIVE_INFINITY;return t.length&&(n=t[0],i=t[t.length-1]),{min:n,max:i}}buildTicks(){let t=this.options,n=t.time,i=t.ticks,s=i.source==="labels"?this.getLabelTimestamps():this._generate();t.bounds==="ticks"&&s.length&&(this.min=this._userMin||s[0],this.max=this._userMax||s[s.length-1]);let d=this.min,u=this.max,f=IB(s,d,u);return this._unit=n.unit||(i.autoSkip?QR(n.minUnit,this.min,this.max,this._getLabelCapacity(d)):K0e(this,f.length,n.minUnit,this.min,this.max)),this._majorUnit=!i.major.enabled||this._unit==="year"?void 0:X0e(this._unit),this.initOffsets(s),t.reverse&&f.reverse(),JR(this,f,this._majorUnit)}afterAutoSkip(){this.options.offsetAfterAutoskip&&this.initOffsets(this.ticks.map(t=>+t.value))}initOffsets(t=[]){let n=0,i=0,s,d;this.options.offset&&t.length&&(s=this.getDecimalForValue(t[0]),t.length===1?n=1-s:n=(this.getDecimalForValue(t[1])-s)/2,d=this.getDecimalForValue(t[t.length-1]),t.length===1?i=d:i=(d-this.getDecimalForValue(t[t.length-2]))/2);let u=t.length<3?.5:.25;n=_r(n,0,u),i=_r(i,0,u),this._offsets={start:n,end:i,factor:1/(n+1+i)}}_generate(){let t=this._adapter,n=this.min,i=this.max,s=this.options,d=s.time,u=d.unit||QR(d.minUnit,n,i,this._getLabelCapacity(n)),f=Kn(s.ticks.stepSize,1),_=u==="week"?d.isoWeekday:!1,C=Sd(_)||_===!0,x={},y=n,P,S;if(C&&(y=+t.startOf(y,"isoWeek",_)),y=+t.startOf(y,C?"day":u),t.diff(i,n,u)>1e5*f)throw new Error(n+" and "+i+" are too far apart with stepSize of "+f+" "+u);let M=s.ticks.source==="data"&&this.getDataTimestamps();for(P=y,S=0;P+D)}getLabelForValue(t){let n=this._adapter,i=this.options.time;return i.tooltipFormat?n.format(t,i.tooltipFormat):n.format(t,i.displayFormats.datetime)}format(t,n){let s=this.options.time.displayFormats,d=this._unit,u=n||s[d];return this._adapter.format(t,u)}_tickFormatFunction(t,n,i,s){let d=this.options,u=d.ticks.callback;if(u)return oa(u,[t,n,i],this);let f=d.time.displayFormats,_=this._unit,C=this._majorUnit,x=_&&f[_],y=C&&f[C],P=i[n],S=C&&y&&P&&P.major;return this._adapter.format(t,s||(S?y:x))}generateTickLabels(t){let n,i,s;for(n=0,i=t.length;n0?f:1}getDataTimestamps(){let t=this._cache.data||[],n,i;if(t.length)return t;let s=this.getMatchingVisibleMetas();if(this._normalized&&s.length)return this._cache.data=s[0].controller.getAllParsedValues(this);for(n=0,i=s.length;n=e[n].pos&&o<=e[i].pos&&({lo:n,hi:i}=cc(e,"pos",o)),{pos:s,time:u}=e[n],{pos:d,time:f}=e[i]):(o>=e[n].time&&o<=e[i].time&&({lo:n,hi:i}=cc(e,"time",o)),{time:s,pos:u}=e[n],{time:d,pos:f}=e[i]);let _=d-s;return _?u+(f-u)*(o-s)/_:u}var IM=class extends EM{static id="timeseries";static defaults=EM.defaults;constructor(o){super(o),this._table=[],this._minPos=void 0,this._tableRange=void 0}initOffsets(){let o=this._getTimestampsForTable(),t=this._table=this.buildLookupTable(o);this._minPos=lC(t,this.min),this._tableRange=lC(t,this.max)-this._minPos,super.initOffsets(o)}buildLookupTable(o){let{min:t,max:n}=this,i=[],s=[],d,u,f,_,C;for(d=0,u=o.length;d=t&&_<=n&&i.push(_);if(i.length<2)return[{time:t,pos:0},{time:n,pos:1}];for(d=0,u=i.length;di-s)}_getTimestampsForTable(){let o=this._cache.all||[];if(o.length)return o;let t=this.getDataTimestamps(),n=this.getLabelTimestamps();return t.length&&n.length?o=this.normalize(t.concat(n)):o=t.length?t:n,o=this._cache.all=o,o}getDecimalForValue(o){return(lC(this._table,o)-this._minPos)/this._tableRange}getValueForPixel(o){let t=this._offsets,n=this.getDecimalForPixel(o)/t.factor-t.end;return lC(this._table,n*this._tableRange+this._minPos,!0)}},eue=Object.freeze({__proto__:null,CategoryScale:k0e,LinearScale:PM,LogarithmicScale:TM,RadialLinearScale:DM,TimeScale:EM,TimeSeriesScale:IM}),Gp=[cme,Bde,I0e,eue];var tue=e=>({display:e});function iue(e,o){if(e&1&&(l(0,"mat-option",6),c(1),r()),e&2){let t=o.$implicit;g("value",t.id),a(),v(" ",t.name," ")}}Tl.register(...Gp);var vC=(()=>{class e{constructor(){this.homeService=T(R0),this.route=T(Ie),this.dateUtils=T(Zt),this.officeId=new it,this.timescale=new it,this.hideOutput=!0,this.route.data.subscribe(t=>{this.officeData=t.offices})}ngOnInit(){this.getChartData(),this.initializeControls()}initializeControls(){this.officeId.patchValue(1),this.timescale.patchValue("Day")}getChartData(){fl(this.officeId.valueChanges,this.timescale.valueChanges).pipe(lF(1)).subscribe(()=>{let t=this.officeId.value,n=this.timescale.value;switch(n){case"Day":let i=this.homeService.getClientTrendsByDay(t),s=this.homeService.getLoanTrendsByDay(t);d0([i,s]).subscribe(C=>{let x=this.getLabels(n),y=this.getCounts(C[0],x,n,"client"),P=this.getCounts(C[1],x,n,"loan");this.setChart(x,y,P),this.hideOutput=!1});break;case"Week":let d=this.homeService.getClientTrendsByWeek(t),u=this.homeService.getLoanTrendsByWeek(t);d0([d,u]).subscribe(C=>{let x=this.getLabels(n),y=this.getCounts(C[0],x,n,"client"),P=this.getCounts(C[1],x,n,"loan");this.setChart(x,y,P),this.hideOutput=!1});break;case"Month":let f=this.homeService.getClientTrendsByMonth(t),_=this.homeService.getLoanTrendsByMonth(t);d0([f,_]).subscribe(C=>{let x=this.getLabels(n),y=this.getCounts(C[0],x,n,"client"),P=this.getCounts(C[1],x,n,"loan");this.setChart(x,y,P),this.hideOutput=!1});break}})}getLabels(t){let n=new Date,i=[];switch(t){case"Day":for(;i.length<12;){n.setDate(n.getDate()-1);let d=this.dateUtils.formatDate(n,"d/M");i.push(d)}break;case"Week":let s=new Date(n.getFullYear(),0,1);for(;i.length<12;){n.setDate(n.getDate()-7);let d=Math.ceil(((n.getTime()-s.getTime())/864e5+s.getDay()+1)/7);i.push(d)}break;case"Month":for(;i.length<12;){let d=this.dateUtils.formatDate(n,"MMMM");i.push(d),n.setMonth(n.getMonth()-1)}break}return i.reverse()}getCounts(t,n,i,s){let d=[];switch(i){case"Day":n.forEach(u=>{let f=t.find(_=>this.dateUtils.formatDate(_.days,"d/M")===u);d=this.updateCount(f,d,s)});break;case"Week":n.forEach(u=>{let f=t.find(_=>_.Weeks===u);d=this.updateCount(f,d,s)});break;case"Month":n.forEach(u=>{let f=t.find(_=>_.Months===u);d=this.updateCount(f,d,s)});break}return d}updateCount(t,n,i){if(t)switch(i){case"client":n.push(t.count);break;case"loan":n.push(t.lcount);break}else n.push(0);return n}setChart(t,n,i){this.chart?(this.chart.data.labels=t,this.chart.data.datasets[0].data=n,this.chart.data.datasets[1].data=i,this.chart.update()):this.chart=new Tl("client-trends-bar",{type:"line",data:{labels:t,datasets:[{label:"New Clients",data:n,backgroundColor:"dodgerblue",borderColor:"dodgerblue",borderWidth:2,fill:!1},{label:"Loans Disbursed",data:i,backgroundColor:"red",borderColor:"red",borderWidth:2,fill:!1}]},options:{responsive:!0,scales:{y:{min:0,title:{display:!0,text:"Values",color:"#1074B9"}}}}})}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275cmp=me({type:e,selectors:[["mifosx-client-trends-bar"]],decls:27,vars:20,consts:[[1,"card"],[1,"header"],[1,"flex-100"],["icon","chart-line"],["id","office",1,"flex-94"],[3,"formControl"],[3,"value"],[3,"ngStyle"],["id","client-trends-bar","width","800","height","465",1,"fallback"],["id","timescale","appearance","legacy",3,"formControl"],["value","Day"],["value","Week"],["value","Month"]],template:function(n,i){n&1&&(l(0,"mat-card",0)(1,"mat-card-header",1)(2,"h3",2),b(3,"fa-icon",3),c(4),p(5,"translate"),l(6,"div")(7,"mat-form-field",4)(8,"mat-label"),c(9),p(10,"translate"),r(),l(11,"mat-select",5),Se(12,iue,2,2,"mat-option",6,Pe),r()()()()(),l(14,"mat-card-content")(15,"div",7),b(16,"canvas",8),r(),l(17,"mat-button-toggle-group",9)(18,"mat-button-toggle",10),c(19),p(20,"translate"),r(),l(21,"mat-button-toggle",11),c(22),p(23,"translate"),r(),l(24,"mat-button-toggle",12),c(25),p(26,"translate"),r()()()()),n&2&&(a(4),v(" \xA0\xA0 ",m(5,8,"labels.inputs.Client Trends")," "),a(5),h(m(10,10,"labels.inputs.Office")),a(2),g("formControl",i.officeId),a(),we(i.officeData),a(3),g("ngStyle",Nt(18,tue,i.hideOutput?"none":"block")),a(2),g("formControl",i.timescale),a(2),h(m(20,12,"labels.buttons.Day")),a(3),h(m(23,14,"labels.buttons.Week")),a(3),h(m(26,16,"labels.buttons.Month")))},dependencies:[ue,ns,fe,Ue,_n,$e,Je,Fe,Be,gt,ft,sa,ke,Mp,Dp,he],styles:[".card[_ngcontent-%COMP%]{min-width:18.5rem;padding:0}.card[_ngcontent-%COMP%] .header[_ngcontent-%COMP%] :where(#office[_ngcontent-%COMP%]){margin-bottom:-1.2em}.card[_ngcontent-%COMP%] .header[_ngcontent-%COMP%] :where(#office[_ngcontent-%COMP%]) :where(mat-label[_ngcontent-%COMP%]){color:#000000de}.card[_ngcontent-%COMP%] :where(#timescale[_ngcontent-%COMP%]){margin:2% 50%;transform:translate(-50%)}.card[_ngcontent-%COMP%] .fallback[_ngcontent-%COMP%]{overflow-x:auto;max-width:100%;min-height:16.5rem}.dark-theme[_nghost-%COMP%] .card[_ngcontent-%COMP%] .header[_ngcontent-%COMP%] :where(#office[_ngcontent-%COMP%]) :where(mat-label[_ngcontent-%COMP%]), .dark-theme [_nghost-%COMP%] .card[_ngcontent-%COMP%] .header[_ngcontent-%COMP%] :where(#office[_ngcontent-%COMP%]) :where(mat-label[_ngcontent-%COMP%]){color:#fff}"]})}}return e})();var nue=e=>({display:e});function oue(e,o){if(e&1&&(l(0,"mat-option",6),c(1),r()),e&2){let t=o.$implicit;g("value",t.id),a(),v(" ",t.name," ")}}function aue(e,o){e&1&&(l(0,"div",9)(1,"p"),c(2),p(3,"translate"),r()()),e&2&&(a(2),h(m(3,1,"labels.text.No Data")))}Tl.register(...Gp);var xC=(()=>{class e{constructor(){this.homeService=T(R0),this.route=T(Ie),this.officeId=new it,this.hideOutput=!0,this.showFallback=!0,this.route.data.subscribe(t=>{this.officeData=t.offices})}ngOnInit(){this.getChartData(),this.officeId.patchValue(1)}getChartData(){this.officeId.valueChanges.subscribe(t=>{this.homeService.getDisbursedAmount(t).subscribe(n=>{let i=Object.entries(n[0]).map(s=>s[1]);i[0]===0&&i[1]===0?(this.showFallback=!0,this.hideOutput=!0):(this.setChart(i),this.showFallback=!1,this.hideOutput=!1)})})}setChart(t){this.chart?(this.chart.data.datasets[0].data=t,this.chart.update()):this.chart=new Tl("disbursement-pie",{type:"doughnut",data:{labels:["Pending","Disbursed"],datasets:[{backgroundColor:["dodgerblue","red"],data:t}]},options:{layout:{padding:{top:10,bottom:15}}}})}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275cmp=me({type:e,selectors:[["mifosx-amount-disbursed-pie"]],decls:18,vars:11,consts:[[1,"card"],[1,"header"],[1,"flex-100"],["icon","money-bill"],["id","office",1,"flex-94"],[3,"formControl"],[3,"value"],[3,"ngStyle"],["id","disbursement-pie","width","800","height","600"],[1,"fallback","align-center-center"]],template:function(n,i){n&1&&(l(0,"mat-card",0)(1,"mat-card-header",1)(2,"h3",2),b(3,"fa-icon",3),c(4),p(5,"translate"),l(6,"div")(7,"mat-form-field",4)(8,"mat-label"),c(9),p(10,"translate"),r(),l(11,"mat-select",5),Se(12,oue,2,2,"mat-option",6,Pe),r()()()()(),l(14,"mat-card-content")(15,"div",7),b(16,"canvas",8),r(),E(17,aue,4,3,"div",9),r()()),n&2&&(a(4),v(" \xA0\xA0 ",m(5,5,"labels.inputs.Amount Pending / Disbursed")," "),a(5),h(m(10,7,"labels.inputs.Office")),a(2),g("formControl",i.officeId),a(),we(i.officeData),a(3),g("ngStyle",Nt(9,nue,i.hideOutput?"none":"block")),a(2),I(i.showFallback?17:-1))},dependencies:[ue,ns,fe,Ue,_n,$e,Je,Fe,Be,gt,ft,sa,ke,he],styles:[".card[_ngcontent-%COMP%]{min-width:18.5rem;padding:0}.card[_ngcontent-%COMP%] .header[_ngcontent-%COMP%] :where(#office[_ngcontent-%COMP%]){margin-bottom:-1.2em}.card[_ngcontent-%COMP%] .header[_ngcontent-%COMP%] :where(#office[_ngcontent-%COMP%]) :where(mat-label[_ngcontent-%COMP%]){color:#000000de}.card[_ngcontent-%COMP%] .fallback[_ngcontent-%COMP%]{height:20rem}.dark-theme[_nghost-%COMP%] .card[_ngcontent-%COMP%] .header[_ngcontent-%COMP%] :where(#office[_ngcontent-%COMP%]) :where(mat-label[_ngcontent-%COMP%]), .dark-theme [_nghost-%COMP%] .card[_ngcontent-%COMP%] .header[_ngcontent-%COMP%] :where(#office[_ngcontent-%COMP%]) :where(mat-label[_ngcontent-%COMP%]){color:#fff}"]})}}return e})();var rue=e=>({display:e});function lue(e,o){if(e&1&&(l(0,"mat-option",6),c(1),r()),e&2){let t=o.$implicit;g("value",t.id),a(),v(" ",t.name," ")}}function sue(e,o){e&1&&(l(0,"div",9)(1,"p"),c(2),p(3,"translate"),r()()),e&2&&(a(2),h(m(3,1,"labels.text.No Data")))}Tl.register(...Gp);var bC=(()=>{class e{constructor(){this.homeService=T(R0),this.route=T(Ie),this.officeId=new it,this.hideOutput=!0,this.showFallback=!1,this.route.data.subscribe(t=>{this.officeData=t.offices})}ngOnInit(){this.getChartData(),this.officeId.patchValue(1)}getChartData(){this.officeId.valueChanges.subscribe(t=>{this.homeService.getCollectedAmount(t).subscribe(n=>{let i=Object.entries(n[0]).map(s=>s[1]);i[0]===0&&i[1]===0?(this.showFallback=!0,this.hideOutput=!0):(this.setChart(i),this.hideOutput=!1,this.showFallback=!1)})})}setChart(t){this.chart?(this.chart.data.datasets[0].data=t,this.chart.update()):this.chart=new Tl("collection-pie",{type:"doughnut",data:{labels:["Pending","Collected"],datasets:[{backgroundColor:["dodgerblue","red"],data:t}]},options:{layout:{padding:{top:10,bottom:15}}}})}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275cmp=me({type:e,selectors:[["mifosx-amount-collected-pie"]],decls:18,vars:11,consts:[[1,"card"],[1,"header"],[1,"flex-100"],["icon","donate"],["id","office",1,"flex-94"],[3,"formControl"],[3,"value"],[3,"ngStyle"],["id","collection-pie","width","800","height","600"],[1,"fallback","align-center-center"]],template:function(n,i){n&1&&(l(0,"mat-card",0)(1,"mat-card-header",1)(2,"h3",2),b(3,"fa-icon",3),c(4),p(5,"translate"),l(6,"div")(7,"mat-form-field",4)(8,"mat-label"),c(9),p(10,"translate"),r(),l(11,"mat-select",5),Se(12,lue,2,2,"mat-option",6,Pe),r()()()()(),l(14,"mat-card-content")(15,"div",7),b(16,"canvas",8),r(),E(17,sue,4,3,"div",9),r()()),n&2&&(a(4),v(" \xA0\xA0 ",m(5,5,"labels.inputs.Amount Collected")," "),a(5),h(m(10,7,"labels.inputs.Office")),a(2),g("formControl",i.officeId),a(),we(i.officeData),a(3),g("ngStyle",Nt(9,rue,i.hideOutput?"none":"block")),a(2),I(i.showFallback?17:-1))},dependencies:[ue,ns,fe,Ue,_n,$e,Je,Fe,Be,gt,ft,sa,ke,he],styles:[".card[_ngcontent-%COMP%]{min-width:18.5rem;padding:0}.card[_ngcontent-%COMP%] .header[_ngcontent-%COMP%] :where(#office[_ngcontent-%COMP%]){margin-bottom:-1.2em}.card[_ngcontent-%COMP%] .header[_ngcontent-%COMP%] :where(#office[_ngcontent-%COMP%]) :where(mat-label[_ngcontent-%COMP%]){color:#000000de}.card[_ngcontent-%COMP%] .fallback[_ngcontent-%COMP%]{height:20rem}.dark-theme[_nghost-%COMP%] .card[_ngcontent-%COMP%] .header[_ngcontent-%COMP%] :where(#office[_ngcontent-%COMP%]) :where(mat-label[_ngcontent-%COMP%]), .dark-theme [_nghost-%COMP%] .card[_ngcontent-%COMP%] .header[_ngcontent-%COMP%] :where(#office[_ngcontent-%COMP%]) :where(mat-label[_ngcontent-%COMP%]){color:#fff}"]})}}return e})();function cue(e,o){if(e&1&&(l(0,"mat-option",5)(1,"span"),c(2),r()()),e&2){let t=o.$implicit;g("routerLink",t.path),a(2),h(t.activity)}}var yC=(()=>{class e{constructor(){this.router=T(qe),this.searchText=new it,this.allActivities=A_,this.userActivity=JSON.parse(localStorage.getItem("mifosXLocation"))}ngOnInit(){this.recentActivities=this.getRecentActivities(),this.frequentActivities=this.getFrequentActivities(),this.setFilteredActivities()}getRecentActivities(){let t=this.userActivity.reverse(),n=[];return t.forEach(s=>{n.includes(s)||n.push(s)}),n.filter(s=>!["/","/login","/home","/dashboard"].includes(s)).slice(0,8)}getFrequentActivities(){let t={},n=this.userActivity?.length;for(;n;){let d=this.userActivity[--n];t[d]=(t[d]||0)+1}return Object.entries(t).sort((d,u)=>u[1]-d[1]).map(d=>d[0]).filter(d=>!["/","/login","/home","/dashboard"].includes(d)).slice(0,8)}navigatetoActivity(t){this.router.navigateByUrl(t)}setFilteredActivities(){this.filteredActivities=this.searchText.valueChanges.pipe(Mn(t=>typeof t=="string"?t:t.activity),Mn(t=>t?this.filterActivity(t):this.allActivities))}filterActivity(t){let n=t.toLowerCase();return this.allActivities.filter(i=>i.activity.toLowerCase().indexOf(n)===0)}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275cmp=me({type:e,selectors:[["mifosx-dashboard"]],decls:22,vars:7,consts:[["activitySearch","matAutocomplete"],[1,"container"],[1,"card","layout-column","gap-40px"],[1,"layout-row","search"],["matInput","",3,"matAutocomplete","formControl"],[3,"routerLink"],[1,"layout-row","top-card"],[1,"trends-bar"],[1,"layout-row","bottom-card"],[1,"amount-disbursed"],[1,"amount-collected"]],template:function(n,i){if(n&1&&(l(0,"div",1)(1,"mat-card",2)(2,"div",3)(3,"mat-card-content")(4,"mat-form-field")(5,"mat-label"),c(6),p(7,"translate"),r(),b(8,"input",4),r(),l(9,"mat-autocomplete",null,0),Se(11,cue,3,2,"mat-option",5,Pe),p(13,"async"),r()()(),l(14,"div",6)(15,"div",7),b(16,"mifosx-client-trends-bar"),r()(),l(17,"div",8)(18,"div",9),b(19,"mifosx-amount-disbursed-pie"),r(),l(20,"div",10),b(21,"mifosx-amount-collected-pie"),r()()()()),n&2){let s=xe(10);a(6),h(m(7,3,"labels.placeholders.Search Activity")),a(2),g("matAutocomplete",s)("formControl",i.searchText),a(3),we(m(13,5,i.filteredActivities))}},dependencies:[ue,fe,st,Ue,_n,Ae,$e,Je,Fe,Be,ze,ft,er,Za,vC,xC,bC,Xa,he],styles:[".card[_ngcontent-%COMP%]{box-sizing:border-box;padding:2%;display:flex;flex-direction:column;overflow-x:hidden}.card[_ngcontent-%COMP%] .search[_ngcontent-%COMP%]{width:100%;padding:12px}.card[_ngcontent-%COMP%] .search[_ngcontent-%COMP%] mat-card-content[_ngcontent-%COMP%]{width:100%}.card[_ngcontent-%COMP%] .search[_ngcontent-%COMP%] mat-form-field[_ngcontent-%COMP%]{width:100%}.card[_ngcontent-%COMP%] .top-card[_ngcontent-%COMP%]{flex:1 0 100%}.card[_ngcontent-%COMP%] .top-card[_ngcontent-%COMP%] .trends-bar[_ngcontent-%COMP%]{width:100%;flex:1 0 100%}.card[_ngcontent-%COMP%] .bottom-card[_ngcontent-%COMP%]{display:flex;flex-flow:row wrap;gap:2px}.card[_ngcontent-%COMP%] .bottom-card[_ngcontent-%COMP%] .amount-collected[_ngcontent-%COMP%], .card[_ngcontent-%COMP%] .bottom-card[_ngcontent-%COMP%] .amount-disbursed[_ngcontent-%COMP%]{flex:1 0 calc(40% - 10px);padding:0;margin:10px}@media screen and (width <= 768px){.top-card[_ngcontent-%COMP%], .bottom-card[_ngcontent-%COMP%]{flex-direction:column}.top-card[_ngcontent-%COMP%] .trends-bar[_ngcontent-%COMP%], .top-card[_ngcontent-%COMP%] .amount-collected[_ngcontent-%COMP%], .top-card[_ngcontent-%COMP%] .amount-disbursed[_ngcontent-%COMP%], .bottom-card[_ngcontent-%COMP%] .trends-bar[_ngcontent-%COMP%], .bottom-card[_ngcontent-%COMP%] .amount-collected[_ngcontent-%COMP%], .bottom-card[_ngcontent-%COMP%] .amount-disbursed[_ngcontent-%COMP%]{flex:1 0 100%;width:100%;margin:10px 0}}"]})}}return e})();var Hr=(()=>{class e{constructor(){this.accountingService=T(Ui)}resolve(){return this.accountingService.getOffices()}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275prov=Re({token:e,factory:e.\u0275fac})}}return e})();var pue=[_o.withShell([{path:"",redirectTo:"/home",pathMatch:"full"},{path:"home",component:k_,data:{title:"Home"}},{path:"dashboard",component:yC,data:{title:"Dashboard",breadcrumb:"Dashboard"},resolve:{offices:Hr}}])],C9=(()=>{class e{static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275mod=Gi({type:e})}static{this.\u0275inj=Hi({providers:[Hr],imports:[gn.forChild(pue),gn]})}}return e})();var v9=(()=>{class e{static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275mod=Gi({type:e})}static{this.\u0275inj=Hi({imports:[kg,oo,ha,C9,yp,k_,yC,bC,xC,vC,F_,x_]})}}return e})();function mue(e,o){e&1&&(l(0,"mat-error"),c(1),p(2,"translate"),l(3,"strong"),c(4),p(5,"translate"),r()()),e&2&&(a(),v(" ",m(2,2,"labels.inputs.Username")," "),a(3),h(m(5,4,"labels.commons.is required")))}function due(e,o){e&1&&(l(0,"span",3),b(1,"fa-icon",11),r())}function uue(e,o){e&1&&b(0,"fa-icon",13)}function fue(e,o){e&1&&b(0,"fa-icon",14)}function hue(e,o){if(e&1){let t=Y();l(0,"button",12),R("mousedown",function(){V(t);let i=w(2);return q(i.togglePasswordVisibility())})("mouseup",function(){V(t);let i=w(2);return q(i.togglePasswordVisibility())}),E(1,uue,1,0,"fa-icon",13),E(2,fue,1,0,"fa-icon",14),r()}if(e&2){let t=w(2);a(),I(t.passwordInputType==="password"?1:-1),a(),I(t.passwordInputType==="text"?2:-1)}}function gue(e,o){e&1&&(l(0,"mat-error"),c(1),p(2,"translate"),l(3,"strong"),c(4),p(5,"translate"),r()()),e&2&&(a(),v(" ",m(2,2,"labels.inputs.Password")," "),a(3),h(m(5,4,"labels.commons.pass is required")))}function _ue(e,o){e&1&&b(0,"mat-progress-bar",8)}function Cue(e,o){e&1&&b(0,"mat-spinner",10),e&2&&g("diameter",20)}function vue(e,o){if(e&1){let t=Y();l(0,"div")(1,"form",1),R("ngSubmit",function(){V(t);let i=w();return q(i.login())}),l(2,"mat-form-field",2)(3,"span",3),b(4,"fa-icon",4),r(),l(5,"mat-label"),c(6),p(7,"translate"),r(),b(8,"input",5),E(9,mue,6,6,"mat-error"),r(),l(10,"mat-form-field",2),E(11,due,2,0,"span",3),l(12,"mat-label"),c(13),p(14,"translate"),r(),b(15,"input",6),E(16,hue,3,2,"button",7),E(17,gue,6,6,"mat-error"),r(),E(18,_ue,1,0,"mat-progress-bar",8),l(19,"button",9),c(20),p(21,"translate"),E(22,Cue,1,1,"mat-spinner",10),r()()()}if(e&2){let t=w();a(),g("formGroup",t.loginForm),a(5),h(m(7,13,"labels.inputs.Username")),a(3),I(t.loginForm.controls.username.hasError("required")?9:-1),a(2),I(t.loginForm.controls.password.value?-1:11),a(2),h(m(14,15,"labels.inputs.Password")),a(2),g("type",Le(t.passwordInputType)),a(),I(t.loginForm.controls.password.value&&!t.loading?16:-1),a(),I(t.loginForm.controls.password.hasError("required")?17:-1),a(),I(t.loading?18:-1),a(),g("disabled",!t.loginForm.valid),a(),v(" ",m(21,17,"labels.buttons.Login")," "),a(2),I(t.loading?22:-1)}}function xue(e,o){e&1&&b(0,"mat-spinner",10),e&2&&g("diameter",20)}function bue(e,o){if(e&1){let t=Y();l(0,"div",15)(1,"button",16),R("click",function(){V(t);let i=w(2);return q(i.loginOIDC())}),c(2),p(3,"translate"),E(4,xue,1,1,"mat-spinner",10),r()()}if(e&2){let t=w(2);a(2),v(" ",m(3,2,"labels.buttons.Login")," "),a(2),I(t.loading?4:-1)}}function yue(e,o){if(e&1){let t=Y();l(0,"div")(1,"p"),c(2,"Welcome! You are logged in."),r(),l(3,"button",17),R("click",function(){V(t);let i=w(2);return q(i.logout())}),c(4,"Logout"),r(),l(5,"button",17),R("click",function(){V(t);let i=w(2);return q(i.loadProtectedData())}),c(6,"Load Protected Data"),r(),l(7,"pre"),c(8),p(9,"json"),r()()}if(e&2){let t=w(2);a(8),h(m(9,1,t.protectedData))}}function Sue(e,o){if(e&1&&(l(0,"div",0),E(1,bue,5,4,"div",15),E(2,yue,10,3,"div"),r()),e&2){let t=w();a(),I(t.isLoggedIn?-1:1),a(),I(t.isLoggedIn?2:-1)}}var SC=(()=>{class e{constructor(){this.formBuilder=T(WF),this.authenticationService=T(Wo),this.authService=T(Oa),this.passwordInputType="password",this.loading=!1,this.oidcServerEnabled=un.OIDC.oidcServerEnabled,this.enableRememberMe=un.enableRememberMe===!0}ngOnInit(){this.createLoginForm()}login(){this.loading=!0,this.loginForm.disable(),this.authenticationService.login(this.loginForm.value).pipe(Js(()=>{this.loginForm.reset(),this.loginForm.markAsPristine(),this.loginForm.enable(),this.loading=!1})).subscribe()}loginOIDC(){this.authService.login()}getUsers(){this.authService.getUsers()}logout(){this.authService.logout()}togglePasswordVisibility(){this.passwordInputType=this.passwordInputType==="password"?"text":"password"}createLoginForm(){this.loginForm=this.formBuilder.group({username:["",se.required],password:["",[se.required,se.minLength(8)]],remember:!1})}getErrorMessage(t){let n=this.loginForm.get(t);return n?.hasError("required")?"This field is required":n?.hasError("minlength")?`Minimum length is ${n.errors?.minlength.requiredLength}`:""}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275cmp=me({type:e,selectors:[["mifosx-login-form"]],decls:2,vars:2,consts:[[1,"container","container-margin"],["id","login-form",1,"layout-column",3,"ngSubmit","formGroup"],[1,"login-input","flex-align-center"],["matPrefix","",1,"m-r-10"],["icon","user-circle","size","lg"],["matInput","","type","text","autocomplete","off","formControlName","username"],["matInput","","formControlName","password",3,"type"],["type","button","matSuffix","","mat-icon-button",""],["mode","indeterminate"],["mat-raised-button","","color","primary",1,"login-button-first","flex-align-center",3,"disabled"],[3,"diameter"],["icon","lock","size","lg"],["type","button","matSuffix","","mat-icon-button","",3,"mousedown","mouseup"],["icon","eye"],["icon","eye-slash"],[1,"layout-column","align-center-center"],["mat-raised-button","","color","primary",1,"login-button-first","flex-align-center",3,"click"],[3,"click"]],template:function(n,i){n&1&&(E(0,vue,23,19,"div"),E(1,Sue,3,2,"div",0)),n&2&&(I(i.oidcServerEnabled?-1:0),a(),I(i.oidcServerEnabled?1:-1))},dependencies:[ue,fe,tt,st,Ue,Xe,Ze,et,Fe,Be,ut,ai,ze,ve,y0,ke,wi,os,P0,DF,he],styles:["#login-form[_ngcontent-%COMP%] .login-input[_ngcontent-%COMP%]{width:14rem;margin-bottom:.1rem}#login-form[_ngcontent-%COMP%] [matPrefix][_ngcontent-%COMP%] fa-icon[_ngcontent-%COMP%]{font-size:16px;position:absolute;top:50%;left:190px;transform:translateY(-50%)}#login-form[_ngcontent-%COMP%] .login-button-first[_ngcontent-%COMP%]{width:14rem;margin-top:.8rem;background-color:#1976d2;color:#fff;border-radius:8px;margin-bottom:.5rem}#login-form[_ngcontent-%COMP%] mat-spinner[_ngcontent-%COMP%]{float:right;margin:.5rem 0} .mat-mdc-form-field-infix{width:144px!important}.container-margin[_ngcontent-%COMP%]{margin-top:8rem;margin-bottom:8rem}"]})}}return e})();var jp=e=>{let o=e.get("password"),t=e.get("repeatPassword");return o&&t&&o.value!==t.value?{passwordsDoNotMatch:!0}:null};function wue(e,o){e&1&&b(0,"fa-icon",12)}function Pue(e,o){e&1&&b(0,"fa-icon",13)}function Tue(e,o){if(e&1){let t=Y();l(0,"button",11),R("mousedown",function(){V(t);let i=w();return q(i.passwordInputType="text")})("mouseup",function(){V(t);let i=w();return q(i.passwordInputType="password")}),E(1,wue,1,0,"fa-icon",12),E(2,Pue,1,0,"fa-icon",13),r()}if(e&2){let t=w();a(),I(t.passwordInputType==="password"?1:-1),a(),I(t.passwordInputType==="text"?2:-1)}}function Mue(e,o){e&1&&(l(0,"mat-error"),c(1),p(2,"translate"),l(3,"strong"),c(4),p(5,"translate"),r()()),e&2&&(a(),v(" ",m(2,2,"labels.inputs.Password")," "),a(3),h(m(5,4,"labels.commons.is required")))}function Due(e,o){e&1&&(l(0,"mat-error"),c(1),p(2,"translate"),l(3,"strong"),c(4),p(5,"translate"),r()()),e&2&&(a(),v(" ",m(2,2,"labels.inputs.Password")," "),a(3),h(m(5,4,"labels.commons.is required")))}function Eue(e,o){e&1&&(l(0,"mat-error"),c(1),p(2,"translate"),l(3,"strong"),c(4),p(5,"translate"),r()()),e&2&&(a(),v(" ",m(2,2,"labels.commons.Password should be at least")," "),a(3),h(m(5,4,"labels.commons.12 characters long")))}function Iue(e,o){e&1&&(l(0,"mat-error"),c(1),p(2,"translate"),l(3,"strong"),c(4),p(5,"translate"),r()()),e&2&&(a(),v(" ",m(2,2,"labels.commons.Password should not be more than")," "),a(3),h(m(5,4,"labels.commons.50 characters long")))}function Oue(e,o){e&1&&(l(0,"mat-error"),c(1),p(2,"translate"),l(3,"strong"),c(4),p(5,"translate"),r(),c(6),p(7,"translate"),l(8,"strong"),c(9),p(10,"translate"),r(),c(11," ,"),l(12,"strong"),c(13),p(14,"translate"),r()()),e&2&&(a(),v(" ",m(2,5,"labels.commons.Password should include a")," "),a(3),h(m(5,7,"labels.commons.numeral")),a(2),v(" ",m(7,9,"labels.commons.and at")," "),a(3),h(m(10,11,"labels.commons.least one uppercase")),a(4),h(m(14,13,"labels.commons.lowercase and special character")))}function Aue(e,o){e&1&&(l(0,"p",8),c(1),p(2,"translate"),l(3,"strong"),c(4),p(5,"translate"),r()()),e&2&&(a(),v(" ",m(2,2,"labels.text.Passwords")," "),a(3),h(m(5,4,"labels.text.do not match")))}function Fue(e,o){e&1&&b(0,"mat-spinner",10),e&2&&g("diameter",20)}var wC=(()=>{class e{constructor(){this.formBuilder=T(nt),this.authenticationService=T(Wo),this.passwordsUtility=T(w0),this.loading=!1}ngOnInit(){this.createResetPasswordForm(),this.passwordInputType="password"}resetPassword(){this.loading=!0,this.resetPasswordForm.disable(),this.authenticationService.resetPassword(this.resetPasswordForm.value).pipe(Js(()=>{this.resetPasswordForm.reset(),this.resetPasswordForm.markAsPristine(),this.resetPasswordForm.enable(),this.loading=!1})).subscribe()}createResetPasswordForm(){this.resetPasswordForm=this.formBuilder.group({password:["",this.passwordsUtility.getPasswordValidators()],repeatPassword:["",se.required]},{validator:jp})}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275cmp=me({type:e,selectors:[["mifosx-reset-password"]],decls:30,vars:24,consts:[["id","reset-password-form",1,"layout-column",3,"ngSubmit","formGroup"],[1,"reset-password-input","flex-fill","align-center"],["matPrefix",""],["icon","lock","size","lg",1,"m-r-10"],["matInput","","required","","formControlName","password",3,"type"],["mat-button","","matSuffix","","mat-icon-button",""],["icon","check-circle","size","lg",1,"m-r-10"],["type","password","matInput","","required","","formControlName","repeatPassword"],[1,"reset-password-error"],["mat-raised-button","","color","primary",1,"reset-password-button","align-center",3,"disabled"],[3,"diameter"],["mat-button","","matSuffix","","mat-icon-button","",3,"mousedown","mouseup"],["icon","eye"],["icon","eye-slash"]],template:function(n,i){n&1&&(l(0,"p"),c(1),p(2,"translate"),r(),b(3,"mat-divider"),l(4,"form",0),R("ngSubmit",function(){return i.resetPassword()}),l(5,"mat-form-field",1)(6,"span",2),b(7,"fa-icon",3),r(),l(8,"mat-label"),c(9),p(10,"translate"),r(),b(11,"input",4),E(12,Tue,3,2,"button",5),E(13,Mue,6,6,"mat-error"),r(),l(14,"mat-form-field",1)(15,"span",2),b(16,"fa-icon",6),r(),l(17,"mat-label"),c(18),p(19,"translate"),r(),b(20,"input",7),E(21,Due,6,6,"mat-error"),E(22,Eue,6,6,"mat-error"),E(23,Iue,6,6,"mat-error"),E(24,Oue,15,15,"mat-error"),r(),E(25,Aue,6,6,"p",8),l(26,"button",9),c(27),p(28,"translate"),E(29,Fue,1,1,"mat-spinner",10),r()()),n&2&&(a(),v("",m(2,16,"labels.text.Please update your password"),":"),a(3),g("formGroup",i.resetPasswordForm),a(5),h(m(10,18,"labels.inputs.Password")),a(2),g("type",Le(i.passwordInputType)),a(),I(i.resetPasswordForm.controls.password.value&&!i.loading?12:-1),a(),I(i.resetPasswordForm.controls.password.hasError("required")?13:-1),a(5),h(m(19,20,"labels.inputs.Confirm Password")),a(3),I(i.resetPasswordForm.controls.password.hasError("required")?21:-1),a(),I(i.resetPasswordForm.controls.password.hasError("minlength")?22:-1),a(),I(i.resetPasswordForm.controls.password.hasError("maxlength")?23:-1),a(),I(i.resetPasswordForm.controls.password.hasError("pattern")&&!(i.resetPasswordForm.controls.password.hasError("minlength")||i.resetPasswordForm.controls.password.hasError("maxlength"))?24:-1),a(),I(i.resetPasswordForm.errors!=null&&i.resetPasswordForm.errors.passwordsDoNotMatch&&!i.resetPasswordForm.controls.password.hasError("required")&&!i.resetPasswordForm.controls.repeatPassword.hasError("required")?25:-1),a(),g("disabled",!i.resetPasswordForm.valid),a(),v(" ",m(28,22,"labels.buttons.Reset Password")," "),a(2),I(i.loading?29:-1))},dependencies:[ue,fe,tt,st,Ue,Xe,dt,Ze,et,Fe,Be,ut,ai,ze,ve,Ri,y0,ke,wi,P0,he],styles:["#reset-password-form[_ngcontent-%COMP%] .reset-password-input[_ngcontent-%COMP%]{width:14rem;margin-top:.6rem}#reset-password-form[_ngcontent-%COMP%] .reset-password-button[_ngcontent-%COMP%]{width:14rem;margin-top:1rem}#reset-password-form[_ngcontent-%COMP%] .reset-password-error[_ngcontent-%COMP%]{color:#f44336;font-size:80%;margin:0}#reset-password-form[_ngcontent-%COMP%] mat-spinner[_ngcontent-%COMP%]{float:right;margin:.5rem 0}"]})}}return e})();function kue(e,o){e&1&&(l(0,"p"),c(1),p(2,"translate"),r()),e&2&&(a(),v("",m(2,1,"labels.text.Please select a delivery method"),":"))}function Bue(e,o){if(e&1&&(l(0,"mat-radio-button",3),c(1),p(2,"translate"),p(3,"translate"),r()),e&2){let t=o.$implicit;g("value",t),a(),PF(" ",m(2,5,"labels.inputs.Send")," ",t.name," ",m(3,7,"labels.inputs.to")," ",t.target," ")}}function Rue(e,o){e&1&&b(0,"mat-spinner",5),e&2&&g("diameter",20)}function Nue(e,o){if(e&1){let t=Y();l(0,"form",1),R("ngSubmit",function(){V(t);let i=w();return q(i.requestOTP())}),l(1,"mat-radio-group",2),Se(2,Bue,4,9,"mat-radio-button",3,Pe),r(),l(4,"button",4),c(5),p(6,"translate"),E(7,Rue,1,1,"mat-spinner",5),r()()}if(e&2){let t=w();g("formGroup",t.twoFactorAuthenticationDeliveryMethodForm),a(2),we(t.twoFactorAuthenticationDeliveryMethods),a(2),g("disabled",!t.twoFactorAuthenticationDeliveryMethodForm.valid),a(),v(" ",m(6,4,"labels.buttons.Request OTP")," "),a(2),I(t.loading?7:-1)}}function Lue(e,o){e&1&&(l(0,"p"),c(1),p(2,"translate"),r()),e&2&&(a(),v("",m(2,1,"labels.text.Please enter the OTP"),":"))}function Vue(e,o){e&1&&(l(0,"mat-error"),c(1),p(2,"translate"),p(3,"translate"),l(4,"strong"),c(5),p(6,"translate"),r()()),e&2&&(a(),le(" ",m(2,3,"labels.inputs.OTP")," ",m(3,5,"labels.commons.is")," "),a(4),h(m(6,7,"labels.commons.required")))}function que(e,o){e&1&&b(0,"mat-spinner",5),e&2&&g("diameter",20)}function zue(e,o){e&1&&b(0,"mat-spinner",5),e&2&&g("diameter",20)}function Hue(e,o){if(e&1){let t=Y();l(0,"form",1),R("ngSubmit",function(){V(t);let i=w();return q(i.validateOTP())}),l(1,"mat-form-field",6)(2,"span",7),b(3,"fa-icon",8),r(),l(4,"mat-label"),c(5),p(6,"translate"),r(),b(7,"input",9),l(8,"mat-hint",10)(9,"strong"),c(10),p(11,"translate"),r(),c(12),r(),l(13,"mat-hint",11)(14,"strong"),c(15),p(16,"translate"),r(),c(17),p(18,"translate"),r(),E(19,Vue,7,9,"mat-error"),r(),l(20,"button",12),c(21),p(22,"translate"),E(23,que,1,1,"mat-spinner",5),r(),l(24,"button",13),R("click",function(){V(t);let i=w();return q(i.resendOTP())}),c(25),p(26,"translate"),E(27,zue,1,1,"mat-spinner",5),r()()}if(e&2){let t=w();g("formGroup",t.twoFactorAuthenticationForm),a(5),h(m(6,14,"labels.inputs.OTP")),a(5),v("",m(11,16,"labels.inputs.Delivery Method"),":"),a(2),v(" ",t.selectedTwoFactorAuthenticationDeliveryMethod.name," "),a(3),v("",m(16,18,"labels.inputs.Validity"),":"),a(2),le(" ",t.tokenValidityTime/60," ",m(18,20,"labels.inputs.mins")," "),a(2),I(t.twoFactorAuthenticationForm.controls.otp.hasError("required")?19:-1),a(),g("disabled",!t.twoFactorAuthenticationForm.valid),a(),v(" ",m(22,22,"labels.buttons.Validate OTP")," "),a(2),I(t.loading?23:-1),a(),g("disabled",t.loading||t.resendOTPLoading),a(),v(" ",m(26,24,"labels.buttons.Resend OTP")," "),a(2),I(t.resendOTPLoading?27:-1)}}var PC=(()=>{class e{constructor(){this.formBuilder=T(nt),this.authenticationService=T(Wo),this.otpRequested=!1,this.loading=!1,this.resendOTPLoading=!1}ngOnInit(){this.createTwoFactorAuthenticationDeliveryMethodForm(),this.authenticationService.getDeliveryMethods().subscribe(t=>{this.twoFactorAuthenticationDeliveryMethods=t})}requestOTP(){this.loading=!0,this.twoFactorAuthenticationDeliveryMethodForm.disable(),this.selectedTwoFactorAuthenticationDeliveryMethod=this.twoFactorAuthenticationDeliveryMethodForm.value.twoFactorAuthenticationDeliveryMethod,this.authenticationService.requestOTP(this.selectedTwoFactorAuthenticationDeliveryMethod).pipe(Js(()=>{this.twoFactorAuthenticationDeliveryMethodForm.reset(),this.twoFactorAuthenticationDeliveryMethodForm.markAsPristine(),this.twoFactorAuthenticationDeliveryMethodForm.enable(),this.loading=!1})).subscribe(t=>{this.createTwoFactorAuthenticationForm(),this.otpRequested=!0,this.tokenValidityTime=t.tokenLiveTimeInSec})}validateOTP(){this.loading=!0,this.twoFactorAuthenticationForm.disable(),this.authenticationService.validateOTP(this.twoFactorAuthenticationForm.value.otp).pipe(Js(()=>{this.twoFactorAuthenticationForm.reset(),this.twoFactorAuthenticationForm.markAsPristine(),this.twoFactorAuthenticationForm.enable(),this.loading=!1})).subscribe()}resendOTP(){this.resendOTPLoading=!0,this.twoFactorAuthenticationForm.disable(),this.authenticationService.requestOTP(this.selectedTwoFactorAuthenticationDeliveryMethod).pipe(Js(()=>{this.twoFactorAuthenticationForm.reset(),this.twoFactorAuthenticationForm.markAsPristine(),this.twoFactorAuthenticationForm.enable(),this.resendOTPLoading=!1})).subscribe()}createTwoFactorAuthenticationDeliveryMethodForm(){this.twoFactorAuthenticationDeliveryMethodForm=this.formBuilder.group({twoFactorAuthenticationDeliveryMethod:["",se.required]})}createTwoFactorAuthenticationForm(){this.twoFactorAuthenticationForm=this.formBuilder.group({otp:["",se.required]})}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275cmp=me({type:e,selectors:[["mifosx-two-factor-authentication"]],decls:9,vars:7,consts:[[1,"layout-column","two-factor-auth-form",3,"formGroup"],[1,"layout-column","two-factor-auth-form",3,"ngSubmit","formGroup"],["formControlName","twoFactorAuthenticationDeliveryMethod",1,"layout-column","align-center","radio-group-spacing"],[3,"value"],["mat-raised-button","","color","primary",1,"flex-fill","align-center",3,"disabled"],[3,"diameter"],[1,"two-factor-auth-input","flex-fill","align-center"],["matPrefix",""],["icon","user-shield",1,"m-r-10"],["type","password","matInput","","autocomplete","off","required","","formControlName","otp"],["align","start"],["align","end"],["mat-raised-button","","color","primary",1,"two-factor-auth-button","align-center",3,"disabled"],["type","button","mat-button","",1,"two-factor-auth-button","align-center",3,"click","disabled"]],template:function(n,i){n&1&&(l(0,"p")(1,"strong"),c(2),p(3,"translate"),r()(),b(4,"mat-divider"),E(5,kue,3,3,"p"),E(6,Nue,8,6,"form",0),E(7,Lue,3,3,"p"),E(8,Hue,28,26,"form",0)),n&2&&(a(2),h(m(3,5,"labels.text.Two Factor Authentication")),a(3),I(i.otpRequested?-1:5),a(),I(i.otpRequested?-1:6),a(),I(i.otpRequested?7:-1),a(),I(i.otpRequested?8:-1))},dependencies:[ue,fe,tt,st,Ue,Xe,dt,Ze,et,Fe,Be,ut,za,ze,ve,Ri,tr,ir,P0,y0,ke,he],styles:[".two-factor-auth-form[_ngcontent-%COMP%] mat-radio-button[_ngcontent-%COMP%]{margin-bottom:.5rem}.two-factor-auth-form[_ngcontent-%COMP%] mat-radio-button[_ngcontent-%COMP%]:last-child{margin-bottom:1rem}.two-factor-auth-form[_ngcontent-%COMP%] .two-factor-auth-button[_ngcontent-%COMP%]{width:14rem;margin-top:.5rem}.two-factor-auth-form[_ngcontent-%COMP%] .two-factor-auth-input[_ngcontent-%COMP%]{width:14rem}.two-factor-auth-form[_ngcontent-%COMP%] mat-spinner[_ngcontent-%COMP%]{float:right;margin:.5rem 0}.radio-group-spacing[_ngcontent-%COMP%]{display:flex;gap:2rem;flex-direction:row}@media (width <= 768px){.radio-group-spacing[_ngcontent-%COMP%]{flex-direction:column}}"]})}}return e})();function Gue(e,o){e&1&&b(0,"mifosx-server-selector",14)}function jue(e,o){e&1&&b(0,"mifosx-tenant-selector")}function $ue(e,o){e&1&&b(0,"mifosx-login-form")}function Uue(e,o){e&1&&b(0,"mifosx-reset-password")}function Wue(e,o){e&1&&b(0,"mifosx-two-factor-authentication")}var TC=(()=>{class e{constructor(){this.alertService=T(wr),this.settingsService=T(At),this.router=T(qe),this.environment=un,this.resetPassword=!1,this.twoFactorAuthenticationRequired=!1}ngOnInit(){this.alert$=this.alertService.alertEvent.subscribe(t=>{let n=t.type;n==="Password Expired"?(this.twoFactorAuthenticationRequired=!1,this.resetPassword=!0):n==="Two Factor Authentication Required"?(this.resetPassword=!1,this.twoFactorAuthenticationRequired=!0):n==="Authentication Success"&&(this.resetPassword=!1,this.twoFactorAuthenticationRequired=!1,this.router.navigate(["/"],{replaceUrl:!0}))})}ngOnDestroy(){this.alert$.unsubscribe()}reloadSettings(){this.settingsService.setTenantIdentifier(""),this.settingsService.setTenantIdentifier(un.fineractPlatformTenantId||"default"),this.settingsService.setTenantIdentifiers(un.fineractPlatformTenantIds.split(",")),this.settingsService.setServers(un.baseApiUrls.split(",")),window.location.reload()}displayTenantSelector(){return un.displayTenantSelector!=="false"}allowServerSwitch(){return un.allowServerSwitch!=="false"}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275cmp=me({type:e,selectors:[["mifosx-login"]],decls:88,vars:73,consts:[["resourcesMenu","matMenu"],["communityMenu","matMenu"],["contributeMenu","matMenu"],[1,"layout-row"],[1,"flex-70","layout-column","align-center","align-items-center","hide-lt-sm","cover"],[1,"cover-content"],[1,"mat-display-1","cover-title"],[1,"mat-headline","cover-description"],["href","https://mifos.org/","target","_blank",1,"cover-link"],["href","https://mifos.org/resources/community/","target","_blank",1,"cover-link"],["href","https://mifos.org/take-action/volunteer/","target","_blank",1,"cover-link"],[1,"layout-column","flex-gt-sm-30","login-container"],[1,"layout-row-reverse"],[1,"p-t-10","p-r-10","width-40"],[1,"p-t-10"],[1,"layout-row","align-center-center","flex-auto"],["src","assets/images/mifos_lg-logo.png",1,"img-container",3,"alt"],[1,"layout-column","align-center-center"],[1,"information-list","align-items-center","custom-horizontal-list","hide-lt-lg"],["mat-button","",3,"matMenuTriggerFor"],[3,"styleClass"],["align","end",1,"layout-row","m-b-20","m-r-10"],[3,"click"],["icon","refresh"],["href","https://mifosforge.jira.com/wiki/spaces/docs/pages/52035622/User+Manual","target","_blank","mat-menu-item",""],["href","https://cwiki.apache.org/confluence/display/FINERACT/Apache+Fineract+1.0+Functional+Specifications","target","_blank","mat-menu-item",""],["href","https://cwiki.apache.org/confluence/display/FINERACT/Contributor%27s+Zone","target","_blank","mat-menu-item",""],["href","https://groups.google.com/forum/#!forum/mifosusers","target","_blank","mat-menu-item",""],["href","https://groups.google.com/forum/#!forum/mifosdeveloper","target","_blank","mat-menu-item",""],["href","https://mifos.org/resources/community/communications/#mifos-irc","target","_blank","mat-menu-item",""],["href","https://mifosforge.jira.com/wiki/spaces/MDZ/pages/92012624/Key+Design+Principles","target","_blank","mat-menu-item",""],["href","https://sourceforge.net/projects/mifos/","target","_blank","mat-menu-item",""],["href","https://mifos.org/donate/","target","_blank","mat-menu-item",""]],template:function(n,i){if(n&1){let s=Y();l(0,"div",3)(1,"div",4)(2,"div",5)(3,"h1",6),c(4),p(5,"translate"),r(),l(6,"p",7),c(7),p(8,"translate"),p(9,"translate"),l(10,"a",8),c(11),p(12,"translate"),r(),c(13),p(14,"translate"),l(15,"a",9),c(16),p(17,"translate"),r(),c(18),p(19,"translate"),l(20,"a",10),c(21),p(22,"translate"),r()()()(),l(23,"div",11)(24,"div",12),b(25,"mifosx-language-selector",13)(26,"mifosx-theme-toggle",14),E(27,Gue,1,0,"mifosx-server-selector",14),r(),l(28,"div",15),b(29,"img",16),p(30,"translate"),r(),l(31,"div",17),E(32,jue,1,0,"mifosx-tenant-selector"),E(33,$ue,1,0,"mifosx-login-form"),l(34,"div",3),E(35,Uue,1,0,"mifosx-reset-password"),E(36,Wue,1,0,"mifosx-two-factor-authentication"),r()(),l(37,"div",3)(38,"mat-list",18)(39,"mat-list-item")(40,"button",19),c(41),p(42,"translate"),r()(),l(43,"mat-list-item")(44,"button",19),c(45),p(46,"translate"),r()(),l(47,"mat-list-item")(48,"button",19),c(49),p(50,"translate"),r()()()(),b(51,"mifosx-footer",20),l(52,"div",21)(53,"a",22),R("click",function(){return V(s),q(i.reloadSettings())}),b(54,"fa-icon",23),r()()()(),l(55,"mat-menu",null,0)(57,"a",24),c(58),p(59,"translate"),r(),l(60,"a",25),c(61),p(62,"translate"),r(),l(63,"a",26),c(64),p(65,"translate"),r()(),l(66,"mat-menu",null,1)(68,"a",27),c(69),p(70,"translate"),r(),l(71,"a",28),c(72),p(73,"translate"),r(),l(74,"a",29),c(75),p(76,"translate"),r()(),l(77,"mat-menu",null,2)(79,"a",30),c(80),p(81,"translate"),r(),l(82,"a",31),c(83),p(84,"translate"),r(),l(85,"a",32),c(86),p(87,"translate"),r()()}if(n&2){let s=xe(56),d=xe(67),u=xe(78);a(4),h(m(5,31,"APP_NAME")),a(3),le(" ",m(8,33,"APP_NAME")," ",m(9,35,"labels.text.is designed by the")," "),a(4),h(m(12,37,"labels.text.Mifos Initiative")),a(2),v(". ",m(14,39,"labels.text.A")," "),a(3),h(m(17,41,"labels.text.global community")),a(2),v(" ",m(19,43,"labels.text.elimination of poverty")," "),a(3),v("",m(22,45,"labels.text.Get involved"),"!"),a(6),I(i.allowServerSwitch()?27:-1),a(2),g("alt",_0("",m(30,47,"APP_NAME")," Logo")),a(3),I(i.displayTenantSelector()?32:-1),a(),I(!i.resetPassword&&!i.twoFactorAuthenticationRequired?33:-1),a(2),I(i.resetPassword?35:-1),a(),I(i.twoFactorAuthenticationRequired?36:-1),a(4),g("matMenuTriggerFor",s),a(),v(" ",m(42,49,"labels.links.Resources")," "),a(3),g("matMenuTriggerFor",d),a(),v(" ",m(46,51,"labels.links.Community")," "),a(3),g("matMenuTriggerFor",u),a(),v(" ",m(50,53,"labels.links.Contribute")," "),a(2),g("styleClass","m-t-90"),a(7),h(m(59,55,"labels.links.User Manual")),a(3),h(m(62,57,"labels.links.Functional Specifications")),a(3),h(m(65,59,"labels.links.Developer Zone")),a(5),h(m(70,61,"labels.links.User Group")),a(3),h(m(73,63,"labels.links.Developer Group")),a(3),h(m(76,65,"labels.links.IRC")),a(5),h(m(81,67,"labels.links.Key Design Principles")),a(3),h(m(84,69,"labels.links.Working with Code")),a(3),h(m(87,71,"labels.links.Donate"))}},dependencies:[ue,fe,ve,Lg,Kg,lk,sk,SC,wC,PC,xl,Vo,nc,Ng,ke,ic,tc,he],styles:['mifosx-server-selector[_ngcontent-%COMP%]{padding-left:5px;width:40%}.mat-mdc-form-field-infix[_ngcontent-%COMP%]{width:144px!important}mifosx-tenant-selector[_ngcontent-%COMP%]{border-radius:8px;width:14rem;margin-bottom:.1rem}mifosx-tenant-selector[_ngcontent-%COMP%] .mat-mdc-form-field{width:14rem}mifosx-tenant-selector[_ngcontent-%COMP%] .mat-mdc-form-field-infix{width:144px!important;border-radius:8px}mifosx-tenant-selector[_ngcontent-%COMP%] [matPrefix] fa-icon{font-size:16px;position:absolute;left:190px;border-radius:8px;top:50%;transform:translateY(-50%)}.cover[_ngcontent-%COMP%]{background:url("./media/cover_image_resized.webp") no-repeat center center;background-size:cover;position:relative;z-index:0;max-width:70vw}.cover[_ngcontent-%COMP%]:after{content:"";opacity:.5;background:linear-gradient(#000,#000);width:100%;height:100%;top:0;left:0;display:block;z-index:1;position:absolute}.cover[_ngcontent-%COMP%] .width-40[_ngcontent-%COMP%]{width:40%}.cover[_ngcontent-%COMP%] .cover-content[_ngcontent-%COMP%]{display:block;max-width:80%;margin:100px;color:#fff;text-align:justify;z-index:2;font-size:1.2rem}.cover[_ngcontent-%COMP%] .cover-content[_ngcontent-%COMP%] .cover-title[_ngcontent-%COMP%]{border-bottom:2px solid #fff;margin:0 0 20px;padding-bottom:10px}.cover[_ngcontent-%COMP%] .cover-content[_ngcontent-%COMP%] .cover-description[_ngcontent-%COMP%] .cover-link[_ngcontent-%COMP%]{text-decoration:underline;color:#fff}.cover[_ngcontent-%COMP%] .cover-content[_ngcontent-%COMP%] .cover-description[_ngcontent-%COMP%] .cover-link[_ngcontent-%COMP%]:hover{color:#d3d3d3}.login-container[_ngcontent-%COMP%]{box-shadow:1px 1px 50px #000;height:100vh;width:100%;min-width:21.5rem;padding:.5rem 1rem}.login-container[_ngcontent-%COMP%] .img-container[_ngcontent-%COMP%]{max-width:18rem;margin-bottom:2rem;gap:20px}.layout-column[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center}.custom-horizontal-list[_ngcontent-%COMP%]{display:flex!important;flex-direction:row!important;justify-content:center;align-items:center;gap:1.5rem}.custom-horizontal-list[_ngcontent-%COMP%] mat-list-item[_ngcontent-%COMP%]{width:auto!important;min-width:0!important;padding:0!important}.custom-horizontal-list[_ngcontent-%COMP%] mat-list-item[_ngcontent-%COMP%] [mat-button][_ngcontent-%COMP%]{white-space:nowrap}.p-t-10[_ngcontent-%COMP%]{padding-top:0}.p-r-10[_ngcontent-%COMP%]{padding-right:10px} .login-container mifosx-footer .divider{margin:2px 0 0!important;width:14rem!important} .login-container #footer{align-items:unset!important}']})}}return e})();var Que=[{path:"login",component:TC,data:{title:"Login"}}],x9=(()=>{class e{static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275mod=Gi({type:e})}static{this.\u0275inj=Hi({imports:[gn.forChild(Que),gn]})}}return e})();var b9=(()=>{class e{static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275mod=Gi({type:e})}static{this.\u0275inj=Hi({imports:[oo,x9,yp,TC,SC,wC,PC]})}}return e})();function Yue(e,o){if(e&1&&(l(0,"mat-option",3),c(1),r()),e&2){let t=o.$implicit;g("value",t),a(),v(" ",t.name," ")}}function Jue(e,o){if(e&1&&(l(0,"mat-option",3),c(1),r()),e&2){let t=o.$implicit;g("value",t),a(),v(" ",t," ")}}function Kue(e,o){if(e&1&&(l(0,"mat-option",3),c(1),r()),e&2){let t=o.$implicit;g("value",t),a(),v(" ",t," ")}}function Xue(e,o){if(e&1&&(l(0,"mat-option",3),c(1),r()),e&2){let t=o.$implicit;g("value",t),a(),v(" ",t," ")}}var MC=(()=>{class e{constructor(){this.settingsService=T(At),this.languages=[{name:"English",code:"en"}],this.dateFormats=["dd MMMM yyyy","dd/MMMM/yyyy","dd-MMMM-yyyy","dd-MM-yy","MMMM-dd-yyyy","MMMM dd yyyy","MMMM/dd/yyyy","MM-dd-yy","yyyy-MM-dd"],this.decimals=["0","1","2","3","4","5","6","7","8"],this.language=new it(""),this.dateFormat=new it(""),this.decimalsToDisplay=new it("")}ngOnInit(){this.language.patchValue(this.settingsService.language),this.dateFormat.patchValue(this.settingsService.dateFormat),this.decimalsToDisplay.patchValue(this.settingsService.decimals),this.buildDependencies()}buildDependencies(){this.language.valueChanges.subscribe(t=>{this.settingsService.setLanguage(t)}),this.dateFormat.valueChanges.subscribe(t=>{this.settingsService.setDateFormat(t)}),this.decimalsToDisplay.valueChanges.subscribe(t=>{this.settingsService.setDecimalToDisplay(t)})}compareOptions(t,n){return t&&n&&t.code===n.code}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275cmp=me({type:e,selectors:[["mifosx-settings"]],decls:89,vars:52,consts:[[1,"container"],[1,"layout-column"],[3,"formControl","compareWith"],[3,"value"],[3,"formControl"],[1,"header"],["type","url","matInput",""],["type","email","matInput",""],["type","tel","matInput",""]],template:function(n,i){n&1&&(l(0,"div",0)(1,"mat-accordion")(2,"mat-expansion-panel")(3,"mat-expansion-panel-header")(4,"mat-panel-title"),c(5),p(6,"translate"),r()(),l(7,"div",1)(8,"mat-form-field")(9,"mat-label"),c(10),p(11,"translate"),r(),l(12,"mat-select",2),Se(13,Yue,2,2,"mat-option",3,Pe),r()(),l(15,"mat-form-field")(16,"mat-label"),c(17),p(18,"translate"),r(),l(19,"mat-select",4),Se(20,Jue,2,2,"mat-option",3,Pe),r()(),l(22,"mat-form-field")(23,"mat-label"),c(24),p(25,"translate"),r(),l(26,"mat-select",4),Se(27,Kue,2,2,"mat-option",3,Pe),r()()()(),l(29,"mat-expansion-panel")(30,"mat-expansion-panel-header")(31,"mat-panel-title"),c(32),p(33,"translate"),r()(),l(34,"div",1)(35,"span",5),c(36),p(37,"translate"),r(),b(38,"mifosx-file-upload"),l(39,"span",5),c(40),p(41,"translate"),r(),b(42,"mifosx-file-upload"),l(43,"span",5),c(44),p(45,"translate"),r(),b(46,"mifosx-file-upload"),l(47,"span",5),c(48),p(49,"translate"),r(),b(50,"mifosx-file-upload"),r()(),l(51,"mat-expansion-panel")(52,"mat-expansion-panel-header")(53,"mat-panel-title"),c(54),p(55,"translate"),r()(),l(56,"div",1)(57,"span",5),c(58),p(59,"translate"),r(),b(60,"mifosx-theme-picker"),l(61,"mat-form-field")(62,"mat-label"),c(63),p(64,"translate"),r(),l(65,"mat-select"),Se(66,Xue,2,2,"mat-option",3,Pe),r()()()(),l(68,"mat-expansion-panel")(69,"mat-expansion-panel-header")(70,"mat-panel-title"),c(71),p(72,"translate"),r()(),l(73,"div",1)(74,"mat-form-field")(75,"mat-label"),c(76),p(77,"translate"),r(),b(78,"input",6),r(),l(79,"mat-form-field")(80,"mat-label"),c(81),p(82,"translate"),r(),b(83,"input",7),r(),l(84,"mat-form-field")(85,"mat-label"),c(86),p(87,"translate"),r(),b(88,"input",8),r()()()()()),n&2&&(a(5),v(" ",m(6,20,"labels.inputs.Main Configuration")," "),a(5),h(m(11,22,"labels.inputs.Default Language")),a(2),g("formControl",i.language)("compareWith",i.compareOptions),a(),we(i.languages),a(4),h(m(18,24,"labels.inputs.Default Date Format")),a(2),g("formControl",i.dateFormat),a(),we(i.dateFormats),a(4),h(m(25,26,"labels.inputs.Decimals to Display")),a(2),g("formControl",i.decimalsToDisplay),a(),we(i.decimals),a(5),v(" ",m(33,28,"labels.inputs.Images")," "),a(4),h(m(37,30,"labels.inputs.Favicon")),a(4),h(m(41,32,"labels.inputs.Cover Image")),a(4),h(m(45,34,"labels.inputs.Logo")),a(4),h(m(49,36,"labels.inputs.Logo with Organization Name")),a(6),v(" ",m(55,38,"labels.inputs.Theme and Font")," "),a(4),h(m(59,40,"labels.inputs.Theme")),a(5),h(m(64,42,"labels.inputs.Default Font")),a(3),we(i.fonts),a(5),v(" ",m(72,44,"labels.inputs.Contact Information")," "),a(5),h(m(77,46,"labels.inputs.Website")),a(5),h(m(82,48,"labels.inputs.Email")),a(5),h(m(87,50,"labels.inputs.Contact No")))},dependencies:[ue,fe,Ue,_n,Fe,Be,ze,gt,ft,Er,Tr,Mr,Dr,wp,ek,he],styles:[".header[_ngcontent-%COMP%]{font-weight:500}"]})}}return e})();var Zue=[_o.withShell([{path:"settings",component:MC,data:{title:"Settings",breadcrumb:"Settings"}}])],y9=(()=>{class e{static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275mod=Gi({type:e})}static{this.\u0275inj=Hi({imports:[gn.forChild(Zue),gn]})}}return e})();var S9=(()=>{class e{static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275mod=Gi({type:e})}static{this.\u0275inj=Hi({imports:[oo,y9,MC]})}}return e})();var DC=(()=>{class e{constructor(){this.http=T(ko)}getOffices(){return this.http.get("/offices")}getEmployees(t){let n=new rn().set("officeId",t.toString());return this.http.get("/staff",{params:n})}getCentersFromStaffId(t){let n=new rn().set("R_staffId",t.toString()).set("genericResultSet","false");return this.http.get("/runreports/GroupNamesByStaff",{params:n})}getCenter(t){let n=new rn().set("associations","groupMembers");return this.http.get(`/centers/${t}`,{params:n})}getCenterAccounts(t){return this.http.get(`/centers/${t}/accounts`)}getCenterSummary(t){let n=new rn().set("R_groupId",t.toString()).set("genericResultSet","false");return this.http.get("/runreports/GroupSummaryCounts",{params:n})}getGroup(t){let n=new rn().set("associations","all");return this.http.get(`/groups/${t}`,{params:n})}getGroupAccounts(t){return this.http.get(`/groups/${t}/accounts`)}getClient(t){return this.http.get(`/clients/${t}`)}getClientAccounts(t){return this.http.get(`/clients/${t}/accounts`)}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275prov=Re({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();function efe(e,o){e&1&&(l(0,"div",4),c(1),p(2,"translate"),r()),e&2&&(a(),v(" ",m(2,1,"labels.inputs.External Id")," "))}function tfe(e,o){if(e&1&&(l(0,"div",5),b(1,"mifosx-external-identifier",6),r()),e&2){let t=w();a(),g("externalId",Le(t.officeData.externalId))}}var Hf=(()=>{class e{constructor(){}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275cmp=me({type:e,selectors:[["mifosx-office-navigation"]],inputs:{officeData:"officeData",employeeData:"employeeData"},decls:21,vars:13,consts:[[1,"layout-row","align-items-center","gap-10px"],["icon","building","size","3x"],[1,"flex-fill"],[1,"layout-row-wrap"],[1,"flex-50","mat-body-strong"],[1,"flex-50"],[3,"externalId"]],template:function(n,i){n&1&&(l(0,"mat-card-header",0),b(1,"fa-icon",1),l(2,"mat-card-title-group",2)(3,"mat-card-title")(4,"h2"),c(5),r()()()(),l(6,"mat-card-content")(7,"div",3),E(8,efe,3,3,"div",4),E(9,tfe,2,2,"div",5),l(10,"div",4),c(11),p(12,"translate"),r(),l(13,"div",5),c(14),p(15,"dateFormat"),r(),l(16,"div",4),c(17),p(18,"translate"),r(),l(19,"div",5),c(20),r()()()),n&2&&(a(5),h(i.officeData.name),a(3),I(i.officeData.externalId?8:-1),a(),I(i.officeData.externalId?9:-1),a(2),v(" ",m(12,7,"labels.inputs.Opened On")," "),a(3),v(" ",m(15,9,i.officeData.openingDate)," "),a(3),v(" ",m(18,11,"labels.inputs.Number of Staff")," "),a(3),v(" ",i.employeeData?i.employeeData.length:""," "))},dependencies:[ue,fe,Je,sa,ke,Qr,Qo,Ea,Pi,he],styles:["mat-card-header[_ngcontent-%COMP%]{padding:1.5rem 1.5rem 1rem}mat-card-header[_ngcontent-%COMP%] h2[_ngcontent-%COMP%]{font-weight:500;font-size:1.5rem;margin:0;line-height:1.4}@media (width <= 480px){mat-card-header[_ngcontent-%COMP%]{padding:1rem}mat-card-header[_ngcontent-%COMP%] h2[_ngcontent-%COMP%]{font-size:1.25rem}}mat-card-content[_ngcontent-%COMP%]{padding:1.5rem}mat-card-content[_ngcontent-%COMP%] .layout-row-wrap[_ngcontent-%COMP%]{display:grid;grid-template-columns:50% 50%}@media (width <= 768px){mat-card-content[_ngcontent-%COMP%] .layout-row-wrap[_ngcontent-%COMP%]{grid-template-columns:100%}}mat-card-content[_ngcontent-%COMP%] .flex-50[_ngcontent-%COMP%]{padding:.625rem 0;display:flex;align-items:center;font-size:.875rem;word-wrap:break-word;line-height:1.6}mat-card-content[_ngcontent-%COMP%] .flex-50.mat-body-strong[_ngcontent-%COMP%]{font-weight:600}mat-card-content[_ngcontent-%COMP%] .flex-50[_ngcontent-%COMP%]:not(:last-child,:nth-last-child(2)){border-bottom:1px solid #ddd}@media (width <= 480px){mat-card-content[_ngcontent-%COMP%]{padding:1rem}}"]})}}return e})();function ife(e,o){e&1&&(l(0,"div",6),c(1),p(2,"translate"),r()),e&2&&(a(),v(" ",m(2,1,"labels.inputs.Mobile Number")," "))}function nfe(e,o){if(e&1&&(l(0,"div",7),c(1),r()),e&2){let t=w();a(),v(" ",t.employeeData.mobileNo," ")}}var Gf=(()=>{class e{constructor(){}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275cmp=me({type:e,selectors:[["mifosx-staff-navigation"]],inputs:{employeeData:"employeeData",centerData:"centerData"},decls:34,vars:26,consts:[[1,"layout-row","gap-5percent","header"],["icon","user","size","3x",1,"main-icon"],[1,"mat-typography"],[3,"className"],["matTooltipPosition","right","icon","circle","size","lg",3,"matTooltip"],[1,"layout-row-wrap"],[1,"flex-50","mat-body-strong"],[1,"flex-50"]],template:function(n,i){n&1&&(l(0,"mat-card-header",0),b(1,"fa-icon",1),l(2,"mat-card-title-group")(3,"div",2)(4,"mat-card-title")(5,"h2"),c(6),l(7,"span",3),b(8,"fa-icon",4),r()()(),l(9,"mat-card-subtitle")(10,"p"),c(11),p(12,"translate"),r()()()()(),l(13,"mat-card-content")(14,"div",5)(15,"div",6),c(16),p(17,"translate"),r(),l(18,"div",7),c(19),p(20,"dateFormat"),r(),l(21,"div",6),c(22),p(23,"translate"),r(),l(24,"div",7),c(25),p(26,"yesNo"),r(),E(27,ife,3,3,"div",6),E(28,nfe,2,1,"div",7),l(29,"div",6),c(30),p(31,"translate"),r(),l(32,"div",7),c(33),r()()()),n&2&&(a(6),v(" ",i.employeeData.displayName," "),a(),g("className",i.employeeData.isActive===!0?"true":"false"),a(),g("matTooltip",Le(i.employeeData.isActive===!0?"Active":"Inactive")),a(3),le("",m(12,14,"labels.inputs.Associated Office"),": ",i.employeeData.officeName),a(5),v(" ",m(17,16,"labels.inputs.Joined On")," "),a(3),v(" ",m(20,18,i.employeeData.joiningDate)," "),a(3),v(" ",m(23,20,"labels.inputs.Loan Officer")," "),a(3),v(" ",m(26,22,i.employeeData.isLoanOfficer)," "),a(2),I(i.employeeData.mobileNo?27:-1),a(),I(i.employeeData.mobileNo?28:-1),a(2),v(" ",m(31,24,"labels.inputs.Number of Centers")," "),a(3),v(" ",i.centerData?i.centerData.length:""," "))},dependencies:[ue,fe,Je,sa,ke,Qr,Qo,si,vl,Pi,he,po],styles:[".main-icon[_ngcontent-%COMP%]{margin:7px 0 0}.true[_ngcontent-%COMP%]{color:#32cd32}.false[_ngcontent-%COMP%]{color:#f44366}h2[_ngcontent-%COMP%]{font-weight:500}.content[_ngcontent-%COMP%] div[_ngcontent-%COMP%]{margin:1rem 0;word-wrap:break-word}"]})}}return e})();var ofe=()=>[10,25];function afe(e,o){e&1&&(l(0,"th",15),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.Account Number")))}function rfe(e,o){if(e&1&&(l(0,"td",16),c(1),r()),e&2){let t=o.$implicit;a(),h(t.accountNo)}}function lfe(e,o){e&1&&(l(0,"th",15),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.Loan Account")))}function sfe(e,o){if(e&1&&(l(0,"td",16),c(1),r()),e&2){let t=o.$implicit;a(),h(t.productName)}}function cfe(e,o){e&1&&(l(0,"th",17),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.Type")))}function pfe(e,o){if(e&1&&(l(0,"td",16),b(1,"fa-icon",18),r()),e&2){let t=o.$implicit;a(),g("matTooltip",Le(t.loanType.value))("icon",t.loanType.code==="accountType.individual"?"user":"users")}}function mfe(e,o){e&1&&(l(0,"th",17),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.Status")))}function dfe(e,o){if(e&1&&(l(0,"td",16)(1,"span",19),p(2,"statusLookup"),b(3,"fa-icon",20),r()()),e&2){let t=o.$implicit;a(),g("className",t.inArrears?"status-active-overdue":m(2,3,t.status.code)),a(2),g("matTooltip",Le(t.status.value))}}function ufe(e,o){e&1&&b(0,"tr",21)}function ffe(e,o){e&1&&b(0,"tr",22)}var Ls=(()=>{class e{constructor(){this.accountsFilterPipe=T(as),this.displayedColumns=["accountNo","productName","Type","Status"],this.showClosed=!1}set loanAccountData(t){this.accountData=t;let n=this.accountsFilterPipe.transform(t,"loan",this.showClosed?"closed":"open","isLoan");this.dataSource=new Wt(n),this.dataSource.paginator=this.paginator,this.dataSource.sort=this.sort}applyFilter(t){this.dataSource.filter=t.trim().toLowerCase()}toggleClosed(){this.showClosed=!this.showClosed;let t=this.accountsFilterPipe.transform(this.accountData,"loan",this.showClosed?"closed":"open","isLoan");this.dataSource=new Wt(t),this.dataSource.paginator=this.paginator,this.dataSource.sort=this.sort}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275cmp=me({type:e,selectors:[["mifosx-loan-account-table"]],viewQuery:function(n,i){if(n&1&&(Ee(kt,7),Ee(It,7)),n&2){let s;Te(s=Me())&&(i.paginator=s.first),Te(s=Me())&&(i.sort=s.first)}},inputs:{loanAccountData:"loanAccountData"},decls:24,vars:9,consts:[[1,"layout-row","align-between","align-items-center"],[1,"flex-50"],["matInput","",3,"keyup"],["mat-raised-button","","color","primary",3,"click"],["mat-table","","matSort","",3,"dataSource"],["matColumnDef","accountNo"],["mat-header-cell","","mat-sort-header","",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","productName"],["matColumnDef","Type"],["mat-header-cell","",4,"matHeaderCellDef"],["matColumnDef","Status"],["mat-header-row","",4,"matHeaderRowDef"],["mat-row","",4,"matRowDef","matRowDefColumns"],["showFirstLastButtons","",3,"pageSizeOptions"],["mat-header-cell","","mat-sort-header",""],["mat-cell",""],["mat-header-cell",""],["matTooltipPosition","right","size","lg",3,"matTooltip","icon"],[3,"className"],["matTooltipPosition","right","icon","circle","size","md",3,"matTooltip"],["mat-header-row",""],["mat-row",""]],template:function(n,i){n&1&&(l(0,"div",0)(1,"mat-form-field",1)(2,"mat-label"),c(3),p(4,"translate"),r(),l(5,"input",2),R("keyup",function(d){return i.applyFilter(d.target.value)}),r()(),l(6,"button",3),R("click",function(){return i.toggleClosed()}),c(7),r()(),l(8,"table",4),X(9,5),F(10,afe,3,3,"th",6)(11,rfe,2,1,"td",7),Z(),X(12,8),F(13,lfe,3,3,"th",6)(14,sfe,2,1,"td",7),Z(),X(15,9),F(16,cfe,3,3,"th",10)(17,pfe,2,3,"td",7),Z(),X(18,11),F(19,mfe,3,3,"th",10)(20,dfe,4,5,"td",7),Z(),F(21,ufe,1,0,"tr",12)(22,ffe,1,0,"tr",13),r(),b(23,"mat-paginator",14)),n&2&&(a(3),h(m(4,6,"labels.inputs.Filter")),a(4),v(" ",i.showClosed?"View Active":"View Closed"," "),a(),g("dataSource",i.dataSource),a(13),g("matHeaderRowDef",i.displayedColumns),a(),g("matRowDefColumns",i.displayedColumns),a(),g("pageSizeOptions",oe(8,ofe)))},dependencies:[ue,fe,Fe,Be,ze,ve,_t,It,xt,vt,bt,ri,Ct,yt,ke,si,St,Pt,wt,Tt,kt,he,go],encapsulation:2})}}return e})();var hfe=()=>[10,25];function gfe(e,o){e&1&&(l(0,"th",15),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.Account Number")))}function _fe(e,o){if(e&1&&(l(0,"td",16),c(1),r()),e&2){let t=o.$implicit;a(),h(t.accountNo)}}function Cfe(e,o){e&1&&(l(0,"th",15),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.Savings Account")))}function vfe(e,o){if(e&1&&(l(0,"td",16),c(1),r()),e&2){let t=o.$implicit;a(),h(t.productName)}}function xfe(e,o){e&1&&(l(0,"th",15),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.Balance")))}function bfe(e,o){if(e&1&&(l(0,"td",16),c(1),r()),e&2){let t=o.$implicit;a(),h(t.accountBalance)}}function yfe(e,o){e&1&&(l(0,"th",17),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.Status")))}function Sfe(e,o){if(e&1&&(l(0,"td",16)(1,"span",18),p(2,"statusLookup"),b(3,"fa-icon",19),r()()),e&2){let t=o.$implicit;a(),g("className",m(2,3,t.status.code)),a(2),g("matTooltip",Le(t.status.value))}}function wfe(e,o){e&1&&b(0,"tr",20)}function Pfe(e,o){e&1&&b(0,"tr",21)}var Vs=(()=>{class e{constructor(){this.accountsFilterPipe=T(as),this.displayedColumns=["accountNo","productName","accountBalance","Status"],this.showClosed=!1}set savingsAccountData(t){this.accountData=t;let n=this.accountsFilterPipe.transform(t,"saving",this.showClosed?"closed":"open","isSavings");this.dataSource=new Wt(n),this.dataSource.paginator=this.paginator,this.dataSource.sort=this.sort}applyFilter(t){this.dataSource.filter=t.trim().toLowerCase()}toggleClosed(){this.showClosed=!this.showClosed;let t=this.accountsFilterPipe.transform(this.accountData,"saving",this.showClosed?"closed":"open","isSavings");this.dataSource=new Wt(t),this.dataSource.paginator=this.paginator,this.dataSource.sort=this.sort}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275cmp=me({type:e,selectors:[["mifosx-savings-account-table"]],viewQuery:function(n,i){if(n&1&&(Ee(kt,7),Ee(It,7)),n&2){let s;Te(s=Me())&&(i.paginator=s.first),Te(s=Me())&&(i.sort=s.first)}},inputs:{savingsAccountData:"savingsAccountData"},decls:24,vars:9,consts:[[1,"layout-row","align-between","align-items-center"],[1,"flex-50"],["matInput","",3,"keyup"],["mat-raised-button","","color","primary",3,"click"],["mat-table","","matSort","",3,"dataSource"],["matColumnDef","accountNo"],["mat-header-cell","","mat-sort-header","",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","productName"],["matColumnDef","accountBalance"],["matColumnDef","Status"],["mat-header-cell","",4,"matHeaderCellDef"],["mat-header-row","",4,"matHeaderRowDef"],["mat-row","",4,"matRowDef","matRowDefColumns"],["showFirstLastButtons","",3,"pageSizeOptions"],["mat-header-cell","","mat-sort-header",""],["mat-cell",""],["mat-header-cell",""],[3,"className"],["matTooltipPosition","right","icon","circle","size","md",3,"matTooltip"],["mat-header-row",""],["mat-row",""]],template:function(n,i){n&1&&(l(0,"div",0)(1,"mat-form-field",1)(2,"mat-label"),c(3),p(4,"translate"),r(),l(5,"input",2),R("keyup",function(d){return i.applyFilter(d.target.value)}),r()(),l(6,"button",3),R("click",function(){return i.toggleClosed()}),c(7),r()(),l(8,"table",4),X(9,5),F(10,gfe,3,3,"th",6)(11,_fe,2,1,"td",7),Z(),X(12,8),F(13,Cfe,3,3,"th",6)(14,vfe,2,1,"td",7),Z(),X(15,9),F(16,xfe,3,3,"th",6)(17,bfe,2,1,"td",7),Z(),X(18,10),F(19,yfe,3,3,"th",11)(20,Sfe,4,5,"td",7),Z(),F(21,wfe,1,0,"tr",12)(22,Pfe,1,0,"tr",13),r(),b(23,"mat-paginator",14)),n&2&&(a(3),h(m(4,6,"labels.inputs.Filter")),a(4),v(" ",i.showClosed?"View Active":"View Closed"," "),a(),g("dataSource",i.dataSource),a(13),g("matHeaderRowDef",i.displayedColumns),a(),g("matRowDefColumns",i.displayedColumns),a(),g("pageSizeOptions",oe(8,hfe)))},dependencies:[ue,fe,Fe,Be,ze,ve,_t,It,xt,vt,bt,ri,Ct,yt,ke,si,St,Pt,wt,Tt,kt,he,go],encapsulation:2})}}return e})();function Tfe(e,o){if(e&1&&(l(0,"p"),c(1),p(2,"translate"),b(3,"mifosx-external-identifier",13),r()),e&2){let t=w();a(),v(" ",m(2,3,"labels.inputs.External Id"),": "),a(2),g("externalId",Le(t.centerData.externalId))}}function Mfe(e,o){e&1&&(l(0,"div",8),c(1),p(2,"translate"),r()),e&2&&(a(),v(" ",m(2,1,"labels.inputs.Number of Active Clients")," "))}function Dfe(e,o){if(e&1&&(l(0,"div",9),c(1),r()),e&2){let t=w();a(),v(" ",t.centerSummaryData.activeClients," ")}}function Efe(e,o){e&1&&(l(0,"div",8),c(1),p(2,"translate"),r()),e&2&&(a(),v(" ",m(2,1,"labels.inputs.Number of Active Client Loans")," "))}function Ife(e,o){if(e&1&&(l(0,"div",9),c(1),r()),e&2){let t=w();a(),v(" ",t.centerSummaryData.activeClientLoans," ")}}function Ofe(e,o){e&1&&(l(0,"div",8),c(1),p(2,"translate"),r()),e&2&&(a(),v(" ",m(2,1,"labels.inputs.Number of Active Client Borrowers")," "))}function Afe(e,o){if(e&1&&(l(0,"div",9),c(1),r()),e&2){let t=w();a(),v(" ",t.centerSummaryData.activeClientBorrowers," ")}}function Ffe(e,o){e&1&&(l(0,"div",8),c(1),p(2,"translate"),r()),e&2&&(a(),v(" ",m(2,1,"labels.inputs.Number of Active Overdue Group Loans")," "))}function kfe(e,o){if(e&1&&(l(0,"div",9),c(1),r()),e&2){let t=w();a(),v(" ",t.centerSummaryData.overdueGroupLoans," ")}}function Bfe(e,o){e&1&&(l(0,"div",8),c(1),p(2,"translate"),r()),e&2&&(a(),v(" ",m(2,1,"labels.inputs.Number of Active Overdue Client Loans")," "))}function Rfe(e,o){if(e&1&&(l(0,"div",9),c(1),r()),e&2){let t=w();a(),v(" ",t.centerSummaryData.overdueClientLoans," ")}}function Nfe(e,o){e&1&&(l(0,"div",10),c(1),p(2,"translate"),r()),e&2&&(a(),v(" ",m(2,1,"labels.inputs.Next Meeting Date")," "))}function Lfe(e,o){if(e&1&&(l(0,"div",9),c(1),p(2,"dateFormat"),r()),e&2){let t=w();a(),v(" ",m(2,1,t.centerSummaryData.collectionMeetingCalendar.nextTenRecurringDates[0])," ")}}function Vfe(e,o){e&1&&(l(0,"div",10),c(1),p(2,"translate"),r()),e&2&&(a(),v(" ",m(2,1,"labels.inputs.Meeting Frequency")," "))}function qfe(e,o){if(e&1&&(l(0,"div",9),c(1),r()),e&2){let t=w();a(),v(" ",t.centerSummaryData.collectionMeetingCalendar.humanReadable," ")}}function zfe(e,o){if(e&1&&(l(0,"mat-tab",11),b(1,"mifosx-loan-account-table",14),r()),e&2){let t=w();a(),g("loanAccountData",t.centerAccountsData.loanAccounts)}}function Hfe(e,o){if(e&1&&(l(0,"mat-tab",12),b(1,"mifosx-savings-account-table",15),r()),e&2){let t=w();a(),g("savingsAccountData",t.centerAccountsData.savingsAccounts)}}var jf=(()=>{class e{constructor(){}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275cmp=me({type:e,selectors:[["mifosx-center-navigation"]],viewQuery:function(n,i){if(n&1&&(Ee(Ls,5),Ee(Vs,5)),n&2){let s;Te(s=Me())&&(i.loanAccountTableComponent=s.first),Te(s=Me())&&(i.savingsAccountTableComponent=s.first)}},inputs:{centerData:"centerData",centerAccountsData:"centerAccountsData",centerSummaryData:"centerSummaryData",groupData:"groupData"},decls:52,vars:42,consts:[[1,"layout-row","gap-5percent","header"],["icon","building","size","3x",1,"main-icon"],[1,"mat-typography"],[3,"className"],["matTooltipPosition","right","icon","circle","size","lg",3,"matTooltip"],[3,"accountNo"],["label","Details"],[1,"layout-row-wrap"],[1,"flex-50","mat-body-strong"],[1,"flex-50"],[1,"mat-body-strong","flex-50"],["label","Loan Accounts"],["label","Savings Accounts"],[3,"externalId"],[3,"loanAccountData"],[3,"savingsAccountData"]],template:function(n,i){n&1&&(l(0,"mat-card-header",0),b(1,"fa-icon",1),l(2,"mat-card-title-group")(3,"div",2)(4,"mat-card-title")(5,"h2"),c(6),l(7,"span",3),p(8,"statusLookup"),b(9,"fa-icon",4),r()()(),l(10,"mat-card-subtitle")(11,"p"),c(12),p(13,"translate"),b(14,"mifosx-account-number",5),r(),E(15,Tfe,4,5,"p"),r()()()(),l(16,"mat-card-content")(17,"mat-tab-group")(18,"mat-tab",6)(19,"div",7)(20,"div",8),c(21),p(22,"translate"),r(),l(23,"div",9),c(24),p(25,"dateFormat"),r(),l(26,"div",8),c(27),p(28,"translate"),r(),l(29,"div",9),c(30),r(),E(31,Mfe,3,3,"div",8),E(32,Dfe,2,1,"div",9),E(33,Efe,3,3,"div",8),E(34,Ife,2,1,"div",9),E(35,Ofe,3,3,"div",8),E(36,Afe,2,1,"div",9),E(37,Ffe,3,3,"div",8),E(38,kfe,2,1,"div",9),E(39,Bfe,3,3,"div",8),E(40,Rfe,2,1,"div",9),E(41,Nfe,3,3,"div",10),E(42,Lfe,3,3,"div",9),E(43,Vfe,3,3,"div",10),E(44,qfe,2,1,"div",9),l(45,"div",8),c(46),p(47,"translate"),r(),l(48,"div",9),c(49),r()()(),E(50,zfe,2,1,"mat-tab",11),E(51,Hfe,2,1,"mat-tab",12),r()()),n&2&&(a(6),v(" ",i.centerData.name," "),a(),g("className",m(8,30,i.centerData.status.code)),a(2),g("matTooltip",Le(i.centerData.status.value)),a(3),v(" ",m(13,32,"labels.inputs.Account No"),": "),a(2),g("accountNo",Le(i.centerData.accountNo)),a(),I(i.centerData.externalId?15:-1),a(6),v(" ",m(22,34,"labels.inputs.Activation Date")," "),a(3),v(" ",m(25,36,i.centerData.activationDate)," "),a(3),v(" ",m(28,38,"labels.inputs.Associated Officer")," "),a(3),v(" ",i.centerData.staffName," "),a(),I(i.centerSummaryData?31:-1),a(),I(i.centerSummaryData?32:-1),a(),I(i.centerSummaryData?33:-1),a(),I(i.centerSummaryData?34:-1),a(),I(i.centerSummaryData?35:-1),a(),I(i.centerSummaryData?36:-1),a(),I(i.centerSummaryData?37:-1),a(),I(i.centerSummaryData?38:-1),a(),I(i.centerSummaryData?39:-1),a(),I(i.centerSummaryData?40:-1),a(),I(i.centerData.collectionMeetingCalendar&&i.centerData.collectionMeetingCalendar.nextTenRecurringDates[0]?41:-1),a(),I(i.centerData.collectionMeetingCalendar&&i.centerData.collectionMeetingCalendar.nextTenRecurringDates[0]?42:-1),a(),I(i.centerData.collectionMeetingCalendar&&i.centerData.collectionMeetingCalendar.humanReadable?43:-1),a(),I(i.centerData.collectionMeetingCalendar&&i.centerData.collectionMeetingCalendar.humanReadable?44:-1),a(2),v(" ",m(47,40,"labels.inputs.Number of Groups")," "),a(3),v(" ",i.groupData?i.groupData.length:""," "),a(),I(i.centerAccountsData&&i.centerAccountsData.loanAccounts?50:-1),a(),I(i.centerAccountsData&&i.centerAccountsData.savingsAccounts?51:-1))},dependencies:[ue,fe,Je,sa,ke,Qr,Qo,si,vl,rc,Ea,Lr,Yr,Ls,Vs,Pi,he,go],styles:[".main-icon[_ngcontent-%COMP%]{margin:7px 0 0}h2[_ngcontent-%COMP%]{font-weight:500}.content[_ngcontent-%COMP%] div[_ngcontent-%COMP%]{margin:1rem 0;word-wrap:break-word}"]})}}return e})();function Gfe(e,o){e&1&&(l(0,"div",7),c(1),p(2,"translate"),r()),e&2&&(a(),v(" ",m(2,1,"labels.inputs.Associated Center")," "))}function jfe(e,o){if(e&1&&(l(0,"div",8),c(1),r()),e&2){let t=w();a(),v(" ",t.groupData.centerName," ")}}function $fe(e,o){e&1&&(l(0,"div",9),c(1),p(2,"translate"),r()),e&2&&(a(),v(" ",m(2,1,"labels.inputs.Next Meeting Date")," "))}function Ufe(e,o){if(e&1&&(l(0,"div",8),c(1),p(2,"dateFormat"),r()),e&2){let t=w();a(),v(" ",m(2,1,t.groupData.collectionMeetingCalendar.nextTenRecurringDates[0])," ")}}function Wfe(e,o){e&1&&(l(0,"div",9),c(1),p(2,"translate"),r()),e&2&&(a(),v(" ",m(2,1,"labels.inputs.Meeting Frequency")," "))}function Qfe(e,o){if(e&1&&(l(0,"div",8),c(1),r()),e&2){let t=w();a(),v(" ",t.groupData.collectionMeetingCalendar.humanReadable," ")}}function Yfe(e,o){if(e&1&&(l(0,"mat-tab",10),b(1,"mifosx-loan-account-table",12),r()),e&2){let t=w();a(),g("loanAccountData",t.groupAccountsData.loanAccounts)}}function Jfe(e,o){if(e&1&&(l(0,"mat-tab",11),b(1,"mifosx-savings-account-table",13),r()),e&2){let t=w();a(),g("savingsAccountData",t.groupAccountsData.savingsAccounts)}}var $f=(()=>{class e{constructor(){}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275cmp=me({type:e,selectors:[["mifosx-group-navigation"]],viewQuery:function(n,i){if(n&1&&(Ee(Ls,5),Ee(Vs,5)),n&2){let s;Te(s=Me())&&(i.loanAccountTableComponent=s.first),Te(s=Me())&&(i.savingsAccountTableComponent=s.first)}},inputs:{groupData:"groupData",groupAccountsData:"groupAccountsData",clientData:"clientData"},decls:42,vars:33,consts:[[1,"layout-row","gap-5percent"],["icon","users","size","3x",1,"main-icon"],[1,"mat-typography"],[3,"className"],["matTooltipPosition","right","icon","circle","size","lg",3,"matTooltip"],["label","Details"],[1,"layout-row-wrap"],[1,"flex-50","mat-body-strong"],[1,"flex-50"],[1,"mat-body-strong","flex-50"],["label","Loan Accounts"],["label","Savings Accounts"],[3,"loanAccountData"],[3,"savingsAccountData"]],template:function(n,i){n&1&&(l(0,"mat-card-header",0),b(1,"fa-icon",1),l(2,"mat-card-title-group")(3,"div",2)(4,"mat-card-title")(5,"h2"),c(6),l(7,"span",3),p(8,"statusLookup"),b(9,"fa-icon",4),r()()(),l(10,"mat-card-subtitle")(11,"p"),c(12),p(13,"translate"),r()()()()(),l(14,"mat-card-content")(15,"mat-tab-group")(16,"mat-tab",5)(17,"div",6)(18,"div",7),c(19),p(20,"translate"),r(),l(21,"div",8),c(22),p(23,"dateFormat"),r(),l(24,"div",7),c(25),p(26,"translate"),r(),l(27,"div",8),c(28),r(),E(29,Gfe,3,3,"div",7),E(30,jfe,2,1,"div",8),E(31,$fe,3,3,"div",9),E(32,Ufe,3,3,"div",8),E(33,Wfe,3,3,"div",9),E(34,Qfe,2,1,"div",8),l(35,"div",7),c(36),p(37,"translate"),r(),l(38,"div",8),c(39),r()()(),E(40,Yfe,2,1,"mat-tab",10),E(41,Jfe,2,1,"mat-tab",11),r()()),n&2&&(a(6),v(" ",i.groupData.name," "),a(),g("className",m(8,21,i.groupData.status.code)),a(2),g("matTooltip",Le(i.groupData.status.value)),a(3),ea(" ",m(13,23,"labels.inputs.Account No"),": ",i.groupData.accountNo," ",i.groupData.externalId?"| External ID: "+i.groupData.externalId:""," "),a(7),v(" ",m(20,25,"labels.inputs.Activation Date")," "),a(3),v(" ",m(23,27,i.groupData.activationDate)," "),a(3),v(" ",m(26,29,"labels.inputs.Associated Officer")," "),a(3),v(" ",i.groupData.staffName," "),a(),I(i.groupData.centerName?29:-1),a(),I(i.groupData.centerName?30:-1),a(),I(i.groupData.collectionMeetingCalendar&&i.groupData.collectionMeetingCalendar.nextTenRecurringDates[0]?31:-1),a(),I(i.groupData.collectionMeetingCalendar&&i.groupData.collectionMeetingCalendar.nextTenRecurringDates[0]?32:-1),a(),I(i.groupData.collectionMeetingCalendar&&i.groupData.collectionMeetingCalendar.humanReadable?33:-1),a(),I(i.groupData.collectionMeetingCalendar&&i.groupData.collectionMeetingCalendar.humanReadable?34:-1),a(2),v(" ",m(37,31,"labels.inputs.Number of Clients")," "),a(3),v(" ",i.clientData?i.clientData.length:""," "),a(),I(i.groupAccountsData&&i.groupAccountsData.loanAccounts?40:-1),a(),I(i.groupAccountsData&&i.groupAccountsData.savingsAccounts?41:-1))},dependencies:[ue,fe,Je,sa,ke,Qr,Qo,si,vl,Lr,Yr,Ls,Vs,Pi,he,go],styles:[".main-icon[_ngcontent-%COMP%]{margin:7px 0 0}h2[_ngcontent-%COMP%]{font-weight:500}.content[_ngcontent-%COMP%] div[_ngcontent-%COMP%]{margin:1rem 0;word-wrap:break-word}"]})}}return e})();var Kfe=()=>[10,25];function Xfe(e,o){e&1&&(l(0,"th",15),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.Account Number")))}function Zfe(e,o){if(e&1&&(l(0,"td",16),c(1),r()),e&2){let t=o.$implicit;a(),h(t.accountNo)}}function e1e(e,o){e&1&&(l(0,"th",15),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.Share Account")))}function t1e(e,o){if(e&1&&(l(0,"td",16),c(1),r()),e&2){let t=o.$implicit;a(),h(t.productName)}}function i1e(e,o){e&1&&(l(0,"th",15),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.Approved Shares")))}function n1e(e,o){if(e&1&&(l(0,"td",16),c(1),r()),e&2){let t=o.$implicit;a(),h(t.totalApprovedShares)}}function o1e(e,o){e&1&&(l(0,"th",17),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.Status")))}function a1e(e,o){if(e&1&&(l(0,"td",16)(1,"span",18),p(2,"statusLookup"),b(3,"fa-icon",19),r()()),e&2){let t=o.$implicit;a(),g("className",m(2,3,t.status.code)),a(2),g("matTooltip",Le(t.status.value))}}function r1e(e,o){e&1&&b(0,"tr",20)}function l1e(e,o){e&1&&b(0,"tr",21)}var Uf=(()=>{class e{constructor(){this.accountsFilterPipe=T(as),this.displayedColumns=["accountNo","productName","totalApprovedShares","Status"],this.showClosed=!1}set shareAccountData(t){this.accountData=t;let n=this.accountsFilterPipe.transform(t,"share",this.showClosed?"closed":"open","isShare");this.dataSource=new Wt(n),this.dataSource.paginator=this.paginator,this.dataSource.sort=this.sort}applyFilter(t){this.dataSource.filter=t.trim().toLowerCase()}toggleClosed(){this.showClosed=!this.showClosed;let t=this.accountsFilterPipe.transform(this.accountData,"share",this.showClosed?"closed":"open","isShare");this.dataSource=new Wt(t),this.dataSource.paginator=this.paginator,this.dataSource.sort=this.sort}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275cmp=me({type:e,selectors:[["mifosx-share-account-table"]],viewQuery:function(n,i){if(n&1&&(Ee(kt,7),Ee(It,7)),n&2){let s;Te(s=Me())&&(i.paginator=s.first),Te(s=Me())&&(i.sort=s.first)}},inputs:{shareAccountData:"shareAccountData"},decls:24,vars:9,consts:[[1,"layout-row","align-between","align-items-center"],[1,"flex-50"],["matInput","",3,"keyup"],["mat-raised-button","","color","primary",3,"click"],["mat-table","","matSort","",3,"dataSource"],["matColumnDef","accountNo"],["mat-header-cell","","mat-sort-header","",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","productName"],["matColumnDef","totalApprovedShares"],["matColumnDef","Status"],["mat-header-cell","",4,"matHeaderCellDef"],["mat-header-row","",4,"matHeaderRowDef"],["mat-row","",4,"matRowDef","matRowDefColumns"],["showFirstLastButtons","",3,"pageSizeOptions"],["mat-header-cell","","mat-sort-header",""],["mat-cell",""],["mat-header-cell",""],[3,"className"],["matTooltipPosition","right","icon","circle","size","md",3,"matTooltip"],["mat-header-row",""],["mat-row",""]],template:function(n,i){n&1&&(l(0,"div",0)(1,"mat-form-field",1)(2,"mat-label"),c(3),p(4,"translate"),r(),l(5,"input",2),R("keyup",function(d){return i.applyFilter(d.target.value)}),r()(),l(6,"button",3),R("click",function(){return i.toggleClosed()}),c(7),r()(),l(8,"table",4),X(9,5),F(10,Xfe,3,3,"th",6)(11,Zfe,2,1,"td",7),Z(),X(12,8),F(13,e1e,3,3,"th",6)(14,t1e,2,1,"td",7),Z(),X(15,9),F(16,i1e,3,3,"th",6)(17,n1e,2,1,"td",7),Z(),X(18,10),F(19,o1e,3,3,"th",11)(20,a1e,4,5,"td",7),Z(),F(21,r1e,1,0,"tr",12)(22,l1e,1,0,"tr",13),r(),b(23,"mat-paginator",14)),n&2&&(a(3),h(m(4,6,"labels.inputs.Filter")),a(4),v(" ",i.showClosed?"View Active":"View Closed"," "),a(),g("dataSource",i.dataSource),a(13),g("matHeaderRowDef",i.displayedColumns),a(),g("matRowDefColumns",i.displayedColumns),a(),g("pageSizeOptions",oe(8,Kfe)))},dependencies:[ue,fe,Fe,Be,ze,ve,_t,It,xt,vt,bt,ri,Ct,yt,ke,si,St,Pt,wt,Tt,kt,he,go],encapsulation:2})}}return e})();var s1e=()=>[10,25];function c1e(e,o){e&1&&(l(0,"th",11),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.Account Number")))}function p1e(e,o){if(e&1&&(l(0,"td",12),c(1),r()),e&2){let t=o.$implicit;a(),h(t.accountNo)}}function m1e(e,o){e&1&&(l(0,"th",11),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.Group Name")))}function d1e(e,o){if(e&1&&(l(0,"td",12),c(1),r()),e&2){let t=o.$implicit;a(),h(t.name)}}function u1e(e,o){e&1&&b(0,"tr",13)}function f1e(e,o){e&1&&b(0,"tr",14)}var Wf=(()=>{class e{set memberGroupData(t){this.dataSource=new Wt(t),this.dataSource.paginator=this.paginator,this.dataSource.sort=this.sort}constructor(){this.displayedColumns=["accountNo","name"]}applyFilter(t){this.dataSource.filter=t.trim().toLowerCase()}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275cmp=me({type:e,selectors:[["mifosx-member-groups"]],viewQuery:function(n,i){if(n&1&&(Ee(kt,7),Ee(It,7)),n&2){let s;Te(s=Me())&&(i.paginator=s.first),Te(s=Me())&&(i.sort=s.first)}},inputs:{memberGroupData:"memberGroupData"},decls:16,vars:8,consts:[[1,"layout-row"],[1,"flex-50"],["matInput","",3,"keyup"],["mat-table","","matSort","",3,"dataSource"],["matColumnDef","accountNo"],["mat-header-cell","","mat-sort-header","",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","name"],["mat-header-row","",4,"matHeaderRowDef"],["mat-row","",4,"matRowDef","matRowDefColumns"],["showFirstLastButtons","",3,"pageSizeOptions"],["mat-header-cell","","mat-sort-header",""],["mat-cell",""],["mat-header-row",""],["mat-row",""]],template:function(n,i){n&1&&(l(0,"div",0)(1,"mat-form-field",1)(2,"mat-label"),c(3),p(4,"translate"),r(),l(5,"input",2),R("keyup",function(d){return i.applyFilter(d.target.value)}),r()()(),l(6,"table",3),X(7,4),F(8,c1e,3,3,"th",5)(9,p1e,2,1,"td",6),Z(),X(10,7),F(11,m1e,3,3,"th",5)(12,d1e,2,1,"td",6),Z(),F(13,u1e,1,0,"tr",8)(14,f1e,1,0,"tr",9),r(),b(15,"mat-paginator",10)),n&2&&(a(3),h(m(4,5,"labels.inputs.Filter")),a(3),g("dataSource",i.dataSource),a(7),g("matHeaderRowDef",i.displayedColumns),a(),g("matRowDefColumns",i.displayedColumns),a(),g("pageSizeOptions",oe(7,s1e)))},dependencies:[ue,fe,Fe,Be,ze,_t,It,xt,vt,bt,ri,Ct,yt,St,Pt,wt,Tt,kt,he],encapsulation:2})}}return e})();function h1e(e,o){e&1&&(l(0,"div",7),c(1),p(2,"translate"),r()),e&2&&(a(),v(" ",m(2,1,"labels.inputs.First Name")," "))}function g1e(e,o){if(e&1&&(l(0,"div",8),c(1),r()),e&2){let t=w();a(),v(" ",t.clientData.firstName," ")}}function _1e(e,o){e&1&&(l(0,"div",7),c(1),p(2,"translate"),r()),e&2&&(a(),v(" ",m(2,1,"labels.inputs.Middle Name")," "))}function C1e(e,o){if(e&1&&(l(0,"div",8),c(1),r()),e&2){let t=w();a(),v(" ",t.clientData.middleName," ")}}function v1e(e,o){e&1&&(l(0,"div",7),c(1),p(2,"translate"),r()),e&2&&(a(),v(" ",m(2,1,"labels.inputs.Last Name")," "))}function x1e(e,o){if(e&1&&(l(0,"div",8),c(1),r()),e&2){let t=w();a(),v(" ",t.clientData.lastName," ")}}function b1e(e,o){e&1&&(l(0,"div",7),c(1),p(2,"translate"),r()),e&2&&(a(),v(" ",m(2,1,"labels.inputs.Date of Birth")," "))}function y1e(e,o){if(e&1&&(l(0,"div",8),c(1),p(2,"dateFormat"),r()),e&2){let t=w();a(),v(" ",m(2,1,t.clientData.dateOfBirth)," ")}}function S1e(e,o){e&1&&(l(0,"div",7),c(1),p(2,"translate"),r()),e&2&&(a(),v(" ",m(2,1,"labels.inputs.Mobile Number")," "))}function w1e(e,o){if(e&1&&(l(0,"div",8),c(1),r()),e&2){let t=w();a(),v(" ",t.clientData.mobileNo," ")}}function P1e(e,o){e&1&&(l(0,"div",7),c(1),p(2,"translate"),r()),e&2&&(a(),v(" ",m(2,1,"labels.inputs.Associated Office")," "))}function T1e(e,o){if(e&1&&(l(0,"div",8),c(1),r()),e&2){let t=w();a(),v(" ",t.clientData.officeName," ")}}function M1e(e,o){e&1&&(l(0,"div",7),c(1),p(2,"translate"),r()),e&2&&(a(),v(" ",m(2,1,"labels.inputs.Associated Staff")," "))}function D1e(e,o){if(e&1&&(l(0,"div",8),c(1),r()),e&2){let t=w();a(),v(" ",t.clientData.staffName," ")}}function E1e(e,o){if(e&1&&(l(0,"mat-tab",9),b(1,"mifosx-loan-account-table",13),r()),e&2){let t=w();a(),g("loanAccountData",t.clientAccountsData.loanAccounts)}}function I1e(e,o){if(e&1&&(l(0,"mat-tab",10),b(1,"mifosx-savings-account-table",14),r()),e&2){let t=w();a(),g("savingsAccountData",t.clientAccountsData.savingsAccounts)}}function O1e(e,o){if(e&1&&(l(0,"mat-tab",11),b(1,"mifosx-share-account-table",15),r()),e&2){let t=w();a(),g("shareAccountData",t.clientAccountsData.shareAccounts)}}function A1e(e,o){if(e&1&&(l(0,"mat-tab",12),b(1,"mifosx-member-groups",16),r()),e&2){let t=w();a(),g("memberGroupData",t.clientData.groups)}}var Qf=(()=>{class e{constructor(){}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275cmp=me({type:e,selectors:[["mifosx-client-navigation"]],viewQuery:function(n,i){if(n&1&&(Ee(Ls,5),Ee(Vs,5),Ee(Uf,5),Ee(Wf,5)),n&2){let s;Te(s=Me())&&(i.loanAccountTableComponent=s.first),Te(s=Me())&&(i.savingsAccountTableComponent=s.first),Te(s=Me())&&(i.shareAccountTableComponent=s.first),Te(s=Me())&&(i.memberGroupsComponent=s.first)}},inputs:{clientData:"clientData",clientAccountsData:"clientAccountsData"},decls:42,vars:35,consts:[[1,"layout-row","gap-5percent"],["icon","user","size","3x",1,"main-icon"],[1,"mat-typography"],[3,"className"],["matTooltipPosition","right","icon","circle","size","lg",3,"matTooltip"],["label","Details"],[1,"layout-row-wrap"],[1,"flex-50","mat-body-strong"],[1,"flex-50"],["label","Loan Accounts"],["label","Savings Accounts"],["label","Share Accounts"],["label","Group Members"],[3,"loanAccountData"],[3,"savingsAccountData"],[3,"shareAccountData"],[3,"memberGroupData"]],template:function(n,i){n&1&&(l(0,"mat-card-header",0),b(1,"fa-icon",1),l(2,"mat-card-title-group")(3,"div",2)(4,"mat-card-title")(5,"h2"),c(6),l(7,"span",3),p(8,"statusLookup"),b(9,"fa-icon",4),r()()(),l(10,"mat-card-subtitle")(11,"p"),c(12),p(13,"translate"),r()()()()(),l(14,"mat-card-content")(15,"mat-tab-group")(16,"mat-tab",5)(17,"div",6),E(18,h1e,3,3,"div",7),E(19,g1e,2,1,"div",8),E(20,_1e,3,3,"div",7),E(21,C1e,2,1,"div",8),E(22,v1e,3,3,"div",7),E(23,x1e,2,1,"div",8),E(24,b1e,3,3,"div",7),E(25,y1e,3,3,"div",8),E(26,S1e,3,3,"div",7),E(27,w1e,2,1,"div",8),l(28,"div",7),c(29),p(30,"translate"),r(),l(31,"div",8),c(32),p(33,"dateFormat"),r(),E(34,P1e,3,3,"div",7),E(35,T1e,2,1,"div",8),E(36,M1e,3,3,"div",7),E(37,D1e,2,1,"div",8),r()(),E(38,E1e,2,1,"mat-tab",9),E(39,I1e,2,1,"mat-tab",10),E(40,O1e,2,1,"mat-tab",11),E(41,A1e,2,1,"mat-tab",12),r()()),n&2&&(a(6),v(" ",i.clientData.displayName," "),a(),g("className",m(8,27,i.clientData.status.code)),a(2),g("matTooltip",Le(i.clientData.status.value)),a(3),ea(" ",m(13,29,"labels.inputs.Account No"),": ",i.clientData.accountNo," ",i.clientData.externalId?"| External ID: "+i.clientData.externalId:""," "),a(6),I(i.clientData.firstName?18:-1),a(),I(i.clientData.firstName?19:-1),a(),I(i.clientData.middleName?20:-1),a(),I(i.clientData.middleName?21:-1),a(),I(i.clientData.lastName?22:-1),a(),I(i.clientData.lastName?23:-1),a(),I(i.clientData.dateOfBirth?24:-1),a(),I(i.clientData.dateOfBirth?25:-1),a(),I(i.clientData.mobileNo?26:-1),a(),I(i.clientData.mobileNo?27:-1),a(2),v(" ",m(30,31,"labels.inputs.Activation Date")," "),a(3),v(" ",m(33,33,i.clientData.activationDate)," "),a(2),I(i.clientData.officeName?34:-1),a(),I(i.clientData.officeName?35:-1),a(),I(i.clientData.staffName?36:-1),a(),I(i.clientData.staffName?37:-1),a(),I(i.clientAccountsData&&i.clientAccountsData.loanAccounts?38:-1),a(),I(i.clientAccountsData&&i.clientAccountsData.savingsAccounts?39:-1),a(),I(i.clientAccountsData&&i.clientAccountsData.shareAccounts?40:-1),a(),I(i.clientData.groups&&i.clientData.groups.length!==0?41:-1))},dependencies:[ue,fe,Je,sa,ke,Qr,Qo,si,vl,Lr,Yr,Ls,Vs,Uf,Wf,Pi,he,go],styles:[".main-icon[_ngcontent-%COMP%]{margin:7px 0 0}h2[_ngcontent-%COMP%]{font-weight:500}.content[_ngcontent-%COMP%] div[_ngcontent-%COMP%]{margin:1rem 0;word-wrap:break-word}"]})}}return e})();function F1e(e,o){if(e&1&&(l(0,"mat-option",6),c(1),r()),e&2){let t=o.$implicit;g("value",t.id),a(),v(" ",t.name," ")}}function k1e(e,o){if(e&1&&(l(0,"mat-form-field")(1,"mat-label"),c(2),p(3,"translate"),r(),l(4,"mat-select",5),Se(5,F1e,2,2,"mat-option",6,Pe),r()()),e&2){let t=w(2);a(2),h(m(3,2,"labels.inputs.Office")),a(2),g("formControl",t.officeSelector),a(),we(t.officeData)}}function B1e(e,o){e&1&&F(0,k1e,7,4,"mat-form-field",4),e&2&&g("mifosxHasPermission","READ_OFFICES")}function R1e(e,o){if(e&1&&(l(0,"mat-option",6),c(1),r()),e&2){let t=o.$implicit;g("value",t.id),a(),v(" ",t.displayName," ")}}function N1e(e,o){if(e&1&&(l(0,"mat-form-field")(1,"mat-label"),c(2),r(),l(3,"mat-select",5),Se(4,R1e,2,2,"mat-option",6,Pe),r()()),e&2){let t=w(2);a(2),h(t.employeeData.length?"Officer":"No Associated Officers"),a(),g("formControl",t.employeeSelector),a(),we(t.employeeData)}}function L1e(e,o){e&1&&F(0,N1e,6,2,"mat-form-field",4),e&2&&g("mifosxHasPermission","READ_STAFF")}function V1e(e,o){if(e&1&&(l(0,"mat-option",6),c(1),r()),e&2){let t=o.$implicit;g("value",t.id),a(),v(" ",t.name," ")}}function q1e(e,o){if(e&1&&(l(0,"mat-form-field")(1,"mat-label"),c(2),r(),l(3,"mat-select",5),Se(4,V1e,2,2,"mat-option",6,Pe),r()()),e&2){let t=w(2);a(2),h(t.centerData.length?"Center":"No Associated Centers"),a(),g("formControl",t.centerSelector),a(),we(t.centerData)}}function z1e(e,o){e&1&&F(0,q1e,6,2,"mat-form-field",4),e&2&&g("mifosxHasPermission","READ_CENTERS")}function H1e(e,o){if(e&1&&(l(0,"mat-option",6),c(1),r()),e&2){let t=o.$implicit;g("value",t.id),a(),v(" ",t.name," ")}}function G1e(e,o){if(e&1&&(l(0,"mat-form-field")(1,"mat-label"),c(2),r(),l(3,"mat-select",5),Se(4,H1e,2,2,"mat-option",6,Pe),r()()),e&2){let t=w(2);a(2),h(t.groupData.length?"Group":"No Associated Groups"),a(),g("formControl",t.groupSelector),a(),we(t.groupData)}}function j1e(e,o){e&1&&F(0,G1e,6,2,"mat-form-field",4),e&2&&g("mifosxHasPermission","READ_GROUPS")}function $1e(e,o){if(e&1&&(l(0,"mat-option",6),c(1),r()),e&2){let t=o.$implicit;g("value",t.id),a(),v(" ",t.displayName," ")}}function U1e(e,o){if(e&1&&(l(0,"mat-form-field")(1,"mat-label"),c(2),r(),l(3,"mat-select",5),Se(4,$1e,2,2,"mat-option",6,Pe),r()()),e&2){let t=w(2);a(2),h(t.clientData.length?"Client":"No Associated Clients"),a(),g("formControl",t.clientSelector),a(),we(t.clientData)}}function W1e(e,o){e&1&&F(0,U1e,6,2,"mat-form-field",4),e&2&&g("mifosxHasPermission","READ_CLIENTS")}function Q1e(e,o){if(e&1&&b(0,"mifosx-office-navigation",7),e&2){let t=w(2);g("officeData",t.selectedItem)("employeeData",t.employeeData)}}function Y1e(e,o){if(e&1&&b(0,"mifosx-staff-navigation",8),e&2){let t=w(2);g("employeeData",t.selectedItem)("centerData",t.centerData)}}function J1e(e,o){if(e&1&&b(0,"mifosx-center-navigation",9),e&2){let t=w(2);g("centerData",t.selectedItem)("groupData",t.groupData)("centerAccountsData",t.selectedItemAccounts)("centerSummaryData",t.selectedItemSummary)}}function K1e(e,o){if(e&1&&b(0,"mifosx-group-navigation",10),e&2){let t=w(2);g("groupData",t.selectedItem)("clientData",t.clientData)("groupAccountsData",t.selectedItemAccounts)}}function X1e(e,o){if(e&1&&b(0,"mifosx-client-navigation",11),e&2){let t=w(2);g("clientData",t.selectedItem)("clientAccountsData",t.selectedItemAccounts)}}function Z1e(e,o){if(e&1&&(l(0,"mat-card",3),E(1,Q1e,1,2,"mifosx-office-navigation",7),E(2,Y1e,1,2,"mifosx-staff-navigation",8),E(3,J1e,1,4,"mifosx-center-navigation",9),E(4,K1e,1,3,"mifosx-group-navigation",10),E(5,X1e,1,2,"mifosx-client-navigation",11),r()),e&2){let t=w();a(),I(t.selectedItem.itemType==="office"?1:-1),a(),I(t.selectedItem.itemType==="employee"?2:-1),a(),I(t.selectedItem.itemType==="center"?3:-1),a(),I(t.selectedItem.itemType==="group"?4:-1),a(),I(t.selectedItem.itemType==="client"?5:-1)}}var EC=(()=>{class e{constructor(){this.navigationService=T(DC),this.route=T(Ie),this.router=T(qe),this.officeSelector=new it,this.employeeSelector=new it,this.centerSelector=new it,this.groupSelector=new it,this.clientSelector=new it,this.route.data.subscribe(t=>{this.officeData=t.offices})}ngOnInit(){this.setOfficeSelector(),this.setEmployeeSelector(),this.setCenterSelector(),this.setGroupSelector(),this.setClientSelector()}setOfficeSelector(){this.officeSelector.valueChanges.subscribe(t=>{this.employeeSelector.reset(null,{emitEvent:!1}),this.centerSelector.reset(null,{emitEvent:!1}),this.groupSelector.reset(null,{emitEvent:!1}),this.clientSelector.reset(null,{emitEvent:!1}),this.employeeData=null,this.centerData=null,this.groupData=null,this.clientData=null,this.selectedItem=this.officeData.find(n=>n.id===t),this.selectedItem.itemType="office",this.navigationService.getEmployees(t).subscribe(n=>{this.employeeData=n,this.employeeData.length?this.employeeSelector.enable():this.employeeSelector.disable()})})}setEmployeeSelector(){this.employeeSelector.valueChanges.subscribe(t=>{t&&(this.centerSelector.reset(null,{emitEvent:!1}),this.groupSelector.reset(null,{emitEvent:!1}),this.clientSelector.reset(null,{emitEvent:!1}),this.centerData=null,this.groupData=null,this.clientData=null,this.selectedItem=this.employeeData.find(n=>n.id===t),this.selectedItem.itemType="employee",this.navigationService.getCentersFromStaffId(t).subscribe(n=>{this.centerData=n,this.centerData.length?this.centerSelector.enable():this.centerSelector.disable()}))})}setCenterSelector(){this.centerSelector.valueChanges.subscribe(t=>{t&&(this.groupSelector.reset(null,{emitEvent:!1}),this.clientSelector.reset(null,{emitEvent:!1}),this.groupData=null,this.clientData=null,this.navigationService.getCenter(t).subscribe(n=>{this.selectedItem=n,this.selectedItem.itemType="center",this.groupData=n.groupMembers?n.groupMembers:[],this.groupData.length?this.groupSelector.enable():this.groupSelector.disable()}),this.selectedItemAccounts=null,this.navigationService.getCenterAccounts(t).subscribe(n=>{this.selectedItemAccounts=n}),this.selectedItemSummary=null,this.navigationService.getCenterSummary(t).subscribe(n=>{this.selectedItemSummary=n[0]}))})}setGroupSelector(){this.groupSelector.valueChanges.subscribe(t=>{t&&(this.clientSelector.reset(null,{emitEvent:!1}),this.clientData=null,this.navigationService.getGroup(t).subscribe(n=>{this.selectedItem=n,this.selectedItem.itemType="group",this.clientData=n.clientMembers?n.clientMembers:[],this.clientData.length?this.clientSelector.enable():this.clientSelector.disable()}),this.selectedItemAccounts=null,this.navigationService.getGroupAccounts(t).subscribe(n=>{this.selectedItemAccounts=n}))})}setClientSelector(){this.clientSelector.valueChanges.subscribe(t=>{t&&(this.selectedItemAccounts=null,this.navigationService.getClient(t).subscribe(n=>{this.selectedItem=n,this.selectedItem.itemType="client"}),this.navigationService.getClientAccounts(t).subscribe(n=>{this.selectedItemAccounts=n}))})}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275cmp=me({type:e,selectors:[["mifosx-navigation"]],viewQuery:function(n,i){if(n&1&&(Ee(Hf,5),Ee(Gf,5),Ee(jf,5),Ee($f,5),Ee(Qf,5)),n&2){let s;Te(s=Me())&&(i.officeNavigationComponent=s.first),Te(s=Me())&&(i.staffNavigationComponent=s.first),Te(s=Me())&&(i.centerNavigationComponent=s.first),Te(s=Me())&&(i.groupNavigationComponent=s.first),Te(s=Me())&&(i.clientNavigationComponent=s.first)}},decls:12,vars:6,consts:[[1,"container"],[1,"layout-row-wrap","responsive-column","gap-2percent"],[1,"flex-48"],[1,"layout-column"],[4,"mifosxHasPermission"],[3,"formControl"],[3,"value"],[3,"officeData","employeeData"],[3,"employeeData","centerData"],[3,"centerData","groupData","centerAccountsData","centerSummaryData"],[3,"groupData","clientData","groupAccountsData"],[3,"clientData","clientAccountsData"]],template:function(n,i){n&1&&(l(0,"div",0)(1,"div",1)(2,"div",2)(3,"mat-card",3)(4,"mat-card-content",3),E(5,B1e,1,1,"mat-form-field"),E(6,L1e,1,1,"mat-form-field"),E(7,z1e,1,1,"mat-form-field"),E(8,j1e,1,1,"mat-form-field"),E(9,W1e,1,1,"mat-form-field"),r()()(),l(10,"div",2),E(11,Z1e,6,5,"mat-card",3),r()()()),n&2&&(a(5),I(i.officeData===void 0||i.officeData===null?-1:5),a(),I(i.employeeData===void 0||i.employeeData===null?-1:6),a(),I(i.centerData===void 0||i.centerData===null?-1:7),a(),I(i.groupData===void 0||i.groupData===null?-1:8),a(),I(i.clientData===void 0||i.clientData===null?-1:9),a(2),I(i.selectedItem?11:-1))},dependencies:[ue,fe,Ue,_n,$e,Je,Fe,Be,gt,ft,Ke,Hf,Gf,jf,$f,Qf,he],styles:["[_nghost-%COMP%]{display:block}.container[_ngcontent-%COMP%]{width:100%}.layout-row-wrap.responsive-column[_ngcontent-%COMP%]{align-items:flex-start}.flex-48[_ngcontent-%COMP%]{min-width:20rem}@media (width >= 1200px){.flex-48[_ngcontent-%COMP%]{flex-basis:48%}}mat-card[_ngcontent-%COMP%]{padding:1rem;border-radius:.5rem;overflow:hidden}mat-card-content[_ngcontent-%COMP%]{display:grid;grid-template-columns:100%}@media (width >= 768px){mat-card-content[_ngcontent-%COMP%]{grid-template-columns:50% 50%}}@media (width >= 1200px){mat-card-content[_ngcontent-%COMP%]{grid-template-columns:50% 50%;gap:1rem}}mat-form-field[_ngcontent-%COMP%]{width:100%}mat-label[_ngcontent-%COMP%]{letter-spacing:.0125rem}"]})}}return e})();var AM=(()=>{class e{constructor(){this.navigationService=T(DC)}resolve(){return this.navigationService.getOffices()}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275prov=Re({token:e,factory:e.\u0275fac})}}return e})();var ehe=[_o.withShell([{path:"navigation",component:EC,data:{title:"Navigation",breadcrumb:"Navigation"},resolve:{offices:AM}}])],w9=(()=>{class e{static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275mod=Gi({type:e})}static{this.\u0275inj=Hi({providers:[AM],imports:[gn.forChild(ehe),gn]})}}return e})();var P9=(()=>{class e{static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275mod=Gi({type:e})}static{this.\u0275inj=Hi({imports:[oo,ha,w9,EC,Hf,Gf,jf,$f,Qf,Ls,Uf,Vs,Wf]})}}return e})();var the=["showClosedAccounts"],ihe=()=>[5,50,100],nhe=()=>["../","organization","bulk-import","Clients"],ohe=()=>["create"],ahe=e=>[e,"general"];function rhe(e,o){e&1&&(l(0,"div",6)(1,"mat-checkbox",26,0),c(3),p(4,"translate"),r()()),e&2&&(a(3),v("",m(4,1,"labels.inputs.Show Closed Accounts")," "))}function lhe(e,o){e&1&&(l(0,"button",27),b(1,"fa-icon",28),c(2),p(3,"translate"),r()),e&2&&(g("routerLink",oe(4,nhe)),a(2),v("",m(3,2,"labels.buttons.Import Client")," "))}function she(e,o){e&1&&(l(0,"button",27),b(1,"fa-icon",29),c(2),p(3,"translate"),r()),e&2&&(g("routerLink",oe(4,ohe)),a(2),v("",m(3,2,"labels.buttons.Create Client")," "))}function che(e,o){e&1&&(l(0,"div"),b(1,"mat-progress-bar",30),r())}function phe(e,o){e&1&&(l(0,"th",31),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.name")))}function mhe(e,o){if(e&1&&(l(0,"td",32),c(1),r()),e&2){let t=o.$implicit;g("routerLink",Nt(2,ahe,t.id)),a(),h(t.displayName)}}function dhe(e,o){e&1&&(l(0,"th",31),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.Account No")))}function uhe(e,o){if(e&1&&(l(0,"td",33),b(1,"mifosx-account-number",34),r()),e&2){let t=o.$implicit;a(),g("accountNo",Le(t.accountNumber))}}function fhe(e,o){e&1&&(l(0,"th",31),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.External Id")))}function hhe(e,o){if(e&1&&(l(0,"td",33),b(1,"mifosx-external-identifier",35),r()),e&2){let t=o.$implicit;a(),g("externalId",Le(t.externalId))}}function ghe(e,o){e&1&&(l(0,"th",36),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.Status")))}function _he(e,o){if(e&1&&(l(0,"td",33)(1,"div",37),p(2,"statusLookup"),b(3,"fa-icon",38),l(4,"span",39),c(5),p(6,"translate"),r()()()),e&2){let t=o.$implicit;a(),g("ngClass",m(2,2,t.status.code)),a(4),v(" ",m(6,4,t.status.value)," ")}}function Che(e,o){e&1&&(l(0,"th",36),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.Office Name")))}function vhe(e,o){if(e&1&&(l(0,"td",33),c(1),r()),e&2){let t=o.$implicit;a(),h(t.officeName)}}function xhe(e,o){e&1&&b(0,"tr",40)}function bhe(e,o){e&1&&b(0,"tr",41)}var IC=(()=>{class e{constructor(){this.clientService=T(Oi),this.displayedColumns=["displayName","accountNumber","externalId","status","officeName"],this.dataSource=new Wt,this.existsClientsToFilter=!1,this.notExistsClientsToFilter=!1,this.isLoading=!1,this.pageSize=50,this.currentPage=0,this.filterText="",this.sortAttribute="",this.sortDirection=""}ngOnInit(){un.preloadClients&&this.getClients()}search(t){this.filterText=t,this.resetPaginator(),this.getClients()}getClients(){this.isLoading=!0,this.clientService.searchByText(this.filterText,this.currentPage,this.pageSize,this.sortAttribute,this.sortDirection).subscribe(t=>{this.dataSource.data=t.content,this.totalRows=t.totalElements,this.existsClientsToFilter=t.numberOfElements>0,this.notExistsClientsToFilter=!this.existsClientsToFilter,this.isLoading=!1},t=>{this.isLoading=!1})}pageChanged(t){this.pageSize=t.pageSize,this.currentPage=t.pageIndex,this.getClients()}sortChanged(t){t.direction===""?(this.sortDirection="",this.sortAttribute=""):(this.sortAttribute=t.active,this.sortDirection=t.direction),this.resetPaginator(),this.getClients()}resetPaginator(){this.currentPage=0,this.paginator.firstPage()}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275cmp=me({type:e,selectors:[["mifosx-clients"]],viewQuery:function(n,i){if(n&1&&(Ee(the,5),Ee(kt,5),Ee(It,5)),n&2){let s;Te(s=Me())&&(i.showClosedAccounts=s.first),Te(s=Me())&&(i.paginator=s.first),Te(s=Me())&&(i.sort=s.first)}},decls:35,vars:16,consts:[["showClosedAccounts",""],[1,"container"],[1,"layout-column","layout-gt-sm-row","align-gt-sm-start-center"],[1,"search-box","m-r-30"],[1,"search-box"],["matInput","","placeholder","Search by client name, external Id, mobile",1,"search-box",3,"keydown.enter"],[1,"filter-box"],[1,"action-button","gap-25px"],["mat-raised-button","","color","primary",3,"routerLink",4,"mifosxHasPermission"],[1,"client-list",3,"hidden"],["mat-table","","matSort","",1,"bordered-table",3,"matSortChange","dataSource"],["matColumnDef","displayName"],["mat-header-cell","","mat-sort-header","",4,"matHeaderCellDef"],["mat-cell","",3,"routerLink",4,"matCellDef"],["matColumnDef","accountNumber"],["mat-cell","",4,"matCellDef"],["matColumnDef","externalId"],["matColumnDef","status"],["mat-header-cell","",4,"matHeaderCellDef"],["matColumnDef","officeName"],["mat-header-row","",4,"matHeaderRowDef"],["mat-row","","class","select-row",4,"matRowDef","matRowDefColumns"],["showFirstLastButtons","",3,"page","pageSize","pageSizeOptions","length"],[1,"alert",3,"hidden"],[1,"message"],[1,"fa","fa-exclamation-circle","alert-check"],["labelPosition","after",1,"m-r-10"],["mat-raised-button","","color","primary",3,"routerLink"],["icon","download",1,"m-r-20"],["icon","plus",1,"m-r-20"],["mode","indeterminate"],["mat-header-cell","","mat-sort-header",""],["mat-cell","",3,"routerLink"],["mat-cell",""],["display","left",3,"accountNo"],["display","left",3,"externalId"],["mat-header-cell",""],[3,"ngClass"],["icon","stop"],[1,"m-l-10","status"],["mat-header-row",""],["mat-row","",1,"select-row"]],template:function(n,i){n&1&&(l(0,"mat-card",1)(1,"div",2)(2,"div",3)(3,"mat-form-field",4)(4,"input",5),R("keydown.enter",function(d){return i.search(d.target.value)}),r()()(),E(5,rhe,5,3,"div",6),l(6,"div",7),F(7,lhe,4,5,"button",8)(8,she,4,5,"button",8),r()(),l(9,"div",9),E(10,che,2,0,"div"),l(11,"table",10),R("matSortChange",function(d){return i.sortChanged(d)}),X(12,11),F(13,phe,3,3,"th",12)(14,mhe,2,4,"td",13),Z(),X(15,14),F(16,dhe,3,3,"th",12)(17,uhe,2,2,"td",15),Z(),X(18,16),F(19,fhe,3,3,"th",12)(20,hhe,2,2,"td",15),Z(),X(21,17),F(22,ghe,3,3,"th",18)(23,_he,7,6,"td",15),Z(),X(24,19),F(25,Che,3,3,"th",18)(26,vhe,2,1,"td",15),Z(),F(27,xhe,1,0,"tr",20)(28,bhe,1,0,"tr",21),r(),l(29,"mat-paginator",22),R("page",function(d){return i.pageChanged(d)}),r()(),l(30,"div",23)(31,"div",24),b(32,"i",25),c(33),p(34,"translate"),r()()()),n&2&&(a(5),I(i.existsClientsToFilter?5:-1),a(2),g("mifosxHasPermission","CREATE_CLIENT"),a(),g("mifosxHasPermission","CREATE_CLIENT"),a(),g("hidden",!i.existsClientsToFilter),a(),I(i.isLoading?10:-1),a(),g("dataSource",i.dataSource),a(16),g("matHeaderRowDef",i.displayedColumns),a(),g("matRowDefColumns",i.displayedColumns),a(),g("pageSize",i.pageSize)("pageSizeOptions",oe(15,ihe))("length",i.totalRows),a(),g("hidden",!i.notExistsClientsToFilter),a(3),v(" ",m(34,13,"labels.text.No client was found")," "))},dependencies:[ue,co,fe,Ae,$e,Fe,ze,ve,fi,Ke,ke,os,_t,It,xt,vt,bt,ri,Ct,yt,rc,Ea,St,Pt,wt,Tt,kt,he,go],styles:[".container[_ngcontent-%COMP%]{padding:24px}.container[_ngcontent-%COMP%] .layout-column[_ngcontent-%COMP%], .container[_ngcontent-%COMP%] .layout-gt-sm-row[_ngcontent-%COMP%]{display:flex;align-items:center;margin-bottom:20px;flex-wrap:nowrap;gap:20px}.container[_ngcontent-%COMP%] .layout-column.align-gt-sm-start-center[_ngcontent-%COMP%], .container[_ngcontent-%COMP%] .layout-gt-sm-row.align-gt-sm-start-center[_ngcontent-%COMP%]{align-items:center;justify-content:flex-start}.container[_ngcontent-%COMP%] .layout-column[_ngcontent-%COMP%] .search-box[_ngcontent-%COMP%], .container[_ngcontent-%COMP%] .layout-gt-sm-row[_ngcontent-%COMP%] .search-box[_ngcontent-%COMP%]{display:flex;align-items:center;gap:15px;flex:1;min-width:0}.container[_ngcontent-%COMP%] .layout-column[_ngcontent-%COMP%] .search-box.m-r-30[_ngcontent-%COMP%], .container[_ngcontent-%COMP%] .layout-gt-sm-row[_ngcontent-%COMP%] .search-box.m-r-30[_ngcontent-%COMP%]{margin-right:30px}.container[_ngcontent-%COMP%] .layout-column[_ngcontent-%COMP%] .search-box[_ngcontent-%COMP%] mat-form-field[_ngcontent-%COMP%], .container[_ngcontent-%COMP%] .layout-gt-sm-row[_ngcontent-%COMP%] .search-box[_ngcontent-%COMP%] mat-form-field[_ngcontent-%COMP%]{min-width:200px;flex:1}.container[_ngcontent-%COMP%] .layout-column[_ngcontent-%COMP%] .search-box[_ngcontent-%COMP%] mat-form-field.search-box[_ngcontent-%COMP%], .container[_ngcontent-%COMP%] .layout-gt-sm-row[_ngcontent-%COMP%] .search-box[_ngcontent-%COMP%] mat-form-field.search-box[_ngcontent-%COMP%]{width:auto}.container[_ngcontent-%COMP%] .layout-column[_ngcontent-%COMP%] .search-box[_ngcontent-%COMP%] mat-form-field[_ngcontent-%COMP%] + mat-form-field[_ngcontent-%COMP%], .container[_ngcontent-%COMP%] .layout-gt-sm-row[_ngcontent-%COMP%] .search-box[_ngcontent-%COMP%] mat-form-field[_ngcontent-%COMP%] + mat-form-field[_ngcontent-%COMP%]{margin-left:15px}.container[_ngcontent-%COMP%] .layout-column[_ngcontent-%COMP%] .search-box[_ngcontent-%COMP%] mat-checkbox[_ngcontent-%COMP%], .container[_ngcontent-%COMP%] .layout-gt-sm-row[_ngcontent-%COMP%] .search-box[_ngcontent-%COMP%] mat-checkbox[_ngcontent-%COMP%]{white-space:nowrap;flex-shrink:0;margin-left:15px}.container[_ngcontent-%COMP%] .layout-column[_ngcontent-%COMP%] .search-box[_ngcontent-%COMP%] mat-checkbox.m-r-10[_ngcontent-%COMP%], .container[_ngcontent-%COMP%] .layout-gt-sm-row[_ngcontent-%COMP%] .search-box[_ngcontent-%COMP%] mat-checkbox.m-r-10[_ngcontent-%COMP%]{margin-right:10px}.container[_ngcontent-%COMP%] .layout-column[_ngcontent-%COMP%] .action-button[_ngcontent-%COMP%], .container[_ngcontent-%COMP%] .layout-gt-sm-row[_ngcontent-%COMP%] .action-button[_ngcontent-%COMP%]{display:flex;align-items:center;flex-shrink:0;margin-left:auto}.container[_ngcontent-%COMP%] .layout-column[_ngcontent-%COMP%] .action-button.gap-25px[_ngcontent-%COMP%], .container[_ngcontent-%COMP%] .layout-gt-sm-row[_ngcontent-%COMP%] .action-button.gap-25px[_ngcontent-%COMP%]{gap:25px}.container[_ngcontent-%COMP%] .layout-column[_ngcontent-%COMP%] .action-button[_ngcontent-%COMP%] button[_ngcontent-%COMP%], .container[_ngcontent-%COMP%] .layout-gt-sm-row[_ngcontent-%COMP%] .action-button[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{white-space:nowrap}.container[_ngcontent-%COMP%] .layout-column[_ngcontent-%COMP%] .action-button[_ngcontent-%COMP%] button[_ngcontent-%COMP%] fa-icon.m-r-10[_ngcontent-%COMP%], .container[_ngcontent-%COMP%] .layout-column[_ngcontent-%COMP%] .action-button[_ngcontent-%COMP%] button[_ngcontent-%COMP%] fa-icon.m-r-20[_ngcontent-%COMP%], .container[_ngcontent-%COMP%] .layout-gt-sm-row[_ngcontent-%COMP%] .action-button[_ngcontent-%COMP%] button[_ngcontent-%COMP%] fa-icon.m-r-10[_ngcontent-%COMP%], .container[_ngcontent-%COMP%] .layout-gt-sm-row[_ngcontent-%COMP%] .action-button[_ngcontent-%COMP%] button[_ngcontent-%COMP%] fa-icon.m-r-20[_ngcontent-%COMP%]{margin-right:10px}.container[_ngcontent-%COMP%] .bordered-table[_ngcontent-%COMP%]{width:100%;border:1px solid #e0e0e0;border-radius:4px;overflow:hidden;margin-top:16px}.container[_ngcontent-%COMP%] .bordered-table[_ngcontent-%COMP%] .select-row[_ngcontent-%COMP%]{cursor:pointer}.container[_ngcontent-%COMP%] .bordered-table[_ngcontent-%COMP%] .select-row[_ngcontent-%COMP%]:hover{background-color:#f5f5f5}.container[_ngcontent-%COMP%] .bordered-table[_ngcontent-%COMP%] th[_ngcontent-%COMP%], .container[_ngcontent-%COMP%] .bordered-table[_ngcontent-%COMP%] td[_ngcontent-%COMP%]{padding:12px 16px}.container[_ngcontent-%COMP%] .bordered-table[_ngcontent-%COMP%] th[_ngcontent-%COMP%]{font-weight:500;border-bottom:1px solid #e0e0e0}.container[_ngcontent-%COMP%] .bordered-table[_ngcontent-%COMP%] tr[_ngcontent-%COMP%]{border-bottom:1px solid #f0f0f0}.container[_ngcontent-%COMP%] .bordered-table[_ngcontent-%COMP%] tr[_ngcontent-%COMP%]:last-child{border-bottom:none}.container[_ngcontent-%COMP%] mat-paginator[_ngcontent-%COMP%]{border-top:1px solid #e0e0e0;margin-top:0}.container[_ngcontent-%COMP%] mat-progress-bar[_ngcontent-%COMP%]{margin:0}@media (width <= 768px){.container[_ngcontent-%COMP%]{padding:16px}.container[_ngcontent-%COMP%] .layout-column[_ngcontent-%COMP%], .container[_ngcontent-%COMP%] .layout-gt-sm-row[_ngcontent-%COMP%]{flex-wrap:wrap}.container[_ngcontent-%COMP%] .layout-column[_ngcontent-%COMP%] .search-box[_ngcontent-%COMP%], .container[_ngcontent-%COMP%] .layout-gt-sm-row[_ngcontent-%COMP%] .search-box[_ngcontent-%COMP%]{width:100%;margin-right:0!important;margin-bottom:15px;flex-wrap:wrap}.container[_ngcontent-%COMP%] .layout-column[_ngcontent-%COMP%] .search-box[_ngcontent-%COMP%] mat-form-field[_ngcontent-%COMP%], .container[_ngcontent-%COMP%] .layout-gt-sm-row[_ngcontent-%COMP%] .search-box[_ngcontent-%COMP%] mat-form-field[_ngcontent-%COMP%]{min-width:150px;margin-bottom:10px}.container[_ngcontent-%COMP%] .layout-column[_ngcontent-%COMP%] .search-box[_ngcontent-%COMP%] mat-form-field[_ngcontent-%COMP%] + mat-form-field[_ngcontent-%COMP%], .container[_ngcontent-%COMP%] .layout-gt-sm-row[_ngcontent-%COMP%] .search-box[_ngcontent-%COMP%] mat-form-field[_ngcontent-%COMP%] + mat-form-field[_ngcontent-%COMP%]{margin-left:0}.container[_ngcontent-%COMP%] .layout-column[_ngcontent-%COMP%] .search-box[_ngcontent-%COMP%] mat-checkbox[_ngcontent-%COMP%], .container[_ngcontent-%COMP%] .layout-gt-sm-row[_ngcontent-%COMP%] .search-box[_ngcontent-%COMP%] mat-checkbox[_ngcontent-%COMP%]{margin-left:0;margin-top:10px}.container[_ngcontent-%COMP%] .layout-column[_ngcontent-%COMP%] .action-button[_ngcontent-%COMP%], .container[_ngcontent-%COMP%] .layout-gt-sm-row[_ngcontent-%COMP%] .action-button[_ngcontent-%COMP%]{margin-left:0;width:100%;justify-content:center}.container[_ngcontent-%COMP%] .layout-column[_ngcontent-%COMP%] .action-button.gap-25px[_ngcontent-%COMP%], .container[_ngcontent-%COMP%] .layout-gt-sm-row[_ngcontent-%COMP%] .action-button.gap-25px[_ngcontent-%COMP%]{gap:15px}}table[_ngcontent-%COMP%]{width:100%}table[_ngcontent-%COMP%] tr.select-row[_ngcontent-%COMP%]:hover{cursor:pointer}.m-r-10[_ngcontent-%COMP%]{margin-right:10px!important}.m-r-20[_ngcontent-%COMP%]{margin-right:20px!important}.m-r-30[_ngcontent-%COMP%]{margin-right:30px!important}"]})}}return e})();var yhe=()=>({confirm:!0}),OC=(()=>{class e{constructor(){this.dialogRef=T(eo)}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275cmp=me({type:e,selectors:[["mifosx-unassign-staff-dialog"]],decls:14,vars:14,consts:[["mat-dialog-title",""],["mat-dialog-content",""],["align","end"],["mat-raised-button","","mat-dialog-close",""],["mat-raised-button","","color","warn",3,"mat-dialog-close"]],template:function(n,i){n&1&&(l(0,"h1",0),c(1),p(2,"translate"),r(),l(3,"div",1)(4,"p"),c(5),p(6,"translate"),r()(),l(7,"mat-dialog-actions",2)(8,"button",3),c(9),p(10,"translate"),r(),l(11,"button",4),c(12),p(13,"translate"),r()()),n&2&&(a(),h(m(2,5,"labels.heading.Unassign Staff")),a(4),v("",m(6,7,"labels.text.Unassign Staff client")," ?"),a(4),h(m(10,9,"labels.buttons.Cancel")),a(2),g("mat-dialog-close",oe(13,yhe)),a(),v(" ",m(13,11,"labels.buttons.Confirm")," "))},dependencies:[ue,fe,ve,Wn,ho,Nn,Un,he],encapsulation:2})}}return e})();var AC=(()=>{class e{constructor(){this.dialogRef=T(eo)}onFileSelect(t){t.target.files.length>0&&(this.signature=t.target.files[0])}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275cmp=me({type:e,selectors:[["mifosx-upload-signature-dialog"]],decls:12,vars:11,consts:[["mat-dialog-title",""],["flex","60%","acceptFilter",".png,.jpeg,.jpg",3,"change"],["align","end"],["mat-raised-button","","mat-dialog-close",""],["mat-raised-button","","color","primary",3,"disabled","mat-dialog-close"]],template:function(n,i){n&1&&(l(0,"h1",0),c(1),p(2,"translate"),r(),l(3,"div")(4,"mifosx-file-upload",1),R("change",function(d){return i.onFileSelect(d)}),r(),l(5,"mat-dialog-actions",2)(6,"button",3),c(7),p(8,"translate"),r(),l(9,"button",4),c(10),p(11,"translate"),r()()()),n&2&&(a(),h(m(2,5,"labels.heading.Upload Client Signature")),a(6),h(m(8,7,"labels.buttons.Cancel")),a(2),g("disabled",!i.signature)("mat-dialog-close",i.signature),a(),v(" ",m(11,9,"labels.buttons.Confirm")," "))},dependencies:[ue,fe,ve,Wn,wp,Nn,Un,he],encapsulation:2})}}return e})();var G9=Es(H9());var Zhe=()=>({delete:!0}),ege=()=>({upload:!0});function tge(e,o){if(e&1&&(l(0,"div",1),b(1,"img",6),r()),e&2){let t=w();a(),g("src",t.signatureImage,f0)}}function ige(e,o){e&1&&(l(0,"div",1)(1,"p"),c(2),p(3,"translate"),r()()),e&2&&(a(2),h(m(3,1,"labels.text.Client Signature is not provided.")))}function nge(e,o){e&1&&(l(0,"button",4),c(1),p(2,"translate"),r()),e&2&&(g("mat-dialog-close",oe(4,Zhe)),a(),v(" ",m(2,2,"labels.buttons.Delete")," "))}function oge(e,o){e&1&&(l(0,"button",5),c(1),p(2,"translate"),r()),e&2&&(g("mat-dialog-close",oe(4,ege)),a(),v(" ",m(2,2,"labels.buttons.Upload")," "))}var RC=(()=>{class e{constructor(){this.dialogRef=T(eo),this.clientsService=T(Oi),this.sanitizer=T(Zs),this.data=T(Po);let t=this.data.documents.find(n=>n.name==="clientSignature")||{};this.signatureId=t.id,this.clientId=this.data.id}ngOnInit(){this.signatureId&&this.clientsService.getClientSignatureImage(this.clientId,this.signatureId).subscribe(t=>qn(this,null,function*(){let n=G9.Buffer.from(yield t.arrayBuffer());this.signatureImage="data:"+t.type+";base64,"+n.toString("base64")}),t=>{})}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275cmp=me({type:e,selectors:[["mifosx-view-signature-dialog"]],decls:11,vars:10,consts:[["mat-dialog-title",""],["mat-dialog-content",""],["align","end"],["mat-raised-button","","mat-dialog-close",""],["mat-raised-button","","color","warn",3,"mat-dialog-close"],["mat-raised-button","","color","primary",3,"mat-dialog-close"],["alt","Signature",3,"src"]],template:function(n,i){n&1&&(l(0,"h1",0),c(1),p(2,"translate"),r(),E(3,tge,2,1,"div",1),E(4,ige,4,3,"div",1),l(5,"mat-dialog-actions",2)(6,"button",3),c(7),p(8,"translate"),r(),E(9,nge,3,5,"button",4),E(10,oge,3,5,"button",5),r()),n&2&&(a(),h(m(2,6,"labels.heading.View Client Signature")),a(2),I(i.signatureId?3:-1),a(),I(i.signatureId?-1:4),a(3),h(m(8,8,"labels.buttons.Close")),a(2),I(i.signatureId?9:-1),a(),I(i.signatureId?-1:10))},dependencies:[ue,fe,ve,Wn,ho,Nn,Un,he],encapsulation:2})}}return e})();var age=e=>({delete:!0,id:e}),rge=()=>({upload:!0});function lge(e,o){e&1&&(l(0,"div",1)(1,"p"),c(2),p(3,"translate"),r()()),e&2&&(a(2),v("",m(3,1,"labels.text.Delete clients signature")," ?"))}function sge(e,o){e&1&&(l(0,"div",1)(1,"p"),c(2),p(3,"translate"),r()()),e&2&&(a(2),h(m(3,1,"labels.text.Client Signature is not provided.")))}function cge(e,o){if(e&1&&(l(0,"button",4),c(1),p(2,"translate"),r()),e&2){let t=w();g("mat-dialog-close",Nt(4,age,t.signatureId)),a(),v(" ",m(2,2,"labels.buttons.Confirm")," ")}}function pge(e,o){e&1&&(l(0,"button",5),c(1),p(2,"translate"),r()),e&2&&(g("mat-dialog-close",oe(4,rge)),a(),v(" ",m(2,2,"labels.buttons.Upload")," "))}var NC=(()=>{class e{constructor(){this.dialogRef=T(eo),this.data=T(Po);let t=this.data.find(n=>n.name==="clientSignature")||{};this.signatureId=t.id}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275cmp=me({type:e,selectors:[["mifosx-delete-signature-dialog"]],decls:11,vars:10,consts:[["mat-dialog-title",""],["mat-dialog-content",""],["align","end"],["mat-raised-button","","mat-dialog-close",""],["mat-raised-button","","color","warn",3,"mat-dialog-close"],["mat-raised-button","","color","primary",3,"mat-dialog-close"]],template:function(n,i){n&1&&(l(0,"h1",0),c(1),p(2,"translate"),r(),E(3,lge,4,3,"div",1),E(4,sge,4,3,"div",1),l(5,"mat-dialog-actions",2)(6,"button",3),c(7),p(8,"translate"),r(),E(9,cge,3,6,"button",4),E(10,pge,3,5,"button",5),r()),n&2&&(a(),h(m(2,6,"labels.heading.Delete Client Signature")),a(2),I(i.signatureId?3:-1),a(),I(i.signatureId?-1:4),a(3),h(m(8,8,"labels.buttons.Cancel")),a(2),I(i.signatureId?9:-1),a(),I(i.signatureId?-1:10))},dependencies:[ue,fe,ve,Wn,ho,Nn,Un,he],encapsulation:2})}}return e})();var LC=(()=>{class e{constructor(){this.dialogRef=T(eo)}onFileSelect(t){t.target.files.length>0&&(this.image=t.target.files[0])}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275cmp=me({type:e,selectors:[["mifosx-upload-image-dialog"]],decls:12,vars:11,consts:[["mat-dialog-title",""],["flex","60%","acceptFilter",".png,.jpeg,.jpg",3,"change"],["align","end"],["mat-raised-button","","mat-dialog-close",""],["mat-raised-button","","color","primary",3,"disabled","mat-dialog-close"]],template:function(n,i){n&1&&(l(0,"h1",0),c(1),p(2,"translate"),r(),l(3,"div")(4,"mifosx-file-upload",1),R("change",function(d){return i.onFileSelect(d)}),r(),l(5,"mat-dialog-actions",2)(6,"button",3),c(7),p(8,"translate"),r(),l(9,"button",4),c(10),p(11,"translate"),r()()()),n&2&&(a(),h(m(2,5,"labels.heading.Upload Client Image")),a(6),h(m(8,7,"labels.buttons.Cancel")),a(2),g("disabled",!i.image)("mat-dialog-close",i.image),a(),v(" ",m(11,9,"labels.buttons.Confirm")," "))},dependencies:[ue,fe,ve,Wn,wp,Nn,Un,he],encapsulation:2})}}return e})();var mge=["video"],dge=["canvas"],uge=["fallback"],fge=["captureButton"],j9=()=>({display:"none"});function hge(e,o){if(e&1){let t=Y();l(0,"button",14,3),R("click",function(){V(t);let i=w();return q(i.capture())}),c(2),p(3,"translate"),r()}e&2&&(a(2),v(" ",m(3,1,"labels.buttons.Capture")," "))}function gge(e,o){if(e&1){let t=Y();l(0,"button",14),R("click",function(){V(t);let i=w();return q(i.recapture())}),b(1,"fa-icon",15),c(2),p(3,"translate"),r()}e&2&&(a(2),v("",m(3,1,"labels.buttons.Recapture")," "))}var VC=(()=>{class e{constructor(){this.dialogRef=T(eo),this.renderer=T(_g),this.isCaptured=!1}ngAfterViewInit(){this.startCamera()}ngOnDestroy(){this.stopCamera()}startCamera(){if(navigator.mediaDevices&&navigator.mediaDevices.getUserMedia){let t={width:{ideal:640},height:{ideal:480},facingMode:"user"};navigator.mediaDevices.getUserMedia({video:t}).then(n=>{this.renderer.setProperty(this.video.nativeElement,"srcObject",n),this.video.nativeElement.play()}).catch(n=>{this.handleError(n)})}else throw new Error("Cannot connect to camera")}handleError(t){this.renderer.removeStyle(this.fallback.nativeElement,"display");let n=this.renderer.createText(`${t.name}: ${t.message}`);this.renderer.appendChild(this.fallback.nativeElement,n),this.renderer.setStyle(this.video.nativeElement,"display","none"),this.renderer.setProperty(this.captureButton,"disabled","true")}stopCamera(){let t=this.video.nativeElement.srcObject;t&&t.getTracks()[0].stop(),this.renderer.setProperty(this.video.nativeElement,"srcObject",null)}capture(){this.isCaptured=!0,this.video.nativeElement.pause();let t=this.video.nativeElement.videoWidth,n=this.video.nativeElement.videoHeight;this.canvas.nativeElement.width=t,this.canvas.nativeElement.height=n,this.canvas.nativeElement.getContext("2d").drawImage(this.video.nativeElement,0,0,t,n),this.clientImageDataURL=this.canvas.nativeElement.toDataURL("image/jpeg",.9)}recapture(){this.isCaptured=!1,this.video.nativeElement.play()}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275cmp=me({type:e,selectors:[["mifosx-capture-image-dialog"]],viewQuery:function(n,i){if(n&1&&(Ee(mge,7),Ee(dge,7),Ee(uge,7),Ee(fge,5)),n&2){let s;Te(s=Me())&&(i.video=s.first),Te(s=Me())&&(i.canvas=s.first),Te(s=Me())&&(i.fallback=s.first),Te(s=Me())&&(i.captureButton=s.first)}},decls:20,vars:17,consts:[["video",""],["canvas",""],["fallback",""],["captureButton",""],[1,"layout-column","gap-2px"],["mat-dialog-title","","align","center"],["autoplay","",1,"capture-video"],[3,"ngStyle"],["align","center",3,"ngStyle"],["align","center",1,"flex-20"],["mat-stroked-button","","color","primary"],["align","end"],["mat-raised-button","","mat-dialog-close",""],["mat-raised-button","","color","primary",3,"disabled","mat-dialog-close"],["mat-stroked-button","","color","primary",3,"click"],["icon","undo","size","sm",1,"m-r-10"]],template:function(n,i){n&1&&(l(0,"div",4)(1,"h1",5),c(2),p(3,"translate"),r(),b(4,"video",6,0)(6,"canvas",7,1)(8,"p",8,2),l(10,"div",9),E(11,hge,4,3,"button",10),E(12,gge,4,3,"button",10),r(),l(13,"mat-dialog-actions",11)(14,"button",12),c(15),p(16,"translate"),r(),l(17,"button",13),c(18),p(19,"translate"),r()()()),n&2&&(a(2),h(m(3,9,"labels.heading.Capture Client Image")),a(4),g("ngStyle",oe(15,j9)),a(2),g("ngStyle",oe(16,j9)),a(3),I(i.isCaptured?-1:11),a(),I(i.isCaptured?12:-1),a(3),h(m(16,11,"labels.buttons.Cancel")),a(2),g("disabled",!i.isCaptured)("mat-dialog-close",i.clientImageDataURL),a(),v(" ",m(19,13,"labels.buttons.Upload")," "))},dependencies:[ue,ns,fe,ve,Wn,ke,Nn,Un,he],styles:[".column-mandatory[_ngcontent-%COMP%]{color:#5cb85c;text-align:center}.not-column-mandatory[_ngcontent-%COMP%]{color:#666f73;text-align:center}.cdk-drag-placeholder[_ngcontent-%COMP%]{background:#3498db}.yes[_ngcontent-%COMP%]{color:#5cb85c!important;background-color:#5cb85c;height:4px;cursor:none}.no[_ngcontent-%COMP%]{color:red;background-color:red;height:4px;cursor:none}.strike[_ngcontent-%COMP%]{text-decoration:line-through;color:red}.transfer[_ngcontent-%COMP%]{color:#16a085}.linked[_ngcontent-%COMP%]{color:#4461e2}.accrual[_ngcontent-%COMP%]{color:#999}.fa-question[_ngcontent-%COMP%]{color:#4461e2}.enabled[_ngcontent-%COMP%]{color:#32cd32}.disabled[_ngcontent-%COMP%]{color:#f44366}.capture-video[_ngcontent-%COMP%]{width:100%;max-width:640px;height:auto;object-fit:contain;border-radius:4px;background-color:#000}"]})}}return e})();var _ge=()=>["./general"],Cge=()=>["./address"],vge=()=>["./family-members"],xge=()=>["edit"],bge=()=>["loans-accounts","create"],yge=()=>["savings-accounts","create"],Sge=()=>["shares-accounts","create"],wge=()=>["recurring-deposits-accounts","create-recurring-deposits-account"],Pge=()=>["fixed-deposits-accounts","create"],Tge=()=>["./identities"],Mge=()=>["./documents"],Dge=()=>["./notes"],Ege=e=>["./datatables",e];function Ige(e,o){if(e&1){let t=Y();l(0,"button",45),p(1,"translate"),R("click",function(){V(t);let i=w();return q(i.doAction("Upload Image"))}),b(2,"i",46),r()}e&2&&g("matTooltip",Le(m(1,2,"tooltips.Upload Image")))}function Oge(e,o){if(e&1){let t=Y();l(0,"button",45),p(1,"translate"),R("click",function(){V(t);let i=w();return q(i.doAction("Capture Image"))}),b(2,"i",47),r()}e&2&&g("matTooltip",Le(m(1,2,"tooltips.Capture Image")))}function Age(e,o){if(e&1){let t=Y();l(0,"button",45),p(1,"translate"),R("click",function(){V(t);let i=w();return q(i.doAction("Delete Image"))}),b(2,"i",48),r()}e&2&&g("matTooltip",Le(m(1,2,"tooltips.Delete Image")))}function Fge(e,o){if(e&1&&(l(0,"tr")(1,"td")(2,"b"),c(3),p(4,"translate"),r()(),l(5,"td"),c(6),p(7,"dateFormat"),r()()),e&2){let t=w();a(3),h(m(4,2,"labels.inputs.Activation Date")),a(3),h(m(7,4,t.clientViewData.activationDate))}}function kge(e,o){if(e&1&&(l(0,"td"),c(1),r()),e&2){let t=w();a(),h(t.clientViewData.staffName)}}function Bge(e,o){e&1&&(l(0,"td"),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.Unassigned")))}function Rge(e,o){if(e&1&&(l(0,"span")(1,"span",49),c(2),r()()),e&2){let t=o.$implicit;a(2),h(t.name)}}function Nge(e,o){if(e&1&&(l(0,"tr")(1,"td")(2,"b"),c(3),p(4,"translate"),r()(),l(5,"td"),Se(6,Rge,3,1,"span",null,Pe),r()()),e&2){let t=w();a(3),h(m(4,1,"labels.inputs.Member Of")),a(3),we(t.clientViewData.groups)}}function Lge(e,o){if(e&1&&(l(0,"tr")(1,"td")(2,"b"),c(3),p(4,"translate"),r()(),l(5,"td"),c(6),r()()),e&2){let t=w();a(3),h(m(4,2,"labels.inputs.Client Type")),a(3),h(t.clientViewData.clientType.name)}}function Vge(e,o){e&1&&(l(0,"button",50)(1,"mat-icon",36),b(2,"fa-icon",51),r(),l(3,"span"),c(4),p(5,"translate"),r()()),e&2&&(g("routerLink",oe(4,xge)),a(4),h(m(5,2,"labels.buttons.Edit")))}function qge(e,o){if(e&1&&(l(0,"button",35)(1,"mat-icon",36),b(2,"fa-icon",52),r(),l(3,"span"),c(4),p(5,"translate"),r()()),e&2){w();let t=xe(97);g("matMenuTriggerFor",t),a(4),h(m(5,2,"labels.buttons.Applications"))}}function zge(e,o){if(e&1){let t=Y();l(0,"button",39),R("click",function(){V(t);let i=w();return q(i.doAction("Assign Staff"))}),l(1,"mat-icon",36),b(2,"fa-icon",53),r(),l(3,"span"),c(4),p(5,"translate"),r()()}e&2&&(a(4),h(m(5,1,"labels.buttons.Assign Staff")))}function Hge(e,o){if(e&1){let t=Y();l(0,"button",39),R("click",function(){V(t);let i=w(2);return q(i.doAction("Unassign Staff"))}),l(1,"mat-icon",36),b(2,"fa-icon",53),r(),l(3,"span"),c(4),p(5,"translate"),r()()}e&2&&(a(4),h(m(5,1,"labels.buttons.Unassign Staff")))}function Gge(e,o){e&1&&(l(0,"span"),F(1,Hge,6,3,"button",40),r()),e&2&&(a(),g("mifosxHasPermission","UNASSIGNSTAFF_CLIENT"))}function jge(e,o){e&1&&(l(0,"button",50),c(1),p(2,"translate"),r()),e&2&&(g("routerLink",oe(4,bge)),a(),v(" ",m(2,2,"labels.buttons.New Loan Account")," "))}function $ge(e,o){e&1&&(l(0,"button",50),c(1),p(2,"translate"),r()),e&2&&(g("routerLink",oe(4,yge)),a(),v(" ",m(2,2,"labels.buttons.New Savings Account")," "))}function Uge(e,o){e&1&&(l(0,"button",50),c(1),p(2,"translate"),r()),e&2&&(g("routerLink",oe(4,Sge)),a(),v(" ",m(2,2,"labels.buttons.New Share Account")," "))}function Wge(e,o){e&1&&(l(0,"button",50),c(1),p(2,"translate"),r()),e&2&&(g("routerLink",oe(4,wge)),a(),v(" ",m(2,2,"labels.buttons.New Recurring Deposit Account")," "))}function Qge(e,o){e&1&&(l(0,"button",50),c(1),p(2,"translate"),r()),e&2&&(g("routerLink",oe(4,Pge)),a(),v(" ",m(2,2,"labels.buttons.New Fixed Deposits Account")," "))}function Yge(e,o){if(e&1){let t=Y();l(0,"span")(1,"button",39),R("click",function(){V(t);let i=w();return q(i.doAction("Activate"))}),c(2),p(3,"translate"),r()()}e&2&&(a(2),v(" ",m(3,1,"labels.buttons.Activate")," "))}function Jge(e,o){if(e&1){let t=Y();l(0,"span")(1,"button",39),R("click",function(){V(t);let i=w();return q(i.doAction("Withdraw"))}),c(2),p(3,"translate"),r()()}e&2&&(a(2),v(" ",m(3,1,"labels.buttons.Withdraw")," "))}function Kge(e,o){if(e&1){let t=Y();l(0,"span")(1,"button",39),R("click",function(){V(t);let i=w();return q(i.doAction("Reject"))}),c(2),p(3,"translate"),r()()}e&2&&(a(2),h(m(3,1,"labels.buttons.Reject")))}function Xge(e,o){if(e&1){let t=Y();l(0,"button",39),R("click",function(){V(t);let i=w(2);return q(i.doAction("Delete"))}),c(1),p(2,"translate"),r()}e&2&&(a(),v(" ",m(2,1,"labels.buttons.Delete")," "))}function Zge(e,o){e&1&&(l(0,"span"),F(1,Xge,3,3,"button",40),r()),e&2&&(a(),g("mifosxHasPermission","DELETE_CLIENT"))}function e_e(e,o){if(e&1){let t=Y();l(0,"span")(1,"button",39),R("click",function(){V(t);let i=w();return q(i.doAction("Reactivate"))}),c(2),p(3,"translate"),r()()}e&2&&(a(2),v(" ",m(3,1,"labels.buttons.Reactivate")," "))}function t_e(e,o){if(e&1){let t=Y();l(0,"span")(1,"button",39),R("click",function(){V(t);let i=w();return q(i.doAction("Undo Rejection"))}),c(2),p(3,"translate"),r()()}e&2&&(a(2),v(" ",m(3,1,"labels.buttons.Undo Rejection")," "))}function i_e(e,o){if(e&1){let t=Y();l(0,"span")(1,"button",39),R("click",function(){V(t);let i=w();return q(i.doAction("Undo Transfer"))}),c(2),p(3,"translate"),r()()}e&2&&(a(2),v(" ",m(3,1,"labels.buttons.Undo Transfer")," "))}function n_e(e,o){if(e&1){let t=Y();l(0,"span")(1,"button",39),R("click",function(){V(t);let i=w();return q(i.doAction("Accept Transfer"))}),c(2),p(3,"translate"),r()()}e&2&&(a(2),v(" ",m(3,1,"labels.buttons.Accept Transfer")," "))}function o_e(e,o){if(e&1){let t=Y();l(0,"span")(1,"button",39),R("click",function(){V(t);let i=w();return q(i.doAction("Reject Transfer"))}),c(2),p(3,"translate"),r()()}e&2&&(a(2),v(" ",m(3,1,"labels.buttons.Reject transfer")," "))}function a_e(e,o){if(e&1){let t=Y();l(0,"button",39),R("click",function(){V(t);let i=w();return q(i.doAction("Add Charge"))}),c(1),p(2,"translate"),r()}e&2&&(a(),v(" ",m(2,1,"labels.buttons.Add Charge")," "))}function r_e(e,o){if(e&1){let t=Y();l(0,"button",39),R("click",function(){V(t);let i=w();return q(i.doAction("Update Default Savings"))}),c(1),p(2,"translate"),r()}e&2&&(a(),v(" ",m(2,1,"labels.buttons.Update Default Savings")," "))}function l_e(e,o){if(e&1){let t=Y();l(0,"button",39),R("click",function(){V(t);let i=w();return q(i.doAction("Upload Signature"))}),c(1),p(2,"translate"),r()}e&2&&(a(),v(" ",m(2,1,"labels.buttons.Upload Signature")," "))}function s_e(e,o){if(e&1){let t=Y();l(0,"button",39),R("click",function(){V(t);let i=w();return q(i.doAction("Delete Signature"))}),c(1),p(2,"translate"),r()}e&2&&(a(),v(" ",m(2,1,"labels.buttons.Delete Signature")," "))}function c_e(e,o){if(e&1){let t=Y();l(0,"button",39),R("click",function(){V(t);let i=w();return q(i.doAction("Create Standing Instructions"))}),c(1),p(2,"translate"),r()}e&2&&(a(),v(" ",m(2,1,"labels.buttons.Create Standing Instructions")," "))}function p_e(e,o){if(e&1){let t=Y();l(0,"button",39),R("click",function(){V(t);let i=w(2);return q(i.doAction("View Standing Instructions"))}),c(1),p(2,"translate"),r()}e&2&&(a(),v(" ",m(2,1,"labels.buttons.View Standing Instructions")," "))}function m_e(e,o){e&1&&(l(0,"span"),F(1,p_e,3,3,"button",40),r()),e&2&&(a(),g("mifosxHasPermission","READ_STANDINGINSTRUCTION"))}function d_e(e,o){if(e&1&&(l(0,"a",43,8),c(2),p(3,"translate"),r()),e&2){let t=xe(1);g("routerLink",oe(5,Tge))("active",t.isActive),a(2),v(" ",m(3,3,"labels.inputs.Identities")," ")}}function u_e(e,o){if(e&1&&(l(0,"a",43,9),c(2),p(3,"translate"),r()),e&2){let t=xe(1);g("routerLink",oe(5,Mge))("active",t.isActive),a(2),v(" ",m(3,3,"labels.inputs.Documents")," ")}}function f_e(e,o){if(e&1&&(l(0,"a",43,10),c(2),p(3,"translate"),r()),e&2){let t=xe(1);g("routerLink",oe(5,Dge))("active",t.isActive),a(2),v(" ",m(3,3,"labels.inputs.Notes")," ")}}function h_e(e,o){if(e&1&&(l(0,"a",43,11),c(2),r()),e&2){let t=xe(1),n=w().$implicit;g("routerLink",Nt(3,Ege,n.registeredTableName))("active",t.isActive),a(2),v(" ",n.registeredTableName," ")}}function g_e(e,o){if(e&1&&F(0,h_e,3,5,"a",44),e&2){let t=o.$implicit;g("mifosxHasPermission","READ_"+t.registeredTableName)}}var qC=(()=>{class e{constructor(){this.route=T(Ie),this.router=T(qe),this.clientsService=T(Oi),this._sanitizer=T(Zs),this.dialog=T(Ht),this.route.data.subscribe(t=>{this.clientViewData=t.clientViewData,this.clientDatatables=t.clientDatatables,this.clientTemplateData=t.clientTemplateData})}ngOnInit(){this.clientsService.getClientProfileImage(this.clientViewData.id).subscribe({next:t=>{t?this.clientImage=this._sanitizer.bypassSecurityTrustResourceUrl(t):this.clientImage=null},error:t=>{console.error("Error loading client profile image:",t),this.clientImage=null}})}isActive(){return this.clientViewData.status.value==="Active"}doAction(t){switch(t){case"Assign Staff":case"Close":case"Survey":case"Reject":case"Activate":case"Withdraw":case"Update Default Savings":case"Transfer Client":case"Undo Transfer":case"Accept Transfer":case"Reject Transfer":case"Reactivate":case"Undo Rejection":case"Add Charge":case"Create Collateral":case"Client Screen Reports":this.router.navigate([`actions/${t}`],{relativeTo:this.route});break;case"Unassign Staff":this.unassignStaff();break;case"Delete":this.deleteClient();break;case"View Signature":this.viewSignature();break;case"Upload Signature":this.uploadSignature();break;case"Delete Signature":this.deleteSignature();break;case"Capture Image":this.captureProfileImage();break;case"Upload Image":this.uploadProfileImage();break;case"Delete Image":this.deleteProfileImage();break;case"Create Standing Instructions":let n={officeId:this.clientViewData.officeId,accountType:"fromsavings"};this.router.navigate(["standing-instructions/create-standing-instructions"],{relativeTo:this.route,queryParams:n});break;case"View Standing Instructions":let i={officeId:this.clientViewData.officeId,accountType:"fromsavings"};this.router.navigate(["standing-instructions/list-standing-instructions"],{relativeTo:this.route,queryParams:i});break}}reload(){let t=this.router.url;this.router.navigateByUrl("/clients",{skipLocationChange:!0}).then(()=>this.router.navigate([t]))}deleteClient(){this.dialog.open(vi,{data:{deleteContext:`client with id: ${this.clientViewData.id}`}}).afterClosed().subscribe(n=>{n.delete&&this.clientsService.deleteClient(this.clientViewData.id).subscribe(()=>{this.router.navigate(["/clients"],{relativeTo:this.route})})})}unassignStaff(){this.dialog.open(OC).afterClosed().subscribe(n=>{n.confirm&&this.clientsService.executeClientCommand(this.clientViewData.id,"unassignStaff",{staffId:this.clientViewData.staffId}).subscribe(()=>{this.reload()})})}viewSignature(){this.clientsService.getClientDocuments(this.clientViewData.id).subscribe(t=>{this.dialog.open(RC,{data:{documents:t,id:this.clientViewData.id}}).afterClosed().subscribe(i=>{i.upload?this.uploadSignature():i.delete&&this.deleteSignature()})})}uploadSignature(){this.dialog.open(AC).afterClosed().subscribe(n=>{n&&this.clientsService.uploadClientSignatureImage(this.clientViewData.id,n).subscribe(()=>{this.reload()})})}deleteSignature(){this.clientsService.getClientDocuments(this.clientViewData.id).subscribe(t=>{this.dialog.open(NC,{data:t}).afterClosed().subscribe(i=>{i.delete?this.clientsService.deleteClientDocument(this.clientViewData.id,i.id).subscribe(()=>{this.reload()}):i.upload&&this.uploadSignature()})})}captureProfileImage(){this.dialog.open(VC).afterClosed().subscribe(n=>{n&&this.clientsService.uploadCapturedClientProfileImage(this.clientViewData.id,n).subscribe(()=>{this.reload()})})}uploadProfileImage(){this.dialog.open(LC).afterClosed().subscribe(n=>{n&&this.clientsService.uploadClientProfileImage(this.clientViewData.id,n).subscribe(()=>{this.reload()})})}deleteProfileImage(){this.dialog.open(vi,{data:{deleteContext:`the profile image of ${this.clientViewData.displayName}`}}).afterClosed().subscribe(n=>{n.delete&&this.clientsService.deleteClientProfileImage(this.clientViewData.id).subscribe(()=>{this.reload()})})}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275cmp=me({type:e,selectors:[["mifosx-clients-view"]],decls:159,vars:123,consts:[["clientMenu","matMenu"],["accountApplications","matMenu"],["Actions","matMenu"],["More","matMenu"],["general","routerLinkActive"],["address","routerLinkActive"],["familyMembers","routerLinkActive"],["tabPanel",""],["identities","routerLinkActive"],["documents","routerLinkActive"],["notes","routerLinkActive"],["datatable","routerLinkActive"],[1,"account-card"],[1,"header","layout-column"],[1,"header-title-group"],[1,"profile-image-container"],["mat-card-md-image","",1,"profile-image",3,"src"],[1,"m-b-5","flex-center"],["class","client-image-button","mat-raised-button","",3,"matTooltip","click",4,"mifosxHasPermission"],[1,"signature",3,"click"],[1,"mat-typography","account-card-title"],[1,"make-flex","content"],[1,"flex-95"],[1,"fa","fa-stop",3,"ngClass","matTooltip"],[3,"entityName"],[1,"flex-5","align-end-center"],["mat-icon-button","","aria-label","Client actions","yPosition","below",3,"matMenuTriggerFor"],["matListIcon","",1,"actions-menu"],["icon","bars","size","sm"],[1,"layout-row","responsive-column"],[1,"flex-50"],[1,"account-overview"],[3,"accountNo"],["completed","true",3,"externalId"],["mat-menu-item","",3,"routerLink",4,"mifosxHasPermission"],["mat-menu-item","",3,"matMenuTriggerFor"],["matListIcon",""],["icon","tasks","size","sm"],["mat-menu-item",""],["mat-menu-item","",3,"click"],["mat-menu-item","",3,"click",4,"mifosxHasPermission"],["mat-menu-item","",3,"click","disabled"],["mat-tab-nav-bar","",1,"navigation-tabs",3,"tabPanel"],["mat-tab-link","","routerLinkActive","",3,"routerLink","active"],["mat-tab-link","","routerLinkActive","",3,"routerLink","active",4,"mifosxHasPermission"],["mat-raised-button","",1,"client-image-button",3,"click","matTooltip"],[1,"fa","fa-upload"],[1,"fa","fa-camera"],[1,"fa","fa-trash"],[1,"m-r-3"],["mat-menu-item","",3,"routerLink"],["icon","edit","size","sm"],["icon","money-bill-alt","size","sm"],["icon","user-tie","size","sm"]],template:function(n,i){if(n&1){let s=Y();l(0,"mat-card",12)(1,"mat-card-header",13)(2,"mat-card-title-group",14)(3,"div",15)(4,"div"),b(5,"img",16),r(),l(6,"div",17),F(7,Ige,3,4,"button",18)(8,Oge,3,4,"button",18)(9,Age,3,4,"button",18),b(10,"br"),r(),l(11,"p",19),R("click",function(){return V(s),q(i.doAction("View Signature"))}),c(12),p(13,"translate"),r()(),l(14,"div",20)(15,"mat-card-title",21)(16,"h3",22),b(17,"i",23),p(18,"translate"),p(19,"statusLookup"),l(20,"b"),c(21),p(22,"translate"),r(),b(23,"mifosx-entity-name",24),r(),l(24,"div",25)(25,"button",26)(26,"mat-icon",27),b(27,"fa-icon",28),r()()()(),l(28,"mat-card-subtitle")(29,"div",29)(30,"div",30)(31,"table",31)(32,"tbody")(33,"tr")(34,"td")(35,"b"),c(36),p(37,"translate"),r()(),l(38,"td"),b(39,"mifosx-entity-name",24),r()(),l(40,"tr")(41,"td")(42,"b"),c(43),p(44,"translate"),r()(),l(45,"td"),b(46,"mifosx-account-number",32),r()(),l(47,"tr")(48,"td")(49,"b"),c(50),p(51,"translate"),r()(),l(52,"td"),b(53,"mifosx-external-identifier",33),r()(),E(54,Fge,8,6,"tr"),l(55,"tr")(56,"td")(57,"b"),c(58),p(59,"translate"),r()(),E(60,kge,2,1,"td"),E(61,Bge,3,3,"td"),r()()()(),l(62,"div",30)(63,"table",31)(64,"tbody"),E(65,Nge,8,3,"tr"),E(66,Lge,7,4,"tr"),l(67,"tr")(68,"td")(69,"b"),c(70),p(71,"translate"),r()(),l(72,"td"),b(73,"mifosx-external-identifier",33),r()(),l(74,"tr")(75,"td")(76,"b"),c(77),p(78,"translate"),r()(),l(79,"td"),b(80,"mifosx-external-identifier",33),r()()()()()()()(),l(81,"mat-menu",null,0),F(83,Vge,6,5,"button",34),E(84,qge,6,4,"button",35),l(85,"button",35)(86,"mat-icon",36),b(87,"fa-icon",37),r(),l(88,"span"),c(89),p(90,"translate"),r()(),E(91,zge,6,3,"button",38),E(92,Gge,2,1,"span"),l(93,"button",35),c(94),p(95,"translate"),r()(),l(96,"mat-menu",null,1),F(98,jge,3,5,"button",34)(99,$ge,3,5,"button",34)(100,Uge,3,5,"button",34)(101,Wge,3,5,"button",34)(102,Qge,3,5,"button",34),r(),l(103,"mat-menu",null,2)(105,"button",39),R("click",function(){return V(s),q(i.doAction("Close"))}),c(106),p(107,"translate"),r(),l(108,"button",39),R("click",function(){return V(s),q(i.doAction("Transfer Client"))}),c(109),p(110,"translate"),r(),E(111,Yge,4,3,"span"),E(112,Jge,4,3,"span"),E(113,Kge,4,3,"span"),E(114,Zge,2,1,"span"),E(115,e_e,4,3,"span"),E(116,t_e,4,3,"span"),E(117,i_e,4,3,"span"),E(118,n_e,4,3,"span"),E(119,o_e,4,3,"span"),r(),l(120,"mat-menu",null,3),F(122,a_e,3,3,"button",40),l(123,"button",39),R("click",function(){return V(s),q(i.doAction("Create Collateral"))}),c(124),p(125,"translate"),r(),l(126,"button",41),R("click",function(){return V(s),q(i.doAction("Survey"))}),c(127),p(128,"translate"),r(),F(129,r_e,3,3,"button",40)(130,l_e,3,3,"button",40)(131,s_e,3,3,"button",40),l(132,"button",39),R("click",function(){return V(s),q(i.doAction("Client Screen Reports"))}),c(133),p(134,"translate"),r(),F(135,c_e,3,3,"button",40),E(136,m_e,2,1,"span"),r()()(),l(137,"mat-card-content")(138,"nav",42)(139,"a",43,4),c(141),p(142,"translate"),r(),l(143,"a",43,5),c(145),p(146,"translate"),r(),l(147,"a",43,6),c(149),p(150,"translate"),r(),F(151,d_e,4,6,"a",44)(152,u_e,4,6,"a",44)(153,f_e,4,6,"a",44),Se(154,g_e,1,1,"a",43,Pe),r(),l(156,"mat-tab-nav-panel",null,7),b(158,"router-outlet"),r()()()}if(n&2){let s=xe(82),d=xe(104),u=xe(121),f=xe(140),_=xe(144),C=xe(148),x=xe(157);a(5),g("src",i.clientImage?i.clientImage:"assets/images/user_placeholder.png",f0),a(2),g("mifosxHasPermission","CREATE_CLIENTIMAGE"),a(),g("mifosxHasPermission","CREATE_CLIENTIMAGE"),a(),g("mifosxHasPermission","DELETE_CLIENTIMAGE"),a(3),h(m(13,80,"labels.inputs.View Signature")),a(5),g("matTooltip",Le(m(18,82,"labels.status."+i.clientViewData.status.value)))("ngClass",m(19,84,i.clientViewData.status.code)),a(4),v("",m(22,86,"labels.inputs.Client Name")," :"),a(2),g("entityName",Le(i.clientViewData.displayName)),a(2),g("matMenuTriggerFor",s),a(11),h(m(37,88,"labels.inputs.Office")),a(3),g("entityName",Le(i.clientViewData.officeName)),a(4),h(m(44,90,"labels.inputs.Client")),a(3),g("accountNo",Le(i.clientViewData.accountNo)),a(4),h(m(51,92,"labels.inputs.External Id")),a(3),g("externalId",Le(i.clientViewData.externalId)),a(),I(i.clientViewData.activationDate?54:-1),a(4),h(m(59,94,"labels.inputs.Staff")),a(2),I(i.clientViewData.staffName?60:-1),a(),I(i.clientViewData.staffName?-1:61),a(4),I(i.clientViewData.groups.length>0?65:-1),a(),I(i.clientViewData.clientType?66:-1),a(4),h(m(71,96,"labels.inputs.Mobile Number")),a(3),g("externalId",Le(i.clientViewData.mobileNo)),a(4),h(m(78,98,"labels.inputs.Email")),a(3),g("externalId",Le(i.clientViewData.emailAddress)),a(3),g("mifosxHasPermission","UPDATE_CLIENT"),a(),I(i.isActive()?84:-1),a(),g("matMenuTriggerFor",d),a(4),h(m(90,100,"labels.buttons.Actions")),a(2),I(i.clientViewData.staffId?-1:91),a(),I(i.clientViewData.staffId?92:-1),a(),g("matMenuTriggerFor",u),a(),h(m(95,102,"labels.buttons.More")),a(4),g("mifosxHasPermission","CREATE_LOAN"),a(),g("mifosxHasPermission","CREATE_SAVINGSACCOUNT"),a(),g("mifosxHasPermission","CREATE_SHAREACCOUNT"),a(),g("mifosxHasPermission","CREATE_RECURRINGDEPOSITACCOUNT"),a(),g("mifosxHasPermission","CREATE_FIXEDDEPOSITACCOUNT"),a(4),h(m(107,104,"labels.buttons.Close")),a(3),v(" ",m(110,106,"labels.buttons.Transfer Client")," "),a(2),I(i.clientViewData.status.value==="Pending"?111:-1),a(),I(i.clientViewData.status.value==="Pending"?112:-1),a(),I(i.clientViewData.status.value==="Pending"?113:-1),a(),I(i.clientViewData.status.value==="Pending"?114:-1),a(),I(i.clientViewData.status.value==="Closed"?115:-1),a(),I(i.clientViewData.status.value==="Rejected"?116:-1),a(),I(i.clientViewData.status.value==="Transfer in progress"?117:-1),a(),I(i.clientViewData.status.value==="Transfer in progress"?118:-1),a(),I(i.clientViewData.status.value==="Transfer in progress"?119:-1),a(3),g("mifosxHasPermission","CREATE_CLIENTCHARGE"),a(2),v(" ",m(125,108,"labels.buttons.Create Collateral")," "),a(2),g("disabled",!0),a(),v(" ",m(128,110,"labels.buttons.Survey")," "),a(2),g("mifosxHasPermission","UPDATESAVINGSACCOUNT_CLIENT"),a(),g("mifosxHasPermission","CREATE_CLIENTIMAGE"),a(),g("mifosxHasPermission","DELETE_CLIENTIMAGE"),a(2),v(" ",m(134,112,"labels.buttons.Client Screen Reports")," "),a(2),g("mifosxHasPermission","CREATE_STANDINGINSTRUCTION"),a(),I(i.clientViewData.status.value!=="Transfer on hold"?136:-1),a(2),g("tabPanel",x),a(),g("routerLink",oe(120,_ge))("active",f.isActive),a(2),v(" ",m(142,114,"labels.inputs.General")," "),a(2),g("routerLink",oe(121,Cge))("active",_.isActive),a(2),v(" ",m(146,116,"labels.inputs.Address")," "),a(2),g("routerLink",oe(122,vge))("active",C.isActive),a(2),v(" ",m(150,118,"labels.inputs.Family Members")," "),a(2),g("mifosxHasPermission","READ_CLIENTIDENTIFIER"),a(),g("mifosxHasPermission","READ_DOCUMENT"),a(),g("mifosxHasPermission","READ_CLIENTNOTE"),a(),we(i.clientDatatables)}},dependencies:[ue,co,fe,Ae,$e,Je,ve,Ke,sa,Qr,b0,si,Qo,kk,wi,nc,Yo,ke,vl,rc,Ea,ic,tc,nr,or,La,ar,ra,Pi,he,go],styles:[".account-card[_ngcontent-%COMP%] .header[_ngcontent-%COMP%] .profile-image-container[_ngcontent-%COMP%] .client-image-button[_ngcontent-%COMP%]{min-width:26px;padding:0 6px;margin:4px;line-height:25px}.account-card[_ngcontent-%COMP%] .header[_ngcontent-%COMP%] .profile-image-container[_ngcontent-%COMP%] .signature[_ngcontent-%COMP%]{color:#fff;text-align:center;margin:0;padding:2%}.account-card[_ngcontent-%COMP%] .header[_ngcontent-%COMP%] .profile-image-container[_ngcontent-%COMP%] .signature[_ngcontent-%COMP%]:hover{cursor:pointer}.account-overview[_ngcontent-%COMP%]{color:#fff;min-width:85%;margin-left:10px}.make-flex[_ngcontent-%COMP%]{display:flex}.mat-card-title-group[_ngcontent-%COMP%]{width:100%}"]})}}return e})();var __e=()=>["../","charges","overview"],C_e=e=>["../","charges",e,"pay"],v_e=e=>["../","charges",e],x_e=e=>["../","loans-accounts",e,"actions","Make Repayment"],b_e=e=>["../","loans-accounts",e,"actions","Approve"],y_e=e=>["../","loans-accounts",e,"actions","Disburse"],$9=e=>["../","loans-accounts",e,"general"],S_e=e=>["../","savings-accounts",e,"actions","Deposit"],w_e=e=>["../","savings-accounts",e,"actions","Withdrawal"],P_e=e=>["../","savings-accounts",e,"actions","Approve"],T_e=e=>["../","savings-accounts",e,"actions","Undo Approval"],M_e=e=>["../","savings-accounts",e,"actions","Activate"],U9=e=>["../","savings-accounts",e,"general"],D_e=e=>["../","fixed-deposits-accounts",e,"actions","Approve"],E_e=e=>["../","fixed-deposits-accounts",e,"actions","Undo Approval"],I_e=e=>["../","fixed-deposits-accounts",e,"actions","Activate"],W9=e=>["../","fixed-deposits-accounts",e,"general"],O_e=e=>["../","recurring-deposits-accounts",e,"actions","Approve"],A_e=e=>["../","recurring-deposits-accounts",e,"actions","Undo Approval"],F_e=e=>["../","recurring-deposits-accounts",e,"actions","Activate"],Q9=e=>["../","recurring-deposits-accounts",e,"general"],k_e=e=>["../","shares-accounts",e,"actions","Approve"],B_e=e=>["../","shares-accounts",e,"actions","Undo Approval"],R_e=e=>["../","shares-accounts",e,"actions","Activate"],Y9=e=>["../","shares-accounts",e,"general"],N_e=e=>["../","client-collateral",e];function L_e(e,o){e&1&&(l(0,"button",30),c(1),p(2,"translate"),r()),e&2&&(g("routerLink",oe(4,__e)),a(),v(" ",m(2,2,"labels.buttons.Charges Overview")," "))}function V_e(e,o){e&1&&(l(0,"th",31),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.name")))}function q_e(e,o){if(e&1&&(l(0,"td",32),b(1,"i",33),p(2,"statusLookup"),c(3),r()),e&2){let t=o.$implicit;a(),g("ngClass",m(2,2,!(t.isWaived||t.isPaid))),a(2),v(" ",t.name," ")}}function z_e(e,o){e&1&&(l(0,"th",31),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.Due as of")))}function H_e(e,o){if(e&1&&(l(0,"td",32),c(1),p(2,"dateFormat"),r()),e&2){let t=o.$implicit;a(),h(m(2,1,t.dueDate))}}function G_e(e,o){e&1&&(l(0,"th",34),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.Due")))}function j_e(e,o){if(e&1&&(l(0,"td",35),c(1),p(2,"formatNumber"),r()),e&2){let t=o.$implicit;a(),h(m(2,1,t.amount))}}function $_e(e,o){e&1&&(l(0,"th",34),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.Paid")))}function U_e(e,o){if(e&1&&(l(0,"td",35),c(1),p(2,"formatNumber"),r()),e&2){let t=o.$implicit;a(),h(m(2,1,t.amountPaid))}}function W_e(e,o){e&1&&(l(0,"th",34),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.Waived")))}function Q_e(e,o){if(e&1&&(l(0,"td",35),c(1),p(2,"formatNumber"),r()),e&2){let t=o.$implicit;a(),h(m(2,1,t.amountWaived))}}function Y_e(e,o){e&1&&(l(0,"th",34),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.Outstanding")))}function J_e(e,o){if(e&1&&(l(0,"td",35),c(1),p(2,"formatNumber"),r()),e&2){let t=o.$implicit;a(),h(m(2,1,t.amountOutstanding))}}function K_e(e,o){e&1&&(l(0,"th",36),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.Actions")))}function X_e(e,o){if(e&1){let t=Y();l(0,"button",40),R("click",function(i){V(t);let s=w(2);return q(s.routeEdit(i))}),b(1,"i",41),r()}if(e&2){let t=w().$implicit;g("routerLink",Nt(1,C_e,t.id))}}function Z_e(e,o){if(e&1){let t=Y();l(0,"button",42),R("click",function(i){V(t);let s=w().$implicit,d=w();return d.routeEdit(i),q(d.waiveCharge(s.id,s.clientId))}),b(1,"i",43),r()}}function eCe(e,o){e&1&&(l(0,"td",37),F(1,X_e,2,3,"button",38)(2,Z_e,2,0,"button",39),r()),e&2&&(a(),g("mifosxHasPermission","PAY_CLIENTCHARGE"),a(),g("mifosxHasPermission","WAIVE_CLIENTCHARGE"))}function tCe(e,o){e&1&&b(0,"tr",44)}function iCe(e,o){if(e&1&&b(0,"tr",45),e&2){let t=o.$implicit;g("routerLink",Nt(1,v_e,t.id))}}function nCe(e,o){e&1&&(l(0,"th",31),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.Account No")))}function oCe(e,o){if(e&1&&(l(0,"td",32),b(1,"i",33),p(2,"statusLookup"),b(3,"mifosx-account-number",53),r()),e&2){let t=o.$implicit;a(),g("ngClass",t.inArrears?"status-active-overdue":m(2,3,t.status.code)),a(2),g("accountNo",Le(t.accountNo))}}function aCe(e,o){e&1&&(l(0,"th",31),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.Loan Product")))}function rCe(e,o){if(e&1&&(l(0,"td",32),b(1,"mifosx-long-text",54),r()),e&2){let t=o.$implicit;a(),g("textValue",Le(t.productName))}}function lCe(e,o){e&1&&(l(0,"th",31),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.Original Loan")))}function sCe(e,o){if(e&1&&(l(0,"td",32),c(1),r()),e&2){let t=o.$implicit;a(),h(t.originalLoan)}}function cCe(e,o){e&1&&(l(0,"th",34),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.Loan Balance")))}function pCe(e,o){if(e&1&&(l(0,"td",35),c(1),p(2,"formatNumber"),r()),e&2){let t=o.$implicit;a(),h(m(2,1,t.loanBalance))}}function mCe(e,o){e&1&&(l(0,"th",34),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.Amount Paid")))}function dCe(e,o){if(e&1&&(l(0,"td",35),c(1),p(2,"formatNumber"),r()),e&2){let t=o.$implicit;a(),h(m(2,1,t.amountPaid))}}function uCe(e,o){e&1&&(l(0,"th",36),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.Type")))}function fCe(e,o){if(e&1&&(l(0,"td",37),b(1,"i",55),r()),e&2){let t=o.$implicit;a(),g("matTooltip",Le(t.loanType.value))("ngClass",t.loanType.value==="Individual"?"fa-user":"fa-group")}}function hCe(e,o){e&1&&(l(0,"th",36),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.Actions")))}function gCe(e,o){if(e&1){let t=Y();l(0,"button",57),p(1,"translate"),R("click",function(i){V(t);let s=w(3);return q(s.routeEdit(i))}),b(2,"i",41),r()}if(e&2){let t=w().$implicit;g("matTooltip",Le(m(1,3,"tooltips.Make Repayment")))("routerLink",Nt(5,x_e,t.id))}}function _Ce(e,o){if(e&1){let t=Y();l(0,"button",57),p(1,"translate"),R("click",function(i){V(t);let s=w(4);return q(s.routeEdit(i))}),b(2,"i",59),r()}if(e&2){let t=w(2).$implicit;g("matTooltip",Le(m(1,3,"tooltips.Approve")))("routerLink",Nt(5,b_e,t.id))}}function CCe(e,o){e&1&&(l(0,"span"),F(1,_Ce,3,7,"button",58),r()),e&2&&(a(),g("mifosxHasPermission","APPROVE_LOAN"))}function vCe(e,o){if(e&1){let t=Y();l(0,"button",57),p(1,"translate"),R("click",function(i){V(t);let s=w(4);return q(s.routeEdit(i))}),b(2,"i",43),r()}if(e&2){let t=w(2).$implicit;g("matTooltip",Le(m(1,3,"tooltips.Disburse")))("routerLink",Nt(5,y_e,t.id))}}function xCe(e,o){e&1&&(l(0,"span"),F(1,vCe,3,7,"button",58),r()),e&2&&(a(),g("mifosxHasPermission","DISBURSE_LOAN"))}function bCe(e,o){if(e&1){let t=Y();l(0,"button",61),p(1,"translate"),R("click",function(i){V(t);let s=w(2).$implicit,d=w(2);return d.routeEdit(i),q(d.routeTransferFund(s.id))}),b(2,"i",62),r()}e&2&&g("matTooltip",Le(m(1,2,"tooltips.Transfer Funds")))}function yCe(e,o){e&1&&(l(0,"span"),F(1,bCe,3,4,"button",60),r()),e&2&&(a(),g("mifosxHasPermission","DISBURSE_LOAN"))}function SCe(e,o){if(e&1&&(l(0,"td",37),E(1,gCe,3,7,"button",56),E(2,CCe,2,1,"span"),E(3,xCe,2,1,"span"),E(4,yCe,2,1,"span"),r()),e&2){let t=o.$implicit;a(),I(t.status.active?1:-1),a(),I(t.status.pendingApproval?2:-1),a(),I(!t.status.pendingApproval&&!t.status.active&&!t.status.overpaid?3:-1),a(),I(!t.status.pendingApproval&&!t.status.active&&t.status.overpaid?4:-1)}}function wCe(e,o){e&1&&b(0,"tr",44)}function PCe(e,o){if(e&1&&b(0,"tr",63),e&2){let t=o.$implicit;g("routerLink",Nt(1,$9,t.id))}}function TCe(e,o){if(e&1&&(l(0,"table",7),p(1,"accountsFilter"),X(2,46),F(3,nCe,3,3,"th",9)(4,oCe,4,5,"td",10),Z(),X(5,47),F(6,aCe,3,3,"th",9)(7,rCe,2,2,"td",10),Z(),X(8,48),F(9,lCe,3,3,"th",9)(10,sCe,2,1,"td",10),Z(),X(11,49),F(12,cCe,3,3,"th",13)(13,pCe,3,3,"td",14),Z(),X(14,50),F(15,mCe,3,3,"th",13)(16,dCe,3,3,"td",14),Z(),X(17,51),F(18,uCe,3,3,"th",19)(19,fCe,2,3,"td",20),Z(),X(20,18),F(21,hCe,3,3,"th",19)(22,SCe,5,4,"td",20),Z(),F(23,wCe,1,0,"tr",21)(24,PCe,1,3,"tr",52),r()),e&2){let t=w();g("dataSource",Ot(1,3,t.loanAccounts,"loan")),a(23),g("matHeaderRowDef",t.openLoansColumns),a(),g("matRowDefColumns",t.openLoansColumns)}}function MCe(e,o){e&1&&(l(0,"th",31),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.Account No")))}function DCe(e,o){if(e&1&&(l(0,"td",32),b(1,"i",33),p(2,"statusLookup"),b(3,"mifosx-account-number",53),r()),e&2){let t=o.$implicit;a(),g("ngClass",t.inArrears?"status-active-overdue":m(2,3,t.status.code)),a(2),g("accountNo",Le(t.accountNo))}}function ECe(e,o){e&1&&(l(0,"th",31),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.Loan Product")))}function ICe(e,o){if(e&1&&(l(0,"td",32),b(1,"mifosx-long-text",54),r()),e&2){let t=o.$implicit;a(),g("textValue",Le(t.productName))}}function OCe(e,o){e&1&&(l(0,"th",31),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.Original Loan")))}function ACe(e,o){if(e&1&&(l(0,"td",32),c(1),p(2,"dateFormat"),r()),e&2){let t=o.$implicit;a(),h(m(2,1,t.lastActiveTransactionDate))}}function FCe(e,o){e&1&&(l(0,"th",34),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.Loan Balance")))}function kCe(e,o){if(e&1&&(l(0,"td",35),c(1),p(2,"formatNumber"),r()),e&2){let t=o.$implicit;a(),h(m(2,1,t.loanBalance))}}function BCe(e,o){e&1&&(l(0,"th",34),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.Amount Paid")))}function RCe(e,o){if(e&1&&(l(0,"td",35),c(1),p(2,"formatNumber"),r()),e&2){let t=o.$implicit;a(),h(m(2,1,t.accountBalance))}}function NCe(e,o){e&1&&(l(0,"th",36),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.Type")))}function LCe(e,o){if(e&1&&(l(0,"td",37),b(1,"i",55),r()),e&2){let t=o.$implicit;a(),g("matTooltip",_0(" ",t.loanType.value))("ngClass",t.loanType.value==="Individual"?"fa-user":"fa-group")}}function VCe(e,o){e&1&&(l(0,"th",31),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.Closed Date")))}function qCe(e,o){if(e&1&&(l(0,"td",32),c(1),p(2,"dateFormat"),r()),e&2){let t=o.$implicit;a(),h(m(2,1,t.timeline.closedOnDate))}}function zCe(e,o){e&1&&b(0,"tr",44)}function HCe(e,o){if(e&1&&b(0,"tr",63),e&2){let t=o.$implicit;g("routerLink",Nt(1,$9,t.id))}}function GCe(e,o){if(e&1&&(l(0,"table",7),p(1,"accountsFilter"),X(2,46),F(3,MCe,3,3,"th",9)(4,DCe,4,5,"td",10),Z(),X(5,47),F(6,ECe,3,3,"th",9)(7,ICe,2,2,"td",10),Z(),X(8,48),F(9,OCe,3,3,"th",9)(10,ACe,3,3,"td",10),Z(),X(11,49),F(12,FCe,3,3,"th",13)(13,kCe,3,3,"td",14),Z(),X(14,50),F(15,BCe,3,3,"th",13)(16,RCe,3,3,"td",14),Z(),X(17,51),F(18,NCe,3,3,"th",19)(19,LCe,2,3,"td",20),Z(),X(20,64),F(21,VCe,3,3,"th",9)(22,qCe,3,3,"td",10),Z(),F(23,zCe,1,0,"tr",21)(24,HCe,1,3,"tr",52),r()),e&2){let t=w();g("dataSource",yr(1,3,t.loanAccounts,"loan","closed")),a(23),g("matHeaderRowDef",t.closedLoansColumns),a(),g("matRowDefColumns",t.closedLoansColumns)}}function jCe(e,o){e&1&&(l(0,"th",31),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.Account No")))}function $Ce(e,o){if(e&1&&(l(0,"td",32),b(1,"i",33),p(2,"statusLookup"),b(3,"mifosx-account-number",53),r()),e&2){let t=o.$implicit;a(),g("ngClass",m(2,3,t.status.code)),a(2),g("accountNo",Le(t.accountNo))}}function UCe(e,o){e&1&&(l(0,"th",31),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.Savings Product")))}function WCe(e,o){if(e&1&&(l(0,"td",32),b(1,"mifosx-long-text",54),r()),e&2){let t=o.$implicit;a(),g("textValue",Le(t.productName))}}function QCe(e,o){e&1&&(l(0,"th",31),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.Last Active")))}function YCe(e,o){if(e&1&&(l(0,"td",32),c(1),p(2,"dateFormat"),r()),e&2){let t=o.$implicit;a(),h(m(2,1,t.lastActiveTransactionDate))}}function JCe(e,o){e&1&&(l(0,"th",34),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.Balance")))}function KCe(e,o){if(e&1&&(l(0,"td",35),c(1),p(2,"formatNumber"),r()),e&2){let t=o.$implicit;a(),h(m(2,1,t.accountBalance))}}function XCe(e,o){e&1&&(l(0,"th",36),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.Actions")))}function ZCe(e,o){if(e&1){let t=Y();l(0,"button",40),R("click",function(i){V(t);let s=w(3);return q(s.routeEdit(i))}),b(1,"i",69),r()}if(e&2){let t=w().$implicit;g("routerLink",Nt(1,S_e,t.id))}}function e2e(e,o){if(e&1){let t=Y();l(0,"button",40),R("click",function(i){V(t);let s=w(3);return q(s.routeEdit(i))}),b(1,"i",70),r()}if(e&2){let t=w().$implicit;g("routerLink",Nt(1,w_e,t.id))}}function t2e(e,o){if(e&1){let t=Y();l(0,"button",40),R("click",function(i){V(t);let s=w(3);return q(s.routeEdit(i))}),b(1,"i",59),r()}if(e&2){let t=w().$implicit;g("routerLink",Nt(1,P_e,t.id))}}function i2e(e,o){if(e&1&&(l(0,"button",68),b(1,"i",71),r()),e&2){let t=w().$implicit;g("routerLink",Nt(1,T_e,t.id))}}function n2e(e,o){if(e&1&&(l(0,"button",68),b(1,"i",72),r()),e&2){let t=w().$implicit;g("routerLink",Nt(1,M_e,t.id))}}function o2e(e,o){if(e&1&&(l(0,"td",37),E(1,ZCe,2,3,"button",68),E(2,e2e,2,3,"button",68),E(3,t2e,2,3,"button",68),E(4,i2e,2,3,"button",68),E(5,n2e,2,3,"button",68),r()),e&2){let t=o.$implicit;a(),I(t.status.active?1:-1),a(),I(t.status.active?2:-1),a(),I(t.status.submittedAndPendingApproval?3:-1),a(),I(!t.status.submittedAndPendingApproval&&!t.status.active?4:-1),a(),I(!t.status.submittedAndPendingApproval&&!t.status.active?5:-1)}}function a2e(e,o){e&1&&b(0,"tr",44)}function r2e(e,o){if(e&1&&b(0,"tr",45),e&2){let t=o.$implicit;g("routerLink",Nt(1,U9,t.id))}}function l2e(e,o){if(e&1&&(l(0,"table",7),p(1,"accountsFilter"),X(2,46),F(3,jCe,3,3,"th",9)(4,$Ce,4,5,"td",10),Z(),X(5,65),F(6,UCe,3,3,"th",9)(7,WCe,2,2,"td",10),Z(),X(8,66),F(9,QCe,3,3,"th",9)(10,YCe,3,3,"td",10),Z(),X(11,67),F(12,JCe,3,3,"th",13)(13,KCe,3,3,"td",14),Z(),X(14,18),F(15,XCe,3,3,"th",19)(16,o2e,6,5,"td",20),Z(),F(17,a2e,1,0,"tr",21)(18,r2e,1,3,"tr",22),r()),e&2){let t=w();g("dataSource",$t(1,3,t.savingAccounts,"saving","open","isSavings")),a(17),g("matHeaderRowDef",t.openSavingsColumns),a(),g("matRowDefColumns",t.openSavingsColumns)}}function s2e(e,o){e&1&&(l(0,"th",31),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.Account No")))}function c2e(e,o){if(e&1&&(l(0,"td",32),b(1,"i",33),p(2,"statusLookup"),b(3,"mifosx-account-number",53),r()),e&2){let t=o.$implicit;a(),g("ngClass",m(2,3,t.status.code)),a(2),g("accountNo",Le(t.accountNo))}}function p2e(e,o){e&1&&(l(0,"th",31),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.Savings Product")))}function m2e(e,o){if(e&1&&(l(0,"td",32),b(1,"mifosx-long-text",54),r()),e&2){let t=o.$implicit;a(),g("textValue",Le(t.productName))}}function d2e(e,o){e&1&&(l(0,"th",31),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.Closed Date")))}function u2e(e,o){if(e&1&&(l(0,"td",32),c(1),p(2,"dateFormat"),r()),e&2){let t=o.$implicit;a(),h(m(2,1,t.timeline.closedOnDate))}}function f2e(e,o){e&1&&b(0,"tr",44)}function h2e(e,o){if(e&1&&b(0,"tr",45),e&2){let t=o.$implicit;g("routerLink",Nt(1,U9,t.id))}}function g2e(e,o){if(e&1&&(l(0,"table",7),p(1,"accountsFilter"),X(2,46),F(3,s2e,3,3,"th",9)(4,c2e,4,5,"td",10),Z(),X(5,65),F(6,p2e,3,3,"th",9)(7,m2e,2,2,"td",10),Z(),X(8,64),F(9,d2e,3,3,"th",9)(10,u2e,3,3,"td",10),Z(),F(11,f2e,1,0,"tr",21)(12,h2e,1,3,"tr",22),r()),e&2){let t=w();g("dataSource",$t(1,3,t.savingAccounts,"saving","closed","isSavings")),a(11),g("matHeaderRowDef",t.closedSavingsColumns),a(),g("matRowDefColumns",t.closedSavingsColumns)}}function _2e(e,o){e&1&&(l(0,"th",31),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.Account No")))}function C2e(e,o){if(e&1&&(l(0,"td",32),b(1,"i",33),p(2,"statusLookup"),b(3,"mifosx-account-number",53),r()),e&2){let t=o.$implicit;a(),g("ngClass",m(2,3,t.status.code)),a(2),g("accountNo",Le(t.accountNo))}}function v2e(e,o){e&1&&(l(0,"th",31),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.Fixed Deposit Product")))}function x2e(e,o){if(e&1&&(l(0,"td",32),c(1),r()),e&2){let t=o.$implicit;a(),h(t.productName)}}function b2e(e,o){e&1&&(l(0,"th",31),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.Last Active")))}function y2e(e,o){if(e&1&&(l(0,"td",32),c(1),p(2,"dateFormat"),r()),e&2){let t=o.$implicit;a(),h(m(2,1,t.lastActiveTransactionDate))}}function S2e(e,o){e&1&&(l(0,"th",34),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.Balance")))}function w2e(e,o){if(e&1&&(l(0,"td",35),c(1),p(2,"formatNumber"),r()),e&2){let t=o.$implicit;a(),h(m(2,1,t.accountBalance))}}function P2e(e,o){e&1&&(l(0,"th",36),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.Actions")))}function T2e(e,o){if(e&1){let t=Y();l(0,"button",40),R("click",function(i){V(t);let s=w(3);return q(s.routeEdit(i))}),b(1,"i",59),r()}if(e&2){let t=w().$implicit;g("routerLink",Nt(1,D_e,t.id))}}function M2e(e,o){if(e&1&&(l(0,"button",68),b(1,"i",71),r()),e&2){let t=w().$implicit;g("routerLink",Nt(1,E_e,t.id))}}function D2e(e,o){if(e&1&&(l(0,"button",68),b(1,"i",72),r()),e&2){let t=w().$implicit;g("routerLink",Nt(1,I_e,t.id))}}function E2e(e,o){if(e&1&&(l(0,"td",37),E(1,T2e,2,3,"button",68),E(2,M2e,2,3,"button",68),E(3,D2e,2,3,"button",68),r()),e&2){let t=o.$implicit;a(),I(t.status.submittedAndPendingApproval?1:-1),a(),I(!t.status.submittedAndPendingApproval&&!t.status.active?2:-1),a(),I(!t.status.submittedAndPendingApproval&&!t.status.active?3:-1)}}function I2e(e,o){e&1&&b(0,"tr",44)}function O2e(e,o){if(e&1&&b(0,"tr",45),e&2){let t=o.$implicit;g("routerLink",Nt(1,W9,t.id))}}function A2e(e,o){if(e&1&&(l(0,"table",7),p(1,"accountsFilter"),X(2,46),F(3,_2e,3,3,"th",9)(4,C2e,4,5,"td",10),Z(),X(5,65),F(6,v2e,3,3,"th",9)(7,x2e,2,1,"td",10),Z(),X(8,66),F(9,b2e,3,3,"th",9)(10,y2e,3,3,"td",10),Z(),X(11,67),F(12,S2e,3,3,"th",13)(13,w2e,3,3,"td",14),Z(),X(14,18),F(15,P2e,3,3,"th",19)(16,E2e,4,3,"td",20),Z(),F(17,I2e,1,0,"tr",21)(18,O2e,1,3,"tr",22),r()),e&2){let t=w();g("dataSource",$t(1,3,t.savingAccounts,"saving","open","isFixed")),a(17),g("matHeaderRowDef",t.openSavingsColumns),a(),g("matRowDefColumns",t.openSavingsColumns)}}function F2e(e,o){e&1&&(l(0,"th",31),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.Account No")))}function k2e(e,o){if(e&1&&(l(0,"td",32),b(1,"i",33),p(2,"statusLookup"),b(3,"mifosx-account-number",53),r()),e&2){let t=o.$implicit;a(),g("ngClass",m(2,3,t.status.code)),a(2),g("accountNo",Le(t.accountNo))}}function B2e(e,o){e&1&&(l(0,"th",31),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.Fixed Deposit Product")))}function R2e(e,o){if(e&1&&(l(0,"td",32),b(1,"mifosx-long-text",54),r()),e&2){let t=o.$implicit;a(),g("textValue",Le(t.productName))}}function N2e(e,o){e&1&&(l(0,"th",31),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.Closed Date")))}function L2e(e,o){if(e&1&&(l(0,"td",32),c(1),p(2,"dateFormat"),r()),e&2){let t=o.$implicit;a(),h(m(2,1,t.timeline.closedOnDate))}}function V2e(e,o){e&1&&b(0,"tr",44)}function q2e(e,o){if(e&1&&b(0,"tr",45),e&2){let t=o.$implicit;g("routerLink",Nt(1,W9,t.id))}}function z2e(e,o){if(e&1&&(l(0,"table",7),p(1,"accountsFilter"),X(2,46),F(3,F2e,3,3,"th",9)(4,k2e,4,5,"td",10),Z(),X(5,65),F(6,B2e,3,3,"th",9)(7,R2e,2,2,"td",10),Z(),X(8,64),F(9,N2e,3,3,"th",9)(10,L2e,3,3,"td",10),Z(),F(11,V2e,1,0,"tr",21)(12,q2e,1,3,"tr",22),r()),e&2){let t=w();g("dataSource",$t(1,3,t.savingAccounts,"saving","closed","isFixed")),a(11),g("matHeaderRowDef",t.closedSavingsColumns),a(),g("matRowDefColumns",t.closedSavingsColumns)}}function H2e(e,o){e&1&&(l(0,"th",31),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.Account No")))}function G2e(e,o){if(e&1&&(l(0,"td",32),b(1,"i",33),p(2,"statusLookup"),b(3,"mifosx-account-number",53),r()),e&2){let t=o.$implicit;a(),g("ngClass",m(2,3,t.status.code)),a(2),g("accountNo",Le(t.accountNo))}}function j2e(e,o){e&1&&(l(0,"th",31),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.Recurring Deposit Product")))}function $2e(e,o){if(e&1&&(l(0,"td",32),b(1,"mifosx-long-text",54),r()),e&2){let t=o.$implicit;a(),g("textValue",Le(t.productName))}}function U2e(e,o){e&1&&(l(0,"th",31),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.Last Active")))}function W2e(e,o){if(e&1&&(l(0,"td",32),c(1),p(2,"dateFormat"),r()),e&2){let t=o.$implicit;a(),h(m(2,1,t.lastActiveTransactionDate))}}function Q2e(e,o){e&1&&(l(0,"th",34),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.Balance")))}function Y2e(e,o){if(e&1&&(l(0,"td",35),c(1),p(2,"formatNumber"),r()),e&2){let t=o.$implicit;a(),h(m(2,1,t.accountBalance))}}function J2e(e,o){e&1&&(l(0,"th",36),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.Actions")))}function K2e(e,o){if(e&1&&(l(0,"button",68),b(1,"i",59),r()),e&2){let t=w(2).$implicit;g("routerLink",Nt(1,O_e,t.id))}}function X2e(e,o){e&1&&F(0,K2e,2,3,"button",73),e&2&&g("mifosxHasPermission","APPROVE_SAVINGSACCOUNT")}function Z2e(e,o){if(e&1){let t=Y();l(0,"button",40),R("click",function(i){V(t);let s=w(4);return q(s.routeEdit(i))}),b(1,"i",71),r()}if(e&2){let t=w(2).$implicit;g("routerLink",Nt(1,A_e,t.id))}}function eve(e,o){if(e&1){let t=Y();l(0,"button",40),R("click",function(i){V(t);let s=w(4);return q(s.routeEdit(i))}),b(1,"i",72),r()}if(e&2){let t=w(2).$implicit;g("routerLink",Nt(1,F_e,t.id))}}function tve(e,o){e&1&&F(0,Z2e,2,3,"button",38)(1,eve,2,3,"button",38),e&2&&(g("mifosxHasPermission","APPROVALUNDO_SAVINGSACCOUNT"),a(),g("mifosxHasPermission","ACTIVATE_SAVINGSACCOUNT"))}function ive(e,o){if(e&1&&(l(0,"td",37),E(1,X2e,1,1,"button",68),E(2,tve,2,2),r()),e&2){let t=o.$implicit;a(),I(t.status.submittedAndPendingApproval?1:-1),a(),I(!t.status.submittedAndPendingApproval&&!t.status.active?2:-1)}}function nve(e,o){e&1&&b(0,"tr",44)}function ove(e,o){if(e&1&&b(0,"tr",63),e&2){let t=o.$implicit;g("routerLink",Nt(1,Q9,t.id))}}function ave(e,o){if(e&1&&(l(0,"table",7),p(1,"accountsFilter"),X(2,46),F(3,H2e,3,3,"th",9)(4,G2e,4,5,"td",10),Z(),X(5,65),F(6,j2e,3,3,"th",9)(7,$2e,2,2,"td",10),Z(),X(8,66),F(9,U2e,3,3,"th",9)(10,W2e,3,3,"td",10),Z(),X(11,67),F(12,Q2e,3,3,"th",13)(13,Y2e,3,3,"td",14),Z(),X(14,18),F(15,J2e,3,3,"th",19)(16,ive,3,2,"td",20),Z(),F(17,nve,1,0,"tr",21)(18,ove,1,3,"tr",52),r()),e&2){let t=w();g("dataSource",$t(1,3,t.savingAccounts,"saving","open","isRecurring")),a(17),g("matHeaderRowDef",t.openSavingsColumns),a(),g("matRowDefColumns",t.openSavingsColumns)}}function rve(e,o){e&1&&(l(0,"th",31),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.Account No")))}function lve(e,o){if(e&1&&(l(0,"td",32),b(1,"i",33),p(2,"statusLookup"),b(3,"mifosx-account-number",53),r()),e&2){let t=o.$implicit;a(),g("ngClass",m(2,3,t.status.code)),a(2),g("accountNo",Le(t.accountNo))}}function sve(e,o){e&1&&(l(0,"th",31),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.Recurring Deposit Product")))}function cve(e,o){if(e&1&&(l(0,"td",32),b(1,"mifosx-long-text",54),r()),e&2){let t=o.$implicit;a(),g("textValue",Le(t.productName))}}function pve(e,o){e&1&&(l(0,"th",31),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.Closed Date")))}function mve(e,o){if(e&1&&(l(0,"td",32),c(1),p(2,"dateFormat"),r()),e&2){let t=o.$implicit;a(),h(m(2,1,t.timeline.closedOnDate))}}function dve(e,o){e&1&&b(0,"tr",44)}function uve(e,o){if(e&1&&b(0,"tr",63),e&2){let t=o.$implicit;g("routerLink",Nt(1,Q9,t.id))}}function fve(e,o){if(e&1&&(l(0,"table",7),p(1,"accountsFilter"),X(2,46),F(3,rve,3,3,"th",9)(4,lve,4,5,"td",10),Z(),X(5,65),F(6,sve,3,3,"th",9)(7,cve,2,2,"td",10),Z(),X(8,64),F(9,pve,3,3,"th",9)(10,mve,3,3,"td",10),Z(),F(11,dve,1,0,"tr",21)(12,uve,1,3,"tr",52),r()),e&2){let t=w();g("dataSource",$t(1,3,t.savingAccounts,"saving","closed","isRecurring")),a(11),g("matHeaderRowDef",t.closedSavingsColumns),a(),g("matRowDefColumns",t.closedSavingsColumns)}}function hve(e,o){e&1&&(l(0,"th",31),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.Account No")))}function gve(e,o){if(e&1&&(l(0,"td",32),b(1,"i",33),p(2,"statusLookup"),b(3,"mifosx-account-number",53),r()),e&2){let t=o.$implicit;a(),g("ngClass",m(2,3,t.status.code)),a(2),g("accountNo",Le(t.accountNo))}}function _ve(e,o){e&1&&(l(0,"th",31),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.Share Product")))}function Cve(e,o){if(e&1&&(l(0,"td",32),b(1,"mifosx-long-text",54),r()),e&2){let t=o.$implicit;a(),g("textValue",Le(t.productName))}}function vve(e,o){e&1&&(l(0,"th",31),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.Approved Shares")))}function xve(e,o){if(e&1&&(l(0,"td",32),c(1),r()),e&2){let t=o.$implicit;a(),h(t.totalApprovedShares)}}function bve(e,o){e&1&&(l(0,"th",31),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.Pending For Approval Shares")))}function yve(e,o){if(e&1&&(l(0,"td",32),c(1),r()),e&2){let t=o.$implicit;a(),h(t.totalPendingForApprovalShares)}}function Sve(e,o){e&1&&(l(0,"th",36),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.Actions")))}function wve(e,o){if(e&1){let t=Y();l(0,"button",40),R("click",function(i){V(t);let s=w(3);return q(s.routeEdit(i))}),b(1,"i",59),r()}if(e&2){let t=w().$implicit;g("routerLink",Nt(1,k_e,t.id))}}function Pve(e,o){if(e&1){let t=Y();l(0,"button",40),R("click",function(i){V(t);let s=w(3);return q(s.routeEdit(i))}),b(1,"i",71),r()}if(e&2){let t=w().$implicit;g("routerLink",Nt(1,B_e,t.id))}}function Tve(e,o){if(e&1){let t=Y();l(0,"button",40),R("click",function(i){V(t);let s=w(3);return q(s.routeEdit(i))}),b(1,"i",72),r()}if(e&2){let t=w().$implicit;g("routerLink",Nt(1,R_e,t.id))}}function Mve(e,o){if(e&1&&(l(0,"td",37),E(1,wve,2,3,"button",68),E(2,Pve,2,3,"button",68),E(3,Tve,2,3,"button",68),r()),e&2){let t=o.$implicit;a(),I(t.status.submittedAndPendingApproval?1:-1),a(),I(!t.status.submittedAndPendingApproval&&!t.status.active?2:-1),a(),I(!t.status.submittedAndPendingApproval&&!t.status.active?3:-1)}}function Dve(e,o){e&1&&b(0,"tr",44)}function Eve(e,o){if(e&1&&b(0,"tr",45),e&2){let t=o.$implicit;g("routerLink",Nt(1,Y9,t.id))}}function Ive(e,o){if(e&1&&(l(0,"table",7),p(1,"accountsFilter"),X(2,46),F(3,hve,3,3,"th",9)(4,gve,4,5,"td",10),Z(),X(5,74),F(6,_ve,3,3,"th",9)(7,Cve,2,2,"td",10),Z(),X(8,75),F(9,vve,3,3,"th",9)(10,xve,2,1,"td",10),Z(),X(11,76),F(12,bve,3,3,"th",9)(13,yve,2,1,"td",10),Z(),X(14,18),F(15,Sve,3,3,"th",19)(16,Mve,4,3,"td",20),Z(),F(17,Dve,1,0,"tr",21)(18,Eve,1,3,"tr",22),r()),e&2){let t=w();g("dataSource",Ot(1,3,t.shareAccounts,"share")),a(17),g("matHeaderRowDef",t.openSharesColumns),a(),g("matRowDefColumns",t.openSharesColumns)}}function Ove(e,o){e&1&&(l(0,"th",31),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.Account No")))}function Ave(e,o){if(e&1&&(l(0,"td",32),b(1,"i",33),p(2,"statusLookup"),b(3,"mifosx-account-number",53),r()),e&2){let t=o.$implicit;a(),g("ngClass",m(2,3,t.status.code)),a(2),g("accountNo",Le(t.accountNo))}}function Fve(e,o){e&1&&(l(0,"th",31),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.Share Product")))}function kve(e,o){if(e&1&&(l(0,"td",32),c(1),r()),e&2){let t=o.$implicit;a(),h(t.productName)}}function Bve(e,o){e&1&&(l(0,"th",31),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.Approved Shares")))}function Rve(e,o){if(e&1&&(l(0,"td",32),c(1),r()),e&2){let t=o.$implicit;a(),h(t.totalApprovedShares)}}function Nve(e,o){e&1&&(l(0,"th",31),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.Pending For Approval Shares")))}function Lve(e,o){if(e&1&&(l(0,"td",32),c(1),r()),e&2){let t=o.$implicit;a(),h(t.totalPendingForApprovalShares)}}function Vve(e,o){e&1&&(l(0,"th",31),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.Closed Date")))}function qve(e,o){if(e&1&&(l(0,"td",32),c(1),p(2,"dateFormat"),r()),e&2){let t=o.$implicit;a(),h(m(2,1,t.timeline.closedOnDate))}}function zve(e,o){e&1&&b(0,"tr",44)}function Hve(e,o){if(e&1&&b(0,"tr",45),e&2){let t=o.$implicit;g("routerLink",Nt(1,Y9,t.id))}}function Gve(e,o){if(e&1&&(l(0,"table",7),p(1,"accountsFilter"),X(2,46),F(3,Ove,3,3,"th",9)(4,Ave,4,5,"td",10),Z(),X(5,74),F(6,Fve,3,3,"th",9)(7,kve,2,1,"td",10),Z(),X(8,75),F(9,Bve,3,3,"th",9)(10,Rve,2,1,"td",10),Z(),X(11,76),F(12,Nve,3,3,"th",9)(13,Lve,2,1,"td",10),Z(),X(14,64),F(15,Vve,3,3,"th",9)(16,qve,3,3,"td",10),Z(),F(17,zve,1,0,"tr",21)(18,Hve,1,3,"tr",22),r()),e&2){let t=w();g("dataSource",yr(1,3,t.shareAccounts,"share","closed")),a(17),g("matHeaderRowDef",t.closedSharesColumns),a(),g("matRowDefColumns",t.closedSharesColumns)}}function jve(e,o){e&1&&(l(0,"th",31),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.ID")))}function $ve(e,o){if(e&1&&(l(0,"td",32),c(1),r()),e&2){let t=o.$implicit;a(),h(t.collateralId)}}function Uve(e,o){e&1&&(l(0,"th",31),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.name")))}function Wve(e,o){if(e&1&&(l(0,"td",32),c(1),r()),e&2){let t=o.$implicit;a(),h(t.name)}}function Qve(e,o){e&1&&(l(0,"th",34),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.Quantity")))}function Yve(e,o){if(e&1&&(l(0,"td",35),c(1),p(2,"formatNumber"),r()),e&2){let t=o.$implicit;a(),h(m(2,1,t.quantity))}}function Jve(e,o){e&1&&(l(0,"th",34),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.Total Value")))}function Kve(e,o){if(e&1&&(l(0,"td",35),c(1),p(2,"formatNumber"),r()),e&2){let t=o.$implicit;a(),v(" ",m(2,1,t.basePrice*t.quantity)," ")}}function Xve(e,o){e&1&&(l(0,"th",34),c(1),p(2,"translate"),r()),e&2&&(a(),v(" ",m(2,1,"labels.inputs.Total Collateral Value")," "))}function Zve(e,o){if(e&1&&(l(0,"td",35),c(1),p(2,"formatNumber"),r()),e&2){let t=o.$implicit;a(),v(" ",m(2,1,t.pctToBase*t.basePrice*t.quantity/100)," ")}}function exe(e,o){e&1&&b(0,"tr",44)}function txe(e,o){if(e&1&&b(0,"tr",45),e&2){let t=o.$implicit;g("routerLink",Nt(1,N_e,t.collateralId))}}var zC=(()=>{class e{constructor(){this.route=T(Ie),this.clientService=T(Oi),this.router=T(qe),this.openLoansColumns=["Account No","Loan Account","Original Loan","Loan Balance","Amount Paid","Type","Actions"],this.closedLoansColumns=["Account No","Loan Account","Original Loan","Loan Balance","Amount Paid","Type","Closed Date"],this.openSavingsColumns=["Account No","Saving Account","Last Active","Balance","Actions"],this.closedSavingsColumns=["Account No","Saving Account","Closed Date"],this.openSharesColumns=["Account No","Share Account","Approved Shares","Pending For Approval Shares","Actions"],this.closedSharesColumns=["Account No","Share Account","Approved Shares","Pending For Approval Shares","Closed Date"],this.upcomingChargesColumns=["Name","Due as of","Due","Paid","Waived","Outstanding","Actions"],this.collateralsColumns=["ID","Name","Quantity","Total Value","Total Collateral Value"],this.showClosedLoanAccounts=!1,this.showClosedSavingAccounts=!1,this.showClosedShareAccounts=!1,this.showClosedRecurringAccounts=!1,this.showClosedFixedAccounts=!1,this.route.data.subscribe(t=>{this.clientAccountData=t.clientAccountsData,this.savingAccounts=t.clientAccountsData.savingsAccounts,this.loanAccounts=t.clientAccountsData.loanAccounts,this.shareAccounts=t.clientAccountsData.shareAccounts,this.upcomingCharges=t.clientChargesData.pageItems,this.collaterals=t.clientCollateralData,this.clientSummary=t.clientSummary?t.clientSummary[0]:[],this.clientid=this.route.parent.snapshot.params.clientId})}toggleLoanAccountsOverview(){this.showClosedLoanAccounts=!this.showClosedLoanAccounts}toggleSavingAccountsOverview(){this.showClosedSavingAccounts=!this.showClosedSavingAccounts}toggleShareAccountsOverview(){this.showClosedShareAccounts=!this.showClosedShareAccounts}toggleRecurringAccountsOverview(){this.showClosedRecurringAccounts=!this.showClosedRecurringAccounts}toggleFixedAccountsOverview(){this.showClosedFixedAccounts=!this.showClosedFixedAccounts}waiveCharge(t,n){let i={clientId:n.toString(),resourceType:t};this.clientService.waiveClientCharge(i).subscribe(()=>{this.getChargeData(n)})}getChargeData(t){this.clientService.getClientChargesData(t).subscribe(n=>{this.upcomingCharges=n.pageItems})}routeEdit(t){t.stopPropagation()}routeTransferFund(t){let n={loanId:t,accountType:"fromloans"};this.router.navigate(["../","loans-accounts",t,"transfer-funds","make-account-transfer"],{relativeTo:this.route,queryParams:n})}viewAccountsLabel(t){return t?"labels.buttons.View Active Accounts":"labels.buttons.View Closed Accounts"}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275cmp=me({type:e,selectors:[["mifosx-general-tab"]],decls:156,vars:83,consts:[[1,"tab-container","mat-typography"],[1,"layout-row","gap-32px","performance-history-container"],[1,"heading-content"],[1,"layout-column","flex-50"],["className","heading-name"],[1,"layout-row","align-flex-end"],["mat-raised-button","","class","f-right","color","primary",3,"routerLink",4,"mifosxHasPermission"],["mat-table","",3,"dataSource"],["matColumnDef","Name"],["mat-header-cell","",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","Due as of"],["matColumnDef","Due"],["mat-header-cell","","class","r-amount",4,"matHeaderCellDef"],["mat-cell","","class","r-amount",4,"matCellDef"],["matColumnDef","Paid"],["matColumnDef","Waived"],["matColumnDef","Outstanding"],["matColumnDef","Actions"],["mat-header-cell","","class","center",4,"matHeaderCellDef"],["mat-cell","","class","center",4,"matCellDef"],["mat-header-row","",4,"matHeaderRowDef"],["mat-row","",3,"routerLink",4,"matRowDef","matRowDefColumns"],[1,"heading-name"],["mat-raised-button","","color","primary",1,"f-right",3,"click"],["mat-raised-button","","color","primary","disabled","",1,"f-right"],["matColumnDef","ID"],["matColumnDef","Quantity"],["matColumnDef","Total Value"],["matColumnDef","Total Collateral Value"],["mat-raised-button","","color","primary",1,"f-right",3,"routerLink"],["mat-header-cell",""],["mat-cell",""],[1,"fa","fa-stop",3,"ngClass"],["mat-header-cell","",1,"r-amount"],["mat-cell","",1,"r-amount"],["mat-header-cell","",1,"center"],["mat-cell","",1,"center"],["class","account-action-button","mat-raised-button","","color","primary",3,"routerLink","click",4,"mifosxHasPermission"],["class","account-action-button","mat-raised-button","","color","primary",3,"click",4,"mifosxHasPermission"],["mat-raised-button","","color","primary",1,"account-action-button",3,"click","routerLink"],[1,"fa","fa-dollar"],["mat-raised-button","","color","primary",1,"account-action-button",3,"click"],[1,"fa","fa-flag"],["mat-header-row",""],["mat-row","",3,"routerLink"],["matColumnDef","Account No"],["matColumnDef","Loan Account"],["matColumnDef","Original Loan"],["matColumnDef","Loan Balance"],["matColumnDef","Amount Paid"],["matColumnDef","Type"],["mat-row","","class","select-row",3,"routerLink",4,"matRowDef","matRowDefColumns"],[3,"accountNo"],["chars","35",3,"textValue"],["matTooltipPosition","above",1,"fa","fa-large",3,"ngClass","matTooltip"],["mat-raised-button","","color","primary","matTooltipPosition","above",1,"account-action-button",3,"matTooltip","routerLink"],["mat-raised-button","","color","primary","matTooltipPosition","above",1,"account-action-button",3,"click","matTooltip","routerLink"],["class","account-action-button","mat-raised-button","","color","primary","matTooltipPosition","above",3,"matTooltip","routerLink","click",4,"mifosxHasPermission"],[1,"fa","fa-check"],["class","account-action-button","mat-raised-button","","color","primary","matTooltipPosition","above",3,"matTooltip","click",4,"mifosxHasPermission"],["mat-raised-button","","color","primary","matTooltipPosition","above",1,"account-action-button",3,"click","matTooltip"],[1,"fa","fa-exchange"],["mat-row","",1,"select-row",3,"routerLink"],["matColumnDef","Closed Date"],["matColumnDef","Saving Account"],["matColumnDef","Last Active"],["matColumnDef","Balance"],["mat-raised-button","","color","primary",1,"account-action-button",3,"routerLink"],[1,"fa","fa-arrow-up"],[1,"fa","fa-arrow-down"],[1,"fa","fa-undo"],[1,"fa","fa-check-circle"],["class","account-action-button","mat-raised-button","","color","primary",3,"routerLink",4,"mifosxHasPermission"],["matColumnDef","Share Account"],["matColumnDef","Approved Shares"],["matColumnDef","Pending For Approval Shares"]],template:function(n,i){n&1&&(l(0,"div",0)(1,"h3"),c(2),p(3,"translate"),r(),l(4,"div",1)(5,"table")(6,"tbody")(7,"tr")(8,"td")(9,"p"),c(10),p(11,"translate"),b(12,"br"),c(13),p(14,"translate"),b(15,"br"),c(16),p(17,"translate"),p(18,"formatNumber"),b(19,"br"),r()(),l(20,"td")(21,"p"),c(22),p(23,"translate"),b(24,"br"),c(25),p(26,"translate"),p(27,"formatNumber"),b(28,"br"),r()()()()()(),l(29,"div",2)(30,"div",3)(31,"div",4)(32,"h3"),c(33),p(34,"translate"),r()()(),l(35,"div",3)(36,"div",5),F(37,L_e,3,5,"button",6),r()()(),l(38,"table",7),X(39,8),F(40,V_e,3,3,"th",9)(41,q_e,4,4,"td",10),Z(),X(42,11),F(43,z_e,3,3,"th",9)(44,H_e,3,3,"td",10),Z(),X(45,12),F(46,G_e,3,3,"th",13)(47,j_e,3,3,"td",14),Z(),X(48,15),F(49,$_e,3,3,"th",13)(50,U_e,3,3,"td",14),Z(),X(51,16),F(52,W_e,3,3,"th",13)(53,Q_e,3,3,"td",14),Z(),X(54,17),F(55,Y_e,3,3,"th",13)(56,J_e,3,3,"td",14),Z(),X(57,18),F(58,K_e,3,3,"th",19)(59,eCe,3,2,"td",20),Z(),F(60,tCe,1,0,"tr",21)(61,iCe,1,3,"tr",22),r(),l(62,"div",2)(63,"div",3)(64,"div",23)(65,"h3"),c(66),p(67,"translate"),r()()(),l(68,"div",3)(69,"div",5)(70,"button",24),R("click",function(){return i.toggleLoanAccountsOverview()}),c(71),p(72,"translate"),r()()()(),E(73,TCe,25,6,"table",7),E(74,GCe,25,7,"table",7),l(75,"div",2)(76,"div",3)(77,"div",23)(78,"h3"),c(79),p(80,"translate"),r()()(),l(81,"div",3)(82,"div",5)(83,"button",24),R("click",function(){return i.toggleSavingAccountsOverview()}),c(84),p(85,"translate"),r()()()(),E(86,l2e,19,8,"table",7),E(87,g2e,13,8,"table",7),l(88,"div",2)(89,"div",3)(90,"div",23)(91,"h3"),c(92),p(93,"translate"),r()()(),l(94,"div",3)(95,"div",5)(96,"button",24),R("click",function(){return i.toggleFixedAccountsOverview()}),c(97),p(98,"translate"),r()()()(),E(99,A2e,19,8,"table",7),E(100,z2e,13,8,"table",7),l(101,"div",2)(102,"div",3)(103,"div",23)(104,"h3"),c(105),p(106,"translate"),r()()(),l(107,"div",3)(108,"div",5)(109,"button",24),R("click",function(){return i.toggleRecurringAccountsOverview()}),c(110),p(111,"translate"),r()()()(),E(112,ave,19,8,"table",7),E(113,fve,13,8,"table",7),l(114,"div",2)(115,"div",3)(116,"div",23)(117,"h3"),c(118),p(119,"translate"),r()()(),l(120,"div",3)(121,"div",5)(122,"button",24),R("click",function(){return i.toggleShareAccountsOverview()}),c(123),p(124,"translate"),r()()()(),E(125,Ive,19,6,"table",7),E(126,Gve,19,7,"table",7),l(127,"div",2)(128,"div",3)(129,"div",23)(130,"h3"),c(131),p(132,"translate"),r()()(),l(133,"div",3)(134,"div",5)(135,"button",25),c(136),p(137,"translate"),r()()()(),l(138,"table",7),X(139,26),F(140,jve,3,3,"th",9)(141,$ve,2,1,"td",10),Z(),X(142,8),F(143,Uve,3,3,"th",9)(144,Wve,2,1,"td",10),Z(),X(145,27),F(146,Qve,3,3,"th",13)(147,Yve,3,3,"td",14),Z(),X(148,28),F(149,Jve,3,3,"th",13)(150,Kve,3,3,"td",14),Z(),X(151,29),F(152,Xve,3,3,"th",13)(153,Zve,3,3,"td",14),Z(),F(154,exe,1,0,"tr",21)(155,txe,1,3,"tr",22),r()()),n&2&&(a(2),h(m(3,41,"labels.heading.Performance History")),a(8),le(" ",m(11,43,"labels.inputs.No. Of Loan Cycles")," :",i.clientSummary==null?null:i.clientSummary.loanCycle," "),a(3),le(" ",m(14,45,"labels.inputs.No. of Active Loans")," :",i.clientSummary==null?null:i.clientSummary.activeLoans," "),a(3),le(" ",m(17,47,"labels.inputs.Last Loan Amount")," :",m(18,49,i.clientSummary==null?null:i.clientSummary.lastLoanAmount)," "),a(6),le(" ",m(23,51,"labels.inputs.No. of Active Savings")," :",i.clientSummary==null?null:i.clientSummary.activeSavings," "),a(3),le(" ",m(26,53,"labels.inputs.Total Savings")," :",m(27,55,i.clientSummary==null?null:i.clientSummary.totalSavings)," "),a(8),h(m(34,57,"labels.heading.Upcoming Charges")),a(4),g("mifosxHasPermission","READ_CLIENTCHARGE"),a(),g("dataSource",i.upcomingCharges),a(22),g("matHeaderRowDef",i.upcomingChargesColumns),a(),g("matRowDefColumns",i.upcomingChargesColumns),a(5),h(m(67,59,"labels.heading.Loan Accounts")),a(5),v(" ",m(72,61,i.viewAccountsLabel(i.showClosedLoanAccounts))," "),a(2),I(i.showClosedLoanAccounts?-1:73),a(),I(i.showClosedLoanAccounts?74:-1),a(5),h(m(80,63,"labels.heading.Saving Accounts")),a(5),v(" ",m(85,65,i.viewAccountsLabel(i.showClosedSavingAccounts))," "),a(2),I(i.showClosedSavingAccounts?-1:86),a(),I(i.showClosedSavingAccounts?87:-1),a(5),h(m(93,67,"labels.heading.Fixed Deposit Accounts")),a(5),v(" ",m(98,69,i.viewAccountsLabel(i.showClosedFixedAccounts))," "),a(2),I(i.showClosedFixedAccounts?-1:99),a(),I(i.showClosedFixedAccounts?100:-1),a(5),h(m(106,71,"labels.heading.Recurring Deposit Accounts")),a(5),v(" ",m(111,73,i.viewAccountsLabel(i.showClosedRecurringAccounts))," "),a(2),I(i.showClosedRecurringAccounts?-1:112),a(),I(i.showClosedRecurringAccounts?113:-1),a(5),h(m(119,75,"labels.inputs.Shares Accounts")),a(5),v(" ",m(124,77,i.viewAccountsLabel(i.showClosedShareAccounts))," "),a(2),I(i.showClosedShareAccounts?-1:125),a(),I(i.showClosedShareAccounts?126:-1),a(5),h(m(132,79,"labels.heading.Collateral Data")),a(5),v(" ",m(137,81,"labels.buttons.View Collaterals")," "),a(2),g("dataSource",i.collaterals),a(16),g("matHeaderRowDef",i.collateralsColumns),a(),g("matRowDefColumns",i.collateralsColumns))},dependencies:[ue,co,fe,Ae,ve,Ke,_t,xt,vt,bt,Ct,yt,St,Pt,wt,Tt,rc,Bk,si,Pi,he,go,as,On],styles:[".tab-container[_ngcontent-%COMP%]{padding:1%;margin:1%}.tab-container[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{margin:1% auto}.tab-container[_ngcontent-%COMP%] .performance-history-container[_ngcontent-%COMP%]{border:1px solid;padding:1%}.tab-container[_ngcontent-%COMP%] table[_ngcontent-%COMP%]{width:100%}.tab-container[_ngcontent-%COMP%] table[_ngcontent-%COMP%] td[_ngcontent-%COMP%]:hover{cursor:pointer}.tab-container[_ngcontent-%COMP%] table[_ngcontent-%COMP%] .account-action-button[_ngcontent-%COMP%]{min-width:26px;padding:0 6px;margin:4px;line-height:25px}.tab-container[_ngcontent-%COMP%] table[_ngcontent-%COMP%] .select-row[_ngcontent-%COMP%]:hover{cursor:pointer}.heading-content[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;margin-bottom:1%;margin-top:1%}.heading-name[_ngcontent-%COMP%]{margin:0}.layout-row.align-flex-end[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.5rem}"]})}}return e})();var ixe=()=>["./add"],nxe=e=>[e,"edit"];function oxe(e,o){if(e&1&&(l(0,"span"),c(1),p(2,"translate"),b(3,"br"),r()),e&2){let t=w().$implicit;a(),le("",m(2,2,"labels.inputs.First Name")," : ",t.firstName)}}function axe(e,o){if(e&1&&(l(0,"span"),c(1),p(2,"translate"),b(3,"br"),r()),e&2){let t=w().$implicit;a(),le("",m(2,2,"labels.inputs.Middle Name")," : ",t.middleName)}}function rxe(e,o){if(e&1&&(l(0,"span"),c(1),p(2,"translate"),b(3,"br"),r()),e&2){let t=w().$implicit;a(),le("",m(2,2,"labels.inputs.Last Name")," : ",t.lastName)}}function lxe(e,o){if(e&1&&(l(0,"span"),c(1),p(2,"translate"),b(3,"br"),r()),e&2){let t=w().$implicit;a(),le("",m(2,2,"labels.inputs.Qualification")," : ",t.qualification)}}function sxe(e,o){if(e&1&&(l(0,"span"),c(1),p(2,"translate"),b(3,"br"),r()),e&2){let t=w().$implicit;a(),le("",m(2,2,"labels.inputs.Mobile Number")," : ",t.mobileNumber)}}function cxe(e,o){if(e&1&&(l(0,"span"),c(1),p(2,"translate"),b(3,"br"),r()),e&2){let t=w().$implicit;a(),le("",m(2,2,"labels.inputs.Age")," : ",t.age)}}function pxe(e,o){if(e&1&&(l(0,"span"),c(1),p(2,"translate"),p(3,"yesNo"),b(4,"br"),r()),e&2){let t=w().$implicit;a(),le("",m(2,2,"labels.inputs.Is Dependent")," : ",m(3,4,t.isDependent))}}function mxe(e,o){if(e&1&&(l(0,"span"),c(1),p(2,"translate"),b(3,"br"),r()),e&2){let t=w().$implicit;a(),le("",m(2,2,"labels.inputs.Marital Status")," : ",t.maritalStatus)}}function dxe(e,o){if(e&1&&(l(0,"span"),c(1),p(2,"translate"),b(3,"br"),r()),e&2){let t=w().$implicit;a(),le("",m(2,2,"labels.inputs.Gender")," : ",t.gender)}}function uxe(e,o){if(e&1&&(l(0,"span"),c(1),p(2,"translate"),b(3,"br"),r()),e&2){let t=w().$implicit;a(),le("",m(2,2,"labels.inputs.Profession")," : ",t.profession)}}function fxe(e,o){if(e&1&&(l(0,"span"),c(1),p(2,"translate"),p(3,"dateFormat"),b(4,"br"),r()),e&2){let t=w().$implicit;a(),le("",m(2,2,"labels.inputs.Date Of Birth")," : ",m(3,4,t.dateOfBirth))}}function hxe(e,o){if(e&1){let t=Y();l(0,"mat-expansion-panel",4)(1,"mat-expansion-panel-header")(2,"mat-panel-title"),c(3),r(),l(4,"mat-panel-description"),c(5),r()(),b(6,"mat-divider",5),l(7,"div",6)(8,"button",7),b(9,"fa-icon",8),r(),l(10,"button",9),R("click",function(){let i=V(t),s=i.$implicit,d=i.$index,u=w();return q(u.deleteFamilyMember(s.clientId,s.id,s.firstName,d))}),b(11,"fa-icon",10),r()(),l(12,"p"),E(13,oxe,4,4,"span"),E(14,axe,4,4,"span"),E(15,rxe,4,4,"span"),E(16,lxe,4,4,"span"),E(17,sxe,4,4,"span"),E(18,cxe,4,4,"span"),E(19,pxe,5,6,"span"),E(20,mxe,4,4,"span"),E(21,dxe,4,4,"span"),E(22,uxe,4,4,"span"),E(23,fxe,5,6,"span"),r()()}if(e&2){let t=o.$implicit,n=w();a(3),v(" ",n.displayName(t)," "),a(2),v(" ",t.relationship," "),a(),g("inset",!0),a(3),g("routerLink",Nt(15,nxe,t.id)),a(4),I(t.firstName?13:-1),a(),I(t.middleName?14:-1),a(),I(t.lastName?15:-1),a(),I(t.qualification?16:-1),a(),I(t.mobileNumber?17:-1),a(),I(t.age?18:-1),a(),I(t.isDependent?19:-1),a(),I(t.maritalStatus?20:-1),a(),I(t.gender?21:-1),a(),I(t.profession?22:-1),a(),I(t.dateOfBirth?23:-1)}}var HC=(()=>{class e{constructor(){this.route=T(Ie),this.clientsService=T(Oi),this.dialog=T(Ht),this.route.data.subscribe(t=>{this.clientFamilyMembers=t.clientFamilyMembers})}deleteFamilyMember(t,n,i,s){this.dialog.open(vi,{data:{deleteContext:`Family member id:${n} name : ${i} ${s}`}}).afterClosed().subscribe(u=>{u.delete&&this.clientsService.deleteFamilyMember(t,n).subscribe(()=>{this.clientFamilyMembers.splice(s,1)})})}displayName(t){let n=t.firstName;return t.middleName&&(n=n+" "+t.middleName),t.lastName&&(n=n+" "+t.lastName),n}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275cmp=me({type:e,selectors:[["mifosx-family-members-tab"]],decls:13,vars:8,consts:[[1,"tab-container","mat-typography"],[1,"layout-row","align-flex-end"],["mat-raised-button","","color","primary",3,"routerLink"],["icon","plus",1,"m-r-10"],[1,"family-member"],[3,"inset"],[1,"family-member-actions","layout-row","align-end"],["mat-button","","color","primary"],["icon","edit",3,"routerLink"],["mat-button","","color","warn",3,"click"],["icon","trash"]],template:function(n,i){n&1&&(l(0,"div",0)(1,"router-outlet")(2,"h3"),c(3),p(4,"translate"),r(),l(5,"div",1)(6,"button",2),b(7,"fa-icon",3),c(8),p(9,"translate"),r()(),l(10,"mat-accordion"),Se(11,hxe,24,17,"mat-expansion-panel",4,Pe),r()()()),n&2&&(a(3),h(m(4,3,"labels.heading.Family Members")),a(3),g("routerLink",oe(7,ixe)),a(2),v("",m(9,5,"labels.buttons.Add")," "),a(3),we(i.clientFamilyMembers))},dependencies:[ue,fe,Ae,ve,ra,ke,Er,Tr,Mr,Dr,oc,Ri,Pi,he,po],styles:[".tab-container[_ngcontent-%COMP%]{padding:1%;margin:1%}.tab-container[_ngcontent-%COMP%] .family-member[_ngcontent-%COMP%] .family-member-actions[_ngcontent-%COMP%]{margin-top:1%}.tab-container[_ngcontent-%COMP%] .family-member[_ngcontent-%COMP%] .family-member-actions[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{margin-right:1%}.tab-container[_ngcontent-%COMP%] .family-member[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{margin:1% auto}.tab-container[_ngcontent-%COMP%] .family-member[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{line-height:30px;margin-left:2%}"]})}}return e})();var gxe=()=>["../"];function _xe(e,o){e&1&&(l(0,"mat-error"),c(1),p(2,"translate"),p(3,"translate"),l(4,"strong"),c(5),p(6,"translate"),r()()),e&2&&(a(),le(" ",m(2,3,"labels.inputs.First Name")," ",m(3,5,"labels.commons.is")," "),a(4),h(m(6,7,"labels.commons.required")))}function Cxe(e,o){e&1&&(l(0,"mat-error"),c(1),p(2,"translate"),p(3,"translate"),l(4,"strong"),c(5),p(6,"translate"),r()()),e&2&&(a(),le(" ",m(2,3,"labels.inputs.Last Name")," ",m(3,5,"labels.commons.is")," "),a(4),h(m(6,7,"labels.commons.required")))}function vxe(e,o){if(e&1&&(l(0,"mat-option",12),c(1),p(2,"translateKey"),r()),e&2){let t=o.$implicit;g("value",t.id),a(),v(" ",Ot(2,2,t.name,"catalogs")," ")}}function xxe(e,o){e&1&&(l(0,"mat-error"),c(1),p(2,"translate"),p(3,"translate"),l(4,"strong"),c(5),p(6,"translate"),r()()),e&2&&(a(),le(" ",m(2,3,"labels.inputs.Relationship")," ",m(3,5,"labels.commons.is")," "),a(4),h(m(6,7,"labels.commons.required")))}function bxe(e,o){if(e&1&&(l(0,"mat-option",12),c(1),p(2,"translateKey"),r()),e&2){let t=o.$implicit;g("value",t.id),a(),v(" ",Ot(2,2,t.name,"catalogs")," ")}}function yxe(e,o){e&1&&(l(0,"mat-error"),c(1),p(2,"translate"),p(3,"translate"),l(4,"strong"),c(5),p(6,"translate"),r()()),e&2&&(a(),le(" ",m(2,3,"labels.inputs.Gender")," ",m(3,5,"labels.commons.is")," "),a(4),h(m(6,7,"labels.commons.required")))}function Sxe(e,o){if(e&1&&(l(0,"mat-option",12),c(1),p(2,"translateKey"),r()),e&2){let t=o.$implicit;g("value",t.id),a(),v(" ",Ot(2,2,t.name,"catalogs")," ")}}function wxe(e,o){if(e&1&&(l(0,"mat-option",12),c(1),p(2,"translateKey"),r()),e&2){let t=o.$implicit;g("value",t.id),a(),v(" ",Ot(2,2,t.name,"catalogs")," ")}}var GC=(()=>{class e{constructor(){this.formBuilder=T(nt),this.dateUtils=T(Zt),this.router=T(qe),this.route=T(Ie),this.clientsService=T(Oi),this.settingsService=T(At),this.maxDate=new Date,this.minAge=0,this.route.data.subscribe(t=>{this.addFamilyMemberTemplate=t.clientTemplate.familyMemberOptions}),this.clientId=this.route.parent.parent.snapshot.params.clientId}ngOnInit(){this.maxDate=this.settingsService.businessDate,this.createAddFamilyMemberForm(),this.addFamilyMemberForm.get("dateOfBirth").valueChanges.subscribe(t=>{if(t){let n=this.calculateAge(t);this.addFamilyMemberForm.get("age").setValue(n)}else this.addFamilyMemberForm.get("age").setValue("")})}calculateAge(t){let n=new Date(this.settingsService.businessDate),i=new Date(t),s=n.getFullYear()-i.getFullYear(),d=n.getMonth()-i.getMonth();return(d<0||d===0&&n.getDate(){this.router.navigate(["../"],{relativeTo:this.route})})}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275cmp=me({type:e,selectors:[["mifosx-add-family-member"]],decls:78,vars:51,consts:[["dueDatePicker",""],[1,"add-family-member-container"],[3,"ngSubmit","formGroup"],[1,"layout-row-wrap","responsive-column","align-start-center"],[1,"flex-50-minus-25px"],["formControlName","firstName","required","","matInput","","aria-label","First Name","placeholder","First Name","title","First Name"],["formControlName","middleName","matInput","","aria-label","Middle Name","placeholder","Middle Name","title","Middle Name"],["formControlName","lastName","required","","matInput","","aria-label","Last Name","placeholder","Last Name","title","Last Name"],["formControlName","qualification","matInput","","aria-label","Qualification","placeholder","Qualification","title","Qualification"],["type","number","formControlName","age","matInput","","disabled","","aria-label","Age","placeholder","Age","title","Age",3,"min"],["formControlName","isDependent","labelPosition","before",1,"flex-50-minus-25px"],["formControlName","relationshipId","required",""],[3,"value"],["formControlName","genderId","required",""],["formControlName","professionId"],["formControlName","maritalStatusId"],[1,"flex-fill",3,"click"],["formControlName","dateOfBirth","matInput","","placeholder","Optional","aria-label","Date Of Birth","title","Date Of Birth",3,"max","matDatepicker"],["matSuffix","",3,"for"],[1,"layout-row","gap-32px","layout-align-center"],["type","button","mat-raised-button","",3,"routerLink"],["type","submit","mat-raised-button","","color","primary",3,"disabled"]],template:function(n,i){if(n&1){let s=Y();l(0,"div",1)(1,"form",2),R("ngSubmit",function(){return V(s),q(i.submit())}),l(2,"div",3)(3,"mat-form-field",4)(4,"mat-label"),c(5),p(6,"translate"),r(),b(7,"input",5),E(8,_xe,7,9,"mat-error"),r(),l(9,"mat-form-field",4)(10,"mat-label"),c(11),p(12,"translate"),r(),b(13,"input",6),r(),l(14,"mat-form-field",4)(15,"mat-label"),c(16),p(17,"translate"),r(),b(18,"input",7),E(19,Cxe,7,9,"mat-error"),r(),l(20,"mat-form-field",4)(21,"mat-label"),c(22),p(23,"translate"),r(),b(24,"input",8),r(),l(25,"mat-form-field",4)(26,"mat-label"),c(27),p(28,"translate"),r(),b(29,"input",9),r(),l(30,"mat-checkbox",10),c(31),p(32,"translate"),r(),l(33,"mat-form-field",4)(34,"mat-label"),c(35),p(36,"translate"),r(),l(37,"mat-select",11),Se(38,vxe,3,5,"mat-option",12,Pe),r(),E(40,xxe,7,9,"mat-error"),r(),l(41,"mat-form-field",4)(42,"mat-label"),c(43),p(44,"translate"),r(),l(45,"mat-select",13),Se(46,bxe,3,5,"mat-option",12,Pe),r(),E(48,yxe,7,9,"mat-error"),r(),l(49,"mat-form-field",4)(50,"mat-label"),c(51),p(52,"translate"),r(),l(53,"mat-select",14),Se(54,Sxe,3,5,"mat-option",12,Pe),r()(),l(56,"mat-form-field",4)(57,"mat-label"),c(58),p(59,"translate"),r(),l(60,"mat-select",15),Se(61,wxe,3,5,"mat-option",12,Pe),r()(),l(63,"mat-form-field",16),R("click",function(){V(s);let u=xe(70);return q(u.open())}),l(64,"mat-label"),c(65),p(66,"translate"),r(),b(67,"input",17)(68,"mat-datepicker-toggle",18)(69,"mat-datepicker",null,0),r()(),l(71,"div",19)(72,"button",20),c(73),p(74,"translate"),r(),l(75,"button",21),c(76),p(77,"translate"),r()()()()}if(n&2){let s=xe(70);a(),g("formGroup",i.addFamilyMemberForm),a(4),h(m(6,24,"labels.inputs.First Name")),a(3),I(i.addFamilyMemberForm.controls.firstName.hasError("required")?8:-1),a(3),h(m(12,26,"labels.inputs.Middle Name")),a(5),h(m(17,28,"labels.inputs.Last Name")),a(3),I(i.addFamilyMemberForm.controls.lastName.hasError("required")?19:-1),a(3),h(m(23,30,"labels.inputs.Qualification")),a(5),h(m(28,32,"labels.inputs.Age")),a(2),g("min",i.minAge),a(2),v(" ",m(32,34,"labels.inputs.Is Dependent"),"? "),a(4),h(m(36,36,"labels.inputs.Relationship")),a(3),we(i.addFamilyMemberTemplate.relationshipIdOptions),a(2),I(i.addFamilyMemberForm.controls.relationshipId.hasError("required")?40:-1),a(3),h(m(44,38,"labels.inputs.Gender")),a(3),we(i.addFamilyMemberTemplate.genderIdOptions),a(2),I(i.addFamilyMemberForm.controls.genderId.hasError("required")?48:-1),a(3),h(m(52,40,"labels.inputs.Profession")),a(3),we(i.addFamilyMemberTemplate.professionIdOptions),a(4),h(m(59,42,"labels.inputs.Marital Status")),a(3),we(i.addFamilyMemberTemplate.maritalStatusIdOptions),a(4),h(m(66,44,"labels.inputs.Date Of Birth")),a(2),g("max",i.maxDate)("matDatepicker",s),a(),g("for",s),a(4),g("routerLink",oe(50,gxe)),a(),h(m(74,46,"labels.buttons.Cancel")),a(2),g("disabled",!i.addFamilyMemberForm.valid),a(),v(" ",m(77,48,"labels.buttons.Submit")," ")}},dependencies:[ue,fe,tt,st,tn,Ue,Xe,dt,Da,Ze,et,Ae,Fe,Be,ut,ai,ze,gt,ft,mi,di,pi,ve,fi,he,Fi],styles:[".add-family-member-container[_ngcontent-%COMP%]{width:70%;margin:0 auto;padding:5%}@media screen and (width >= 960px){.add-family-member-container[_ngcontent-%COMP%] .layout-row-wrap[_ngcontent-%COMP%] > .flex-fill[_ngcontent-%COMP%]:nth-child(odd), .add-family-member-container[_ngcontent-%COMP%] .layout-row-wrap[_ngcontent-%COMP%] > .flex-50-minus-25px[_ngcontent-%COMP%]:nth-child(odd){margin-right:25px}.add-family-member-container[_ngcontent-%COMP%] .layout-row-wrap[_ngcontent-%COMP%] > .flex-fill[_ngcontent-%COMP%]:last-child, .add-family-member-container[_ngcontent-%COMP%] .layout-row-wrap[_ngcontent-%COMP%] > .flex-50-minus-25px[_ngcontent-%COMP%]:last-child{margin-right:0}}.mat-form-field-hint[_ngcontent-%COMP%]{font-size:75%;color:#0009;margin-top:4px;margin-bottom:8px}"]})}}return e})();var Pxe=()=>["../../"];function Txe(e,o){e&1&&(l(0,"mat-error"),c(1),p(2,"translate"),p(3,"translate"),l(4,"strong"),c(5),p(6,"translate"),r()()),e&2&&(a(),le(" ",m(2,3,"labels.inputs.First Name")," ",m(3,5,"labels.commons.is")," "),a(4),h(m(6,7,"labels.commons.required")))}function Mxe(e,o){e&1&&(l(0,"mat-error"),c(1),p(2,"translate"),p(3,"translate"),l(4,"strong"),c(5),p(6,"translate"),r()()),e&2&&(a(),le(" ",m(2,3,"labels.inputs.Last Name")," ",m(3,5,"labels.commons.is")," "),a(4),h(m(6,7,"labels.commons.required")))}function Dxe(e,o){if(e&1&&(l(0,"mat-option",12),c(1),p(2,"translateKey"),r()),e&2){let t=o.$implicit;g("value",t.id),a(),v(" ",Ot(2,2,t.name,"catalogs")," ")}}function Exe(e,o){e&1&&(l(0,"mat-error"),c(1),p(2,"translate"),p(3,"translate"),l(4,"strong"),c(5),p(6,"translate"),r()()),e&2&&(a(),le(" ",m(2,3,"labels.inputs.Relationship")," ",m(3,5,"labels.commons.is")," "),a(4),h(m(6,7,"labels.commons.required")))}function Ixe(e,o){if(e&1&&(l(0,"mat-option",12),c(1),p(2,"translateKey"),r()),e&2){let t=o.$implicit;g("value",t.id),a(),v(" ",Ot(2,2,t.name,"catalogs")," ")}}function Oxe(e,o){e&1&&(l(0,"mat-error"),c(1),p(2,"translate"),p(3,"translate"),l(4,"strong"),c(5),p(6,"translate"),r()()),e&2&&(a(),le(" ",m(2,3,"labels.inputs.Gender")," ",m(3,5,"labels.commons.is")," "),a(4),h(m(6,7,"labels.commons.required")))}function Axe(e,o){if(e&1&&(l(0,"mat-option",12),c(1),p(2,"translateKey"),r()),e&2){let t=o.$implicit;g("value",t.id),a(),v(" ",Ot(2,2,t.name,"catalogs")," ")}}function Fxe(e,o){if(e&1&&(l(0,"mat-option",12),c(1),p(2,"translateKey"),r()),e&2){let t=o.$implicit;g("value",t.id),a(),v(" ",Ot(2,2,t.name,"catalogs")," ")}}var jC=(()=>{class e{constructor(){this.formBuilder=T(nt),this.dateUtils=T(Zt),this.router=T(qe),this.route=T(Ie),this.clientsService=T(Oi),this.settingsService=T(At),this.maxDate=new Date,this.route.data.subscribe(t=>{this.addFamilyMemberTemplate=t.clientTemplate.familyMemberOptions,this.familyMemberDetails=t.editFamilyMember})}ngOnInit(){this.maxDate=this.settingsService.businessDate,this.createEditFamilyMemberForm(this.familyMemberDetails),this.editFamilyMemberForm.get("dateOfBirth").valueChanges.subscribe(t=>{if(t){let n=this.calculateAge(t);this.editFamilyMemberForm.get("age").setValue(n)}else this.editFamilyMemberForm.get("age").setValue("")})}calculateAge(t){let n=new Date(this.settingsService.businessDate),i=new Date(t),s=n.getFullYear()-i.getFullYear(),d=n.getMonth()-i.getMonth();return(d<0||d===0&&n.getDate(){this.router.navigate(["../../"],{relativeTo:this.route})})}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275cmp=me({type:e,selectors:[["mifosx-edit-family-member"]],decls:78,vars:50,consts:[["dueDatePicker",""],[1,"add-family-member-container"],[3,"ngSubmit","formGroup"],[1,"layout-row-wrap","responsive-column","align-start-center"],[1,"flex-50-minus-25px"],["formControlName","firstName","required","","matInput",""],["formControlName","middleName","matInput",""],["formControlName","lastName","required","","matInput",""],["formControlName","qualification","matInput",""],["type","number","formControlName","age","matInput","","disabled",""],["formControlName","isDependent","labelPosition","before",1,"flex-50-minus-25px"],["formControlName","relationshipId","required",""],[3,"value"],["formControlName","genderId","required",""],["formControlName","professionId"],["formControlName","maritalStatusId"],[1,"flex-fill",3,"click"],["formControlName","dateOfBirth","matInput","","placeholder","Optional",3,"max","matDatepicker"],["matSuffix","",3,"for"],[1,"layout-row","gap-32px","layout-align-center"],["type","button","mat-raised-button","",3,"routerLink"],["type","submit","mat-raised-button","","color","primary",3,"disabled"]],template:function(n,i){if(n&1){let s=Y();l(0,"div",1)(1,"form",2),R("ngSubmit",function(){return V(s),q(i.submit())}),l(2,"div",3)(3,"mat-form-field",4)(4,"mat-label"),c(5),p(6,"translate"),r(),b(7,"input",5),E(8,Txe,7,9,"mat-error"),r(),l(9,"mat-form-field",4)(10,"mat-label"),c(11),p(12,"translate"),r(),b(13,"input",6),r(),l(14,"mat-form-field",4)(15,"mat-label"),c(16),p(17,"translate"),r(),b(18,"input",7),E(19,Mxe,7,9,"mat-error"),r(),l(20,"mat-form-field",4)(21,"mat-label"),c(22),p(23,"translate"),r(),b(24,"input",8),r(),l(25,"mat-form-field",4)(26,"mat-label"),c(27),p(28,"translate"),r(),b(29,"input",9),r(),l(30,"mat-checkbox",10),c(31),p(32,"translate"),r(),l(33,"mat-form-field",4)(34,"mat-label"),c(35),p(36,"translate"),r(),l(37,"mat-select",11),Se(38,Dxe,3,5,"mat-option",12,Pe),r(),E(40,Exe,7,9,"mat-error"),r(),l(41,"mat-form-field",4)(42,"mat-label"),c(43),p(44,"translate"),r(),l(45,"mat-select",13),Se(46,Ixe,3,5,"mat-option",12,Pe),r(),E(48,Oxe,7,9,"mat-error"),r(),l(49,"mat-form-field",4)(50,"mat-label"),c(51),p(52,"translate"),r(),l(53,"mat-select",14),Se(54,Axe,3,5,"mat-option",12,Pe),r()(),l(56,"mat-form-field",4)(57,"mat-label"),c(58),p(59,"translate"),r(),l(60,"mat-select",15),Se(61,Fxe,3,5,"mat-option",12,Pe),r()(),l(63,"mat-form-field",16),R("click",function(){V(s);let u=xe(70);return q(u.open())}),l(64,"mat-label"),c(65),p(66,"translate"),r(),b(67,"input",17)(68,"mat-datepicker-toggle",18)(69,"mat-datepicker",null,0),r()(),l(71,"div",19)(72,"button",20),c(73),p(74,"translate"),r(),l(75,"button",21),c(76),p(77,"translate"),r()()()()}if(n&2){let s=xe(70);a(),g("formGroup",i.editFamilyMemberForm),a(4),h(m(6,23,"labels.inputs.First Name")),a(3),I(i.editFamilyMemberForm.controls.firstName.hasError("required")?8:-1),a(3),h(m(12,25,"labels.inputs.Middle Name")),a(5),h(m(17,27,"labels.inputs.Last Name")),a(3),I(i.editFamilyMemberForm.controls.lastName.hasError("required")?19:-1),a(3),h(m(23,29,"labels.inputs.Qualification")),a(5),h(m(28,31,"labels.inputs.Age")),a(4),v(" ",m(32,33,"labels.inputs.Is Dependent")," "),a(4),h(m(36,35,"labels.inputs.Relationship")),a(3),we(i.addFamilyMemberTemplate.relationshipIdOptions),a(2),I(i.editFamilyMemberForm.controls.relationshipId.hasError("required")?40:-1),a(3),h(m(44,37,"labels.inputs.Gender")),a(3),we(i.addFamilyMemberTemplate.genderIdOptions),a(2),I(i.editFamilyMemberForm.controls.genderId.hasError("required")?48:-1),a(3),h(m(52,39,"labels.inputs.Profession")),a(3),we(i.addFamilyMemberTemplate.professionIdOptions),a(4),h(m(59,41,"labels.inputs.Marital Status")),a(3),we(i.addFamilyMemberTemplate.maritalStatusIdOptions),a(4),h(m(66,43,"labels.inputs.Date Of Birth")),a(2),g("max",i.maxDate)("matDatepicker",s),a(),g("for",s),a(4),g("routerLink",oe(49,Pxe)),a(),v(" ",m(74,45,"labels.buttons.Cancel")," "),a(2),g("disabled",i.editFamilyMemberForm.pristine||!i.editFamilyMemberForm.valid),a(),v(" ",m(77,47,"labels.buttons.Submit")," ")}},dependencies:[ue,fe,tt,st,tn,Ue,Xe,dt,Ze,et,Ae,Fe,Be,ut,ai,ze,gt,ft,mi,di,pi,ve,fi,he,Fi],styles:[".add-family-member-container[_ngcontent-%COMP%]{width:70%;margin:0 auto;padding:5%}@media screen and (width >= 960px){.add-family-member-container[_ngcontent-%COMP%] .flex-50-minus-25px[_ngcontent-%COMP%]:nth-child(odd){margin-right:25px}.add-family-member-container[_ngcontent-%COMP%] .flex-50-minus-25px[_ngcontent-%COMP%]:last-child{margin-right:0}}.mat-form-field-hint[_ngcontent-%COMP%]{font-size:75%;color:#0009;margin-top:4px;margin-bottom:8px}"]})}}return e})();var kxe=["identifiersTable"],Bxe=["identityLightbox"],Rxe=()=>({"margin-top":"3%"});function Nxe(e,o){if(e&1){let t=Y();l(0,"button",18),R("click",function(){V(t);let i=w();return q(i.addIdentifier())}),b(1,"fa-icon",19),c(2),p(3,"translate"),r()}e&2&&(a(2),v(" ",m(3,1,"labels.buttons.Add")," "))}function Lxe(e,o){e&1&&(l(0,"th",20),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.Id")))}function Vxe(e,o){if(e&1&&(l(0,"td",21),c(1),r()),e&2){let t=o.$implicit;a(),h(t.id)}}function qxe(e,o){e&1&&(l(0,"th",20),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.Type")))}function zxe(e,o){if(e&1&&(l(0,"td",21),c(1),r()),e&2){let t=o.$implicit;a(),h(t.documentType.name)}}function Hxe(e,o){e&1&&(l(0,"th",20),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.Document Key")))}function Gxe(e,o){if(e&1&&(l(0,"td",21),c(1),r()),e&2){let t=o.$implicit;a(),h(t.documentKey)}}function jxe(e,o){e&1&&(l(0,"th",20),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.Description")))}function $xe(e,o){if(e&1&&(l(0,"td",21),c(1),r()),e&2){let t=o.$implicit;a(),h(t.description)}}function Uxe(e,o){e&1&&(l(0,"th",20),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.Identity Documents")))}function Wxe(e,o){if(e&1&&b(0,"img",26),e&2){let t=w().$implicit,n=w(3);g("src",n.previewThumbnails[t.id],f0)("alt",t.name)("title",t.name)}}function Qxe(e,o){if(e&1&&(l(0,"div",27),b(1,"fa-icon",32),l(2,"span"),c(3),r()()),e&2){let t=w().$implicit;a(3),h(t.fileName||t.name)}}function Yxe(e,o){e&1&&(l(0,"div",28),b(1,"fa-icon",33),r())}function Jxe(e,o){if(e&1&&(l(0,"div",31),c(1),r()),e&2){let t=w().$implicit;a(),h(t.fileName)}}function Kxe(e,o){if(e&1){let t=Y();l(0,"div",24)(1,"div",25),p(2,"translate"),R("keydown.enter",function(){let i=V(t).$implicit,s=w(2).$implicit,d=w();return q(d.isPreviewable(i)&&d.openDocumentPreview(s,i))})("keydown.space",function(){let i=V(t).$implicit,s=w(2).$implicit,d=w();return q(d.isPreviewable(i)&&d.openDocumentPreview(s,i))})("click",function(){let i=V(t).$implicit,s=w(2).$implicit,d=w();return q(d.isPreviewable(i)&&d.openDocumentPreview(s,i))}),E(3,Wxe,1,3,"img",26)(4,Qxe,4,1,"div",27),E(5,Yxe,2,0,"div",28),r(),l(6,"div",29)(7,"div",30),c(8),r(),E(9,Jxe,2,1,"div",31),r()()}if(e&2){let t=o.$implicit,n=w(3);a(),Cl("clickable",n.isPreviewable(t)),Dn("aria-label",m(2,7,"labels.buttons.Preview")+": "+t.name),a(2),I(n.previewThumbnails[t.id]?3:4),a(2),I(n.isPreviewable(t)?5:-1),a(3),h(t.name),a(),I(t.fileName?9:-1)}}function Xxe(e,o){if(e&1&&(l(0,"div",22),Se(1,Kxe,10,9,"div",24,dd().trackByDocumentId,!0),r()),e&2){let t=w().$implicit;a(),we(t.documents)}}function Zxe(e,o){e&1&&(l(0,"span",23),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.text.NoDocuments")))}function ebe(e,o){if(e&1&&(l(0,"td",21),E(1,Xxe,3,0,"div",22)(2,Zxe,3,3,"span",23),r()),e&2){let t=o.$implicit;a(),I(t.documents!=null&&t.documents.length?1:2)}}function tbe(e,o){e&1&&(l(0,"th",20),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.Status")))}function ibe(e,o){if(e&1&&(l(0,"td",21),c(1),r()),e&2){let t=o.$implicit;a(),v(" ",t.status==="clientIdentifierStatusType.active"?"active":"inactive"," ")}}function nbe(e,o){e&1&&(l(0,"th",20),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.Actions")))}function obe(e,o){if(e&1){let t=Y();l(0,"button",35),p(1,"translate"),p(2,"translate"),R("click",function(){V(t);let i=w(),s=i.$implicit,d=i.index,u=w();return q(u.deleteIdentifier(s.clientId,s.id,d))}),b(3,"fa-icon",36),r()}e&2&&(g("title",m(1,2,"labels.buttons.Delete")),Dn("aria-label",m(2,4,"labels.buttons.Delete")))}function abe(e,o){e&1&&(l(0,"td",21),F(1,obe,4,6,"button",34),r()),e&2&&(a(),g("mifosxHasPermission","DELETE_CLIENTIDENTIFIER"))}function rbe(e,o){e&1&&b(0,"tr",37)}function lbe(e,o){e&1&&b(0,"tr",38)}var $C=(()=>{class e{constructor(){this.route=T(Ie),this.dialog=T(Ht),this.clientService=T(Oi),this.translateService=T(yi),this.documentPreviewService=T(Ok),this.destroyRef=T(mF),this.identitiesColumns=["id","description","type","documentKey","documents","status","actions"],this.previewThumbnails={},this.lightboxInstance=null,this.lightboxPlugins=[Ik,Ek,Dk],this.clientId=this.route.parent.snapshot.paramMap.get("clientId"),this.route.data.pipe(Rk(this.destroyRef)).subscribe(t=>{this.clientIdentities=t.clientIdentities,this.clientIdentifierTemplate=t.clientIdentifierTemplate,this.prefetchThumbnails()})}ngOnDestroy(){this.destroyLightbox(),Array.isArray(this.clientIdentities)&&this.clientIdentities.forEach(t=>{t.documents?.forEach(n=>this.documentPreviewService.release(n.id))})}trackByDocumentId(t,n){return n?.id}addIdentifier(){let t=this.clientIdentifierTemplate.allowedDocumentTypes.map(s=>qt(at({},s),{name:this.translateService.instant(`labels.catalogs.${s.name}`)})),n=[{label:this.translateService.instant("labels.catalogs.Active"),value:"Active"},{label:this.translateService.instant("labels.catalogs.Inactive"),value:"Inactive"}];this.dialog.open(Ug,{data:{documentIdentifier:!0,allowedDocumentTypes:t,statusOptions:n}}).afterClosed().subscribe(s=>{if(s){let d={documentTypeId:s.documentTypeId,status:s.status,documentKey:s.documentKey,description:s.description};this.clientService.addClientIdentifier(this.clientId,d).subscribe({next:u=>{let f=u.resourceId,_=this.clientIdentifierTemplate.allowedDocumentTypes.find(x=>x.id===s.documentTypeId),C={id:f,description:s.description,documentType:_,documentKey:s.documentKey,documents:[],clientId:this.clientId,status:s.status==="Active"?"clientIdentifierStatusType.active":"clientIdentifierStatusType.inactive"};if(s.file){let x=new FormData;x.append("name",s.fileName),x.append("file",s.file),this.clientService.uploadClientIdentifierDocument(f,x).subscribe({next:y=>{let P={id:y.resourceId,parentEntityType:"client_identifiers",parentEntityId:f,name:s.fileName,fileName:s.file.name};C.documents.push(P),this.clientIdentities.push(C),this.identifiersTable.renderRows(),this.setThumbnail(P)},error:y=>{console.error("Failed to upload document",y),this.clientIdentities.push(C),this.identifiersTable.renderRows()}})}else this.clientIdentities.push(C),this.identifiersTable.renderRows()},error:u=>{console.error("Failed to create identifier",u)}})}})}deleteIdentifier(t,n,i){this.dialog.open(vi,{data:{deleteContext:`${this.translateService.instant("labels.heading.identifier id")} : ${n}`}}).afterClosed().subscribe(d=>{d.delete&&this.clientService.deleteClientIdentifier(t,n).subscribe(u=>{this.clientIdentities.splice(i,1),this.identifiersTable.renderRows()})})}isPreviewable(t){return this.documentPreviewService.isPreviewable(t)}openDocumentPreview(t,n){return qn(this,null,function*(){if(this.isPreviewable(n))try{let i=(t.documents||[]).filter(u=>this.isPreviewable(u)),s=[];for(let u of i)try{let f=yield this.documentPreviewService.resolvePreviewUrl(u,()=>this.clientService.downloadClientIdentificationDocument(u.parentEntityId||t.id,u.id));f.type==="image"&&(this.previewThumbnails[u.id]=f.url),s.push({src:f.url,thumb:f.type==="image"?f.url:void 0,subHtml:this.buildSubHtml(u,t),iframe:f.type==="pdf"})}catch(f){console.error("Preview failed for document",u.id,f)}if(!s.length)return;let d=Math.max(0,i.findIndex(u=>u.id===n.id));this.destroyLightbox(),this.lightboxInstance=Mk(this.identityLightbox.nativeElement,{dynamic:!0,dynamicEl:s,plugins:this.lightboxPlugins,licenseKey:"0000-0000-000-0000",download:!1,escKey:!0,closable:!0,zoomFromOrigin:!0}),this.lightboxInstance.openGallery(d)}catch(i){console.error("Unable to open preview",i)}})}buildSubHtml(t,n){let i=t.description?`

${this.escapeHtml(t.description)}

`:"",s=n?.documentKey?`

${this.escapeHtml(n.documentKey)}

`:"";return`

${this.escapeHtml(t.name||"Document")}

${i}${s}
`}escapeHtml(t){return t?t.replace(/&/g,"&").replace(//g,">").replace(/"/g,"""):""}destroyLightbox(){this.lightboxInstance&&(this.lightboxInstance.destroy(),this.lightboxInstance=null)}setThumbnail(t){this.documentPreviewService.isPreviewable(t)&&this.documentPreviewService.resolvePreviewUrl(t,()=>this.clientService.downloadClientIdentificationDocument(t.parentEntityId||this.clientId,t.id)).then(n=>{n.type==="image"&&(this.previewThumbnails[t.id]=n.url)}).catch(()=>{})}prefetchThumbnails(){Array.isArray(this.clientIdentities)&&this.clientIdentities.forEach(t=>{t.documents?.forEach(n=>this.setThumbnail(n))})}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275cmp=me({type:e,selectors:[["mifosx-identities-tab"]],viewQuery:function(n,i){if(n&1&&(Ee(kxe,7),Ee(Bxe,7)),n&2){let s;Te(s=Me())&&(i.identifiersTable=s.first),Te(s=Me())&&(i.identityLightbox=s.first)}},decls:33,vars:9,consts:[["identifiersTable",""],["identityLightbox",""],[1,"tab-container","mat-typography"],[1,"layout-row","align-flex-end"],["mat-raised-button","","color","primary",3,"click",4,"mifosxHasPermission"],["mat-table","",3,"dataSource","ngStyle"],["matColumnDef","id"],["mat-header-cell","",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","type"],["matColumnDef","documentKey"],["matColumnDef","description"],["matColumnDef","documents"],["matColumnDef","status"],["matColumnDef","actions"],["mat-header-row","",4,"matHeaderRowDef"],["mat-row","",4,"matRowDef","matRowDefColumns"],[1,"document-lightbox-host"],["mat-raised-button","","color","primary",3,"click"],["icon","plus",1,"m-r-10"],["mat-header-cell",""],["mat-cell",""],[1,"document-grid"],[1,"muted"],[1,"document-card"],["role","button","tabindex","0",1,"thumb",3,"keydown.enter","keydown.space","click"],["loading","lazy",3,"src","alt","title"],[1,"placeholder"],[1,"preview-overlay"],[1,"card-body"],[1,"title"],[1,"meta"],["icon","file"],["icon","eye"],["class","identity-action-button","mat-raised-button","","color","warn",3,"title","click",4,"mifosxHasPermission"],["mat-raised-button","","color","warn",1,"identity-action-button",3,"click","title"],["icon","times"],["mat-header-row",""],["mat-row",""]],template:function(n,i){n&1&&(l(0,"div",2)(1,"h3"),c(2),p(3,"translate"),r(),l(4,"div",3),F(5,Nxe,4,3,"button",4),r(),l(6,"table",5,0),X(8,6),F(9,Lxe,3,3,"th",7)(10,Vxe,2,1,"td",8),Z(),X(11,9),F(12,qxe,3,3,"th",7)(13,zxe,2,1,"td",8),Z(),X(14,10),F(15,Hxe,3,3,"th",7)(16,Gxe,2,1,"td",8),Z(),X(17,11),F(18,jxe,3,3,"th",7)(19,$xe,2,1,"td",8),Z(),X(20,12),F(21,Uxe,3,3,"th",7)(22,ebe,3,1,"td",8),Z(),X(23,13),F(24,tbe,3,3,"th",7)(25,ibe,2,1,"td",8),Z(),X(26,14),F(27,nbe,3,3,"th",7)(28,abe,2,1,"td",8),Z(),F(29,rbe,1,0,"tr",15)(30,lbe,1,0,"tr",16),r()(),b(31,"div",17,1)),n&2&&(a(2),h(m(3,6,"labels.heading.Identities")),a(3),g("mifosxHasPermission","CREATE_CLIENTIDENTIFIER"),a(),g("dataSource",i.clientIdentities)("ngStyle",oe(8,Rxe)),a(23),g("matHeaderRowDef",i.identitiesColumns),a(),g("matRowDefColumns",i.identitiesColumns))},dependencies:[ue,ns,fe,ve,Ke,ke,_t,xt,vt,bt,Ct,yt,St,Pt,wt,Tt,he],styles:[".column-mandatory[_ngcontent-%COMP%]{color:#5cb85c;text-align:center}.not-column-mandatory[_ngcontent-%COMP%]{color:#666f73;text-align:center}.cdk-drag-placeholder[_ngcontent-%COMP%]{background:#3498db}.yes[_ngcontent-%COMP%]{color:#5cb85c!important;background-color:#5cb85c;height:4px;cursor:none}.no[_ngcontent-%COMP%]{color:red;background-color:red;height:4px;cursor:none}.strike[_ngcontent-%COMP%]{text-decoration:line-through;color:red}.transfer[_ngcontent-%COMP%]{color:#16a085}.linked[_ngcontent-%COMP%]{color:#4461e2}.accrual[_ngcontent-%COMP%]{color:#999}.fa-question[_ngcontent-%COMP%]{color:#4461e2}.enabled[_ngcontent-%COMP%]{color:#32cd32}.disabled[_ngcontent-%COMP%]{color:#f44366}.tab-container[_ngcontent-%COMP%]{padding:1rem;margin:1rem 0}.tab-container[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{margin:0}.tab-container[_ngcontent-%COMP%] table[_ngcontent-%COMP%]{width:100%}.tab-container[_ngcontent-%COMP%] table[_ngcontent-%COMP%] .identity-action-button[_ngcontent-%COMP%]{min-width:26px;padding:0 6px;margin:4px;line-height:25px}.document-grid[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;gap:.75rem}.document-card[_ngcontent-%COMP%]{width:200px;background:#fff;border:1px solid #bdc3c7;border-radius:4px;overflow:hidden;box-shadow:0 1px 4px #353b3b1f;display:flex;flex-direction:column}.document-card[_ngcontent-%COMP%]:hover{box-shadow:0 4px 12px #353b3b24}.thumb[_ngcontent-%COMP%]{position:relative;background:#ecf0f1;min-height:7.5rem;display:flex;align-items:center;justify-content:center;cursor:default}.thumb.clickable[_ngcontent-%COMP%]{cursor:pointer}.thumb[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{width:100%;height:100%;object-fit:cover}.preview-overlay[_ngcontent-%COMP%]{position:absolute;bottom:.5rem;right:.5rem;background:#ffffffe6;border-radius:50%;padding:.4rem;color:#3498db;display:flex;align-items:center;justify-content:center;opacity:0;transition:opacity .2s ease}.thumb[_ngcontent-%COMP%]:hover .preview-overlay[_ngcontent-%COMP%], .thumb[_ngcontent-%COMP%]:focus .preview-overlay[_ngcontent-%COMP%]{opacity:1}.placeholder[_ngcontent-%COMP%]{color:#f5f5f5;text-align:center;padding:.75rem;display:flex;flex-direction:column;gap:.4rem;align-items:center;justify-content:center}.placeholder[_ngcontent-%COMP%] fa-icon[_ngcontent-%COMP%]{font-size:1.125rem}.placeholder[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{font-size:.75rem;line-height:1.2}.preview-btn[_ngcontent-%COMP%]{position:absolute;right:.5rem;bottom:.5rem;background:#000000a6;color:#fff}.card-body[_ngcontent-%COMP%]{padding:.625rem .75rem .75rem;display:flex;flex-direction:column;gap:.25rem}.title[_ngcontent-%COMP%]{font-weight:700;color:#353b3b}.meta[_ngcontent-%COMP%]{font-size:.75rem;color:#7f8c8d}.muted[_ngcontent-%COMP%]{color:#95a5a6}.document-lightbox-host[_ngcontent-%COMP%]{display:none}"]})}}return e})();var UC=(()=>{class e{constructor(){this.route=T(Ie),this.clientsService=T(Oi),this.authenticationService=T(Wo),this.entityId=this.route.parent.snapshot.params.clientId,this.addNote=this.addNote.bind(this)}ngOnInit(){let t=this.authenticationService.getCredentials();this.username=t.username,this.route.data.subscribe(n=>{this.entityNotes=n.clientNotes})}editNote(t,n,i){this.clientsService.editClientNote(this.entityId,t,n).subscribe(()=>{this.entityNotes[i].note=n.note})}deleteNote(t,n){this.clientsService.deleteClientNote(this.entityId,t).subscribe(()=>{this.entityNotes.splice(n,1)})}addNote(t){this.clientsService.createClientNote(this.entityId,t).subscribe(n=>{this.entityNotes.push({id:n.resourceId,createdByUsername:this.username,createdOn:new Date,note:t.note})})}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275cmp=me({type:e,selectors:[["mifosx-notes-tab"]],decls:1,vars:5,consts:[[3,"entityId","entityNotes","callbackAdd","callbackEdit","callbackDelete"]],template:function(n,i){n&1&&b(0,"mifosx-entity-notes-tab",0),n&2&&g("entityId",i.entityId)("entityNotes",i.entityNotes)("callbackAdd",i.addNote)("callbackEdit",i.editNote)("callbackDelete",i.deleteNote)},dependencies:[ue,fe,I0],encapsulation:2})}}return e})();var WC=(()=>{class e{constructor(){this.route=T(Ie),this.clientsService=T(Oi),this.dialog=T(Ht),this.entityType="clients",this.route.data.subscribe(t=>{this.entityDocuments=t.clientDocuments}),this.entityId=this.route.parent.snapshot.paramMap.get("clientId")}deleteDocument(t){this.clientsService.deleteClientDocument(this.entityId,t).subscribe(n=>{})}uploadDocument(t){return this.clientsService.uploadClientDocument(this.entityId,t)}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275cmp=me({type:e,selectors:[["mifosx-documents-tab"]],decls:1,vars:5,consts:[[3,"entityType","entityId","entityDocuments","callbackUpload","callbackDelete"]],template:function(n,i){n&1&&b(0,"mifosx-entity-documents-tab",0),n&2&&g("entityType",i.entityType)("entityId",i.entityId)("entityDocuments",i.entityDocuments)("callbackUpload",i.uploadDocument)("callbackDelete",i.deleteDocument)},dependencies:[ue,fe,Ak],styles:[".tab-container[_ngcontent-%COMP%]{padding:1%;margin:1%}.tab-container[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{margin:1% auto}.tab-container[_ngcontent-%COMP%] table[_ngcontent-%COMP%]{width:100%}.tab-container[_ngcontent-%COMP%] table[_ngcontent-%COMP%] .document-action-button[_ngcontent-%COMP%]{min-width:26px;padding:0 6px;margin:4px;line-height:25px}"]})}}return e})();var QC=(()=>{class e{constructor(){this.route=T(Ie),this.entityId=this.route.parent.parent.snapshot.paramMap.get("clientId"),this.route.data.subscribe(t=>{this.entityDatatable=t.clientDatatable,this.multiRowDatatableFlag=this.entityDatatable.columnHeaders[0].columnName==="id"})}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275cmp=me({type:e,selectors:[["mifosx-datatable-tab"]],decls:2,vars:3,consts:[[1,"tab-container","mat-typography"],["entityType","Client",3,"entityId","multiRowDatatableFlag","entityDatatable"]],template:function(n,i){n&1&&(l(0,"div",0),b(1,"mifosx-entity-datatable-tab",1),r()),n&2&&(a(),g("entityId",i.entityId)("multiRowDatatableFlag",i.multiRowDatatableFlag)("entityDatatable",i.entityDatatable))},dependencies:[ue,fe,Or],encapsulation:2})}}return e})();function sbe(e,o){if(e&1&&(l(0,"span"),c(1),p(2,"translate"),b(3,"br"),r()),e&2){let t=w().$implicit;a(),le("",m(2,2,"labels.inputs.Street")," : ",t.street)}}function cbe(e,o){if(e&1&&(l(0,"span"),c(1),p(2,"translate"),b(3,"br"),r()),e&2){let t=w().$implicit;a(),le("",m(2,2,"labels.inputs.Address Line")," 1 : ",t.addressLine1)}}function pbe(e,o){if(e&1&&(l(0,"span"),c(1),p(2,"translate"),b(3,"br"),r()),e&2){let t=w().$implicit;a(),le("",m(2,2,"labels.inputs.Address Line")," 2 : ",t.addressLine2)}}function mbe(e,o){if(e&1&&(l(0,"span"),c(1),p(2,"translate"),b(3,"br"),r()),e&2){let t=w().$implicit;a(),le("",m(2,2,"labels.inputs.Address Line")," 3 : ",t.addressLine3)}}function dbe(e,o){if(e&1&&(l(0,"span"),c(1),p(2,"translate"),b(3,"br"),r()),e&2){let t=w().$implicit;a(),le("",m(2,2,"labels.inputs.Town / Village")," : ",t.townVillage)}}function ube(e,o){if(e&1&&(l(0,"span"),c(1),p(2,"translate"),b(3,"br"),r()),e&2){let t=w().$implicit;a(),le("",m(2,2,"labels.inputs.City")," : ",t.city)}}function fbe(e,o){if(e&1&&(l(0,"span"),c(1),p(2,"translate"),b(3,"br"),r()),e&2){let t,n=w().$implicit,i=w();a(),le("",m(2,2,"labels.inputs.State / Province")," : ",(t=i.getSelectedValue("stateProvinceIdOptions",n.stateProvinceId))==null?null:t.name)}}function hbe(e,o){if(e&1&&(l(0,"span"),c(1),p(2,"translate"),b(3,"br"),r()),e&2){let t,n=w().$implicit,i=w();a(),le("",m(2,2,"labels.inputs.Country")," : ",(t=i.getSelectedValue("countryIdOptions",n.countryId))==null?null:t.name)}}function gbe(e,o){if(e&1&&(l(0,"span"),c(1),p(2,"translate"),b(3,"br"),r()),e&2){let t=w().$implicit;a(),le("",m(2,2,"labels.inputs.Postal Code")," : ",t.postalCode)}}function _be(e,o){if(e&1&&(l(0,"span"),c(1),p(2,"translate"),b(3,"br"),r()),e&2){let t=w().$implicit;a(),le("",m(2,2,"labels.inputs.Active Status")," : ",t.isActive)}}function Cbe(e,o){if(e&1){let t=Y();l(0,"mat-expansion-panel",4)(1,"mat-expansion-panel-header")(2,"mat-panel-title"),c(3),r(),l(4,"mat-panel-description"),c(5),r()(),b(6,"mat-divider",5),l(7,"div",6)(8,"button",7),R("click",function(){let i=V(t),s=i.$implicit,d=i.$index,u=w();return q(u.editAddress(s,d))}),b(9,"fa-icon",8),r(),l(10,"mat-slide-toggle",9),R("change",function(){let i=V(t).$implicit,s=w();return q(s.toggleAddress(i))}),r()(),l(11,"p"),E(12,sbe,4,4,"span"),E(13,cbe,4,4,"span"),E(14,pbe,4,4,"span"),E(15,mbe,4,4,"span"),E(16,dbe,4,4,"span"),E(17,ube,4,4,"span"),E(18,fbe,4,4,"span"),E(19,hbe,4,4,"span"),E(20,gbe,4,4,"span"),E(21,_be,4,4,"span"),r()()}if(e&2){let t=o.$implicit,n=w();a(3),v(" ",t.addressType," "),a(2),v(" ",t.relationship," "),a(),g("inset",!0),a(4),g("checked",t.isActive),a(2),I(n.isFieldEnabled("street")?12:-1),a(),I(n.isFieldEnabled("addressLine1")?13:-1),a(),I(n.isFieldEnabled("addressLine2")?14:-1),a(),I(n.isFieldEnabled("addressLine3")?15:-1),a(),I(n.isFieldEnabled("townVillage")?16:-1),a(),I(n.isFieldEnabled("city")?17:-1),a(),I(n.isFieldEnabled("stateProvinceId")?18:-1),a(),I(n.isFieldEnabled("countryId")?19:-1),a(),I(n.isFieldEnabled("postalCode")?20:-1),a(),I(n.isFieldEnabled("isActive")?21:-1)}}var YC=(()=>{class e{constructor(){this.route=T(Ie),this.clientService=T(Oi),this.dialog=T(Ht),this.translateService=T(yi),this.route.data.subscribe(t=>{this.clientAddressData=t.clientAddressData,this.clientAddressFieldConfig=t.clientAddressFieldConfig,this.clientAddressTemplate=t.clientAddressTemplateData,this.clientId=this.route.parent.snapshot.paramMap.get("clientId")})}addAddress(){let t={title:this.translateService.instant("labels.buttons.Add")+" "+this.translateService.instant("labels.catalogs.Client")+" "+this.translateService.instant("labels.heading.Address"),formfields:this.getAddressFormFields("add")};this.dialog.open(an,{data:t}).afterClosed().subscribe(i=>{i.data&&this.clientService.createClientAddress(this.clientId,i.data.value.addressType,i.data.value).subscribe(s=>{let d=i.data.value;d.addressId=s.resourceId,d.addressType=this.getSelectedValue("addressTypeIdOptions",d.addressType).name,d.isActive=!1,this.clientAddressData.push(d)})})}editAddress(t,n){let i={title:this.translateService.instant("labels.buttons.Edit")+" "+this.translateService.instant("labels.catalogs.Client")+" "+this.translateService.instant("labels.heading.Address"),formfields:this.getAddressFormFields("edit",t),layout:{addButtonText:"Edit"}};this.dialog.open(an,{data:i}).afterClosed().subscribe(d=>{if(d.data){let u=d.data.value;u.addressId=t.addressId,u.isActive=t.isActive,this.clientService.editClientAddress(this.clientId,t.addressTypeId,u).subscribe(f=>{u.addressTypeId=t.addressTypeId,u.addressType=t.addressType,this.clientAddressData[n]=u})}})}toggleAddress(t){let n={addressId:t.addressId,isActive:!t.isActive};this.clientService.editClientAddress(this.clientId,t.addressTypeId,n).subscribe(()=>{t.isActive=!t.isActive})}isFieldEnabled(t){return this.clientAddressFieldConfig.find(n=>n.field===t)?.isEnabled}getSelectedValue(t,n){return this.clientAddressTemplate[t].find(i=>i.id===n)}getAddressFormFields(t,n){let i=[];for(let s=0;ss!==null),i}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275cmp=me({type:e,selectors:[["mifosx-address-tab"]],decls:12,vars:6,consts:[[1,"tab-container","mat-typography"],[1,"layout-row","align-flex-end"],["mat-raised-button","","color","primary",3,"click"],["icon","plus",1,"m-r-10"],[1,"address"],[3,"inset"],[1,"address-actions","layout-row","align-end","align-items-center"],["mat-button","","color","primary",3,"click"],["icon","edit"],[3,"change","checked"]],template:function(n,i){n&1&&(l(0,"div",0)(1,"h3"),c(2),p(3,"translate"),r(),l(4,"div",1)(5,"button",2),R("click",function(){return i.addAddress()}),b(6,"fa-icon",3),c(7),p(8,"translate"),r()(),l(9,"mat-accordion"),Se(10,Cbe,22,14,"mat-expansion-panel",4,Pe),r()()),n&2&&(a(2),h(m(3,2,"labels.heading.Address")),a(5),v("",m(8,4,"labels.buttons.Add")," "),a(3),we(i.clientAddressData))},dependencies:[ue,fe,ve,ke,Er,Tr,Mr,Dr,oc,Ri,Ip,he],styles:[".tab-container[_ngcontent-%COMP%]{padding:1%;margin:1%}.tab-container[_ngcontent-%COMP%] .address[_ngcontent-%COMP%] .address-actions[_ngcontent-%COMP%]{margin-top:1%}.tab-container[_ngcontent-%COMP%] .address[_ngcontent-%COMP%] .address-actions[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{margin-right:1%}.tab-container[_ngcontent-%COMP%] .address[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{margin:1% auto}.tab-container[_ngcontent-%COMP%] .address[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{line-height:30px;margin-left:2%}"]})}}return e})();var vbe=()=>["../../"];function xbe(e,o){if(e&1&&(l(0,"mat-option",5),c(1),r()),e&2){let t=o.$implicit;g("value",t.id),a(),v(" ",t.displayName," ")}}function bbe(e,o){e&1&&(l(0,"mat-error"),c(1),p(2,"translate"),p(3,"translate"),l(4,"strong"),c(5),p(6,"translate"),r()()),e&2&&(a(),le(" ",m(2,3,"labels.inputs.Staff")," ",m(3,5,"labels.commons.is")," "),a(4),h(m(6,7,"labels.commons.required")))}var JC=(()=>{class e{constructor(){this.formBuilder=T(nt),this.clientsService=T(Oi),this.route=T(Ie),this.router=T(qe),this.route.data.subscribe(t=>{this.clientData=t.clientActionData})}ngOnInit(){this.staffData=this.clientData.staffOptions,this.createClientAssignStaffForm()}createClientAssignStaffForm(){this.clientAssignStaffForm=this.formBuilder.group({staffId:[""]})}submit(){this.clientsService.executeClientCommand(this.clientData.id,"assignStaff",this.clientAssignStaffForm.value).subscribe(()=>{this.router.navigate(["../../"],{relativeTo:this.route})})}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275cmp=me({type:e,selectors:[["mifosx-client-assign-staff"]],decls:20,vars:14,consts:[[1,"container"],[3,"ngSubmit","formGroup"],[1,"layout-column"],[1,"flex-48"],["formControlName","staffId"],[3,"value"],[1,"layout-row","align-center","gap-5px","responsive-column"],["type","button","mat-raised-button","",3,"routerLink"],["mat-raised-button","","color","primary",3,"disabled"]],template:function(n,i){n&1&&(l(0,"div",0)(1,"mat-card")(2,"form",1),R("ngSubmit",function(){return i.submit()}),l(3,"mat-card-content")(4,"div",2)(5,"mat-form-field",3)(6,"mat-label"),c(7),p(8,"translate"),r(),l(9,"mat-select",4),Se(10,xbe,2,2,"mat-option",5,Pe),r(),E(12,bbe,7,9,"mat-error"),r()()(),l(13,"mat-card-actions",6)(14,"button",7),c(15),p(16,"translate"),r(),l(17,"button",8),c(18),p(19,"translate"),r()()()()()),n&2&&(a(2),g("formGroup",i.clientAssignStaffForm),a(5),h(m(8,7,"labels.inputs.Staff")),a(3),we(i.staffData),a(2),I(i.clientAssignStaffForm.controls.staffId.hasError("required")?12:-1),a(2),g("routerLink",oe(13,vbe)),a(),v(" ",m(16,9,"labels.buttons.Cancel")," "),a(2),g("disabled",!i.clientAssignStaffForm.valid),a(),v(" ",m(19,11,"labels.buttons.Confirm")," "))},dependencies:[ue,fe,tt,Ue,Xe,Ze,et,Ae,$e,Je,Et,Fe,Be,ut,gt,ft,ve,he],styles:[".container[_ngcontent-%COMP%]{max-width:37rem}"]})}}return e})();var ybe=()=>["../../"];function Sbe(e,o){e&1&&(l(0,"mat-error"),c(1),p(2,"translate"),p(3,"translate"),l(4,"strong"),c(5),p(6,"translate"),r()()),e&2&&(a(),le(" ",m(2,3,"labels.inputs.Closed On Date")," ",m(3,5,"labels.commons.is")," "),a(4),h(m(6,7,"labels.commons.required")))}function wbe(e,o){if(e&1&&(l(0,"mat-option",9),c(1),r()),e&2){let t=o.$implicit;g("value",t.id),a(),v(" ",t.name," ")}}function Pbe(e,o){e&1&&(l(0,"mat-error"),c(1),p(2,"translate"),p(3,"translate"),l(4,"strong"),c(5),p(6,"translate"),r()()),e&2&&(a(),le(" ",m(2,3,"labels.inputs.Closure Reason")," ",m(3,5,"labels.commons.is")," "),a(4),h(m(6,7,"labels.commons.required")))}var KC=(()=>{class e{constructor(){this.formBuilder=T(nt),this.clientsService=T(Oi),this.dateUtils=T(Zt),this.route=T(Ie),this.router=T(qe),this.settingsService=T(At),this.minDate=new Date(2e3,0,1),this.maxDate=new Date,this.route.data.subscribe(t=>{this.closureData=t.clientActionData.narrations}),this.clientId=this.route.parent.snapshot.params.clientId}ngOnInit(){this.maxDate=this.settingsService.businessDate,this.createCloseClientForm()}createCloseClientForm(){this.closeClientForm=this.formBuilder.group({closureDate:["",se.required],closureReasonId:["",se.required]})}submit(){let t=this.closeClientForm.value,n=this.settingsService.language.code,i=this.settingsService.dateFormat,s=this.closeClientForm.value.closureDate;t.closureDate instanceof Date&&(t.closureDate=this.dateUtils.formatDate(s,i));let d=qt(at({},t),{dateFormat:i,locale:n});this.clientsService.executeClientCommand(this.clientId,"close",d).subscribe(()=>{this.router.navigate(["../../"],{relativeTo:this.route})})}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275cmp=me({type:e,selectors:[["mifosx-close-client"]],decls:29,vars:22,consts:[["closureDatePicker",""],[1,"container"],[3,"ngSubmit","formGroup"],[1,"layout-column"],[3,"click"],["matInput","","required","","formControlName","closureDate",3,"min","max","matDatepicker"],["matSuffix","",3,"for"],[1,"flex-48"],["formControlName","closureReasonId"],[3,"value"],[1,"layout-row","align-center","gap-5px","responsive-column"],["type","button","mat-raised-button","",3,"routerLink"],["mat-raised-button","","color","warn",3,"disabled"]],template:function(n,i){if(n&1){let s=Y();l(0,"div",1)(1,"mat-card")(2,"form",2),R("ngSubmit",function(){return V(s),q(i.submit())}),l(3,"mat-card-content")(4,"div",3)(5,"mat-form-field",4),R("click",function(){V(s);let u=xe(12);return q(u.open())}),l(6,"mat-label"),c(7),p(8,"translate"),r(),b(9,"input",5)(10,"mat-datepicker-toggle",6)(11,"mat-datepicker",null,0),E(13,Sbe,7,9,"mat-error"),r(),l(14,"mat-form-field",7)(15,"mat-label"),c(16),p(17,"translate"),r(),l(18,"mat-select",8),Se(19,wbe,2,2,"mat-option",9,Pe),r(),E(21,Pbe,7,9,"mat-error"),r()()(),l(22,"mat-card-actions",10)(23,"button",11),c(24),p(25,"translate"),r(),l(26,"button",12),c(27),p(28,"translate"),r()()()()()}if(n&2){let s=xe(12);a(2),g("formGroup",i.closeClientForm),a(5),h(m(8,13,"labels.inputs.Closed On Date")),a(2),g("min",i.minDate)("max",i.maxDate)("matDatepicker",s),a(),g("for",s),a(3),I(i.closeClientForm.controls.closureDate.hasError("required")?13:-1),a(3),h(m(17,15,"labels.inputs.Closure Reason")),a(3),we(i.closureData),a(2),I(i.closeClientForm.controls.closureReasonId.hasError("required")?21:-1),a(2),g("routerLink",oe(21,ybe)),a(),v(" ",m(25,17,"labels.buttons.Cancel")," "),a(2),g("disabled",!i.closeClientForm.valid),a(),v(" ",m(28,19,"labels.buttons.Confirm")," ")}},dependencies:[ue,fe,tt,st,Ue,Xe,dt,Ze,et,Ae,$e,Je,Et,Fe,Be,ut,ai,ze,gt,ft,mi,di,pi,ve,he],styles:[".container[_ngcontent-%COMP%]{max-width:37rem}"]})}}return e})();var Tbe=()=>["../Take Survey"],Mbe=()=>[10,25,50,100];function Dbe(e,o){e&1&&(l(0,"th",20),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.Survey")))}function Ebe(e,o){if(e&1&&(l(0,"td",21),c(1),r()),e&2){let t=o.$implicit;a(),h(t.surveyName)}}function Ibe(e,o){e&1&&(l(0,"th",22),c(1),p(2,"translate"),r()),e&2&&(a(),v(" ",m(2,1,"labels.inputs.Created By")," "))}function Obe(e,o){if(e&1&&(l(0,"td",21),c(1),r()),e&2){let t=o.$implicit;a(),h(t.createdBy)}}function Abe(e,o){e&1&&(l(0,"th",23),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.DateTime")))}function Fbe(e,o){if(e&1&&(l(0,"td",21),c(1),p(2,"datetimeFormat"),r()),e&2){let t=o.$implicit;a(),h(m(2,1,t.date))}}function kbe(e,o){e&1&&(l(0,"th",23),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.Score")))}function Bbe(e,o){if(e&1&&(l(0,"td",21),c(1),p(2,"formatNumber"),r()),e&2){let t=o.$implicit;a(),h(m(2,1,t.score))}}function Rbe(e,o){e&1&&b(0,"tr",24)}function Nbe(e,o){e&1&&b(0,"tr",25)}var XC=(()=>{class e{constructor(){this.route=T(Ie),this.displayedColumns=["surveyName","createdBy","date","score"],this.route.data.subscribe(t=>{this.surveyData=t.clientActionData})}ngOnInit(){this.constructSurveys(this.surveyData)}constructSurveys(t){let n=[];t.forEach(i=>{let s=i.scorecardValues.map(d=>({surveyName:i.surveyName,createdBy:i.username,date:d.createdOn,score:d.value}));n=n.concat(s)}),this.dataSource=new Wt(n),this.dataSource.paginator=this.paginator,this.dataSource.sort=this.sort}applyFilter(t){this.dataSource.filter=t.trim().toLowerCase()}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275cmp=me({type:e,selectors:[["mifosx-view-survey"]],viewQuery:function(n,i){if(n&1&&(Ee(kt,7),Ee(It,7)),n&2){let s;Te(s=Me())&&(i.paginator=s.first),Te(s=Me())&&(i.sort=s.first)}},decls:29,vars:13,consts:[[1,"container","m-b-20","layout-align-end"],["mat-raised-button","","color","primary",3,"routerLink"],["icon","edit",1,"m-r-10"],[1,"container"],[1,"layout-row"],[1,"flex-fill"],["matInput","",3,"keyup"],[1,"mat-elevation-z8"],["mat-table","","matSort","",3,"dataSource"],["matColumnDef","surveyName"],["mat-header-cell","","mat-sort-header","surveyName",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","createdBy"],["mat-header-cell","","mat-sort-header","createdBy",4,"matHeaderCellDef"],["matColumnDef","date"],["mat-header-cell","","mat-sort-header","",4,"matHeaderCellDef"],["matColumnDef","score"],["mat-header-row","",4,"matHeaderRowDef"],["mat-row","",4,"matRowDef","matRowDefColumns"],["showFirstLastButtons","",3,"pageSizeOptions"],["mat-header-cell","","mat-sort-header","surveyName"],["mat-cell",""],["mat-header-cell","","mat-sort-header","createdBy"],["mat-header-cell","","mat-sort-header",""],["mat-header-row",""],["mat-row",""]],template:function(n,i){n&1&&(l(0,"div",0)(1,"button",1),b(2,"fa-icon",2),c(3),p(4,"translate"),r()(),l(5,"div",3)(6,"div",4)(7,"mat-form-field",5)(8,"mat-label"),c(9),p(10,"translate"),r(),l(11,"input",6),R("keyup",function(d){return i.applyFilter(d.target.value)}),r()()(),l(12,"div",7)(13,"table",8),X(14,9),F(15,Dbe,3,3,"th",10)(16,Ebe,2,1,"td",11),Z(),X(17,12),F(18,Ibe,3,3,"th",13)(19,Obe,2,1,"td",11),Z(),X(20,14),F(21,Abe,3,3,"th",15)(22,Fbe,3,3,"td",11),Z(),X(23,16),F(24,kbe,3,3,"th",15)(25,Bbe,3,3,"td",11),Z(),F(26,Rbe,1,0,"tr",17)(27,Nbe,1,0,"tr",18),r(),b(28,"mat-paginator",19),r()()),n&2&&(a(),g("routerLink",oe(11,Tbe)),a(2),v(" ",m(4,7,"labels.buttons.Take Survey")," "),a(6),h(m(10,9,"labels.inputs.Filter")),a(4),g("dataSource",i.dataSource),a(13),g("matHeaderRowDef",i.displayedColumns),a(),g("matRowDefColumns",i.displayedColumns),a(),g("pageSizeOptions",oe(12,Mbe)))},dependencies:[ue,fe,Ae,Fe,Be,ze,ve,ke,_t,It,xt,vt,bt,ri,Ct,yt,St,Pt,wt,Tt,kt,he,Jr,On],styles:[".headingContent[_ngcontent-%COMP%]{margin-bottom:1%;margin-top:1%}.headingName[_ngcontent-%COMP%]{display:block}"]})}}return e})();var Lbe=()=>["../../"];function Vbe(e,o){e&1&&(l(0,"mat-error"),c(1),p(2,"translate"),p(3,"translate"),l(4,"strong"),c(5),p(6,"translate"),r()()),e&2&&(a(),le(" ",m(2,3,"labels.inputs.Rejection Date")," ",m(3,5,"labels.commons.is")," "),a(4),h(m(6,7,"labels.commons.required")))}function qbe(e,o){if(e&1&&(l(0,"mat-option",9),c(1),r()),e&2){let t=o.$implicit;g("value",t.id),a(),v(" ",t.name," ")}}function zbe(e,o){e&1&&(l(0,"mat-error"),c(1),p(2,"translate"),p(3,"translate"),l(4,"strong"),c(5),p(6,"translate"),r()()),e&2&&(a(),le(" ",m(2,3,"labels.inputs.Rejection Reason")," ",m(3,5,"labels.commons.is")," "),a(4),h(m(6,7,"labels.commons.required")))}var ZC=(()=>{class e{constructor(){this.formBuilder=T(nt),this.clientsService=T(Oi),this.dateUtils=T(Zt),this.route=T(Ie),this.router=T(qe),this.settingsService=T(At),this.minDate=new Date(2e3,0,1),this.maxDate=new Date,this.route.data.subscribe(t=>{this.rejectionData=t.clientActionData.narrations}),this.clientId=this.route.parent.snapshot.params.clientId}ngOnInit(){this.maxDate=this.settingsService.businessDate,this.createRejectClientForm()}createRejectClientForm(){this.rejectClientForm=this.formBuilder.group({rejectionDate:["",se.required],rejectionReasonId:["",se.required]})}submit(){let t=this.rejectClientForm.value,n=this.settingsService.language.code,i=this.settingsService.dateFormat,s=this.rejectClientForm.value.rejectionDate;t.rejectionDate instanceof Date&&(t.rejectionDate=this.dateUtils.formatDate(s,i));let d=qt(at({},t),{dateFormat:i,locale:n});this.clientsService.executeClientCommand(this.clientId,"reject",d).subscribe(()=>{this.router.navigate(["../../"],{relativeTo:this.route})})}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275cmp=me({type:e,selectors:[["mifosx-reject-client"]],decls:29,vars:22,consts:[["rejectionDatePicker",""],[1,"container"],[3,"ngSubmit","formGroup"],[1,"layout-column"],[3,"click"],["matInput","","required","","formControlName","rejectionDate",3,"min","max","matDatepicker"],["matSuffix","",3,"for"],[1,"flex-48"],["formControlName","rejectionReasonId"],[3,"value"],[1,"layout-row","align-center","gap-5px","responsive-column"],["type","button","mat-raised-button","",3,"routerLink"],["mat-raised-button","","color","warn",3,"disabled"]],template:function(n,i){if(n&1){let s=Y();l(0,"div",1)(1,"mat-card")(2,"form",2),R("ngSubmit",function(){return V(s),q(i.submit())}),l(3,"mat-card-content")(4,"div",3)(5,"mat-form-field",4),R("click",function(){V(s);let u=xe(12);return q(u.open())}),l(6,"mat-label"),c(7),p(8,"translate"),r(),b(9,"input",5)(10,"mat-datepicker-toggle",6)(11,"mat-datepicker",null,0),E(13,Vbe,7,9,"mat-error"),r(),l(14,"mat-form-field",7)(15,"mat-label"),c(16),p(17,"translate"),r(),l(18,"mat-select",8),Se(19,qbe,2,2,"mat-option",9,Pe),r(),E(21,zbe,7,9,"mat-error"),r()()(),l(22,"mat-card-actions",10)(23,"button",11),c(24),p(25,"translate"),r(),l(26,"button",12),c(27),p(28,"translate"),r()()()()()}if(n&2){let s=xe(12);a(2),g("formGroup",i.rejectClientForm),a(5),h(m(8,13,"labels.inputs.Rejection Date")),a(2),g("min",i.minDate)("max",i.maxDate)("matDatepicker",s),a(),g("for",s),a(3),I(i.rejectClientForm.controls.rejectionDate.hasError("required")?13:-1),a(3),h(m(17,15,"labels.inputs.Rejection Reason")),a(3),we(i.rejectionData),a(2),I(i.rejectClientForm.controls.rejectionReasonId.hasError("required")?21:-1),a(2),g("routerLink",oe(21,Lbe)),a(),v(" ",m(25,17,"labels.buttons.Cancel")," "),a(2),g("disabled",!i.rejectClientForm.valid),a(),v(" ",m(28,19,"labels.buttons.Confirm")," ")}},dependencies:[ue,fe,tt,st,Ue,Xe,dt,Ze,et,Ae,$e,Je,Et,Fe,Be,ut,ai,ze,gt,ft,mi,di,pi,ve,he],styles:[".container[_ngcontent-%COMP%]{max-width:37rem}"]})}}return e})();var Hbe=()=>["../../"];function Gbe(e,o){e&1&&(l(0,"mat-error"),c(1),p(2,"translate"),p(3,"translate"),l(4,"strong"),c(5),p(6,"translate"),r()()),e&2&&(a(),le(" ",m(2,3,"labels.inputs.Activated On Date")," ",m(3,5,"labels.commons.is")," "),a(4),h(m(6,7,"labels.commons.required")))}var e2=(()=>{class e{constructor(){this.formBuilder=T(nt),this.clientsService=T(Oi),this.dateUtils=T(Zt),this.route=T(Ie),this.router=T(qe),this.settingsService=T(At),this.minDate=new Date(2e3,0,1),this.maxDate=new Date,this.clientId=this.route.parent.snapshot.params.clientId}ngOnInit(){this.maxDate=this.settingsService.businessDate,this.createActivateClientForm()}createActivateClientForm(){this.activateClientForm=this.formBuilder.group({activationDate:["",se.required]})}submit(){let t=this.activateClientForm.value,n=this.settingsService.language.code,i=this.settingsService.dateFormat,s=this.activateClientForm.value.activationDate;t.activationDate instanceof Date&&(t.activationDate=this.dateUtils.formatDate(s,i));let d=qt(at({},t),{dateFormat:i,locale:n});this.clientsService.executeClientCommand(this.clientId,"activate",d).subscribe(()=>{this.router.navigate(["../../"],{relativeTo:this.route})})}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275cmp=me({type:e,selectors:[["mifosx-activate-client"]],decls:20,vars:18,consts:[["activationDatePicker",""],[1,"container"],[3,"ngSubmit","formGroup"],[1,"flex-fill",3,"click"],["matInput","","required","","formControlName","activationDate",3,"min","max","matDatepicker"],["matSuffix","",3,"for"],[1,"layout-row","align-center","gap-5px","responsive-column"],["type","button","mat-raised-button","",3,"routerLink"],["mat-raised-button","","color","primary",3,"disabled"]],template:function(n,i){if(n&1){let s=Y();l(0,"div",1)(1,"mat-card")(2,"form",2),R("ngSubmit",function(){return V(s),q(i.submit())}),l(3,"mat-card-content")(4,"mat-form-field",3),R("click",function(){V(s);let u=xe(11);return q(u.open())}),l(5,"mat-label"),c(6),p(7,"translate"),r(),b(8,"input",4)(9,"mat-datepicker-toggle",5)(10,"mat-datepicker",null,0),E(12,Gbe,7,9,"mat-error"),r()(),l(13,"mat-card-actions",6)(14,"button",7),c(15),p(16,"translate"),r(),l(17,"button",8),c(18),p(19,"translate"),r()()()()()}if(n&2){let s=xe(11);a(2),g("formGroup",i.activateClientForm),a(4),h(m(7,11,"labels.inputs.Activated On Date")),a(2),g("min",i.minDate)("max",i.maxDate)("matDatepicker",s),a(),g("for",s),a(3),I(i.activateClientForm.controls.activationDate.hasError("required")?12:-1),a(2),g("routerLink",oe(17,Hbe)),a(),v(" ",m(16,13,"labels.buttons.Cancel")," "),a(2),g("disabled",!i.activateClientForm.valid),a(),v(" ",m(19,15,"labels.buttons.Confirm")," ")}},dependencies:[ue,fe,tt,st,Ue,Xe,dt,Ze,et,Ae,$e,Je,Et,Fe,Be,ut,ai,ze,mi,di,pi,ve,he],styles:[".container[_ngcontent-%COMP%]{max-width:37rem}"]})}}return e})();var jbe=()=>["../../"];function $be(e,o){e&1&&(l(0,"mat-error"),c(1),p(2,"translate"),p(3,"translate"),l(4,"strong"),c(5),p(6,"translate"),r()()),e&2&&(a(),le(" ",m(2,3,"labels.inputs.Withdrawal Date")," ",m(3,5,"labels.commons.is")," "),a(4),h(m(6,7,"labels.commons.required")))}function Ube(e,o){if(e&1&&(l(0,"mat-option",9),c(1),r()),e&2){let t=o.$implicit;g("value",t.id),a(),v(" ",t.name," ")}}function Wbe(e,o){e&1&&(l(0,"mat-error"),c(1),p(2,"translate"),p(3,"translate"),l(4,"strong"),c(5),p(6,"translate"),r()()),e&2&&(a(),le(" ",m(2,3,"labels.inputs.Withdrawal Reason")," ",m(3,5,"labels.commons.is")," "),a(4),h(m(6,7,"labels.commons.required")))}var t2=(()=>{class e{constructor(){this.formBuilder=T(nt),this.clientsService=T(Oi),this.dateUtils=T(Zt),this.route=T(Ie),this.router=T(qe),this.settingsService=T(At),this.minDate=new Date(2e3,0,1),this.maxDate=new Date,this.route.data.subscribe(t=>{this.withdrawalData=t.clientActionData.narrations}),this.clientId=this.route.parent.snapshot.params.clientId}ngOnInit(){this.maxDate=this.settingsService.businessDate,this.createWithdrawClientForm()}createWithdrawClientForm(){this.withdrawClientForm=this.formBuilder.group({withdrawalDate:["",se.required],withdrawalReasonId:["",se.required]})}submit(){let t=this.withdrawClientForm.value,n=this.settingsService.language.code,i=this.settingsService.dateFormat,s=this.withdrawClientForm.value.withdrawalDate;t.withdrawalDate instanceof Date&&(t.withdrawalDate=this.dateUtils.formatDate(s,i));let d=qt(at({},t),{dateFormat:i,locale:n});this.clientsService.executeClientCommand(this.clientId,"withdraw",d).subscribe(()=>{this.router.navigate(["../../"],{relativeTo:this.route})})}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275cmp=me({type:e,selectors:[["mifosx-withdraw-client"]],decls:29,vars:22,consts:[["withdrawalDatePicker",""],[1,"container"],[3,"ngSubmit","formGroup"],[1,"layout-column"],[3,"click"],["matInput","","required","","formControlName","withdrawalDate",3,"min","max","matDatepicker"],["matSuffix","",3,"for"],[1,"flex-48"],["formControlName","withdrawalReasonId"],[3,"value"],[1,"layout-row","align-center","gap-5px","responsive-column"],["type","button","mat-raised-button","",3,"routerLink"],["mat-raised-button","","color","primary",3,"disabled"]],template:function(n,i){if(n&1){let s=Y();l(0,"div",1)(1,"mat-card")(2,"form",2),R("ngSubmit",function(){return V(s),q(i.submit())}),l(3,"mat-card-content")(4,"div",3)(5,"mat-form-field",4),R("click",function(){V(s);let u=xe(12);return q(u.open())}),l(6,"mat-label"),c(7),p(8,"translate"),r(),b(9,"input",5)(10,"mat-datepicker-toggle",6)(11,"mat-datepicker",null,0),E(13,$be,7,9,"mat-error"),r(),l(14,"mat-form-field",7)(15,"mat-label"),c(16),p(17,"translate"),r(),l(18,"mat-select",8),Se(19,Ube,2,2,"mat-option",9,Pe),r(),E(21,Wbe,7,9,"mat-error"),r()()(),l(22,"mat-card-actions",10)(23,"button",11),c(24),p(25,"translate"),r(),l(26,"button",12),c(27),p(28,"translate"),r()()()()()}if(n&2){let s=xe(12);a(2),g("formGroup",i.withdrawClientForm),a(5),h(m(8,13,"labels.inputs.Withdrawal Date")),a(2),g("min",i.minDate)("max",i.maxDate)("matDatepicker",s),a(),g("for",s),a(3),I(i.withdrawClientForm.controls.withdrawalDate.hasError("required")?13:-1),a(3),h(m(17,15,"labels.inputs.Withdrawal Reason")),a(3),we(i.withdrawalData),a(2),I(i.withdrawClientForm.controls.withdrawalReasonId.hasError("required")?21:-1),a(2),g("routerLink",oe(21,jbe)),a(),v(" ",m(25,17,"labels.buttons.Cancel")," "),a(2),g("disabled",!i.withdrawClientForm.valid),a(),v(" ",m(28,19,"labels.buttons.Confirm")," ")}},dependencies:[ue,fe,tt,st,Ue,Xe,dt,Ze,et,Ae,$e,Je,Et,Fe,Be,ut,ai,ze,gt,ft,mi,di,pi,ve,he],styles:[".container[_ngcontent-%COMP%]{max-width:37rem}"]})}}return e})();var Qbe=()=>["../../"];function Ybe(e,o){if(e&1&&(l(0,"mat-option",5),c(1),r()),e&2){let t=o.$implicit;g("value",t.id),a(),v(" ",t.accountNo," ")}}function Jbe(e,o){e&1&&(l(0,"mat-error"),c(1),p(2,"translate"),p(3,"translate"),l(4,"strong"),c(5),p(6,"translate"),r()()),e&2&&(a(),le(" ",m(2,3,"labels.inputs.Account")," ",m(3,5,"labels.commons.is")," "),a(4),h(m(6,7,"labels.commons.required")))}var i2=(()=>{class e{constructor(){this.formBuilder=T(nt),this.clientsService=T(Oi),this.route=T(Ie),this.router=T(qe),this.route.data.subscribe(t=>{this.clientData=t.clientActionData})}ngOnInit(){this.savingsAccounts=this.clientData.savingAccountOptions,this.createClientSavingsAccountForm()}createClientSavingsAccountForm(){this.clientSavingsAccountForm=this.formBuilder.group({savingsAccountId:[this.clientData.savingsAccountId]})}submit(){this.clientsService.executeClientCommand(this.clientData.id,"updateSavingsAccount",this.clientSavingsAccountForm.value).subscribe(()=>{this.router.navigate(["../../"],{relativeTo:this.route})})}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275cmp=me({type:e,selectors:[["mifosx-update-client-savings-account"]],decls:20,vars:14,consts:[[1,"container"],[3,"ngSubmit","formGroup"],[1,"layout-column"],[1,"flex-48"],["formControlName","savingsAccountId"],[3,"value"],[1,"layout-row","align-center","gap-5px","responsive-column"],["type","button","mat-raised-button","",3,"routerLink"],["mat-raised-button","","color","primary",3,"disabled"]],template:function(n,i){n&1&&(l(0,"div",0)(1,"mat-card")(2,"form",1),R("ngSubmit",function(){return i.submit()}),l(3,"mat-card-content")(4,"div",2)(5,"mat-form-field",3)(6,"mat-label"),c(7),p(8,"translate"),r(),l(9,"mat-select",4),Se(10,Ybe,2,2,"mat-option",5,Pe),r(),E(12,Jbe,7,9,"mat-error"),r()()(),l(13,"mat-card-actions",6)(14,"button",7),c(15),p(16,"translate"),r(),l(17,"button",8),c(18),p(19,"translate"),r()()()()()),n&2&&(a(2),g("formGroup",i.clientSavingsAccountForm),a(5),h(m(8,7,"labels.inputs.Default Savings Account")),a(3),we(i.savingsAccounts),a(2),I(i.clientSavingsAccountForm.controls.savingsAccountId.hasError("required")?12:-1),a(2),g("routerLink",oe(13,Qbe)),a(),v(" ",m(16,9,"labels.buttons.Cancel")," "),a(2),g("disabled",!i.clientSavingsAccountForm.valid),a(),v(" ",m(19,11,"labels.buttons.Confirm")," "))},dependencies:[ue,fe,tt,Ue,Xe,Ze,et,Ae,$e,Je,Et,Fe,Be,ut,gt,ft,ve,he],styles:[".container[_ngcontent-%COMP%]{max-width:37rem}"]})}}return e})();var Kbe=()=>["../../"];function Xbe(e,o){if(e&1&&(l(0,"mat-option",5),c(1),r()),e&2){let t=o.$implicit;g("value",t.id),a(),v(" ",t.name," ")}}function Zbe(e,o){e&1&&(l(0,"mat-error"),c(1),p(2,"translate"),p(3,"translate"),l(4,"strong"),c(5),p(6,"translate"),r()()),e&2&&(a(),le(" ",m(2,3,"labels.inputs.Office")," ",m(3,5,"labels.commons.is")," "),a(4),h(m(6,7,"labels.commons.required")))}function eye(e,o){e&1&&(l(0,"mat-error"),c(1),p(2,"translate"),p(3,"translate"),l(4,"strong"),c(5),p(6,"translate"),r()()),e&2&&(a(),le(" ",m(2,3,"labels.inputs.Transfer Date")," ",m(3,5,"labels.commons.is")," "),a(4),h(m(6,7,"labels.commons.required")))}var n2=(()=>{class e{constructor(){this.formBuilder=T(nt),this.clientsService=T(Oi),this.dateUtils=T(Zt),this.route=T(Ie),this.router=T(qe),this.settingsService=T(At),this.minDate=new Date(2e3,0,1),this.maxDate=new Date,this.route.data.subscribe(t=>{this.officeData=t.clientActionData}),this.clientId=this.route.parent.snapshot.params.clientId}ngOnInit(){this.maxDate=this.settingsService.businessDate,this.createTransferClientForm()}createTransferClientForm(){this.transferClientForm=this.formBuilder.group({destinationOfficeId:["",se.required],transferDate:["",se.required],note:[""]})}submit(){let t=this.transferClientForm.value,n=this.settingsService.language.code,i=this.settingsService.dateFormat,s=this.transferClientForm.value.transferDate;t.transferDate instanceof Date&&(t.transferDate=this.dateUtils.formatDate(s,i));let d=qt(at({},t),{dateFormat:i,locale:n});this.clientsService.executeClientCommand(this.clientId,"proposeTransfer",d).subscribe(()=>{this.router.navigate(["../../"],{relativeTo:this.route})})}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275cmp=me({type:e,selectors:[["mifosx-transfer-client"]],decls:34,vars:25,consts:[["transferDatePicker",""],[1,"container"],[3,"ngSubmit","formGroup"],[1,"layout-column"],["required","","formControlName","destinationOfficeId"],[3,"value"],[3,"click"],["matInput","","required","","formControlName","transferDate",3,"min","max","matDatepicker"],["matSuffix","",3,"for"],["matInput","","formControlName","note","cdkTextareaAutosize","","cdkAutosizeMinRows","2"],[1,"layout-row","align-center","gap-5px","responsive-column"],["type","button","mat-raised-button","",3,"routerLink"],["mat-raised-button","","color","primary",3,"disabled"]],template:function(n,i){if(n&1){let s=Y();l(0,"div",1)(1,"mat-card")(2,"form",2),R("ngSubmit",function(){return V(s),q(i.submit())}),l(3,"mat-card-content")(4,"div",3)(5,"mat-form-field")(6,"mat-label"),c(7),p(8,"translate"),r(),l(9,"mat-select",4),Se(10,Xbe,2,2,"mat-option",5,Pe),r(),E(12,Zbe,7,9,"mat-error"),r(),l(13,"mat-form-field",6),R("click",function(){V(s);let u=xe(20);return q(u.open())}),l(14,"mat-label"),c(15),p(16,"translate"),r(),b(17,"input",7)(18,"mat-datepicker-toggle",8)(19,"mat-datepicker",null,0),E(21,eye,7,9,"mat-error"),r(),l(22,"mat-form-field")(23,"mat-label"),c(24),p(25,"translate"),r(),b(26,"textarea",9),r()()(),l(27,"mat-card-actions",10)(28,"button",11),c(29),p(30,"translate"),r(),l(31,"button",12),c(32),p(33,"translate"),r()()()()()}if(n&2){let s=xe(20);a(2),g("formGroup",i.transferClientForm),a(5),h(m(8,14,"labels.inputs.Office")),a(3),we(i.officeData),a(2),I(i.transferClientForm.controls.destinationOfficeId.hasError("required")?12:-1),a(3),h(m(16,16,"labels.inputs.Transfer Date")),a(2),g("min",i.minDate)("max",i.maxDate)("matDatepicker",s),a(),g("for",s),a(3),I(i.transferClientForm.controls.transferDate.hasError("required")?21:-1),a(3),h(m(25,18,"labels.inputs.Note")),a(4),g("routerLink",oe(24,Kbe)),a(),v(" ",m(30,20,"labels.buttons.Cancel")," "),a(2),g("disabled",!i.transferClientForm.valid),a(),v(" ",m(33,22,"labels.buttons.Confirm")," ")}},dependencies:[ue,fe,tt,st,Ue,Xe,dt,Ze,et,Ae,$e,Je,Et,Fe,Be,ut,ai,ze,gt,ft,mi,di,pi,ve,Ln,he],styles:[".container[_ngcontent-%COMP%]{max-width:37rem}"]})}}return e})();var tye=()=>["../../"],o2=(()=>{class e{constructor(){this.formBuilder=T(nt),this.clientsService=T(Oi),this.settingsService=T(At),this.dateUtils=T(Zt),this.route=T(Ie),this.router=T(qe),this.route.data.subscribe(t=>{this.transferDate=t.clientActionData}),this.clientId=this.route.parent.snapshot.params.clientId}ngOnInit(){this.createUndoClientTransferForm()}createUndoClientTransferForm(){this.undoClientTransferForm=this.formBuilder.group({transferDate:{value:new Date(this.transferDate),disabled:!0},note:[""]})}submit(){let t=this.undoClientTransferForm.value,n=this.settingsService.language.code,i=this.settingsService.dateFormat,s=this.undoClientTransferForm.value.transferDate;t.transferDate instanceof Date&&(t.transferDate=this.dateUtils.formatDate(s,i));let d=at({},t);this.clientsService.executeClientCommand(this.clientId,"withdrawTransfer",d).subscribe(()=>{this.router.navigate(["../../"],{relativeTo:this.route})})}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275cmp=me({type:e,selectors:[["mifosx-undo-client-transfer"]],decls:24,vars:18,consts:[["transferDatePicker",""],[1,"container"],[3,"ngSubmit","formGroup"],[1,"layout-column"],[3,"click"],["matInput","","required","","formControlName","transferDate",3,"matDatepicker"],["matSuffix","",3,"for"],[1,"flex-fill"],["matInput","","formControlName","note","cdkTextareaAutosize","","cdkAutosizeMinRows","2"],[1,"layout-row","align-center","gap-5px","responsive-column"],["type","button","mat-raised-button","",3,"routerLink"],["mat-raised-button","","color","primary",3,"disabled"]],template:function(n,i){if(n&1){let s=Y();l(0,"div",1)(1,"mat-card")(2,"form",2),R("ngSubmit",function(){return V(s),q(i.submit())}),l(3,"mat-card-content",3)(4,"mat-form-field",4),R("click",function(){V(s);let u=xe(11);return q(u.open())}),l(5,"mat-label"),c(6),p(7,"translate"),r(),b(8,"input",5)(9,"mat-datepicker-toggle",6)(10,"mat-datepicker",null,0),r(),l(12,"mat-form-field",7)(13,"mat-label"),c(14),p(15,"translate"),r(),b(16,"textarea",8),r()(),l(17,"mat-card-actions",9)(18,"button",10),c(19),p(20,"translate"),r(),l(21,"button",11),c(22),p(23,"translate"),r()()()()()}if(n&2){let s=xe(11);a(2),g("formGroup",i.undoClientTransferForm),a(4),h(m(7,9,"labels.inputs.Transfer Date")),a(2),g("matDatepicker",s),a(),g("for",s),a(5),h(m(15,11,"labels.inputs.Note")),a(4),g("routerLink",oe(17,tye)),a(),v(" ",m(20,13,"labels.buttons.Cancel")," "),a(2),g("disabled",!i.undoClientTransferForm.valid),a(),v(" ",m(23,15,"labels.buttons.Confirm")," ")}},dependencies:[ue,fe,tt,st,Ue,Xe,dt,Ze,et,Ae,$e,Je,Et,Fe,Be,ai,ze,mi,di,pi,ve,Ln,he],styles:[".container[_ngcontent-%COMP%]{max-width:37rem}"]})}}return e})();var iye=()=>["../../"],a2=(()=>{class e{constructor(){this.formBuilder=T(nt),this.clientsService=T(Oi),this.settingsService=T(At),this.dateUtils=T(Zt),this.route=T(Ie),this.router=T(qe),this.route.data.subscribe(t=>{this.transferDate=t.clientActionData}),this.clientId=this.route.parent.snapshot.params.clientId}ngOnInit(){this.createRejectClientTransferForm()}createRejectClientTransferForm(){this.rejectClientTransferForm=this.formBuilder.group({transferDate:{value:new Date(this.transferDate),disabled:!0},note:[""]})}submit(){let t=this.rejectClientTransferForm.value,n=this.settingsService.language.code,i=this.settingsService.dateFormat,s=this.rejectClientTransferForm.value.transferDate;t.transferDate instanceof Date&&(t.transferDate=this.dateUtils.formatDate(s,i));let d=at({},t);this.clientsService.executeClientCommand(this.clientId,"rejectTransfer",d).subscribe(()=>{this.router.navigate(["../../"],{relativeTo:this.route})})}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275cmp=me({type:e,selectors:[["mifosx-reject-client-transfer"]],decls:24,vars:18,consts:[["transferDatePicker",""],[1,"container"],[3,"ngSubmit","formGroup"],[1,"layout-column"],[3,"click"],["matInput","","required","","formControlName","transferDate",3,"matDatepicker"],["matSuffix","",3,"for"],[1,"flex-fill"],["matInput","","formControlName","note","cdkTextareaAutosize","","cdkAutosizeMinRows","2"],[1,"layout-row","align-center","gap-5px","responsive-column"],["type","button","mat-raised-button","",3,"routerLink"],["mat-raised-button","","color","primary",3,"disabled"]],template:function(n,i){if(n&1){let s=Y();l(0,"div",1)(1,"mat-card")(2,"form",2),R("ngSubmit",function(){return V(s),q(i.submit())}),l(3,"mat-card-content",3)(4,"mat-form-field",4),R("click",function(){V(s);let u=xe(11);return q(u.open())}),l(5,"mat-label"),c(6),p(7,"translate"),r(),b(8,"input",5)(9,"mat-datepicker-toggle",6)(10,"mat-datepicker",null,0),r(),l(12,"mat-form-field",7)(13,"mat-label"),c(14),p(15,"translate"),r(),b(16,"textarea",8),r()(),l(17,"mat-card-actions",9)(18,"button",10),c(19),p(20,"translate"),r(),l(21,"button",11),c(22),p(23,"translate"),r()()()()()}if(n&2){let s=xe(11);a(2),g("formGroup",i.rejectClientTransferForm),a(4),h(m(7,9,"labels.inputs.Transfer Date")),a(2),g("matDatepicker",s),a(),g("for",s),a(5),h(m(15,11,"labels.inputs.Note")),a(4),g("routerLink",oe(17,iye)),a(),v(" ",m(20,13,"labels.buttons.Cancel")," "),a(2),g("disabled",!i.rejectClientTransferForm.valid),a(),v(" ",m(23,15,"labels.buttons.Confirm")," ")}},dependencies:[ue,fe,tt,st,Ue,Xe,dt,Ze,et,Ae,$e,Je,Et,Fe,Be,ai,ze,mi,di,pi,ve,Ln,he],styles:[".container[_ngcontent-%COMP%]{max-width:37rem}"]})}}return e})();var nye=()=>["../../"],r2=(()=>{class e{constructor(){this.formBuilder=T(nt),this.clientsService=T(Oi),this.settingsService=T(At),this.dateUtils=T(Zt),this.route=T(Ie),this.router=T(qe),this.route.data.subscribe(t=>{this.transferDate=t.clientActionData}),this.clientId=this.route.parent.snapshot.params.clientId}ngOnInit(){this.createAcceptClientTransferForm()}createAcceptClientTransferForm(){this.acceptClientTransferForm=this.formBuilder.group({transferDate:{value:new Date(this.transferDate),disabled:!0},note:[""]})}submit(){let t=this.acceptClientTransferForm.value,n=this.settingsService.dateFormat,i=this.acceptClientTransferForm.value.transferDate;t.transferDate instanceof Date&&(t.transferDate=this.dateUtils.formatDate(i,n));let s=at({},t);this.clientsService.executeClientCommand(this.clientId,"acceptTransfer",s).subscribe(()=>{this.router.navigate(["../../"],{relativeTo:this.route})})}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275cmp=me({type:e,selectors:[["mifosx-accept-client-transfer"]],decls:24,vars:18,consts:[["transferDatePicker",""],[1,"container"],[3,"ngSubmit","formGroup"],[1,"layout-column"],[3,"click"],["matInput","","required","","formControlName","transferDate",3,"matDatepicker"],["matSuffix","",3,"for"],[1,"flex-fill"],["matInput","","formControlName","note","cdkTextareaAutosize","","cdkAutosizeMinRows","2"],[1,"layout-row","align-center","gap-5px","responsive-column"],["type","button","mat-raised-button","",3,"routerLink"],["mat-raised-button","","color","primary",3,"disabled"]],template:function(n,i){if(n&1){let s=Y();l(0,"div",1)(1,"mat-card")(2,"form",2),R("ngSubmit",function(){return V(s),q(i.submit())}),l(3,"mat-card-content",3)(4,"mat-form-field",4),R("click",function(){V(s);let u=xe(11);return q(u.open())}),l(5,"mat-label"),c(6),p(7,"translate"),r(),b(8,"input",5)(9,"mat-datepicker-toggle",6)(10,"mat-datepicker",null,0),r(),l(12,"mat-form-field",7)(13,"mat-label"),c(14),p(15,"translate"),r(),b(16,"textarea",8),r()(),l(17,"mat-card-actions",9)(18,"button",10),c(19),p(20,"translate"),r(),l(21,"button",11),c(22),p(23,"translate"),r()()()()()}if(n&2){let s=xe(11);a(2),g("formGroup",i.acceptClientTransferForm),a(4),h(m(7,9,"labels.inputs.Transfer Date")),a(2),g("matDatepicker",s),a(),g("for",s),a(5),h(m(15,11,"labels.inputs.Note")),a(4),g("routerLink",oe(17,nye)),a(),v(" ",m(20,13,"labels.buttons.Cancel")," "),a(2),g("disabled",!i.acceptClientTransferForm.valid),a(),v(" ",m(23,15,"labels.buttons.Confirm")," ")}},dependencies:[ue,fe,tt,st,Ue,Xe,dt,Ze,et,Ae,$e,Je,Et,Fe,Be,ai,ze,mi,di,pi,ve,Ln,he],styles:[".container[_ngcontent-%COMP%]{max-width:37rem}"]})}}return e})();var oye=()=>["../../"];function aye(e,o){e&1&&(l(0,"mat-error"),c(1),p(2,"translate"),p(3,"translate"),l(4,"strong"),c(5),p(6,"translate"),r()()),e&2&&(a(),le(" ",m(2,3,"labels.inputs.Reactivation Date")," ",m(3,5,"labels.commons.is")," "),a(4),h(m(6,7,"labels.commons.required")))}var l2=(()=>{class e{constructor(){this.formBuilder=T(nt),this.clientsService=T(Oi),this.dateUtils=T(Zt),this.route=T(Ie),this.router=T(qe),this.settingsService=T(At),this.minDate=new Date(2e3,0,1),this.maxDate=new Date,this.clientId=this.route.parent.snapshot.params.clientId}ngOnInit(){this.maxDate=this.settingsService.businessDate,this.createReactivateClientForm()}createReactivateClientForm(){this.reactivateClientForm=this.formBuilder.group({reactivationDate:["",se.required]})}submit(){let t=this.reactivateClientForm.value,n=this.settingsService.language.code,i=this.settingsService.dateFormat,s=this.reactivateClientForm.value.reactivationDate;t.reactivationDate instanceof Date&&(t.reactivationDate=this.dateUtils.formatDate(s,i));let d=qt(at({},t),{dateFormat:i,locale:n});this.clientsService.executeClientCommand(this.clientId,"reactivate",d).subscribe(()=>{this.router.navigate(["../../"],{relativeTo:this.route})})}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275cmp=me({type:e,selectors:[["mifosx-reactivate-client"]],decls:20,vars:18,consts:[["reactivationDatePicker",""],[1,"container"],[3,"ngSubmit","formGroup"],[1,"flex-fill",3,"click"],["matInput","","required","","formControlName","reactivationDate",3,"min","max","matDatepicker"],["matSuffix","",3,"for"],[1,"layout-row","align-center","gap-5px","responsive-column"],["type","button","mat-raised-button","",3,"routerLink"],["mat-raised-button","","color","primary",3,"disabled"]],template:function(n,i){if(n&1){let s=Y();l(0,"div",1)(1,"mat-card")(2,"form",2),R("ngSubmit",function(){return V(s),q(i.submit())}),l(3,"mat-card-content")(4,"mat-form-field",3),R("click",function(){V(s);let u=xe(11);return q(u.open())}),l(5,"mat-label"),c(6),p(7,"translate"),r(),b(8,"input",4)(9,"mat-datepicker-toggle",5)(10,"mat-datepicker",null,0),E(12,aye,7,9,"mat-error"),r()(),l(13,"mat-card-actions",6)(14,"button",7),c(15),p(16,"translate"),r(),l(17,"button",8),c(18),p(19,"translate"),r()()()()()}if(n&2){let s=xe(11);a(2),g("formGroup",i.reactivateClientForm),a(4),h(m(7,11,"labels.inputs.Re Activation On Date")),a(2),g("min",i.minDate)("max",i.maxDate)("matDatepicker",s),a(),g("for",s),a(3),I(i.reactivateClientForm.controls.reactivationDate.hasError("required")?12:-1),a(2),g("routerLink",oe(17,oye)),a(),v(" ",m(16,13,"labels.buttons.Cancel")," "),a(2),g("disabled",!i.reactivateClientForm.valid),a(),v(" ",m(19,15,"labels.buttons.Confirm")," ")}},dependencies:[ue,fe,tt,st,Ue,Xe,dt,Ze,et,Ae,$e,Je,Et,Fe,Be,ut,ai,ze,mi,di,pi,ve,he],styles:[".container[_ngcontent-%COMP%]{max-width:37rem}"]})}}return e})();var rye=()=>["../../"];function lye(e,o){e&1&&(l(0,"mat-error"),c(1),p(2,"translate"),p(3,"translate"),l(4,"strong"),c(5),p(6,"translate"),r()()),e&2&&(a(),le(" ",m(2,3,"labels.inputs.Reopened On Date")," ",m(3,5,"labels.commons.is")," "),a(4),h(m(6,7,"labels.commons.required")))}var s2=(()=>{class e{constructor(){this.formBuilder=T(nt),this.clientsService=T(Oi),this.dateUtils=T(Zt),this.route=T(Ie),this.router=T(qe),this.settingsService=T(At),this.minDate=new Date(2e3,0,1),this.maxDate=new Date,this.clientId=this.route.parent.snapshot.params.clientId}ngOnInit(){this.maxDate=this.settingsService.businessDate,this.createUndoClientRejectionForm()}createUndoClientRejectionForm(){this.undoClientRejectionForm=this.formBuilder.group({reopenedDate:["",se.required]})}submit(){let t=this.undoClientRejectionForm.value,n=this.settingsService.language.code,i=this.settingsService.dateFormat,s=this.undoClientRejectionForm.value.reopenedDate;t.reopenedDate instanceof Date&&(t.reopenedDate=this.dateUtils.formatDate(s,i));let d=qt(at({},t),{dateFormat:i,locale:n});this.clientsService.executeClientCommand(this.clientId,"undoRejection",d).subscribe(()=>{this.router.navigate(["../../"],{relativeTo:this.route})})}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275cmp=me({type:e,selectors:[["mifosx-undo-client-rejection"]],decls:20,vars:18,consts:[["reopenedDatePicker",""],[1,"container"],[3,"ngSubmit","formGroup"],[1,"flex-fill",3,"click"],["matInput","","required","","formControlName","reopenedDate",3,"min","max","matDatepicker"],["matSuffix","",3,"for"],[1,"layout-row","align-center","gap-5px","responsive-column"],["type","button","mat-raised-button","",3,"routerLink"],["mat-raised-button","","color","primary",3,"disabled"]],template:function(n,i){if(n&1){let s=Y();l(0,"div",1)(1,"mat-card")(2,"form",2),R("ngSubmit",function(){return V(s),q(i.submit())}),l(3,"mat-card-content")(4,"mat-form-field",3),R("click",function(){V(s);let u=xe(11);return q(u.open())}),l(5,"mat-label"),c(6),p(7,"translate"),r(),b(8,"input",4)(9,"mat-datepicker-toggle",5)(10,"mat-datepicker",null,0),E(12,lye,7,9,"mat-error"),r()(),l(13,"mat-card-actions",6)(14,"button",7),c(15),p(16,"translate"),r(),l(17,"button",8),c(18),p(19,"translate"),r()()()()()}if(n&2){let s=xe(11);a(2),g("formGroup",i.undoClientRejectionForm),a(4),h(m(7,11,"labels.inputs.Reopened On Date")),a(2),g("min",i.minDate)("max",i.maxDate)("matDatepicker",s),a(),g("for",s),a(3),I(i.undoClientRejectionForm.controls.reopenedDate.hasError("required")?12:-1),a(2),g("routerLink",oe(17,rye)),a(),v(" ",m(16,13,"labels.buttons.Cancel")," "),a(2),g("disabled",!i.undoClientRejectionForm.valid),a(),v(" ",m(19,15,"labels.buttons.Confirm")," ")}},dependencies:[ue,fe,tt,st,Ue,Xe,dt,Ze,et,Ae,$e,Je,Et,Fe,Be,ut,ai,ze,mi,di,pi,ve,he],styles:[".container[_ngcontent-%COMP%]{max-width:37rem}"]})}}return e})();var sye=()=>["../../"];function cye(e,o){if(e&1&&(l(0,"mat-option",6),c(1),r()),e&2){let t=o.$implicit;g("value",t.id),a(),v(" ",t.name+" ("+t.currency.name+")"," ")}}function pye(e,o){e&1&&(l(0,"mat-error"),c(1),p(2,"translate"),p(3,"translate"),l(4,"strong"),c(5),p(6,"translate"),r()()),e&2&&(a(),le(" ",m(2,3,"labels.inputs.Charge")," ",m(3,5,"labels.commons.is")," "),a(4),h(m(6,7,"labels.commons.required")))}function mye(e,o){e&1&&(l(0,"mat-error"),c(1),p(2,"translate"),p(3,"translate"),l(4,"strong"),c(5),p(6,"translate"),r()()),e&2&&(a(),le(" ",m(2,3,"labels.inputs.Amount")," ",m(3,5,"labels.commons.is")," "),a(4),h(m(6,7,"labels.commons.required")))}function dye(e,o){if(e&1&&(l(0,"mat-option",6),c(1),r()),e&2){let t=o.$implicit;g("value",t.id),a(),v(" ",t.value," ")}}function uye(e,o){if(e&1&&(l(0,"mat-option",6),c(1),r()),e&2){let t=o.$implicit;g("value",t.id),a(),v(" ",t.value," ")}}function fye(e,o){e&1&&(l(0,"mat-error"),c(1),p(2,"translate"),p(3,"translate"),l(4,"strong"),c(5),p(6,"translate"),r()()),e&2&&(a(),le(" ",m(2,3,"labels.inputs.Due for collection on")," ",m(3,5,"labels.commons.is")," "),a(4),h(m(6,7,"labels.commons.required")))}function hye(e,o){if(e&1){let t=Y();l(0,"mat-form-field",13),R("click",function(){V(t);let i=xe(7);return q(i.open())}),l(1,"mat-label"),c(2),p(3,"translate"),r(),b(4,"input",14)(5,"mat-datepicker-toggle",15)(6,"mat-datepicker",null,0),E(8,fye,7,9,"mat-error"),r()}if(e&2){let t=xe(7),n=w(2);a(2),h(m(3,6,"labels.inputs.Due for collection on")),a(2),g("min",n.minDate)("max",n.maxDate)("matDatepicker",t),a(),g("for",t),a(3),I(n.clientChargeForm.controls.dueDate.hasError("required")?8:-1)}}function gye(e,o){e&1&&(l(0,"mat-error"),c(1),p(2,"translate"),p(3,"translate"),l(4,"strong"),c(5),p(6,"translate"),r()()),e&2&&(a(),le(" ",m(2,3,"labels.inputs.Due Date")," ",m(3,5,"labels.commons.is")," "),a(4),h(m(6,7,"labels.commons.required")))}function _ye(e,o){if(e&1){let t=Y();l(0,"mat-form-field",13),R("click",function(){V(t);let i=xe(7);return q(i.open())}),l(1,"mat-label"),c(2),p(3,"translate"),r(),b(4,"input",16)(5,"mat-datepicker-toggle",15)(6,"mat-datepicker",null,1),E(8,gye,7,9,"mat-error"),r()}if(e&2){let t=xe(7),n=w(2);a(2),h(m(3,6,"labels.inputs.Due On")),a(2),g("min",n.minDate)("max",n.maxDate)("matDatepicker",t),a(),g("for",t),a(3),I(n.clientChargeForm.controls.feeOnMonthDay.hasError("required")?8:-1)}}function Cye(e,o){e&1&&(l(0,"mat-form-field")(1,"mat-label"),c(2),p(3,"translate"),r(),b(4,"input",17),r()),e&2&&(a(2),h(m(3,1,"labels.inputs.Repeats Every")))}function vye(e,o){if(e&1&&(l(0,"div",4)(1,"mat-form-field")(2,"mat-label"),c(3),p(4,"translate"),r(),b(5,"input",10),E(6,mye,7,9,"mat-error"),r(),l(7,"mat-form-field")(8,"mat-label"),c(9),p(10,"translate"),r(),l(11,"mat-select",11),Se(12,dye,2,2,"mat-option",6,Pe),r()(),l(14,"mat-form-field")(15,"mat-label"),c(16),p(17,"translate"),r(),l(18,"mat-select",12),Se(19,uye,2,2,"mat-option",6,Pe),r()(),E(21,hye,9,8,"mat-form-field"),E(22,_ye,9,8,"mat-form-field"),E(23,Cye,5,3,"mat-form-field"),r()),e&2){let t=w();a(3),h(m(4,7,"labels.inputs.Amount")),a(3),I(t.clientChargeForm.controls.amount.hasError("required")?6:-1),a(3),h(m(10,9,"labels.inputs.Charge Calculation")),a(3),we(t.chargeDetails.chargeCalculationTypeOptions),a(4),h(m(17,11,"labels.inputs.Charge time type")),a(3),we(t.chargeDetails.chargeTimeTypeOptions),a(2),I(t.clientChargeForm.contains("dueDate")?21:-1),a(),I(t.clientChargeForm.contains("feeOnMonthDay")?22:-1),a(),I(t.clientChargeForm.contains("feeInterval")?23:-1)}}var c2=(()=>{class e{constructor(){this.formBuilder=T(nt),this.route=T(Ie),this.router=T(qe),this.dateUtils=T(Zt),this.clientsService=T(Oi),this.settingsService=T(At),this.minDate=new Date(2e3,0,1),this.maxDate=new Date,this.route.data.subscribe(t=>{this.clientChargeOptions=t.clientActionData.chargeOptions}),this.clientId=this.route.parent.snapshot.params.clientId}ngOnInit(){this.maxDate=this.settingsService.maxFutureDate,this.createClientsChargeForm(),this.buildDependencies()}buildDependencies(){this.clientChargeForm.controls.chargeId.valueChanges.subscribe(t=>{this.clientsService.getChargeAndTemplate(t).subscribe(n=>{this.chargeDetails=n;let i=n.chargeTimeType.id;(n.chargeTimeType.value==="Withdrawal Fee"||n.chargeTimeType.value==="Saving No Activity Fee")&&(this.chargeDetails.dueDateNotRequired=!0),(n.chargeTimeType.value==="Annual Fee"||n.chargeTimeType.value==="Monthly Fee")&&(this.chargeDetails.chargeTimeTypeAnnualOrMonth=!0),!this.chargeDetails.dueDateNotRequired&&!this.chargeDetails.chargeTimeTypeAnnualOrMonth?this.clientChargeForm.addControl("dueDate",new it("",se.required)):this.clientChargeForm.removeControl("dueDate"),!this.chargeDetails.dueDateNotRequired&&this.chargeDetails.chargeTimeTypeAnnualOrMonth?this.clientChargeForm.addControl("feeOnMonthDay",new it("",se.required)):this.clientChargeForm.removeControl("feeOnMonthDay"),i.value==="Monthly Fee"?this.clientChargeForm.addControl("feeInterval",new it(n.feeInterval,se.required)):this.clientChargeForm.removeControl("feeInterval"),this.clientChargeForm.patchValue({amount:n.amount,chargeCalculationType:n.chargeCalculationType.id,chargeTimeType:n.chargeTimeType.id})})})}createClientsChargeForm(){this.clientChargeForm=this.formBuilder.group({chargeId:["",se.required],amount:["",se.required],chargeCalculationType:[{value:"",disabled:!0}],chargeTimeType:[{value:"",disabled:!0}]})}submit(){let t=this.clientChargeForm.value;if(t.locale=this.settingsService.language.code,t.feeInterval||(t.feeInterval=this.chargeDetails.feeInterval),this.chargeDetails.dueDateNotRequired!==!0)if(this.chargeDetails.chargeTimeTypeAnnualOrMonth===!0){let n="MMMM-dd";if(t.monthDayFormat=n,t.feeOnMonthDay){let i=this.clientChargeForm.value.feeOnMonthDay;t.feeOnMonthDay=this.dateUtils.formatDate(i,n)}}else{let n=this.settingsService.dateFormat;if(t.dateFormat=n,t.dueDate){let i=this.clientChargeForm.value.dueDate;t.dueDate=this.dateUtils.formatDate(i,n)}}this.clientsService.createClientCharge(this.clientId,t).subscribe(()=>{this.router.navigate(["../../"],{relativeTo:this.route})})}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275cmp=me({type:e,selectors:[["mifosx-add-client-charge"]],decls:21,vars:15,consts:[["dueDatePicker",""],["feeOnMonthDayPicker",""],[1,"container"],[3,"ngSubmit","formGroup"],[1,"layout-column"],["required","","formControlName","chargeId"],[3,"value"],[1,"layout-row","layout-xs-column","layout-align-center","gap-5px"],["type","button","mat-raised-button","",3,"routerLink"],["mat-raised-button","","color","primary",3,"disabled"],["type","number","required","","matInput","","formControlName","amount"],["formControlName","chargeCalculationType"],["formControlName","chargeTimeType"],[3,"click"],["matInput","","required","","formControlName","dueDate",3,"min","max","matDatepicker"],["matSuffix","",3,"for"],["matInput","","required","","formControlName","feeOnMonthDay",3,"min","max","matDatepicker"],["matInput","","formControlName","feeInterval"]],template:function(n,i){n&1&&(l(0,"div",2)(1,"mat-card")(2,"form",3),R("ngSubmit",function(){return i.submit()}),l(3,"mat-card-content")(4,"div",4)(5,"mat-form-field")(6,"mat-label"),c(7),p(8,"translate"),r(),l(9,"mat-select",5),Se(10,cye,2,2,"mat-option",6,Pe),r(),E(12,pye,7,9,"mat-error"),r(),E(13,vye,24,13,"div",4),r(),l(14,"mat-card-actions",7)(15,"button",8),c(16),p(17,"translate"),r(),l(18,"button",9),c(19),p(20,"translate"),r()()()()()()),n&2&&(a(2),g("formGroup",i.clientChargeForm),a(5),h(m(8,8,"labels.inputs.Charge")),a(3),we(i.clientChargeOptions),a(2),I(i.clientChargeForm.controls.chargeId.hasError("required")?12:-1),a(),I(i.chargeDetails?13:-1),a(2),g("routerLink",oe(14,sye)),a(),v(" ",m(17,10,"labels.buttons.Cancel")," "),a(2),g("disabled",!i.clientChargeForm.valid),a(),v(" ",m(20,12,"labels.buttons.Submit")," "))},dependencies:[ue,fe,tt,st,tn,Ue,Xe,dt,Ze,et,Ae,$e,Je,Et,Fe,Be,ut,ai,ze,gt,ft,mi,di,pi,ve,he],styles:[".container[_ngcontent-%COMP%]{width:37rem}"]})}}return e})();var xye=()=>["../../general"];function bye(e,o){if(e&1&&(l(0,"mat-option",5),c(1),r()),e&2){let t=o.$implicit;g("value",t),a(),v(" ",t.name," ")}}function yye(e,o){e&1&&(l(0,"h2"),c(1,"component[0].componentKey"),r())}function Sye(e,o){if(e&1&&(l(0,"mat-radio-button",12)(1,"span",13),c(2),r()()),e&2){let t=o.$implicit;g("value",t),a(2),v(" ",t.text," ")}}function wye(e,o){if(e&1&&(l(0,"div"),c(1),p(2,"translate"),r()),e&2){let t=w().$implicit;a(),le("",m(2,2,"labels.text.Your answer is"),": ",t.answer.text)}}function Pye(e,o){if(e&1){let t=Y();l(0,"div",9)(1,"mat-label",10),c(2),r(),l(3,"mat-radio-group",11),Rc("ngModelChange",function(i){let s=V(t).$implicit;return Bc(s.answer,i)||(s.answer=i),q(i)}),Se(4,Sye,3,2,"mat-radio-button",12,Pe),r()(),E(6,wye,3,4,"div")}if(e&2){let t=o.$implicit;a(2),h(t.text),a(),kc("ngModel",t.answer),a(),we(t.responseDatas),a(2),I(t.answer?6:-1)}}function Tye(e,o){if(e&1&&(E(0,yye,2,0,"h2"),l(1,"div",8),Se(2,Pye,7,3,null,null,Pe),r()),e&2){let t=o.$implicit;I(t[0].componentKey?0:-1),a(2),we(t)}}var p2=(()=>{class e{constructor(){this.route=T(Ie),this.clientsService=T(Oi),this.router=T(qe),this.authenticationService=T(Wo),this.route.data.subscribe(n=>{this.allSurveyData=n.clientActionData,this.clientId=this.route.parent.snapshot.params.clientId});let t=this.authenticationService.getCredentials();this.userId=t.userId}onSurveyChange(t){if(t.value){this.surveyData=t.value;let n=this.groupBy(this.surveyData.questionDatas,function(i){return[i.componentKey]});this.componentGroups=n}}groupBy(t,n){let i={};return t.forEach(s=>{let d=JSON.stringify(n(s));i[d]=i[d]||[],i[d].push(s)}),Object.keys(i).map(function(s){return i[s]})}isAnyResponse(){return this.surveyData&&this.surveyData.questionDatas.forEach(t=>{if(t.answer)return!1}),!0}submit(){this.formData={userId:this.userId,clientId:this.clientId,surveyId:this.surveyData.id,surveyName:"",username:"",id:0,scorecardValues:[]},this.surveyData.questionDatas.forEach(t=>{if(t.answer){let n={questionId:t.id,responseId:t.answer.id,value:t.answer.value,createdOn:new Date().getTime()};this.formData.scorecardValues.push(n)}}),this.clientsService.createNewSurvey(this.surveyData.id,this.formData).subscribe(()=>{this.router.navigate(["../../general"],{relativeTo:this.route})})}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275cmp=me({type:e,selectors:[["mifosx-take-survey"]],decls:19,vars:11,consts:[[1,"container","mat-typography"],[1,"mat-elevation-z2-surveycont"],[1,"survey-select","layout-row"],[1,"name-label"],[3,"selectionChange"],[3,"value"],["mat-raised-button","","color","danger",1,"button-cancel",3,"routerLink"],["mat-raised-button","","color","primary",1,"button-submit",3,"click"],[1,"layout-column","display-questions"],[1,"layout-row","question"],[1,"flex-40","question-text"],[1,"flex-60","radio-group-spacing",3,"ngModelChange","ngModel"],[1,"layout-column","radio-button",3,"value"],[1,"wrap-mat-radio-label"]],template:function(n,i){n&1&&(l(0,"div",0)(1,"div",1)(2,"div",2)(3,"mat-label",3),c(4),p(5,"translate"),r(),l(6,"mat-select",4),R("selectionChange",function(d){return i.onSurveyChange(d)}),Se(7,bye,2,2,"mat-option",5,Pe),r()(),b(9,"hr"),l(10,"div"),Se(11,Tye,4,1,null,null,Pe),r(),l(13,"button",6),c(14),p(15,"translate"),r(),l(16,"button",7),R("click",function(){return i.submit()}),c(17),p(18,"translate"),r()()()),n&2&&(a(4),h(m(5,4,"labels.inputs.Survey Name")),a(3),we(i.allSurveyData),a(4),we(i.componentGroups),a(2),g("routerLink",oe(10,xye)),a(),v(" ",m(15,6,"labels.buttons.Cancel")," "),a(3),v(" ",m(18,8,"labels.buttons.Submit")," "))},dependencies:[ue,fe,Ue,Ae,Be,gt,ft,ve,tr,ec,Sp,ir,he],styles:[".surveyOption[_ngcontent-%COMP%]{border:1px solid #cbcbcb;padding:5px}.display-questions[_ngcontent-%COMP%]{margin-top:20px}.question[_ngcontent-%COMP%]{padding:10px 0}.wrap-mat-radio-label[_ngcontent-%COMP%]{white-space:normal}.question-text[_ngcontent-%COMP%]{font-weight:700}.survey-select[_ngcontent-%COMP%]{height:40px;margin-bottom:20px}.name-label[_ngcontent-%COMP%]{width:25%}.surveyCont[_ngcontent-%COMP%]{padding:5%}.button-cancel[_ngcontent-%COMP%]{margin-left:35%}.button-submit[_ngcontent-%COMP%]{margin-left:2%}.radio-button[_ngcontent-%COMP%]{margin-bottom:5px;align-items:normal;white-space:normal}.radio-group-spacing[_ngcontent-%COMP%]{display:flex;gap:2rem;flex-direction:row}@media (width <= 768px){.radio-group-spacing[_ngcontent-%COMP%]{flex-direction:column}}"]})}}return e})();var Mye=["screenReport"],Dye=()=>["../../"];function Eye(e,o){if(e&1&&(l(0,"mat-option",6),c(1),r()),e&2){let t=o.$implicit;g("value",t.id),a(),v(" ",t.name," ")}}function Iye(e,o){e&1&&(l(0,"mat-error"),c(1),p(2,"translate"),p(3,"translate"),l(4,"strong"),c(5),p(6,"translate"),r()()),e&2&&(a(),le(" ",m(2,3,"labels.inputs.Screen Report")," ",m(3,5,"labels.commons.is")," "),a(4),h(m(6,7,"labels.commons.required")))}var m2=(()=>{class e{constructor(){this.formBuilder=T(nt),this.clientsService=T(Oi),this.route=T(Ie),this.sanitizer=T(Zs),this.renderer=T(_g),this.route.data.subscribe(t=>{this.templatesData=t.clientActionData}),this.clientId=this.route.parent.snapshot.params.clientId}ngOnInit(){this.createClientScreenReportForm()}createClientScreenReportForm(){this.clientScreenReportForm=this.formBuilder.group({templateId:[""]})}print(){let t=window.open("","Screen Report","height=400,width=600");t.document.write(""),t.document.write(""),t.document.write(this.template),t.document.write(""),t.print(),t.close()}generate(){let t=this.clientScreenReportForm.get("templateId").value;this.clientsService.retrieveClientReportTemplate(t,this.clientId).subscribe(n=>{this.template=this.sanitizer.sanitize(fF.HTML,n),this.renderer.setProperty(this.screenReportRef.nativeElement,"innerHTML",this.template)})}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275cmp=me({type:e,selectors:[["mifosx-client-screen-reports"]],viewQuery:function(n,i){if(n&1&&Ee(Mye,7),n&2){let s;Te(s=Me())&&(i.screenReportRef=s.first)}},decls:34,vars:21,consts:[["output",""],["screenReport",""],[1,"container","m-b-20"],[3,"ngSubmit","formGroup"],[1,"flex-fill"],["formControlName","templateId"],[3,"value"],[1,"layout-row","align-center","gap-5px","actions-spacing","responsive-column"],["type","button","mat-raised-button","",3,"routerLink"],["mat-raised-button","","color","primary",3,"disabled"],["icon","cogs","size","sm",1,"m-r-10"],[1,"container","m-t-20"],[1,"layout-column","gap-3percent"],[1,"layout-align-end"],["mat-stroked-button","","color","primary",3,"click","disabled"],["icon","file",1,"m-r-10"],[1,"layout-align-center"]],template:function(n,i){if(n&1){let s=Y();l(0,"div",2)(1,"mat-card")(2,"form",3),R("ngSubmit",function(){return V(s),q(i.generate())}),l(3,"mat-card-content")(4,"div")(5,"mat-form-field",4)(6,"mat-label"),c(7),p(8,"translate"),r(),l(9,"mat-select",5),Se(10,Eye,2,2,"mat-option",6,Pe),r(),E(12,Iye,7,9,"mat-error"),r()()(),l(13,"mat-card-actions",7)(14,"button",8),c(15),p(16,"translate"),r(),l(17,"button",9),b(18,"fa-icon",10),c(19),p(20,"translate"),r()()()()(),l(21,"div",11,0)(23,"mat-card",12)(24,"div",13)(25,"button",14),R("click",function(){return V(s),q(i.print())}),b(26,"fa-icon",15),c(27),p(28,"translate"),r()(),l(29,"div",16,1)(31,"p"),c(32),p(33,"translate"),r()()()()}n&2&&(a(2),g("formGroup",i.clientScreenReportForm),a(5),h(m(8,10,"labels.inputs.Client Screen Reports")),a(3),we(i.templatesData),a(2),I(i.clientScreenReportForm.controls.templateId.hasError("required")?12:-1),a(2),g("routerLink",oe(20,Dye)),a(),v(" ",m(16,12,"labels.buttons.Cancel")," "),a(2),g("disabled",!i.clientScreenReportForm.valid),a(2),v("",m(20,14,"labels.buttons.Generate Report")," "),a(6),g("disabled",!i.template),a(2),v(" ",m(28,16,"labels.buttons.Print")," "),a(5),h(m(33,18,"labels.text.Please select a screen report.")))},dependencies:[ue,fe,tt,Ue,Xe,Ze,et,Ae,$e,Je,Et,Fe,Be,ut,gt,ft,ve,ke,he],styles:[".container[_ngcontent-%COMP%]{max-width:37rem}.container[_ngcontent-%COMP%] .print[_ngcontent-%COMP%]{align-self:flex-end} mat-card{margin-bottom:1rem;padding:1rem;box-shadow:0 2px 4px #0000001a;border:1px solid var(--border-color, #ddd);border-radius:8px;background-color:var(--card-background, #fff);transition:background-color .3s ease,border-color .3s ease;height:10rem}.m-t-20[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{background-color:#1976d2;color:#fff} .container.m-t-20 mat-card p{display:block;margin-top:-1.9rem}.m-b-20[_ngcontent-%COMP%] form[_ngcontent-%COMP%]{margin-top:-1.5rem}.actions-spacing[_ngcontent-%COMP%]{margin-top:24px}"]})}}return e})();var ci=(()=>{class e{constructor(){this.http=T(ko),this.settingsService=T(At)}getLoanProducts(){return this.http.get("/loanproducts")}createLoanProduct(t){return this.http.post("/loanproducts",t)}getLoanProductsTemplate(){return this.http.get("/loanproducts/template")}getLoanProduct(t,n=!1){let i=new rn().set("template",n.toString());return this.http.get(`/loanproducts/${t}`,{params:i})}updateLoanProduct(t,n){return this.http.put(`/loanproducts/${t}`,n)}getSavingProducts(){return this.http.get("/savingsproducts")}createSavingProduct(t){return this.http.post("/savingsproducts",t)}getSavingProductsTemplate(){return this.http.get("/savingsproducts/template")}getSavingProduct(t,n=!1){let i=new rn().set("template",n.toString());return this.http.get(`/savingsproducts/${t}`,{params:i})}updateSavingProduct(t,n){return this.http.put(`/savingsproducts/${t}`,n)}getShareProducts(){return this.http.get("/products/share")}createShareProduct(t){return this.http.post("/products/share",t)}getShareProductsTemplate(){return this.http.get("/products/share/template")}getShareProduct(t,n=!1){let i=new rn().set("template",n.toString());return this.http.get(`/products/share/${t}`,{params:i})}updateShareProduct(t,n){return this.http.put(`/products/share/${t}`,n)}getDividends(t){return this.http.get(`/shareproduct/${t}/dividend`)}createDividend(t,n){return this.http.post(`/shareproduct/${t}/dividend`,n)}getDividendData(t,n){let i=new rn().set("dateFormat",this.settingsService.dateFormat).set("limit","10").set("locale",this.settingsService.language.code).set("offset","0");return this.http.get(`/shareproduct/${t}/dividend/${n}`,{params:i})}approveDividend(t,n,i){let s=new rn().set("command","approve");return this.http.put(`/shareproduct/${t}/dividend/${n}`,i,{params:s})}getRecurringDepositProducts(){return this.http.get("/recurringdepositproducts")}getRecurringDepositProduct(t,n=!1){let i=new rn().set("template",n.toString());return this.http.get(`/recurringdepositproducts/${t}`,{params:i})}getRecurringDepositProductsTemplate(){return this.http.get("/recurringdepositproducts/template")}getCharges(){return this.http.get("/charges")}getChargesTemplate(){return this.http.get("/charges/template")}getCharge(t,n=!1){let i=new rn().set("template",n.toString());return this.http.get(`/charges/${t}`,{params:i})}updateCharge(t,n){return this.http.put(`/charges/${t}`,n)}deleteCharge(t){return this.http.delete(`/charges/${t}`)}createCharge(t){return this.http.post("/charges",t)}getFixedDepositProducts(){return this.http.get("/fixeddepositproducts")}createFixedDepositProduct(t){return this.http.post("/fixeddepositproducts",t)}getFixedDepositProductsTemplate(){return this.http.get("/fixeddepositproducts/template")}getFixedDepositProduct(t){return this.http.get(`/fixeddepositproducts/${t}`)}getFixedDepositProductAndTemplate(t){let n=new rn().set("template","true");return this.http.get(`/fixeddepositproducts/${t}`,{params:n})}updateFixedDepositProduct(t,n){return this.http.put(`/fixeddepositproducts/${t}`,n)}getTaxComponents(){return this.http.get("/taxes/component")}getTaxComponent(t){return this.http.get(`/taxes/component/${t}`)}getTaxComponentTemplate(){return this.http.get("/taxes/component/template")}createTaxComponent(t){return this.http.post("/taxes/component",t)}updateTaxComponent(t,n){return this.http.put(`/taxes/component/${t}`,n)}getTaxGroups(){return this.http.get("/taxes/group")}getTaxGroup(t,n){let i=new rn().set("template",n);return this.http.get(`/taxes/group/${t}`,{params:i})}getTaxGroupTemplate(){return this.http.get("/taxes/group/template")}createTaxGroup(t){return this.http.post("/taxes/group",t)}updateTaxGroup(t,n){return this.http.put(`/taxes/group/${t}`,n)}getDelinquencyRanges(){return this.http.get("/delinquency/ranges")}getDelinquencyRange(t){return this.http.get(`/delinquency/ranges/${t}`)}createDelinquencyRange(t){return this.http.post("/delinquency/ranges",t)}updateDelinquencyRange(t,n){return this.http.put(`/delinquency/ranges/${t}`,n)}deleteDelinquencyRange(t){return this.http.delete(`/delinquency/ranges/${t}`)}getDelinquencyBuckets(){return this.http.get("/delinquency/buckets")}getDelinquencyBucket(t){return this.http.get(`/delinquency/buckets/${t}`)}createDelinquencyBucket(t){return this.http.post("/delinquency/buckets",t)}updateDelinquencyBucket(t,n){return this.http.put(`/delinquency/buckets/${t}`,n)}deleteDelinquencyBucket(t){return this.http.delete(`/delinquency/buckets/${t}`)}getProductMixes(){let t=new rn;return t=t.set("associations","productMixes"),this.http.get("/loanproducts",{params:t})}getFloatingRates(){return this.http.get("/floatingrates")}createFloatingRate(t){return this.http.post("/floatingrates",t)}getFloatingRate(t){return this.http.get(`/floatingrates/${t}`)}updateFloatingRate(t,n){return this.http.put(`/floatingrates/${t}`,n)}getProductMix(t){return this.http.get(`/loanproducts/${t}/productmix`)}getProductsMixTemplate(){let t=new rn;return t=t.set("isProductMixTemplate","true"),this.http.get("/loanproducts/template",{params:t})}getProductMixTemplate(t){let n=new rn;return n=n.set("template","true"),this.http.get(`/loanproducts/${t}/productmix`,{params:n})}createProductMix(t,n){return this.http.post(`/loanproducts/${n}/productmix`,t)}updateProductMix(t,n){return this.http.put(`/loanproducts/${n}/productmix`,t)}deleteProductMix(t){return this.http.delete(`/loanproducts/${t}/productmix`)}getAllInterestRateCharts(t){let n=new rn().set("productId",t);return this.http.get("/interestratecharts",{params:n})}createRecurringDepositProduct(t){return this.http.post("/recurringdepositproducts",t)}getRecurringDepositProductAndTemplate(t){let n=new rn().set("template","true");return this.http.get(`/recurringdepositproducts/${t}`,{params:n})}updateRecurringDepositProduct(t,n){return this.http.put(`/recurringdepositproducts/${t}`,n)}getCollaterals(){return this.http.get("/collateral-management")}getCollateralTemplate(){return this.http.get("/collateral-management/template")}getCollateral(t,n=!1){let i=new rn().set("template",n.toString());return this.http.get(`/collateral-management/${t}`,{params:i})}updateCollateral(t,n){return this.http.put(`/collateral-management/${t}`,n)}deleteCollateral(t){return this.http.delete(`/collateral-management/${t}`)}createCollateral(t){return this.http.post("/collateral-management",t)}getProductDatatables(t){let n=new rn().set("apptable",t);return this.http.get("/datatables",{params:n})}getProductDatatable(t,n){let i=new rn().set("genericResultSet","true");return this.http.get(`/datatables/${n}/${t}`,{params:i})}addProductDatatableEntry(t,n,i){let s=new rn().set("genericResultSet","true");return this.http.post(`/datatables/${n}/${t}`,i,{params:s})}editProductDatatableEntry(t,n,i){let s=new rn().set("genericResultSet","true");return this.http.put(`/datatables/${n}/${t}`,i,{params:s})}deleteDatatableContent(t,n){let i=new rn().set("genericResultSet","true");return this.http.delete(`/datatables/${n}/${t}`,{params:i})}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275prov=Re({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();var Oye=()=>["../../"];function Aye(e,o){if(e&1&&(l(0,"mat-option",4),c(1),r()),e&2){let t=o.$implicit;g("value",t.id),a(),v(" ",t.name," ")}}function Fye(e,o){e&1&&(l(0,"mat-error"),c(1),p(2,"translate"),p(3,"translate"),l(4,"strong"),c(5),p(6,"translate"),r()()),e&2&&(a(),le(" ",m(2,3,"labels.inputs.Collateral")," ",m(3,5,"labels.commons.is")," "),a(4),h(m(6,7,"labels.commons.required")))}function kye(e,o){e&1&&(l(0,"mat-error"),c(1),p(2,"translate"),p(3,"translate"),l(4,"strong"),c(5),p(6,"translate"),r()()),e&2&&(a(),le(" ",m(2,3,"labels.inputs.Quantity")," ",m(3,5,"labels.commons.is")," "),a(4),h(m(6,7,"labels.commons.required")))}function Bye(e,o){if(e&1&&(l(0,"div",2)(1,"mat-form-field")(2,"mat-label"),c(3),p(4,"translate"),r(),b(5,"input",8),r(),l(6,"mat-form-field")(7,"mat-label"),c(8),p(9,"translate"),r(),b(10,"input",9),r(),l(11,"mat-form-field")(12,"mat-label"),c(13),p(14,"translate"),r(),b(15,"input",10),r(),l(16,"mat-form-field")(17,"mat-label"),c(18),p(19,"translate"),r(),b(20,"input",11),r(),l(21,"mat-form-field")(22,"mat-label"),c(23),p(24,"translate"),r(),b(25,"input",12),r(),l(26,"mat-form-field")(27,"mat-label"),c(28),p(29,"translate"),r(),b(30,"input",13),E(31,kye,7,9,"mat-error"),r(),l(32,"mat-form-field")(33,"mat-label"),c(34),p(35,"translate"),r(),b(36,"input",14),r(),l(37,"mat-form-field")(38,"mat-label"),c(39),p(40,"translate"),r(),b(41,"input",15),r()()),e&2){let t=w();a(3),h(m(4,9,"labels.inputs.name")),a(5),h(m(9,11,"labels.inputs.Type/Quality")),a(5),h(m(14,13,"labels.inputs.Unit Type")),a(5),h(m(19,15,"labels.inputs.Base Price")),a(5),h(m(24,17,"labels.inputs.Percentage To Base")),a(5),h(m(29,19,"labels.inputs.Quantity")),a(3),I(t.clientCollateralForm.controls.quantity.hasError("required")?31:-1),a(3),h(m(35,21,"labels.inputs.Total")),a(5),h(m(40,23,"labels.inputs.Total Collateral Value"))}}var d2=(()=>{class e{constructor(){this.formBuilder=T(nt),this.route=T(Ie),this.router=T(qe),this.productsService=T(ci),this.clientsService=T(Oi),this.settingsService=T(At),this.route.data.subscribe(t=>{this.clientCollateralOptions=t.clientActionData}),this.clientId=this.route.parent.snapshot.params.clientId}ngOnInit(){this.createClientCollateralForm(),this.buildDependencies()}buildDependencies(){this.clientCollateralForm.controls.collateralId.valueChanges.subscribe(t=>{this.productsService.getCollateral(t).subscribe(n=>{this.collateralDetails=n,this.clientCollateralForm.patchValue({name:n.name,quality:n.quality,unitType:n.unitType,basePrice:this.collateralDetails.basePrice,pctToBase:this.collateralDetails.pctToBase})})}),this.clientCollateralForm.controls.quantity.valueChanges.subscribe(t=>{this.clientCollateralForm.patchValue({totalValue:this.collateralDetails.basePrice*t,totalCollateralValue:this.collateralDetails.basePrice*this.collateralDetails.pctToBase*t/100})})}createClientCollateralForm(){this.clientCollateralForm=this.formBuilder.group({collateralId:["",se.required],quantity:["",se.required],name:[{value:"",disabled:!0}],quality:[{value:"",disabled:!0}],unitType:[{value:"",disabled:!0}],basePrice:[{value:"",disabled:!0}],pctToBase:[{value:"",disabled:!0}],totalValue:[{value:"",disabled:!0}],totalCollateralValue:[{value:"",disabled:!0}]})}submit(){let t=this.clientCollateralForm.value.collateralId,n=this.clientCollateralForm.value.quantity,i=this.settingsService.language.code,s={collateralId:t,quantity:n,locale:i};this.clientsService.createClientCollateral(this.clientId,s).subscribe(()=>{this.router.navigate(["../../"],{relativeTo:this.route})})}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275cmp=me({type:e,selectors:[["mifosx-add-client-collateral"]],decls:21,vars:15,consts:[[1,"container"],[3,"ngSubmit","formGroup"],[1,"layout-column"],["required","","formControlName","collateralId"],[3,"value"],[1,"layout-row","layout-xs-column","layout-align-center","gap-5px"],["type","button","mat-raised-button","",3,"routerLink"],["mat-raised-button","","color","primary",3,"disabled"],["matInput","","required","","formControlName","name"],["matInput","","required","","formControlName","quality"],["matInput","","required","","formControlName","unitType"],["matInput","","required","","formControlName","basePrice"],["matInput","","required","","formControlName","pctToBase"],["matInput","","required","","formControlName","quantity"],["matInput","","required","","formControlName","totalValue"],["matInput","","required","","formControlName","totalCollateralValue"]],template:function(n,i){n&1&&(l(0,"div",0)(1,"mat-card")(2,"form",1),R("ngSubmit",function(){return i.submit()}),l(3,"mat-card-content")(4,"div",2)(5,"mat-form-field")(6,"mat-label"),c(7),p(8,"translate"),r(),l(9,"mat-select",3),Se(10,Aye,2,2,"mat-option",4,Pe),r(),E(12,Fye,7,9,"mat-error"),r(),E(13,Bye,42,25,"div",2),r()(),l(14,"mat-card-actions",5)(15,"button",6),c(16),p(17,"translate"),r(),l(18,"button",7),c(19),p(20,"translate"),r()()()()()),n&2&&(a(2),g("formGroup",i.clientCollateralForm),a(5),h(m(8,8,"labels.inputs.Collateral")),a(3),we(i.clientCollateralOptions),a(2),I(i.clientCollateralForm.controls.collateralId.hasError("required")?12:-1),a(),I(i.collateralDetails?13:-1),a(2),g("routerLink",oe(14,Oye)),a(),v(" ",m(17,10,"labels.buttons.Cancel")," "),a(2),g("disabled",!i.clientCollateralForm.valid),a(),v(" ",m(20,12,"labels.buttons.Submit")," "))},dependencies:[ue,fe,tt,st,Ue,Xe,dt,Ze,et,Ae,$e,Je,Et,Fe,Be,ut,ze,gt,ft,ve,he],styles:[".container[_ngcontent-%COMP%]{width:37rem}"]})}}return e})();function Rye(e,o){e&1&&b(0,"mifosx-client-assign-staff")}function Nye(e,o){e&1&&b(0,"mifosx-close-client")}function Lye(e,o){e&1&&b(0,"mifosx-view-survey")}function Vye(e,o){e&1&&b(0,"mifosx-reject-client")}function qye(e,o){e&1&&b(0,"mifosx-activate-client")}function zye(e,o){e&1&&b(0,"mifosx-withdraw-client")}function Hye(e,o){e&1&&b(0,"mifosx-update-client-savings-account")}function Gye(e,o){e&1&&b(0,"mifosx-transfer-client")}function jye(e,o){e&1&&b(0,"mifosx-undo-client-transfer")}function $ye(e,o){e&1&&b(0,"mifosx-reject-client-transfer")}function Uye(e,o){e&1&&b(0,"mifosx-accept-client-transfer")}function Wye(e,o){e&1&&b(0,"mifosx-reactivate-client")}function Qye(e,o){e&1&&b(0,"mifosx-undo-client-rejection")}function Yye(e,o){e&1&&b(0,"mifosx-add-client-charge")}function Jye(e,o){e&1&&b(0,"mifosx-take-survey")}function Kye(e,o){e&1&&b(0,"mifosx-client-screen-reports")}function Xye(e,o){e&1&&b(0,"mifosx-add-client-collateral")}var u2=(()=>{class e{constructor(){this.route=T(Ie),this.router=T(qe),this.actions={"Assign Staff":!1,Close:!1,Reject:!1,Survey:!1,Withdraw:!1,"Update Default Savings":!1,"Transfer Client":!1,"Undo Transfer":!1,"Accept Transfer":!1,"Reject Transfer":!1,Reactivate:!1,Activate:!1,"Undo Rejection":!1,"Add Charge":!1,"Take Survey":!1,"Client Screen Reports":!1,"Create Collateral":!1},this.router.routeReuseStrategy.shouldReuseRoute=()=>!1;let t=this.route.snapshot.params.name;this.actions[t]=!0}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275cmp=me({type:e,selectors:[["mifosx-client-actions"]],decls:17,vars:17,template:function(n,i){n&1&&(E(0,Rye,1,0,"mifosx-client-assign-staff"),E(1,Nye,1,0,"mifosx-close-client"),E(2,Lye,1,0,"mifosx-view-survey"),E(3,Vye,1,0,"mifosx-reject-client"),E(4,qye,1,0,"mifosx-activate-client"),E(5,zye,1,0,"mifosx-withdraw-client"),E(6,Hye,1,0,"mifosx-update-client-savings-account"),E(7,Gye,1,0,"mifosx-transfer-client"),E(8,jye,1,0,"mifosx-undo-client-transfer"),E(9,$ye,1,0,"mifosx-reject-client-transfer"),E(10,Uye,1,0,"mifosx-accept-client-transfer"),E(11,Wye,1,0,"mifosx-reactivate-client"),E(12,Qye,1,0,"mifosx-undo-client-rejection"),E(13,Yye,1,0,"mifosx-add-client-charge"),E(14,Jye,1,0,"mifosx-take-survey"),E(15,Kye,1,0,"mifosx-client-screen-reports"),E(16,Xye,1,0,"mifosx-add-client-collateral")),n&2&&(I(i.actions["Assign Staff"]?0:-1),a(),I(i.actions.Close?1:-1),a(),I(i.actions.Survey?2:-1),a(),I(i.actions.Reject?3:-1),a(),I(i.actions.Activate?4:-1),a(),I(i.actions.Withdraw?5:-1),a(),I(i.actions["Update Default Savings"]?6:-1),a(),I(i.actions["Transfer Client"]?7:-1),a(),I(i.actions["Undo Transfer"]?8:-1),a(),I(i.actions["Reject Transfer"]?9:-1),a(),I(i.actions["Accept Transfer"]?10:-1),a(),I(i.actions.Reactivate?11:-1),a(),I(i.actions["Undo Rejection"]?12:-1),a(),I(i.actions["Add Charge"]?13:-1),a(),I(i.actions["Take Survey"]?14:-1),a(),I(i.actions["Client Screen Reports"]?15:-1),a(),I(i.actions["Create Collateral"]?16:-1))},dependencies:[ue,fe,JC,KC,XC,ZC,e2,t2,i2,n2,o2,a2,r2,l2,s2,c2,p2,m2,d2],encapsulation:2})}}return e})();var Zye=()=>["../../","general"],e3e=()=>["pay"],Z0=e=>({strikeoff:e});function t3e(e,o){e&1&&(l(0,"button",12),b(1,"fa-icon",13),c(2),p(3,"translate"),r()),e&2&&(g("routerLink",oe(4,e3e)),a(2),v(" ",m(3,2,"labels.buttons.Pay")," "))}function i3e(e,o){if(e&1){let t=Y();l(0,"button",3),R("click",function(){V(t);let i=w();return q(i.waiveCharge())}),b(1,"i",14),c(2),p(3,"translate"),r()}e&2&&(a(2),v(" ",m(3,1,"labels.buttons.Waive Charge")," "))}function n3e(e,o){e&1&&(l(0,"th",25),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.ID")))}function o3e(e,o){if(e&1&&(l(0,"td",26),c(1),r()),e&2){let t=o.$implicit;g("ngClass",Nt(2,Z0,t.reversed)),a(),h(t.id)}}function a3e(e,o){e&1&&(l(0,"th",25),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.Office Name")))}function r3e(e,o){if(e&1&&(l(0,"td",26),c(1),r()),e&2){let t=o.$implicit;g("ngClass",Nt(2,Z0,t.reversed)),a(),v(" ",t.officeName," ")}}function l3e(e,o){e&1&&(l(0,"th",25),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.Type")))}function s3e(e,o){if(e&1&&(l(0,"td",26),c(1),r()),e&2){let t=o.$implicit;g("ngClass",Nt(2,Z0,t.reversed)),a(),v(" ",t.type.value," ")}}function c3e(e,o){e&1&&(l(0,"th",25),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.Transaction Date")))}function p3e(e,o){if(e&1&&(l(0,"td",26),c(1),p(2,"dateFormat"),r()),e&2){let t=o.$implicit;g("ngClass",Nt(4,Z0,t.reversed)),a(),v(" ",m(2,2,t.date)," ")}}function m3e(e,o){e&1&&(l(0,"th",25),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.Amount")))}function d3e(e,o){if(e&1&&(l(0,"td",26),c(1),p(2,"formatNumber"),r()),e&2){let t=o.$implicit;g("ngClass",Nt(4,Z0,t.reversed)),a(),v(" ",m(2,2,t.amount)," ")}}function u3e(e,o){e&1&&(l(0,"th",25),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.Actions")))}function f3e(e,o){if(e&1){let t=Y();l(0,"td",26)(1,"button",27),R("click",function(){let i=V(t).$implicit,s=w(2);return q(s.undoTransaction(i.id))}),b(2,"fa-icon",4),r()()}if(e&2){let t=o.$implicit;g("ngClass",Nt(1,Z0,t.reversed))}}function h3e(e,o){e&1&&b(0,"tr",28)}function g3e(e,o){e&1&&b(0,"tr",29)}function _3e(e,o){if(e&1&&(l(0,"table",9),X(1,15),F(2,n3e,3,3,"th",16)(3,o3e,2,4,"td",17),Z(),X(4,18),F(5,a3e,3,3,"th",16)(6,r3e,2,4,"td",17),Z(),X(7,19),F(8,l3e,3,3,"th",16)(9,s3e,2,4,"td",17),Z(),X(10,20),F(11,c3e,3,3,"th",16)(12,p3e,3,6,"td",17),Z(),X(13,21),F(14,m3e,3,3,"th",16)(15,d3e,3,6,"td",17),Z(),X(16,22),F(17,u3e,3,3,"th",16)(18,f3e,3,3,"td",17),Z(),F(19,h3e,1,0,"tr",23)(20,g3e,1,0,"tr",24),r()),e&2){let t=w();g("dataSource",t.chargeData.clientTransactionDatas),a(19),g("matHeaderRowDef",t.viewChargeTableColumns),a(),g("matRowDefColumns",t.viewChargeTableColumns)}}var f2=(()=>{class e{constructor(){this.route=T(Ie),this.router=T(qe),this.clientService=T(Oi),this.viewChargeTableColumns=["id","officeName","type","transactionDate","amount","actions"],this.route.data.subscribe(t=>{this.chargeData=t.clientChargeData})}waiveCharge(){let t={clientId:this.chargeData.clientId,resourceType:this.chargeData.id};this.clientService.waiveClientCharge(t).subscribe(()=>{this.getChargeData()})}undoTransaction(t){let n={clientId:this.chargeData.clientId.toString(),transactionId:t};this.clientService.undoTransaction(n).subscribe(()=>{this.getChargeData()})}getChargeData(){this.clientService.getSelectedChargeData(this.chargeData.clientId,this.chargeData.id).subscribe(t=>{this.chargeData=t})}deleteCharge(){this.clientService.deleteCharge(this.chargeData.clientId,this.chargeData.id).subscribe(()=>{this.router.navigate(["../../clients",this.chargeData.clientId,"general"])})}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275cmp=me({type:e,selectors:[["mifosx-view-charge"]],decls:77,vars:52,consts:[[1,"layout-row","align-end","gap-2px","responsive-column","container","m-b-20"],["mat-raised-button","","color","primary",3,"routerLink",4,"mifosxHasPermission"],["mat-raised-button","","color","primary",3,"click",4,"mifosxHasPermission"],["mat-raised-button","","color","primary",3,"click"],["icon","trash",1,"m-r-10"],[1,"container"],[1,"fa","fa-stop",3,"ngClass"],[1,"share-account-tables","p-t-20","layout-row-wrap","flex-50"],[1,"layout-row-wrap"],["mat-table","",3,"dataSource"],[1,"layout-row","align-center","gap-5px","responsive-column"],["type","button","mat-raised-button","",3,"routerLink"],["mat-raised-button","","color","primary",3,"routerLink"],["icon","dollar-sign",1,"m-r-10"],[1,"fa","fa-flag"],["matColumnDef","id"],["mat-header-cell","",4,"matHeaderCellDef"],["mat-cell","",3,"ngClass",4,"matCellDef"],["matColumnDef","officeName"],["matColumnDef","type"],["matColumnDef","transactionDate"],["matColumnDef","amount"],["matColumnDef","actions"],["mat-header-row","",4,"matHeaderRowDef"],["mat-row","",4,"matRowDef","matRowDefColumns"],["mat-header-cell",""],["mat-cell","",3,"ngClass"],["mat-raised-button","","color","primary",1,"del-btn",3,"click"],["mat-header-row",""],["mat-row",""]],template:function(n,i){n&1&&(l(0,"div",0),F(1,t3e,4,5,"button",1)(2,i3e,4,3,"button",2),l(3,"button",3),R("click",function(){return i.deleteCharge()}),b(4,"fa-icon",4),c(5),p(6,"translate"),r()(),l(7,"div",5)(8,"mat-card")(9,"mat-card-title"),b(10,"i",6),p(11,"statusLookup"),c(12),r(),b(13,"mat-divider"),l(14,"mat-card-content")(15,"div",7)(16,"table")(17,"tbody")(18,"tr")(19,"td"),c(20),p(21,"translate"),r(),l(22,"td"),c(23),r()(),l(24,"tr")(25,"td"),c(26),p(27,"translate"),r(),l(28,"td"),c(29),r()(),l(30,"tr")(31,"td"),c(32),p(33,"translate"),r(),l(34,"td"),c(35),r()(),l(36,"tr")(37,"td"),c(38),p(39,"translate"),r(),l(40,"td"),c(41),p(42,"dateFormat"),r()(),l(43,"tr")(44,"td"),c(45),p(46,"translate"),r(),l(47,"td"),c(48),r()(),l(49,"tr")(50,"td"),c(51),p(52,"translate"),r(),l(53,"td"),c(54),r()(),l(55,"tr")(56,"td"),c(57),p(58,"translate"),r(),l(59,"td"),c(60),r()(),l(61,"tr")(62,"td"),c(63),p(64,"translate"),r(),l(65,"td"),c(66),r()()()()()(),l(67,"div",8)(68,"h1")(69,"b"),c(70),p(71,"translate"),r()(),E(72,_3e,21,3,"table",9),r(),l(73,"mat-card-actions",10)(74,"button",11),c(75),p(76,"translate"),r()()()()),n&2&&(a(),g("mifosxHasPermission","PAY_CLIENTCHARGE"),a(),g("mifosxHasPermission","WAIVE_CLIENTCHARGE"),a(3),v(" ",m(6,25,"labels.buttons.Delete")," "),a(5),g("ngClass",m(11,27,!(i.chargeData.isWaived||i.chargeData.isPaid))),a(2),v(" ",i.chargeData.name," "),a(8),h(m(21,29,"labels.inputs.Currency")),a(3),h(i.chargeData.currency.name),a(3),h(m(27,31,"labels.inputs.Charge Time Type")),a(3),h(i.chargeData.chargeTimeType.value),a(3),h(m(33,33,"labels.inputs.Charge Calculation Type")),a(3),h(i.chargeData.chargeCalculationType.value),a(3),h(m(39,35,"labels.inputs.Due as of")),a(3),h(m(42,37,i.chargeData.dueDate)),a(4),h(m(46,39,"labels.inputs.Due")),a(3),h(i.chargeData.amount),a(3),h(m(52,41,"labels.inputs.Paid")),a(3),h(i.chargeData.amountPaid),a(3),h(m(58,43,"labels.inputs.Waived")),a(3),h(i.chargeData.amountWaived),a(3),h(m(64,45,"labels.inputs.Outstanding")),a(3),h(i.chargeData.amountOutstanding),a(4),v(" ",m(71,47,"labels.heading.Transactions")," "),a(2),I(i.chargeData.clientTransactionDatas?72:-1),a(2),g("routerLink",oe(51,Zye)),a(),v(" ",m(76,49,"labels.buttons.Back")," "))},dependencies:[ue,co,fe,Ae,$e,Je,Et,ve,Ke,ke,Qo,Ri,_t,xt,vt,bt,Ct,yt,St,Pt,wt,Tt,Pi,he,go,On],styles:[".del-btn[_ngcontent-%COMP%]{width:20px!important;height:25px;min-width:20px!important;line-height:0px;padding-left:10px;padding-right:25px}.strikeoff[_ngcontent-%COMP%]{color:red!important;text-decoration:line-through;text-decoration-style:double}.share-account-tables[_ngcontent-%COMP%]{display:flex;justify-content:space-between}.content[_ngcontent-%COMP%]{padding-top:10px}"]})}}return e})();var C3e=()=>["../../..","general"];function v3e(e,o){e&1&&(l(0,"mat-error"),c(1),p(2,"translate"),p(3,"translate"),l(4,"strong"),c(5),p(6,"translate"),r()()),e&2&&(a(),le(" ",m(2,3,"labels.inputs.Amount")," ",m(3,5,"labels.commons.is")," "),a(4),h(m(6,7,"labels.commons.required")))}function x3e(e,o){e&1&&(l(0,"mat-error"),c(1),p(2,"translate"),p(3,"translate"),l(4,"strong"),c(5),p(6,"translate"),r()()),e&2&&(a(),le(" ",m(2,3,"labels.inputs.Transaction date")," ",m(3,5,"labels.commons.is")," "),a(4),h(m(6,7,"labels.commons.required")))}var h2=(()=>{class e{constructor(){this.clientsService=T(Oi),this.formBuilder=T(nt),this.route=T(Ie),this.router=T(qe),this.dateUtils=T(Zt),this.settingsService=T(At),this.minDate=new Date(2e3,0,1),this.route.data.subscribe(t=>{this.transactionData=t.transactionData})}ngOnInit(){this.setTransactionForm()}setTransactionForm(){this.transactionForm=this.formBuilder.group({amount:[this.transactionData.amount,se.required],transactionDate:[new Date,se.required]})}submit(){let t=this.transactionForm.value,n=this.settingsService.language.code,i=this.settingsService.dateFormat,s=this.transactionForm.value.transactionDate;t.transactionDate instanceof Date&&(t.transactionDate=this.dateUtils.formatDate(s,i));let d=qt(at({},t),{dateFormat:i,locale:n});this.clientsService.payClientCharge(this.transactionData.clientId,this.transactionData.id,d).subscribe(()=>{this.router.navigate(["../../..","general"],{relativeTo:this.route})})}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275cmp=me({type:e,selectors:[["mifosx-client-pay-charges"]],decls:26,vars:21,consts:[["transactionDatePicker",""],[1,"container","mat-typography"],[3,"ngSubmit","formGroup"],[1,"layout-column"],["matInput","","required","","autofocus","","formControlName","amount"],[3,"click"],["matInput","","required","","formControlName","transactionDate",3,"min","matDatepicker"],["matSuffix","",3,"for"],[1,"layout-row","align-center","gap-5px"],["type","button","mat-raised-button","",3,"routerLink"],["mat-raised-button","","color","primary",3,"disabled"]],template:function(n,i){if(n&1){let s=Y();l(0,"div",1)(1,"mat-card")(2,"form",2),R("ngSubmit",function(){return V(s),q(i.submit())}),l(3,"div",3)(4,"mat-form-field")(5,"mat-label"),c(6),p(7,"translate"),r(),b(8,"input",4),E(9,v3e,7,9,"mat-error"),r(),l(10,"mat-form-field",5),R("click",function(){V(s);let u=xe(17);return q(u.open())}),l(11,"mat-label"),c(12),p(13,"translate"),r(),b(14,"input",6)(15,"mat-datepicker-toggle",7)(16,"mat-datepicker",null,0),E(18,x3e,7,9,"mat-error"),r()(),l(19,"div",8)(20,"button",9),c(21),p(22,"translate"),r(),l(23,"button",10),c(24),p(25,"translate"),r()()()()()}if(n&2){let s=xe(17);a(2),g("formGroup",i.transactionForm),a(4),v(" ",m(7,12,"labels.inputs.Amount")," "),a(3),I(i.transactionForm.controls.amount.hasError("required")?9:-1),a(3),v(" ",m(13,14,"labels.inputs.Transaction date")," "),a(2),g("min",i.minDate)("matDatepicker",s),a(),g("for",s),a(3),I(i.transactionForm.controls.transactionDate.hasError("required")?18:-1),a(2),g("routerLink",oe(20,C3e)),a(),v(" ",m(22,16,"labels.buttons.Cancel")," "),a(2),g("disabled",!i.transactionForm.valid),a(),v(" ",m(25,18,"labels.buttons.Submit")," ")}},dependencies:[ue,fe,tt,st,Ue,Xe,dt,Ze,et,Ae,$e,Fe,Be,ut,ai,ze,mi,di,pi,ve,he],styles:[".container[_ngcontent-%COMP%]{max-width:37rem}"]})}}return e})();var HM=()=>["Date of Birth","Incorporation Date"],b3e=()=>["../general"],GM=()=>["Name","Entity Name"];function y3e(e,o){if(e&1&&(l(0,"mat-option",9),c(1),r()),e&2){let t=o.$implicit;g("value",t.id),a(),v(" ",t.name," ")}}function S3e(e,o){e&1&&(l(0,"mat-error"),c(1),p(2,"translate"),p(3,"translate"),l(4,"strong"),c(5),p(6,"translate"),r()()),e&2&&(a(),le(" ",m(2,3,"labels.inputs.Office")," ",m(3,5,"labels.commons.is")," "),a(4),h(m(6,7,"labels.commons.required")))}function w3e(e,o){if(e&1&&(l(0,"mat-option",9),c(1),r()),e&2){let t=o.$implicit;g("value",t.id),a(),v(" ",t.value," ")}}function P3e(e,o){e&1&&(l(0,"mat-error"),c(1),p(2,"translate"),p(3,"translate"),l(4,"strong"),c(5),p(6,"translate"),r()()),e&2&&(a(),le(" ",m(2,3,"labels.inputs.Client name")," ",m(3,5,"labels.commons.is")," "),a(4),h(m(6,7,"labels.commons.required")))}function T3e(e,o){if(e&1&&(l(0,"mat-form-field",13)(1,"mat-label"),c(2),p(3,"translate"),r(),b(4,"input",32),p(5,"translate"),p(6,"translate"),E(7,P3e,7,9,"mat-error"),r()),e&2){let t=w();a(2),h(m(3,4,"labels.inputs."+t.getDateLabel(t.legalFormId,oe(10,GM)))),a(2),g("placeholder",m(5,6,"labels.inputs."+t.getDateLabel(t.legalFormId,oe(11,GM))))("title",m(6,8,"labels.inputs."+t.getDateLabel(t.legalFormId,oe(12,GM)))),a(3),I(t.editClientForm.controls.fullname.hasError("required")?7:-1)}}function M3e(e,o){e&1&&(l(0,"mat-error"),c(1),p(2,"translate"),p(3,"translate"),l(4,"strong"),c(5),p(6,"translate"),r()()),e&2&&(a(),le(" ",m(2,3,"labels.inputs.Client first name")," ",m(3,5,"labels.commons.is")," "),a(4),h(m(6,7,"labels.commons.required")))}function D3e(e,o){if(e&1&&(l(0,"mat-form-field",14)(1,"mat-label"),c(2),p(3,"translate"),r(),b(4,"input",33),p(5,"translate"),p(6,"translate"),E(7,M3e,7,9,"mat-error"),r()),e&2){let t=w();a(2),h(m(3,4,"labels.inputs.First Name")),a(2),g("placeholder",m(5,6,"labels.inputs.First Name"))("title",m(6,8,"labels.inputs.First Name")),a(3),I(t.editClientForm.controls.firstname.hasError("required")?7:-1)}}function E3e(e,o){e&1&&(l(0,"mat-form-field",14)(1,"mat-label"),c(2),p(3,"translate"),r(),b(4,"input",34),p(5,"translate"),p(6,"translate"),r()),e&2&&(a(2),h(m(3,3,"labels.inputs.Middle Name")),a(2),g("placeholder",m(5,5,"labels.inputs.Middle Name"))("title",m(6,7,"labels.inputs.Middle Name")))}function I3e(e,o){e&1&&(l(0,"mat-error"),c(1),p(2,"translate"),p(3,"translate"),l(4,"strong"),c(5),p(6,"translate"),r()()),e&2&&(a(),le(" ",m(2,3,"labels.inputs.Client last name")," ",m(3,5,"labels.commons.is")," "),a(4),h(m(6,7,"labels.commons.required")))}function O3e(e,o){if(e&1&&(l(0,"mat-form-field",14)(1,"mat-label"),c(2),p(3,"translate"),r(),b(4,"input",35),p(5,"translate"),p(6,"translate"),E(7,I3e,7,9,"mat-error"),r()),e&2){let t=w();a(2),h(m(3,4,"labels.inputs.Last Name")),a(2),g("placeholder",m(5,6,"labels.inputs.Last Name"))("title",m(6,8,"labels.inputs.Last Name")),a(3),I(t.editClientForm.controls.lastname.hasError("required")?7:-1)}}function A3e(e,o){if(e&1&&(l(0,"mat-option",9),c(1),r()),e&2){let t=o.$implicit;g("value",t.id),a(),v(" ",t.name," ")}}function F3e(e,o){if(e&1&&(l(0,"mat-form-field",13)(1,"mat-label"),c(2),p(3,"translate"),r(),l(4,"mat-select",36),Se(5,A3e,2,2,"mat-option",9,Pe),r()()),e&2){let t=w();a(2),h(m(3,1,"labels.inputs.Gender")),a(3),we(t.genderOptions)}}function k3e(e,o){if(e&1&&(l(0,"mat-option",9),c(1),r()),e&2){let t=o.$implicit;g("value",t.id),a(),v(" ",t.displayName," ")}}function B3e(e,o){e&1&&(l(0,"mat-checkbox",21),c(1),p(2,"translate"),r()),e&2&&(a(),v(" ",m(2,1,"labels.inputs.Is staff"),"? "))}function R3e(e,o){if(e&1&&(l(0,"mat-option",9),c(1),r()),e&2){let t=o.$implicit;g("value",t.id),a(),v(" ",t.name," ")}}function N3e(e,o){if(e&1&&(l(0,"mat-option",9),c(1),r()),e&2){let t=o.$implicit;g("value",t.id),a(),v(" ",t.name," ")}}function L3e(e,o){if(e&1){let t=Y();l(0,"div",22)(1,"mat-form-field",13)(2,"mat-label"),c(3),p(4,"translate"),r(),l(5,"mat-select",37),Se(6,R3e,2,2,"mat-option",9,Pe),r()(),l(8,"mat-form-field",13)(9,"mat-label"),c(10),p(11,"translate"),r(),l(12,"mat-select",38),Se(13,N3e,2,2,"mat-option",9,Pe),r()(),l(15,"mat-form-field",16),R("click",function(){V(t);let i=xe(24);return q(i.open())}),l(16,"mat-label"),c(17),p(18,"translate"),r(),b(19,"input",39),p(20,"translate"),p(21,"translate"),b(22,"mat-datepicker-toggle",18)(23,"mat-datepicker",null,3),r(),l(25,"mat-form-field",13)(26,"mat-label"),c(27),p(28,"translate"),r(),b(29,"input",40),p(30,"translate"),p(31,"translate"),r(),l(32,"mat-form-field",41)(33,"mat-label"),c(34),p(35,"translate"),r(),b(36,"textarea",42),p(37,"translate"),p(38,"translate"),r()()}if(e&2){let t=xe(24),n=w();a(3),h(m(4,15,"labels.inputs.Constitution")),a(3),we(n.constitutionOptions),a(4),h(m(11,17,"labels.inputs.Main Business Line")),a(3),we(n.businessLineOptions),a(4),h(m(18,19,"labels.inputs.Incorporation Validity Till Date")),a(2),g("placeholder",m(20,21,"labels.inputs.Incorporation Validity Till Date"))("title",m(21,23,"labels.inputs.Incorporation Validity Till Date"))("min",n.minDate)("max",n.maxDate)("matDatepicker",t),a(3),g("for",t),a(5),h(m(28,25,"labels.inputs.Incorporation No")),a(2),g("placeholder",m(30,27,"labels.inputs.Incorporation No"))("title",m(31,29,"labels.inputs.Incorporation No")),a(5),h(m(35,31,"labels.inputs.Remarks")),a(2),g("placeholder",m(37,33,"labels.inputs.Remarks"))("title",m(38,35,"labels.inputs.Remarks"))}}function V3e(e,o){e&1&&(l(0,"mat-error"),c(1," Email not valid "),r())}function q3e(e,o){if(e&1&&(l(0,"mat-option",9),c(1),r()),e&2){let t=o.$implicit;g("value",t.id),a(),v(" ",t.name," ")}}function z3e(e,o){if(e&1&&(l(0,"mat-option",9),c(1),r()),e&2){let t=o.$implicit;g("value",t.id),a(),v(" ",t.name," ")}}function H3e(e,o){e&1&&(l(0,"mat-error"),c(1),p(2,"translate"),p(3,"translate"),l(4,"strong"),c(5),p(6,"translate"),r()()),e&2&&(a(),le(" ",m(2,3,"labels.inputs.Submitted Date")," ",m(3,5,"labels.commons.is")," "),a(4),h(m(6,7,"labels.commons.required")))}var g2=(()=>{class e{constructor(){this.formBuilder=T(nt),this.route=T(Ie),this.router=T(qe),this.clientsService=T(Oi),this.dateUtils=T(Zt),this.settingsService=T(At),this.minDate=new Date(2e3,0,1),this.maxDate=new Date,this.legalFormId=1,this.route.data.subscribe(t=>{this.clientDataAndTemplate=t.clientDataAndTemplate})}ngOnInit(){this.maxDate=this.settingsService.businessDate,this.createEditClientForm(),this.setOptions(),this.buildDependencies(),this.legalFormId=1,this.editClientForm.patchValue({officeId:this.clientDataAndTemplate.officeId,staffId:this.clientDataAndTemplate.staffId,legalFormId:this.clientDataAndTemplate.legalForm&&this.clientDataAndTemplate.legalForm.id,accountNo:this.clientDataAndTemplate.accountNo,externalId:this.clientDataAndTemplate.externalId,genderId:this.clientDataAndTemplate.gender&&this.clientDataAndTemplate.gender.id,isStaff:this.clientDataAndTemplate.isStaff,active:this.clientDataAndTemplate.active,mobileNo:this.clientDataAndTemplate.mobileNo,emailAddress:this.clientDataAndTemplate.emailAddress,dateOfBirth:this.clientDataAndTemplate.dateOfBirth&&new Date(this.clientDataAndTemplate.dateOfBirth),clientTypeId:this.clientDataAndTemplate.clientType&&this.clientDataAndTemplate.clientType.id,clientClassificationId:this.clientDataAndTemplate.clientClassification&&this.clientDataAndTemplate.clientClassification.id,submittedOnDate:this.clientDataAndTemplate.timeline.submittedOnDate&&new Date(this.clientDataAndTemplate.timeline.submittedOnDate),activationDate:this.clientDataAndTemplate.timeline.activatedOnDate&&new Date(this.clientDataAndTemplate.timeline.activatedOnDate)}),this.clientDataAndTemplate.legalForm&&(this.legalFormId=this.clientDataAndTemplate.legalForm.id)}createEditClientForm(){this.editClientForm=this.formBuilder.group({officeId:[{value:"",disabled:!0}],staffId:[""],legalFormId:[{value:"",disabled:!0}],isStaff:[!1],active:[!1],accountNo:[{value:"",disabled:!0}],externalId:[""],genderId:[""],mobileNo:[""],emailAddress:["",se.email],dateOfBirth:[""],clientTypeId:[""],clientClassificationId:[""],submittedOnDate:["",se.required],activationDate:[""]})}setOptions(){this.officeOptions=this.clientDataAndTemplate.officeOptions,this.staffOptions=this.clientDataAndTemplate.staffOptions,this.legalFormOptions=this.clientDataAndTemplate.clientLegalFormOptions,this.clientTypeOptions=this.clientDataAndTemplate.clientTypeOptions,this.clientClassificationTypeOptions=this.clientDataAndTemplate.clientClassificationOptions,this.businessLineOptions=this.clientDataAndTemplate.clientNonPersonMainBusinessLineOptions,this.constitutionOptions=this.clientDataAndTemplate.clientNonPersonConstitutionOptions,this.genderOptions=this.clientDataAndTemplate.genderOptions}buildDependencies(){this.editClientForm.get("legalFormId").valueChanges.subscribe(t=>{t===1?(this.editClientForm.removeControl("fullname"),this.editClientForm.removeControl("clientNonPersonDetails"),this.editClientForm.addControl("firstname",new it(this.clientDataAndTemplate.firstname,se.required)),this.editClientForm.addControl("middlename",new it(this.clientDataAndTemplate.middlename)),this.editClientForm.addControl("lastname",new it(this.clientDataAndTemplate.lastname,se.required))):(this.editClientForm.removeControl("firstname"),this.editClientForm.removeControl("middlename"),this.editClientForm.removeControl("lastname"),this.editClientForm.addControl("fullname",new it(this.clientDataAndTemplate.fullname,se.required)),this.editClientForm.addControl("clientNonPersonDetails",this.formBuilder.group({constitutionId:[this.clientDataAndTemplate.clientNonPersonDetails.constitution&&this.clientDataAndTemplate.clientNonPersonDetails.constitution.id,se.required],incorpValidityTillDate:[this.clientDataAndTemplate.clientNonPersonDetails.incorpValidityTillDate&&new Date(this.clientDataAndTemplate.clientNonPersonDetails.incorpValidityTillDate)],incorpNumber:[this.clientDataAndTemplate.clientNonPersonDetails.incorpNumber],mainBusinessLineId:[this.clientDataAndTemplate.clientNonPersonDetails.mainBusinessLine&&this.clientDataAndTemplate.clientNonPersonDetails.mainBusinessLine.id],remarks:[this.clientDataAndTemplate.clientNonPersonDetails.remarks]})))})}getDateLabel(t,n){return t===1?n[0]:n[1]}submit(){let t=this.settingsService.language.code,n=this.settingsService.dateFormat,i=this.editClientForm.getRawValue(),s=qt(at({},i),{dateOfBirth:i.dateOfBirth&&this.dateUtils.formatDate(i.dateOfBirth,n),submittedOnDate:i.submittedOnDate&&this.dateUtils.formatDate(i.submittedOnDate,n),activationDate:this.dateUtils.formatDate(i.activationDate,n),dateFormat:n,locale:t});delete s.officeId,i.clientNonPersonDetails?s.clientNonPersonDetails=qt(at({},i.clientNonPersonDetails),{incorpValidityTillDate:i.clientNonPersonDetails.incorpValidityTillDate&&this.dateUtils.formatDate(i.clientNonPersonDetails.incorpValidityTillDate,n),dateFormat:n,locale:t}):s.clientNonPersonDetails={},this.clientsService.updateClient(this.clientDataAndTemplate.id,s).subscribe(()=>{this.router.navigate(["../"],{relativeTo:this.route})})}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275cmp=me({type:e,selectors:[["mifosx-edit-client"]],decls:122,vars:112,consts:[["dateOfBirthDatePicker",""],["submittedOnDatePicker",""],["activatedOnDatePicker",""],["incorpValidityTillDateDatePicker",""],[1,"container"],[3,"formGroup"],[1,"responsive-row"],[1,"flex-24"],["required","","formControlName","officeId"],[3,"value"],["formControlName","legalFormId"],["matInput","","formControlName","accountNo","placeholder","Account No","title","Account No",3,"placeholder","title"],["matInput","","formControlName","externalId","placeholder","External Id","title","External Id",3,"placeholder","title"],[1,"flex-48"],[1,"flex-32"],[1,"section-divider"],[1,"flex-48",3,"click"],["matInput","","formControlName","dateOfBirth","placeholder","Date of Birth","title","Date of Birth",3,"max","matDatepicker","placeholder","title"],["matSuffix","",3,"for"],[1,"responsive-row","align-center"],["formControlName","staffId"],["labelPosition","before","formControlName","isStaff",1,"flex-48","margin-v"],["formGroupName","clientNonPersonDetails",1,"flex-100","layout-row-wrap","gap-2percent","column-on-small"],["matInput","","type","text","formControlName","mobileNo","placeholder","Mobile No","title","Mobile No",3,"placeholder","title"],["matInput","","formControlName","emailAddress","placeholder","Email Address","title","Email Address",3,"placeholder","title"],["formControlName","clientTypeId"],["formControlName","clientClassificationId"],["placeholder","Submitted On","title","Submitted On","matInput","","formControlName","submittedOnDate","required","",3,"placeholder","title","min","max","matDatepicker"],["placeholder","Activated On","title","Activated On","matInput","","formControlName","activationDate",3,"placeholder","title","min","max","matDatepicker"],[1,"button-container"],["type","button","mat-raised-button","",3,"routerLink"],["type","submit","mat-raised-button","","color","primary",3,"click","disabled"],["matInput","","required","","formControlName","fullname","placeholder","Full Name","title","Full Name",3,"placeholder","title"],["matInput","","required","","formControlName","firstname","placeholder","First Name","title","First Name",3,"placeholder","title"],["matInput","","formControlName","middlename","placeholder","Middle Name","title","Middle Name",3,"placeholder","title"],["matInput","","required","","formControlName","lastname","placeholder","Last Name","title","Last Name",3,"placeholder","title"],["formControlName","genderId"],["formControlName","constitutionId","required",""],["formControlName","mainBusinessLineId"],["placeholder","Incorporation Validity Till Date","title","Incorporation Validity Till Date","matInput","","formControlName","incorpValidityTillDate",3,"placeholder","title","min","max","matDatepicker"],["matInput","","formControlName","incorpNumber","placeholder","Incorporation No","title","Incorporation No",3,"placeholder","title"],[1,"flex-98"],["matInput","","formControlName","remarks","cdkTextareaAutosize","","cdkAutosizeMinRows","2","placeholder","Remarks","title","Remarks",3,"placeholder","title"]],template:function(n,i){if(n&1){let s=Y();l(0,"div",4)(1,"mat-card")(2,"form",5)(3,"mat-card-content")(4,"div",6)(5,"mat-form-field",7)(6,"mat-label"),c(7),p(8,"translate"),r(),l(9,"mat-select",8),Se(10,y3e,2,2,"mat-option",9,Pe),r(),E(12,S3e,7,9,"mat-error"),r(),l(13,"mat-form-field",7)(14,"mat-label"),c(15),p(16,"translate"),r(),l(17,"mat-select",10),Se(18,w3e,2,2,"mat-option",9,Pe),r()(),l(20,"mat-form-field",7)(21,"mat-label"),c(22),p(23,"translate"),r(),b(24,"input",11),p(25,"translate"),p(26,"translate"),r(),l(27,"mat-form-field",7)(28,"mat-label"),c(29),p(30,"translate"),r(),b(31,"input",12),p(32,"translate"),p(33,"translate"),r()(),l(34,"div",6),E(35,T3e,8,13,"mat-form-field",13),E(36,D3e,8,10,"mat-form-field",14),E(37,E3e,7,9,"mat-form-field",14),E(38,O3e,8,10,"mat-form-field",14),r(),b(39,"mat-divider",15),l(40,"div",6)(41,"mat-form-field",16),R("click",function(){V(s);let u=xe(50);return q(u.open())}),l(42,"mat-label"),c(43),p(44,"translate"),r(),b(45,"input",17),p(46,"translate"),p(47,"translate"),b(48,"mat-datepicker-toggle",18)(49,"mat-datepicker",null,0),r(),E(51,F3e,7,3,"mat-form-field",13),r(),l(52,"div",19)(53,"mat-form-field",13)(54,"mat-label"),c(55),p(56,"translate"),r(),l(57,"mat-select",20),Se(58,k3e,2,2,"mat-option",9,Pe),r()(),E(60,B3e,3,3,"mat-checkbox",21),r(),E(61,L3e,39,37,"div",22),l(62,"div",6)(63,"mat-form-field",13)(64,"mat-label"),c(65),p(66,"translate"),r(),b(67,"input",23),p(68,"translate"),p(69,"translate"),r(),l(70,"mat-form-field",13)(71,"mat-label"),c(72),p(73,"translate"),r(),b(74,"input",24),p(75,"translate"),p(76,"translate"),E(77,V3e,2,0,"mat-error"),r()(),l(78,"div",6)(79,"mat-form-field",13)(80,"mat-label"),c(81),p(82,"translate"),r(),l(83,"mat-select",25),Se(84,q3e,2,2,"mat-option",9,Pe),r()(),l(86,"mat-form-field",13)(87,"mat-label"),c(88),p(89,"translate"),r(),l(90,"mat-select",26),Se(91,z3e,2,2,"mat-option",9,Pe),r()()(),l(93,"div",6)(94,"mat-form-field",16),R("click",function(){V(s);let u=xe(103);return q(u.open())}),l(95,"mat-label"),c(96),p(97,"translate"),r(),b(98,"input",27),p(99,"translate"),p(100,"translate"),b(101,"mat-datepicker-toggle",18)(102,"mat-datepicker",null,1),E(104,H3e,7,9,"mat-error"),r(),l(105,"mat-form-field",16),R("click",function(){V(s);let u=xe(114);return q(u.open())}),l(106,"mat-label"),c(107),p(108,"translate"),r(),b(109,"input",28),p(110,"translate"),p(111,"translate"),b(112,"mat-datepicker-toggle",18)(113,"mat-datepicker",null,2),r()()(),l(115,"mat-card-actions",29)(116,"button",30),c(117),p(118,"translate"),r(),l(119,"button",31),R("click",function(){return V(s),q(i.submit())}),c(120),p(121,"translate"),r()()()()()}if(n&2){let s=xe(50),d=xe(103),u=xe(114);a(2),g("formGroup",i.editClientForm),a(5),h(m(8,52,"labels.inputs.Office")),a(3),we(i.officeOptions),a(2),I(i.editClientForm.controls.officeId.hasError("required")?12:-1),a(3),h(m(16,54,"labels.inputs.Legal Form")),a(3),we(i.legalFormOptions),a(4),h(m(23,56,"labels.inputs.Account No")),a(2),g("placeholder",m(25,58,"labels.inputs.Account No"))("title",m(26,60,"labels.inputs.Account No")),a(5),h(m(30,62,"labels.inputs.External Id")),a(2),g("placeholder",m(32,64,"labels.inputs.External Id"))("title",m(33,66,"labels.inputs.External Id")),a(4),I(i.editClientForm.contains("fullname")?35:-1),a(),I(i.editClientForm.contains("firstname")?36:-1),a(),I(i.editClientForm.contains("middlename")?37:-1),a(),I(i.editClientForm.contains("lastname")?38:-1),a(5),h(m(44,68,"labels.inputs."+i.getDateLabel(i.legalFormId,oe(108,HM)))),a(2),g("max",i.maxDate)("matDatepicker",s)("placeholder",m(46,70,"labels.inputs."+i.getDateLabel(i.legalFormId,oe(109,HM))))("title",m(47,72,"labels.inputs."+i.getDateLabel(i.legalFormId,oe(110,HM)))),a(3),g("for",s),a(3),I(i.legalFormId===1?51:-1),a(4),h(m(56,74,"labels.inputs.Staff")),a(3),we(i.staffOptions),a(2),I(i.legalFormId===1?60:-1),a(),I(i.editClientForm.contains("clientNonPersonDetails")?61:-1),a(4),h(m(66,76,"labels.inputs.Mobile No")),a(2),g("placeholder",m(68,78,"labels.inputs.Mobile No"))("title",m(69,80,"labels.inputs.Mobile No")),a(5),h(m(73,82,"labels.inputs.Email Address")),a(2),g("placeholder",m(75,84,"labels.inputs.Email Address"))("title",m(76,86,"labels.inputs.Email Address")),a(3),I(i.editClientForm.controls.emailAddress.errors!=null&&i.editClientForm.controls.emailAddress.errors.email?77:-1),a(4),h(m(82,88,"labels.inputs.Client Type")),a(3),we(i.clientTypeOptions),a(4),h(m(89,90,"labels.inputs.Client Classification")),a(3),we(i.clientClassificationTypeOptions),a(5),h(m(97,92,"labels.inputs.Submitted On")),a(2),g("placeholder",m(99,94,"labels.inputs.Submitted On"))("title",m(100,96,"labels.inputs.Submitted On"))("min",i.minDate)("max",i.maxDate)("matDatepicker",d),a(3),g("for",d),a(3),I(i.editClientForm.controls.submittedOnDate.hasError("required")?104:-1),a(3),h(m(108,98,"labels.inputs.Activated On")),a(2),g("placeholder",m(110,100,"labels.inputs.Activated On"))("title",m(111,102,"labels.inputs.Activated On"))("min",i.editClientForm.value.submittedOnDate)("max",i.maxDate)("matDatepicker",u),a(3),g("for",u),a(4),g("routerLink",oe(111,b3e)),a(),v(" ",m(118,104,"labels.buttons.Cancel")," "),a(2),g("disabled",!i.editClientForm.valid),a(),v(" ",m(121,106,"labels.buttons.Submit")," ")}},dependencies:[ue,fe,tt,st,Ue,Xe,dt,Ze,et,la,Ae,$e,Je,Et,Fe,Be,ut,ai,ze,gt,ft,mi,di,pi,ve,fi,Ri,Ln,he],styles:[".margin-v[_ngcontent-%COMP%]{margin:2em 0 0}.flex-32[_ngcontent-%COMP%]{flex:0 1 32%;max-width:32%}.gap-2percent[_ngcontent-%COMP%]{gap:2%}.align-center[_ngcontent-%COMP%]{align-items:center}.container[_ngcontent-%COMP%]{margin:24px auto;max-width:1200px;width:100%;padding:0 24px;box-sizing:border-box}[_nghost-%COMP%] .mat-card{padding:32px;margin:16px 0;border-radius:12px;box-shadow:0 4px 12px #0000001a}[_nghost-%COMP%] .mat-card-content{padding:0}.flex-24[_ngcontent-%COMP%]{flex:0 1 calc(25% - 15px);max-width:calc(25% - 15px);margin-right:0}.flex-48[_ngcontent-%COMP%]{flex:0 1 calc(50% - 10px);max-width:calc(50% - 10px);margin-right:0}.responsive-row[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;gap:20px;margin-bottom:24px;align-items:flex-start}.responsive-row[_ngcontent-%COMP%]:last-child{margin-bottom:0}[_nghost-%COMP%] .mat-form-field{margin-bottom:16px;width:100%}[_nghost-%COMP%] .mat-form-field:last-child{margin-right:0}[_nghost-%COMP%] .responsive-row .mat-form-field{min-height:56px}[_nghost-%COMP%] .responsive-row .mat-form-field .mat-form-field-wrapper{padding-bottom:1.3438em}[_nghost-%COMP%] .mat-form-field-appearance-outline .mat-form-field-outline{color:#0000001f}[_nghost-%COMP%] .mat-form-field-appearance-outline .mat-form-field-outline-thick{color:#3f51b5}[_nghost-%COMP%] .mat-form-field.mat-form-field-invalid .mat-form-field-outline-thick{color:#f44336;opacity:1}[_nghost-%COMP%] .mat-error{font-size:12px;margin-top:4px}.section-divider[_ngcontent-%COMP%]{margin:32px 0 24px;border-color:#0000001f}[_nghost-%COMP%] .mat-checkbox{margin:20px 0}[_nghost-%COMP%] mat-card-actions{display:flex;justify-content:center;gap:20px;padding:24px 0;margin-top:32px;border-top:1px solid rgba(0,0,0,.12);width:100%}[_nghost-%COMP%] mat-card-actions button{min-width:100px;height:36px;padding:0 20px;border-radius:4px;font-weight:500;text-transform:none;letter-spacing:.3px;font-size:13px;margin:0}@media (width <= 1024px){.flex-24[_ngcontent-%COMP%]{flex:0 1 calc(50% - 10px);max-width:calc(50% - 10px)}.flex-48[_ngcontent-%COMP%]{flex:0 1 100%;max-width:100%}}@media (width <= 768px){.flex-32[_ngcontent-%COMP%], .flex-24[_ngcontent-%COMP%], .flex-48[_ngcontent-%COMP%]{flex:0 1 100%;max-width:100%}.container[_ngcontent-%COMP%]{margin:16px;padding:0 16px}[_nghost-%COMP%] .mat-card{padding:20px}.responsive-row[_ngcontent-%COMP%]{gap:12px;margin-bottom:16px}.responsive-row[_ngcontent-%COMP%] .mat-form-field[_ngcontent-%COMP%]{flex:1 1 100%;max-width:100%;margin-right:0}}@media (width <= 600px){[_nghost-%COMP%] mat-card-actions{flex-direction:column;gap:12px}[_nghost-%COMP%] mat-card-actions button{width:100%;margin:0}}@media (width <= 480px){[_nghost-%COMP%] .mat-card{padding:16px;margin:8px 0}.responsive-row[_ngcontent-%COMP%]{gap:8px;margin-bottom:12px}.container[_ngcontent-%COMP%]{padding:0 12px}}[_nghost-%COMP%]{display:block;width:100%}[_nghost-%COMP%] form{width:100%}[_nghost-%COMP%] .mat-datepicker-toggle{color:#0000008a}[_nghost-%COMP%] .mat-select-panel{max-height:256px}"]})}}return e})();var G3e=()=>["Date of Birth","Incorporation Date"],j3e=()=>["Name","Entity Name"];function $3e(e,o){if(e&1&&(l(0,"mat-option",8),c(1),r()),e&2){let t=o.$implicit;g("value",t.id),a(),v(" ",t.name," ")}}function U3e(e,o){e&1&&(l(0,"mat-error"),c(1),p(2,"translate"),p(3,"translate"),l(4,"strong"),c(5),p(6,"translate"),r()()),e&2&&(a(),le(" ",m(2,3,"labels.inputs.Office")," ",m(3,5,"labels.commons.is")," "),a(4),h(m(6,7,"labels.commons.required")))}function W3e(e,o){if(e&1&&(l(0,"mat-option",8),c(1),p(2,"translateKey"),r()),e&2){let t=o.$implicit;g("value",t.id),a(),v(" ",Ot(2,2,t.value,"inputs")," ")}}function Q3e(e,o){e&1&&(l(0,"mat-error"),c(1),p(2,"translate"),p(3,"translate"),l(4,"strong"),c(5),p(6,"translate"),r()()),e&2&&(a(),le(" ",m(2,3,"labels.inputs.Client name")," ",m(3,5,"labels.commons.is")," "),a(4),h(m(6,7,"labels.commons.required")))}function Y3e(e,o){e&1&&(l(0,"mat-error"),c(1),p(2,"translate"),l(3,"strong"),c(4),p(5,"translate"),r(),c(6),p(7,"translate"),r()),e&2&&(a(),v(" ",m(2,3,"labels.inputs.Client name")," "),a(3),h(m(5,5,"labels.inputs.cannot")),a(2),v(" ",m(7,7,"labels.commons.begin with a special character or number")," "))}function J3e(e,o){if(e&1&&(l(0,"mat-form-field",11)(1,"mat-label"),c(2),p(3,"translate"),r(),b(4,"input",32),E(5,Q3e,7,9,"mat-error"),E(6,Y3e,8,9,"mat-error"),r()),e&2){let t=w();a(2),v(" ",m(3,3,"labels.inputs."+t.getDateLabel(t.createClientForm.value.legalFormId,oe(5,j3e)))," "),a(3),I(t.createClientForm.controls.fullname.hasError("required")?5:-1),a(),I(t.createClientForm.controls.fullname.hasError("pattern")?6:-1)}}function K3e(e,o){e&1&&(l(0,"mat-error"),c(1),p(2,"translate"),p(3,"translate"),l(4,"strong"),c(5),p(6,"translate"),r()()),e&2&&(a(),le(" ",m(2,3,"labels.inputs.Client first name")," ",m(3,5,"labels.commons.is")," "),a(4),h(m(6,7,"labels.commons.required")))}function X3e(e,o){e&1&&(l(0,"mat-error"),c(1),p(2,"translate"),l(3,"strong"),c(4),p(5,"translate"),r(),c(6),p(7,"translate"),r()),e&2&&(a(),v(" ",m(2,3,"labels.inputs.Client first name")," "),a(3),h(m(5,5,"labels.inputs.cannot")),a(2),v(" ",m(7,7,"labels.commons.begin with a special character or number")," "))}function Z3e(e,o){if(e&1&&(l(0,"mat-form-field",33)(1,"mat-label"),c(2),p(3,"translate"),r(),b(4,"input",36),E(5,K3e,7,9,"mat-error"),E(6,X3e,8,9,"mat-error"),r()),e&2){let t=w(2);a(2),h(m(3,3,"labels.inputs.First Name")),a(3),I(t.createClientForm.controls.firstname.hasError("required")?5:-1),a(),I(t.createClientForm.controls.firstname.hasError("pattern")?6:-1)}}function eSe(e,o){e&1&&(l(0,"mat-error"),c(1),p(2,"translate"),l(3,"strong"),c(4),p(5,"translate"),r(),c(6),p(7,"translate"),r()),e&2&&(a(),v(" ",m(2,3,"labels.inputs.Client middle name")," "),a(3),h(m(5,5,"labels.inputs.cannot")),a(2),v(" ",m(7,7,"labels.commons.begin with a special character or number")," "))}function tSe(e,o){if(e&1&&(l(0,"mat-form-field",34)(1,"mat-label"),c(2),p(3,"translate"),r(),b(4,"input",37),E(5,eSe,8,9,"mat-error"),r()),e&2){let t=w(2);a(2),h(m(3,2,"labels.inputs.Middle Name")),a(3),I(t.createClientForm.controls.middlename.hasError("pattern")?5:-1)}}function iSe(e,o){e&1&&(l(0,"mat-error"),c(1),p(2,"translate"),p(3,"translate"),l(4,"strong"),c(5),p(6,"translate"),r()()),e&2&&(a(),le(" ",m(2,3,"labels.inputs.Client last name")," ",m(3,5,"labels.commons.is")," "),a(4),h(m(6,7,"labels.commons.required")))}function nSe(e,o){e&1&&(l(0,"mat-error"),c(1),p(2,"translate"),l(3,"strong"),c(4),p(5,"translate"),r(),c(6),p(7,"translate"),r()),e&2&&(a(),v(" ",m(2,3,"labels.inputs.Client last name")," "),a(3),h(m(5,5,"labels.inputs.cannot")),a(2),v(" ",m(7,7,"labels.commons.begin with a special character or number")," "))}function oSe(e,o){if(e&1&&(l(0,"mat-form-field",35)(1,"mat-label"),c(2),p(3,"translate"),r(),b(4,"input",38),E(5,iSe,7,9,"mat-error"),E(6,nSe,8,9,"mat-error"),r()),e&2){let t=w(2);a(2),h(m(3,3,"labels.inputs.Last Name")),a(3),I(t.createClientForm.controls.lastname.hasError("required")?5:-1),a(),I(t.createClientForm.controls.lastname.hasError("pattern")?6:-1)}}function aSe(e,o){if(e&1&&(l(0,"div",12),E(1,Z3e,7,5,"mat-form-field",33),E(2,tSe,6,4,"mat-form-field",34),E(3,oSe,7,5,"mat-form-field",35),r()),e&2){let t=w();a(),I(t.createClientForm.contains("firstname")?1:-1),a(),I(t.createClientForm.contains("middlename")?2:-1),a(),I(t.createClientForm.contains("lastname")?3:-1)}}function rSe(e,o){if(e&1&&(l(0,"mat-option",8),c(1),r()),e&2){let t=o.$implicit;g("value",t.id),a(),v(" ",t.name," ")}}function lSe(e,o){if(e&1&&(l(0,"mat-option",8),c(1),r()),e&2){let t=o.$implicit;g("value",t.id),a(),v(" ",t.name," ")}}function sSe(e,o){if(e&1){let t=Y();l(0,"div",16)(1,"mat-form-field",11)(2,"mat-label"),c(3),p(4,"translate"),r(),l(5,"mat-select",39),Se(6,rSe,2,2,"mat-option",8,Pe),r()(),l(8,"mat-form-field",11)(9,"mat-label"),c(10),p(11,"translate"),r(),l(12,"mat-select",40),Se(13,lSe,2,2,"mat-option",8,Pe),r()(),l(15,"mat-form-field",13),R("click",function(){V(t);let i=xe(22);return q(i.open())}),l(16,"mat-label"),c(17),p(18,"translate"),r(),b(19,"input",41)(20,"mat-datepicker-toggle",15)(21,"mat-datepicker",null,2),r(),l(23,"mat-form-field",11)(24,"mat-label"),c(25),p(26,"translate"),r(),b(27,"input",42),r(),l(28,"mat-form-field",19)(29,"mat-label"),c(30),p(31,"translate"),r(),b(32,"textarea",43),r()()}if(e&2){let t=xe(22),n=w();a(3),h(m(4,9,"labels.inputs.Constitution")),a(3),we(n.constitutionOptions),a(4),h(m(11,11,"labels.inputs.Main Business Line")),a(3),we(n.businessLineOptions),a(4),h(m(18,13,"labels.inputs.Incorporation Validity Till Date")),a(2),g("min",n.minDate)("max",n.maxDate)("matDatepicker",t),a(),g("for",t),a(5),h(m(26,15,"labels.inputs.Incorporation Number")),a(5),h(m(31,17,"labels.inputs.Remarks"))}}function cSe(e,o){if(e&1&&(l(0,"mat-option",8),c(1),r()),e&2){let t=o.$implicit;g("value",t.id),a(),v(" ",t.name," ")}}function pSe(e,o){if(e&1&&(l(0,"mat-form-field",11)(1,"mat-label"),c(2),p(3,"translate"),r(),l(4,"mat-select",44),Se(5,cSe,2,2,"mat-option",8,Pe),r()()),e&2){let t=w();a(2),h(m(3,1,"labels.inputs.Gender")),a(3),we(t.genderOptions)}}function mSe(e,o){if(e&1&&(l(0,"mat-option",8),c(1),r()),e&2){let t=o.$implicit;g("value",t.id),a(),v(" ",t.displayName," ")}}function dSe(e,o){e&1&&(l(0,"mat-checkbox",18),c(1),p(2,"translate"),r()),e&2&&(a(),v(" ",m(2,1,"labels.inputs.Is staff"),"? "))}function uSe(e,o){e&1&&(l(0,"mat-error"),c(1),p(2,"translate"),r()),e&2&&(a(),v(" ",m(2,1,"error.Email not valid")," "))}function fSe(e,o){if(e&1&&(l(0,"mat-option",8),c(1),r()),e&2){let t=o.$implicit;g("value",t.id),a(),v(" ",t.name," ")}}function hSe(e,o){if(e&1&&(l(0,"mat-option",8),c(1),r()),e&2){let t=o.$implicit;g("value",t.id),a(),v(" ",t.name," ")}}function gSe(e,o){e&1&&(l(0,"mat-error"),c(1),p(2,"translate"),p(3,"translate"),l(4,"strong"),c(5),p(6,"translate"),r()()),e&2&&(a(),le(" ",m(2,3,"labels.inputs.Activation Date")," ",m(3,5,"labels.commons.is")," "),a(4),h(m(6,7,"labels.commons.required")))}function _Se(e,o){if(e&1){let t=Y();l(0,"mat-form-field",13),R("click",function(){V(t);let i=xe(7);return q(i.open())}),l(1,"mat-label"),c(2),p(3,"translate"),r(),b(4,"input",45)(5,"mat-datepicker-toggle",15)(6,"mat-datepicker",null,3),E(8,gSe,7,9,"mat-error"),r()}if(e&2){let t=xe(7),n=w();a(2),h(m(3,6,"labels.inputs.Activation Date")),a(2),g("min",n.createClientForm.value.submittedOnDate)("max",n.maxDate)("matDatepicker",t),a(),g("for",t),a(3),I(n.createClientForm.controls.activationDate.hasError("required")?8:-1)}}function CSe(e,o){if(e&1&&(l(0,"mat-option",8),c(1),r()),e&2){let t=o.$implicit;g("value",t.id),a(),v(" ",t.name," ")}}function vSe(e,o){e&1&&(l(0,"mat-error"),c(1),p(2,"translate"),p(3,"translate"),l(4,"strong"),c(5),p(6,"translate"),r()()),e&2&&(a(),le(" ",m(2,3,"labels.inputs.Savings Product")," ",m(3,5,"labels.commons.is")," "),a(4),h(m(6,7,"labels.commons.required")))}function xSe(e,o){if(e&1&&(l(0,"mat-form-field",11)(1,"mat-label"),c(2),p(3,"translate"),r(),l(4,"mat-select",46),Se(5,CSe,2,2,"mat-option",8,Pe),r(),E(7,vSe,7,9,"mat-error"),r()),e&2){let t=w();a(2),h(m(3,2,"labels.inputs.Savings Product")),a(3),we(t.savingProductOptions),a(2),I(t.createClientForm.controls.savingsProductId.hasError("required")?7:-1)}}var Yf=(()=>{class e{constructor(){this.formBuilder=T(nt),this.dateUtils=T(Zt),this.settingsService=T(At),this.clientService=T(Oi),this.legalFormChangeEvent=new bi,this.minDate=new Date(2e3,0,1),this.maxDate=new Date,this.setClientForm()}ngOnInit(){this.maxDate=this.settingsService.businessDate,this.setOptions(),this.buildDependencies()}setClientForm(){this.createClientForm=this.formBuilder.group({officeId:["",se.required],staffId:[""],legalFormId:["",se.required],isStaff:[!1],active:[!1],addSavings:[!1],accountNo:[""],externalId:[""],genderId:[""],mobileNo:[""],emailAddress:["",se.email],dateOfBirth:[""],clientTypeId:[""],clientClassificationId:[""],submittedOnDate:[this.settingsService.businessDate,se.required]})}setOptions(){this.officeOptions=this.clientTemplate.officeOptions,this.staffOptions=this.clientTemplate.staffOptions,this.legalFormOptions=this.clientTemplate.clientLegalFormOptions,this.clientTypeOptions=this.clientTemplate.clientTypeOptions,this.clientClassificationTypeOptions=this.clientTemplate.clientClassificationOptions,this.businessLineOptions=this.clientTemplate.clientNonPersonMainBusinessLineOptions,this.constitutionOptions=this.clientTemplate.clientNonPersonConstitutionOptions,this.genderOptions=this.clientTemplate.genderOptions,this.savingProductOptions=this.clientTemplate.savingProductOptions}buildDependencies(){this.createClientForm.get("legalFormId").valueChanges.subscribe(t=>{this.legalFormChangeEvent.emit({legalForm:t}),t===1?(this.createClientForm.removeControl("fullname"),this.createClientForm.removeControl("clientNonPersonDetails"),this.createClientForm.addControl("firstname",new it("",[se.required,se.pattern("(^[A-z]).*")])),this.createClientForm.addControl("middlename",new it("",se.pattern("(^[A-z]).*"))),this.createClientForm.addControl("lastname",new it("",[se.required,se.pattern("(^[A-z]).*")]))):(this.createClientForm.removeControl("firstname"),this.createClientForm.removeControl("middlename"),this.createClientForm.removeControl("lastname"),this.createClientForm.addControl("fullname",new it("",[se.required,se.pattern("(^[A-z]).*")])),this.createClientForm.addControl("clientNonPersonDetails",this.formBuilder.group({constitutionId:["",se.required],incorpValidityTillDate:[""],incorpNumber:[""],mainBusinessLineId:[""],remarks:[""]})))}),this.createClientForm.get("legalFormId").patchValue(1),this.createClientForm.get("active").valueChanges.subscribe(t=>{t?this.createClientForm.addControl("activationDate",new it("",se.required)):this.createClientForm.removeControl("activationDate")}),this.createClientForm.get("addSavings").valueChanges.subscribe(t=>{t?this.createClientForm.addControl("savingsProductId",new it("",se.required)):this.createClientForm.removeControl("savingsProductId")}),this.createClientForm.get("officeId").valueChanges.subscribe(t=>{this.clientService.getClientWithOfficeTemplate(t).subscribe(n=>{this.staffOptions=n.staffOptions})})}getDateLabel(t,n){return t===1?n[0]:n[1]}get clientGeneralDetails(){let t=this.createClientForm.value,n=this.settingsService.dateFormat,i=this.settingsService.language.code;for(let s in t)(t[s]===""||s==="addSavings")&&delete t[s];return t.submittedOnDate instanceof Date&&(t.submittedOnDate=this.dateUtils.formatDate(t.submittedOnDate,n)),t.activationDate instanceof Date&&(t.activationDate=this.dateUtils.formatDate(t.activationDate,n)),t.dateOfBirth instanceof Date&&(t.dateOfBirth=this.dateUtils.formatDate(t.dateOfBirth,n)),t.clientNonPersonDetails&&t.clientNonPersonDetails.incorpValidityTillDate&&(t.clientNonPersonDetails=qt(at({},t.clientNonPersonDetails),{incorpValidityTillDate:this.dateUtils.formatDate(t.clientNonPersonDetails.incorpValidityTillDate,n),dateFormat:n,locale:i})),t}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275cmp=me({type:e,selectors:[["mifosx-client-general-step"]],inputs:{clientTemplate:"clientTemplate"},outputs:{legalFormChangeEvent:"legalFormChangeEvent"},decls:95,vars:60,consts:[["dateOfBirthDatePicker",""],["submittedOnDatePicker",""],["incorpValidityTillDateDatePicker",""],["activatedOnDatePicker",""],[3,"formGroup"],[1,"layout-row-wrap","gap-2px","responsive-column"],[1,"flex-fill","flex-23"],["required","","formControlName","officeId"],[3,"value"],["required","","formControlName","legalFormId"],["matInput","","formControlName","externalId"],[1,"flex-48"],[1,"name-fields-row"],[1,"flex-48",3,"click"],["matInput","","formControlName","dateOfBirth",3,"max","matDatepicker"],["matSuffix","",3,"for"],["formGroupName","clientNonPersonDetails",1,"flex-100","layout-row-wrap","responsive-column","gap-4percent"],["formControlName","staffId"],["labelPosition","before","formControlName","isStaff",1,"flex-48","margin-v"],[1,"flex-98"],["matInput","","type","text","formControlName","mobileNo"],["matInput","","formControlName","emailAddress"],["formControlName","clientTypeId"],["formControlName","clientClassificationId"],["matInput","","formControlName","submittedOnDate","required","",3,"min","max","matDatepicker"],["labelPosition","before","formControlName","active",1,"margin-v","flex-48"],["labelPosition","before","formControlName","addSavings",1,"margin-v","flex-48"],[1,"layout-row","align-center","gap-2percent","margin-t","responsive-column"],["mat-raised-button","","matStepperPrevious","","disabled",""],["icon","arrow-left",1,"m-r-10"],["mat-raised-button","","matStepperNext",""],["icon","arrow-right",1,"m-l-10"],["matInput","","required","","formControlName","fullname"],[1,"name-field","first-name"],[1,"name-field","middle-name"],[1,"name-field","last-name"],["matInput","","required","","formControlName","firstname"],["matInput","","formControlName","middlename"],["matInput","","required","","formControlName","lastname"],["formControlName","constitutionId","required",""],["formControlName","mainBusinessLineId"],["matInput","","formControlName","incorpValidityTillDate",3,"min","max","matDatepicker"],["matInput","","formControlName","incorpNumber"],["matInput","","formControlName","remarks","cdkTextareaAutosize","","cdkAutosizeMinRows","2"],["formControlName","genderId"],["matInput","","required","","formControlName","activationDate",3,"min","max","matDatepicker"],["required","","formControlName","savingsProductId"]],template:function(n,i){if(n&1){let s=Y();l(0,"form",4)(1,"div",5)(2,"mat-form-field",6)(3,"mat-label"),c(4),p(5,"translate"),r(),l(6,"mat-select",7),Se(7,$3e,2,2,"mat-option",8,Pe),r(),E(9,U3e,7,9,"mat-error"),r(),l(10,"mat-form-field",6)(11,"mat-label"),c(12),p(13,"translate"),r(),l(14,"mat-select",9),Se(15,W3e,3,5,"mat-option",8,Pe),r()(),l(17,"mat-form-field",6)(18,"mat-label"),c(19),p(20,"translate"),r(),b(21,"input",10),r(),E(22,J3e,7,6,"mat-form-field",11),E(23,aSe,4,3,"div",12),b(24,"mat-divider"),l(25,"mat-form-field",13),R("click",function(){V(s);let u=xe(32);return q(u.open())}),l(26,"mat-label"),c(27),p(28,"translate"),r(),b(29,"input",14)(30,"mat-datepicker-toggle",15)(31,"mat-datepicker",null,0),r(),E(33,sSe,33,19,"div",16),E(34,pSe,7,3,"mat-form-field",11),l(35,"mat-form-field",11)(36,"mat-label"),c(37),p(38,"translate"),r(),l(39,"mat-select",17),Se(40,mSe,2,2,"mat-option",8,Pe),r()(),E(42,dSe,3,3,"mat-checkbox",18),b(43,"mat-divider",19),l(44,"mat-form-field",11)(45,"mat-label"),c(46),p(47,"translate"),r(),b(48,"input",20),r(),l(49,"mat-form-field",11)(50,"mat-label"),c(51),p(52,"translate"),r(),b(53,"input",21),E(54,uSe,3,3,"mat-error"),r(),l(55,"mat-form-field",11)(56,"mat-label"),c(57),p(58,"translate"),r(),l(59,"mat-select",22),Se(60,fSe,2,2,"mat-option",8,Pe),r()(),l(62,"mat-form-field",11)(63,"mat-label"),c(64),p(65,"translate"),r(),l(66,"mat-select",23),Se(67,hSe,2,2,"mat-option",8,Pe),r()(),l(69,"mat-form-field",13),R("click",function(){V(s);let u=xe(76);return q(u.open())}),l(70,"mat-label"),c(71),p(72,"translate"),r(),b(73,"input",24)(74,"mat-datepicker-toggle",15)(75,"mat-datepicker",null,1),r(),b(77,"br"),l(78,"mat-checkbox",25),c(79),p(80,"translate"),r(),E(81,_Se,9,8,"mat-form-field",11),l(82,"mat-checkbox",26),c(83),p(84,"translate"),r(),E(85,xSe,8,4,"mat-form-field",11),r(),l(86,"div",27)(87,"button",28),b(88,"fa-icon",29),c(89),p(90,"translate"),r(),l(91,"button",30),c(92),p(93,"translate"),b(94,"fa-icon",31),r()()()}if(n&2){let s=xe(32),d=xe(76);g("formGroup",i.createClientForm),a(4),h(m(5,31,"labels.inputs.Office")),a(3),we(i.officeOptions),a(2),I(i.createClientForm.controls.officeId.hasError("required")?9:-1),a(3),h(m(13,33,"labels.inputs.Legal Form")),a(3),we(i.legalFormOptions),a(4),h(m(20,35,"labels.inputs.External Id")),a(3),I(i.createClientForm.contains("fullname")?22:-1),a(),I(i.createClientForm.contains("firstname")||i.createClientForm.contains("middlename")||i.createClientForm.contains("lastname")?23:-1),a(4),v(" ",m(28,37,"labels.inputs."+i.getDateLabel(i.createClientForm.value.legalFormId,oe(59,G3e)))," "),a(2),g("max",i.maxDate)("matDatepicker",s),a(),g("for",s),a(3),I(i.createClientForm.get("clientNonPersonDetails")?33:-1),a(),I(i.createClientForm.value.legalFormId===1?34:-1),a(3),h(m(38,39,"labels.inputs.Staff")),a(3),we(i.staffOptions),a(2),I(i.createClientForm.value.legalFormId===1?42:-1),a(4),h(m(47,41,"labels.inputs.Mobile No")),a(5),h(m(52,43,"labels.inputs.Email Address")),a(3),I(i.createClientForm.controls.emailAddress.errors!=null&&i.createClientForm.controls.emailAddress.errors.email?54:-1),a(3),h(m(58,45,"labels.inputs.Client Type")),a(3),we(i.clientTypeOptions),a(4),h(m(65,47,"labels.inputs.Client Classification")),a(3),we(i.clientClassificationTypeOptions),a(4),h(m(72,49,"labels.inputs.Submitted On")),a(2),g("min",i.minDate)("max",i.maxDate)("matDatepicker",d),a(),g("for",d),a(5),v(" ",m(80,51,"labels.inputs.Active"),"? "),a(2),I(i.createClientForm.contains("activationDate")?81:-1),a(2),v(" ",m(84,53,"labels.inputs.Open Savings Account"),"? "),a(2),I(i.createClientForm.contains("savingsProductId")?85:-1),a(4),v(" ",m(90,55,"labels.buttons.Previous")," "),a(3),v(" ",m(93,57,"labels.buttons.Next")," ")}},dependencies:[ue,fe,tt,st,Ue,Xe,dt,Ze,et,la,Fe,Be,ut,ai,ze,gt,ft,mi,di,pi,ve,fi,Ri,Ln,qi,ke,Ji,he,Fi],styles:["form[_ngcontent-%COMP%]{padding:16px 0}form[_ngcontent-%COMP%] .layout-row-wrap[_ngcontent-%COMP%]{gap:8px!important}mat-form-field[_ngcontent-%COMP%]{margin-bottom:8px}mat-divider[_ngcontent-%COMP%]{margin:16px 0}.margin-v[_ngcontent-%COMP%]{margin:2em 0 0}.margin-t[_ngcontent-%COMP%]{margin-top:2em}.name-fields-row[_ngcontent-%COMP%]{display:flex;gap:8px;flex-wrap:wrap;width:100%;margin-bottom:8px}.name-fields-row[_ngcontent-%COMP%] .name-field[_ngcontent-%COMP%]{flex:1;min-width:200px}.name-fields-row[_ngcontent-%COMP%] .name-field.first-name[_ngcontent-%COMP%], .name-fields-row[_ngcontent-%COMP%] .name-field.last-name[_ngcontent-%COMP%]{flex:1.2}.name-fields-row[_ngcontent-%COMP%] .name-field.middle-name[_ngcontent-%COMP%]{flex:1}@media (width <= 768px){.name-fields-row[_ngcontent-%COMP%]{flex-direction:column;gap:4px}.name-fields-row[_ngcontent-%COMP%] .name-field[_ngcontent-%COMP%]{width:100%;min-width:unset;flex:none}}.name-fields-row[_ngcontent-%COMP%] + mat-form-field[_ngcontent-%COMP%], .name-fields-row[_ngcontent-%COMP%] + mat-divider[_ngcontent-%COMP%], .name-fields-row[_ngcontent-%COMP%] + div[_ngcontent-%COMP%]{margin-top:8px}.layout-row.align-center[_ngcontent-%COMP%]{padding-top:16px;margin-top:12px}.layout-row.align-center[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{margin:0 6px}.flex-100[_ngcontent-%COMP%]{margin:16px 0;padding:8px 0}mat-checkbox[_ngcontent-%COMP%]{margin:8px 0}mat-checkbox.margin-v[_ngcontent-%COMP%]{margin-top:12px}@media (width <= 768px){form[_ngcontent-%COMP%]{padding:12px 0}form[_ngcontent-%COMP%] .layout-row-wrap[_ngcontent-%COMP%]{gap:6px!important}mat-form-field[_ngcontent-%COMP%]{margin-bottom:6px}mat-divider[_ngcontent-%COMP%]{margin:12px 0}.layout-row.align-center[_ngcontent-%COMP%]{padding-top:12px;margin-top:8px;flex-direction:column;gap:8px}.layout-row.align-center[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{width:100%;margin:2px 0}}@media (width <= 480px){form[_ngcontent-%COMP%]{padding:8px 0}form[_ngcontent-%COMP%] .layout-row-wrap[_ngcontent-%COMP%]{gap:4px!important}}"]})}}return e})();var bSe=e=>({member:e});function ySe(e,o){e&1&&(l(0,"mat-error"),c(1),p(2,"translate"),p(3,"translate"),l(4,"strong"),c(5),p(6,"translate"),r()()),e&2&&(a(),le(" ",m(2,3,"labels.inputs.First Name")," ",m(3,5,"labels.commons.is")," "),a(4),h(m(6,7,"labels.commons.required")))}function SSe(e,o){e&1&&(l(0,"mat-error"),c(1),p(2,"translate"),p(3,"translate"),l(4,"strong"),c(5),p(6,"translate"),r()()),e&2&&(a(),le(" ",m(2,3,"labels.inputs.Last Name")," ",m(3,5,"labels.commons.is")," "),a(4),h(m(6,7,"labels.commons.required")))}function wSe(e,o){if(e&1&&(l(0,"mat-option",12),c(1),p(2,"translateKey"),r()),e&2){let t=o.$implicit;g("value",t.id),a(),v(" ",Ot(2,2,t.name,"catalogs")," ")}}function PSe(e,o){e&1&&(l(0,"mat-error"),c(1),p(2,"translate"),p(3,"translate"),l(4,"strong"),c(5),p(6,"translate"),r()()),e&2&&(a(),le(" ",m(2,3,"labels.inputs.Relationship")," ",m(3,5,"labels.commons.is")," "),a(4),h(m(6,7,"labels.commons.required")))}function TSe(e,o){if(e&1&&(l(0,"mat-option",12),c(1),p(2,"translateKey"),r()),e&2){let t=o.$implicit;g("value",t.id),a(),v(" ",Ot(2,2,t.name,"catalogs")," ")}}function MSe(e,o){e&1&&(l(0,"mat-error"),c(1),p(2,"translate"),p(3,"translate"),l(4,"strong"),c(5),p(6,"translate"),r()()),e&2&&(a(),le(" ",m(2,3,"labels.inputs.Gender")," ",m(3,5,"labels.commons.is")," "),a(4),h(m(6,7,"labels.commons.required")))}function DSe(e,o){if(e&1&&(l(0,"mat-option",12),c(1),p(2,"translateKey"),r()),e&2){let t=o.$implicit;g("value",t.id),a(),v(" ",Ot(2,2,t.name,"catalogs")," ")}}function ESe(e,o){if(e&1&&(l(0,"mat-option",12),c(1),p(2,"translateKey"),r()),e&2){let t=o.$implicit;g("value",t.id),a(),v(" ",Ot(2,2,t.name,"catalogs")," ")}}var Jf=(()=>{class e{constructor(){this.dialogRef=T(eo),this.formBuilder=T(nt),this.dateUtils=T(Zt),this.data=T(Po),this.settingsService=T(At),this.maxDate=new Date}ngOnInit(){this.maxDate=this.settingsService.businessDate,this.createFamilyMemberForm(),this.data.context==="Edit"&&this.familyMemberForm.patchValue({firstName:this.data.member.firstName,middleName:this.data.member.middleName,lastName:this.data.member.lastName,qualification:this.data.member.qualification,age:this.data.member.age,isDependent:this.data.member.isDependent,relationshipId:this.data.member.relationshipId,genderId:this.data.member.genderId,professionId:this.data.member.professionId,maritalStatusId:this.data.member.maritalStatusId,dateOfBirth:this.data.member.dateOfBirth&&new Date(this.data.member.dateOfBirth)}),this.familyMemberForm.get("dateOfBirth").valueChanges.subscribe(n=>{if(n){let i=this.calculateAge(n);this.familyMemberForm.get("age").setValue(i)}else this.familyMemberForm.get("age").setValue("")});let t=this.familyMemberForm.get("dateOfBirth").value;if(t){let n=this.calculateAge(t);this.familyMemberForm.get("age").setValue(n)}}calculateAge(t){let n=new Date(this.settingsService.businessDate),i=new Date(t),s=n.getFullYear()-i.getFullYear(),d=n.getMonth()-i.getMonth();return(d<0||d===0&&n.getDate(){class e{constructor(){this.dialog=T(Ht),this.translateService=T(yi),this.clientFamilyMembers=[]}addFamilyMember(){this.dialog.open(Jf,{data:{context:this.translateService.instant("labels.buttons.Add"),options:this.clientTemplate.familyMemberOptions},width:"50rem"}).afterClosed().subscribe(n=>{n.member&&this.clientFamilyMembers.push(n.member)})}editFamilyMember(t,n){this.dialog.open(Jf,{data:{context:"Edit",member:t,options:this.clientTemplate.familyMemberOptions},width:"50rem"}).afterClosed().subscribe(s=>{s.member&&this.clientFamilyMembers.splice(n,1,s.member)})}deleteFamilyMember(t,n){this.dialog.open(vi,{data:{deleteContext:`Family member name : ${t} ${n}`}}).afterClosed().subscribe(s=>{s.delete&&this.clientFamilyMembers.splice(n,1)})}get familyMembers(){return{familyMembers:this.clientFamilyMembers}}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275cmp=me({type:e,selectors:[["mifosx-client-family-members-step"]],inputs:{clientTemplate:"clientTemplate"},decls:21,vars:12,consts:[[1,"mat-typography"],[1,"layout-row","align-end","m-b-20"],["mat-raised-button","","color","primary",3,"click"],["icon","plus",1,"m-r-10"],[1,"family-member"],[1,"layout-row","align-center","gap-2percent","margin-t","responsive-column"],["mat-raised-button","","matStepperPrevious",""],["icon","arrow-left",1,"m-r-10"],["mat-raised-button","","matStepperNext",""],["icon","arrow-right",1,"m-l-10"],[1,"family-member-actions","layout-row","align-end"],["mat-button","","color","primary"],["icon","edit",3,"click"],["mat-button","","color","warn",3,"click"],["icon","trash"]],template:function(n,i){n&1&&(l(0,"div",0)(1,"h3"),c(2),p(3,"translate"),r(),l(4,"div",1)(5,"button",2),R("click",function(){return i.addFamilyMember()}),b(6,"fa-icon",3),c(7),p(8,"translate"),r()(),l(9,"mat-accordion"),Se(10,ISe,51,69,"mat-expansion-panel",4,Pe),r(),l(12,"div",5)(13,"button",6),b(14,"fa-icon",7),c(15),p(16,"translate"),r(),l(17,"button",8),c(18),p(19,"translate"),b(20,"fa-icon",9),r()()()),n&2&&(a(2),h(m(3,4,"labels.heading.Family Members")),a(5),v("",m(8,6,"labels.buttons.Add")," "),a(3),we(i.clientFamilyMembers),a(5),v(" ",m(16,8,"labels.buttons.Previous")," "),a(3),v(" ",m(19,10,"labels.buttons.Next")," "))},dependencies:[ue,fe,ve,ke,Er,Tr,Mr,Dr,oc,Ri,qi,Ji,Pi,he,Qn],styles:[".family-member[_ngcontent-%COMP%] .family-member-actions[_ngcontent-%COMP%]{margin-top:1%}.family-member[_ngcontent-%COMP%] .family-member-actions[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{margin-right:1%}.family-member[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{margin:1% auto}.family-member[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{line-height:30px;margin-left:2%}.margin-t[_ngcontent-%COMP%]{margin-top:2em}"]})}}return e})();function OSe(e,o){if(e&1&&(l(0,"span"),c(1),p(2,"translate"),b(3,"br"),r()),e&2){let t=w().$implicit;a(),le("",m(2,2,"labels.inputs.Street")," : ",t.street)}}function ASe(e,o){if(e&1&&(l(0,"span"),c(1),p(2,"translate"),b(3,"br"),r()),e&2){let t=w().$implicit;a(),le("",m(2,2,"labels.inputs.Address Line")," 1 : ",t.addressLine1)}}function FSe(e,o){if(e&1&&(l(0,"span"),c(1),p(2,"translate"),b(3,"br"),r()),e&2){let t=w().$implicit;a(),le("",m(2,2,"labels.inputs.Address Line")," 2 : ",t.addressLine2)}}function kSe(e,o){if(e&1&&(l(0,"span"),c(1),p(2,"translate"),b(3,"br"),r()),e&2){let t=w().$implicit;a(),le("",m(2,2,"labels.inputs.Address Line")," 3 : ",t.addressLine3)}}function BSe(e,o){if(e&1&&(l(0,"span"),c(1),p(2,"translate"),b(3,"br"),r()),e&2){let t=w().$implicit;a(),le("",m(2,2,"labels.inputs.Town / Village")," : ",t.townVillage)}}function RSe(e,o){if(e&1&&(l(0,"span"),c(1),p(2,"translate"),b(3,"br"),r()),e&2){let t=w().$implicit;a(),le("",m(2,2,"labels.inputs.City")," : ",t.city)}}function NSe(e,o){if(e&1&&(l(0,"span"),c(1),p(2,"translate"),b(3,"br"),r()),e&2){let t,n=w().$implicit,i=w(2);a(),le("",m(2,2,"labels.inputs.State / Province")," : ",(t=i.getSelectedValue("stateProvinceIdOptions",n.stateProvinceId))==null?null:t.name)}}function LSe(e,o){if(e&1&&(l(0,"span"),c(1),p(2,"translate"),b(3,"br"),r()),e&2){let t,n=w().$implicit,i=w(2);a(),le("",m(2,2,"labels.inputs.Country")," : ",(t=i.getSelectedValue("countryIdOptions",n.countryId))==null?null:t.name)}}function VSe(e,o){if(e&1&&(l(0,"span"),c(1),p(2,"translate"),b(3,"br"),r()),e&2){let t=w().$implicit;a(),le("",m(2,2,"labels.inputs.Postal Code")," : ",t.postalCode)}}function qSe(e,o){if(e&1&&(l(0,"span"),c(1),p(2,"translate"),b(3,"br"),r()),e&2){let t=w().$implicit;a(),le("",m(2,2,"labels.inputs.Active Status")," : ",t.isActive)}}function zSe(e,o){if(e&1){let t=Y();l(0,"mat-expansion-panel",9)(1,"mat-expansion-panel-header")(2,"mat-panel-title"),c(3),r(),l(4,"mat-panel-description"),c(5),r()(),b(6,"mat-divider"),l(7,"div",10)(8,"button",11),R("click",function(){let i=V(t),s=i.$implicit,d=i.$index,u=w(2);return q(u.editAddress(s,d))}),b(9,"fa-icon",12),r(),l(10,"button",13),R("click",function(){let i=V(t),s=i.$implicit,d=i.$index,u=w(2);return q(u.deleteAddress(s,d))}),b(11,"fa-icon",14),r(),l(12,"mat-slide-toggle",15),R("change",function(){let i=V(t).$implicit,s=w(2);return q(s.toggleAddress(i))}),r()(),l(13,"p"),E(14,OSe,4,4,"span"),E(15,ASe,4,4,"span"),E(16,FSe,4,4,"span"),E(17,kSe,4,4,"span"),E(18,BSe,4,4,"span"),E(19,RSe,4,4,"span"),E(20,NSe,4,4,"span"),E(21,LSe,4,4,"span"),E(22,VSe,4,4,"span"),E(23,qSe,4,4,"span"),r()()}if(e&2){let t,n=o.$implicit,i=w(2);a(3),v(" ",(t=i.getSelectedValue("addressTypeIdOptions",n.addressTypeId))==null?null:t.name," "),a(2),v(" ",n.relationship," "),a(7),g("checked",n.isActive),a(2),I(i.isFieldEnabled("street")?14:-1),a(),I(i.isFieldEnabled("addressLine1")?15:-1),a(),I(i.isFieldEnabled("addressLine2")?16:-1),a(),I(i.isFieldEnabled("addressLine3")?17:-1),a(),I(i.isFieldEnabled("townVillage")?18:-1),a(),I(i.isFieldEnabled("city")?19:-1),a(),I(i.isFieldEnabled("stateProvinceId")?20:-1),a(),I(i.isFieldEnabled("countryId")?21:-1),a(),I(i.isFieldEnabled("postalCode")?22:-1),a(),I(i.isFieldEnabled("isActive")?23:-1)}}function HSe(e,o){if(e&1&&(l(0,"mat-accordion"),Se(1,zSe,24,13,"mat-expansion-panel",9,Pe),r()),e&2){let t=w();a(),we(t.clientAddressData)}}var C2=(()=>{class e{constructor(){this.dialog=T(Ht),this.translateService=T(yi),this.clientAddressData=[],this.clientAddressData=[]}addAddress(){let t={title:this.translateService.instant("labels.buttons.Add")+" "+this.translateService.instant("labels.catalogs.Client")+" "+this.translateService.instant("labels.heading.Address"),formfields:this.getAddressFormFields()};this.dialog.open(an,{data:t,width:"50rem"}).afterClosed().subscribe(i=>{if(i.data){let s=i.data.value;s.isActive=!1;for(let d in s)(s[d]===""||s[d]===void 0)&&delete s[d];this.clientAddressData.push(s)}})}editAddress(t,n){let i={title:this.translateService.instant("labels.buttons.Edit")+" "+this.translateService.instant("labels.catalogs.Client")+" "+this.translateService.instant("labels.heading.Address"),formfields:this.getAddressFormFields(t),layout:{addButtonText:"Edit"}};this.dialog.open(an,{data:i,width:"50rem"}).afterClosed().subscribe(d=>{if(d.data){let u=d.data.value;u.isActive=t.isActive;for(let f in u)(u[f]===""||u[f]===void 0)&&delete u[f];this.clientAddressData[n]=u}})}deleteAddress(t,n){this.dialog.open(vi,{data:{deleteContext:`${this.translateService.instant("labels.heading.Address")} ${this.translateService.instant("labels.inputs.Type")} : ${t.addressType} ${n}`}}).afterClosed().subscribe(s=>{s.delete&&this.clientAddressData.splice(n,1)})}toggleAddress(t){t.isActive=!t.isActive}isFieldEnabled(t){return this.clientAddressFieldConfig.find(n=>n.field===t)?.isEnabled}getSelectedValue(t,n){return this.clientTemplate.address[0][t].find(i=>i.id===n)}getAddressFormFields(t){let n=[];for(let i=0;ii!==null),n}get address(){return{address:this.clientAddressData?this.clientAddressData:[]}}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275cmp=me({type:e,selectors:[["mifosx-client-address-step"]],inputs:{clientAddressFieldConfig:"clientAddressFieldConfig",clientTemplate:"clientTemplate"},decls:19,vars:13,consts:[[1,"mat-typography"],[1,"layout-row","align-end","m-b-20"],["mat-raised-button","","color","primary",3,"click"],["icon","plus",1,"m-r-10"],[1,"layout-row","align-center","gap-2percent","margin-t","responsive-column"],["mat-raised-button","","matStepperPrevious",""],["icon","arrow-left",1,"m-r-10"],["mat-raised-button","","matStepperNext",""],["icon","arrow-right",1,"m-l-10"],[1,"address"],[1,"address-actions","layout-row","align-end","align-items-center"],["mat-button","","color","primary",3,"click"],["icon","edit"],["mat-button","","color","warn",3,"click"],["icon","trash"],[3,"change","checked"]],template:function(n,i){n&1&&(l(0,"div",0)(1,"h3"),c(2),p(3,"translate"),r(),l(4,"div",1)(5,"button",2),R("click",function(){return i.addAddress()}),b(6,"fa-icon",3),c(7),p(8,"translate"),r()(),E(9,HSe,3,0,"mat-accordion"),l(10,"div",4)(11,"button",5),b(12,"fa-icon",6),c(13),p(14,"translate"),r(),l(15,"button",7),c(16),p(17,"translate"),b(18,"fa-icon",8),r()()()),n&2&&(a(2),h(m(3,5,"labels.heading.Address")),a(5),v("",m(8,7,"labels.buttons.Add")," "),a(2),I(i.clientAddressData.length>0?9:-1),a(4),v(" ",m(14,9,"labels.buttons.Previous")," "),a(3),v(" ",m(17,11,"labels.buttons.Next")," "))},dependencies:[ue,fe,ve,ke,Er,Tr,Mr,Dr,oc,Ri,Ip,qi,Ji,he],styles:[".address[_ngcontent-%COMP%] .address-actions[_ngcontent-%COMP%]{margin-top:1%}.address[_ngcontent-%COMP%] .address-actions[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{margin-right:1%}.address[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{margin:1% auto}.address[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{line-height:30px;margin-left:2%}.margin-t[_ngcontent-%COMP%]{margin-top:2em}"]})}}return e})();function GSe(e,o){if(e&1&&(l(0,"mat-option",14),c(1),r()),e&2){let t=o.$implicit;g("value",t.id),a(),v(" ",t.value," ")}}function jSe(e,o){if(e&1&&(l(0,"mat-select",11),Se(1,GSe,2,2,"mat-option",14,Pe),r()),e&2){let t=w(2).$implicit;g("formControlName",Le(t.controlName)),a(),we(t.columnValues)}}function $Se(e,o){if(e&1&&b(0,"input",12),e&2){let t=w(2).$implicit;g("formControlName",Le(t.controlName))}}function USe(e,o){if(e&1&&b(0,"input",13),e&2){let t=w(2).$implicit;g("formControlName",Le(t.controlName))}}function WSe(e,o){if(e&1&&b(0,"textarea",13),e&2){let t=w(2).$implicit;g("formControlName",Le(t.controlName))}}function QSe(e,o){if(e&1){let t=Y();l(0,"span",15),R("click",function(){V(t);let i=xe(4);return q(i.open())}),b(1,"input",16)(2,"mat-datepicker-toggle",17)(3,"mat-datepicker",null,0),r()}if(e&2){let t=xe(4),n=w(2).$implicit;a(),g("formControlName",Le(n.controlName))("matDatepicker",t),a(),g("for",t)}}function YSe(e,o){if(e&1&&(l(0,"mat-form-field",9)(1,"mat-label"),c(2),r(),E(3,jSe,3,2,"mat-select",11),E(4,$Se,1,2,"input",12),E(5,USe,1,2,"input",13),E(6,WSe,1,2,"textarea",13),E(7,QSe,5,4,"span"),r()),e&2){let t=w().$implicit,n=w();a(2),h(n.getInputName(t)),a(),I(n.isDropdown(t.columnDisplayType)?3:-1),a(),I(n.isNumeric(t.columnDisplayType)?4:-1),a(),I(n.isString(t.columnDisplayType)?5:-1),a(),I(n.isText(t.columnDisplayType)?6:-1),a(),I(n.isDate(t.columnDisplayType)?7:-1)}}function JSe(e,o){if(e&1&&(l(0,"mat-checkbox",10),c(1),r()),e&2){let t=w().$implicit,n=w();g("formControlName",Le(t.controlName)),a(),v(" ",n.getInputName(t)," ")}}function KSe(e,o){if(e&1&&(l(0,"div",3),E(1,YSe,8,6,"mat-form-field",9),E(2,JSe,2,3,"mat-checkbox",10),r()),e&2){let t=o.$implicit,n=w();a(),I(n.isBoolean(t.columnDisplayType)?-1:1),a(),I(n.isBoolean(t.columnDisplayType)?2:-1)}}var v2=(()=>{class e{constructor(){this.formBuilder=T(nt),this.settingsService=T(At),this.datatableService=T(Qg),this.datatableInputs=[]}ngOnInit(){this.datatableInputs=this.datatableService.filterSystemColumns(this.datatableData.columnHeaderData);let t={};this.datatableInputs.forEach(n=>{n.controlName=this.getInputName(n),n.isColumnNullable?t[n.controlName]=new it(""):this.isNumeric(n.columnDisplayType)?t[n.controlName]=new it(0,[se.required]):t[n.controlName]=new it("",[se.required])}),this.datatableForm=this.formBuilder.group(t)}getInputName(t){return this.datatableService.getInputName(t)}isNumeric(t){return this.datatableService.isNumeric(t)}isDate(t){return this.datatableService.isDate(t)}isBoolean(t){return this.datatableService.isBoolean(t)}isDropdown(t){return this.datatableService.isDropdown(t)}isString(t){return this.datatableService.isString(t)}isText(t){return this.datatableService.isText(t)}get payload(){let t=this.settingsService.dateFormat,n=this.datatableForm.value,i=this.datatableService.buildPayload(this.datatableInputs,n,t,{locale:this.settingsService.language.code});return{registeredTableName:this.datatableData.registeredTableName,data:i}}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275cmp=me({type:e,selectors:[["mifosx-client-datatable-step"]],inputs:{datatableData:"datatableData"},decls:13,vars:7,consts:[["datePicker",""],[3,"formGroup"],[1,"layout-row-wrap","gap-2px","responsive-column"],[1,"flex-48"],[1,"layout-row","align-center","gap-2percent","margin-t","responsive-column"],["mat-raised-button","","matStepperPrevious","","disabled",""],["icon","arrow-left",1,"m-r-10"],["mat-raised-button","","matStepperNext",""],["icon","arrow-right",1,"m-l-10"],[1,"flex-100"],["labelPosition","before",1,"margin-v",3,"formControlName"],[3,"formControlName"],["matInput","","type","number",3,"formControlName"],["matInput","",3,"formControlName"],[3,"value"],[3,"click"],["matInput","",1,"date-picker",3,"matDatepicker","formControlName"],["matSuffix","",3,"for"]],template:function(n,i){n&1&&(l(0,"form",1)(1,"div",2),Se(2,KSe,3,2,"div",3,Pe),r(),l(4,"div",4)(5,"button",5),b(6,"fa-icon",6),c(7),p(8,"translate"),r(),l(9,"button",7),c(10),p(11,"translate"),b(12,"fa-icon",8),r()()()),n&2&&(g("formGroup",i.datatableForm),a(2),we(i.datatableInputs),a(5),v(" ",m(8,3,"labels.buttons.Previous")," "),a(3),v(" ",m(11,5,"labels.buttons.Next")," "))},dependencies:[ue,fe,tt,st,tn,Ue,Xe,Ze,et,Fe,Be,ai,ze,gt,ft,mi,di,pi,ve,fi,qi,ke,Ji,he],styles:[".date-picker[_ngcontent-%COMP%]{width:92%}mat-checkbox[_ngcontent-%COMP%]{margin-top:30px}"]})}}return e})();var XSe=()=>["../"];function ZSe(e,o){if(e&1&&(l(0,"span",4),c(1),r()),e&2){let t=w();a(),h(t.client.fullname)}}function ewe(e,o){if(e&1&&(l(0,"span",4),c(1),r()),e&2){let t=w();a(),le("",t.client.firstname," ",t.client.middlename?t.client.middlename+" "+t.client.lastname:t.client.lastname)}}function twe(e,o){if(e&1&&(l(0,"div",2)(1,"span",3),c(2),p(3,"translate"),r(),l(4,"span",4),c(5),p(6,"find"),r()()),e&2){let t=w();a(2),h(m(3,2,"labels.inputs.Staff")),a(3),h($t(6,4,t.client.staffId,t.clientTemplate.staffOptions,"id","displayName"))}}function iwe(e,o){if(e&1&&(l(0,"div",2)(1,"span",3),c(2),r(),l(3,"span",4),c(4),p(5,"dateFormat"),r()()),e&2){let t=w();a(2),h(t.client.legalFormId===1?"Date of Birth":"Incorporation Date"),a(2),h(m(5,2,t.client.dateOfBirth))}}function nwe(e,o){if(e&1&&(l(0,"div",2)(1,"span",3),c(2),p(3,"translate"),r(),l(4,"span",4),b(5,"mifosx-external-identifier",12),r()()),e&2){let t=w();a(2),h(m(3,3,"labels.inputs.External Id")),a(3),g("externalId",Le(t.client.externalId))}}function owe(e,o){if(e&1&&(l(0,"div",2)(1,"span",3),c(2),p(3,"translate"),r(),l(4,"span",4),c(5),r()()),e&2){let t=w();a(2),h(m(3,2,"labels.inputs.Mobile No")),a(3),h(t.client.mobileNo)}}function awe(e,o){if(e&1&&(l(0,"div",2)(1,"span",3),c(2),p(3,"translate"),r(),l(4,"span",4),c(5),r()()),e&2){let t=w();a(2),h(m(3,2,"labels.inputs.Email Address")),a(3),h(t.client.emailAddress)}}function rwe(e,o){if(e&1&&(l(0,"div",2)(1,"span",3),c(2),p(3,"translate"),r(),l(4,"span",4),c(5),p(6,"find"),r()()),e&2){let t=w();a(2),h(m(3,2,"labels.inputs.Client Type")),a(3),h($t(6,4,t.client.clientTypeId,t.clientTemplate.clientTypeOptions,"id","name"))}}function lwe(e,o){if(e&1&&(l(0,"div",2)(1,"span",3),c(2),p(3,"translate"),r(),l(4,"span",4),c(5),p(6,"find"),r()()),e&2){let t=w();a(2),h(m(3,2,"labels.inputs.Client Classification")),a(3),h($t(6,4,t.client.clientClassificationId,t.clientTemplate.clientClassificationOptions,"id","name"))}}function swe(e,o){if(e&1&&(l(0,"div",2)(1,"span",3),c(2),p(3,"translate"),r(),l(4,"span",4),c(5),p(6,"find"),r()()),e&2){let t=w();a(2),h(m(3,2,"labels.inputs.Savings Product")),a(3),h($t(6,4,t.client.savingsProductId,t.clientTemplate.savingProductOptions,"id","name"))}}function cwe(e,o){if(e&1&&(l(0,"div",2)(1,"span",3),c(2),p(3,"translate"),r(),l(4,"span",4),c(5),p(6,"dateFormat"),r()()),e&2){let t=w();a(2),h(m(3,2,"labels.inputs.Submitted On Date")),a(3),h(m(6,4,t.client.submittedOnDate))}}function pwe(e,o){if(e&1&&(l(0,"div",2)(1,"span",3),c(2),p(3,"translate"),r(),l(4,"span",4),c(5),p(6,"dateFormat"),r()()),e&2){let t=w();a(2),h(m(3,2,"labels.inputs.Activation Date")),a(3),h(m(6,4,t.client.activationDate))}}function mwe(e,o){if(e&1&&(l(0,"div",2)(1,"span",3),c(2),p(3,"translate"),r(),l(4,"span",4),c(5),p(6,"find"),r()()),e&2){let t=w(2);a(2),h(m(3,2,"labels.inputs.Gender")),a(3),h($t(6,4,t.client.genderId,t.clientTemplate.genderOptions,"id","name"))}}function dwe(e,o){if(e&1&&(E(0,mwe,7,9,"div",2),l(1,"div",2)(2,"span",3),c(3),p(4,"translate"),r(),l(5,"span",4),c(6),p(7,"yesNo"),r()()),e&2){let t=w();I(t.client.genderId?0:-1),a(3),v("",m(4,3,"labels.inputs.Is staff"),"?"),a(3),h(m(7,5,t.client.isStaff))}}function uwe(e,o){if(e&1&&(l(0,"div",2)(1,"span",3),c(2),p(3,"translate"),r(),l(4,"span",4),c(5),p(6,"dateFormat"),r()()),e&2){let t=w(2);a(2),h(m(3,2,"labels.inputs.Incorporation Validity Till Date")),a(3),h(m(6,4,t.client.clientNonPersonDetails.incorpValidityTillDate))}}function fwe(e,o){if(e&1&&(l(0,"div",2)(1,"span",3),c(2),p(3,"translate"),r(),l(4,"span",4),c(5),p(6,"find"),r()()),e&2){let t=w(2);a(2),h(m(3,2,"labels.inputs.Main Business Line")),a(3),h($t(6,4,t.client.clientNonPersonDetails.mainBusinessLineId,t.clientTemplate.clientNonPersonMainBusinessLineOptions,"id","name"))}}function hwe(e,o){if(e&1&&(l(0,"div",2)(1,"span",3),c(2),p(3,"translate"),r(),l(4,"span",4),c(5),p(6,"find"),r()()),e&2){let t=w(2);a(2),h(m(3,2,"labels.inputs.Constitution")),a(3),h($t(6,4,t.client.clientNonPersonDetails.constitutionId,t.clientTemplate.clientNonPersonConstitutionOptions,"id","name"))}}function gwe(e,o){if(e&1&&(E(0,uwe,7,6,"div",2),l(1,"div",2)(2,"span",3),c(3),p(4,"translate"),r(),l(5,"span",4),c(6),r()(),E(7,fwe,7,9,"div",2),E(8,hwe,7,9,"div",2),l(9,"div",2)(10,"span",3),c(11),p(12,"translate"),r(),l(13,"span",4),c(14),r()()),e&2){let t=w();I(t.client.clientNonPersonDetails.incorpValidityTillDate?0:-1),a(3),h(m(4,7,"labels.inputs.Incorportation Number")),a(3),h(t.client.clientNonPersonDetails.incorpNumber||"Not Provided"),a(),I(t.client.clientNonPersonDetails.mainBusinessLineId?7:-1),a(),I(t.client.clientNonPersonDetails.constitutionId?8:-1),a(3),h(m(12,9,"labels.inputs.Remarks")),a(3),h(t.client.clientNonPersonDetails.remarks||"N/A")}}function _we(e,o){if(e&1&&(l(0,"mat-expansion-panel",15)(1,"mat-expansion-panel-header")(2,"mat-panel-title"),c(3),r(),l(4,"mat-panel-description"),c(5),r()(),b(6,"mat-divider"),l(7,"p"),c(8),p(9,"translate"),b(10,"br"),c(11),p(12,"translate"),b(13,"br"),c(14),p(15,"translate"),b(16,"br"),c(17),p(18,"translate"),b(19,"br"),c(20),p(21,"translate"),p(22,"find"),b(23,"br"),c(24),p(25,"translate"),b(26,"br"),c(27),p(28,"translate"),b(29,"br"),c(30),p(31,"translate"),p(32,"find"),b(33,"br"),c(34),p(35,"translate"),p(36,"find"),b(37,"br"),c(38),p(39,"translate"),p(40,"find"),b(41,"br"),c(42),p(43,"translate"),p(44,"dateFormat"),b(45,"br"),r()()),e&2){let t=o.$implicit,n=w(2);a(3),le(" ",t.firstName," ",t.middleName?t.middleName+" "+t.lastName:t.lastName," "),a(2),v(" ",t.relationship," "),a(3),le(" ",m(9,25,"labels.inputs.First Name")," : ",t.firstName),a(3),le(" ",m(12,27,"labels.inputs.Middle Name")," : ",t.middleName),a(3),le(" ",m(15,29,"labels.inputs.Last Name")," : ",t.lastName),a(3),le(" ",m(18,31,"labels.inputs.Qualification")," : ",t.qualification),a(3),le(" ",m(21,33,"labels.inputs.Relationship")," : ",$t(22,35,t.relationshipId,n.clientTemplate.familyMemberOptions.relationshipIdOptions,"id","name")),a(4),le(" ",m(25,40,"labels.inputs.Age")," : ",t.age),a(3),le(" ",m(28,42,"labels.inputs.Is Dependent")," : ",t.isDependent?"Yes":"No"),a(3),le(" ",m(31,44,"labels.inputs.Marital Status")," : ",$t(32,46,t.maritalStatusId,n.clientTemplate.familyMemberOptions.maritalStatusIdOptions,"id","name")),a(4),le(" ",m(35,51,"labels.inputs.Gender")," : ",$t(36,53,t.genderId,n.clientTemplate.familyMemberOptions.genderIdOptions,"id","name")),a(4),le(" ",m(39,58,"labels.inputs.Profession")," : ",$t(40,60,t.professionId,n.clientTemplate.familyMemberOptions.professionIdOptions,"id","name")),a(4),le(" ",m(43,65,"labels.inputs.Date Of Birth")," : ",m(44,67,t.dateOfBirth))}}function Cwe(e,o){if(e&1&&(l(0,"div",5)(1,"h3",13),c(2),p(3,"translate"),r(),b(4,"mat-divider",2),l(5,"mat-accordion",14),Se(6,_we,46,69,"mat-expansion-panel",15,Pe),r()()),e&2){let t=w();a(2),h(m(3,1,"labels.heading.Family Members")),a(4),we(t.client.familyMembers)}}function vwe(e,o){if(e&1&&(l(0,"span"),c(1),p(2,"translate"),b(3,"br"),r()),e&2){let t=w().$implicit;a(),le("",m(2,2,"labels.inputs.Street")," : ",t.street)}}function xwe(e,o){if(e&1&&(l(0,"span"),c(1),p(2,"translate"),b(3,"br"),r()),e&2){let t=w().$implicit;a(),le("",m(2,2,"labels.inputs.Address Line")," 1 : ",t.addressLine1)}}function bwe(e,o){if(e&1&&(l(0,"span"),c(1),p(2,"translate"),b(3,"br"),r()),e&2){let t=w().$implicit;a(),le("",m(2,2,"labels.inputs.Address Line")," 2 : ",t.addressLine2)}}function ywe(e,o){if(e&1&&(l(0,"span"),c(1),p(2,"translate"),b(3,"br"),r()),e&2){let t=w().$implicit;a(),le("",m(2,2,"labels.inputs.Address Line")," 3 : ",t.addressLine3)}}function Swe(e,o){if(e&1&&(l(0,"span"),c(1),p(2,"translate"),b(3,"br"),r()),e&2){let t=w().$implicit;a(),le("",m(2,2,"labels.inputs.Town / Village")," : ",t.townVillage)}}function wwe(e,o){if(e&1&&(l(0,"span"),c(1),p(2,"translate"),b(3,"br"),r()),e&2){let t=w().$implicit;a(),le("",m(2,2,"labels.inputs.City")," : ",t.city)}}function Pwe(e,o){if(e&1&&(l(0,"span"),c(1),p(2,"translate"),b(3,"br"),r()),e&2){let t,n=w().$implicit,i=w(2);a(),le("",m(2,2,"labels.inputs.State / Province")," : ",(t=i.getSelectedValue("stateProvinceIdOptions",n.stateProvinceId))==null?null:t.name)}}function Twe(e,o){if(e&1&&(l(0,"span"),c(1),p(2,"translate"),b(3,"br"),r()),e&2){let t,n=w().$implicit,i=w(2);a(),le("",m(2,2,"labels.inputs.Country")," : ",(t=i.getSelectedValue("countryIdOptions",n.countryId))==null?null:t.name)}}function Mwe(e,o){if(e&1&&(l(0,"span"),c(1),p(2,"translate"),b(3,"br"),r()),e&2){let t=w().$implicit;a(),le("",m(2,2,"labels.inputs.Postal Code")," : ",t.postalCode)}}function Dwe(e,o){if(e&1&&(l(0,"span"),c(1),p(2,"translate"),b(3,"br"),r()),e&2){let t=w().$implicit;a(),le("",m(2,2,"labels.inputs.Active Status")," : ",t.isActive)}}function Ewe(e,o){if(e&1&&(l(0,"mat-expansion-panel",16)(1,"mat-expansion-panel-header")(2,"mat-panel-title"),c(3),r(),l(4,"mat-panel-description"),c(5),r()(),b(6,"mat-divider"),l(7,"p"),E(8,vwe,4,4,"span"),E(9,xwe,4,4,"span"),E(10,bwe,4,4,"span"),E(11,ywe,4,4,"span"),E(12,Swe,4,4,"span"),E(13,wwe,4,4,"span"),E(14,Pwe,4,4,"span"),E(15,Twe,4,4,"span"),E(16,Mwe,4,4,"span"),E(17,Dwe,4,4,"span"),r()()),e&2){let t,n=o.$implicit,i=w(2);a(3),v(" ",(t=i.getSelectedValue("addressTypeIdOptions",n.addressTypeId))==null?null:t.name," "),a(2),v(" ",n.relationship," "),a(3),I(i.isFieldEnabled("street")?8:-1),a(),I(i.isFieldEnabled("addressLine1")?9:-1),a(),I(i.isFieldEnabled("addressLine2")?10:-1),a(),I(i.isFieldEnabled("addressLine3")?11:-1),a(),I(i.isFieldEnabled("townVillage")?12:-1),a(),I(i.isFieldEnabled("city")?13:-1),a(),I(i.isFieldEnabled("stateProvinceId")?14:-1),a(),I(i.isFieldEnabled("countryId")?15:-1),a(),I(i.isFieldEnabled("postalCode")?16:-1),a(),I(i.isFieldEnabled("isActive")?17:-1)}}function Iwe(e,o){if(e&1&&(l(0,"div",6)(1,"h3",13),c(2),p(3,"translate"),r(),b(4,"mat-divider",2),l(5,"mat-accordion",14),Se(6,Ewe,18,12,"mat-expansion-panel",16,Pe),r()()),e&2){let t=w();a(2),h(m(3,1,"labels.heading.Address")),a(4),we(t.client.address)}}var x2=(()=>{class e{constructor(){this.submitEvent=new bi}getSelectedValue(t,n){return this.clientTemplate.address[0][t].find(i=>i.id===n)}isFieldEnabled(t){return this.clientAddressFieldConfig.find(n=>n.field===t)?.isEnabled}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275cmp=me({type:e,selectors:[["mifosx-client-preview-step"]],inputs:{clientAddressFieldConfig:"clientAddressFieldConfig",clientTemplate:"clientTemplate",client:"client"},outputs:{submitEvent:"submitEvent"},decls:57,vars:58,consts:[[1,"container","p-b-20"],[3,"inset"],[1,"flex-fill"],[1,"flex-40"],[1,"flex-60"],[1,"layout-row-wrap","responsive-column","flex-fill","m-b-20"],[1,"flex-fill","layout-row-wrap","responsive-column"],[1,"layout-row","responsive-column","align-center","gap-2px","margin-t"],["mat-raised-button","","matStepperPrevious",""],["icon","arrow-left",1,"m-r-10"],["mat-raised-button","",3,"routerLink"],["mat-raised-button","","color","primary",3,"click"],[3,"externalId"],[1,"mat-h3","flex-fill"],[1,"flex-fill","m-t-5"],[1,"family-member"],[1,"address"]],template:function(n,i){n&1&&(l(0,"div",0)(1,"h3"),c(2),p(3,"translate"),r(),b(4,"mat-divider",1),l(5,"div",2)(6,"span",3),c(7),p(8,"translate"),r(),E(9,ZSe,2,1,"span",4),E(10,ewe,2,2,"span",4),r(),l(11,"div",2)(12,"span",3),c(13),p(14,"translate"),r(),l(15,"span",4),c(16),p(17,"find"),r()(),l(18,"div",2)(19,"span",3),c(20),p(21,"translate"),r(),l(22,"span",4),c(23),p(24,"find"),r()(),E(25,twe,7,9,"div",2),E(26,iwe,6,4,"div",2),E(27,nwe,6,5,"div",2),E(28,owe,6,4,"div",2),E(29,awe,6,4,"div",2),E(30,rwe,7,9,"div",2),E(31,lwe,7,9,"div",2),E(32,swe,7,9,"div",2),E(33,cwe,7,6,"div",2),l(34,"div",2)(35,"span",3),c(36),p(37,"translate"),r(),l(38,"span",4),c(39),p(40,"yesNo"),r()(),E(41,pwe,7,6,"div",2),E(42,dwe,8,7),E(43,gwe,15,11),E(44,Cwe,8,3,"div",5),E(45,Iwe,8,3,"div",6),r(),l(46,"div",7)(47,"button",8),b(48,"fa-icon",9),c(49),p(50,"translate"),r(),l(51,"button",10),c(52),p(53,"translate"),r(),l(54,"button",11),R("click",function(){return i.submitEvent.emit()}),c(55),p(56,"translate"),r()()),n&2&&(a(2),h(m(3,29,"labels.heading.General")),a(2),g("inset",!0),a(3),h(m(8,31,"labels.inputs.name")),a(2),I(i.client.legalFormId===2?9:-1),a(),I(i.client.legalFormId===1?10:-1),a(3),h(m(14,33,"labels.inputs.Office")),a(3),h($t(17,35,i.client.officeId,i.clientTemplate.officeOptions,"id","name")),a(4),h(m(21,40,"labels.inputs.Legal Form")),a(3),h($t(24,42,i.client.legalFormId,i.clientTemplate.clientLegalFormOptions,"id","value")),a(2),I(i.client.staffId?25:-1),a(),I(i.client.dateOfBirth?26:-1),a(),I(i.client.externalId?27:-1),a(),I(i.client.mobileNo?28:-1),a(),I(i.client.emailAddress?29:-1),a(),I(i.client.clientTypeId?30:-1),a(),I(i.client.clientClassificationId?31:-1),a(),I(i.client.savingsProductId?32:-1),a(),I(i.client.submittedOnDate?33:-1),a(3),v("",m(37,47,"labels.inputs.Active"),"?"),a(3),h(m(40,49,i.client.active)),a(2),I(i.client.activationDate?41:-1),a(),I(i.client.legalFormId===1?42:-1),a(),I(i.client.legalFormId===2?43:-1),a(),I(i.client.familyMembers.length?44:-1),a(),I(i.clientTemplate.isAddressEnabled&&i.client.address&&i.client.address.length?45:-1),a(4),v(" ",m(50,51,"labels.buttons.Previous")," "),a(2),g("routerLink",oe(57,XSe)),a(),v(" ",m(53,53,"labels.buttons.Cancel")," "),a(3),v(" ",m(56,55,"labels.buttons.Submit")," "))},dependencies:[ue,fe,Ae,ve,Ri,Ea,Er,Tr,Mr,Dr,oc,qi,ke,Pi,he,Qn,po],styles:["h2[_ngcontent-%COMP%], h3[_ngcontent-%COMP%], h4[_ngcontent-%COMP%]{margin:0;font-weight:500}span[_ngcontent-%COMP%]{margin:.5em 0}mat-divider[_ngcontent-%COMP%]{margin:0 0 .5em}.margin-t[_ngcontent-%COMP%]{margin-top:2em}.family-member[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{margin:1% auto}.family-member[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{line-height:30px;margin-left:2%}.address[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{margin:1% auto}.address[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{line-height:30px;margin-left:2%}"]})}}return e})();var Owe=["clientFamily"],Awe=["clientAddress"],Fwe=["dtclient"];function kwe(e,o){e&1&&b(0,"fa-icon",16)}function Bwe(e,o){e&1&&b(0,"fa-icon",16)}function Rwe(e,o){e&1&&b(0,"fa-icon",17)}function Nwe(e,o){e&1&&b(0,"fa-icon",18)}function Lwe(e,o){e&1&&b(0,"fa-icon",19)}function Vwe(e,o){e&1&&(c(0),p(1,"translate")),e&2&&h(m(1,1,"labels.inputs.GENERAL"))}function qwe(e,o){e&1&&(c(0),p(1,"translate")),e&2&&h(m(1,1,"labels.inputs.FAMILY MEMBERS"))}function zwe(e,o){e&1&&(c(0),p(1,"translate")),e&2&&h(m(1,1,"labels.inputs.ADDRESS"))}function Hwe(e,o){if(e&1&&(l(0,"mat-step"),F(1,zwe,2,3,"ng-template",12),b(2,"mifosx-client-address-step",20,2),r()),e&2){let t=w();a(2),g("clientTemplate",t.clientTemplate)("clientAddressFieldConfig",t.clientAddressFieldConfig)}}function Gwe(e,o){if(e&1&&c(0),e&2){let t=w().$implicit;h(t.registeredTableName)}}function jwe(e,o){if(e&1&&(l(0,"mat-step"),F(1,Gwe,1,1,"ng-template",12),b(2,"mifosx-client-datatable-step",21,3),r()),e&2){let t=o.$implicit;a(2),g("datatableData",t)}}function $we(e,o){e&1&&(c(0),p(1,"translate")),e&2&&h(m(1,1,"labels.inputs.PREVIEW"))}function Uwe(e,o){if(e&1){let t=Y();l(0,"mat-step",15),F(1,$we,2,3,"ng-template",12),l(2,"mifosx-client-preview-step",22),R("submitEvent",function(){V(t);let i=w();return q(i.submit())}),r()()}if(e&2){let t=w();a(2),g("clientTemplate",t.clientTemplate)("clientAddressFieldConfig",t.clientAddressFieldConfig)("client",t.client)}}var b2=(()=>{class e{constructor(){this.route=T(Ie),this.router=T(qe),this.clientsService=T(Oi),this.settingsService=T(At),this.datatables=[],this.legalFormType=1,this.route.data.subscribe(t=>{this.clientTemplate=t.clientTemplate,this.clientAddressFieldConfig=t.clientAddressFieldConfig,this.setDatatables()})}get clientGeneralForm(){return this.clientGeneralStep.createClientForm}get client(){return this.clientTemplate.isAddressEnabled?at(at(at({},this.clientGeneralStep.clientGeneralDetails),this.clientFamilyMembersStep.familyMembers),this.clientAddressStep.address):at(at({},this.clientGeneralStep.clientGeneralDetails),this.clientFamilyMembersStep.familyMembers)}areFormvalids(){let t=this.clientGeneralForm.valid;return this.clientTemplate.isAddressEnabled&&(t=t&&this.clientAddressStep.address.address.length>0),this.clientTemplate.datatables&&this.clientTemplate.datatables.length>0&&this.clientDatatables&&this.clientDatatables.forEach(n=>{t=t&&n.datatableForm.valid}),t}setDatatables(){this.datatables=[];let t="person";this.legalFormType===2&&(t="entity"),this.clientTemplate.datatables&&this.clientTemplate.datatables.forEach(n=>{n.entitySubType.toLowerCase()===t&&this.datatables.push(n)})}legalFormChange(t){this.legalFormType=t.legalForm,this.setDatatables()}submit(){let t=this.settingsService.language.code,n=this.settingsService.dateFormat,i=qt(at({},this.client),{dateFormat:n,locale:t});if(this.clientTemplate.datatables&&this.clientTemplate.datatables.length>0){let s=[];this.clientDatatables.forEach(d=>{s.push(d.payload)}),i.datatables=s}this.clientsService.createClient(i).subscribe(s=>{this.router.navigate(["../",s.resourceId],{relativeTo:this.route})})}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275cmp=me({type:e,selectors:[["mifosx-create-client"]],viewQuery:function(n,i){if(n&1&&(Ee(Yf,7),Ee(Owe,5),Ee(Awe,5),Ee(Fwe,5)),n&2){let s;Te(s=Me())&&(i.clientGeneralStep=s.first),Te(s=Me())&&(i.clientFamilyMembersStep=s.first),Te(s=Me())&&(i.clientAddressStep=s.first),Te(s=Me())&&(i.clientDatatables=s)}},decls:19,vars:6,consts:[["clientStepper",""],["clientFamily",""],["clientAddress",""],["dtclient",""],[1,"container"],["orientation","vertical","labelPosition","bottom",1,"mat-elevation-z8",3,"linear"],["matStepperIcon","number"],["matStepperIcon","edit"],["matStepperIcon","done"],["matStepperIcon","error"],["matStepperIcon","preview"],[3,"stepControl"],["matStepLabel",""],[3,"legalFormChangeEvent","clientTemplate"],[3,"clientTemplate"],["completed",""],["icon","pencil-alt","size","sm"],["icon","check","size","sm"],["icon","exclamation-triangle","size","lg"],["icon","eye","size","sm"],[3,"clientTemplate","clientAddressFieldConfig"],[3,"datatableData"],[3,"submitEvent","clientTemplate","clientAddressFieldConfig","client"]],template:function(n,i){if(n&1){let s=Y();l(0,"div",4)(1,"mat-stepper",5,0),F(3,kwe,1,0,"ng-template",6)(4,Bwe,1,0,"ng-template",7)(5,Rwe,1,0,"ng-template",8)(6,Nwe,1,0,"ng-template",9)(7,Lwe,1,0,"ng-template",10),l(8,"mat-step",11),F(9,Vwe,2,3,"ng-template",12),l(10,"mifosx-client-general-step",13),R("legalFormChangeEvent",function(u){return V(s),q(i.legalFormChange(u))}),r()(),l(11,"mat-step"),F(12,qwe,2,3,"ng-template",12),b(13,"mifosx-client-family-members-step",14,1),r(),E(15,Hwe,4,2,"mat-step"),Se(16,jwe,4,1,"mat-step",null,Pe),E(18,Uwe,3,3,"mat-step",15),r()()}n&2&&(a(),g("linear",!1),a(7),g("stepControl",i.clientGeneralForm),a(2),g("clientTemplate",i.clientTemplate),a(3),g("clientTemplate",i.clientTemplate),a(2),I(i.clientTemplate.isAddressEnabled?15:-1),a(),we(i.datatables),a(2),I(i.areFormvalids()?18:-1))},dependencies:[ue,fe,fa,da,ke,ua,ma,Yf,_2,C2,v2,x2,he],encapsulation:2})}}return e})();var y2=(()=>{class e{constructor(){this.clientsService=T(Oi)}resolve(t){let n=t.paramMap.get("clientId");return this.clientsService.getClientData(n)}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275prov=Re({token:e,factory:e.\u0275fac})}}return e})();var jM=(()=>{class e{constructor(){this.clientsService=T(Oi)}resolve(t){let n=t.parent.paramMap.get("clientId");return this.clientsService.getClientAccountData(n)}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275prov=Re({token:e,factory:e.\u0275fac})}}return e})();var $M=(()=>{class e{constructor(){this.clientsService=T(Oi)}resolve(t){let n=t.parent.paramMap.get("clientId");return this.clientsService.getClientAddressData(n)}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275prov=Re({token:e,factory:e.\u0275fac})}}return e})();var UM=(()=>{class e{constructor(){this.clientsService=T(Oi)}resolve(t){let n=t.parent.paramMap.get("clientId");return this.clientsService.getClientChargesData(n)}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275prov=Re({token:e,factory:e.\u0275fac})}}return e})();var J9=(()=>{class e{constructor(){this.clientsService=T(Oi)}resolve(t){let n=t.parent.paramMap.get("clientId");return this.clientsService.getClientSummary(n)}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275prov=Re({token:e,factory:e.\u0275fac})}}return e})();var WM=(()=>{class e{constructor(){this.clientsService=T(Oi)}resolve(t){let n=t.parent.parent.paramMap.get("clientId");return this.clientsService.getClientFamilyMembers(n)}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275prov=Re({token:e,factory:e.\u0275fac})}}return e})();var QM=(()=>{class e{constructor(){this.clientsService=T(Oi)}resolve(t){let n=t.parent.parent.parent.paramMap.get("clientId"),i=t.parent.paramMap.get("familyMemberId");return this.clientsService.getClientFamilyMember(n,i)}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275prov=Re({token:e,factory:e.\u0275fac})}}return e})();var eu=(()=>{class e{constructor(){this.clientsService=T(Oi)}resolve(t){return this.clientsService.getClientTemplate()}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275prov=Re({token:e,factory:e.\u0275fac})}}return e})();var YM=(()=>{class e{constructor(){this.clientsService=T(Oi)}resolve(t){let n=t.parent.paramMap.get("clientId"),i;return this.clientsService.getClientIdentifiers(n).pipe(Mn(s=>{i=s;let d=[];return s.forEach(u=>{d.push(this.clientsService.getClientIdentificationDocuments(u.id))}),d0(d).subscribe(u=>{u.forEach((f,_)=>{i[_].documents=f})}),i}))}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275prov=Re({token:e,factory:e.\u0275fac})}}return e})();var JM=(()=>{class e{constructor(){this.clientsService=T(Oi)}resolve(t){let n=t.parent.paramMap.get("clientId");return this.clientsService.getClientNotes(n)}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275prov=Re({token:e,factory:e.\u0275fac})}}return e})();var KM=(()=>{class e{constructor(){this.clientsService=T(Oi)}resolve(t){let n=t.parent.paramMap.get("clientId");return this.clientsService.getClientDocuments(n)}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275prov=Re({token:e,factory:e.\u0275fac})}}return e})();var XM=(()=>{class e{constructor(){this.clientsService=T(Oi)}resolve(){return this.clientsService.getClientDatatables()}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275prov=Re({token:e,factory:e.\u0275fac})}}return e})();var ZM=(()=>{class e{constructor(){this.clientsService=T(Oi)}resolve(t){let n=t.parent.parent.paramMap.get("clientId"),i=t.paramMap.get("datatableName");return this.clientsService.getClientDatatable(n,i)}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275prov=Re({token:e,factory:e.\u0275fac})}}return e})();var e5=(()=>{class e{constructor(){this.clientsService=T(Oi)}resolve(t){let n=t.parent.paramMap.get("clientId");return this.clientsService.getClientIdentifierTemplate(n)}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275prov=Re({token:e,factory:e.\u0275fac})}}return e})();var S2=(()=>{class e{constructor(){this.clientsService=T(Oi)}resolve(){return this.clientsService.getAddressFieldConfiguration()}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275prov=Re({token:e,factory:e.\u0275fac})}}return e})();var t5=(()=>{class e{constructor(){this.clientsService=T(Oi)}resolve(){return this.clientsService.getClientAddressTemplate()}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275prov=Re({token:e,factory:e.\u0275fac})}}return e})();var Wwe=()=>[10,20,25];function Qwe(e,o){e&1&&(l(0,"th",14),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.name")))}function Ywe(e,o){if(e&1&&(l(0,"td",15),b(1,"i",16),p(2,"statusLookup"),c(3),r()),e&2){let t=o.$implicit;a(),g("ngClass",m(2,2,!(t.isWaived||t.isPaid))),a(2),v(" ",t.name," ")}}function Jwe(e,o){e&1&&(l(0,"th",14),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.Due as of")))}function Kwe(e,o){if(e&1&&(l(0,"td",15),c(1),p(2,"dateFormat"),r()),e&2){let t=o.$implicit;a(),h(m(2,1,t.dueDate))}}function Xwe(e,o){e&1&&(l(0,"th",14),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.Due")))}function Zwe(e,o){if(e&1&&(l(0,"td",15),c(1),r()),e&2){let t=o.$implicit;a(),h(t.amount)}}function ePe(e,o){e&1&&(l(0,"th",14),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.Paid")))}function tPe(e,o){if(e&1&&(l(0,"td",15),c(1),r()),e&2){let t=o.$implicit;a(),h(t.amountPaid)}}function iPe(e,o){e&1&&(l(0,"th",14),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.Waived")))}function nPe(e,o){if(e&1&&(l(0,"td",15),c(1),r()),e&2){let t=o.$implicit;a(),h(t.amountWaived)}}function oPe(e,o){e&1&&(l(0,"th",14),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.Outstanding")))}function aPe(e,o){if(e&1&&(l(0,"td",15),c(1),r()),e&2){let t=o.$implicit;a(),h(t.amountOutstanding)}}function rPe(e,o){e&1&&b(0,"tr",17)}function lPe(e,o){e&1&&b(0,"tr",18)}var w2=(()=>{class e{constructor(){this.route=T(Ie),this.dialog=T(Ht),this.displayedColumns=["name","dueAsOf","due","paid","waived","outstanding"],this.route.data.subscribe(t=>{this.chargeOverviewData=t.clientChargesData})}ngOnInit(){this.setLoanClientChargeOverview()}setLoanClientChargeOverview(){this.dataSource=new Wt(this.chargeOverviewData.pageItems),this.dataSource.paginator=this.paginator}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275cmp=me({type:e,selectors:[["mifosx-charges-overview"]],viewQuery:function(n,i){if(n&1&&Ee(kt,7),n&2){let s;Te(s=Me())&&(i.paginator=s.first)}},decls:27,vars:8,consts:[[1,"charges-card"],[1,"tab-container","mat-typography"],["mat-table","",3,"dataSource"],["matColumnDef","name"],["mat-header-cell","",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","dueAsOf"],["matColumnDef","due"],["matColumnDef","paid"],["matColumnDef","waived"],["matColumnDef","outstanding"],["mat-header-row","",4,"matHeaderRowDef"],["mat-row","",4,"matRowDef","matRowDefColumns"],["showFirstLastButtons","",3,"pageSizeOptions"],["mat-header-cell",""],["mat-cell",""],[1,"fa","fa-stop",3,"ngClass"],["mat-header-row",""],["mat-row",""]],template:function(n,i){n&1&&(l(0,"mat-card",0)(1,"div",1)(2,"h2"),c(3),p(4,"translate"),r(),l(5,"table",2),X(6,3),F(7,Qwe,3,3,"th",4)(8,Ywe,4,4,"td",5),Z(),X(9,6),F(10,Jwe,3,3,"th",4)(11,Kwe,3,3,"td",5),Z(),X(12,7),F(13,Xwe,3,3,"th",4)(14,Zwe,2,1,"td",5),Z(),X(15,8),F(16,ePe,3,3,"th",4)(17,tPe,2,1,"td",5),Z(),X(18,9),F(19,iPe,3,3,"th",4)(20,nPe,2,1,"td",5),Z(),X(21,10),F(22,oPe,3,3,"th",4)(23,aPe,2,1,"td",5),Z(),F(24,rPe,1,0,"tr",11)(25,lPe,1,0,"tr",12),r(),b(26,"mat-paginator",13),r()()),n&2&&(a(3),h(m(4,5,"labels.heading.Charges Overview")),a(2),g("dataSource",i.dataSource),a(19),g("matHeaderRowDef",i.displayedColumns),a(),g("matRowDefColumns",i.displayedColumns),a(),g("pageSizeOptions",oe(7,Wwe)))},dependencies:[ue,co,fe,$e,_t,xt,vt,bt,Ct,yt,St,Pt,wt,Tt,kt,Pi,he,go],styles:["table[_ngcontent-%COMP%]{width:100%;margin-top:3%}.tab-container[_ngcontent-%COMP%]{padding:1%;margin:1%}.charges-card[_ngcontent-%COMP%]{margin:0 auto;max-width:80rem;width:90%}"]})}}return e})();var i5=(()=>{class e{constructor(){this.clientsService=T(Oi)}resolve(t){let n=t.parent.params.clientId;return this.clientsService.getAllClientCharges(n)}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275prov=Re({token:e,factory:e.\u0275fac})}}return e})();var n5=(()=>{class e{constructor(){this.clientsService=T(Oi),this.productsService=T(ci)}resolve(t){let n=t.paramMap.get("name"),i=t.paramMap.get("clientId")||t.parent.parent.paramMap.get("clientId");switch(n){case"Survey":return this.clientsService.getSurveys(i);case"Take Survey":return this.clientsService.getAllSurveysType();case"Close":return this.clientsService.getClientCommandTemplate("close");case"Reject":return this.clientsService.getClientCommandTemplate("reject");case"Withdraw":return this.clientsService.getClientCommandTemplate("withdraw");case"Transfer Client":return this.clientsService.getOffices();case"Add Charge":return this.clientsService.getClientChargeTemplate(i);case"Create Collateral":return this.productsService.getCollaterals();case"Client Screen Reports":return this.clientsService.getClientReportTemplates();case"Assign Staff":case"Update Default Savings":return this.clientsService.getClientDataAndTemplate(i);case"Undo Transfer":case"Accept Transfer":case"Reject Transfer":return this.clientsService.getClientTransferProposalDate(i);default:return}}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275prov=Re({token:e,factory:e.\u0275fac})}}return e})();var o5=(()=>{class e{constructor(){this.clientsService=T(Oi)}resolve(t){let n=t.parent.parent.parent.paramMap.get("clientId"),i=t.paramMap.get("chargeId");return this.clientsService.getSelectedChargeData(n,i)}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275prov=Re({token:e,factory:e.\u0275fac})}}return e})();var a5=(()=>{class e{constructor(){this.clientsService=T(Oi)}resolve(t){let n=t.parent.parent.parent.paramMap.get("clientId"),i=t.paramMap.get("chargeId");return this.clientsService.getClientTransactionPay(n,i)}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275prov=Re({token:e,factory:e.\u0275fac})}}return e})();var r5=(()=>{class e{constructor(){this.clientsService=T(Oi)}resolve(t){let n=t.paramMap.get("clientId");return this.clientsService.getClientDataAndTemplate(n)}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275prov=Re({token:e,factory:e.\u0275fac})}}return e})();var l5=(()=>{class e{constructor(){this.clientsService=T(Oi)}resolve(t){let n=t.parent.paramMap.get("clientId");return this.clientsService.getCollateralTemplate(n)}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275prov=Re({token:e,factory:e.\u0275fac})}}return e})();var sPe=[_o.withShell([{path:"clients",data:{title:"Clients",breadcrumb:"Clients",routeParamBreadcrumb:!1},children:[{path:"",component:IC},{path:"create",data:{title:"Create Client",breadcrumb:"Create Client",routeParamBreadcrumb:!1},component:b2,resolve:{clientAddressFieldConfig:S2,clientTemplate:eu}},{path:":clientId",component:qC,data:{title:"Clients View",routeParamBreadcrumb:"clientId"},resolve:{clientViewData:y2,clientTemplateData:eu,clientDatatables:XM},children:[{path:"",redirectTo:"general",pathMatch:"full"},{path:"general",component:zC,data:{title:"General",breadcrumb:"General",routeParamBreadcrumb:!1},resolve:{clientAccountsData:jM,clientChargesData:UM,clientCollateralData:l5}},{path:"address",component:YC,data:{title:"Address",breadcrumb:"Address",routeParamBreadcrumb:!1},resolve:{clientAddressFieldConfig:S2,clientAddressTemplateData:t5,clientAddressData:$M}},{path:"family-members",data:{title:"Family Members",breadcrumb:"Family Members",routeParamBreadcrumb:!1},children:[{path:"",component:HC,resolve:{clientFamilyMembers:WM}},{path:"add",component:GC,data:{title:"Add",breadcrumb:"Add",routeParamBreadcrumb:!1},resolve:{clientTemplate:eu}},{path:":familyMemberId",children:[{path:"edit",component:jC,data:{title:"Family Member View",routeParamBreadcrumb:"familyMemberId"},resolve:{clientTemplate:eu,editFamilyMember:QM}}]}]},{path:"identities",component:$C,data:{title:"Identities",breadcrumb:"Identities",routeParamBreadcrumb:!1},resolve:{clientIdentities:YM,clientIdentifierTemplate:e5}},{path:"documents",component:WC,data:{title:"Documents",breadcrumb:"Documents",routeParamBreadcrumb:!1},resolve:{clientDocuments:KM}},{path:"notes",component:UC,data:{title:"Notes",breadcrumb:"Notes",routeParamBreadcrumb:!1},resolve:{clientNotes:JM}},{path:"datatables",children:[{path:":datatableName",component:QC,data:{title:"Data Table View",routeParamBreadcrumb:"datatableName"},resolve:{clientDatatable:ZM}}]}]}]},{path:"clients",data:{title:"Clients",breadcrumb:"Clients",routeParamBreadcrumb:!1},children:[{path:":clientId",data:{title:"Clients View",routeParamBreadcrumb:"clientId"},resolve:{clientViewData:y2},children:[{path:"edit",data:{title:"Edit Client",breadcrumb:"Edit",routeParamBreadcrumb:!1},component:g2,resolve:{clientDataAndTemplate:r5}},{path:"actions/:name",data:{title:"Client Actions",routeParamBreadcrumb:"name"},component:u2,resolve:{clientActionData:n5}},{path:"charges",children:[{path:"overview",data:{title:"Charges Overview",breadcrumb:"Charges Overview"},component:w2,resolve:{clientChargesData:i5}},{path:":chargeId",data:{title:"Charges",routeParamBreadcrumb:"chargeId"},children:[{path:"",component:f2,resolve:{clientChargeData:o5}},{path:"pay",data:{title:"Pay Charge",routeParamBreadcrumb:!1},component:h2,resolve:{transactionData:a5}}]}]},{path:"loans-accounts",loadChildren:()=>import("./loans.module-SNK5EVID.js").then(e=>e.LoansModule)},{path:"client-collateral",loadChildren:()=>import("./collaterals.module-2PEXEBPG.js").then(e=>e.CollateralsModule)},{path:"fixed-deposits-accounts",loadChildren:()=>import("./fixed-deposits.module-C3I467L6.js").then(e=>e.FixedDepositsModule)},{path:"savings-accounts",loadChildren:()=>import("./savings.module-2NQ5HRVF.js").then(e=>e.SavingsModule)},{path:"recurring-deposits-accounts",loadChildren:()=>import("./recurring-deposits.module-DLE633A7.js").then(e=>e.RecurringDepositsModule)},{path:"shares-accounts",loadChildren:()=>import("./shares.module-TB7CSVYK.js").then(e=>e.SharesModule)},{path:"standing-instructions",loadChildren:()=>import("./account-transfers.module-EE4IYF6L.js").then(e=>e.AccountTransfersModule)}]}]}])],K9=(()=>{class e{static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275mod=Gi({type:e})}static{this.\u0275inj=Hi({providers:[y2,jM,$M,UM,J9,WM,QM,eu,YM,JM,KM,XM,ZM,e5,S2,t5,i5,n5,o5,a5,r5,l5],imports:[gn.forChild(sPe),gn]})}}return e})();var cPe=e=>({editForm:e}),X9=(()=>{class e{constructor(){this.dialogRef=T(eo),this.formBuilder=T(nt),this.data=T(Po)}ngOnInit(){this.createNoteForm()}createNoteForm(){this.noteForm=this.formBuilder.group({note:[this.data.noteContent,se.required]})}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275cmp=me({type:e,selectors:[["mifosx-edit-notes-dialog"]],decls:15,vars:14,consts:[["formRef","ngForm"],["mat-dialog-title",""],[3,"formGroup"],["formControlName","note","matInput","","placeholder","Write a note ...."],["align","end"],["mat-raised-button","","mat-dialog-close",""],["mat-raised-button","","color","primary",3,"disabled","mat-dialog-close"]],template:function(n,i){n&1&&(l(0,"h1",1),c(1),p(2,"translate"),r(),l(3,"div")(4,"form",2,0)(6,"mat-form-field"),b(7,"textarea",3),r(),l(8,"mat-dialog-actions",4)(9,"button",5),c(10),p(11,"translate"),r(),l(12,"button",6),c(13),p(14,"translate"),r()()()()),n&2&&(a(),h(m(2,6,"labels.heading.Edit Note")),a(3),g("formGroup",i.noteForm),a(6),h(m(11,8,"labels.buttons.Cancel")),a(2),g("disabled",i.noteForm.pristine)("mat-dialog-close",Nt(12,cPe,i.noteForm)),a(),v(" ",m(14,10,"labels.buttons.Confirm")," "))},dependencies:[ue,fe,tt,st,Ue,Xe,Ze,et,Fe,ze,ve,Wn,Nn,Un,he],encapsulation:2})}}return e})();var Z9=(()=>{class e{static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275mod=Gi({type:e})}static{this.\u0275inj=Hi({imports:[oo,K9,ha,Ir,IC,qC,zC,HC,GC,jC,$C,Ug,UC,X9,WC,QC,YC,w2,u2,JC,OC,KC,XC,ZC,e2,t2,p2,i2,n2,o2,a2,r2,l2,s2,c2,f2,h2,RC,AC,NC,LC,m2,g2,b2,Yf,_2,x2,C2,Jf,VC,d2,v2]})}}return e})();var P2=class{constructor(o){this.groupsService=o,this.groupsSubject=new Na([]),this.recordsSubject=new Na(0),this.records$=this.recordsSubject.asObservable()}getGroups(o,t="",n="",i=0,s=10,d=!0){this.groupsSubject.next([]),this.groupsService.getGroups(o,t,n,i*s,s).subscribe(u=>{u.pageItems=d?u.pageItems.filter(f=>f.active):u.pageItems,this.recordsSubject.next(u.totalFilteredRecords),this.groupsSubject.next(u.pageItems)})}connect(o){return this.groupsSubject.asObservable()}disconnect(o){this.groupsSubject.complete(),this.recordsSubject.complete()}};var pPe=["showClosedGroups"],mPe=()=>["../","organization","bulk-import","Groups"],dPe=()=>[10,25,50,100],uPe=()=>["create"],fPe=e=>[e,"general"];function hPe(e,o){e&1&&(l(0,"button",8),b(1,"fa-icon",23),c(2),p(3,"translate"),r()),e&2&&(g("routerLink",oe(4,uPe)),a(2),v("",m(3,2,"labels.buttons.Create Group")," "))}function gPe(e,o){e&1&&(l(0,"th",24),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.name")))}function _Pe(e,o){if(e&1&&(l(0,"td",25),c(1),r()),e&2){let t=o.$implicit;a(),h(t.name)}}function CPe(e,o){e&1&&(l(0,"th",26),c(1),p(2,"translate"),r()),e&2&&(a(),v("",m(2,1,"labels.inputs.Account")," #"))}function vPe(e,o){if(e&1&&(l(0,"td",25),c(1),r()),e&2){let t=o.$implicit;a(),h(t.accountNo)}}function xPe(e,o){e&1&&(l(0,"th",26),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.External Id")))}function bPe(e,o){if(e&1&&(l(0,"td",25),c(1),r()),e&2){let t=o.$implicit;a(),h(t.externalId)}}function yPe(e,o){e&1&&(l(0,"th",26),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.Status")))}function SPe(e,o){if(e&1&&(l(0,"td",25)(1,"div",27),p(2,"statusLookup"),b(3,"fa-icon",28),r()()),e&2){let t=o.$implicit;a(),g("ngClass",m(2,1,t.status.code))}}function wPe(e,o){e&1&&(l(0,"th",24),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.Office Name")))}function PPe(e,o){if(e&1&&(l(0,"td",25),c(1),r()),e&2){let t=o.$implicit;a(),h(t.officeName)}}function TPe(e,o){e&1&&b(0,"tr",29)}function MPe(e,o){if(e&1&&b(0,"tr",30),e&2){let t=o.$implicit;g("routerLink",Nt(1,fPe,t.id))}}var T2=(()=>{class e{constructor(){this.groupsService=T(An),this.name=new it,this.displayedColumns=["name","accountNo","externalId","status","officeName"],this.filterGroupsBy=[{type:"name",value:""}]}ngOnInit(){this.getGroups()}ngAfterViewInit(){this.name.valueChanges.pipe(Oo(500),Ao(),Eo(t=>{this.applyFilter(t,"name")})).subscribe(),this.sort.sortChange.subscribe(()=>this.paginator.pageIndex=0),fl(this.sort.sortChange,this.paginator.page).pipe(Eo(()=>this.loadGroupsPage())).subscribe()}changeShowClosedGroups(){this.loadGroupsPage()}loadGroupsPage(){this.sort.direction||delete this.sort.active,this.dataSource.getGroups(this.filterGroupsBy,this.sort.active,this.sort.direction,this.paginator.pageIndex,this.paginator.pageSize,!this.showClosedGroups.checked)}applyFilter(t,n){this.paginator.pageIndex=0;let i=this.filterGroupsBy.findIndex(s=>s.type===n);this.filterGroupsBy[i].value=t,this.loadGroupsPage()}getGroups(){this.dataSource=new P2(this.groupsService),this.dataSource.getGroups(this.filterGroupsBy,this.sort.active,this.sort.direction,this.paginator.pageIndex,this.paginator.pageSize)}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275cmp=me({type:e,selectors:[["mifosx-app-groups"]],viewQuery:function(n,i){if(n&1&&(Ee(pPe,7),Ee(kt,7),Ee(It,7)),n&2){let s;Te(s=Me())&&(i.showClosedGroups=s.first),Te(s=Me())&&(i.paginator=s.first),Te(s=Me())&&(i.sort=s.first)}},decls:35,vars:19,consts:[["showClosedGroups",""],[1,"container"],[1,"layout-column","layout-gt-sm-row","align-gt-sm-start-center"],[1,"search-box","m-r-30"],[1,"search-box"],["matInput","","placeholder","Search by Name",3,"formControl"],["labelPosition","after",1,"m-r-10",3,"change"],[1,"action-button","gap-25px"],["mat-raised-button","","color","primary",3,"routerLink"],["icon","download",1,"m-r-20"],["mat-raised-button","","color","primary",3,"routerLink",4,"mifosxHasPermission"],["mat-table","","matSort","",1,"bordered-table",3,"dataSource"],["matColumnDef","name"],["mat-header-cell","","mat-sort-header","",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","accountNo"],["mat-header-cell","",4,"matHeaderCellDef"],["matColumnDef","externalId"],["matColumnDef","status"],["matColumnDef","officeName"],["mat-header-row","",4,"matHeaderRowDef"],["mat-row","","class","select-row",3,"routerLink",4,"matRowDef","matRowDefColumns"],["showFirstLastButtons","",3,"length","pageSize","pageSizeOptions"],["icon","plus",1,"m-r-20"],["mat-header-cell","","mat-sort-header",""],["mat-cell",""],["mat-header-cell",""],[3,"ngClass"],["icon","stop"],["mat-header-row",""],["mat-row","",1,"select-row",3,"routerLink"]],template:function(n,i){if(n&1){let s=Y();l(0,"mat-card",1)(1,"div",2)(2,"div",3)(3,"mat-form-field",4),b(4,"input",5),r(),l(5,"mat-checkbox",6,0),R("change",function(){return V(s),q(i.changeShowClosedGroups())}),c(7),p(8,"translate"),r()(),l(9,"div",7)(10,"button",8),b(11,"fa-icon",9),c(12),p(13,"translate"),r(),F(14,hPe,4,5,"button",10),r()(),l(15,"table",11),X(16,12),F(17,gPe,3,3,"th",13)(18,_Pe,2,1,"td",14),Z(),X(19,15),F(20,CPe,3,3,"th",16)(21,vPe,2,1,"td",14),Z(),X(22,17),F(23,xPe,3,3,"th",16)(24,bPe,2,1,"td",14),Z(),X(25,18),F(26,yPe,3,3,"th",16)(27,SPe,4,3,"td",14),Z(),X(28,19),F(29,wPe,3,3,"th",13)(30,PPe,2,1,"td",14),Z(),F(31,TPe,1,0,"tr",20)(32,MPe,1,3,"tr",21),r(),b(33,"mat-paginator",22),p(34,"async"),r()}n&2&&(a(4),g("formControl",i.name),a(3),h(m(8,11,"labels.inputs.Show Closed Groups")),a(3),g("routerLink",oe(17,mPe)),a(2),v("",m(13,13,"labels.buttons.Import Group")," "),a(2),g("mifosxHasPermission","CREATE_GROUP"),a(),g("dataSource",i.dataSource),a(16),g("matHeaderRowDef",i.displayedColumns),a(),g("matRowDefColumns",i.displayedColumns),a(),g("length",m(34,15,i.dataSource==null?null:i.dataSource.records$))("pageSize",10)("pageSizeOptions",oe(18,dPe)))},dependencies:[ue,co,fe,st,Ue,_n,Ae,$e,Fe,ze,ve,fi,Ke,ke,_t,It,xt,vt,bt,ri,Ct,yt,St,Pt,wt,Tt,kt,Xa,he,go],styles:[".container[_ngcontent-%COMP%]{padding:24px}.container[_ngcontent-%COMP%] .layout-column[_ngcontent-%COMP%], .container[_ngcontent-%COMP%] .layout-gt-sm-row[_ngcontent-%COMP%]{display:flex;align-items:center;margin-bottom:20px;flex-wrap:nowrap;gap:20px}.container[_ngcontent-%COMP%] .layout-column.align-gt-sm-start-center[_ngcontent-%COMP%], .container[_ngcontent-%COMP%] .layout-gt-sm-row.align-gt-sm-start-center[_ngcontent-%COMP%]{align-items:center;justify-content:flex-start}.container[_ngcontent-%COMP%] .layout-column[_ngcontent-%COMP%] .search-box[_ngcontent-%COMP%], .container[_ngcontent-%COMP%] .layout-gt-sm-row[_ngcontent-%COMP%] .search-box[_ngcontent-%COMP%]{display:flex;align-items:center;gap:15px;flex:1;min-width:0}.container[_ngcontent-%COMP%] .layout-column[_ngcontent-%COMP%] .search-box.m-r-30[_ngcontent-%COMP%], .container[_ngcontent-%COMP%] .layout-gt-sm-row[_ngcontent-%COMP%] .search-box.m-r-30[_ngcontent-%COMP%]{margin-right:30px}.container[_ngcontent-%COMP%] .layout-column[_ngcontent-%COMP%] .search-box[_ngcontent-%COMP%] mat-form-field[_ngcontent-%COMP%], .container[_ngcontent-%COMP%] .layout-gt-sm-row[_ngcontent-%COMP%] .search-box[_ngcontent-%COMP%] mat-form-field[_ngcontent-%COMP%]{min-width:200px;flex:1}.container[_ngcontent-%COMP%] .layout-column[_ngcontent-%COMP%] .search-box[_ngcontent-%COMP%] mat-form-field.search-box[_ngcontent-%COMP%], .container[_ngcontent-%COMP%] .layout-gt-sm-row[_ngcontent-%COMP%] .search-box[_ngcontent-%COMP%] mat-form-field.search-box[_ngcontent-%COMP%]{width:auto}.container[_ngcontent-%COMP%] .layout-column[_ngcontent-%COMP%] .search-box[_ngcontent-%COMP%] mat-form-field[_ngcontent-%COMP%] + mat-form-field[_ngcontent-%COMP%], .container[_ngcontent-%COMP%] .layout-gt-sm-row[_ngcontent-%COMP%] .search-box[_ngcontent-%COMP%] mat-form-field[_ngcontent-%COMP%] + mat-form-field[_ngcontent-%COMP%]{margin-left:15px}.container[_ngcontent-%COMP%] .layout-column[_ngcontent-%COMP%] .search-box[_ngcontent-%COMP%] mat-checkbox[_ngcontent-%COMP%], .container[_ngcontent-%COMP%] .layout-gt-sm-row[_ngcontent-%COMP%] .search-box[_ngcontent-%COMP%] mat-checkbox[_ngcontent-%COMP%]{white-space:nowrap;flex-shrink:0;margin-left:15px}.container[_ngcontent-%COMP%] .layout-column[_ngcontent-%COMP%] .search-box[_ngcontent-%COMP%] mat-checkbox.m-r-10[_ngcontent-%COMP%], .container[_ngcontent-%COMP%] .layout-gt-sm-row[_ngcontent-%COMP%] .search-box[_ngcontent-%COMP%] mat-checkbox.m-r-10[_ngcontent-%COMP%]{margin-right:10px}.container[_ngcontent-%COMP%] .layout-column[_ngcontent-%COMP%] .action-button[_ngcontent-%COMP%], .container[_ngcontent-%COMP%] .layout-gt-sm-row[_ngcontent-%COMP%] .action-button[_ngcontent-%COMP%]{display:flex;align-items:center;flex-shrink:0;margin-left:auto}.container[_ngcontent-%COMP%] .layout-column[_ngcontent-%COMP%] .action-button.gap-25px[_ngcontent-%COMP%], .container[_ngcontent-%COMP%] .layout-gt-sm-row[_ngcontent-%COMP%] .action-button.gap-25px[_ngcontent-%COMP%]{gap:25px}.container[_ngcontent-%COMP%] .layout-column[_ngcontent-%COMP%] .action-button[_ngcontent-%COMP%] button[_ngcontent-%COMP%], .container[_ngcontent-%COMP%] .layout-gt-sm-row[_ngcontent-%COMP%] .action-button[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{white-space:nowrap}.container[_ngcontent-%COMP%] .layout-column[_ngcontent-%COMP%] .action-button[_ngcontent-%COMP%] button[_ngcontent-%COMP%] fa-icon.m-r-10[_ngcontent-%COMP%], .container[_ngcontent-%COMP%] .layout-column[_ngcontent-%COMP%] .action-button[_ngcontent-%COMP%] button[_ngcontent-%COMP%] fa-icon.m-r-20[_ngcontent-%COMP%], .container[_ngcontent-%COMP%] .layout-gt-sm-row[_ngcontent-%COMP%] .action-button[_ngcontent-%COMP%] button[_ngcontent-%COMP%] fa-icon.m-r-10[_ngcontent-%COMP%], .container[_ngcontent-%COMP%] .layout-gt-sm-row[_ngcontent-%COMP%] .action-button[_ngcontent-%COMP%] button[_ngcontent-%COMP%] fa-icon.m-r-20[_ngcontent-%COMP%]{margin-right:10px}.container[_ngcontent-%COMP%] .bordered-table[_ngcontent-%COMP%]{width:100%;border:1px solid #e0e0e0;border-radius:4px;overflow:hidden;margin-top:16px}.container[_ngcontent-%COMP%] .bordered-table[_ngcontent-%COMP%] .select-row[_ngcontent-%COMP%]{cursor:pointer}.container[_ngcontent-%COMP%] .bordered-table[_ngcontent-%COMP%] .select-row[_ngcontent-%COMP%]:hover{background-color:#f5f5f5}.container[_ngcontent-%COMP%] .bordered-table[_ngcontent-%COMP%] th[_ngcontent-%COMP%], .container[_ngcontent-%COMP%] .bordered-table[_ngcontent-%COMP%] td[_ngcontent-%COMP%]{padding:12px 16px}.container[_ngcontent-%COMP%] .bordered-table[_ngcontent-%COMP%] th[_ngcontent-%COMP%]{font-weight:500;border-bottom:1px solid #e0e0e0}.container[_ngcontent-%COMP%] .bordered-table[_ngcontent-%COMP%] tr[_ngcontent-%COMP%]{border-bottom:1px solid #f0f0f0}.container[_ngcontent-%COMP%] .bordered-table[_ngcontent-%COMP%] tr[_ngcontent-%COMP%]:last-child{border-bottom:none}.container[_ngcontent-%COMP%] mat-paginator[_ngcontent-%COMP%]{border-top:1px solid #e0e0e0;margin-top:0}.container[_ngcontent-%COMP%] mat-progress-bar[_ngcontent-%COMP%]{margin:0}@media (width <= 768px){.container[_ngcontent-%COMP%]{padding:16px}.container[_ngcontent-%COMP%] .layout-column[_ngcontent-%COMP%], .container[_ngcontent-%COMP%] .layout-gt-sm-row[_ngcontent-%COMP%]{flex-wrap:wrap}.container[_ngcontent-%COMP%] .layout-column[_ngcontent-%COMP%] .search-box[_ngcontent-%COMP%], .container[_ngcontent-%COMP%] .layout-gt-sm-row[_ngcontent-%COMP%] .search-box[_ngcontent-%COMP%]{width:100%;margin-right:0!important;margin-bottom:15px;flex-wrap:wrap}.container[_ngcontent-%COMP%] .layout-column[_ngcontent-%COMP%] .search-box[_ngcontent-%COMP%] mat-form-field[_ngcontent-%COMP%], .container[_ngcontent-%COMP%] .layout-gt-sm-row[_ngcontent-%COMP%] .search-box[_ngcontent-%COMP%] mat-form-field[_ngcontent-%COMP%]{min-width:150px;margin-bottom:10px}.container[_ngcontent-%COMP%] .layout-column[_ngcontent-%COMP%] .search-box[_ngcontent-%COMP%] mat-form-field[_ngcontent-%COMP%] + mat-form-field[_ngcontent-%COMP%], .container[_ngcontent-%COMP%] .layout-gt-sm-row[_ngcontent-%COMP%] .search-box[_ngcontent-%COMP%] mat-form-field[_ngcontent-%COMP%] + mat-form-field[_ngcontent-%COMP%]{margin-left:0}.container[_ngcontent-%COMP%] .layout-column[_ngcontent-%COMP%] .search-box[_ngcontent-%COMP%] mat-checkbox[_ngcontent-%COMP%], .container[_ngcontent-%COMP%] .layout-gt-sm-row[_ngcontent-%COMP%] .search-box[_ngcontent-%COMP%] mat-checkbox[_ngcontent-%COMP%]{margin-left:0;margin-top:10px}.container[_ngcontent-%COMP%] .layout-column[_ngcontent-%COMP%] .action-button[_ngcontent-%COMP%], .container[_ngcontent-%COMP%] .layout-gt-sm-row[_ngcontent-%COMP%] .action-button[_ngcontent-%COMP%]{margin-left:0;width:100%;justify-content:center}.container[_ngcontent-%COMP%] .layout-column[_ngcontent-%COMP%] .action-button.gap-25px[_ngcontent-%COMP%], .container[_ngcontent-%COMP%] .layout-gt-sm-row[_ngcontent-%COMP%] .action-button.gap-25px[_ngcontent-%COMP%]{gap:15px}}table[_ngcontent-%COMP%]{width:100%}table[_ngcontent-%COMP%] tr.select-row[_ngcontent-%COMP%]:hover{cursor:pointer}.m-r-10[_ngcontent-%COMP%]{margin-right:10px!important}.m-r-20[_ngcontent-%COMP%]{margin-right:20px!important}.m-r-30[_ngcontent-%COMP%]{margin-right:30px!important}"]})}}return e})();var DPe=()=>({confirm:!0}),M2=(()=>{class e{constructor(){this.dialogRef=T(eo)}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275cmp=me({type:e,selectors:[["mifosx-unassign-staff-dialog"]],decls:14,vars:14,consts:[["mat-dialog-title",""],["mat-dialog-content",""],["align","end"],["mat-raised-button","","mat-dialog-close",""],["mat-raised-button","","color","warn",3,"mat-dialog-close"]],template:function(n,i){n&1&&(l(0,"h1",0),c(1),p(2,"translate"),r(),l(3,"div",1)(4,"p"),c(5),p(6,"translate"),r()(),l(7,"mat-dialog-actions",2)(8,"button",3),c(9),p(10,"translate"),r(),l(11,"button",4),c(12),p(13,"translate"),r()()),n&2&&(a(),h(m(2,5,"labels.heading.Unassign Role")),a(4),v("",m(6,7,"labels.text.Unassign staff for this group")," ?"),a(4),h(m(10,9,"labels.buttons.Cancel")),a(2),g("mat-dialog-close",oe(13,DPe)),a(),v(" ",m(13,11,"labels.buttons.Confirm")," "))},dependencies:[ue,fe,ve,Wn,ho,Nn,Un,he],encapsulation:2})}}return e})();var EPe=()=>["./general"],IPe=()=>["./committee"],OPe=()=>["savings-accounts","create"],APe=()=>["loans-accounts","create"],FPe=()=>["loans-accounts","glim-account","create"],kPe=()=>["savings-accounts","gsim-account","create"],BPe=()=>["./notes"],RPe=e=>["./datatables",e];function NPe(e,o){if(e&1&&(l(0,"span")(1,"b"),c(2),p(3,"translate"),r(),c(4),p(5,"dateFormat"),r()),e&2){let t=w();a(2),v("",m(3,2,"labels.inputs.Closure Date")," :"),a(2),v(" ",m(5,4,t.groupViewData.timeline.closedOnDate)," ")}}function LPe(e,o){if(e&1){let t=Y();l(0,"i",30),R("click",function(){V(t);let i=w(2);return q(i.doAction("Edit Meeting"))}),r()}}function VPe(e,o){if(e&1&&(l(0,"div")(1,"p"),c(2),p(3,"translate"),p(4,"dateFormat"),E(5,LPe,1,0,"i",29),b(6,"br"),c(7),p(8,"translate"),p(9,"lowercase"),r()()),e&2){let t=w();a(2),le(" ",m(3,5,"labels.inputs.Next Meeting on"),": ",m(4,7,t.groupViewData.collectionMeetingCalendar==null?null:t.groupViewData.collectionMeetingCalendar.nextTenRecurringDates[0])," "),a(3),I(t.editMeeting?5:-1),a(2),le(" ",m(8,9,"labels.inputs.Meeting Frequency"),": ",m(9,11,t.groupViewData.collectionMeetingCalendar==null?null:t.groupViewData.collectionMeetingCalendar.frequency.value)," ")}}function qPe(e,o){e&1&&(l(0,"div")(1,"p"),c(2),p(3,"translate"),p(4,"translate"),b(5,"i",31)(6,"br"),c(7),p(8,"translate"),p(9,"translate"),r()()),e&2&&(a(2),le(" ",m(3,4,"labels.inputs.Next Meeting on"),": ",m(4,6,"labels.inputs.Unassigned")," "),a(5),le(" ",m(8,8,"labels.inputs.Meeting Frequency"),": ",m(9,10,"labels.inputs.N/A")," "))}function zPe(e,o){if(e&1){let t=Y();l(0,"button",32),R("click",function(){V(t);let i=w(2);return q(i.doAction("Activate"))}),l(1,"mat-icon",33),b(2,"fa-icon",34),r(),l(3,"span"),c(4),p(5,"translate"),r()()}e&2&&(a(4),h(m(5,1,"labels.buttons.Activate")))}function HPe(e,o){e&1&&(l(0,"span"),F(1,zPe,6,3,"button",23),r()),e&2&&(a(),g("mifosxHasPermission","UPDATE_GROUP"))}function GPe(e,o){if(e&1){let t=Y();l(0,"button",32),R("click",function(){V(t);let i=w();return q(i.doAction("Edit"))}),l(1,"mat-icon",33),b(2,"fa-icon",35),r(),l(3,"span"),c(4),p(5,"translate"),r()()}e&2&&(a(4),h(m(5,1,"labels.buttons.Edit")))}function jPe(e,o){if(e&1){let t=Y();l(0,"button",32),R("click",function(){V(t);let i=w();return q(i.doAction("Transfer Clients"))}),l(1,"mat-icon",33),b(2,"fa-icon",36),r(),l(3,"span"),c(4),p(5,"translate"),r()()}e&2&&(a(4),h(m(5,1,"labels.buttons.Transfer Clients")))}function $Pe(e,o){if(e&1){let t=Y();l(0,"button",32),R("click",function(){V(t);let i=w();return q(i.doAction("Manage Members"))}),l(1,"mat-icon",33),b(2,"fa-icon",37),r(),l(3,"span"),c(4),p(5,"translate"),r()()}e&2&&(a(4),h(m(5,1,"labels.buttons.Manage Members")))}function UPe(e,o){if(e&1&&(l(0,"button",24)(1,"mat-icon",33),b(2,"fa-icon",38),r(),l(3,"span"),c(4),p(5,"translate"),r()()),e&2){w();let t=xe(55);g("matMenuTriggerFor",t),a(4),h(m(5,2,"labels.buttons.Applications"))}}function WPe(e,o){e&1&&(l(0,"button",40),c(1),p(2,"translate"),r()),e&2&&(a(),v(" ",m(2,1,"labels.buttons.Bulk JLG Loan Application")," "))}function QPe(e,o){e&1&&(l(0,"span"),F(1,WPe,3,3,"button",39),r()),e&2&&(a(),g("mifosxHasPermission","CREATE_LOAN"))}function YPe(e,o){e&1&&(l(0,"button",41),c(1),p(2,"translate"),r()),e&2&&(g("routerLink",oe(4,OPe)),a(),v(" ",m(2,2,"labels.buttons.Group Saving Application")," "))}function JPe(e,o){e&1&&(l(0,"button",41),c(1),p(2,"translate"),r()),e&2&&(g("routerLink",oe(4,APe)),a(),v(" ",m(2,2,"labels.buttons.Group Loan Application")," "))}function KPe(e,o){e&1&&(l(0,"button",41),c(1),p(2,"translate"),r()),e&2&&(g("routerLink",oe(4,FPe)),a(),v(" ",m(2,2,"labels.buttons.GLIM Application")," "))}function XPe(e,o){e&1&&(l(0,"span"),F(1,KPe,3,5,"button",25),r()),e&2&&(a(),g("mifosxHasPermission","CREATE_LOAN"))}function ZPe(e,o){e&1&&(l(0,"button",41),c(1),p(2,"translate"),r()),e&2&&(g("routerLink",oe(4,kPe)),a(),v(" ",m(2,2,"labels.buttons.GSIM Application")," "))}function eTe(e,o){e&1&&(l(0,"span"),F(1,ZPe,3,5,"button",25),r()),e&2&&(a(),g("mifosxHasPermission","CREATE_GSIMACCOUNT"))}function tTe(e,o){if(e&1){let t=Y();l(0,"button",32),R("click",function(){V(t);let i=w(2);return q(i.doAction("Attendance"))}),c(1),p(2,"translate"),r()}e&2&&(a(),v(" ",m(2,1,"labels.buttons.Attendance")," "))}function iTe(e,o){e&1&&(l(0,"span"),F(1,tTe,3,3,"button",23),r()),e&2&&(a(),g("mifosxHasPermission","SAVEORUPDATEATTENDANCE_MEETING"))}function nTe(e,o){if(e&1){let t=Y();l(0,"button",32),R("click",function(){V(t);let i=w(2);return q(i.doAction("Assign Staff"))}),c(1),p(2,"translate"),r()}e&2&&(a(),v(" ",m(2,1,"labels.buttons.Assign Staff")," "))}function oTe(e,o){e&1&&(l(0,"span"),F(1,nTe,3,3,"button",23),r()),e&2&&(a(),g("mifosxHasPermission","ASSIGNSTAFF_GROUP"))}function aTe(e,o){if(e&1){let t=Y();l(0,"button",32),R("click",function(){V(t);let i=w(2);return q(i.doAction("Unassign Staff"))}),c(1),p(2,"translate"),r()}e&2&&(a(),v(" ",m(2,1,"labels.buttons.Unassign Staff")," "))}function rTe(e,o){e&1&&(l(0,"span"),F(1,aTe,3,3,"button",23),r()),e&2&&(a(),g("mifosxHasPermission","UNASSIGNSTAFF_GROUP"))}function lTe(e,o){if(e&1){let t=Y();l(0,"button",32),R("click",function(){V(t);let i=w(2);return q(i.doAction("Attach Meeting"))}),c(1),p(2,"translate"),r()}e&2&&(a(),v(" ",m(2,1,"labels.buttons.Attach Meeting")," "))}function sTe(e,o){e&1&&(l(0,"span"),F(1,lTe,3,3,"button",23),r()),e&2&&(a(),g("mifosxHasPermission","CREATE_MEETING"))}function cTe(e,o){if(e&1){let t=Y();l(0,"button",32),R("click",function(){V(t);let i=w();return q(i.doAction("Close"))}),c(1),p(2,"translate"),r()}e&2&&(a(),v(" ",m(2,1,"labels.buttons.Close")," "))}function pTe(e,o){if(e&1){let t=Y();l(0,"button",32),R("click",function(){V(t);let i=w();return q(i.doAction("Delete"))}),c(1),p(2,"translate"),r()}e&2&&(a(),v(" ",m(2,1,"labels.buttons.Delete")," "))}function mTe(e,o){if(e&1&&(l(0,"a",27,6),c(2),p(3,"translate"),r()),e&2){let t=xe(1);g("routerLink",oe(5,BPe))("active",t.isActive),a(2),v(" ",m(3,3,"labels.inputs.Notes")," ")}}function dTe(e,o){if(e&1&&(l(0,"a",27,7),c(2),r()),e&2){let t=xe(1),n=w().$implicit;g("routerLink",Nt(3,RPe,n.registeredTableName))("active",t.isActive),a(2),v(" ",n.registeredTableName," ")}}function uTe(e,o){if(e&1&&(l(0,"span"),F(1,dTe,3,5,"a",28),r()),e&2){let t=o.$implicit;a(),g("mifosxHasPermission","READ_"+t.registeredTableName)}}var D2=(()=>{class e{constructor(){this.route=T(Ie),this.groupsService=T(An),this.router=T(qe),this.dialog=T(Ht),this.route.data.subscribe(t=>{this.groupViewData=t.groupViewData,this.groupDatatables=t.groupDatatables})}doAction(t){switch(t){case"Assign Staff":case"Close":case"Activate":case"Attach Meeting":case"Attendance":case"Manage Members":case"Transfer Clients":if(this.router.navigate([`actions/${t}`],{relativeTo:this.route}),t==="Activate"){let i=this.getGeneralTabComponent();i&&i.refreshAccounts(this.groupViewData.id)}break;case"Edit Meeting":let n={calendarId:this.groupViewData.collectionMeetingCalendar.id};this.router.navigate([`actions/${t}`],{relativeTo:this.route,queryParams:n});break;case"Edit":this.router.navigate(["edit"],{relativeTo:this.route});break;case"Unassign Staff":this.unassignStaff();break;case"Delete":this.deleteGroup();break}}getGeneralTabComponent(){return null}get editMeeting(){return!!(this.groupViewData.collectionMeetingCalendar&&this.groupViewData.collectionMeetingCalendar.entityType.value==="GROUPS"&&this.groupViewData.hierarchy==="."+this.groupViewData.id+".")}reload(){let t=this.router.url;this.router.navigateByUrl("/groups",{skipLocationChange:!0}).then(()=>this.router.navigate([t]))}unassignStaff(){this.dialog.open(M2).afterClosed().subscribe(n=>{n.confirm&&this.groupsService.executeGroupCommand(this.groupViewData.id,"unassignStaff",{staffId:this.groupViewData.staffId}).subscribe(()=>{this.reload()})})}deleteGroup(){this.dialog.open(vi,{data:{deleteContext:`group with id: ${this.groupViewData.id}`}}).afterClosed().subscribe(n=>{n.delete&&this.groupsService.deleteGroup(this.groupViewData.id).subscribe(()=>{this.router.navigate(["/groups"],{relativeTo:this.route})})})}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275cmp=me({type:e,selectors:[["mifosx-groups-view"]],decls:88,vars:67,consts:[["groupMenu","matMenu"],["AccountApplications","matMenu"],["More","matMenu"],["general","routerLinkActive"],["committee","routerLinkActive"],["tabPanel",""],["notes","routerLinkActive"],["datatable","routerLinkActive"],[1,"group-card"],[1,"header","layout-column"],[1,"header-title-group"],[1,"profile-image-container"],["mat-card-md-image","","src","assets/images/group_placeholder.png",1,"profile-image"],[1,"mat-typography","group-card-title"],[1,"make-flex"],[1,"flex-95"],[1,"fa","fa-stop",3,"ngClass","matTooltip"],[1,"flex-5","flex-xs-15","flex-sm-10","flex-md-5"],["mat-icon-button","","aria-label","Group actions","yPosition","below",3,"matMenuTriggerFor"],["matListIcon","",1,"actions-menu"],["icon","bars","size","sm"],[1,"flex-45"],[1,"group-meeting","flex-45","align-start-start"],["mat-menu-item","",3,"click",4,"mifosxHasPermission"],["mat-menu-item","",3,"matMenuTriggerFor"],["mat-menu-item","",3,"routerLink",4,"mifosxHasPermission"],["mat-tab-nav-bar","",1,"navigation-tabs",3,"tabPanel"],["mat-tab-link","","routerLinkActive","",3,"routerLink","active"],["mat-tab-link","","routerLinkActive","",3,"routerLink","active",4,"mifosxHasPermission"],[1,"fa","fa-edit"],[1,"fa","fa-edit",3,"click"],[1,"fa","fa-calendar"],["mat-menu-item","",3,"click"],["matListIcon",""],["icon","checkSign","size","sm"],["icon","edit","size","sm"],["icon","users","size","sm"],["icon","user","size","sm"],["icon","money-bill-alt","size","sm"],["mat-menu-item","",4,"mifosxHasPermission"],["mat-menu-item",""],["mat-menu-item","",3,"routerLink"]],template:function(n,i){if(n&1&&(l(0,"mat-card",8)(1,"mat-card-header",9)(2,"mat-card-title-group",10)(3,"div",11)(4,"div"),b(5,"img",12),r()(),l(6,"div",13)(7,"mat-card-title",14)(8,"h3",15),b(9,"i",16),p(10,"statusLookup"),c(11),p(12,"translate"),r(),l(13,"div",17)(14,"button",18)(15,"mat-icon",19),b(16,"fa-icon",20),r()()()(),l(17,"mat-card-subtitle",14)(18,"div",21)(19,"b"),c(20),p(21,"translate"),r(),c(22),l(23,"b"),c(24),p(25,"translate"),r(),c(26),l(27,"b"),c(28),p(29,"translate"),r(),c(30),b(31,"br"),l(32,"b"),c(33),p(34,"translate"),r(),c(35),b(36,"br"),l(37,"b"),c(38),p(39,"translate"),r(),c(40),p(41,"dateFormat"),b(42,"br"),E(43,NPe,6,6,"span"),r(),l(44,"div",22),E(45,VPe,10,13,"div")(46,qPe,10,12,"div"),r()()(),l(47,"mat-menu",null,0),E(49,HPe,2,1,"span"),F(50,GPe,6,3,"button",23)(51,jPe,6,3,"button",23)(52,$Pe,6,3,"button",23),E(53,UPe,6,4,"button",24),l(54,"mat-menu",null,1),E(56,QPe,2,1,"span"),F(57,YPe,3,5,"button",25)(58,JPe,3,5,"button",25),E(59,XPe,2,1,"span"),E(60,eTe,2,1,"span"),r(),l(61,"button",24),c(62),p(63,"translate"),r(),l(64,"mat-menu",null,2),E(66,iTe,2,1,"span"),E(67,oTe,2,1,"span"),E(68,rTe,2,1,"span"),E(69,sTe,2,1,"span"),F(70,cTe,3,3,"button",23)(71,pTe,3,3,"button",23),r()()()(),l(72,"mat-card-content")(73,"nav",26)(74,"a",27,3),c(76),p(77,"translate"),r(),F(78,mTe,4,6,"a",28),l(79,"a",27,4),c(81),p(82,"translate"),r(),Se(83,uTe,2,1,"span",null,Pe),r(),l(85,"mat-tab-nav-panel",null,5),b(87,"router-outlet"),r()()()),n&2){let s=xe(48),d=xe(65),u=xe(75),f=xe(80),_=xe(86);a(9),g("ngClass",m(10,43,i.groupViewData.status.code))("matTooltip",i.groupViewData.status.value),a(2),le(" ",m(12,45,"labels.heading.Group Name")," : ",i.groupViewData.name," "),a(3),g("matMenuTriggerFor",s),a(6),v("",m(21,47,"labels.inputs.Group")," :"),a(2),v(" ",i.groupViewData.name," | "),a(2),v("",m(25,49,"labels.inputs.Center Name"),":"),a(2),v(" ",i.groupViewData.centerName," | "),a(2),v("",m(29,51,"labels.inputs.Staff"),":"),a(2),v(" ",i.groupViewData.staffName||"Unassigned"),a(3),v("",m(34,53,"labels.inputs.Office Name")," :"),a(2),v(" ",i.groupViewData.officeName),a(3),v("",m(39,55,"labels.inputs.Activation Date")," :"),a(2),v(" ",i.groupViewData.activationDate?m(41,57,i.groupViewData.activationDate):"Not Activated"),a(3),I(i.groupViewData.active?-1:43),a(2),I(i.groupViewData.collectionMeetingCalendar?45:46),a(4),I(i.groupViewData.status.value!=="Active"?49:-1),a(),g("mifosxHasPermission","UPDATE_GROUP"),a(),g("mifosxHasPermission","ASSOCIATECLIENTS_GROUP"),a(),g("mifosxHasPermission","TRANSFERCLIENTS_GROUP"),a(),I(i.groupViewData.active?53:-1),a(3),I(i.groupViewData.clientMembers?56:-1),a(),g("mifosxHasPermission","CREATE_SAVINGSACCOUNT"),a(),g("mifosxHasPermission","CREATE_LOAN"),a(),I(i.groupViewData.clientMembers?59:-1),a(),I(i.groupViewData.clientMembers?60:-1),a(),g("matMenuTriggerFor",d),a(),h(m(63,59,"labels.buttons.More")),a(4),I(i.groupViewData.collectionMeetingCalendar?66:-1),a(),I(i.groupViewData.staffId?-1:67),a(),I(i.groupViewData.staffId?68:-1),a(),I(!(i.groupViewData.centerId||i.groupViewData.collectionMeetingCalendar)&&i.groupViewData.status.value==="Active"?69:-1),a(),g("mifosxHasPermission","CLOSE_GROUP"),a(),g("mifosxHasPermission","DELETE_GROUP"),a(2),g("tabPanel",_),a(),g("routerLink",oe(65,EPe))("active",u.isActive),a(2),v(" ",m(77,61,"labels.inputs.General")," "),a(2),g("mifosxHasPermission","READ_GROUPNOTE"),a(),g("routerLink",oe(66,IPe))("active",f.isActive),a(2),v(" ",m(82,63,"labels.inputs.Committee")," "),a(2),we(i.groupDatatables)}},dependencies:[ue,co,fe,Ae,$e,Je,Ke,sa,Qr,b0,Qo,si,wi,nc,Yo,ke,vl,ic,tc,nr,or,La,ar,ra,bg,Pi,he,go],styles:[".group-card[_ngcontent-%COMP%]{margin:0 auto;max-width:80rem;width:90%;padding:0}.group-card[_ngcontent-%COMP%] i[_ngcontent-%COMP%]:hover{cursor:pointer}.group-card[_ngcontent-%COMP%] .header[_ngcontent-%COMP%]{padding:1%}.group-card[_ngcontent-%COMP%] .header-title-group[_ngcontent-%COMP%] .group-card-title[_ngcontent-%COMP%]{color:#fff;width:90%}.group-card[_ngcontent-%COMP%] .header-title-group[_ngcontent-%COMP%] .group-card-title[_ngcontent-%COMP%] mat-card-subtitle[_ngcontent-%COMP%]{color:#fff}.group-card[_ngcontent-%COMP%] .profile-image-container[_ngcontent-%COMP%]{margin:1%}.group-card[_ngcontent-%COMP%] .profile-image-container[_ngcontent-%COMP%] .profile-image[_ngcontent-%COMP%]{object-fit:cover;border-radius:20px}.group-card[_ngcontent-%COMP%] .group-meeting[_ngcontent-%COMP%]{align-self:flex-end;width:100%}.group-card[_ngcontent-%COMP%] .group-meeting[_ngcontent-%COMP%] div[_ngcontent-%COMP%], .group-card[_ngcontent-%COMP%] .group-meeting[_ngcontent-%COMP%] ng-template[_ngcontent-%COMP%] > div[_ngcontent-%COMP%]{background-color:#0a6aac}.group-card[_ngcontent-%COMP%] .group-meeting[_ngcontent-%COMP%] div[_ngcontent-%COMP%] p[_ngcontent-%COMP%], .group-card[_ngcontent-%COMP%] .group-meeting[_ngcontent-%COMP%] ng-template[_ngcontent-%COMP%] > div[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{color:#fff;padding:0 10px}.group-card[_ngcontent-%COMP%] .group-actions[_ngcontent-%COMP%]{align-self:flex-end;margin:0 1%}.group-card[_ngcontent-%COMP%] .group-actions[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{margin-bottom:2px;margin-right:4px}.group-card[_ngcontent-%COMP%] .navigation-tabs[_ngcontent-%COMP%]{overflow:auto}.make-flex[_ngcontent-%COMP%]{display:flex}"]})}}return e})();var fTe=e=>["/clients",e,"general"],eN=e=>["../","loans-accounts",e,"general"],hTe=e=>["../","savings-accounts","gsim-account",e],gTe=e=>["../","loans-accounts","glim-account",e],_Te=e=>["../","savings-accounts",e,"actions","Deposit"],CTe=e=>["../","savings-accounts",e,"actions","Withdrawal"],vTe=e=>["../","savings-accounts",e,"actions","Approve"],xTe=e=>["../","savings-accounts",e,"actions","Undo Approval"],bTe=e=>["../","savings-accounts",e,"actions","Activate"],tN=e=>["../","savings-accounts",e,"transactions"];function yTe(e,o){e&1&&(l(0,"th",11),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.name")))}function STe(e,o){if(e&1&&(l(0,"td",12),b(1,"i",13),p(2,"statusLookup"),c(3),r()),e&2){let t=o.$implicit;a(),g("ngClass",m(2,3,t.status.code))("matTooltip",t.status.value),a(2),v(" ",t.displayName," ")}}function wTe(e,o){e&1&&(l(0,"th",11),c(1),p(2,"translate"),r()),e&2&&(a(),v("",m(2,1,"labels.inputs.Account No"),"."))}function PTe(e,o){if(e&1&&(l(0,"td",12),c(1),r()),e&2){let t=o.$implicit;a(),h(t.accountNo)}}function TTe(e,o){e&1&&(l(0,"th",11),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.Office")))}function MTe(e,o){if(e&1&&(l(0,"td",12),c(1),r()),e&2){let t=o.$implicit;a(),h(t.officeName)}}function DTe(e,o){e&1&&(l(0,"th",11),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.JLG Loan Application")))}function ETe(e,o){e&1&&(l(0,"div",14)(1,"button",15),b(2,"i",16),p(3,"translate"),r()()),e&2&&(a(2),g("matTooltip",Le(m(3,2,"tooltips.New Loan Application"))))}function ITe(e,o){if(e&1&&(l(0,"td",12),E(1,ETe,4,4,"div",14),r()),e&2){let t=o.$implicit;a(),I(t.status.code!=="clientStatusType.closed"?1:-1)}}function OTe(e,o){e&1&&b(0,"tr",17)}function ATe(e,o){if(e&1&&b(0,"tr",18),e&2){let t=o.$implicit;g("routerLink",Nt(1,fTe,t.id))}}function FTe(e,o){if(e&1&&(l(0,"div")(1,"h3"),c(2),p(3,"translate"),r(),l(4,"table",2),X(5,3),F(6,yTe,3,3,"th",4)(7,STe,4,5,"td",5),Z(),X(8,6),F(9,wTe,3,3,"th",4)(10,PTe,2,1,"td",5),Z(),X(11,7),F(12,TTe,3,3,"th",4)(13,MTe,2,1,"td",5),Z(),X(14,8),F(15,DTe,3,3,"th",4)(16,ITe,2,1,"td",5),Z(),F(17,OTe,1,0,"tr",9)(18,ATe,1,3,"tr",10),r()()),e&2){let t=w();a(2),h(m(3,4,"labels.heading.Client Members")),a(2),g("dataSource",t.groupClientMembers),a(13),g("matHeaderRowDef",t.clientMemberColumns),a(),g("matRowDefColumns",t.clientMemberColumns)}}function kTe(e,o){if(e&1){let t=Y();l(0,"div",21)(1,"button",22),R("click",function(){V(t);let i=w(2);return q(i.toggleLoanAccountsOverview())}),c(2),r()()}if(e&2){let t=w(2);a(2),v(" ",t.showClosedLoanAccounts?"View Active Accounts":"View Closed Accounts"," ")}}function BTe(e,o){e&1&&(l(0,"th",11),c(1),p(2,"translate"),r()),e&2&&(a(),v("",m(2,1,"labels.inputs.Account No"),"."))}function RTe(e,o){if(e&1&&(l(0,"td",12),b(1,"i",13),p(2,"statusLookup"),c(3),r()),e&2){let t=o.$implicit;a(),g("ngClass",t.inArrears?"status-active-overdue":m(2,3,t.status.code))("matTooltip",t.inArrears?"Active Overdue":t.status.value),a(2),v(" ",t.accountNo," ")}}function NTe(e,o){e&1&&(l(0,"th",11),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.Loan Account")))}function LTe(e,o){if(e&1&&(l(0,"td",12),c(1),r()),e&2){let t=o.$implicit;a(),h(t.productName)}}function VTe(e,o){e&1&&(l(0,"th",11),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.Original Loan")))}function qTe(e,o){if(e&1&&(l(0,"td",12),c(1),r()),e&2){let t=o.$implicit;a(),h(t.originalLoan)}}function zTe(e,o){e&1&&(l(0,"th",11),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.Loan Balance")))}function HTe(e,o){if(e&1&&(l(0,"td",12),c(1),p(2,"currency"),r()),e&2){let t=o.$implicit;a(),v(" ",$t(2,1,t.loanBalance,(t.currency==null?null:t.currency.code)||"USD","symbol","1.2-2")," ")}}function GTe(e,o){e&1&&(l(0,"th",11),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.Amount Paid")))}function jTe(e,o){if(e&1&&(l(0,"td",12),c(1),p(2,"currency"),r()),e&2){let t=o.$implicit;a(),v(" ",$t(2,1,t.amountPaid,(t.currency==null?null:t.currency.code)||"USD","symbol","1.2-2")," ")}}function $Te(e,o){e&1&&(l(0,"th",11),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.Type")))}function UTe(e,o){if(e&1&&(l(0,"td",12),b(1,"i",30),r()),e&2){let t=o.$implicit;a(),g("ngClass",t.loanType.value==="Individual"?"fa-user":"fa-group")("matTooltip",t.loanType.value==="Individual"?"Individual":"Group")}}function WTe(e,o){e&1&&(l(0,"th",11),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.Actions")))}function QTe(e,o){e&1&&(l(0,"button",31),b(1,"i",32),p(2,"translate"),r()),e&2&&(a(),g("matTooltip",Le(m(2,2,"tooltips.Make Repayment"))))}function YTe(e,o){e&1&&(l(0,"button",31),b(1,"i",33),p(2,"translate"),r()),e&2&&(a(),g("matTooltip",Le(m(2,2,"tooltips.Approve"))))}function JTe(e,o){e&1&&(l(0,"button",31),b(1,"i",34),p(2,"translate"),r()),e&2&&(a(),g("matTooltip",Le(m(2,2,"tooltips.Disburse"))))}function KTe(e,o){e&1&&(l(0,"button",31),b(1,"i",35),p(2,"translate"),r()),e&2&&(a(),g("matTooltip",Le(m(2,2,"tooltips.Transfer Funds"))))}function XTe(e,o){if(e&1&&(l(0,"td",12),E(1,QTe,3,4,"button",31),E(2,YTe,3,4,"button",31),E(3,JTe,3,4,"button",31),E(4,KTe,3,4,"button",31),r()),e&2){let t=o.$implicit;a(),I(t.status.active?1:-1),a(),I(t.status.pendingApproval?2:-1),a(),I(!t.status.pendingApproval&&!t.status.active&&!t.status.overpaid?3:-1),a(),I(!t.status.pendingApproval&&!t.status.active&&t.status.overpaid?4:-1)}}function ZTe(e,o){e&1&&b(0,"tr",17)}function e4e(e,o){if(e&1&&b(0,"tr",36),e&2){let t=o.$implicit;g("routerLink",Nt(1,eN,t.id))}}function t4e(e,o){if(e&1&&(l(0,"table",2),p(1,"accountsFilter"),X(2,6),F(3,BTe,3,3,"th",4)(4,RTe,4,5,"td",5),Z(),X(5,23),F(6,NTe,3,3,"th",4)(7,LTe,2,1,"td",5),Z(),X(8,24),F(9,VTe,3,3,"th",4)(10,qTe,2,1,"td",5),Z(),X(11,25),F(12,zTe,3,3,"th",4)(13,HTe,3,6,"td",5),Z(),X(14,26),F(15,GTe,3,3,"th",4)(16,jTe,3,6,"td",5),Z(),X(17,27),F(18,$Te,3,3,"th",4)(19,UTe,2,2,"td",5),Z(),X(20,28),F(21,WTe,3,3,"th",4)(22,XTe,5,4,"td",5),Z(),F(23,ZTe,1,0,"tr",9)(24,e4e,1,3,"tr",29),r()),e&2){let t=w(2);g("dataSource",Ot(1,3,t.loanAccounts,"loan")),a(23),g("matHeaderRowDef",t.openLoansColumns),a(),g("matRowDefColumns",t.openLoansColumns)}}function i4e(e,o){e&1&&(l(0,"th",11),c(1),p(2,"translate"),r()),e&2&&(a(),v("",m(2,1,"labels.inputs.Account No"),"."))}function n4e(e,o){if(e&1&&(l(0,"td",12),b(1,"i",13),p(2,"statusLookup"),c(3),r()),e&2){let t=o.$implicit;a(),g("ngClass",t.inArrears?"status-active-overdue":m(2,3,t.status.code))("matTooltip",t.inArrears?"Active Overdue":t.status.value),a(2),v(" ",t.accountNo," ")}}function o4e(e,o){e&1&&(l(0,"th",11),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.Loan Account")))}function a4e(e,o){if(e&1&&(l(0,"td",12),c(1),r()),e&2){let t=o.$implicit;a(),h(t.productName)}}function r4e(e,o){e&1&&(l(0,"th",11),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.Original Loan")))}function l4e(e,o){if(e&1&&(l(0,"td",12),c(1),p(2,"dateFormat"),r()),e&2){let t=o.$implicit;a(),h(m(2,1,t.lastActiveTransactionDate))}}function s4e(e,o){e&1&&(l(0,"th",11),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.Loan Balance")))}function c4e(e,o){if(e&1&&(l(0,"td",12),c(1),r()),e&2){let t=o.$implicit;a(),h(t.loanBalance)}}function p4e(e,o){e&1&&(l(0,"th",11),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.Amount Paid")))}function m4e(e,o){if(e&1&&(l(0,"td",12),c(1),r()),e&2){let t=o.$implicit;a(),h(t.accountBalance)}}function d4e(e,o){e&1&&(l(0,"th",11),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.Type")))}function u4e(e,o){if(e&1&&(l(0,"td",12),b(1,"i",30),r()),e&2){let t=o.$implicit;a(),g("ngClass",t.loanType.value==="Individual"?"fa-user":"fa-group")("matTooltip",t.loanType.value==="Individual"?"Individual":"Group")}}function f4e(e,o){e&1&&(l(0,"th",11),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.Closed Date")))}function h4e(e,o){if(e&1&&(l(0,"td",12),c(1),p(2,"dateFormat"),r()),e&2){let t=o.$implicit;a(),h(m(2,1,t.timeline.closedOnDate))}}function g4e(e,o){e&1&&b(0,"tr",17)}function _4e(e,o){if(e&1&&b(0,"tr",36),e&2){let t=o.$implicit;g("routerLink",Nt(1,eN,t.id))}}function C4e(e,o){if(e&1&&(l(0,"table",2),p(1,"accountsFilter"),X(2,6),F(3,i4e,3,3,"th",4)(4,n4e,4,5,"td",5),Z(),X(5,23),F(6,o4e,3,3,"th",4)(7,a4e,2,1,"td",5),Z(),X(8,24),F(9,r4e,3,3,"th",4)(10,l4e,3,3,"td",5),Z(),X(11,25),F(12,s4e,3,3,"th",4)(13,c4e,2,1,"td",5),Z(),X(14,26),F(15,p4e,3,3,"th",4)(16,m4e,2,1,"td",5),Z(),X(17,27),F(18,d4e,3,3,"th",4)(19,u4e,2,2,"td",5),Z(),X(20,37),F(21,f4e,3,3,"th",4)(22,h4e,3,3,"td",5),Z(),F(23,g4e,1,0,"tr",9)(24,_4e,1,3,"tr",29),r()),e&2){let t=w(2);g("dataSource",yr(1,3,t.loanAccounts,"loan","closed")),a(23),g("matHeaderRowDef",t.closedLoansColumns),a(),g("matRowDefColumns",t.closedLoansColumns)}}function v4e(e,o){if(e&1&&(l(0,"div")(1,"div",19)(2,"div",20)(3,"h3"),c(4),p(5,"translate"),r()(),E(6,kTe,3,1,"div",21),p(7,"accountsFilter"),r(),E(8,t4e,25,6,"table",2),E(9,C4e,25,7,"table",2),r()),e&2){let t=w();a(4),h(m(5,4,"labels.heading.Loan Accounts")),a(2),I(yr(7,6,t.loanAccounts,"loan","closed").length?6:-1),a(2),I(t.showClosedLoanAccounts?-1:8),a(),I(t.showClosedLoanAccounts?9:-1)}}function x4e(e,o){e&1&&(l(0,"th",11),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.GSIM Id")))}function b4e(e,o){if(e&1&&(l(0,"td",12),c(1),r()),e&2){let t=o.$implicit;a(),v(" ",t.gsimId," ")}}function y4e(e,o){e&1&&(l(0,"th",11),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.Account Number")))}function S4e(e,o){if(e&1&&(l(0,"td",12),c(1),r()),e&2){let t=o.$implicit;a(),h(t.accountNumber)}}function w4e(e,o){e&1&&(l(0,"th",11),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.Product")))}function P4e(e,o){if(e&1&&(l(0,"td",12),c(1),r()),e&2){let t=o.$implicit;a(),h(t.childGSIMAccounts[0].productName)}}function T4e(e,o){e&1&&(l(0,"th",11),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.Balance")))}function M4e(e,o){if(e&1&&(l(0,"td",12),c(1),r()),e&2){let t=o.$implicit;a(),h(t.parentBalance)}}function D4e(e,o){e&1&&(l(0,"th",11),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.Status")))}function E4e(e,o){if(e&1&&(l(0,"td",12),c(1),r()),e&2){let t=o.$implicit;a(),h(t.savingsStatus)}}function I4e(e,o){e&1&&b(0,"tr",17)}function O4e(e,o){if(e&1&&b(0,"tr",36),e&2){let t=o.$implicit;g("routerLink",Nt(1,hTe,t.accountNumber))}}function A4e(e,o){if(e&1&&(l(0,"div")(1,"div",19)(2,"div",20)(3,"h3"),c(4),p(5,"translate"),r()()(),l(6,"table",2),X(7,38),F(8,x4e,3,3,"th",4)(9,b4e,2,1,"td",5),Z(),X(10,39),F(11,y4e,3,3,"th",4)(12,S4e,2,1,"td",5),Z(),X(13,40),F(14,w4e,3,3,"th",4)(15,P4e,2,1,"td",5),Z(),X(16,41),F(17,T4e,3,3,"th",4)(18,M4e,2,1,"td",5),Z(),X(19,42),F(20,D4e,3,3,"th",4)(21,E4e,2,1,"td",5),Z(),F(22,I4e,1,0,"tr",9)(23,O4e,1,3,"tr",29),r()()),e&2){let t=w();a(4),h(m(5,4,"labels.heading.GSIM Account Overview")),a(2),g("dataSource",t.gsimAccounts),a(16),g("matHeaderRowDef",t.gsimAccountsColumns),a(),g("matRowDefColumns",t.gsimAccountsColumns)}}function F4e(e,o){e&1&&(l(0,"th",11),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.GLIM Id")))}function k4e(e,o){if(e&1&&(l(0,"td",12),c(1),r()),e&2){let t=o.$implicit;a(),v(" ",t.glimId," ")}}function B4e(e,o){e&1&&(l(0,"th",11),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.Account Number")))}function R4e(e,o){if(e&1&&(l(0,"td",12),c(1),r()),e&2){let t=o.$implicit;a(),h(t.accountNumber)}}function N4e(e,o){e&1&&(l(0,"th",11),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.Product")))}function L4e(e,o){if(e&1&&(l(0,"td",12),c(1),r()),e&2){let t=o.$implicit;a(),h(t.childGLIMAccounts[0].productName)}}function V4e(e,o){e&1&&(l(0,"th",11),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.Original Loan")))}function q4e(e,o){if(e&1&&(l(0,"td",12),c(1),r()),e&2){let t=o.$implicit;a(),h(t.parentPrincipalAmount)}}function z4e(e,o){e&1&&(l(0,"th",11),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.Status")))}function H4e(e,o){if(e&1&&(l(0,"td",12),c(1),r()),e&2){let t=o.$implicit;a(),h(t.loanStatus)}}function G4e(e,o){e&1&&b(0,"tr",17)}function j4e(e,o){if(e&1&&b(0,"tr",36),e&2){let t=o.$implicit;g("routerLink",Nt(1,gTe,t.glimId))}}function $4e(e,o){if(e&1&&(l(0,"div")(1,"div",19)(2,"div",20)(3,"h3"),c(4),p(5,"translate"),r()()(),l(6,"table",2),X(7,43),F(8,F4e,3,3,"th",4)(9,k4e,2,1,"td",5),Z(),X(10,39),F(11,B4e,3,3,"th",4)(12,R4e,2,1,"td",5),Z(),X(13,40),F(14,N4e,3,3,"th",4)(15,L4e,2,1,"td",5),Z(),X(16,24),F(17,V4e,3,3,"th",4)(18,q4e,2,1,"td",5),Z(),X(19,42),F(20,z4e,3,3,"th",4)(21,H4e,2,1,"td",5),Z(),F(22,G4e,1,0,"tr",9)(23,j4e,1,3,"tr",29),r()()),e&2){let t=w();a(4),h(m(5,4,"labels.heading.GLIM Loans Account Overview")),a(2),g("dataSource",t.glimAccounts),a(16),g("matHeaderRowDef",t.glimAccountsColumns),a(),g("matRowDefColumns",t.glimAccountsColumns)}}function U4e(e,o){if(e&1){let t=Y();l(0,"button",22),R("click",function(){V(t);let i=w(2);return q(i.toggleSavingAccountsOverview())}),c(1),r()}if(e&2){let t=w(2);a(),v(" ",t.showClosedSavingAccounts?"View Active Accounts":"View Closed Accounts"," ")}}function W4e(e,o){e&1&&(l(0,"th",11),c(1),p(2,"translate"),r()),e&2&&(a(),v("",m(2,1,"labels.inputs.Account No"),"."))}function Q4e(e,o){if(e&1&&(l(0,"td",12),b(1,"i",13),p(2,"statusLookup"),c(3),r()),e&2){let t=o.$implicit;a(),g("ngClass",m(2,3,t.status.code))("matTooltip",t.status.value),a(2),v(" ",t.accountNo," ")}}function Y4e(e,o){e&1&&(l(0,"th",11),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.Saving Account")))}function J4e(e,o){if(e&1&&(l(0,"td",12),c(1),r()),e&2){let t=o.$implicit;a(),h(t.productName)}}function K4e(e,o){e&1&&(l(0,"th",11),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.Last Active")))}function X4e(e,o){if(e&1&&(l(0,"td",12),c(1),p(2,"dateFormat"),r()),e&2){let t=o.$implicit;a(),h(m(2,1,t.lastActiveTransactionDate))}}function Z4e(e,o){e&1&&(l(0,"th",11),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.Balance")))}function eMe(e,o){if(e&1&&(l(0,"td",12),c(1),r()),e&2){let t=o.$implicit;a(),h(t.accountBalance)}}function tMe(e,o){e&1&&(l(0,"th",11),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.Actions")))}function iMe(e,o){if(e&1){let t=Y();l(0,"button",48),R("click",function(i){V(t);let s=w(4);return q(s.routeEdit(i))}),b(1,"i",49),p(2,"translate"),r()}if(e&2){let t=w().$implicit;g("routerLink",Nt(5,_Te,t.id)),a(),g("matTooltip",Le(m(2,3,"tooltips.Deposit")))}}function nMe(e,o){if(e&1){let t=Y();l(0,"button",48),R("click",function(i){V(t);let s=w(4);return q(s.routeEdit(i))}),b(1,"i",50),p(2,"translate"),r()}if(e&2){let t=w().$implicit;g("routerLink",Nt(5,CTe,t.id)),a(),g("matTooltip",Le(m(2,3,"tooltips.Withdraw")))}}function oMe(e,o){if(e&1){let t=Y();l(0,"button",48),R("click",function(i){V(t);let s=w(4);return q(s.routeEdit(i))}),b(1,"i",33),p(2,"translate"),r()}if(e&2){let t=w().$implicit;g("routerLink",Nt(5,vTe,t.id)),a(),g("matTooltip",Le(m(2,3,"tooltips.Approve")))}}function aMe(e,o){if(e&1){let t=Y();l(0,"button",48),R("click",function(i){V(t);let s=w(4);return q(s.routeEdit(i))}),b(1,"i",51),p(2,"translate"),r()}if(e&2){let t=w().$implicit;g("routerLink",Nt(5,xTe,t.id)),a(),g("matTooltip",Le(m(2,3,"tooltips.Undo Approval")))}}function rMe(e,o){if(e&1){let t=Y();l(0,"button",48),R("click",function(i){V(t);let s=w(4);return q(s.routeEdit(i))}),b(1,"i",52),p(2,"translate"),r()}if(e&2){let t=w().$implicit;g("routerLink",Nt(5,bTe,t.id)),a(),g("matTooltip",Le(m(2,3,"tooltips.Activate")))}}function lMe(e,o){if(e&1&&(l(0,"td",12),E(1,iMe,3,7,"button",47),E(2,nMe,3,7,"button",47),E(3,oMe,3,7,"button",47),E(4,aMe,3,7,"button",47),E(5,rMe,3,7,"button",47),r()),e&2){let t=o.$implicit;a(),I(t.status.active?1:-1),a(),I(t.status.active?2:-1),a(),I(t.status.submittedAndPendingApproval?3:-1),a(),I(!t.status.submittedAndPendingApproval&&!t.status.active?4:-1),a(),I(!t.status.submittedAndPendingApproval&&!t.status.active?5:-1)}}function sMe(e,o){e&1&&b(0,"tr",17)}function cMe(e,o){if(e&1&&b(0,"tr",36),e&2){let t=o.$implicit;g("routerLink",Nt(1,tN,t.id))}}function pMe(e,o){if(e&1&&(l(0,"table",2),p(1,"accountsFilter"),X(2,6),F(3,W4e,3,3,"th",4)(4,Q4e,4,5,"td",5),Z(),X(5,45),F(6,Y4e,3,3,"th",4)(7,J4e,2,1,"td",5),Z(),X(8,46),F(9,K4e,3,3,"th",4)(10,X4e,3,3,"td",5),Z(),X(11,41),F(12,Z4e,3,3,"th",4)(13,eMe,2,1,"td",5),Z(),X(14,28),F(15,tMe,3,3,"th",4)(16,lMe,6,5,"td",5),Z(),F(17,sMe,1,0,"tr",9)(18,cMe,1,3,"tr",29),r()),e&2){let t=w(2);g("dataSource",Ot(1,3,t.savingAccounts,"saving")),a(17),g("matHeaderRowDef",t.openSavingsColumns),a(),g("matRowDefColumns",t.openSavingsColumns)}}function mMe(e,o){e&1&&(l(0,"th",11),c(1),p(2,"translate"),r()),e&2&&(a(),v("",m(2,1,"labels.inputs.Account No"),"."))}function dMe(e,o){if(e&1&&(l(0,"td",12),b(1,"i",13),p(2,"statusLookup"),c(3),r()),e&2){let t=o.$implicit;a(),g("ngClass",m(2,3,t.status.code))("matTooltip",t.status.value),a(2),v(" ",t.accountNo," ")}}function uMe(e,o){e&1&&(l(0,"th",11),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.Saving Account")))}function fMe(e,o){if(e&1&&(l(0,"td",12),c(1),r()),e&2){let t=o.$implicit;a(),h(t.productName)}}function hMe(e,o){e&1&&(l(0,"th",11),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.Closed Date")))}function gMe(e,o){if(e&1&&(l(0,"td",12),c(1),p(2,"dateFormat"),r()),e&2){let t=o.$implicit;a(),h(m(2,1,t.timeline.closedOnDate))}}function _Me(e,o){e&1&&b(0,"tr",17)}function CMe(e,o){if(e&1&&b(0,"tr",36),e&2){let t=o.$implicit;g("routerLink",Nt(1,tN,t.id))}}function vMe(e,o){if(e&1&&(l(0,"table",2),p(1,"accountsFilter"),X(2,6),F(3,mMe,3,3,"th",4)(4,dMe,4,5,"td",5),Z(),X(5,45),F(6,uMe,3,3,"th",4)(7,fMe,2,1,"td",5),Z(),X(8,37),F(9,hMe,3,3,"th",4)(10,gMe,3,3,"td",5),Z(),F(11,_Me,1,0,"tr",9)(12,CMe,1,3,"tr",29),r()),e&2){let t=w(2);g("dataSource",yr(1,3,t.savingAccounts,"saving","closed")),a(11),g("matHeaderRowDef",t.closedSavingsColumns),a(),g("matRowDefColumns",t.closedSavingsColumns)}}function xMe(e,o){if(e&1&&(l(0,"div")(1,"div",19)(2,"div",20)(3,"h3"),c(4),p(5,"translate"),r()(),l(6,"div",21),E(7,U4e,2,1,"button",44),p(8,"accountsFilter"),r()(),E(9,pMe,19,6,"table",2),E(10,vMe,13,7,"table",2),r()),e&2){let t=w();a(4),h(m(5,4,"labels.heading.Saving Accounts")),a(3),I(yr(8,6,t.savingAccounts,"saving","closed").length?7:-1),a(2),I(t.showClosedSavingAccounts?-1:9),a(),I(t.showClosedSavingAccounts?10:-1)}}var E2=(()=>{class e{constructor(){this.route=T(Ie),this.groupsService=T(An),this.clientMemberColumns=["Name","Account No","Office","JLG Loan Application"],this.openLoansColumns=["Account No","Loan Account","Original Loan","Loan Balance","Amount Paid","Type","Actions"],this.closedLoansColumns=["Account No","Loan Account","Original Loan","Loan Balance","Amount Paid","Type","Closed Date"],this.openSavingsColumns=["Account No","Saving Account","Last Active","Balance","Actions"],this.closedSavingsColumns=["Account No","Saving Account","Closed Date"],this.gsimAccountsColumns=["GSIM Id","Account Number","Product","Balance","Status"],this.glimAccountsColumns=["GLIM Id","Account Number","Product","Original Loan","Status"],this.showClosedLoanAccounts=!1,this.showClosedSavingAccounts=!1,this.route.data.subscribe(t=>{this.glimAccounts=t.glimData,this.gsimAccounts=t.gsimData,this.groupAccountData=t.groupAccountsData,this.savingAccounts=t.groupAccountsData.savingsAccounts,this.loanAccounts=t.groupAccountsData.loanAccounts,this.groupSummary=t.groupSummary[0]}),this.route.parent.data.subscribe(t=>{this.groupClientMembers=t.groupViewData.clientMembers})}refreshAccounts(t){this.groupsService.getGroupAccountsData(t).subscribe(n=>{this.groupAccountData=n,this.savingAccounts=n.savingsAccounts,this.loanAccounts=n.loanAccounts})}toggleLoanAccountsOverview(){this.showClosedLoanAccounts=!this.showClosedLoanAccounts}toggleSavingAccountsOverview(){this.showClosedSavingAccounts=!this.showClosedSavingAccounts}routeEdit(t){t.stopPropagation()}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275cmp=me({type:e,selectors:[["mifosx-general-tab"]],decls:34,vars:36,consts:[[1,"tab-container","mat-typography"],[1,"layout-row","gap-32px","group-details-container","m-b-30"],["mat-table","",1,"mat-elevation-z1","m-b-30",3,"dataSource"],["matColumnDef","Name"],["mat-header-cell","",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","Account No"],["matColumnDef","Office"],["matColumnDef","JLG Loan Application"],["mat-header-row","",4,"matHeaderRowDef"],["mat-row","","class","select-row",3,"routerLink",4,"matRowDef","matRowDefColumns"],["mat-header-cell",""],["mat-cell",""],[1,"fa","fa-stop",3,"ngClass","matTooltip"],[1,"m-l-30"],["mat-raised-button","","color","primary","disabled","",1,"account-action-button"],[1,"fa","fa-plus",3,"matTooltip"],["mat-header-row",""],["mat-row","",1,"select-row",3,"routerLink"],[1,"layout-row","align-start","table-header"],[1,"m-b-10"],[1,"action-button","m-b-10"],["mat-raised-button","","color","primary",1,"f-right",3,"click"],["matColumnDef","Loan Account"],["matColumnDef","Original Loan"],["matColumnDef","Loan Balance"],["matColumnDef","Amount Paid"],["matColumnDef","Type"],["matColumnDef","Actions"],["mat-row","",3,"routerLink",4,"matRowDef","matRowDefColumns"],[1,"fa","fa-large",3,"ngClass","matTooltip"],["mat-raised-button","","color","primary",1,"account-action-button"],[1,"fa","fa-dollar",3,"matTooltip"],[1,"fa","fa-check",3,"matTooltip"],[1,"fa","fa-flag",3,"matTooltip"],[1,"fa","fa-exchange",3,"matTooltip"],["mat-row","",3,"routerLink"],["matColumnDef","Closed Date"],["matColumnDef","GSIM Id"],["matColumnDef","Account Number"],["matColumnDef","Product"],["matColumnDef","Balance"],["matColumnDef","Status"],["matColumnDef","GLIM Id"],["mat-raised-button","","color","primary",1,"f-right"],["matColumnDef","Saving Account"],["matColumnDef","Last Active"],["mat-raised-button","","color","primary",1,"account-action-button",3,"routerLink"],["mat-raised-button","","color","primary",1,"account-action-button",3,"click","routerLink"],[1,"fa","fa-arrow-up",3,"matTooltip"],[1,"fa","fa-arrow-down",3,"matTooltip"],[1,"fa","fa-undo",3,"matTooltip"],[1,"fa","fa-check-circle",3,"matTooltip"]],template:function(n,i){n&1&&(l(0,"div",0)(1,"h3"),c(2),p(3,"translate"),r(),l(4,"div",1)(5,"p"),c(6),p(7,"translate"),b(8,"br"),c(9),p(10,"translate"),b(11,"br"),c(12),p(13,"translate"),b(14,"br"),r(),l(15,"p"),c(16),p(17,"translate"),b(18,"br"),c(19),p(20,"translate"),b(21,"br"),c(22),p(23,"translate"),b(24,"br"),r(),l(25,"p"),c(26),p(27,"translate"),b(28,"br"),r()(),E(29,FTe,19,6,"div"),E(30,v4e,10,10,"div"),E(31,A4e,24,6,"div"),E(32,$4e,24,6,"div"),E(33,xMe,11,10,"div"),r()),n&2&&(a(2),h(m(3,20,"labels.heading.Group Details")),a(4),le(" ",m(7,22,"labels.inputs.Active Client Loans"),": ",i.groupSummary==null?null:i.groupSummary.activeClientLoans),a(3),le(" ",m(10,24,"labels.inputs.Active Client Borrowers"),": ",i.groupSummary==null?null:i.groupSummary.activeClientBorrowers),a(3),le(" ",m(13,26,"labels.inputs.Active Overdue Client Loans"),": ",i.groupSummary==null?null:i.groupSummary.overdueClientLoans),a(4),le(" ",m(17,28,"labels.inputs.Active Group Loans"),": ",i.groupSummary==null?null:i.groupSummary.activeGroupLoans),a(3),le(" ",m(20,30,"labels.inputs.Active Group Borrowers"),": ",i.groupSummary==null?null:i.groupSummary.activeGroupBorrowers),a(3),le(" ",m(23,32,"labels.inputs.Active Overdue Group Loans"),": ",i.groupSummary==null?null:i.groupSummary.overdueGroupLoans),a(4),le("",m(27,34,"labels.inputs.Active Clients"),": ",i.groupSummary==null?null:i.groupSummary.activeClients),a(3),I(i.groupClientMembers?29:-1),a(),I(i.loanAccounts?30:-1),a(),I(i.gsimAccounts?31:-1),a(),I(i.glimAccounts?32:-1),a(),I(i.savingAccounts?33:-1))},dependencies:[ue,co,fe,Ae,ve,_t,xt,vt,bt,Ct,yt,si,St,Pt,wt,Tt,wg,Pi,he,go,as],styles:[".tab-container[_ngcontent-%COMP%]{padding:1%;margin:1%}.tab-container[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{margin:1% auto}.tab-container[_ngcontent-%COMP%] .group-details-container[_ngcontent-%COMP%]{border:1px solid;padding:1%}.tab-container[_ngcontent-%COMP%] .action-button[_ngcontent-%COMP%]{margin-left:auto}.tab-container[_ngcontent-%COMP%] table[_ngcontent-%COMP%]{width:100%}.tab-container[_ngcontent-%COMP%] table[_ngcontent-%COMP%] .account-action-button[_ngcontent-%COMP%]{min-width:26px;padding:0 6px;margin:4px;line-height:25px}.tab-container[_ngcontent-%COMP%] table[_ngcontent-%COMP%] tr.select-row[_ngcontent-%COMP%]:hover, .tab-container[_ngcontent-%COMP%] i[_ngcontent-%COMP%]:hover, .tab-container[_ngcontent-%COMP%] tr[_ngcontent-%COMP%]:hover{cursor:pointer}"]})}}return e})();var I2=(()=>{class e{constructor(){this.route=T(Ie),this.authenticationService=T(Wo),this.groupsService=T(An),this.entityId=this.route.parent.snapshot.params.groupId,this.addNote=this.addNote.bind(this)}ngOnInit(){let t=this.authenticationService.getCredentials();this.username=t.username,this.route.data.subscribe(n=>{this.entityNotes=n.groupNotes})}addNote(t){this.groupsService.createGroupNote(this.entityId,t).subscribe(n=>{this.entityNotes.push({id:n.resourceId,createdByUsername:this.username,createdOn:new Date,note:t.note})})}editNote(t,n,i){this.groupsService.editGroupNote(this.entityId,t,n).subscribe(()=>{this.entityNotes[i].note=n.note})}deleteNote(t,n){this.groupsService.deleteGroupNote(this.entityId,t).subscribe(()=>{this.entityNotes.splice(n,1)})}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275cmp=me({type:e,selectors:[["mifosx-notes-tab"]],decls:1,vars:5,consts:[[3,"entityId","entityNotes","callbackAdd","callbackEdit","callbackDelete"]],template:function(n,i){n&1&&b(0,"mifosx-entity-notes-tab",0),n&2&&g("entityId",i.entityId)("entityNotes",i.entityNotes)("callbackAdd",i.addNote)("callbackEdit",i.editNote)("callbackDelete",i.deleteNote)},dependencies:[ue,fe,I0],encapsulation:2})}}return e})();var bMe=()=>({confirm:!0}),O2=(()=>{class e{constructor(){this.dialogRef=T(eo),this.data=T(Po)}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275cmp=me({type:e,selectors:[["mifosx-unassign-role-dialog"]],decls:14,vars:15,consts:[["mat-dialog-title",""],["mat-dialog-content",""],["align","end"],["mat-raised-button","","mat-dialog-close",""],["mat-raised-button","","color","warn",3,"mat-dialog-close"]],template:function(n,i){n&1&&(l(0,"h1",0),c(1),p(2,"translate"),r(),l(3,"div",1)(4,"p"),c(5),p(6,"translate"),r()(),l(7,"mat-dialog-actions",2)(8,"button",3),c(9),p(10,"translate"),r(),l(11,"button",4),c(12),p(13,"translate"),r()()),n&2&&(a(),h(m(2,6,"labels.heading.Unassign Role")),a(4),le("",m(6,8,"labels.text.Unassign role for client member"),": ",i.data.id," ?"),a(4),h(m(10,10,"labels.buttons.Cancel")),a(2),g("mat-dialog-close",oe(14,bMe)),a(),v(" ",m(13,12,"labels.buttons.Confirm")," "))},dependencies:[ue,fe,ve,Wn,ho,Nn,Un,he],encapsulation:2})}}return e})();var yMe=["rolesTable"],SMe=()=>["add-role"];function wMe(e,o){e&1&&(l(0,"button",6),b(1,"i",7),c(2),p(3,"translate"),r()),e&2&&(g("routerLink",oe(4,SMe)),a(2),v("\xA0 ",m(3,2,"labels.buttons.Add")," "))}function PMe(e,o){e&1&&(l(0,"div",4),F(1,wMe,4,5,"button",5),r()),e&2&&(a(),g("mifosxHasPermission","ASSIGNROLE_GROUP"))}function TMe(e,o){e&1&&(l(0,"th",17),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.name")))}function MMe(e,o){if(e&1&&(l(0,"td",18),c(1),r()),e&2){let t=o.$implicit;a(),h(t.clientName)}}function DMe(e,o){e&1&&(l(0,"th",17),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.Role")))}function EMe(e,o){if(e&1&&(l(0,"td",18),c(1),r()),e&2){let t=o.$implicit;a(),h(t.role.name)}}function IMe(e,o){e&1&&(l(0,"th",17),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.Client Id")))}function OMe(e,o){if(e&1&&(l(0,"td",18),c(1),r()),e&2){let t=o.$implicit;a(),h(t.clientId)}}function AMe(e,o){e&1&&(l(0,"th",17),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.Actions")))}function FMe(e,o){if(e&1){let t=Y();l(0,"button",20),R("click",function(){V(t);let i=w(2).$implicit,s=w(2);return q(s.unassignRole(i.clientId,i.id))}),b(1,"i",21),p(2,"translate"),r()}e&2&&(a(),g("matTooltip",Le(m(2,2,"tooltips.Unassign"))))}function kMe(e,o){e&1&&(l(0,"span"),F(1,FMe,3,4,"button",19),r()),e&2&&(a(),g("mifosxHasPermission","UNASSIGNROLE_GROUP"))}function BMe(e,o){if(e&1&&(l(0,"td",18),E(1,kMe,2,1,"span"),r()),e&2){let t=w(2);a(),I(t.groupStatus!=="Closed"?1:-1)}}function RMe(e,o){e&1&&b(0,"tr",22)}function NMe(e,o){e&1&&b(0,"tr",23)}function LMe(e,o){if(e&1&&(l(0,"div")(1,"table",8,0),X(3,9),F(4,TMe,3,3,"th",10)(5,MMe,2,1,"td",11),Z(),X(6,12),F(7,DMe,3,3,"th",10)(8,EMe,2,1,"td",11),Z(),X(9,13),F(10,IMe,3,3,"th",10)(11,OMe,2,1,"td",11),Z(),X(12,14),F(13,AMe,3,3,"th",10)(14,BMe,2,1,"td",11),Z(),F(15,RMe,1,0,"tr",15)(16,NMe,1,0,"tr",16),r()()),e&2){let t=w();a(),g("dataSource",t.groupRolesData),a(14),g("matHeaderRowDef",t.groupRolesColumns),a(),g("matRowDefColumns",t.groupRolesColumns)}}var A2=(()=>{class e{constructor(){this.route=T(Ie),this.groupsService=T(An),this.dialog=T(Ht),this.groupRolesColumns=["Name","Role","Client Id","Actions"],this.route.parent.data.subscribe(t=>{this.groupViewData=t.groupViewData,this.groupRolesData=this.groupViewData.groupRoles,this.groupStatus=this.groupViewData.status.value})}unassignRole(t,n){this.dialog.open(O2,{data:{id:t}}).afterClosed().subscribe(s=>{if(s.confirm){let d=this.groupRolesData.findIndex(u=>u.clientId===t);this.groupRolesData.splice(d,1),this.rolesTableRef.renderRows(),this.groupsService.unAssignRoleCommand(this.groupViewData.id,n).subscribe(()=>{})}})}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275cmp=me({type:e,selectors:[["mifosx-committee-tab"]],viewQuery:function(n,i){if(n&1&&Ee(yMe,5),n&2){let s;Te(s=Me())&&(i.rolesTableRef=s.first)}},decls:8,vars:5,consts:[["rolesTable",""],[1,"tab-container","mat-typography"],[1,"layout-row","align-start"],[1,"m-b-10"],[1,"action-button","m-b-10","gap-25px"],["mat-raised-button","","class","f-right","color","primary",3,"routerLink",4,"mifosxHasPermission"],["mat-raised-button","","color","primary",1,"f-right",3,"routerLink"],[1,"fa","fa-plus"],["mat-table","",1,"mat-elevation-z1","m-b-25",3,"dataSource"],["matColumnDef","Name"],["mat-header-cell","",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","Role"],["matColumnDef","Client Id"],["matColumnDef","Actions"],["mat-header-row","",4,"matHeaderRowDef"],["mat-row","",4,"matRowDef","matRowDefColumns"],["mat-header-cell",""],["mat-cell",""],["class","account-action-button","mat-raised-button","","color","warn",3,"click",4,"mifosxHasPermission"],["mat-raised-button","","color","warn",1,"account-action-button",3,"click"],[1,"fa","fa-ban",3,"matTooltip"],["mat-header-row",""],["mat-row",""]],template:function(n,i){n&1&&(l(0,"div",1)(1,"div",2)(2,"div",3)(3,"h3"),c(4),p(5,"translate"),r()(),E(6,PMe,2,1,"div",4),r(),E(7,LMe,17,3,"div"),r()),n&2&&(a(4),h(m(5,3,"labels.heading.Client Members")),a(2),I(i.groupStatus!=="Closed"?6:-1),a(),I(i.groupRolesData?7:-1))},dependencies:[ue,fe,Ae,ve,Ke,_t,xt,vt,bt,Ct,yt,si,St,Pt,wt,Tt,he],styles:[".tab-container[_ngcontent-%COMP%]{padding:1%;margin:1%}.tab-container[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{margin:1% auto}.tab-container[_ngcontent-%COMP%] .action-button[_ngcontent-%COMP%]{margin-left:auto}.tab-container[_ngcontent-%COMP%] table[_ngcontent-%COMP%]{width:100%}.tab-container[_ngcontent-%COMP%] table[_ngcontent-%COMP%] .account-action-button[_ngcontent-%COMP%]{min-width:26px;padding:0 6px;margin:4px;line-height:25px}"]})}}return e})();var VMe=()=>["../"];function qMe(e,o){e&1&&(l(0,"mat-error"),c(1),p(2,"translate"),p(3,"translate"),l(4,"strong"),c(5),p(6,"translate"),r()()),e&2&&(a(),le(" ",m(2,3,"labels.inputs.Group Name")," ",m(3,5,"labels.commons.is")," "),a(4),h(m(6,7,"labels.commons.required")))}function zMe(e,o){e&1&&(l(0,"mat-error"),c(1),p(2,"translate"),l(3,"strong"),c(4),p(5,"translate"),r(),c(6),p(7,"translate"),r()),e&2&&(a(),v(" ",m(2,3,"labels.inputs.Group Name")," "),a(3),h(m(5,5,"labels.inputs.cannot")),a(2),v(" ",m(7,7,"labels.commons.begin with a special character or number")," "))}function HMe(e,o){if(e&1&&(l(0,"mat-option",8),c(1),r()),e&2){let t=o.$implicit;g("value",t.id),a(),v(" ",t.name," ")}}function GMe(e,o){e&1&&(l(0,"mat-error"),c(1),p(2,"translate"),p(3,"translate"),l(4,"strong"),c(5),p(6,"translate"),r()()),e&2&&(a(),le(" ",m(2,3,"labels.inputs.Office")," ",m(3,5,"labels.commons.is")," "),a(4),h(m(6,7,"labels.commons.required")))}function jMe(e,o){if(e&1&&(l(0,"mat-option",8),c(1),r()),e&2){let t=o.$implicit;g("value",t.id),a(),v(" ",t.displayName," ")}}function $Me(e,o){e&1&&(l(0,"mat-error"),c(1),p(2,"translate"),p(3,"translate"),l(4,"strong"),c(5),p(6,"translate"),r()()),e&2&&(a(),le(" ",m(2,3,"labels.inputs.Submission Date")," ",m(3,5,"labels.commons.is")," "),a(4),h(m(6,7,"labels.commons.required")))}function UMe(e,o){e&1&&(l(0,"mat-error"),c(1),p(2,"translate"),p(3,"translate"),l(4,"strong"),c(5),p(6,"translate"),r()()),e&2&&(a(),le(" ",m(2,3,"labels.inputs.Activation Date")," ",m(3,5,"labels.commons.is")," "),a(4),h(m(6,7,"labels.commons.required")))}function WMe(e,o){if(e&1){let t=Y();l(0,"mat-form-field",10),R("click",function(){V(t);let i=xe(7);return q(i.open())}),l(1,"mat-label"),c(2),p(3,"translate"),r(),b(4,"input",22)(5,"mat-datepicker-toggle",12)(6,"mat-datepicker",null,2),E(8,UMe,7,9,"mat-error"),r()}if(e&2){let t=xe(7),n=w();a(2),h(m(3,6,"labels.inputs.Activation Date")),a(2),g("min",n.groupForm.value.submittedOnDate)("max",n.maxDate)("matDatepicker",t),a(),g("for",t),a(3),I(n.groupForm.controls.activationDate.hasError("required")?8:-1)}}function QMe(e,o){if(e&1&&(l(0,"mat-option",8),c(1),r()),e&2){let t=o.$implicit;g("value",t),a(),v(" ",t.displayName," ")}}function YMe(e,o){if(e&1){let t=Y();l(0,"div",18)(1,"div",23)(2,"div",24),c(3),p(4,"translate"),r(),l(5,"button",25),R("click",function(){V(t);let i=w();return q(i.addClient())}),b(6,"fa-icon",26),r()(),l(7,"div",27)(8,"div",28),c(9),p(10,"translate"),r(),l(11,"div",28),c(12),r()(),l(13,"div",27)(14,"div",28),c(15),p(16,"translate"),r(),l(17,"div",28),c(18),r()(),l(19,"div",27)(20,"div",28),c(21),p(22,"translate"),r(),l(23,"div",28),c(24),r()()()}if(e&2){let t=w();a(3),h(m(4,7,"labels.inputs.Client Details")),a(6),h(m(10,9,"labels.inputs.name")),a(3),h(t.clientChoice.value.displayName),a(3),h(m(16,11,"labels.inputs.Id")),a(3),h(t.clientChoice.value.id),a(3),h(m(22,13,"labels.inputs.Office")),a(3),h(t.clientChoice.value.officeName)}}function JMe(e,o){if(e&1){let t=Y();l(0,"div",30)(1,"span",31),c(2),r(),l(3,"button",32),R("click",function(){let i=V(t).$index,s=w(2);return q(s.removeClient(i))}),b(4,"fa-icon",33),r()()}if(e&2){let t=o.$implicit;a(2),h(t.displayName)}}function KMe(e,o){if(e&1&&(l(0,"mat-nav-list")(1,"h3",29),c(2),p(3,"translate"),r(),Se(4,JMe,5,1,"div",30,Pe),r()),e&2){let t=w();a(2),h(m(3,1,"labels.heading.Selected Clients")),a(2),we(t.clientMembers)}}var F2=(()=>{class e{constructor(){this.formBuilder=T(nt),this.route=T(Ie),this.router=T(qe),this.clientsService=T(Oi),this.groupService=T(An),this.dateUtils=T(Zt),this.settingsService=T(At),this.minDate=new Date(2e3,0,1),this.maxDate=new Date,this.clientsData=[],this.clientMembers=[],this.clientChoice=new it(""),this.route.data.subscribe(t=>{this.officeData=t.offices})}ngOnInit(){this.maxDate=this.settingsService.businessDate,this.createGroupForm()}ngAfterViewInit(){this.clientChoice.valueChanges.subscribe(t=>{t.length>=2&&this.clientsService.getFilteredClients("displayName","ASC",!0,t,this.groupForm.get("officeId").value).subscribe(n=>{this.clientsData=n.pageItems})})}createGroupForm(){this.groupForm=this.formBuilder.group({name:["",[se.required,se.pattern("(^[A-z]).*")]],officeId:["",se.required],submittedOnDate:[this.settingsService.businessDate,se.required],staffId:[""],externalId:[""],active:[!1]}),this.buildDependencies()}buildDependencies(){this.groupForm.get("officeId").valueChanges.subscribe(t=>{this.groupService.getStaff(t).subscribe(n=>{this.staffData=n.staffOptions,this.staffData===void 0?this.groupForm.controls.staffId.disable():this.groupForm.controls.staffId.enable()})}),this.groupForm.get("active").valueChanges.subscribe(t=>{t?this.groupForm.addControl("activationDate",new it("",se.required)):this.groupForm.removeControl("activationDate")})}addClient(){this.clientMembers.includes(this.clientChoice.value)||this.clientMembers.push(this.clientChoice.value)}removeClient(t){this.clientMembers.splice(t,1)}displayClient(t){return t?t.displayName:void 0}submit(){let t=this.groupForm.value,n=this.settingsService.language.code,i=this.settingsService.dateFormat,s=this.groupForm.value.submittedOnDate,d=this.groupForm.value.activationDate;t.submittedOnDate instanceof Date&&(t.submittedOnDate=this.dateUtils.formatDate(s,i)),t.activationDate instanceof Date&&(t.activationDate=this.dateUtils.formatDate(d,i));let u=qt(at({},t),{dateFormat:i,locale:n});u.clientMembers=[],this.clientMembers.forEach(f=>u.clientMembers.push(f.id)),this.groupService.createGroup(u).subscribe(f=>{this.router.navigate(["../groups",f.resourceId,"general"])})}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275cmp=me({type:e,selectors:[["mifosx-create-group"]],decls:64,vars:45,consts:[["submittedOnDatePicker",""],["clientsAutocomplete","matAutocomplete"],["activationDatePicker",""],[1,"container"],[3,"formGroup"],[1,"layout-column"],["matInput","","required","","formControlName","name"],["required","","formControlName","officeId"],[3,"value"],["formControlName","staffId"],[3,"click"],["matInput","","required","","formControlName","submittedOnDate",3,"min","max","matDatepicker"],["matSuffix","",3,"for"],["labelPosition","before","formControlName","active"],["matInput","","formControlName","externalId"],["matInput","",3,"formControl","matAutocomplete"],["autoActiveFirstOption","",3,"displayWith"],[1,"layout-row"],[1,"mat-table"],[1,"layout-row","align-center","gap-5px","responsive-column"],["type","button","mat-raised-button","",3,"routerLink"],["mat-raised-button","","color","primary",3,"click","disabled"],["matInput","","required","","formControlName","activationDate",3,"min","max","matDatepicker"],[1,"mat-header-row"],[1,"mat-header-cell"],["mat-icon-button","",3,"click"],["icon","plus"],[1,"mat-row"],[1,"mat-cell"],["matSubheader",""],["mat-list-item",""],["matLine",""],["mat-icon-button","","color","warn",3,"click"],["icon","trash"]],template:function(n,i){if(n&1){let s=Y();l(0,"div",3)(1,"mat-card")(2,"form",4)(3,"mat-card-content")(4,"div",5)(5,"mat-form-field")(6,"mat-label"),c(7),p(8,"translate"),r(),b(9,"input",6),E(10,qMe,7,9,"mat-error"),E(11,zMe,8,9,"mat-error"),r(),l(12,"mat-form-field")(13,"mat-label"),c(14),p(15,"translate"),r(),l(16,"mat-select",7),Se(17,HMe,2,2,"mat-option",8,Pe),r(),E(19,GMe,7,9,"mat-error"),r(),l(20,"mat-form-field")(21,"mat-label"),c(22),p(23,"translate"),r(),l(24,"mat-select",9),Se(25,jMe,2,2,"mat-option",8,Pe),r()(),l(27,"mat-form-field",10),R("click",function(){V(s);let u=xe(34);return q(u.open())}),l(28,"mat-label"),c(29),p(30,"translate"),r(),b(31,"input",11)(32,"mat-datepicker-toggle",12)(33,"mat-datepicker",null,0),E(35,$Me,7,9,"mat-error"),r(),l(36,"mat-checkbox",13),c(37),p(38,"translate"),r(),E(39,WMe,9,8,"mat-form-field"),l(40,"mat-form-field")(41,"mat-label"),c(42),p(43,"translate"),r(),b(44,"input",14),r(),l(45,"mat-form-field")(46,"mat-label"),c(47),p(48,"translate"),r(),b(49,"input",15),r()(),l(50,"mat-autocomplete",16,1),Se(52,QMe,2,2,"mat-option",8,Pe),r(),l(54,"div",17),E(55,YMe,25,15,"div",18),E(56,KMe,6,3,"mat-nav-list"),r()(),l(57,"mat-card-actions",19)(58,"button",20),c(59),p(60,"translate"),r(),l(61,"button",21),R("click",function(){return V(s),q(i.submit())}),c(62),p(63,"translate"),r()()()()()}if(n&2){let s=xe(34),d=xe(51);a(2),g("formGroup",i.groupForm),a(5),h(m(8,26,"labels.inputs.name")),a(3),I(i.groupForm.controls.name.hasError("required")?10:-1),a(),I(i.groupForm.controls.name.hasError("pattern")?11:-1),a(3),h(m(15,28,"labels.inputs.Office")),a(3),we(i.officeData),a(2),I(i.groupForm.controls.officeId.hasError("required")?19:-1),a(3),h(m(23,30,"labels.inputs.Staff")),a(3),we(i.staffData),a(4),h(m(30,32,"labels.inputs.Submitted On")),a(2),g("min",i.minDate)("max",i.maxDate)("matDatepicker",s),a(),g("for",s),a(3),I(i.groupForm.controls.submittedOnDate.hasError("required")?35:-1),a(2),v(" ",m(38,34,"labels.inputs.Active")," "),a(2),I(i.groupForm.controls.active.value?39:-1),a(3),h(m(43,36,"labels.inputs.External id")),a(5),h(m(48,38,"labels.inputs.Add Clients")),a(2),g("formControl",i.clientChoice)("matAutocomplete",d),a(),g("displayWith",i.displayClient),a(2),we(i.clientsData),a(3),I(i.clientChoice.value?55:-1),a(),I(i.clientMembers.length?56:-1),a(2),g("routerLink",oe(44,VMe)),a(),v(" ",m(60,40,"labels.buttons.Cancel")," "),a(2),g("disabled",!i.groupForm.valid),a(),v(" ",m(63,42,"labels.buttons.Submit")," ")}},dependencies:[ue,fe,tt,st,Ue,Xe,dt,_n,Ze,et,Ae,$e,Je,Et,Fe,Be,ut,ai,ze,gt,ft,mi,di,pi,ve,fi,er,Za,wi,ke,pa,Ep,ca,he],styles:[".container[_ngcontent-%COMP%]{max-width:50rem}.mat-table[_ngcontent-%COMP%]{display:block;font-family:Tahoma,Verdana,sans-serif;width:50%}.mat-row[_ngcontent-%COMP%], .mat-header-row[_ngcontent-%COMP%]{display:flex;border-bottom-width:1px;border-bottom-style:solid;align-items:center;min-height:48px;padding:0 24px}.mat-cell[_ngcontent-%COMP%], .mat-header-cell[_ngcontent-%COMP%]{flex:1;overflow:hidden;word-wrap:break-word}"]})}}return e})();var k2=(()=>{class e{constructor(){this.route=T(Ie),this.entityId=this.route.parent.parent.snapshot.paramMap.get("groupId"),this.route.data.subscribe(t=>{this.entityDatatable=t.groupDatatable,this.multiRowDatatableFlag=this.entityDatatable.columnHeaders[0].columnName==="id"})}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275cmp=me({type:e,selectors:[["mifosx-datatable-tabs"]],decls:2,vars:3,consts:[[1,"tab-container","mat-typography"],["entityType","Group",3,"entityId","multiRowDatatableFlag","entityDatatable"]],template:function(n,i){n&1&&(l(0,"div",0),b(1,"mifosx-entity-datatable-tab",1),r()),n&2&&(a(),g("entityId",i.entityId)("multiRowDatatableFlag",i.multiRowDatatableFlag)("entityDatatable",i.entityDatatable))},dependencies:[ue,fe,Or],encapsulation:2})}}return e})();var XMe=()=>["../"];function ZMe(e,o){if(e&1&&(l(0,"mat-option",4),c(1),r()),e&2){let t=o.$implicit;g("value",t.id),a(),v(" ",t.displayName," ")}}function e5e(e,o){e&1&&(l(0,"mat-error"),c(1),p(2,"translate"),p(3,"translate"),l(4,"strong"),c(5),p(6,"translate"),r()()),e&2&&(a(),le(" ",m(2,3,"labels.inputs.Client Member")," ",m(3,5,"labels.commons.is")," "),a(4),h(m(6,7,"labels.commons.required")))}function t5e(e,o){if(e&1&&(l(0,"mat-option",4),c(1),r()),e&2){let t=o.$implicit;g("value",t.id),a(),v(" ",t.name," ")}}function i5e(e,o){e&1&&(l(0,"mat-error"),c(1),p(2,"translate"),p(3,"translate"),l(4,"strong"),c(5),p(6,"translate"),r()()),e&2&&(a(),le(" ",m(2,3,"labels.inputs.Role")," ",m(3,5,"labels.commons.is")," "),a(4),h(m(6,7,"labels.commons.required")))}function n5e(e,o){if(e&1&&(l(0,"button",9),c(1),p(2,"translate"),r()),e&2){let t=w();g("disabled",!t.groupsAddRoleForm.valid),a(),v(" ",m(2,2,"labels.buttons.Confirm")," ")}}var B2=(()=>{class e{constructor(){this.formBuilder=T(nt),this.groupsService=T(An),this.route=T(Ie),this.router=T(qe),this.route.data.subscribe(t=>{this.groupAndTemplateData=t.groupAndTemplateData})}ngOnInit(){this.clientMemberData=this.groupAndTemplateData.activeClientMembers,this.roleData=this.groupAndTemplateData.availableRoles,this.createGroupsAddRoleForm()}createGroupsAddRoleForm(){this.groupsAddRoleForm=this.formBuilder.group({clientId:["",se.required],role:["",se.required]})}submit(){this.groupsService.executeGroupCommand(this.groupAndTemplateData.id,"assignRole",this.groupsAddRoleForm.value).subscribe(()=>{this.router.navigate(["../"],{relativeTo:this.route})})}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275cmp=me({type:e,selectors:[["mifosx-add-role"]],decls:26,vars:15,consts:[[1,"container"],[3,"ngSubmit","formGroup"],[1,"layout-column"],["formControlName","clientId"],[3,"value"],["formControlName","role"],[1,"layout-row","align-center","gap-5px","responsive-column"],["type","button","mat-raised-button","",3,"routerLink"],["mat-raised-button","","color","primary",3,"disabled",4,"mifosxHasPermission"],["mat-raised-button","","color","primary",3,"disabled"]],template:function(n,i){n&1&&(l(0,"div",0)(1,"mat-card")(2,"form",1),R("ngSubmit",function(){return i.submit()}),l(3,"mat-card-content")(4,"div",2)(5,"mat-form-field")(6,"mat-label"),c(7),p(8,"translate"),r(),l(9,"mat-select",3),Se(10,ZMe,2,2,"mat-option",4,Pe),r(),E(12,e5e,7,9,"mat-error"),r(),l(13,"mat-form-field")(14,"mat-label"),c(15),p(16,"translate"),r(),l(17,"mat-select",5),Se(18,t5e,2,2,"mat-option",4,Pe),r(),E(20,i5e,7,9,"mat-error"),r()()(),l(21,"mat-card-actions",6)(22,"button",7),c(23),p(24,"translate"),r(),F(25,n5e,3,4,"button",8),r()()()()),n&2&&(a(2),g("formGroup",i.groupsAddRoleForm),a(5),h(m(8,8,"labels.inputs.Client")),a(3),we(i.clientMemberData),a(2),I(i.groupsAddRoleForm.controls.clientId.hasError("required")?12:-1),a(3),h(m(16,10,"labels.inputs.Role")),a(3),we(i.roleData),a(2),I(i.groupsAddRoleForm.controls.role.hasError("required")?20:-1),a(2),g("routerLink",oe(14,XMe)),a(),v(" ",m(24,12,"labels.buttons.Cancel")," "),a(2),g("mifosxHasPermission","ASSIGNROLE_GROUP"))},dependencies:[ue,fe,tt,Ue,Xe,Ze,et,Ae,$e,Je,Et,Fe,Be,ut,gt,ft,ve,Ke,he],styles:[".container[_ngcontent-%COMP%]{max-width:37rem}"]})}}return e})();var o5e=()=>["../../"];function a5e(e,o){if(e&1&&(l(0,"mat-option",5),c(1),r()),e&2){let t=o.$implicit;g("value",t.id),a(),v(" ",t.displayName," ")}}function r5e(e,o){e&1&&(l(0,"mat-error"),c(1),p(2,"translate"),p(3,"translate"),l(4,"strong"),c(5),p(6,"translate"),r()()),e&2&&(a(),le(" ",m(2,3,"labels.inputs.Staff")," ",m(3,5,"labels.commons.is")," "),a(4),h(m(6,7,"labels.commons.required")))}var R2=(()=>{class e{constructor(){this.formBuilder=T(nt),this.groupsService=T(An),this.route=T(Ie),this.router=T(qe),this.route.data.subscribe(t=>{this.groupData=t.groupActionData})}ngOnInit(){this.staffData=this.groupData.staffOptions,this.createGroupAssignStaffForm()}createGroupAssignStaffForm(){this.groupAssignStaffForm=this.formBuilder.group({staffId:[""]})}submit(){this.groupsService.executeGroupCommand(this.groupData.id,"assignStaff",this.groupAssignStaffForm.value).subscribe(()=>{this.router.navigate(["../../"],{relativeTo:this.route})})}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275cmp=me({type:e,selectors:[["mifosx-group-assign-staff"]],decls:20,vars:14,consts:[[1,"container"],[3,"ngSubmit","formGroup"],[1,"layout-column"],[1,"flex-48"],["formControlName","staffId"],[3,"value"],[1,"layout-row","align-center","gap-5px","responsive-column"],["type","button","mat-raised-button","",3,"routerLink"],["mat-raised-button","","color","primary",3,"disabled"]],template:function(n,i){n&1&&(l(0,"div",0)(1,"mat-card")(2,"form",1),R("ngSubmit",function(){return i.submit()}),l(3,"mat-card-content")(4,"div",2)(5,"mat-form-field",3)(6,"mat-label"),c(7),p(8,"translate"),r(),l(9,"mat-select",4),Se(10,a5e,2,2,"mat-option",5,Pe),r(),E(12,r5e,7,9,"mat-error"),r()()(),l(13,"mat-card-actions",6)(14,"button",7),c(15),p(16,"translate"),r(),l(17,"button",8),c(18),p(19,"translate"),r()()()()()),n&2&&(a(2),g("formGroup",i.groupAssignStaffForm),a(5),h(m(8,7,"labels.inputs.Staff")),a(3),we(i.staffData),a(2),I(i.groupAssignStaffForm.controls.staffId.hasError("required")?12:-1),a(2),g("routerLink",oe(13,o5e)),a(),v(" ",m(16,9,"labels.buttons.Cancel")," "),a(2),g("disabled",!i.groupAssignStaffForm.valid),a(),v(" ",m(19,11,"labels.buttons.Confirm")," "))},dependencies:[ue,fe,tt,Ue,Xe,Ze,et,Ae,$e,Je,Et,Fe,Be,ut,gt,ft,ve,he],styles:[".container[_ngcontent-%COMP%]{max-width:37rem}"]})}}return e})();var l5e=()=>["../../"];function s5e(e,o){e&1&&(l(0,"mat-error"),c(1),p(2,"translate"),p(3,"translate"),l(4,"strong"),c(5),p(6,"translate"),r()()),e&2&&(a(),le(" ",m(2,3,"labels.inputs.Closed On Date")," ",m(3,5,"labels.commons.is")," "),a(4),h(m(6,7,"labels.commons.required")))}function c5e(e,o){if(e&1&&(l(0,"mat-option",9),c(1),r()),e&2){let t=o.$implicit;g("value",t.id),a(),v(" ",t.name," ")}}function p5e(e,o){e&1&&(l(0,"mat-error"),c(1),p(2,"translate"),p(3,"translate"),l(4,"strong"),c(5),p(6,"translate"),r()()),e&2&&(a(),le(" ",m(2,3,"labels.inputs.Closure Reason")," ",m(3,5,"labels.commons.is")," "),a(4),h(m(6,7,"labels.commons.required")))}var N2=(()=>{class e{constructor(){this.formBuilder=T(nt),this.groupsService=T(An),this.dateUtils=T(Zt),this.route=T(Ie),this.router=T(qe),this.settingsService=T(At),this.minDate=new Date(2e3,0,1),this.maxDate=new Date,this.route.data.subscribe(t=>{this.closureData=t.groupActionData.closureReasons}),this.groupId=this.route.parent.snapshot.params.groupId}ngOnInit(){this.maxDate=this.settingsService.businessDate,this.createCloseGroupForm()}createCloseGroupForm(){this.closeGroupForm=this.formBuilder.group({closureDate:["",se.required],closureReasonId:["",se.required]})}submit(){let t=this.closeGroupForm.value,n=this.settingsService.language.code,i=this.settingsService.dateFormat,s=this.closeGroupForm.value.closureDate;t.closureDate instanceof Date&&(t.closureDate=this.dateUtils.formatDate(s,i));let d=qt(at({},t),{dateFormat:i,locale:n});this.groupsService.executeGroupCommand(this.groupId,"close",d).subscribe(()=>{this.router.navigate(["../../"],{relativeTo:this.route})})}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275cmp=me({type:e,selectors:[["mifosx-close-group"]],decls:29,vars:22,consts:[["closureDatePicker",""],[1,"container"],[3,"ngSubmit","formGroup"],[1,"layout-column"],[3,"click"],["matInput","","required","","formControlName","closureDate",3,"min","max","matDatepicker"],["matSuffix","",3,"for"],[1,"flex-48"],["formControlName","closureReasonId"],[3,"value"],[1,"layout-row","align-center","gap-5px","responsive-column"],["type","button","mat-raised-button","",3,"routerLink"],["mat-raised-button","","color","warn",3,"disabled"]],template:function(n,i){if(n&1){let s=Y();l(0,"div",1)(1,"mat-card")(2,"form",2),R("ngSubmit",function(){return V(s),q(i.submit())}),l(3,"mat-card-content")(4,"div",3)(5,"mat-form-field",4),R("click",function(){V(s);let u=xe(12);return q(u.open())}),l(6,"mat-label"),c(7),p(8,"translate"),r(),b(9,"input",5)(10,"mat-datepicker-toggle",6)(11,"mat-datepicker",null,0),E(13,s5e,7,9,"mat-error"),r(),l(14,"mat-form-field",7)(15,"mat-label"),c(16),p(17,"translate"),r(),l(18,"mat-select",8),Se(19,c5e,2,2,"mat-option",9,Pe),r(),E(21,p5e,7,9,"mat-error"),r()()(),l(22,"mat-card-actions",10)(23,"button",11),c(24),p(25,"translate"),r(),l(26,"button",12),c(27),p(28,"translate"),r()()()()()}if(n&2){let s=xe(12);a(2),g("formGroup",i.closeGroupForm),a(5),h(m(8,13,"labels.inputs.Closed On Date")),a(2),g("min",i.minDate)("max",i.maxDate)("matDatepicker",s),a(),g("for",s),a(3),I(i.closeGroupForm.controls.closureDate.hasError("required")?13:-1),a(3),h(m(17,15,"labels.inputs.Closure Reason")),a(3),we(i.closureData),a(2),I(i.closeGroupForm.controls.closureReasonId.hasError("required")?21:-1),a(2),g("routerLink",oe(21,l5e)),a(),v(" ",m(25,17,"labels.buttons.Cancel")," "),a(2),g("disabled",!i.closeGroupForm.valid),a(),v(" ",m(28,19,"labels.buttons.Confirm")," ")}},dependencies:[ue,fe,tt,st,Ue,Xe,dt,Ze,et,Ae,$e,Je,Et,Fe,Be,ut,ai,ze,gt,ft,mi,di,pi,ve,he],styles:[".container[_ngcontent-%COMP%]{max-width:37rem}"]})}}return e})();var m5e=()=>["../../"];function d5e(e,o){e&1&&(l(0,"mat-error"),c(1),p(2,"translate"),p(3,"translate"),l(4,"strong"),c(5),p(6,"translate"),r()()),e&2&&(a(),le(" ",m(2,3,"labels.inputs.Activated On Date")," ",m(3,5,"labels.commons.is")," "),a(4),h(m(6,7,"labels.commons.required")))}var L2=(()=>{class e{constructor(){this.formBuilder=T(nt),this.groupsService=T(An),this.dateUtils=T(Zt),this.route=T(Ie),this.router=T(qe),this.settingsService=T(At),this.minDate=new Date(2e3,0,1),this.maxDate=new Date,this.groupId=this.route.parent.snapshot.params.groupId}ngOnInit(){this.maxDate=this.settingsService.businessDate,this.createActivateGroupForm()}createActivateGroupForm(){this.activateGroupForm=this.formBuilder.group({activationDate:["",se.required]})}submit(){let t=this.activateGroupForm.value,n=this.settingsService.language.code,i=this.settingsService.dateFormat,s=this.activateGroupForm.value.activationDate;t.activationDate instanceof Date&&(t.activationDate=this.dateUtils.formatDate(s,i));let d=qt(at({},t),{dateFormat:i,locale:n});this.groupsService.executeGroupCommand(this.groupId,"activate",d).subscribe(()=>{this.router.navigate(["../../"],{relativeTo:this.route})})}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275cmp=me({type:e,selectors:[["mifosx-activate-group"]],decls:20,vars:18,consts:[["activationDatePicker",""],[1,"container"],[3,"ngSubmit","formGroup"],[1,"flex-fill",3,"click"],["matInput","","required","","formControlName","activationDate",3,"min","max","matDatepicker"],["matSuffix","",3,"for"],[1,"layout-row","align-center","gap-5px","responsive-column"],["type","button","mat-raised-button","",3,"routerLink"],["mat-raised-button","","color","primary",3,"disabled"]],template:function(n,i){if(n&1){let s=Y();l(0,"div",1)(1,"mat-card")(2,"form",2),R("ngSubmit",function(){return V(s),q(i.submit())}),l(3,"mat-card-content")(4,"mat-form-field",3),R("click",function(){V(s);let u=xe(11);return q(u.open())}),l(5,"mat-label"),c(6),p(7,"translate"),r(),b(8,"input",4)(9,"mat-datepicker-toggle",5)(10,"mat-datepicker",null,0),E(12,d5e,7,9,"mat-error"),r()(),l(13,"mat-card-actions",6)(14,"button",7),c(15),p(16,"translate"),r(),l(17,"button",8),c(18),p(19,"translate"),r()()()()()}if(n&2){let s=xe(11);a(2),g("formGroup",i.activateGroupForm),a(4),h(m(7,11,"labels.inputs.Activated On Date")),a(2),g("min",i.minDate)("max",i.maxDate)("matDatepicker",s),a(),g("for",s),a(3),I(i.activateGroupForm.controls.activationDate.hasError("required")?12:-1),a(2),g("routerLink",oe(17,m5e)),a(),v(" ",m(16,13,"labels.buttons.Cancel")," "),a(2),g("disabled",!i.activateGroupForm.valid),a(),v(" ",m(19,15,"labels.buttons.Confirm")," ")}},dependencies:[ue,fe,tt,st,Ue,Xe,dt,Ze,et,Ae,$e,Je,Et,Fe,Be,ut,ai,ze,mi,di,pi,ve,he],styles:[".container[_ngcontent-%COMP%]{max-width:37rem}"]})}}return e})();var u5e=()=>["../../"];function f5e(e,o){e&1&&(l(0,"mat-error"),c(1),p(2,"translate"),p(3,"translate"),l(4,"strong"),c(5),p(6,"translate"),r()()),e&2&&(a(),le(" ",m(2,3,"labels.inputs.Start Date")," ",m(3,5,"labels.commons.is")," "),a(4),h(m(6,7,"labels.commons.required")))}function h5e(e,o){if(e&1&&(l(0,"mat-option",12),c(1),r()),e&2){let t=o.$implicit;g("value",t.id),a(),v(" ",t.value," ")}}function g5e(e,o){e&1&&(l(0,"mat-error"),c(1),p(2,"translate"),p(3,"translate"),l(4,"strong"),c(5),p(6,"translate"),r()()),e&2&&(a(),le(" ",m(2,3,"labels.inputs.Repetition Frequency")," ",m(3,5,"labels.commons.is")," "),a(4),h(m(6,7,"labels.commons.required")))}function _5e(e,o){if(e&1&&(l(0,"mat-form-field")(1,"mat-label"),c(2),p(3,"translate"),r(),l(4,"mat-select",11),Se(5,h5e,2,2,"mat-option",12,Pe),r(),E(7,g5e,7,9,"mat-error"),r()),e&2){let t=w();a(2),h(m(3,2,"labels.inputs.Repetition Frequency")),a(3),we(t.frequencyOptions),a(2),I(t.groupMeetingForm.controls.frequency.hasError("repeatsOnDay")?7:-1)}}function C5e(e,o){if(e&1&&(l(0,"mat-option",12),c(1),r()),e&2){let t=o.$implicit;g("value",t),a(),v(" ",t," ")}}function v5e(e,o){e&1&&(l(0,"mat-error"),c(1),p(2,"translate"),p(3,"translate"),l(4,"strong"),c(5),p(6,"translate"),r()()),e&2&&(a(),le(" ",m(2,3,"labels.inputs.Repeition Interval")," ",m(3,5,"labels.commons.is")," "),a(4),h(m(6,7,"labels.commons.required")))}function x5e(e,o){if(e&1&&(l(0,"mat-form-field")(1,"mat-label"),c(2),p(3,"translate"),r(),l(4,"mat-select",13),Se(5,C5e,2,2,"mat-option",12,Pe),r(),E(7,v5e,7,9,"mat-error"),r()),e&2){let t=w();a(2),h(m(3,2,"labels.inputs.Repetition Interval")),a(3),we(t.repetitionIntervals),a(2),I(t.groupMeetingForm.controls.interval.hasError("repeatsOnDay")?7:-1)}}function b5e(e,o){if(e&1&&(l(0,"mat-option",12),c(1),r()),e&2){let t=o.$implicit;g("value",t.id),a(),v(" ",t.value," ")}}function y5e(e,o){e&1&&(l(0,"mat-error"),c(1),p(2,"translate"),l(3,"strong"),c(4),p(5,"translate"),r(),c(6),p(7,"translate"),r()),e&2&&(a(),v(" ",m(2,3,"labels.inputs.At least")," "),a(3),h(m(5,5,"labels.inputs.one")),a(2),v(" ",m(7,7,"labels.inputs.day must be selected")," "))}function S5e(e,o){if(e&1&&(l(0,"mat-form-field")(1,"mat-label"),c(2),p(3,"translate"),r(),l(4,"mat-select",14),Se(5,b5e,2,2,"mat-option",12,Pe),r(),E(7,y5e,8,9,"mat-error"),r()),e&2){let t=w();a(2),h(m(3,2,"labels.inputs.Repeats on Day")),a(3),we(t.repeatsOnDays),a(2),I(t.groupMeetingForm.controls.repeatsOnDay.hasError("repeatsOnDay")?7:-1)}}function w5e(e,o){if(e&1){let t=Y();l(0,"button",15),R("click",function(){V(t);let i=w();return q(i.submit())}),c(1),p(2,"translate"),r()}if(e&2){let t=w();g("disabled",!t.groupMeetingForm.valid),a(),v(" ",m(2,2,"labels.buttons.Submit")," ")}}var V2=(()=>{class e{constructor(){this.formBuilder=T(nt),this.groupsService=T(An),this.dateUtils=T(Zt),this.route=T(Ie),this.router=T(qe),this.settingsService=T(At),this.minDate=new Date(2e3,0,1),this.maxDate=new Date,this.route.data.subscribe(t=>{this.calendarTemplate=t.groupActionData,this.frequencyOptions=this.calendarTemplate.frequencyOptions,this.repeatsOnDays=this.calendarTemplate.repeatsOnDayOptions}),this.groupId=this.route.parent.snapshot.params.groupId}ngOnInit(){this.maxDate=this.settingsService.maxFutureDate,this.createGroupMeetingForm(),this.buildDependencies()}createGroupMeetingForm(){this.groupMeetingForm=this.formBuilder.group({startDate:["",se.required],repeating:[!1]})}buildDependencies(){this.groupMeetingForm.get("repeating").valueChanges.subscribe(t=>{t?(this.groupMeetingForm.addControl("frequency",new it),this.groupMeetingForm.addControl("interval",new it),this.groupMeetingForm.get("frequency").valueChanges.subscribe(n=>{switch(this.groupMeetingForm.removeControl("repeatsOnDay"),n){case 1:this.repetitionIntervals=["1","2","3"];break;case 2:this.repetitionIntervals=["1","2","3"],this.groupMeetingForm.addControl("repeatsOnDay",new it("",se.required));break;case 3:this.repetitionIntervals=["1","2","3","4","5","6","7","8","9","10","11"];break;case 4:this.repetitionIntervals=["1","2","3","4","5"];break}}),this.groupMeetingForm.patchValue({frequency:1,interval:"1"})):(this.groupMeetingForm.removeControl("frequency"),this.groupMeetingForm.removeControl("interval"))})}submit(){let t=this.groupMeetingForm.value,n=this.settingsService.language.code,i=this.settingsService.dateFormat,s=`groups_${this.groupId}_CollectionMeeting`,d=t.repeating?"1":"4",u=this.groupMeetingForm.value.startDate;t.startDate instanceof Date&&(t.startDate=this.dateUtils.formatDate(u,i));let f=qt(at({},t),{title:s,typeId:d,dateFormat:i,locale:n});this.groupsService.createGroupMeeting(this.groupId,f).subscribe(_=>{this.router.navigate(["../../"],{relativeTo:this.route})})}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275cmp=me({type:e,selectors:[["mifosx-attach-group-meeting"]],decls:25,vars:21,consts:[["startDatePicker",""],[1,"container"],[3,"formGroup"],[1,"layout-column"],[3,"click"],["matInput","","required","","formControlName","startDate",3,"min","max","matDatepicker"],["matSuffix","",3,"for"],["labelPosition","before","formControlName","repeating",1,"m-t-10","m-b-10"],[1,"layout-row","align-center","gap-5px","responsive-column"],["type","button","mat-raised-button","",3,"routerLink"],["mat-raised-button","","color","primary",3,"disabled","click",4,"mifosxHasPermission"],["formControlName","frequency"],[3,"value"],["formControlName","interval"],["formControlName","repeatsOnDay","required",""],["mat-raised-button","","color","primary",3,"click","disabled"]],template:function(n,i){if(n&1){let s=Y();l(0,"div",1)(1,"mat-card")(2,"form",2)(3,"mat-card-content")(4,"div",3)(5,"mat-form-field",4),R("click",function(){V(s);let u=xe(12);return q(u.open())}),l(6,"mat-label"),c(7),p(8,"translate"),r(),b(9,"input",5)(10,"mat-datepicker-toggle",6)(11,"mat-datepicker",null,0),E(13,f5e,7,9,"mat-error"),r(),l(14,"mat-checkbox",7),c(15),p(16,"translate"),r(),E(17,_5e,8,4,"mat-form-field"),E(18,x5e,8,4,"mat-form-field"),E(19,S5e,8,4,"mat-form-field"),r()(),l(20,"mat-card-actions",8)(21,"button",9),c(22),p(23,"translate"),r(),F(24,w5e,3,4,"button",10),r()()()()}if(n&2){let s=xe(12);a(2),g("formGroup",i.groupMeetingForm),a(5),h(m(8,14,"labels.inputs.Meeting Start Date")),a(2),g("min",i.minDate)("max",i.maxDate)("matDatepicker",s),a(),g("for",s),a(3),I(i.groupMeetingForm.controls.startDate.hasError("required")?13:-1),a(2),v(" ",m(16,16,"labels.inputs.Repeats"),"? "),a(2),I(i.groupMeetingForm.contains("frequency")?17:-1),a(),I(i.groupMeetingForm.contains("interval")?18:-1),a(),I(i.groupMeetingForm.contains("repeatsOnDay")?19:-1),a(2),g("routerLink",oe(20,u5e)),a(),v(" ",m(23,18,"labels.buttons.Cancel")," "),a(2),g("mifosxHasPermission","CREATE_MEETING")}},dependencies:[ue,fe,tt,st,Ue,Xe,dt,Ze,et,Ae,$e,Je,Et,Fe,Be,ut,ai,ze,gt,ft,mi,di,pi,ve,fi,Ke,he],styles:[".container[_ngcontent-%COMP%]{max-width:37rem}"]})}}return e})();var P5e=()=>["../../"];function T5e(e,o){if(e&1&&(l(0,"mat-option",16),c(1),p(2,"dateFormat"),r()),e&2){let t=o.$implicit;g("value",t),a(),v(" ",m(2,2,t)," ")}}function M5e(e,o){e&1&&(l(0,"th",17),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.name")))}function D5e(e,o){if(e&1&&(l(0,"td",18),c(1),p(2,"find"),r()),e&2){let t=o.$implicit,n=w();a(),h($t(2,1,t.clientId,n.membersData,"id","displayName"))}}function E5e(e,o){e&1&&(l(0,"th",17),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.Attendance")))}function I5e(e,o){e&1&&(l(0,"span"),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.Present")))}function O5e(e,o){e&1&&(l(0,"span"),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.Absent")))}function A5e(e,o){e&1&&(l(0,"span"),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.Approved")))}function F5e(e,o){e&1&&(l(0,"span"),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.Leave")))}function k5e(e,o){e&1&&(l(0,"span"),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.Late")))}function B5e(e,o){if(e&1){let t=Y();l(0,"td",19),F(1,I5e,3,3,"span",20)(2,O5e,3,3,"span",20)(3,A5e,3,3,"span",20)(4,F5e,3,3,"span",20)(5,k5e,3,3,"span",20),l(6,"button",21),R("click",function(){let i=V(t).$implicit,s=w();return q(s.editAttendance(i))}),b(7,"fa-icon",22),r()()}if(e&2){let t=o.$implicit;g("ngSwitch",t.attendanceType),a(),g("ngSwitchCase",1),a(),g("ngSwitchCase",2),a(),g("ngSwitchCase",3),a(),g("ngSwitchCase",4),a(),g("ngSwitchCase",5)}}function R5e(e,o){e&1&&b(0,"tr",23)}function N5e(e,o){e&1&&b(0,"tr",24)}function L5e(e,o){if(e&1){let t=Y();l(0,"button",25),R("click",function(){V(t);let i=w();return q(i.submit())}),c(1),p(2,"translate"),r()}e&2&&(a(),v(" ",m(2,1,"labels.buttons.Confirm")," "))}var q2=(()=>{class e{constructor(){this.route=T(Ie),this.dateUtils=T(Zt),this.router=T(qe),this.groupsService=T(An),this.dialog=T(Ht),this.settingsService=T(At),this.displayedColumns=["name","attendance"],this.meetingDate=new it,this.route.data.subscribe(t=>{this.groupData=t.groupActionData,this.membersData=t.groupActionData.clientMembers})}ngOnInit(){this.dataSource=this.membersData.map(t=>({clientId:t.id,attendanceType:1})),this.meetingDates=this.groupData.collectionMeetingCalendar.recurringDates.filter(t=>new Date(t).getTime(){this.attendanceTypeOptions=t.attendanceTypeOptions})}editAttendance(t){let n=[new $i({controlName:"attendanceType",label:"Attendance",value:t.attendanceType,options:{label:"value",value:"id",data:this.attendanceTypeOptions},required:!1})],i={title:"Assign Member Attendance",layout:{addButtonText:"Confirm"},formfields:n};this.dialog.open(an,{data:i}).afterClosed().subscribe(d=>{if(d.data){let u=at(at({},t),d.data.value);this.dataSource.splice(this.dataSource.indexOf(t),1,u),this.dataSource=this.dataSource.concat([])}})}submit(){let t=this.settingsService.language.code,n=this.settingsService.dateFormat,i=new Date(this.meetingDate.value),s={meetingDate:this.dateUtils.formatDate(i,n),calendarId:this.groupData.collectionMeetingCalendar.id,clientsAttendance:this.dataSource,dateFormat:n,locale:t};this.groupsService.assignGroupAttendance(this.groupData.id,this.groupData.collectionMeetingCalendar.id,s).subscribe(()=>{this.router.navigate(["../../"],{relativeTo:this.route})})}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275cmp=me({type:e,selectors:[["mifosx-group-attendance"]],decls:26,vars:20,consts:[[1,"container"],[1,"layout-column","gap-3percent"],[1,"flex-fill"],[3,"formControl"],[3,"value",4,"ngFor","ngForOf"],["mat-table","",1,"mat-elevation-z1",3,"dataSource"],["matColumnDef","name"],["mat-header-cell","",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","attendance"],["mat-cell","",3,"ngSwitch",4,"matCellDef"],["mat-header-row","",4,"matHeaderRowDef"],["mat-row","",4,"matRowDef","matRowDefColumns"],[1,"layout-row","align-center","gap-5px","responsive-column"],["type","button","mat-raised-button","",3,"routerLink"],["mat-raised-button","","color","primary",3,"click",4,"mifosxHasPermission"],[3,"value"],["mat-header-cell",""],["mat-cell",""],["mat-cell","",3,"ngSwitch"],[4,"ngSwitchCase"],["mat-icon-button","","color","primary",3,"click"],["icon","pen"],["mat-header-row",""],["mat-row",""],["mat-raised-button","","color","primary",3,"click"]],template:function(n,i){n&1&&(l(0,"div",0)(1,"mat-card",1)(2,"mat-form-field",2)(3,"mat-label"),c(4),p(5,"translate"),r(),l(6,"mat-select",3),F(7,T5e,3,4,"mat-option",4),r(),l(8,"mat-hint"),c(9),p(10,"translate"),p(11,"dateFormat"),r()(),l(12,"table",5),X(13,6),F(14,M5e,3,3,"th",7)(15,D5e,3,6,"td",8),Z(),X(16,9),F(17,E5e,3,3,"th",7)(18,B5e,8,6,"td",10),Z(),F(19,R5e,1,0,"tr",11)(20,N5e,1,0,"tr",12),r(),l(21,"mat-card-actions",13)(22,"button",14),c(23),p(24,"translate"),r(),F(25,L5e,3,3,"button",15),r()()()),n&2&&(a(4),h(m(5,11,"labels.inputs.Meeting Date")),a(2),g("formControl",i.meetingDate),a(),g("ngForOf",i.meetingDates),a(2),le("",m(10,13,"labels.inputs.Next Meeting on"),": ",m(11,15,i.groupData.collectionMeetingCalendar.nextTenRecurringDates[0])),a(3),g("dataSource",i.dataSource),a(7),g("matHeaderRowDef",i.displayedColumns),a(),g("matRowDefColumns",i.displayedColumns),a(2),g("routerLink",oe(19,P5e)),a(),v(" ",m(24,17,"labels.buttons.Cancel")," "),a(2),g("mifosxHasPermission","SAVEORUPDATEATTENDANCE_MEETING"))},dependencies:[ue,is,Ks,Xs,fe,Ue,_n,Ae,$e,Et,Fe,Be,za,gt,ft,ve,Ke,_t,xt,vt,bt,Ct,yt,wi,ke,St,Pt,wt,Tt,Pi,he,Qn],styles:[".container[_ngcontent-%COMP%]{max-width:37rem}"]})}}return e})();function V5e(e,o){if(e&1&&(l(0,"mat-option",6),c(1),r()),e&2){let t=o.$implicit;g("value",t),a(),v(" ",t.displayName," ")}}function q5e(e,o){if(e&1){let t=Y();l(0,"div",16)(1,"span",17),c(2),r(),b(3,"div",18),l(4,"button",19),p(5,"translate"),R("click",function(){let i=V(t),s=i.$implicit,d=i.$index,u=w(2);return q(u.removeClient(d,s))}),b(6,"fa-icon",20),r()()}if(e&2){let t=o.$implicit;a(2),h(t.displayName),a(2),g("matTooltip",Le(m(5,3,"tooltips.Remove Client from Group")))}}function z5e(e,o){if(e&1&&(l(0,"mat-nav-list"),Se(1,q5e,7,5,"div",16,Pe),r()),e&2){let t=w();a(),we(t.clientMembers)}}var z2=(()=>{class e{constructor(){this.route=T(Ie),this.groupsService=T(An),this.clientsService=T(Oi),this.dialog=T(Ht),this.clientsData=[],this.clientMembers=[],this.clientChoice=new it(""),this.route.data.subscribe(t=>{this.groupData=t.groupActionData,this.clientMembers=t.groupActionData.clientMembers||[]})}ngAfterViewInit(){this.clientChoice.valueChanges.subscribe(t=>{t.length>=2&&this.clientsService.getFilteredClients("displayName","ASC",!0,t,this.groupData.officeId).subscribe(n=>{this.clientsData=n.pageItems})})}addClient(){this.clientMembers.includes(this.clientChoice.value)||this.groupsService.executeGroupCommand(this.groupData.id,"associateClients",{clientMembers:[this.clientChoice.value.id]}).subscribe(()=>{this.clientMembers.push(this.clientChoice.value)})}removeClient(t,n){this.dialog.open(vi,{data:{deleteContext:`client member: ${n.displayName}`}}).afterClosed().subscribe(s=>{s.delete&&this.groupsService.executeGroupCommand(this.groupData.id,"disassociateClients",{clientMembers:[n.id]}).subscribe(()=>{this.clientMembers.splice(t,1)})})}displayClient(t){return t?t.displayName:void 0}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275cmp=me({type:e,selectors:[["mifosx-manage-group-members"]],decls:41,vars:25,consts:[["clientsAutocomplete","matAutocomplete"],[1,"container","layout-row","gap-3percent"],[1,"client-card","layout-column","flex","gap-2px"],[1,"flex-30"],["matInput","",3,"formControl","matAutocomplete"],["autoActiveFirstOption","",3,"displayWith"],[3,"value"],[1,"mat-table"],[1,"mat-header-row"],[1,"mat-header-cell"],["mat-icon-button","",3,"click"],["icon","plus"],[1,"mat-row"],[1,"mat-cell"],[1,"flex-50"],["matSubheader",""],["mat-list-item",""],["matLine","",1,"p-t-10"],[1,"flex-fill"],["mat-icon-button","","color","warn","matTooltipPosition","left",3,"click","matTooltip"],["icon","trash"]],template:function(n,i){if(n&1){let s=Y();l(0,"div",1)(1,"mat-card",2)(2,"mat-form-field",3)(3,"mat-label"),c(4),p(5,"translate"),r(),b(6,"input",4),r(),l(7,"mat-autocomplete",5,0),Se(9,V5e,2,2,"mat-option",6,Pe),r(),l(11,"div",7)(12,"div",8)(13,"div",9),c(14),p(15,"translate"),r(),l(16,"button",10),R("click",function(){return V(s),q(i.addClient())}),b(17,"fa-icon",11),r()(),l(18,"div",12)(19,"div",13),c(20),p(21,"translate"),r(),l(22,"div",13),c(23),r()(),l(24,"div",12)(25,"div",13),c(26),p(27,"translate"),r(),l(28,"div",13),c(29),r()(),l(30,"div",12)(31,"div",13),c(32),p(33,"translate"),r(),l(34,"div",13),c(35),r()()()(),l(36,"mat-card",14)(37,"h3",15),c(38),p(39,"translate"),r(),E(40,z5e,3,0,"mat-nav-list"),r()()}if(n&2){let s=xe(8);a(4),h(m(5,13,"labels.inputs.Add Clients")),a(2),g("formControl",i.clientChoice)("matAutocomplete",s),a(),g("displayWith",i.displayClient),a(2),we(i.clientsData),a(5),h(m(15,15,"labels.inputs.Client Details")),a(6),h(m(21,17,"labels.inputs.name")),a(3),h(i.clientChoice.value.displayName),a(3),h(m(27,19,"labels.inputs.Id")),a(3),h(i.clientChoice.value.id),a(3),h(m(33,21,"labels.inputs.Office")),a(3),h(i.clientChoice.value.officeName),a(3),h(m(39,23,"labels.heading.Client Members")),a(2),I(i.clientMembers!=null&&i.clientMembers.length?40:-1)}},dependencies:[ue,fe,st,Ue,_n,$e,Fe,Be,ze,ft,er,Za,wi,ke,Ep,pa,ca,si,he],styles:[".container[_ngcontent-%COMP%]{max-width:70rem}.container[_ngcontent-%COMP%] .mat-table[_ngcontent-%COMP%]{display:block;font-family:Roboto,Helvetica Neue,sans-serif;width:100%;margin-top:-2rem;padding:1.5rem}.container[_ngcontent-%COMP%] .mat-row[_ngcontent-%COMP%], .container[_ngcontent-%COMP%] .mat-header-row[_ngcontent-%COMP%]{display:flex;border-bottom:1px solid var(--border-color-light, #eee);color:var(--text-color, inherit);font-weight:500;align-items:center;min-height:48px;padding:0 24px}.container[_ngcontent-%COMP%] .mat-cell[_ngcontent-%COMP%], .container[_ngcontent-%COMP%] .mat-header-cell[_ngcontent-%COMP%]{flex:1;overflow:hidden;word-wrap:break-word;flex-direction:column}.container[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{padding-left:0;margin-bottom:0;font-weight:500;border-bottom:2px solid var(--border-color-light, #eee)}.container[_ngcontent-%COMP%] .p-t-10[_ngcontent-%COMP%]{font-weight:500;margin-left:1rem}.container[_ngcontent-%COMP%] .client-card[_ngcontent-%COMP%], .container[_ngcontent-%COMP%] .flex-50[_ngcontent-%COMP%]{max-height:20rem;margin-bottom:1rem;padding:1.5rem;box-shadow:0 2px 4px #0000001a;border:1px solid var(--border-color, #ddd);border-radius:8px;transition:background-color .3s ease,border-color .3s ease}.container[_ngcontent-%COMP%] .flex-50[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{left:0}.container[_ngcontent-%COMP%] .flex-fill[_ngcontent-%COMP%]{margin-top:.5rem;display:inline;font-weight:500}"]})}}return e})();var H5e=()=>["../../"];function G5e(e,o){if(e&1&&(l(0,"mat-option",8),c(1),r()),e&2){let t=o.$implicit;g("value",t.id),a(),v(" ",t.value," ")}}function j5e(e,o){e&1&&(l(0,"mat-error"),c(1),p(2,"translate"),p(3,"translate"),l(4,"strong"),c(5),p(6,"translate"),r()()),e&2&&(a(),le(" ",m(2,3,"labels.inputs.Repetition Frequency")," ",m(3,5,"labels.commons.is")," "),a(4),h(m(6,7,"labels.commons.required")))}function $5e(e,o){if(e&1&&(l(0,"mat-option",8),c(1),r()),e&2){let t=o.$implicit;g("value",t),a(),v(" ",t," ")}}function U5e(e,o){e&1&&(l(0,"mat-error"),c(1),p(2,"translate"),p(3,"translate"),l(4,"strong"),c(5),p(6,"translate"),r()()),e&2&&(a(),le(" ",m(2,3,"labels.inputs.Repeition Interval")," ",m(3,5,"labels.commons.is")," "),a(4),h(m(6,7,"labels.commons.required")))}function W5e(e,o){if(e&1&&(l(0,"mat-option",8),c(1),r()),e&2){let t=o.$implicit;g("value",t.id),a(),v(" ",t.value," ")}}function Q5e(e,o){e&1&&(l(0,"mat-error"),c(1),p(2,"translate"),l(3,"strong"),c(4),p(5,"translate"),r(),c(6),p(7,"translate"),r()),e&2&&(a(),v(" ",m(2,3,"labels.inputs.At least")," "),a(3),h(m(5,5,"labels.inputs.one")),a(2),v(" ",m(7,7,"labels.inputs.day must be selected")," "))}function Y5e(e,o){if(e&1&&(l(0,"mat-form-field")(1,"mat-label"),c(2),p(3,"translate"),r(),l(4,"mat-select",16),Se(5,W5e,2,2,"mat-option",8,Pe),r(),E(7,Q5e,8,9,"mat-error"),r()),e&2){let t=w();a(2),h(m(3,2,"labels.inputs.Repeats on Day")),a(3),we(t.repeatsOnDays),a(2),I(t.groupEditMeetingForm.controls.repeatsOnDay.hasError("repeatsOnDay")?7:-1)}}function J5e(e,o){e&1&&(l(0,"mat-error"),c(1),p(2,"translate"),p(3,"translate"),l(4,"strong"),c(5),p(6,"translate"),r()()),e&2&&(a(),le(" ",m(2,3,"labels.inputs.Changes Affection Date")," ",m(3,5,"labels.commons.is")," "),a(4),h(m(6,7,"labels.commons.required")))}function K5e(e,o){if(e&1){let t=Y();l(0,"button",17),R("click",function(){V(t);let i=w();return q(i.submit())}),c(1),p(2,"translate"),r()}if(e&2){let t=w();g("disabled",!t.groupEditMeetingForm.valid),a(),v(" ",m(2,2,"labels.buttons.Submit")," ")}}var H2=(()=>{class e{constructor(){this.formBuilder=T(nt),this.groupsService=T(An),this.dateUtils=T(Zt),this.route=T(Ie),this.router=T(qe),this.settingsService=T(At),this.minDate=new Date(2e3,0,1),this.maxDate=new Date,this.route.data.subscribe(t=>{this.calendarTemplate=t.groupActionData,this.frequencyOptions=this.calendarTemplate.frequencyOptions,this.repeatsOnDays=this.calendarTemplate.repeatsOnDayOptions}),this.calendarId=this.route.snapshot.queryParams.calendarId,this.groupId=this.route.parent.snapshot.params.groupId}ngOnInit(){this.maxDate=this.settingsService.businessDate,this.createEditGroupMeetingForm(),this.buildDependencies()}createEditGroupMeetingForm(){this.groupEditMeetingForm=this.formBuilder.group({startDate:["",se.required],frequency:["",se.required],interval:["",se.required]})}buildDependencies(){this.groupEditMeetingForm.get("frequency").valueChanges.subscribe(t=>{switch(this.groupEditMeetingForm.removeControl("repeatsOnDay"),t){case 1:this.repetitionIntervals=["1","2","3"];break;case 2:this.repetitionIntervals=["1","2","3"],this.groupEditMeetingForm.addControl("repeatsOnDay",new it("",se.required)),this.groupEditMeetingForm.get("repeatsOnDay").patchValue(this.calendarTemplate.repeatsOnDay.id);break;case 3:this.repetitionIntervals=["1","2","3","4","5","6","7","8","9","10","11"];break;case 4:this.repetitionIntervals=["1","2","3","4","5"];break}}),this.groupEditMeetingForm.patchValue({startDate:this.calendarTemplate.startDate&&new Date(this.calendarTemplate.startDate),frequency:this.calendarTemplate.frequency.id,interval:`${this.calendarTemplate.interval}`})}editSchedule(){let t={calendarId:this.calendarId};this.router.navigate(["../Edit Meeting Schedule"],{relativeTo:this.route,queryParams:t})}submit(){let t=this.groupEditMeetingForm.value,n=this.settingsService.language.code,i=this.settingsService.dateFormat,s=`groups_${this.groupId}_CollectionMeeting`,d="1",u=this.groupEditMeetingForm.value.startDate;t.startDate instanceof Date&&(t.startDate=this.dateUtils.formatDate(u,i));let f=qt(at({},t),{repeating:!0,title:s,typeId:d,dateFormat:i,locale:n});this.groupsService.updateGroupMeeting(this.groupId,f,this.calendarId).subscribe(_=>{this.router.navigate(["../../"],{relativeTo:this.route})})}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275cmp=me({type:e,selectors:[["mifosx-edit-group-meeting"]],decls:44,vars:30,consts:[["startDatePicker",""],[1,"container","m-b-20","layout-row","align-end"],["mat-raised-button","","color","primary",3,"click"],["icon","edit",1,"m-r-10"],[1,"container"],[3,"formGroup"],[1,"layout-column"],["formControlName","frequency"],[3,"value"],["formControlName","interval"],[1,"m-b-5",3,"click"],["matInput","","required","","formControlName","startDate",3,"min","max","matDatepicker"],["matSuffix","",3,"for"],[1,"layout-row","align-center","gap-5px","responsive-column"],["type","button","mat-raised-button","",3,"routerLink"],["mat-raised-button","","color","primary",3,"disabled","click",4,"mifosxHasPermission"],["formControlName","repeatsOnDay","required",""],["mat-raised-button","","color","primary",3,"click","disabled"]],template:function(n,i){if(n&1){let s=Y();l(0,"div",1)(1,"button",2),R("click",function(){return V(s),q(i.editSchedule())}),b(2,"fa-icon",3),c(3),p(4,"translate"),r()(),l(5,"div",4)(6,"mat-card")(7,"form",5)(8,"mat-card-content")(9,"div",6)(10,"mat-form-field")(11,"mat-label"),c(12),p(13,"translate"),r(),l(14,"mat-select",7),Se(15,G5e,2,2,"mat-option",8,Pe),r(),E(17,j5e,7,9,"mat-error"),r(),l(18,"mat-form-field")(19,"mat-label"),c(20),p(21,"translate"),r(),l(22,"mat-select",9),Se(23,$5e,2,2,"mat-option",8,Pe),r(),E(25,U5e,7,9,"mat-error"),r(),E(26,Y5e,8,4,"mat-form-field"),l(27,"mat-form-field",10),R("click",function(){V(s);let u=xe(34);return q(u.open())}),l(28,"mat-label"),c(29),p(30,"translate"),r(),b(31,"input",11)(32,"mat-datepicker-toggle",12)(33,"mat-datepicker",null,0),E(35,J5e,7,9,"mat-error"),l(36,"mat-hint"),c(37),p(38,"translate"),r()()()(),l(39,"mat-card-actions",13)(40,"button",14),c(41),p(42,"translate"),r(),F(43,K5e,3,4,"button",15),r()()()()}if(n&2){let s=xe(34);a(3),v(" ",m(4,17,"labels.buttons.Edit Schedule")," "),a(4),g("formGroup",i.groupEditMeetingForm),a(5),h(m(13,19,"labels.inputs.Repetition Frequency")),a(3),we(i.frequencyOptions),a(2),I(i.groupEditMeetingForm.controls.frequency.hasError("repeatsOnDay")?17:-1),a(3),h(m(21,21,"labels.inputs.Repetition Interval")),a(3),we(i.repetitionIntervals),a(2),I(i.groupEditMeetingForm.controls.interval.hasError("repeatsOnDay")?25:-1),a(),I(i.groupEditMeetingForm.contains("repeatsOnDay")?26:-1),a(3),h(m(30,23,"labels.inputs.Above Changes are Effective from")),a(2),g("min",i.minDate)("max",i.maxDate)("matDatepicker",s),a(),g("for",s),a(3),I(i.groupEditMeetingForm.controls.startDate.hasError("required")?35:-1),a(2),v(" ",m(38,25,"labels.text.Repeats' and 'Repeats every")," "),a(3),g("routerLink",oe(29,H5e)),a(),v(" ",m(42,27,"labels.buttons.Cancel")," "),a(2),g("mifosxHasPermission","CREATE_MEETING")}},dependencies:[ue,fe,tt,st,Ue,Xe,dt,Ze,et,Ae,$e,Je,Et,Fe,Be,ut,ai,za,ze,gt,ft,mi,di,pi,ve,Ke,ke,he],styles:[".container[_ngcontent-%COMP%]{max-width:37rem}"]})}}return e})();var X5e=()=>["../../"];function Z5e(e,o){if(e&1&&(l(0,"mat-option",5),c(1),p(2,"dateFormat"),r()),e&2){let t=o.$implicit;g("value",t),a(),v(" ",m(2,2,t)," ")}}function eDe(e,o){e&1&&(l(0,"mat-error"),c(1),p(2,"translate"),p(3,"translate"),l(4,"strong"),c(5),p(6,"translate"),r()()),e&2&&(a(),le(" ",m(2,3,"labels.inputs.Existing Meeting Date")," ",m(3,5,"labels.commons.is")," "),a(4),h(m(6,7,"labels.commons.required")))}function tDe(e,o){e&1&&(l(0,"mat-error"),c(1),p(2,"translate"),p(3,"translate"),l(4,"strong"),c(5),p(6,"translate"),r()()),e&2&&(a(),le(" ",m(2,3,"labels.inputs.Revised Meeting Date")," ",m(3,5,"labels.commons.is")," "),a(4),h(m(6,7,"labels.commons.required")))}function iDe(e,o){if(e&1){let t=Y();l(0,"button",12),R("click",function(){V(t);let i=w();return q(i.submit())}),c(1),p(2,"translate"),r()}if(e&2){let t=w();g("disabled",!t.groupEditMeetingScheduleForm.valid),a(),v(" ",m(2,2,"labels.buttons.Submit")," ")}}var G2=(()=>{class e{constructor(){this.formBuilder=T(nt),this.groupsService=T(An),this.dateUtils=T(Zt),this.route=T(Ie),this.router=T(qe),this.settingsService=T(At),this.minDate=new Date(2e3,0,1),this.maxDate=new Date,this.route.data.subscribe(t=>{this.calendarTemplate=t.groupActionData,this.nextMeetingDates=this.calendarTemplate.nextTenRecurringDates}),this.calendarId=this.route.snapshot.queryParams.calendarId,this.groupId=this.route.parent.snapshot.params.groupId}ngOnInit(){this.maxDate=this.settingsService.businessDate,this.createEditMeetingScheduleForm()}createEditMeetingScheduleForm(){this.groupEditMeetingScheduleForm=this.formBuilder.group({presentMeetingDate:["",se.required],newMeetingDate:["",se.required]})}submit(){let t=this.groupEditMeetingScheduleForm.value,n=this.settingsService.language.code,i=this.settingsService.dateFormat,s=!0,d=new Date(this.groupEditMeetingScheduleForm.value.presentMeetingDate),u=this.groupEditMeetingScheduleForm.value.newMeetingDate;t.presentMeetingDate instanceof Date&&(t.presentMeetingDate=this.dateUtils.formatDate(d,i)),t.newMeetingDate instanceof Date&&(t.newMeetingDate=this.dateUtils.formatDate(u,i));let f=qt(at({},t),{reschedulebasedOnMeetingDates:s,dateFormat:i,locale:n});this.groupsService.updateGroupMeeting(this.groupId,f,this.calendarId).subscribe(_=>{this.router.navigate(["../../"],{relativeTo:this.route})})}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275cmp=me({type:e,selectors:[["mifosx-edit-group-meeting-schedule"]],decls:27,vars:19,consts:[["newMeetingDatePicker",""],[1,"container"],[3,"formGroup"],[1,"layout-column"],["formControlName","presentMeetingDate"],[3,"value"],[3,"click"],["matInput","","required","","formControlName","newMeetingDate",3,"min","max","matDatepicker"],["matSuffix","",3,"for"],[1,"layout-row","align-center","gap-5px","responsive-column"],["type","button","mat-raised-button","",3,"routerLink"],["mat-raised-button","","color","primary",3,"disabled","click",4,"mifosxHasPermission"],["mat-raised-button","","color","primary",3,"click","disabled"]],template:function(n,i){if(n&1){let s=Y();l(0,"div",1)(1,"mat-card")(2,"form",2)(3,"mat-card-content")(4,"div",3)(5,"mat-form-field")(6,"mat-label"),c(7),p(8,"translate"),r(),l(9,"mat-select",4),Se(10,Z5e,3,4,"mat-option",5,Pe),r(),E(12,eDe,7,9,"mat-error"),r(),l(13,"mat-form-field",6),R("click",function(){V(s);let u=xe(20);return q(u.open())}),l(14,"mat-label"),c(15),p(16,"translate"),r(),b(17,"input",7)(18,"mat-datepicker-toggle",8)(19,"mat-datepicker",null,0),E(21,tDe,7,9,"mat-error"),r()()(),l(22,"mat-card-actions",9)(23,"button",10),c(24),p(25,"translate"),r(),F(26,iDe,3,4,"button",11),r()()()()}if(n&2){let s=xe(20);a(2),g("formGroup",i.groupEditMeetingScheduleForm),a(5),h(m(8,12,"labels.inputs.Existing Meeting Date")),a(3),we(i.nextMeetingDates),a(2),I(i.groupEditMeetingScheduleForm.controls.presentMeetingDate.hasError("repeatsOnDay")?12:-1),a(3),h(m(16,14,"labels.inputs.Revised Meeting Date")),a(2),g("min",i.minDate)("max",i.maxDate)("matDatepicker",s),a(),g("for",s),a(3),I(i.groupEditMeetingScheduleForm.controls.newMeetingDate.hasError("required")?21:-1),a(2),g("routerLink",oe(18,X5e)),a(),v(" ",m(25,16,"labels.buttons.Cancel")," "),a(2),g("mifosxHasPermission","CREATE_MEETING")}},dependencies:[ue,fe,tt,st,Ue,Xe,dt,Ze,et,Ae,$e,Je,Et,Fe,Be,ut,ai,ze,gt,ft,mi,di,pi,ve,Ke,Pi,he],styles:[".container[_ngcontent-%COMP%]{max-width:37rem}"]})}}return e})();var nDe=()=>["../../"],oDe=e=>({id:e});function aDe(e,o){if(e&1&&(l(0,"mat-option",5),c(1),r()),e&2){let t=o.$implicit;g("value",Nt(2,oDe,t.id)),a(),v(" ",t.displayName," ")}}function rDe(e,o){e&1&&(l(0,"mat-error"),c(1),p(2,"translate"),p(3,"translate"),l(4,"strong"),c(5),p(6,"translate"),r()()),e&2&&(a(),le(" ",m(2,3,"labels.inputs.Destination Group")," ",m(3,5,"labels.commons.is")," "),a(4),h(m(6,7,"labels.commons.required")))}function lDe(e,o){if(e&1&&(l(0,"mat-option",5),c(1),r()),e&2){let t=o.$implicit;g("value",t),a(),v(" ",t.name," ")}}function sDe(e,o){if(e&1&&(l(0,"div",9)(1,"div",13)(2,"div",14),c(3),p(4,"translate"),r()(),l(5,"div",15)(6,"div",16),c(7),p(8,"translate"),r(),l(9,"div",16),c(10),r()(),l(11,"div",15)(12,"div",16),c(13),p(14,"translate"),r(),l(15,"div",16),c(16),r()(),l(17,"div",15)(18,"div",16),c(19),p(20,"translate"),r(),l(21,"div",16),c(22),p(23,"dateFormat"),r()(),l(24,"div",15)(25,"div",16),c(26),p(27,"translate"),r(),l(28,"div",16),c(29),r()(),l(30,"div",15)(31,"div",16),c(32),p(33,"translate"),r(),l(34,"div",16),c(35),r()()()),e&2){let t=w();a(3),h(m(4,11,"labels.inputs.Destination Group Details")),a(4),h(m(8,13,"labels.inputs.name")),a(3),h(t.transferClientsForm.get("destinationGroupId").value.name),a(3),h(m(14,15,"labels.inputs.Id")),a(3),h(t.transferClientsForm.get("destinationGroupId").value.id),a(3),h(m(20,17,"labels.inputs.Activation Date")),a(3),v(" ",m(23,19,t.transferClientsForm.get("destinationGroupId").value.activationDate)||"Not Activated"," "),a(4),h(m(27,21,"labels.inputs.Staff")),a(3),v(" ",t.transferClientsForm.get("destinationGroupId").value.staffName||"Unassigned"," "),a(3),h(m(33,23,"labels.inputs.External Id")),a(3),v(" ",t.transferClientsForm.get("destinationGroupId").value.externalId||"Unassigned"," ")}}function cDe(e,o){if(e&1){let t=Y();l(0,"button",17),R("click",function(){V(t);let i=w();return q(i.submit())}),c(1),p(2,"translate"),r()}if(e&2){let t=w();g("disabled",!t.transferClientsForm.valid),a(),v(" ",m(2,2,"labels.buttons.Submit")," ")}}var j2=(()=>{class e{constructor(){this.formBuilder=T(nt),this.route=T(Ie),this.router=T(qe),this.groupsService=T(An),this.settingsService=T(At),this.groupsData=[],this.clientMembers=[],this.route.data.subscribe(t=>{this.groupData=t.groupActionData,this.clientMembers=this.groupData.clientMembers})}ngOnInit(){this.createTransferClientsForm()}ngAfterViewInit(){this.transferClientsForm.get("destinationGroupId").valueChanges.subscribe(t=>{t.length>=2&&this.groupsService.getFilteredGroups("name","ASC",t,this.groupData.officeId).subscribe(n=>{this.groupsData=n})})}createTransferClientsForm(){this.transferClientsForm=this.formBuilder.group({clients:["",se.required],inheritDestinationGroupLoanOfficer:[!1],destinationGroupId:["",se.required]})}displayGroup(t){return t?t.name:void 0}submit(){let t=this.settingsService.language.code,n=qt(at({},this.transferClientsForm.value),{destinationGroupId:this.transferClientsForm.get("destinationGroupId").value.id,locale:t});this.groupsService.executeGroupCommand(this.groupData.id,"transferClients",n).subscribe(()=>{this.router.navigate(["../../"],{relativeTo:this.route})})}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275cmp=me({type:e,selectors:[["mifosx-group-transfer-clients"]],decls:31,vars:20,consts:[["groupsAutocomplete","matAutocomplete"],[1,"container"],[3,"formGroup"],[1,"layout-column"],["required","","formControlName","clients","multiple",""],[3,"value"],["labelPosition","before","formControlName","inheritDestinationGroupLoanOfficer",1,"m-t-10","m-b-10"],["matInput","","formControlName","destinationGroupId",3,"matAutocomplete"],["autoActiveFirstOption","",3,"displayWith"],[1,"mat-table"],[1,"layout-row","align-center","gap-5px","responsive-column"],["type","button","mat-raised-button","",3,"routerLink"],["mat-raised-button","","color","primary",3,"disabled","click",4,"mifosxHasPermission"],[1,"mat-header-row"],[1,"mat-header-cell"],[1,"mat-row"],[1,"mat-cell"],["mat-raised-button","","color","primary",3,"click","disabled"]],template:function(n,i){if(n&1&&(l(0,"div",1)(1,"mat-card")(2,"form",2)(3,"mat-card-content")(4,"div",3)(5,"mat-form-field")(6,"mat-label"),c(7),p(8,"translate"),r(),l(9,"mat-select",4),Se(10,aDe,2,4,"mat-option",5,Pe),r()(),l(12,"mat-checkbox",6),c(13),p(14,"translate"),r(),l(15,"mat-form-field")(16,"mat-label"),c(17),p(18,"translate"),r(),b(19,"input",7),E(20,rDe,7,9,"mat-error"),r()(),l(21,"mat-autocomplete",8,0),Se(23,lDe,2,2,"mat-option",5,Pe),r(),E(25,sDe,36,25,"div",9),r(),l(26,"mat-card-actions",10)(27,"button",11),c(28),p(29,"translate"),r(),F(30,cDe,3,4,"button",12),r()()()()),n&2){let s,d=xe(22);a(2),g("formGroup",i.transferClientsForm),a(5),h(m(8,11,"labels.inputs.Select Client Members for Transfer")),a(3),we(i.clientMembers),a(3),v(" ",m(14,13,"labels.inputs.Inherit Group Loan Officer"),"? "),a(4),h(m(18,15,"labels.inputs.Destination Group")),a(2),g("matAutocomplete",d),a(),I(i.transferClientsForm.controls.destinationGroupId.hasError("required")?20:-1),a(),g("displayWith",i.displayGroup),a(2),we(i.groupsData),a(2),I((s=i.transferClientsForm.get("destinationGroupId").value)!=null&&s.id?25:-1),a(2),g("routerLink",oe(19,nDe)),a(),v(" ",m(29,17,"labels.buttons.Cancel")," "),a(2),g("mifosxHasPermission","TRANSFERCLIENTS_GROUP")}},dependencies:[ue,fe,tt,st,Ue,Xe,dt,Ze,et,Ae,$e,Je,Et,Fe,Be,ut,ze,gt,ft,ve,fi,Ke,er,Za,Pi,he],styles:[".container[_ngcontent-%COMP%]{max-width:37rem}.mat-table[_ngcontent-%COMP%]{display:block;font-family:Tahoma,Verdana,sans-serif;width:100%}.mat-row[_ngcontent-%COMP%], .mat-header-row[_ngcontent-%COMP%]{display:flex;border-bottom-width:1px;border-bottom-style:solid;align-items:center;min-height:30px;padding:0 24px}.mat-cell[_ngcontent-%COMP%], .mat-header-cell[_ngcontent-%COMP%]{flex:1;overflow:hidden;word-wrap:break-word}"]})}}return e})();function pDe(e,o){e&1&&b(0,"mifosx-group-assign-staff")}function mDe(e,o){e&1&&b(0,"mifosx-close-group")}function dDe(e,o){e&1&&b(0,"mifosx-activate-group")}function uDe(e,o){e&1&&b(0,"mifosx-attach-group-meeting")}function fDe(e,o){e&1&&b(0,"mifosx-group-attendance")}function hDe(e,o){e&1&&b(0,"mifosx-manage-group-members")}function gDe(e,o){e&1&&b(0,"mifosx-edit-group-meeting")}function _De(e,o){e&1&&b(0,"mifosx-edit-group-meeting-schedule")}function CDe(e,o){e&1&&b(0,"mifosx-group-transfer-clients")}var $2=(()=>{class e{constructor(){this.route=T(Ie),this.router=T(qe),this.actions={"Assign Staff":!1,Close:!1,Activate:!1,"Attach Meeting":!1,Attendance:!1,"Manage Members":!1,"Edit Meeting":!1,"Edit Meeting Schedule":!1,"Transfer Clients":!1},this.router.routeReuseStrategy.shouldReuseRoute=()=>!1;let t=this.route.snapshot.params.action;t&&t in this.actions&&(this.actions[t]=!0)}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275cmp=me({type:e,selectors:[["mifosx-group-actions"]],decls:9,vars:9,template:function(n,i){n&1&&(E(0,pDe,1,0,"mifosx-group-assign-staff"),E(1,mDe,1,0,"mifosx-close-group"),E(2,dDe,1,0,"mifosx-activate-group"),E(3,uDe,1,0,"mifosx-attach-group-meeting"),E(4,fDe,1,0,"mifosx-group-attendance"),E(5,hDe,1,0,"mifosx-manage-group-members"),E(6,gDe,1,0,"mifosx-edit-group-meeting"),E(7,_De,1,0,"mifosx-edit-group-meeting-schedule"),E(8,CDe,1,0,"mifosx-group-transfer-clients")),n&2&&(I(i.actions["Assign Staff"]?0:-1),a(),I(i.actions.Close?1:-1),a(),I(i.actions.Activate?2:-1),a(),I(i.actions["Attach Meeting"]?3:-1),a(),I(i.actions.Attendance?4:-1),a(),I(i.actions["Manage Members"]?5:-1),a(),I(i.actions["Edit Meeting"]?6:-1),a(),I(i.actions["Edit Meeting Schedule"]?7:-1),a(),I(i.actions["Transfer Clients"]?8:-1))},dependencies:[ue,fe,R2,N2,L2,V2,q2,z2,H2,G2,j2],encapsulation:2})}}return e})();var vDe=()=>["../"];function xDe(e,o){e&1&&(l(0,"mat-error"),c(1),p(2,"translate"),p(3,"translate"),l(4,"strong"),c(5),p(6,"translate"),r()()),e&2&&(a(),le(" ",m(2,3,"labels.inputs.Group Name")," ",m(3,5,"labels.commons.is")," "),a(4),h(m(6,7,"labels.commons.required")))}function bDe(e,o){e&1&&(l(0,"mat-error"),c(1),p(2,"translate"),l(3,"strong"),c(4),p(5,"translate"),r(),c(6),p(7,"translate"),r()),e&2&&(a(),v(" ",m(2,3,"labels.inputs.Group Name")," "),a(3),h(m(5,5,"labels.inputs.cannot")),a(2),v(" ",m(7,7,"labels.commons.begin with a special character or number")," "))}function yDe(e,o){if(e&1&&(l(0,"mat-option",7),c(1),r()),e&2){let t=o.$implicit;g("value",t.id),a(),v(" ",t.displayName," ")}}function SDe(e,o){e&1&&(l(0,"mat-error"),c(1),p(2,"translate"),p(3,"translate"),l(4,"strong"),c(5),p(6,"translate"),r()()),e&2&&(a(),le(" ",m(2,3,"labels.inputs.Submission Date")," ",m(3,5,"labels.commons.is")," "),a(4),h(m(6,7,"labels.commons.required")))}function wDe(e,o){e&1&&(l(0,"mat-error"),c(1),p(2,"translate"),p(3,"translate"),l(4,"strong"),c(5),p(6,"translate"),r()()),e&2&&(a(),le(" ",m(2,3,"labels.inputs.Activation Date")," ",m(3,5,"labels.commons.is")," "),a(4),h(m(6,7,"labels.commons.required")))}function PDe(e,o){if(e&1){let t=Y();l(0,"mat-form-field",8),R("click",function(){V(t);let i=xe(7);return q(i.open())}),l(1,"mat-label"),c(2),p(3,"translate"),r(),b(4,"input",15)(5,"mat-datepicker-toggle",10)(6,"mat-datepicker",null,1),E(8,wDe,7,9,"mat-error"),r()}if(e&2){let t=xe(7),n=w();a(2),h(m(3,6,"labels.inputs.Activation Date")),a(2),g("min",n.editGroupForm.value.submittedOnDate)("max",n.maxDate)("matDatepicker",t),a(),g("for",t),a(3),I(n.editGroupForm.controls.activationDate.hasError("required")?8:-1)}}var U2=(()=>{class e{constructor(){this.formBuilder=T(nt),this.route=T(Ie),this.router=T(qe),this.groupService=T(An),this.dateUtils=T(Zt),this.settingsService=T(At),this.minDate=new Date(2e3,0,1),this.maxDate=new Date,this.route.data.subscribe(t=>{this.staffData=t.groupAndTemplateData.staffOptions,this.groupData=t.groupAndTemplateData,this.submittedOnDate=t.groupViewData.timeline.submittedOnDate&&new Date(t.groupViewData.timeline.submittedOnDate)})}ngOnInit(){this.maxDate=this.settingsService.businessDate,this.createEditGroupForm(),this.editGroupForm.patchValue({name:this.groupData.name,submittedOnDate:this.submittedOnDate,staffId:this.groupData.staffId,externalId:this.groupData.externalId})}createEditGroupForm(){this.editGroupForm=this.formBuilder.group({name:["",[se.required,se.pattern("(^[A-z]).*")]],submittedOnDate:["",se.required],staffId:[""],externalId:[""]}),this.buildDependencies()}buildDependencies(){this.groupData.active?(this.editGroupForm.addControl("activationDate",new it("",se.required)),this.editGroupForm.get("activationDate").patchValue(this.groupData.activationDate&&new Date(this.groupData.activationDate))):this.editGroupForm.removeControl("activationDate")}submit(){let t=this.editGroupForm.value,n=this.settingsService.language.code,i=this.settingsService.dateFormat,s=this.editGroupForm.value.submittedOnDate,d=this.editGroupForm.value.activationDate;t.submittedOnDate instanceof Date&&(t.submittedOnDate=this.dateUtils.formatDate(s,i)),t.activationDate instanceof Date&&(t.activationDate=this.dateUtils.formatDate(d,i));let u=qt(at({},t),{dateFormat:i,locale:n});this.groupService.updateGroup(u,this.groupData.id).subscribe(f=>{this.router.navigate(["../"],{relativeTo:this.route})})}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275cmp=me({type:e,selectors:[["mifosx-edit-group"]],decls:41,vars:30,consts:[["submittedOnDatePicker",""],["activationDatePicker",""],[1,"container"],[3,"formGroup"],[1,"layout-column"],["matInput","","required","","formControlName","name"],["formControlName","staffId"],[3,"value"],[3,"click"],["matInput","","required","","formControlName","submittedOnDate",3,"min","max","matDatepicker"],["matSuffix","",3,"for"],["matInput","","formControlName","externalId"],[1,"layout-row","align-center","gap-5px","responsive-column"],["type","button","mat-raised-button","",3,"routerLink"],["mat-raised-button","","color","primary",3,"click","disabled"],["matInput","","required","","formControlName","activationDate",3,"min","max","matDatepicker"]],template:function(n,i){if(n&1){let s=Y();l(0,"div",2)(1,"mat-card")(2,"form",3)(3,"mat-card-content")(4,"div",4)(5,"mat-form-field")(6,"mat-label"),c(7),p(8,"translate"),r(),b(9,"input",5),E(10,xDe,7,9,"mat-error"),E(11,bDe,8,9,"mat-error"),r(),l(12,"mat-form-field")(13,"mat-label"),c(14),p(15,"translate"),r(),l(16,"mat-select",6),Se(17,yDe,2,2,"mat-option",7,Pe),r()(),l(19,"mat-form-field",8),R("click",function(){V(s);let u=xe(26);return q(u.open())}),l(20,"mat-label"),c(21),p(22,"translate"),r(),b(23,"input",9)(24,"mat-datepicker-toggle",10)(25,"mat-datepicker",null,0),E(27,SDe,7,9,"mat-error"),r(),E(28,PDe,9,8,"mat-form-field"),l(29,"mat-form-field")(30,"mat-label"),c(31),p(32,"translate"),r(),b(33,"input",11),r()()(),l(34,"mat-card-actions",12)(35,"button",13),c(36),p(37,"translate"),r(),l(38,"button",14),R("click",function(){return V(s),q(i.submit())}),c(39),p(40,"translate"),r()()()()()}if(n&2){let s=xe(26);a(2),g("formGroup",i.editGroupForm),a(5),h(m(8,17,"labels.inputs.name")),a(3),I(i.editGroupForm.controls.name.hasError("required")?10:-1),a(),I(i.editGroupForm.controls.name.hasError("pattern")?11:-1),a(3),h(m(15,19,"labels.inputs.Staff")),a(3),we(i.staffData),a(4),h(m(22,21,"labels.inputs.Submitted On")),a(2),g("min",i.minDate)("max",i.maxDate)("matDatepicker",s),a(),g("for",s),a(3),I(i.editGroupForm.controls.submittedOnDate.hasError("required")?27:-1),a(),I(i.editGroupForm.contains("activationDate")?28:-1),a(3),h(m(32,23,"labels.inputs.External id")),a(4),g("routerLink",oe(29,vDe)),a(),v(" ",m(37,25,"labels.buttons.Cancel")," "),a(2),g("disabled",!i.editGroupForm.valid),a(),v(" ",m(40,27,"labels.buttons.Submit")," ")}},dependencies:[ue,fe,tt,st,Ue,Xe,dt,Ze,et,Ae,$e,Je,Et,Fe,Be,ut,ai,ze,gt,ft,mi,di,pi,ve,he],styles:[".container[_ngcontent-%COMP%]{max-width:50rem}"]})}}return e})();var s5=(()=>{class e{constructor(){this.groupsService=T(An)}resolve(t){let n=t.parent.paramMap.get("groupId");return this.groupsService.getGroupSummary(n)}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275prov=Re({token:e,factory:e.\u0275fac})}}return e})();var c5=(()=>{class e{constructor(){this.groupsService=T(An)}resolve(t){let n=t.parent.paramMap.get("groupId");return this.groupsService.getGroupNotes(n)}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275prov=Re({token:e,factory:e.\u0275fac})}}return e})();var p5=(()=>{class e{constructor(){this.groupsService=T(An)}resolve(){return this.groupsService.getGroupDatatables()}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275prov=Re({token:e,factory:e.\u0275fac})}}return e})();var m5=(()=>{class e{constructor(){this.groupsService=T(An)}resolve(t){let n=t.parent.parent.paramMap.get("groupId"),i=t.paramMap.get("datatableName");return this.groupsService.getGroupDatatable(n,i)}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275prov=Re({token:e,factory:e.\u0275fac})}}return e})();var W2=(()=>{class e{constructor(){this.groupsService=T(An)}resolve(t){let n=t.paramMap.get("groupId");return this.groupsService.getGroupData(n,"true")}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275prov=Re({token:e,factory:e.\u0275fac})}}return e})();var d5=(()=>{class e{constructor(){this.groupsService=T(An)}resolve(t){let n=t.paramMap.get("action"),i=t.paramMap.get("groupId")||t.parent.parent.paramMap.get("groupId");switch(n){case"Attendance":case"Manage Members":case"Transfer Clients":return this.groupsService.getGroupData(i);case"Assign Staff":return this.groupsService.getGroupData(i,"true");case"Close":return this.groupsService.getGroupCommandTemplate("close");case"Attach Meeting":return this.groupsService.getGroupCalendarTemplate(i);case"Edit Meeting":case"Edit Meeting Schedule":let s=t.queryParamMap.get("calendarId");return this.groupsService.getGroupCalendarAndTemplate(i,s);default:return}}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275prov=Re({token:e,factory:e.\u0275fac})}}return e})();var u5=(()=>{class e{constructor(){this.groupsService=T(An)}resolve(t){let n=t.parent.paramMap.get("groupId");return this.groupsService.getGLIMAccountsData(n)}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275prov=Re({token:e,factory:e.\u0275fac})}}return e})();var TDe=[_o.withShell([{path:"groups",data:{title:"Groups",breadcrumb:"Groups",routeParamBreadcrumb:!1},children:[{path:"",component:T2},{path:"create",component:F2,data:{title:"Create Group",breadcrumb:"Create",routeParamBreadcrumb:!1},resolve:{offices:Hr}},{path:":groupId",data:{title:"View Group",routeParamBreadcrumb:"groupId"},resolve:{groupViewData:mf},children:[{path:"",component:D2,resolve:{groupViewData:mf,groupDatatables:p5},children:[{path:"",redirectTo:"general",pathMatch:"full"},{path:"general",component:E2,data:{title:"General",breadcrumb:"General",routeParamBreadcrumb:!1},resolve:{groupAccountsData:BT,groupSummary:s5,gsimData:RT,glimData:u5}},{path:"notes",component:I2,data:{title:"Notes",breadcrumb:"Notes",routeParamBreadcrumb:!1},resolve:{groupNotes:c5}},{path:"committee",component:A2,data:{title:"Committee",breadcrumb:"Committee",routeParamBreadcrumb:!1}},{path:"datatables",children:[{path:":datatableName",component:k2,data:{title:"View Data Table",routeParamBreadcrumb:"datatableName"},resolve:{groupDatatable:m5}}]}]},{path:"edit",component:U2,data:{title:"Edit Group",breadcrumb:"Edit",routeParamBreadcrumb:!1},resolve:{groupAndTemplateData:W2,groupViewData:mf}},{path:"committee",children:[{path:"",redirectTo:"../committee",pathMatch:"prefix"},{path:"add-role",data:{title:"Add Role",breadcrumb:"Add Role",routeParamBreadcrumb:!1},component:B2,resolve:{groupAndTemplateData:W2}}]},{path:"actions/:action",data:{title:"Group Actions",breadcrumb:"action",routeParamBreadcrumb:"action"},component:$2,resolve:{groupActionData:d5}},{path:"loans-accounts",loadChildren:()=>import("./loans.module-SNK5EVID.js").then(e=>e.LoansModule)},{path:"savings-accounts",loadChildren:()=>import("./savings.module-2NQ5HRVF.js").then(e=>e.SavingsModule)}]}]}])],iN=(()=>{class e{static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275mod=Gi({type:e})}static{this.\u0275inj=Hi({providers:[mf,BT,s5,c5,p5,m5,W2,d5,RT,u5],imports:[gn.forChild(TDe),gn]})}}return e})();var nN=(()=>{class e{static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275mod=Gi({type:e})}static{this.\u0275inj=Hi({imports:[oo,ha,Ir,iN,T2,D2,E2,I2,A2,F2,k2,B2,O2,$2,R2,M2,N2,L2,U2,V2,q2,z2,H2,G2,j2]})}}return e})();var Jn=(()=>{class e{constructor(){this.http=T(ko)}getCenters(t,n,i,s,d){let u=new rn().set("offset",s.toString()).set("limit",d.toString()).set("sortOrder",i).set("orderBy",n).set("paged","true");return t.forEach(function(f){f.value&&(u=u.set(f.type,f.value))}),this.http.get("/centers",{params:u})}createCenter(t){return this.http.post("/centers",t)}getStaff(t){let n=new rn().set("officeId",t.toString()).set("staffInSelectedOfficeOnly","true");return this.http.get("/centers/template",{params:n})}getCenterData(t){let n=new rn().set("associations","groupMembers,collectionMeetingCalendar");return this.http.get(`/centers/${t}`,{params:n})}getCenterSummary(t){let n=new rn().set("R_groupId",t).set("genericResultSet","false");return this.http.get("/runreports/GroupSummaryCounts",{params:n})}getSavingsAccountDetails(t){return this.http.get(`/centers/${t}/accounts`)}getCenterNotes(t){return this.http.get(`/groups/${t}/notes`)}createCenterNote(t,n){return this.http.post(`/groups/${t}/notes`,n)}editCenterNote(t,n,i){return this.http.put(`/groups/${t}/notes/${n}`,i)}deleteCenterNote(t,n){return this.http.delete(`/groups/${t}/notes/${n}`)}getcenterDatatables(){let t=new rn().set("apptable","m_center");return this.http.get("/datatables",{params:t})}getCenterDatatable(t,n){let i=new rn().set("genericResultSet","true");return this.http.get(`/datatables/${n}/${t}`,{params:i})}addCenterDatatableEntry(t,n,i){let s=new rn().set("genericResultSet","true");return this.http.post(`/datatables/${n}/${t}`,i,{params:s})}editCenterDatatableEntry(t,n,i){let s=new rn().set("genericResultSet","true");return this.http.put(`/datatables/${n}/${t}`,i,{params:s})}deleteDatatableContent(t,n){let i=new rn().set("genericResultSet","true");return this.http.delete(`/datatables/${n}/${t}`,{params:i})}executeCenterActionCommand(t,n,i){let s=new rn().set("command",n);return this.http.post(`/centers/${t}`,i,{params:s})}executeGroupActionCommand(t,n,i){let s=new rn().set("command",n);return this.http.post(`/groups/${t}`,i,{params:s})}getGroupStaffData(t){let n=new rn().set("groupOrCenter","centers").set("staffInSelectedOfficeOnly","true").set("template","true");return this.http.get(`/groups/${t}`,{params:n})}deleteCenter(t){return this.http.delete(`/centers/${t}`)}getCentersData(t,n,i){let s=new rn().set("associations",n);return s=i?s.set("template",i):s,this.http.get(`/centers/${t}`,{params:s})}getMeetingsTemplate(t,n){let i=new rn().set("calenderId",n);return this.http.get(`/centers/${t}/meetings/template`)}assignCenterAttendance(t,n,i){let s=new rn().set("calenderId",n);return this.http.post(`/centers/${t}/meetings`,i,{params:s})}getCalendarTemplate(t){return this.http.get(`/centers/${t}/calendars/template`)}createCenterMeeting(t,n){return this.http.post(`/centers/${t}/calendars`,n)}getCalendarAndTemplate(t,n){let i=new rn().set("template","true");return this.http.get(`/centers/${t}/calendars/${n}`,{params:i})}updateCenterMeeting(t,n,i){return this.http.put(`/centers/${t}/calendars/${i}`,n)}getStaffAssignmentHistoryData(t,n,i,s){let d=new rn().set("tenantIdentifier",i).set("locale",s).set("R_centerId",n);return this.http.get(`/runreports/${t}`,{responseType:"arraybuffer",observe:"response",params:d})}getCenterAndTemplateData(t){let n=new rn().set("staffInSelectedOfficeOnly","true").set("template","true");return this.http.get(`/centers/${t}`,{params:n})}executeEditCenter(t,n){return this.http.put(`/groups/${t}`,n)}getAllMeetingFallCenters(t,n,i,s,d){return this.http.get(`/centers?dateFormat=${s}&locale=${d}&meetingDate=${i}&officeId=${t}&staffId=${n}`)}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275prov=Re({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();var Q2=class{constructor(o){this.centersService=o,this.centersSubject=new Na([]),this.recordsSubject=new Na(0),this.records$=this.recordsSubject.asObservable()}getCenters(o,t="",n="",i=0,s=10,d=!0){this.centersSubject.next([]),this.centersService.getCenters(o,t,n,i*s,s).subscribe(u=>{u.pageItems=d?u.pageItems.filter(f=>f.active):u.pageItems,this.recordsSubject.next(u.totalFilteredRecords),this.centersSubject.next(u.pageItems)})}connect(o){return this.centersSubject.asObservable()}disconnect(o){this.centersSubject.complete(),this.recordsSubject.complete()}};var MDe=["showClosedCenters"],DDe=()=>[10,25,50,100],EDe=()=>["../","organization","bulk-import","Centers"],IDe=()=>["create"],ODe=e=>[e,"general"];function ADe(e,o){e&1&&(l(0,"button",22),b(1,"fa-icon",23),c(2),p(3,"translate"),r()),e&2&&(g("routerLink",oe(4,EDe)),a(2),v("",m(3,2,"labels.buttons.Import Center")," "))}function FDe(e,o){e&1&&(l(0,"button",22),b(1,"fa-icon",24),c(2),p(3,"translate"),r()),e&2&&(g("routerLink",oe(4,IDe)),a(2),v("",m(3,2,"labels.buttons.Create Center")," "))}function kDe(e,o){e&1&&(l(0,"th",25),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.name")))}function BDe(e,o){if(e&1&&(l(0,"td",26),c(1),r()),e&2){let t=o.$implicit;a(),h(t.name)}}function RDe(e,o){e&1&&(l(0,"th",27),c(1),p(2,"translate"),r()),e&2&&(a(),v("",m(2,1,"labels.inputs.Account")," #"))}function NDe(e,o){if(e&1&&(l(0,"td",26),c(1),r()),e&2){let t=o.$implicit;a(),h(t.accountNo)}}function LDe(e,o){e&1&&(l(0,"th",27),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.External Id")))}function VDe(e,o){if(e&1&&(l(0,"td",26),c(1),r()),e&2){let t=o.$implicit;a(),h(t.externalId)}}function qDe(e,o){e&1&&(l(0,"th",27),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.Status")))}function zDe(e,o){if(e&1&&(l(0,"td",26)(1,"div",28),p(2,"statusLookup"),b(3,"fa-icon",29),r()()),e&2){let t=o.$implicit;a(),g("ngClass",m(2,1,t.status.code))}}function HDe(e,o){e&1&&(l(0,"th",25),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.Office Name")))}function GDe(e,o){if(e&1&&(l(0,"td",26),c(1),r()),e&2){let t=o.$implicit;a(),h(t.officeName)}}function jDe(e,o){e&1&&b(0,"tr",30)}function $De(e,o){if(e&1&&b(0,"tr",31),e&2){let t=o.$implicit;g("routerLink",Nt(1,ODe,t.id))}}var Y2=(()=>{class e{constructor(){this.centersService=T(Jn),this.name=new it,this.externalId=new it,this.displayedColumns=["name","accountNo","externalId","status","officeName"],this.filterCentersBy=[{type:"name",value:""},{type:"externalId",value:""}]}ngOnInit(){this.getCenters()}ngAfterViewInit(){this.name.valueChanges.pipe(Oo(500),Ao(),Eo(t=>{this.applyFilter(t,"name")})).subscribe(),this.externalId.valueChanges.pipe(Oo(500),Ao(),Eo(t=>{this.applyFilter(t,"externalId")})).subscribe(),this.sort.sortChange.subscribe(()=>this.paginator.pageIndex=0),fl(this.sort.sortChange,this.paginator.page).pipe(Eo(()=>this.loadCentersPage())).subscribe()}changeShowClosedCenters(){this.loadCentersPage()}loadCentersPage(){this.sort.direction||delete this.sort.active,this.dataSource.getCenters(this.filterCentersBy,this.sort.active,this.sort.direction,this.paginator.pageIndex,this.paginator.pageSize,!this.showClosedCenters.checked)}applyFilter(t,n){this.paginator.pageIndex=0;let i=this.filterCentersBy.findIndex(s=>s.type===n);this.filterCentersBy[i].value=t,this.loadCentersPage()}getCenters(){this.dataSource=new Q2(this.centersService),this.dataSource.getCenters(this.filterCentersBy,this.sort.active,this.sort.direction,this.paginator.pageIndex,this.paginator.pageSize)}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275cmp=me({type:e,selectors:[["mifosx-app-centers"]],viewQuery:function(n,i){if(n&1&&(Ee(MDe,7),Ee(kt,7),Ee(It,7)),n&2){let s;Te(s=Me())&&(i.showClosedCenters=s.first),Te(s=Me())&&(i.paginator=s.first),Te(s=Me())&&(i.sort=s.first)}},decls:34,vars:16,consts:[["showClosedCenters",""],[1,"container"],[1,"layout-column","layout-gt-sm-row","align-gt-sm-start-center"],[1,"search-box","m-r-30"],[1,"search-box"],["matInput","","placeholder","Search by Name",3,"formControl"],["matInput","","placeholder","Search by ExternalID",3,"formControl"],["labelPosition","after",1,"m-r-10",3,"change"],[1,"action-button","gap-25px"],["mat-raised-button","","color","primary",3,"routerLink",4,"mifosxHasPermission"],["mat-table","","matSort","",1,"bordered-table",3,"dataSource"],["matColumnDef","name"],["mat-header-cell","","mat-sort-header","",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","accountNo"],["mat-header-cell","",4,"matHeaderCellDef"],["matColumnDef","externalId"],["matColumnDef","status"],["matColumnDef","officeName"],["mat-header-row","",4,"matHeaderRowDef"],["mat-row","","class","select-row",3,"routerLink",4,"matRowDef","matRowDefColumns"],["showFirstLastButtons","",3,"length","pageSize","pageSizeOptions"],["mat-raised-button","","color","primary",3,"routerLink"],["icon","download",1,"m-r-10"],["icon","plus",1,"m-r-10"],["mat-header-cell","","mat-sort-header",""],["mat-cell",""],["mat-header-cell",""],[3,"ngClass"],["icon","stop"],["mat-header-row",""],["mat-row","",1,"select-row",3,"routerLink"]],template:function(n,i){if(n&1){let s=Y();l(0,"mat-card",1)(1,"div",2)(2,"div",3)(3,"mat-form-field",4),b(4,"input",5),r(),l(5,"mat-form-field",4),b(6,"input",6),r(),l(7,"mat-checkbox",7,0),R("change",function(){return V(s),q(i.changeShowClosedCenters())}),c(9),p(10,"translate"),r()(),l(11,"div",8),F(12,ADe,4,5,"button",9)(13,FDe,4,5,"button",9),r()(),l(14,"table",10),X(15,11),F(16,kDe,3,3,"th",12)(17,BDe,2,1,"td",13),Z(),X(18,14),F(19,RDe,3,3,"th",15)(20,NDe,2,1,"td",13),Z(),X(21,16),F(22,LDe,3,3,"th",15)(23,VDe,2,1,"td",13),Z(),X(24,17),F(25,qDe,3,3,"th",15)(26,zDe,4,3,"td",13),Z(),X(27,18),F(28,HDe,3,3,"th",12)(29,GDe,2,1,"td",13),Z(),F(30,jDe,1,0,"tr",19)(31,$De,1,3,"tr",20),r(),b(32,"mat-paginator",21),p(33,"async"),r()}n&2&&(a(4),g("formControl",i.name),a(2),g("formControl",i.externalId),a(3),v(" ",m(10,11,"labels.inputs.Show Closed Centers")," "),a(3),g("mifosxHasPermission","CREATE_CENTER"),a(),g("mifosxHasPermission","CREATE_CENTER"),a(),g("dataSource",i.dataSource),a(16),g("matHeaderRowDef",i.displayedColumns),a(),g("matRowDefColumns",i.displayedColumns),a(),g("length",m(33,13,i.dataSource==null?null:i.dataSource.records$))("pageSize",10)("pageSizeOptions",oe(15,DDe)))},dependencies:[ue,co,fe,st,Ue,_n,Ae,$e,Fe,ze,ve,fi,Ke,ke,_t,It,xt,vt,bt,ri,Ct,yt,St,Pt,wt,Tt,kt,Xa,he,go],styles:[".container[_ngcontent-%COMP%]{padding:24px}.container[_ngcontent-%COMP%] .layout-column[_ngcontent-%COMP%], .container[_ngcontent-%COMP%] .layout-gt-sm-row[_ngcontent-%COMP%]{display:flex;align-items:center;margin-bottom:20px;flex-wrap:nowrap;gap:20px}.container[_ngcontent-%COMP%] .layout-column.align-gt-sm-start-center[_ngcontent-%COMP%], .container[_ngcontent-%COMP%] .layout-gt-sm-row.align-gt-sm-start-center[_ngcontent-%COMP%]{align-items:center;justify-content:flex-start}.container[_ngcontent-%COMP%] .layout-column[_ngcontent-%COMP%] .search-box[_ngcontent-%COMP%], .container[_ngcontent-%COMP%] .layout-gt-sm-row[_ngcontent-%COMP%] .search-box[_ngcontent-%COMP%]{display:flex;align-items:center;gap:15px;flex:1;min-width:0}.container[_ngcontent-%COMP%] .layout-column[_ngcontent-%COMP%] .search-box.m-r-30[_ngcontent-%COMP%], .container[_ngcontent-%COMP%] .layout-gt-sm-row[_ngcontent-%COMP%] .search-box.m-r-30[_ngcontent-%COMP%]{margin-right:30px}.container[_ngcontent-%COMP%] .layout-column[_ngcontent-%COMP%] .search-box[_ngcontent-%COMP%] mat-form-field[_ngcontent-%COMP%], .container[_ngcontent-%COMP%] .layout-gt-sm-row[_ngcontent-%COMP%] .search-box[_ngcontent-%COMP%] mat-form-field[_ngcontent-%COMP%]{min-width:200px;flex:1}.container[_ngcontent-%COMP%] .layout-column[_ngcontent-%COMP%] .search-box[_ngcontent-%COMP%] mat-form-field.search-box[_ngcontent-%COMP%], .container[_ngcontent-%COMP%] .layout-gt-sm-row[_ngcontent-%COMP%] .search-box[_ngcontent-%COMP%] mat-form-field.search-box[_ngcontent-%COMP%]{width:auto}.container[_ngcontent-%COMP%] .layout-column[_ngcontent-%COMP%] .search-box[_ngcontent-%COMP%] mat-form-field[_ngcontent-%COMP%] + mat-form-field[_ngcontent-%COMP%], .container[_ngcontent-%COMP%] .layout-gt-sm-row[_ngcontent-%COMP%] .search-box[_ngcontent-%COMP%] mat-form-field[_ngcontent-%COMP%] + mat-form-field[_ngcontent-%COMP%]{margin-left:15px}.container[_ngcontent-%COMP%] .layout-column[_ngcontent-%COMP%] .search-box[_ngcontent-%COMP%] mat-checkbox[_ngcontent-%COMP%], .container[_ngcontent-%COMP%] .layout-gt-sm-row[_ngcontent-%COMP%] .search-box[_ngcontent-%COMP%] mat-checkbox[_ngcontent-%COMP%]{white-space:nowrap;flex-shrink:0;margin-left:15px}.container[_ngcontent-%COMP%] .layout-column[_ngcontent-%COMP%] .search-box[_ngcontent-%COMP%] mat-checkbox.m-r-10[_ngcontent-%COMP%], .container[_ngcontent-%COMP%] .layout-gt-sm-row[_ngcontent-%COMP%] .search-box[_ngcontent-%COMP%] mat-checkbox.m-r-10[_ngcontent-%COMP%]{margin-right:10px}.container[_ngcontent-%COMP%] .layout-column[_ngcontent-%COMP%] .action-button[_ngcontent-%COMP%], .container[_ngcontent-%COMP%] .layout-gt-sm-row[_ngcontent-%COMP%] .action-button[_ngcontent-%COMP%]{display:flex;align-items:center;flex-shrink:0;margin-left:auto}.container[_ngcontent-%COMP%] .layout-column[_ngcontent-%COMP%] .action-button.gap-25px[_ngcontent-%COMP%], .container[_ngcontent-%COMP%] .layout-gt-sm-row[_ngcontent-%COMP%] .action-button.gap-25px[_ngcontent-%COMP%]{gap:25px}.container[_ngcontent-%COMP%] .layout-column[_ngcontent-%COMP%] .action-button[_ngcontent-%COMP%] button[_ngcontent-%COMP%], .container[_ngcontent-%COMP%] .layout-gt-sm-row[_ngcontent-%COMP%] .action-button[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{white-space:nowrap}.container[_ngcontent-%COMP%] .layout-column[_ngcontent-%COMP%] .action-button[_ngcontent-%COMP%] button[_ngcontent-%COMP%] fa-icon.m-r-10[_ngcontent-%COMP%], .container[_ngcontent-%COMP%] .layout-column[_ngcontent-%COMP%] .action-button[_ngcontent-%COMP%] button[_ngcontent-%COMP%] fa-icon.m-r-20[_ngcontent-%COMP%], .container[_ngcontent-%COMP%] .layout-gt-sm-row[_ngcontent-%COMP%] .action-button[_ngcontent-%COMP%] button[_ngcontent-%COMP%] fa-icon.m-r-10[_ngcontent-%COMP%], .container[_ngcontent-%COMP%] .layout-gt-sm-row[_ngcontent-%COMP%] .action-button[_ngcontent-%COMP%] button[_ngcontent-%COMP%] fa-icon.m-r-20[_ngcontent-%COMP%]{margin-right:10px}.container[_ngcontent-%COMP%] .bordered-table[_ngcontent-%COMP%]{width:100%;border:1px solid #e0e0e0;border-radius:4px;overflow:hidden;margin-top:16px}.container[_ngcontent-%COMP%] .bordered-table[_ngcontent-%COMP%] .select-row[_ngcontent-%COMP%]{cursor:pointer}.container[_ngcontent-%COMP%] .bordered-table[_ngcontent-%COMP%] .select-row[_ngcontent-%COMP%]:hover{background-color:#f5f5f5}.container[_ngcontent-%COMP%] .bordered-table[_ngcontent-%COMP%] th[_ngcontent-%COMP%], .container[_ngcontent-%COMP%] .bordered-table[_ngcontent-%COMP%] td[_ngcontent-%COMP%]{padding:12px 16px}.container[_ngcontent-%COMP%] .bordered-table[_ngcontent-%COMP%] th[_ngcontent-%COMP%]{font-weight:500;border-bottom:1px solid #e0e0e0}.container[_ngcontent-%COMP%] .bordered-table[_ngcontent-%COMP%] tr[_ngcontent-%COMP%]{border-bottom:1px solid #f0f0f0}.container[_ngcontent-%COMP%] .bordered-table[_ngcontent-%COMP%] tr[_ngcontent-%COMP%]:last-child{border-bottom:none}.container[_ngcontent-%COMP%] mat-paginator[_ngcontent-%COMP%]{border-top:1px solid #e0e0e0;margin-top:0}.container[_ngcontent-%COMP%] mat-progress-bar[_ngcontent-%COMP%]{margin:0}@media (width <= 768px){.container[_ngcontent-%COMP%]{padding:16px}.container[_ngcontent-%COMP%] .layout-column[_ngcontent-%COMP%], .container[_ngcontent-%COMP%] .layout-gt-sm-row[_ngcontent-%COMP%]{flex-wrap:wrap}.container[_ngcontent-%COMP%] .layout-column[_ngcontent-%COMP%] .search-box[_ngcontent-%COMP%], .container[_ngcontent-%COMP%] .layout-gt-sm-row[_ngcontent-%COMP%] .search-box[_ngcontent-%COMP%]{width:100%;margin-right:0!important;margin-bottom:15px;flex-wrap:wrap}.container[_ngcontent-%COMP%] .layout-column[_ngcontent-%COMP%] .search-box[_ngcontent-%COMP%] mat-form-field[_ngcontent-%COMP%], .container[_ngcontent-%COMP%] .layout-gt-sm-row[_ngcontent-%COMP%] .search-box[_ngcontent-%COMP%] mat-form-field[_ngcontent-%COMP%]{min-width:150px;margin-bottom:10px}.container[_ngcontent-%COMP%] .layout-column[_ngcontent-%COMP%] .search-box[_ngcontent-%COMP%] mat-form-field[_ngcontent-%COMP%] + mat-form-field[_ngcontent-%COMP%], .container[_ngcontent-%COMP%] .layout-gt-sm-row[_ngcontent-%COMP%] .search-box[_ngcontent-%COMP%] mat-form-field[_ngcontent-%COMP%] + mat-form-field[_ngcontent-%COMP%]{margin-left:0}.container[_ngcontent-%COMP%] .layout-column[_ngcontent-%COMP%] .search-box[_ngcontent-%COMP%] mat-checkbox[_ngcontent-%COMP%], .container[_ngcontent-%COMP%] .layout-gt-sm-row[_ngcontent-%COMP%] .search-box[_ngcontent-%COMP%] mat-checkbox[_ngcontent-%COMP%]{margin-left:0;margin-top:10px}.container[_ngcontent-%COMP%] .layout-column[_ngcontent-%COMP%] .action-button[_ngcontent-%COMP%], .container[_ngcontent-%COMP%] .layout-gt-sm-row[_ngcontent-%COMP%] .action-button[_ngcontent-%COMP%]{margin-left:0;width:100%;justify-content:center}.container[_ngcontent-%COMP%] .layout-column[_ngcontent-%COMP%] .action-button.gap-25px[_ngcontent-%COMP%], .container[_ngcontent-%COMP%] .layout-gt-sm-row[_ngcontent-%COMP%] .action-button.gap-25px[_ngcontent-%COMP%]{gap:15px}}table[_ngcontent-%COMP%]{width:100%}table[_ngcontent-%COMP%] tr.select-row[_ngcontent-%COMP%]:hover{cursor:pointer}.m-r-10[_ngcontent-%COMP%]{margin-right:10px!important}.m-r-20[_ngcontent-%COMP%]{margin-right:20px!important}.m-r-30[_ngcontent-%COMP%]{margin-right:30px!important}"]})}}return e})();var UDe=()=>["../"];function WDe(e,o){e&1&&(l(0,"mat-error"),c(1),p(2,"translate"),p(3,"translate"),l(4,"strong"),c(5),p(6,"translate"),r()()),e&2&&(a(),le(" ",m(2,3,"labels.inputs.Center Name")," ",m(3,5,"labels.commons.is")," "),a(4),h(m(6,7,"labels.commons.required")))}function QDe(e,o){e&1&&(l(0,"mat-error"),c(1),p(2,"translate"),l(3,"strong"),c(4),p(5,"translate"),r(),c(6),p(7,"translate"),r()),e&2&&(a(),v(" ",m(2,3,"labels.inputs.Center Name")," "),a(3),h(m(5,5,"labels.inputs.cannot")),a(2),v(" ",m(7,7,"labels.inputs.begin with a special character or number")," "))}function YDe(e,o){if(e&1&&(l(0,"mat-option",7),c(1),r()),e&2){let t=o.$implicit;g("value",t.id),a(),v(" ",t.name," ")}}function JDe(e,o){e&1&&(l(0,"mat-error"),c(1),p(2,"translate"),p(3,"translate"),l(4,"strong"),c(5),p(6,"translate"),r()()),e&2&&(a(),le(" ",m(2,3,"labels.inputs.Office")," ",m(3,5,"labels.commons.is")," "),a(4),h(m(6,7,"labels.commons.required")))}function KDe(e,o){if(e&1&&(l(0,"mat-option",7),c(1),r()),e&2){let t=o.$implicit;g("value",t.id),a(),v(" ",t.displayName," ")}}function XDe(e,o){e&1&&(l(0,"mat-error"),c(1),p(2,"translate"),p(3,"translate"),l(4,"strong"),c(5),p(6,"translate"),r()()),e&2&&(a(),le(" ",m(2,3,"labels.inputs.Activation Date")," ",m(3,5,"labels.commons.is")," "),a(4),h(m(6,7,"labels.commons.required")))}function ZDe(e,o){if(e&1){let t=Y();l(0,"mat-form-field",11),R("click",function(){V(t);let i=xe(7);return q(i.open())}),l(1,"mat-label"),c(2),p(3,"translate"),r(),b(4,"input",20)(5,"mat-datepicker-toggle",13)(6,"mat-datepicker",null,1),E(8,XDe,7,9,"mat-error"),r()}if(e&2){let t=xe(7),n=w();a(2),h(m(3,6,"labels.inputs.Activation Date")),a(2),g("min",n.minDate)("max",n.maxDate)("matDatepicker",t),a(),g("for",t),a(3),I(n.centerForm.controls.activationDate.hasError("required")?8:-1)}}function eEe(e,o){e&1&&(l(0,"mat-error"),c(1),p(2,"translate"),p(3,"translate"),l(4,"strong"),c(5),p(6,"translate"),r()()),e&2&&(a(),le(" ",m(2,3,"labels.inputs.Submission Date")," ",m(3,5,"labels.commons.is")," "),a(4),h(m(6,7,"labels.commons.required")))}function tEe(e,o){if(e&1&&(l(0,"mat-option",7),c(1),r()),e&2){let t=o.$implicit;g("value",t),a(),v(" ",t.name," ")}}function iEe(e,o){if(e&1){let t=Y();l(0,"div",16)(1,"div",21)(2,"div",22),c(3),p(4,"translate"),r(),l(5,"button",23),R("click",function(){V(t);let i=w();return q(i.addGroup())}),b(6,"fa-icon",24),r()(),l(7,"div",25)(8,"div",26),c(9),p(10,"translate"),r(),l(11,"div",26),c(12),r()(),l(13,"div",25)(14,"div",26),c(15),p(16,"translate"),r(),l(17,"div",26),c(18),r()(),l(19,"div",25)(20,"div",26),c(21),p(22,"translate"),r(),l(23,"div",26),c(24),r()()()}if(e&2){let t=w();a(3),h(m(4,7,"labels.inputs.Group Details")),a(6),h(m(10,9,"labels.inputs.name")),a(3),h(t.groupChoice.value.name),a(3),h(m(16,11,"labels.inputs.Id")),a(3),h(t.groupChoice.value.id),a(3),h(m(22,13,"labels.inputs.Office")),a(3),h(t.groupChoice.value.officeName)}}function nEe(e,o){if(e&1){let t=Y();l(0,"div",28)(1,"button",23),R("click",function(){let i=V(t).$index,s=w(2);return q(s.removeGroup(i))}),b(2,"fa-icon",29),r(),l(3,"span",30),c(4),r()()}if(e&2){let t=o.$implicit;a(4),h(t.name)}}function oEe(e,o){if(e&1&&(l(0,"mat-nav-list")(1,"h3",27),c(2),p(3,"translate"),r(),Se(4,nEe,5,1,"div",28,Pe),r()),e&2){let t=w();a(2),h(m(3,1,"labels.heading.Selected Groups")),a(2),we(t.groupMembers)}}function aEe(e,o){if(e&1){let t=Y();l(0,"button",31),R("click",function(){V(t);let i=w();return q(i.submit())}),c(1),p(2,"translate"),r()}if(e&2){let t=w();g("disabled",!t.centerForm.valid),a(),v(" ",m(2,2,"labels.buttons.Submit")," ")}}var J2=(()=>{class e{constructor(){this.formBuilder=T(nt),this.route=T(Ie),this.router=T(qe),this.centerService=T(Jn),this.settingsService=T(At),this.groupService=T(An),this.dateUtils=T(Zt),this.minDate=new Date(2e3,0,1),this.maxDate=new Date,this.groupMembers=[],this.groupChoice=new it(""),this.route.data.subscribe(t=>{this.officeData=t.offices})}ngOnInit(){this.maxDate=this.settingsService.businessDate,this.createCenterForm()}createCenterForm(){this.centerForm=this.formBuilder.group({name:["",[se.required,se.pattern("(^[A-z]).*")]],officeId:["",se.required],submittedOnDate:["",se.required],staffId:[""],externalId:[""],active:[""]}),this.buildDependencies()}buildDependencies(){this.centerForm.get("officeId").valueChanges.subscribe(t=>{this.groupService.getGroupsByOfficeId(t).subscribe(n=>{this.groupsData=n,this.groupsData.length?this.groupChoice.enable():this.groupChoice.disable()}),this.centerService.getStaff(t).subscribe(n=>{this.staffData=n.staffOptions,this.staffData===void 0?this.centerForm.controls.staffId.disable():this.centerForm.controls.staffId.enable()})}),this.centerForm.get("active").valueChanges.subscribe(t=>{t?this.centerForm.addControl("activationDate",new it("",se.required)):this.centerForm.removeControl("activationDate")})}addGroup(){this.groupMembers.includes(this.groupChoice.value)||this.groupMembers.push(this.groupChoice.value)}removeGroup(t){this.groupMembers.splice(t,1)}submit(){let t=this.centerForm.value,n=this.centerForm.value.submittedOnDate,i=this.centerForm.value.activationDate,s=this.settingsService.language.code,d=this.settingsService.dateFormat;t.submittedOnDate instanceof Date&&(t.submittedOnDate=this.dateUtils.formatDate(n,d)),t.activationDate instanceof Date&&(t.activationDate=this.dateUtils.formatDate(i,d));let u=qt(at({},t),{dateFormat:d,locale:s});u.groupMembers=[],this.groupMembers.forEach(f=>u.groupMembers.push(f.id)),this.centerService.createCenter(u).subscribe(f=>{this.router.navigate(["../centers"])})}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275cmp=me({type:e,selectors:[["mifosx-create-center"]],decls:60,vars:40,consts:[["submittedOnDatePicker",""],["activationDatePicker",""],[1,"container"],[3,"formGroup"],[1,"layout-column"],["matInput","","required","","formControlName","name"],["required","","formControlName","officeId"],[3,"value"],["formControlName","staffId"],["labelPosition","before","formControlName","active"],["matInput","","formControlName","externalId"],[3,"click"],["matInput","","required","","formControlName","submittedOnDate",3,"min","max","matDatepicker"],["matSuffix","",3,"for"],[3,"formControl"],[1,"layout-row"],[1,"mat-table"],[1,"layout-row","align-center","gap-5px","responsive-column"],["type","button","mat-raised-button","",3,"routerLink"],["mat-raised-button","","color","primary",3,"disabled","click",4,"mifosxHasPermission"],["matInput","","required","","formControlName","activationDate",3,"min","max","matDatepicker"],[1,"mat-header-row"],[1,"mat-header-cell"],["mat-icon-button","",3,"click"],["icon","plus"],[1,"mat-row"],[1,"mat-cell"],["matSubheader",""],["mat-list-item",""],["icon","trash"],["matLine",""],["mat-raised-button","","color","primary",3,"click","disabled"]],template:function(n,i){if(n&1){let s=Y();l(0,"div",2)(1,"mat-card")(2,"form",3)(3,"mat-card-content")(4,"div",4)(5,"mat-form-field")(6,"mat-label"),c(7),p(8,"translate"),r(),b(9,"input",5),E(10,WDe,7,9,"mat-error"),E(11,QDe,8,9,"mat-error"),r(),l(12,"mat-form-field")(13,"mat-label"),c(14),p(15,"translate"),r(),l(16,"mat-select",6),Se(17,YDe,2,2,"mat-option",7,Pe),r(),E(19,JDe,7,9,"mat-error"),r(),l(20,"mat-form-field")(21,"mat-label"),c(22),p(23,"translate"),r(),l(24,"mat-select",8),Se(25,KDe,2,2,"mat-option",7,Pe),r()(),l(27,"mat-checkbox",9),c(28),p(29,"translate"),r(),E(30,ZDe,9,8,"mat-form-field"),l(31,"mat-form-field")(32,"mat-label"),c(33),p(34,"translate"),r(),b(35,"input",10),r(),l(36,"mat-form-field",11),R("click",function(){V(s);let u=xe(43);return q(u.open())}),l(37,"mat-label"),c(38),p(39,"translate"),r(),b(40,"input",12)(41,"mat-datepicker-toggle",13)(42,"mat-datepicker",null,0),E(44,eEe,7,9,"mat-error"),r(),l(45,"mat-form-field")(46,"mat-label"),c(47),p(48,"translate"),r(),l(49,"mat-select",14),Se(50,tEe,2,2,"mat-option",7,Pe),r()()(),l(52,"div",15),E(53,iEe,25,15,"div",16),E(54,oEe,6,3,"mat-nav-list"),r()(),l(55,"mat-card-actions",17)(56,"button",18),c(57),p(58,"translate"),r(),F(59,aEe,3,4,"button",19),r()()()()}if(n&2){let s=xe(43);a(2),g("formGroup",i.centerForm),a(5),h(m(8,23,"labels.inputs.name")),a(3),I(i.centerForm.controls.name.hasError("required")?10:-1),a(),I(i.centerForm.controls.name.hasError("pattern")?11:-1),a(3),h(m(15,25,"labels.inputs.Office")),a(3),we(i.officeData),a(2),I(i.centerForm.controls.officeId.hasError("required")?19:-1),a(3),h(m(23,27,"labels.inputs.Staff")),a(3),we(i.staffData),a(3),v(" ",m(29,29,"labels.inputs.Active")," "),a(2),I(i.centerForm.controls.active.value?30:-1),a(3),h(m(34,31,"labels.inputs.External Id")),a(5),h(m(39,33,"labels.inputs.Submitted On")),a(2),g("min",i.minDate)("max",i.maxDate)("matDatepicker",s),a(),g("for",s),a(3),I(i.centerForm.controls.submittedOnDate.hasError("required")?44:-1),a(3),h(m(48,35,"labels.inputs.Select and Add groups")),a(2),g("formControl",i.groupChoice),a(),we(i.groupsData),a(3),I(i.groupChoice.value?53:-1),a(),I(i.groupMembers.length?54:-1),a(2),g("routerLink",oe(39,UDe)),a(),v(" ",m(58,37,"labels.buttons.Cancel")," "),a(2),g("mifosxHasPermission","CREATE_CENTER")}},dependencies:[ue,fe,tt,st,Ue,Xe,dt,_n,Ze,et,Ae,$e,Je,Et,Fe,Be,ut,ai,ze,gt,ft,mi,di,pi,ve,fi,Ke,wi,ke,pa,Ep,ca,he],styles:[".container[_ngcontent-%COMP%]{max-width:37rem}.mat-table[_ngcontent-%COMP%]{display:block;font-family:Tahoma,Verdana,sans-serif;width:50%}.mat-row[_ngcontent-%COMP%], .mat-header-row[_ngcontent-%COMP%]{display:flex;border-bottom-width:1px;border-bottom-style:solid;align-items:center;min-height:48px;padding:0 24px}.mat-cell[_ngcontent-%COMP%], .mat-header-cell[_ngcontent-%COMP%]{flex:1;overflow:hidden;word-wrap:break-word}"]})}}return e})();var rEe=()=>["./general"],lEe=()=>["savings-accounts","create"],sEe=()=>["./notes"],cEe=e=>["./datatables",e];function pEe(e,o){if(e&1&&(l(0,"div")(1,"button",23)(2,"mat-icon",24),b(3,"fa-icon",25),r()()()),e&2){w();let t=xe(36);a(),g("matMenuTriggerFor",t)}}function mEe(e,o){if(e&1&&(l(0,"span"),c(1),p(2,"translate"),b(3,"mifosx-external-identifier",26)(4,"br"),r()),e&2){let t=w();a(),v(" ",m(2,3,"labels.inputs.External Id"),": "),a(2),g("externalId",Le(t.centerViewData.externalId))}}function dEe(e,o){if(e&1&&(l(0,"span"),c(1),p(2,"translate"),b(3,"br"),r()),e&2){let t=w();a(),le(" ",m(2,2,"labels.inputs.Staff"),": ",t.centerViewData.staffName," ")}}function uEe(e,o){if(e&1){let t=Y();l(0,"i",28),R("click",function(){V(t);let i=w(3);return q(i.doAction("Edit Meeting"))}),r()}}function fEe(e,o){e&1&&(l(0,"span"),F(1,uEe,1,0,"i",27),b(2,"br"),r()),e&2&&(a(),g("mifosxHasPermission","UPDATE_MEETING"))}function hEe(e,o){if(e&1&&(l(0,"div")(1,"p"),c(2),p(3,"translate"),p(4,"dateFormat"),E(5,fEe,3,1,"span"),c(6),p(7,"translate"),p(8,"lowercase"),r()()),e&2){let t=w();a(2),le(" ",m(3,5,"labels.inputs.Next Meeting on"),": ",m(4,7,t.centerViewData.collectionMeetingCalendar==null?null:t.centerViewData.collectionMeetingCalendar.nextTenRecurringDates[0])," "),a(3),I(t.editMeeting?5:-1),a(),le(" ",m(7,9,"labels.inputs.Meeting Frequency"),": ",m(8,11,t.centerViewData.collectionMeetingCalendar==null?null:t.centerViewData.collectionMeetingCalendar.frequency.value)," ")}}function gEe(e,o){e&1&&(l(0,"div")(1,"p"),c(2),p(3,"translate"),p(4,"translate"),b(5,"i",29)(6,"br"),c(7),p(8,"translate"),p(9,"translate"),r()()),e&2&&(a(2),le(" ",m(3,4,"labels.inputs.Next Meeting on"),": ",m(4,6,"labels.text.Unassigned")," "),a(5),le(" ",m(8,8,"labels.inputs.Meeting Frequency"),": ",m(9,10,"labels.text.N/A")," "))}function _Ee(e,o){if(e&1){let t=Y();l(0,"button",30),R("click",function(){V(t);let i=w(2);return q(i.doAction("Activate"))}),l(1,"mat-icon",31),b(2,"fa-icon",32),r(),l(3,"span"),c(4),p(5,"translate"),r()()}e&2&&(a(4),h(m(5,1,"labels.buttons.Activate")))}function CEe(e,o){e&1&&(l(0,"span"),F(1,_Ee,6,3,"button",17),r()),e&2&&(a(),g("mifosxHasPermission","ACTIVATE_CENTER"))}function vEe(e,o){if(e&1){let t=Y();l(0,"button",30),R("click",function(){V(t);let i=w();return q(i.doAction("Edit"))}),l(1,"mat-icon",31),b(2,"fa-icon",33),r(),l(3,"span"),c(4),p(5,"translate"),r()()}e&2&&(a(4),h(m(5,1,"labels.buttons.Edit")))}function xEe(e,o){e&1&&(l(0,"button",34)(1,"mat-icon",31),b(2,"fa-icon",35),r(),l(3,"span"),c(4),p(5,"translate"),r()()),e&2&&(g("disabled",!0),a(4),h(m(5,2,"labels.buttons.Add Group")))}function bEe(e,o){if(e&1){let t=Y();l(0,"button",30),R("click",function(){V(t);let i=w();return q(i.doAction("Manage Groups"))}),l(1,"mat-icon",31),b(2,"fa-icon",33),r(),l(3,"span"),c(4),p(5,"translate"),r()()}e&2&&(a(4),h(m(5,1,"labels.buttons.Manage Groups")))}function yEe(e,o){e&1&&(l(0,"button",37)(1,"mat-icon",31),b(2,"fa-icon",38),r(),l(3,"span"),c(4),p(5,"translate"),r()()),e&2&&(g("disabled",!0)("routerLink",oe(5,lEe)),a(4),h(m(5,3,"labels.buttons.Centers Saving Application")))}function SEe(e,o){e&1&&(l(0,"span"),F(1,yEe,6,6,"button",36),r()),e&2&&(a(),g("mifosxHasPermission","CREATE_SAVINGSACCOUNT"))}function wEe(e,o){if(e&1){let t=Y();l(0,"button",30),R("click",function(){V(t);let i=w(2);return q(i.doAction("Attendance"))}),c(1),p(2,"translate"),r()}e&2&&(a(),v(" ",m(2,1,"labels.buttons.Attendance")," "))}function PEe(e,o){e&1&&(l(0,"span"),F(1,wEe,3,3,"button",17),r()),e&2&&(a(),g("mifosxHasPermission","SAVEORUPDATEATTENDANCE_MEETING"))}function TEe(e,o){if(e&1){let t=Y();l(0,"button",30),R("click",function(){V(t);let i=w(2);return q(i.doAction("Assign Staff"))}),c(1),p(2,"translate"),r()}e&2&&(a(),v(" ",m(2,1,"labels.buttons.Assign Staff")," "))}function MEe(e,o){e&1&&(l(0,"span"),F(1,TEe,3,3,"button",17),r()),e&2&&(a(),g("mifosxHasPermission","ASSIGNSTAFF_GROUP"))}function DEe(e,o){if(e&1){let t=Y();l(0,"button",30),R("click",function(){V(t);let i=w(2);return q(i.doAction("Unassign Staff"))}),c(1),p(2,"translate"),r()}e&2&&(a(),v(" ",m(2,1,"labels.buttons.Unassign Staff")," "))}function EEe(e,o){e&1&&(l(0,"span"),F(1,DEe,3,3,"button",17),r()),e&2&&(a(),g("mifosxHasPermission","UNASSIGNSTAFF_GROUP"))}function IEe(e,o){if(e&1){let t=Y();l(0,"button",30),R("click",function(){V(t);let i=w(2);return q(i.doAction("Delete"))}),c(1),p(2,"translate"),r()}e&2&&(a(),v(" ",m(2,1,"labels.buttons.Delete")," "))}function OEe(e,o){e&1&&(l(0,"span"),F(1,IEe,3,3,"button",17),r()),e&2&&(a(),g("mifosxHasPermission","DELETE_CENTER"))}function AEe(e,o){if(e&1){let t=Y();l(0,"button",30),R("click",function(){V(t);let i=w();return q(i.doAction("Close"))}),c(1),p(2,"translate"),r()}e&2&&(a(),v(" ",m(2,1,"labels.buttons.Close")," "))}function FEe(e,o){if(e&1){let t=Y();l(0,"button",30),R("click",function(){V(t);let i=w(2);return q(i.doAction("Attach Meeting"))}),c(1),p(2,"translate"),r()}e&2&&(a(),v(" ",m(2,1,"labels.buttons.Attach Meeting")," "))}function kEe(e,o){e&1&&(l(0,"span"),F(1,FEe,3,3,"button",17),r()),e&2&&(a(),g("mifosxHasPermission","CREATE_MEETING"))}function BEe(e,o){if(e&1){let t=Y();l(0,"button",30),R("click",function(){V(t);let i=w();return q(i.doAction("Staff Assignment History"))}),c(1),p(2,"translate"),r()}e&2&&(a(),v(" ",m(2,1,"labels.buttons.Staff Assignment History")," "))}function REe(e,o){if(e&1&&(l(0,"a",21,4),c(2),p(3,"translate"),r()),e&2){let t=xe(1);g("routerLink",oe(5,sEe))("active",t.isActive),a(2),v(" ",m(3,3,"labels.inputs.Notes")," ")}}function NEe(e,o){if(e&1&&(l(0,"a",21,5),c(2),r()),e&2){let t=xe(1),n=w().$implicit;g("routerLink",Nt(3,cEe,n.registeredTableName))("active",t.isActive),a(2),v(" ",n.registeredTableName," ")}}function LEe(e,o){if(e&1&&(l(0,"span"),F(1,NEe,3,5,"a",22),r()),e&2){let t=o.$implicit;a(),g("mifosxHasPermission","READ_"+t.registeredTableName)}}var K2=(()=>{class e{constructor(){this.route=T(Ie),this.router=T(qe),this.dialog=T(Ht),this.centersService=T(Jn),this.translateService=T(yi),this.route.data.subscribe(t=>{this.centerViewData=t.centerViewData,this.centerDatatables=t.centerDatatables})}ngOnInit(){this.centerViewData.collectionMeetingCalendar?this.meetingData=!0:this.meetingData=!1}get editMeeting(){return!!(this.centerViewData.collectionMeetingCalendar&&this.centerViewData.collectionMeetingCalendar.entityType.value==="CENTERS"&&this.centerViewData.hierarchy==="."+this.centerViewData.id+".")}doAction(t){switch(t){case"Activate":case"Assign Staff":case"Close":case"Attendance":case"Attach Meeting":case"Manage Groups":case"Staff Assignment History":this.router.navigate([`actions/${t}`],{relativeTo:this.route});break;case"Edit Meeting":let n={calendarId:this.centerViewData.collectionMeetingCalendar.id};this.router.navigate([`actions/${t}`],{relativeTo:this.route,queryParams:n});break;case"Unassign Staff":this.centersUnassignStaff();break;case"Delete":this.deleteCenter();break;case"Edit":this.router.navigate(["edit"],{relativeTo:this.route})}}centersUnassignStaff(){this.dialog.open(Pr,{data:{heading:this.translateService.instant("labels.heading.Unassign Staff"),dialogContext:this.translateService.instant("labels.dialogContext.Are you sure you want Unassign Staff")}}).afterClosed().subscribe(n=>{n.confirm&&this.centersService.executeGroupActionCommand(this.centerViewData.id,"unassignStaff",{staffId:this.centerViewData.staffId}).subscribe(()=>{this.reload()})})}deleteCenter(){this.dialog.open(vi,{data:{deleteContext:`center with id: ${this.centerViewData.id}`}}).afterClosed().subscribe(n=>{n.delete&&this.centersService.deleteCenter(this.centerViewData.id).subscribe(()=>{this.router.navigate(["/centers"],{relativeTo:this.route})})})}reload(){let t=this.router.url;this.router.navigateByUrl("/centers",{skipLocationChange:!0}).then(()=>this.router.navigate([t]))}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275cmp=me({type:e,selectors:[["mifosx-centers-view"]],decls:66,vars:51,consts:[["centerMenu","matMenu"],["More","matMenu"],["general","routerLinkActive"],["tabPanel",""],["notes","routerLinkActive"],["datatable","routerLinkActive"],[1,"account-card"],[1,"header","layout-column"],[1,"header-title-group"],["mat-card-md-image","","src","assets/images/center_placeholder.png",1,"profile-image"],[1,"mat-typography","account-card-title"],[1,"make-flex"],[1,"flex-95"],[1,"fa","fa-stop",3,"matTooltip","ngClass"],[1,"layout-row","responsive-column"],[1,"flex-45"],[1,"center-meeting","flex-45","align-start-start"],["mat-menu-item","",3,"click",4,"mifosxHasPermission"],["mat-menu-item","",3,"disabled",4,"mifosxHasPermission"],["mat-menu-item","",3,"matMenuTriggerFor"],["mat-tab-nav-bar","",1,"navigation-tabs",3,"tabPanel"],["mat-tab-link","","routerLinkActive","",3,"routerLink","active"],["mat-tab-link","","routerLinkActive","",3,"routerLink","active",4,"mifosxHasPermission"],["mat-icon-button","","aria-label","Center actions","yPosition","below",3,"matMenuTriggerFor"],["matListIcon","",1,"actions-menu"],["icon","bars","size","sm"],[3,"externalId"],["class","fa fa-edit",3,"click",4,"mifosxHasPermission"],[1,"fa","fa-edit",3,"click"],[1,"fa","fa-calendar"],["mat-menu-item","",3,"click"],["matListIcon",""],["icon","checkSign","size","sm"],["icon","edit","size","sm"],["mat-menu-item","",3,"disabled"],["icon","add","size","sm"],["mat-menu-item","",3,"disabled","routerLink",4,"mifosxHasPermission"],["mat-menu-item","",3,"disabled","routerLink"],["icon","file","size","sm"]],template:function(n,i){if(n&1&&(l(0,"mat-card",6)(1,"mat-card-header",7)(2,"mat-card-title-group",8)(3,"div")(4,"div"),b(5,"img",9),r()(),l(6,"div",10)(7,"mat-card-title",11)(8,"h3",12),b(9,"i",13),p(10,"statusLookup"),l(11,"b"),c(12),p(13,"translate"),r(),c(14),r(),E(15,pEe,4,1,"div"),r(),l(16,"mat-card-subtitle")(17,"div",14)(18,"div",15)(19,"p"),c(20),p(21,"translate"),b(22,"br"),c(23),p(24,"translate"),b(25,"br"),E(26,mEe,5,5,"span"),E(27,dEe,4,4,"span"),c(28),p(29,"translate"),p(30,"dateFormat"),b(31,"br"),r()(),l(32,"div",16),E(33,hEe,9,13,"div")(34,gEe,10,12,"div"),r()()()(),l(35,"mat-menu",null,0),E(37,CEe,2,1,"span"),F(38,vEe,6,3,"button",17)(39,xEe,6,4,"button",18)(40,bEe,6,3,"button",17),E(41,SEe,2,1,"span"),l(42,"button",19),c(43),p(44,"translate"),r(),l(45,"mat-menu",null,1),E(47,PEe,2,1,"span"),E(48,MEe,2,1,"span"),E(49,EEe,2,1,"span"),E(50,OEe,2,1,"span"),F(51,AEe,3,3,"button",17),E(52,kEe,2,1,"span"),F(53,BEe,3,3,"button",17),r()()()(),l(54,"mat-card-content")(55,"nav",20)(56,"a",21,2),c(58),p(59,"translate"),r(),F(60,REe,4,6,"a",22),Se(61,LEe,2,1,"span",null,Pe),r(),l(63,"mat-tab-nav-panel",null,3),b(65,"router-outlet"),r()()()),n&2){let s=xe(46),d=xe(57),u=xe(64);a(9),g("matTooltip",Le(i.centerViewData.status.value))("ngClass",m(10,34,i.centerViewData.status.code)),a(3),v("",m(13,36,"labels.heading.Center Name")," :"),a(2),v(" ",i.centerViewData.name," "),a(),I(i.centerViewData.status.value!=="Closed"?15:-1),a(5),le(" ",m(21,38,"labels.inputs.Account")," #:",i.centerViewData.accountNo," "),a(3),le(" ",m(24,40,"labels.inputs.Office"),": ",i.centerViewData.officeName," "),a(3),I(i.centerViewData.externalId?26:-1),a(),I(i.centerViewData.staffName?27:-1),a(),le(" ",m(29,42,"labels.inputs.Activation Date")," : ",i.centerViewData.activationDate?m(30,44,i.centerViewData.activationDate):"Not Activated"),a(5),I(i.centerViewData.collectionMeetingCalendar?33:34),a(4),I(i.centerViewData.status.value!=="Active"?37:-1),a(),g("mifosxHasPermission","UPDATE_CENTER"),a(),g("mifosxHasPermission","CREATE_GROUP"),a(),g("mifosxHasPermission","ASSOCIATEGROUPS_CENTER"),a(),I(i.centerViewData.active?41:-1),a(),g("matMenuTriggerFor",s),a(),h(m(44,46,"labels.buttons.More")),a(4),I(i.centerViewData.collectionMeetingCalendar?47:-1),a(),I(i.centerViewData.staffId?-1:48),a(),I(i.centerViewData.staffId?49:-1),a(),I(i.centerViewData.status.value==="Active"?50:-1),a(),g("mifosxHasPermission","CLOSE_CENTER"),a(),I(i.centerViewData.status.value==="Active"&&!i.centerViewData.collectionMeetingCalendar?52:-1),a(),g("mifosxHasPermission","READ_Staff Assignment History"),a(2),g("tabPanel",u),a(),g("routerLink",oe(50,rEe))("active",d.isActive),a(2),v(" ",m(59,48,"labels.inputs.General")," "),a(2),g("mifosxHasPermission","READ_GROUPNOTE"),a(),we(i.centerDatatables)}},dependencies:[ue,co,fe,Ae,$e,Je,Ke,sa,Qr,b0,Qo,si,wi,nc,Yo,ke,vl,Ea,ic,tc,nr,or,La,ar,ra,bg,Pi,he,go],styles:[".account-card[_ngcontent-%COMP%] .center-meeting[_ngcontent-%COMP%]{align-self:flex-end;width:100%}.account-card[_ngcontent-%COMP%] .center-meeting[_ngcontent-%COMP%] div[_ngcontent-%COMP%], .account-card[_ngcontent-%COMP%] .center-meeting[_ngcontent-%COMP%] ng-template[_ngcontent-%COMP%] > div[_ngcontent-%COMP%]{background-color:#0a6aac}.account-card[_ngcontent-%COMP%] .center-meeting[_ngcontent-%COMP%] div[_ngcontent-%COMP%] p[_ngcontent-%COMP%], .account-card[_ngcontent-%COMP%] .center-meeting[_ngcontent-%COMP%] ng-template[_ngcontent-%COMP%] > div[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{color:#fff;padding:0 10px}.meetingDetails[_ngcontent-%COMP%]{float:right;margin-right:10px;border:1px black solid;padding:10px}.make-flex[_ngcontent-%COMP%]{display:flex}"]})}}return e})();var VEe=e=>["/groups",e,"general"],oN=e=>["../","savings-accounts",e,"actions","Deposit"],aN=e=>["../","savings-accounts",e,"actions","Withdrawal"],qEe=e=>["../","savings-accounts",e,"actions","Approve"],zEe=e=>["../","savings-accounts",e,"actions","Undo Approval"],HEe=e=>["../","savings-accounts",e,"actions","Activate"],GEe=e=>["../","savings-accounts",e,"transactions"];function jEe(e,o){e&1&&(l(0,"div")(1,"h3",2),c(2),p(3,"translate"),r()()),e&2&&(a(2),h(m(3,1,"labels.heading.Center Closed")))}function $Ee(e,o){e&1&&(l(0,"th",12),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.Account Number")))}function UEe(e,o){if(e&1&&(l(0,"td",13),b(1,"i",14),p(2,"statusLookup"),c(3),r()),e&2){let t=o.$implicit;a(),g("matTooltip",Le(t.status.value))("ngClass",m(2,4,t.status.code)),a(2),v(" ",t.accountNo," ")}}function WEe(e,o){e&1&&(l(0,"th",12),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.Group Name")))}function QEe(e,o){if(e&1&&(l(0,"td",13),c(1),r()),e&2){let t=o.$implicit;a(),h(t.name)}}function YEe(e,o){e&1&&(l(0,"th",12),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.Office Name")))}function JEe(e,o){if(e&1&&(l(0,"td",13),c(1),r()),e&2){let t=o.$implicit;a(),h(t.officeName)}}function KEe(e,o){e&1&&(l(0,"th",12),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.Submitted On")))}function XEe(e,o){if(e&1&&(l(0,"td",13),c(1),p(2,"dateFormat"),r()),e&2){let t=o.$implicit;a(),h(m(2,1,t.timeline.submittedOnDate))}}function ZEe(e,o){e&1&&b(0,"tr",15)}function eIe(e,o){if(e&1&&b(0,"tr",16),e&2){let t=o.$implicit;g("routerLink",Nt(1,VEe,t.id))}}function tIe(e,o){if(e&1&&(l(0,"h3"),c(1),p(2,"translate"),r(),l(3,"table",3),X(4,4),F(5,$Ee,3,3,"th",5)(6,UEe,4,6,"td",6),Z(),X(7,7),F(8,WEe,3,3,"th",5)(9,QEe,2,1,"td",6),Z(),X(10,8),F(11,YEe,3,3,"th",5)(12,JEe,2,1,"td",6),Z(),X(13,9),F(14,KEe,3,3,"th",5)(15,XEe,3,3,"td",6),Z(),F(16,ZEe,1,0,"tr",10)(17,eIe,1,3,"tr",11),r()),e&2){let t=w();a(),h(m(2,4,"labels.heading.Groups")),a(2),g("dataSource",t.groupResourceData),a(13),g("matHeaderRowDef",t.groupsColumns),a(),g("matRowDefColumns",t.groupsColumns)}}function iIe(e,o){e&1&&(l(0,"th",12),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.Account No")))}function nIe(e,o){if(e&1&&(l(0,"td",13),b(1,"i",14),p(2,"statusLookup"),c(3),r()),e&2){let t=o.$implicit;a(),g("matTooltip",Le(t.status.value))("ngClass",m(2,4,t.status.code)),a(2),v(" ",t.accountNo," ")}}function oIe(e,o){e&1&&(l(0,"th",12),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.Products")))}function aIe(e,o){if(e&1&&(l(0,"td",13),c(1),r()),e&2){let t=o.$implicit;a(),h(t.productName)}}function rIe(e,o){e&1&&(l(0,"th",12),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.Balance")))}function lIe(e,o){if(e&1&&(l(0,"td",13),c(1),r()),e&2){let t=o.$implicit;a(),h(t.accountBalance)}}function sIe(e,o){e&1&&(l(0,"th",12),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.Actions")))}function cIe(e,o){if(e&1){let t=Y();l(0,"button",21),R("click",function(i){V(t);let s=w(5);return q(s.routeEdit(i))}),b(1,"i",22),p(2,"translate"),r()}if(e&2){let t=w(2).$implicit;g("routerLink",Nt(5,oN,t.id)),a(),g("matTooltip",Le(m(2,3,"tooltips.Deposit")))}}function pIe(e,o){if(e&1){let t=Y();l(0,"button",21),R("click",function(i){V(t);let s=w(5);return q(s.routeEdit(i))}),b(1,"i",22),p(2,"translate"),r()}if(e&2){let t=w(2).$implicit;g("routerLink",Nt(5,oN,t.id)),a(),g("matTooltip",Le(m(2,3,"tooltips.Deposit")))}}function mIe(e,o){if(e&1){let t=Y();l(0,"button",21),R("click",function(i){V(t);let s=w(5);return q(s.routeEdit(i))}),b(1,"i",23),p(2,"translate"),r()}if(e&2){let t=w(2).$implicit;g("routerLink",Nt(5,aN,t.id)),a(),g("matTooltip",Le(m(2,3,"tooltips.Withdraw")))}}function dIe(e,o){if(e&1){let t=Y();l(0,"button",21),R("click",function(i){V(t);let s=w(5);return q(s.routeEdit(i))}),b(1,"i",23),p(2,"translate"),r()}if(e&2){let t=w(2).$implicit;g("routerLink",Nt(5,aN,t.id)),a(),g("matTooltip",Le(m(2,3,"tooltips.Withdraw")))}}function uIe(e,o){if(e&1&&(E(0,cIe,3,7,"button",20),E(1,pIe,3,7,"button",20),E(2,mIe,3,7,"button",20),E(3,dIe,3,7,"button",20)),e&2){let t=w().$implicit;I(t.depositType.id===100?0:-1),a(),I(t.depositType.id===300?1:-1),a(),I(t.depositType.id===100?2:-1),a(),I(t.depositType.id===300?3:-1)}}function fIe(e,o){if(e&1){let t=Y();l(0,"button",21),R("click",function(i){V(t);let s=w(4);return q(s.routeEdit(i))}),b(1,"i",24),p(2,"translate"),r()}if(e&2){let t=w().$implicit;g("routerLink",Nt(5,qEe,t.id)),a(),g("matTooltip",Le(m(2,3,"tooltips.Approve")))}}function hIe(e,o){if(e&1){let t=Y();l(0,"button",21),R("click",function(i){V(t);let s=w(4);return q(s.routeEdit(i))}),b(1,"i",25),p(2,"translate"),r(),l(3,"button",21),R("click",function(i){V(t);let s=w(4);return q(s.routeEdit(i))}),b(4,"i",26),p(5,"translate"),r()}if(e&2){let t=w().$implicit;g("routerLink",Nt(10,zEe,t.id)),a(),g("matTooltip",Le(m(2,6,"tooltips.Undo Approve"))),a(2),g("routerLink",Nt(12,HEe,t.id)),a(),g("matTooltip",Le(m(5,8,"tooltips.Activate")))}}function gIe(e,o){if(e&1&&(l(0,"td",13),E(1,uIe,4,4),E(2,fIe,3,7,"button",20),E(3,hIe,6,14),r()),e&2){let t=o.$implicit;a(),I(t.status.active?1:-1),a(),I(t.status.submittedAndPendingApproval?2:-1),a(),I(!t.status.submittedAndPendingApproval&&!t.status.active?3:-1)}}function _Ie(e,o){e&1&&b(0,"tr",15)}function CIe(e,o){if(e&1&&b(0,"tr",16),e&2){let t=o.$implicit;g("routerLink",Nt(1,GEe,t.id))}}function vIe(e,o){if(e&1&&(l(0,"h3"),c(1),p(2,"translate"),r(),l(3,"table",3),X(4,4),F(5,iIe,3,3,"th",5)(6,nIe,4,6,"td",6),Z(),X(7,17),F(8,oIe,3,3,"th",5)(9,aIe,2,1,"td",6),Z(),X(10,18),F(11,rIe,3,3,"th",5)(12,lIe,2,1,"td",6),Z(),X(13,19),F(14,sIe,3,3,"th",5)(15,gIe,4,3,"td",6),Z(),F(16,_Ie,1,0,"tr",10)(17,CIe,1,3,"tr",11),r()),e&2){let t=w(2);a(),h(m(2,4,"labels.heading.Savings Account Overview")),a(2),g("dataSource",t.savingsAccountData),a(13),g("matHeaderRowDef",t.savingsAccountColumns),a(),g("matRowDefColumns",t.savingsAccountColumns)}}function xIe(e,o){if(e&1&&E(0,vIe,18,6),e&2){let t=w();I(t.savingsAccountData.length>0?0:-1)}}var X2=(()=>{class e{constructor(){this.route=T(Ie),this.savingsAccountColumns=["Account No","Products","Balance","Actions"],this.groupsColumns=["Account No","Group Name","Office Name","Submitted On"],this.route.data.subscribe(t=>{this.centerSummaryData=t.centerSummaryData[0],this.centerViewData=t.centerViewData,this.savingsAccountData=t.savingsAccountData.savingsAccounts,this.groupResourceData=t.centerViewData.groupMembers})}routeEdit(t){t.stopPropagation()}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275cmp=me({type:e,selectors:[["mifosx-general-tab"]],decls:31,vars:34,consts:[[1,"tab-container","mat-typography"],[1,"layout-row","gap-32px","summary-details-container"],[1,"closedCenter"],["mat-table","","matSort","",3,"dataSource"],["matColumnDef","Account No"],["mat-header-cell","",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","Group Name"],["matColumnDef","Office Name"],["matColumnDef","Submitted On"],["mat-header-row","",4,"matHeaderRowDef"],["mat-row","",3,"routerLink",4,"matRowDef","matRowDefColumns"],["mat-header-cell",""],["mat-cell",""],[1,"fa","fa-stop",3,"matTooltip","ngClass"],["mat-header-row",""],["mat-row","",3,"routerLink"],["matColumnDef","Products"],["matColumnDef","Balance"],["matColumnDef","Actions"],["mat-raised-button","","color","primary",1,"account-action-button",3,"routerLink"],["mat-raised-button","","color","primary",1,"account-action-button",3,"click","routerLink"],[1,"fa","fa-arrow-right",3,"matTooltip"],[1,"fa","fa-arrow-left",3,"matTooltip"],[1,"fa","fa-check",3,"matTooltip"],[1,"fa","fa-undo",3,"matTooltip"],[1,"fa","fa-power-off",3,"matTooltip"]],template:function(n,i){n&1&&(l(0,"div",0),E(1,jEe,4,3,"div"),l(2,"h3"),c(3),p(4,"translate"),r(),l(5,"div",1)(6,"p"),c(7),p(8,"translate"),b(9,"br"),c(10),p(11,"translate"),b(12,"br"),c(13),p(14,"translate"),b(15,"br"),c(16),p(17,"translate"),b(18,"br"),r(),l(19,"p"),c(20),p(21,"translate"),b(22,"br"),c(23),p(24,"translate"),b(25,"br"),c(26),p(27,"translate"),b(28,"br"),r()(),E(29,tIe,18,6),E(30,xIe,1,1),r()),n&2&&(a(),I(i.centerViewData.status.value==="Closed"?1:-1),a(2),h(m(4,18,"labels.heading.Summary Details")),a(4),le(" ",m(8,20,"labels.inputs.Active Clients"),": ",i.centerSummaryData.activeClients),a(3),le(" ",m(11,22,"labels.inputs.Active Group Loans"),": ",i.centerSummaryData.activeGroupLoans),a(3),le(" ",m(14,24,"labels.inputs.Active Client Loans"),": ",i.centerSummaryData.activeClientLoans),a(3),le(" ",m(17,26,"labels.inputs.Active Overdue Group Loans"),": ",i.centerSummaryData.overdueGroupLoans),a(4),le(" ",m(21,28,"labels.inputs.Active Group Borrowers"),": ",i.centerSummaryData.activeGroupBorrowers),a(3),le(" ",m(24,30,"labels.inputs.Active Client Borrowers"),": ",i.centerSummaryData.activeClientBorrowers),a(3),le(" ",m(27,32,"labels.inputs.Active Overdue Client Loans"),": ",i.centerSummaryData.overdueClientLoans),a(3),I(i.groupResourceData.length>0?29:-1),a(),I(i.savingsAccountData!==void 0?30:-1))},dependencies:[ue,co,fe,Ae,ve,_t,It,xt,vt,bt,Ct,yt,si,St,Pt,wt,Tt,Pi,he,go],styles:[".tab-container[_ngcontent-%COMP%]{padding:1%;margin:1%}.tab-container[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{margin:1% auto}.tab-container[_ngcontent-%COMP%] .summary-details-container[_ngcontent-%COMP%]{border:1px solid;padding:1%}.tab-container[_ngcontent-%COMP%] table[_ngcontent-%COMP%]{width:100%}.tab-container[_ngcontent-%COMP%] table[_ngcontent-%COMP%] .account-action-button[_ngcontent-%COMP%]{min-width:26px;padding:0 6px;margin:4px;line-height:25px}.closedCenter[_ngcontent-%COMP%]{text-align:center;color:red;font-size:2rem}"]})}}return e})();var Z2=(()=>{class e{constructor(){this.route=T(Ie),this.authenticationService=T(Wo),this.centersService=T(Jn),this.entityId=this.route.parent.parent.snapshot.params.centerId,this.addNote=this.addNote.bind(this),this.editNote=this.editNote.bind(this),this.deleteNote=this.deleteNote.bind(this)}ngOnInit(){let t=this.authenticationService.getCredentials();this.username=t.username,this.route.data.subscribe(n=>{this.entityNotes=n.centerNotes})}addNote(t){this.centersService.createCenterNote(this.entityId,t).subscribe(n=>{this.entityNotes.push({id:n.resourceId,createdByUsername:this.username,createdOn:new Date,note:t.note})})}editNote(t,n,i){this.centersService.editCenterNote(this.entityId,t,n).subscribe(()=>{this.entityNotes[i].note=n.note})}deleteNote(t,n){this.centersService.deleteCenterNote(this.entityId,t).subscribe(()=>{this.entityNotes.splice(n,1)})}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275cmp=me({type:e,selectors:[["mifosx-notes-tab"]],decls:1,vars:5,consts:[[3,"entityId","entityNotes","callbackAdd","callbackEdit","callbackDelete"]],template:function(n,i){n&1&&b(0,"mifosx-entity-notes-tab",0),n&2&&g("entityId",i.entityId)("entityNotes",i.entityNotes)("callbackAdd",i.addNote)("callbackEdit",i.editNote)("callbackDelete",i.deleteNote)},dependencies:[ue,fe,I0],styles:[".tab-container[_ngcontent-%COMP%]{padding:1%;margin:1%}"]})}}return e})();var ev=(()=>{class e{constructor(){this.route=T(Ie),this.entityId=this.route.parent.parent.snapshot.paramMap.get("centerId"),this.route.data.subscribe(t=>{this.entityDatatable=t.centerDatatable,this.multiRowDatatableFlag=this.entityDatatable.columnHeaders[0].columnName==="id"})}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275cmp=me({type:e,selectors:[["mifosx-datatable-tab"]],decls:2,vars:3,consts:[[1,"tab-container","mat-typography"],["entityType","Center",3,"entityId","multiRowDatatableFlag","entityDatatable"]],template:function(n,i){n&1&&(l(0,"div",0),b(1,"mifosx-entity-datatable-tab",1),r()),n&2&&(a(),g("entityId",i.entityId)("multiRowDatatableFlag",i.multiRowDatatableFlag)("entityDatatable",i.entityDatatable))},dependencies:[ue,fe,Or],encapsulation:2})}}return e})();var bIe=()=>["../general"];function yIe(e,o){e&1&&(l(0,"mat-error"),c(1),p(2,"translate"),p(3,"translate"),l(4,"strong"),c(5),p(6,"translate"),r()()),e&2&&(a(),le(" ",m(2,3,"labels.inputs.Center Name")," ",m(3,5,"labels.commons.is")," "),a(4),h(m(6,7,"labels.commons.required")))}function SIe(e,o){e&1&&(l(0,"mat-error"),c(1),p(2,"translate"),l(3,"strong"),c(4),p(5,"translate"),r(),c(6),p(7,"translate"),r()),e&2&&(a(),v(" ",m(2,3,"labels.inputs.Center Name")," "),a(3),h(m(5,5,"labels.inputs.cannot")),a(2),v(" ",m(7,7,"labels.inputs.begin with a special character or number")," "))}function wIe(e,o){if(e&1&&(l(0,"mat-option",6),c(1),r()),e&2){let t=o.$implicit;g("value",t.id),a(),v(" ",t.displayName," ")}}function PIe(e,o){e&1&&(l(0,"mat-error"),c(1),p(2,"translate"),p(3,"translate"),l(4,"strong"),c(5),p(6,"translate"),r()()),e&2&&(a(),le(" ",m(2,3,"labels.inputs.Activation Date")," ",m(3,5,"labels.commons.is")," "),a(4),h(m(6,7,"labels.commons.required")))}function TIe(e,o){if(e&1){let t=Y();X(0,11),R("click",function(){V(t);let i=xe(8);return q(i.open())}),l(1,"mat-form-field")(2,"mat-label"),c(3),p(4,"translate"),r(),b(5,"input",12)(6,"mat-datepicker-toggle",13)(7,"mat-datepicker",null,0),E(9,PIe,7,9,"mat-error"),r(),Z()}if(e&2){let t=xe(8),n=w();a(3),h(m(4,6,"labels.inputs.Activation Date")),a(2),g("min",n.minDate)("max",n.maxDate)("matDatepicker",t),a(),g("for",t),a(3),I(n.editCenterForm.controls.activationDate.hasError("required")?9:-1)}}var tv=(()=>{class e{constructor(){this.formBuilder=T(nt),this.route=T(Ie),this.router=T(qe),this.centersService=T(Jn),this.settingsService=T(At),this.dateUtils=T(Zt),this.minDate=new Date(2e3,0,1),this.maxDate=new Date,this.route.data.subscribe(t=>{this.centerData=t.centerData,this.staffs=this.centerData.staffOptions})}ngOnInit(){this.maxDate=this.settingsService.businessDate,this.createEditCenterForm()}createEditCenterForm(){let t=this.settingsService.dateFormat;this.editCenterForm=this.formBuilder.group({name:[this.centerData.name,[se.required,se.pattern("(^[A-z]).*")]],staffId:[this.centerData.staffId],externalId:[this.centerData.externalId]}),this.centerData.status.value==="Pending"&&this.editCenterForm.addControl("activationDate",new it(this.centerData.activationDate?this.centerData.activationDate:new Date,se.required))}submit(){let t=this.editCenterForm.value,n=this.settingsService.language.code,i=this.settingsService.dateFormat;if(this.centerData.status.value==="Pending"){let d=this.editCenterForm.value.activationDate;t.activationDate instanceof Date&&(t.activationDate=this.dateUtils.formatDate(d,i))}let s=qt(at({},t),{name:this.centerData.name,dateFormat:i,locale:n});this.centersService.executeEditCenter(this.centerData.id,s).subscribe(()=>{this.router.navigate(["../general"],{relativeTo:this.route})})}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275cmp=me({type:e,selectors:[["mifosx-edit-center"]],decls:32,vars:22,consts:[["activatedOnDatePicker",""],[1,"container"],[3,"ngSubmit","formGroup"],[1,"layout-column"],["matInput","","required","","formControlName","name"],["formControlName","staffId"],[3,"value"],["matInput","","formControlName","externalId"],[1,"layout-row","align-center","gap-5px","responsive-column"],["type","button","mat-raised-button","",3,"routerLink"],["mat-raised-button","","color","primary",3,"disabled"],[3,"click"],["matInput","","required","","formControlName","activationDate",3,"min","max","matDatepicker"],["matSuffix","",3,"for"]],template:function(n,i){n&1&&(l(0,"div",1)(1,"mat-card")(2,"form",2),R("ngSubmit",function(){return i.submit()}),l(3,"mat-card-content")(4,"div",3)(5,"mat-form-field")(6,"mat-label"),c(7),p(8,"translate"),r(),b(9,"input",4),E(10,yIe,7,9,"mat-error"),E(11,SIe,8,9,"mat-error"),r(),l(12,"mat-form-field")(13,"mat-label"),c(14),p(15,"translate"),r(),l(16,"mat-select",5),Se(17,wIe,2,2,"mat-option",6,Pe),r()(),l(19,"mat-form-field")(20,"mat-label"),c(21),p(22,"translate"),r(),b(23,"input",7),r(),E(24,TIe,10,8,"ng-container"),r()(),l(25,"mat-card-actions",8)(26,"button",9),c(27),p(28,"translate"),r(),l(29,"button",10),c(30),p(31,"translate"),r()()()()()),n&2&&(a(2),g("formGroup",i.editCenterForm),a(5),h(m(8,11,"labels.inputs.name")),a(3),I(i.editCenterForm.controls.name.hasError("required")?10:-1),a(),I(i.editCenterForm.controls.name.hasError("pattern")?11:-1),a(3),h(m(15,13,"labels.inputs.Staff")),a(3),we(i.staffs),a(4),h(m(22,15,"labels.inputs.External Id")),a(3),I(i.centerData.status.value==="Pending"?24:-1),a(2),g("routerLink",oe(21,bIe)),a(),v(" ",m(28,17,"labels.buttons.Cancel")," "),a(2),g("disabled",!i.editCenterForm.valid),a(),v(" ",m(31,19,"labels.buttons.Confirm")," "))},dependencies:[ue,fe,tt,st,Ue,Xe,dt,Ze,et,Ae,$e,Je,Et,Fe,Be,ut,ai,ze,gt,ft,mi,di,pi,ve,he],styles:[".container[_ngcontent-%COMP%]{max-width:37rem}"]})}}return e})();var MIe=()=>["../../"];function DIe(e,o){e&1&&(l(0,"mat-error"),c(1),p(2,"translate"),p(3,"translate"),l(4,"strong"),c(5),p(6,"translate"),r()()),e&2&&(a(),le(" ",m(2,3,"labels.inputs.Activated On Date")," ",m(3,5,"labels.commons.is")," "),a(4),h(m(6,7,"labels.commons.required")))}var iv=(()=>{class e{constructor(){this.formBuilder=T(nt),this.centersService=T(Jn),this.settingsService=T(At),this.dateUtils=T(Zt),this.route=T(Ie),this.router=T(qe),this.minDate=new Date(2e3,0,1),this.maxDate=new Date,this.centerId=this.route.parent.snapshot.params.centerId}ngOnInit(){this.maxDate=this.settingsService.businessDate,this.createActivateCenterForm()}createActivateCenterForm(){this.activateCenterForm=this.formBuilder.group({activationDate:[new Date,se.required]})}submit(){let t=this.activateCenterForm.value,n=this.settingsService.language.code,i=this.settingsService.dateFormat,s=this.activateCenterForm.value.activationDate;t.activationDate instanceof Date&&(t.activationDate=this.dateUtils.formatDate(s,i));let d=qt(at({},t),{dateFormat:i,locale:n});this.centersService.executeCenterActionCommand(this.centerId,"activate",d).subscribe(()=>{this.router.navigate(["../../"],{relativeTo:this.route})})}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275cmp=me({type:e,selectors:[["mifosx-activate-center"]],decls:20,vars:18,consts:[["activationDatePicker",""],[1,"container"],[3,"ngSubmit","formGroup"],[1,"flex-fill",3,"click"],["matInput","","required","","formControlName","activationDate",3,"min","max","matDatepicker"],["matSuffix","",3,"for"],[1,"layout-row","align-center","gap-5px","responsive-column"],["type","button","mat-raised-button","",3,"routerLink"],["mat-raised-button","","color","primary",3,"disabled"]],template:function(n,i){if(n&1){let s=Y();l(0,"div",1)(1,"mat-card")(2,"form",2),R("ngSubmit",function(){return V(s),q(i.submit())}),l(3,"mat-card-content")(4,"mat-form-field",3),R("click",function(){V(s);let u=xe(11);return q(u.open())}),l(5,"mat-label"),c(6),p(7,"translate"),r(),b(8,"input",4)(9,"mat-datepicker-toggle",5)(10,"mat-datepicker",null,0),E(12,DIe,7,9,"mat-error"),r()(),l(13,"mat-card-actions",6)(14,"button",7),c(15),p(16,"translate"),r(),l(17,"button",8),c(18),p(19,"translate"),r()()()()()}if(n&2){let s=xe(11);a(2),g("formGroup",i.activateCenterForm),a(4),h(m(7,11,"labels.inputs.Activated On Date")),a(2),g("min",i.minDate)("max",i.maxDate)("matDatepicker",s),a(),g("for",s),a(3),I(i.activateCenterForm.controls.activationDate.hasError("required")?12:-1),a(2),g("routerLink",oe(17,MIe)),a(),v(" ",m(16,13,"labels.buttons.Cancel")," "),a(2),g("disabled",!i.activateCenterForm.valid),a(),v(" ",m(19,15,"labels.buttons.Confirm")," ")}},dependencies:[ue,fe,tt,st,Ue,Xe,dt,Ze,et,Ae,$e,Je,Et,Fe,Be,ut,ai,ze,mi,di,pi,ve,he],styles:[".container[_ngcontent-%COMP%]{max-width:37rem}"]})}}return e})();var EIe=()=>["../../"];function IIe(e,o){if(e&1&&(l(0,"mat-option",5),c(1),r()),e&2){let t=o.$implicit;g("value",t.id),a(),v(" ",t.displayName," ")}}function OIe(e,o){e&1&&(l(0,"mat-error"),c(1),p(2,"translate"),p(3,"translate"),l(4,"strong"),c(5),p(6,"translate"),r()()),e&2&&(a(),le(" ",m(2,3,"labels.inputs.Staff")," ",m(3,5,"labels.commons.is")," "),a(4),h(m(6,7,"labels.commons.required")))}var nv=(()=>{class e{constructor(){this.formBuilder=T(nt),this.centersService=T(Jn),this.route=T(Ie),this.router=T(qe),this.route.data.subscribe(t=>{this.centerData=t.centersActionData})}ngOnInit(){this.staffData=this.centerData.staffOptions,this.createCenterAssignStaffForm()}createCenterAssignStaffForm(){this.centerAssignStaffForm=this.formBuilder.group({staffId:[""]})}submit(){this.centersService.executeGroupActionCommand(this.centerData.id,"assignStaff",this.centerAssignStaffForm.value).subscribe(()=>{this.router.navigate(["../../"],{relativeTo:this.route})})}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275cmp=me({type:e,selectors:[["mifosx-center-assign-staff"]],decls:20,vars:14,consts:[[1,"container"],[3,"ngSubmit","formGroup"],[1,"layout-column"],[1,"flex-48"],["formControlName","staffId"],[3,"value"],[1,"layout-row","align-center","gap-5px","responsive-column"],["type","button","mat-raised-button","",3,"routerLink"],["mat-raised-button","","color","primary",3,"disabled"]],template:function(n,i){n&1&&(l(0,"div",0)(1,"mat-card")(2,"form",1),R("ngSubmit",function(){return i.submit()}),l(3,"mat-card-content")(4,"div",2)(5,"mat-form-field",3)(6,"mat-label"),c(7),p(8,"translate"),r(),l(9,"mat-select",4),Se(10,IIe,2,2,"mat-option",5,Pe),r(),E(12,OIe,7,9,"mat-error"),r()()(),l(13,"mat-card-actions",6)(14,"button",7),c(15),p(16,"translate"),r(),l(17,"button",8),c(18),p(19,"translate"),r()()()()()),n&2&&(a(2),g("formGroup",i.centerAssignStaffForm),a(5),h(m(8,7,"labels.inputs.Staff")),a(3),we(i.staffData),a(2),I(i.centerAssignStaffForm.controls.staffId.hasError("required")?12:-1),a(2),g("routerLink",oe(13,EIe)),a(),v(" ",m(16,9,"labels.buttons.Cancel")," "),a(2),g("disabled",!i.centerAssignStaffForm.valid),a(),v(" ",m(19,11,"labels.buttons.Confirm")," "))},dependencies:[ue,fe,tt,Ue,Xe,Ze,et,Ae,$e,Je,Et,Fe,Be,ut,gt,ft,ve,he],styles:[".container[_ngcontent-%COMP%]{max-width:37rem}"]})}}return e})();var AIe=()=>["../../"];function FIe(e,o){e&1&&(l(0,"mat-error"),c(1),p(2,"translate"),p(3,"translate"),l(4,"strong"),c(5),p(6,"translate"),r()()),e&2&&(a(),le(" ",m(2,3,"labels.inputs.Closed On Date")," ",m(3,5,"labels.commons.is")," "),a(4),h(m(6,7,"labels.commons.required")))}function kIe(e,o){if(e&1&&(l(0,"mat-option",9),c(1),r()),e&2){let t=o.$implicit;g("value",t.id),a(),v(" ",t.name," ")}}function BIe(e,o){e&1&&(l(0,"mat-error"),c(1),p(2,"translate"),p(3,"translate"),l(4,"strong"),c(5),p(6,"translate"),r()()),e&2&&(a(),le(" ",m(2,3,"labels.inputs.Closure Reason")," ",m(3,5,"labels.commons.is")," "),a(4),h(m(6,7,"labels.commons.required")))}function RIe(e,o){if(e&1&&(l(0,"button",13),c(1),p(2,"translate"),r()),e&2){let t=w();g("disabled",!t.closeCenterForm.valid),a(),v(" ",m(2,2,"labels.buttons.Confirm")," ")}}var ov=(()=>{class e{constructor(){this.formBuilder=T(nt),this.centersService=T(Jn),this.settingsService=T(At),this.dateUtils=T(Zt),this.route=T(Ie),this.router=T(qe),this.minDate=new Date(2e3,0,1),this.maxDate=new Date,this.route.data.subscribe(t=>{this.closureData=t.centeractionData.closureReasons}),this.centerId=this.route.parent.snapshot.params.centerId}ngOnInit(){this.maxDate=this.settingsService.businessDate,this.createCloseCenterForm()}createCloseCenterForm(){this.closeCenterForm=this.formBuilder.group({closureDate:["",se.required],closureReasonId:["",se.required]})}submit(){let t=this.closeCenterForm.value,n=this.settingsService.language.code,i=this.settingsService.dateFormat,s=this.closeCenterForm.value.closureDate;t.closureDate instanceof Date&&(t.closureDate=this.dateUtils.formatDate(s,i));let d=qt(at({},t),{dateFormat:i,locale:n});this.centersService.executeCenterActionCommand(this.centerId,"close",d).subscribe(()=>{this.router.navigate(["../../"],{relativeTo:this.route})})}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275cmp=me({type:e,selectors:[["mifosx-close-center"]],decls:27,vars:19,consts:[["closureDatePicker",""],[1,"container"],[3,"ngSubmit","formGroup"],[1,"layout-column"],[3,"click"],["matInput","","required","","formControlName","closureDate",3,"min","max","matDatepicker"],["matSuffix","",3,"for"],[1,"flex-48"],["formControlName","closureReasonId"],[3,"value"],[1,"layout-row","align-center","gap-5px","responsive-column"],["type","button","mat-raised-button","",3,"routerLink"],["mat-raised-button","","color","warn",3,"disabled",4,"mifosxHasPermission"],["mat-raised-button","","color","warn",3,"disabled"]],template:function(n,i){if(n&1){let s=Y();l(0,"div",1)(1,"mat-card")(2,"form",2),R("ngSubmit",function(){return V(s),q(i.submit())}),l(3,"mat-card-content")(4,"div",3)(5,"mat-form-field",4),R("click",function(){V(s);let u=xe(12);return q(u.open())}),l(6,"mat-label"),c(7),p(8,"translate"),r(),b(9,"input",5)(10,"mat-datepicker-toggle",6)(11,"mat-datepicker",null,0),E(13,FIe,7,9,"mat-error"),r(),l(14,"mat-form-field",7)(15,"mat-label"),c(16),p(17,"translate"),r(),l(18,"mat-select",8),Se(19,kIe,2,2,"mat-option",9,Pe),r(),E(21,BIe,7,9,"mat-error"),r()()(),l(22,"mat-card-actions",10)(23,"button",11),c(24),p(25,"translate"),r(),F(26,RIe,3,4,"button",12),r()()()()}if(n&2){let s=xe(12);a(2),g("formGroup",i.closeCenterForm),a(5),h(m(8,12,"labels.inputs.Closed On Date")),a(2),g("min",i.minDate)("max",i.maxDate)("matDatepicker",s),a(),g("for",s),a(3),I(i.closeCenterForm.controls.closureDate.hasError("required")?13:-1),a(3),h(m(17,14,"labels.inputs.Closure Reason")),a(3),we(i.closureData),a(2),I(i.closeCenterForm.controls.closureReasonId.hasError("required")?21:-1),a(2),g("routerLink",oe(18,AIe)),a(),v(" ",m(25,16,"labels.buttons.Cancel")," "),a(2),g("mifosxHasPermission","CLOSE_CENTER")}},dependencies:[ue,fe,tt,st,Ue,Xe,dt,Ze,et,Ae,$e,Je,Et,Fe,Be,ut,ai,ze,gt,ft,mi,di,pi,ve,Ke,he],styles:[".container[_ngcontent-%COMP%]{max-width:37rem}"]})}}return e})();var NIe=()=>["../../"];function LIe(e,o){if(e&1&&(l(0,"mat-option",16),c(1),p(2,"dateFormat"),r()),e&2){let t=o.$implicit;g("value",t),a(),v(" ",m(2,2,t)," ")}}function VIe(e,o){e&1&&(l(0,"th",17),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.name")))}function qIe(e,o){if(e&1&&(l(0,"td",18),c(1),p(2,"find"),r()),e&2){let t=o.$implicit,n=w();a(),h($t(2,1,t.clientId,n.membersData,"id","displayName"))}}function zIe(e,o){e&1&&(l(0,"th",17),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.Attendance")))}function HIe(e,o){e&1&&(l(0,"span"),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.Present")))}function GIe(e,o){e&1&&(l(0,"span"),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.Absent")))}function jIe(e,o){e&1&&(l(0,"span"),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.Approved")))}function $Ie(e,o){e&1&&(l(0,"span"),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.Leave")))}function UIe(e,o){e&1&&(l(0,"span"),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.Late")))}function WIe(e,o){if(e&1){let t=Y();l(0,"td",19),F(1,HIe,3,3,"span",20)(2,GIe,3,3,"span",20)(3,jIe,3,3,"span",20)(4,$Ie,3,3,"span",20)(5,UIe,3,3,"span",20),l(6,"button",21),R("click",function(){let i=V(t).$implicit,s=w();return q(s.editAttendance(i))}),b(7,"fa-icon",22),r()()}if(e&2){let t=o.$implicit;g("ngSwitch",t.attendanceType),a(),g("ngSwitchCase",1),a(),g("ngSwitchCase",2),a(),g("ngSwitchCase",3),a(),g("ngSwitchCase",4),a(),g("ngSwitchCase",5)}}function QIe(e,o){e&1&&b(0,"tr",23)}function YIe(e,o){e&1&&b(0,"tr",24)}function JIe(e,o){if(e&1){let t=Y();l(0,"button",25),R("click",function(){V(t);let i=w();return q(i.submit())}),c(1),p(2,"translate"),r()}e&2&&(a(),v(" ",m(2,1,"labels.buttons.Confirm")," "))}var av=(()=>{class e{constructor(){this.route=T(Ie),this.dateUtils=T(Zt),this.router=T(qe),this.centersService=T(Jn),this.settingsService=T(At),this.dialog=T(Ht),this.translateService=T(yi),this.displayedColumns=["name","attendance"],this.meetingDate=new it,this.dataSource=[],this.minDate=new Date(2e3,0,1),this.maxDate=new Date,this.route.data.subscribe(t=>{this.centerData=t.centersActionData,this.membersData=t.centersActionData.clients})}ngOnInit(){this.maxDate=this.settingsService.businessDate,this.membersData!==void 0&&this.membersData!==null&&(this.dataSource=this.membersData.map(t=>({clientId:t.id,attendanceType:1}))),this.meetingDates=this.centerData.collectionMeetingCalendar.recurringDates.filter(t=>new Date(t).getTime(){this.attendanceTypeOptions=t.attendanceTypeOptions})}editAttendance(t){let n=[new $i({controlName:"attendanceType",label:this.translateService.instant("labels.buttons.Attendance"),value:t.attendanceType,options:{label:"value",value:"id",data:this.attendanceTypeOptions},required:!1})],i={title:this.translateService.instant("labels.buttons.Assign Member")+" "+this.translateService.instant("labels.buttons.Attendance"),layout:{addButtonText:"Confirm"},formfields:n};this.dialog.open(an,{data:i}).afterClosed().subscribe(d=>{if(d.data){let u=at(at({},t),d.data.value);this.dataSource.splice(this.dataSource.indexOf(t),1,u),this.dataSource=this.dataSource.concat([])}})}submit(){let t=this.settingsService.language.code,n=this.settingsService.dateFormat,i=new Date(this.meetingDate.value),s={meetingDate:this.dateUtils.formatDate(this.meetingDate.value,n),calendarId:this.centerData.collectionMeetingCalendar.id,clientsAttendance:this.dataSource,dateFormat:n,locale:t};this.centersService.assignCenterAttendance(this.centerData.id,this.centerData.collectionMeetingCalendar.id,s).subscribe(()=>{this.router.navigate(["../../"],{relativeTo:this.route})})}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275cmp=me({type:e,selectors:[["mifosx-center-attendance"]],decls:26,vars:20,consts:[[1,"container"],[1,"layout-column","gap-3percent"],[1,"flex-fill"],[3,"formControl"],[3,"value",4,"ngFor","ngForOf"],["mat-table","",1,"mat-elevation-z1",3,"dataSource"],["matColumnDef","name"],["mat-header-cell","",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","attendance"],["mat-cell","",3,"ngSwitch",4,"matCellDef"],["mat-header-row","",4,"matHeaderRowDef"],["mat-row","",4,"matRowDef","matRowDefColumns"],[1,"layout-row","align-center","gap-5px","responsive-column"],["type","button","mat-raised-button","",3,"routerLink"],["mat-raised-button","","color","primary",3,"click",4,"mifosxHasPermission"],[3,"value"],["mat-header-cell",""],["mat-cell",""],["mat-cell","",3,"ngSwitch"],[4,"ngSwitchCase"],["mat-icon-button","","color","primary",3,"click"],["icon","pen"],["mat-header-row",""],["mat-row",""],["mat-raised-button","","color","primary",3,"click"]],template:function(n,i){n&1&&(l(0,"div",0)(1,"mat-card",1)(2,"mat-form-field",2)(3,"mat-label"),c(4),p(5,"translate"),r(),l(6,"mat-select",3),F(7,LIe,3,4,"mat-option",4),r(),l(8,"mat-hint"),c(9),p(10,"translate"),p(11,"dateFormat"),r()(),l(12,"table",5),X(13,6),F(14,VIe,3,3,"th",7)(15,qIe,3,6,"td",8),Z(),X(16,9),F(17,zIe,3,3,"th",7)(18,WIe,8,6,"td",10),Z(),F(19,QIe,1,0,"tr",11)(20,YIe,1,0,"tr",12),r(),l(21,"mat-card-actions",13)(22,"button",14),c(23),p(24,"translate"),r(),F(25,JIe,3,3,"button",15),r()()()),n&2&&(a(4),h(m(5,11,"labels.inputs.Meeting Date")),a(2),g("formControl",i.meetingDate),a(),g("ngForOf",i.meetingDates),a(2),le("",m(10,13,"labels.inputs.Next Meeting on"),": ",m(11,15,i.centerData.collectionMeetingCalendar.nextTenRecurringDates[0])),a(3),g("dataSource",i.dataSource),a(7),g("matHeaderRowDef",i.displayedColumns),a(),g("matRowDefColumns",i.displayedColumns),a(2),g("routerLink",oe(19,NIe)),a(),v(" ",m(24,17,"labels.buttons.Cancel")," "),a(2),g("mifosxHasPermission","CREATE_MEETING"))},dependencies:[ue,is,Ks,Xs,fe,Ue,_n,Ae,$e,Et,Fe,Be,za,gt,ft,ve,Ke,_t,xt,vt,bt,Ct,yt,wi,ke,St,Pt,wt,Tt,Pi,he,Qn],styles:[".container[_ngcontent-%COMP%]{max-width:37rem}"]})}}return e})();var KIe=()=>["../../"];function XIe(e,o){e&1&&(l(0,"mat-error"),c(1),p(2,"translate"),p(3,"translate"),l(4,"strong"),c(5),p(6,"translate"),r()()),e&2&&(a(),le(" ",m(2,3,"labels.inputs.Start Date")," ",m(3,5,"labels.commons.is")," "),a(4),h(m(6,7,"labels.commons.required")))}function ZIe(e,o){if(e&1&&(l(0,"mat-option",12),c(1),r()),e&2){let t=o.$implicit;g("value",t.id),a(),v(" ",t.value," ")}}function e6e(e,o){e&1&&(l(0,"mat-error"),c(1),p(2,"translate"),p(3,"translate"),l(4,"strong"),c(5),p(6,"translate"),r()()),e&2&&(a(),le(" ",m(2,3,"labels.inputs.Repetition Frequency")," ",m(3,5,"labels.commons.is")," "),a(4),h(m(6,7,"labels.commons.required")))}function t6e(e,o){if(e&1&&(l(0,"mat-form-field")(1,"mat-label"),c(2),p(3,"translate"),r(),l(4,"mat-select",11),Se(5,ZIe,2,2,"mat-option",12,Pe),r(),E(7,e6e,7,9,"mat-error"),r()),e&2){let t=w();a(2),h(m(3,2,"labels.inputs.Repetition Frequency")),a(3),we(t.frequencyOptions),a(2),I(t.centerMeetingForm.controls.frequency.hasError("repeatsOnDay")?7:-1)}}function i6e(e,o){if(e&1&&(l(0,"mat-option",12),c(1),r()),e&2){let t=o.$implicit;g("value",t),a(),v(" ",t," ")}}function n6e(e,o){e&1&&(l(0,"mat-error"),c(1),p(2,"translate"),p(3,"translate"),l(4,"strong"),c(5),p(6,"translate"),r()()),e&2&&(a(),le(" ",m(2,3,"labels.inputs.Repetition Interval")," ",m(3,5,"labels.commons.is")," "),a(4),h(m(6,7,"labels.commons.required")))}function o6e(e,o){if(e&1&&(l(0,"mat-form-field")(1,"mat-label"),c(2),p(3,"translate"),r(),l(4,"mat-select",13),Se(5,i6e,2,2,"mat-option",12,Pe),r(),E(7,n6e,7,9,"mat-error"),r()),e&2){let t=w();a(2),h(m(3,2,"labels.inputs.Repetition Interval")),a(3),we(t.repetitionIntervals),a(2),I(t.centerMeetingForm.controls.interval.hasError("repeatsOnDay")?7:-1)}}function a6e(e,o){if(e&1&&(l(0,"mat-option",12),c(1),r()),e&2){let t=o.$implicit;g("value",t.id),a(),v(" ",t.value," ")}}function r6e(e,o){e&1&&(l(0,"mat-error"),c(1),p(2,"translate"),l(3,"strong"),c(4),p(5,"translate"),r(),c(6),p(7,"translate"),r()),e&2&&(a(),v(" ",m(2,3,"labels.inputs.At least")," "),a(3),h(m(5,5,"labels.inputs.one")),a(2),v(" ",m(7,7,"labels.inputs.day must be selected")," "))}function l6e(e,o){if(e&1&&(l(0,"mat-form-field")(1,"mat-label"),c(2),p(3,"translate"),r(),l(4,"mat-select",14),Se(5,a6e,2,2,"mat-option",12,Pe),r(),E(7,r6e,8,9,"mat-error"),r()),e&2){let t=w();a(2),h(m(3,2,"labels.inputs.Repeats on Day")),a(3),we(t.repeatsOnDays),a(2),I(t.centerMeetingForm.controls.repeatsOnDay.hasError("repeatsOnDay")?7:-1)}}var rv=(()=>{class e{constructor(){this.formBuilder=T(nt),this.centersService=T(Jn),this.settingsService=T(At),this.dateUtils=T(Zt),this.route=T(Ie),this.router=T(qe),this.minDate=new Date(2e3,0,1),this.maxDate=new Date,this.route.data.subscribe(t=>{this.calendarTemplate=t.centersActionData,this.frequencyOptions=this.calendarTemplate.frequencyOptions,this.repeatsOnDays=this.calendarTemplate.repeatsOnDayOptions}),this.centerId=this.route.parent.snapshot.params.centerId}ngOnInit(){this.maxDate=this.settingsService.businessDate,this.createCenterMeetingForm(),this.buildDependencies()}createCenterMeetingForm(){this.centerMeetingForm=this.formBuilder.group({startDate:["",se.required],repeating:[!1]})}buildDependencies(){this.centerMeetingForm.get("repeating").valueChanges.subscribe(t=>{t?(this.centerMeetingForm.addControl("frequency",new it),this.centerMeetingForm.addControl("interval",new it),this.centerMeetingForm.get("frequency").valueChanges.subscribe(n=>{switch(this.centerMeetingForm.removeControl("repeatsOnDay"),n){case 1:this.repetitionIntervals=["1","2","3"];break;case 2:this.repetitionIntervals=["1","2","3"],this.centerMeetingForm.addControl("repeatsOnDay",new it("",se.required));break;case 3:this.repetitionIntervals=["1","2","3","4","5","6","7","8","9","10","11"];break;case 4:this.repetitionIntervals=["1","2","3","4","5"];break}}),this.centerMeetingForm.patchValue({frequency:1,interval:"1"})):(this.centerMeetingForm.removeControl("frequency"),this.centerMeetingForm.removeControl("interval"))})}submit(){let t=this.centerMeetingForm.value,n=this.settingsService.language.code,i=this.settingsService.dateFormat,s=`centers_${this.centerId}_CollectionMeeting`,d="1",u=this.centerMeetingForm.value.startDate;t.startDate instanceof Date&&(t.startDate=this.dateUtils.formatDate(u,i));let f=qt(at({},t),{title:s,typeId:d,dateFormat:i,locale:n});this.centersService.createCenterMeeting(this.centerId,f).subscribe(_=>{this.router.navigate(["../../general"],{relativeTo:this.route})})}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275cmp=me({type:e,selectors:[["mifosx-attach-center-meeting"]],decls:27,vars:24,consts:[["startDatePicker",""],[1,"container"],[3,"formGroup"],[1,"layout-column"],[3,"click"],["matInput","","required","","formControlName","startDate",3,"min","max","matDatepicker"],["matSuffix","",3,"for"],["labelPosition","before","formControlName","repeating",1,"m-t-10","m-b-10"],[1,"layout-row","align-center","gap-5px","responsive-column"],["type","button","mat-raised-button","",3,"routerLink"],["mat-raised-button","","color","primary",3,"click","disabled"],["formControlName","frequency"],[3,"value"],["formControlName","interval"],["formControlName","repeatsOnDay","required",""]],template:function(n,i){if(n&1){let s=Y();l(0,"div",1)(1,"mat-card")(2,"form",2)(3,"mat-card-content")(4,"div",3)(5,"mat-form-field",4),R("click",function(){V(s);let u=xe(12);return q(u.open())}),l(6,"mat-label"),c(7),p(8,"translate"),r(),b(9,"input",5)(10,"mat-datepicker-toggle",6)(11,"mat-datepicker",null,0),E(13,XIe,7,9,"mat-error"),r(),l(14,"mat-checkbox",7),c(15),p(16,"translate"),r(),E(17,t6e,8,4,"mat-form-field"),E(18,o6e,8,4,"mat-form-field"),E(19,l6e,8,4,"mat-form-field"),r()(),l(20,"mat-card-actions",8)(21,"button",9),c(22),p(23,"translate"),r(),l(24,"button",10),R("click",function(){return V(s),q(i.submit())}),c(25),p(26,"translate"),r()()()()()}if(n&2){let s=xe(12);a(2),g("formGroup",i.centerMeetingForm),a(5),h(m(8,15,"labels.inputs.Meeting Start Date")),a(2),g("min",i.minDate)("max",i.maxDate)("matDatepicker",s),a(),g("for",s),a(3),I(i.centerMeetingForm.controls.startDate.hasError("required")?13:-1),a(2),v(" ",m(16,17,"labels.inputs.Repeats?")," "),a(2),I(i.centerMeetingForm.contains("frequency")?17:-1),a(),I(i.centerMeetingForm.contains("interval")?18:-1),a(),I(i.centerMeetingForm.contains("repeatsOnDay")?19:-1),a(2),g("routerLink",oe(23,KIe)),a(),v(" ",m(23,19,"labels.buttons.Cancel")," "),a(2),g("disabled",!i.centerMeetingForm.valid),a(),v(" ",m(26,21,"labels.buttons.Submit")," ")}},dependencies:[ue,fe,tt,st,Ue,Xe,dt,Ze,et,Ae,$e,Je,Et,Fe,Be,ut,ai,ze,gt,ft,mi,di,pi,ve,fi,he],styles:[".container[_ngcontent-%COMP%]{max-width:37rem}"]})}}return e})();var s6e=()=>["../../"];function c6e(e,o){if(e&1&&(l(0,"mat-option",8),c(1),r()),e&2){let t=o.$implicit;g("value",t.id),a(),v(" ",t.value," ")}}function p6e(e,o){e&1&&(l(0,"mat-error"),c(1),p(2,"translate"),p(3,"translate"),l(4,"strong"),c(5),p(6,"translate"),r()()),e&2&&(a(),le(" ",m(2,3,"labels.inputs.Repetition Frequency")," ",m(3,5,"labels.commons.is")," "),a(4),h(m(6,7,"labels.commons.required")))}function m6e(e,o){if(e&1&&(l(0,"mat-option",8),c(1),r()),e&2){let t=o.$implicit;g("value",t),a(),v(" ",t," ")}}function d6e(e,o){e&1&&(l(0,"mat-error"),c(1),p(2,"translate"),p(3,"translate"),l(4,"strong"),c(5),p(6,"translate"),r()()),e&2&&(a(),le(" ",m(2,3,"labels.inputs.Repetition Interval")," ",m(3,5,"labels.commons.is")," "),a(4),h(m(6,7,"labels.commons.required")))}function u6e(e,o){if(e&1&&(l(0,"mat-option",8),c(1),r()),e&2){let t=o.$implicit;g("value",t.id),a(),v(" ",t.value," ")}}function f6e(e,o){e&1&&(l(0,"mat-error"),c(1),p(2,"translate"),l(3,"strong"),c(4),p(5,"translate"),r(),c(6),p(7,"translate"),r()),e&2&&(a(),v(" ",m(2,3,"labels.inputs.At least")," "),a(3),h(m(5,5,"labels.inputs.one")),a(2),v(" ",m(7,7,"labels.inputs.day must be selected")," "))}function h6e(e,o){if(e&1&&(l(0,"mat-form-field")(1,"mat-label"),c(2),p(3,"translate"),r(),l(4,"mat-select",16),Se(5,u6e,2,2,"mat-option",8,Pe),r(),E(7,f6e,8,9,"mat-error"),r()),e&2){let t=w();a(2),h(m(3,2,"labels.inputs.Repeats on Day")),a(3),we(t.repeatsOnDays),a(2),I(t.centerEditMeetingForm.controls.repeatsOnDay.hasError("repeatsOnDay")?7:-1)}}function g6e(e,o){e&1&&(l(0,"mat-error"),c(1),p(2,"translate"),p(3,"translate"),l(4,"strong"),c(5),p(6,"translate"),r()()),e&2&&(a(),le(" ",m(2,3,"labels.inputs.Changes Affection Date")," ",m(3,5,"labels.commons.is")," "),a(4),h(m(6,7,"labels.commons.required")))}var lv=(()=>{class e{constructor(){this.formBuilder=T(nt),this.centersService=T(Jn),this.settingsService=T(At),this.dateUtils=T(Zt),this.route=T(Ie),this.router=T(qe),this.minDate=new Date(2e3,0,1),this.maxDate=new Date,this.route.data.subscribe(t=>{this.calendarTemplate=t.centersActionData,this.frequencyOptions=this.calendarTemplate.frequencyOptions,this.repeatsOnDays=this.calendarTemplate.repeatsOnDayOptions}),this.calendarId=this.route.snapshot.queryParams.calendarId,this.centerId=this.route.parent.snapshot.params.centerId}ngOnInit(){this.maxDate=this.settingsService.businessDate,this.createEditCenterMeetingForm(),this.buildDependencies()}createEditCenterMeetingForm(){this.centerEditMeetingForm=this.formBuilder.group({startDate:["",se.required],frequency:["",se.required],interval:["",se.required]})}buildDependencies(){this.centerEditMeetingForm.get("frequency").valueChanges.subscribe(t=>{switch(this.centerEditMeetingForm.removeControl("repeatsOnDay"),t){case 1:this.repetitionIntervals=["1","2","3"];break;case 2:this.repetitionIntervals=["1","2","3"],this.centerEditMeetingForm.addControl("repeatsOnDay",new it("",se.required)),this.centerEditMeetingForm.get("repeatsOnDay").patchValue(this.calendarTemplate.repeatsOnDay.id);break;case 3:this.repetitionIntervals=["1","2","3","4","5","6","7","8","9","10","11"];break;case 4:this.repetitionIntervals=["1","2","3","4","5"];break}}),this.centerEditMeetingForm.patchValue({startDate:this.calendarTemplate.startDate&&new Date(this.calendarTemplate.startDate),frequency:this.calendarTemplate.frequency.id,interval:`${this.calendarTemplate.interval}`})}editSchedule(){let t={calendarId:this.calendarId};this.router.navigate(["../Edit Meeting Schedule"],{relativeTo:this.route,queryParams:t})}submit(){let t=this.centerEditMeetingForm.value,n=this.settingsService.language.code,i=this.settingsService.dateFormat,s=`centers_${this.centerId}_CollectionMeeting`,d="1",u=this.centerEditMeetingForm.value.startDate;t.startDate instanceof Date&&(t.startDate=this.dateUtils.formatDate(u,i));let f=qt(at({},t),{repeating:!0,title:s,typeId:d,dateFormat:i,locale:n});this.centersService.updateCenterMeeting(this.centerId,f,this.calendarId).subscribe(_=>{this.router.navigate(["../../"],{relativeTo:this.route})})}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275cmp=me({type:e,selectors:[["mifosx-edit-center-meeting"]],decls:46,vars:33,consts:[["startDatePicker",""],[1,"container","m-b-20","layout-row","align-end"],["mat-raised-button","","color","primary",3,"click"],["icon","edit",1,"m-r-10"],[1,"container"],[3,"formGroup"],[1,"layout-column"],["formControlName","frequency"],[3,"value"],["formControlName","interval"],[1,"m-b-5",3,"click"],["matInput","","required","","formControlName","startDate",3,"min","max","matDatepicker"],["matSuffix","",3,"for"],[1,"layout-row","align-center","gap-5px","responsive-column"],["type","button","mat-raised-button","",3,"routerLink"],["mat-raised-button","","color","primary",3,"click","disabled"],["formControlName","repeatsOnDay","required",""]],template:function(n,i){if(n&1){let s=Y();l(0,"div",1)(1,"button",2),R("click",function(){return V(s),q(i.editSchedule())}),b(2,"fa-icon",3),c(3),p(4,"translate"),r()(),l(5,"div",4)(6,"mat-card")(7,"form",5)(8,"mat-card-content")(9,"div",6)(10,"mat-form-field")(11,"mat-label"),c(12),p(13,"translate"),r(),l(14,"mat-select",7),Se(15,c6e,2,2,"mat-option",8,Pe),r(),E(17,p6e,7,9,"mat-error"),r(),l(18,"mat-form-field")(19,"mat-label"),c(20),p(21,"translate"),r(),l(22,"mat-select",9),Se(23,m6e,2,2,"mat-option",8,Pe),r(),E(25,d6e,7,9,"mat-error"),r(),E(26,h6e,8,4,"mat-form-field"),l(27,"mat-form-field",10),R("click",function(){V(s);let u=xe(34);return q(u.open())}),l(28,"mat-label"),c(29),p(30,"translate"),r(),b(31,"input",11)(32,"mat-datepicker-toggle",12)(33,"mat-datepicker",null,0),E(35,g6e,7,9,"mat-error"),l(36,"mat-hint"),c(37),p(38,"translate"),r()()()(),l(39,"mat-card-actions",13)(40,"button",14),c(41),p(42,"translate"),r(),l(43,"button",15),R("click",function(){return V(s),q(i.submit())}),c(44),p(45,"translate"),r()()()()()}if(n&2){let s=xe(34);a(3),v(" ",m(4,18,"labels.buttons.Edit Schedule")," "),a(4),g("formGroup",i.centerEditMeetingForm),a(5),h(m(13,20,"labels.inputs.Repetition Frequency")),a(3),we(i.frequencyOptions),a(2),I(i.centerEditMeetingForm.controls.frequency.hasError("repeatsOnDay")?17:-1),a(3),h(m(21,22,"labels.inputs.Repetition Interval")),a(3),we(i.repetitionIntervals),a(2),I(i.centerEditMeetingForm.controls.interval.hasError("repeatsOnDay")?25:-1),a(),I(i.centerEditMeetingForm.contains("repeatsOnDay")?26:-1),a(3),h(m(30,24,"labels.inputs.Above Changes are Effective from")),a(2),g("min",i.minDate)("max",i.maxDate)("matDatepicker",s),a(),g("for",s),a(3),I(i.centerEditMeetingForm.controls.startDate.hasError("required")?35:-1),a(2),v(" ",m(38,26,"labels.text.Repeats' and 'Repeats every")," "),a(3),g("routerLink",oe(32,s6e)),a(),v(" ",m(42,28,"labels.buttons.Cancel")," "),a(2),g("disabled",!i.centerEditMeetingForm.valid),a(),v(" ",m(45,30,"labels.buttons.Submit")," ")}},dependencies:[ue,fe,tt,st,Ue,Xe,dt,Ze,et,Ae,$e,Je,Et,Fe,Be,ut,ai,za,ze,gt,ft,mi,di,pi,ve,ke,he],styles:[".container[_ngcontent-%COMP%]{max-width:37rem}"]})}}return e})();var _6e=()=>["../../"];function C6e(e,o){if(e&1&&(l(0,"mat-option",5),c(1),p(2,"dateFormat"),r()),e&2){let t=o.$implicit;g("value",t),a(),v(" ",m(2,2,t)," ")}}function v6e(e,o){e&1&&(l(0,"mat-error"),c(1),p(2,"translate"),p(3,"translate"),l(4,"strong"),c(5),p(6,"translate"),r()()),e&2&&(a(),le(" ",m(2,3,"labels.inputs.Existing Meeting Date")," ",m(3,5,"labels.commons.is")," "),a(4),h(m(6,7,"labels.commons.required")))}function x6e(e,o){e&1&&(l(0,"mat-error"),c(1),p(2,"translate"),p(3,"translate"),l(4,"strong"),c(5),p(6,"translate"),r()()),e&2&&(a(),le(" ",m(2,3,"labels.inputs.Revised Meeting Date")," ",m(3,5,"labels.commons.is")," "),a(4),h(m(6,7,"labels.commons.required")))}var sv=(()=>{class e{constructor(){this.formBuilder=T(nt),this.centersService=T(Jn),this.settingsService=T(At),this.dateUtils=T(Zt),this.route=T(Ie),this.router=T(qe),this.minDate=new Date(2e3,0,1),this.maxDate=new Date,this.route.data.subscribe(t=>{this.calendarTemplate=t.centersActionData,this.nextMeetingDates=this.calendarTemplate.nextTenRecurringDates}),this.calendarId=this.route.snapshot.queryParams.calendarId,this.centerId=this.route.parent.snapshot.params.centerId}ngOnInit(){this.maxDate=this.settingsService.businessDate,this.createEditMeetingScheduleForm()}createEditMeetingScheduleForm(){this.centerEditMeetingScheduleForm=this.formBuilder.group({presentMeetingDate:["",se.required],newMeetingDate:["",se.required]})}submit(){let t=this.centerEditMeetingScheduleForm.value,n=this.settingsService.language.code,i=this.settingsService.dateFormat,s=!0,d=new Date(this.centerEditMeetingScheduleForm.value.presentMeetingDate);t.startDate instanceof Date&&(t.presentMeetingDate=this.dateUtils.formatDate(d,i));let u=this.centerEditMeetingScheduleForm.value.newMeetingDate;t.newMeetingDate instanceof Date&&(t.newMeetingDate=this.dateUtils.formatDate(u,i));let f=qt(at({},t),{reschedulebasedOnMeetingDates:s,dateFormat:i,locale:n});this.centersService.updateCenterMeeting(this.centerId,f,this.calendarId).subscribe(_=>{this.router.navigate(["../../"],{relativeTo:this.route})})}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275cmp=me({type:e,selectors:[["mifosx-edit-center-meeting-schedule"]],decls:29,vars:22,consts:[["newMeetingDatePicker",""],[1,"container"],[3,"formGroup"],[1,"layout-column"],["formControlName","presentMeetingDate"],[3,"value"],[3,"click"],["matInput","","required","","formControlName","newMeetingDate",3,"min","max","matDatepicker"],["matSuffix","",3,"for"],[1,"layout-row","align-center","gap-5px","responsive-column"],["type","button","mat-raised-button","",3,"routerLink"],["mat-raised-button","","color","primary",3,"click","disabled"]],template:function(n,i){if(n&1){let s=Y();l(0,"div",1)(1,"mat-card")(2,"form",2)(3,"mat-card-content")(4,"div",3)(5,"mat-form-field")(6,"mat-label"),c(7),p(8,"translate"),r(),l(9,"mat-select",4),Se(10,C6e,3,4,"mat-option",5,Pe),r(),E(12,v6e,7,9,"mat-error"),r(),l(13,"mat-form-field",6),R("click",function(){V(s);let u=xe(20);return q(u.open())}),l(14,"mat-label"),c(15),p(16,"translate"),r(),b(17,"input",7)(18,"mat-datepicker-toggle",8)(19,"mat-datepicker",null,0),E(21,x6e,7,9,"mat-error"),r()()(),l(22,"mat-card-actions",9)(23,"button",10),c(24),p(25,"translate"),r(),l(26,"button",11),R("click",function(){return V(s),q(i.submit())}),c(27),p(28,"translate"),r()()()()()}if(n&2){let s=xe(20);a(2),g("formGroup",i.centerEditMeetingScheduleForm),a(5),h(m(8,13,"labels.inputs.Existing Meeting Date")),a(3),we(i.nextMeetingDates),a(2),I(i.centerEditMeetingScheduleForm.controls.presentMeetingDate.hasError("repeatsOnDay")?12:-1),a(3),h(m(16,15,"labels.inputs.Revised Meeting Date")),a(2),g("min",i.minDate)("max",i.maxDate)("matDatepicker",s),a(),g("for",s),a(3),I(i.centerEditMeetingScheduleForm.controls.newMeetingDate.hasError("required")?21:-1),a(2),g("routerLink",oe(21,_6e)),a(),v(" ",m(25,17,"labels.buttons.Cancel")," "),a(2),g("disabled",!i.centerEditMeetingScheduleForm.valid),a(),v(" ",m(28,19,"labels.buttons.Submit")," ")}},dependencies:[ue,fe,tt,st,Ue,Xe,dt,Ze,et,Ae,$e,Je,Et,Fe,Be,ut,ai,ze,gt,ft,mi,di,pi,ve,Pi,he],styles:[".container[_ngcontent-%COMP%]{max-width:37rem}"]})}}return e})();function b6e(e,o){if(e&1&&(l(0,"mat-option",6),c(1),r()),e&2){let t=o.$implicit;g("value",t),a(),v(" ",t.name," ")}}function y6e(e,o){if(e&1){let t=Y();l(0,"div",16)(1,"span",17),c(2),r(),l(3,"button",18),R("click",function(){let i=V(t),s=i.$implicit,d=i.$index,u=w(2);return q(u.removeGroup(d,s))}),b(4,"fa-icon",19),r()()}if(e&2){let t=o.$implicit;a(2),h(t.name)}}function S6e(e,o){if(e&1&&(l(0,"mat-nav-list"),Se(1,y6e,5,1,"div",16,Pe),r()),e&2){let t=w();a(),we(t.groupMembers)}}var cv=(()=>{class e{constructor(){this.route=T(Ie),this.centersService=T(Jn),this.groupsService=T(An),this.dialog=T(Ht),this.groupsData=[],this.groupMembers=[],this.groupChoice=new it(""),this.route.data.subscribe(t=>{this.centerData=t.centersActionData,this.groupMembers=t.centersActionData.groupMembers})}ngAfterViewInit(){this.groupChoice.valueChanges.subscribe(t=>{t.length>=2&&this.groupsService.getFilteredGroups("name","ASC",t,this.centerData.officeId,"true").subscribe(n=>{this.groupsData=n})})}addGroup(){this.groupMembers!==null&&this.groupMembers!==void 0?this.groupMembers.includes(this.groupChoice.value)||this.centersService.executeCenterActionCommand(this.centerData.id,"associateGroups",{groupMembers:[this.groupChoice.value.id]}).subscribe(()=>{this.groupMembers.push(this.groupChoice.value)}):this.centersService.executeCenterActionCommand(this.centerData.id,"associateGroups",{groupMembers:[this.groupChoice.value.id]}).subscribe(()=>{this.groupMembers.push(this.groupChoice.value)})}removeGroup(t,n){this.dialog.open(vi,{data:{deleteContext:`group member: ${n.name}`}}).afterClosed().subscribe(s=>{s.delete&&this.centersService.executeCenterActionCommand(this.centerData.id,"disassociateGroups",{groupMembers:[n.id]}).subscribe(()=>{this.groupMembers.splice(t,1)})})}displayGroup(t){return t?t.name:void 0}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275cmp=me({type:e,selectors:[["mifosx-manage-groups"]],decls:41,vars:25,consts:[["groupsAutocomplete","matAutocomplete"],[1,"container","layout-row","gap-3percent"],[1,"group-card","flex-fill","layout-column","gap-2percent"],[1,"flex-30"],["matInput","",3,"formControl","matAutocomplete"],["autoActiveFirstOption","",3,"displayWith"],[3,"value"],[1,"mat-table"],[1,"mat-header-row"],[1,"mat-header-cell"],["mat-icon-button","",3,"click"],["icon","plus"],[1,"mat-row"],[1,"mat-cell"],[1,"flex-50"],["matSubheader",""],["mat-list-item","",1,"member-item","center-gap"],["matLine","",1,"p-t-10"],["mat-icon-button","","color","warn","aria-label","Remove group",1,"delete-btn",3,"click"],["icon","trash"]],template:function(n,i){if(n&1){let s=Y();l(0,"div",1)(1,"mat-card",2)(2,"mat-form-field",3)(3,"mat-label"),c(4),p(5,"translate"),r(),b(6,"input",4),r(),l(7,"mat-autocomplete",5,0),Se(9,b6e,2,2,"mat-option",6,Pe),r(),l(11,"div",7)(12,"div",8)(13,"div",9),c(14),p(15,"translate"),r(),l(16,"button",10),R("click",function(){return V(s),q(i.addGroup())}),b(17,"fa-icon",11),r()(),l(18,"div",12)(19,"div",13),c(20),p(21,"translate"),r(),l(22,"div",13),c(23),r()(),l(24,"div",12)(25,"div",13),c(26),p(27,"translate"),r(),l(28,"div",13),c(29),r()(),l(30,"div",12)(31,"div",13),c(32),p(33,"translate"),r(),l(34,"div",13),c(35),r()()()(),l(36,"mat-card",14)(37,"h3",15),c(38),p(39,"translate"),r(),E(40,S6e,3,0,"mat-nav-list"),r()()}if(n&2){let s=xe(8);a(4),h(m(5,13,"labels.inputs.Add Groups")),a(2),g("formControl",i.groupChoice)("matAutocomplete",s),a(),g("displayWith",i.displayGroup),a(2),we(i.groupsData),a(5),h(m(15,15,"labels.inputs.Group Details")),a(6),h(m(21,17,"labels.inputs.name")),a(3),h(i.groupChoice.value.name),a(3),h(m(27,19,"labels.inputs.Id")),a(3),h(i.groupChoice.value.id),a(3),h(m(33,21,"labels.inputs.Office")),a(3),h(i.groupChoice.value.officeName),a(3),h(m(39,23,"labels.heading.Group Members")),a(2),I(i.groupMembers!=null&&i.groupMembers.length?40:-1)}},dependencies:[ue,fe,st,Ue,_n,$e,Fe,Be,ze,ft,er,Za,wi,ke,Ep,pa,ca,he],styles:[".container[_ngcontent-%COMP%]{max-width:70rem}.container[_ngcontent-%COMP%] .mat-table[_ngcontent-%COMP%]{display:block;font-family:Roboto,Helvetica Neue,sans-serif;width:100%;margin-top:-2rem;padding:1.5rem}.container[_ngcontent-%COMP%] .mat-row[_ngcontent-%COMP%], .container[_ngcontent-%COMP%] .mat-header-row[_ngcontent-%COMP%]{display:flex;border-bottom:1px solid var(--border-color-light, #eee);color:var(--text-color, inherit);font-weight:500;align-items:center;min-height:48px;padding:0 24px}.container[_ngcontent-%COMP%] .mat-cell[_ngcontent-%COMP%], .container[_ngcontent-%COMP%] .mat-header-cell[_ngcontent-%COMP%]{flex:1;overflow:hidden;word-wrap:break-word;flex-direction:column}.container[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{padding-left:0;margin-bottom:0;font-weight:500;border-bottom:2px solid var(--border-color-light, #eee);padding-bottom:1rem}.container[_ngcontent-%COMP%] .group-card[_ngcontent-%COMP%]{max-height:20rem;margin-bottom:1rem;padding:1.5rem;box-shadow:0 2px 4px #0000001a;border:1px solid var(--border-color, #ddd);border-radius:8px;transition:background-color .3s ease,border-color .3s ease}.container[_ngcontent-%COMP%] .p-t-10[_ngcontent-%COMP%]{padding-top:10px;font-weight:500;margin-left:1rem}.container[_ngcontent-%COMP%] .flex-50[_ngcontent-%COMP%]{max-height:20rem;margin-bottom:1rem;padding:1.5rem;box-shadow:0 2px 4px #0000001a;border:1px solid var(--border-color, #ddd);border-radius:8px;transition:background-color .3s ease,border-color .3s ease}.container[_ngcontent-%COMP%] .flex-50[_ngcontent-%COMP%] .mat-nav-list[_ngcontent-%COMP%] .member-item[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.5rem;padding:.25rem 0}.container[_ngcontent-%COMP%] .flex-50[_ngcontent-%COMP%] .mat-nav-list[_ngcontent-%COMP%] .center-gap[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.5rem}.container[_ngcontent-%COMP%] .flex-50[_ngcontent-%COMP%] .mat-nav-list[_ngcontent-%COMP%] .member-item[_ngcontent-%COMP%] .p-t-10[_ngcontent-%COMP%]{margin:0;font-weight:500}.container[_ngcontent-%COMP%] .flex-50[_ngcontent-%COMP%] .mat-nav-list[_ngcontent-%COMP%] .delete-btn[_ngcontent-%COMP%]{margin-left:.25rem}"]})}}return e})();var w6e=()=>["../../"],pv=(()=>{class e{constructor(){this.sanitizer=T(Zs),this.route=T(Ie),this.route.data.subscribe(t=>{this.staffAssignmentHistoryData=t.centersActionData})}ngOnInit(){let t=this.staffAssignmentHistoryData.headers.get("Content-Type"),n=new Blob([this.staffAssignmentHistoryData.body],{type:t}),i=URL.createObjectURL(n);this.pentahoUrl=this.sanitizer.bypassSecurityTrustResourceUrl(i)}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275cmp=me({type:e,selectors:[["mifosx-staff-assignment-history"]],decls:7,vars:6,consts:[[1,"container"],[1,"back-button"],["type","button","color","primary","mat-raised-button","",3,"routerLink"],["icon","arrow-left",1,"m-r-10"],["frameborder","0","width","100%","height","600px;",3,"src"]],template:function(n,i){n&1&&(l(0,"mat-card",0)(1,"div",1)(2,"button",2),b(3,"fa-icon",3),c(4),p(5,"translate"),r()(),b(6,"iframe",4),r()),n&2&&(a(2),g("routerLink",oe(5,w6e)),a(2),v("",m(5,3,"labels.buttons.Back")," "),a(2),g("src",i.pentahoUrl,gg))},dependencies:[ue,fe,Ae,$e,ve,ke,he],styles:[".container[_ngcontent-%COMP%]{max-width:60rem}.container[_ngcontent-%COMP%] .back-button[_ngcontent-%COMP%]{max-height:2%;margin-bottom:2%}"]})}}return e})();function P6e(e,o){e&1&&b(0,"mifosx-activate-center")}function T6e(e,o){e&1&&b(0,"mifosx-center-assign-staff")}function M6e(e,o){e&1&&b(0,"mifosx-close-center")}function D6e(e,o){e&1&&b(0,"mifosx-center-attendance")}function E6e(e,o){e&1&&b(0,"mifosx-attach-center-meeting")}function I6e(e,o){e&1&&b(0,"mifosx-edit-center-meeting")}function O6e(e,o){e&1&&b(0,"mifosx-edit-center-meeting-schedule")}function A6e(e,o){e&1&&b(0,"mifosx-manage-groups")}function F6e(e,o){e&1&&b(0,"mifosx-staff-assignment-history")}var mv=(()=>{class e{constructor(){this.route=T(Ie),this.router=T(qe),this.actions={Activate:!1,"Assign Staff":!1,Close:!1,Attendance:!1,"Attach Meeting":!1,"Edit Meeting":!1,"Edit Meeting Schedule":!1,"Manage Groups":!1,"Staff Assignment History":!1},this.router.routeReuseStrategy.shouldReuseRoute=()=>!1;let t=this.route.snapshot.params.action;t&&t in this.actions&&(this.actions[t]=!0)}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275cmp=me({type:e,selectors:[["mifosx-center-actions"]],decls:9,vars:9,template:function(n,i){n&1&&(E(0,P6e,1,0,"mifosx-activate-center"),E(1,T6e,1,0,"mifosx-center-assign-staff"),E(2,M6e,1,0,"mifosx-close-center"),E(3,D6e,1,0,"mifosx-center-attendance"),E(4,E6e,1,0,"mifosx-attach-center-meeting"),E(5,I6e,1,0,"mifosx-edit-center-meeting"),E(6,O6e,1,0,"mifosx-edit-center-meeting-schedule"),E(7,A6e,1,0,"mifosx-manage-groups"),E(8,F6e,1,0,"mifosx-staff-assignment-history")),n&2&&(I(i.actions.Activate?0:-1),a(),I(i.actions["Assign Staff"]?1:-1),a(),I(i.actions.Close?2:-1),a(),I(i.actions.Attendance?3:-1),a(),I(i.actions["Attach Meeting"]?4:-1),a(),I(i.actions["Edit Meeting"]?5:-1),a(),I(i.actions["Edit Meeting Schedule"]?6:-1),a(),I(i.actions["Manage Groups"]?7:-1),a(),I(i.actions["Staff Assignment History"]?8:-1))},dependencies:[ue,fe,iv,nv,ov,av,rv,lv,sv,cv,pv],encapsulation:2})}}return e})();var Kf=(()=>{class e{constructor(){this.centersService=T(Jn)}resolve(t){let n=t.paramMap.get("centerId");return this.centersService.getCenterData(n)}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275prov=Re({token:e,factory:e.\u0275fac})}}return e})();var Xf=(()=>{class e{constructor(){this.centersService=T(Jn)}resolve(t){let n=t.parent.paramMap.get("centerId");return this.centersService.getSavingsAccountDetails(n)}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275prov=Re({token:e,factory:e.\u0275fac})}}return e})();var Zf=(()=>{class e{constructor(){this.centersService=T(Jn)}resolve(t){let n=t.parent.paramMap.get("centerId");return this.centersService.getCenterData(n)}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275prov=Re({token:e,factory:e.\u0275fac})}}return e})();var e1=(()=>{class e{constructor(){this.centersService=T(Jn)}resolve(t){let n=t.parent.paramMap.get("centerId");return this.centersService.getCenterSummary(n)}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275prov=Re({token:e,factory:e.\u0275fac})}}return e})();var t1=(()=>{class e{constructor(){this.centersService=T(Jn)}resolve(t){let n=t.parent.parent.paramMap.get("centerId");return this.centersService.getCenterNotes(n)}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275prov=Re({token:e,factory:e.\u0275fac})}}return e})();var i1=(()=>{class e{constructor(){this.centersService=T(Jn)}resolve(t){let n=t.parent.parent.paramMap.get("centerId"),i=t.paramMap.get("datatableName");return this.centersService.getCenterDatatable(n,i)}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275prov=Re({token:e,factory:e.\u0275fac})}}return e})();var n1=(()=>{class e{constructor(){this.centersService=T(Jn)}resolve(){return this.centersService.getcenterDatatables()}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275prov=Re({token:e,factory:e.\u0275fac})}}return e})();var f5=(()=>{class e{constructor(){this.centersService=T(Jn)}resolve(t){let n=t.paramMap.get("action"),i=t.paramMap.get("centerId")||t.parent.parent.paramMap.get("centerId");switch(n){case"Assign Staff":return this.centersService.getGroupStaffData(i);case"Attendance":return this.centersService.getCentersData(i,"groupMembers,collectionMeetingCalendar");case"Manage Groups":return this.centersService.getCentersData(i,"groupMembers","true");case"Attach Meeting":return this.centersService.getCalendarTemplate(i);case"Edit Meeting":case"Edit Meeting Schedule":let s=t.queryParamMap.get("calendarId");return this.centersService.getCalendarAndTemplate(i,s);case"Staff Assignment History":return this.centersService.getStaffAssignmentHistoryData("Staff Assignment History",i,"default","en");default:return}}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275prov=Re({token:e,factory:e.\u0275fac})}}return e})();var h5=(()=>{class e{constructor(){this.centersService=T(Jn)}resolve(t){let n=t.parent.paramMap.get("centerId");return this.centersService.getCenterAndTemplateData(n)}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275prov=Re({token:e,factory:e.\u0275fac})}}return e})();var k6e=[_o.withShell([{path:"centers",data:{title:"Centers",breadcrumb:"Centers"},children:[{path:"",component:Y2},{path:"create",component:J2,data:{title:"Create Center",breadcrumb:"Create"},resolve:{offices:Hr}},{path:":centerId",data:{title:"Centers View",routeParamBreadcrumb:"centerId"},resolve:{centerViewData:Kf},children:[{path:"",component:K2,resolve:{centerDatatables:n1},children:[{path:"general",component:X2,data:{title:"General",breadcrumb:"General",routeParamBreadcrumb:!1},resolve:{centerSummaryData:e1,centerViewData:Zf,savingsAccountData:Xf}},{path:"notes",component:Z2,data:{title:"Notes",breadcrumb:"Notes",routeParamBreadcrumb:!1},resolve:{centerNotes:t1}},{path:"datatables",children:[{path:":datatableName",component:ev,data:{title:"Data Table View",routeParamBreadcrumb:"datatableName"},resolve:{centerDatatable:i1}}]}]},{path:"actions/:action",data:{title:"Center Actions",breadcrumb:"action",routeParamBreadcrumb:"action"},component:mv,resolve:{centersActionData:f5}},{path:"edit",component:tv,data:{title:"Edit Center",breadcrumb:"Edit",routeParamBreadcrumb:!1},resolve:{centerData:h5}}]}]}])],rN=(()=>{class e{static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275mod=Gi({type:e})}static{this.\u0275inj=Hi({providers:[Hr,Kf,Xf,Zf,e1,t1,i1,n1,f5,h5],imports:[gn.forChild(k6e),gn]})}}return e})();var lN=(()=>{class e{static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275mod=Gi({type:e})}static{this.\u0275inj=Hi({providers:[Kf,i1,n1,e1,Zf,Xf,t1],imports:[oo,rN,ha,Ir,Y2,J2,K2,X2,Z2,ev,mv,iv,nv,ov,av,rv,lv,sv,cv,pv,tv]})}}return e})();var B6e=["chartofAccounts"],R6e=["templateChartofAccounts"],N6e=["accountsLinked"],L6e=["templateAccountsLinked"],V6e=["migrateOpeningBalances"],q6e=["templateMigrateOpeningBalances"],z6e=["closingEntries"],H6e=["templateClosingEntries"],G6e=["createJournalEntries"],j6e=["templateCreateJournalEntries"],sN=()=>["journal-entries/frequent-postings"],cN=()=>["journal-entries/create"],pN=()=>["journal-entries"],mN=()=>["financial-activity-mappings"],dN=()=>["migrate-opening-balances"],uN=()=>["chart-of-accounts"],fN=()=>["closing-entries"],hN=()=>["accounting-rules"],gN=()=>["periodic-accruals"],_N=()=>["provisioning-entries"];function $6e(e,o){e&1&&(l(0,"p",19),c(1),p(2,"translate"),r()),e&2&&(g("routerLink",oe(4,sN)),a(),v(" ",m(2,2,"labels.text.These are predefined postings")," "))}function U6e(e,o){if(e&1){let t=Y();l(0,"fa-icon",23),R("click",function(){V(t);let i=w(2);return q(i.arrowBooleansToggle(0))}),r()}}function W6e(e,o){if(e&1){let t=Y();l(0,"fa-icon",24),R("click",function(){V(t);let i=w(2);return q(i.arrowBooleansToggle(0))}),r()}}function Q6e(e,o){if(e&1&&(l(0,"mat-list-item")(1,"div",14)(2,"div",15)(3,"mat-icon",16),b(4,"fa-icon",17),r(),l(5,"div",18),c(6),p(7,"translate"),E(8,$6e,3,5,"p",19),r()(),l(9,"div",20),E(10,U6e,1,0,"fa-icon",21),E(11,W6e,1,0,"fa-icon",22),r()()()),e&2){let t=w();a(2),g("routerLink",oe(7,sN)),a(4),v(" ",m(7,5,"labels.heading.Frequent Postings")," "),a(2),I(t.arrowBooleans[0]?8:-1),a(2),I(t.arrowBooleans[0]?-1:10),a(),I(t.arrowBooleans[0]?11:-1)}}function Y6e(e,o){e&1&&(l(0,"p",19),c(1),p(2,"translate"),r()),e&2&&(g("routerLink",oe(4,cN)),a(),v(" ",m(2,2,"labels.text.Manual journal entry transactions recorded in a journal")," "))}function J6e(e,o){if(e&1){let t=Y();l(0,"fa-icon",23),R("click",function(){V(t);let i=w(2);return q(i.arrowBooleansToggle(1))}),r()}}function K6e(e,o){if(e&1){let t=Y();l(0,"fa-icon",24),R("click",function(){V(t);let i=w(2);return q(i.arrowBooleansToggle(1))}),r()}}function X6e(e,o){if(e&1&&(l(0,"mat-list-item")(1,"div",14)(2,"div",15)(3,"mat-icon",16),b(4,"fa-icon",25),r(),l(5,"div",18),c(6),p(7,"translate"),E(8,Y6e,3,5,"p",19),r()(),l(9,"div",20),E(10,J6e,1,0,"fa-icon",21),E(11,K6e,1,0,"fa-icon",22),r()()()),e&2){let t=w();a(2),g("routerLink",oe(7,cN)),a(4),v(" ",m(7,5,"labels.heading.Create Journal Entries")," "),a(2),I(t.arrowBooleans[1]?8:-1),a(2),I(t.arrowBooleans[1]?-1:10),a(),I(t.arrowBooleans[1]?11:-1)}}function Z6e(e,o){e&1&&(l(0,"p",19),c(1),p(2,"translate"),r()),e&2&&(g("routerLink",oe(4,pN)),a(),v(" ",m(2,2,"labels.text.Advanced search option for journal entries")," "))}function eOe(e,o){if(e&1){let t=Y();l(0,"fa-icon",23),R("click",function(){V(t);let i=w(2);return q(i.arrowBooleansToggle(2))}),r()}}function tOe(e,o){if(e&1){let t=Y();l(0,"fa-icon",24),R("click",function(){V(t);let i=w(2);return q(i.arrowBooleansToggle(2))}),r()}}function iOe(e,o){if(e&1&&(l(0,"mat-list-item")(1,"div",14)(2,"div",15)(3,"mat-icon",16),b(4,"fa-icon",26),r(),l(5,"div",18),c(6),p(7,"translate"),E(8,Z6e,3,5,"p",19),r()(),l(9,"div",20),E(10,eOe,1,0,"fa-icon",21),E(11,tOe,1,0,"fa-icon",22),r()()()),e&2){let t=w();a(2),g("routerLink",oe(7,pN)),a(4),v(" ",m(7,5,"labels.heading.Search Journal Entries")," "),a(2),I(t.arrowBooleans[2]?8:-1),a(2),I(t.arrowBooleans[2]?-1:10),a(),I(t.arrowBooleans[2]?11:-1)}}function nOe(e,o){e&1&&(l(0,"p",19),c(1),p(2,"translate"),r()),e&2&&(g("routerLink",oe(4,mN)),a(),v(" ",m(2,2,"labels.text.List of Financial Activities and GL Account Mappings")," "))}function oOe(e,o){if(e&1){let t=Y();l(0,"fa-icon",23),R("click",function(){V(t);let i=w(2);return q(i.arrowBooleansToggle(3))}),r()}}function aOe(e,o){if(e&1){let t=Y();l(0,"fa-icon",24),R("click",function(){V(t);let i=w(2);return q(i.arrowBooleansToggle(3))}),r()}}function rOe(e,o){if(e&1&&(l(0,"mat-list-item")(1,"div",14)(2,"div",15)(3,"mat-icon",16),b(4,"fa-icon",27),r(),l(5,"div",18),c(6),p(7,"translate"),E(8,nOe,3,5,"p",19),r()(),l(9,"div",20),E(10,oOe,1,0,"fa-icon",21),E(11,aOe,1,0,"fa-icon",22),r()()()),e&2){let t=w();a(2),g("routerLink",oe(7,mN)),a(4),v(" ",m(7,5,"labels.heading.Accounts Linked to Financial Activities")," "),a(2),I(t.arrowBooleans[3]?8:-1),a(2),I(t.arrowBooleans[3]?-1:10),a(),I(t.arrowBooleans[3]?11:-1)}}function lOe(e,o){e&1&&(l(0,"p",19),c(1),p(2,"translate"),r()),e&2&&(g("routerLink",oe(4,dN)),a(),v(" ",m(2,2,"labels.text.Set or update office-level opening balances for GL accounts")," "))}function sOe(e,o){if(e&1){let t=Y();l(0,"fa-icon",23),R("click",function(){V(t);let i=w(2);return q(i.arrowBooleansToggle(4))}),r()}}function cOe(e,o){if(e&1){let t=Y();l(0,"fa-icon",24),R("click",function(){V(t);let i=w(2);return q(i.arrowBooleansToggle(4))}),r()}}function pOe(e,o){if(e&1&&(l(0,"mat-list-item")(1,"div",14)(2,"div",15)(3,"mat-icon",16),b(4,"fa-icon",28),r(),l(5,"div",18),c(6),p(7,"translate"),E(8,lOe,3,5,"p",19),r()(),l(9,"div",20),E(10,sOe,1,0,"fa-icon",21),E(11,cOe,1,0,"fa-icon",22),r()()()),e&2){let t=w();a(2),g("routerLink",oe(7,dN)),a(4),v(" ",m(7,5,"labels.heading.Migrate Opening Balances (Office-wise)")," "),a(2),I(t.arrowBooleans[4]?8:-1),a(2),I(t.arrowBooleans[4]?-1:10),a(),I(t.arrowBooleans[4]?11:-1)}}function mOe(e,o){e&1&&(l(0,"p",19),c(1),p(2,"translate"),r()),e&2&&(g("routerLink",oe(4,uN)),a(),v(" ",m(2,2,"labels.text.List of accounts used by the organization")," "))}function dOe(e,o){if(e&1){let t=Y();l(0,"fa-icon",23),R("click",function(){V(t);let i=w(2);return q(i.arrowBooleansToggle(5))}),r()}}function uOe(e,o){if(e&1){let t=Y();l(0,"fa-icon",24),R("click",function(){V(t);let i=w(2);return q(i.arrowBooleansToggle(5))}),r()}}function fOe(e,o){if(e&1&&(l(0,"mat-list-item")(1,"div",14)(2,"div",15)(3,"mat-icon",16),b(4,"fa-icon",29),r(),l(5,"div",18),c(6),p(7,"translate"),E(8,mOe,3,5,"p",19),r()(),l(9,"div",20),E(10,dOe,1,0,"fa-icon",21),E(11,uOe,1,0,"fa-icon",22),r()()()),e&2){let t=w();a(2),g("routerLink",oe(7,uN)),a(4),v(" ",m(7,5,"labels.heading.Chart of Accounts")," "),a(2),I(t.arrowBooleans[5]?8:-1),a(2),I(t.arrowBooleans[5]?-1:10),a(),I(t.arrowBooleans[5]?11:-1)}}function hOe(e,o){e&1&&(l(0,"p",19),c(1),p(2,"translate"),r()),e&2&&(g("routerLink",oe(4,fN)),a(),v(" ",m(2,2,"labels.text.Journal entries made at the end of accounting period")," "))}function gOe(e,o){if(e&1){let t=Y();l(0,"fa-icon",23),R("click",function(){V(t);let i=w(2);return q(i.arrowBooleansToggle(6))}),r()}}function _Oe(e,o){if(e&1){let t=Y();l(0,"fa-icon",24),R("click",function(){V(t);let i=w(2);return q(i.arrowBooleansToggle(6))}),r()}}function COe(e,o){if(e&1&&(l(0,"mat-list-item")(1,"div",14)(2,"div",15)(3,"mat-icon",16),b(4,"fa-icon",30),r(),l(5,"div",18),c(6),p(7,"translate"),E(8,hOe,3,5,"p",19),r()(),l(9,"div",20),E(10,gOe,1,0,"fa-icon",21),E(11,_Oe,1,0,"fa-icon",22),r()()()),e&2){let t=w();a(2),g("routerLink",oe(7,fN)),a(4),v(" ",m(7,5,"labels.heading.Closing Entries")," "),a(2),I(t.arrowBooleans[6]?8:-1),a(2),I(t.arrowBooleans[6]?-1:10),a(),I(t.arrowBooleans[6]?11:-1)}}function vOe(e,o){e&1&&(l(0,"p",19),c(1),p(2,"translate"),r()),e&2&&(g("routerLink",oe(4,hN)),a(),v(" ",m(2,2,"labels.text.List of all accounting rules")," "))}function xOe(e,o){if(e&1){let t=Y();l(0,"fa-icon",23),R("click",function(){V(t);let i=w(2);return q(i.arrowBooleansToggle(7))}),r()}}function bOe(e,o){if(e&1){let t=Y();l(0,"fa-icon",24),R("click",function(){V(t);let i=w(2);return q(i.arrowBooleansToggle(7))}),r()}}function yOe(e,o){if(e&1&&(l(0,"mat-list-item")(1,"div",14)(2,"div",15)(3,"mat-icon",16),b(4,"fa-icon",31),r(),l(5,"div",18),c(6),p(7,"translate"),E(8,vOe,3,5,"p",19),r()(),l(9,"div",20),E(10,xOe,1,0,"fa-icon",21),E(11,bOe,1,0,"fa-icon",22),r()()()),e&2){let t=w();a(2),g("routerLink",oe(7,hN)),a(4),v(" ",m(7,5,"labels.heading.Accounting Rules")," "),a(2),I(t.arrowBooleans[7]?8:-1),a(2),I(t.arrowBooleans[7]?-1:10),a(),I(t.arrowBooleans[7]?11:-1)}}function SOe(e,o){e&1&&(l(0,"p",19),c(1),p(2,"translate"),r()),e&2&&(g("routerLink",oe(4,gN)),a(),v(" ",m(2,2,"labels.text.Accrues income, expenses and liabilities")," "))}function wOe(e,o){if(e&1){let t=Y();l(0,"fa-icon",23),R("click",function(){V(t);let i=w(2);return q(i.arrowBooleansToggle(8))}),r()}}function POe(e,o){if(e&1){let t=Y();l(0,"fa-icon",24),R("click",function(){V(t);let i=w(2);return q(i.arrowBooleansToggle(8))}),r()}}function TOe(e,o){if(e&1&&(l(0,"mat-list-item")(1,"div",14)(2,"div",15)(3,"mat-icon",16),b(4,"fa-icon",32),r(),l(5,"div",18),c(6),p(7,"translate"),E(8,SOe,3,5,"p",19),r()(),l(9,"div",20),E(10,wOe,1,0,"fa-icon",21),E(11,POe,1,0,"fa-icon",22),r()()()),e&2){let t=w();a(2),g("routerLink",oe(7,gN)),a(4),v(" ",m(7,5,"labels.heading.Accruals")," "),a(2),I(t.arrowBooleans[8]?8:-1),a(2),I(t.arrowBooleans[8]?-1:10),a(),I(t.arrowBooleans[8]?11:-1)}}function MOe(e,o){e&1&&(l(0,"p",19),c(1),p(2,"translate"),r()),e&2&&(g("routerLink",oe(4,_N)),a(),v(" ",m(2,2,"labels.text.Create provisioning entries")," "))}function DOe(e,o){if(e&1){let t=Y();l(0,"fa-icon",23),R("click",function(){V(t);let i=w(2);return q(i.arrowBooleansToggle(9))}),r()}}function EOe(e,o){if(e&1){let t=Y();l(0,"fa-icon",24),R("click",function(){V(t);let i=w(2);return q(i.arrowBooleansToggle(9))}),r()}}function IOe(e,o){if(e&1&&(l(0,"mat-list-item")(1,"div",14)(2,"div",15)(3,"mat-icon",16),b(4,"fa-icon",33),r(),l(5,"div",18),c(6),p(7,"translate"),E(8,MOe,3,5,"p",19),r()(),l(9,"div",20),E(10,DOe,1,0,"fa-icon",21),E(11,EOe,1,0,"fa-icon",22),r()()()),e&2){let t=w();a(2),g("routerLink",oe(7,_N)),a(4),v(" ",m(7,5,"labels.heading.Provisioning Entries")," "),a(2),I(t.arrowBooleans[9]?8:-1),a(2),I(t.arrowBooleans[9]?-1:10),a(),I(t.arrowBooleans[9]?11:-1)}}function OOe(e,o){if(e&1){let t=Y();l(0,"h2"),c(1),p(2,"translate"),r(),l(3,"p",34),c(4),p(5,"translate"),r(),l(6,"div",35)(7,"button",36),R("click",function(){let i=V(t).popover,s=w();return i.close(),q(s.configurationWizardService.closeConfigWizard())}),c(8),p(9,"translate"),r(),l(10,"button",37),R("click",function(){let i=V(t).popover,s=w();return i.close(),q(s.previousStepChartofAccounts())}),c(11),p(12,"translate"),r(),l(13,"button",37),R("click",function(){let i=V(t).popover,s=w();return i.close(),q(s.nextStepChartofAccounts())}),c(14),p(15,"translate"),r()()}e&2&&(a(),h(m(2,5,"labels.heading.Chart of Accounts")),a(3),h(m(5,7,"labels.text.The Chart of Accounts - General Ledger Setup")),a(4),v(" ",m(9,9,"labels.buttons.Close")," "),a(3),v(" ",m(12,11,"labels.buttons.Back")," "),a(3),v(" ",m(15,13,"labels.buttons.Next")," "))}function AOe(e,o){if(e&1){let t=Y();l(0,"h2"),c(1),p(2,"translate"),r(),l(3,"p",38),c(4),p(5,"translate"),r(),l(6,"div",35)(7,"button",36),R("click",function(){let i=V(t).popover,s=w();return i.close(),q(s.configurationWizardService.closeConfigWizard())}),c(8),p(9,"translate"),r(),l(10,"button",37),R("click",function(){let i=V(t).popover,s=w();return i.close(),q(s.previousStepAccountsLinked())}),c(11),p(12,"translate"),r(),l(13,"button",37),R("click",function(){let i=V(t).popover,s=w();return i.close(),q(s.nextStepAccountsLinked())}),c(14),p(15,"translate"),r()()}e&2&&(a(),h(m(2,5,"labels.heading.Accounts Linked to Financial Activities")),a(3),h(m(5,7,"labels.text.Accounts linked to Financial Activities")),a(4),v(" ",m(9,9,"labels.buttons.Close")," "),a(3),v(" ",m(12,11,"labels.buttons.Back")," "),a(3),v(" ",m(15,13,"labels.buttons.Next")," "))}function FOe(e,o){if(e&1){let t=Y();l(0,"h2"),c(1),p(2,"translate"),r(),l(3,"p",38),c(4),p(5,"translate"),r(),l(6,"div",35)(7,"button",36),R("click",function(){let i=V(t).popover,s=w();return i.close(),q(s.configurationWizardService.closeConfigWizard())}),c(8),p(9,"translate"),r(),l(10,"button",37),R("click",function(){let i=V(t).popover,s=w();return i.close(),q(s.previousStepMigrateOpeningBalances())}),c(11),p(12,"translate"),r(),l(13,"button",37),R("click",function(){let i=V(t).popover,s=w();return i.close(),q(s.nextStepMigrateOpeningBalances())}),c(14),p(15,"translate"),r()()}e&2&&(a(),h(m(2,5,"labels.heading.Migrate Opening Balances (Office-wise)")),a(3),h(m(5,7,"labels.text.GLAccount Balances Application")),a(4),v(" ",m(9,9,"labels.buttons.Close")," "),a(3),v(" ",m(12,11,"labels.buttons.Back")," "),a(3),v(" ",m(15,13,"labels.buttons.Next")," "))}function kOe(e,o){if(e&1){let t=Y();l(0,"h2"),c(1),p(2,"translate"),r(),l(3,"p",34),c(4),p(5,"translate"),r(),l(6,"div",35)(7,"button",36),R("click",function(){let i=V(t).popover,s=w();return i.close(),q(s.configurationWizardService.closeConfigWizard())}),c(8),p(9,"translate"),r(),l(10,"button",37),R("click",function(){let i=V(t).popover,s=w();return i.close(),q(s.previousStepClosingEntries())}),c(11),p(12,"translate"),r(),l(13,"button",37),R("click",function(){let i=V(t).popover,s=w();return i.close(),q(s.nextStepClosingEntries())}),c(14),p(15,"translate"),r()()}e&2&&(a(),h(m(2,5,"labels.heading.Closing Entries")),a(3),h(m(5,7,"labels.text.Accounting to journal entries")),a(4),v(" ",m(9,9,"labels.buttons.Close")," "),a(3),v(" ",m(12,11,"labels.buttons.Back")," "),a(3),v(" ",m(15,13,"labels.buttons.Next")," "))}function BOe(e,o){if(e&1){let t=Y();l(0,"h2"),c(1),p(2,"translate"),r(),l(3,"p",34),c(4),p(5,"translate"),r(),l(6,"div",35)(7,"button",36),R("click",function(){let i=V(t).popover,s=w();return i.close(),q(s.configurationWizardService.closeConfigWizard())}),c(8),p(9,"translate"),r(),l(10,"button",37),R("click",function(){let i=V(t).popover,s=w();return i.close(),q(s.previousStepCreateJournalEntries())}),c(11),p(12,"translate"),r(),l(13,"button",37),R("click",function(){let i=V(t).popover,s=w();return i.close(),q(s.nextStepCreateJournalEntries())}),c(14),p(15,"translate"),r()()}e&2&&(a(),h(m(2,5,"labels.heading.Create Journal Entries")),a(3),h(m(5,7,"labels.text.Journal Entries Transactions")),a(4),v(" ",m(9,9,"labels.buttons.Close")," "),a(3),v(" ",m(12,11,"labels.buttons.Back")," "),a(3),v(" ",m(15,13,"labels.buttons.Next")," "))}var dv=(()=>{class e{constructor(){this.router=T(qe),this.configurationWizardService=T(Qi),this.popoverService=T(Wi),this.arrowBooleans=new Array(10).fill(!1)}showPopover(t,n,i,s){setTimeout(()=>this.popoverService.open(t,n,i,s,{}),200)}ngAfterViewInit(){this.configurationWizardService.showChartofAccounts===!0&&setTimeout(()=>{this.showPopover(this.templateChartofAccounts,this.chartofAccounts.nativeElement,"bottom",!0)}),this.configurationWizardService.showAccountsLinked===!0&&setTimeout(()=>{this.showPopover(this.templateAccountsLinked,this.accountsLinked.nativeElement,"bottom",!0)}),this.configurationWizardService.showMigrateOpeningBalances===!0&&setTimeout(()=>{this.showPopover(this.templateMigrateOpeningBalances,this.migrateOpeningBalances.nativeElement,"bottom",!0)}),this.configurationWizardService.showClosingEntries===!0&&setTimeout(()=>{this.showPopover(this.templateClosingEntries,this.closingEntries.nativeElement,"bottom",!0)}),this.configurationWizardService.showCreateJournalEntries===!0&&setTimeout(()=>{this.showPopover(this.templateCreateJournalEntries,this.createJournalEntries.nativeElement,"bottom",!0)})}nextStepChartofAccounts(){this.configurationWizardService.showChartofAccounts=!1,this.configurationWizardService.showChartofAccountsPage=!0,this.router.navigate(["/accounting/chart-of-accounts"])}previousStepChartofAccounts(){this.configurationWizardService.showChartofAccounts=!1,this.configurationWizardService.showSchedulerJobsList=!0,this.router.navigate(["/system/scheduler-jobs"])}nextStepAccountsLinked(){this.configurationWizardService.showAccountsLinked=!1,this.configurationWizardService.showAccountsLinkedPage=!0,this.router.navigate(["/accounting/financial-activity-mappings"])}previousStepAccountsLinked(){this.configurationWizardService.showAccountsLinked=!1,this.configurationWizardService.showChartofAccountsForm=!0,this.router.navigate(["/accounting/chart-of-accounts/gl-accounts/create"])}nextStepMigrateOpeningBalances(){this.router.navigate(["/accounting/migrate-opening-balances"])}previousStepMigrateOpeningBalances(){this.configurationWizardService.showMigrateOpeningBalances=!1,this.configurationWizardService.showAccountsLinkedList=!0,this.router.navigate(["accounting/financial-activity-mappings"])}nextStepClosingEntries(){this.configurationWizardService.showClosingEntries=!1,this.configurationWizardService.showClosingEntriesPage=!0,this.router.navigate(["/accounting/closing-entries"])}previousStepClosingEntries(){this.configurationWizardService.showClosingEntries=!1,this.configurationWizardService.showMigrateOpeningBalances=!0,this.router.navigate(["/accounting/migrate-opening-balances"])}nextStepCreateJournalEntries(){this.router.navigate(["/accounting/journal-entries/create"])}previousStepCreateJournalEntries(){this.configurationWizardService.showCreateJournalEntries=!1,this.configurationWizardService.showClosingEntriesList=!0,this.router.navigate(["/accounting/closing-entries"])}arrowBooleansToggle(t){this.arrowBooleans[t]=!this.arrowBooleans[t]}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275cmp=me({type:e,selectors:[["mifosx-accounting"]],viewQuery:function(n,i){if(n&1&&(Ee(B6e,5),Ee(R6e,5),Ee(N6e,5),Ee(L6e,5),Ee(V6e,5),Ee(q6e,5),Ee(z6e,5),Ee(H6e,5),Ee(G6e,5),Ee(j6e,5)),n&2){let s;Te(s=Me())&&(i.chartofAccounts=s.first),Te(s=Me())&&(i.templateChartofAccounts=s.first),Te(s=Me())&&(i.accountsLinked=s.first),Te(s=Me())&&(i.templateAccountsLinked=s.first),Te(s=Me())&&(i.migrateOpeningBalances=s.first),Te(s=Me())&&(i.templateMigrateOpeningBalances=s.first),Te(s=Me())&&(i.closingEntries=s.first),Te(s=Me())&&(i.templateClosingEntries=s.first),Te(s=Me())&&(i.createJournalEntries=s.first),Te(s=Me())&&(i.templateCreateJournalEntries=s.first)}},decls:37,vars:10,consts:[["createJournalEntries",""],["accountsLinked",""],["migrateOpeningBalances",""],["chartofAccounts",""],["closingEntries",""],["templateChartofAccounts",""],["templateAccountsLinked",""],["templateMigrateOpeningBalances",""],["templateClosingEntries",""],["templateCreateJournalEntries",""],[1,"container"],[1,"layout-row","responsive-column","gap-20px"],[1,"flex-50"],[4,"mifosxHasPermission"],[1,"menu-list-item-content"],[1,"menu-left-section",3,"routerLink"],["matListIcon",""],["icon","sync","size","sm"],["matLine",""],["matLine","",1,"menu-explanation",3,"routerLink"],[1,"menu-right-section"],["icon","arrow-down","size","md"],["icon","arrow-up","size","md"],["icon","arrow-down","size","md",3,"click"],["icon","arrow-up","size","md",3,"click"],["icon","plus","size","sm"],["icon","search","size","sm"],["icon","link","size","sm"],["icon","hand-holding-usd","size","sm"],["icon","sitemap","size","sm"],["icon","archive","size","sm"],["icon","list","size","sm"],["icon","calendar","size","sm"],["icon","cogs","size","sm"],[1,"mw300"],[1,"layout-row","align-end","gap-2px","responsive-column"],["mat-raised-button","","color","warn",3,"click"],["mat-raised-button","","color","primary",3,"click"],[1,"mw400"]],template:function(n,i){n&1&&(l(0,"div",10)(1,"mat-card")(2,"div",11)(3,"div",12)(4,"mat-nav-list"),F(5,Q6e,12,8,"mat-list-item",13),l(6,"div",null,0),F(8,X6e,12,8,"mat-list-item",13),r(),F(9,iOe,12,8,"mat-list-item",13),l(10,"div",null,1),F(12,rOe,12,8,"mat-list-item",13),r(),l(13,"div",null,2),F(15,pOe,12,8,"mat-list-item",13),r()()(),l(16,"div",12)(17,"mat-nav-list")(18,"div",null,3),F(20,fOe,12,8,"mat-list-item",13),r(),l(21,"div",null,4),F(23,COe,12,8,"mat-list-item",13),r(),F(24,yOe,12,8,"mat-list-item",13)(25,TOe,12,8,"mat-list-item",13)(26,IOe,12,8,"mat-list-item",13),r()()()()(),F(27,OOe,16,15,"ng-template",null,5,ti)(29,AOe,16,15,"ng-template",null,6,ti)(31,FOe,16,15,"ng-template",null,7,ti)(33,kOe,16,15,"ng-template",null,8,ti)(35,BOe,16,15,"ng-template",null,9,ti)),n&2&&(a(5),g("mifosxHasPermission","CREATE_JOURNALENTRY"),a(3),g("mifosxHasPermission","CREATE_JOURNALENTRY"),a(),g("mifosxHasPermission","READ_JOURNALENTRY"),a(3),g("mifosxHasPermission","READ_FINANCIALACTIVITYACCOUNT"),a(3),g("mifosxHasPermission","READ_JOURNALENTRY"),a(5),g("mifosxHasPermission","READ_GLACCOUNT"),a(3),g("mifosxHasPermission","READ_GLCLOSURE"),a(),g("mifosxHasPermission","READ_ACCOUNTINGRULE"),a(),g("mifosxHasPermission","EXECUTE_PERIODICACCRUALACCOUNTING"),a(),g("mifosxHasPermission","VIEW_PROVISIONING_ENTRIES"))},dependencies:[ue,fe,Ae,$e,ve,Ke,pa,Vo,Yo,ke,ca,he],encapsulation:2})}}return e})();var ROe=()=>["../../"];function NOe(e,o){if(e&1&&(l(0,"mat-option",6),c(1),r()),e&2){let t=o.$implicit;g("value",t.id),a(),v(" ",t.name," ")}}function LOe(e,o){e&1&&(l(0,"mat-error"),c(1),p(2,"translate"),p(3,"translate"),l(4,"strong"),c(5),p(6,"translate"),r()()),e&2&&(a(),le(" ",m(2,3,"labels.inputs.Office")," ",m(3,5,"labels.commons.is")," "),a(4),h(m(6,7,"labels.commons.required")))}function VOe(e,o){if(e&1&&(l(0,"mat-option",6),c(1),r()),e&2){let t=o.$implicit;g("value",t),a(),v(" ",t.name," ")}}function qOe(e,o){e&1&&(l(0,"mat-error"),c(1),p(2,"translate"),p(3,"translate"),l(4,"strong"),c(5),p(6,"translate"),r()()),e&2&&(a(),le(" ",m(2,3,"labels.inputs.Accounting Rule")," ",m(3,5,"labels.commons.is")," "),a(4),h(m(6,7,"labels.commons.required")))}function zOe(e,o){if(e&1&&(l(0,"mat-option",6),c(1),r()),e&2){let t=o.$implicit;g("value",t.code),a(),v(" ",t.displayLabel," ")}}function HOe(e,o){e&1&&(l(0,"mat-error"),c(1),p(2,"translate"),p(3,"translate"),l(4,"strong"),c(5),p(6,"translate"),r()()),e&2&&(a(),le(" ",m(2,3,"labels.inputs.Currency")," ",m(3,5,"labels.commons.is")," "),a(4),h(m(6,7,"labels.commons.required")))}function GOe(e,o){if(e&1&&(l(0,"mat-option",6),c(1),r()),e&2){let t=o.$implicit;g("value",t.id),a(),v(" ",t.name," ")}}function jOe(e,o){e&1&&(l(0,"mat-error"),c(1),p(2,"translate"),p(3,"translate"),l(4,"strong"),c(5),p(6,"translate"),r()()),e&2&&(a(),le(" ",m(2,3,"labels.inputs.Affected GL Entry (Debit)")," ",m(3,5,"labels.commons.is")," "),a(4),h(m(6,7,"labels.commons.required")))}function $Oe(e,o){e&1&&(l(0,"mat-error"),c(1),p(2,"translate"),p(3,"translate"),l(4,"strong"),c(5),p(6,"translate"),r()()),e&2&&(a(),le(" ",m(2,3,"labels.inputs.Debit Amount")," ",m(3,5,"labels.commons.is")," "),a(4),h(m(6,7,"labels.commons.required")))}function UOe(e,o){if(e&1){let t=Y();l(0,"button",34),R("click",function(){V(t);let i=w().$index,s=w();return q(s.removeAffectedGLEntry(s.debits,i))}),b(1,"fa-icon",35),r()}}function WOe(e,o){if(e&1){let t=Y();l(0,"button",36),R("click",function(){V(t);let i=w(2);return q(i.addAffectedGLEntry(i.debits))}),b(1,"fa-icon",37),r()}}function QOe(e,o){if(e&1&&(l(0,"div",10)(1,"div",27)(2,"mat-form-field",4)(3,"mat-label"),c(4),p(5,"translate"),r(),l(6,"mat-select",28),Se(7,GOe,2,2,"mat-option",6,Pe),r(),E(9,jOe,7,9,"mat-error"),r(),l(10,"mat-form-field",29)(11,"mat-label"),c(12),p(13,"translate"),r(),b(14,"input",30),E(15,$Oe,7,9,"mat-error"),r(),l(16,"span",31),E(17,UOe,2,0,"button",32),E(18,WOe,2,0,"button",33),r()()()),e&2){let t=o.$index,n=w();a(),g("formGroupName",t),a(3),h(m(5,7,"labels.inputs.Affected GL Entry (Debit)")),a(3),we(n.debitAccountData),a(2),I(n.debits.at(t).controls.glAccountId.hasError("required")?9:-1),a(3),h(m(13,9,"labels.inputs.Debit Amount")),a(3),I(n.debits.at(t).controls.amount.hasError("required")?15:-1),a(2),I(t!==0?17:-1),a(),I(t===0&&n.allowMultipleDebitEntries?18:-1)}}function YOe(e,o){if(e&1&&(l(0,"mat-option",6),c(1),r()),e&2){let t=o.$implicit;g("value",t.id),a(),v(" ",t.name," ")}}function JOe(e,o){e&1&&(l(0,"mat-error"),c(1),p(2,"translate"),p(3,"translate"),l(4,"strong"),c(5),p(6,"translate"),r()()),e&2&&(a(),le(" ",m(2,3,"labels.inputs.Affected GL Entry (Credit)")," ",m(3,5,"labels.commons.is")," "),a(4),h(m(6,7,"labels.commons.required")))}function KOe(e,o){e&1&&(l(0,"mat-error"),c(1),p(2,"translate"),p(3,"translate"),l(4,"strong"),c(5),p(6,"translate"),r()()),e&2&&(a(),le(" ",m(2,3,"labels.inputs.Credit Amount")," ",m(3,5,"labels.commons.is")," "),a(4),h(m(6,7,"labels.commons.required")))}function XOe(e,o){if(e&1){let t=Y();l(0,"button",34),R("click",function(){V(t);let i=w().$index,s=w();return q(s.removeAffectedGLEntry(s.credits,i))}),b(1,"fa-icon",35),r()}}function ZOe(e,o){if(e&1){let t=Y();l(0,"button",36),R("click",function(){V(t);let i=w(2);return q(i.addAffectedGLEntry(i.credits))}),b(1,"fa-icon",37),r()}}function eAe(e,o){if(e&1&&(l(0,"div",11)(1,"div",27)(2,"mat-form-field",4)(3,"mat-label"),c(4),p(5,"translate"),r(),l(6,"mat-select",28),Se(7,YOe,2,2,"mat-option",6,Pe),r(),E(9,JOe,7,9,"mat-error"),r(),l(10,"mat-form-field",29)(11,"mat-label"),c(12),p(13,"translate"),r(),b(14,"input",30),E(15,KOe,7,9,"mat-error"),r(),l(16,"span",31),E(17,XOe,2,0,"button",32),E(18,ZOe,2,0,"button",33),r()()()),e&2){let t=o.$index,n=w();a(),g("formGroupName",t),a(3),h(m(5,7,"labels.inputs.Affected GL Entry (Credit)")),a(3),we(n.creditAccountData),a(2),I(n.credits.at(t).controls.glAccountId.hasError("required")?9:-1),a(3),h(m(13,9,"labels.inputs.Credit Amount")),a(3),I(n.credits.at(t).controls.amount.hasError("required")?15:-1),a(2),I(t!==0?17:-1),a(),I(t===0&&n.allowMultipleCreditEntries?18:-1)}}function tAe(e,o){e&1&&(l(0,"mat-error"),c(1),p(2,"translate"),p(3,"translate"),l(4,"strong"),c(5),p(6,"translate"),r()()),e&2&&(a(),le(" ",m(2,3,"labels.inputs.Transaction Date")," ",m(3,5,"labels.commons.is")," "),a(4),h(m(6,7,"labels.commons.required")))}function iAe(e,o){if(e&1&&(l(0,"mat-option",6),c(1),r()),e&2){let t=o.$implicit;g("value",t.id),a(),v(" ",t.name," ")}}function nAe(e,o){if(e&1&&(l(0,"button",38),c(1),p(2,"translate"),r()),e&2){let t=w();g("disabled",!t.frequentPostingsForm.valid),a(),v(" ",m(2,2,"labels.buttons.Submit")," ")}}var uv=(()=>{class e{constructor(){this.formBuilder=T(nt),this.accountingService=T(Ui),this.settingsService=T(At),this.dateUtils=T(Zt),this.route=T(Ie),this.router=T(qe),this.minDate=new Date(2e3,0,1),this.maxDate=new Date,this.route.data.subscribe(t=>{this.officeData=t.offices,this.accountingRuleData=t.accountingRules,this.currencyData=t.currencies.selectedCurrencyOptions,this.paymentTypeData=t.paymentTypes})}ngOnInit(){this.maxDate=this.settingsService.businessDate,this.createFrequentPostingsForm(),this.setAffectedGLEntryForm()}createFrequentPostingsForm(){this.frequentPostingsForm=this.formBuilder.group({officeId:["",se.required],accountingRule:["",se.required],currencyCode:["",se.required],debits:this.formBuilder.array([]),credits:this.formBuilder.array([]),referenceNumber:[""],transactionDate:["",se.required],paymentTypeId:[""],accountNumber:[""],checkNumber:[""],routingCode:[""],receiptNumber:[""],bankNumber:[""],comments:[""]})}setAffectedGLEntryForm(){this.frequentPostingsForm.get("accountingRule").valueChanges.subscribe(t=>{for(;this.debits.length;)this.debits.removeAt(0);for(;this.credits.length;)this.credits.removeAt(0);this.allowMultipleDebitEntries=t.allowMultipleDebitEntries,this.allowMultipleCreditEntries=t.allowMultipleCreditEntries,this.debitAccountData=t.debitAccounts,this.creditAccountData=t.creditAccounts,this.addAffectedGLEntry(this.debits),this.addAffectedGLEntry(this.credits)})}createAffectedGLEntryForm(){return this.formBuilder.group({glAccountId:["",se.required],amount:["",se.required]})}get debits(){return this.frequentPostingsForm.get("debits")}get credits(){return this.frequentPostingsForm.get("credits")}addAffectedGLEntry(t){t.push(this.createAffectedGLEntryForm())}removeAffectedGLEntry(t,n){t.removeAt(n)}submit(){let t=this.frequentPostingsForm.value;t.accountingRule=t.accountingRule.id,t.locale=this.settingsService.language.code,t.dateFormat=this.settingsService.dateFormat,t.transactionDate instanceof Date&&(t.transactionDate=this.dateUtils.formatDate(t.transactionDate,this.settingsService.dateFormat)),this.accountingService.createJournalEntry(t).subscribe(n=>{this.router.navigate(["../transactions/view",n.transactionId],{relativeTo:this.route})})}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275cmp=me({type:e,selectors:[["mifosx-frequent-postings"]],decls:90,vars:51,consts:[["transactionDatePicker",""],[1,"container"],[3,"ngSubmit","formGroup"],[1,"layout-row-wrap","gap-2px","responsive-column"],[1,"flex-48"],["required","","formControlName","officeId"],[3,"value"],["required","","formControlName","accountingRule"],["required","","formControlName","currencyCode"],[1,"flex-48","hide-lt-md"],["formArrayName","debits",1,"flex-fill","layout-row-wrap","responsive-column"],["formArrayName","credits",1,"flex-fill","layout-row-wrap","responsive-column"],["matInput","","formControlName","referenceNumber"],[1,"flex-48",3,"click"],["matInput","","required","","formControlName","transactionDate",3,"min","max","matDatepicker"],["matSuffix","",3,"for"],["formControlName","paymentTypeId"],["matInput","","formControlName","accountNumber"],["matInput","","formControlName","checkNumber"],["matInput","","formControlName","routingCode"],["matInput","","formControlName","receiptNumber"],["matInput","","formControlName","bankNumber"],[1,"flex-98"],["matInput","","formControlName","comments","cdkTextareaAutosize","","cdkAutosizeMinRows","2"],[1,"layout-row","align-center","gap-5px","responsive-column"],["type","button","mat-raised-button","",3,"routerLink"],["mat-raised-button","","color","primary",3,"disabled",4,"mifosxHasPermission"],[1,"flex-fill","layout-row-wrap","gap-2percent","responsive-column",3,"formGroupName"],["required","","formControlName","glAccountId"],[1,"flex-43"],["type","number","matInput","","required","","formControlName","amount"],[1,"flex-fill"],["type","button","mat-icon-button",""],["type","button","mat-icon-button","","color","primary"],["type","button","mat-icon-button","",3,"click"],["icon","minus-circle","size","lg"],["type","button","mat-icon-button","","color","primary",3,"click"],["icon","plus-circle","size","lg"],["mat-raised-button","","color","primary",3,"disabled"]],template:function(n,i){if(n&1){let s=Y();l(0,"div",1)(1,"mat-card")(2,"form",2),R("ngSubmit",function(){return V(s),q(i.submit())}),l(3,"mat-card-content")(4,"div",3)(5,"mat-form-field",4)(6,"mat-label"),c(7),p(8,"translate"),r(),l(9,"mat-select",5),Se(10,NOe,2,2,"mat-option",6,Pe),r(),E(12,LOe,7,9,"mat-error"),r(),l(13,"mat-form-field",4)(14,"mat-label"),c(15),p(16,"translate"),r(),l(17,"mat-select",7),Se(18,VOe,2,2,"mat-option",6,Pe),r(),E(20,qOe,7,9,"mat-error"),r(),l(21,"mat-form-field",4)(22,"mat-label"),c(23),p(24,"translate"),r(),l(25,"mat-select",8),Se(26,zOe,2,2,"mat-option",6,Pe),r(),E(28,HOe,7,9,"mat-error"),r(),b(29,"span",9),Se(30,QOe,19,11,"div",10,Pe),Se(32,eAe,19,11,"div",11,Pe),l(34,"mat-form-field",4)(35,"mat-label"),c(36),p(37,"translate"),r(),b(38,"input",12),r(),l(39,"mat-form-field",13),R("click",function(){V(s);let u=xe(46);return q(u.open())}),l(40,"mat-label"),c(41),p(42,"translate"),r(),b(43,"input",14)(44,"mat-datepicker-toggle",15)(45,"mat-datepicker",null,0),E(47,tAe,7,9,"mat-error"),r(),l(48,"mat-form-field",4)(49,"mat-label"),c(50),p(51,"translate"),r(),l(52,"mat-select",16),Se(53,iAe,2,2,"mat-option",6,Pe),r()(),l(55,"mat-form-field",4)(56,"mat-label"),c(57),p(58,"translate"),r(),b(59,"input",17),r(),l(60,"mat-form-field",4)(61,"mat-label"),c(62),p(63,"translate"),r(),b(64,"input",18),r(),l(65,"mat-form-field",4)(66,"mat-label"),c(67),p(68,"translate"),r(),b(69,"input",19),r(),l(70,"mat-form-field",4)(71,"mat-label"),c(72),p(73,"translate"),r(),b(74,"input",20),r(),l(75,"mat-form-field",4)(76,"mat-label"),c(77),p(78,"translate"),r(),b(79,"input",21),r(),l(80,"mat-form-field",22)(81,"mat-label"),c(82),p(83,"translate"),r(),b(84,"textarea",23),r()()(),l(85,"mat-card-actions",24)(86,"button",25),c(87),p(88,"translate"),r(),F(89,nAe,3,4,"button",26),r()()()()}if(n&2){let s=xe(46);a(2),g("formGroup",i.frequentPostingsForm),a(5),h(m(8,24,"labels.inputs.Office")),a(3),we(i.officeData),a(2),I(i.frequentPostingsForm.controls.officeId.hasError("required")?12:-1),a(3),h(m(16,26,"labels.inputs.Accounting Rule")),a(3),we(i.accountingRuleData),a(2),I(i.frequentPostingsForm.controls.accountingRule.hasError("required")?20:-1),a(3),h(m(24,28,"labels.inputs.Currency")),a(3),we(i.currencyData),a(2),I(i.frequentPostingsForm.controls.currencyCode.hasError("required")?28:-1),a(2),we(i.debits.controls),a(2),we(i.credits.controls),a(4),h(m(37,30,"labels.inputs.Reference Number")),a(5),h(m(42,32,"labels.inputs.Transaction Date")),a(2),g("min",i.minDate)("max",i.maxDate)("matDatepicker",s),a(),g("for",s),a(3),I(i.frequentPostingsForm.controls.transactionDate.hasError("required")?47:-1),a(3),h(m(51,34,"labels.inputs.Payment Type")),a(3),we(i.paymentTypeData),a(4),h(m(58,36,"labels.inputs.Account Number")),a(5),h(m(63,38,"labels.inputs.Cheque Number")),a(5),h(m(68,40,"labels.inputs.Routing Code")),a(5),h(m(73,42,"labels.inputs.Receipt Number")),a(5),h(m(78,44,"labels.inputs.Bank Number")),a(5),h(m(83,46,"labels.inputs.Comments")),a(4),g("routerLink",oe(50,ROe)),a(),v(" ",m(88,48,"labels.buttons.Cancel")," "),a(2),g("mifosxHasPermission","CREATE_JOURNALENTRY")}},dependencies:[ue,fe,tt,st,tn,Ue,Xe,dt,Ze,et,la,Va,Ae,$e,Je,Et,Fe,Be,ut,ai,ze,gt,ft,mi,di,pi,ve,Ke,wi,ke,Ln,he],encapsulation:2})}}return e})();var oAe=["createJournalFormRef"],aAe=["templateCreateJournalFormRef"],rAe=()=>["../../"];function lAe(e,o){if(e&1&&(l(0,"mat-option",8),c(1),r()),e&2){let t=o.$implicit;g("value",t.id),a(),v(" ",t.name," ")}}function sAe(e,o){e&1&&(l(0,"mat-error"),c(1),p(2,"translate"),p(3,"translate"),l(4,"strong"),c(5),p(6,"translate"),r()()),e&2&&(a(),le(" ",m(2,3,"labels.inputs.Office")," ",m(3,5,"labels.commons.is")," "),a(4),h(m(6,7,"labels.commons.required")))}function cAe(e,o){if(e&1&&(l(0,"mat-option",8),c(1),r()),e&2){let t=o.$implicit;g("value",t.code),a(),v(" ",t.displayLabel," ")}}function pAe(e,o){e&1&&(l(0,"mat-error"),c(1),p(2,"translate"),p(3,"translate"),l(4,"strong"),c(5),p(6,"translate"),r()()),e&2&&(a(),le(" ",m(2,3,"labels.inputs.Currency")," ",m(3,5,"labels.commons.is")," "),a(4),h(m(6,7,"labels.commons.required")))}function mAe(e,o){e&1&&(l(0,"mat-form-field",9)(1,"mat-label"),c(2),p(3,"translate"),r(),b(4,"input",28),r()),e&2&&(a(2),h(m(3,1,"labels.inputs.External Asset Owner")))}function dAe(e,o){e&1&&(l(0,"mat-error"),c(1),p(2,"translate"),p(3,"translate"),l(4,"strong"),c(5),p(6,"translate"),r()()),e&2&&(a(),le(" ",m(2,3,"labels.inputs.Debit Amount")," ",m(3,5,"labels.commons.is")," "),a(4),h(m(6,7,"labels.commons.required")))}function uAe(e,o){if(e&1){let t=Y();l(0,"button",36),R("click",function(){V(t);let i=w().$index,s=w();return q(s.removeAffectedGLEntry(s.debits,i))}),b(1,"fa-icon",37),r()}}function fAe(e,o){if(e&1){let t=Y();l(0,"button",38),R("click",function(){V(t);let i=w(2);return q(i.addAffectedGLEntry(i.debits))}),b(1,"fa-icon",39),r()}}function hAe(e,o){if(e&1){let t=Y();l(0,"div",11)(1,"div",29),b(2,"mifosx-gl-account-selector",30),l(3,"mat-form-field",31)(4,"mat-label"),c(5),p(6,"translate"),r(),l(7,"input",32),R("input",function(i){V(t);let s=w();return q(s.onAmountInput(i))}),r(),E(8,dAe,7,9,"mat-error"),r(),l(9,"span",33),E(10,uAe,2,0,"button",34),E(11,fAe,2,0,"button",35),r()()()}if(e&2){let t=o.$index,n=w();a(),g("formGroupName",t),a(),g("inputFormControl",n.debits.at(t).controls.glAccountId)("glAccountList",n.glAccountData)("required",!0)("inputLabel","Affected GL Entry (Debit)"),a(3),h(m(6,9,"labels.inputs.Debit Amount")),a(3),I(n.debits.at(t).controls.amount.hasError("required")?8:-1),a(2),I(t!==0?10:-1),a(),I(t===0?11:-1)}}function gAe(e,o){e&1&&(l(0,"mat-error"),c(1),p(2,"translate"),p(3,"translate"),l(4,"strong"),c(5),p(6,"translate"),r()()),e&2&&(a(),le(" ",m(2,3,"labels.inputs.Credit Amount")," ",m(3,5,"labels.commons.is")," "),a(4),h(m(6,7,"labels.commons.required")))}function _Ae(e,o){if(e&1){let t=Y();l(0,"button",36),R("click",function(){V(t);let i=w().$index,s=w();return q(s.removeAffectedGLEntry(s.credits,i))}),b(1,"fa-icon",37),r()}}function CAe(e,o){if(e&1){let t=Y();l(0,"button",38),R("click",function(){V(t);let i=w(2);return q(i.addAffectedGLEntry(i.credits))}),b(1,"fa-icon",39),r()}}function vAe(e,o){if(e&1){let t=Y();l(0,"div",12)(1,"div",29),b(2,"mifosx-gl-account-selector",30),l(3,"mat-form-field",31)(4,"mat-label"),c(5),p(6,"translate"),r(),l(7,"input",32),R("input",function(i){V(t);let s=w();return q(s.onAmountInput(i))}),r(),E(8,gAe,7,9,"mat-error"),r(),l(9,"span",33),E(10,_Ae,2,0,"button",34),E(11,CAe,2,0,"button",35),r()()()}if(e&2){let t=o.$index,n=w();a(),g("formGroupName",t),a(),g("inputFormControl",n.credits.at(t).controls.glAccountId)("glAccountList",n.glAccountData)("required",!0)("inputLabel","Affected GL Entry (Credit)"),a(3),h(m(6,9,"labels.inputs.Credit Amount")),a(3),I(n.credits.at(t).controls.amount.hasError("required")?8:-1),a(2),I(t!==0?10:-1),a(),I(t===0?11:-1)}}function xAe(e,o){e&1&&(l(0,"mat-error"),c(1),p(2,"translate"),p(3,"translate"),l(4,"strong"),c(5),p(6,"translate"),r()()),e&2&&(a(),le(" ",m(2,3,"labels.inputs.Transaction Date")," ",m(3,5,"labels.commons.is")," "),a(4),h(m(6,7,"labels.commons.required")))}function bAe(e,o){if(e&1&&(l(0,"mat-option",8),c(1),r()),e&2){let t=o.$implicit;g("value",t.id),a(),v(" ",t.name," ")}}function yAe(e,o){if(e&1&&(l(0,"button",40),c(1),p(2,"translate"),r()),e&2){let t=w();g("disabled",!t.journalEntryForm.valid),a(),v(" ",m(2,2,"labels.buttons.Submit")," ")}}function SAe(e,o){if(e&1){let t=Y();l(0,"h2"),c(1),p(2,"translate"),r(),l(3,"p",41),c(4),p(5,"translate"),l(6,"a",42),c(7),p(8,"translate"),r()(),l(9,"div",43)(10,"button",44),R("click",function(){let i=V(t).popover,s=w();return i.close(),q(s.configurationWizardService.closeConfigWizard())}),c(11),p(12,"translate"),r(),l(13,"button",45),R("click",function(){let i=V(t).popover,s=w();return i.close(),q(s.previousStep())}),c(14),p(15,"translate"),r(),l(16,"button",45),R("click",function(){let i=V(t).popover,s=w();return i.close(),q(s.nextStep())}),c(17),p(18,"translate"),r()()}e&2&&(a(),h(m(2,6,"labels.heading.Add Journal Entry Form")),a(3),v(" ",m(5,8,"labels.text.Red asterisk field")," "),a(3),h(m(8,10,"labels.inputs.Add Journal Entries")),a(4),v(" ",m(12,12,"labels.buttons.Close")," "),a(3),v(" ",m(15,14,"labels.buttons.Back")," "),a(3),v(" ",m(18,16,"labels.buttons.Next")," "))}var fv=(()=>{class e{onAmountInput(t){let n=t.target;if(!(n instanceof HTMLInputElement))return;let i=n.value.trim();if(i==="")return;let s=Number(i);(!Number.isFinite(s)||s<1)&&(n.value="1",n.dispatchEvent(new Event("input",{bubbles:!0})))}constructor(){this.formBuilder=T(nt),this.accountingService=T(Ui),this.settingsService=T(At),this.dateUtils=T(Zt),this.route=T(Ie),this.router=T(qe),this.dialog=T(Ht),this.configurationWizardService=T(Qi),this.popoverService=T(Wi),this.minDate=new Date(2e3,0,1),this.maxDate=new Date,this.assetExternalizationEnabled=!1,this.assetExternalizationEnabled=!1,this.route.data.subscribe(t=>{this.officeData=t.offices,this.currencyData=t.currencies.selectedCurrencyOptions,this.paymentTypeData=t.paymentTypes,this.glAccountData=t.glAccounts,this.assetExternalizationConfig=t.globalConfig})}ngOnInit(){this.maxDate=this.settingsService.businessDate,this.createJournalEntryForm()}createJournalEntryForm(){this.journalEntryForm=this.formBuilder.group({officeId:["",se.required],currencyCode:["",se.required],debits:this.formBuilder.array([this.createAffectedGLEntryForm()]),credits:this.formBuilder.array([this.createAffectedGLEntryForm()]),referenceNumber:[""],transactionDate:["",se.required],paymentTypeId:[""],accountNumber:[""],checkNumber:[""],routingCode:[""],receiptNumber:[""],bankNumber:[""],comments:[""]})}createAffectedGLEntryForm(){return this.formBuilder.group({glAccountId:["",se.required],amount:["",[se.required,se.min(1)]]})}get debits(){return this.journalEntryForm.get("debits")}get credits(){return this.journalEntryForm.get("credits")}addAffectedGLEntry(t){t.push(this.createAffectedGLEntryForm())}removeAffectedGLEntry(t,n){t.removeAt(n)}submit(){let t=this.journalEntryForm.value;t.locale=this.settingsService.language.code,t.dateFormat=this.settingsService.dateFormat,t.transactionDate&&(t.transactionDate=this.dateUtils.formatDate(t.transactionDate,this.settingsService.dateFormat)),t.externalAssetOwner||delete t.externalAssetOwner,this.accountingService.createJournalEntry(t).subscribe(n=>{this.router.navigate(["../transactions/view",n.transactionId],{relativeTo:this.route})})}showPopover(t,n,i,s){setTimeout(()=>this.popoverService.open(t,n,i,s,{}),200)}ngAfterViewInit(){this.configurationWizardService.showCreateJournalEntries===!0&&setTimeout(()=>{this.showPopover(this.templateCreateJournalFormRef,this.createJournalFormRef.nativeElement,"top",!0)}),this.assetExternalizationEnabled=this.assetExternalizationConfig.enabled,this.assetExternalizationEnabled&&this.journalEntryForm.addControl("externalAssetOwner",new it)}nextStep(){this.configurationWizardService.showCreateJournalEntries=!1,this.openNextStepDialog()}previousStep(){this.router.navigate(["/accounting"])}openNextStepDialog(){this.dialog.open(cs,{data:{nextStepName:"Setup Products",previousStepName:"Accounting",stepPercentage:74}}).afterClosed().subscribe(n=>{n.nextStep?(this.configurationWizardService.showCreateJournalEntries=!1,this.configurationWizardService.showCharges=!0,this.router.navigate(["/products"])):(this.configurationWizardService.showCreateJournalEntries=!1,this.router.navigate(["/home"]))})}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275cmp=me({type:e,selectors:[["mifosx-create-journal-entry"]],viewQuery:function(n,i){if(n&1&&(Ee(oAe,5),Ee(aAe,5)),n&2){let s;Te(s=Me())&&(i.createJournalFormRef=s.first),Te(s=Me())&&(i.templateCreateJournalFormRef=s.first)}},decls:85,vars:48,consts:[["createJournalFormRef",""],["transactionDatePicker",""],["templateCreateJournalFormRef",""],[1,"container"],[3,"ngSubmit","formGroup"],[1,"layout-row-wrap","responsive-column","gap-2percent"],[1,"flex-48"],["required","","formControlName","officeId"],[3,"value"],[1,"flex-24"],["required","","formControlName","currencyCode"],["formArrayName","debits",1,"flex-fill","layout-row-wrap","responsive-column"],["formArrayName","credits",1,"flex-fill","layout-row-wrap","responsive-column"],["matInput","","formControlName","referenceNumber"],[1,"flex-48",3,"click"],["matInput","","required","","formControlName","transactionDate",3,"min","max","matDatepicker"],["matSuffix","",3,"for"],["formControlName","paymentTypeId"],["matInput","","formControlName","accountNumber"],["matInput","","formControlName","checkNumber"],["matInput","","formControlName","routingCode"],["matInput","","formControlName","receiptNumber"],["matInput","","formControlName","bankNumber"],[1,"flex-98"],["matInput","","formControlName","comments","cdkTextareaAutosize","","cdkAutosizeMinRows","2"],[1,"layout-row","align-center","gap-5px","responsive-column"],["type","button","mat-raised-button","",3,"routerLink"],["mat-raised-button","","color","primary",3,"disabled",4,"mifosxHasPermission"],["matInput","","formControlName","externalAssetOwner"],[1,"flex-fill","layout-row-wrap","gap-2percent","responsive-column",3,"formGroupName"],[1,"flex-48",3,"inputFormControl","glAccountList","required","inputLabel"],[1,"flex-43"],["type","number","matInput","","required","","formControlName","amount","min","1",3,"input"],[1,"flex-fill"],["type","button","mat-icon-button",""],["type","button","mat-icon-button","","color","primary"],["type","button","mat-icon-button","",3,"click"],["icon","minus-circle","size","lg"],["type","button","mat-icon-button","","color","primary",3,"click"],["icon","plus-circle","size","lg"],["mat-raised-button","","color","primary",3,"disabled"],[1,"mw300"],["href","https://mifosforge.jira.com/wiki/spaces/docs/pages/67895310/Add+Journal+Entries","target","_blank"],[1,"layout-row","align-end","gap-2px","responsive-column"],["mat-raised-button","","color","warn",3,"click"],["mat-raised-button","","color","primary",3,"click"]],template:function(n,i){if(n&1){let s=Y();l(0,"div",3)(1,"mat-card")(2,"form",4),R("ngSubmit",function(){return V(s),q(i.submit())}),l(3,"mat-card-content")(4,"div",5,0)(6,"mat-form-field",6)(7,"mat-label"),c(8),p(9,"translate"),r(),l(10,"mat-select",7),Se(11,lAe,2,2,"mat-option",8,Pe),r(),E(13,sAe,7,9,"mat-error"),r(),l(14,"mat-form-field",9)(15,"mat-label"),c(16),p(17,"translate"),r(),l(18,"mat-select",10),Se(19,cAe,2,2,"mat-option",8,Pe),r(),E(21,pAe,7,9,"mat-error"),r(),E(22,mAe,5,3,"mat-form-field",9),Se(23,hAe,12,11,"div",11,Pe),Se(25,vAe,12,11,"div",12,Pe),l(27,"mat-form-field",6)(28,"mat-label"),c(29),p(30,"translate"),r(),b(31,"input",13),r(),l(32,"mat-form-field",14),R("click",function(){V(s);let u=xe(39);return q(u.open())}),l(33,"mat-label"),c(34),p(35,"translate"),r(),b(36,"input",15)(37,"mat-datepicker-toggle",16)(38,"mat-datepicker",null,1),E(40,xAe,7,9,"mat-error"),r(),l(41,"mat-form-field",6)(42,"mat-label"),c(43),p(44,"translate"),r(),l(45,"mat-select",17),Se(46,bAe,2,2,"mat-option",8,Pe),r()(),l(48,"mat-form-field",6)(49,"mat-label"),c(50),p(51,"translate"),r(),b(52,"input",18),r(),l(53,"mat-form-field",6)(54,"mat-label"),c(55),p(56,"translate"),r(),b(57,"input",19),r(),l(58,"mat-form-field",6)(59,"mat-label"),c(60),p(61,"translate"),r(),b(62,"input",20),r(),l(63,"mat-form-field",6)(64,"mat-label"),c(65),p(66,"translate"),r(),b(67,"input",21),r(),l(68,"mat-form-field",6)(69,"mat-label"),c(70),p(71,"translate"),r(),b(72,"input",22),r(),l(73,"mat-form-field",23)(74,"mat-label"),c(75),p(76,"translate"),r(),b(77,"textarea",24),r()()(),l(78,"mat-card-actions",25)(79,"button",26),c(80),p(81,"translate"),r(),F(82,yAe,3,4,"button",27),r()()()(),F(83,SAe,19,18,"ng-template",null,2,ti)}if(n&2){let s=xe(39);a(2),g("formGroup",i.journalEntryForm),a(6),h(m(9,23,"labels.inputs.Office")),a(3),we(i.officeData),a(2),I(i.journalEntryForm.controls.officeId.hasError("required")?13:-1),a(3),h(m(17,25,"labels.inputs.Currency")),a(3),we(i.currencyData),a(2),I(i.journalEntryForm.controls.currencyCode.hasError("required")?21:-1),a(),I(i.assetExternalizationEnabled?22:-1),a(),we(i.debits.controls),a(2),we(i.credits.controls),a(4),h(m(30,27,"labels.inputs.Reference Number")),a(5),h(m(35,29,"labels.inputs.Transaction Date")),a(2),g("min",i.minDate)("max",i.maxDate)("matDatepicker",s),a(),g("for",s),a(3),I(i.journalEntryForm.controls.transactionDate.hasError("required")?40:-1),a(3),h(m(44,31,"labels.inputs.Payment Type")),a(3),we(i.paymentTypeData),a(4),h(m(51,33,"labels.inputs.Account Number")),a(5),h(m(56,35,"labels.inputs.Cheque Number")),a(5),h(m(61,37,"labels.inputs.Routing Code")),a(5),h(m(66,39,"labels.inputs.Receipt Number")),a(5),h(m(71,41,"labels.inputs.Bank Number")),a(5),h(m(76,43,"labels.inputs.Comments")),a(4),g("routerLink",oe(47,rAe)),a(),v(" ",m(81,45,"labels.buttons.Cancel")," "),a(2),g("mifosxHasPermission","CREATE_JOURNALENTRY")}},dependencies:[ue,fe,tt,st,tn,Ue,Xe,dt,Da,Ze,et,la,Va,Ae,$e,Je,Et,Fe,Be,ut,ai,ze,gt,ft,mi,di,pi,ve,Ke,ta,wi,ke,Ln,he],encapsulation:2})}}return e})();var hv=class{constructor(o){this.accountingService=o,this.journalEntriesSubject=new Na([]),this.recordsSubject=new Na(0),this.records$=this.recordsSubject.asObservable()}getJournalEntries(o,t="",n="",i=0,s=10){this.journalEntriesSubject.next([]),t=t==="debit"||t==="credit"?"amount":t,this.accountingService.getJournalEntries(o,t,n,i*s,s).subscribe(d=>{this.recordsSubject.next(d.totalFilteredRecords),this.journalEntriesSubject.next(d.pageItems)})}connect(o){return this.journalEntriesSubject.asObservable()}disconnect(o){this.journalEntriesSubject.complete(),this.recordsSubject.complete()}};var wAe=()=>[10,25,50,100],PAe=(e,o)=>({id:e,name:o}),TAe=e=>["transactions/view",e];function MAe(e,o){if(e&1&&(l(0,"mat-option",10),c(1),r()),e&2){let t=o.$implicit;g("value",t.value),a(),v(" ",t.option," ")}}function DAe(e,o){if(e&1&&(l(0,"mat-option",10),c(1),r()),e&2){let t=o.$implicit;g("value",Ka(2,PAe,t.id,t.name)),a(),v(" ",t.name," ")}}function EAe(e,o){e&1&&(l(0,"th",38),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.Entry ID")))}function IAe(e,o){if(e&1&&(l(0,"td",39),c(1),r()),e&2){let t=o.$implicit;a(),h(t.id)}}function OAe(e,o){e&1&&(l(0,"th",38),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.Office")))}function AAe(e,o){if(e&1&&(l(0,"td",39),c(1),r()),e&2){let t=o.$implicit;a(),h(t.officeName)}}function FAe(e,o){e&1&&(l(0,"th",38),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.Transaction ID")))}function kAe(e,o){if(e&1&&(l(0,"td",39),c(1),r()),e&2){let t=o.$implicit;a(),h(t.transactionId)}}function BAe(e,o){e&1&&(l(0,"th",38),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.Transaction Date")))}function RAe(e,o){if(e&1&&(l(0,"td",39),c(1),p(2,"dateFormat"),r()),e&2){let t=o.$implicit;a(),h(m(2,1,t.transactionDate))}}function NAe(e,o){e&1&&(l(0,"th",40),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.Type")))}function LAe(e,o){if(e&1&&(l(0,"td",39),c(1),r()),e&2){let t=o.$implicit;a(),h(t.glAccountType.value)}}function VAe(e,o){e&1&&(l(0,"th",40),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.Created By")))}function qAe(e,o){if(e&1&&(l(0,"td",39),c(1),r()),e&2){let t=o.$implicit;a(),h(t.createdByUserName)}}function zAe(e,o){e&1&&(l(0,"th",40),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.Submitted on date")))}function HAe(e,o){if(e&1&&(l(0,"td",39),c(1),p(2,"datetimeFormat"),r()),e&2){let t=o.$implicit;a(),h(m(2,1,t.submittedOnDate))}}function GAe(e,o){e&1&&(l(0,"th",38),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.Account Code")))}function jAe(e,o){if(e&1&&(l(0,"td",39),c(1),r()),e&2){let t=o.$implicit;a(),h(t.glAccountCode)}}function $Ae(e,o){e&1&&(l(0,"th",38),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.Account Name")))}function UAe(e,o){if(e&1&&(l(0,"td",39),c(1),r()),e&2){let t=o.$implicit;a(),h(t.glAccountName)}}function WAe(e,o){e&1&&(l(0,"th",38),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.Currency")))}function QAe(e,o){if(e&1&&(l(0,"td",39),c(1),r()),e&2){let t=o.$implicit;a(),h(t.currency.code)}}function YAe(e,o){e&1&&(l(0,"th",38),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.Debit")))}function JAe(e,o){if(e&1&&(l(0,"span"),c(1),p(2,"formatNumber"),r()),e&2){let t=w().$implicit;a(),v(" ",m(2,1,t.amount)," ")}}function KAe(e,o){if(e&1&&(l(0,"td",39),E(1,JAe,3,3,"span"),r()),e&2){let t=o.$implicit;a(),I(t.entryType.value==="DEBIT"?1:-1)}}function XAe(e,o){e&1&&(l(0,"th",38),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.Credit")))}function ZAe(e,o){if(e&1&&(l(0,"span"),c(1),p(2,"formatNumber"),r()),e&2){let t=w().$implicit;a(),v(" ",m(2,1,t.amount)," ")}}function e7e(e,o){if(e&1&&(l(0,"td",39),E(1,ZAe,3,3,"span"),r()),e&2){let t=o.$implicit;a(),I(t.entryType.value==="CREDIT"?1:-1)}}function t7e(e,o){e&1&&b(0,"tr",41)}function i7e(e,o){if(e&1&&b(0,"tr",42),e&2){let t=o.$implicit;g("routerLink",Nt(1,TAe,t.transactionId))}}var gv=(()=>{class e{constructor(){this.accountingService=T(Ui),this.settingsService=T(At),this.dateUtils=T(Zt),this.route=T(Ie),this.minDate=new Date(2e3,0,1),this.maxDate=new Date,this.officeName=new it,this.glAccount=new it,this.entryTypeFilter=new it(""),this.entryTypeFilterData=[{option:"All",value:""},{option:"Manual Entries",value:!0},{option:"System Entries",value:!1}],this.transactionDateFrom=new it(new Date(new Date().setMonth(new Date().getMonth()-1))),this.transactionDateTo=new it(new Date),this.transactionId=new it,this.submittedOnDateFrom=new it,this.submittedOnDateTo=new it,this.displayedColumns=["id","officeName","transactionId","transactionDate","glAccountType","createdByUserName","submittedOnDate","glAccountCode","glAccountName","currency","debit","credit"],this.filterJournalEntriesBy=[{type:"officeId",value:""},{type:"glAccountId",value:""},{type:"manualEntriesOnly",value:""},{type:"transactionId",value:""},{type:"fromDate",value:this.dateUtils.formatDate(new Date(new Date().setMonth(new Date().getMonth()-1)),this.settingsService.dateFormat)},{type:"toDate",value:this.dateUtils.formatDate(new Date,this.settingsService.dateFormat)},{type:"submittedOnDateFrom",value:""},{type:"submittedOnDateTo",value:""},{type:"dateFormat",value:this.settingsService.dateFormat},{type:"locale",value:this.settingsService.language.code}],this.route.data.subscribe(t=>{this.officeData=t.offices,this.glAccountData=t.glAccounts})}ngOnInit(){this.maxDate=this.settingsService.businessDate,this.setFilteredOffices(),this.setFilteredGlAccounts(),this.getJournalEntries()}ngAfterViewInit(){this.officeName.valueChanges.pipe(Mn(t=>t.id?t.id:""),Oo(500),Ao(),Eo(t=>{this.applyFilter(t,"officeId")})).subscribe(),this.glAccount.valueChanges.pipe(Mn(t=>t||""),Oo(500),Ao(),Eo(t=>{this.applyFilter(t,"glAccountId")})).subscribe(),this.transactionId.valueChanges.pipe(Oo(500),Ao(),Eo(t=>{this.applyFilter(t,"transactionId")})).subscribe(),this.transactionDateFrom.valueChanges.pipe(Oo(500),Ao(),Eo(t=>{this.applyFilter(this.dateUtils.formatDate(t,this.settingsService.dateFormat),"fromDate")})).subscribe(),this.transactionDateTo.valueChanges.pipe(Oo(500),Ao(),Eo(t=>{this.applyFilter(this.dateUtils.formatDate(t,this.settingsService.dateFormat),"toDate")})).subscribe(),this.submittedOnDateFrom.valueChanges.pipe(Oo(500),Ao(),Eo(t=>{this.applyFilter(this.dateUtils.formatDate(t,this.settingsService.dateFormat),"submittedOnDateFrom")})).subscribe(),this.submittedOnDateTo.valueChanges.pipe(Oo(500),Ao(),Eo(t=>{this.applyFilter(this.dateUtils.formatDate(t,this.settingsService.dateFormat),"submittedOnDateTo")})).subscribe(),this.sort.sortChange.subscribe(()=>this.paginator.pageIndex=0),fl(this.sort.sortChange,this.paginator.page).pipe(Eo(()=>this.loadJournalEntriesPage())).subscribe()}loadJournalEntriesPage(){this.sort.direction||delete this.sort.active,this.dataSource.getJournalEntries(this.filterJournalEntriesBy,this.sort.active,this.sort.direction,this.paginator.pageIndex,this.paginator.pageSize)}applyFilter(t,n){this.paginator.pageIndex=0;let i=this.filterJournalEntriesBy.findIndex(s=>s.type===n);this.filterJournalEntriesBy[i].value=t,this.loadJournalEntriesPage()}displayOfficeName(t){return t?t.name:void 0}setFilteredOffices(){this.filteredOfficeData=this.officeName.valueChanges.pipe(hl(""),Mn(t=>typeof t=="string"?t:t.name),Mn(t=>t?this.filterOfficeAutocompleteData(t):this.officeData))}setFilteredGlAccounts(){this.filteredGLAccountData=this.glAccount.valueChanges.pipe(hl(""),Mn(t=>typeof t=="string"?t:t.name+" ("+t.glCode+")"),Mn(t=>t?this.filterGLAccountAutocompleteData(t):this.glAccountData))}filterOfficeAutocompleteData(t){return this.officeData.filter(n=>n.name.toLowerCase().includes(t.toLowerCase()))}filterGLAccountAutocompleteData(t){return this.glAccountData.filter(n=>(n.name+" ("+n.glCode+")").toLowerCase().includes(t.toLowerCase()))}getJournalEntries(){this.dataSource=new hv(this.accountingService),this.dataSource.getJournalEntries(this.filterJournalEntriesBy,this.sort.active,this.sort.direction,this.paginator.pageIndex,this.paginator.pageSize)}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275cmp=me({type:e,selectors:[["mifosx-search-journal-entry"]],viewQuery:function(n,i){if(n&1&&(Ee(kt,7),Ee(It,7)),n&2){let s;Te(s=Me())&&(i.paginator=s.first),Te(s=Me())&&(i.sort=s.first)}},decls:98,vars:59,consts:[["transactionDateFromPicker",""],["transactionDateToPicker",""],["submittedOnDateFromPicker",""],["submittedOnDateToPicker",""],["officeNameAutocomplete","matAutocomplete"],[1,"container","layout-row-wrap","gap-2px","responsive-column","filter-container"],[1,"flex-31"],["matInput","",3,"formControl","matAutocomplete"],[1,"flex-31",3,"inputFormControl","glAccountList","required","inputLabel"],[3,"selectionChange","formControl"],[3,"value"],[1,"flex-31",3,"click"],["matInput","",3,"min","max","matDatepicker","formControl"],["matSuffix","",3,"for"],["matInput","",3,"formControl"],["matInput","",3,"max","matDatepicker","formControl"],["matInput","",3,"min","matDatepicker","formControl"],["autoActiveFirstOption","",3,"displayWith"],[1,"mat-elevation-z8","container","table-container"],["mat-table","","matSort","",3,"dataSource"],["matColumnDef","id"],["mat-header-cell","","mat-sort-header","",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","officeName"],["matColumnDef","transactionId"],["matColumnDef","transactionDate"],["matColumnDef","glAccountType"],["mat-header-cell","",4,"matHeaderCellDef"],["matColumnDef","createdByUserName"],["matColumnDef","submittedOnDate"],["matColumnDef","glAccountCode"],["matColumnDef","glAccountName"],["matColumnDef","currency"],["matColumnDef","debit"],["matColumnDef","credit"],["mat-header-row","",4,"matHeaderRowDef"],["mat-row","","class","select-row",3,"routerLink",4,"matRowDef","matRowDefColumns"],["showFirstLastButtons","",3,"length","pageSize","pageSizeOptions"],["mat-header-cell","","mat-sort-header",""],["mat-cell",""],["mat-header-cell",""],["mat-header-row",""],["mat-row","",1,"select-row",3,"routerLink"]],template:function(n,i){if(n&1){let s=Y();l(0,"div",5)(1,"mat-form-field",6)(2,"mat-label"),c(3),p(4,"translate"),r(),b(5,"input",7),r(),b(6,"mifosx-gl-account-selector",8),l(7,"mat-form-field",6)(8,"mat-label"),c(9),p(10,"translate"),r(),l(11,"mat-select",9),R("selectionChange",function(u){return V(s),q(i.applyFilter(u.value,"manualEntriesOnly"))}),Se(12,MAe,2,2,"mat-option",10,Pe),r()(),l(14,"mat-form-field",11),R("click",function(){V(s);let u=xe(21);return q(u.open())}),l(15,"mat-label"),c(16),p(17,"translate"),r(),b(18,"input",12)(19,"mat-datepicker-toggle",13)(20,"mat-datepicker",null,0),r(),l(22,"mat-form-field",11),R("click",function(){V(s);let u=xe(29);return q(u.open())}),l(23,"mat-label"),c(24),p(25,"translate"),r(),b(26,"input",12)(27,"mat-datepicker-toggle",13)(28,"mat-datepicker",null,1),r(),l(30,"mat-form-field",6)(31,"mat-label"),c(32),p(33,"translate"),r(),b(34,"input",14),r(),l(35,"mat-form-field",11),R("click",function(){V(s);let u=xe(42);return q(u.open())}),l(36,"mat-label"),c(37),p(38,"translate"),r(),b(39,"input",15)(40,"mat-datepicker-toggle",13)(41,"mat-datepicker",null,2),r(),l(43,"mat-form-field",11),R("click",function(){V(s);let u=xe(50);return q(u.open())}),l(44,"mat-label"),c(45),p(46,"translate"),r(),b(47,"input",16)(48,"mat-datepicker-toggle",13)(49,"mat-datepicker",null,3),r()(),l(51,"mat-autocomplete",17,4),Se(53,DAe,2,5,"mat-option",10,Pe),p(55,"async"),r(),l(56,"div",18)(57,"table",19),X(58,20),F(59,EAe,3,3,"th",21)(60,IAe,2,1,"td",22),Z(),X(61,23),F(62,OAe,3,3,"th",21)(63,AAe,2,1,"td",22),Z(),X(64,24),F(65,FAe,3,3,"th",21)(66,kAe,2,1,"td",22),Z(),X(67,25),F(68,BAe,3,3,"th",21)(69,RAe,3,3,"td",22),Z(),X(70,26),F(71,NAe,3,3,"th",27)(72,LAe,2,1,"td",22),Z(),X(73,28),F(74,VAe,3,3,"th",27)(75,qAe,2,1,"td",22),Z(),X(76,29),F(77,zAe,3,3,"th",27)(78,HAe,3,3,"td",22),Z(),X(79,30),F(80,GAe,3,3,"th",21)(81,jAe,2,1,"td",22),Z(),X(82,31),F(83,$Ae,3,3,"th",21)(84,UAe,2,1,"td",22),Z(),X(85,32),F(86,WAe,3,3,"th",21)(87,QAe,2,1,"td",22),Z(),X(88,33),F(89,YAe,3,3,"th",21)(90,KAe,2,1,"td",22),Z(),X(91,34),F(92,XAe,3,3,"th",21)(93,e7e,2,1,"td",22),Z(),F(94,t7e,1,0,"tr",35)(95,i7e,1,3,"tr",36),r(),b(96,"mat-paginator",37),p(97,"async"),r()}if(n&2){let s=xe(21),d=xe(29),u=xe(42),f=xe(50),_=xe(52);a(3),h(m(4,40,"labels.inputs.Office Name")),a(2),g("formControl",i.officeName)("matAutocomplete",_),a(),g("inputFormControl",i.glAccount)("glAccountList",i.glAccountData)("required",!0)("inputLabel","GL Account Name or Code"),a(3),h(m(10,42,"labels.inputs.Filter")),a(2),g("formControl",i.entryTypeFilter),a(),we(i.entryTypeFilterData),a(4),h(m(17,44,"labels.inputs.Transaction Date From")),a(2),g("min",i.minDate)("max",i.maxDate)("matDatepicker",s)("formControl",i.transactionDateFrom),a(),g("for",s),a(5),h(m(25,46,"labels.inputs.Transaction Date To")),a(2),g("min",i.minDate)("max",i.maxDate)("matDatepicker",d)("formControl",i.transactionDateTo),a(),g("for",d),a(5),h(m(33,48,"labels.inputs.Transaction ID")),a(2),g("formControl",i.transactionId),a(3),h(m(38,50,"labels.inputs.Submitted on Date From")),a(2),g("max",i.submittedOnDateTo.value)("matDatepicker",u)("formControl",i.submittedOnDateFrom),a(),g("for",u),a(5),v("",m(46,52,"labels.inputs.Submitted on Date To")," "),a(2),g("min",i.submittedOnDateFrom.value)("matDatepicker",f)("formControl",i.submittedOnDateTo),a(),g("for",f),a(3),g("displayWith",i.displayOfficeName),a(2),we(m(55,54,i.filteredOfficeData)),a(4),g("dataSource",i.dataSource),a(37),g("matHeaderRowDef",i.displayedColumns),a(),g("matRowDefColumns",i.displayedColumns),a(),g("length",m(97,56,i.dataSource==null?null:i.dataSource.records$))("pageSize",50)("pageSizeOptions",oe(58,wAe))}},dependencies:[ue,fe,st,Ue,_n,Ae,Fe,Be,ai,ze,gt,ft,mi,di,pi,er,ta,Za,_t,It,xt,vt,bt,ri,Ct,yt,St,Pt,wt,Tt,kt,Xa,Pi,he,Jr,On],styles:["table[_ngcontent-%COMP%]{width:100%;box-shadow:0 2px 4px #0000001a;border:1px solid var(--border-color, #ddd);border-radius:8px;transition:background-color .3s ease,border-color .3s ease}table[_ngcontent-%COMP%] .select-row[_ngcontent-%COMP%]:hover{cursor:pointer}.filter-container[_ngcontent-%COMP%]{margin-bottom:1rem;padding:1.5rem;box-shadow:0 2px 4px #0000001a;border:1px solid var(--border-color, #ddd);border-radius:8px;transition:background-color .3s ease,border-color .3s ease}.table-container[_ngcontent-%COMP%]{box-shadow:0 2px 4px #0000001a;border:1px solid var(--border-color, #ddd);border-radius:8px;transition:background-color .3s ease,border-color .3s ease}"]})}}return e})();var n7e=["buttonDefineMapping"],o7e=["templateButtonDefineMapping"],a7e=["activitiesTable"],r7e=["templateActivitiesTable"],l7e=()=>[10,25],s7e=()=>["create"],c7e=e=>["view",e];function p7e(e,o){e&1&&(l(0,"button",17),b(1,"fa-icon",18),c(2),p(3,"translate"),r()),e&2&&(g("routerLink",oe(4,s7e)),a(2),v(" ",m(3,2,"labels.buttons.Define New Mapping")," "))}function m7e(e,o){e&1&&(l(0,"th",19),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.Financial Activity")))}function d7e(e,o){if(e&1&&(l(0,"td",20),c(1),p(2,"translate"),r()),e&2){let t=o.$implicit;a(),le(" (",t.financialActivityData.id,") ",m(2,2,"labels.accounting.financialActivity."+t.financialActivityData.name)," ")}}function u7e(e,o){e&1&&(l(0,"th",19),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.Account Type")))}function f7e(e,o){if(e&1&&(l(0,"td",20),c(1),p(2,"translate"),r()),e&2){let t=o.$implicit;a(),v(" ",m(2,1,"labels.inputs.accounting."+t.financialActivityData.mappedGLAccountType)," ")}}function h7e(e,o){e&1&&(l(0,"th",19),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.Account Code")))}function g7e(e,o){if(e&1&&(l(0,"td",20),c(1),r()),e&2){let t=o.$implicit;a(),h(t.glAccountData.glCode)}}function _7e(e,o){e&1&&(l(0,"th",19),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.Account Name")))}function C7e(e,o){if(e&1&&(l(0,"td",20),c(1),r()),e&2){let t=o.$implicit;a(),h(t.glAccountData.name)}}function v7e(e,o){e&1&&b(0,"tr",21)}function x7e(e,o){if(e&1&&b(0,"tr",22),e&2){let t=o.$implicit;g("routerLink",Nt(1,c7e,t.id))}}function b7e(e,o){if(e&1){let t=Y();l(0,"h2"),c(1),p(2,"translate"),r(),l(3,"p",23),c(4),p(5,"translate"),r(),l(6,"div",24)(7,"button",25),R("click",function(){let i=V(t).popover,s=w();return i.close(),q(s.configurationWizardService.closeConfigWizard())}),c(8),p(9,"translate"),r(),l(10,"button",26),R("click",function(){let i=V(t).popover,s=w();return i.close(),q(s.previousStep())}),c(11),p(12,"translate"),r(),l(13,"button",26),R("click",function(){let i=V(t).popover,s=w(),d=xe(5),u=xe(25);return i.close(),q(s.showPopover(u,d,"top",!0))}),c(14),p(15,"translate"),r()()}e&2&&(a(),h(m(2,5,"labels.heading.Define New Mapping")),a(3),h(m(5,7,"labels.text.To define new mapping.")),a(4),v(" ",m(9,9,"labels.buttons.Close")," "),a(3),v(" ",m(12,11,"labels.buttons.Back")," "),a(3),v(" ",m(15,13,"labels.buttons.Next")," "))}function y7e(e,o){if(e&1){let t=Y();l(0,"h4",23),c(1),p(2,"translate"),l(3,"a",27),c(4),p(5,"translate"),r()(),l(6,"div",24)(7,"button",25),R("click",function(){let i=V(t).popover,s=w();return i.close(),q(s.configurationWizardService.closeConfigWizard())}),c(8),p(9,"translate"),r(),l(10,"button",26),R("click",function(){let i=V(t).popover,s=w(),d=xe(2),u=xe(23);return i.close(),q(s.showPopover(u,d,"bottom",!0))}),c(11),p(12,"translate"),r(),l(13,"button",26),R("click",function(){let i=V(t).popover,s=w();return i.close(),q(s.nextStep())}),c(14),p(15,"translate"),r()()}e&2&&(a(),v(" ",m(2,5,"labels.heading.Account Linked Financial")," "),a(3),h(m(5,7,"labels.heading.Accounts linked to Financial Activities")),a(4),v(" ",m(9,9,"labels.buttons.Close")," "),a(3),v(" ",m(12,11,"labels.buttons.Back")," "),a(3),v(" ",m(15,13,"labels.buttons.Next")," "))}var _v=(()=>{class e{constructor(){this.route=T(Ie),this.router=T(qe),this.configurationWizardService=T(Qi),this.popoverService=T(Wi),this.displayedColumns=["financialActivity","glAccountType","glAccountCode","glAccountName"],this.route.data.subscribe(t=>{this.financialActivityAccountData=t.financialActivityAccounts})}ngOnInit(){this.setFinancialActivityAccounts()}setFinancialActivityAccounts(){this.dataSource=new Wt(this.financialActivityAccountData),this.dataSource.paginator=this.paginator,this.dataSource.sortingDataAccessor=(t,n)=>{switch(n){case"financialActivity":return t.financialActivityData.name;case"glAccountName":return t.glAccountData.name;case"glAccountCode":return t.glAccountData.glCode;default:return t[n]}},this.dataSource.sort=this.sort}showPopover(t,n,i,s){setTimeout(()=>this.popoverService.open(t,n,i,s,{}),200)}ngAfterViewInit(){this.configurationWizardService.showAccountsLinkedPage===!0&&setTimeout(()=>{this.showPopover(this.templateButtonDefineMapping,this.buttonDefineMapping.nativeElement,"bottom",!0)}),this.configurationWizardService.showAccountsLinkedList===!0&&setTimeout(()=>{this.showPopover(this.templateActivitiesTable,this.activitiesTable.nativeElement,"top",!0)})}nextStep(){this.configurationWizardService.showAccountsLinkedPage=!1,this.configurationWizardService.showAccountsLinkedList=!1,this.configurationWizardService.showMigrateOpeningBalances=!0,this.router.navigate(["/accounting"])}previousStep(){this.configurationWizardService.showAccountsLinkedPage=!1,this.configurationWizardService.showAccountsLinkedList=!1,this.configurationWizardService.showAccountsLinked=!0,this.router.navigate(["/accounting"])}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275cmp=me({type:e,selectors:[["mifosx-financial-activity-mappings"]],viewQuery:function(n,i){if(n&1&&(Ee(kt,7),Ee(It,7),Ee(n7e,5),Ee(o7e,5),Ee(a7e,5),Ee(r7e,5)),n&2){let s;Te(s=Me())&&(i.paginator=s.first),Te(s=Me())&&(i.sort=s.first),Te(s=Me())&&(i.buttonDefineMapping=s.first),Te(s=Me())&&(i.templateButtonDefineMapping=s.first),Te(s=Me())&&(i.activitiesTable=s.first),Te(s=Me())&&(i.templateActivitiesTable=s.first)}},decls:26,vars:6,consts:[["buttonDefineMapping",""],["activitiesTable",""],["templateButtonDefineMapping",""],["templateActivitiesTable",""],[1,"layout-row","align-end","container","m-b-20"],["mat-raised-button","","color","primary",3,"routerLink",4,"mifosxHasPermission"],[1,"mat-elevation-z8","container"],["mat-table","","matSort","",3,"dataSource"],["matColumnDef","financialActivity"],["mat-header-cell","","mat-sort-header","",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","glAccountType"],["matColumnDef","glAccountCode"],["matColumnDef","glAccountName"],["mat-header-row","",4,"matHeaderRowDef"],["mat-row","","class","select-row",3,"routerLink",4,"matRowDef","matRowDefColumns"],["showFirstLastButtons","",3,"pageSizeOptions"],["mat-raised-button","","color","primary",3,"routerLink"],["icon","plus",1,"m-r-10"],["mat-header-cell","","mat-sort-header",""],["mat-cell",""],["mat-header-row",""],["mat-row","",1,"select-row",3,"routerLink"],[1,"mw300"],[1,"layout-row","align-end","gap-2px","responsive-column"],["mat-raised-button","","color","warn",3,"click"],["mat-raised-button","","color","primary",3,"click"],["href","https://mifosforge.jira.com/wiki/spaces/docs/pages/106430472/Accounts+linked+to+Financial+Activities","target","_blank"]],template:function(n,i){n&1&&(l(0,"div",4)(1,"div",null,0),F(3,p7e,4,5,"button",5),r()(),l(4,"div",6,1)(6,"table",7),X(7,8),F(8,m7e,3,3,"th",9)(9,d7e,3,4,"td",10),Z(),X(10,11),F(11,u7e,3,3,"th",9)(12,f7e,3,3,"td",10),Z(),X(13,12),F(14,h7e,3,3,"th",9)(15,g7e,2,1,"td",10),Z(),X(16,13),F(17,_7e,3,3,"th",9)(18,C7e,2,1,"td",10),Z(),F(19,v7e,1,0,"tr",14)(20,x7e,1,3,"tr",15),r(),b(21,"mat-paginator",16),r(),F(22,b7e,16,15,"ng-template",null,2,ti)(24,y7e,16,15,"ng-template",null,3,ti)),n&2&&(a(3),g("mifosxHasPermission","CREATE_FINANCIALACTIVITYACCOUNT"),a(3),g("dataSource",i.dataSource),a(13),g("matHeaderRowDef",i.displayedColumns),a(),g("matRowDefColumns",i.displayedColumns),a(),g("pageSizeOptions",oe(5,l7e)))},dependencies:[ue,fe,Ae,ve,Ke,ke,_t,It,xt,vt,bt,ri,Ct,yt,St,Pt,wt,Tt,kt,he],styles:["table[_ngcontent-%COMP%]{width:100%}table[_ngcontent-%COMP%] .select-row[_ngcontent-%COMP%]:hover{cursor:pointer}"]})}}return e})();var S7e=()=>["../"];function w7e(e,o){if(e&1&&(l(0,"mat-option",4),c(1),p(2,"translate"),r()),e&2){let t=o.$implicit;g("value",t.id),a(),le(" (",t.id,") ",m(2,3,"labels.accounting.financialActivity."+t.name)," ")}}function P7e(e,o){e&1&&(l(0,"mat-error"),c(1),p(2,"translate"),p(3,"translate"),l(4,"strong"),c(5),p(6,"translate"),r()()),e&2&&(a(),le(" ",m(2,3,"labels.inputs.Financial Activity")," ",m(3,5,"labels.commons.is")," "),a(4),h(m(6,7,"labels.commons.required")))}function T7e(e,o){if(e&1&&(l(0,"button",9),c(1),p(2,"translate"),r()),e&2){let t=w();g("disabled",!t.financialActivityMappingForm.valid),a(),v(" ",m(2,2,"labels.buttons.Submit")," ")}}var Cv=(()=>{class e{constructor(){this.formBuilder=T(nt),this.accountingService=T(Ui),this.route=T(Ie),this.router=T(qe),this.glAccountData=[],this.route.data.subscribe(t=>{this.glAccountOptions=t.financialActivityAccountsTemplate.glAccountOptions,this.financialActivityData=t.financialActivityAccountsTemplate.financialActivityOptions})}ngOnInit(){this.createFinancialActivityMappingForm(),this.setGlAccountData()}createFinancialActivityMappingForm(){this.financialActivityMappingForm=this.formBuilder.group({financialActivityId:["",se.required],glAccountId:["",se.required]})}setGlAccountData(){this.financialActivityMappingForm.get("financialActivityId").valueChanges.subscribe(t=>{switch(t){case 100:case 101:case 102:case 103:this.glAccountData=this.glAccountOptions.assetAccountOptions;break;case 200:case 201:this.glAccountData=this.glAccountOptions.liabilityAccountOptions;break;case 300:this.glAccountData=this.glAccountOptions.equityAccountOptions;break}})}submit(){this.accountingService.createFinancialActivityAccount(this.financialActivityMappingForm.value).subscribe(t=>{this.router.navigate(["../view",t.resourceId],{relativeTo:this.route})})}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275cmp=me({type:e,selectors:[["mifosx-create-financial-activity-mapping"]],decls:19,vars:15,consts:[[1,"container"],[3,"ngSubmit","formGroup"],[1,"layout-column"],["required","","formControlName","financialActivityId"],[3,"value"],[3,"inputFormControl","glAccountList","required","inputLabel"],[1,"layout-row","align-center","gap-5px","responsive-column"],["type","button","mat-raised-button","",3,"routerLink"],["mat-raised-button","","color","primary",3,"disabled",4,"mifosxHasPermission"],["mat-raised-button","","color","primary",3,"disabled"]],template:function(n,i){n&1&&(l(0,"div",0)(1,"mat-card")(2,"form",1),R("ngSubmit",function(){return i.submit()}),l(3,"mat-card-content")(4,"div",2)(5,"mat-form-field")(6,"mat-label"),c(7),p(8,"translate"),r(),l(9,"mat-select",3),Se(10,w7e,3,5,"mat-option",4,Pe),r(),E(12,P7e,7,9,"mat-error"),r(),b(13,"mifosx-gl-account-selector",5),r()(),l(14,"mat-card-actions",6)(15,"button",7),c(16),p(17,"translate"),r(),F(18,T7e,3,4,"button",8),r()()()()),n&2&&(a(2),g("formGroup",i.financialActivityMappingForm),a(5),h(m(8,10,"labels.inputs.Financial Activity")),a(3),we(i.financialActivityData),a(2),I(i.financialActivityMappingForm.controls.financialActivityId.hasError("required")?12:-1),a(),g("inputFormControl",i.financialActivityMappingForm.controls.glAccountId)("glAccountList",i.glAccountData)("required",!0)("inputLabel","Account"),a(2),g("routerLink",oe(14,S7e)),a(),v(" ",m(17,12,"labels.buttons.Cancel")," "),a(2),g("mifosxHasPermission","CREATE_FINANCIALACTIVITYACCOUNT"))},dependencies:[ue,fe,tt,Ue,Xe,dt,Ze,et,Ae,$e,Je,Et,Fe,Be,ut,gt,ft,ve,Ke,ta,he],styles:[".container[_ngcontent-%COMP%]{max-width:37rem}"]})}}return e})();var M7e=()=>["../.."],D7e=()=>["edit"];function E7e(e,o){e&1&&(l(0,"button",10),b(1,"fa-icon",11),c(2),p(3,"translate"),r()),e&2&&(g("routerLink",oe(4,D7e)),a(2),v(" ",m(3,2,"labels.buttons.Edit")," "))}function I7e(e,o){if(e&1){let t=Y();l(0,"button",12),R("click",function(){V(t);let i=w();return q(i.deleteFinancialActivityAccount())}),b(1,"fa-icon",13),c(2),p(3,"translate"),r()}e&2&&(a(2),v(" ",m(3,1,"labels.buttons.Delete")," "))}var vv=(()=>{class e{constructor(){this.accountingService=T(Ui),this.route=T(Ie),this.router=T(qe),this.dialog=T(Ht),this.location=T(C0),this.route.data.subscribe(t=>{this.financialActivityAccount=t.financialActivityAccount,this.financialActivityAccountId=t.financialActivityAccount.id})}deleteFinancialActivityAccount(){this.dialog.open(vi,{data:{deleteContext:`financial activity mapping ${this.financialActivityAccountId}`}}).afterClosed().subscribe(n=>{n.delete&&this.accountingService.deleteFinancialActivityAccount(this.financialActivityAccountId).subscribe(()=>{this.router.navigate(["/accounting/financial-activity-mappings"])})})}goBack(){this.location.back()}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275cmp=me({type:e,selectors:[["mifosx-view-financial-activity-mapping"]],decls:24,vars:22,consts:[[1,"layout-row","align-end","gap-2percent","container","m-b-20"],["mat-raised-button","","color","primary",3,"routerLink",4,"mifosxHasPermission"],["mat-raised-button","","color","warn",3,"click",4,"mifosxHasPermission"],[1,"container"],[1,"layout-row-wrap"],[1,"flex-50","header"],[1,"flex-50"],[1,"flex-100",3,"glAccount","accountTitle"],[1,"layout-row","align-center","gap-5px","responsive-column"],["type","button","color","primary","mat-raised-button","",3,"routerLink"],["mat-raised-button","","color","primary",3,"routerLink"],["icon","edit",1,"m-r-10"],["mat-raised-button","","color","warn",3,"click"],["icon","trash",1,"m-r-10"]],template:function(n,i){n&1&&(l(0,"div",0),F(1,E7e,4,5,"button",1)(2,I7e,4,3,"button",2),r(),l(3,"div",3)(4,"mat-card")(5,"mat-card-content")(6,"div",4)(7,"div",5),c(8),p(9,"translate"),r(),l(10,"div",6),c(11),p(12,"translate"),r(),l(13,"div",5),c(14),p(15,"translate"),r(),l(16,"div",6),c(17),p(18,"translate"),r(),b(19,"mifosx-gl-account-display",7),r()(),l(20,"mat-card-actions",8)(21,"button",9),c(22),p(23,"translate"),r()()()()),n&2&&(a(),g("mifosxHasPermission","UPDATE_FINANCIALACTIVITYACCOUNT"),a(),g("mifosxHasPermission","DELETE_FINANCIALACTIVITYACCOUNT"),a(6),v(" ",m(9,11,"labels.inputs.Financial Activity")," "),a(3),le(" (",i.financialActivityAccount==null?null:i.financialActivityAccount.financialActivityData.id,") ",m(12,13,"labels.accounting.financialActivity."+(i.financialActivityAccount==null?null:i.financialActivityAccount.financialActivityData.name))," "),a(3),v(" ",m(15,15,"labels.inputs.Account Type")," "),a(3),v(" ",m(18,17,"labels.inputs.accounting."+(i.financialActivityAccount==null?null:i.financialActivityAccount.financialActivityData.mappedGLAccountType))," "),a(2),g("glAccount",i.financialActivityAccount==null?null:i.financialActivityAccount.glAccountData)("accountTitle","Account Name"),a(2),g("routerLink",oe(21,M7e)),a(),v(" ",m(23,19,"labels.buttons.Back")," "))},dependencies:[ue,fe,Ae,$e,Je,Et,ve,Ke,ke,rs,he],styles:[".container[_ngcontent-%COMP%]{max-width:37rem}.container[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] div[_ngcontent-%COMP%]{margin:1rem 0;word-wrap:break-word}.container[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] div.header[_ngcontent-%COMP%]{font-weight:500}"]})}}return e})();var O7e=()=>["../"];function A7e(e,o){if(e&1&&(l(0,"mat-option",4),c(1),p(2,"translate"),r()),e&2){let t=o.$implicit;g("value",t.id),a(),le(" (",t.id,") ",m(2,3,"labels.accounting.financialActivity."+t.name)," ")}}function F7e(e,o){if(e&1&&(l(0,"button",9),c(1),p(2,"translate"),r()),e&2){let t=w();g("disabled",t.financialActivityMappingForm.pristine),a(),v(" ",m(2,2,"labels.buttons.Submit")," ")}}var xv=(()=>{class e{constructor(){this.formBuider=T(nt),this.accountingService=T(Ui),this.route=T(Ie),this.router=T(qe),this.glAccountData=[],this.route.data.subscribe(t=>{this.financialActivityAccountId=t.financialActivityAccountAndTemplate.id,this.financialActivityId=t.financialActivityAccountAndTemplate.financialActivityData.id,this.glAccountId=t.financialActivityAccountAndTemplate.glAccountData.id,this.glAccountOptions=t.financialActivityAccountAndTemplate.glAccountOptions,this.financialActivityData=t.financialActivityAccountAndTemplate.financialActivityOptions})}ngOnInit(){this.createFinancialActivityMappingForm(),this.setGLAccountData(),this.financialActivityMappingForm.get("financialActivityId").setValue(this.financialActivityId),this.financialActivityMappingForm.get("glAccountId").setValue(this.glAccountId)}createFinancialActivityMappingForm(){this.financialActivityMappingForm=this.formBuider.group({financialActivityId:["",se.required],glAccountId:["",se.required]})}setGLAccountData(){this.financialActivityMappingForm.get("financialActivityId").valueChanges.subscribe(t=>{switch(t){case 100:case 101:case 102:case 103:this.glAccountData=this.glAccountOptions.assetAccountOptions;break;case 200:case 201:this.glAccountData=this.glAccountOptions.liabilityAccountOptions;break;case 300:this.glAccountData=this.glAccountOptions.equityAccountOptions;break}})}submit(){this.accountingService.updateFinancialActivityAccount(this.financialActivityAccountId,this.financialActivityMappingForm.value).subscribe(t=>{this.router.navigate(["../../",t.resourceId],{relativeTo:this.route})})}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275cmp=me({type:e,selectors:[["mifosx-edit-financial-activity-mapping"]],decls:18,vars:14,consts:[[1,"container"],[3,"ngSubmit","formGroup"],[1,"layout-column"],["required","","formControlName","financialActivityId"],[3,"value"],[3,"inputFormControl","glAccountList","required","inputLabel"],[1,"layout-row","align-center","gap-5px","responsive-column"],["type","button","mat-raised-button","",3,"routerLink"],["mat-raised-button","","color","primary",3,"disabled",4,"mifosxHasPermission"],["mat-raised-button","","color","primary",3,"disabled"]],template:function(n,i){n&1&&(l(0,"div",0)(1,"mat-card")(2,"form",1),R("ngSubmit",function(){return i.submit()}),l(3,"mat-card-content")(4,"div",2)(5,"mat-form-field")(6,"mat-label"),c(7),p(8,"translate"),r(),l(9,"mat-select",3),Se(10,A7e,3,5,"mat-option",4,Pe),r()(),b(12,"mifosx-gl-account-selector",5),r()(),l(13,"mat-card-actions",6)(14,"button",7),c(15),p(16,"translate"),r(),F(17,F7e,3,4,"button",8),r()()()()),n&2&&(a(2),g("formGroup",i.financialActivityMappingForm),a(5),h(m(8,9,"labels.inputs.Financial Activity")),a(3),we(i.financialActivityData),a(2),g("inputFormControl",i.financialActivityMappingForm.controls.glAccountId)("glAccountList",i.glAccountData)("required",!0)("inputLabel","Account"),a(2),g("routerLink",oe(13,O7e)),a(),v(" ",m(16,11,"labels.buttons.Cancel")," "),a(2),g("mifosxHasPermission","UPDATE_FINANCIALACTIVITYACCOUNT"))},dependencies:[ue,fe,tt,Ue,Xe,dt,Ze,et,Ae,$e,Je,Et,Fe,Be,gt,ft,ve,Ke,ta,he],styles:[".container[_ngcontent-%COMP%]{max-width:37rem}"]})}}return e})();var CN=e=>{let o=e.controls.debit.value,t=e.controls.credit.value;return o&&t&&o>0&&t>0?{error:!0}:null};var k7e=["searchFormRef"],B7e=["templateSearchFormRef"],R7e=()=>["../"];function N7e(e,o){if(e&1&&(l(0,"mat-option",9),c(1),r()),e&2){let t=o.$implicit;g("value",t.id),a(),v(" ",t.name," ")}}function L7e(e,o){e&1&&(l(0,"mat-error"),c(1),p(2,"translate"),p(3,"translate"),l(4,"strong"),c(5),p(6,"translate"),r()()),e&2&&(a(),le(" ",m(2,3,"labels.inputs.Office")," ",m(3,5,"labels.commons.is")," "),a(4),h(m(6,7,"labels.commons.required")))}function V7e(e,o){if(e&1&&(l(0,"mat-option",9),c(1),r()),e&2){let t=o.$implicit;g("value",t.code),a(),v(" ",t.displayLabel," ")}}function q7e(e,o){e&1&&(l(0,"mat-error"),c(1),p(2,"translate"),p(3,"translate"),l(4,"strong"),c(5),p(6,"translate"),r()()),e&2&&(a(),le(" ",m(2,3,"labels.inputs.Currency")," ",m(3,5,"labels.commons.is")," "),a(4),h(m(6,7,"labels.commons.required")))}function z7e(e,o){e&1&&(l(0,"mat-error"),c(1),p(2,"translate"),p(3,"translate"),l(4,"strong"),c(5),p(6,"translate"),r()()),e&2&&(a(),le(" ",m(2,3,"labels.inputs.Opening Balances Date")," ",m(3,5,"labels.commons.is")," "),a(4),h(m(6,7,"labels.commons.required")))}function H7e(e,o){if(e&1&&(l(0,"div",25)(1,"div",26)(2,"div",27),c(3),r(),l(4,"div",28),c(5),r(),l(6,"div",29),c(7),r(),l(8,"div",30)(9,"mat-form-field")(10,"mat-label"),c(11),p(12,"translate"),r(),b(13,"input",31),r()(),l(14,"div",30)(15,"mat-form-field")(16,"mat-label"),c(17),p(18,"translate"),r(),b(19,"input",32),r()()()()),e&2){let t=o.$index,n=w(2);a(),g("formGroupName",t),a(2),v(" ",n.openingBalancesData.glAccounts[t].glAccountType.value!==(n.openingBalancesData.glAccounts[t-1]==null?null:n.openingBalancesData.glAccounts[t-1].glAccountType.value)?n.glAccountTypeLabel(n.openingBalancesData.glAccounts[t].glAccountType.value):""," "),a(2),v(" ",n.openingBalancesData.glAccounts[t].glAccountCode," "),a(2),v(" ",n.openingBalancesData.glAccounts[t].glAccountName," "),a(4),h(m(12,6,"labels.inputs.Debit")),a(6),h(m(18,8,"labels.inputs.Credit"))}}function G7e(e,o){if(e&1){let t=Y();l(0,"div",12),b(1,"mifosx-gl-account-display",14),l(2,"mat-form-field",15)(3,"mat-label"),c(4),p(5,"translate"),r(),l(6,"mat-select",16),Se(7,V7e,2,2,"mat-option",9,Pe),r(),E(9,q7e,7,9,"mat-error"),r(),l(10,"mat-form-field",17),R("click",function(){V(t);let i=xe(17);return q(i.open())}),l(11,"mat-label"),c(12),p(13,"translate"),r(),b(14,"input",18)(15,"mat-datepicker-toggle",19)(16,"mat-datepicker",null,2),E(18,z7e,7,9,"mat-error"),r(),l(19,"div",20)(20,"div",21),c(21),p(22,"translate"),r(),l(23,"div",22),c(24),p(25,"translate"),r(),l(26,"div",22),c(27),p(28,"translate"),p(29,"translate"),r(),l(30,"div",23),c(31),p(32,"translate"),p(33,"currency"),r(),l(34,"div",24),c(35),p(36,"translate"),p(37,"currency"),r()(),Se(38,H7e,20,10,"div",25,Pe),r()}if(e&2){let t=xe(17),n=w();a(),g("accountTitle","Opening Balances Contra Account")("glAccount",n.openingBalancesData.contraAccount)("withTitle","50%"),a(3),h(m(5,19,"labels.inputs.Currency")),a(3),we(n.currencyData),a(2),I(n.openingBalancesForm.controls.currencyCode.hasError("required")?9:-1),a(3),h(m(13,21,"labels.inputs.Opening Balances Date")),a(2),g("min",n.minDate)("max",n.maxDate)("matDatepicker",t),a(),g("for",t),a(3),I(n.openingBalancesForm.controls.transactionDate.hasError("required")?18:-1),a(3),v(" ",m(22,23,"labels.inputs.Type")," "),a(3),v(" ",m(25,25,"labels.inputs.GL Code")," "),a(3),le(" ",m(28,27,"labels.inputs.GL Name")," ",m(29,29,"labels.inputs.Account")," "),a(4),le(" ",m(32,31,"labels.inputs.Total Debit"),": ",$t(33,33,n.debitsSum,n.currencyCode,"symbol-narrow","1.2-2")," "),a(4),le(" ",m(36,38,"labels.inputs.Total Credit"),": ",$t(37,40,n.creditsSum,n.currencyCode,"symbol-narrow","1.2-2")," "),a(3),we(n.glAccountEntries.controls)}}function j7e(e,o){if(e&1&&(l(0,"button",35),c(1),p(2,"translate"),r()),e&2){let t=w(2);g("disabled",!t.openingBalancesForm.valid),a(),v(" ",m(2,2,"labels.buttons.Submit")," ")}}function $7e(e,o){e&1&&(l(0,"mat-card-actions",13)(1,"button",33),c(2),p(3,"translate"),r(),F(4,j7e,3,4,"button",34),r()),e&2&&(a(),g("routerLink",oe(5,R7e)),a(),v(" ",m(3,3,"labels.buttons.Cancel")," "),a(2),g("mifosxHasPermission","DEFINEOPENINGBALANCE_JOURNALENTRY"))}function U7e(e,o){if(e&1){let t=Y();l(0,"h2"),c(1),p(2,"translate"),r(),l(3,"p",36),c(4),p(5,"translate"),l(6,"a",37),c(7),p(8,"translate"),r()(),l(9,"div",38)(10,"button",39),R("click",function(){let i=V(t).popover,s=w();return i.close(),q(s.configurationWizardService.closeConfigWizard())}),c(11),p(12,"translate"),r(),l(13,"button",11),R("click",function(){let i=V(t).popover,s=w();return i.close(),i.close(),q(s.previousStep())}),c(14),p(15,"translate"),r(),l(16,"button",11),R("click",function(){let i=V(t).popover,s=w();return i.close(),i.close(),q(s.nextStep())}),c(17),p(18,"translate"),r()()}e&2&&(a(),h(m(2,6,"labels.heading.Migrate opening balances (Office-wise)")),a(3),v(" ",m(5,8,"labels.text.Migrate Opening Balances")," "),a(3),h(m(8,10,"labels.inputs.Migrate opening balances (Office-wise)")),a(4),v(" ",m(12,12,"labels.buttons.Close")," "),a(3),v(" ",m(15,14,"labels.buttons.Back")," "),a(3),v(" ",m(18,16,"labels.buttons.Next")," "))}var bv=(()=>{class e{constructor(){this.formBuilder=T(nt),this.accountingService=T(Ui),this.settingsService=T(At),this.dateUtils=T(Zt),this.route=T(Ie),this.router=T(qe),this.configurationWizardService=T(Qi),this.popoverService=T(Wi),this.translateService=T(yi),this.minDate=new Date(2e3,0,1),this.maxDate=new Date,this.debitsSum=0,this.creditsSum=0,this.route.data.subscribe(t=>{this.officeData=t.offices,this.currencyData=t.currencies.selectedCurrencyOptions})}ngOnInit(){this.maxDate=this.settingsService.businessDate,this.createOpeningBalancesForm()}createOpeningBalancesForm(){this.openingBalancesForm=this.formBuilder.group({officeId:["",se.required],currencyCode:["",se.required],transactionDate:["",se.required],glAccountEntries:this.formBuilder.array([])}),this.openingBalancesForm.controls.currencyCode.valueChanges.subscribe(t=>{this.currencyCode=t})}createGLAccountEntryForm(t){return this.formBuilder.group({glAccountId:[t.glAccountId],debit:[null],credit:[null]},{validator:CN})}get glAccountEntries(){return this.openingBalancesForm.get("glAccountEntries")}retrieveOpeningBalances(){this.accountingService.retrieveOpeningBalances(this.openingBalancesForm.value.officeId).subscribe(t=>{let n=this.openingBalancesForm.get("glAccountEntries");t.glAccounts=t.assetAccountOpeningBalances.concat(t.liabityAccountOpeningBalances,t.equityAccountOpeningBalances,t.incomeAccountOpeningBalances,t.expenseAccountOpeningBalances),t.glAccounts.forEach(i=>{n.push(this.createGLAccountEntryForm(i))}),this.openingBalancesData=t,n.valueChanges.subscribe(()=>{this.debitsSum=0,this.creditsSum=0,n.controls.forEach(i=>{this.debitsSum+=i.value.debit,this.creditsSum+=i.value.credit})})})}submit(){if(this.amountsAreOK()){let t=this.openingBalancesForm.value;t.locale=this.settingsService.language.code,t.dateFormat=this.settingsService.dateFormat,t.transactionDate instanceof Date&&(t.transactionDate=this.dateUtils.formatDate(t.transactionDate,this.settingsService.dateFormat)),t.debits=[],t.credits=[],this.openingBalancesForm.value.glAccountEntries.forEach(n=>{n.debit&&t.debits.push({glAccountId:n.glAccountId,amount:n.debit}),n.credit&&t.credits.push({glAccountId:n.glAccountId,amount:n.credit})}),delete t.glAccountEntries,this.accountingService.defineOpeningBalances(t).subscribe(n=>{this.router.navigate(["/accounting/journal-entries/transactions/view",n.transactionId])})}}showPopover(t,n,i,s){setTimeout(()=>this.popoverService.open(t,n,i,s,{}),200)}ngAfterViewInit(){this.configurationWizardService.showMigrateOpeningBalances===!0&&setTimeout(()=>{this.showPopover(this.templateSearchFormRef,this.searchFormRef.nativeElement,"bottom",!0)})}nextStep(){this.configurationWizardService.showMigrateOpeningBalances=!1,this.configurationWizardService.showClosingEntries=!0,this.router.navigate(["/accounting"])}previousStep(){this.router.navigate(["/accounting"])}amountsAreOK(){let t=0,n=0;return this.openingBalancesForm.value.glAccountEntries.forEach(i=>{i.debit&&(t=t+i.debit),i.credit&&(n=n+i.credit)}),t>0&&t===n}glAccountTypeLabel(t){return this.translateService.instant("labels.inputs.accounting."+t)}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275cmp=me({type:e,selectors:[["mifosx-migrate-opening-balances"]],viewQuery:function(n,i){if(n&1&&(Ee(k7e,5),Ee(B7e,5)),n&2){let s;Te(s=Me())&&(i.searchFormRef=s.first),Te(s=Me())&&(i.templateSearchFormRef=s.first)}},decls:23,vars:10,consts:[["searchFormRef",""],["templateSearchFormRef",""],["openingBalancesDatePicker",""],[1,"container"],[3,"ngSubmit","formGroup"],[1,"layout-row-wrap","responsive-column","gap-2px"],[1,"m-r-30","flex-83"],[1,"flex-96"],["required","","formControlName","officeId"],[3,"value"],[1,"flex-15"],["mat-raised-button","","color","primary",3,"click"],[1,"layout-row-wrap","gap-2percent","responsive-column"],[1,"layout-row","gap-5px","align-center","responsive-column"],[1,"flex-100",3,"accountTitle","glAccount","withTitle"],[1,"flex-48"],["required","","formControlName","currencyCode"],[1,"flex-48",3,"click"],["matInput","","required","","formControlName","transactionDate",3,"min","max","matDatepicker"],["matSuffix","",3,"for"],[1,"layout-row-wrap","gap-2percent","responsive-column","flex-100","content"],[1,"header","flex-8"],[1,"header","flex-18"],[1,"header","r-amount","flex-18"],[1,"header","r-amount","flex-23"],["formArrayName","glAccountEntries",1,"flex-fill","layout-row-wrap","responsive-column","content"],[1,"flex-fill","layout-row-wrap","gap-2percent","responsive-column",3,"formGroupName"],[1,"flex-8"],[1,"flex-13"],[1,"flex-29"],[1,"flex-20"],["matInput","","type","number","formControlName","debit"],["matInput","","type","number","formControlName","credit"],["type","button","mat-raised-button","",3,"routerLink"],["mat-raised-button","","color","primary",3,"disabled",4,"mifosxHasPermission"],["mat-raised-button","","color","primary",3,"disabled"],[1,"mw300"],["href","https://mifosforge.jira.com/wiki/spaces/docs/pages/90243328/Migrate+opening+balances+Office-wise","target","_blank"],[1,"layout-row","align-end","gap-2px","responsive-column"],["mat-raised-button","","color","warn",3,"click"]],template:function(n,i){if(n&1){let s=Y();l(0,"div",3)(1,"mat-card")(2,"form",4),R("ngSubmit",function(){return V(s),q(i.submit())}),l(3,"mat-card-content")(4,"div",5,0)(6,"div",6)(7,"mat-form-field",7)(8,"mat-label"),c(9),p(10,"translate"),r(),l(11,"mat-select",8),Se(12,N7e,2,2,"mat-option",9,Pe),r(),E(14,L7e,7,9,"mat-error"),r()(),l(15,"div",10)(16,"button",11),R("click",function(){return V(s),q(i.retrieveOpeningBalances())}),c(17),p(18,"translate"),r()()(),E(19,G7e,40,45,"div",12),r(),E(20,$7e,5,6,"mat-card-actions",13),r()()(),F(21,U7e,19,18,"ng-template",null,1,ti)}n&2&&(a(2),g("formGroup",i.openingBalancesForm),a(7),h(m(10,6,"labels.inputs.Office")),a(3),we(i.officeData),a(2),I(i.openingBalancesForm.controls.officeId.hasError("required")?14:-1),a(3),v(" ",m(18,8,"labels.buttons.Retrieve")," "),a(2),I(i.openingBalancesData?19:-1),a(),I(i.openingBalancesData?20:-1))},dependencies:[ue,fe,tt,st,tn,Ue,Xe,dt,Ze,et,la,Va,Ae,$e,Je,Et,Fe,Be,ut,ai,ze,gt,ft,mi,di,pi,ve,Ke,rs,wg,he],styles:[".content[_ngcontent-%COMP%]{padding-top:20px}.content[_ngcontent-%COMP%] div[_ngcontent-%COMP%]{word-wrap:break-word}.content[_ngcontent-%COMP%] div.header[_ngcontent-%COMP%]{font-weight:500}"]})}}return e})();var _c=class{constructor(o,t="",n="",i="",s=!1,d=""){this.name=o,this.glCode=t,this.type=n,this.usage=i,this.manualEntriesAllowed=s,this.description=d,this.children=[]}};var vN=(()=>{class e{constructor(){this.translateService=T(yi),this.treeDataChange=new Na([])}get treeData(){return this.treeDataChange.value}initialize(t){let n=this.buildGLAccountTree(t);this.treeDataChange.next(n)}buildGLAccountTree(t){let n=[];if(n.push(new _c("ACCOUNTS")),n[0].children.push(new _c(this.translateService.instant("labels.inputs.accounting.ASSET"))),n[0].children.push(new _c(this.translateService.instant("labels.inputs.accounting.EQUITY"))),n[0].children.push(new _c(this.translateService.instant("labels.inputs.accounting.EXPENSE"))),n[0].children.push(new _c(this.translateService.instant("labels.inputs.accounting.INCOME"))),n[0].children.push(new _c(this.translateService.instant("labels.inputs.accounting.LIABILITY"))),t.length===0)return n;t[0].parentId||(t[0].parentId=0),t.sort((s,d)=>(s.parentId||(s.parentId=0),s.parentId-d.parentId));let i=[];for(let s of t)i[s.id]=new _c(s.name,s.glCode,s.type.value,s.usage.value,s.manualEntriesAllowed,s.description);for(let s of t)s.parentId===0?s.type.value==="ASSET"?n[0].children[0].children.push(i[s.id]):s.type.value==="EQUITY"?n[0].children[1].children.push(i[s.id]):s.type.value==="EXPENSE"?n[0].children[2].children.push(i[s.id]):s.type.value==="INCOME"?n[0].children[3].children.push(i[s.id]):s.type.value==="LIABILITY"&&n[0].children[4].children.push(i[s.id]):i[s.parentId]&&i[s.parentId].children.push(i[s.id]);return n}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275prov=Re({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();var yv=(()=>{class e{constructor(){}toggleExpandCollapse(t,n){return n?t.collapseAll():t.expandAll(),!n}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275prov=Re({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();var W7e=["buttonTreeView"],Q7e=["templateButtonTreeView"],Y7e=["accountsTable"],J7e=["templateAccountsTable"],K7e=()=>[10,25,50,100],X7e=()=>["gl-accounts/create"],Z7e=e=>["gl-accounts/view",e];function eFe(e,o){e&1&&(l(0,"button",40),b(1,"fa-icon",41),c(2),p(3,"translate"),r()),e&2&&(g("routerLink",oe(4,X7e)),a(2),v(" ",m(3,2,"labels.buttons.Add Account")," "))}function tFe(e,o){e&1&&(l(0,"th",42),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.Account")))}function iFe(e,o){if(e&1&&(l(0,"td",43),c(1),r()),e&2){let t=o.$implicit;a(),h(t.name)}}function nFe(e,o){e&1&&(l(0,"th",42),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.GL Code")))}function oFe(e,o){if(e&1&&(l(0,"td",43),c(1),r()),e&2){let t=o.$implicit;a(),h(t.glCode)}}function aFe(e,o){e&1&&(l(0,"th",42),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.Type")))}function rFe(e,o){if(e&1&&(l(0,"td",43),c(1),p(2,"translate"),r()),e&2){let t=o.$implicit;a(),v(" ",m(2,1,"labels.inputs.accounting."+t.type.value)," ")}}function lFe(e,o){e&1&&(l(0,"th",42),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.Disabled")))}function sFe(e,o){if(e&1&&(l(0,"td",43)(1,"div",44),b(2,"fa-icon",45),r()()),e&2){let t=o.$implicit;a(),g("className",t.disabled===!0?"disabled":"enabled"),a(),g("matTooltip",Le(t.disabled===!0?"Disabled":"Enabled"))}}function cFe(e,o){e&1&&(l(0,"th",42),c(1),p(2,"translate"),r()),e&2&&(a(),v(" ",m(2,1,"labels.inputs.Manual Entries Allowed")," "))}function pFe(e,o){e&1&&(b(0,"fa-icon",46),p(1,"translate")),e&2&&g("matTooltip",Le(m(1,2,"tooltips.Allowed")))}function mFe(e,o){e&1&&(b(0,"fa-icon",47),p(1,"translate")),e&2&&g("matTooltip",Le(m(1,2,"tooltips.")))}function dFe(e,o){if(e&1&&(l(0,"td",43),E(1,pFe,2,4,"fa-icon",46),E(2,mFe,2,4,"fa-icon",47),r()),e&2){let t=o.$implicit;a(),I(t.manualEntriesAllowed?1:-1),a(),I(t.manualEntriesAllowed?-1:2)}}function uFe(e,o){e&1&&(l(0,"th",42),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.Used as")))}function fFe(e,o){if(e&1&&(l(0,"td",43),c(1),r()),e&2){let t=o.$implicit;a(),h(t.usage.value)}}function hFe(e,o){e&1&&b(0,"tr",48)}function gFe(e,o){if(e&1&&b(0,"tr",49),e&2){let t=o.$implicit;g("routerLink",Nt(1,Z7e,t.id))}}function _Fe(e,o){if(e&1&&(l(0,"span",54),c(1),r()),e&2){let t=w().$implicit;a(),h("("+t.glCode+")")}}function CFe(e,o){if(e&1){let t=Y();l(0,"mat-tree-node",50)(1,"li",51),b(2,"button",52),l(3,"span",53),R("click",function(){let i=V(t).$implicit,s=w();return q(s.viewGLAccountNode(i))}),E(4,_Fe,2,1,"span",54),c(5),r()()()}if(e&2){let t=o.$implicit;a(4),I(t.glCode?4:-1),a(),v(" ",t.name," ")}}function vFe(e,o){if(e&1&&(l(0,"span",54),c(1),r()),e&2){let t=w().$implicit;a(),h("("+t.glCode+")")}}function xFe(e,o){if(e&1){let t=Y();l(0,"mat-nested-tree-node")(1,"li")(2,"div",51)(3,"button",55),b(4,"fa-icon",56),r(),l(5,"span",53),R("click",function(){let i=V(t).$implicit,s=w();return q(s.viewGLAccountNode(i))}),E(6,vFe,2,1,"span",54),c(7),r()(),l(8,"ul"),_l(9,57),r()()()}if(e&2){let t=o.$implicit,n=w();a(3),Dn("aria-label","toggle "+t.name),a(),g("icon",Le(n.nestedTreeControl.isExpanded(t)?"chevron-down":"chevron-right")),a(2),I(t.glCode?6:-1),a(),v(" ",t.name," "),a(),Cl("gl-account-tree-invisible",!n.nestedTreeControl.isExpanded(t))}}function bFe(e,o){if(e&1&&(l(0,"div",39)(1,"mat-card")(2,"mat-card-content")(3,"div",58)(4,"div",59),c(5),p(6,"translate"),r(),l(7,"div",60),c(8),r(),l(9,"div",59),c(10),p(11,"translate"),r(),l(12,"div",60),c(13),r(),l(14,"div",59),c(15),p(16,"translate"),r(),l(17,"div",60),c(18),p(19,"translate"),r(),l(20,"div",59),c(21),p(22,"translate"),r(),l(23,"div",60),c(24),r(),l(25,"div",59),c(26),p(27,"translate"),r(),l(28,"div",60),c(29),r(),l(30,"div",59),c(31),p(32,"translate"),r(),l(33,"div",60),c(34),r()()()()()),e&2){let t=w();a(5),v(" ",m(6,12,"labels.inputs.Account Name")," "),a(3),v(" ",t.glAccount.name," "),a(2),v(" ",m(11,14,"labels.inputs.GL Code")," "),a(3),v(" ",t.glAccount.glCode," "),a(2),v(" ",m(16,16,"labels.inputs.Account Type")," "),a(3),v(" ",m(19,18,"labels.inputs.accounting."+t.glAccount.type)," "),a(3),v(" ",m(22,20,"labels.inputs.Account Usage")," "),a(3),v(" ",t.glAccount.usage," "),a(2),v(" ",m(27,22,"labels.inputs.Manual Entries Allowed")," "),a(3),v(" ",t.glAccount.manualEntriesAllowed," "),a(2),v(" ",m(32,24,"labels.inputs.Description")," "),a(3),v(" ",t.glAccount.description," ")}}function yFe(e,o){if(e&1){let t=Y();l(0,"h2"),c(1),p(2,"translate"),r(),l(3,"p",61),c(4),p(5,"translate"),r(),l(6,"div",62)(7,"button",63),R("click",function(){let i=V(t).popover,s=w();return i.close(),q(s.configurationWizardService.closeConfigWizard())}),c(8),p(9,"translate"),r(),l(10,"button",64),R("click",function(){let i=V(t).popover,s=w();return i.close(),q(s.previousStep())}),c(11),p(12,"translate"),r(),l(13,"button",64),R("click",function(){let i=V(t).popover,s=w(),d=xe(9),u=xe(57);return i.close(),q(s.showPopover(u,d,"bottom",!0))}),c(14),p(15,"translate"),r()()}e&2&&(a(),h(m(2,5,"labels.heading.Tree View")),a(3),h(m(5,7,"labels.text.Alternative way-Tree view")),a(4),v(" ",m(9,9,"labels.buttons.Close")," "),a(3),v(" ",m(12,11,"labels.buttons.Back")," "),a(3),v(" ",m(15,13,"labels.buttons.Next")," "))}function SFe(e,o){if(e&1){let t=Y();l(0,"h2"),c(1),p(2,"translate"),r(),l(3,"p",61),c(4),p(5,"translate"),r(),l(6,"div",62)(7,"button",63),R("click",function(){let i=V(t).popover,s=w();return i.close(),q(s.configurationWizardService.closeConfigWizard())}),c(8),p(9,"translate"),r(),l(10,"button",64),R("click",function(){let i=V(t).popover,s=w(),d=xe(2),u=xe(55);return i.close(),q(s.showPopover(u,d,"bottom",!0))}),c(11),p(12,"translate"),r(),l(13,"button",64),R("click",function(){let i=V(t).popover,s=w(),d=xe(13),u=xe(59);return i.close(),q(s.showPopover(u,d,"bottom",!0))}),c(14),p(15,"translate"),r()()}e&2&&(a(),h(m(2,5,"labels.heading.Add Account")),a(3),h(m(5,7,"labels.text.Create New GL Account")),a(4),v(" ",m(9,9,"labels.buttons.Close")," "),a(3),v(" ",m(12,11,"labels.buttons.Back")," "),a(3),v(" ",m(15,13,"labels.buttons.Next")," "))}function wFe(e,o){if(e&1){let t=Y();l(0,"h4"),c(1),p(2,"translate"),r(),l(3,"div",62)(4,"button",63),R("click",function(){let i=V(t).popover,s=w();return i.close(),q(s.configurationWizardService.closeConfigWizard())}),c(5),p(6,"translate"),r(),l(7,"button",64),R("click",function(){let i=V(t).popover,s=w(),d=xe(9),u=xe(57);return i.close(),q(s.showPopover(u,d,"bottom",!0))}),c(8),p(9,"translate"),r(),l(10,"button",64),R("click",function(){let i=V(t).popover,s=w(),d=xe(20),u=xe(61);return i.close(),q(s.showPopover(u,d,"top",!0))}),c(11),p(12,"translate"),r()()}e&2&&(a(),h(m(2,4,"labels.heading.Search bar to filter GL accounts.")),a(4),v(" ",m(6,6,"labels.buttons.Close")," "),a(3),v(" ",m(9,8,"labels.buttons.Back")," "),a(3),v(" ",m(12,10,"labels.buttons.Next")," "))}function PFe(e,o){if(e&1){let t=Y();l(0,"h4",61),c(1),p(2,"translate"),r(),l(3,"div",62)(4,"button",63),R("click",function(){let i=V(t).popover,s=w();return i.close(),q(s.configurationWizardService.closeConfigWizard())}),c(5),p(6,"translate"),r(),l(7,"button",64),R("click",function(){let i=V(t).popover,s=w(),d=xe(13),u=xe(59);return i.close(),q(s.showPopover(u,d,"bottom",!0))}),c(8),p(9,"translate"),r(),l(10,"button",64),R("click",function(){let i=V(t).popover,s=w();return i.close(),q(s.nextStep())}),c(11),p(12,"translate"),r()()}e&2&&(a(),v(" ",m(2,4,"labels.heading.List of chart of all the accounts being used by your organization.")," "),a(4),v(" ",m(6,6,"labels.buttons.Close")," "),a(3),v(" ",m(9,8,"labels.buttons.Back")," "),a(3),v(" ",m(12,10,"labels.buttons.Next")," "))}var Sv=(()=>{class e{constructor(){this.glAccountTreeService=T(vN),this.route=T(Ie),this.router=T(qe),this.treeControlService=T(yv),this.configurationWizardService=T(Qi),this.popoverService=T(Wi),this.viewGroup=new it("listView"),this.displayedColumns=["name","glCode","glAccountType","disabled","manualEntriesAllowed","usedAs"],this.isTreeExpanded=!0,this.hasNestedChild=(n,i)=>i.children.length,this._getChildren=n=>sd(n.children);let t=this.glAccountTreeService;this.route.data.subscribe(n=>{this.glAccountData=n.chartOfAccounts,t.initialize(this.glAccountData)}),this.nestedTreeControl=new zg(this._getChildren),this.nestedTreeDataSource=new jg}ngOnInit(){this.tableDataSource=new Wt(this.glAccountData),this.glAccountTreeService.treeDataChange.subscribe(t=>{this.nestedTreeDataSource.data=t,this.nestedTreeControl.expand(this.nestedTreeDataSource.data[0]),this.nestedTreeControl.dataNodes=t})}ngAfterViewInit(){this.tableDataSource.paginator=this.paginator,this.tableDataSource.sortingDataAccessor=(t,n)=>{switch(n){case"glAccountType":return t.type.value;case"usedAs":return t.usage.value;default:return t[n]}},this.tableDataSource.sort=this.sort,this.configurationWizardService.showChartofAccountsPage===!0&&setTimeout(()=>{this.showPopover(this.templateButtonTreeView,this.buttonTreeView.nativeElement,"bottom",!0)}),this.configurationWizardService.showChartofAccountsList===!0&&setTimeout(()=>{this.showPopover(this.templateAccountsTable,this.accountsTable.nativeElement,"top",!0)})}applyFilter(t){this.tableDataSource.filter=t.trim().toLowerCase()}viewGLAccountNode(t){t.glCode?this.glAccount=t:delete this.glAccount}showPopover(t,n,i,s){setTimeout(()=>this.popoverService.open(t,n,i,s,{}),200)}nextStep(){this.configurationWizardService.showChartofAccountsPage=!1,this.configurationWizardService.showChartofAccountsList=!1,this.configurationWizardService.showChartofAccountsForm=!0,this.router.navigate(["/accounting/chart-of-accounts/gl-accounts/create"])}previousStep(){this.configurationWizardService.showChartofAccountsPage=!1,this.configurationWizardService.showChartofAccountsList=!1,this.configurationWizardService.showChartofAccounts=!0,this.router.navigate(["/accounting"])}toggleExpandCollapse(){this.isTreeExpanded=this.treeControlService.toggleExpandCollapse(this.nestedTreeControl,this.isTreeExpanded)}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275cmp=me({type:e,selectors:[["mifosx-chart-of-accounts"]],viewQuery:function(n,i){if(n&1&&(Ee(kt,7),Ee(It,7),Ee(W7e,5),Ee(Q7e,5),Ee(Y7e,5),Ee(J7e,5)),n&2){let s;Te(s=Me())&&(i.paginator=s.first),Te(s=Me())&&(i.sort=s.first),Te(s=Me())&&(i.buttonTreeView=s.first),Te(s=Me())&&(i.templateButtonTreeView=s.first),Te(s=Me())&&(i.accountsTable=s.first),Te(s=Me())&&(i.templateAccountsTable=s.first)}},decls:62,vars:19,consts:[["buttonTreeView",""],["buttonAddAccount",""],["filter",""],["accountsTable",""],["templateButtonTreeView",""],["templateButtonAddAccount",""],["templateFilter",""],["templateAccountsTable",""],[1,"container","m-b-20","layout-row","align-end","gap-20px"],[3,"formControl"],["value","listView"],["icon","list"],["value","treeView"],["icon","sitemap"],["mat-raised-button","","color","primary",3,"routerLink",4,"mifosxHasPermission"],[1,"container",3,"hidden"],[1,"layout-row","gap-20px"],[1,"flex-fill"],["matInput","",3,"keyup"],[1,"mat-elevation-z8"],["mat-table","","matSort","",3,"dataSource"],["matColumnDef","name"],["mat-header-cell","","mat-sort-header","",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","glCode"],["matColumnDef","glAccountType"],["matColumnDef","disabled"],["matColumnDef","manualEntriesAllowed"],["matColumnDef","usedAs"],["mat-header-row","",4,"matHeaderRowDef"],["mat-row","","class","select-row",3,"routerLink",4,"matRowDef","matRowDefColumns"],["showFirstLastButtons","",3,"pageSizeOptions"],[1,"m-b-20","layout-row","align-start","gap-20px"],["mat-raised-button","",3,"click"],[1,"layout-row","gap-4percent","responsive-column"],[1,"mat-elevation-z8","flex"],[1,"gl-account-tree",3,"dataSource","treeControl"],["matTreeNodeToggle","",4,"matTreeNodeDef"],[4,"matTreeNodeDef","matTreeNodeDefWhen"],[1,"flex-48"],["mat-raised-button","","color","primary",3,"routerLink"],["icon","plus",1,"m-r-10"],["mat-header-cell","","mat-sort-header",""],["mat-cell",""],[3,"className"],["matTooltipPosition","right","icon","circle","size","lg",3,"matTooltip"],["matTooltipPosition","right","icon","check-circle","size","lg",1,"manual-entries-allowed",3,"matTooltip"],["matTooltipPosition","right","icon","times-circle","size","lg",1,"manual-entries-not-allowed",3,"matTooltip"],["mat-header-row",""],["mat-row","",1,"select-row",3,"routerLink"],["matTreeNodeToggle",""],[1,"mat-tree-node"],["mat-icon-button","","disabled",""],[3,"click"],[1,"m-r-10"],["mat-icon-button","","matTreeNodeToggle",""],[1,"mat-icon-rtl-mirror",3,"icon"],["matTreeNodeOutlet",""],[1,"layout-row-wrap"],[1,"flex-50","header"],[1,"flex-50"],[1,"mw300"],[1,"layout-row","align-end","gap-2px","responsive-column"],["mat-raised-button","","color","warn",3,"click"],["mat-raised-button","","color","primary",3,"click"]],template:function(n,i){if(n&1){let s=Y();l(0,"div",8)(1,"div",null,0)(3,"mat-button-toggle-group",9)(4,"mat-button-toggle",10),b(5,"fa-icon",11),r(),l(6,"mat-button-toggle",12),b(7,"fa-icon",13),r()()(),l(8,"div",null,1),F(10,eFe,4,5,"button",14),r()(),l(11,"div",15)(12,"div",16,2)(14,"mat-form-field",17)(15,"mat-label"),c(16),p(17,"translate"),r(),l(18,"input",18),R("keyup",function(u){return V(s),q(i.applyFilter(u.target.value))}),r()()(),l(19,"div",19,3)(21,"table",20),X(22,21),F(23,tFe,3,3,"th",22)(24,iFe,2,1,"td",23),Z(),X(25,24),F(26,nFe,3,3,"th",22)(27,oFe,2,1,"td",23),Z(),X(28,25),F(29,aFe,3,3,"th",22)(30,rFe,3,3,"td",23),Z(),X(31,26),F(32,lFe,3,3,"th",22)(33,sFe,3,3,"td",23),Z(),X(34,27),F(35,cFe,3,3,"th",22)(36,dFe,3,2,"td",23),Z(),X(37,28),F(38,uFe,3,3,"th",22)(39,fFe,2,1,"td",23),Z(),F(40,hFe,1,0,"tr",29)(41,gFe,1,3,"tr",30),r(),b(42,"mat-paginator",31),r()(),l(43,"div",15)(44,"div",32)(45,"button",33),R("click",function(){return V(s),q(i.toggleExpandCollapse())}),c(46),p(47,"translate"),r()(),l(48,"div",34)(49,"div",35)(50,"mat-tree",36),F(51,CFe,6,2,"mat-tree-node",37)(52,xFe,10,7,"mat-nested-tree-node",38),r()(),E(53,bFe,35,26,"div",39),r()(),F(54,yFe,16,15,"ng-template",null,4,ti)(56,SFe,16,15,"ng-template",null,5,ti)(58,wFe,13,12,"ng-template",null,6,ti)(60,PFe,13,12,"ng-template",null,7,ti)}n&2&&(a(3),g("formControl",i.viewGroup),a(7),g("mifosxHasPermission","CREATE_GLACCOUNT"),a(),g("hidden",i.viewGroup.value!=="listView"),a(5),h(m(17,14,"labels.inputs.Filter")),a(5),g("dataSource",i.tableDataSource),a(19),g("matHeaderRowDef",i.displayedColumns),a(),g("matRowDefColumns",i.displayedColumns),a(),g("pageSizeOptions",oe(18,K7e)),a(),g("hidden",i.viewGroup.value!=="treeView"),a(3),v(" ",m(47,16,i.isTreeExpanded?"labels.buttons.Collapse All":"labels.buttons.Expand All")," "),a(4),g("dataSource",i.nestedTreeDataSource)("treeControl",i.nestedTreeControl),a(2),g("matTreeNodeDefWhen",i.hasNestedChild),a(),I(i.glAccount?53:-1))},dependencies:[ue,fe,Ue,_n,Ae,$e,Je,Fe,Be,ze,ve,Ke,Mp,Dp,ke,_t,It,xt,vt,bt,ri,Ct,yt,si,St,Pt,wt,Tt,kt,D0,M0,T0,E0,wi,Hg,Gg,he],styles:["table[_ngcontent-%COMP%]{width:100%}table[_ngcontent-%COMP%] .select-row[_ngcontent-%COMP%]:hover{cursor:pointer}.gl-account-tree[_ngcontent-%COMP%] ul[_ngcontent-%COMP%], .gl-account-tree[_ngcontent-%COMP%] li[_ngcontent-%COMP%]{margin-top:0;margin-bottom:0;list-style-type:none}.gl-account-tree[_ngcontent-%COMP%] li[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{cursor:pointer}.gl-account-tree[_ngcontent-%COMP%] .gl-account-tree-invisible[_ngcontent-%COMP%]{display:none}.content[_ngcontent-%COMP%] div[_ngcontent-%COMP%]{margin:1rem 0;word-wrap:break-word}.content[_ngcontent-%COMP%] div.header[_ngcontent-%COMP%]{font-weight:500}.enabled[_ngcontent-%COMP%]{color:#32cd32}.disabled[_ngcontent-%COMP%]{color:#f44366}.manual-entries-allowed[_ngcontent-%COMP%]{color:#32cd32}.manual-entries-not-allowed[_ngcontent-%COMP%]{color:#f44366}"]})}}return e})();var TFe=()=>({step:1}),MFe=()=>({step:2}),DFe=()=>({step:3}),Fr=(()=>{class e{constructor(){this.dialogRef=T(eo),this.data=T(Po);let t=this.data;this.stepName=t.stepName}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275cmp=me({type:e,selectors:[["mifosx-continue-setup-dialog"]],decls:18,vars:26,consts:[["mat-dialog-title",""],[1,"mw600"],["mat-raised-button","","color","warn",3,"mat-dialog-close"],["mat-raised-button","","color","primary",3,"mat-dialog-close"]],template:function(n,i){n&1&&(l(0,"h2",0),c(1),p(2,"translate"),r(),l(3,"mat-dialog-content")(4,"h3",1),c(5),p(6,"translate"),p(7,"translate"),r()(),l(8,"mat-dialog-actions")(9,"button",2),c(10),p(11,"translate"),r(),l(12,"button",3),c(13),p(14,"translate"),r(),l(15,"button",3),c(16),p(17,"translate"),r()()),n&2&&(a(),h(m(2,11,"labels.heading.Configuration Wizard")),a(4),ea(" ",m(6,13,"labels.heading.You have created")," ",i.stepName," ",m(7,15,"labels.heading.successfully select option")," "),a(4),g("mat-dialog-close",oe(23,TFe)),a(),v(" ",m(11,17,"labels.buttons.Close Configuration Wizard")," "),a(2),g("mat-dialog-close",oe(24,MFe)),a(),le(" ",m(14,19,"labels.buttons.Create more")," ",i.stepName," "),a(2),g("mat-dialog-close",oe(25,DFe)),a(),v(" ",m(17,21,"labels.buttons.Go to next step")," "))},dependencies:[ue,fe,ve,Wn,ho,Nn,Un,he],encapsulation:2})}}return e})();var EFe=["accountFormRef"],IFe=["templateAccountFormRef"],OFe=e=>[e];function AFe(e,o){if(e&1&&(l(0,"mat-option",7),c(1),p(2,"translate"),r()),e&2){let t=o.$implicit;g("value",t.id),a(),v(" ",m(2,2,"labels.inputs.accounting."+t.value)," ")}}function FFe(e,o){e&1&&(l(0,"mat-error"),c(1),p(2,"translate"),p(3,"translate"),l(4,"strong"),c(5),p(6,"translate"),r()()),e&2&&(a(),le(" ",m(2,3,"labels.inputs.Account Type")," ",m(3,5,"labels.commons.is")," "),a(4),h(m(6,7,"labels.commons.required")))}function kFe(e,o){e&1&&(l(0,"mat-error"),c(1),p(2,"translate"),p(3,"translate"),l(4,"strong"),c(5),p(6,"translate"),r()()),e&2&&(a(),le(" ",m(2,3,"labels.inputs.Account Name")," ",m(3,5,"labels.commons.is")," "),a(4),h(m(6,7,"labels.commons.required")))}function BFe(e,o){if(e&1&&(l(0,"mat-option",7),c(1),r()),e&2){let t=o.$implicit;g("value",t.id),a(),v(" ",t.value," ")}}function RFe(e,o){e&1&&(l(0,"mat-error"),c(1),p(2,"translate"),p(3,"translate"),l(4,"strong"),c(5),p(6,"translate"),r()()),e&2&&(a(),le(" ",m(2,3,"labels.inputs.Account Usage")," ",m(3,5,"labels.commons.is")," "),a(4),h(m(6,7,"labels.commons.required")))}function NFe(e,o){e&1&&(l(0,"mat-error"),c(1),p(2,"translate"),p(3,"translate"),l(4,"strong"),c(5),p(6,"translate"),r()()),e&2&&(a(),le(" ",m(2,3,"labels.inputs.GL Code")," ",m(3,5,"labels.commons.is")," "),a(4),h(m(6,7,"labels.commons.required")))}function LFe(e,o){if(e&1&&(l(0,"mat-option",7),c(1),r()),e&2){let t=o.$implicit;g("value",t.id),a(),v(" ",t.name," ")}}function VFe(e,o){if(e&1&&(l(0,"button",21),c(1),p(2,"translate"),r()),e&2){let t=w();g("disabled",!t.glAccountForm.valid),a(),v(" ",m(2,2,"labels.buttons.Submit")," ")}}function qFe(e,o){if(e&1){let t=Y();l(0,"h2"),c(1),p(2,"translate"),r(),l(3,"p",22),c(4),p(5,"translate"),l(6,"a",23),c(7),p(8,"translate"),r()(),l(9,"div",24)(10,"button",25),R("click",function(){let i=V(t).popover,s=w();return i.close(),q(s.configurationWizardService.closeConfigWizard())}),c(11),p(12,"translate"),r(),l(13,"button",26),R("click",function(){let i=V(t).popover;return q(i.close())}),c(14),p(15,"translate"),r(),l(16,"button",26),R("click",function(){let i=V(t).popover,s=w();return i.close(),q(s.previousStep())}),c(17),p(18,"translate"),r(),l(19,"button",26),R("click",function(){let i=V(t).popover,s=w();return i.close(),q(s.nextStep())}),c(20),p(21,"translate"),r()()}e&2&&(a(),h(m(2,7,"labels.heading.Create GL account")),a(3),v(" ",m(5,9,"labels.text.Filling Details")," "),a(3),h(m(8,11,"labels.inputs.Chart of Accounts")),a(4),v(" ",m(12,13,"labels.buttons.Close")," "),a(3),v(" ",m(15,15,"labels.buttons.Create GL Account")," "),a(3),v(" ",m(18,17,"labels.buttons.Back")," "),a(3),v(" ",m(21,19,"labels.buttons.Next")," "))}var wv=(()=>{class e{constructor(){this.formBuilder=T(nt),this.accountingService=T(Ui),this.route=T(Ie),this.router=T(qe),this.configurationWizardService=T(Qi),this.popoverService=T(Wi),this.dialog=T(Ht),this.parentData=[],this.cancelRoute="../../",this.route.queryParamMap.subscribe(t=>{this.accountTypeId=Number(t.get("accountType")),this.parentId=Number(t.get("parent")),this.parentId&&(this.cancelRoute=`../view/${this.parentId}`)}),this.route.data.subscribe(t=>{this.chartOfAccountsData=t.chartOfAccountsTemplate,this.accountTypeData=t.chartOfAccountsTemplate.accountTypeOptions,this.accountUsageData=t.chartOfAccountsTemplate.usageOptions})}ngOnInit(){this.createGlAccountForm(),this.setGLAccountForm()}createGlAccountForm(){this.glAccountForm=this.formBuilder.group({type:["",se.required],name:["",se.required],usage:["",se.required],glCode:["",se.required],parentId:[this.parentId||void 0],tagId:[""],manualEntriesAllowed:[!0],description:[""]})}setGLAccountForm(){this.glAccountForm.get("type").valueChanges.subscribe(t=>{switch(t){case 1:this.parentData=this.chartOfAccountsData.assetHeaderAccountOptions,this.tagData=this.chartOfAccountsData.allowedAssetsTagOptions;break;case 2:this.parentData=this.chartOfAccountsData.liabilityHeaderAccountOptions,this.tagData=this.chartOfAccountsData.allowedLiabilitiesTagOptions;break;case 3:this.parentData=this.chartOfAccountsData.equityHeaderAccountOptions,this.tagData=this.chartOfAccountsData.allowedEquityTagOptions;break;case 4:this.parentData=this.chartOfAccountsData.incomeHeaderAccountOptions,this.tagData=this.chartOfAccountsData.allowedIncomeTagOptions;break;case 5:this.parentData=this.chartOfAccountsData.expenseHeaderAccountOptions,this.tagData=this.chartOfAccountsData.allowedExpensesTagOptions;break}})}submit(){this.glAccountForm.invalid||this.accountingService.createGlAccount(this.glAccountForm.value).subscribe(t=>{this.configurationWizardService.showChartofAccounts===!0?(this.configurationWizardService.showChartofAccounts=!1,this.openDialog()):this.router.navigate(["../view",t.resourceId],{relativeTo:this.route})})}showPopover(t,n,i,s){setTimeout(()=>this.popoverService.open(t,n,i,s,{}),200)}ngAfterViewInit(){this.configurationWizardService.showChartofAccountsForm===!0&&setTimeout(()=>{this.showPopover(this.templateAccountFormRef,this.accountFormRef.nativeElement,"bottom",!0)})}nextStep(){this.configurationWizardService.showChartofAccountsForm=!1,this.configurationWizardService.showAccountsLinked=!0,this.router.navigate(["/accounting"])}previousStep(){this.configurationWizardService.showChartofAccountsForm=!1,this.configurationWizardService.showChartofAccountsList=!0,this.router.navigate(["/accounting/chart-of-accounts"])}openDialog(){this.dialog.open(Fr,{data:{stepName:"GL account"}}).afterClosed().subscribe(n=>{n.step===1?(this.configurationWizardService.showChartofAccountsForm=!1,this.router.navigate(["../"],{relativeTo:this.route})):n.step===2?(this.configurationWizardService.showChartofAccountsForm=!0,this.router.routeReuseStrategy.shouldReuseRoute=()=>!1,this.router.onSameUrlNavigation="reload",this.router.navigate(["/accounting/chart-of-accounts/gl-accounts/create"])):n.step===3&&(this.configurationWizardService.showChartofAccountsForm=!1,this.configurationWizardService.showAccountsLinked=!0,this.router.navigate(["/accounting"]))})}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275cmp=me({type:e,selectors:[["mifosx-create-gl-account"]],viewQuery:function(n,i){if(n&1&&(Ee(EFe,5),Ee(IFe,5)),n&2){let s;Te(s=Me())&&(i.accountFormRef=s.first),Te(s=Me())&&(i.templateAccountFormRef=s.first)}},decls:58,vars:37,consts:[["accountFormRef",""],["templateAccountFormRef",""],[1,"container"],[3,"ngSubmit","formGroup"],[1,"layout-row-wrap","gap-2px","responsive-column"],[1,"flex-48"],["required","","formControlName","type"],[3,"value"],["matInput","","required","","formControlName","name"],["required","","formControlName","usage"],["matInput","","required","","formControlName","glCode"],[1,"flex-48",3,"inputFormControl","glAccountList","required","inputLabel"],[1,"flex-28"],["formControlName","tagId"],[1,"manual-entries-allowed-wrapper","flex-18"],["labelPosition","before","formControlName","manualEntriesAllowed",1,"manual-entries-allowed"],[1,"flex-98"],["matInput","","formControlName","description","cdkTextareaAutosize","","cdkAutosizeMinRows","2"],[1,"layout-row","align-center","gap-5px","responsive-column"],["type","button","mat-raised-button","",3,"routerLink"],["mat-raised-button","","color","primary",3,"disabled",4,"mifosxHasPermission"],["mat-raised-button","","color","primary",3,"disabled"],[1,"mw400"],["href","https://mifosforge.jira.com/wiki/spaces/docs/pages/67141745/Chart+of+Accounts+-+General+Ledger+Setup","target","_blank"],[1,"layout-row","align-end","gap-2px","responsive-column"],["mat-raised-button","","color","warn",3,"click"],["mat-raised-button","","color","primary",3,"click"]],template:function(n,i){if(n&1){let s=Y();l(0,"div",2)(1,"mat-card")(2,"form",3,0),R("ngSubmit",function(){return V(s),q(i.submit())}),l(4,"mat-card-content")(5,"div",4)(6,"mat-form-field",5)(7,"mat-label"),c(8),p(9,"translate"),r(),l(10,"mat-select",6),Se(11,AFe,3,4,"mat-option",7,Pe),r(),E(13,FFe,7,9,"mat-error"),r(),l(14,"mat-form-field",5)(15,"mat-label"),c(16),p(17,"translate"),r(),b(18,"input",8),E(19,kFe,7,9,"mat-error"),r(),l(20,"mat-form-field",5)(21,"mat-label"),c(22),p(23,"translate"),r(),l(24,"mat-select",9),Se(25,BFe,2,2,"mat-option",7,Pe),r(),E(27,RFe,7,9,"mat-error"),r(),l(28,"mat-form-field",5)(29,"mat-label"),c(30),p(31,"translate"),r(),b(32,"input",10),E(33,NFe,7,9,"mat-error"),r(),b(34,"mifosx-gl-account-selector",11),l(35,"mat-form-field",12)(36,"mat-label"),c(37),p(38,"translate"),r(),l(39,"mat-select",13),Se(40,LFe,2,2,"mat-option",7,Pe),r()(),l(42,"div",14)(43,"mat-checkbox",15),c(44),p(45,"translate"),r()(),l(46,"mat-form-field",16)(47,"mat-label"),c(48),p(49,"translate"),r(),b(50,"textarea",17),r()()(),l(51,"mat-card-actions",18)(52,"button",19),c(53),p(54,"translate"),r(),F(55,VFe,3,4,"button",20),r()()()(),F(56,qFe,22,21,"ng-template",null,1,ti)}n&2&&(a(2),g("formGroup",i.glAccountForm),a(6),h(m(9,19,"labels.inputs.Account Type")),a(3),we(i.accountTypeData),a(2),I(i.glAccountForm.controls.type.hasError("required")&&(i.glAccountForm.controls.type.touched||i.glAccountForm.controls.type.dirty)?13:-1),a(3),h(m(17,21,"labels.inputs.Account Name")),a(3),I(i.glAccountForm.controls.name.hasError("required")&&(i.glAccountForm.controls.name.touched||i.glAccountForm.controls.name.dirty)?19:-1),a(3),h(m(23,23,"labels.inputs.Account Usage")),a(3),we(i.accountUsageData),a(2),I(i.glAccountForm.controls.usage.hasError("required")&&(i.glAccountForm.controls.usage.touched||i.glAccountForm.controls.usage.dirty)?27:-1),a(3),h(m(31,25,"labels.inputs.GL Code")),a(3),I(i.glAccountForm.controls.glCode.hasError("required")&&(i.glAccountForm.controls.glCode.touched||i.glAccountForm.controls.glCode.dirty)?33:-1),a(),g("inputFormControl",i.glAccountForm.controls.parentId)("glAccountList",i.parentData)("required",!1)("inputLabel","Parent"),a(3),h(m(38,27,"labels.inputs.Tag")),a(3),we(i.tagData),a(4),v(" ",m(45,29,"labels.inputs.Manual Entries Allowed")," "),a(4),h(m(49,31,"labels.inputs.Description")),a(4),g("routerLink",Nt(35,OFe,i.cancelRoute)),a(),v(" ",m(54,33,"labels.buttons.Cancel")," "),a(2),g("mifosxHasPermission","CREATE_GLACCOUNT"))},dependencies:[ue,fe,tt,st,Ue,Xe,dt,Ze,et,Ae,$e,Je,Et,Fe,Be,ut,ze,gt,ft,ve,fi,Ke,ta,Ln,he],styles:[".manual-entries-allowed-wrapper[_ngcontent-%COMP%]{position:relative}.manual-entries-allowed-wrapper[_ngcontent-%COMP%] .manual-entries-allowed[_ngcontent-%COMP%]{padding:0 0 17.5px;position:absolute;bottom:0;right:0}"]})}}return e})();var zFe=()=>["/accounting/chart-of-accounts/gl-accounts/create"],HFe=(e,o)=>({parent:e,accountType:o}),GFe=()=>["edit"],jFe=e=>[e];function $Fe(e,o){if(e&1&&(l(0,"button",10),b(1,"fa-icon",11),c(2),p(3,"translate"),r()),e&2){let t=w(2);g("routerLink",oe(5,zFe))("queryParams",Ka(6,HFe,t.glAccount.id,t.glAccount.type.id)),a(2),v(" ",m(3,3,"labels.buttons.Subledger Account")," ")}}function UFe(e,o){if(e&1&&(l(0,"span"),E(1,$Fe,4,9,"button",10),r()),e&2){let t=w();a(),I(t.glAccount.usage.value==="HEADER"?1:-1)}}function WFe(e,o){e&1&&(l(0,"span")(1,"button",12),b(2,"fa-icon",13),c(3),p(4,"translate"),r()()),e&2&&(a(),g("routerLink",oe(4,GFe)),a(2),v(" ",m(4,2,"labels.buttons.Edit")," "))}function QFe(e,o){if(e&1){let t=Y();l(0,"button",15),R("click",function(){V(t);let i=w(2);return q(i.changeGlAccountState())}),b(1,"fa-icon",16),c(2),p(3,"translate"),r()}e&2&&(a(2),v(" ",m(3,1,"labels.buttons.Disable")," "))}function YFe(e,o){if(e&1&&(l(0,"span"),E(1,QFe,4,3,"button",14),r()),e&2){let t=w();a(),I(t.glAccount.disabled?-1:1)}}function JFe(e,o){if(e&1){let t=Y();l(0,"button",18),R("click",function(){V(t);let i=w(2);return q(i.changeGlAccountState())}),b(1,"fa-icon",19),c(2),p(3,"translate"),r()}e&2&&(a(2),v(" ",m(3,1,"labels.buttons.Enable")," "))}function KFe(e,o){if(e&1&&(l(0,"span"),E(1,JFe,4,3,"button",17),r()),e&2){let t=w();a(),I(t.glAccount.disabled?1:-1)}}function XFe(e,o){if(e&1){let t=Y();l(0,"button",15),R("click",function(){V(t);let i=w();return q(i.deleteGlAccount())}),b(1,"fa-icon",20),c(2),p(3,"translate"),r()}e&2&&(a(2),v(" ",m(3,1,"labels.buttons.Delete")," "))}function ZFe(e,o){if(e&1&&(l(0,"div",5)(1,"div",6),c(2),p(3,"translate"),r(),l(4,"div",7)(5,"a",21),b(6,"mifosx-gl-account-display",22),r()()()),e&2){let t=w();a(2),h(m(3,3,"labels.inputs.Parent Account Name")),a(3),g("routerLink",Nt(5,jFe,"/accounting/chart-of-accounts/gl-accounts/view/"+t.glAccount.parent.id)),a(),g("glAccount",t.glAccount.parent)}}function eke(e,o){if(e&1&&(l(0,"div",5)(1,"div",6),c(2),p(3,"translate"),r(),l(4,"div",7),c(5),r()()),e&2){let t=w();a(2),h(m(3,2,"labels.inputs.Tag")),a(3),h(t.glAccount.tagId.name)}}function tke(e,o){if(e&1&&(l(0,"div",5)(1,"div",6),c(2),p(3,"translate"),r(),l(4,"div",7),c(5),r()()),e&2){let t=w();a(2),h(m(3,2,"labels.inputs.Description")),a(3),h(t.glAccount.description)}}var Pv=(()=>{class e{constructor(){this.accountingService=T(Ui),this.route=T(Ie),this.router=T(qe),this.dialog=T(Ht),this.location=T(C0),this.route.data.subscribe(t=>{this.glAccount=t.glAccountAndChartOfAccountsTemplate})}deleteGlAccount(){this.dialog.open(vi,{data:{deleteContext:`gl account ${this.glAccount.id}`}}).afterClosed().subscribe(n=>{n.delete&&this.accountingService.deleteGlAccount(this.glAccount.id).subscribe(()=>{this.router.navigate(["/accounting/chart-of-accounts"])})})}changeGlAccountState(){this.accountingService.updateGlAccount(this.glAccount.id,{disabled:!this.glAccount.disabled}).subscribe(t=>{this.glAccount.disabled=t.changes.disabled})}goBack(){this.router.navigateByUrl("/accounting/chart-of-accounts")}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275cmp=me({type:e,selectors:[["mifosx-view-gl-account"]],decls:43,vars:31,consts:[[1,"container","m-b-20","layout-row","layout-lt-md-column","align-end","gap-2percent"],[4,"mifosxHasPermission"],["mat-raised-button","","color","warn",3,"click",4,"mifosxHasPermission"],[1,"container"],[1,"content-rows"],[1,"content-row"],[1,"label"],[1,"value"],[1,"layout-row","align-center","gap-5px","responsive-column"],["type","button","color","primary","mat-raised-button","",3,"click"],["mat-raised-button","","color","primary",3,"routerLink","queryParams"],["icon","plus",1,"m-r-10"],["mat-raised-button","","color","primary",3,"routerLink"],["icon","edit",1,"m-r-10"],["mat-raised-button","","color","warn"],["mat-raised-button","","color","warn",3,"click"],["icon","lock",1,"m-r-10"],["mat-raised-button","","color","accent"],["mat-raised-button","","color","accent",3,"click"],["icon","lock-open",1,"m-r-10"],["icon","trash",1,"m-r-10"],[1,"tab-link",3,"routerLink"],[3,"glAccount"]],template:function(n,i){n&1&&(l(0,"div",0),F(1,UFe,2,1,"span",1)(2,WFe,5,5,"span",1)(3,YFe,2,1,"span",1)(4,KFe,2,1,"span",1)(5,XFe,4,3,"button",2),r(),l(6,"div",3)(7,"mat-card")(8,"mat-card-content")(9,"div",4)(10,"div",5)(11,"div",6),c(12),p(13,"translate"),r(),l(14,"div",7),c(15),p(16,"translate"),r()(),l(17,"div",5)(18,"div",6),c(19),p(20,"translate"),r(),l(21,"div",7),c(22),r()(),E(23,ZFe,7,7,"div",5),E(24,eke,6,4,"div",5),l(25,"div",5)(26,"div",6),c(27),p(28,"translate"),r(),l(29,"div",7),c(30),r()(),l(31,"div",5)(32,"div",6),c(33),p(34,"translate"),r(),l(35,"div",7),c(36),p(37,"yesNo"),r()(),E(38,tke,6,4,"div",5),r()(),l(39,"mat-card-actions",8)(40,"button",9),R("click",function(){return i.goBack()}),c(41),p(42,"translate"),r()()()()),n&2&&(a(),g("mifosxHasPermission","CREATE_GLACCOUNT"),a(),g("mifosxHasPermission","UPDATE_GLACCOUNT"),a(),g("mifosxHasPermission","UPDATE_GLACCOUNT"),a(),g("mifosxHasPermission","UPDATE_GLACCOUNT"),a(),g("mifosxHasPermission","DELETE_GLACCOUNT"),a(7),h(m(13,17,"labels.inputs.Account Type")),a(3),h(m(16,19,"labels.inputs.accounting."+(i.glAccount.type==null?null:i.glAccount.type.value))),a(4),h(m(20,21,"labels.inputs.GL Code")),a(3),h(i.glAccount.glCode),a(),I(i.glAccount.parent?23:-1),a(),I(i.glAccount.tagId.id?24:-1),a(3),h(m(28,23,"labels.inputs.Account Usage")),a(3),h(i.glAccount.usage==null?null:i.glAccount.usage.value),a(3),h(m(34,25,"labels.inputs.Manual Entries Allowed")),a(3),h(m(37,27,i.glAccount.manualEntriesAllowed)),a(2),I(i.glAccount.description?38:-1),a(3),v(" ",m(42,29,"labels.buttons.Back")," "))},dependencies:[ue,fe,Ae,$e,Je,Et,ve,Ke,ke,rs,he,po],styles:[".container[_ngcontent-%COMP%]{max-width:37rem;margin:0 auto;padding:1rem}.container[_ngcontent-%COMP%] mat-card[_ngcontent-%COMP%]{margin-bottom:1rem;padding:1.5rem;box-shadow:0 2px 4px #0000001a;border:1px solid var(--border-color, #ddd);border-radius:8px;background-color:var(--card-background, #fff);transition:background-color .3s ease,border-color .3s ease}.container[_ngcontent-%COMP%] .layout-row-wrap[_ngcontent-%COMP%]{display:grid;grid-template-columns:50% 50%;gap:1rem}.container[_ngcontent-%COMP%] .layout-row-wrap[_ngcontent-%COMP%] .flex-50[_ngcontent-%COMP%]{padding:.5rem}.container[_ngcontent-%COMP%] .layout-row-wrap[_ngcontent-%COMP%] .flex-50.mat-body-strong[_ngcontent-%COMP%]{color:var(--label-color, #555);font-weight:600}.container[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] div[_ngcontent-%COMP%]{margin:1rem 0;word-wrap:break-word}.container[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] div[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{display:block;padding:.25rem 0;color:var(--text-color, inherit)}.container[_ngcontent-%COMP%] .content-rows[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1rem}.container[_ngcontent-%COMP%] .content-rows[_ngcontent-%COMP%] .content-row[_ngcontent-%COMP%]{display:flex;flex-direction:row;border-bottom:1px solid var(--border-color-light, #eee);padding-bottom:.5rem}.container[_ngcontent-%COMP%] .content-rows[_ngcontent-%COMP%] .content-row[_ngcontent-%COMP%] .label[_ngcontent-%COMP%]{flex:0 0 40%;font-weight:600;color:var(--label-color, #555);padding:.5rem 1rem .5rem 0}.container[_ngcontent-%COMP%] .content-rows[_ngcontent-%COMP%] .content-row[_ngcontent-%COMP%] .value[_ngcontent-%COMP%]{flex:0 0 60%;padding:.5rem 0;color:var(--text-color, inherit)}.container[_ngcontent-%COMP%] .content-rows[_ngcontent-%COMP%] .content-row[_ngcontent-%COMP%] .value[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{display:block;padding:.25rem 0}.container[_ngcontent-%COMP%] .back-button-container[_ngcontent-%COMP%]{margin-top:2rem}.container[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{transition:all .2s ease}.container[_ngcontent-%COMP%] button[_ngcontent-%COMP%]:hover{transform:translateY(-2px)}.dark-theme[_nghost-%COMP%], .dark-theme [_nghost-%COMP%]{--border-color: #444;--border-color-light: #3a3a3a;--card-background: #2d2d2d;--label-color: #b8b8b8;--text-color: #e0e0e0}.dark-theme[_nghost-%COMP%] .container[_ngcontent-%COMP%] mat-card[_ngcontent-%COMP%], .dark-theme [_nghost-%COMP%] .container[_ngcontent-%COMP%] mat-card[_ngcontent-%COMP%]{box-shadow:0 2px 4px #0000004d}"]})}}return e})();var ike=()=>["../"];function nke(e,o){if(e&1&&(l(0,"mat-option",5),c(1),r()),e&2){let t=o.$implicit;g("value",t.id),a(),v(" ",t.value," ")}}function oke(e,o){e&1&&(l(0,"mat-error"),c(1),p(2,"translate"),p(3,"translate"),l(4,"strong"),c(5),p(6,"translate"),r()()),e&2&&(a(),le(" ",m(2,3,"labels.inputs.Account Type")," ",m(3,5,"labels.commons.is")," "),a(4),h(m(6,7,"labels.commons.required")))}function ake(e,o){e&1&&(l(0,"mat-error"),c(1),p(2,"translate"),p(3,"translate"),l(4,"strong"),c(5),p(6,"translate"),r()()),e&2&&(a(),le(" ",m(2,3,"labels.inputs.Account Name")," ",m(3,5,"labels.commons.is")," "),a(4),h(m(6,7,"labels.commons.required")))}function rke(e,o){if(e&1&&(l(0,"mat-option",5),c(1),r()),e&2){let t=o.$implicit;g("value",t.id),a(),v(" ",t.value," ")}}function lke(e,o){e&1&&(l(0,"mat-error"),c(1),p(2,"translate"),p(3,"translate"),l(4,"strong"),c(5),p(6,"translate"),r()()),e&2&&(a(),le(" ",m(2,3,"labels.inputs.Account Usage")," ",m(3,5,"labels.commons.is")," "),a(4),h(m(6,7,"labels.commons.required")))}function ske(e,o){e&1&&(l(0,"mat-error"),c(1),p(2,"translate"),p(3,"translate"),l(4,"strong"),c(5),p(6,"translate"),r()()),e&2&&(a(),le(" ",m(2,3,"labels.inputs.GL Code")," ",m(3,5,"labels.commons.is")," "),a(4),h(m(6,7,"labels.commons.required")))}function cke(e,o){if(e&1&&(l(0,"mat-option",5),c(1),r()),e&2){let t=o.$implicit;g("value",t.id),a(),v(" ",t.name," ")}}function pke(e,o){if(e&1&&(l(0,"button",19),c(1),p(2,"translate"),r()),e&2){let t=w();g("disabled",t.glAccountForm.invalid||t.glAccountForm.pristine),a(),v(" ",m(2,2,"labels.buttons.Submit")," ")}}var Tv=(()=>{class e{constructor(){this.formBuilder=T(nt),this.accountingService=T(Ui),this.route=T(Ie),this.router=T(qe),this.route.data.subscribe(t=>{this.glAccount=t.glAccountAndChartOfAccountsTemplate})}ngOnInit(){this.createGlAccountForm(),this.setGLAccountForm()}createGlAccountForm(){this.glAccountForm=this.formBuilder.group({type:["",se.required],name:[this.glAccount.name,se.required],usage:[this.glAccount.usage.id,se.required],glCode:[this.glAccount.glCode,se.required],parentId:[this.glAccount.parentId],tagId:[this.glAccount.tagId.id],manualEntriesAllowed:[this.glAccount.manualEntriesAllowed,se.required],description:[this.glAccount.description]})}setGLAccountForm(){this.accountTypeData=this.glAccount.accountTypeOptions,this.accountUsageData=this.glAccount.usageOptions,this.glAccountForm.get("type").valueChanges.subscribe(t=>{switch(t){case 1:this.parentData=this.glAccount.assetHeaderAccountOptions,this.tagData=this.glAccount.allowedAssetsTagOptions;break;case 2:this.parentData=this.glAccount.liabilityHeaderAccountOptions,this.tagData=this.glAccount.allowedLiabilitiesTagOptions;break;case 3:this.parentData=this.glAccount.equityHeaderAccountOptions,this.tagData=this.glAccount.allowedEquityTagOptions;break;case 4:this.parentData=this.glAccount.incomeHeaderAccountOptions,this.tagData=this.glAccount.allowedIncomeTagOptions;break;case 5:this.parentData=this.glAccount.expenseHeaderAccountOptions,this.tagData=this.glAccount.allowedExpensesTagOptions;break}}),this.glAccountForm.get("type").setValue(this.glAccount.type.id)}submit(){this.accountingService.updateGlAccount(this.glAccount.id,this.glAccountForm.value).subscribe(t=>{this.router.navigate(["../../",t.resourceId],{relativeTo:this.route})})}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275cmp=me({type:e,selectors:[["mifosx-edit-gl-account"]],decls:55,vars:36,consts:[[1,"container"],[3,"ngSubmit","formGroup"],[1,"layout-row-wrap","gap-2px","responsive-column"],[1,"flex-48"],["required","","formControlName","type"],[3,"value"],["matInput","","required","","formControlName","name"],["required","","formControlName","usage"],["matInput","","required","","formControlName","glCode"],[1,"flex-48",3,"inputFormControl","glAccountList","required","inputLabel"],[1,"flex-28"],["formControlName","tagId"],[1,"manual-entries-allowed-wrapper","flex-18"],["labelPosition","before","required","","formControlName","manualEntriesAllowed",1,"manual-entries-allowed"],[1,"flex-98"],["matInput","","formControlName","description","cdkTextareaAutosize","","cdkAutosizeMinRows","2"],[1,"layout-row","align-center","gap-5px","responsive-column"],["type","button","mat-raised-button","",3,"routerLink"],["mat-raised-button","","color","primary",3,"disabled",4,"mifosxHasPermission"],["mat-raised-button","","color","primary",3,"disabled"]],template:function(n,i){n&1&&(l(0,"div",0)(1,"mat-card")(2,"form",1),R("ngSubmit",function(){return i.submit()}),l(3,"mat-card-content")(4,"div",2)(5,"mat-form-field",3)(6,"mat-label"),c(7),p(8,"translate"),r(),l(9,"mat-select",4),Se(10,nke,2,2,"mat-option",5,Pe),r(),E(12,oke,7,9,"mat-error"),r(),l(13,"mat-form-field",3)(14,"mat-label"),c(15),p(16,"translate"),r(),b(17,"input",6),E(18,ake,7,9,"mat-error"),r(),l(19,"mat-form-field",3)(20,"mat-label"),c(21),p(22,"translate"),r(),l(23,"mat-select",7),Se(24,rke,2,2,"mat-option",5,Pe),r(),E(26,lke,7,9,"mat-error"),r(),l(27,"mat-form-field",3)(28,"mat-label"),c(29),p(30,"translate"),r(),b(31,"input",8),E(32,ske,7,9,"mat-error"),r(),b(33,"mifosx-gl-account-selector",9),l(34,"mat-form-field",10)(35,"mat-label"),c(36),p(37,"translate"),r(),l(38,"mat-select",11),Se(39,cke,2,2,"mat-option",5,Pe),r()(),l(41,"div",12)(42,"mat-checkbox",13),c(43),p(44,"translate"),r()(),l(45,"mat-form-field",14)(46,"mat-label"),c(47),p(48,"translate"),r(),b(49,"textarea",15),r()()(),l(50,"mat-card-actions",16)(51,"button",17),c(52),p(53,"translate"),r(),F(54,pke,3,4,"button",18),r()()()()),n&2&&(a(2),g("formGroup",i.glAccountForm),a(5),h(m(8,19,"labels.inputs.Account Type")),a(3),we(i.accountTypeData),a(2),I(i.glAccountForm.controls.type.hasError("required")?12:-1),a(3),h(m(16,21,"labels.inputs.Account Name")),a(3),I(i.glAccountForm.controls.name.hasError("required")?18:-1),a(3),h(m(22,23,"labels.inputs.Account Usage")),a(3),we(i.accountUsageData),a(2),I(i.glAccountForm.controls.usage.hasError("required")?26:-1),a(3),h(m(30,25,"labels.inputs.GL Code")),a(3),I(i.glAccountForm.controls.glCode.hasError("required")?32:-1),a(),g("inputFormControl",i.glAccountForm.controls.parentId)("glAccountList",i.parentData)("required",!1)("inputLabel","Parent"),a(3),h(m(37,27,"labels.inputs.Tag")),a(3),we(i.tagData),a(4),v(" ",m(44,29,"labels.inputs.Manual Entries Allowed")," "),a(4),h(m(48,31,"labels.inputs.Description")),a(4),g("routerLink",oe(35,ike)),a(),v(" ",m(53,33,"labels.buttons.Cancel")," "),a(2),g("mifosxHasPermission","UPDATE_GLACCOUNT"))},dependencies:[ue,fe,tt,st,Ue,Xe,dt,Ze,et,Ae,$e,Je,Et,Fe,Be,ut,ze,gt,ft,ve,fi,Ke,ta,Ln,he],styles:[".manual-entries-allowed-wrapper[_ngcontent-%COMP%]{position:relative}.manual-entries-allowed-wrapper[_ngcontent-%COMP%] .manual-entries-allowed[_ngcontent-%COMP%]{padding:0 0 17.5px;position:absolute;bottom:0;right:0}"]})}}return e})();var mke=["buttonCreateClosure"],dke=["templateButtonCreateClosure"],uke=["closuresTable"],fke=["templateClosuresTable"],hke=()=>[10,25,50,100],gke=()=>["create"],_ke=e=>["view",e];function Cke(e,o){e&1&&(l(0,"button",26),b(1,"fa-icon",27),c(2),p(3,"translate"),r()),e&2&&(g("routerLink",oe(4,gke)),a(2),v(" ",m(3,2,"labels.buttons.Create Closure")," "))}function vke(e,o){if(e&1&&(l(0,"mat-option",13),c(1),r()),e&2){let t=o.$implicit;g("value",t.name),a(),v(" ",t.name," ")}}function xke(e,o){e&1&&(l(0,"th",28),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.Office")))}function bke(e,o){if(e&1&&(l(0,"td",29),c(1),r()),e&2){let t=o.$implicit;a(),h(t.officeName)}}function yke(e,o){e&1&&(l(0,"th",28),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.Closure Date")))}function Ske(e,o){if(e&1&&(l(0,"td",29),c(1),r()),e&2){let t=o.$implicit;a(),h(t.closingDate)}}function wke(e,o){e&1&&(l(0,"th",28),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.Comments")))}function Pke(e,o){if(e&1&&(l(0,"td",29),c(1),r()),e&2){let t=o.$implicit;a(),h(t.comments)}}function Tke(e,o){e&1&&(l(0,"th",28),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.Created By")))}function Mke(e,o){if(e&1&&(l(0,"td",29),c(1),r()),e&2){let t=o.$implicit;a(),h(t.createdByUsername)}}function Dke(e,o){e&1&&b(0,"tr",30)}function Eke(e,o){if(e&1&&b(0,"tr",31),e&2){let t=o.$implicit;g("routerLink",Nt(1,_ke,t.id))}}function Ike(e,o){if(e&1){let t=Y();l(0,"h2"),c(1),p(2,"translate"),r(),l(3,"p",32),c(4),p(5,"translate"),r(),l(6,"div",33)(7,"button",34),R("click",function(){let i=V(t).popover,s=w();return i.close(),q(s.configurationWizardService.closeConfigWizard())}),c(8),p(9,"translate"),r(),l(10,"button",35),R("click",function(){let i=V(t).popover,s=w();return i.close(),q(s.previousStep())}),c(11),p(12,"translate"),r(),l(13,"button",35),R("click",function(){let i=V(t).popover,s=w(),d=xe(5),u=xe(38);return i.close(),q(s.showPopover(u,d,"bottom",!0))}),c(14),p(15,"translate"),r()()}e&2&&(a(),h(m(2,5,"labels.heading.Create Closure")),a(3),h(m(5,7,"labels.text.Create new closure")),a(4),v(" ",m(9,9,"labels.buttons.Close")," "),a(3),v(" ",m(12,11,"labels.buttons.Back")," "),a(3),v(" ",m(15,13,"labels.buttons.Next")," "))}function Oke(e,o){if(e&1){let t=Y();l(0,"h4"),c(1),p(2,"translate"),r(),l(3,"div",33)(4,"button",34),R("click",function(){let i=V(t).popover,s=w();return i.close(),q(s.configurationWizardService.closeConfigWizard())}),c(5),p(6,"translate"),r(),l(7,"button",35),R("click",function(){let i=V(t).popover,s=w(),d=xe(2),u=xe(36);return i.close(),q(s.showPopover(u,d,"bottom",!0))}),c(8),p(9,"translate"),r(),l(10,"button",35),R("click",function(){let i=V(t).popover,s=w(),d=xe(18),u=xe(40);return i.close(),q(s.showPopover(u,d,"top",!0))}),c(11),p(12,"translate"),r()()}e&2&&(a(),h(m(2,4,"labels.heading.Search bar to filter closures by office.")),a(4),v(" ",m(6,6,"labels.buttons.Close")," "),a(3),v(" ",m(9,8,"labels.buttons.Back")," "),a(3),v(" ",m(12,10,"labels.buttons.Next")," "))}function Ake(e,o){if(e&1){let t=Y();l(0,"h4"),c(1),p(2,"translate"),l(3,"a",36),c(4),p(5,"translate"),r()(),l(6,"div",33)(7,"button",34),R("click",function(){let i=V(t).popover,s=w();return i.close(),q(s.configurationWizardService.closeConfigWizard())}),c(8),p(9,"translate"),r(),l(10,"button",35),R("click",function(){let i=V(t).popover,s=w(),d=xe(5),u=xe(38);return i.close(),q(s.showPopover(u,d,"bottom",!0))}),c(11),p(12,"translate"),r(),l(13,"button",35),R("click",function(){let i=V(t).popover,s=w();return i.close(),q(s.nextStep())}),c(14),p(15,"translate"),r()()}e&2&&(a(),v(" ",m(2,5,"labels.heading.List of closures. To know more click"),": "),a(3),h(m(5,7,"labels.inputs.Closing Entries")),a(4),v(" ",m(9,9,"labels.buttons.Close")," "),a(3),v(" ",m(12,11,"labels.buttons.Back")," "),a(3),v(" ",m(15,13,"labels.buttons.Next")," "))}var Mv=(()=>{class e{constructor(){this.route=T(Ie),this.router=T(qe),this.configurationWizardService=T(Qi),this.popoverService=T(Wi),this.displayedColumns=["officeName","closingDate","comments","createdByUsername"],this.officeName=new it,this.route.data.subscribe(t=>{this.officeData=t.offices,this.glAccountClosureData=t.glAccountClosures})}ngOnInit(){this.applyFilter(),this.setFilteredOffices(),this.setAccountingClosures()}applyFilter(){this.officeName.valueChanges.subscribe(t=>{this.dataSource.filter=t.trim().toLowerCase()})}setAccountingClosures(){this.dataSource=new Wt(this.glAccountClosureData),this.dataSource.paginator=this.paginator,this.dataSource.sort=this.sort}setFilteredOffices(){this.filteredOfficeData=this.officeName.valueChanges.pipe(hl(""),Mn(t=>typeof t=="string"?t:t.name),Mn(t=>t?this.filterOfficeAutocompleteData(t):this.officeData))}filterOfficeAutocompleteData(t){return this.officeData.filter(n=>n.name.toLowerCase().includes(t.toLowerCase()))}showPopover(t,n,i,s){setTimeout(()=>this.popoverService.open(t,n,i,s,{}),200)}ngAfterViewInit(){this.configurationWizardService.showClosingEntriesPage===!0&&setTimeout(()=>{this.showPopover(this.templateButtonCreateClosure,this.buttonCreateClosure.nativeElement,"bottom",!0)}),this.configurationWizardService.showClosingEntriesList===!0&&setTimeout(()=>{this.showPopover(this.templateClosuresTable,this.closuresTable.nativeElement,"top",!0)})}nextStep(){this.configurationWizardService.showClosingEntriesPage=!1,this.configurationWizardService.showClosingEntriesList=!1,this.configurationWizardService.showCreateJournalEntries=!0,this.router.navigate(["/accounting"])}previousStep(){this.configurationWizardService.showClosingEntriesPage=!1,this.configurationWizardService.showClosingEntriesList=!1,this.configurationWizardService.showClosingEntries=!0,this.router.navigate(["/accounting"])}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275cmp=me({type:e,selectors:[["mifosx-closing-entries"]],viewQuery:function(n,i){if(n&1&&(Ee(kt,7),Ee(It,7),Ee(mke,5),Ee(dke,5),Ee(uke,5),Ee(fke,5)),n&2){let s;Te(s=Me())&&(i.paginator=s.first),Te(s=Me())&&(i.sort=s.first),Te(s=Me())&&(i.buttonCreateClosure=s.first),Te(s=Me())&&(i.templateButtonCreateClosure=s.first),Te(s=Me())&&(i.closuresTable=s.first),Te(s=Me())&&(i.templateClosuresTable=s.first)}},decls:41,vars:13,consts:[["buttonCreateClosure",""],["filter",""],["officeNameAutocomplete","matAutocomplete"],["closuresTable",""],["templateButtonCreateClosure",""],["templateFilter",""],["templateClosuresTable",""],[1,"container","m-b-20","layout-row","align-end","gap-20px"],["mat-raised-button","","color","primary",3,"routerLink",4,"mifosxHasPermission"],[1,"container","layout-row"],[1,"flex-fill"],["matInput","",3,"formControl","matAutocomplete"],["autoActiveFirstOption",""],[3,"value"],[1,"container"],[1,"mat-elevation-z8"],["mat-table","","matSort","",3,"dataSource"],["matColumnDef","officeName"],["mat-header-cell","","mat-sort-header","",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","closingDate"],["matColumnDef","comments"],["matColumnDef","createdByUsername"],["mat-header-row","",4,"matHeaderRowDef"],["mat-row","","class","select-row",3,"routerLink",4,"matRowDef","matRowDefColumns"],["showFirstLastButtons","",3,"pageSizeOptions"],["mat-raised-button","","color","primary",3,"routerLink"],["icon","plus",1,"m-r-10"],["mat-header-cell","","mat-sort-header",""],["mat-cell",""],["mat-header-row",""],["mat-row","",1,"select-row",3,"routerLink"],[1,"mw300"],[1,"layout-row","align-end","gap-2px","responsive-column"],["mat-raised-button","","color","warn",3,"click"],["mat-raised-button","","color","primary",3,"click"],["href","https://mifosforge.jira.com/wiki/spaces/docs/pages/67895316/Closing+Entries","target","_blank"]],template:function(n,i){if(n&1&&(l(0,"div",7)(1,"div",null,0),F(3,Cke,4,5,"button",8),r()(),l(4,"div",9,1)(6,"mat-form-field",10)(7,"mat-label"),c(8),p(9,"translate"),r(),b(10,"input",11),r()(),l(11,"mat-autocomplete",12,2),Se(13,vke,2,2,"mat-option",13,Pe),p(15,"async"),r(),l(16,"div",14)(17,"div",15,3)(19,"table",16),X(20,17),F(21,xke,3,3,"th",18)(22,bke,2,1,"td",19),Z(),X(23,20),F(24,yke,3,3,"th",18)(25,Ske,2,1,"td",19),Z(),X(26,21),F(27,wke,3,3,"th",18)(28,Pke,2,1,"td",19),Z(),X(29,22),F(30,Tke,3,3,"th",18)(31,Mke,2,1,"td",19),Z(),F(32,Dke,1,0,"tr",23)(33,Eke,1,3,"tr",24),r(),b(34,"mat-paginator",25),r()(),F(35,Ike,16,15,"ng-template",null,4,ti)(37,Oke,13,12,"ng-template",null,5,ti)(39,Ake,16,15,"ng-template",null,6,ti)),n&2){let s=xe(12);a(3),g("mifosxHasPermission","CREATE_GLCLOSURE"),a(5),h(m(9,8,"labels.inputs.Office Name")),a(2),g("formControl",i.officeName)("matAutocomplete",s),a(3),we(m(15,10,i.filteredOfficeData)),a(6),g("dataSource",i.dataSource),a(13),g("matHeaderRowDef",i.displayedColumns),a(),g("matRowDefColumns",i.displayedColumns),a(),g("pageSizeOptions",oe(12,hke))}},dependencies:[ue,fe,st,Ue,_n,Ae,Fe,Be,ze,ft,ve,Ke,ke,er,Za,_t,It,xt,vt,bt,ri,Ct,yt,St,Pt,wt,Tt,kt,Xa,he],styles:["table[_ngcontent-%COMP%]{width:100%}table[_ngcontent-%COMP%] .select-row[_ngcontent-%COMP%]:hover{cursor:pointer}"]})}}return e})();var Fke=()=>["../"];function kke(e,o){if(e&1&&(l(0,"mat-option",5),c(1),r()),e&2){let t=o.$implicit;g("value",t.id),a(),v(" ",t.name," ")}}function Bke(e,o){e&1&&(l(0,"mat-error"),c(1),p(2,"translate"),p(3,"translate"),l(4,"strong"),c(5),p(6,"translate"),r()()),e&2&&(a(),le(" ",m(2,3,"labels.inputs.Office")," ",m(3,5,"labels.commons.is")," "),a(4),h(m(6,7,"labels.commons.required")))}function Rke(e,o){e&1&&(l(0,"mat-error"),c(1),p(2,"translate"),p(3,"translate"),l(4,"strong"),c(5),p(6,"translate"),r()()),e&2&&(a(),le(" ",m(2,3,"labels.inputs.Closing Date")," ",m(3,5,"labels.commons.is")," "),a(4),h(m(6,7,"labels.commons.required")))}function Nke(e,o){if(e&1&&(l(0,"button",13),c(1),p(2,"translate"),r()),e&2){let t=w();g("disabled",!t.accountingClosureForm.valid),a(),v(" ",m(2,2,"labels.buttons.Submit")," ")}}var Dv=(()=>{class e{constructor(){this.formBuilder=T(nt),this.accountingService=T(Ui),this.settingsService=T(At),this.dateUtils=T(Zt),this.route=T(Ie),this.router=T(qe),this.minDate=new Date(2e3,0,1),this.maxDate=new Date,this.route.data.subscribe(t=>{this.officeData=t.offices})}ngOnInit(){this.maxDate=this.settingsService.businessDate,this.createAccountingClosureForm()}createAccountingClosureForm(){this.accountingClosureForm=this.formBuilder.group({officeId:["",se.required],closingDate:["",se.required],comments:[""]})}submit(){let t=this.accountingClosureForm.value;t.locale=this.settingsService.language.code,t.dateFormat=this.settingsService.dateFormat,t.closingDate&&(t.closingDate=this.dateUtils.formatDate(t.closingDate,this.settingsService.dateFormat)),this.accountingService.createAccountingClosure(t).subscribe(n=>{this.router.navigate(["../view",n.resourceId],{relativeTo:this.route})})}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275cmp=me({type:e,selectors:[["mifosx-create-closure"]],decls:32,vars:22,consts:[["closingDatePicker",""],[1,"container"],[3,"ngSubmit","formGroup"],[1,"layout-column"],["required","","formControlName","officeId"],[3,"value"],[3,"click"],["matInput","","required","","formControlName","closingDate",3,"min","max","matDatepicker"],["matSuffix","",3,"for"],["matInput","","formControlName","comments","cdkTextareaAutosize","","cdkAutosizeMinRows","2"],[1,"layout-row","align-center","gap-5px","responsive-column"],["type","button","mat-raised-button","",3,"routerLink"],["mat-raised-button","","color","primary",3,"disabled",4,"mifosxHasPermission"],["mat-raised-button","","color","primary",3,"disabled"]],template:function(n,i){if(n&1){let s=Y();l(0,"div",1)(1,"mat-card")(2,"form",2),R("ngSubmit",function(){return V(s),q(i.submit())}),l(3,"mat-card-content")(4,"div",3)(5,"mat-form-field")(6,"mat-label"),c(7),p(8,"translate"),r(),l(9,"mat-select",4),Se(10,kke,2,2,"mat-option",5,Pe),r(),E(12,Bke,7,9,"mat-error"),r(),l(13,"mat-form-field",6),R("click",function(){V(s);let u=xe(20);return q(u.open())}),l(14,"mat-label"),c(15),p(16,"translate"),r(),b(17,"input",7)(18,"mat-datepicker-toggle",8)(19,"mat-datepicker",null,0),E(21,Rke,7,9,"mat-error"),r(),l(22,"mat-form-field")(23,"mat-label"),c(24),p(25,"translate"),r(),b(26,"textarea",9),r()()(),l(27,"mat-card-actions",10)(28,"button",11),c(29),p(30,"translate"),r(),F(31,Nke,3,4,"button",12),r()()()()}if(n&2){let s=xe(20);a(2),g("formGroup",i.accountingClosureForm),a(5),h(m(8,13,"labels.inputs.Office")),a(3),we(i.officeData),a(2),I(i.accountingClosureForm.controls.officeId.hasError("required")?12:-1),a(3),h(m(16,15,"labels.inputs.Closing Date")),a(2),g("min",i.minDate)("max",i.maxDate)("matDatepicker",s),a(),g("for",s),a(3),I(i.accountingClosureForm.controls.closingDate.hasError("required")?21:-1),a(3),h(m(25,17,"labels.inputs.Comments")),a(4),g("routerLink",oe(21,Fke)),a(),v(" ",m(30,19,"labels.buttons.Cancel")," "),a(2),g("mifosxHasPermission","CREATE_GLCLOSURE")}},dependencies:[ue,fe,tt,st,Ue,Xe,dt,Ze,et,Ae,$e,Je,Et,Fe,Be,ut,ai,ze,gt,ft,mi,di,pi,ve,Ke,Ln,he],styles:[".container[_ngcontent-%COMP%]{max-width:37rem}"]})}}return e})();var Lke=()=>["edit"];function Vke(e,o){if(e&1){let t=Y();l(0,"button",5),R("click",function(){V(t);let i=w();return q(i.deleteAccountingClosure())}),b(1,"fa-icon",6),c(2),p(3,"translate"),r()}e&2&&(a(2),v(" ",m(3,1,"labels.buttons.Delete")," "))}function qke(e,o){if(e&1&&(l(0,"div",4)(1,"mat-card")(2,"mat-card-content")(3,"div",7)(4,"div",8),c(5),p(6,"translate"),r(),l(7,"div",9),c(8),r(),l(9,"div",8),c(10),p(11,"translate"),r(),l(12,"div",9),c(13),r(),l(14,"div",8),c(15),p(16,"translate"),r(),l(17,"div",9),c(18),r(),l(19,"div",8),c(20),p(21,"translate"),r(),l(22,"div",9),c(23),r(),l(24,"div",8),c(25),p(26,"translate"),r(),l(27,"div",9),c(28),r(),l(29,"div",8),c(30),p(31,"translate"),r(),l(32,"div",9),c(33),r(),l(34,"div",8),c(35),p(36,"translate"),r(),l(37,"div",9),c(38),r()()()()()),e&2){let t=w();a(5),v(" ",m(6,14,"labels.inputs.Office")," "),a(3),v(" ",t.glAccountClosure.officeName," "),a(2),v(" ",m(11,16,"labels.inputs.Closure Date")," "),a(3),v(" ",t.glAccountClosure.closingDate," "),a(2),v(" ",m(16,18,"labels.inputs.Closed By")," "),a(3),v(" ",t.glAccountClosure.createdByUsername," "),a(2),v(" ",m(21,20,"labels.inputs.Updated By")," "),a(3),v(" ",t.glAccountClosure.lastUpdatedByUsername," "),a(2),v(" ",m(26,22,"labels.inputs.Updated on")," "),a(3),v(" ",t.glAccountClosure.lastUpdatedDate," "),a(2),v(" ",m(31,24,"labels.inputs.Closure Creation Date")," "),a(3),v(" ",t.glAccountClosure.createdDate," "),a(2),v(" ",m(36,26,"labels.inputs.Comments")," "),a(3),v(" ",t.glAccountClosure.comments," ")}}var Ev=(()=>{class e{constructor(){this.accountingService=T(Ui),this.route=T(Ie),this.router=T(qe),this.dialog=T(Ht),this.route.data.subscribe(t=>{this.glAccountClosure=t.glAccountClosure})}deleteAccountingClosure(){this.dialog.open(vi,{data:{deleteContext:`accounting closure ${this.glAccountClosure.id}`}}).afterClosed().subscribe(n=>{n.delete&&this.accountingService.deleteAccountingClosure(this.glAccountClosure.id).subscribe(()=>{this.router.navigate(["/accounting/closing-entries"])})})}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275cmp=me({type:e,selectors:[["mifosx-view-closure"]],decls:7,vars:7,consts:[[1,"layout-row","align-end","gap-2px","responsive-column","container","m-b-20"],["mat-raised-button","","color","primary",3,"routerLink"],["icon","edit",1,"m-r-10"],["mat-raised-button","","color","warn",3,"click",4,"mifosxHasPermission"],[1,"container"],["mat-raised-button","","color","warn",3,"click"],["icon","trash",1,"m-r-10"],[1,"layout-row-wrap"],[1,"flex-50","header"],[1,"flex-50"]],template:function(n,i){n&1&&(l(0,"div",0)(1,"button",1),b(2,"fa-icon",2),c(3),p(4,"translate"),r(),F(5,Vke,4,3,"button",3),r(),E(6,qke,39,28,"div",4)),n&2&&(a(),g("routerLink",oe(6,Lke)),a(2),v(" ",m(4,4,"labels.buttons.Edit")," "),a(2),g("mifosxHasPermission","DELETE_GLCLOSURE"),a(),I(i.glAccountClosure?6:-1))},dependencies:[ue,fe,Ae,$e,Je,ve,Ke,ke,he],styles:[".container[_ngcontent-%COMP%]{max-width:37rem}.container[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] div[_ngcontent-%COMP%]{margin:1rem 0;word-wrap:break-word}.container[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] div.header[_ngcontent-%COMP%]{font-weight:500}"]})}}return e})();var zke=()=>["../"];function Hke(e,o){if(e&1&&(l(0,"mat-option",5),c(1),r()),e&2){let t=o.$implicit;g("value",t.id),a(),v(" ",t.name," ")}}var Iv=(()=>{class e{constructor(){this.formBuilder=T(nt),this.accountingService=T(Ui),this.route=T(Ie),this.router=T(qe),this.route.data.subscribe(t=>{this.glAccountClosure=t.glAccountClosure})}ngOnInit(){this.createAccountingClosureForm(),this.setAccountingClosure()}createAccountingClosureForm(){this.accountingClosureForm=this.formBuilder.group({officeId:[{value:"",disabled:!0},se.required],closingDate:[{value:"",disabled:!0},se.required],comments:[""]})}setAccountingClosure(){this.officeData=[{id:this.glAccountClosure.officeId,name:this.glAccountClosure.officeName}],this.accountingClosureForm.get("officeId").setValue(this.glAccountClosure.officeId),this.accountingClosureForm.get("closingDate").setValue(new Date(this.glAccountClosure.closingDate)),this.accountingClosureForm.get("comments").setValue(this.glAccountClosure.comments)}submit(){this.accountingService.updateAccountingClosure(this.glAccountClosure.id,{comments:this.accountingClosureForm.value.comments}).subscribe(t=>{this.router.navigate(["../../",t.resourceId],{relativeTo:this.route})})}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275cmp=me({type:e,selectors:[["mifosx-edit-closure"]],decls:32,vars:21,consts:[["closingDatePicker",""],[1,"container"],[3,"ngSubmit","formGroup"],[1,"layout-column"],["required","","formControlName","officeId"],[3,"value"],[3,"click"],["matInput","","required","","formControlName","closingDate",3,"matDatepicker"],["matSuffix","",3,"for"],["matInput","","formControlName","comments","cdkTextareaAutosize","","cdkAutosizeMinRows","2"],[1,"layout-row","align-center","gap-5px","responsive-column"],["type","button","mat-raised-button","",3,"routerLink"],["mat-raised-button","","color","primary",3,"disabled"]],template:function(n,i){if(n&1){let s=Y();l(0,"div",1)(1,"mat-card")(2,"form",2),R("ngSubmit",function(){return V(s),q(i.submit())}),l(3,"mat-card-content")(4,"div",3)(5,"mat-form-field")(6,"mat-label"),c(7),p(8,"translate"),r(),l(9,"mat-select",4),Se(10,Hke,2,2,"mat-option",5,Pe),r()(),l(12,"mat-form-field",6),R("click",function(){V(s);let u=xe(19);return q(u.open())}),l(13,"mat-label"),c(14),p(15,"translate"),r(),b(16,"input",7)(17,"mat-datepicker-toggle",8)(18,"mat-datepicker",null,0),r(),l(20,"mat-form-field")(21,"mat-label"),c(22),p(23,"translate"),r(),b(24,"textarea",9),r()()(),l(25,"mat-card-actions",10)(26,"button",11),c(27),p(28,"translate"),r(),l(29,"button",12),c(30),p(31,"translate"),r()()()()()}if(n&2){let s=xe(19);a(2),g("formGroup",i.accountingClosureForm),a(5),h(m(8,10,"labels.inputs.Office")),a(3),we(i.officeData),a(4),h(m(15,12,"labels.inputs.Closing Date")),a(2),g("matDatepicker",s),a(),g("for",s),a(5),h(m(23,14,"labels.inputs.Comments")),a(4),g("routerLink",oe(20,zke)),a(),v(" ",m(28,16,"labels.buttons.Cancel")," "),a(2),g("disabled",i.accountingClosureForm.pristine),a(),v(" ",m(31,18,"labels.buttons.Submit")," ")}},dependencies:[ue,fe,tt,st,Ue,Xe,dt,Ze,et,Ae,$e,Je,Et,Fe,Be,ai,ze,gt,ft,mi,di,pi,ve,Ln,he],styles:[".container[_ngcontent-%COMP%]{max-width:37rem}"]})}}return e})();var Gke=()=>[10,25,50,100],jke=()=>["create"],$ke=e=>["view",e];function Uke(e,o){e&1&&(l(0,"button",19),b(1,"fa-icon",20),c(2),p(3,"translate"),r()),e&2&&(g("routerLink",oe(4,jke)),a(2),v(" ",m(3,2,"labels.buttons.Add Rule")," "))}function Wke(e,o){e&1&&(l(0,"th",21),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.name")))}function Qke(e,o){if(e&1&&(l(0,"td",22),c(1),r()),e&2){let t=o.$implicit;a(),h(t.name)}}function Yke(e,o){e&1&&(l(0,"th",21),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.Office")))}function Jke(e,o){if(e&1&&(l(0,"td",22),c(1),r()),e&2){let t=o.$implicit;a(),h(t.officeName)}}function Kke(e,o){e&1&&(l(0,"th",21),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.Debit Tags")))}function Xke(e,o){if(e&1&&(l(0,"td",22),c(1),r()),e&2){let t=o.$implicit;a(),h(t.debitTags)}}function Zke(e,o){e&1&&(l(0,"th",21),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.Debit Account")))}function e8e(e,o){if(e&1&&(l(0,"td",22),c(1),r()),e&2){let t=o.$implicit;a(),v(" ",t.debitAccounts?t.debitAccounts[0].name:""," ")}}function t8e(e,o){e&1&&(l(0,"th",21),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.Credit Tags")))}function i8e(e,o){if(e&1&&(l(0,"td",22),c(1),r()),e&2){let t=o.$implicit;a(),h(t.creditTags)}}function n8e(e,o){e&1&&(l(0,"th",21),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.Credit Account")))}function o8e(e,o){if(e&1&&(l(0,"td",22),c(1),r()),e&2){let t=o.$implicit;a(),v(" ",t.creditAccounts?t.creditAccounts[0].name:""," ")}}function a8e(e,o){e&1&&b(0,"tr",23)}function r8e(e,o){if(e&1&&b(0,"tr",24),e&2){let t=o.$implicit;g("routerLink",Nt(1,$ke,t.id))}}var Ov=(()=>{class e{constructor(){this.route=T(Ie),this.displayedColumns=["name","officeName","debitTags","debitAccount","creditTags","creditAccount"],this.route.data.subscribe(t=>{this.accountingRuleData=t.accountingRules})}ngOnInit(){this.setAccountingRules()}setAccountingRules(){this.accountingRuleData.forEach(t=>{t.debitTags=t.debitTags?t.debitTags.map(n=>n.tag.name).join(", "):"",t.creditTags=t.creditTags?t.creditTags.map(n=>n.tag.name).join(", "):""}),this.dataSource=new Wt(this.accountingRuleData),this.dataSource.paginator=this.paginator,this.dataSource.sortingDataAccessor=(t,n)=>{switch(n){case"debitAccount":return t.debitAccounts[0].name;case"creditAccount":return t.creditAccounts[0].name;default:return t[n]}},this.dataSource.sort=this.sort}applyFilter(t){this.dataSource.filter=t.trim().toLowerCase()}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275cmp=me({type:e,selectors:[["mifosx-accounting-rules"]],viewQuery:function(n,i){if(n&1&&(Ee(kt,7),Ee(It,7)),n&2){let s;Te(s=Me())&&(i.paginator=s.first),Te(s=Me())&&(i.sort=s.first)}},decls:32,vars:9,consts:[[1,"container","m-b-20","layout-row","align-end","gap-20px"],["mat-raised-button","","color","primary",3,"routerLink",4,"mifosxHasPermission"],[1,"container"],[1,"layout-row"],[1,"flex-fill"],["matInput","",3,"keyup"],[1,"mat-elevation-z8"],["mat-table","","matSort","",3,"dataSource"],["matColumnDef","name"],["mat-header-cell","","mat-sort-header","",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","officeName"],["matColumnDef","debitTags"],["matColumnDef","debitAccount"],["matColumnDef","creditTags"],["matColumnDef","creditAccount"],["mat-header-row","",4,"matHeaderRowDef"],["mat-row","","class","select-row",3,"routerLink",4,"matRowDef","matRowDefColumns"],["showFirstLastButtons","",3,"pageSizeOptions"],["mat-raised-button","","color","primary",3,"routerLink"],["icon","plus",1,"m-r-10"],["mat-header-cell","","mat-sort-header",""],["mat-cell",""],["mat-header-row",""],["mat-row","",1,"select-row",3,"routerLink"]],template:function(n,i){n&1&&(l(0,"div",0),F(1,Uke,4,5,"button",1),r(),l(2,"div",2)(3,"div",3)(4,"mat-form-field",4)(5,"mat-label"),c(6),p(7,"translate"),r(),l(8,"input",5),R("keyup",function(d){return i.applyFilter(d.target.value)}),r()()(),l(9,"div",6)(10,"table",7),X(11,8),F(12,Wke,3,3,"th",9)(13,Qke,2,1,"td",10),Z(),X(14,11),F(15,Yke,3,3,"th",9)(16,Jke,2,1,"td",10),Z(),X(17,12),F(18,Kke,3,3,"th",9)(19,Xke,2,1,"td",10),Z(),X(20,13),F(21,Zke,3,3,"th",9)(22,e8e,2,1,"td",10),Z(),X(23,14),F(24,t8e,3,3,"th",9)(25,i8e,2,1,"td",10),Z(),X(26,15),F(27,n8e,3,3,"th",9)(28,o8e,2,1,"td",10),Z(),F(29,a8e,1,0,"tr",16)(30,r8e,1,3,"tr",17),r(),b(31,"mat-paginator",18),r()()),n&2&&(a(),g("mifosxHasPermission","CREATE_ACCOUNTINGRULE"),a(5),h(m(7,6,"labels.inputs.Filter")),a(4),g("dataSource",i.dataSource),a(19),g("matHeaderRowDef",i.displayedColumns),a(),g("matRowDefColumns",i.displayedColumns),a(),g("pageSizeOptions",oe(8,Gke)))},dependencies:[ue,fe,Ae,Fe,Be,ze,ve,Ke,ke,_t,It,xt,vt,bt,ri,Ct,yt,St,Pt,wt,Tt,kt,he],styles:["table[_ngcontent-%COMP%]{width:100%}table[_ngcontent-%COMP%] .select-row[_ngcontent-%COMP%]:hover{cursor:pointer}"]})}}return e})();var Av=e=>{let o=e.controls.accountToDebit.value,t=e.controls.debitTags.value,n=e.controls.accountToCredit.value,i=e.controls.creditTags.value;return(o||t)&&(n||i)?null:{error:!0}};var l8e=()=>["../../"];function s8e(e,o){e&1&&(l(0,"mat-error"),c(1),p(2,"translate"),p(3,"translate"),l(4,"strong"),c(5),p(6,"translate"),r()()),e&2&&(a(),le(" ",m(2,3,"labels.inputs.Accounting Rule Name")," ",m(3,5,"labels.commons.is")," "),a(4),h(m(6,7,"labels.commons.required")))}function c8e(e,o){if(e&1&&(l(0,"mat-option",6),c(1),r()),e&2){let t=o.$implicit;g("value",t.id),a(),v(" ",t.name," ")}}function p8e(e,o){e&1&&(l(0,"mat-error"),c(1),p(2,"translate"),p(3,"translate"),l(4,"strong"),c(5),p(6,"translate"),r()()),e&2&&(a(),le(" ",m(2,3,"labels.inputs.Office")," ",m(3,5,"labels.commons.is")," "),a(4),h(m(6,7,"labels.commons.required")))}function m8e(e,o){if(e&1&&(l(0,"mat-option",6),c(1),r()),e&2){let t=o.$implicit;g("value",t.id),a(),v(" ",t.name," ")}}function d8e(e,o){if(e&1&&(l(0,"mat-form-field",3)(1,"mat-label"),c(2),p(3,"translate"),r(),l(4,"mat-select",19),Se(5,m8e,2,2,"mat-option",6,Pe),r()()),e&2){let t=w();a(2),h(m(3,1,"labels.inputs.Account to Debit")),a(3),we(t.glAccountData)}}function u8e(e,o){if(e&1&&(l(0,"mat-option",6),c(1),r()),e&2){let t=o.$implicit;g("value",t.id),a(),v(" ",t.name," ")}}function f8e(e,o){if(e&1&&(l(0,"div",12)(1,"mat-form-field",8)(2,"mat-label"),c(3),p(4,"translate"),r(),l(5,"mat-select",20),Se(6,u8e,2,2,"mat-option",6,Pe),r()(),l(8,"div",21)(9,"mat-checkbox",22),c(10),p(11,"translate"),r()()()),e&2){let t=w();a(3),h(m(4,2,"labels.inputs.Debit Tags")),a(3),we(t.debitTagData),a(4),v(" ",m(11,4,"labels.inputs.Multiple Debit Entries Allowed")," ")}}function h8e(e,o){if(e&1&&(l(0,"mat-option",6),c(1),r()),e&2){let t=o.$implicit;g("value",t.id),a(),v(" ",t.name," ")}}function g8e(e,o){if(e&1&&(l(0,"mat-form-field",3)(1,"mat-label"),c(2),p(3,"translate"),r(),l(4,"mat-select",23),Se(5,h8e,2,2,"mat-option",6,Pe),r()()),e&2){let t=w();a(2),h(m(3,1,"labels.inputs.Account to Credit")),a(3),we(t.glAccountData)}}function _8e(e,o){if(e&1&&(l(0,"mat-option",6),c(1),r()),e&2){let t=o.$implicit;g("value",t.id),a(),v(" ",t.name," ")}}function C8e(e,o){if(e&1&&(l(0,"div",12)(1,"mat-form-field",8)(2,"mat-label"),c(3),p(4,"translate"),r(),l(5,"mat-select",24),Se(6,_8e,2,2,"mat-option",6,Pe),r()(),l(8,"div",21)(9,"mat-checkbox",25),c(10),p(11,"translate"),r()()()),e&2){let t=w();a(3),h(m(4,2,"labels.inputs.Credit Tags")),a(3),we(t.creditTagData),a(4),v(" ",m(11,4,"labels.inputs.Multiple Credit Entries Allowed")," ")}}function v8e(e,o){if(e&1&&(l(0,"button",26),c(1),p(2,"translate"),r()),e&2){let t=w();g("disabled",!t.accountingRuleForm.valid),a(),v(" ",m(2,2,"labels.buttons.Submit")," ")}}var Fv=(()=>{class e{constructor(){this.formBuilder=T(nt),this.accountingService=T(Ui),this.route=T(Ie),this.router=T(qe),this.snackBar=T(x0),this.translateService=T(yi),this.route.data.subscribe(t=>{this.officeData=t.accountingRulesTemplate.allowedOffices,this.glAccountData=t.accountingRulesTemplate.allowedAccounts,this.debitTagData=t.accountingRulesTemplate.allowedDebitTagOptions,this.creditTagData=t.accountingRulesTemplate.allowedCreditTagOptions})}ngOnInit(){this.createAccountingRuleForm(),this.setAccountingRulesForm()}createAccountingRuleForm(){this.accountingRuleForm=this.formBuilder.group({name:["",se.required],officeId:["",se.required],debitRuleType:["fixedAccount"],accountToDebit:[""],debitTags:[""],allowMultipleDebitEntries:[""],creditRuleType:["fixedAccount"],accountToCredit:[""],creditTags:[""],allowMultipleCreditEntries:[""],description:[""]},{validator:Av})}setAccountingRulesForm(){this.accountingRuleForm.get("debitRuleType").valueChanges.subscribe(t=>{t==="fixedAccount"?(this.accountingRuleForm.get("debitTags").reset(),this.accountingRuleForm.get("allowMultipleDebitEntries").reset()):(this.accountingRuleForm.get("accountToDebit").reset(),this.accountingRuleForm.get("allowMultipleDebitEntries").setValue(!1))}),this.accountingRuleForm.get("creditRuleType").valueChanges.subscribe(t=>{t==="fixedAccount"?(this.accountingRuleForm.get("creditTags").reset(),this.accountingRuleForm.get("allowMultipleCreditEntries").reset()):(this.accountingRuleForm.get("accountToCredit").reset(),this.accountingRuleForm.get("allowMultipleCreditEntries").setValue(!1))})}submit(){let t=this.accountingRuleForm.value;t.debitRuleType==="fixedAccount"?(delete t.debitTags,delete t.allowMultipleDebitEntries):delete t.accountToDebit,t.creditRuleType==="fixedAccount"?(delete t.creditTags,delete t.allowMultipleCreditEntries):delete t.accountToCredit,delete t.debitRuleType,delete t.creditRuleType,this.accountingService.createAccountingRule(t).subscribe({next:n=>{this.router.navigate(["../view",n.resourceId],{relativeTo:this.route})},error:n=>{let i=this.translateService.instant("errors.accountingRule.duplicateName");n?.error?.defaultUserMessage?.includes("Duplicate entry")||typeof n?.error?.message=="string"&&n.error.message.includes("Duplicate entry")||typeof n?.error=="string"&&n.error.includes("Duplicate entry")?this.snackBar.open(i,"Close",{duration:7e3,verticalPosition:"top",horizontalPosition:"right",panelClass:"custom-snackbar-top-right"}):this.snackBar.open(n?.error?.defaultUserMessage||n?.error?.message||"An error occurred. Please try again.","Close",{duration:7e3,verticalPosition:"top",horizontalPosition:"right",panelClass:"custom-snackbar-top-right"})}})}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275cmp=me({type:e,selectors:[["mifosx-create-rule"]],decls:55,vars:40,consts:[[1,"container"],[3,"ngSubmit","formGroup"],[1,"layout-row-wrap","gap-2px","responsive-column"],[1,"flex-48"],["matInput","","required","","formControlName","name"],["required","","formControlName","officeId"],[3,"value"],[1,"rule-wrapper","flex-48","layout-row","responsive-column"],[1,"flex-50"],["formControlName","debitRuleType",1,"flex-50","layout-row","gap-5percent","radio-group-spacing"],["value","fixedAccount"],["value","listOfAccounts"],[1,"flex-48","layout-row","gap-2percent","responsive-column"],["formControlName","creditRuleType",1,"flex-50","layout-row","gap-5-percent","radio-group-spacing"],[1,"flex-98"],["matInput","","formControlName","description","cdkTextareaAutosize","","cdkAutosizeMinRows","2"],[1,"layout-row","align-center","gap-5px","responsive-column"],["type","button","mat-raised-button","",3,"routerLink"],["mat-raised-button","","color","primary",3,"disabled",4,"mifosxHasPermission"],["formControlName","accountToDebit"],["formControlName","debitTags","multiple",""],["ngClass.gt-md","entries-wrapper",1,"flex-50"],["labelPosition","before","formControlName","allowMultipleDebitEntries",1,"entries"],["formControlName","accountToCredit"],["formControlName","creditTags","multiple",""],["labelPosition","before","formControlName","allowMultipleCreditEntries",1,"entries"],["mat-raised-button","","color","primary",3,"disabled"]],template:function(n,i){n&1&&(l(0,"div",0)(1,"mat-card")(2,"form",1),R("ngSubmit",function(){return i.submit()}),l(3,"mat-card-content")(4,"div",2)(5,"mat-form-field",3)(6,"mat-label"),c(7),p(8,"translate"),r(),b(9,"input",4),E(10,s8e,7,9,"mat-error"),r(),l(11,"mat-form-field",3)(12,"mat-label"),c(13),p(14,"translate"),r(),l(15,"mat-select",5),Se(16,c8e,2,2,"mat-option",6,Pe),r(),E(18,p8e,7,9,"mat-error"),r(),l(19,"div",7)(20,"mat-label",8),c(21),p(22,"translate"),r(),l(23,"mat-radio-group",9)(24,"mat-radio-button",10),c(25),p(26,"translate"),r(),l(27,"mat-radio-button",11),c(28),p(29,"translate"),r()()(),E(30,d8e,7,3,"mat-form-field",3),E(31,f8e,12,6,"div",12),l(32,"div",7)(33,"mat-label",8),c(34),p(35,"translate"),r(),l(36,"mat-radio-group",13)(37,"mat-radio-button",10),c(38),p(39,"translate"),r(),l(40,"mat-radio-button",11),c(41),p(42,"translate"),r()()(),E(43,g8e,7,3,"mat-form-field",3),E(44,C8e,12,6,"div",12),l(45,"mat-form-field",14)(46,"mat-label"),c(47),p(48,"translate"),r(),b(49,"textarea",15),r()()(),l(50,"mat-card-actions",16)(51,"button",17),c(52),p(53,"translate"),r(),F(54,v8e,3,4,"button",18),r()()()()),n&2&&(a(2),g("formGroup",i.accountingRuleForm),a(5),h(m(8,19,"labels.inputs.Accounting Rule Name")),a(3),I(i.accountingRuleForm.controls.name.hasError("required")?10:-1),a(3),h(m(14,21,"labels.inputs.Office")),a(3),we(i.officeData),a(2),I(i.accountingRuleForm.controls.officeId.hasError("required")?18:-1),a(3),v("",m(22,23,"labels.inputs.Affected GL Entry (Debit) Rule Type")," *"),a(4),h(m(26,25,"labels.inputs.Fixed Account")),a(3),h(m(29,27,"labels.inputs.List of Accounts")),a(2),I(i.accountingRuleForm.controls.debitRuleType.value==="fixedAccount"?30:-1),a(),I(i.accountingRuleForm.controls.debitRuleType.value==="listOfAccounts"?31:-1),a(3),v("",m(35,29,"labels.inputs.Affected GL Entry (Credit) Rule Type")," *"),a(4),h(m(39,31,"labels.inputs.Fixed Account")),a(3),h(m(42,33,"labels.inputs.List of Accounts")),a(2),I(i.accountingRuleForm.controls.creditRuleType.value==="fixedAccount"?43:-1),a(),I(i.accountingRuleForm.controls.creditRuleType.value==="listOfAccounts"?44:-1),a(3),h(m(48,35,"labels.inputs.Description")),a(4),g("routerLink",oe(39,l8e)),a(),v(" ",m(53,37,"labels.buttons.Cancel")," "),a(2),g("mifosxHasPermission","CREATE_ACCOUNTINGRULE"))},dependencies:[ue,fe,tt,st,Ue,Xe,dt,Ze,et,Ae,$e,Je,Et,Fe,Be,ut,ze,gt,ft,ve,fi,Ke,tr,ir,Ln,he],styles:[".rule-wrapper[_ngcontent-%COMP%]{margin:17.5px 0 0}.entries-wrapper[_ngcontent-%COMP%]{position:relative}.entries-wrapper[_ngcontent-%COMP%] .entries[_ngcontent-%COMP%]{padding:0 0 17.5px;position:absolute;bottom:0;right:0}.radio-group-spacing[_ngcontent-%COMP%]{display:flex;gap:2rem;flex-direction:row}@media (width <= 768px){.radio-group-spacing[_ngcontent-%COMP%]{flex-direction:column}}"]})}}return e})();var x8e=()=>["edit"];function b8e(e,o){e&1&&(l(0,"button",8),b(1,"fa-icon",9),c(2),p(3,"translate"),r()),e&2&&(g("routerLink",oe(4,x8e)),a(2),v(" ",m(3,2,"labels.buttons.Edit")," "))}function y8e(e,o){if(e&1){let t=Y();l(0,"button",10),R("click",function(){V(t);let i=w();return q(i.deleteAccountingRule())}),b(1,"fa-icon",11),c(2),p(3,"translate"),r()}e&2&&(a(2),v(" ",m(3,1,"labels.buttons.Delete")," "))}function S8e(e,o){if(e&1&&(l(0,"div",5)(1,"div",6),c(2),p(3,"translate"),r(),l(4,"div",7),c(5),r()()),e&2){let t=w();a(2),h(m(3,2,"labels.inputs.Description")),a(3),h(t.accountingRule.description)}}function w8e(e,o){if(e&1&&(l(0,"span"),c(1),r()),e&2){let t=o.$implicit;a(),h(t.tag.name)}}function P8e(e,o){if(e&1&&(l(0,"div",5)(1,"div",6),c(2),p(3,"translate"),r(),l(4,"div",7),Se(5,w8e,2,1,"span",null,Pe),r()()),e&2){let t=w();a(2),h(m(3,1,"labels.inputs.Debit Tags")),a(3),we(t.accountingRule.debitTags)}}function T8e(e,o){if(e&1&&(l(0,"span"),c(1),r()),e&2){let t=o.$implicit;a(),h(t.name+" ("+t.glCode+")")}}function M8e(e,o){if(e&1&&(l(0,"div",5)(1,"div",6),c(2),p(3,"translate"),r(),l(4,"div",7),Se(5,T8e,2,1,"span",null,Pe),r()()),e&2){let t=w();a(2),h(m(3,1,"labels.inputs.Debit Account Name")),a(3),we(t.accountingRule.debitAccounts)}}function D8e(e,o){if(e&1&&(l(0,"span"),c(1),r()),e&2){let t=o.$implicit;a(),h(t.tag.name)}}function E8e(e,o){if(e&1&&(l(0,"div",5)(1,"div",6),c(2),p(3,"translate"),r(),l(4,"div",7),Se(5,D8e,2,1,"span",null,Pe),r()()),e&2){let t=w();a(2),h(m(3,1,"labels.inputs.Credit Tags")),a(3),we(t.accountingRule.creditTags)}}function I8e(e,o){if(e&1&&(l(0,"span"),c(1),r()),e&2){let t=o.$implicit;a(),h(t.name+" ("+t.glCode+")")}}function O8e(e,o){if(e&1&&(l(0,"div",5)(1,"div",6),c(2),p(3,"translate"),r(),l(4,"div",7),Se(5,I8e,2,1,"span",null,Pe),r()()),e&2){let t=w();a(2),h(m(3,1,"labels.inputs.Credit Account Name")),a(3),we(t.accountingRule.creditAccounts)}}var kv=(()=>{class e{constructor(){this.accountingService=T(Ui),this.route=T(Ie),this.router=T(qe),this.dialog=T(Ht),this.route.data.subscribe(t=>{this.accountingRule=t.accountingRule})}deleteAccountingRule(){this.dialog.open(vi,{data:{deleteContext:`accounting rule ${this.accountingRule.id}`}}).afterClosed().subscribe(n=>{n.delete&&this.accountingService.deleteAccountingRule(this.accountingRule.id).subscribe(()=>{this.router.navigate(["/accounting/accounting-rules"])})})}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275cmp=me({type:e,selectors:[["mifosx-view-rule"]],decls:31,vars:19,consts:[[1,"container"],[1,"layout-row","align-end","gap-2px","responsive-column","m-b-20"],["mat-raised-button","","color","primary",3,"routerLink",4,"mifosxHasPermission"],["mat-raised-button","","color","warn",3,"click",4,"mifosxHasPermission"],[1,"content-rows"],[1,"content-row"],[1,"label"],[1,"value"],["mat-raised-button","","color","primary",3,"routerLink"],["icon","edit",1,"m-r-10"],["mat-raised-button","","color","warn",3,"click"],["icon","trash",1,"m-r-10"]],template:function(n,i){n&1&&(l(0,"div",0)(1,"div",1),F(2,b8e,4,5,"button",2)(3,y8e,4,3,"button",3),r(),l(4,"mat-card")(5,"mat-card-content",4)(6,"div",5)(7,"div",6),c(8),p(9,"translate"),r(),l(10,"div",7),c(11),r()(),E(12,S8e,6,4,"div",5),l(13,"div",5)(14,"div",6),c(15),p(16,"translate"),r(),l(17,"div",7),c(18),r()(),l(19,"div",5)(20,"div",6),c(21),p(22,"translate"),r(),l(23,"div",7),c(24),r()()()(),l(25,"mat-card")(26,"mat-card-content",4),E(27,P8e,7,3,"div",5),E(28,M8e,7,3,"div",5),E(29,E8e,7,3,"div",5),E(30,O8e,7,3,"div",5),r()()()),n&2&&(a(2),g("mifosxHasPermission","UPDATE_ACCOUNTINGRULE"),a(),g("mifosxHasPermission","DELETE_ACCOUNTINGRULE"),a(5),h(m(9,13,"labels.inputs.Office")),a(3),h(i.accountingRule.officeName),a(),I(i.accountingRule.description?12:-1),a(3),h(m(16,15,"labels.inputs.Multiple Debit Entries Allowed")),a(3),h(i.accountingRule.allowMultipleDebitEntries),a(3),h(m(22,17,"labels.inputs.Multiple Credit Entries Allowed")),a(3),h(i.accountingRule.allowMultipleCreditEntries),a(3),I(i.accountingRule.debitTags!=null&&i.accountingRule.debitTags.length?27:-1),a(),I(i.accountingRule.debitAccounts!=null&&i.accountingRule.debitAccounts.length?28:-1),a(),I(i.accountingRule.creditTags!=null&&i.accountingRule.creditTags.length?29:-1),a(),I(i.accountingRule.creditAccounts!=null&&i.accountingRule.creditAccounts.length?30:-1))},dependencies:[ue,fe,Ae,$e,Je,ve,Ke,ke,he],styles:[".container[_ngcontent-%COMP%]{max-width:37rem;margin:0 auto;padding:1rem}.container[_ngcontent-%COMP%] mat-card[_ngcontent-%COMP%]{margin-bottom:1rem;padding:1.5rem;box-shadow:0 2px 4px #0000001a;border:1px solid var(--border-color, #ddd);border-radius:8px;background-color:var(--card-background, #fff);transition:background-color .3s ease,border-color .3s ease}.container[_ngcontent-%COMP%] .layout-row-wrap[_ngcontent-%COMP%]{display:grid;grid-template-columns:50% 50%;gap:1rem}.container[_ngcontent-%COMP%] .layout-row-wrap[_ngcontent-%COMP%] .flex-50[_ngcontent-%COMP%]{padding:.5rem}.container[_ngcontent-%COMP%] .layout-row-wrap[_ngcontent-%COMP%] .flex-50.mat-body-strong[_ngcontent-%COMP%]{color:var(--label-color, #555);font-weight:600}.container[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] div[_ngcontent-%COMP%]{margin:1rem 0;word-wrap:break-word}.container[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] div[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{display:block;padding:.25rem 0;color:var(--text-color, inherit)}.container[_ngcontent-%COMP%] .content-rows[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1rem}.container[_ngcontent-%COMP%] .content-rows[_ngcontent-%COMP%] .content-row[_ngcontent-%COMP%]{display:flex;flex-direction:row;border-bottom:1px solid var(--border-color-light, #eee);padding-bottom:.5rem}.container[_ngcontent-%COMP%] .content-rows[_ngcontent-%COMP%] .content-row[_ngcontent-%COMP%] .label[_ngcontent-%COMP%]{flex:0 0 40%;font-weight:600;color:var(--label-color, #555);padding:.5rem 1rem .5rem 0}.container[_ngcontent-%COMP%] .content-rows[_ngcontent-%COMP%] .content-row[_ngcontent-%COMP%] .value[_ngcontent-%COMP%]{flex:0 0 60%;padding:.5rem 0;color:var(--text-color, inherit)}.container[_ngcontent-%COMP%] .content-rows[_ngcontent-%COMP%] .content-row[_ngcontent-%COMP%] .value[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{display:block;padding:.25rem 0}.container[_ngcontent-%COMP%] .back-button-container[_ngcontent-%COMP%]{margin-top:2rem}.container[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{transition:all .2s ease}.container[_ngcontent-%COMP%] button[_ngcontent-%COMP%]:hover{transform:translateY(-2px)}.dark-theme[_nghost-%COMP%], .dark-theme [_nghost-%COMP%]{--border-color: #444;--border-color-light: #3a3a3a;--card-background: #2d2d2d;--label-color: #b8b8b8;--text-color: #e0e0e0}.dark-theme[_nghost-%COMP%] .container[_ngcontent-%COMP%] mat-card[_ngcontent-%COMP%], .dark-theme [_nghost-%COMP%] .container[_ngcontent-%COMP%] mat-card[_ngcontent-%COMP%]{box-shadow:0 2px 4px #0000004d}"]})}}return e})();var A8e=()=>["../"];function F8e(e,o){e&1&&(l(0,"mat-error"),c(1),p(2,"translate"),p(3,"translate"),l(4,"strong"),c(5),p(6,"translate"),r()()),e&2&&(a(),le(" ",m(2,3,"labels.inputs.Accounting Rule Name")," ",m(3,5,"labels.commons.is")," "),a(4),h(m(6,7,"labels.commons.required")))}function k8e(e,o){if(e&1&&(l(0,"mat-option",6),c(1),r()),e&2){let t=o.$implicit;g("value",t.id),a(),v(" ",t.name," ")}}function B8e(e,o){e&1&&(l(0,"mat-error"),c(1),p(2,"translate"),p(3,"translate"),l(4,"strong"),c(5),p(6,"translate"),r()()),e&2&&(a(),le(" ",m(2,3,"labels.inputs.Office")," ",m(3,5,"labels.commons.is")," "),a(4),h(m(6,7,"labels.commons.required")))}function R8e(e,o){if(e&1&&(l(0,"mat-option",6),c(1),r()),e&2){let t=o.$implicit;g("value",t.id),a(),v(" ",t.name," ")}}function N8e(e,o){if(e&1&&(l(0,"mat-form-field",3)(1,"mat-label"),c(2),p(3,"translate"),r(),l(4,"mat-select",19),Se(5,R8e,2,2,"mat-option",6,Pe),r()()),e&2){let t=w();a(2),h(m(3,1,"labels.inputs.Account to Debit")),a(3),we(t.glAccountData)}}function L8e(e,o){if(e&1&&(l(0,"mat-option",6),c(1),r()),e&2){let t=o.$implicit;g("value",t.id),a(),v(" ",t.name," ")}}function V8e(e,o){if(e&1&&(l(0,"div",12)(1,"mat-form-field",8)(2,"mat-label"),c(3),p(4,"translate"),r(),l(5,"mat-select",20),Se(6,L8e,2,2,"mat-option",6,Pe),r()(),l(8,"div",21)(9,"mat-checkbox",22),c(10),p(11,"translate"),r()()()),e&2){let t=w();a(3),h(m(4,2,"labels.inputs.Debit Tags")),a(3),we(t.debitTagData),a(4),v(" ",m(11,4,"labels.inputs.Multiple Debit Entries Allowed")," ")}}function q8e(e,o){if(e&1&&(l(0,"mat-option",6),c(1),r()),e&2){let t=o.$implicit;g("value",t.id),a(),v(" ",t.name," ")}}function z8e(e,o){if(e&1&&(l(0,"mat-form-field",3)(1,"mat-label"),c(2),p(3,"translate"),r(),l(4,"mat-select",23),Se(5,q8e,2,2,"mat-option",6,Pe),r()()),e&2){let t=w();a(2),h(m(3,1,"labels.inputs.Account to Credit")),a(3),we(t.glAccountData)}}function H8e(e,o){if(e&1&&(l(0,"mat-option",6),c(1),r()),e&2){let t=o.$implicit;g("value",t.id),a(),v(" ",t.name," ")}}function G8e(e,o){if(e&1&&(l(0,"div",12)(1,"mat-form-field",8)(2,"mat-label"),c(3),p(4,"translate"),r(),l(5,"mat-select",24),Se(6,H8e,2,2,"mat-option",6,Pe),r()(),l(8,"div",21)(9,"mat-checkbox",25),c(10),p(11,"translate"),r()()()),e&2){let t=w();a(3),h(m(4,2,"labels.inputs.Credit Tags")),a(3),we(t.creditTagData),a(4),v(" ",m(11,4,"labels.inputs.Multiple Credit Entries Allowed")," ")}}function j8e(e,o){if(e&1&&(l(0,"button",26),c(1),p(2,"translate"),r()),e&2){let t=w();g("disabled",t.accountingRuleForm.pristine||!t.accountingRuleForm.valid),a(),v(" ",m(2,2,"labels.buttons.Submit")," ")}}var Bv=(()=>{class e{constructor(){this.formBuilder=T(nt),this.accountingService=T(Ui),this.route=T(Ie),this.router=T(qe),this.route.data.subscribe(t=>{this.officeData=t.accountingRulesTemplate.allowedOffices,this.glAccountData=t.accountingRulesTemplate.allowedAccounts,this.debitTagData=t.accountingRulesTemplate.allowedDebitTagOptions,this.creditTagData=t.accountingRulesTemplate.allowedCreditTagOptions,this.accountingRule=t.accountingRule})}ngOnInit(){this.createAccountingRuleForm(),this.setAccountingRulesForm()}createAccountingRuleForm(){this.accountingRuleForm=this.formBuilder.group({name:[this.accountingRule.name,se.required],officeId:[this.accountingRule.officeId,se.required],debitRuleType:[""],accountToDebit:[""],debitTags:[""],allowMultipleDebitEntries:[""],creditRuleType:[""],accountToCredit:[""],creditTags:[""],allowMultipleCreditEntries:[""],description:[this.accountingRule.description]},{validator:Av})}setAccountingRulesForm(){this.accountingRuleForm.get("debitRuleType").valueChanges.subscribe(t=>{t==="fixedAccount"?(this.accountingRuleForm.get("debitTags").reset(),this.accountingRuleForm.get("allowMultipleDebitEntries").reset()):(this.accountingRuleForm.get("accountToDebit").reset(),this.accountingRuleForm.get("allowMultipleDebitEntries").setValue(!1))}),this.accountingRuleForm.get("creditRuleType").valueChanges.subscribe(t=>{t==="fixedAccount"?(this.accountingRuleForm.get("creditTags").reset(),this.accountingRuleForm.get("allowMultipleCreditEntries").reset()):(this.accountingRuleForm.get("accountToCredit").reset(),this.accountingRuleForm.get("allowMultipleCreditEntries").setValue(!1))}),this.accountingRule.debitAccounts?(this.accountingRuleForm.get("debitRuleType").setValue("fixedAccount"),this.accountingRuleForm.get("accountToDebit").setValue(this.accountingRule.debitAccounts[0].id)):(this.accountingRuleForm.get("debitRuleType").setValue("listOfAccounts"),this.accountingRuleForm.get("debitTags").setValue(this.accountingRule.debitTags.map(t=>t.tag.id)),this.accountingRuleForm.get("allowMultipleDebitEntries").setValue(this.accountingRule.allowMultipleDebitEntries)),this.accountingRule.creditAccounts?(this.accountingRuleForm.get("creditRuleType").setValue("fixedAccount"),this.accountingRuleForm.get("accountToCredit").setValue(this.accountingRule.creditAccounts[0].id)):(this.accountingRuleForm.get("creditRuleType").setValue("listOfAccounts"),this.accountingRuleForm.get("creditTags").setValue(this.accountingRule.creditTags.map(t=>t.tag.id)),this.accountingRuleForm.get("allowMultipleCreditEntries").setValue(this.accountingRule.allowMultipleCreditEntries))}submit(){let t=this.accountingRuleForm.value;t.debitRuleType==="fixedAccount"?(delete t.debitTags,delete t.allowMultipleDebitEntries):delete t.accountToDebit,t.creditRuleType==="fixedAccount"?(delete t.creditTags,delete t.allowMultipleCreditEntries):delete t.accountToCredit,delete t.debitRuleType,delete t.creditRuleType,this.accountingService.updateAccountingRule(this.accountingRule.id,t).subscribe(n=>{this.router.navigate(["../../",n.resourceId],{relativeTo:this.route})})}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275cmp=me({type:e,selectors:[["mifosx-edit-rule"]],decls:55,vars:40,consts:[[1,"container"],[3,"ngSubmit","formGroup"],[1,"layout-row-wrap","gap-2px","responsive-column"],[1,"flex-48"],["matInput","","required","","formControlName","name"],["required","","formControlName","officeId"],[3,"value"],[1,"rule-wrapper","flex-48","layout-row","responsive-column"],[1,"flex-50"],["formControlName","debitRuleType",1,"flex-50","layout-row","gap-5percent","radio-group-spacing"],["value","fixedAccount"],["value","listOfAccounts"],[1,"flex-48","layout-row","gap-2percent","responsive-column"],["formControlName","creditRuleType",1,"flex-50","layout-row","gap-5-percent","radio-group-spacing"],[1,"flex-98"],["matInput","","formControlName","description","cdkTextareaAutosize","","cdkAutosizeMinRows","2"],[1,"layout-row","align-center","gap-5px","responsive-column"],["type","button","mat-raised-button","",3,"routerLink"],["mat-raised-button","","color","primary",3,"disabled",4,"mifosxHasPermission"],["formControlName","accountToDebit"],["formControlName","debitTags","multiple",""],[1,"flex-50","entries-wrapper"],["labelPosition","before","formControlName","allowMultipleDebitEntries",1,"entries"],["formControlName","accountToCredit"],["formControlName","creditTags","multiple",""],["labelPosition","before","formControlName","allowMultipleCreditEntries",1,"entries"],["mat-raised-button","","color","primary",3,"disabled"]],template:function(n,i){n&1&&(l(0,"div",0)(1,"mat-card")(2,"form",1),R("ngSubmit",function(){return i.submit()}),l(3,"mat-card-content")(4,"div",2)(5,"mat-form-field",3)(6,"mat-label"),c(7),p(8,"translate"),r(),b(9,"input",4),E(10,F8e,7,9,"mat-error"),r(),l(11,"mat-form-field",3)(12,"mat-label"),c(13),p(14,"translate"),r(),l(15,"mat-select",5),Se(16,k8e,2,2,"mat-option",6,Pe),r(),E(18,B8e,7,9,"mat-error"),r(),l(19,"div",7)(20,"mat-label",8),c(21),p(22,"translate"),r(),l(23,"mat-radio-group",9)(24,"mat-radio-button",10),c(25),p(26,"translate"),r(),l(27,"mat-radio-button",11),c(28),p(29,"translate"),r()()(),E(30,N8e,7,3,"mat-form-field",3),E(31,V8e,12,6,"div",12),l(32,"div",7)(33,"mat-label",8),c(34),p(35,"translate"),r(),l(36,"mat-radio-group",13)(37,"mat-radio-button",10),c(38),p(39,"translate"),r(),l(40,"mat-radio-button",11),c(41),p(42,"translate"),r()()(),E(43,z8e,7,3,"mat-form-field",3),E(44,G8e,12,6,"div",12),l(45,"mat-form-field",14)(46,"mat-label"),c(47),p(48,"translate"),r(),b(49,"textarea",15),r()()(),l(50,"mat-card-actions",16)(51,"button",17),c(52),p(53,"translate"),r(),F(54,j8e,3,4,"button",18),r()()()()),n&2&&(a(2),g("formGroup",i.accountingRuleForm),a(5),h(m(8,19,"labels.inputs.Accounting Rule Name")),a(3),I(i.accountingRuleForm.controls.name.hasError("required")?10:-1),a(3),h(m(14,21,"labels.inputs.Office")),a(3),we(i.officeData),a(2),I(i.accountingRuleForm.controls.officeId.hasError("required")?18:-1),a(3),v("",m(22,23,"labels.inputs.Affected GL Entry (Debit) Rule Type")," *"),a(4),h(m(26,25,"labels.inputs.Fixed Account")),a(3),h(m(29,27,"labels.inputs.List of Accounts")),a(2),I(i.accountingRuleForm.controls.debitRuleType.value==="fixedAccount"?30:-1),a(),I(i.accountingRuleForm.controls.debitRuleType.value==="listOfAccounts"?31:-1),a(3),v("",m(35,29,"labels.inputs.Affected GL Entry (Credit) Rule Type")," *"),a(4),h(m(39,31,"labels.inputs.Fixed Account")),a(3),h(m(42,33,"labels.inputs.List of Accounts")),a(2),I(i.accountingRuleForm.controls.creditRuleType.value==="fixedAccount"?43:-1),a(),I(i.accountingRuleForm.controls.creditRuleType.value==="listOfAccounts"?44:-1),a(3),h(m(48,35,"labels.inputs.Description")),a(4),g("routerLink",oe(39,A8e)),a(),v(" ",m(53,37,"labels.buttons.Cancel")," "),a(2),g("mifosxHasPermission","UPDATE_ACCOUNTINGRULE"))},dependencies:[ue,fe,tt,st,Ue,Xe,dt,Ze,et,Ae,$e,Je,Et,Fe,Be,ut,ze,gt,ft,ve,fi,Ke,tr,ir,Ln,he],styles:[".rule-wrapper[_ngcontent-%COMP%]{margin:17.5px 0 0}.entries-wrapper[_ngcontent-%COMP%]{position:relative}.entries-wrapper[_ngcontent-%COMP%] .entries[_ngcontent-%COMP%]{padding:0 0 17.5px;position:absolute;bottom:0;right:0}.radio-group-spacing[_ngcontent-%COMP%]{display:flex;gap:2rem;flex-direction:row}@media (width <= 768px){.radio-group-spacing[_ngcontent-%COMP%]{flex-direction:column}}"]})}}return e})();var $8e=()=>["../"];function U8e(e,o){e&1&&(l(0,"mat-error"),c(1),p(2,"translate"),p(3,"translate"),l(4,"strong"),c(5),p(6,"translate"),r()()),e&2&&(a(),le(" ",m(2,3,"labels.inputs.Accrue Date")," ",m(3,5,"labels.commons.is")," "),a(4),h(m(6,7,"labels.commons.required")))}function W8e(e,o){if(e&1&&(l(0,"button",10),b(1,"fa-icon",11),c(2),p(3,"translate"),r()),e&2){let t=w();g("disabled",!t.periodicAccrualsForm.valid),a(2),v(" ",m(3,2,"labels.buttons.Run Periodic Accruals")," ")}}var Rv=(()=>{class e{constructor(){this.formBuilder=T(nt),this.accountingService=T(Ui),this.settingsService=T(At),this.dateUtils=T(Zt),this.route=T(Ie),this.router=T(qe),this.minDate=new Date(2e3,0,1),this.maxDate=new Date}ngOnInit(){this.maxDate=this.settingsService.businessDate,this.createPeriodicAccrualsForm()}createPeriodicAccrualsForm(){this.periodicAccrualsForm=this.formBuilder.group({tillDate:["",se.required]})}submit(){let t=this.periodicAccrualsForm.value;t.locale=this.settingsService.language.code,t.dateFormat=this.settingsService.dateFormat,t.tillDate instanceof Date&&(t.tillDate=this.dateUtils.formatDate(t.tillDate,this.settingsService.dateFormat)),this.accountingService.executePeriodicAccruals(t).subscribe(()=>{this.router.navigate(["../"],{relativeTo:this.route})})}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275cmp=me({type:e,selectors:[["mifosx-periodic-accruals"]],decls:19,vars:15,consts:[["tillDatePicker",""],[1,"container"],[3,"ngSubmit","formGroup"],[1,"layout-row"],[1,"flex-fill",3,"click"],["matInput","","required","","formControlName","tillDate",3,"min","max","matDatepicker"],["matSuffix","",3,"for"],[1,"layout-row","align-center","gap-5px","responsive-column"],["type","button","mat-raised-button","",3,"routerLink"],["mat-raised-button","","color","primary",3,"disabled",4,"mifosxHasPermission"],["mat-raised-button","","color","primary",3,"disabled"],["icon","play",1,"m-r-10"]],template:function(n,i){if(n&1){let s=Y();l(0,"div",1)(1,"mat-card")(2,"form",2),R("ngSubmit",function(){return V(s),q(i.submit())}),l(3,"mat-card-content")(4,"div",3)(5,"mat-form-field",4),R("click",function(){V(s);let u=xe(12);return q(u.open())}),l(6,"mat-label"),c(7),p(8,"translate"),r(),b(9,"input",5)(10,"mat-datepicker-toggle",6)(11,"mat-datepicker",null,0),E(13,U8e,7,9,"mat-error"),r()()(),l(14,"mat-card-actions",7)(15,"button",8),c(16),p(17,"translate"),r(),F(18,W8e,4,4,"button",9),r()()()()}if(n&2){let s=xe(12);a(2),g("formGroup",i.periodicAccrualsForm),a(5),h(m(8,10,"labels.inputs.Accrue Till Date")),a(2),g("min",i.minDate)("max",i.maxDate)("matDatepicker",s),a(),g("for",s),a(3),I(i.periodicAccrualsForm.controls.tillDate.hasError("required")?13:-1),a(2),g("routerLink",oe(14,$8e)),a(),v(" ",m(17,12,"labels.buttons.Cancel")," "),a(2),g("mifosxHasPermission","EXECUTE_PERIODICACCRUALACCOUNTING")}},dependencies:[ue,fe,tt,st,Ue,Xe,dt,Ze,et,Ae,$e,Je,Et,Fe,Be,ut,ai,ze,mi,di,pi,ve,Ke,ke,he],styles:[".container[_ngcontent-%COMP%]{max-width:37rem}"]})}}return e})();var Q8e=()=>[10,25,50,100],Y8e=()=>["create"],J8e=e=>["view",e];function K8e(e,o){e&1&&(l(0,"button",20),b(1,"fa-icon",21),c(2),p(3,"translate"),r()),e&2&&(g("routerLink",oe(4,Y8e)),a(2),v(" ",m(3,2,"labels.buttons.Create Provisioning Entry")," "))}function X8e(e,o){e&1&&(l(0,"th",22),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.Created By")))}function Z8e(e,o){if(e&1&&(l(0,"td",23),c(1),r()),e&2){let t=o.$implicit;a(),h(t.createdUser)}}function eBe(e,o){e&1&&(l(0,"th",22),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.Created On")))}function tBe(e,o){if(e&1&&(l(0,"td",23),c(1),r()),e&2){let t=o.$implicit;a(),h(t.createdDate)}}function iBe(e,o){e&1&&(l(0,"th",22),c(1),p(2,"translate"),r()),e&2&&(a(),v(" ",m(2,1,"labels.inputs.Journal Entry Created")," "))}function nBe(e,o){if(e&1&&(l(0,"td",23),b(1,"mat-checkbox",24),r()),e&2){let t=o.$implicit;a(),g("disabled",!0)("checked",t.journalEntry)}}function oBe(e,o){e&1&&(l(0,"th",25),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.View Report")))}function aBe(e,o){if(e&1&&(l(0,"td",23)(1,"button",26),b(2,"fa-icon",27),c(3),p(4,"translate"),r()()),e&2){let t=o.$implicit;a(),g("routerLink",Nt(4,J8e,t.id)),a(2),v("",m(4,2,"labels.buttons.View")," ")}}function rBe(e,o){e&1&&(l(0,"th",25),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.Recreate Provisioning")))}function lBe(e,o){if(e&1){let t=Y();l(0,"td",23)(1,"button",28),R("click",function(i){let s=V(t).$implicit,d=w();return q(d.recreateProvisioning(i,s.id))}),b(2,"fa-icon",29),c(3),p(4,"translate"),r()()}if(e&2){let t=o.$implicit;a(),g("disabled",t.journalEntry),a(2),v("",m(4,2,"labels.buttons.Recreate")," ")}}function sBe(e,o){e&1&&(l(0,"th",25),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.View Journal Entry")))}function cBe(e,o){if(e&1){let t=Y();l(0,"td",23)(1,"button",28),R("click",function(i){let s=V(t).$implicit,d=w();return q(d.viewJournalEntry(i,s.id))}),b(2,"fa-icon",27),c(3),p(4,"translate"),r()()}if(e&2){let t=o.$implicit;a(),g("disabled",!t.journalEntry),a(2),v("",m(4,2,"labels.buttons.View")," ")}}function pBe(e,o){e&1&&b(0,"tr",30)}function mBe(e,o){e&1&&b(0,"tr",31)}var Nv=(()=>{class e{constructor(){this.accountingService=T(Ui),this.route=T(Ie),this.router=T(qe),this.displayedColumns=["createdUser","createdDate","journalEntry","viewReport","recreateProvisioning","viewJournalEntry"],this.route.data.subscribe(t=>{this.provisioningEntryData=t.provisioningEntries.pageItems})}ngOnInit(){this.setProvisioningEntries()}setProvisioningEntries(){this.dataSource=new Wt(this.provisioningEntryData),this.dataSource.paginator=this.paginator,this.dataSource.sort=this.sort}applyFilter(t){this.dataSource.filter=t.trim().toLowerCase()}recreateProvisioning(t,n){this.accountingService.recreateProvisioningEntries(n).subscribe(i=>{this.router.navigate(["view",i.resourceId],{relativeTo:this.route})}),t.stopPropagation()}viewJournalEntry(t,n){this.router.navigate(["journal-entries/view",n],{relativeTo:this.route}),t.stopPropagation()}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275cmp=me({type:e,selectors:[["mifosx-provisioning-entries"]],viewQuery:function(n,i){if(n&1&&(Ee(kt,7),Ee(It,7)),n&2){let s;Te(s=Me())&&(i.paginator=s.first),Te(s=Me())&&(i.sort=s.first)}},decls:32,vars:9,consts:[[1,"container","m-b-20","layout-row","align-end","gap-20px"],["mat-raised-button","","color","primary",3,"routerLink",4,"mifosxHasPermission"],[1,"container"],[1,"layout-row"],[1,"flex-fill"],["matInput","",3,"keyup"],[1,"mat-elevation-z8"],["mat-table","","matSort","",3,"dataSource"],["matColumnDef","createdUser"],["mat-header-cell","","mat-sort-header","",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","createdDate"],["matColumnDef","journalEntry"],["matColumnDef","viewReport"],["mat-header-cell","",4,"matHeaderCellDef"],["matColumnDef","recreateProvisioning"],["matColumnDef","viewJournalEntry"],["mat-header-row","",4,"matHeaderRowDef"],["mat-row","",4,"matRowDef","matRowDefColumns"],["showFirstLastButtons","",3,"pageSizeOptions"],["mat-raised-button","","color","primary",3,"routerLink"],["icon","plus",1,"m-r-10"],["mat-header-cell","","mat-sort-header",""],["mat-cell",""],[3,"disabled","checked"],["mat-header-cell",""],["mat-button","","color","primary",3,"routerLink"],["icon","eye",1,"m-r-10"],["mat-button","","color","primary",3,"click","disabled"],["icon","edit",1,"m-r-10"],["mat-header-row",""],["mat-row",""]],template:function(n,i){n&1&&(l(0,"div",0),F(1,K8e,4,5,"button",1),r(),l(2,"div",2)(3,"div",3)(4,"mat-form-field",4)(5,"mat-label"),c(6),p(7,"translate"),r(),l(8,"input",5),R("keyup",function(d){return i.applyFilter(d.target.value)}),r()()(),l(9,"div",6)(10,"table",7),X(11,8),F(12,X8e,3,3,"th",9)(13,Z8e,2,1,"td",10),Z(),X(14,11),F(15,eBe,3,3,"th",9)(16,tBe,2,1,"td",10),Z(),X(17,12),F(18,iBe,3,3,"th",9)(19,nBe,2,2,"td",10),Z(),X(20,13),F(21,oBe,3,3,"th",14)(22,aBe,5,6,"td",10),Z(),X(23,15),F(24,rBe,3,3,"th",14)(25,lBe,5,4,"td",10),Z(),X(26,16),F(27,sBe,3,3,"th",14)(28,cBe,5,4,"td",10),Z(),F(29,pBe,1,0,"tr",17)(30,mBe,1,0,"tr",18),r(),b(31,"mat-paginator",19),r()()),n&2&&(a(),g("mifosxHasPermission","VIEW_ALL_PROVISIONING_ENTRIES"),a(5),h(m(7,6,"labels.inputs.Filter")),a(4),g("dataSource",i.dataSource),a(19),g("matHeaderRowDef",i.displayedColumns),a(),g("matRowDefColumns",i.displayedColumns),a(),g("pageSizeOptions",oe(8,Q8e)))},dependencies:[ue,fe,Ae,Fe,Be,ze,ve,fi,Ke,ke,_t,It,xt,vt,bt,ri,Ct,yt,St,Pt,wt,Tt,kt,he],styles:["table[_ngcontent-%COMP%]{width:100%}"]})}}return e})();var dBe=()=>["../"];function uBe(e,o){e&1&&(l(0,"mat-error"),c(1),p(2,"translate"),p(3,"translate"),l(4,"strong"),c(5),p(6,"translate"),r()()),e&2&&(a(),le(" ",m(2,3,"labels.inputs.Date")," ",m(3,5,"labels.commons.is")," "),a(4),h(m(6,7,"labels.commons.required")))}function fBe(e,o){if(e&1&&(l(0,"button",12),c(1),p(2,"translate"),r()),e&2){let t=w();g("disabled",!t.provisioningEntryForm.valid),a(),v(" ",m(2,2,"labels.buttons.Submit")," ")}}var Lv=(()=>{class e{constructor(){this.formBuilder=T(nt),this.accountingService=T(Ui),this.settingsService=T(At),this.dateUtils=T(Zt),this.route=T(Ie),this.router=T(qe),this.minDate=new Date(2e3,0,1),this.maxDate=new Date}ngOnInit(){this.maxDate=this.settingsService.businessDate,this.createProvisioningEntryForm()}createProvisioningEntryForm(){this.provisioningEntryForm=this.formBuilder.group({date:["",se.required],createjournalentries:[!1]})}submit(){let t=this.provisioningEntryForm.value;t.locale=this.settingsService.language.code,t.dateFormat=this.settingsService.dateFormat,t.date instanceof Date&&(t.date=this.dateUtils.formatDate(t.date,this.settingsService.dateFormat)),this.accountingService.createProvisioningEntry(t).subscribe(n=>{this.router.navigate(["../view",n.resourceId],{relativeTo:this.route})})}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275cmp=me({type:e,selectors:[["mifosx-create-provisioning-entry"]],decls:23,vars:18,consts:[["datePicker",""],[1,"container"],[3,"ngSubmit","formGroup"],[1,"layout-column"],[1,"flex-fill",3,"click"],["matInput","","required","","formControlName","date",3,"min","max","matDatepicker"],["matSuffix","",3,"for"],[1,"flex-fill"],["labelPosition","before","formControlName","createjournalentries"],[1,"layout-row","align-center","gap-5px","responsive-column"],["type","button","mat-raised-button","",3,"routerLink"],["mat-raised-button","","color","primary",3,"disabled",4,"mifosxHasPermission"],["mat-raised-button","","color","primary",3,"disabled"]],template:function(n,i){if(n&1){let s=Y();l(0,"div",1)(1,"mat-card")(2,"form",2),R("ngSubmit",function(){return V(s),q(i.submit())}),l(3,"mat-card-content")(4,"div",3)(5,"mat-form-field",4),R("click",function(){V(s);let u=xe(12);return q(u.open())}),l(6,"mat-label"),c(7),p(8,"translate"),r(),b(9,"input",5)(10,"mat-datepicker-toggle",6)(11,"mat-datepicker",null,0),E(13,uBe,7,9,"mat-error"),r(),l(14,"div",7)(15,"mat-checkbox",8),c(16),p(17,"translate"),r()()()(),l(18,"mat-card-actions",9)(19,"button",10),c(20),p(21,"translate"),r(),F(22,fBe,3,4,"button",11),r()()()()}if(n&2){let s=xe(12);a(2),g("formGroup",i.provisioningEntryForm),a(5),h(m(8,11,"labels.inputs.Date")),a(2),g("min",i.minDate)("max",i.maxDate)("matDatepicker",s),a(),g("for",s),a(3),I(i.provisioningEntryForm.controls.date.hasError("required")?13:-1),a(3),v(" ",m(17,13,"labels.inputs.Create Journal Entries")," "),a(3),g("routerLink",oe(17,dBe)),a(),v(" ",m(21,15,"labels.buttons.Cancel")," "),a(2),g("mifosxHasPermission","CREATE_PROVISIONING_ENTRIES")}},dependencies:[ue,fe,tt,st,Ue,Xe,dt,Ze,et,Ae,$e,Je,Et,Fe,Be,ut,ai,ze,mi,di,pi,ve,fi,Ke,he],styles:[".container[_ngcontent-%COMP%]{max-width:37rem}"]})}}return e})();var hBe=()=>[10,25,50,100];function gBe(e,o){if(e&1){let t=Y();l(0,"button",30),R("click",function(){V(t);let i=w(2);return q(i.createProvisioningJournalEntries())}),b(1,"fa-icon",31),c(2),p(3,"translate"),r()}if(e&2){let t=w(2);g("disabled",t.provisioningEntry.journalEntry),a(2),v(" ",m(3,2,"labels.buttons.Create Journal Entries")," ")}}function _Be(e,o){if(e&1&&(l(0,"div",3)(1,"div",23),F(2,gBe,4,4,"button",24),r(),l(3,"mat-card")(4,"mat-card-content")(5,"div",25)(6,"div",26),c(7),p(8,"translate"),r(),l(9,"div",27),c(10),r(),l(11,"div",26),c(12),p(13,"translate"),r(),l(14,"div",27),c(15),r(),l(16,"div",28),c(17),p(18,"translate"),r(),l(19,"div",29),c(20),r()()()()()),e&2){let t=w();a(2),g("mifosxHasPermission","CREATE_JOURNAL_ENTRY"),a(5),v(" ",m(8,7,"labels.inputs.Created By")," "),a(3),v(" ",t.provisioningEntry.createdUser," "),a(2),v(" ",m(13,9,"labels.inputs.Created On")," "),a(3),v(" ",t.provisioningEntry.createdDate," "),a(2),v(" ",m(18,11,"labels.inputs.Amount to be Reserved")," "),a(3),v(" ",t.provisioningEntry.reservedAmount," ")}}function CBe(e,o){if(e&1&&(l(0,"mat-option",8),c(1),r()),e&2){let t=o.$implicit;g("value",t.name),a(),v(" ",t.name," ")}}function vBe(e,o){if(e&1&&(l(0,"mat-option",8),c(1),r()),e&2){let t=o.$implicit;g("value",t.name),a(),v(" ",t.name," ")}}function xBe(e,o){if(e&1&&(l(0,"mat-option",8),c(1),r()),e&2){let t=o.$implicit;g("value",t.categoryName),a(),v(" ",t.categoryName," ")}}function bBe(e,o){e&1&&(l(0,"th",32),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.Office Name")))}function yBe(e,o){if(e&1&&(l(0,"td",33),c(1),r()),e&2){let t=o.$implicit;a(),h(t.officeName)}}function SBe(e,o){e&1&&(l(0,"th",32),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.Product Name")))}function wBe(e,o){if(e&1&&(l(0,"td",33),c(1),r()),e&2){let t=o.$implicit;a(),h(t.productName)}}function PBe(e,o){e&1&&(l(0,"th",32),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.Currency Code")))}function TBe(e,o){if(e&1&&(l(0,"td",33),c(1),r()),e&2){let t=o.$implicit;a(),h(t.currencyCode)}}function MBe(e,o){e&1&&(l(0,"th",32),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.Category Name")))}function DBe(e,o){if(e&1&&(l(0,"td",33),c(1),r()),e&2){let t=o.$implicit;a(),h(t.categoryName)}}function EBe(e,o){e&1&&(l(0,"th",32),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.Provisioning Amount")))}function IBe(e,o){if(e&1&&(l(0,"td",33),c(1),r()),e&2){let t=o.$implicit;a(),h(t.amountreserved)}}function OBe(e,o){e&1&&(l(0,"th",32),c(1),p(2,"translate"),r()),e&2&&(a(),v(" ",m(2,1,"labels.inputs.Liability Account (CR)")," "))}function ABe(e,o){if(e&1&&(l(0,"td",33),c(1),r()),e&2){let t=o.$implicit;a(),h(t.liabilityAccountName)}}function FBe(e,o){e&1&&(l(0,"th",32),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.Expense Account (DR)")))}function kBe(e,o){if(e&1&&(l(0,"td",33),c(1),r()),e&2){let t=o.$implicit;a(),h(t.expenseAccountName)}}function BBe(e,o){e&1&&b(0,"tr",34)}function RBe(e,o){e&1&&b(0,"tr",35)}var Vv=(()=>{class e{constructor(){this.accountingService=T(Ui),this.route=T(Ie),this.router=T(qe),this.officeName=new it,this.loanProduct=new it,this.provisioningCategory=new it,this.displayedColumns=["officeName","productName","currencyCode","categoryName","amountreserved","liabilityAccountName","expenseAccountName"],this.filterValue={officeName:"",productName:"",categoryName:""},this.route.data.subscribe(t=>{this.provisioningEntryId=t.provisioningEntry.id,this.provisioningEntry=t.provisioningEntry,this.provisioningEntryEntries=t.provisioningEntryEntries,this.officeData=t.offices,this.loanProductData=t.loanProducts,this.provisioningCategoryData=t.provisiningCategories})}ngOnInit(){this.setProvisioningEntryEntries(),this.setFilteredOffices(),this.setFilteredLoanProducts(),this.setFilteredProvisioningCategories()}ngAfterViewInit(){this.officeName.valueChanges.pipe(Mn(t=>t.toLowerCase()),Oo(500),Ao(),Eo(t=>{this.applyFilter(t,"officeName")})).subscribe(),this.loanProduct.valueChanges.pipe(Mn(t=>t.toLowerCase()),Oo(500),Ao(),Eo(t=>{this.applyFilter(t,"productName")})).subscribe(),this.provisioningCategory.valueChanges.pipe(Mn(t=>t.toLowerCase()),Oo(500),Ao(),Eo(t=>{this.applyFilter(t,"categoryName")})).subscribe()}filterPredicate(t,n){return t.officeName.toLowerCase().indexOf(n.officeName)!==-1&&t.productName.toLowerCase().indexOf(n.productName)!==-1&&t.categoryName.toLowerCase().indexOf(n.categoryName)!==-1}setProvisioningEntryEntries(){this.dataSource=new Wt(this.provisioningEntryEntries.pageItems),this.dataSource.paginator=this.paginator,this.dataSource.sort=this.sort,this.dataSource.filterPredicate=this.filterPredicate}applyFilter(t,n){this.filterValue[n]=t,this.dataSource.filter=this.filterValue}setFilteredOffices(){this.filteredOfficeData=this.officeName.valueChanges.pipe(hl(""),Mn(t=>typeof t=="string"?t:t.name),Mn(t=>t?this.filterOfficeAutocompleteData(t):this.officeData))}setFilteredLoanProducts(){this.filteredLoanProductData=this.loanProduct.valueChanges.pipe(hl(""),Mn(t=>typeof t=="string"?t:t.name),Mn(t=>t?this.filterLoanProductAutocompleteData(t):this.loanProductData))}setFilteredProvisioningCategories(){this.filteredProvisioningCategoryData=this.provisioningCategory.valueChanges.pipe(hl(""),Mn(t=>typeof t=="string"?t:t.categoryName),Mn(t=>t?this.filterProvisioningCategoryAutocompleteData(t):this.provisioningCategoryData))}filterOfficeAutocompleteData(t){return this.officeData.filter(n=>n.name.toLowerCase().includes(t.toLowerCase()))}filterLoanProductAutocompleteData(t){return this.loanProductData.filter(n=>n.name.toLowerCase().includes(t.toLocaleLowerCase()))}filterProvisioningCategoryAutocompleteData(t){return this.provisioningCategoryData.filter(n=>n.categoryName.toLowerCase().includes(t.toLocaleLowerCase()))}createProvisioningJournalEntries(){this.accountingService.createProvisioningJournalEntries(this.provisioningEntryId).subscribe(t=>{this.router.navigate(["../../journal-entries/view",t.resourceId],{relativeTo:this.route})})}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275cmp=me({type:e,selectors:[["mifosx-view-provisioning-entry"]],viewQuery:function(n,i){if(n&1&&(Ee(kt,7),Ee(It,7)),n&2){let s;Te(s=Me())&&(i.paginator=s.first),Te(s=Me())&&(i.sort=s.first)}},decls:58,vars:27,consts:[["officeNameAutocomplete","matAutocomplete"],["loanProductAutocomplete","matAutocomplete"],["provisioningCategoryAutocomplete","matAutocomplete"],[1,"container"],[1,"container","m-t-20","layout-row-wrap","responsive-column","gap-2percent"],[1,"flex-31"],["matInput","",3,"formControl","matAutocomplete"],["autoActiveFirstOption",""],[3,"value"],[1,"mat-elevation-z8","container"],["mat-table","","matSort","",3,"dataSource"],["matColumnDef","officeName"],["mat-header-cell","","mat-sort-header","",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","productName"],["matColumnDef","currencyCode"],["matColumnDef","categoryName"],["matColumnDef","amountreserved"],["matColumnDef","liabilityAccountName"],["matColumnDef","expenseAccountName"],["mat-header-row","",4,"matHeaderRowDef"],["mat-row","",4,"matRowDef","matRowDefColumns"],["showFirstLastButtons","",3,"pageSizeOptions"],[1,"m-b-20","layout-row","align-end","gap-20px"],["mat-raised-button","","color","primary",3,"disabled","click",4,"mifosxHasPermission"],[1,"layout-row-wrap","responsive-column","content"],[1,"flex-16","header"],[1,"flex-16"],[1,"flex-18","header"],[1,"flex-18"],["mat-raised-button","","color","primary",3,"click","disabled"],["icon","plus",1,"m-r-10"],["mat-header-cell","","mat-sort-header",""],["mat-cell",""],["mat-header-row",""],["mat-row",""]],template:function(n,i){if(n&1&&(E(0,_Be,21,13,"div",3),l(1,"div",4)(2,"mat-form-field",5)(3,"mat-label"),c(4),p(5,"translate"),r(),b(6,"input",6),r(),l(7,"mat-form-field",5)(8,"mat-label"),c(9),p(10,"translate"),r(),b(11,"input",6),r(),l(12,"mat-form-field",5)(13,"mat-label"),c(14),p(15,"translate"),r(),b(16,"input",6),r()(),l(17,"mat-autocomplete",7,0),Se(19,CBe,2,2,"mat-option",8,Pe),p(21,"async"),r(),l(22,"mat-autocomplete",7,1),Se(24,vBe,2,2,"mat-option",8,Pe),p(26,"async"),r(),l(27,"mat-autocomplete",7,2),Se(29,xBe,2,2,"mat-option",8,Pe),p(31,"async"),r(),l(32,"div",9)(33,"table",10),X(34,11),F(35,bBe,3,3,"th",12)(36,yBe,2,1,"td",13),Z(),X(37,14),F(38,SBe,3,3,"th",12)(39,wBe,2,1,"td",13),Z(),X(40,15),F(41,PBe,3,3,"th",12)(42,TBe,2,1,"td",13),Z(),X(43,16),F(44,MBe,3,3,"th",12)(45,DBe,2,1,"td",13),Z(),X(46,17),F(47,EBe,3,3,"th",12)(48,IBe,2,1,"td",13),Z(),X(49,18),F(50,OBe,3,3,"th",12)(51,ABe,2,1,"td",13),Z(),X(52,19),F(53,FBe,3,3,"th",12)(54,kBe,2,1,"td",13),Z(),F(55,BBe,1,0,"tr",20)(56,RBe,1,0,"tr",21),r(),b(57,"mat-paginator",22),r()),n&2){let s=xe(18),d=xe(23),u=xe(28);I(i.provisioningEntry?0:-1),a(4),h(m(5,14,"labels.inputs.Office Name")),a(2),g("formControl",i.officeName)("matAutocomplete",s),a(3),h(m(10,16,"labels.inputs.Loan Product")),a(2),g("formControl",i.loanProduct)("matAutocomplete",d),a(3),h(m(15,18,"labels.inputs.Provisioning Category")),a(2),g("formControl",i.provisioningCategory)("matAutocomplete",u),a(3),we(m(21,20,i.filteredOfficeData)),a(5),we(m(26,22,i.filteredLoanProductData)),a(5),we(m(31,24,i.filteredProvisioningCategoryData)),a(4),g("dataSource",i.dataSource),a(22),g("matHeaderRowDef",i.displayedColumns),a(),g("matRowDefColumns",i.displayedColumns),a(),g("pageSizeOptions",oe(26,hBe))}},dependencies:[ue,fe,st,Ue,_n,$e,Je,Fe,Be,ze,ft,ve,Ke,ke,er,Za,_t,It,xt,vt,bt,ri,Ct,yt,St,Pt,wt,Tt,kt,Xa,he],styles:["table[_ngcontent-%COMP%]{width:100%}.content[_ngcontent-%COMP%] div[_ngcontent-%COMP%]{margin:1rem 0;word-wrap:break-word}.content[_ngcontent-%COMP%] div.header[_ngcontent-%COMP%]{font-weight:500}"]})}}return e})();var NBe=()=>[10,25,50,100];function LBe(e,o){e&1&&(l(0,"th",21),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.Entry ID")))}function VBe(e,o){if(e&1&&(l(0,"td",22),c(1),r()),e&2){let t=o.$implicit;a(),h(t.id)}}function qBe(e,o){e&1&&(l(0,"th",21),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.Office")))}function zBe(e,o){if(e&1&&(l(0,"td",22),c(1),r()),e&2){let t=o.$implicit;a(),h(t.officeName)}}function HBe(e,o){e&1&&(l(0,"th",21),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.Transaction Date")))}function GBe(e,o){if(e&1&&(l(0,"td",22),c(1),r()),e&2){let t=o.$implicit;a(),h(t.transactionDate)}}function jBe(e,o){e&1&&(l(0,"th",21),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.Transaction ID")))}function $Be(e,o){if(e&1&&(l(0,"td",22),c(1),r()),e&2){let t=o.$implicit;a(),h(t.transactionId)}}function UBe(e,o){e&1&&(l(0,"th",21),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.Type")))}function WBe(e,o){if(e&1&&(l(0,"td",22),c(1),r()),e&2){let t=o.$implicit;a(),h(t.glAccountType.value)}}function QBe(e,o){e&1&&(l(0,"th",21),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.Type")))}function YBe(e,o){if(e&1&&(l(0,"td",22),c(1),r()),e&2){let t=o.$implicit;a(),h(t.createdByUserName)}}function JBe(e,o){e&1&&(l(0,"th",21),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.Account Code")))}function KBe(e,o){if(e&1&&(l(0,"td",22),c(1),r()),e&2){let t=o.$implicit;a(),h(t.glAccountCode)}}function XBe(e,o){e&1&&(l(0,"th",21),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.Account Name")))}function ZBe(e,o){if(e&1&&(l(0,"td",22),c(1),r()),e&2){let t=o.$implicit;a(),h(t.glAccountName)}}function eRe(e,o){e&1&&(l(0,"th",21),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.Debit")))}function tRe(e,o){if(e&1&&(l(0,"span"),c(1),r()),e&2){let t=w().$implicit;a(),v(" ",(t.currency.displaySymbol||t.currency.code)+" "+t.amount," ")}}function iRe(e,o){if(e&1&&(l(0,"td",22),E(1,tRe,2,1,"span"),r()),e&2){let t=o.$implicit;a(),I(t.entryType.value==="DEBIT"?1:-1)}}function nRe(e,o){e&1&&(l(0,"th",21),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.Credit")))}function oRe(e,o){if(e&1&&(l(0,"span"),c(1),r()),e&2){let t=w().$implicit;a(),v(" ",(t.currency.displaySymbol||t.currency.code)+" "+t.amount," ")}}function aRe(e,o){if(e&1&&(l(0,"td",22),E(1,oRe,2,1,"span"),r()),e&2){let t=o.$implicit;a(),I(t.entryType.value==="CREDIT"?1:-1)}}function rRe(e,o){e&1&&b(0,"tr",23)}function lRe(e,o){e&1&&b(0,"tr",24)}var qv=(()=>{class e{constructor(){this.route=T(Ie),this.displayedColumns=["id","officeName","transactionDate","transactionId","glAccountType","createdByUserName","glAccountCode","glAccountName","debit","credit"],this.route.data.subscribe(t=>{this.provisioningJournalEntryData=t.provisioningJournalEntry.pageItems})}ngOnInit(){this.setProvisioningJournalEntry()}setProvisioningJournalEntry(){this.dataSource=new Wt(this.provisioningJournalEntryData),this.dataSource.paginator=this.paginator,this.dataSource.sortingDataAccessor=(t,n)=>{switch(n){case"glAccountType":return t.glAccountType.value;case"debit":return t.amount;case"credit":return t.amount;default:return t[n]}},this.dataSource.sort=this.sort}applyFilter(t){this.dataSource.filter=t.trim().toLowerCase()}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275cmp=me({type:e,selectors:[["mifosx-view-provisioning-journal-entries"]],viewQuery:function(n,i){if(n&1&&(Ee(kt,7),Ee(It,7)),n&2){let s;Te(s=Me())&&(i.paginator=s.first),Te(s=Me())&&(i.sort=s.first)}},decls:42,vars:8,consts:[[1,"container"],[1,"layout-row","gap-20px"],[1,"flex-fill"],["matInput","",3,"keyup"],[1,"mat-elevation-z8"],["mat-table","","matSort","",3,"dataSource"],["matColumnDef","id"],["mat-header-cell","","mat-sort-header","",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","officeName"],["matColumnDef","transactionDate"],["matColumnDef","transactionId"],["matColumnDef","glAccountType"],["matColumnDef","createdByUserName"],["matColumnDef","glAccountCode"],["matColumnDef","glAccountName"],["matColumnDef","debit"],["matColumnDef","credit"],["mat-header-row","",4,"matHeaderRowDef"],["mat-row","",4,"matRowDef","matRowDefColumns"],["showFirstLastButtons","",3,"pageSizeOptions"],["mat-header-cell","","mat-sort-header",""],["mat-cell",""],["mat-header-row",""],["mat-row",""]],template:function(n,i){n&1&&(l(0,"div",0)(1,"div",1)(2,"mat-form-field",2)(3,"mat-label"),c(4),p(5,"translate"),r(),l(6,"input",3),R("keyup",function(d){return i.applyFilter(d.target.value)}),r()()(),l(7,"div",4)(8,"table",5),X(9,6),F(10,LBe,3,3,"th",7)(11,VBe,2,1,"td",8),Z(),X(12,9),F(13,qBe,3,3,"th",7)(14,zBe,2,1,"td",8),Z(),X(15,10),F(16,HBe,3,3,"th",7)(17,GBe,2,1,"td",8),Z(),X(18,11),F(19,jBe,3,3,"th",7)(20,$Be,2,1,"td",8),Z(),X(21,12),F(22,UBe,3,3,"th",7)(23,WBe,2,1,"td",8),Z(),X(24,13),F(25,QBe,3,3,"th",7)(26,YBe,2,1,"td",8),Z(),X(27,14),F(28,JBe,3,3,"th",7)(29,KBe,2,1,"td",8),Z(),X(30,15),F(31,XBe,3,3,"th",7)(32,ZBe,2,1,"td",8),Z(),X(33,16),F(34,eRe,3,3,"th",7)(35,iRe,2,1,"td",8),Z(),X(36,17),F(37,nRe,3,3,"th",7)(38,aRe,2,1,"td",8),Z(),F(39,rRe,1,0,"tr",18)(40,lRe,1,0,"tr",19),r(),b(41,"mat-paginator",20),r()()),n&2&&(a(4),h(m(5,5,"labels.inputs.Filter")),a(4),g("dataSource",i.dataSource),a(31),g("matHeaderRowDef",i.displayedColumns),a(),g("matRowDefColumns",i.displayedColumns),a(),g("pageSizeOptions",oe(7,NBe)))},dependencies:[ue,fe,Fe,Be,ze,_t,It,xt,vt,bt,ri,Ct,yt,St,Pt,wt,Tt,kt,he],styles:["table[_ngcontent-%COMP%]{width:100%}"]})}}return e})();var g5=(()=>{class e{constructor(){this.accountingService=T(Ui)}resolve(){return this.accountingService.getAccountingRules(!0)}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275prov=Re({token:e,factory:e.\u0275fac})}}return e})();var o1=(()=>{class e{constructor(){this.accountingService=T(Ui)}resolve(){return this.accountingService.getCurrencies()}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275prov=Re({token:e,factory:e.\u0275fac})}}return e})();var zv=(()=>{class e{constructor(){this.accountingService=T(Ui)}resolve(){return this.accountingService.getPaymentTypes()}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275prov=Re({token:e,factory:e.\u0275fac})}}return e})();var tu=(()=>{class e{constructor(){this.accountingService=T(Ui)}resolve(){return this.accountingService.getGlAccounts()}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275prov=Re({token:e,factory:e.\u0275fac})}}return e})();var _5=(()=>{class e{constructor(){this.accountingService=T(Ui)}resolve(){return this.accountingService.getFinancialActivityAccounts()}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275prov=Re({token:e,factory:e.\u0275fac})}}return e})();var C5=(()=>{class e{constructor(){this.accountingService=T(Ui)}resolve(){return this.accountingService.getFinancialActivityAccountsTemplate()}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275prov=Re({token:e,factory:e.\u0275fac})}}return e})();var v5=(()=>{class e{constructor(){this.accountingService=T(Ui)}resolve(t){let n=t.paramMap.get("id");return this.accountingService.getFinancialActivityAccount(n,!1)}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275prov=Re({token:e,factory:e.\u0275fac})}}return e})();var x5=(()=>{class e{constructor(){this.accountingService=T(Ui)}resolve(t){let n=t.paramMap.get("id");return this.accountingService.getFinancialActivityAccount(n,!0)}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275prov=Re({token:e,factory:e.\u0275fac})}}return e})();var b5=(()=>{class e{constructor(){this.accountingService=T(Ui)}resolve(){return this.accountingService.getChartOfAccounts()}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275prov=Re({token:e,factory:e.\u0275fac})}}return e})();var y5=(()=>{class e{constructor(){this.accountingService=T(Ui)}resolve(){return this.accountingService.getChartOfAccountsTemplate()}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275prov=Re({token:e,factory:e.\u0275fac})}}return e})();var S5=(()=>{class e{constructor(){this.accountingService=T(Ui)}resolve(t){let n=t.paramMap.get("id");return this.accountingService.getGlAccount(n,!0).pipe(Mn(i=>{let s=[];switch(i.type.value){case"ASSET":s=i.assetHeaderAccountOptions;break;case"EQUITY":s=i.equityHeaderAccountOptions;break;case"EXPENSE":s=i.expenseHeaderAccountOptions;break;case"INCOME":s=i.incomeHeaderAccountOptions;break;case"LIABILITY":s=i.liabilityHeaderAccountOptions;break}return i.parentId&&(i.parent=s.find(d=>d.id===i.parentId)),i}))}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275prov=Re({token:e,factory:e.\u0275fac})}}return e})();var w5=(()=>{class e{constructor(){this.accountingService=T(Ui)}resolve(){return this.accountingService.getAccountingClosures()}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275prov=Re({token:e,factory:e.\u0275fac})}}return e})();var P5=(()=>{class e{constructor(){this.accountingService=T(Ui)}resolve(t){let n=t.paramMap.get("id");return this.accountingService.getAccountingClosure(n)}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275prov=Re({token:e,factory:e.\u0275fac})}}return e})();var T5=(()=>{class e{constructor(){this.accountingService=T(Ui)}resolve(){return this.accountingService.getAccountingRules()}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275prov=Re({token:e,factory:e.\u0275fac})}}return e})();var Hv=(()=>{class e{constructor(){this.accountingService=T(Ui)}resolve(){return this.accountingService.getAccountingRulesTemplate()}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275prov=Re({token:e,factory:e.\u0275fac})}}return e})();var M5=(()=>{class e{constructor(){this.accountingService=T(Ui)}resolve(t){let n=t.paramMap.get("id");return this.accountingService.getAccountingRule(n)}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275prov=Re({token:e,factory:e.\u0275fac})}}return e})();var D5=(()=>{class e{constructor(){this.accountingService=T(Ui)}resolve(){return this.accountingService.getProvisioningEntries()}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275prov=Re({token:e,factory:e.\u0275fac})}}return e})();var E5=(()=>{class e{constructor(){this.accountingService=T(Ui)}resolve(t){let n=t.paramMap.get("id");return this.accountingService.getProvisioningEntry(n)}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275prov=Re({token:e,factory:e.\u0275fac})}}return e})();var I5=(()=>{class e{constructor(){this.accountingService=T(Ui)}resolve(t){let n=t.paramMap.get("id");return this.accountingService.getProvisioningEntryEntries(n)}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275prov=Re({token:e,factory:e.\u0275fac})}}return e})();var O5=(()=>{class e{constructor(){this.accountingService=T(Ui)}resolve(){return this.accountingService.getLoanProducts()}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275prov=Re({token:e,factory:e.\u0275fac})}}return e})();var A5=(()=>{class e{constructor(){this.accountingService=T(Ui)}resolve(){return this.accountingService.getProvisioningCategories()}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275prov=Re({token:e,factory:e.\u0275fac})}}return e})();var F5=(()=>{class e{constructor(){this.accountingService=T(Ui)}resolve(t){let n=t.paramMap.get("id");return this.accountingService.getProvisioningJournalEntries(n)}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275prov=Re({token:e,factory:e.\u0275fac})}}return e})();var Gv=(()=>{class e{constructor(){this.accountingService=T(Ui)}resolve(t){let n=t.paramMap.get("id");return this.accountingService.getJournalEntry(n)}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275prov=Re({token:e,factory:e.\u0275fac})}}return e})();var xN=(()=>{class e{constructor(){this.externalAssetOwnerService=T(Xg)}resolve(t){let n=t.paramMap.get("transferId")||t.parent.paramMap.get("transferId");return this.externalAssetOwnerService.retrieveExternalAssetOwnerTransferJournalEntries(n)}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275prov=Re({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();var k5=(()=>{class e{constructor(){this.systemService=T(ii)}resolve(){return this.systemService.getConfigurationByName(ii.CONFIG_ASSET_EXTERNALIZATION)}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275prov=Re({token:e,factory:e.\u0275fac})}}return e})();var sRe=[_o.withShell([{path:"accounting",data:{title:"Accounting",breadcrumb:"Accounting"},children:[{path:"",component:dv},{path:"journal-entries",data:{title:"Search Journal Entry",breadcrumb:"Journal Entries"},children:[{path:"",component:gv,resolve:{offices:Hr,glAccounts:tu}},{path:"frequent-postings",component:uv,data:{title:"Frequent Postings",breadcrumb:"Frequent Postings"},resolve:{offices:Hr,accountingRules:g5,currencies:o1,paymentTypes:zv}},{path:"create",component:fv,data:{title:"Create Journal Entry",breadcrumb:"Create"},resolve:{offices:Hr,currencies:o1,paymentTypes:zv,glAccounts:tu,globalConfig:k5}},{path:"transactions",data:{title:"Transactions",breadcrumb:"Transactions",addBreadcrumbLink:!1},children:[{path:"view/:id",component:Yg,data:{title:"View Transaction",routeParamBreadcrumb:"id"},resolve:{transaction:Gv}}]}]},{path:"financial-activity-mappings",data:{title:"Financial Activity Mappings",breadcrumb:"Financial Activity Mappings"},children:[{path:"",component:_v,resolve:{financialActivityAccounts:_5}},{path:"create",component:Cv,data:{title:"Create Financial Activity Mapping",breadcrumb:"Create"},resolve:{financialActivityAccountsTemplate:C5}},{path:"view/:id",data:{title:"View Financial Activity Mapping",routeParamBreadcrumb:"id"},children:[{path:"",component:vv,resolve:{financialActivityAccount:v5}},{path:"edit",component:xv,data:{title:"Edit Financial Activity Mapping",breadcrumb:"Edit",routeParamBreadcrumb:!1},resolve:{financialActivityAccountAndTemplate:x5}}]}]},{path:"migrate-opening-balances",component:bv,data:{title:"Migrate Opening Balances",breadcrumb:"Migrate Opening Balances"},resolve:{offices:Hr,currencies:o1}},{path:"chart-of-accounts",data:{title:"Chart of Accounts",breadcrumb:"Chart of Accounts"},children:[{path:"",component:Sv,resolve:{chartOfAccounts:b5}},{path:"gl-accounts",children:[{path:"create",component:wv,data:{title:"Create GL Account",breadcrumb:"Create GL Account"},resolve:{chartOfAccountsTemplate:y5}},{path:"view/:id",data:{title:"View GL Account",routeResolveBreadcrumb:["glAccountAndChartOfAccountsTemplate","name"]},resolve:{glAccountAndChartOfAccountsTemplate:S5},runGuardsAndResolvers:"always",children:[{path:"",component:Pv},{path:"edit",component:Tv,data:{title:"Edit GL Account",breadcrumb:"Edit",routeResolveBreadcrumb:!1}}]}]}]},{path:"closing-entries",data:{title:"Accounting Closures",breadcrumb:"Closing Entries"},children:[{path:"",component:Mv,resolve:{offices:Hr,glAccountClosures:w5}},{path:"create",component:Dv,data:{title:"Create Accounting Closure",breadcrumb:"Create"},resolve:{offices:Hr}},{path:"view/:id",data:{title:"View Accounting Closure",routeParamBreadcrumb:"id"},resolve:{glAccountClosure:P5},runGuardsAndResolvers:"always",children:[{path:"",component:Ev},{path:"edit",component:Iv,data:{title:"Edit Accounting Closure",breadcrumb:"Edit",routeParamBreadcrumb:!1}}]}]},{path:"accounting-rules",data:{title:"Accounting Rules",breadcrumb:"Accounting Rules"},children:[{path:"",component:Ov,resolve:{accountingRules:T5}},{path:"create",component:Fv,data:{title:"Create Accounting Rule",breadcrumb:"Create"},resolve:{accountingRulesTemplate:Hv}},{path:"view/:id",data:{title:"View Accounting Rule",routeResolveBreadcrumb:["accountingRule","name"]},resolve:{accountingRule:M5},runGuardsAndResolvers:"always",children:[{path:"",component:kv},{path:"edit",component:Bv,data:{title:"Edit Accounting Rules",breadcrumb:"Edit",routeResolveBreadcrumb:!1},resolve:{accountingRulesTemplate:Hv}}]}]},{path:"periodic-accruals",component:Rv,data:{title:"Periodic Accrual Accounting",breadcrumb:"Execute Periodic Accrual Accounting"}},{path:"provisioning-entries",data:{title:"Provisioning Entries",breadcrumb:"Provisioning Entries"},children:[{path:"",component:Nv,resolve:{provisioningEntries:D5}},{path:"create",component:Lv,data:{title:"Create Provisioning Entry",breadcrumb:"Create"}},{path:"view/:id",component:Vv,data:{title:"View Provisioning Entry",routeParamBreadcrumb:"id"},resolve:{provisioningEntry:E5,provisioningEntryEntries:I5,office:Hr,loanProducts:O5,provisioningCategories:A5}},{path:"journal-entries",data:{breadcrumb:"Journal Entries",addBreadcrumbLink:!1},children:[{path:"view/:id",component:qv,data:{title:"View Provisioning Journal Entry",routeParamBreadcrumb:"id"},resolve:{provisioningJournalEntries:F5}}]}]}]},{path:"journal-entry",data:{title:"Journal Entries",breadcrumb:"Journal Entries"},children:[{path:"view/:id",component:Yg,data:{title:"View Transaction",routeParamBreadcrumb:"id"},resolve:{transaction:Gv}},{path:"view-transfer/:transferId",component:Yg,data:{title:"View Transfer",routeParamBreadcrumb:"transferId"},resolve:{transferJournalEntryData:xN}}]}])],bN=(()=>{class e{static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275mod=Gi({type:e})}static{this.\u0275inj=Hi({providers:[Hr,g5,o1,zv,tu,Gv,_5,C5,v5,x5,b5,y5,S5,w5,P5,T5,Hv,M5,D5,E5,I5,O5,A5,F5,k5],imports:[gn.forChild(sRe),gn]})}}return e})();var yN=(()=>{class e{static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275mod=Gi({type:e})}static{this.\u0275inj=Hi({imports:[oo,Ir,bN,ha,dv,uv,fv,gv,Fk,_v,Cv,vv,xv,bv,Sv,wv,Pv,Tv,Mv,Dv,Ev,Iv,Ov,Fv,kv,Bv,Rv,Nv,Lv,Vv,qv]})}}return e})();var cRe=()=>[10,25,50,100],pRe=()=>["create"],mRe=e=>[e];function dRe(e,o){e&1&&(l(0,"button",14),b(1,"fa-icon",15),c(2),p(3,"translate"),r()),e&2&&(g("routerLink",oe(4,pRe)),a(2),v(" ",m(3,2,"labels.buttons.Create Preference")," "))}function uRe(e,o){e&1&&(l(0,"th",16),c(1),p(2,"translate"),r()),e&2&&(a(),v(" ",m(2,1,"labels.inputs.Account Number Preferences")," "))}function fRe(e,o){if(e&1&&(l(0,"td",17),c(1),p(2,"translateKey"),r()),e&2){let t=o.$implicit;a(),v(" ",Ot(2,1,t.accountType.value,"catalogs")," ")}}function hRe(e,o){e&1&&b(0,"tr",18)}function gRe(e,o){if(e&1&&b(0,"tr",19),e&2){let t=o.$implicit;g("routerLink",Nt(1,mRe,t.id))}}var jv=(()=>{class e{constructor(){this.route=T(Ie),this.displayedColumns=["accountType"],this.route.data.subscribe(t=>{this.accountNumberPreferencesData=t.accountNumberPreferences})}ngOnInit(){this.setAccountNumberPreferences()}setAccountNumberPreferences(){this.dataSource=new Wt(this.accountNumberPreferencesData),this.dataSource.paginator=this.paginator,this.dataSource.sortingDataAccessor=(t,n)=>t.accountType.value,this.dataSource.sort=this.sort,this.dataSource.filterPredicate=(t,n)=>t.accountType.value.toLowerCase().indexOf(n)!==-1}applyFilter(t){this.dataSource.filter=t.toLowerCase().trim()}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275cmp=me({type:e,selectors:[["mifosx-account-number-preferences"]],viewQuery:function(n,i){if(n&1&&(Ee(kt,7),Ee(It,7)),n&2){let s;Te(s=Me())&&(i.paginator=s.first),Te(s=Me())&&(i.sort=s.first)}},decls:17,vars:9,consts:[[1,"container","m-b-20","layout-row","align-end","gap-20px"],["mat-raised-button","","color","primary",3,"routerLink",4,"mifosxHasPermission"],[1,"container"],[1,"layout-row"],[1,"flex-fill"],["matInput","",3,"keyup"],[1,"mat-elevation-z8"],["mat-table","","matSort","",3,"dataSource"],["matColumnDef","accountType"],["mat-header-cell","","mat-sort-header","",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["mat-header-row","",4,"matHeaderRowDef"],["mat-row","","class","select-row",3,"routerLink",4,"matRowDef","matRowDefColumns"],["showFirstLastButtons","",3,"pageSizeOptions"],["mat-raised-button","","color","primary",3,"routerLink"],["icon","plus",1,"m-r-10"],["mat-header-cell","","mat-sort-header",""],["mat-cell",""],["mat-header-row",""],["mat-row","",1,"select-row",3,"routerLink"]],template:function(n,i){n&1&&(l(0,"div",0),F(1,dRe,4,5,"button",1),r(),l(2,"div",2)(3,"div",3)(4,"mat-form-field",4)(5,"mat-label"),c(6),p(7,"translate"),r(),l(8,"input",5),R("keyup",function(d){return i.applyFilter(d.target.value)}),r()()(),l(9,"div",6)(10,"table",7),X(11,8),F(12,uRe,3,3,"th",9)(13,fRe,3,4,"td",10),Z(),F(14,hRe,1,0,"tr",11)(15,gRe,1,3,"tr",12),r(),b(16,"mat-paginator",13),r()()),n&2&&(a(),g("mifosxHasPermission","ADD_PREFERENCES"),a(5),h(m(7,6,"labels.inputs.Filter")),a(4),g("dataSource",i.dataSource),a(4),g("matHeaderRowDef",i.displayedColumns),a(),g("matRowDefColumns",i.displayedColumns),a(),g("pageSizeOptions",oe(8,cRe)))},dependencies:[ue,fe,Ae,Fe,Be,ze,ve,Ke,ke,_t,It,xt,vt,bt,ri,Ct,yt,St,Pt,wt,Tt,kt,he,Fi],styles:["table[_ngcontent-%COMP%]{width:100%}table[_ngcontent-%COMP%] .select-row[_ngcontent-%COMP%]:hover{cursor:pointer}"]})}}return e})();var _Re=()=>["../"];function CRe(e,o){if(e&1&&(l(0,"mat-option",4),c(1),p(2,"translateKey"),r()),e&2){let t=o.$implicit;g("value",t.id),a(),v(" ",Ot(2,2,t.value,"catalogs")," ")}}function vRe(e,o){e&1&&(l(0,"mat-error"),c(1),p(2,"translate"),p(3,"translate"),l(4,"strong"),c(5),p(6,"translate"),r()()),e&2&&(a(),le(" ",m(2,3,"labels.inputs.Account Type")," ",m(3,5,"labels.commons.is")," "),a(4),h(m(6,7,"labels.commons.required")))}function xRe(e,o){if(e&1&&(l(0,"mat-option",4),c(1),r()),e&2){let t=o.$implicit;g("value",t.id),a(),v(" ",t.value," ")}}function bRe(e,o){if(e&1&&(l(0,"button",9),c(1),p(2,"translate"),r()),e&2){let t=w();g("disabled",!t.accountNumberPreferenceForm.valid),a(),v(" ",m(2,2,"labels.buttons.Submit")," ")}}var $v=(()=>{class e{constructor(){this.formBuilder=T(nt),this.systemService=T(ii),this.route=T(Ie),this.router=T(qe),this.route.data.subscribe(t=>{this.accountNumberPreferencesTemplateData=t.accountNumberPreferencesTemplate})}ngOnInit(){this.createAccountNumberPreferenceForm(),this.getPrefixTypeValue()}getPrefixTypeValue(){this.accountNumberPreferenceForm.get("accountType").valueChanges.subscribe(t=>{this.prefixTypeData=this.accountNumberPreferencesTemplateData.prefixTypeOptions[`accountType.${this.accountNumberPreferencesTemplateData.accountTypeOptions.find(n=>n.id===t).value.toLowerCase()}`]})}createAccountNumberPreferenceForm(){this.accountNumberPreferenceForm=this.formBuilder.group({accountType:["",se.required],prefixType:[""]})}submit(){let t=this.accountNumberPreferenceForm.value;t.prefixType===""&&(t.prefixType=void 0),this.systemService.createAccountNumberPreference(t).subscribe(n=>{this.router.navigate(["../",n.resourceId],{relativeTo:this.route})})}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275cmp=me({type:e,selectors:[["mifosx-create-account-number-preference"]],decls:25,vars:14,consts:[[1,"container"],[3,"ngSubmit","formGroup"],[1,"layout-column"],["required","","formControlName","accountType"],[3,"value"],["formControlName","prefixType"],[1,"layout-row","align-center","gap-5px","responsive-column"],["type","button","mat-raised-button","",3,"routerLink"],["mat-raised-button","","color","primary",3,"disabled",4,"mifosxHasPermission"],["mat-raised-button","","color","primary",3,"disabled"]],template:function(n,i){n&1&&(l(0,"div",0)(1,"mat-card")(2,"form",1),R("ngSubmit",function(){return i.submit()}),l(3,"mat-card-content")(4,"div",2)(5,"mat-form-field")(6,"mat-label"),c(7),p(8,"translate"),r(),l(9,"mat-select",3),Se(10,CRe,3,5,"mat-option",4,Pe),r(),E(12,vRe,7,9,"mat-error"),r(),l(13,"mat-form-field")(14,"mat-label"),c(15),p(16,"translate"),r(),l(17,"mat-select",5),Se(18,xRe,2,2,"mat-option",4,Pe),r()()()(),l(20,"mat-card-actions",6)(21,"button",7),c(22),p(23,"translate"),r(),F(24,bRe,3,4,"button",8),r()()()()),n&2&&(a(2),g("formGroup",i.accountNumberPreferenceForm),a(5),h(m(8,7,"labels.inputs.Account Type")),a(3),we(i.accountNumberPreferencesTemplateData.accountTypeOptions),a(2),I(i.accountNumberPreferenceForm.controls.accountType.hasError("required")?12:-1),a(3),h(m(16,9,"labels.inputs.Prefix Field")),a(3),we(i.prefixTypeData),a(3),g("routerLink",oe(13,_Re)),a(),v(" ",m(23,11,"labels.buttons.Cancel")," "),a(2),g("mifosxHasPermission","CREATE_ACCOUNTNUMBERFORMAT"))},dependencies:[ue,fe,tt,Ue,Xe,dt,Ze,et,Ae,$e,Je,Et,Fe,Be,ut,gt,ft,ve,Ke,he,Fi],styles:[".container[_ngcontent-%COMP%]{max-width:37rem}"]})}}return e})();var yRe=()=>["../"];function SRe(e,o){if(e&1&&(l(0,"mat-option",4),c(1),p(2,"translateKey"),r()),e&2){let t=o.$implicit;g("value",t.id),a(),v(" ",Ot(2,2,t.value,"catalogs")," ")}}function wRe(e,o){e&1&&(l(0,"mat-error"),c(1),p(2,"translate"),p(3,"translate"),l(4,"strong"),c(5),p(6,"translate"),r()()),e&2&&(a(),le(" ",m(2,3,"labels.inputs.Account Type")," ",m(3,5,"labels.commons.is")," "),a(4),h(m(6,7,"labels.commons.required")))}function PRe(e,o){if(e&1&&(l(0,"mat-option",4),c(1),r()),e&2){let t=o.$implicit;g("value",t.id),a(),v(" ",t.value," ")}}function TRe(e,o){if(e&1&&(l(0,"button",9),c(1),p(2,"translate"),r()),e&2){let t=w();g("disabled",!t.accountNumberPreferenceForm.valid||t.accountNumberPreferenceForm.pristine),a(),v(" ",m(2,2,"labels.buttons.Submit")," ")}}var Uv=(()=>{class e{constructor(){this.route=T(Ie),this.formBuilder=T(nt),this.systemService=T(ii),this.router=T(qe),this.route.data.subscribe(t=>{this.accountNumberPreferenceData=t.accountNumberPreference,this.accountNumberPreferencesTemplateData=t.accountNumberPreferencesTemplate})}ngOnInit(){this.prefixTypeData=this.accountNumberPreferencesTemplateData.prefixTypeOptions[this.accountNumberPreferenceData.accountType.code],this.createAccountNumberPreferenceForm()}createAccountNumberPreferenceForm(){this.accountNumberPreferenceForm=this.formBuilder.group({accountType:[{value:this.accountNumberPreferenceData.accountType.id,disabled:!0},se.required],prefixType:[this.accountNumberPreferenceData.prefixType?this.accountNumberPreferenceData.prefixType.id:0]})}submit(){let t=this.accountNumberPreferenceForm.value;t.prefixType===""&&(t.prefixType=void 0),this.systemService.updateAccountNumberPreference(this.accountNumberPreferenceData.id,t).subscribe(n=>{this.router.navigate(["../"],{relativeTo:this.route})})}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275cmp=me({type:e,selectors:[["mifosx-edit-account-number-preference"]],decls:25,vars:14,consts:[[1,"container"],[3,"ngSubmit","formGroup"],[1,"layout-column"],["required","","formControlName","accountType"],[3,"value"],["formControlName","prefixType"],[1,"layout-row","align-center","gap-5px","responsive-column"],["type","button","mat-raised-button","",3,"routerLink"],["mat-raised-button","","color","primary",3,"disabled",4,"mifosxHasPermission"],["mat-raised-button","","color","primary",3,"disabled"]],template:function(n,i){n&1&&(l(0,"div",0)(1,"mat-card")(2,"form",1),R("ngSubmit",function(){return i.submit()}),l(3,"mat-card-content")(4,"div",2)(5,"mat-form-field")(6,"mat-label"),c(7),p(8,"translate"),r(),l(9,"mat-select",3),Se(10,SRe,3,5,"mat-option",4,Pe),r(),E(12,wRe,7,9,"mat-error"),r(),l(13,"mat-form-field")(14,"mat-label"),c(15),p(16,"translate"),r(),l(17,"mat-select",5),Se(18,PRe,2,2,"mat-option",4,Pe),r()()()(),l(20,"mat-card-actions",6)(21,"button",7),c(22),p(23,"translate"),r(),F(24,TRe,3,4,"button",8),r()()()()),n&2&&(a(2),g("formGroup",i.accountNumberPreferenceForm),a(5),h(m(8,7,"labels.inputs.Account Type")),a(3),we(i.accountNumberPreferencesTemplateData.accountTypeOptions),a(2),I(i.accountNumberPreferenceForm.controls.accountType.hasError("required")?12:-1),a(3),h(m(16,9,"labels.inputs.Prefix Field")),a(3),we(i.prefixTypeData),a(3),g("routerLink",oe(13,yRe)),a(),v(" ",m(23,11,"labels.buttons.Cancel")," "),a(2),g("mifosxHasPermission","UPDATE_ACCOUNTNUMBERFORMAT"))},dependencies:[ue,fe,tt,Ue,Xe,dt,Ze,et,Ae,$e,Je,Et,Fe,Be,ut,gt,ft,ve,Ke,he,Fi],styles:[".container[_ngcontent-%COMP%]{max-width:37rem}"]})}}return e})();var MRe=()=>["edit"];function DRe(e,o){e&1&&(l(0,"button",7),b(1,"fa-icon",8),c(2),p(3,"translate"),r()),e&2&&(g("routerLink",oe(4,MRe)),a(2),v(" ",m(3,2,"labels.buttons.Edit")," "))}function ERe(e,o){if(e&1){let t=Y();l(0,"button",9),R("click",function(){V(t);let i=w();return q(i.delete())}),b(1,"fa-icon",10),c(2),p(3,"translate"),r()}e&2&&(a(2),v(" ",m(3,1,"labels.buttons.Delete")," "))}function IRe(e,o){e&1&&(l(0,"div",5),c(1),p(2,"translate"),r()),e&2&&(a(),v(" ",m(2,1,"labels.inputs.Prefix Type")," "))}function ORe(e,o){if(e&1&&(l(0,"div",6),c(1),r()),e&2){let t=w();a(),v(" ",t.accountNumberPreferenceData.prefixType.value," ")}}var Wv=(()=>{class e{constructor(){this.route=T(Ie),this.systemService=T(ii),this.router=T(qe),this.dialog=T(Ht),this.translateService=T(yi),this.route.data.subscribe(t=>{this.accountNumberPreferenceData=t.accountNumberPreference})}delete(){this.dialog.open(vi,{data:{deleteContext:this.translateService.instant("labels.heading.Account Number Preferences")+" "+this.accountNumberPreferenceData.id}}).afterClosed().subscribe(n=>{n.delete&&this.systemService.deleteAccountNumberPreference(this.accountNumberPreferenceData.id).subscribe(()=>{this.router.navigate(["/system/account-number-preferences"])})})}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275cmp=me({type:e,selectors:[["mifosx-view-account-number-preference"]],decls:15,vars:11,consts:[[1,"container","m-b-20","layout-row","align-end","gap-20px"],["mat-raised-button","","color","primary",3,"routerLink",4,"mifosxHasPermission"],["mat-raised-button","","color","warn",3,"click",4,"mifosxHasPermission"],[1,"container"],[1,"layout-row-wrap"],[1,"flex-50","mat-body-strong"],[1,"flex-50"],["mat-raised-button","","color","primary",3,"routerLink"],["icon","edit",1,"m-r-10"],["mat-raised-button","","color","warn",3,"click"],["icon","trash",1,"m-r-10"]],template:function(n,i){n&1&&(l(0,"div",0),F(1,DRe,4,5,"button",1)(2,ERe,4,3,"button",2),r(),l(3,"div",3)(4,"mat-card")(5,"mat-card-content")(6,"div",4)(7,"div",5),c(8),p(9,"translate"),r(),l(10,"div",6),c(11),p(12,"translateKey"),r(),E(13,IRe,3,3,"div",5),E(14,ORe,2,1,"div",6),r()()()()),n&2&&(a(),g("mifosxHasPermission","UPDATE_ACCOUNTNUMBERFORMAT"),a(),g("mifosxHasPermission","DELETE_ACCOUNTNUMBERFORMAT"),a(6),v(" ",m(9,6,"labels.inputs.Account Type")," "),a(3),v(" ",Ot(12,8,i.accountNumberPreferenceData.accountType.value,"catalogs")," "),a(2),I(i.accountNumberPreferenceData.prefixType?13:-1),a(),I(i.accountNumberPreferenceData.prefixType?14:-1))},dependencies:[ue,fe,Ae,$e,Je,ve,Ke,ke,he,Fi],styles:[".container[_ngcontent-%COMP%]{max-width:37rem}.container[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] div[_ngcontent-%COMP%]{margin:1rem 0;word-wrap:break-word}"]})}}return e})();var Qv=class{constructor(o){this.systemService=o,this.auditTrailsSubject=new Na([]),this.recordsSubject=new Na(0),this.records$=this.recordsSubject.asObservable()}getAuditTrails(o,t="",n="",i=0,s=10){this.auditTrailsSubject.next([]),this.systemService.getAuditTrails(o,t,n,i*s,s).subscribe(d=>{this.recordsSubject.next(d.totalFilteredRecords),this.auditTrailsSubject.next(d.pageItems)})}connect(o){return this.auditTrailsSubject.asObservable()}disconnect(o){this.auditTrailsSubject.complete(),this.recordsSubject.complete()}};var SN=(e,o)=>({id:e,name:o}),ARe=e=>[e],FRe=()=>[10,25,50,100];function kRe(e,o){if(e&1&&(l(0,"mat-option",16),c(1),r()),e&2){let t=o.$implicit;g("value",t.id),a(),v(" ",t.processingResult," ")}}function BRe(e,o){if(e&1&&(l(0,"mat-option",16),c(1),r()),e&2){let t=o.$implicit;g("value",Ka(2,SN,t.id,t.username)),a(),v(" ",t.username," ")}}function RRe(e,o){if(e&1&&(l(0,"mat-option",16),c(1),r()),e&2){let t=o.$implicit;g("value",t),a(),v(" ",t," ")}}function NRe(e,o){if(e&1&&(l(0,"mat-option",16),c(1),r()),e&2){let t=o.$implicit;g("value",t),a(),v(" ",t," ")}}function LRe(e,o){if(e&1&&(l(0,"mat-option",16),c(1),r()),e&2){let t=o.$implicit;g("value",Ka(2,SN,t.id,t.username)),a(),v(" ",t.username," ")}}function VRe(e,o){e&1&&(l(0,"div"),b(1,"mat-progress-bar",28),r())}function qRe(e,o){e&1&&(l(0,"th",44),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.Trail ID")))}function zRe(e,o){if(e&1&&(l(0,"td",45),c(1),r()),e&2){let t=o.$implicit;a(),h(t.id)}}function HRe(e,o){e&1&&(l(0,"th",44),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.Resource ID")))}function GRe(e,o){if(e&1&&(l(0,"td",45),c(1),r()),e&2){let t=o.$implicit;a(),h(t.resourceId)}}function jRe(e,o){e&1&&(l(0,"th",44),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.Status")))}function $Re(e,o){if(e&1&&(l(0,"td",45),c(1),r()),e&2){let t=o.$implicit;a(),h(t.processingResult)}}function URe(e,o){e&1&&(l(0,"th",44),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.Made By")))}function WRe(e,o){if(e&1&&(l(0,"td",45),c(1),r()),e&2){let t=o.$implicit;a(),h(t.maker)}}function QRe(e,o){e&1&&(l(0,"th",44),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.Action")))}function YRe(e,o){if(e&1&&(l(0,"td",45),c(1),p(2,"translateKey"),r()),e&2){let t=o.$implicit;a(),h(Ot(2,1,t.actionName,"auditTrail.actions"))}}function JRe(e,o){e&1&&(l(0,"th",44),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.Entity")))}function KRe(e,o){if(e&1&&(l(0,"td",45),c(1),p(2,"translateKey"),r()),e&2){let t=o.$implicit;a(),h(Ot(2,1,t.entityName,"auditTrail.entities"))}}function XRe(e,o){e&1&&(l(0,"th",44),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.Office")))}function ZRe(e,o){if(e&1&&(l(0,"td",45),c(1),r()),e&2){let t=o.$implicit;a(),h(t.officeName)}}function e9e(e,o){e&1&&(l(0,"th",44),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.Made Date")))}function t9e(e,o){if(e&1&&(l(0,"td",45),c(1),p(2,"datetimeFormat"),r()),e&2){let t=o.$implicit;a(),h(m(2,1,t.madeOnDate))}}function i9e(e,o){e&1&&(l(0,"th",44),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.Checker")))}function n9e(e,o){if(e&1&&(l(0,"td",45),c(1),r()),e&2){let t=o.$implicit;a(),h(t.checker)}}function o9e(e,o){e&1&&(l(0,"th",44),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.Checked Date")))}function a9e(e,o){if(e&1&&(l(0,"td",45),c(1),p(2,"datetimeFormat"),r()),e&2){let t=o.$implicit;a(),h(m(2,1,t.checkedOnDate))}}function r9e(e,o){e&1&&(l(0,"th",44),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.Client Ip")))}function l9e(e,o){if(e&1&&(l(0,"td",45),c(1),r()),e&2){let t=o.$implicit;a(),h(t.ip)}}function s9e(e,o){e&1&&b(0,"tr",46)}function c9e(e,o){if(e&1&&b(0,"tr",47),e&2){let t=o.$implicit;g("routerLink",Nt(1,ARe,t.id))}}function p9e(e,o){if(e&1&&(l(0,"table",26),X(1,29),F(2,qRe,3,3,"th",30)(3,zRe,2,1,"td",31),Z(),X(4,32),F(5,HRe,3,3,"th",30)(6,GRe,2,1,"td",31),Z(),X(7,33),F(8,jRe,3,3,"th",30)(9,$Re,2,1,"td",31),Z(),X(10,34),F(11,URe,3,3,"th",30)(12,WRe,2,1,"td",31),Z(),X(13,35),F(14,QRe,3,3,"th",30)(15,YRe,3,4,"td",31),Z(),X(16,36),F(17,JRe,3,3,"th",30)(18,KRe,3,4,"td",31),Z(),X(19,37),F(20,XRe,3,3,"th",30)(21,ZRe,2,1,"td",31),Z(),X(22,38),F(23,e9e,3,3,"th",30)(24,t9e,3,3,"td",31),Z(),X(25,39),F(26,i9e,3,3,"th",30)(27,n9e,2,1,"td",31),Z(),X(28,40),F(29,o9e,3,3,"th",30)(30,a9e,3,3,"td",31),Z(),X(31,41),F(32,r9e,3,3,"th",30)(33,l9e,2,1,"td",31),Z(),F(34,s9e,1,0,"tr",42)(35,c9e,1,3,"tr",43),r()),e&2){let t=w();g("dataSource",t.dataSource),a(34),g("matHeaderRowDef",t.displayedColumns),a(),g("matRowDefColumns",t.displayedColumns)}}function m9e(e,o){if(e&1&&(b(0,"mat-paginator",27),p(1,"async")),e&2){let t=w();g("length",m(1,3,t.dataSource==null?null:t.dataSource.records$))("pageSize",10)("pageSizeOptions",oe(5,FRe))}}var Yv=(()=>{class e{constructor(){this.route=T(Ie),this.systemService=T(ii),this.dateUtils=T(Zt),this.settingsService=T(At),this.minDate=new Date(2e3,0,1),this.maxDate=new Date,this.displayedColumns=["id","resourceId","processingResult","maker","actionName","entityName","officeName","madeOnDate","checker","checkedOnDate","clientIp"],this.filterAuditTrailsBy=[{type:"actionName",value:""},{type:"entityName",value:""},{type:"resourceId",value:""},{type:"makerId",value:""},{type:"makerDateTimeFrom",value:""},{type:"makerDateTimeTo",value:""},{type:"checkerDateTimeFrom",value:""},{type:"checkerDateTimeTo",value:""},{type:"checkerId",value:""},{type:"processingResult",value:""},{type:"dateFormat",value:this.settingsService.dateFormat},{type:"locale",value:this.settingsService.language.code}],this.user=new it(""),this.fromDate=new it,this.fromTime=new it,this.checkedFromDate=new it,this.checkedFromTime=new it,this.processingResult=new it,this.actionName=new it,this.resourceId=new it(""),this.toDate=new it,this.toTime=new it,this.checkedToDate=new it,this.checkedToTime=new it,this.entityName=new it,this.checker=new it,this.isLoading=!1,this.route.data.subscribe(t=>{this.auditTrailSearchTemplateData=t.auditTrailSearchTemplate})}ngOnInit(){this.maxDate=this.settingsService.businessDate,this.setFilteredUsers(),this.setFilteredActions(),this.setFilteredEntities(),this.setFilteredCheckers(),this.dataSource=new Qv(this.systemService),this.getAuditTrails()}ngAfterViewInit(){this.user.valueChanges.pipe(Mn(t=>t.id?t.id:""),Oo(500),Ao(),Eo(t=>{this.applyFilter(t,"makerId")})).subscribe(),this.fromDate.valueChanges.pipe(Oo(500),Ao(),Eo(t=>{this.applyFilter(this.getDateTime(t,this.fromTime.value),"makerDateTimeFrom")})).subscribe(),this.fromTime.valueChanges.pipe(Oo(500),Ao(),Eo(t=>{this.applyFilter(this.getDateTime(this.fromDate.value,t),"makerDateTimeFrom")})).subscribe(),this.toDate.valueChanges.pipe(Oo(500),Ao(),Eo(t=>{this.applyFilter(this.getDateTime(t,this.toTime.value),"makerDateTimeTo")})).subscribe(),this.toTime.valueChanges.pipe(Oo(500),Ao(),Eo(t=>{this.applyFilter(this.getDateTime(this.toDate.value,t),"makerDateTimeTo")})).subscribe(),this.checkedFromDate.valueChanges.pipe(Oo(500),Ao(),Eo(t=>{this.applyFilter(this.getDateTime(t,this.checkedFromTime.value),"checkerDateTimeFrom")})).subscribe(),this.checkedFromTime.valueChanges.pipe(Oo(500),Ao(),Eo(t=>{this.applyFilter(this.getDateTime(this.checkedFromDate.value,t),"checkerDateTimeFrom")})).subscribe(),this.checkedToDate.valueChanges.pipe(Oo(500),Ao(),Eo(t=>{this.applyFilter(this.getDateTime(t,this.checkedToTime.value),"checkerDateTimeTo")})).subscribe(),this.checkedToTime.valueChanges.pipe(Oo(500),Ao(),Eo(t=>{this.applyFilter(this.getDateTime(this.checkedToDate.value,t),"checkerDateTimeTo")})).subscribe(),this.resourceId.valueChanges.pipe(Oo(500),Ao(),Eo(t=>{this.applyFilter(t,"resourceId")})).subscribe(),this.actionName.valueChanges.pipe(Mn(t=>t||""),Oo(500),Ao(),Eo(t=>{this.applyFilter(t,"actionName")})).subscribe(),this.entityName.valueChanges.pipe(Mn(t=>t||""),Oo(500),Ao(),Eo(t=>{this.applyFilter(t,"entityName")})).subscribe(),this.checker.valueChanges.pipe(Mn(t=>t||""),Oo(500),Ao(),Eo(t=>{this.applyFilter(t.id,"checkerId")})).subscribe(),this.sort&&this.paginator&&fl(this.sort.sortChange,this.paginator.page).pipe(Eo(()=>this.loadAuditTrailsPage())).subscribe()}getAuditTrails(){this.isLoading=!0;let t=this.sort?this.sort.active:"",n=this.sort?this.sort.direction:"",i=this.paginator?this.paginator.pageIndex:0,s=this.paginator?this.paginator.pageSize:20;this.dataSource.getAuditTrails(this.filterAuditTrailsBy,t,n,i,s),this.isLoading=!1}loadAuditTrailsPage(){this.sort&&!this.sort.direction&&delete this.sort.active,this.getAuditTrails()}applyFilter(t,n){this.paginator&&(this.paginator.pageIndex=0);let i=this.filterAuditTrailsBy.findIndex(s=>s.type===n);this.filterAuditTrailsBy[i].value=t,this.loadAuditTrailsPage()}displayUserName(t){return t?t.name:void 0}displayActionName(t){return t||void 0}displayEntityName(t){return t||void 0}setFilteredUsers(){this.filteredUserData=this.user.valueChanges.pipe(hl(""),Mn(t=>typeof t=="string"?t:t.name),Mn(t=>t?this.filterUserAutocompleteData(t):this.auditTrailSearchTemplateData.appUsers))}setFilteredCheckers(){this.filteredCheckerData=this.checker.valueChanges.pipe(hl(""),Mn(t=>typeof t=="string"?t:t.name),Mn(t=>t?this.filterUserAutocompleteData(t):this.auditTrailSearchTemplateData.appUsers))}setFilteredActions(){this.filteredActionData=this.actionName.valueChanges.pipe(hl(""),Mn(t=>typeof t=="string"?t:""),Mn(t=>t?this.filterActionAutocompleteData(t):this.auditTrailSearchTemplateData.actionNames))}setFilteredEntities(){this.filteredEntityData=this.entityName.valueChanges.pipe(hl(""),Mn(t=>typeof t=="string"?t:""),Mn(t=>t?this.filterEntityAutocompleteData(t):this.auditTrailSearchTemplateData.entityNames))}filterUserAutocompleteData(t){return this.auditTrailSearchTemplateData.appUsers.filter(n=>n.username.toLowerCase().includes(t.toLowerCase()))}filterActionAutocompleteData(t){return this.auditTrailSearchTemplateData.actionNames.filter(n=>n.toLowerCase().includes(t.toLowerCase()))}filterEntityAutocompleteData(t){return this.auditTrailSearchTemplateData.entityNames.filter(n=>n.toLowerCase().includes(t.toLowerCase()))}downloadCSV(){let t=this.settingsService.dateFormat,n=(d,u)=>u===void 0?"":u,i=["ID","Resource ID","Status","Office","Made On","Maker","Checked On","Checker","Entity","Action","Client"],s=["id","resourceId","processingResult","officeName","madeOnDate","maker","checkedOnDate","checker","entityName","actionName","clientName"];this.systemService.getAuditTrails(this.filterAuditTrailsBy,this.sort?.active??"",this.sort?.direction??"",0,-1).subscribe(d=>{if(d!==void 0){let u=d.pageItems.map(_=>s.map(C=>(C==="madeOnDate"||C==="checkedOnDate")&&_[C]!=null&&_[C]!==""?JSON.stringify(this.dateUtils.formatDate(_[C],"yyyy-MM-ddTHH:mm:ssZ")):JSON.stringify(_[C],n)));u.unshift(`data:text/csv;charset=utf-8,${i.join()}`),u=u.join(`\r +`):e}function y0e(e,o){let{element:t,datasetIndex:n,index:i}=o,s=e.getDatasetMeta(n).controller,{label:d,value:u}=s.getLabelAndValue(i);return{chart:e,label:d,parsed:s.getParsed(i),raw:e.data.datasets[n].data[i],formattedValue:u,dataset:s.getDataset(),dataIndex:i,datasetIndex:n,element:t}}function BR(e,o){let t=e.chart.ctx,{body:n,footer:i,title:s}=e,{boxWidth:d,boxHeight:u}=o,f=sr(o.bodyFont),_=sr(o.titleFont),C=sr(o.footerFont),x=s.length,y=i.length,P=n.length,S=zr(o.padding),M=S.height,D=0,k=n.reduce((J,re)=>J+re.before.length+re.lines.length+re.after.length,0);if(k+=e.beforeBody.length+e.afterBody.length,x&&(M+=x*_.lineHeight+(x-1)*o.titleSpacing+o.titleMarginBottom),k){let J=o.displayColors?Math.max(u,f.lineHeight):f.lineHeight;M+=P*J+(k-P)*f.lineHeight+(k-1)*o.bodySpacing}y&&(M+=o.footerMarginTop+y*C.lineHeight+(y-1)*o.footerSpacing);let z=0,U=function(J){D=Math.max(D,t.measureText(J).width+z)};return t.save(),t.font=_.string,Jo(e.title,U),t.font=f.string,Jo(e.beforeBody.concat(e.afterBody),U),z=o.displayColors?d+2+o.boxPadding:0,Jo(n,J=>{Jo(J.before,U),Jo(J.lines,U),Jo(J.after,U)}),z=0,t.font=C.string,Jo(e.footer,U),t.restore(),D+=S.width,{width:D,height:M}}function S0e(e,o){let{y:t,height:n}=o;return te.height-n/2?"bottom":"center"}function w0e(e,o,t,n){let{x:i,width:s}=n,d=t.caretSize+t.caretPadding;if(e==="left"&&i+s+d>o.width||e==="right"&&i-s-d<0)return!0}function P0e(e,o,t,n){let{x:i,width:s}=t,{width:d,chartArea:{left:u,right:f}}=e,_="center";return n==="center"?_=i<=(u+f)/2?"left":"right":i<=s/2?_="left":i>=d-s/2&&(_="right"),w0e(_,e,o,t)&&(_="center"),_}function RR(e,o,t){let n=t.yAlign||o.yAlign||S0e(e,t);return{xAlign:t.xAlign||o.xAlign||P0e(e,o,t,n),yAlign:n}}function T0e(e,o){let{x:t,width:n}=e;return o==="right"?t-=n:o==="center"&&(t-=n/2),t}function M0e(e,o,t){let{y:n,height:i}=e;return o==="top"?n+=t:o==="bottom"?n-=i+t:n-=i/2,n}function NR(e,o,t,n){let{caretSize:i,caretPadding:s,cornerRadius:d}=e,{xAlign:u,yAlign:f}=t,_=i+s,{topLeft:C,topRight:x,bottomLeft:y,bottomRight:P}=Vp(d),S=T0e(o,u),M=M0e(o,f,_);return f==="center"?u==="left"?S+=_:u==="right"&&(S-=_):u==="left"?S-=Math.max(C,y)+i:u==="right"&&(S+=Math.max(x,P)+i),{x:_r(S,0,n.width-o.width),y:_r(M,0,n.height-o.height)}}function rC(e,o,t){let n=zr(t.padding);return o==="center"?e.x+e.width/2:o==="right"?e.x+e.width-n.right:e.x+n.left}function LR(e){return uc([],Uc(e))}function D0e(e,o,t){return jc(e,{tooltip:o,tooltipItems:t,type:"tooltip"})}function VR(e,o){let t=o&&o.dataset&&o.dataset.tooltip&&o.dataset.tooltip.callbacks;return t?e.override(t):e}var g9={beforeTitle:mc,title(e){if(e.length>0){let o=e[0],t=o.chart.data.labels,n=t?t.length:0;if(this&&this.options&&this.options.mode==="dataset")return o.dataset.label||"";if(o.label)return o.label;if(n>0&&o.dataIndex"u"?g9[o].call(t,n):i}var qR=(()=>{class e extends Ns{static positioners=Nf;constructor(t){super(),this.opacity=0,this._active=[],this._eventPosition=void 0,this._size=void 0,this._cachedAnimations=void 0,this._tooltipItems=[],this.$animations=void 0,this.$context=void 0,this.chart=t.chart,this.options=t.options,this.dataPoints=void 0,this.title=void 0,this.beforeBody=void 0,this.body=void 0,this.afterBody=void 0,this.footer=void 0,this.xAlign=void 0,this.yAlign=void 0,this.x=void 0,this.y=void 0,this.height=void 0,this.width=void 0,this.caretX=void 0,this.caretY=void 0,this.labelColors=void 0,this.labelPointStyles=void 0,this.labelTextColors=void 0}initialize(t){this.options=t,this._cachedAnimations=void 0,this.$context=void 0}_resolveAnimations(){let t=this._cachedAnimations;if(t)return t;let n=this.chart,i=this.options.setContext(this.getContext()),s=i.enabled&&n.options.animation&&i.animations,d=new pC(this.chart,s);return s._cacheable&&(this._cachedAnimations=Object.freeze(d)),d}getContext(){return this.$context||(this.$context=D0e(this.chart.getContext(),this,this._tooltipItems))}getTitle(t,n){let{callbacks:i}=n,s=wl(i,"beforeTitle",this,t),d=wl(i,"title",this,t),u=wl(i,"afterTitle",this,t),f=[];return f=uc(f,Uc(s)),f=uc(f,Uc(d)),f=uc(f,Uc(u)),f}getBeforeBody(t,n){return LR(wl(n.callbacks,"beforeBody",this,t))}getBody(t,n){let{callbacks:i}=n,s=[];return Jo(t,d=>{let u={before:[],lines:[],after:[]},f=VR(i,d);uc(u.before,Uc(wl(f,"beforeLabel",this,d))),uc(u.lines,wl(f,"label",this,d)),uc(u.after,Uc(wl(f,"afterLabel",this,d))),s.push(u)}),s}getAfterBody(t,n){return LR(wl(n.callbacks,"afterBody",this,t))}getFooter(t,n){let{callbacks:i}=n,s=wl(i,"beforeFooter",this,t),d=wl(i,"footer",this,t),u=wl(i,"afterFooter",this,t),f=[];return f=uc(f,Uc(s)),f=uc(f,Uc(d)),f=uc(f,Uc(u)),f}_createItems(t){let n=this._active,i=this.chart.data,s=[],d=[],u=[],f=[],_,C;for(_=0,C=n.length;_t.filter(x,y,P,i))),t.itemSort&&(f=f.sort((x,y)=>t.itemSort(x,y,i))),Jo(f,x=>{let y=VR(t.callbacks,x);s.push(wl(y,"labelColor",this,x)),d.push(wl(y,"labelPointStyle",this,x)),u.push(wl(y,"labelTextColor",this,x))}),this.labelColors=s,this.labelPointStyles=d,this.labelTextColors=u,this.dataPoints=f,f}update(t,n){let i=this.options.setContext(this.getContext()),s=this._active,d,u=[];if(!s.length)this.opacity!==0&&(d={opacity:0});else{let f=Nf[i.position].call(this,s,this._eventPosition);u=this._createItems(i),this.title=this.getTitle(u,i),this.beforeBody=this.getBeforeBody(u,i),this.body=this.getBody(u,i),this.afterBody=this.getAfterBody(u,i),this.footer=this.getFooter(u,i);let _=this._size=BR(this,i),C=Object.assign({},f,_),x=RR(this.chart,i,C),y=NR(i,C,x,this.chart);this.xAlign=x.xAlign,this.yAlign=x.yAlign,d={opacity:1,x:y.x,y:y.y,width:_.width,height:_.height,caretX:f.x,caretY:f.y}}this._tooltipItems=u,this.$context=void 0,d&&this._resolveAnimations().update(this,d),t&&i.external&&i.external.call(this,{chart:this.chart,tooltip:this,replay:n})}drawCaret(t,n,i,s){let d=this.getCaretPosition(t,i,s);n.lineTo(d.x1,d.y1),n.lineTo(d.x2,d.y2),n.lineTo(d.x3,d.y3)}getCaretPosition(t,n,i){let{xAlign:s,yAlign:d}=this,{caretSize:u,cornerRadius:f}=i,{topLeft:_,topRight:C,bottomLeft:x,bottomRight:y}=Vp(f),{x:P,y:S}=t,{width:M,height:D}=n,k,z,U,J,re,ee;return d==="center"?(re=S+D/2,s==="left"?(k=P,z=k-u,J=re+u,ee=re-u):(k=P+M,z=k+u,J=re-u,ee=re+u),U=k):(s==="left"?z=P+Math.max(_,x)+u:s==="right"?z=P+M-Math.max(C,y)-u:z=this.caretX,d==="top"?(J=S,re=J-u,k=z-u,U=z+u):(J=S+D,re=J+u,k=z+u,U=z-u),ee=J),{x1:k,x2:z,x3:U,y1:J,y2:re,y3:ee}}drawTitle(t,n,i){let s=this.title,d=s.length,u,f,_;if(d){let C=wd(i.rtl,this.x,this.width);for(t.x=rC(this,i.titleAlign,i),n.textAlign=C.textAlign(i.titleAlign),n.textBaseline="middle",u=sr(i.titleFont),f=i.titleSpacing,n.fillStyle=i.titleColor,n.font=u.string,_=0;_U!==0)?(t.beginPath(),t.fillStyle=d.multiKeyBackground,U0(t,{x:D,y:M,w:C,h:_,radius:z}),t.fill(),t.stroke(),t.fillStyle=u.backgroundColor,t.beginPath(),U0(t,{x:k,y:M+1,w:C-2,h:_-2,radius:z}),t.fill()):(t.fillStyle=d.multiKeyBackground,t.fillRect(D,M,C,_),t.strokeRect(D,M,C,_),t.fillStyle=u.backgroundColor,t.fillRect(k,M+1,C-2,_-2))}t.fillStyle=this.labelTextColors[i]}drawBody(t,n,i){let{body:s}=this,{bodySpacing:d,bodyAlign:u,displayColors:f,boxHeight:_,boxWidth:C,boxPadding:x}=i,y=sr(i.bodyFont),P=y.lineHeight,S=0,M=wd(i.rtl,this.x,this.width),D=function(_e){n.fillText(_e,M.x(t.x+S),t.y+P/2),t.y+=P+d},k=M.textAlign(u),z,U,J,re,ee,ae,ce;for(n.textAlign=u,n.textBaseline="middle",n.font=y.string,t.x=rC(this,k,i),n.fillStyle=i.bodyColor,Jo(this.beforeBody,D),S=f&&k!=="right"?u==="center"?C/2+x:C+2+x:0,re=0,ae=s.length;re0&&n.stroke()}_updateAnimationTarget(t){let n=this.chart,i=this.$animations,s=i&&i.x,d=i&&i.y;if(s||d){let u=Nf[t.position].call(this,this._active,this._eventPosition);if(!u)return;let f=this._size=BR(this,t),_=Object.assign({},u,this._size),C=RR(n,t,_),x=NR(t,_,C,n);(s._to!==x.x||d._to!==x.y)&&(this.xAlign=C.xAlign,this.yAlign=C.yAlign,this.width=f.width,this.height=f.height,this.caretX=u.x,this.caretY=u.y,this._resolveAnimations().update(this,x))}}_willRender(){return!!this.opacity}draw(t){let n=this.options.setContext(this.getContext()),i=this.opacity;if(!i)return;this._updateAnimationTarget(n);let s={width:this.width,height:this.height},d={x:this.x,y:this.y};i=Math.abs(i)<.001?0:i;let u=zr(n.padding),f=this.title.length||this.beforeBody.length||this.body.length||this.afterBody.length||this.footer.length;n.enabled&&f&&(t.save(),t.globalAlpha=i,this.drawBackground(d,t,s,n),Q4(t,n.textDirection),d.y+=u.top,this.drawTitle(d,t,n),this.drawBody(d,t,n),this.drawFooter(d,t,n),Y4(t,n.textDirection),t.restore())}getActiveElements(){return this._active||[]}setActiveElements(t,n){let i=this._active,s=t.map(({datasetIndex:f,index:_})=>{let C=this.chart.getDatasetMeta(f);if(!C)throw new Error("Cannot find a dataset at index "+f);return{datasetIndex:f,element:C.data[_],index:_}}),d=!Mf(i,s),u=this._positionChanged(s,n);(d||u)&&(this._active=s,this._eventPosition=n,this._ignoreReplayEvents=!0,this.update(!0))}handleEvent(t,n,i=!0){if(n&&this._ignoreReplayEvents)return!1;this._ignoreReplayEvents=!1;let s=this.options,d=this._active||[],u=this._getActiveElements(t,d,n,i),f=this._positionChanged(u,t),_=n||!Mf(u,d)||f;return _&&(this._active=u,(s.enabled||s.external)&&(this._eventPosition={x:t.x,y:t.y},this.update(!0,n))),_}_getActiveElements(t,n,i,s){let d=this.options;if(t.type==="mouseout")return[];if(!s)return n.filter(f=>this.chart.data.datasets[f.datasetIndex]&&this.chart.getDatasetMeta(f.datasetIndex).controller.getParsed(f.index)!==void 0);let u=this.chart.getElementsAtEventForMode(t,d.mode,d,i);return d.reverse&&u.reverse(),u}_positionChanged(t,n){let{caretX:i,caretY:s,options:d}=this,u=Nf[d.position].call(this,t,n);return u!==!1&&(i!==u.x||s!==u.y)}}return e})(),E0e={id:"tooltip",_element:qR,positioners:Nf,afterInit(e,o,t){t&&(e.tooltip=new qR({chart:e,options:t}))},beforeUpdate(e,o,t){e.tooltip&&e.tooltip.initialize(t)},reset(e,o,t){e.tooltip&&e.tooltip.initialize(t)},afterDraw(e){let o=e.tooltip;if(o&&o._willRender()){let t={tooltip:o};if(e.notifyPlugins("beforeTooltipDraw",qt(at({},t),{cancelable:!0}))===!1)return;o.draw(e.ctx),e.notifyPlugins("afterTooltipDraw",t)}},afterEvent(e,o){if(e.tooltip){let t=o.replay;e.tooltip.handleEvent(o.event,t,o.inChartArea)&&(o.changed=!0)}},defaults:{enabled:!0,external:null,position:"average",backgroundColor:"rgba(0,0,0,0.8)",titleColor:"#fff",titleFont:{weight:"bold"},titleSpacing:2,titleMarginBottom:6,titleAlign:"left",bodyColor:"#fff",bodySpacing:2,bodyFont:{},bodyAlign:"left",footerColor:"#fff",footerSpacing:2,footerMarginTop:6,footerFont:{weight:"bold"},footerAlign:"left",padding:6,caretPadding:2,caretSize:5,cornerRadius:6,boxHeight:(e,o)=>o.bodyFont.size,boxWidth:(e,o)=>o.bodyFont.size,multiKeyBackground:"#fff",displayColors:!0,boxPadding:0,borderColor:"rgba(0,0,0,0)",borderWidth:0,animation:{duration:400,easing:"easeOutQuart"},animations:{numbers:{type:"number",properties:["x","y","width","height","caretX","caretY"]},opacity:{easing:"linear",duration:200}},callbacks:g9},defaultRoutes:{bodyFont:"font",footerFont:"font",titleFont:"font"},descriptors:{_scriptable:e=>e!=="filter"&&e!=="itemSort"&&e!=="external",_indexable:!1,callbacks:{_scriptable:!1,_indexable:!1},animation:{_fallback:!1},animations:{_fallback:"animation"}},additionalOptionScopes:["interaction"]},I0e=Object.freeze({__proto__:null,Colors:Hde,Decimation:Ude,Filler:d0e,Legend:C0e,SubTitle:b0e,Title:x0e,Tooltip:E0e}),O0e=(e,o,t,n)=>(typeof o=="string"?(t=e.push(o)-1,n.unshift({index:t,label:o})):isNaN(o)&&(t=null),t);function A0e(e,o,t,n){let i=e.indexOf(o);if(i===-1)return O0e(e,o,t,n);let s=e.lastIndexOf(o);return i!==s?t:i}var F0e=(e,o)=>e===null?null:_r(Math.round(e),0,o);function zR(e){let o=this.getLabels();return e>=0&&e{class e extends Md{static id="category";static defaults={ticks:{callback:zR}};constructor(t){super(t),this._startValue=void 0,this._valueRange=0,this._addedLabels=[]}init(t){let n=this._addedLabels;if(n.length){let i=this.getLabels();for(let{index:s,label:d}of n)i[s]===d&&i.splice(s,1);this._addedLabels=[]}super.init(t)}parse(t,n){if(Co(t))return null;let i=this.getLabels();return n=isFinite(n)&&i[n]===t?n:A0e(i,t,Kn(n,t),this._addedLabels),F0e(n,i.length-1)}determineDataLimits(){let{minDefined:t,maxDefined:n}=this.getUserBounds(),{min:i,max:s}=this.getMinMax(!0);this.options.bounds==="ticks"&&(t||(i=0),n||(s=this.getLabels().length-1)),this.min=i,this.max=s}buildTicks(){let t=this.min,n=this.max,i=this.options.offset,s=[],d=this.getLabels();d=t===0&&n===d.length-1?d:d.slice(t,n+1),this._valueRange=Math.max(d.length-(i?0:1),1),this._startValue=this.min-(i?.5:0);for(let u=t;u<=n;u++)s.push({value:u});return s}getLabelForValue(t){return zR.call(this,t)}configure(){super.configure(),this.isHorizontal()||(this._reversePixels=!this._reversePixels)}getPixelForValue(t){return typeof t!="number"&&(t=this.parse(t)),t===null?NaN:this.getPixelForDecimal((t-this._startValue)/this._valueRange)}getPixelForTick(t){let n=this.ticks;return t<0||t>n.length-1?null:this.getPixelForValue(n[t].value)}getValueForPixel(t){return Math.round(this._startValue+this.getDecimalForPixel(t)*this._valueRange)}getBasePixel(){return this.bottom}}return e})();function B0e(e,o){let t=[],{bounds:i,step:s,min:d,max:u,precision:f,count:_,maxTicks:C,maxDigits:x,includeBounds:y}=e,P=s||1,S=C-1,{min:M,max:D}=o,k=!Co(d),z=!Co(u),U=!Co(_),J=(D-M)/(x+1),re=M4((D-M)/S/P)*P,ee,ae,ce,_e;if(re<1e-14&&!k&&!z)return[{value:M},{value:D}];_e=Math.ceil(D/re)-Math.floor(M/re),_e>S&&(re=M4(_e*re/S/P)*P),Co(f)||(ee=Math.pow(10,f),re=Math.ceil(re*ee)/ee),i==="ticks"?(ae=Math.floor(M/re)*re,ce=Math.ceil(D/re)*re):(ae=M,ce=D),k&&z&&s&&MB((u-d)/s,re/1e3)?(_e=Math.round(Math.min((u-d)/re,C)),re=(u-d)/_e,ae=d,ce=u):U?(ae=k?d:ae,ce=z?u:ce,_e=_-1,re=(ce-ae)/_e):(_e=(ce-ae)/re,G0(_e,Math.round(_e),re/1e3)?_e=Math.round(_e):_e=Math.ceil(_e));let de=Math.max(E4(re),E4(ae));ee=Math.pow(10,Co(f)?de:f),ae=Math.round(ae*ee)/ee,ce=Math.round(ce*ee)/ee;let j=0;for(k&&(y&&ae!==d?(t.push({value:d}),aeu)break;t.push({value:W})}return z&&y&&ce!==u?t.length&&G0(t[t.length-1].value,u,HR(u,J,e))?t[t.length-1].value=u:t.push({value:u}):(!z||ce===u)&&t.push({value:ce}),t}function HR(e,o,{horizontal:t,minRotation:n}){let i=ms(n),s=(t?Math.sin(i):Math.cos(i))||.001,d=.75*o*(""+e).length;return Math.min(o/s,d)}var J0=class extends Md{constructor(o){super(o),this.start=void 0,this.end=void 0,this._startValue=void 0,this._endValue=void 0,this._valueRange=0}parse(o,t){return Co(o)||(typeof o=="number"||o instanceof Number)&&!isFinite(+o)?null:+o}handleTickRangeOptions(){let{beginAtZero:o}=this.options,{minDefined:t,maxDefined:n}=this.getUserBounds(),{min:i,max:s}=this,d=f=>i=t?i:f,u=f=>s=n?s:f;if(o){let f=Rs(i),_=Rs(s);f<0&&_<0?u(0):f>0&&_>0&&d(0)}if(i===s){let f=s===0?1:Math.abs(s*.05);u(s+f),o||d(i-f)}this.min=i,this.max=s}getTickLimit(){let o=this.options.ticks,{maxTicksLimit:t,stepSize:n}=o,i;return n?(i=Math.ceil(this.max/n)-Math.floor(this.min/n)+1,i>1e3&&(console.warn(`scales.${this.id}.ticks.stepSize: ${n} would result generating up to ${i} ticks. Limiting to 1000.`),i=1e3)):(i=this.computeTickLimit(),t=t||11),t&&(i=Math.min(t,i)),i}computeTickLimit(){return Number.POSITIVE_INFINITY}buildTicks(){let o=this.options,t=o.ticks,n=this.getTickLimit();n=Math.max(2,n);let i={maxTicks:n,bounds:o.bounds,min:o.min,max:o.max,precision:t.precision,step:t.stepSize,count:t.count,maxDigits:this._maxDigits(),horizontal:this.isHorizontal(),minRotation:t.minRotation||0,includeBounds:t.includeBounds!==!1},s=this._range||this,d=B0e(i,s);return o.bounds==="ticks"&&D4(d,this,"value"),o.reverse?(d.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),d}configure(){let o=this.ticks,t=this.min,n=this.max;if(super.configure(),this.options.offset&&o.length){let i=(n-t)/Math.max(o.length-1,1)/2;t-=i,n+=i}this._startValue=t,this._endValue=n,this._valueRange=n-t}getLabelForValue(o){return $0(o,this.chart.options.locale,this.options.ticks.format)}},PM=class extends J0{static id="linear";static defaults={ticks:{callback:Df.formatters.numeric}};determineDataLimits(){let{min:o,max:t}=this.getMinMax(!0);this.min=ka(o)?o:0,this.max=ka(t)?t:1,this.handleTickRangeOptions()}computeTickLimit(){let o=this.isHorizontal(),t=o?this.width:this.height,n=ms(this.options.ticks.minRotation),i=(o?Math.sin(n):Math.cos(n))||.001,s=this._resolveTickFontOptions(0);return Math.ceil(t/Math.min(40,s.lineHeight/i))}getPixelForValue(o){return o===null?NaN:this.getPixelForDecimal((o-this._startValue)/this._valueRange)}getValueForPixel(o){return this._startValue+this.getDecimalForPixel(o)*this._valueRange}},qf=e=>Math.floor(Hc(e)),Td=(e,o)=>Math.pow(10,qf(e)+o);function GR(e){return e/Math.pow(10,qf(e))===1}function jR(e,o,t){let n=Math.pow(10,t),i=Math.floor(e/n);return Math.ceil(o/n)-i}function R0e(e,o){let t=o-e,n=qf(t);for(;jR(e,o,n)>10;)n++;for(;jR(e,o,n)<10;)n--;return Math.min(n,qf(e))}function N0e(e,{min:o,max:t}){o=Sl(e.min,o);let n=[],i=qf(o),s=R0e(o,t),d=s<0?Math.pow(10,Math.abs(s)):1,u=Math.pow(10,s),f=i>s?Math.pow(10,i):0,_=Math.round((o-f)*d)/d,C=Math.floor((o-f)/u/10)*u*10,x=Math.floor((_-C)/Math.pow(10,s)),y=Sl(e.min,Math.round((f+C+x*Math.pow(10,s))*d)/d);for(;y=10?x=x<15?15:20:x++,x>=20&&(s++,x=2,d=s>=0?1:d),y=Math.round((f+C+x*Math.pow(10,s))*d)/d;let P=Sl(e.max,y);return n.push({value:P,major:GR(P),significand:x}),n}var TM=class extends Md{static id="logarithmic";static defaults={ticks:{callback:Df.formatters.logarithmic,major:{enabled:!0}}};constructor(o){super(o),this.start=void 0,this.end=void 0,this._startValue=void 0,this._valueRange=0}parse(o,t){let n=J0.prototype.parse.apply(this,[o,t]);if(n===0){this._zero=!0;return}return ka(n)&&n>0?n:null}determineDataLimits(){let{min:o,max:t}=this.getMinMax(!0);this.min=ka(o)?Math.max(0,o):null,this.max=ka(t)?Math.max(0,t):null,this.options.beginAtZero&&(this._zero=!0),this._zero&&this.min!==this._suggestedMin&&!ka(this._userMin)&&(this.min=o===Td(this.min,0)?Td(this.min,-1):Td(this.min,0)),this.handleTickRangeOptions()}handleTickRangeOptions(){let{minDefined:o,maxDefined:t}=this.getUserBounds(),n=this.min,i=this.max,s=u=>n=o?n:u,d=u=>i=t?i:u;n===i&&(n<=0?(s(1),d(10)):(s(Td(n,-1)),d(Td(i,1)))),n<=0&&s(Td(i,-1)),i<=0&&d(Td(n,1)),this.min=n,this.max=i}buildTicks(){let o=this.options,t={min:this._userMin,max:this._userMax},n=N0e(t,this);return o.bounds==="ticks"&&D4(n,this,"value"),o.reverse?(n.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),n}getLabelForValue(o){return o===void 0?"0":$0(o,this.chart.options.locale,this.options.ticks.format)}configure(){let o=this.min;super.configure(),this._startValue=Hc(o),this._valueRange=Hc(this.max)-Hc(o)}getPixelForValue(o){return(o===void 0||o===0)&&(o=this.min),o===null||isNaN(o)?NaN:this.getPixelForDecimal(o===this.min?0:(Hc(o)-this._startValue)/this._valueRange)}getValueForPixel(o){let t=this.getDecimalForPixel(o);return Math.pow(10,this._startValue+t*this._valueRange)}};function MM(e){let o=e.ticks;if(o.display&&e.display){let t=zr(o.backdropPadding);return Kn(o.font&&o.font.size,ba.font.size)+t.height}return 0}function L0e(e,o,t){return t=ga(t)?t:[t],{w:RB(e,o.string,t),h:t.length*o.lineHeight}}function $R(e,o,t,n,i){return e===n||e===i?{start:o-t/2,end:o+t/2}:ei?{start:o-t,end:o}:{start:o,end:o+t}}function V0e(e){let o={l:e.left+e._padding.left,r:e.right-e._padding.right,t:e.top+e._padding.top,b:e.bottom-e._padding.bottom},t=Object.assign({},o),n=[],i=[],s=e._pointLabels.length,d=e.options.pointLabels,u=d.centerPointLabels?Bo/s:0;for(let f=0;fo.r&&(u=(n.end-o.r)/s,e.r=Math.max(e.r,o.r+u)),i.starto.b&&(f=(i.end-o.b)/d,e.b=Math.max(e.b,o.b+f))}function z0e(e,o,t){let n=e.drawingArea,{extra:i,additionalAngle:s,padding:d,size:u}=t,f=e.getPointPosition(o,n+i+d,s),_=Math.round(U_(Vr(f.angle+Ha))),C=U0e(f.y,u.h,_),x=j0e(_),y=$0e(f.x,u.w,x);return{visible:!0,x:f.x,y:C,textAlign:x,left:y,top:C,right:y+u.w,bottom:C+u.h}}function H0e(e,o){if(!o)return!0;let{left:t,top:n,right:i,bottom:s}=e;return!(pc({x:t,y:n},o)||pc({x:t,y:s},o)||pc({x:i,y:n},o)||pc({x:i,y:s},o))}function G0e(e,o,t){let n=[],i=e._pointLabels.length,s=e.options,{centerPointLabels:d,display:u}=s.pointLabels,f={extra:MM(s)/2,additionalAngle:d?Bo/i:0},_;for(let C=0;C270||t<90)&&(e-=o),e}function W0e(e,o,t){let{left:n,top:i,right:s,bottom:d}=t,{backdropColor:u}=o;if(!Co(u)){let f=Vp(o.borderRadius),_=zr(o.backdropPadding);e.fillStyle=u;let C=n-_.left,x=i-_.top,y=s-n+_.width,P=d-i+_.height;Object.values(f).some(S=>S!==0)?(e.beginPath(),U0(e,{x:C,y:x,w:y,h:P,radius:f}),e.fill()):e.fillRect(C,x,y,P)}}function Q0e(e,o){let{ctx:t,options:{pointLabels:n}}=e;for(let i=o-1;i>=0;i--){let s=e._pointLabelItems[i];if(!s.visible)continue;let d=n.setContext(e.getPointLabelContext(i));W0e(t,d,s);let u=sr(d.font),{x:f,y:_,textAlign:C}=s;Lp(t,e._pointLabels[i],f,_+u.lineHeight/2,u,{color:d.color,textAlign:C,textBaseline:"middle"})}}function _9(e,o,t,n){let{ctx:i}=e;if(t)i.arc(e.xCenter,e.yCenter,o,0,_a);else{let s=e.getPointPosition(0,o);i.moveTo(s.x,s.y);for(let d=1;d{let i=oa(this.options.pointLabels.callback,[t,n],this);return i||i===0?i:""}).filter((t,n)=>this.chart.getDataVisibility(n))}fit(){let o=this.options;o.display&&o.pointLabels.display?V0e(this):this.setCenterPoint(0,0,0,0)}setCenterPoint(o,t,n,i){this.xCenter+=Math.floor((o-t)/2),this.yCenter+=Math.floor((n-i)/2),this.drawingArea-=Math.min(this.drawingArea/2,Math.max(o,t,n,i))}getIndexAngle(o){let t=_a/(this._pointLabels.length||1),n=this.options.startAngle||0;return Vr(o*t+ms(n))}getDistanceFromCenterForValue(o){if(Co(o))return NaN;let t=this.drawingArea/(this.max-this.min);return this.options.reverse?(this.max-o)*t:(o-this.min)*t}getValueForDistanceFromCenter(o){if(Co(o))return NaN;let t=o/(this.drawingArea/(this.max-this.min));return this.options.reverse?this.max-t:this.min+t}getPointLabelContext(o){let t=this._pointLabels||[];if(o>=0&&o{if(x!==0||x===0&&this.min<0){f=this.getDistanceFromCenterForValue(C.value);let y=this.getContext(x),P=i.setContext(y),S=s.setContext(y);Y0e(this,P,f,d,S)}}),n.display){for(o.save(),u=d-1;u>=0;u--){let C=n.setContext(this.getPointLabelContext(u)),{color:x,lineWidth:y}=C;!y||!x||(o.lineWidth=y,o.strokeStyle=x,o.setLineDash(C.borderDash),o.lineDashOffset=C.borderDashOffset,f=this.getDistanceFromCenterForValue(t.reverse?this.min:this.max),_=this.getPointPosition(u,f),o.beginPath(),o.moveTo(this.xCenter,this.yCenter),o.lineTo(_.x,_.y),o.stroke())}o.restore()}}drawBorder(){}drawLabels(){let o=this.ctx,t=this.options,n=t.ticks;if(!n.display)return;let i=this.getIndexAngle(0),s,d;o.save(),o.translate(this.xCenter,this.yCenter),o.rotate(i),o.textAlign="center",o.textBaseline="middle",this.ticks.forEach((u,f)=>{if(f===0&&this.min>=0&&!t.reverse)return;let _=n.setContext(this.getContext(f)),C=sr(_.font);if(s=this.getDistanceFromCenterForValue(this.ticks[f].value),_.showLabelBackdrop){o.font=C.string,d=o.measureText(u.label).width,o.fillStyle=_.backdropColor;let x=zr(_.backdropPadding);o.fillRect(-d/2-x.left,-s-C.size/2-x.top,d+x.width,C.size+x.height)}Lp(o,u.label,0,-s,C,{color:_.color,strokeColor:_.textStrokeColor,strokeWidth:_.textStrokeWidth})}),o.restore()}drawTitle(){}},CC={millisecond:{common:!0,size:1,steps:1e3},second:{common:!0,size:1e3,steps:60},minute:{common:!0,size:6e4,steps:60},hour:{common:!0,size:36e5,steps:24},day:{common:!0,size:864e5,steps:30},week:{common:!1,size:6048e5,steps:4},month:{common:!0,size:2628e6,steps:12},quarter:{common:!1,size:7884e6,steps:4},year:{common:!0,size:3154e7}},Pl=Object.keys(CC);function UR(e,o){return e-o}function WR(e,o){if(Co(o))return null;let t=e._adapter,{parser:n,round:i,isoWeekday:s}=e._parseOpts,d=o;return typeof n=="function"&&(d=n(d)),ka(d)||(d=typeof n=="string"?t.parse(d,n):t.parse(d)),d===null?null:(i&&(d=i==="week"&&(Sd(s)||s===!0)?t.startOf(d,"isoWeek",s):t.startOf(d,i)),+d)}function QR(e,o,t,n){let i=Pl.length;for(let s=Pl.indexOf(e);s=Pl.indexOf(t);s--){let d=Pl[s];if(CC[d].common&&e._adapter.diff(i,n,d)>=o-1)return d}return Pl[t?Pl.indexOf(t):0]}function X0e(e){for(let o=Pl.indexOf(e)+1,t=Pl.length;o=o?t[n]:t[i];e[s]=!0}}function Z0e(e,o,t,n){let i=e._adapter,s=+i.startOf(o[0].value,n),d=o[o.length-1].value,u,f;for(u=s;u<=d;u=+i.add(u,1,n))f=t[u],f>=0&&(o[f].major=!0);return o}function JR(e,o,t){let n=[],i={},s=o.length,d,u;for(d=0;d{class e extends Md{static id="time";static defaults={bounds:"data",adapters:{},time:{parser:!1,unit:!1,round:!1,isoWeekday:!1,minUnit:"millisecond",displayFormats:{}},ticks:{source:"auto",callback:!1,major:{enabled:!1}}};constructor(t){super(t),this._cache={data:[],labels:[],all:[]},this._unit="day",this._majorUnit=void 0,this._offsets={},this._normalized=!1,this._parseOpts=void 0}init(t,n={}){let i=t.time||(t.time={}),s=this._adapter=new pme._date(t.adapters.date);s.init(n),z0(i.displayFormats,s.formats()),this._parseOpts={parser:i.parser,round:i.round,isoWeekday:i.isoWeekday},super.init(t),this._normalized=n.normalized}parse(t,n){return t===void 0?null:WR(this,t)}beforeLayout(){super.beforeLayout(),this._cache={data:[],labels:[],all:[]}}determineDataLimits(){let t=this.options,n=this._adapter,i=t.time.unit||"day",{min:s,max:d,minDefined:u,maxDefined:f}=this.getUserBounds();function _(C){!u&&!isNaN(C.min)&&(s=Math.min(s,C.min)),!f&&!isNaN(C.max)&&(d=Math.max(d,C.max))}(!u||!f)&&(_(this._getLabelBounds()),(t.bounds!=="ticks"||t.ticks.source!=="labels")&&_(this.getMinMax(!1))),s=ka(s)&&!isNaN(s)?s:+n.startOf(Date.now(),i),d=ka(d)&&!isNaN(d)?d:+n.endOf(Date.now(),i)+1,this.min=Math.min(s,d-1),this.max=Math.max(s+1,d)}_getLabelBounds(){let t=this.getLabelTimestamps(),n=Number.POSITIVE_INFINITY,i=Number.NEGATIVE_INFINITY;return t.length&&(n=t[0],i=t[t.length-1]),{min:n,max:i}}buildTicks(){let t=this.options,n=t.time,i=t.ticks,s=i.source==="labels"?this.getLabelTimestamps():this._generate();t.bounds==="ticks"&&s.length&&(this.min=this._userMin||s[0],this.max=this._userMax||s[s.length-1]);let d=this.min,u=this.max,f=IB(s,d,u);return this._unit=n.unit||(i.autoSkip?QR(n.minUnit,this.min,this.max,this._getLabelCapacity(d)):K0e(this,f.length,n.minUnit,this.min,this.max)),this._majorUnit=!i.major.enabled||this._unit==="year"?void 0:X0e(this._unit),this.initOffsets(s),t.reverse&&f.reverse(),JR(this,f,this._majorUnit)}afterAutoSkip(){this.options.offsetAfterAutoskip&&this.initOffsets(this.ticks.map(t=>+t.value))}initOffsets(t=[]){let n=0,i=0,s,d;this.options.offset&&t.length&&(s=this.getDecimalForValue(t[0]),t.length===1?n=1-s:n=(this.getDecimalForValue(t[1])-s)/2,d=this.getDecimalForValue(t[t.length-1]),t.length===1?i=d:i=(d-this.getDecimalForValue(t[t.length-2]))/2);let u=t.length<3?.5:.25;n=_r(n,0,u),i=_r(i,0,u),this._offsets={start:n,end:i,factor:1/(n+1+i)}}_generate(){let t=this._adapter,n=this.min,i=this.max,s=this.options,d=s.time,u=d.unit||QR(d.minUnit,n,i,this._getLabelCapacity(n)),f=Kn(s.ticks.stepSize,1),_=u==="week"?d.isoWeekday:!1,C=Sd(_)||_===!0,x={},y=n,P,S;if(C&&(y=+t.startOf(y,"isoWeek",_)),y=+t.startOf(y,C?"day":u),t.diff(i,n,u)>1e5*f)throw new Error(n+" and "+i+" are too far apart with stepSize of "+f+" "+u);let M=s.ticks.source==="data"&&this.getDataTimestamps();for(P=y,S=0;P+D)}getLabelForValue(t){let n=this._adapter,i=this.options.time;return i.tooltipFormat?n.format(t,i.tooltipFormat):n.format(t,i.displayFormats.datetime)}format(t,n){let s=this.options.time.displayFormats,d=this._unit,u=n||s[d];return this._adapter.format(t,u)}_tickFormatFunction(t,n,i,s){let d=this.options,u=d.ticks.callback;if(u)return oa(u,[t,n,i],this);let f=d.time.displayFormats,_=this._unit,C=this._majorUnit,x=_&&f[_],y=C&&f[C],P=i[n],S=C&&y&&P&&P.major;return this._adapter.format(t,s||(S?y:x))}generateTickLabels(t){let n,i,s;for(n=0,i=t.length;n0?f:1}getDataTimestamps(){let t=this._cache.data||[],n,i;if(t.length)return t;let s=this.getMatchingVisibleMetas();if(this._normalized&&s.length)return this._cache.data=s[0].controller.getAllParsedValues(this);for(n=0,i=s.length;n=e[n].pos&&o<=e[i].pos&&({lo:n,hi:i}=cc(e,"pos",o)),{pos:s,time:u}=e[n],{pos:d,time:f}=e[i]):(o>=e[n].time&&o<=e[i].time&&({lo:n,hi:i}=cc(e,"time",o)),{time:s,pos:u}=e[n],{time:d,pos:f}=e[i]);let _=d-s;return _?u+(f-u)*(o-s)/_:u}var IM=class extends EM{static id="timeseries";static defaults=EM.defaults;constructor(o){super(o),this._table=[],this._minPos=void 0,this._tableRange=void 0}initOffsets(){let o=this._getTimestampsForTable(),t=this._table=this.buildLookupTable(o);this._minPos=lC(t,this.min),this._tableRange=lC(t,this.max)-this._minPos,super.initOffsets(o)}buildLookupTable(o){let{min:t,max:n}=this,i=[],s=[],d,u,f,_,C;for(d=0,u=o.length;d=t&&_<=n&&i.push(_);if(i.length<2)return[{time:t,pos:0},{time:n,pos:1}];for(d=0,u=i.length;di-s)}_getTimestampsForTable(){let o=this._cache.all||[];if(o.length)return o;let t=this.getDataTimestamps(),n=this.getLabelTimestamps();return t.length&&n.length?o=this.normalize(t.concat(n)):o=t.length?t:n,o=this._cache.all=o,o}getDecimalForValue(o){return(lC(this._table,o)-this._minPos)/this._tableRange}getValueForPixel(o){let t=this._offsets,n=this.getDecimalForPixel(o)/t.factor-t.end;return lC(this._table,n*this._tableRange+this._minPos,!0)}},eue=Object.freeze({__proto__:null,CategoryScale:k0e,LinearScale:PM,LogarithmicScale:TM,RadialLinearScale:DM,TimeScale:EM,TimeSeriesScale:IM}),Gp=[cme,Bde,I0e,eue];var tue=e=>({display:e});function iue(e,o){if(e&1&&(l(0,"mat-option",6),c(1),r()),e&2){let t=o.$implicit;g("value",t.id),a(),v(" ",t.name," ")}}Tl.register(...Gp);var vC=(()=>{class e{constructor(){this.homeService=T(R0),this.route=T(Ie),this.dateUtils=T(Zt),this.officeId=new it,this.timescale=new it,this.hideOutput=!0,this.route.data.subscribe(t=>{this.officeData=t.offices})}ngOnInit(){this.getChartData(),this.initializeControls()}initializeControls(){this.officeId.patchValue(1),this.timescale.patchValue("Day")}getChartData(){fl(this.officeId.valueChanges,this.timescale.valueChanges).pipe(lF(1)).subscribe(()=>{let t=this.officeId.value,n=this.timescale.value;switch(n){case"Day":let i=this.homeService.getClientTrendsByDay(t),s=this.homeService.getLoanTrendsByDay(t);d0([i,s]).subscribe(C=>{let x=this.getLabels(n),y=this.getCounts(C[0],x,n,"client"),P=this.getCounts(C[1],x,n,"loan");this.setChart(x,y,P),this.hideOutput=!1});break;case"Week":let d=this.homeService.getClientTrendsByWeek(t),u=this.homeService.getLoanTrendsByWeek(t);d0([d,u]).subscribe(C=>{let x=this.getLabels(n),y=this.getCounts(C[0],x,n,"client"),P=this.getCounts(C[1],x,n,"loan");this.setChart(x,y,P),this.hideOutput=!1});break;case"Month":let f=this.homeService.getClientTrendsByMonth(t),_=this.homeService.getLoanTrendsByMonth(t);d0([f,_]).subscribe(C=>{let x=this.getLabels(n),y=this.getCounts(C[0],x,n,"client"),P=this.getCounts(C[1],x,n,"loan");this.setChart(x,y,P),this.hideOutput=!1});break}})}getLabels(t){let n=new Date,i=[];switch(t){case"Day":for(;i.length<12;){n.setDate(n.getDate()-1);let d=this.dateUtils.formatDate(n,"d/M");i.push(d)}break;case"Week":let s=new Date(n.getFullYear(),0,1);for(;i.length<12;){n.setDate(n.getDate()-7);let d=Math.ceil(((n.getTime()-s.getTime())/864e5+s.getDay()+1)/7);i.push(d)}break;case"Month":for(;i.length<12;){let d=this.dateUtils.formatDate(n,"MMMM");i.push(d),n.setMonth(n.getMonth()-1)}break}return i.reverse()}getCounts(t,n,i,s){let d=[];switch(i){case"Day":n.forEach(u=>{let f=t.find(_=>this.dateUtils.formatDate(_.days,"d/M")===u);d=this.updateCount(f,d,s)});break;case"Week":n.forEach(u=>{let f=t.find(_=>_.Weeks===u);d=this.updateCount(f,d,s)});break;case"Month":n.forEach(u=>{let f=t.find(_=>_.Months===u);d=this.updateCount(f,d,s)});break}return d}updateCount(t,n,i){if(t)switch(i){case"client":n.push(t.count);break;case"loan":n.push(t.lcount);break}else n.push(0);return n}setChart(t,n,i){this.chart?(this.chart.data.labels=t,this.chart.data.datasets[0].data=n,this.chart.data.datasets[1].data=i,this.chart.update()):this.chart=new Tl("client-trends-bar",{type:"line",data:{labels:t,datasets:[{label:"New Clients",data:n,backgroundColor:"dodgerblue",borderColor:"dodgerblue",borderWidth:2,fill:!1},{label:"Loans Disbursed",data:i,backgroundColor:"red",borderColor:"red",borderWidth:2,fill:!1}]},options:{responsive:!0,scales:{y:{min:0,title:{display:!0,text:"Values",color:"#1074B9"}}}}})}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275cmp=me({type:e,selectors:[["mifosx-client-trends-bar"]],decls:27,vars:20,consts:[[1,"card"],[1,"header"],[1,"flex-100"],["icon","chart-line"],["id","office",1,"flex-94"],[3,"formControl"],[3,"value"],[3,"ngStyle"],["id","client-trends-bar","width","800","height","465",1,"fallback"],["id","timescale","appearance","legacy",3,"formControl"],["value","Day"],["value","Week"],["value","Month"]],template:function(n,i){n&1&&(l(0,"mat-card",0)(1,"mat-card-header",1)(2,"h3",2),b(3,"fa-icon",3),c(4),p(5,"translate"),l(6,"div")(7,"mat-form-field",4)(8,"mat-label"),c(9),p(10,"translate"),r(),l(11,"mat-select",5),Se(12,iue,2,2,"mat-option",6,Pe),r()()()()(),l(14,"mat-card-content")(15,"div",7),b(16,"canvas",8),r(),l(17,"mat-button-toggle-group",9)(18,"mat-button-toggle",10),c(19),p(20,"translate"),r(),l(21,"mat-button-toggle",11),c(22),p(23,"translate"),r(),l(24,"mat-button-toggle",12),c(25),p(26,"translate"),r()()()()),n&2&&(a(4),v(" \xA0\xA0 ",m(5,8,"labels.inputs.Client Trends")," "),a(5),h(m(10,10,"labels.inputs.Office")),a(2),g("formControl",i.officeId),a(),we(i.officeData),a(3),g("ngStyle",Nt(18,tue,i.hideOutput?"none":"block")),a(2),g("formControl",i.timescale),a(2),h(m(20,12,"labels.buttons.Day")),a(3),h(m(23,14,"labels.buttons.Week")),a(3),h(m(26,16,"labels.buttons.Month")))},dependencies:[ue,ns,fe,Ue,_n,$e,Je,Fe,Be,gt,ft,sa,ke,Mp,Dp,he],styles:[".card[_ngcontent-%COMP%]{min-width:18.5rem;padding:0}.card[_ngcontent-%COMP%] .header[_ngcontent-%COMP%] :where(#office[_ngcontent-%COMP%]){margin-bottom:-1.2em}.card[_ngcontent-%COMP%] .header[_ngcontent-%COMP%] :where(#office[_ngcontent-%COMP%]) :where(mat-label[_ngcontent-%COMP%]){color:#000000de}.card[_ngcontent-%COMP%] :where(#timescale[_ngcontent-%COMP%]){margin:2% 50%;transform:translate(-50%)}.card[_ngcontent-%COMP%] .fallback[_ngcontent-%COMP%]{overflow-x:auto;max-width:100%;min-height:16.5rem}.dark-theme[_nghost-%COMP%] .card[_ngcontent-%COMP%] .header[_ngcontent-%COMP%] :where(#office[_ngcontent-%COMP%]) :where(mat-label[_ngcontent-%COMP%]), .dark-theme [_nghost-%COMP%] .card[_ngcontent-%COMP%] .header[_ngcontent-%COMP%] :where(#office[_ngcontent-%COMP%]) :where(mat-label[_ngcontent-%COMP%]){color:#fff}"]})}}return e})();var nue=e=>({display:e});function oue(e,o){if(e&1&&(l(0,"mat-option",6),c(1),r()),e&2){let t=o.$implicit;g("value",t.id),a(),v(" ",t.name," ")}}function aue(e,o){e&1&&(l(0,"div",9)(1,"p"),c(2),p(3,"translate"),r()()),e&2&&(a(2),h(m(3,1,"labels.text.No Data")))}Tl.register(...Gp);var xC=(()=>{class e{constructor(){this.homeService=T(R0),this.route=T(Ie),this.officeId=new it,this.hideOutput=!0,this.showFallback=!0,this.route.data.subscribe(t=>{this.officeData=t.offices})}ngOnInit(){this.getChartData(),this.officeId.patchValue(1)}getChartData(){this.officeId.valueChanges.subscribe(t=>{this.homeService.getDisbursedAmount(t).subscribe(n=>{let i=Object.entries(n[0]).map(s=>s[1]);i[0]===0&&i[1]===0?(this.showFallback=!0,this.hideOutput=!0):(this.setChart(i),this.showFallback=!1,this.hideOutput=!1)})})}setChart(t){this.chart?(this.chart.data.datasets[0].data=t,this.chart.update()):this.chart=new Tl("disbursement-pie",{type:"doughnut",data:{labels:["Pending","Disbursed"],datasets:[{backgroundColor:["dodgerblue","red"],data:t}]},options:{layout:{padding:{top:10,bottom:15}}}})}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275cmp=me({type:e,selectors:[["mifosx-amount-disbursed-pie"]],decls:18,vars:11,consts:[[1,"card"],[1,"header"],[1,"flex-100"],["icon","money-bill"],["id","office",1,"flex-94"],[3,"formControl"],[3,"value"],[3,"ngStyle"],["id","disbursement-pie","width","800","height","600"],[1,"fallback","align-center-center"]],template:function(n,i){n&1&&(l(0,"mat-card",0)(1,"mat-card-header",1)(2,"h3",2),b(3,"fa-icon",3),c(4),p(5,"translate"),l(6,"div")(7,"mat-form-field",4)(8,"mat-label"),c(9),p(10,"translate"),r(),l(11,"mat-select",5),Se(12,oue,2,2,"mat-option",6,Pe),r()()()()(),l(14,"mat-card-content")(15,"div",7),b(16,"canvas",8),r(),E(17,aue,4,3,"div",9),r()()),n&2&&(a(4),v(" \xA0\xA0 ",m(5,5,"labels.inputs.Amount Pending / Disbursed")," "),a(5),h(m(10,7,"labels.inputs.Office")),a(2),g("formControl",i.officeId),a(),we(i.officeData),a(3),g("ngStyle",Nt(9,nue,i.hideOutput?"none":"block")),a(2),I(i.showFallback?17:-1))},dependencies:[ue,ns,fe,Ue,_n,$e,Je,Fe,Be,gt,ft,sa,ke,he],styles:[".card[_ngcontent-%COMP%]{min-width:18.5rem;padding:0}.card[_ngcontent-%COMP%] .header[_ngcontent-%COMP%] :where(#office[_ngcontent-%COMP%]){margin-bottom:-1.2em}.card[_ngcontent-%COMP%] .header[_ngcontent-%COMP%] :where(#office[_ngcontent-%COMP%]) :where(mat-label[_ngcontent-%COMP%]){color:#000000de}.card[_ngcontent-%COMP%] .fallback[_ngcontent-%COMP%]{height:20rem}.dark-theme[_nghost-%COMP%] .card[_ngcontent-%COMP%] .header[_ngcontent-%COMP%] :where(#office[_ngcontent-%COMP%]) :where(mat-label[_ngcontent-%COMP%]), .dark-theme [_nghost-%COMP%] .card[_ngcontent-%COMP%] .header[_ngcontent-%COMP%] :where(#office[_ngcontent-%COMP%]) :where(mat-label[_ngcontent-%COMP%]){color:#fff}"]})}}return e})();var rue=e=>({display:e});function lue(e,o){if(e&1&&(l(0,"mat-option",6),c(1),r()),e&2){let t=o.$implicit;g("value",t.id),a(),v(" ",t.name," ")}}function sue(e,o){e&1&&(l(0,"div",9)(1,"p"),c(2),p(3,"translate"),r()()),e&2&&(a(2),h(m(3,1,"labels.text.No Data")))}Tl.register(...Gp);var bC=(()=>{class e{constructor(){this.homeService=T(R0),this.route=T(Ie),this.officeId=new it,this.hideOutput=!0,this.showFallback=!1,this.route.data.subscribe(t=>{this.officeData=t.offices})}ngOnInit(){this.getChartData(),this.officeId.patchValue(1)}getChartData(){this.officeId.valueChanges.subscribe(t=>{this.homeService.getCollectedAmount(t).subscribe(n=>{let i=Object.entries(n[0]).map(s=>s[1]);i[0]===0&&i[1]===0?(this.showFallback=!0,this.hideOutput=!0):(this.setChart(i),this.hideOutput=!1,this.showFallback=!1)})})}setChart(t){this.chart?(this.chart.data.datasets[0].data=t,this.chart.update()):this.chart=new Tl("collection-pie",{type:"doughnut",data:{labels:["Pending","Collected"],datasets:[{backgroundColor:["dodgerblue","red"],data:t}]},options:{layout:{padding:{top:10,bottom:15}}}})}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275cmp=me({type:e,selectors:[["mifosx-amount-collected-pie"]],decls:18,vars:11,consts:[[1,"card"],[1,"header"],[1,"flex-100"],["icon","donate"],["id","office",1,"flex-94"],[3,"formControl"],[3,"value"],[3,"ngStyle"],["id","collection-pie","width","800","height","600"],[1,"fallback","align-center-center"]],template:function(n,i){n&1&&(l(0,"mat-card",0)(1,"mat-card-header",1)(2,"h3",2),b(3,"fa-icon",3),c(4),p(5,"translate"),l(6,"div")(7,"mat-form-field",4)(8,"mat-label"),c(9),p(10,"translate"),r(),l(11,"mat-select",5),Se(12,lue,2,2,"mat-option",6,Pe),r()()()()(),l(14,"mat-card-content")(15,"div",7),b(16,"canvas",8),r(),E(17,sue,4,3,"div",9),r()()),n&2&&(a(4),v(" \xA0\xA0 ",m(5,5,"labels.inputs.Amount Collected")," "),a(5),h(m(10,7,"labels.inputs.Office")),a(2),g("formControl",i.officeId),a(),we(i.officeData),a(3),g("ngStyle",Nt(9,rue,i.hideOutput?"none":"block")),a(2),I(i.showFallback?17:-1))},dependencies:[ue,ns,fe,Ue,_n,$e,Je,Fe,Be,gt,ft,sa,ke,he],styles:[".card[_ngcontent-%COMP%]{min-width:18.5rem;padding:0}.card[_ngcontent-%COMP%] .header[_ngcontent-%COMP%] :where(#office[_ngcontent-%COMP%]){margin-bottom:-1.2em}.card[_ngcontent-%COMP%] .header[_ngcontent-%COMP%] :where(#office[_ngcontent-%COMP%]) :where(mat-label[_ngcontent-%COMP%]){color:#000000de}.card[_ngcontent-%COMP%] .fallback[_ngcontent-%COMP%]{height:20rem}.dark-theme[_nghost-%COMP%] .card[_ngcontent-%COMP%] .header[_ngcontent-%COMP%] :where(#office[_ngcontent-%COMP%]) :where(mat-label[_ngcontent-%COMP%]), .dark-theme [_nghost-%COMP%] .card[_ngcontent-%COMP%] .header[_ngcontent-%COMP%] :where(#office[_ngcontent-%COMP%]) :where(mat-label[_ngcontent-%COMP%]){color:#fff}"]})}}return e})();function cue(e,o){if(e&1&&(l(0,"mat-option",5)(1,"span"),c(2),r()()),e&2){let t=o.$implicit;g("routerLink",t.path),a(2),h(t.activity)}}var yC=(()=>{class e{constructor(){this.router=T(qe),this.searchText=new it,this.allActivities=A_,this.userActivity=JSON.parse(localStorage.getItem("mifosXLocation"))}ngOnInit(){this.recentActivities=this.getRecentActivities(),this.frequentActivities=this.getFrequentActivities(),this.setFilteredActivities()}getRecentActivities(){let t=this.userActivity.reverse(),n=[];return t.forEach(s=>{n.includes(s)||n.push(s)}),n.filter(s=>!["/","/login","/home","/dashboard"].includes(s)).slice(0,8)}getFrequentActivities(){let t={},n=this.userActivity?.length;for(;n;){let d=this.userActivity[--n];t[d]=(t[d]||0)+1}return Object.entries(t).sort((d,u)=>u[1]-d[1]).map(d=>d[0]).filter(d=>!["/","/login","/home","/dashboard"].includes(d)).slice(0,8)}navigatetoActivity(t){this.router.navigateByUrl(t)}setFilteredActivities(){this.filteredActivities=this.searchText.valueChanges.pipe(Mn(t=>typeof t=="string"?t:t.activity),Mn(t=>t?this.filterActivity(t):this.allActivities))}filterActivity(t){let n=t.toLowerCase();return this.allActivities.filter(i=>i.activity.toLowerCase().indexOf(n)===0)}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275cmp=me({type:e,selectors:[["mifosx-dashboard"]],decls:22,vars:7,consts:[["activitySearch","matAutocomplete"],[1,"container"],[1,"card","layout-column","gap-40px"],[1,"layout-row","search"],["matInput","",3,"matAutocomplete","formControl"],[3,"routerLink"],[1,"layout-row","top-card"],[1,"trends-bar"],[1,"layout-row","bottom-card"],[1,"amount-disbursed"],[1,"amount-collected"]],template:function(n,i){if(n&1&&(l(0,"div",1)(1,"mat-card",2)(2,"div",3)(3,"mat-card-content")(4,"mat-form-field")(5,"mat-label"),c(6),p(7,"translate"),r(),b(8,"input",4),r(),l(9,"mat-autocomplete",null,0),Se(11,cue,3,2,"mat-option",5,Pe),p(13,"async"),r()()(),l(14,"div",6)(15,"div",7),b(16,"mifosx-client-trends-bar"),r()(),l(17,"div",8)(18,"div",9),b(19,"mifosx-amount-disbursed-pie"),r(),l(20,"div",10),b(21,"mifosx-amount-collected-pie"),r()()()()),n&2){let s=xe(10);a(6),h(m(7,3,"labels.placeholders.Search Activity")),a(2),g("matAutocomplete",s)("formControl",i.searchText),a(3),we(m(13,5,i.filteredActivities))}},dependencies:[ue,fe,st,Ue,_n,Ae,$e,Je,Fe,Be,ze,ft,er,Za,vC,xC,bC,Xa,he],styles:[".card[_ngcontent-%COMP%]{box-sizing:border-box;padding:2%;display:flex;flex-direction:column;overflow-x:hidden}.card[_ngcontent-%COMP%] .search[_ngcontent-%COMP%]{width:100%;padding:12px}.card[_ngcontent-%COMP%] .search[_ngcontent-%COMP%] mat-card-content[_ngcontent-%COMP%]{width:100%}.card[_ngcontent-%COMP%] .search[_ngcontent-%COMP%] mat-form-field[_ngcontent-%COMP%]{width:100%}.card[_ngcontent-%COMP%] .top-card[_ngcontent-%COMP%]{flex:1 0 100%}.card[_ngcontent-%COMP%] .top-card[_ngcontent-%COMP%] .trends-bar[_ngcontent-%COMP%]{width:100%;flex:1 0 100%}.card[_ngcontent-%COMP%] .bottom-card[_ngcontent-%COMP%]{display:flex;flex-flow:row wrap;gap:2px}.card[_ngcontent-%COMP%] .bottom-card[_ngcontent-%COMP%] .amount-collected[_ngcontent-%COMP%], .card[_ngcontent-%COMP%] .bottom-card[_ngcontent-%COMP%] .amount-disbursed[_ngcontent-%COMP%]{flex:1 0 calc(40% - 10px);padding:0;margin:10px}@media screen and (width <= 768px){.top-card[_ngcontent-%COMP%], .bottom-card[_ngcontent-%COMP%]{flex-direction:column}.top-card[_ngcontent-%COMP%] .trends-bar[_ngcontent-%COMP%], .top-card[_ngcontent-%COMP%] .amount-collected[_ngcontent-%COMP%], .top-card[_ngcontent-%COMP%] .amount-disbursed[_ngcontent-%COMP%], .bottom-card[_ngcontent-%COMP%] .trends-bar[_ngcontent-%COMP%], .bottom-card[_ngcontent-%COMP%] .amount-collected[_ngcontent-%COMP%], .bottom-card[_ngcontent-%COMP%] .amount-disbursed[_ngcontent-%COMP%]{flex:1 0 100%;width:100%;margin:10px 0}}"]})}}return e})();var Hr=(()=>{class e{constructor(){this.accountingService=T(Ui)}resolve(){return this.accountingService.getOffices()}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275prov=Re({token:e,factory:e.\u0275fac})}}return e})();var pue=[_o.withShell([{path:"",redirectTo:"/home",pathMatch:"full"},{path:"home",component:k_,data:{title:"Home"}},{path:"dashboard",component:yC,data:{title:"Dashboard",breadcrumb:"Dashboard"},resolve:{offices:Hr}}])],C9=(()=>{class e{static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275mod=Gi({type:e})}static{this.\u0275inj=Hi({providers:[Hr],imports:[gn.forChild(pue),gn]})}}return e})();var v9=(()=>{class e{static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275mod=Gi({type:e})}static{this.\u0275inj=Hi({imports:[kg,oo,ha,C9,yp,k_,yC,bC,xC,vC,F_,x_]})}}return e})();function mue(e,o){e&1&&(l(0,"mat-error"),c(1),p(2,"translate"),l(3,"strong"),c(4),p(5,"translate"),r()()),e&2&&(a(),v(" ",m(2,2,"labels.inputs.Username")," "),a(3),h(m(5,4,"labels.commons.is required")))}function due(e,o){e&1&&(l(0,"span",3),b(1,"fa-icon",11),r())}function uue(e,o){e&1&&b(0,"fa-icon",13)}function fue(e,o){e&1&&b(0,"fa-icon",14)}function hue(e,o){if(e&1){let t=Y();l(0,"button",12),R("mousedown",function(){V(t);let i=w(2);return q(i.togglePasswordVisibility())})("mouseup",function(){V(t);let i=w(2);return q(i.togglePasswordVisibility())}),E(1,uue,1,0,"fa-icon",13),E(2,fue,1,0,"fa-icon",14),r()}if(e&2){let t=w(2);a(),I(t.passwordInputType==="password"?1:-1),a(),I(t.passwordInputType==="text"?2:-1)}}function gue(e,o){e&1&&(l(0,"mat-error"),c(1),p(2,"translate"),l(3,"strong"),c(4),p(5,"translate"),r()()),e&2&&(a(),v(" ",m(2,2,"labels.inputs.Password")," "),a(3),h(m(5,4,"labels.commons.pass is required")))}function _ue(e,o){e&1&&b(0,"mat-progress-bar",8)}function Cue(e,o){e&1&&b(0,"mat-spinner",10),e&2&&g("diameter",20)}function vue(e,o){if(e&1){let t=Y();l(0,"div")(1,"form",1),R("ngSubmit",function(){V(t);let i=w();return q(i.login())}),l(2,"mat-form-field",2)(3,"span",3),b(4,"fa-icon",4),r(),l(5,"mat-label"),c(6),p(7,"translate"),r(),b(8,"input",5),E(9,mue,6,6,"mat-error"),r(),l(10,"mat-form-field",2),E(11,due,2,0,"span",3),l(12,"mat-label"),c(13),p(14,"translate"),r(),b(15,"input",6),E(16,hue,3,2,"button",7),E(17,gue,6,6,"mat-error"),r(),E(18,_ue,1,0,"mat-progress-bar",8),l(19,"button",9),c(20),p(21,"translate"),E(22,Cue,1,1,"mat-spinner",10),r()()()}if(e&2){let t=w();a(),g("formGroup",t.loginForm),a(5),h(m(7,13,"labels.inputs.Username")),a(3),I(t.loginForm.controls.username.hasError("required")?9:-1),a(2),I(t.loginForm.controls.password.value?-1:11),a(2),h(m(14,15,"labels.inputs.Password")),a(2),g("type",Le(t.passwordInputType)),a(),I(t.loginForm.controls.password.value&&!t.loading?16:-1),a(),I(t.loginForm.controls.password.hasError("required")?17:-1),a(),I(t.loading?18:-1),a(),g("disabled",!t.loginForm.valid),a(),v(" ",m(21,17,"labels.buttons.Login")," "),a(2),I(t.loading?22:-1)}}function xue(e,o){e&1&&b(0,"mat-spinner",10),e&2&&g("diameter",20)}function bue(e,o){if(e&1){let t=Y();l(0,"div",15)(1,"button",16),R("click",function(){V(t);let i=w(2);return q(i.loginOIDC())}),c(2),p(3,"translate"),E(4,xue,1,1,"mat-spinner",10),r()()}if(e&2){let t=w(2);a(2),v(" ",m(3,2,"labels.buttons.Login")," "),a(2),I(t.loading?4:-1)}}function yue(e,o){if(e&1){let t=Y();l(0,"div")(1,"p"),c(2,"Welcome! You are logged in."),r(),l(3,"button",17),R("click",function(){V(t);let i=w(2);return q(i.logout())}),c(4,"Logout"),r(),l(5,"button",17),R("click",function(){V(t);let i=w(2);return q(i.loadProtectedData())}),c(6,"Load Protected Data"),r(),l(7,"pre"),c(8),p(9,"json"),r()()}if(e&2){let t=w(2);a(8),h(m(9,1,t.protectedData))}}function Sue(e,o){if(e&1&&(l(0,"div",0),E(1,bue,5,4,"div",15),E(2,yue,10,3,"div"),r()),e&2){let t=w();a(),I(t.isLoggedIn?-1:1),a(),I(t.isLoggedIn?2:-1)}}var SC=(()=>{class e{constructor(){this.formBuilder=T(WF),this.authenticationService=T(Wo),this.authService=T(Oa),this.passwordInputType="password",this.loading=!1,this.oidcServerEnabled=un.OIDC.oidcServerEnabled,this.enableRememberMe=un.enableRememberMe===!0}ngOnInit(){this.createLoginForm()}login(){this.loading=!0,this.loginForm.disable(),this.authenticationService.login(this.loginForm.value).pipe(Js(()=>{this.loginForm.reset(),this.loginForm.markAsPristine(),this.loginForm.enable(),this.loading=!1})).subscribe()}loginOIDC(){this.authService.login()}getUsers(){this.authService.getUsers()}logout(){this.authService.logout()}togglePasswordVisibility(){this.passwordInputType=this.passwordInputType==="password"?"text":"password"}createLoginForm(){this.loginForm=this.formBuilder.group({username:["",se.required],password:["",[se.required,se.minLength(8)]],remember:!1})}getErrorMessage(t){let n=this.loginForm.get(t);return n?.hasError("required")?"This field is required":n?.hasError("minlength")?`Minimum length is ${n.errors?.minlength.requiredLength}`:""}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275cmp=me({type:e,selectors:[["mifosx-login-form"]],decls:2,vars:2,consts:[[1,"container","container-margin"],["id","login-form",1,"layout-column",3,"ngSubmit","formGroup"],[1,"login-input","flex-align-center"],["matPrefix","",1,"m-r-10"],["icon","user-circle","size","lg"],["matInput","","type","text","autocomplete","off","formControlName","username"],["matInput","","formControlName","password",3,"type"],["type","button","matSuffix","","mat-icon-button",""],["mode","indeterminate"],["mat-raised-button","","color","primary",1,"login-button-first","flex-align-center",3,"disabled"],[3,"diameter"],["icon","lock","size","lg"],["type","button","matSuffix","","mat-icon-button","",3,"mousedown","mouseup"],["icon","eye"],["icon","eye-slash"],[1,"layout-column","align-center-center"],["mat-raised-button","","color","primary",1,"login-button-first","flex-align-center",3,"click"],[3,"click"]],template:function(n,i){n&1&&(E(0,vue,23,19,"div"),E(1,Sue,3,2,"div",0)),n&2&&(I(i.oidcServerEnabled?-1:0),a(),I(i.oidcServerEnabled?1:-1))},dependencies:[ue,fe,tt,st,Ue,Xe,Ze,et,Fe,Be,ut,ai,ze,ve,y0,ke,wi,os,P0,DF,he],styles:["#login-form[_ngcontent-%COMP%] .login-input[_ngcontent-%COMP%]{width:14rem;margin-bottom:.1rem}#login-form[_ngcontent-%COMP%] [matPrefix][_ngcontent-%COMP%] fa-icon[_ngcontent-%COMP%]{font-size:16px;position:absolute;top:50%;left:190px;transform:translateY(-50%)}#login-form[_ngcontent-%COMP%] .login-button-first[_ngcontent-%COMP%]{width:14rem;margin-top:.8rem;background-color:#1976d2;color:#fff;border-radius:8px;margin-bottom:.5rem}#login-form[_ngcontent-%COMP%] mat-spinner[_ngcontent-%COMP%]{float:right;margin:.5rem 0} .mat-mdc-form-field-infix{width:144px!important}.container-margin[_ngcontent-%COMP%]{margin-top:8rem;margin-bottom:8rem}"]})}}return e})();var jp=e=>{let o=e.get("password"),t=e.get("repeatPassword");return o&&t&&o.value!==t.value?{passwordsDoNotMatch:!0}:null};function wue(e,o){e&1&&b(0,"fa-icon",12)}function Pue(e,o){e&1&&b(0,"fa-icon",13)}function Tue(e,o){if(e&1){let t=Y();l(0,"button",11),R("mousedown",function(){V(t);let i=w();return q(i.passwordInputType="text")})("mouseup",function(){V(t);let i=w();return q(i.passwordInputType="password")}),E(1,wue,1,0,"fa-icon",12),E(2,Pue,1,0,"fa-icon",13),r()}if(e&2){let t=w();a(),I(t.passwordInputType==="password"?1:-1),a(),I(t.passwordInputType==="text"?2:-1)}}function Mue(e,o){e&1&&(l(0,"mat-error"),c(1),p(2,"translate"),l(3,"strong"),c(4),p(5,"translate"),r()()),e&2&&(a(),v(" ",m(2,2,"labels.inputs.Password")," "),a(3),h(m(5,4,"labels.commons.is required")))}function Due(e,o){e&1&&(l(0,"mat-error"),c(1),p(2,"translate"),l(3,"strong"),c(4),p(5,"translate"),r()()),e&2&&(a(),v(" ",m(2,2,"labels.inputs.Password")," "),a(3),h(m(5,4,"labels.commons.is required")))}function Eue(e,o){e&1&&(l(0,"mat-error"),c(1),p(2,"translate"),l(3,"strong"),c(4),p(5,"translate"),r()()),e&2&&(a(),v(" ",m(2,2,"labels.commons.Password should be at least")," "),a(3),h(m(5,4,"labels.commons.12 characters long")))}function Iue(e,o){e&1&&(l(0,"mat-error"),c(1),p(2,"translate"),l(3,"strong"),c(4),p(5,"translate"),r()()),e&2&&(a(),v(" ",m(2,2,"labels.commons.Password should not be more than")," "),a(3),h(m(5,4,"labels.commons.50 characters long")))}function Oue(e,o){e&1&&(l(0,"mat-error"),c(1),p(2,"translate"),l(3,"strong"),c(4),p(5,"translate"),r(),c(6),p(7,"translate"),l(8,"strong"),c(9),p(10,"translate"),r(),c(11," ,"),l(12,"strong"),c(13),p(14,"translate"),r()()),e&2&&(a(),v(" ",m(2,5,"labels.commons.Password should include a")," "),a(3),h(m(5,7,"labels.commons.numeral")),a(2),v(" ",m(7,9,"labels.commons.and at")," "),a(3),h(m(10,11,"labels.commons.least one uppercase")),a(4),h(m(14,13,"labels.commons.lowercase and special character")))}function Aue(e,o){e&1&&(l(0,"p",8),c(1),p(2,"translate"),l(3,"strong"),c(4),p(5,"translate"),r()()),e&2&&(a(),v(" ",m(2,2,"labels.text.Passwords")," "),a(3),h(m(5,4,"labels.text.do not match")))}function Fue(e,o){e&1&&b(0,"mat-spinner",10),e&2&&g("diameter",20)}var wC=(()=>{class e{constructor(){this.formBuilder=T(nt),this.authenticationService=T(Wo),this.passwordsUtility=T(w0),this.loading=!1}ngOnInit(){this.createResetPasswordForm(),this.passwordInputType="password"}resetPassword(){this.loading=!0,this.resetPasswordForm.disable(),this.authenticationService.resetPassword(this.resetPasswordForm.value).pipe(Js(()=>{this.resetPasswordForm.reset(),this.resetPasswordForm.markAsPristine(),this.resetPasswordForm.enable(),this.loading=!1})).subscribe()}createResetPasswordForm(){this.resetPasswordForm=this.formBuilder.group({password:["",this.passwordsUtility.getPasswordValidators()],repeatPassword:["",se.required]},{validator:jp})}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275cmp=me({type:e,selectors:[["mifosx-reset-password"]],decls:30,vars:24,consts:[["id","reset-password-form",1,"layout-column",3,"ngSubmit","formGroup"],[1,"reset-password-input","flex-fill","align-center"],["matPrefix",""],["icon","lock","size","lg",1,"m-r-10"],["matInput","","required","","formControlName","password",3,"type"],["mat-button","","matSuffix","","mat-icon-button",""],["icon","check-circle","size","lg",1,"m-r-10"],["type","password","matInput","","required","","formControlName","repeatPassword"],[1,"reset-password-error"],["mat-raised-button","","color","primary",1,"reset-password-button","align-center",3,"disabled"],[3,"diameter"],["mat-button","","matSuffix","","mat-icon-button","",3,"mousedown","mouseup"],["icon","eye"],["icon","eye-slash"]],template:function(n,i){n&1&&(l(0,"p"),c(1),p(2,"translate"),r(),b(3,"mat-divider"),l(4,"form",0),R("ngSubmit",function(){return i.resetPassword()}),l(5,"mat-form-field",1)(6,"span",2),b(7,"fa-icon",3),r(),l(8,"mat-label"),c(9),p(10,"translate"),r(),b(11,"input",4),E(12,Tue,3,2,"button",5),E(13,Mue,6,6,"mat-error"),r(),l(14,"mat-form-field",1)(15,"span",2),b(16,"fa-icon",6),r(),l(17,"mat-label"),c(18),p(19,"translate"),r(),b(20,"input",7),E(21,Due,6,6,"mat-error"),E(22,Eue,6,6,"mat-error"),E(23,Iue,6,6,"mat-error"),E(24,Oue,15,15,"mat-error"),r(),E(25,Aue,6,6,"p",8),l(26,"button",9),c(27),p(28,"translate"),E(29,Fue,1,1,"mat-spinner",10),r()()),n&2&&(a(),v("",m(2,16,"labels.text.Please update your password"),":"),a(3),g("formGroup",i.resetPasswordForm),a(5),h(m(10,18,"labels.inputs.Password")),a(2),g("type",Le(i.passwordInputType)),a(),I(i.resetPasswordForm.controls.password.value&&!i.loading?12:-1),a(),I(i.resetPasswordForm.controls.password.hasError("required")?13:-1),a(5),h(m(19,20,"labels.inputs.Confirm Password")),a(3),I(i.resetPasswordForm.controls.password.hasError("required")?21:-1),a(),I(i.resetPasswordForm.controls.password.hasError("minlength")?22:-1),a(),I(i.resetPasswordForm.controls.password.hasError("maxlength")?23:-1),a(),I(i.resetPasswordForm.controls.password.hasError("pattern")&&!(i.resetPasswordForm.controls.password.hasError("minlength")||i.resetPasswordForm.controls.password.hasError("maxlength"))?24:-1),a(),I(i.resetPasswordForm.errors!=null&&i.resetPasswordForm.errors.passwordsDoNotMatch&&!i.resetPasswordForm.controls.password.hasError("required")&&!i.resetPasswordForm.controls.repeatPassword.hasError("required")?25:-1),a(),g("disabled",!i.resetPasswordForm.valid),a(),v(" ",m(28,22,"labels.buttons.Reset Password")," "),a(2),I(i.loading?29:-1))},dependencies:[ue,fe,tt,st,Ue,Xe,dt,Ze,et,Fe,Be,ut,ai,ze,ve,Ri,y0,ke,wi,P0,he],styles:["#reset-password-form[_ngcontent-%COMP%] .reset-password-input[_ngcontent-%COMP%]{width:14rem;margin-top:.6rem}#reset-password-form[_ngcontent-%COMP%] .reset-password-button[_ngcontent-%COMP%]{width:14rem;margin-top:1rem}#reset-password-form[_ngcontent-%COMP%] .reset-password-error[_ngcontent-%COMP%]{color:#f44336;font-size:80%;margin:0}#reset-password-form[_ngcontent-%COMP%] mat-spinner[_ngcontent-%COMP%]{float:right;margin:.5rem 0}"]})}}return e})();function kue(e,o){e&1&&(l(0,"p"),c(1),p(2,"translate"),r()),e&2&&(a(),v("",m(2,1,"labels.text.Please select a delivery method"),":"))}function Bue(e,o){if(e&1&&(l(0,"mat-radio-button",3),c(1),p(2,"translate"),p(3,"translate"),r()),e&2){let t=o.$implicit;g("value",t),a(),PF(" ",m(2,5,"labels.inputs.Send")," ",t.name," ",m(3,7,"labels.inputs.to")," ",t.target," ")}}function Rue(e,o){e&1&&b(0,"mat-spinner",5),e&2&&g("diameter",20)}function Nue(e,o){if(e&1){let t=Y();l(0,"form",1),R("ngSubmit",function(){V(t);let i=w();return q(i.requestOTP())}),l(1,"mat-radio-group",2),Se(2,Bue,4,9,"mat-radio-button",3,Pe),r(),l(4,"button",4),c(5),p(6,"translate"),E(7,Rue,1,1,"mat-spinner",5),r()()}if(e&2){let t=w();g("formGroup",t.twoFactorAuthenticationDeliveryMethodForm),a(2),we(t.twoFactorAuthenticationDeliveryMethods),a(2),g("disabled",!t.twoFactorAuthenticationDeliveryMethodForm.valid),a(),v(" ",m(6,4,"labels.buttons.Request OTP")," "),a(2),I(t.loading?7:-1)}}function Lue(e,o){e&1&&(l(0,"p"),c(1),p(2,"translate"),r()),e&2&&(a(),v("",m(2,1,"labels.text.Please enter the OTP"),":"))}function Vue(e,o){e&1&&(l(0,"mat-error"),c(1),p(2,"translate"),p(3,"translate"),l(4,"strong"),c(5),p(6,"translate"),r()()),e&2&&(a(),le(" ",m(2,3,"labels.inputs.OTP")," ",m(3,5,"labels.commons.is")," "),a(4),h(m(6,7,"labels.commons.required")))}function que(e,o){e&1&&b(0,"mat-spinner",5),e&2&&g("diameter",20)}function zue(e,o){e&1&&b(0,"mat-spinner",5),e&2&&g("diameter",20)}function Hue(e,o){if(e&1){let t=Y();l(0,"form",1),R("ngSubmit",function(){V(t);let i=w();return q(i.validateOTP())}),l(1,"mat-form-field",6)(2,"span",7),b(3,"fa-icon",8),r(),l(4,"mat-label"),c(5),p(6,"translate"),r(),b(7,"input",9),l(8,"mat-hint",10)(9,"strong"),c(10),p(11,"translate"),r(),c(12),r(),l(13,"mat-hint",11)(14,"strong"),c(15),p(16,"translate"),r(),c(17),p(18,"translate"),r(),E(19,Vue,7,9,"mat-error"),r(),l(20,"button",12),c(21),p(22,"translate"),E(23,que,1,1,"mat-spinner",5),r(),l(24,"button",13),R("click",function(){V(t);let i=w();return q(i.resendOTP())}),c(25),p(26,"translate"),E(27,zue,1,1,"mat-spinner",5),r()()}if(e&2){let t=w();g("formGroup",t.twoFactorAuthenticationForm),a(5),h(m(6,14,"labels.inputs.OTP")),a(5),v("",m(11,16,"labels.inputs.Delivery Method"),":"),a(2),v(" ",t.selectedTwoFactorAuthenticationDeliveryMethod.name," "),a(3),v("",m(16,18,"labels.inputs.Validity"),":"),a(2),le(" ",t.tokenValidityTime/60," ",m(18,20,"labels.inputs.mins")," "),a(2),I(t.twoFactorAuthenticationForm.controls.otp.hasError("required")?19:-1),a(),g("disabled",!t.twoFactorAuthenticationForm.valid),a(),v(" ",m(22,22,"labels.buttons.Validate OTP")," "),a(2),I(t.loading?23:-1),a(),g("disabled",t.loading||t.resendOTPLoading),a(),v(" ",m(26,24,"labels.buttons.Resend OTP")," "),a(2),I(t.resendOTPLoading?27:-1)}}var PC=(()=>{class e{constructor(){this.formBuilder=T(nt),this.authenticationService=T(Wo),this.otpRequested=!1,this.loading=!1,this.resendOTPLoading=!1}ngOnInit(){this.createTwoFactorAuthenticationDeliveryMethodForm(),this.authenticationService.getDeliveryMethods().subscribe(t=>{this.twoFactorAuthenticationDeliveryMethods=t})}requestOTP(){this.loading=!0,this.twoFactorAuthenticationDeliveryMethodForm.disable(),this.selectedTwoFactorAuthenticationDeliveryMethod=this.twoFactorAuthenticationDeliveryMethodForm.value.twoFactorAuthenticationDeliveryMethod,this.authenticationService.requestOTP(this.selectedTwoFactorAuthenticationDeliveryMethod).pipe(Js(()=>{this.twoFactorAuthenticationDeliveryMethodForm.reset(),this.twoFactorAuthenticationDeliveryMethodForm.markAsPristine(),this.twoFactorAuthenticationDeliveryMethodForm.enable(),this.loading=!1})).subscribe(t=>{this.createTwoFactorAuthenticationForm(),this.otpRequested=!0,this.tokenValidityTime=t.tokenLiveTimeInSec})}validateOTP(){this.loading=!0,this.twoFactorAuthenticationForm.disable(),this.authenticationService.validateOTP(this.twoFactorAuthenticationForm.value.otp).pipe(Js(()=>{this.twoFactorAuthenticationForm.reset(),this.twoFactorAuthenticationForm.markAsPristine(),this.twoFactorAuthenticationForm.enable(),this.loading=!1})).subscribe()}resendOTP(){this.resendOTPLoading=!0,this.twoFactorAuthenticationForm.disable(),this.authenticationService.requestOTP(this.selectedTwoFactorAuthenticationDeliveryMethod).pipe(Js(()=>{this.twoFactorAuthenticationForm.reset(),this.twoFactorAuthenticationForm.markAsPristine(),this.twoFactorAuthenticationForm.enable(),this.resendOTPLoading=!1})).subscribe()}createTwoFactorAuthenticationDeliveryMethodForm(){this.twoFactorAuthenticationDeliveryMethodForm=this.formBuilder.group({twoFactorAuthenticationDeliveryMethod:["",se.required]})}createTwoFactorAuthenticationForm(){this.twoFactorAuthenticationForm=this.formBuilder.group({otp:["",se.required]})}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275cmp=me({type:e,selectors:[["mifosx-two-factor-authentication"]],decls:9,vars:7,consts:[[1,"layout-column","two-factor-auth-form",3,"formGroup"],[1,"layout-column","two-factor-auth-form",3,"ngSubmit","formGroup"],["formControlName","twoFactorAuthenticationDeliveryMethod",1,"layout-column","align-center","radio-group-spacing"],[3,"value"],["mat-raised-button","","color","primary",1,"flex-fill","align-center",3,"disabled"],[3,"diameter"],[1,"two-factor-auth-input","flex-fill","align-center"],["matPrefix",""],["icon","user-shield",1,"m-r-10"],["type","password","matInput","","autocomplete","off","required","","formControlName","otp"],["align","start"],["align","end"],["mat-raised-button","","color","primary",1,"two-factor-auth-button","align-center",3,"disabled"],["type","button","mat-button","",1,"two-factor-auth-button","align-center",3,"click","disabled"]],template:function(n,i){n&1&&(l(0,"p")(1,"strong"),c(2),p(3,"translate"),r()(),b(4,"mat-divider"),E(5,kue,3,3,"p"),E(6,Nue,8,6,"form",0),E(7,Lue,3,3,"p"),E(8,Hue,28,26,"form",0)),n&2&&(a(2),h(m(3,5,"labels.text.Two Factor Authentication")),a(3),I(i.otpRequested?-1:5),a(),I(i.otpRequested?-1:6),a(),I(i.otpRequested?7:-1),a(),I(i.otpRequested?8:-1))},dependencies:[ue,fe,tt,st,Ue,Xe,dt,Ze,et,Fe,Be,ut,za,ze,ve,Ri,tr,ir,P0,y0,ke,he],styles:[".two-factor-auth-form[_ngcontent-%COMP%] mat-radio-button[_ngcontent-%COMP%]{margin-bottom:.5rem}.two-factor-auth-form[_ngcontent-%COMP%] mat-radio-button[_ngcontent-%COMP%]:last-child{margin-bottom:1rem}.two-factor-auth-form[_ngcontent-%COMP%] .two-factor-auth-button[_ngcontent-%COMP%]{width:14rem;margin-top:.5rem}.two-factor-auth-form[_ngcontent-%COMP%] .two-factor-auth-input[_ngcontent-%COMP%]{width:14rem}.two-factor-auth-form[_ngcontent-%COMP%] mat-spinner[_ngcontent-%COMP%]{float:right;margin:.5rem 0}.radio-group-spacing[_ngcontent-%COMP%]{display:flex;gap:2rem;flex-direction:row}@media (width <= 768px){.radio-group-spacing[_ngcontent-%COMP%]{flex-direction:column}}"]})}}return e})();function Gue(e,o){e&1&&b(0,"mifosx-server-selector",14)}function jue(e,o){e&1&&b(0,"mifosx-tenant-selector")}function $ue(e,o){e&1&&b(0,"mifosx-login-form")}function Uue(e,o){e&1&&b(0,"mifosx-reset-password")}function Wue(e,o){e&1&&b(0,"mifosx-two-factor-authentication")}var TC=(()=>{class e{constructor(){this.alertService=T(wr),this.settingsService=T(At),this.router=T(qe),this.environment=un,this.resetPassword=!1,this.twoFactorAuthenticationRequired=!1}ngOnInit(){this.alert$=this.alertService.alertEvent.subscribe(t=>{let n=t.type;n==="Password Expired"?(this.twoFactorAuthenticationRequired=!1,this.resetPassword=!0):n==="Two Factor Authentication Required"?(this.resetPassword=!1,this.twoFactorAuthenticationRequired=!0):n==="Authentication Success"&&(this.resetPassword=!1,this.twoFactorAuthenticationRequired=!1,this.router.navigate(["/"],{replaceUrl:!0}))})}ngOnDestroy(){this.alert$.unsubscribe()}reloadSettings(){this.settingsService.setTenantIdentifier(""),this.settingsService.setTenantIdentifier(un.fineractPlatformTenantId||"default"),this.settingsService.setTenantIdentifiers(un.fineractPlatformTenantIds.split(",")),this.settingsService.setServers(un.baseApiUrls.split(",")),window.location.reload()}displayTenantSelector(){return un.displayTenantSelector!=="false"}allowServerSwitch(){return un.allowServerSwitch!=="false"}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275cmp=me({type:e,selectors:[["mifosx-login"]],decls:88,vars:73,consts:[["resourcesMenu","matMenu"],["communityMenu","matMenu"],["contributeMenu","matMenu"],[1,"layout-row"],[1,"flex-70","layout-column","align-center","align-items-center","hide-lt-sm","cover"],[1,"cover-content"],[1,"mat-display-1","cover-title"],[1,"mat-headline","cover-description"],["href","https://mifos.org/","target","_blank",1,"cover-link"],["href","https://mifos.org/resources/community/","target","_blank",1,"cover-link"],["href","https://mifos.org/take-action/volunteer/","target","_blank",1,"cover-link"],[1,"layout-column","flex-gt-sm-30","login-container"],[1,"layout-row-reverse"],[1,"p-t-10","p-r-10","width-40"],[1,"p-t-10"],[1,"layout-row","align-center-center","flex-auto"],["src","assets/images/mifos_lg-logo.png",1,"img-container",3,"alt"],[1,"layout-column","align-center-center"],[1,"information-list","align-items-center","custom-horizontal-list","hide-lt-lg"],["mat-button","",3,"matMenuTriggerFor"],[3,"styleClass"],["align","end",1,"layout-row","m-b-20","m-r-10"],[3,"click"],["icon","refresh"],["href","https://mifosforge.jira.com/wiki/spaces/docs/pages/52035622/User+Manual","target","_blank","mat-menu-item",""],["href","https://cwiki.apache.org/confluence/display/FINERACT/Apache+Fineract+1.0+Functional+Specifications","target","_blank","mat-menu-item",""],["href","https://cwiki.apache.org/confluence/display/FINERACT/Contributor%27s+Zone","target","_blank","mat-menu-item",""],["href","https://groups.google.com/forum/#!forum/mifosusers","target","_blank","mat-menu-item",""],["href","https://groups.google.com/forum/#!forum/mifosdeveloper","target","_blank","mat-menu-item",""],["href","https://mifos.org/resources/community/communications/#mifos-irc","target","_blank","mat-menu-item",""],["href","https://mifosforge.jira.com/wiki/spaces/MDZ/pages/92012624/Key+Design+Principles","target","_blank","mat-menu-item",""],["href","https://sourceforge.net/projects/mifos/","target","_blank","mat-menu-item",""],["href","https://mifos.org/donate/","target","_blank","mat-menu-item",""]],template:function(n,i){if(n&1){let s=Y();l(0,"div",3)(1,"div",4)(2,"div",5)(3,"h1",6),c(4),p(5,"translate"),r(),l(6,"p",7),c(7),p(8,"translate"),p(9,"translate"),l(10,"a",8),c(11),p(12,"translate"),r(),c(13),p(14,"translate"),l(15,"a",9),c(16),p(17,"translate"),r(),c(18),p(19,"translate"),l(20,"a",10),c(21),p(22,"translate"),r()()()(),l(23,"div",11)(24,"div",12),b(25,"mifosx-language-selector",13)(26,"mifosx-theme-toggle",14),E(27,Gue,1,0,"mifosx-server-selector",14),r(),l(28,"div",15),b(29,"img",16),p(30,"translate"),r(),l(31,"div",17),E(32,jue,1,0,"mifosx-tenant-selector"),E(33,$ue,1,0,"mifosx-login-form"),l(34,"div",3),E(35,Uue,1,0,"mifosx-reset-password"),E(36,Wue,1,0,"mifosx-two-factor-authentication"),r()(),l(37,"div",3)(38,"mat-list",18)(39,"mat-list-item")(40,"button",19),c(41),p(42,"translate"),r()(),l(43,"mat-list-item")(44,"button",19),c(45),p(46,"translate"),r()(),l(47,"mat-list-item")(48,"button",19),c(49),p(50,"translate"),r()()()(),b(51,"mifosx-footer",20),l(52,"div",21)(53,"a",22),R("click",function(){return V(s),q(i.reloadSettings())}),b(54,"fa-icon",23),r()()()(),l(55,"mat-menu",null,0)(57,"a",24),c(58),p(59,"translate"),r(),l(60,"a",25),c(61),p(62,"translate"),r(),l(63,"a",26),c(64),p(65,"translate"),r()(),l(66,"mat-menu",null,1)(68,"a",27),c(69),p(70,"translate"),r(),l(71,"a",28),c(72),p(73,"translate"),r(),l(74,"a",29),c(75),p(76,"translate"),r()(),l(77,"mat-menu",null,2)(79,"a",30),c(80),p(81,"translate"),r(),l(82,"a",31),c(83),p(84,"translate"),r(),l(85,"a",32),c(86),p(87,"translate"),r()()}if(n&2){let s=xe(56),d=xe(67),u=xe(78);a(4),h(m(5,31,"APP_NAME")),a(3),le(" ",m(8,33,"APP_NAME")," ",m(9,35,"labels.text.is designed by the")," "),a(4),h(m(12,37,"labels.text.Mifos Initiative")),a(2),v(". ",m(14,39,"labels.text.A")," "),a(3),h(m(17,41,"labels.text.global community")),a(2),v(" ",m(19,43,"labels.text.elimination of poverty")," "),a(3),v("",m(22,45,"labels.text.Get involved"),"!"),a(6),I(i.allowServerSwitch()?27:-1),a(2),g("alt",_0("",m(30,47,"APP_NAME")," Logo")),a(3),I(i.displayTenantSelector()?32:-1),a(),I(!i.resetPassword&&!i.twoFactorAuthenticationRequired?33:-1),a(2),I(i.resetPassword?35:-1),a(),I(i.twoFactorAuthenticationRequired?36:-1),a(4),g("matMenuTriggerFor",s),a(),v(" ",m(42,49,"labels.links.Resources")," "),a(3),g("matMenuTriggerFor",d),a(),v(" ",m(46,51,"labels.links.Community")," "),a(3),g("matMenuTriggerFor",u),a(),v(" ",m(50,53,"labels.links.Contribute")," "),a(2),g("styleClass","m-t-90"),a(7),h(m(59,55,"labels.links.User Manual")),a(3),h(m(62,57,"labels.links.Functional Specifications")),a(3),h(m(65,59,"labels.links.Developer Zone")),a(5),h(m(70,61,"labels.links.User Group")),a(3),h(m(73,63,"labels.links.Developer Group")),a(3),h(m(76,65,"labels.links.IRC")),a(5),h(m(81,67,"labels.links.Key Design Principles")),a(3),h(m(84,69,"labels.links.Working with Code")),a(3),h(m(87,71,"labels.links.Donate"))}},dependencies:[ue,fe,ve,Lg,Kg,lk,sk,SC,wC,PC,xl,Vo,nc,Ng,ke,ic,tc,he],styles:['mifosx-server-selector[_ngcontent-%COMP%]{padding-left:5px;width:40%}.mat-mdc-form-field-infix[_ngcontent-%COMP%]{width:144px!important}mifosx-tenant-selector[_ngcontent-%COMP%]{border-radius:8px;width:14rem;margin-bottom:.1rem}mifosx-tenant-selector[_ngcontent-%COMP%] .mat-mdc-form-field{width:14rem}mifosx-tenant-selector[_ngcontent-%COMP%] .mat-mdc-form-field-infix{width:144px!important;border-radius:8px}mifosx-tenant-selector[_ngcontent-%COMP%] [matPrefix] fa-icon{font-size:16px;position:absolute;left:190px;border-radius:8px;top:50%;transform:translateY(-50%)}.cover[_ngcontent-%COMP%]{background:url("./media/cover_image_resized.webp") no-repeat center center;background-size:cover;position:relative;z-index:0;max-width:70vw}.cover[_ngcontent-%COMP%]:after{content:"";opacity:.5;background:linear-gradient(#000,#000);width:100%;height:100%;top:0;left:0;display:block;z-index:1;position:absolute}.cover[_ngcontent-%COMP%] .width-40[_ngcontent-%COMP%]{width:40%}.cover[_ngcontent-%COMP%] .cover-content[_ngcontent-%COMP%]{display:block;max-width:80%;margin:100px;color:#fff;text-align:justify;z-index:2;font-size:1.2rem}.cover[_ngcontent-%COMP%] .cover-content[_ngcontent-%COMP%] .cover-title[_ngcontent-%COMP%]{border-bottom:2px solid #fff;margin:0 0 20px;padding-bottom:10px}.cover[_ngcontent-%COMP%] .cover-content[_ngcontent-%COMP%] .cover-description[_ngcontent-%COMP%] .cover-link[_ngcontent-%COMP%]{text-decoration:underline;color:#fff}.cover[_ngcontent-%COMP%] .cover-content[_ngcontent-%COMP%] .cover-description[_ngcontent-%COMP%] .cover-link[_ngcontent-%COMP%]:hover{color:#d3d3d3}.login-container[_ngcontent-%COMP%]{box-shadow:1px 1px 50px #000;height:100vh;width:100%;min-width:21.5rem;padding:.5rem 1rem}.login-container[_ngcontent-%COMP%] .img-container[_ngcontent-%COMP%]{max-width:18rem;margin-bottom:2rem;gap:20px}.layout-column[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center}.custom-horizontal-list[_ngcontent-%COMP%]{display:flex!important;flex-direction:row!important;justify-content:center;align-items:center;gap:1.5rem}.custom-horizontal-list[_ngcontent-%COMP%] mat-list-item[_ngcontent-%COMP%]{width:auto!important;min-width:0!important;padding:0!important}.custom-horizontal-list[_ngcontent-%COMP%] mat-list-item[_ngcontent-%COMP%] [mat-button][_ngcontent-%COMP%]{white-space:nowrap}.p-t-10[_ngcontent-%COMP%]{padding-top:0}.p-r-10[_ngcontent-%COMP%]{padding-right:10px} .login-container mifosx-footer .divider{margin:2px 0 0!important;width:14rem!important} .login-container #footer{align-items:unset!important}']})}}return e})();var Que=[{path:"login",component:TC,data:{title:"Login"}}],x9=(()=>{class e{static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275mod=Gi({type:e})}static{this.\u0275inj=Hi({imports:[gn.forChild(Que),gn]})}}return e})();var b9=(()=>{class e{static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275mod=Gi({type:e})}static{this.\u0275inj=Hi({imports:[oo,x9,yp,TC,SC,wC,PC]})}}return e})();function Yue(e,o){if(e&1&&(l(0,"mat-option",3),c(1),r()),e&2){let t=o.$implicit;g("value",t),a(),v(" ",t.name," ")}}function Jue(e,o){if(e&1&&(l(0,"mat-option",3),c(1),r()),e&2){let t=o.$implicit;g("value",t),a(),v(" ",t," ")}}function Kue(e,o){if(e&1&&(l(0,"mat-option",3),c(1),r()),e&2){let t=o.$implicit;g("value",t),a(),v(" ",t," ")}}function Xue(e,o){if(e&1&&(l(0,"mat-option",3),c(1),r()),e&2){let t=o.$implicit;g("value",t),a(),v(" ",t," ")}}var MC=(()=>{class e{constructor(){this.settingsService=T(At),this.languages=[{name:"English",code:"en"}],this.dateFormats=["dd MMMM yyyy","dd/MMMM/yyyy","dd-MMMM-yyyy","dd-MM-yy","MMMM-dd-yyyy","MMMM dd yyyy","MMMM/dd/yyyy","MM-dd-yy","yyyy-MM-dd"],this.decimals=["0","1","2","3","4","5","6","7","8"],this.language=new it(""),this.dateFormat=new it(""),this.decimalsToDisplay=new it("")}ngOnInit(){this.language.patchValue(this.settingsService.language),this.dateFormat.patchValue(this.settingsService.dateFormat),this.decimalsToDisplay.patchValue(this.settingsService.decimals),this.buildDependencies()}buildDependencies(){this.language.valueChanges.subscribe(t=>{this.settingsService.setLanguage(t)}),this.dateFormat.valueChanges.subscribe(t=>{this.settingsService.setDateFormat(t)}),this.decimalsToDisplay.valueChanges.subscribe(t=>{this.settingsService.setDecimalToDisplay(t)})}compareOptions(t,n){return t&&n&&t.code===n.code}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275cmp=me({type:e,selectors:[["mifosx-settings"]],decls:89,vars:52,consts:[[1,"container"],[1,"layout-column"],[3,"formControl","compareWith"],[3,"value"],[3,"formControl"],[1,"header"],["type","url","matInput",""],["type","email","matInput",""],["type","tel","matInput",""]],template:function(n,i){n&1&&(l(0,"div",0)(1,"mat-accordion")(2,"mat-expansion-panel")(3,"mat-expansion-panel-header")(4,"mat-panel-title"),c(5),p(6,"translate"),r()(),l(7,"div",1)(8,"mat-form-field")(9,"mat-label"),c(10),p(11,"translate"),r(),l(12,"mat-select",2),Se(13,Yue,2,2,"mat-option",3,Pe),r()(),l(15,"mat-form-field")(16,"mat-label"),c(17),p(18,"translate"),r(),l(19,"mat-select",4),Se(20,Jue,2,2,"mat-option",3,Pe),r()(),l(22,"mat-form-field")(23,"mat-label"),c(24),p(25,"translate"),r(),l(26,"mat-select",4),Se(27,Kue,2,2,"mat-option",3,Pe),r()()()(),l(29,"mat-expansion-panel")(30,"mat-expansion-panel-header")(31,"mat-panel-title"),c(32),p(33,"translate"),r()(),l(34,"div",1)(35,"span",5),c(36),p(37,"translate"),r(),b(38,"mifosx-file-upload"),l(39,"span",5),c(40),p(41,"translate"),r(),b(42,"mifosx-file-upload"),l(43,"span",5),c(44),p(45,"translate"),r(),b(46,"mifosx-file-upload"),l(47,"span",5),c(48),p(49,"translate"),r(),b(50,"mifosx-file-upload"),r()(),l(51,"mat-expansion-panel")(52,"mat-expansion-panel-header")(53,"mat-panel-title"),c(54),p(55,"translate"),r()(),l(56,"div",1)(57,"span",5),c(58),p(59,"translate"),r(),b(60,"mifosx-theme-picker"),l(61,"mat-form-field")(62,"mat-label"),c(63),p(64,"translate"),r(),l(65,"mat-select"),Se(66,Xue,2,2,"mat-option",3,Pe),r()()()(),l(68,"mat-expansion-panel")(69,"mat-expansion-panel-header")(70,"mat-panel-title"),c(71),p(72,"translate"),r()(),l(73,"div",1)(74,"mat-form-field")(75,"mat-label"),c(76),p(77,"translate"),r(),b(78,"input",6),r(),l(79,"mat-form-field")(80,"mat-label"),c(81),p(82,"translate"),r(),b(83,"input",7),r(),l(84,"mat-form-field")(85,"mat-label"),c(86),p(87,"translate"),r(),b(88,"input",8),r()()()()()),n&2&&(a(5),v(" ",m(6,20,"labels.inputs.Main Configuration")," "),a(5),h(m(11,22,"labels.inputs.Default Language")),a(2),g("formControl",i.language)("compareWith",i.compareOptions),a(),we(i.languages),a(4),h(m(18,24,"labels.inputs.Default Date Format")),a(2),g("formControl",i.dateFormat),a(),we(i.dateFormats),a(4),h(m(25,26,"labels.inputs.Decimals to Display")),a(2),g("formControl",i.decimalsToDisplay),a(),we(i.decimals),a(5),v(" ",m(33,28,"labels.inputs.Images")," "),a(4),h(m(37,30,"labels.inputs.Favicon")),a(4),h(m(41,32,"labels.inputs.Cover Image")),a(4),h(m(45,34,"labels.inputs.Logo")),a(4),h(m(49,36,"labels.inputs.Logo with Organization Name")),a(6),v(" ",m(55,38,"labels.inputs.Theme and Font")," "),a(4),h(m(59,40,"labels.inputs.Theme")),a(5),h(m(64,42,"labels.inputs.Default Font")),a(3),we(i.fonts),a(5),v(" ",m(72,44,"labels.inputs.Contact Information")," "),a(5),h(m(77,46,"labels.inputs.Website")),a(5),h(m(82,48,"labels.inputs.Email")),a(5),h(m(87,50,"labels.inputs.Contact No")))},dependencies:[ue,fe,Ue,_n,Fe,Be,ze,gt,ft,Er,Tr,Mr,Dr,wp,ek,he],styles:[".header[_ngcontent-%COMP%]{font-weight:500}"]})}}return e})();var Zue=[_o.withShell([{path:"settings",component:MC,data:{title:"Settings",breadcrumb:"Settings"}}])],y9=(()=>{class e{static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275mod=Gi({type:e})}static{this.\u0275inj=Hi({imports:[gn.forChild(Zue),gn]})}}return e})();var S9=(()=>{class e{static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275mod=Gi({type:e})}static{this.\u0275inj=Hi({imports:[oo,y9,MC]})}}return e})();var DC=(()=>{class e{constructor(){this.http=T(ko)}getOffices(){return this.http.get("/offices")}getEmployees(t){let n=new rn().set("officeId",t.toString());return this.http.get("/staff",{params:n})}getCentersFromStaffId(t){let n=new rn().set("R_staffId",t.toString()).set("genericResultSet","false");return this.http.get("/runreports/GroupNamesByStaff",{params:n})}getCenter(t){let n=new rn().set("associations","groupMembers");return this.http.get(`/centers/${t}`,{params:n})}getCenterAccounts(t){return this.http.get(`/centers/${t}/accounts`)}getCenterSummary(t){let n=new rn().set("R_groupId",t.toString()).set("genericResultSet","false");return this.http.get("/runreports/GroupSummaryCounts",{params:n})}getGroup(t){let n=new rn().set("associations","all");return this.http.get(`/groups/${t}`,{params:n})}getGroupAccounts(t){return this.http.get(`/groups/${t}/accounts`)}getClient(t){return this.http.get(`/clients/${t}`)}getClientAccounts(t){return this.http.get(`/clients/${t}/accounts`)}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275prov=Re({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();function efe(e,o){e&1&&(l(0,"div",4),c(1),p(2,"translate"),r()),e&2&&(a(),v(" ",m(2,1,"labels.inputs.External Id")," "))}function tfe(e,o){if(e&1&&(l(0,"div",5),b(1,"mifosx-external-identifier",6),r()),e&2){let t=w();a(),g("externalId",Le(t.officeData.externalId))}}var Hf=(()=>{class e{constructor(){}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275cmp=me({type:e,selectors:[["mifosx-office-navigation"]],inputs:{officeData:"officeData",employeeData:"employeeData"},decls:21,vars:13,consts:[[1,"layout-row","align-items-center","gap-10px"],["icon","building","size","3x"],[1,"flex-fill"],[1,"layout-row-wrap"],[1,"flex-50","mat-body-strong"],[1,"flex-50"],[3,"externalId"]],template:function(n,i){n&1&&(l(0,"mat-card-header",0),b(1,"fa-icon",1),l(2,"mat-card-title-group",2)(3,"mat-card-title")(4,"h2"),c(5),r()()()(),l(6,"mat-card-content")(7,"div",3),E(8,efe,3,3,"div",4),E(9,tfe,2,2,"div",5),l(10,"div",4),c(11),p(12,"translate"),r(),l(13,"div",5),c(14),p(15,"dateFormat"),r(),l(16,"div",4),c(17),p(18,"translate"),r(),l(19,"div",5),c(20),r()()()),n&2&&(a(5),h(i.officeData.name),a(3),I(i.officeData.externalId?8:-1),a(),I(i.officeData.externalId?9:-1),a(2),v(" ",m(12,7,"labels.inputs.Opened On")," "),a(3),v(" ",m(15,9,i.officeData.openingDate)," "),a(3),v(" ",m(18,11,"labels.inputs.Number of Staff")," "),a(3),v(" ",i.employeeData?i.employeeData.length:""," "))},dependencies:[ue,fe,Je,sa,ke,Qr,Qo,Ea,Pi,he],styles:["mat-card-header[_ngcontent-%COMP%]{padding:1.5rem 1.5rem 1rem}mat-card-header[_ngcontent-%COMP%] h2[_ngcontent-%COMP%]{font-weight:500;font-size:1.5rem;margin:0;line-height:1.4}@media (width <= 480px){mat-card-header[_ngcontent-%COMP%]{padding:1rem}mat-card-header[_ngcontent-%COMP%] h2[_ngcontent-%COMP%]{font-size:1.25rem}}mat-card-content[_ngcontent-%COMP%]{padding:1.5rem}mat-card-content[_ngcontent-%COMP%] .layout-row-wrap[_ngcontent-%COMP%]{display:grid;grid-template-columns:50% 50%}@media (width <= 768px){mat-card-content[_ngcontent-%COMP%] .layout-row-wrap[_ngcontent-%COMP%]{grid-template-columns:100%}}mat-card-content[_ngcontent-%COMP%] .flex-50[_ngcontent-%COMP%]{padding:.625rem 0;display:flex;align-items:center;font-size:.875rem;word-wrap:break-word;line-height:1.6}mat-card-content[_ngcontent-%COMP%] .flex-50.mat-body-strong[_ngcontent-%COMP%]{font-weight:600}mat-card-content[_ngcontent-%COMP%] .flex-50[_ngcontent-%COMP%]:not(:last-child,:nth-last-child(2)){border-bottom:1px solid #ddd}@media (width <= 480px){mat-card-content[_ngcontent-%COMP%]{padding:1rem}}"]})}}return e})();function ife(e,o){e&1&&(l(0,"div",6),c(1),p(2,"translate"),r()),e&2&&(a(),v(" ",m(2,1,"labels.inputs.Mobile Number")," "))}function nfe(e,o){if(e&1&&(l(0,"div",7),c(1),r()),e&2){let t=w();a(),v(" ",t.employeeData.mobileNo," ")}}var Gf=(()=>{class e{constructor(){}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275cmp=me({type:e,selectors:[["mifosx-staff-navigation"]],inputs:{employeeData:"employeeData",centerData:"centerData"},decls:34,vars:26,consts:[[1,"layout-row","gap-5percent","header"],["icon","user","size","3x",1,"main-icon"],[1,"mat-typography"],[3,"className"],["matTooltipPosition","right","icon","circle","size","lg",3,"matTooltip"],[1,"layout-row-wrap"],[1,"flex-50","mat-body-strong"],[1,"flex-50"]],template:function(n,i){n&1&&(l(0,"mat-card-header",0),b(1,"fa-icon",1),l(2,"mat-card-title-group")(3,"div",2)(4,"mat-card-title")(5,"h2"),c(6),l(7,"span",3),b(8,"fa-icon",4),r()()(),l(9,"mat-card-subtitle")(10,"p"),c(11),p(12,"translate"),r()()()()(),l(13,"mat-card-content")(14,"div",5)(15,"div",6),c(16),p(17,"translate"),r(),l(18,"div",7),c(19),p(20,"dateFormat"),r(),l(21,"div",6),c(22),p(23,"translate"),r(),l(24,"div",7),c(25),p(26,"yesNo"),r(),E(27,ife,3,3,"div",6),E(28,nfe,2,1,"div",7),l(29,"div",6),c(30),p(31,"translate"),r(),l(32,"div",7),c(33),r()()()),n&2&&(a(6),v(" ",i.employeeData.displayName," "),a(),g("className",i.employeeData.isActive===!0?"true":"false"),a(),g("matTooltip",Le(i.employeeData.isActive===!0?"Active":"Inactive")),a(3),le("",m(12,14,"labels.inputs.Associated Office"),": ",i.employeeData.officeName),a(5),v(" ",m(17,16,"labels.inputs.Joined On")," "),a(3),v(" ",m(20,18,i.employeeData.joiningDate)," "),a(3),v(" ",m(23,20,"labels.inputs.Loan Officer")," "),a(3),v(" ",m(26,22,i.employeeData.isLoanOfficer)," "),a(2),I(i.employeeData.mobileNo?27:-1),a(),I(i.employeeData.mobileNo?28:-1),a(2),v(" ",m(31,24,"labels.inputs.Number of Centers")," "),a(3),v(" ",i.centerData?i.centerData.length:""," "))},dependencies:[ue,fe,Je,sa,ke,Qr,Qo,si,vl,Pi,he,po],styles:[".main-icon[_ngcontent-%COMP%]{margin:7px 0 0}.true[_ngcontent-%COMP%]{color:#32cd32}.false[_ngcontent-%COMP%]{color:#f44366}h2[_ngcontent-%COMP%]{font-weight:500}.content[_ngcontent-%COMP%] div[_ngcontent-%COMP%]{margin:1rem 0;word-wrap:break-word}"]})}}return e})();var ofe=()=>[10,25];function afe(e,o){e&1&&(l(0,"th",15),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.Account Number")))}function rfe(e,o){if(e&1&&(l(0,"td",16),c(1),r()),e&2){let t=o.$implicit;a(),h(t.accountNo)}}function lfe(e,o){e&1&&(l(0,"th",15),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.Loan Account")))}function sfe(e,o){if(e&1&&(l(0,"td",16),c(1),r()),e&2){let t=o.$implicit;a(),h(t.productName)}}function cfe(e,o){e&1&&(l(0,"th",17),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.Type")))}function pfe(e,o){if(e&1&&(l(0,"td",16),b(1,"fa-icon",18),r()),e&2){let t=o.$implicit;a(),g("matTooltip",Le(t.loanType.value))("icon",t.loanType.code==="accountType.individual"?"user":"users")}}function mfe(e,o){e&1&&(l(0,"th",17),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.Status")))}function dfe(e,o){if(e&1&&(l(0,"td",16)(1,"span",19),p(2,"statusLookup"),b(3,"fa-icon",20),r()()),e&2){let t=o.$implicit;a(),g("className",t.inArrears?"status-active-overdue":m(2,3,t.status.code)),a(2),g("matTooltip",Le(t.status.value))}}function ufe(e,o){e&1&&b(0,"tr",21)}function ffe(e,o){e&1&&b(0,"tr",22)}var Ls=(()=>{class e{constructor(){this.accountsFilterPipe=T(as),this.displayedColumns=["accountNo","productName","Type","Status"],this.showClosed=!1}set loanAccountData(t){this.accountData=t;let n=this.accountsFilterPipe.transform(t,"loan",this.showClosed?"closed":"open","isLoan");this.dataSource=new Wt(n),this.dataSource.paginator=this.paginator,this.dataSource.sort=this.sort}applyFilter(t){this.dataSource.filter=t.trim().toLowerCase()}toggleClosed(){this.showClosed=!this.showClosed;let t=this.accountsFilterPipe.transform(this.accountData,"loan",this.showClosed?"closed":"open","isLoan");this.dataSource=new Wt(t),this.dataSource.paginator=this.paginator,this.dataSource.sort=this.sort}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275cmp=me({type:e,selectors:[["mifosx-loan-account-table"]],viewQuery:function(n,i){if(n&1&&(Ee(kt,7),Ee(It,7)),n&2){let s;Te(s=Me())&&(i.paginator=s.first),Te(s=Me())&&(i.sort=s.first)}},inputs:{loanAccountData:"loanAccountData"},decls:24,vars:9,consts:[[1,"layout-row","align-between","align-items-center"],[1,"flex-50"],["matInput","",3,"keyup"],["mat-raised-button","","color","primary",3,"click"],["mat-table","","matSort","",3,"dataSource"],["matColumnDef","accountNo"],["mat-header-cell","","mat-sort-header","",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","productName"],["matColumnDef","Type"],["mat-header-cell","",4,"matHeaderCellDef"],["matColumnDef","Status"],["mat-header-row","",4,"matHeaderRowDef"],["mat-row","",4,"matRowDef","matRowDefColumns"],["showFirstLastButtons","",3,"pageSizeOptions"],["mat-header-cell","","mat-sort-header",""],["mat-cell",""],["mat-header-cell",""],["matTooltipPosition","right","size","lg",3,"matTooltip","icon"],[3,"className"],["matTooltipPosition","right","icon","circle","size","md",3,"matTooltip"],["mat-header-row",""],["mat-row",""]],template:function(n,i){n&1&&(l(0,"div",0)(1,"mat-form-field",1)(2,"mat-label"),c(3),p(4,"translate"),r(),l(5,"input",2),R("keyup",function(d){return i.applyFilter(d.target.value)}),r()(),l(6,"button",3),R("click",function(){return i.toggleClosed()}),c(7),r()(),l(8,"table",4),X(9,5),F(10,afe,3,3,"th",6)(11,rfe,2,1,"td",7),Z(),X(12,8),F(13,lfe,3,3,"th",6)(14,sfe,2,1,"td",7),Z(),X(15,9),F(16,cfe,3,3,"th",10)(17,pfe,2,3,"td",7),Z(),X(18,11),F(19,mfe,3,3,"th",10)(20,dfe,4,5,"td",7),Z(),F(21,ufe,1,0,"tr",12)(22,ffe,1,0,"tr",13),r(),b(23,"mat-paginator",14)),n&2&&(a(3),h(m(4,6,"labels.inputs.Filter")),a(4),v(" ",i.showClosed?"View Active":"View Closed"," "),a(),g("dataSource",i.dataSource),a(13),g("matHeaderRowDef",i.displayedColumns),a(),g("matRowDefColumns",i.displayedColumns),a(),g("pageSizeOptions",oe(8,ofe)))},dependencies:[ue,fe,Fe,Be,ze,ve,_t,It,xt,vt,bt,ri,Ct,yt,ke,si,St,Pt,wt,Tt,kt,he,go],encapsulation:2})}}return e})();var hfe=()=>[10,25];function gfe(e,o){e&1&&(l(0,"th",15),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.Account Number")))}function _fe(e,o){if(e&1&&(l(0,"td",16),c(1),r()),e&2){let t=o.$implicit;a(),h(t.accountNo)}}function Cfe(e,o){e&1&&(l(0,"th",15),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.Savings Account")))}function vfe(e,o){if(e&1&&(l(0,"td",16),c(1),r()),e&2){let t=o.$implicit;a(),h(t.productName)}}function xfe(e,o){e&1&&(l(0,"th",15),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.Balance")))}function bfe(e,o){if(e&1&&(l(0,"td",16),c(1),r()),e&2){let t=o.$implicit;a(),h(t.accountBalance)}}function yfe(e,o){e&1&&(l(0,"th",17),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.Status")))}function Sfe(e,o){if(e&1&&(l(0,"td",16)(1,"span",18),p(2,"statusLookup"),b(3,"fa-icon",19),r()()),e&2){let t=o.$implicit;a(),g("className",m(2,3,t.status.code)),a(2),g("matTooltip",Le(t.status.value))}}function wfe(e,o){e&1&&b(0,"tr",20)}function Pfe(e,o){e&1&&b(0,"tr",21)}var Vs=(()=>{class e{constructor(){this.accountsFilterPipe=T(as),this.displayedColumns=["accountNo","productName","accountBalance","Status"],this.showClosed=!1}set savingsAccountData(t){this.accountData=t;let n=this.accountsFilterPipe.transform(t,"saving",this.showClosed?"closed":"open","isSavings");this.dataSource=new Wt(n),this.dataSource.paginator=this.paginator,this.dataSource.sort=this.sort}applyFilter(t){this.dataSource.filter=t.trim().toLowerCase()}toggleClosed(){this.showClosed=!this.showClosed;let t=this.accountsFilterPipe.transform(this.accountData,"saving",this.showClosed?"closed":"open","isSavings");this.dataSource=new Wt(t),this.dataSource.paginator=this.paginator,this.dataSource.sort=this.sort}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275cmp=me({type:e,selectors:[["mifosx-savings-account-table"]],viewQuery:function(n,i){if(n&1&&(Ee(kt,7),Ee(It,7)),n&2){let s;Te(s=Me())&&(i.paginator=s.first),Te(s=Me())&&(i.sort=s.first)}},inputs:{savingsAccountData:"savingsAccountData"},decls:24,vars:9,consts:[[1,"layout-row","align-between","align-items-center"],[1,"flex-50"],["matInput","",3,"keyup"],["mat-raised-button","","color","primary",3,"click"],["mat-table","","matSort","",3,"dataSource"],["matColumnDef","accountNo"],["mat-header-cell","","mat-sort-header","",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","productName"],["matColumnDef","accountBalance"],["matColumnDef","Status"],["mat-header-cell","",4,"matHeaderCellDef"],["mat-header-row","",4,"matHeaderRowDef"],["mat-row","",4,"matRowDef","matRowDefColumns"],["showFirstLastButtons","",3,"pageSizeOptions"],["mat-header-cell","","mat-sort-header",""],["mat-cell",""],["mat-header-cell",""],[3,"className"],["matTooltipPosition","right","icon","circle","size","md",3,"matTooltip"],["mat-header-row",""],["mat-row",""]],template:function(n,i){n&1&&(l(0,"div",0)(1,"mat-form-field",1)(2,"mat-label"),c(3),p(4,"translate"),r(),l(5,"input",2),R("keyup",function(d){return i.applyFilter(d.target.value)}),r()(),l(6,"button",3),R("click",function(){return i.toggleClosed()}),c(7),r()(),l(8,"table",4),X(9,5),F(10,gfe,3,3,"th",6)(11,_fe,2,1,"td",7),Z(),X(12,8),F(13,Cfe,3,3,"th",6)(14,vfe,2,1,"td",7),Z(),X(15,9),F(16,xfe,3,3,"th",6)(17,bfe,2,1,"td",7),Z(),X(18,10),F(19,yfe,3,3,"th",11)(20,Sfe,4,5,"td",7),Z(),F(21,wfe,1,0,"tr",12)(22,Pfe,1,0,"tr",13),r(),b(23,"mat-paginator",14)),n&2&&(a(3),h(m(4,6,"labels.inputs.Filter")),a(4),v(" ",i.showClosed?"View Active":"View Closed"," "),a(),g("dataSource",i.dataSource),a(13),g("matHeaderRowDef",i.displayedColumns),a(),g("matRowDefColumns",i.displayedColumns),a(),g("pageSizeOptions",oe(8,hfe)))},dependencies:[ue,fe,Fe,Be,ze,ve,_t,It,xt,vt,bt,ri,Ct,yt,ke,si,St,Pt,wt,Tt,kt,he,go],encapsulation:2})}}return e})();function Tfe(e,o){if(e&1&&(l(0,"p"),c(1),p(2,"translate"),b(3,"mifosx-external-identifier",13),r()),e&2){let t=w();a(),v(" ",m(2,3,"labels.inputs.External Id"),": "),a(2),g("externalId",Le(t.centerData.externalId))}}function Mfe(e,o){e&1&&(l(0,"div",8),c(1),p(2,"translate"),r()),e&2&&(a(),v(" ",m(2,1,"labels.inputs.Number of Active Clients")," "))}function Dfe(e,o){if(e&1&&(l(0,"div",9),c(1),r()),e&2){let t=w();a(),v(" ",t.centerSummaryData.activeClients," ")}}function Efe(e,o){e&1&&(l(0,"div",8),c(1),p(2,"translate"),r()),e&2&&(a(),v(" ",m(2,1,"labels.inputs.Number of Active Client Loans")," "))}function Ife(e,o){if(e&1&&(l(0,"div",9),c(1),r()),e&2){let t=w();a(),v(" ",t.centerSummaryData.activeClientLoans," ")}}function Ofe(e,o){e&1&&(l(0,"div",8),c(1),p(2,"translate"),r()),e&2&&(a(),v(" ",m(2,1,"labels.inputs.Number of Active Client Borrowers")," "))}function Afe(e,o){if(e&1&&(l(0,"div",9),c(1),r()),e&2){let t=w();a(),v(" ",t.centerSummaryData.activeClientBorrowers," ")}}function Ffe(e,o){e&1&&(l(0,"div",8),c(1),p(2,"translate"),r()),e&2&&(a(),v(" ",m(2,1,"labels.inputs.Number of Active Overdue Group Loans")," "))}function kfe(e,o){if(e&1&&(l(0,"div",9),c(1),r()),e&2){let t=w();a(),v(" ",t.centerSummaryData.overdueGroupLoans," ")}}function Bfe(e,o){e&1&&(l(0,"div",8),c(1),p(2,"translate"),r()),e&2&&(a(),v(" ",m(2,1,"labels.inputs.Number of Active Overdue Client Loans")," "))}function Rfe(e,o){if(e&1&&(l(0,"div",9),c(1),r()),e&2){let t=w();a(),v(" ",t.centerSummaryData.overdueClientLoans," ")}}function Nfe(e,o){e&1&&(l(0,"div",10),c(1),p(2,"translate"),r()),e&2&&(a(),v(" ",m(2,1,"labels.inputs.Next Meeting Date")," "))}function Lfe(e,o){if(e&1&&(l(0,"div",9),c(1),p(2,"dateFormat"),r()),e&2){let t=w();a(),v(" ",m(2,1,t.centerSummaryData.collectionMeetingCalendar.nextTenRecurringDates[0])," ")}}function Vfe(e,o){e&1&&(l(0,"div",10),c(1),p(2,"translate"),r()),e&2&&(a(),v(" ",m(2,1,"labels.inputs.Meeting Frequency")," "))}function qfe(e,o){if(e&1&&(l(0,"div",9),c(1),r()),e&2){let t=w();a(),v(" ",t.centerSummaryData.collectionMeetingCalendar.humanReadable," ")}}function zfe(e,o){if(e&1&&(l(0,"mat-tab",11),b(1,"mifosx-loan-account-table",14),r()),e&2){let t=w();a(),g("loanAccountData",t.centerAccountsData.loanAccounts)}}function Hfe(e,o){if(e&1&&(l(0,"mat-tab",12),b(1,"mifosx-savings-account-table",15),r()),e&2){let t=w();a(),g("savingsAccountData",t.centerAccountsData.savingsAccounts)}}var jf=(()=>{class e{constructor(){}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275cmp=me({type:e,selectors:[["mifosx-center-navigation"]],viewQuery:function(n,i){if(n&1&&(Ee(Ls,5),Ee(Vs,5)),n&2){let s;Te(s=Me())&&(i.loanAccountTableComponent=s.first),Te(s=Me())&&(i.savingsAccountTableComponent=s.first)}},inputs:{centerData:"centerData",centerAccountsData:"centerAccountsData",centerSummaryData:"centerSummaryData",groupData:"groupData"},decls:52,vars:42,consts:[[1,"layout-row","gap-5percent","header"],["icon","building","size","3x",1,"main-icon"],[1,"mat-typography"],[3,"className"],["matTooltipPosition","right","icon","circle","size","lg",3,"matTooltip"],[3,"accountNo"],["label","Details"],[1,"layout-row-wrap"],[1,"flex-50","mat-body-strong"],[1,"flex-50"],[1,"mat-body-strong","flex-50"],["label","Loan Accounts"],["label","Savings Accounts"],[3,"externalId"],[3,"loanAccountData"],[3,"savingsAccountData"]],template:function(n,i){n&1&&(l(0,"mat-card-header",0),b(1,"fa-icon",1),l(2,"mat-card-title-group")(3,"div",2)(4,"mat-card-title")(5,"h2"),c(6),l(7,"span",3),p(8,"statusLookup"),b(9,"fa-icon",4),r()()(),l(10,"mat-card-subtitle")(11,"p"),c(12),p(13,"translate"),b(14,"mifosx-account-number",5),r(),E(15,Tfe,4,5,"p"),r()()()(),l(16,"mat-card-content")(17,"mat-tab-group")(18,"mat-tab",6)(19,"div",7)(20,"div",8),c(21),p(22,"translate"),r(),l(23,"div",9),c(24),p(25,"dateFormat"),r(),l(26,"div",8),c(27),p(28,"translate"),r(),l(29,"div",9),c(30),r(),E(31,Mfe,3,3,"div",8),E(32,Dfe,2,1,"div",9),E(33,Efe,3,3,"div",8),E(34,Ife,2,1,"div",9),E(35,Ofe,3,3,"div",8),E(36,Afe,2,1,"div",9),E(37,Ffe,3,3,"div",8),E(38,kfe,2,1,"div",9),E(39,Bfe,3,3,"div",8),E(40,Rfe,2,1,"div",9),E(41,Nfe,3,3,"div",10),E(42,Lfe,3,3,"div",9),E(43,Vfe,3,3,"div",10),E(44,qfe,2,1,"div",9),l(45,"div",8),c(46),p(47,"translate"),r(),l(48,"div",9),c(49),r()()(),E(50,zfe,2,1,"mat-tab",11),E(51,Hfe,2,1,"mat-tab",12),r()()),n&2&&(a(6),v(" ",i.centerData.name," "),a(),g("className",m(8,30,i.centerData.status.code)),a(2),g("matTooltip",Le(i.centerData.status.value)),a(3),v(" ",m(13,32,"labels.inputs.Account No"),": "),a(2),g("accountNo",Le(i.centerData.accountNo)),a(),I(i.centerData.externalId?15:-1),a(6),v(" ",m(22,34,"labels.inputs.Activation Date")," "),a(3),v(" ",m(25,36,i.centerData.activationDate)," "),a(3),v(" ",m(28,38,"labels.inputs.Associated Officer")," "),a(3),v(" ",i.centerData.staffName," "),a(),I(i.centerSummaryData?31:-1),a(),I(i.centerSummaryData?32:-1),a(),I(i.centerSummaryData?33:-1),a(),I(i.centerSummaryData?34:-1),a(),I(i.centerSummaryData?35:-1),a(),I(i.centerSummaryData?36:-1),a(),I(i.centerSummaryData?37:-1),a(),I(i.centerSummaryData?38:-1),a(),I(i.centerSummaryData?39:-1),a(),I(i.centerSummaryData?40:-1),a(),I(i.centerData.collectionMeetingCalendar&&i.centerData.collectionMeetingCalendar.nextTenRecurringDates[0]?41:-1),a(),I(i.centerData.collectionMeetingCalendar&&i.centerData.collectionMeetingCalendar.nextTenRecurringDates[0]?42:-1),a(),I(i.centerData.collectionMeetingCalendar&&i.centerData.collectionMeetingCalendar.humanReadable?43:-1),a(),I(i.centerData.collectionMeetingCalendar&&i.centerData.collectionMeetingCalendar.humanReadable?44:-1),a(2),v(" ",m(47,40,"labels.inputs.Number of Groups")," "),a(3),v(" ",i.groupData?i.groupData.length:""," "),a(),I(i.centerAccountsData&&i.centerAccountsData.loanAccounts?50:-1),a(),I(i.centerAccountsData&&i.centerAccountsData.savingsAccounts?51:-1))},dependencies:[ue,fe,Je,sa,ke,Qr,Qo,si,vl,rc,Ea,Lr,Yr,Ls,Vs,Pi,he,go],styles:[".main-icon[_ngcontent-%COMP%]{margin:7px 0 0}h2[_ngcontent-%COMP%]{font-weight:500}.content[_ngcontent-%COMP%] div[_ngcontent-%COMP%]{margin:1rem 0;word-wrap:break-word}"]})}}return e})();function Gfe(e,o){e&1&&(l(0,"div",7),c(1),p(2,"translate"),r()),e&2&&(a(),v(" ",m(2,1,"labels.inputs.Associated Center")," "))}function jfe(e,o){if(e&1&&(l(0,"div",8),c(1),r()),e&2){let t=w();a(),v(" ",t.groupData.centerName," ")}}function $fe(e,o){e&1&&(l(0,"div",9),c(1),p(2,"translate"),r()),e&2&&(a(),v(" ",m(2,1,"labels.inputs.Next Meeting Date")," "))}function Ufe(e,o){if(e&1&&(l(0,"div",8),c(1),p(2,"dateFormat"),r()),e&2){let t=w();a(),v(" ",m(2,1,t.groupData.collectionMeetingCalendar.nextTenRecurringDates[0])," ")}}function Wfe(e,o){e&1&&(l(0,"div",9),c(1),p(2,"translate"),r()),e&2&&(a(),v(" ",m(2,1,"labels.inputs.Meeting Frequency")," "))}function Qfe(e,o){if(e&1&&(l(0,"div",8),c(1),r()),e&2){let t=w();a(),v(" ",t.groupData.collectionMeetingCalendar.humanReadable," ")}}function Yfe(e,o){if(e&1&&(l(0,"mat-tab",10),b(1,"mifosx-loan-account-table",12),r()),e&2){let t=w();a(),g("loanAccountData",t.groupAccountsData.loanAccounts)}}function Jfe(e,o){if(e&1&&(l(0,"mat-tab",11),b(1,"mifosx-savings-account-table",13),r()),e&2){let t=w();a(),g("savingsAccountData",t.groupAccountsData.savingsAccounts)}}var $f=(()=>{class e{constructor(){}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275cmp=me({type:e,selectors:[["mifosx-group-navigation"]],viewQuery:function(n,i){if(n&1&&(Ee(Ls,5),Ee(Vs,5)),n&2){let s;Te(s=Me())&&(i.loanAccountTableComponent=s.first),Te(s=Me())&&(i.savingsAccountTableComponent=s.first)}},inputs:{groupData:"groupData",groupAccountsData:"groupAccountsData",clientData:"clientData"},decls:42,vars:33,consts:[[1,"layout-row","gap-5percent"],["icon","users","size","3x",1,"main-icon"],[1,"mat-typography"],[3,"className"],["matTooltipPosition","right","icon","circle","size","lg",3,"matTooltip"],["label","Details"],[1,"layout-row-wrap"],[1,"flex-50","mat-body-strong"],[1,"flex-50"],[1,"mat-body-strong","flex-50"],["label","Loan Accounts"],["label","Savings Accounts"],[3,"loanAccountData"],[3,"savingsAccountData"]],template:function(n,i){n&1&&(l(0,"mat-card-header",0),b(1,"fa-icon",1),l(2,"mat-card-title-group")(3,"div",2)(4,"mat-card-title")(5,"h2"),c(6),l(7,"span",3),p(8,"statusLookup"),b(9,"fa-icon",4),r()()(),l(10,"mat-card-subtitle")(11,"p"),c(12),p(13,"translate"),r()()()()(),l(14,"mat-card-content")(15,"mat-tab-group")(16,"mat-tab",5)(17,"div",6)(18,"div",7),c(19),p(20,"translate"),r(),l(21,"div",8),c(22),p(23,"dateFormat"),r(),l(24,"div",7),c(25),p(26,"translate"),r(),l(27,"div",8),c(28),r(),E(29,Gfe,3,3,"div",7),E(30,jfe,2,1,"div",8),E(31,$fe,3,3,"div",9),E(32,Ufe,3,3,"div",8),E(33,Wfe,3,3,"div",9),E(34,Qfe,2,1,"div",8),l(35,"div",7),c(36),p(37,"translate"),r(),l(38,"div",8),c(39),r()()(),E(40,Yfe,2,1,"mat-tab",10),E(41,Jfe,2,1,"mat-tab",11),r()()),n&2&&(a(6),v(" ",i.groupData.name," "),a(),g("className",m(8,21,i.groupData.status.code)),a(2),g("matTooltip",Le(i.groupData.status.value)),a(3),ea(" ",m(13,23,"labels.inputs.Account No"),": ",i.groupData.accountNo," ",i.groupData.externalId?"| External ID: "+i.groupData.externalId:""," "),a(7),v(" ",m(20,25,"labels.inputs.Activation Date")," "),a(3),v(" ",m(23,27,i.groupData.activationDate)," "),a(3),v(" ",m(26,29,"labels.inputs.Associated Officer")," "),a(3),v(" ",i.groupData.staffName," "),a(),I(i.groupData.centerName?29:-1),a(),I(i.groupData.centerName?30:-1),a(),I(i.groupData.collectionMeetingCalendar&&i.groupData.collectionMeetingCalendar.nextTenRecurringDates[0]?31:-1),a(),I(i.groupData.collectionMeetingCalendar&&i.groupData.collectionMeetingCalendar.nextTenRecurringDates[0]?32:-1),a(),I(i.groupData.collectionMeetingCalendar&&i.groupData.collectionMeetingCalendar.humanReadable?33:-1),a(),I(i.groupData.collectionMeetingCalendar&&i.groupData.collectionMeetingCalendar.humanReadable?34:-1),a(2),v(" ",m(37,31,"labels.inputs.Number of Clients")," "),a(3),v(" ",i.clientData?i.clientData.length:""," "),a(),I(i.groupAccountsData&&i.groupAccountsData.loanAccounts?40:-1),a(),I(i.groupAccountsData&&i.groupAccountsData.savingsAccounts?41:-1))},dependencies:[ue,fe,Je,sa,ke,Qr,Qo,si,vl,Lr,Yr,Ls,Vs,Pi,he,go],styles:[".main-icon[_ngcontent-%COMP%]{margin:7px 0 0}h2[_ngcontent-%COMP%]{font-weight:500}.content[_ngcontent-%COMP%] div[_ngcontent-%COMP%]{margin:1rem 0;word-wrap:break-word}"]})}}return e})();var Kfe=()=>[10,25];function Xfe(e,o){e&1&&(l(0,"th",15),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.Account Number")))}function Zfe(e,o){if(e&1&&(l(0,"td",16),c(1),r()),e&2){let t=o.$implicit;a(),h(t.accountNo)}}function e1e(e,o){e&1&&(l(0,"th",15),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.Share Account")))}function t1e(e,o){if(e&1&&(l(0,"td",16),c(1),r()),e&2){let t=o.$implicit;a(),h(t.productName)}}function i1e(e,o){e&1&&(l(0,"th",15),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.Approved Shares")))}function n1e(e,o){if(e&1&&(l(0,"td",16),c(1),r()),e&2){let t=o.$implicit;a(),h(t.totalApprovedShares)}}function o1e(e,o){e&1&&(l(0,"th",17),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.Status")))}function a1e(e,o){if(e&1&&(l(0,"td",16)(1,"span",18),p(2,"statusLookup"),b(3,"fa-icon",19),r()()),e&2){let t=o.$implicit;a(),g("className",m(2,3,t.status.code)),a(2),g("matTooltip",Le(t.status.value))}}function r1e(e,o){e&1&&b(0,"tr",20)}function l1e(e,o){e&1&&b(0,"tr",21)}var Uf=(()=>{class e{constructor(){this.accountsFilterPipe=T(as),this.displayedColumns=["accountNo","productName","totalApprovedShares","Status"],this.showClosed=!1}set shareAccountData(t){this.accountData=t;let n=this.accountsFilterPipe.transform(t,"share",this.showClosed?"closed":"open","isShare");this.dataSource=new Wt(n),this.dataSource.paginator=this.paginator,this.dataSource.sort=this.sort}applyFilter(t){this.dataSource.filter=t.trim().toLowerCase()}toggleClosed(){this.showClosed=!this.showClosed;let t=this.accountsFilterPipe.transform(this.accountData,"share",this.showClosed?"closed":"open","isShare");this.dataSource=new Wt(t),this.dataSource.paginator=this.paginator,this.dataSource.sort=this.sort}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275cmp=me({type:e,selectors:[["mifosx-share-account-table"]],viewQuery:function(n,i){if(n&1&&(Ee(kt,7),Ee(It,7)),n&2){let s;Te(s=Me())&&(i.paginator=s.first),Te(s=Me())&&(i.sort=s.first)}},inputs:{shareAccountData:"shareAccountData"},decls:24,vars:9,consts:[[1,"layout-row","align-between","align-items-center"],[1,"flex-50"],["matInput","",3,"keyup"],["mat-raised-button","","color","primary",3,"click"],["mat-table","","matSort","",3,"dataSource"],["matColumnDef","accountNo"],["mat-header-cell","","mat-sort-header","",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","productName"],["matColumnDef","totalApprovedShares"],["matColumnDef","Status"],["mat-header-cell","",4,"matHeaderCellDef"],["mat-header-row","",4,"matHeaderRowDef"],["mat-row","",4,"matRowDef","matRowDefColumns"],["showFirstLastButtons","",3,"pageSizeOptions"],["mat-header-cell","","mat-sort-header",""],["mat-cell",""],["mat-header-cell",""],[3,"className"],["matTooltipPosition","right","icon","circle","size","md",3,"matTooltip"],["mat-header-row",""],["mat-row",""]],template:function(n,i){n&1&&(l(0,"div",0)(1,"mat-form-field",1)(2,"mat-label"),c(3),p(4,"translate"),r(),l(5,"input",2),R("keyup",function(d){return i.applyFilter(d.target.value)}),r()(),l(6,"button",3),R("click",function(){return i.toggleClosed()}),c(7),r()(),l(8,"table",4),X(9,5),F(10,Xfe,3,3,"th",6)(11,Zfe,2,1,"td",7),Z(),X(12,8),F(13,e1e,3,3,"th",6)(14,t1e,2,1,"td",7),Z(),X(15,9),F(16,i1e,3,3,"th",6)(17,n1e,2,1,"td",7),Z(),X(18,10),F(19,o1e,3,3,"th",11)(20,a1e,4,5,"td",7),Z(),F(21,r1e,1,0,"tr",12)(22,l1e,1,0,"tr",13),r(),b(23,"mat-paginator",14)),n&2&&(a(3),h(m(4,6,"labels.inputs.Filter")),a(4),v(" ",i.showClosed?"View Active":"View Closed"," "),a(),g("dataSource",i.dataSource),a(13),g("matHeaderRowDef",i.displayedColumns),a(),g("matRowDefColumns",i.displayedColumns),a(),g("pageSizeOptions",oe(8,Kfe)))},dependencies:[ue,fe,Fe,Be,ze,ve,_t,It,xt,vt,bt,ri,Ct,yt,ke,si,St,Pt,wt,Tt,kt,he,go],encapsulation:2})}}return e})();var s1e=()=>[10,25];function c1e(e,o){e&1&&(l(0,"th",11),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.Account Number")))}function p1e(e,o){if(e&1&&(l(0,"td",12),c(1),r()),e&2){let t=o.$implicit;a(),h(t.accountNo)}}function m1e(e,o){e&1&&(l(0,"th",11),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.Group Name")))}function d1e(e,o){if(e&1&&(l(0,"td",12),c(1),r()),e&2){let t=o.$implicit;a(),h(t.name)}}function u1e(e,o){e&1&&b(0,"tr",13)}function f1e(e,o){e&1&&b(0,"tr",14)}var Wf=(()=>{class e{set memberGroupData(t){this.dataSource=new Wt(t),this.dataSource.paginator=this.paginator,this.dataSource.sort=this.sort}constructor(){this.displayedColumns=["accountNo","name"]}applyFilter(t){this.dataSource.filter=t.trim().toLowerCase()}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275cmp=me({type:e,selectors:[["mifosx-member-groups"]],viewQuery:function(n,i){if(n&1&&(Ee(kt,7),Ee(It,7)),n&2){let s;Te(s=Me())&&(i.paginator=s.first),Te(s=Me())&&(i.sort=s.first)}},inputs:{memberGroupData:"memberGroupData"},decls:16,vars:8,consts:[[1,"layout-row"],[1,"flex-50"],["matInput","",3,"keyup"],["mat-table","","matSort","",3,"dataSource"],["matColumnDef","accountNo"],["mat-header-cell","","mat-sort-header","",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","name"],["mat-header-row","",4,"matHeaderRowDef"],["mat-row","",4,"matRowDef","matRowDefColumns"],["showFirstLastButtons","",3,"pageSizeOptions"],["mat-header-cell","","mat-sort-header",""],["mat-cell",""],["mat-header-row",""],["mat-row",""]],template:function(n,i){n&1&&(l(0,"div",0)(1,"mat-form-field",1)(2,"mat-label"),c(3),p(4,"translate"),r(),l(5,"input",2),R("keyup",function(d){return i.applyFilter(d.target.value)}),r()()(),l(6,"table",3),X(7,4),F(8,c1e,3,3,"th",5)(9,p1e,2,1,"td",6),Z(),X(10,7),F(11,m1e,3,3,"th",5)(12,d1e,2,1,"td",6),Z(),F(13,u1e,1,0,"tr",8)(14,f1e,1,0,"tr",9),r(),b(15,"mat-paginator",10)),n&2&&(a(3),h(m(4,5,"labels.inputs.Filter")),a(3),g("dataSource",i.dataSource),a(7),g("matHeaderRowDef",i.displayedColumns),a(),g("matRowDefColumns",i.displayedColumns),a(),g("pageSizeOptions",oe(7,s1e)))},dependencies:[ue,fe,Fe,Be,ze,_t,It,xt,vt,bt,ri,Ct,yt,St,Pt,wt,Tt,kt,he],encapsulation:2})}}return e})();function h1e(e,o){e&1&&(l(0,"div",7),c(1),p(2,"translate"),r()),e&2&&(a(),v(" ",m(2,1,"labels.inputs.First Name")," "))}function g1e(e,o){if(e&1&&(l(0,"div",8),c(1),r()),e&2){let t=w();a(),v(" ",t.clientData.firstName," ")}}function _1e(e,o){e&1&&(l(0,"div",7),c(1),p(2,"translate"),r()),e&2&&(a(),v(" ",m(2,1,"labels.inputs.Middle Name")," "))}function C1e(e,o){if(e&1&&(l(0,"div",8),c(1),r()),e&2){let t=w();a(),v(" ",t.clientData.middleName," ")}}function v1e(e,o){e&1&&(l(0,"div",7),c(1),p(2,"translate"),r()),e&2&&(a(),v(" ",m(2,1,"labels.inputs.Last Name")," "))}function x1e(e,o){if(e&1&&(l(0,"div",8),c(1),r()),e&2){let t=w();a(),v(" ",t.clientData.lastName," ")}}function b1e(e,o){e&1&&(l(0,"div",7),c(1),p(2,"translate"),r()),e&2&&(a(),v(" ",m(2,1,"labels.inputs.Date of Birth")," "))}function y1e(e,o){if(e&1&&(l(0,"div",8),c(1),p(2,"dateFormat"),r()),e&2){let t=w();a(),v(" ",m(2,1,t.clientData.dateOfBirth)," ")}}function S1e(e,o){e&1&&(l(0,"div",7),c(1),p(2,"translate"),r()),e&2&&(a(),v(" ",m(2,1,"labels.inputs.Mobile Number")," "))}function w1e(e,o){if(e&1&&(l(0,"div",8),c(1),r()),e&2){let t=w();a(),v(" ",t.clientData.mobileNo," ")}}function P1e(e,o){e&1&&(l(0,"div",7),c(1),p(2,"translate"),r()),e&2&&(a(),v(" ",m(2,1,"labels.inputs.Associated Office")," "))}function T1e(e,o){if(e&1&&(l(0,"div",8),c(1),r()),e&2){let t=w();a(),v(" ",t.clientData.officeName," ")}}function M1e(e,o){e&1&&(l(0,"div",7),c(1),p(2,"translate"),r()),e&2&&(a(),v(" ",m(2,1,"labels.inputs.Associated Staff")," "))}function D1e(e,o){if(e&1&&(l(0,"div",8),c(1),r()),e&2){let t=w();a(),v(" ",t.clientData.staffName," ")}}function E1e(e,o){if(e&1&&(l(0,"mat-tab",9),b(1,"mifosx-loan-account-table",13),r()),e&2){let t=w();a(),g("loanAccountData",t.clientAccountsData.loanAccounts)}}function I1e(e,o){if(e&1&&(l(0,"mat-tab",10),b(1,"mifosx-savings-account-table",14),r()),e&2){let t=w();a(),g("savingsAccountData",t.clientAccountsData.savingsAccounts)}}function O1e(e,o){if(e&1&&(l(0,"mat-tab",11),b(1,"mifosx-share-account-table",15),r()),e&2){let t=w();a(),g("shareAccountData",t.clientAccountsData.shareAccounts)}}function A1e(e,o){if(e&1&&(l(0,"mat-tab",12),b(1,"mifosx-member-groups",16),r()),e&2){let t=w();a(),g("memberGroupData",t.clientData.groups)}}var Qf=(()=>{class e{constructor(){}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275cmp=me({type:e,selectors:[["mifosx-client-navigation"]],viewQuery:function(n,i){if(n&1&&(Ee(Ls,5),Ee(Vs,5),Ee(Uf,5),Ee(Wf,5)),n&2){let s;Te(s=Me())&&(i.loanAccountTableComponent=s.first),Te(s=Me())&&(i.savingsAccountTableComponent=s.first),Te(s=Me())&&(i.shareAccountTableComponent=s.first),Te(s=Me())&&(i.memberGroupsComponent=s.first)}},inputs:{clientData:"clientData",clientAccountsData:"clientAccountsData"},decls:42,vars:35,consts:[[1,"layout-row","gap-5percent"],["icon","user","size","3x",1,"main-icon"],[1,"mat-typography"],[3,"className"],["matTooltipPosition","right","icon","circle","size","lg",3,"matTooltip"],["label","Details"],[1,"layout-row-wrap"],[1,"flex-50","mat-body-strong"],[1,"flex-50"],["label","Loan Accounts"],["label","Savings Accounts"],["label","Share Accounts"],["label","Group Members"],[3,"loanAccountData"],[3,"savingsAccountData"],[3,"shareAccountData"],[3,"memberGroupData"]],template:function(n,i){n&1&&(l(0,"mat-card-header",0),b(1,"fa-icon",1),l(2,"mat-card-title-group")(3,"div",2)(4,"mat-card-title")(5,"h2"),c(6),l(7,"span",3),p(8,"statusLookup"),b(9,"fa-icon",4),r()()(),l(10,"mat-card-subtitle")(11,"p"),c(12),p(13,"translate"),r()()()()(),l(14,"mat-card-content")(15,"mat-tab-group")(16,"mat-tab",5)(17,"div",6),E(18,h1e,3,3,"div",7),E(19,g1e,2,1,"div",8),E(20,_1e,3,3,"div",7),E(21,C1e,2,1,"div",8),E(22,v1e,3,3,"div",7),E(23,x1e,2,1,"div",8),E(24,b1e,3,3,"div",7),E(25,y1e,3,3,"div",8),E(26,S1e,3,3,"div",7),E(27,w1e,2,1,"div",8),l(28,"div",7),c(29),p(30,"translate"),r(),l(31,"div",8),c(32),p(33,"dateFormat"),r(),E(34,P1e,3,3,"div",7),E(35,T1e,2,1,"div",8),E(36,M1e,3,3,"div",7),E(37,D1e,2,1,"div",8),r()(),E(38,E1e,2,1,"mat-tab",9),E(39,I1e,2,1,"mat-tab",10),E(40,O1e,2,1,"mat-tab",11),E(41,A1e,2,1,"mat-tab",12),r()()),n&2&&(a(6),v(" ",i.clientData.displayName," "),a(),g("className",m(8,27,i.clientData.status.code)),a(2),g("matTooltip",Le(i.clientData.status.value)),a(3),ea(" ",m(13,29,"labels.inputs.Account No"),": ",i.clientData.accountNo," ",i.clientData.externalId?"| External ID: "+i.clientData.externalId:""," "),a(6),I(i.clientData.firstName?18:-1),a(),I(i.clientData.firstName?19:-1),a(),I(i.clientData.middleName?20:-1),a(),I(i.clientData.middleName?21:-1),a(),I(i.clientData.lastName?22:-1),a(),I(i.clientData.lastName?23:-1),a(),I(i.clientData.dateOfBirth?24:-1),a(),I(i.clientData.dateOfBirth?25:-1),a(),I(i.clientData.mobileNo?26:-1),a(),I(i.clientData.mobileNo?27:-1),a(2),v(" ",m(30,31,"labels.inputs.Activation Date")," "),a(3),v(" ",m(33,33,i.clientData.activationDate)," "),a(2),I(i.clientData.officeName?34:-1),a(),I(i.clientData.officeName?35:-1),a(),I(i.clientData.staffName?36:-1),a(),I(i.clientData.staffName?37:-1),a(),I(i.clientAccountsData&&i.clientAccountsData.loanAccounts?38:-1),a(),I(i.clientAccountsData&&i.clientAccountsData.savingsAccounts?39:-1),a(),I(i.clientAccountsData&&i.clientAccountsData.shareAccounts?40:-1),a(),I(i.clientData.groups&&i.clientData.groups.length!==0?41:-1))},dependencies:[ue,fe,Je,sa,ke,Qr,Qo,si,vl,Lr,Yr,Ls,Vs,Uf,Wf,Pi,he,go],styles:[".main-icon[_ngcontent-%COMP%]{margin:7px 0 0}h2[_ngcontent-%COMP%]{font-weight:500}.content[_ngcontent-%COMP%] div[_ngcontent-%COMP%]{margin:1rem 0;word-wrap:break-word}"]})}}return e})();function F1e(e,o){if(e&1&&(l(0,"mat-option",6),c(1),r()),e&2){let t=o.$implicit;g("value",t.id),a(),v(" ",t.name," ")}}function k1e(e,o){if(e&1&&(l(0,"mat-form-field")(1,"mat-label"),c(2),p(3,"translate"),r(),l(4,"mat-select",5),Se(5,F1e,2,2,"mat-option",6,Pe),r()()),e&2){let t=w(2);a(2),h(m(3,2,"labels.inputs.Office")),a(2),g("formControl",t.officeSelector),a(),we(t.officeData)}}function B1e(e,o){e&1&&F(0,k1e,7,4,"mat-form-field",4),e&2&&g("mifosxHasPermission","READ_OFFICES")}function R1e(e,o){if(e&1&&(l(0,"mat-option",6),c(1),r()),e&2){let t=o.$implicit;g("value",t.id),a(),v(" ",t.displayName," ")}}function N1e(e,o){if(e&1&&(l(0,"mat-form-field")(1,"mat-label"),c(2),r(),l(3,"mat-select",5),Se(4,R1e,2,2,"mat-option",6,Pe),r()()),e&2){let t=w(2);a(2),h(t.employeeData.length?"Officer":"No Associated Officers"),a(),g("formControl",t.employeeSelector),a(),we(t.employeeData)}}function L1e(e,o){e&1&&F(0,N1e,6,2,"mat-form-field",4),e&2&&g("mifosxHasPermission","READ_STAFF")}function V1e(e,o){if(e&1&&(l(0,"mat-option",6),c(1),r()),e&2){let t=o.$implicit;g("value",t.id),a(),v(" ",t.name," ")}}function q1e(e,o){if(e&1&&(l(0,"mat-form-field")(1,"mat-label"),c(2),r(),l(3,"mat-select",5),Se(4,V1e,2,2,"mat-option",6,Pe),r()()),e&2){let t=w(2);a(2),h(t.centerData.length?"Center":"No Associated Centers"),a(),g("formControl",t.centerSelector),a(),we(t.centerData)}}function z1e(e,o){e&1&&F(0,q1e,6,2,"mat-form-field",4),e&2&&g("mifosxHasPermission","READ_CENTERS")}function H1e(e,o){if(e&1&&(l(0,"mat-option",6),c(1),r()),e&2){let t=o.$implicit;g("value",t.id),a(),v(" ",t.name," ")}}function G1e(e,o){if(e&1&&(l(0,"mat-form-field")(1,"mat-label"),c(2),r(),l(3,"mat-select",5),Se(4,H1e,2,2,"mat-option",6,Pe),r()()),e&2){let t=w(2);a(2),h(t.groupData.length?"Group":"No Associated Groups"),a(),g("formControl",t.groupSelector),a(),we(t.groupData)}}function j1e(e,o){e&1&&F(0,G1e,6,2,"mat-form-field",4),e&2&&g("mifosxHasPermission","READ_GROUPS")}function $1e(e,o){if(e&1&&(l(0,"mat-option",6),c(1),r()),e&2){let t=o.$implicit;g("value",t.id),a(),v(" ",t.displayName," ")}}function U1e(e,o){if(e&1&&(l(0,"mat-form-field")(1,"mat-label"),c(2),r(),l(3,"mat-select",5),Se(4,$1e,2,2,"mat-option",6,Pe),r()()),e&2){let t=w(2);a(2),h(t.clientData.length?"Client":"No Associated Clients"),a(),g("formControl",t.clientSelector),a(),we(t.clientData)}}function W1e(e,o){e&1&&F(0,U1e,6,2,"mat-form-field",4),e&2&&g("mifosxHasPermission","READ_CLIENTS")}function Q1e(e,o){if(e&1&&b(0,"mifosx-office-navigation",7),e&2){let t=w(2);g("officeData",t.selectedItem)("employeeData",t.employeeData)}}function Y1e(e,o){if(e&1&&b(0,"mifosx-staff-navigation",8),e&2){let t=w(2);g("employeeData",t.selectedItem)("centerData",t.centerData)}}function J1e(e,o){if(e&1&&b(0,"mifosx-center-navigation",9),e&2){let t=w(2);g("centerData",t.selectedItem)("groupData",t.groupData)("centerAccountsData",t.selectedItemAccounts)("centerSummaryData",t.selectedItemSummary)}}function K1e(e,o){if(e&1&&b(0,"mifosx-group-navigation",10),e&2){let t=w(2);g("groupData",t.selectedItem)("clientData",t.clientData)("groupAccountsData",t.selectedItemAccounts)}}function X1e(e,o){if(e&1&&b(0,"mifosx-client-navigation",11),e&2){let t=w(2);g("clientData",t.selectedItem)("clientAccountsData",t.selectedItemAccounts)}}function Z1e(e,o){if(e&1&&(l(0,"mat-card",3),E(1,Q1e,1,2,"mifosx-office-navigation",7),E(2,Y1e,1,2,"mifosx-staff-navigation",8),E(3,J1e,1,4,"mifosx-center-navigation",9),E(4,K1e,1,3,"mifosx-group-navigation",10),E(5,X1e,1,2,"mifosx-client-navigation",11),r()),e&2){let t=w();a(),I(t.selectedItem.itemType==="office"?1:-1),a(),I(t.selectedItem.itemType==="employee"?2:-1),a(),I(t.selectedItem.itemType==="center"?3:-1),a(),I(t.selectedItem.itemType==="group"?4:-1),a(),I(t.selectedItem.itemType==="client"?5:-1)}}var EC=(()=>{class e{constructor(){this.navigationService=T(DC),this.route=T(Ie),this.router=T(qe),this.officeSelector=new it,this.employeeSelector=new it,this.centerSelector=new it,this.groupSelector=new it,this.clientSelector=new it,this.route.data.subscribe(t=>{this.officeData=t.offices})}ngOnInit(){this.setOfficeSelector(),this.setEmployeeSelector(),this.setCenterSelector(),this.setGroupSelector(),this.setClientSelector()}setOfficeSelector(){this.officeSelector.valueChanges.subscribe(t=>{this.employeeSelector.reset(null,{emitEvent:!1}),this.centerSelector.reset(null,{emitEvent:!1}),this.groupSelector.reset(null,{emitEvent:!1}),this.clientSelector.reset(null,{emitEvent:!1}),this.employeeData=null,this.centerData=null,this.groupData=null,this.clientData=null,this.selectedItem=this.officeData.find(n=>n.id===t),this.selectedItem.itemType="office",this.navigationService.getEmployees(t).subscribe(n=>{this.employeeData=n,this.employeeData.length?this.employeeSelector.enable():this.employeeSelector.disable()})})}setEmployeeSelector(){this.employeeSelector.valueChanges.subscribe(t=>{t&&(this.centerSelector.reset(null,{emitEvent:!1}),this.groupSelector.reset(null,{emitEvent:!1}),this.clientSelector.reset(null,{emitEvent:!1}),this.centerData=null,this.groupData=null,this.clientData=null,this.selectedItem=this.employeeData.find(n=>n.id===t),this.selectedItem.itemType="employee",this.navigationService.getCentersFromStaffId(t).subscribe(n=>{this.centerData=n,this.centerData.length?this.centerSelector.enable():this.centerSelector.disable()}))})}setCenterSelector(){this.centerSelector.valueChanges.subscribe(t=>{t&&(this.groupSelector.reset(null,{emitEvent:!1}),this.clientSelector.reset(null,{emitEvent:!1}),this.groupData=null,this.clientData=null,this.navigationService.getCenter(t).subscribe(n=>{this.selectedItem=n,this.selectedItem.itemType="center",this.groupData=n.groupMembers?n.groupMembers:[],this.groupData.length?this.groupSelector.enable():this.groupSelector.disable()}),this.selectedItemAccounts=null,this.navigationService.getCenterAccounts(t).subscribe(n=>{this.selectedItemAccounts=n}),this.selectedItemSummary=null,this.navigationService.getCenterSummary(t).subscribe(n=>{this.selectedItemSummary=n[0]}))})}setGroupSelector(){this.groupSelector.valueChanges.subscribe(t=>{t&&(this.clientSelector.reset(null,{emitEvent:!1}),this.clientData=null,this.navigationService.getGroup(t).subscribe(n=>{this.selectedItem=n,this.selectedItem.itemType="group",this.clientData=n.clientMembers?n.clientMembers:[],this.clientData.length?this.clientSelector.enable():this.clientSelector.disable()}),this.selectedItemAccounts=null,this.navigationService.getGroupAccounts(t).subscribe(n=>{this.selectedItemAccounts=n}))})}setClientSelector(){this.clientSelector.valueChanges.subscribe(t=>{t&&(this.selectedItemAccounts=null,this.navigationService.getClient(t).subscribe(n=>{this.selectedItem=n,this.selectedItem.itemType="client"}),this.navigationService.getClientAccounts(t).subscribe(n=>{this.selectedItemAccounts=n}))})}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275cmp=me({type:e,selectors:[["mifosx-navigation"]],viewQuery:function(n,i){if(n&1&&(Ee(Hf,5),Ee(Gf,5),Ee(jf,5),Ee($f,5),Ee(Qf,5)),n&2){let s;Te(s=Me())&&(i.officeNavigationComponent=s.first),Te(s=Me())&&(i.staffNavigationComponent=s.first),Te(s=Me())&&(i.centerNavigationComponent=s.first),Te(s=Me())&&(i.groupNavigationComponent=s.first),Te(s=Me())&&(i.clientNavigationComponent=s.first)}},decls:12,vars:6,consts:[[1,"container"],[1,"layout-row-wrap","responsive-column","gap-2percent"],[1,"flex-48"],[1,"layout-column"],[4,"mifosxHasPermission"],[3,"formControl"],[3,"value"],[3,"officeData","employeeData"],[3,"employeeData","centerData"],[3,"centerData","groupData","centerAccountsData","centerSummaryData"],[3,"groupData","clientData","groupAccountsData"],[3,"clientData","clientAccountsData"]],template:function(n,i){n&1&&(l(0,"div",0)(1,"div",1)(2,"div",2)(3,"mat-card",3)(4,"mat-card-content",3),E(5,B1e,1,1,"mat-form-field"),E(6,L1e,1,1,"mat-form-field"),E(7,z1e,1,1,"mat-form-field"),E(8,j1e,1,1,"mat-form-field"),E(9,W1e,1,1,"mat-form-field"),r()()(),l(10,"div",2),E(11,Z1e,6,5,"mat-card",3),r()()()),n&2&&(a(5),I(i.officeData===void 0||i.officeData===null?-1:5),a(),I(i.employeeData===void 0||i.employeeData===null?-1:6),a(),I(i.centerData===void 0||i.centerData===null?-1:7),a(),I(i.groupData===void 0||i.groupData===null?-1:8),a(),I(i.clientData===void 0||i.clientData===null?-1:9),a(2),I(i.selectedItem?11:-1))},dependencies:[ue,fe,Ue,_n,$e,Je,Fe,Be,gt,ft,Ke,Hf,Gf,jf,$f,Qf,he],styles:["[_nghost-%COMP%]{display:block}.container[_ngcontent-%COMP%]{width:100%}.layout-row-wrap.responsive-column[_ngcontent-%COMP%]{align-items:flex-start}.flex-48[_ngcontent-%COMP%]{min-width:20rem}@media (width >= 1200px){.flex-48[_ngcontent-%COMP%]{flex-basis:48%}}mat-card[_ngcontent-%COMP%]{padding:1rem;border-radius:.5rem;overflow:hidden}mat-card-content[_ngcontent-%COMP%]{display:grid;grid-template-columns:100%}@media (width >= 768px){mat-card-content[_ngcontent-%COMP%]{grid-template-columns:50% 50%}}@media (width >= 1200px){mat-card-content[_ngcontent-%COMP%]{grid-template-columns:50% 50%;gap:1rem}}mat-form-field[_ngcontent-%COMP%]{width:100%}mat-label[_ngcontent-%COMP%]{letter-spacing:.0125rem}"]})}}return e})();var AM=(()=>{class e{constructor(){this.navigationService=T(DC)}resolve(){return this.navigationService.getOffices()}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275prov=Re({token:e,factory:e.\u0275fac})}}return e})();var ehe=[_o.withShell([{path:"navigation",component:EC,data:{title:"Navigation",breadcrumb:"Navigation"},resolve:{offices:AM}}])],w9=(()=>{class e{static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275mod=Gi({type:e})}static{this.\u0275inj=Hi({providers:[AM],imports:[gn.forChild(ehe),gn]})}}return e})();var P9=(()=>{class e{static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275mod=Gi({type:e})}static{this.\u0275inj=Hi({imports:[oo,ha,w9,EC,Hf,Gf,jf,$f,Qf,Ls,Uf,Vs,Wf]})}}return e})();var the=["showClosedAccounts"],ihe=()=>[5,50,100],nhe=()=>["../","organization","bulk-import","Clients"],ohe=()=>["create"],ahe=e=>[e,"general"];function rhe(e,o){e&1&&(l(0,"div",6)(1,"mat-checkbox",26,0),c(3),p(4,"translate"),r()()),e&2&&(a(3),v("",m(4,1,"labels.inputs.Show Closed Accounts")," "))}function lhe(e,o){e&1&&(l(0,"button",27),b(1,"fa-icon",28),c(2),p(3,"translate"),r()),e&2&&(g("routerLink",oe(4,nhe)),a(2),v("",m(3,2,"labels.buttons.Import Client")," "))}function she(e,o){e&1&&(l(0,"button",27),b(1,"fa-icon",29),c(2),p(3,"translate"),r()),e&2&&(g("routerLink",oe(4,ohe)),a(2),v("",m(3,2,"labels.buttons.Create Client")," "))}function che(e,o){e&1&&(l(0,"div"),b(1,"mat-progress-bar",30),r())}function phe(e,o){e&1&&(l(0,"th",31),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.name")))}function mhe(e,o){if(e&1&&(l(0,"td",32),c(1),r()),e&2){let t=o.$implicit;g("routerLink",Nt(2,ahe,t.id)),a(),h(t.displayName)}}function dhe(e,o){e&1&&(l(0,"th",31),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.Account No")))}function uhe(e,o){if(e&1&&(l(0,"td",33),b(1,"mifosx-account-number",34),r()),e&2){let t=o.$implicit;a(),g("accountNo",Le(t.accountNumber))}}function fhe(e,o){e&1&&(l(0,"th",31),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.External Id")))}function hhe(e,o){if(e&1&&(l(0,"td",33),b(1,"mifosx-external-identifier",35),r()),e&2){let t=o.$implicit;a(),g("externalId",Le(t.externalId))}}function ghe(e,o){e&1&&(l(0,"th",36),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.Status")))}function _he(e,o){if(e&1&&(l(0,"td",33)(1,"div",37),p(2,"statusLookup"),b(3,"fa-icon",38),l(4,"span",39),c(5),p(6,"translate"),r()()()),e&2){let t=o.$implicit;a(),g("ngClass",m(2,2,t.status.code)),a(4),v(" ",m(6,4,t.status.value)," ")}}function Che(e,o){e&1&&(l(0,"th",36),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.Office Name")))}function vhe(e,o){if(e&1&&(l(0,"td",33),c(1),r()),e&2){let t=o.$implicit;a(),h(t.officeName)}}function xhe(e,o){e&1&&b(0,"tr",40)}function bhe(e,o){e&1&&b(0,"tr",41)}var IC=(()=>{class e{constructor(){this.clientService=T(Oi),this.displayedColumns=["displayName","accountNumber","externalId","status","officeName"],this.dataSource=new Wt,this.existsClientsToFilter=!1,this.notExistsClientsToFilter=!1,this.isLoading=!1,this.pageSize=50,this.currentPage=0,this.filterText="",this.sortAttribute="",this.sortDirection=""}ngOnInit(){un.preloadClients&&this.getClients()}search(t){this.filterText=t,this.resetPaginator(),this.getClients()}getClients(){this.isLoading=!0,this.clientService.searchByText(this.filterText,this.currentPage,this.pageSize,this.sortAttribute,this.sortDirection).subscribe(t=>{this.dataSource.data=t.content,this.totalRows=t.totalElements,this.existsClientsToFilter=t.numberOfElements>0,this.notExistsClientsToFilter=!this.existsClientsToFilter,this.isLoading=!1},t=>{this.isLoading=!1})}pageChanged(t){this.pageSize=t.pageSize,this.currentPage=t.pageIndex,this.getClients()}sortChanged(t){t.direction===""?(this.sortDirection="",this.sortAttribute=""):(this.sortAttribute=t.active,this.sortDirection=t.direction),this.resetPaginator(),this.getClients()}resetPaginator(){this.currentPage=0,this.paginator.firstPage()}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275cmp=me({type:e,selectors:[["mifosx-clients"]],viewQuery:function(n,i){if(n&1&&(Ee(the,5),Ee(kt,5),Ee(It,5)),n&2){let s;Te(s=Me())&&(i.showClosedAccounts=s.first),Te(s=Me())&&(i.paginator=s.first),Te(s=Me())&&(i.sort=s.first)}},decls:35,vars:16,consts:[["showClosedAccounts",""],[1,"container"],[1,"layout-column","layout-gt-sm-row","align-gt-sm-start-center"],[1,"search-box","m-r-30"],[1,"search-box"],["matInput","","placeholder","Search by client name, external Id, mobile",1,"search-box",3,"keydown.enter"],[1,"filter-box"],[1,"action-button","gap-25px"],["mat-raised-button","","color","primary",3,"routerLink",4,"mifosxHasPermission"],[1,"client-list",3,"hidden"],["mat-table","","matSort","",1,"bordered-table",3,"matSortChange","dataSource"],["matColumnDef","displayName"],["mat-header-cell","","mat-sort-header","",4,"matHeaderCellDef"],["mat-cell","",3,"routerLink",4,"matCellDef"],["matColumnDef","accountNumber"],["mat-cell","",4,"matCellDef"],["matColumnDef","externalId"],["matColumnDef","status"],["mat-header-cell","",4,"matHeaderCellDef"],["matColumnDef","officeName"],["mat-header-row","",4,"matHeaderRowDef"],["mat-row","","class","select-row",4,"matRowDef","matRowDefColumns"],["showFirstLastButtons","",3,"page","pageSize","pageSizeOptions","length"],[1,"alert",3,"hidden"],[1,"message"],[1,"fa","fa-exclamation-circle","alert-check"],["labelPosition","after",1,"m-r-10"],["mat-raised-button","","color","primary",3,"routerLink"],["icon","download",1,"m-r-20"],["icon","plus",1,"m-r-20"],["mode","indeterminate"],["mat-header-cell","","mat-sort-header",""],["mat-cell","",3,"routerLink"],["mat-cell",""],["display","left",3,"accountNo"],["display","left",3,"externalId"],["mat-header-cell",""],[3,"ngClass"],["icon","stop"],[1,"m-l-10","status"],["mat-header-row",""],["mat-row","",1,"select-row"]],template:function(n,i){n&1&&(l(0,"mat-card",1)(1,"div",2)(2,"div",3)(3,"mat-form-field",4)(4,"input",5),R("keydown.enter",function(d){return i.search(d.target.value)}),r()()(),E(5,rhe,5,3,"div",6),l(6,"div",7),F(7,lhe,4,5,"button",8)(8,she,4,5,"button",8),r()(),l(9,"div",9),E(10,che,2,0,"div"),l(11,"table",10),R("matSortChange",function(d){return i.sortChanged(d)}),X(12,11),F(13,phe,3,3,"th",12)(14,mhe,2,4,"td",13),Z(),X(15,14),F(16,dhe,3,3,"th",12)(17,uhe,2,2,"td",15),Z(),X(18,16),F(19,fhe,3,3,"th",12)(20,hhe,2,2,"td",15),Z(),X(21,17),F(22,ghe,3,3,"th",18)(23,_he,7,6,"td",15),Z(),X(24,19),F(25,Che,3,3,"th",18)(26,vhe,2,1,"td",15),Z(),F(27,xhe,1,0,"tr",20)(28,bhe,1,0,"tr",21),r(),l(29,"mat-paginator",22),R("page",function(d){return i.pageChanged(d)}),r()(),l(30,"div",23)(31,"div",24),b(32,"i",25),c(33),p(34,"translate"),r()()()),n&2&&(a(5),I(i.existsClientsToFilter?5:-1),a(2),g("mifosxHasPermission","CREATE_CLIENT"),a(),g("mifosxHasPermission","CREATE_CLIENT"),a(),g("hidden",!i.existsClientsToFilter),a(),I(i.isLoading?10:-1),a(),g("dataSource",i.dataSource),a(16),g("matHeaderRowDef",i.displayedColumns),a(),g("matRowDefColumns",i.displayedColumns),a(),g("pageSize",i.pageSize)("pageSizeOptions",oe(15,ihe))("length",i.totalRows),a(),g("hidden",!i.notExistsClientsToFilter),a(3),v(" ",m(34,13,"labels.text.No client was found")," "))},dependencies:[ue,co,fe,Ae,$e,Fe,ze,ve,fi,Ke,ke,os,_t,It,xt,vt,bt,ri,Ct,yt,rc,Ea,St,Pt,wt,Tt,kt,he,go],styles:[".container[_ngcontent-%COMP%]{padding:24px}.container[_ngcontent-%COMP%] .layout-column[_ngcontent-%COMP%], .container[_ngcontent-%COMP%] .layout-gt-sm-row[_ngcontent-%COMP%]{display:flex;align-items:center;margin-bottom:20px;flex-wrap:nowrap;gap:20px}.container[_ngcontent-%COMP%] .layout-column.align-gt-sm-start-center[_ngcontent-%COMP%], .container[_ngcontent-%COMP%] .layout-gt-sm-row.align-gt-sm-start-center[_ngcontent-%COMP%]{align-items:center;justify-content:flex-start}.container[_ngcontent-%COMP%] .layout-column[_ngcontent-%COMP%] .search-box[_ngcontent-%COMP%], .container[_ngcontent-%COMP%] .layout-gt-sm-row[_ngcontent-%COMP%] .search-box[_ngcontent-%COMP%]{display:flex;align-items:center;gap:15px;flex:1;min-width:0}.container[_ngcontent-%COMP%] .layout-column[_ngcontent-%COMP%] .search-box.m-r-30[_ngcontent-%COMP%], .container[_ngcontent-%COMP%] .layout-gt-sm-row[_ngcontent-%COMP%] .search-box.m-r-30[_ngcontent-%COMP%]{margin-right:30px}.container[_ngcontent-%COMP%] .layout-column[_ngcontent-%COMP%] .search-box[_ngcontent-%COMP%] mat-form-field[_ngcontent-%COMP%], .container[_ngcontent-%COMP%] .layout-gt-sm-row[_ngcontent-%COMP%] .search-box[_ngcontent-%COMP%] mat-form-field[_ngcontent-%COMP%]{min-width:200px;flex:1}.container[_ngcontent-%COMP%] .layout-column[_ngcontent-%COMP%] .search-box[_ngcontent-%COMP%] mat-form-field.search-box[_ngcontent-%COMP%], .container[_ngcontent-%COMP%] .layout-gt-sm-row[_ngcontent-%COMP%] .search-box[_ngcontent-%COMP%] mat-form-field.search-box[_ngcontent-%COMP%]{width:auto}.container[_ngcontent-%COMP%] .layout-column[_ngcontent-%COMP%] .search-box[_ngcontent-%COMP%] mat-form-field[_ngcontent-%COMP%] + mat-form-field[_ngcontent-%COMP%], .container[_ngcontent-%COMP%] .layout-gt-sm-row[_ngcontent-%COMP%] .search-box[_ngcontent-%COMP%] mat-form-field[_ngcontent-%COMP%] + mat-form-field[_ngcontent-%COMP%]{margin-left:15px}.container[_ngcontent-%COMP%] .layout-column[_ngcontent-%COMP%] .search-box[_ngcontent-%COMP%] mat-checkbox[_ngcontent-%COMP%], .container[_ngcontent-%COMP%] .layout-gt-sm-row[_ngcontent-%COMP%] .search-box[_ngcontent-%COMP%] mat-checkbox[_ngcontent-%COMP%]{white-space:nowrap;flex-shrink:0;margin-left:15px}.container[_ngcontent-%COMP%] .layout-column[_ngcontent-%COMP%] .search-box[_ngcontent-%COMP%] mat-checkbox.m-r-10[_ngcontent-%COMP%], .container[_ngcontent-%COMP%] .layout-gt-sm-row[_ngcontent-%COMP%] .search-box[_ngcontent-%COMP%] mat-checkbox.m-r-10[_ngcontent-%COMP%]{margin-right:10px}.container[_ngcontent-%COMP%] .layout-column[_ngcontent-%COMP%] .action-button[_ngcontent-%COMP%], .container[_ngcontent-%COMP%] .layout-gt-sm-row[_ngcontent-%COMP%] .action-button[_ngcontent-%COMP%]{display:flex;align-items:center;flex-shrink:0;margin-left:auto}.container[_ngcontent-%COMP%] .layout-column[_ngcontent-%COMP%] .action-button.gap-25px[_ngcontent-%COMP%], .container[_ngcontent-%COMP%] .layout-gt-sm-row[_ngcontent-%COMP%] .action-button.gap-25px[_ngcontent-%COMP%]{gap:25px}.container[_ngcontent-%COMP%] .layout-column[_ngcontent-%COMP%] .action-button[_ngcontent-%COMP%] button[_ngcontent-%COMP%], .container[_ngcontent-%COMP%] .layout-gt-sm-row[_ngcontent-%COMP%] .action-button[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{white-space:nowrap}.container[_ngcontent-%COMP%] .layout-column[_ngcontent-%COMP%] .action-button[_ngcontent-%COMP%] button[_ngcontent-%COMP%] fa-icon.m-r-10[_ngcontent-%COMP%], .container[_ngcontent-%COMP%] .layout-column[_ngcontent-%COMP%] .action-button[_ngcontent-%COMP%] button[_ngcontent-%COMP%] fa-icon.m-r-20[_ngcontent-%COMP%], .container[_ngcontent-%COMP%] .layout-gt-sm-row[_ngcontent-%COMP%] .action-button[_ngcontent-%COMP%] button[_ngcontent-%COMP%] fa-icon.m-r-10[_ngcontent-%COMP%], .container[_ngcontent-%COMP%] .layout-gt-sm-row[_ngcontent-%COMP%] .action-button[_ngcontent-%COMP%] button[_ngcontent-%COMP%] fa-icon.m-r-20[_ngcontent-%COMP%]{margin-right:10px}.container[_ngcontent-%COMP%] .bordered-table[_ngcontent-%COMP%]{width:100%;border:1px solid #e0e0e0;border-radius:4px;overflow:hidden;margin-top:16px}.container[_ngcontent-%COMP%] .bordered-table[_ngcontent-%COMP%] .select-row[_ngcontent-%COMP%]{cursor:pointer}.container[_ngcontent-%COMP%] .bordered-table[_ngcontent-%COMP%] .select-row[_ngcontent-%COMP%]:hover{background-color:#f5f5f5}.container[_ngcontent-%COMP%] .bordered-table[_ngcontent-%COMP%] th[_ngcontent-%COMP%], .container[_ngcontent-%COMP%] .bordered-table[_ngcontent-%COMP%] td[_ngcontent-%COMP%]{padding:12px 16px}.container[_ngcontent-%COMP%] .bordered-table[_ngcontent-%COMP%] th[_ngcontent-%COMP%]{font-weight:500;border-bottom:1px solid #e0e0e0}.container[_ngcontent-%COMP%] .bordered-table[_ngcontent-%COMP%] tr[_ngcontent-%COMP%]{border-bottom:1px solid #f0f0f0}.container[_ngcontent-%COMP%] .bordered-table[_ngcontent-%COMP%] tr[_ngcontent-%COMP%]:last-child{border-bottom:none}.container[_ngcontent-%COMP%] mat-paginator[_ngcontent-%COMP%]{border-top:1px solid #e0e0e0;margin-top:0}.container[_ngcontent-%COMP%] mat-progress-bar[_ngcontent-%COMP%]{margin:0}@media (width <= 768px){.container[_ngcontent-%COMP%]{padding:16px}.container[_ngcontent-%COMP%] .layout-column[_ngcontent-%COMP%], .container[_ngcontent-%COMP%] .layout-gt-sm-row[_ngcontent-%COMP%]{flex-wrap:wrap}.container[_ngcontent-%COMP%] .layout-column[_ngcontent-%COMP%] .search-box[_ngcontent-%COMP%], .container[_ngcontent-%COMP%] .layout-gt-sm-row[_ngcontent-%COMP%] .search-box[_ngcontent-%COMP%]{width:100%;margin-right:0!important;margin-bottom:15px;flex-wrap:wrap}.container[_ngcontent-%COMP%] .layout-column[_ngcontent-%COMP%] .search-box[_ngcontent-%COMP%] mat-form-field[_ngcontent-%COMP%], .container[_ngcontent-%COMP%] .layout-gt-sm-row[_ngcontent-%COMP%] .search-box[_ngcontent-%COMP%] mat-form-field[_ngcontent-%COMP%]{min-width:150px;margin-bottom:10px}.container[_ngcontent-%COMP%] .layout-column[_ngcontent-%COMP%] .search-box[_ngcontent-%COMP%] mat-form-field[_ngcontent-%COMP%] + mat-form-field[_ngcontent-%COMP%], .container[_ngcontent-%COMP%] .layout-gt-sm-row[_ngcontent-%COMP%] .search-box[_ngcontent-%COMP%] mat-form-field[_ngcontent-%COMP%] + mat-form-field[_ngcontent-%COMP%]{margin-left:0}.container[_ngcontent-%COMP%] .layout-column[_ngcontent-%COMP%] .search-box[_ngcontent-%COMP%] mat-checkbox[_ngcontent-%COMP%], .container[_ngcontent-%COMP%] .layout-gt-sm-row[_ngcontent-%COMP%] .search-box[_ngcontent-%COMP%] mat-checkbox[_ngcontent-%COMP%]{margin-left:0;margin-top:10px}.container[_ngcontent-%COMP%] .layout-column[_ngcontent-%COMP%] .action-button[_ngcontent-%COMP%], .container[_ngcontent-%COMP%] .layout-gt-sm-row[_ngcontent-%COMP%] .action-button[_ngcontent-%COMP%]{margin-left:0;width:100%;justify-content:center}.container[_ngcontent-%COMP%] .layout-column[_ngcontent-%COMP%] .action-button.gap-25px[_ngcontent-%COMP%], .container[_ngcontent-%COMP%] .layout-gt-sm-row[_ngcontent-%COMP%] .action-button.gap-25px[_ngcontent-%COMP%]{gap:15px}}table[_ngcontent-%COMP%]{width:100%}table[_ngcontent-%COMP%] tr.select-row[_ngcontent-%COMP%]:hover{cursor:pointer}.m-r-10[_ngcontent-%COMP%]{margin-right:10px!important}.m-r-20[_ngcontent-%COMP%]{margin-right:20px!important}.m-r-30[_ngcontent-%COMP%]{margin-right:30px!important}"]})}}return e})();var yhe=()=>({confirm:!0}),OC=(()=>{class e{constructor(){this.dialogRef=T(eo)}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275cmp=me({type:e,selectors:[["mifosx-unassign-staff-dialog"]],decls:14,vars:14,consts:[["mat-dialog-title",""],["mat-dialog-content",""],["align","end"],["mat-raised-button","","mat-dialog-close",""],["mat-raised-button","","color","warn",3,"mat-dialog-close"]],template:function(n,i){n&1&&(l(0,"h1",0),c(1),p(2,"translate"),r(),l(3,"div",1)(4,"p"),c(5),p(6,"translate"),r()(),l(7,"mat-dialog-actions",2)(8,"button",3),c(9),p(10,"translate"),r(),l(11,"button",4),c(12),p(13,"translate"),r()()),n&2&&(a(),h(m(2,5,"labels.heading.Unassign Staff")),a(4),v("",m(6,7,"labels.text.Unassign Staff client")," ?"),a(4),h(m(10,9,"labels.buttons.Cancel")),a(2),g("mat-dialog-close",oe(13,yhe)),a(),v(" ",m(13,11,"labels.buttons.Confirm")," "))},dependencies:[ue,fe,ve,Wn,ho,Nn,Un,he],encapsulation:2})}}return e})();var AC=(()=>{class e{constructor(){this.dialogRef=T(eo)}onFileSelect(t){t.target.files.length>0&&(this.signature=t.target.files[0])}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275cmp=me({type:e,selectors:[["mifosx-upload-signature-dialog"]],decls:12,vars:11,consts:[["mat-dialog-title",""],["flex","60%","acceptFilter",".png,.jpeg,.jpg",3,"change"],["align","end"],["mat-raised-button","","mat-dialog-close",""],["mat-raised-button","","color","primary",3,"disabled","mat-dialog-close"]],template:function(n,i){n&1&&(l(0,"h1",0),c(1),p(2,"translate"),r(),l(3,"div")(4,"mifosx-file-upload",1),R("change",function(d){return i.onFileSelect(d)}),r(),l(5,"mat-dialog-actions",2)(6,"button",3),c(7),p(8,"translate"),r(),l(9,"button",4),c(10),p(11,"translate"),r()()()),n&2&&(a(),h(m(2,5,"labels.heading.Upload Client Signature")),a(6),h(m(8,7,"labels.buttons.Cancel")),a(2),g("disabled",!i.signature)("mat-dialog-close",i.signature),a(),v(" ",m(11,9,"labels.buttons.Confirm")," "))},dependencies:[ue,fe,ve,Wn,wp,Nn,Un,he],encapsulation:2})}}return e})();var G9=Es(H9());var Zhe=()=>({delete:!0}),ege=()=>({upload:!0});function tge(e,o){if(e&1&&(l(0,"div",1),b(1,"img",6),r()),e&2){let t=w();a(),g("src",t.signatureImage,f0)}}function ige(e,o){e&1&&(l(0,"div",1)(1,"p"),c(2),p(3,"translate"),r()()),e&2&&(a(2),h(m(3,1,"labels.text.Client Signature is not provided.")))}function nge(e,o){e&1&&(l(0,"button",4),c(1),p(2,"translate"),r()),e&2&&(g("mat-dialog-close",oe(4,Zhe)),a(),v(" ",m(2,2,"labels.buttons.Delete")," "))}function oge(e,o){e&1&&(l(0,"button",5),c(1),p(2,"translate"),r()),e&2&&(g("mat-dialog-close",oe(4,ege)),a(),v(" ",m(2,2,"labels.buttons.Upload")," "))}var RC=(()=>{class e{constructor(){this.dialogRef=T(eo),this.clientsService=T(Oi),this.sanitizer=T(Zs),this.data=T(Po);let t=this.data.documents.find(n=>n.name==="clientSignature")||{};this.signatureId=t.id,this.clientId=this.data.id}ngOnInit(){this.signatureId&&this.clientsService.getClientSignatureImage(this.clientId,this.signatureId).subscribe(t=>qn(this,null,function*(){let n=G9.Buffer.from(yield t.arrayBuffer());this.signatureImage="data:"+t.type+";base64,"+n.toString("base64")}),t=>{})}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275cmp=me({type:e,selectors:[["mifosx-view-signature-dialog"]],decls:11,vars:10,consts:[["mat-dialog-title",""],["mat-dialog-content",""],["align","end"],["mat-raised-button","","mat-dialog-close",""],["mat-raised-button","","color","warn",3,"mat-dialog-close"],["mat-raised-button","","color","primary",3,"mat-dialog-close"],["alt","Signature",3,"src"]],template:function(n,i){n&1&&(l(0,"h1",0),c(1),p(2,"translate"),r(),E(3,tge,2,1,"div",1),E(4,ige,4,3,"div",1),l(5,"mat-dialog-actions",2)(6,"button",3),c(7),p(8,"translate"),r(),E(9,nge,3,5,"button",4),E(10,oge,3,5,"button",5),r()),n&2&&(a(),h(m(2,6,"labels.heading.View Client Signature")),a(2),I(i.signatureId?3:-1),a(),I(i.signatureId?-1:4),a(3),h(m(8,8,"labels.buttons.Close")),a(2),I(i.signatureId?9:-1),a(),I(i.signatureId?-1:10))},dependencies:[ue,fe,ve,Wn,ho,Nn,Un,he],encapsulation:2})}}return e})();var age=e=>({delete:!0,id:e}),rge=()=>({upload:!0});function lge(e,o){e&1&&(l(0,"div",1)(1,"p"),c(2),p(3,"translate"),r()()),e&2&&(a(2),v("",m(3,1,"labels.text.Delete clients signature")," ?"))}function sge(e,o){e&1&&(l(0,"div",1)(1,"p"),c(2),p(3,"translate"),r()()),e&2&&(a(2),h(m(3,1,"labels.text.Client Signature is not provided.")))}function cge(e,o){if(e&1&&(l(0,"button",4),c(1),p(2,"translate"),r()),e&2){let t=w();g("mat-dialog-close",Nt(4,age,t.signatureId)),a(),v(" ",m(2,2,"labels.buttons.Confirm")," ")}}function pge(e,o){e&1&&(l(0,"button",5),c(1),p(2,"translate"),r()),e&2&&(g("mat-dialog-close",oe(4,rge)),a(),v(" ",m(2,2,"labels.buttons.Upload")," "))}var NC=(()=>{class e{constructor(){this.dialogRef=T(eo),this.data=T(Po);let t=this.data.find(n=>n.name==="clientSignature")||{};this.signatureId=t.id}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275cmp=me({type:e,selectors:[["mifosx-delete-signature-dialog"]],decls:11,vars:10,consts:[["mat-dialog-title",""],["mat-dialog-content",""],["align","end"],["mat-raised-button","","mat-dialog-close",""],["mat-raised-button","","color","warn",3,"mat-dialog-close"],["mat-raised-button","","color","primary",3,"mat-dialog-close"]],template:function(n,i){n&1&&(l(0,"h1",0),c(1),p(2,"translate"),r(),E(3,lge,4,3,"div",1),E(4,sge,4,3,"div",1),l(5,"mat-dialog-actions",2)(6,"button",3),c(7),p(8,"translate"),r(),E(9,cge,3,6,"button",4),E(10,pge,3,5,"button",5),r()),n&2&&(a(),h(m(2,6,"labels.heading.Delete Client Signature")),a(2),I(i.signatureId?3:-1),a(),I(i.signatureId?-1:4),a(3),h(m(8,8,"labels.buttons.Cancel")),a(2),I(i.signatureId?9:-1),a(),I(i.signatureId?-1:10))},dependencies:[ue,fe,ve,Wn,ho,Nn,Un,he],encapsulation:2})}}return e})();var LC=(()=>{class e{constructor(){this.dialogRef=T(eo)}onFileSelect(t){t.target.files.length>0&&(this.image=t.target.files[0])}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275cmp=me({type:e,selectors:[["mifosx-upload-image-dialog"]],decls:12,vars:11,consts:[["mat-dialog-title",""],["flex","60%","acceptFilter",".png,.jpeg,.jpg",3,"change"],["align","end"],["mat-raised-button","","mat-dialog-close",""],["mat-raised-button","","color","primary",3,"disabled","mat-dialog-close"]],template:function(n,i){n&1&&(l(0,"h1",0),c(1),p(2,"translate"),r(),l(3,"div")(4,"mifosx-file-upload",1),R("change",function(d){return i.onFileSelect(d)}),r(),l(5,"mat-dialog-actions",2)(6,"button",3),c(7),p(8,"translate"),r(),l(9,"button",4),c(10),p(11,"translate"),r()()()),n&2&&(a(),h(m(2,5,"labels.heading.Upload Client Image")),a(6),h(m(8,7,"labels.buttons.Cancel")),a(2),g("disabled",!i.image)("mat-dialog-close",i.image),a(),v(" ",m(11,9,"labels.buttons.Confirm")," "))},dependencies:[ue,fe,ve,Wn,wp,Nn,Un,he],encapsulation:2})}}return e})();var mge=["video"],dge=["canvas"],uge=["fallback"],fge=["captureButton"],j9=()=>({display:"none"});function hge(e,o){if(e&1){let t=Y();l(0,"button",14,3),R("click",function(){V(t);let i=w();return q(i.capture())}),c(2),p(3,"translate"),r()}e&2&&(a(2),v(" ",m(3,1,"labels.buttons.Capture")," "))}function gge(e,o){if(e&1){let t=Y();l(0,"button",14),R("click",function(){V(t);let i=w();return q(i.recapture())}),b(1,"fa-icon",15),c(2),p(3,"translate"),r()}e&2&&(a(2),v("",m(3,1,"labels.buttons.Recapture")," "))}var VC=(()=>{class e{constructor(){this.dialogRef=T(eo),this.renderer=T(_g),this.isCaptured=!1}ngAfterViewInit(){this.startCamera()}ngOnDestroy(){this.stopCamera()}startCamera(){if(navigator.mediaDevices&&navigator.mediaDevices.getUserMedia){let t={width:{ideal:640},height:{ideal:480},facingMode:"user"};navigator.mediaDevices.getUserMedia({video:t}).then(n=>{this.renderer.setProperty(this.video.nativeElement,"srcObject",n),this.video.nativeElement.play()}).catch(n=>{this.handleError(n)})}else throw new Error("Cannot connect to camera")}handleError(t){this.renderer.removeStyle(this.fallback.nativeElement,"display");let n=this.renderer.createText(`${t.name}: ${t.message}`);this.renderer.appendChild(this.fallback.nativeElement,n),this.renderer.setStyle(this.video.nativeElement,"display","none"),this.renderer.setProperty(this.captureButton,"disabled","true")}stopCamera(){let t=this.video.nativeElement.srcObject;t&&t.getTracks()[0].stop(),this.renderer.setProperty(this.video.nativeElement,"srcObject",null)}capture(){this.isCaptured=!0,this.video.nativeElement.pause();let t=this.video.nativeElement.videoWidth,n=this.video.nativeElement.videoHeight;this.canvas.nativeElement.width=t,this.canvas.nativeElement.height=n,this.canvas.nativeElement.getContext("2d").drawImage(this.video.nativeElement,0,0,t,n),this.clientImageDataURL=this.canvas.nativeElement.toDataURL("image/jpeg",.9)}recapture(){this.isCaptured=!1,this.video.nativeElement.play()}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275cmp=me({type:e,selectors:[["mifosx-capture-image-dialog"]],viewQuery:function(n,i){if(n&1&&(Ee(mge,7),Ee(dge,7),Ee(uge,7),Ee(fge,5)),n&2){let s;Te(s=Me())&&(i.video=s.first),Te(s=Me())&&(i.canvas=s.first),Te(s=Me())&&(i.fallback=s.first),Te(s=Me())&&(i.captureButton=s.first)}},decls:20,vars:17,consts:[["video",""],["canvas",""],["fallback",""],["captureButton",""],[1,"layout-column","gap-2px"],["mat-dialog-title","","align","center"],["autoplay","",1,"capture-video"],[3,"ngStyle"],["align","center",3,"ngStyle"],["align","center",1,"flex-20"],["mat-stroked-button","","color","primary"],["align","end"],["mat-raised-button","","mat-dialog-close",""],["mat-raised-button","","color","primary",3,"disabled","mat-dialog-close"],["mat-stroked-button","","color","primary",3,"click"],["icon","undo","size","sm",1,"m-r-10"]],template:function(n,i){n&1&&(l(0,"div",4)(1,"h1",5),c(2),p(3,"translate"),r(),b(4,"video",6,0)(6,"canvas",7,1)(8,"p",8,2),l(10,"div",9),E(11,hge,4,3,"button",10),E(12,gge,4,3,"button",10),r(),l(13,"mat-dialog-actions",11)(14,"button",12),c(15),p(16,"translate"),r(),l(17,"button",13),c(18),p(19,"translate"),r()()()),n&2&&(a(2),h(m(3,9,"labels.heading.Capture Client Image")),a(4),g("ngStyle",oe(15,j9)),a(2),g("ngStyle",oe(16,j9)),a(3),I(i.isCaptured?-1:11),a(),I(i.isCaptured?12:-1),a(3),h(m(16,11,"labels.buttons.Cancel")),a(2),g("disabled",!i.isCaptured)("mat-dialog-close",i.clientImageDataURL),a(),v(" ",m(19,13,"labels.buttons.Upload")," "))},dependencies:[ue,ns,fe,ve,Wn,ke,Nn,Un,he],styles:[".column-mandatory[_ngcontent-%COMP%]{color:#5cb85c;text-align:center}.not-column-mandatory[_ngcontent-%COMP%]{color:#666f73;text-align:center}.cdk-drag-placeholder[_ngcontent-%COMP%]{background:#3498db}.yes[_ngcontent-%COMP%]{color:#5cb85c!important;background-color:#5cb85c;height:4px;cursor:none}.no[_ngcontent-%COMP%]{color:red;background-color:red;height:4px;cursor:none}.strike[_ngcontent-%COMP%]{text-decoration:line-through;color:red}.transfer[_ngcontent-%COMP%]{color:#16a085}.linked[_ngcontent-%COMP%]{color:#4461e2}.accrual[_ngcontent-%COMP%]{color:#999}.fa-question[_ngcontent-%COMP%]{color:#4461e2}.enabled[_ngcontent-%COMP%]{color:#32cd32}.disabled[_ngcontent-%COMP%]{color:#f44366}.capture-video[_ngcontent-%COMP%]{width:100%;max-width:640px;height:auto;object-fit:contain;border-radius:4px;background-color:#000}"]})}}return e})();var _ge=()=>["./general"],Cge=()=>["./address"],vge=()=>["./family-members"],xge=()=>["edit"],bge=()=>["loans-accounts","create"],yge=()=>["savings-accounts","create"],Sge=()=>["shares-accounts","create"],wge=()=>["recurring-deposits-accounts","create-recurring-deposits-account"],Pge=()=>["fixed-deposits-accounts","create"],Tge=()=>["./identities"],Mge=()=>["./documents"],Dge=()=>["./notes"],Ege=e=>["./datatables",e];function Ige(e,o){if(e&1){let t=Y();l(0,"button",45),p(1,"translate"),R("click",function(){V(t);let i=w();return q(i.doAction("Upload Image"))}),b(2,"i",46),r()}e&2&&g("matTooltip",Le(m(1,2,"tooltips.Upload Image")))}function Oge(e,o){if(e&1){let t=Y();l(0,"button",45),p(1,"translate"),R("click",function(){V(t);let i=w();return q(i.doAction("Capture Image"))}),b(2,"i",47),r()}e&2&&g("matTooltip",Le(m(1,2,"tooltips.Capture Image")))}function Age(e,o){if(e&1){let t=Y();l(0,"button",45),p(1,"translate"),R("click",function(){V(t);let i=w();return q(i.doAction("Delete Image"))}),b(2,"i",48),r()}e&2&&g("matTooltip",Le(m(1,2,"tooltips.Delete Image")))}function Fge(e,o){if(e&1&&(l(0,"tr")(1,"td")(2,"b"),c(3),p(4,"translate"),r()(),l(5,"td"),c(6),p(7,"dateFormat"),r()()),e&2){let t=w();a(3),h(m(4,2,"labels.inputs.Activation Date")),a(3),h(m(7,4,t.clientViewData.activationDate))}}function kge(e,o){if(e&1&&(l(0,"td"),c(1),r()),e&2){let t=w();a(),h(t.clientViewData.staffName)}}function Bge(e,o){e&1&&(l(0,"td"),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.Unassigned")))}function Rge(e,o){if(e&1&&(l(0,"span")(1,"span",49),c(2),r()()),e&2){let t=o.$implicit;a(2),h(t.name)}}function Nge(e,o){if(e&1&&(l(0,"tr")(1,"td")(2,"b"),c(3),p(4,"translate"),r()(),l(5,"td"),Se(6,Rge,3,1,"span",null,Pe),r()()),e&2){let t=w();a(3),h(m(4,1,"labels.inputs.Member Of")),a(3),we(t.clientViewData.groups)}}function Lge(e,o){if(e&1&&(l(0,"tr")(1,"td")(2,"b"),c(3),p(4,"translate"),r()(),l(5,"td"),c(6),r()()),e&2){let t=w();a(3),h(m(4,2,"labels.inputs.Client Type")),a(3),h(t.clientViewData.clientType.name)}}function Vge(e,o){e&1&&(l(0,"button",50)(1,"mat-icon",36),b(2,"fa-icon",51),r(),l(3,"span"),c(4),p(5,"translate"),r()()),e&2&&(g("routerLink",oe(4,xge)),a(4),h(m(5,2,"labels.buttons.Edit")))}function qge(e,o){if(e&1&&(l(0,"button",35)(1,"mat-icon",36),b(2,"fa-icon",52),r(),l(3,"span"),c(4),p(5,"translate"),r()()),e&2){w();let t=xe(97);g("matMenuTriggerFor",t),a(4),h(m(5,2,"labels.buttons.Applications"))}}function zge(e,o){if(e&1){let t=Y();l(0,"button",39),R("click",function(){V(t);let i=w();return q(i.doAction("Assign Staff"))}),l(1,"mat-icon",36),b(2,"fa-icon",53),r(),l(3,"span"),c(4),p(5,"translate"),r()()}e&2&&(a(4),h(m(5,1,"labels.buttons.Assign Staff")))}function Hge(e,o){if(e&1){let t=Y();l(0,"button",39),R("click",function(){V(t);let i=w(2);return q(i.doAction("Unassign Staff"))}),l(1,"mat-icon",36),b(2,"fa-icon",53),r(),l(3,"span"),c(4),p(5,"translate"),r()()}e&2&&(a(4),h(m(5,1,"labels.buttons.Unassign Staff")))}function Gge(e,o){e&1&&(l(0,"span"),F(1,Hge,6,3,"button",40),r()),e&2&&(a(),g("mifosxHasPermission","UNASSIGNSTAFF_CLIENT"))}function jge(e,o){e&1&&(l(0,"button",50),c(1),p(2,"translate"),r()),e&2&&(g("routerLink",oe(4,bge)),a(),v(" ",m(2,2,"labels.buttons.New Loan Account")," "))}function $ge(e,o){e&1&&(l(0,"button",50),c(1),p(2,"translate"),r()),e&2&&(g("routerLink",oe(4,yge)),a(),v(" ",m(2,2,"labels.buttons.New Savings Account")," "))}function Uge(e,o){e&1&&(l(0,"button",50),c(1),p(2,"translate"),r()),e&2&&(g("routerLink",oe(4,Sge)),a(),v(" ",m(2,2,"labels.buttons.New Share Account")," "))}function Wge(e,o){e&1&&(l(0,"button",50),c(1),p(2,"translate"),r()),e&2&&(g("routerLink",oe(4,wge)),a(),v(" ",m(2,2,"labels.buttons.New Recurring Deposit Account")," "))}function Qge(e,o){e&1&&(l(0,"button",50),c(1),p(2,"translate"),r()),e&2&&(g("routerLink",oe(4,Pge)),a(),v(" ",m(2,2,"labels.buttons.New Fixed Deposits Account")," "))}function Yge(e,o){if(e&1){let t=Y();l(0,"span")(1,"button",39),R("click",function(){V(t);let i=w();return q(i.doAction("Activate"))}),c(2),p(3,"translate"),r()()}e&2&&(a(2),v(" ",m(3,1,"labels.buttons.Activate")," "))}function Jge(e,o){if(e&1){let t=Y();l(0,"span")(1,"button",39),R("click",function(){V(t);let i=w();return q(i.doAction("Withdraw"))}),c(2),p(3,"translate"),r()()}e&2&&(a(2),v(" ",m(3,1,"labels.buttons.Withdraw")," "))}function Kge(e,o){if(e&1){let t=Y();l(0,"span")(1,"button",39),R("click",function(){V(t);let i=w();return q(i.doAction("Reject"))}),c(2),p(3,"translate"),r()()}e&2&&(a(2),h(m(3,1,"labels.buttons.Reject")))}function Xge(e,o){if(e&1){let t=Y();l(0,"button",39),R("click",function(){V(t);let i=w(2);return q(i.doAction("Delete"))}),c(1),p(2,"translate"),r()}e&2&&(a(),v(" ",m(2,1,"labels.buttons.Delete")," "))}function Zge(e,o){e&1&&(l(0,"span"),F(1,Xge,3,3,"button",40),r()),e&2&&(a(),g("mifosxHasPermission","DELETE_CLIENT"))}function e_e(e,o){if(e&1){let t=Y();l(0,"span")(1,"button",39),R("click",function(){V(t);let i=w();return q(i.doAction("Reactivate"))}),c(2),p(3,"translate"),r()()}e&2&&(a(2),v(" ",m(3,1,"labels.buttons.Reactivate")," "))}function t_e(e,o){if(e&1){let t=Y();l(0,"span")(1,"button",39),R("click",function(){V(t);let i=w();return q(i.doAction("Undo Rejection"))}),c(2),p(3,"translate"),r()()}e&2&&(a(2),v(" ",m(3,1,"labels.buttons.Undo Rejection")," "))}function i_e(e,o){if(e&1){let t=Y();l(0,"span")(1,"button",39),R("click",function(){V(t);let i=w();return q(i.doAction("Undo Transfer"))}),c(2),p(3,"translate"),r()()}e&2&&(a(2),v(" ",m(3,1,"labels.buttons.Undo Transfer")," "))}function n_e(e,o){if(e&1){let t=Y();l(0,"span")(1,"button",39),R("click",function(){V(t);let i=w();return q(i.doAction("Accept Transfer"))}),c(2),p(3,"translate"),r()()}e&2&&(a(2),v(" ",m(3,1,"labels.buttons.Accept Transfer")," "))}function o_e(e,o){if(e&1){let t=Y();l(0,"span")(1,"button",39),R("click",function(){V(t);let i=w();return q(i.doAction("Reject Transfer"))}),c(2),p(3,"translate"),r()()}e&2&&(a(2),v(" ",m(3,1,"labels.buttons.Reject transfer")," "))}function a_e(e,o){if(e&1){let t=Y();l(0,"button",39),R("click",function(){V(t);let i=w();return q(i.doAction("Add Charge"))}),c(1),p(2,"translate"),r()}e&2&&(a(),v(" ",m(2,1,"labels.buttons.Add Charge")," "))}function r_e(e,o){if(e&1){let t=Y();l(0,"button",39),R("click",function(){V(t);let i=w();return q(i.doAction("Update Default Savings"))}),c(1),p(2,"translate"),r()}e&2&&(a(),v(" ",m(2,1,"labels.buttons.Update Default Savings")," "))}function l_e(e,o){if(e&1){let t=Y();l(0,"button",39),R("click",function(){V(t);let i=w();return q(i.doAction("Upload Signature"))}),c(1),p(2,"translate"),r()}e&2&&(a(),v(" ",m(2,1,"labels.buttons.Upload Signature")," "))}function s_e(e,o){if(e&1){let t=Y();l(0,"button",39),R("click",function(){V(t);let i=w();return q(i.doAction("Delete Signature"))}),c(1),p(2,"translate"),r()}e&2&&(a(),v(" ",m(2,1,"labels.buttons.Delete Signature")," "))}function c_e(e,o){if(e&1){let t=Y();l(0,"button",39),R("click",function(){V(t);let i=w();return q(i.doAction("Create Standing Instructions"))}),c(1),p(2,"translate"),r()}e&2&&(a(),v(" ",m(2,1,"labels.buttons.Create Standing Instructions")," "))}function p_e(e,o){if(e&1){let t=Y();l(0,"button",39),R("click",function(){V(t);let i=w(2);return q(i.doAction("View Standing Instructions"))}),c(1),p(2,"translate"),r()}e&2&&(a(),v(" ",m(2,1,"labels.buttons.View Standing Instructions")," "))}function m_e(e,o){e&1&&(l(0,"span"),F(1,p_e,3,3,"button",40),r()),e&2&&(a(),g("mifosxHasPermission","READ_STANDINGINSTRUCTION"))}function d_e(e,o){if(e&1&&(l(0,"a",43,8),c(2),p(3,"translate"),r()),e&2){let t=xe(1);g("routerLink",oe(5,Tge))("active",t.isActive),a(2),v(" ",m(3,3,"labels.inputs.Identities")," ")}}function u_e(e,o){if(e&1&&(l(0,"a",43,9),c(2),p(3,"translate"),r()),e&2){let t=xe(1);g("routerLink",oe(5,Mge))("active",t.isActive),a(2),v(" ",m(3,3,"labels.inputs.Documents")," ")}}function f_e(e,o){if(e&1&&(l(0,"a",43,10),c(2),p(3,"translate"),r()),e&2){let t=xe(1);g("routerLink",oe(5,Dge))("active",t.isActive),a(2),v(" ",m(3,3,"labels.inputs.Notes")," ")}}function h_e(e,o){if(e&1&&(l(0,"a",43,11),c(2),r()),e&2){let t=xe(1),n=w().$implicit;g("routerLink",Nt(3,Ege,n.registeredTableName))("active",t.isActive),a(2),v(" ",n.registeredTableName," ")}}function g_e(e,o){if(e&1&&F(0,h_e,3,5,"a",44),e&2){let t=o.$implicit;g("mifosxHasPermission","READ_"+t.registeredTableName)}}var qC=(()=>{class e{constructor(){this.route=T(Ie),this.router=T(qe),this.clientsService=T(Oi),this._sanitizer=T(Zs),this.dialog=T(Ht),this.route.data.subscribe(t=>{this.clientViewData=t.clientViewData,this.clientDatatables=t.clientDatatables,this.clientTemplateData=t.clientTemplateData})}ngOnInit(){this.clientsService.getClientProfileImage(this.clientViewData.id).subscribe({next:t=>{t?this.clientImage=this._sanitizer.bypassSecurityTrustResourceUrl(t):this.clientImage=null},error:t=>{console.error("Error loading client profile image:",t),this.clientImage=null}})}isActive(){return this.clientViewData.status.value==="Active"}doAction(t){switch(t){case"Assign Staff":case"Close":case"Survey":case"Reject":case"Activate":case"Withdraw":case"Update Default Savings":case"Transfer Client":case"Undo Transfer":case"Accept Transfer":case"Reject Transfer":case"Reactivate":case"Undo Rejection":case"Add Charge":case"Create Collateral":case"Client Screen Reports":this.router.navigate([`actions/${t}`],{relativeTo:this.route});break;case"Unassign Staff":this.unassignStaff();break;case"Delete":this.deleteClient();break;case"View Signature":this.viewSignature();break;case"Upload Signature":this.uploadSignature();break;case"Delete Signature":this.deleteSignature();break;case"Capture Image":this.captureProfileImage();break;case"Upload Image":this.uploadProfileImage();break;case"Delete Image":this.deleteProfileImage();break;case"Create Standing Instructions":let n={officeId:this.clientViewData.officeId,accountType:"fromsavings"};this.router.navigate(["standing-instructions/create-standing-instructions"],{relativeTo:this.route,queryParams:n});break;case"View Standing Instructions":let i={officeId:this.clientViewData.officeId,accountType:"fromsavings"};this.router.navigate(["standing-instructions/list-standing-instructions"],{relativeTo:this.route,queryParams:i});break}}reload(){let t=this.router.url;this.router.navigateByUrl("/clients",{skipLocationChange:!0}).then(()=>this.router.navigate([t]))}deleteClient(){this.dialog.open(vi,{data:{deleteContext:`client with id: ${this.clientViewData.id}`}}).afterClosed().subscribe(n=>{n.delete&&this.clientsService.deleteClient(this.clientViewData.id).subscribe(()=>{this.router.navigate(["/clients"],{relativeTo:this.route})})})}unassignStaff(){this.dialog.open(OC).afterClosed().subscribe(n=>{n.confirm&&this.clientsService.executeClientCommand(this.clientViewData.id,"unassignStaff",{staffId:this.clientViewData.staffId}).subscribe(()=>{this.reload()})})}viewSignature(){this.clientsService.getClientDocuments(this.clientViewData.id).subscribe(t=>{this.dialog.open(RC,{data:{documents:t,id:this.clientViewData.id}}).afterClosed().subscribe(i=>{i.upload?this.uploadSignature():i.delete&&this.deleteSignature()})})}uploadSignature(){this.dialog.open(AC).afterClosed().subscribe(n=>{n&&this.clientsService.uploadClientSignatureImage(this.clientViewData.id,n).subscribe(()=>{this.reload()})})}deleteSignature(){this.clientsService.getClientDocuments(this.clientViewData.id).subscribe(t=>{this.dialog.open(NC,{data:t}).afterClosed().subscribe(i=>{i.delete?this.clientsService.deleteClientDocument(this.clientViewData.id,i.id).subscribe(()=>{this.reload()}):i.upload&&this.uploadSignature()})})}captureProfileImage(){this.dialog.open(VC).afterClosed().subscribe(n=>{n&&this.clientsService.uploadCapturedClientProfileImage(this.clientViewData.id,n).subscribe(()=>{this.reload()})})}uploadProfileImage(){this.dialog.open(LC).afterClosed().subscribe(n=>{n&&this.clientsService.uploadClientProfileImage(this.clientViewData.id,n).subscribe(()=>{this.reload()})})}deleteProfileImage(){this.dialog.open(vi,{data:{deleteContext:`the profile image of ${this.clientViewData.displayName}`}}).afterClosed().subscribe(n=>{n.delete&&this.clientsService.deleteClientProfileImage(this.clientViewData.id).subscribe(()=>{this.reload()})})}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275cmp=me({type:e,selectors:[["mifosx-clients-view"]],decls:159,vars:123,consts:[["clientMenu","matMenu"],["accountApplications","matMenu"],["Actions","matMenu"],["More","matMenu"],["general","routerLinkActive"],["address","routerLinkActive"],["familyMembers","routerLinkActive"],["tabPanel",""],["identities","routerLinkActive"],["documents","routerLinkActive"],["notes","routerLinkActive"],["datatable","routerLinkActive"],[1,"account-card"],[1,"header","layout-column"],[1,"header-title-group"],[1,"profile-image-container"],["mat-card-md-image","",1,"profile-image",3,"src"],[1,"m-b-5","flex-center"],["class","client-image-button","mat-raised-button","",3,"matTooltip","click",4,"mifosxHasPermission"],[1,"signature",3,"click"],[1,"mat-typography","account-card-title"],[1,"make-flex","content"],[1,"flex-95"],[1,"fa","fa-stop",3,"ngClass","matTooltip"],[3,"entityName"],[1,"flex-5","align-end-center"],["mat-icon-button","","aria-label","Client actions","yPosition","below",3,"matMenuTriggerFor"],["matListIcon","",1,"actions-menu"],["icon","bars","size","sm"],[1,"layout-row","responsive-column"],[1,"flex-50"],[1,"account-overview"],[3,"accountNo"],["completed","true",3,"externalId"],["mat-menu-item","",3,"routerLink",4,"mifosxHasPermission"],["mat-menu-item","",3,"matMenuTriggerFor"],["matListIcon",""],["icon","tasks","size","sm"],["mat-menu-item",""],["mat-menu-item","",3,"click"],["mat-menu-item","",3,"click",4,"mifosxHasPermission"],["mat-menu-item","",3,"click","disabled"],["mat-tab-nav-bar","",1,"navigation-tabs",3,"tabPanel"],["mat-tab-link","","routerLinkActive","",3,"routerLink","active"],["mat-tab-link","","routerLinkActive","",3,"routerLink","active",4,"mifosxHasPermission"],["mat-raised-button","",1,"client-image-button",3,"click","matTooltip"],[1,"fa","fa-upload"],[1,"fa","fa-camera"],[1,"fa","fa-trash"],[1,"m-r-3"],["mat-menu-item","",3,"routerLink"],["icon","edit","size","sm"],["icon","money-bill-alt","size","sm"],["icon","user-tie","size","sm"]],template:function(n,i){if(n&1){let s=Y();l(0,"mat-card",12)(1,"mat-card-header",13)(2,"mat-card-title-group",14)(3,"div",15)(4,"div"),b(5,"img",16),r(),l(6,"div",17),F(7,Ige,3,4,"button",18)(8,Oge,3,4,"button",18)(9,Age,3,4,"button",18),b(10,"br"),r(),l(11,"p",19),R("click",function(){return V(s),q(i.doAction("View Signature"))}),c(12),p(13,"translate"),r()(),l(14,"div",20)(15,"mat-card-title",21)(16,"h3",22),b(17,"i",23),p(18,"translate"),p(19,"statusLookup"),l(20,"b"),c(21),p(22,"translate"),r(),b(23,"mifosx-entity-name",24),r(),l(24,"div",25)(25,"button",26)(26,"mat-icon",27),b(27,"fa-icon",28),r()()()(),l(28,"mat-card-subtitle")(29,"div",29)(30,"div",30)(31,"table",31)(32,"tbody")(33,"tr")(34,"td")(35,"b"),c(36),p(37,"translate"),r()(),l(38,"td"),b(39,"mifosx-entity-name",24),r()(),l(40,"tr")(41,"td")(42,"b"),c(43),p(44,"translate"),r()(),l(45,"td"),b(46,"mifosx-account-number",32),r()(),l(47,"tr")(48,"td")(49,"b"),c(50),p(51,"translate"),r()(),l(52,"td"),b(53,"mifosx-external-identifier",33),r()(),E(54,Fge,8,6,"tr"),l(55,"tr")(56,"td")(57,"b"),c(58),p(59,"translate"),r()(),E(60,kge,2,1,"td"),E(61,Bge,3,3,"td"),r()()()(),l(62,"div",30)(63,"table",31)(64,"tbody"),E(65,Nge,8,3,"tr"),E(66,Lge,7,4,"tr"),l(67,"tr")(68,"td")(69,"b"),c(70),p(71,"translate"),r()(),l(72,"td"),b(73,"mifosx-external-identifier",33),r()(),l(74,"tr")(75,"td")(76,"b"),c(77),p(78,"translate"),r()(),l(79,"td"),b(80,"mifosx-external-identifier",33),r()()()()()()()(),l(81,"mat-menu",null,0),F(83,Vge,6,5,"button",34),E(84,qge,6,4,"button",35),l(85,"button",35)(86,"mat-icon",36),b(87,"fa-icon",37),r(),l(88,"span"),c(89),p(90,"translate"),r()(),E(91,zge,6,3,"button",38),E(92,Gge,2,1,"span"),l(93,"button",35),c(94),p(95,"translate"),r()(),l(96,"mat-menu",null,1),F(98,jge,3,5,"button",34)(99,$ge,3,5,"button",34)(100,Uge,3,5,"button",34)(101,Wge,3,5,"button",34)(102,Qge,3,5,"button",34),r(),l(103,"mat-menu",null,2)(105,"button",39),R("click",function(){return V(s),q(i.doAction("Close"))}),c(106),p(107,"translate"),r(),l(108,"button",39),R("click",function(){return V(s),q(i.doAction("Transfer Client"))}),c(109),p(110,"translate"),r(),E(111,Yge,4,3,"span"),E(112,Jge,4,3,"span"),E(113,Kge,4,3,"span"),E(114,Zge,2,1,"span"),E(115,e_e,4,3,"span"),E(116,t_e,4,3,"span"),E(117,i_e,4,3,"span"),E(118,n_e,4,3,"span"),E(119,o_e,4,3,"span"),r(),l(120,"mat-menu",null,3),F(122,a_e,3,3,"button",40),l(123,"button",39),R("click",function(){return V(s),q(i.doAction("Create Collateral"))}),c(124),p(125,"translate"),r(),l(126,"button",41),R("click",function(){return V(s),q(i.doAction("Survey"))}),c(127),p(128,"translate"),r(),F(129,r_e,3,3,"button",40)(130,l_e,3,3,"button",40)(131,s_e,3,3,"button",40),l(132,"button",39),R("click",function(){return V(s),q(i.doAction("Client Screen Reports"))}),c(133),p(134,"translate"),r(),F(135,c_e,3,3,"button",40),E(136,m_e,2,1,"span"),r()()(),l(137,"mat-card-content")(138,"nav",42)(139,"a",43,4),c(141),p(142,"translate"),r(),l(143,"a",43,5),c(145),p(146,"translate"),r(),l(147,"a",43,6),c(149),p(150,"translate"),r(),F(151,d_e,4,6,"a",44)(152,u_e,4,6,"a",44)(153,f_e,4,6,"a",44),Se(154,g_e,1,1,"a",43,Pe),r(),l(156,"mat-tab-nav-panel",null,7),b(158,"router-outlet"),r()()()}if(n&2){let s=xe(82),d=xe(104),u=xe(121),f=xe(140),_=xe(144),C=xe(148),x=xe(157);a(5),g("src",i.clientImage?i.clientImage:"assets/images/user_placeholder.png",f0),a(2),g("mifosxHasPermission","CREATE_CLIENTIMAGE"),a(),g("mifosxHasPermission","CREATE_CLIENTIMAGE"),a(),g("mifosxHasPermission","DELETE_CLIENTIMAGE"),a(3),h(m(13,80,"labels.inputs.View Signature")),a(5),g("matTooltip",Le(m(18,82,"labels.status."+i.clientViewData.status.value)))("ngClass",m(19,84,i.clientViewData.status.code)),a(4),v("",m(22,86,"labels.inputs.Client Name")," :"),a(2),g("entityName",Le(i.clientViewData.displayName)),a(2),g("matMenuTriggerFor",s),a(11),h(m(37,88,"labels.inputs.Office")),a(3),g("entityName",Le(i.clientViewData.officeName)),a(4),h(m(44,90,"labels.inputs.Client")),a(3),g("accountNo",Le(i.clientViewData.accountNo)),a(4),h(m(51,92,"labels.inputs.External Id")),a(3),g("externalId",Le(i.clientViewData.externalId)),a(),I(i.clientViewData.activationDate?54:-1),a(4),h(m(59,94,"labels.inputs.Staff")),a(2),I(i.clientViewData.staffName?60:-1),a(),I(i.clientViewData.staffName?-1:61),a(4),I(i.clientViewData.groups.length>0?65:-1),a(),I(i.clientViewData.clientType?66:-1),a(4),h(m(71,96,"labels.inputs.Mobile Number")),a(3),g("externalId",Le(i.clientViewData.mobileNo)),a(4),h(m(78,98,"labels.inputs.Email")),a(3),g("externalId",Le(i.clientViewData.emailAddress)),a(3),g("mifosxHasPermission","UPDATE_CLIENT"),a(),I(i.isActive()?84:-1),a(),g("matMenuTriggerFor",d),a(4),h(m(90,100,"labels.buttons.Actions")),a(2),I(i.clientViewData.staffId?-1:91),a(),I(i.clientViewData.staffId?92:-1),a(),g("matMenuTriggerFor",u),a(),h(m(95,102,"labels.buttons.More")),a(4),g("mifosxHasPermission","CREATE_LOAN"),a(),g("mifosxHasPermission","CREATE_SAVINGSACCOUNT"),a(),g("mifosxHasPermission","CREATE_SHAREACCOUNT"),a(),g("mifosxHasPermission","CREATE_RECURRINGDEPOSITACCOUNT"),a(),g("mifosxHasPermission","CREATE_FIXEDDEPOSITACCOUNT"),a(4),h(m(107,104,"labels.buttons.Close")),a(3),v(" ",m(110,106,"labels.buttons.Transfer Client")," "),a(2),I(i.clientViewData.status.value==="Pending"?111:-1),a(),I(i.clientViewData.status.value==="Pending"?112:-1),a(),I(i.clientViewData.status.value==="Pending"?113:-1),a(),I(i.clientViewData.status.value==="Pending"?114:-1),a(),I(i.clientViewData.status.value==="Closed"?115:-1),a(),I(i.clientViewData.status.value==="Rejected"?116:-1),a(),I(i.clientViewData.status.value==="Transfer in progress"?117:-1),a(),I(i.clientViewData.status.value==="Transfer in progress"?118:-1),a(),I(i.clientViewData.status.value==="Transfer in progress"?119:-1),a(3),g("mifosxHasPermission","CREATE_CLIENTCHARGE"),a(2),v(" ",m(125,108,"labels.buttons.Create Collateral")," "),a(2),g("disabled",!0),a(),v(" ",m(128,110,"labels.buttons.Survey")," "),a(2),g("mifosxHasPermission","UPDATESAVINGSACCOUNT_CLIENT"),a(),g("mifosxHasPermission","CREATE_CLIENTIMAGE"),a(),g("mifosxHasPermission","DELETE_CLIENTIMAGE"),a(2),v(" ",m(134,112,"labels.buttons.Client Screen Reports")," "),a(2),g("mifosxHasPermission","CREATE_STANDINGINSTRUCTION"),a(),I(i.clientViewData.status.value!=="Transfer on hold"?136:-1),a(2),g("tabPanel",x),a(),g("routerLink",oe(120,_ge))("active",f.isActive),a(2),v(" ",m(142,114,"labels.inputs.General")," "),a(2),g("routerLink",oe(121,Cge))("active",_.isActive),a(2),v(" ",m(146,116,"labels.inputs.Address")," "),a(2),g("routerLink",oe(122,vge))("active",C.isActive),a(2),v(" ",m(150,118,"labels.inputs.Family Members")," "),a(2),g("mifosxHasPermission","READ_CLIENTIDENTIFIER"),a(),g("mifosxHasPermission","READ_DOCUMENT"),a(),g("mifosxHasPermission","READ_CLIENTNOTE"),a(),we(i.clientDatatables)}},dependencies:[ue,co,fe,Ae,$e,Je,ve,Ke,sa,Qr,b0,si,Qo,kk,wi,nc,Yo,ke,vl,rc,Ea,ic,tc,nr,or,La,ar,ra,Pi,he,go],styles:[".account-card[_ngcontent-%COMP%] .header[_ngcontent-%COMP%] .profile-image-container[_ngcontent-%COMP%] .client-image-button[_ngcontent-%COMP%]{min-width:26px;padding:0 6px;margin:4px;line-height:25px}.account-card[_ngcontent-%COMP%] .header[_ngcontent-%COMP%] .profile-image-container[_ngcontent-%COMP%] .signature[_ngcontent-%COMP%]{color:#fff;text-align:center;margin:0;padding:2%}.account-card[_ngcontent-%COMP%] .header[_ngcontent-%COMP%] .profile-image-container[_ngcontent-%COMP%] .signature[_ngcontent-%COMP%]:hover{cursor:pointer}.account-overview[_ngcontent-%COMP%]{color:#fff;min-width:85%;margin-left:10px}.make-flex[_ngcontent-%COMP%]{display:flex}.mat-card-title-group[_ngcontent-%COMP%]{width:100%}"]})}}return e})();var __e=()=>["../","charges","overview"],C_e=e=>["../","charges",e,"pay"],v_e=e=>["../","charges",e],x_e=e=>["../","loans-accounts",e,"actions","Make Repayment"],b_e=e=>["../","loans-accounts",e,"actions","Approve"],y_e=e=>["../","loans-accounts",e,"actions","Disburse"],$9=e=>["../","loans-accounts",e,"general"],S_e=e=>["../","savings-accounts",e,"actions","Deposit"],w_e=e=>["../","savings-accounts",e,"actions","Withdrawal"],P_e=e=>["../","savings-accounts",e,"actions","Approve"],T_e=e=>["../","savings-accounts",e,"actions","Undo Approval"],M_e=e=>["../","savings-accounts",e,"actions","Activate"],U9=e=>["../","savings-accounts",e,"general"],D_e=e=>["../","fixed-deposits-accounts",e,"actions","Approve"],E_e=e=>["../","fixed-deposits-accounts",e,"actions","Undo Approval"],I_e=e=>["../","fixed-deposits-accounts",e,"actions","Activate"],W9=e=>["../","fixed-deposits-accounts",e,"general"],O_e=e=>["../","recurring-deposits-accounts",e,"actions","Approve"],A_e=e=>["../","recurring-deposits-accounts",e,"actions","Undo Approval"],F_e=e=>["../","recurring-deposits-accounts",e,"actions","Activate"],Q9=e=>["../","recurring-deposits-accounts",e,"general"],k_e=e=>["../","shares-accounts",e,"actions","Approve"],B_e=e=>["../","shares-accounts",e,"actions","Undo Approval"],R_e=e=>["../","shares-accounts",e,"actions","Activate"],Y9=e=>["../","shares-accounts",e,"general"],N_e=e=>["../","client-collateral",e];function L_e(e,o){e&1&&(l(0,"button",30),c(1),p(2,"translate"),r()),e&2&&(g("routerLink",oe(4,__e)),a(),v(" ",m(2,2,"labels.buttons.Charges Overview")," "))}function V_e(e,o){e&1&&(l(0,"th",31),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.name")))}function q_e(e,o){if(e&1&&(l(0,"td",32),b(1,"i",33),p(2,"statusLookup"),c(3),r()),e&2){let t=o.$implicit;a(),g("ngClass",m(2,2,!(t.isWaived||t.isPaid))),a(2),v(" ",t.name," ")}}function z_e(e,o){e&1&&(l(0,"th",31),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.Due as of")))}function H_e(e,o){if(e&1&&(l(0,"td",32),c(1),p(2,"dateFormat"),r()),e&2){let t=o.$implicit;a(),h(m(2,1,t.dueDate))}}function G_e(e,o){e&1&&(l(0,"th",34),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.Due")))}function j_e(e,o){if(e&1&&(l(0,"td",35),c(1),p(2,"formatNumber"),r()),e&2){let t=o.$implicit;a(),h(m(2,1,t.amount))}}function $_e(e,o){e&1&&(l(0,"th",34),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.Paid")))}function U_e(e,o){if(e&1&&(l(0,"td",35),c(1),p(2,"formatNumber"),r()),e&2){let t=o.$implicit;a(),h(m(2,1,t.amountPaid))}}function W_e(e,o){e&1&&(l(0,"th",34),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.Waived")))}function Q_e(e,o){if(e&1&&(l(0,"td",35),c(1),p(2,"formatNumber"),r()),e&2){let t=o.$implicit;a(),h(m(2,1,t.amountWaived))}}function Y_e(e,o){e&1&&(l(0,"th",34),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.Outstanding")))}function J_e(e,o){if(e&1&&(l(0,"td",35),c(1),p(2,"formatNumber"),r()),e&2){let t=o.$implicit;a(),h(m(2,1,t.amountOutstanding))}}function K_e(e,o){e&1&&(l(0,"th",36),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.Actions")))}function X_e(e,o){if(e&1){let t=Y();l(0,"button",40),R("click",function(i){V(t);let s=w(2);return q(s.routeEdit(i))}),b(1,"i",41),r()}if(e&2){let t=w().$implicit;g("routerLink",Nt(1,C_e,t.id))}}function Z_e(e,o){if(e&1){let t=Y();l(0,"button",42),R("click",function(i){V(t);let s=w().$implicit,d=w();return d.routeEdit(i),q(d.waiveCharge(s.id,s.clientId))}),b(1,"i",43),r()}}function eCe(e,o){e&1&&(l(0,"td",37),F(1,X_e,2,3,"button",38)(2,Z_e,2,0,"button",39),r()),e&2&&(a(),g("mifosxHasPermission","PAY_CLIENTCHARGE"),a(),g("mifosxHasPermission","WAIVE_CLIENTCHARGE"))}function tCe(e,o){e&1&&b(0,"tr",44)}function iCe(e,o){if(e&1&&b(0,"tr",45),e&2){let t=o.$implicit;g("routerLink",Nt(1,v_e,t.id))}}function nCe(e,o){e&1&&(l(0,"th",31),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.Account No")))}function oCe(e,o){if(e&1&&(l(0,"td",32),b(1,"i",33),p(2,"statusLookup"),b(3,"mifosx-account-number",53),r()),e&2){let t=o.$implicit;a(),g("ngClass",t.inArrears?"status-active-overdue":m(2,3,t.status.code)),a(2),g("accountNo",Le(t.accountNo))}}function aCe(e,o){e&1&&(l(0,"th",31),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.Loan Product")))}function rCe(e,o){if(e&1&&(l(0,"td",32),b(1,"mifosx-long-text",54),r()),e&2){let t=o.$implicit;a(),g("textValue",Le(t.productName))}}function lCe(e,o){e&1&&(l(0,"th",31),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.Original Loan")))}function sCe(e,o){if(e&1&&(l(0,"td",32),c(1),r()),e&2){let t=o.$implicit;a(),h(t.originalLoan)}}function cCe(e,o){e&1&&(l(0,"th",34),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.Loan Balance")))}function pCe(e,o){if(e&1&&(l(0,"td",35),c(1),p(2,"formatNumber"),r()),e&2){let t=o.$implicit;a(),h(m(2,1,t.loanBalance))}}function mCe(e,o){e&1&&(l(0,"th",34),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.Amount Paid")))}function dCe(e,o){if(e&1&&(l(0,"td",35),c(1),p(2,"formatNumber"),r()),e&2){let t=o.$implicit;a(),h(m(2,1,t.amountPaid))}}function uCe(e,o){e&1&&(l(0,"th",36),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.Type")))}function fCe(e,o){if(e&1&&(l(0,"td",37),b(1,"i",55),r()),e&2){let t=o.$implicit;a(),g("matTooltip",Le(t.loanType.value))("ngClass",t.loanType.value==="Individual"?"fa-user":"fa-group")}}function hCe(e,o){e&1&&(l(0,"th",36),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.Actions")))}function gCe(e,o){if(e&1){let t=Y();l(0,"button",57),p(1,"translate"),R("click",function(i){V(t);let s=w(3);return q(s.routeEdit(i))}),b(2,"i",41),r()}if(e&2){let t=w().$implicit;g("matTooltip",Le(m(1,3,"tooltips.Make Repayment")))("routerLink",Nt(5,x_e,t.id))}}function _Ce(e,o){if(e&1){let t=Y();l(0,"button",57),p(1,"translate"),R("click",function(i){V(t);let s=w(4);return q(s.routeEdit(i))}),b(2,"i",59),r()}if(e&2){let t=w(2).$implicit;g("matTooltip",Le(m(1,3,"tooltips.Approve")))("routerLink",Nt(5,b_e,t.id))}}function CCe(e,o){e&1&&(l(0,"span"),F(1,_Ce,3,7,"button",58),r()),e&2&&(a(),g("mifosxHasPermission","APPROVE_LOAN"))}function vCe(e,o){if(e&1){let t=Y();l(0,"button",57),p(1,"translate"),R("click",function(i){V(t);let s=w(4);return q(s.routeEdit(i))}),b(2,"i",43),r()}if(e&2){let t=w(2).$implicit;g("matTooltip",Le(m(1,3,"tooltips.Disburse")))("routerLink",Nt(5,y_e,t.id))}}function xCe(e,o){e&1&&(l(0,"span"),F(1,vCe,3,7,"button",58),r()),e&2&&(a(),g("mifosxHasPermission","DISBURSE_LOAN"))}function bCe(e,o){if(e&1){let t=Y();l(0,"button",61),p(1,"translate"),R("click",function(i){V(t);let s=w(2).$implicit,d=w(2);return d.routeEdit(i),q(d.routeTransferFund(s.id))}),b(2,"i",62),r()}e&2&&g("matTooltip",Le(m(1,2,"tooltips.Transfer Funds")))}function yCe(e,o){e&1&&(l(0,"span"),F(1,bCe,3,4,"button",60),r()),e&2&&(a(),g("mifosxHasPermission","DISBURSE_LOAN"))}function SCe(e,o){if(e&1&&(l(0,"td",37),E(1,gCe,3,7,"button",56),E(2,CCe,2,1,"span"),E(3,xCe,2,1,"span"),E(4,yCe,2,1,"span"),r()),e&2){let t=o.$implicit;a(),I(t.status.active?1:-1),a(),I(t.status.pendingApproval?2:-1),a(),I(!t.status.pendingApproval&&!t.status.active&&!t.status.overpaid?3:-1),a(),I(!t.status.pendingApproval&&!t.status.active&&t.status.overpaid?4:-1)}}function wCe(e,o){e&1&&b(0,"tr",44)}function PCe(e,o){if(e&1&&b(0,"tr",63),e&2){let t=o.$implicit;g("routerLink",Nt(1,$9,t.id))}}function TCe(e,o){if(e&1&&(l(0,"table",7),p(1,"accountsFilter"),X(2,46),F(3,nCe,3,3,"th",9)(4,oCe,4,5,"td",10),Z(),X(5,47),F(6,aCe,3,3,"th",9)(7,rCe,2,2,"td",10),Z(),X(8,48),F(9,lCe,3,3,"th",9)(10,sCe,2,1,"td",10),Z(),X(11,49),F(12,cCe,3,3,"th",13)(13,pCe,3,3,"td",14),Z(),X(14,50),F(15,mCe,3,3,"th",13)(16,dCe,3,3,"td",14),Z(),X(17,51),F(18,uCe,3,3,"th",19)(19,fCe,2,3,"td",20),Z(),X(20,18),F(21,hCe,3,3,"th",19)(22,SCe,5,4,"td",20),Z(),F(23,wCe,1,0,"tr",21)(24,PCe,1,3,"tr",52),r()),e&2){let t=w();g("dataSource",Ot(1,3,t.loanAccounts,"loan")),a(23),g("matHeaderRowDef",t.openLoansColumns),a(),g("matRowDefColumns",t.openLoansColumns)}}function MCe(e,o){e&1&&(l(0,"th",31),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.Account No")))}function DCe(e,o){if(e&1&&(l(0,"td",32),b(1,"i",33),p(2,"statusLookup"),b(3,"mifosx-account-number",53),r()),e&2){let t=o.$implicit;a(),g("ngClass",t.inArrears?"status-active-overdue":m(2,3,t.status.code)),a(2),g("accountNo",Le(t.accountNo))}}function ECe(e,o){e&1&&(l(0,"th",31),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.Loan Product")))}function ICe(e,o){if(e&1&&(l(0,"td",32),b(1,"mifosx-long-text",54),r()),e&2){let t=o.$implicit;a(),g("textValue",Le(t.productName))}}function OCe(e,o){e&1&&(l(0,"th",31),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.Original Loan")))}function ACe(e,o){if(e&1&&(l(0,"td",32),c(1),p(2,"dateFormat"),r()),e&2){let t=o.$implicit;a(),h(m(2,1,t.lastActiveTransactionDate))}}function FCe(e,o){e&1&&(l(0,"th",34),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.Loan Balance")))}function kCe(e,o){if(e&1&&(l(0,"td",35),c(1),p(2,"formatNumber"),r()),e&2){let t=o.$implicit;a(),h(m(2,1,t.loanBalance))}}function BCe(e,o){e&1&&(l(0,"th",34),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.Amount Paid")))}function RCe(e,o){if(e&1&&(l(0,"td",35),c(1),p(2,"formatNumber"),r()),e&2){let t=o.$implicit;a(),h(m(2,1,t.accountBalance))}}function NCe(e,o){e&1&&(l(0,"th",36),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.Type")))}function LCe(e,o){if(e&1&&(l(0,"td",37),b(1,"i",55),r()),e&2){let t=o.$implicit;a(),g("matTooltip",_0(" ",t.loanType.value))("ngClass",t.loanType.value==="Individual"?"fa-user":"fa-group")}}function VCe(e,o){e&1&&(l(0,"th",31),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.Closed Date")))}function qCe(e,o){if(e&1&&(l(0,"td",32),c(1),p(2,"dateFormat"),r()),e&2){let t=o.$implicit;a(),h(m(2,1,t.timeline.closedOnDate))}}function zCe(e,o){e&1&&b(0,"tr",44)}function HCe(e,o){if(e&1&&b(0,"tr",63),e&2){let t=o.$implicit;g("routerLink",Nt(1,$9,t.id))}}function GCe(e,o){if(e&1&&(l(0,"table",7),p(1,"accountsFilter"),X(2,46),F(3,MCe,3,3,"th",9)(4,DCe,4,5,"td",10),Z(),X(5,47),F(6,ECe,3,3,"th",9)(7,ICe,2,2,"td",10),Z(),X(8,48),F(9,OCe,3,3,"th",9)(10,ACe,3,3,"td",10),Z(),X(11,49),F(12,FCe,3,3,"th",13)(13,kCe,3,3,"td",14),Z(),X(14,50),F(15,BCe,3,3,"th",13)(16,RCe,3,3,"td",14),Z(),X(17,51),F(18,NCe,3,3,"th",19)(19,LCe,2,3,"td",20),Z(),X(20,64),F(21,VCe,3,3,"th",9)(22,qCe,3,3,"td",10),Z(),F(23,zCe,1,0,"tr",21)(24,HCe,1,3,"tr",52),r()),e&2){let t=w();g("dataSource",yr(1,3,t.loanAccounts,"loan","closed")),a(23),g("matHeaderRowDef",t.closedLoansColumns),a(),g("matRowDefColumns",t.closedLoansColumns)}}function jCe(e,o){e&1&&(l(0,"th",31),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.Account No")))}function $Ce(e,o){if(e&1&&(l(0,"td",32),b(1,"i",33),p(2,"statusLookup"),b(3,"mifosx-account-number",53),r()),e&2){let t=o.$implicit;a(),g("ngClass",m(2,3,t.status.code)),a(2),g("accountNo",Le(t.accountNo))}}function UCe(e,o){e&1&&(l(0,"th",31),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.Savings Product")))}function WCe(e,o){if(e&1&&(l(0,"td",32),b(1,"mifosx-long-text",54),r()),e&2){let t=o.$implicit;a(),g("textValue",Le(t.productName))}}function QCe(e,o){e&1&&(l(0,"th",31),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.Last Active")))}function YCe(e,o){if(e&1&&(l(0,"td",32),c(1),p(2,"dateFormat"),r()),e&2){let t=o.$implicit;a(),h(m(2,1,t.lastActiveTransactionDate))}}function JCe(e,o){e&1&&(l(0,"th",34),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.Balance")))}function KCe(e,o){if(e&1&&(l(0,"td",35),c(1),p(2,"formatNumber"),r()),e&2){let t=o.$implicit;a(),h(m(2,1,t.accountBalance))}}function XCe(e,o){e&1&&(l(0,"th",36),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.Actions")))}function ZCe(e,o){if(e&1){let t=Y();l(0,"button",40),R("click",function(i){V(t);let s=w(3);return q(s.routeEdit(i))}),b(1,"i",69),r()}if(e&2){let t=w().$implicit;g("routerLink",Nt(1,S_e,t.id))}}function e2e(e,o){if(e&1){let t=Y();l(0,"button",40),R("click",function(i){V(t);let s=w(3);return q(s.routeEdit(i))}),b(1,"i",70),r()}if(e&2){let t=w().$implicit;g("routerLink",Nt(1,w_e,t.id))}}function t2e(e,o){if(e&1){let t=Y();l(0,"button",40),R("click",function(i){V(t);let s=w(3);return q(s.routeEdit(i))}),b(1,"i",59),r()}if(e&2){let t=w().$implicit;g("routerLink",Nt(1,P_e,t.id))}}function i2e(e,o){if(e&1&&(l(0,"button",68),b(1,"i",71),r()),e&2){let t=w().$implicit;g("routerLink",Nt(1,T_e,t.id))}}function n2e(e,o){if(e&1&&(l(0,"button",68),b(1,"i",72),r()),e&2){let t=w().$implicit;g("routerLink",Nt(1,M_e,t.id))}}function o2e(e,o){if(e&1&&(l(0,"td",37),E(1,ZCe,2,3,"button",68),E(2,e2e,2,3,"button",68),E(3,t2e,2,3,"button",68),E(4,i2e,2,3,"button",68),E(5,n2e,2,3,"button",68),r()),e&2){let t=o.$implicit;a(),I(t.status.active?1:-1),a(),I(t.status.active?2:-1),a(),I(t.status.submittedAndPendingApproval?3:-1),a(),I(!t.status.submittedAndPendingApproval&&!t.status.active?4:-1),a(),I(!t.status.submittedAndPendingApproval&&!t.status.active?5:-1)}}function a2e(e,o){e&1&&b(0,"tr",44)}function r2e(e,o){if(e&1&&b(0,"tr",45),e&2){let t=o.$implicit;g("routerLink",Nt(1,U9,t.id))}}function l2e(e,o){if(e&1&&(l(0,"table",7),p(1,"accountsFilter"),X(2,46),F(3,jCe,3,3,"th",9)(4,$Ce,4,5,"td",10),Z(),X(5,65),F(6,UCe,3,3,"th",9)(7,WCe,2,2,"td",10),Z(),X(8,66),F(9,QCe,3,3,"th",9)(10,YCe,3,3,"td",10),Z(),X(11,67),F(12,JCe,3,3,"th",13)(13,KCe,3,3,"td",14),Z(),X(14,18),F(15,XCe,3,3,"th",19)(16,o2e,6,5,"td",20),Z(),F(17,a2e,1,0,"tr",21)(18,r2e,1,3,"tr",22),r()),e&2){let t=w();g("dataSource",$t(1,3,t.savingAccounts,"saving","open","isSavings")),a(17),g("matHeaderRowDef",t.openSavingsColumns),a(),g("matRowDefColumns",t.openSavingsColumns)}}function s2e(e,o){e&1&&(l(0,"th",31),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.Account No")))}function c2e(e,o){if(e&1&&(l(0,"td",32),b(1,"i",33),p(2,"statusLookup"),b(3,"mifosx-account-number",53),r()),e&2){let t=o.$implicit;a(),g("ngClass",m(2,3,t.status.code)),a(2),g("accountNo",Le(t.accountNo))}}function p2e(e,o){e&1&&(l(0,"th",31),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.Savings Product")))}function m2e(e,o){if(e&1&&(l(0,"td",32),b(1,"mifosx-long-text",54),r()),e&2){let t=o.$implicit;a(),g("textValue",Le(t.productName))}}function d2e(e,o){e&1&&(l(0,"th",31),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.Closed Date")))}function u2e(e,o){if(e&1&&(l(0,"td",32),c(1),p(2,"dateFormat"),r()),e&2){let t=o.$implicit;a(),h(m(2,1,t.timeline.closedOnDate))}}function f2e(e,o){e&1&&b(0,"tr",44)}function h2e(e,o){if(e&1&&b(0,"tr",45),e&2){let t=o.$implicit;g("routerLink",Nt(1,U9,t.id))}}function g2e(e,o){if(e&1&&(l(0,"table",7),p(1,"accountsFilter"),X(2,46),F(3,s2e,3,3,"th",9)(4,c2e,4,5,"td",10),Z(),X(5,65),F(6,p2e,3,3,"th",9)(7,m2e,2,2,"td",10),Z(),X(8,64),F(9,d2e,3,3,"th",9)(10,u2e,3,3,"td",10),Z(),F(11,f2e,1,0,"tr",21)(12,h2e,1,3,"tr",22),r()),e&2){let t=w();g("dataSource",$t(1,3,t.savingAccounts,"saving","closed","isSavings")),a(11),g("matHeaderRowDef",t.closedSavingsColumns),a(),g("matRowDefColumns",t.closedSavingsColumns)}}function _2e(e,o){e&1&&(l(0,"th",31),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.Account No")))}function C2e(e,o){if(e&1&&(l(0,"td",32),b(1,"i",33),p(2,"statusLookup"),b(3,"mifosx-account-number",53),r()),e&2){let t=o.$implicit;a(),g("ngClass",m(2,3,t.status.code)),a(2),g("accountNo",Le(t.accountNo))}}function v2e(e,o){e&1&&(l(0,"th",31),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.Fixed Deposit Product")))}function x2e(e,o){if(e&1&&(l(0,"td",32),c(1),r()),e&2){let t=o.$implicit;a(),h(t.productName)}}function b2e(e,o){e&1&&(l(0,"th",31),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.Last Active")))}function y2e(e,o){if(e&1&&(l(0,"td",32),c(1),p(2,"dateFormat"),r()),e&2){let t=o.$implicit;a(),h(m(2,1,t.lastActiveTransactionDate))}}function S2e(e,o){e&1&&(l(0,"th",34),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.Balance")))}function w2e(e,o){if(e&1&&(l(0,"td",35),c(1),p(2,"formatNumber"),r()),e&2){let t=o.$implicit;a(),h(m(2,1,t.accountBalance))}}function P2e(e,o){e&1&&(l(0,"th",36),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.Actions")))}function T2e(e,o){if(e&1){let t=Y();l(0,"button",40),R("click",function(i){V(t);let s=w(3);return q(s.routeEdit(i))}),b(1,"i",59),r()}if(e&2){let t=w().$implicit;g("routerLink",Nt(1,D_e,t.id))}}function M2e(e,o){if(e&1&&(l(0,"button",68),b(1,"i",71),r()),e&2){let t=w().$implicit;g("routerLink",Nt(1,E_e,t.id))}}function D2e(e,o){if(e&1&&(l(0,"button",68),b(1,"i",72),r()),e&2){let t=w().$implicit;g("routerLink",Nt(1,I_e,t.id))}}function E2e(e,o){if(e&1&&(l(0,"td",37),E(1,T2e,2,3,"button",68),E(2,M2e,2,3,"button",68),E(3,D2e,2,3,"button",68),r()),e&2){let t=o.$implicit;a(),I(t.status.submittedAndPendingApproval?1:-1),a(),I(!t.status.submittedAndPendingApproval&&!t.status.active?2:-1),a(),I(!t.status.submittedAndPendingApproval&&!t.status.active?3:-1)}}function I2e(e,o){e&1&&b(0,"tr",44)}function O2e(e,o){if(e&1&&b(0,"tr",45),e&2){let t=o.$implicit;g("routerLink",Nt(1,W9,t.id))}}function A2e(e,o){if(e&1&&(l(0,"table",7),p(1,"accountsFilter"),X(2,46),F(3,_2e,3,3,"th",9)(4,C2e,4,5,"td",10),Z(),X(5,65),F(6,v2e,3,3,"th",9)(7,x2e,2,1,"td",10),Z(),X(8,66),F(9,b2e,3,3,"th",9)(10,y2e,3,3,"td",10),Z(),X(11,67),F(12,S2e,3,3,"th",13)(13,w2e,3,3,"td",14),Z(),X(14,18),F(15,P2e,3,3,"th",19)(16,E2e,4,3,"td",20),Z(),F(17,I2e,1,0,"tr",21)(18,O2e,1,3,"tr",22),r()),e&2){let t=w();g("dataSource",$t(1,3,t.savingAccounts,"saving","open","isFixed")),a(17),g("matHeaderRowDef",t.openSavingsColumns),a(),g("matRowDefColumns",t.openSavingsColumns)}}function F2e(e,o){e&1&&(l(0,"th",31),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.Account No")))}function k2e(e,o){if(e&1&&(l(0,"td",32),b(1,"i",33),p(2,"statusLookup"),b(3,"mifosx-account-number",53),r()),e&2){let t=o.$implicit;a(),g("ngClass",m(2,3,t.status.code)),a(2),g("accountNo",Le(t.accountNo))}}function B2e(e,o){e&1&&(l(0,"th",31),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.Fixed Deposit Product")))}function R2e(e,o){if(e&1&&(l(0,"td",32),b(1,"mifosx-long-text",54),r()),e&2){let t=o.$implicit;a(),g("textValue",Le(t.productName))}}function N2e(e,o){e&1&&(l(0,"th",31),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.Closed Date")))}function L2e(e,o){if(e&1&&(l(0,"td",32),c(1),p(2,"dateFormat"),r()),e&2){let t=o.$implicit;a(),h(m(2,1,t.timeline.closedOnDate))}}function V2e(e,o){e&1&&b(0,"tr",44)}function q2e(e,o){if(e&1&&b(0,"tr",45),e&2){let t=o.$implicit;g("routerLink",Nt(1,W9,t.id))}}function z2e(e,o){if(e&1&&(l(0,"table",7),p(1,"accountsFilter"),X(2,46),F(3,F2e,3,3,"th",9)(4,k2e,4,5,"td",10),Z(),X(5,65),F(6,B2e,3,3,"th",9)(7,R2e,2,2,"td",10),Z(),X(8,64),F(9,N2e,3,3,"th",9)(10,L2e,3,3,"td",10),Z(),F(11,V2e,1,0,"tr",21)(12,q2e,1,3,"tr",22),r()),e&2){let t=w();g("dataSource",$t(1,3,t.savingAccounts,"saving","closed","isFixed")),a(11),g("matHeaderRowDef",t.closedSavingsColumns),a(),g("matRowDefColumns",t.closedSavingsColumns)}}function H2e(e,o){e&1&&(l(0,"th",31),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.Account No")))}function G2e(e,o){if(e&1&&(l(0,"td",32),b(1,"i",33),p(2,"statusLookup"),b(3,"mifosx-account-number",53),r()),e&2){let t=o.$implicit;a(),g("ngClass",m(2,3,t.status.code)),a(2),g("accountNo",Le(t.accountNo))}}function j2e(e,o){e&1&&(l(0,"th",31),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.Recurring Deposit Product")))}function $2e(e,o){if(e&1&&(l(0,"td",32),b(1,"mifosx-long-text",54),r()),e&2){let t=o.$implicit;a(),g("textValue",Le(t.productName))}}function U2e(e,o){e&1&&(l(0,"th",31),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.Last Active")))}function W2e(e,o){if(e&1&&(l(0,"td",32),c(1),p(2,"dateFormat"),r()),e&2){let t=o.$implicit;a(),h(m(2,1,t.lastActiveTransactionDate))}}function Q2e(e,o){e&1&&(l(0,"th",34),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.Balance")))}function Y2e(e,o){if(e&1&&(l(0,"td",35),c(1),p(2,"formatNumber"),r()),e&2){let t=o.$implicit;a(),h(m(2,1,t.accountBalance))}}function J2e(e,o){e&1&&(l(0,"th",36),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.Actions")))}function K2e(e,o){if(e&1&&(l(0,"button",68),b(1,"i",59),r()),e&2){let t=w(2).$implicit;g("routerLink",Nt(1,O_e,t.id))}}function X2e(e,o){e&1&&F(0,K2e,2,3,"button",73),e&2&&g("mifosxHasPermission","APPROVE_SAVINGSACCOUNT")}function Z2e(e,o){if(e&1){let t=Y();l(0,"button",40),R("click",function(i){V(t);let s=w(4);return q(s.routeEdit(i))}),b(1,"i",71),r()}if(e&2){let t=w(2).$implicit;g("routerLink",Nt(1,A_e,t.id))}}function eve(e,o){if(e&1){let t=Y();l(0,"button",40),R("click",function(i){V(t);let s=w(4);return q(s.routeEdit(i))}),b(1,"i",72),r()}if(e&2){let t=w(2).$implicit;g("routerLink",Nt(1,F_e,t.id))}}function tve(e,o){e&1&&F(0,Z2e,2,3,"button",38)(1,eve,2,3,"button",38),e&2&&(g("mifosxHasPermission","APPROVALUNDO_SAVINGSACCOUNT"),a(),g("mifosxHasPermission","ACTIVATE_SAVINGSACCOUNT"))}function ive(e,o){if(e&1&&(l(0,"td",37),E(1,X2e,1,1,"button",68),E(2,tve,2,2),r()),e&2){let t=o.$implicit;a(),I(t.status.submittedAndPendingApproval?1:-1),a(),I(!t.status.submittedAndPendingApproval&&!t.status.active?2:-1)}}function nve(e,o){e&1&&b(0,"tr",44)}function ove(e,o){if(e&1&&b(0,"tr",63),e&2){let t=o.$implicit;g("routerLink",Nt(1,Q9,t.id))}}function ave(e,o){if(e&1&&(l(0,"table",7),p(1,"accountsFilter"),X(2,46),F(3,H2e,3,3,"th",9)(4,G2e,4,5,"td",10),Z(),X(5,65),F(6,j2e,3,3,"th",9)(7,$2e,2,2,"td",10),Z(),X(8,66),F(9,U2e,3,3,"th",9)(10,W2e,3,3,"td",10),Z(),X(11,67),F(12,Q2e,3,3,"th",13)(13,Y2e,3,3,"td",14),Z(),X(14,18),F(15,J2e,3,3,"th",19)(16,ive,3,2,"td",20),Z(),F(17,nve,1,0,"tr",21)(18,ove,1,3,"tr",52),r()),e&2){let t=w();g("dataSource",$t(1,3,t.savingAccounts,"saving","open","isRecurring")),a(17),g("matHeaderRowDef",t.openSavingsColumns),a(),g("matRowDefColumns",t.openSavingsColumns)}}function rve(e,o){e&1&&(l(0,"th",31),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.Account No")))}function lve(e,o){if(e&1&&(l(0,"td",32),b(1,"i",33),p(2,"statusLookup"),b(3,"mifosx-account-number",53),r()),e&2){let t=o.$implicit;a(),g("ngClass",m(2,3,t.status.code)),a(2),g("accountNo",Le(t.accountNo))}}function sve(e,o){e&1&&(l(0,"th",31),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.Recurring Deposit Product")))}function cve(e,o){if(e&1&&(l(0,"td",32),b(1,"mifosx-long-text",54),r()),e&2){let t=o.$implicit;a(),g("textValue",Le(t.productName))}}function pve(e,o){e&1&&(l(0,"th",31),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.Closed Date")))}function mve(e,o){if(e&1&&(l(0,"td",32),c(1),p(2,"dateFormat"),r()),e&2){let t=o.$implicit;a(),h(m(2,1,t.timeline.closedOnDate))}}function dve(e,o){e&1&&b(0,"tr",44)}function uve(e,o){if(e&1&&b(0,"tr",63),e&2){let t=o.$implicit;g("routerLink",Nt(1,Q9,t.id))}}function fve(e,o){if(e&1&&(l(0,"table",7),p(1,"accountsFilter"),X(2,46),F(3,rve,3,3,"th",9)(4,lve,4,5,"td",10),Z(),X(5,65),F(6,sve,3,3,"th",9)(7,cve,2,2,"td",10),Z(),X(8,64),F(9,pve,3,3,"th",9)(10,mve,3,3,"td",10),Z(),F(11,dve,1,0,"tr",21)(12,uve,1,3,"tr",52),r()),e&2){let t=w();g("dataSource",$t(1,3,t.savingAccounts,"saving","closed","isRecurring")),a(11),g("matHeaderRowDef",t.closedSavingsColumns),a(),g("matRowDefColumns",t.closedSavingsColumns)}}function hve(e,o){e&1&&(l(0,"th",31),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.Account No")))}function gve(e,o){if(e&1&&(l(0,"td",32),b(1,"i",33),p(2,"statusLookup"),b(3,"mifosx-account-number",53),r()),e&2){let t=o.$implicit;a(),g("ngClass",m(2,3,t.status.code)),a(2),g("accountNo",Le(t.accountNo))}}function _ve(e,o){e&1&&(l(0,"th",31),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.Share Product")))}function Cve(e,o){if(e&1&&(l(0,"td",32),b(1,"mifosx-long-text",54),r()),e&2){let t=o.$implicit;a(),g("textValue",Le(t.productName))}}function vve(e,o){e&1&&(l(0,"th",31),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.Approved Shares")))}function xve(e,o){if(e&1&&(l(0,"td",32),c(1),r()),e&2){let t=o.$implicit;a(),h(t.totalApprovedShares)}}function bve(e,o){e&1&&(l(0,"th",31),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.Pending For Approval Shares")))}function yve(e,o){if(e&1&&(l(0,"td",32),c(1),r()),e&2){let t=o.$implicit;a(),h(t.totalPendingForApprovalShares)}}function Sve(e,o){e&1&&(l(0,"th",36),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.Actions")))}function wve(e,o){if(e&1){let t=Y();l(0,"button",40),R("click",function(i){V(t);let s=w(3);return q(s.routeEdit(i))}),b(1,"i",59),r()}if(e&2){let t=w().$implicit;g("routerLink",Nt(1,k_e,t.id))}}function Pve(e,o){if(e&1){let t=Y();l(0,"button",40),R("click",function(i){V(t);let s=w(3);return q(s.routeEdit(i))}),b(1,"i",71),r()}if(e&2){let t=w().$implicit;g("routerLink",Nt(1,B_e,t.id))}}function Tve(e,o){if(e&1){let t=Y();l(0,"button",40),R("click",function(i){V(t);let s=w(3);return q(s.routeEdit(i))}),b(1,"i",72),r()}if(e&2){let t=w().$implicit;g("routerLink",Nt(1,R_e,t.id))}}function Mve(e,o){if(e&1&&(l(0,"td",37),E(1,wve,2,3,"button",68),E(2,Pve,2,3,"button",68),E(3,Tve,2,3,"button",68),r()),e&2){let t=o.$implicit;a(),I(t.status.submittedAndPendingApproval?1:-1),a(),I(!t.status.submittedAndPendingApproval&&!t.status.active?2:-1),a(),I(!t.status.submittedAndPendingApproval&&!t.status.active?3:-1)}}function Dve(e,o){e&1&&b(0,"tr",44)}function Eve(e,o){if(e&1&&b(0,"tr",45),e&2){let t=o.$implicit;g("routerLink",Nt(1,Y9,t.id))}}function Ive(e,o){if(e&1&&(l(0,"table",7),p(1,"accountsFilter"),X(2,46),F(3,hve,3,3,"th",9)(4,gve,4,5,"td",10),Z(),X(5,74),F(6,_ve,3,3,"th",9)(7,Cve,2,2,"td",10),Z(),X(8,75),F(9,vve,3,3,"th",9)(10,xve,2,1,"td",10),Z(),X(11,76),F(12,bve,3,3,"th",9)(13,yve,2,1,"td",10),Z(),X(14,18),F(15,Sve,3,3,"th",19)(16,Mve,4,3,"td",20),Z(),F(17,Dve,1,0,"tr",21)(18,Eve,1,3,"tr",22),r()),e&2){let t=w();g("dataSource",Ot(1,3,t.shareAccounts,"share")),a(17),g("matHeaderRowDef",t.openSharesColumns),a(),g("matRowDefColumns",t.openSharesColumns)}}function Ove(e,o){e&1&&(l(0,"th",31),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.Account No")))}function Ave(e,o){if(e&1&&(l(0,"td",32),b(1,"i",33),p(2,"statusLookup"),b(3,"mifosx-account-number",53),r()),e&2){let t=o.$implicit;a(),g("ngClass",m(2,3,t.status.code)),a(2),g("accountNo",Le(t.accountNo))}}function Fve(e,o){e&1&&(l(0,"th",31),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.Share Product")))}function kve(e,o){if(e&1&&(l(0,"td",32),c(1),r()),e&2){let t=o.$implicit;a(),h(t.productName)}}function Bve(e,o){e&1&&(l(0,"th",31),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.Approved Shares")))}function Rve(e,o){if(e&1&&(l(0,"td",32),c(1),r()),e&2){let t=o.$implicit;a(),h(t.totalApprovedShares)}}function Nve(e,o){e&1&&(l(0,"th",31),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.Pending For Approval Shares")))}function Lve(e,o){if(e&1&&(l(0,"td",32),c(1),r()),e&2){let t=o.$implicit;a(),h(t.totalPendingForApprovalShares)}}function Vve(e,o){e&1&&(l(0,"th",31),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.Closed Date")))}function qve(e,o){if(e&1&&(l(0,"td",32),c(1),p(2,"dateFormat"),r()),e&2){let t=o.$implicit;a(),h(m(2,1,t.timeline.closedOnDate))}}function zve(e,o){e&1&&b(0,"tr",44)}function Hve(e,o){if(e&1&&b(0,"tr",45),e&2){let t=o.$implicit;g("routerLink",Nt(1,Y9,t.id))}}function Gve(e,o){if(e&1&&(l(0,"table",7),p(1,"accountsFilter"),X(2,46),F(3,Ove,3,3,"th",9)(4,Ave,4,5,"td",10),Z(),X(5,74),F(6,Fve,3,3,"th",9)(7,kve,2,1,"td",10),Z(),X(8,75),F(9,Bve,3,3,"th",9)(10,Rve,2,1,"td",10),Z(),X(11,76),F(12,Nve,3,3,"th",9)(13,Lve,2,1,"td",10),Z(),X(14,64),F(15,Vve,3,3,"th",9)(16,qve,3,3,"td",10),Z(),F(17,zve,1,0,"tr",21)(18,Hve,1,3,"tr",22),r()),e&2){let t=w();g("dataSource",yr(1,3,t.shareAccounts,"share","closed")),a(17),g("matHeaderRowDef",t.closedSharesColumns),a(),g("matRowDefColumns",t.closedSharesColumns)}}function jve(e,o){e&1&&(l(0,"th",31),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.ID")))}function $ve(e,o){if(e&1&&(l(0,"td",32),c(1),r()),e&2){let t=o.$implicit;a(),h(t.collateralId)}}function Uve(e,o){e&1&&(l(0,"th",31),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.name")))}function Wve(e,o){if(e&1&&(l(0,"td",32),c(1),r()),e&2){let t=o.$implicit;a(),h(t.name)}}function Qve(e,o){e&1&&(l(0,"th",34),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.Quantity")))}function Yve(e,o){if(e&1&&(l(0,"td",35),c(1),p(2,"formatNumber"),r()),e&2){let t=o.$implicit;a(),h(m(2,1,t.quantity))}}function Jve(e,o){e&1&&(l(0,"th",34),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.Total Value")))}function Kve(e,o){if(e&1&&(l(0,"td",35),c(1),p(2,"formatNumber"),r()),e&2){let t=o.$implicit;a(),v(" ",m(2,1,t.basePrice*t.quantity)," ")}}function Xve(e,o){e&1&&(l(0,"th",34),c(1),p(2,"translate"),r()),e&2&&(a(),v(" ",m(2,1,"labels.inputs.Total Collateral Value")," "))}function Zve(e,o){if(e&1&&(l(0,"td",35),c(1),p(2,"formatNumber"),r()),e&2){let t=o.$implicit;a(),v(" ",m(2,1,t.pctToBase*t.basePrice*t.quantity/100)," ")}}function exe(e,o){e&1&&b(0,"tr",44)}function txe(e,o){if(e&1&&b(0,"tr",45),e&2){let t=o.$implicit;g("routerLink",Nt(1,N_e,t.collateralId))}}var zC=(()=>{class e{constructor(){this.route=T(Ie),this.clientService=T(Oi),this.router=T(qe),this.openLoansColumns=["Account No","Loan Account","Original Loan","Loan Balance","Amount Paid","Type","Actions"],this.closedLoansColumns=["Account No","Loan Account","Original Loan","Loan Balance","Amount Paid","Type","Closed Date"],this.openSavingsColumns=["Account No","Saving Account","Last Active","Balance","Actions"],this.closedSavingsColumns=["Account No","Saving Account","Closed Date"],this.openSharesColumns=["Account No","Share Account","Approved Shares","Pending For Approval Shares","Actions"],this.closedSharesColumns=["Account No","Share Account","Approved Shares","Pending For Approval Shares","Closed Date"],this.upcomingChargesColumns=["Name","Due as of","Due","Paid","Waived","Outstanding","Actions"],this.collateralsColumns=["ID","Name","Quantity","Total Value","Total Collateral Value"],this.showClosedLoanAccounts=!1,this.showClosedSavingAccounts=!1,this.showClosedShareAccounts=!1,this.showClosedRecurringAccounts=!1,this.showClosedFixedAccounts=!1,this.route.data.subscribe(t=>{this.clientAccountData=t.clientAccountsData,this.savingAccounts=t.clientAccountsData.savingsAccounts,this.loanAccounts=t.clientAccountsData.loanAccounts,this.shareAccounts=t.clientAccountsData.shareAccounts,this.upcomingCharges=t.clientChargesData.pageItems,this.collaterals=t.clientCollateralData,this.clientSummary=t.clientSummary?t.clientSummary[0]:[],this.clientid=this.route.parent.snapshot.params.clientId})}toggleLoanAccountsOverview(){this.showClosedLoanAccounts=!this.showClosedLoanAccounts}toggleSavingAccountsOverview(){this.showClosedSavingAccounts=!this.showClosedSavingAccounts}toggleShareAccountsOverview(){this.showClosedShareAccounts=!this.showClosedShareAccounts}toggleRecurringAccountsOverview(){this.showClosedRecurringAccounts=!this.showClosedRecurringAccounts}toggleFixedAccountsOverview(){this.showClosedFixedAccounts=!this.showClosedFixedAccounts}waiveCharge(t,n){let i={clientId:n.toString(),resourceType:t};this.clientService.waiveClientCharge(i).subscribe(()=>{this.getChargeData(n)})}getChargeData(t){this.clientService.getClientChargesData(t).subscribe(n=>{this.upcomingCharges=n.pageItems})}routeEdit(t){t.stopPropagation()}routeTransferFund(t){let n={loanId:t,accountType:"fromloans"};this.router.navigate(["../","loans-accounts",t,"transfer-funds","make-account-transfer"],{relativeTo:this.route,queryParams:n})}viewAccountsLabel(t){return t?"labels.buttons.View Active Accounts":"labels.buttons.View Closed Accounts"}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275cmp=me({type:e,selectors:[["mifosx-general-tab"]],decls:156,vars:83,consts:[[1,"tab-container","mat-typography"],[1,"layout-row","gap-32px","performance-history-container"],[1,"heading-content"],[1,"layout-column","flex-50"],["className","heading-name"],[1,"layout-row","align-flex-end"],["mat-raised-button","","class","f-right","color","primary",3,"routerLink",4,"mifosxHasPermission"],["mat-table","",3,"dataSource"],["matColumnDef","Name"],["mat-header-cell","",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","Due as of"],["matColumnDef","Due"],["mat-header-cell","","class","r-amount",4,"matHeaderCellDef"],["mat-cell","","class","r-amount",4,"matCellDef"],["matColumnDef","Paid"],["matColumnDef","Waived"],["matColumnDef","Outstanding"],["matColumnDef","Actions"],["mat-header-cell","","class","center",4,"matHeaderCellDef"],["mat-cell","","class","center",4,"matCellDef"],["mat-header-row","",4,"matHeaderRowDef"],["mat-row","",3,"routerLink",4,"matRowDef","matRowDefColumns"],[1,"heading-name"],["mat-raised-button","","color","primary",1,"f-right",3,"click"],["mat-raised-button","","color","primary","disabled","",1,"f-right"],["matColumnDef","ID"],["matColumnDef","Quantity"],["matColumnDef","Total Value"],["matColumnDef","Total Collateral Value"],["mat-raised-button","","color","primary",1,"f-right",3,"routerLink"],["mat-header-cell",""],["mat-cell",""],[1,"fa","fa-stop",3,"ngClass"],["mat-header-cell","",1,"r-amount"],["mat-cell","",1,"r-amount"],["mat-header-cell","",1,"center"],["mat-cell","",1,"center"],["class","account-action-button","mat-raised-button","","color","primary",3,"routerLink","click",4,"mifosxHasPermission"],["class","account-action-button","mat-raised-button","","color","primary",3,"click",4,"mifosxHasPermission"],["mat-raised-button","","color","primary",1,"account-action-button",3,"click","routerLink"],[1,"fa","fa-dollar"],["mat-raised-button","","color","primary",1,"account-action-button",3,"click"],[1,"fa","fa-flag"],["mat-header-row",""],["mat-row","",3,"routerLink"],["matColumnDef","Account No"],["matColumnDef","Loan Account"],["matColumnDef","Original Loan"],["matColumnDef","Loan Balance"],["matColumnDef","Amount Paid"],["matColumnDef","Type"],["mat-row","","class","select-row",3,"routerLink",4,"matRowDef","matRowDefColumns"],[3,"accountNo"],["chars","35",3,"textValue"],["matTooltipPosition","above",1,"fa","fa-large",3,"ngClass","matTooltip"],["mat-raised-button","","color","primary","matTooltipPosition","above",1,"account-action-button",3,"matTooltip","routerLink"],["mat-raised-button","","color","primary","matTooltipPosition","above",1,"account-action-button",3,"click","matTooltip","routerLink"],["class","account-action-button","mat-raised-button","","color","primary","matTooltipPosition","above",3,"matTooltip","routerLink","click",4,"mifosxHasPermission"],[1,"fa","fa-check"],["class","account-action-button","mat-raised-button","","color","primary","matTooltipPosition","above",3,"matTooltip","click",4,"mifosxHasPermission"],["mat-raised-button","","color","primary","matTooltipPosition","above",1,"account-action-button",3,"click","matTooltip"],[1,"fa","fa-exchange"],["mat-row","",1,"select-row",3,"routerLink"],["matColumnDef","Closed Date"],["matColumnDef","Saving Account"],["matColumnDef","Last Active"],["matColumnDef","Balance"],["mat-raised-button","","color","primary",1,"account-action-button",3,"routerLink"],[1,"fa","fa-arrow-up"],[1,"fa","fa-arrow-down"],[1,"fa","fa-undo"],[1,"fa","fa-check-circle"],["class","account-action-button","mat-raised-button","","color","primary",3,"routerLink",4,"mifosxHasPermission"],["matColumnDef","Share Account"],["matColumnDef","Approved Shares"],["matColumnDef","Pending For Approval Shares"]],template:function(n,i){n&1&&(l(0,"div",0)(1,"h3"),c(2),p(3,"translate"),r(),l(4,"div",1)(5,"table")(6,"tbody")(7,"tr")(8,"td")(9,"p"),c(10),p(11,"translate"),b(12,"br"),c(13),p(14,"translate"),b(15,"br"),c(16),p(17,"translate"),p(18,"formatNumber"),b(19,"br"),r()(),l(20,"td")(21,"p"),c(22),p(23,"translate"),b(24,"br"),c(25),p(26,"translate"),p(27,"formatNumber"),b(28,"br"),r()()()()()(),l(29,"div",2)(30,"div",3)(31,"div",4)(32,"h3"),c(33),p(34,"translate"),r()()(),l(35,"div",3)(36,"div",5),F(37,L_e,3,5,"button",6),r()()(),l(38,"table",7),X(39,8),F(40,V_e,3,3,"th",9)(41,q_e,4,4,"td",10),Z(),X(42,11),F(43,z_e,3,3,"th",9)(44,H_e,3,3,"td",10),Z(),X(45,12),F(46,G_e,3,3,"th",13)(47,j_e,3,3,"td",14),Z(),X(48,15),F(49,$_e,3,3,"th",13)(50,U_e,3,3,"td",14),Z(),X(51,16),F(52,W_e,3,3,"th",13)(53,Q_e,3,3,"td",14),Z(),X(54,17),F(55,Y_e,3,3,"th",13)(56,J_e,3,3,"td",14),Z(),X(57,18),F(58,K_e,3,3,"th",19)(59,eCe,3,2,"td",20),Z(),F(60,tCe,1,0,"tr",21)(61,iCe,1,3,"tr",22),r(),l(62,"div",2)(63,"div",3)(64,"div",23)(65,"h3"),c(66),p(67,"translate"),r()()(),l(68,"div",3)(69,"div",5)(70,"button",24),R("click",function(){return i.toggleLoanAccountsOverview()}),c(71),p(72,"translate"),r()()()(),E(73,TCe,25,6,"table",7),E(74,GCe,25,7,"table",7),l(75,"div",2)(76,"div",3)(77,"div",23)(78,"h3"),c(79),p(80,"translate"),r()()(),l(81,"div",3)(82,"div",5)(83,"button",24),R("click",function(){return i.toggleSavingAccountsOverview()}),c(84),p(85,"translate"),r()()()(),E(86,l2e,19,8,"table",7),E(87,g2e,13,8,"table",7),l(88,"div",2)(89,"div",3)(90,"div",23)(91,"h3"),c(92),p(93,"translate"),r()()(),l(94,"div",3)(95,"div",5)(96,"button",24),R("click",function(){return i.toggleFixedAccountsOverview()}),c(97),p(98,"translate"),r()()()(),E(99,A2e,19,8,"table",7),E(100,z2e,13,8,"table",7),l(101,"div",2)(102,"div",3)(103,"div",23)(104,"h3"),c(105),p(106,"translate"),r()()(),l(107,"div",3)(108,"div",5)(109,"button",24),R("click",function(){return i.toggleRecurringAccountsOverview()}),c(110),p(111,"translate"),r()()()(),E(112,ave,19,8,"table",7),E(113,fve,13,8,"table",7),l(114,"div",2)(115,"div",3)(116,"div",23)(117,"h3"),c(118),p(119,"translate"),r()()(),l(120,"div",3)(121,"div",5)(122,"button",24),R("click",function(){return i.toggleShareAccountsOverview()}),c(123),p(124,"translate"),r()()()(),E(125,Ive,19,6,"table",7),E(126,Gve,19,7,"table",7),l(127,"div",2)(128,"div",3)(129,"div",23)(130,"h3"),c(131),p(132,"translate"),r()()(),l(133,"div",3)(134,"div",5)(135,"button",25),c(136),p(137,"translate"),r()()()(),l(138,"table",7),X(139,26),F(140,jve,3,3,"th",9)(141,$ve,2,1,"td",10),Z(),X(142,8),F(143,Uve,3,3,"th",9)(144,Wve,2,1,"td",10),Z(),X(145,27),F(146,Qve,3,3,"th",13)(147,Yve,3,3,"td",14),Z(),X(148,28),F(149,Jve,3,3,"th",13)(150,Kve,3,3,"td",14),Z(),X(151,29),F(152,Xve,3,3,"th",13)(153,Zve,3,3,"td",14),Z(),F(154,exe,1,0,"tr",21)(155,txe,1,3,"tr",22),r()()),n&2&&(a(2),h(m(3,41,"labels.heading.Performance History")),a(8),le(" ",m(11,43,"labels.inputs.No. Of Loan Cycles")," :",i.clientSummary==null?null:i.clientSummary.loanCycle," "),a(3),le(" ",m(14,45,"labels.inputs.No. of Active Loans")," :",i.clientSummary==null?null:i.clientSummary.activeLoans," "),a(3),le(" ",m(17,47,"labels.inputs.Last Loan Amount")," :",m(18,49,i.clientSummary==null?null:i.clientSummary.lastLoanAmount)," "),a(6),le(" ",m(23,51,"labels.inputs.No. of Active Savings")," :",i.clientSummary==null?null:i.clientSummary.activeSavings," "),a(3),le(" ",m(26,53,"labels.inputs.Total Savings")," :",m(27,55,i.clientSummary==null?null:i.clientSummary.totalSavings)," "),a(8),h(m(34,57,"labels.heading.Upcoming Charges")),a(4),g("mifosxHasPermission","READ_CLIENTCHARGE"),a(),g("dataSource",i.upcomingCharges),a(22),g("matHeaderRowDef",i.upcomingChargesColumns),a(),g("matRowDefColumns",i.upcomingChargesColumns),a(5),h(m(67,59,"labels.heading.Loan Accounts")),a(5),v(" ",m(72,61,i.viewAccountsLabel(i.showClosedLoanAccounts))," "),a(2),I(i.showClosedLoanAccounts?-1:73),a(),I(i.showClosedLoanAccounts?74:-1),a(5),h(m(80,63,"labels.heading.Saving Accounts")),a(5),v(" ",m(85,65,i.viewAccountsLabel(i.showClosedSavingAccounts))," "),a(2),I(i.showClosedSavingAccounts?-1:86),a(),I(i.showClosedSavingAccounts?87:-1),a(5),h(m(93,67,"labels.heading.Fixed Deposit Accounts")),a(5),v(" ",m(98,69,i.viewAccountsLabel(i.showClosedFixedAccounts))," "),a(2),I(i.showClosedFixedAccounts?-1:99),a(),I(i.showClosedFixedAccounts?100:-1),a(5),h(m(106,71,"labels.heading.Recurring Deposit Accounts")),a(5),v(" ",m(111,73,i.viewAccountsLabel(i.showClosedRecurringAccounts))," "),a(2),I(i.showClosedRecurringAccounts?-1:112),a(),I(i.showClosedRecurringAccounts?113:-1),a(5),h(m(119,75,"labels.inputs.Shares Accounts")),a(5),v(" ",m(124,77,i.viewAccountsLabel(i.showClosedShareAccounts))," "),a(2),I(i.showClosedShareAccounts?-1:125),a(),I(i.showClosedShareAccounts?126:-1),a(5),h(m(132,79,"labels.heading.Collateral Data")),a(5),v(" ",m(137,81,"labels.buttons.View Collaterals")," "),a(2),g("dataSource",i.collaterals),a(16),g("matHeaderRowDef",i.collateralsColumns),a(),g("matRowDefColumns",i.collateralsColumns))},dependencies:[ue,co,fe,Ae,ve,Ke,_t,xt,vt,bt,Ct,yt,St,Pt,wt,Tt,rc,Bk,si,Pi,he,go,as,On],styles:[".tab-container[_ngcontent-%COMP%]{padding:1%;margin:1%}.tab-container[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{margin:1% auto}.tab-container[_ngcontent-%COMP%] .performance-history-container[_ngcontent-%COMP%]{border:1px solid;padding:1%}.tab-container[_ngcontent-%COMP%] table[_ngcontent-%COMP%]{width:100%}.tab-container[_ngcontent-%COMP%] table[_ngcontent-%COMP%] td[_ngcontent-%COMP%]:hover{cursor:pointer}.tab-container[_ngcontent-%COMP%] table[_ngcontent-%COMP%] .account-action-button[_ngcontent-%COMP%]{min-width:26px;padding:0 6px;margin:4px;line-height:25px}.tab-container[_ngcontent-%COMP%] table[_ngcontent-%COMP%] .select-row[_ngcontent-%COMP%]:hover{cursor:pointer}.heading-content[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;margin-bottom:1%;margin-top:1%}.heading-name[_ngcontent-%COMP%]{margin:0}.layout-row.align-flex-end[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.5rem}"]})}}return e})();var ixe=()=>["./add"],nxe=e=>[e,"edit"];function oxe(e,o){if(e&1&&(l(0,"span"),c(1),p(2,"translate"),b(3,"br"),r()),e&2){let t=w().$implicit;a(),le("",m(2,2,"labels.inputs.First Name")," : ",t.firstName)}}function axe(e,o){if(e&1&&(l(0,"span"),c(1),p(2,"translate"),b(3,"br"),r()),e&2){let t=w().$implicit;a(),le("",m(2,2,"labels.inputs.Middle Name")," : ",t.middleName)}}function rxe(e,o){if(e&1&&(l(0,"span"),c(1),p(2,"translate"),b(3,"br"),r()),e&2){let t=w().$implicit;a(),le("",m(2,2,"labels.inputs.Last Name")," : ",t.lastName)}}function lxe(e,o){if(e&1&&(l(0,"span"),c(1),p(2,"translate"),b(3,"br"),r()),e&2){let t=w().$implicit;a(),le("",m(2,2,"labels.inputs.Qualification")," : ",t.qualification)}}function sxe(e,o){if(e&1&&(l(0,"span"),c(1),p(2,"translate"),b(3,"br"),r()),e&2){let t=w().$implicit;a(),le("",m(2,2,"labels.inputs.Mobile Number")," : ",t.mobileNumber)}}function cxe(e,o){if(e&1&&(l(0,"span"),c(1),p(2,"translate"),b(3,"br"),r()),e&2){let t=w().$implicit;a(),le("",m(2,2,"labels.inputs.Age")," : ",t.age)}}function pxe(e,o){if(e&1&&(l(0,"span"),c(1),p(2,"translate"),p(3,"yesNo"),b(4,"br"),r()),e&2){let t=w().$implicit;a(),le("",m(2,2,"labels.inputs.Is Dependent")," : ",m(3,4,t.isDependent))}}function mxe(e,o){if(e&1&&(l(0,"span"),c(1),p(2,"translate"),b(3,"br"),r()),e&2){let t=w().$implicit;a(),le("",m(2,2,"labels.inputs.Marital Status")," : ",t.maritalStatus)}}function dxe(e,o){if(e&1&&(l(0,"span"),c(1),p(2,"translate"),b(3,"br"),r()),e&2){let t=w().$implicit;a(),le("",m(2,2,"labels.inputs.Gender")," : ",t.gender)}}function uxe(e,o){if(e&1&&(l(0,"span"),c(1),p(2,"translate"),b(3,"br"),r()),e&2){let t=w().$implicit;a(),le("",m(2,2,"labels.inputs.Profession")," : ",t.profession)}}function fxe(e,o){if(e&1&&(l(0,"span"),c(1),p(2,"translate"),p(3,"dateFormat"),b(4,"br"),r()),e&2){let t=w().$implicit;a(),le("",m(2,2,"labels.inputs.Date Of Birth")," : ",m(3,4,t.dateOfBirth))}}function hxe(e,o){if(e&1){let t=Y();l(0,"mat-expansion-panel",4)(1,"mat-expansion-panel-header")(2,"mat-panel-title"),c(3),r(),l(4,"mat-panel-description"),c(5),r()(),b(6,"mat-divider",5),l(7,"div",6)(8,"button",7),b(9,"fa-icon",8),r(),l(10,"button",9),R("click",function(){let i=V(t),s=i.$implicit,d=i.$index,u=w();return q(u.deleteFamilyMember(s.clientId,s.id,s.firstName,d))}),b(11,"fa-icon",10),r()(),l(12,"p"),E(13,oxe,4,4,"span"),E(14,axe,4,4,"span"),E(15,rxe,4,4,"span"),E(16,lxe,4,4,"span"),E(17,sxe,4,4,"span"),E(18,cxe,4,4,"span"),E(19,pxe,5,6,"span"),E(20,mxe,4,4,"span"),E(21,dxe,4,4,"span"),E(22,uxe,4,4,"span"),E(23,fxe,5,6,"span"),r()()}if(e&2){let t=o.$implicit,n=w();a(3),v(" ",n.displayName(t)," "),a(2),v(" ",t.relationship," "),a(),g("inset",!0),a(3),g("routerLink",Nt(15,nxe,t.id)),a(4),I(t.firstName?13:-1),a(),I(t.middleName?14:-1),a(),I(t.lastName?15:-1),a(),I(t.qualification?16:-1),a(),I(t.mobileNumber?17:-1),a(),I(t.age?18:-1),a(),I(t.isDependent?19:-1),a(),I(t.maritalStatus?20:-1),a(),I(t.gender?21:-1),a(),I(t.profession?22:-1),a(),I(t.dateOfBirth?23:-1)}}var HC=(()=>{class e{constructor(){this.route=T(Ie),this.clientsService=T(Oi),this.dialog=T(Ht),this.route.data.subscribe(t=>{this.clientFamilyMembers=t.clientFamilyMembers})}deleteFamilyMember(t,n,i,s){this.dialog.open(vi,{data:{deleteContext:`Family member id:${n} name : ${i} ${s}`}}).afterClosed().subscribe(u=>{u.delete&&this.clientsService.deleteFamilyMember(t,n).subscribe(()=>{this.clientFamilyMembers.splice(s,1)})})}displayName(t){let n=t.firstName;return t.middleName&&(n=n+" "+t.middleName),t.lastName&&(n=n+" "+t.lastName),n}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275cmp=me({type:e,selectors:[["mifosx-family-members-tab"]],decls:13,vars:8,consts:[[1,"tab-container","mat-typography"],[1,"layout-row","align-flex-end"],["mat-raised-button","","color","primary",3,"routerLink"],["icon","plus",1,"m-r-10"],[1,"family-member"],[3,"inset"],[1,"family-member-actions","layout-row","align-end"],["mat-button","","color","primary"],["icon","edit",3,"routerLink"],["mat-button","","color","warn",3,"click"],["icon","trash"]],template:function(n,i){n&1&&(l(0,"div",0)(1,"router-outlet")(2,"h3"),c(3),p(4,"translate"),r(),l(5,"div",1)(6,"button",2),b(7,"fa-icon",3),c(8),p(9,"translate"),r()(),l(10,"mat-accordion"),Se(11,hxe,24,17,"mat-expansion-panel",4,Pe),r()()()),n&2&&(a(3),h(m(4,3,"labels.heading.Family Members")),a(3),g("routerLink",oe(7,ixe)),a(2),v("",m(9,5,"labels.buttons.Add")," "),a(3),we(i.clientFamilyMembers))},dependencies:[ue,fe,Ae,ve,ra,ke,Er,Tr,Mr,Dr,oc,Ri,Pi,he,po],styles:[".tab-container[_ngcontent-%COMP%]{padding:1%;margin:1%}.tab-container[_ngcontent-%COMP%] .family-member[_ngcontent-%COMP%] .family-member-actions[_ngcontent-%COMP%]{margin-top:1%}.tab-container[_ngcontent-%COMP%] .family-member[_ngcontent-%COMP%] .family-member-actions[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{margin-right:1%}.tab-container[_ngcontent-%COMP%] .family-member[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{margin:1% auto}.tab-container[_ngcontent-%COMP%] .family-member[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{line-height:30px;margin-left:2%}"]})}}return e})();var gxe=()=>["../"];function _xe(e,o){e&1&&(l(0,"mat-error"),c(1),p(2,"translate"),p(3,"translate"),l(4,"strong"),c(5),p(6,"translate"),r()()),e&2&&(a(),le(" ",m(2,3,"labels.inputs.First Name")," ",m(3,5,"labels.commons.is")," "),a(4),h(m(6,7,"labels.commons.required")))}function Cxe(e,o){e&1&&(l(0,"mat-error"),c(1),p(2,"translate"),p(3,"translate"),l(4,"strong"),c(5),p(6,"translate"),r()()),e&2&&(a(),le(" ",m(2,3,"labels.inputs.Last Name")," ",m(3,5,"labels.commons.is")," "),a(4),h(m(6,7,"labels.commons.required")))}function vxe(e,o){if(e&1&&(l(0,"mat-option",12),c(1),p(2,"translateKey"),r()),e&2){let t=o.$implicit;g("value",t.id),a(),v(" ",Ot(2,2,t.name,"catalogs")," ")}}function xxe(e,o){e&1&&(l(0,"mat-error"),c(1),p(2,"translate"),p(3,"translate"),l(4,"strong"),c(5),p(6,"translate"),r()()),e&2&&(a(),le(" ",m(2,3,"labels.inputs.Relationship")," ",m(3,5,"labels.commons.is")," "),a(4),h(m(6,7,"labels.commons.required")))}function bxe(e,o){if(e&1&&(l(0,"mat-option",12),c(1),p(2,"translateKey"),r()),e&2){let t=o.$implicit;g("value",t.id),a(),v(" ",Ot(2,2,t.name,"catalogs")," ")}}function yxe(e,o){e&1&&(l(0,"mat-error"),c(1),p(2,"translate"),p(3,"translate"),l(4,"strong"),c(5),p(6,"translate"),r()()),e&2&&(a(),le(" ",m(2,3,"labels.inputs.Gender")," ",m(3,5,"labels.commons.is")," "),a(4),h(m(6,7,"labels.commons.required")))}function Sxe(e,o){if(e&1&&(l(0,"mat-option",12),c(1),p(2,"translateKey"),r()),e&2){let t=o.$implicit;g("value",t.id),a(),v(" ",Ot(2,2,t.name,"catalogs")," ")}}function wxe(e,o){if(e&1&&(l(0,"mat-option",12),c(1),p(2,"translateKey"),r()),e&2){let t=o.$implicit;g("value",t.id),a(),v(" ",Ot(2,2,t.name,"catalogs")," ")}}var GC=(()=>{class e{constructor(){this.formBuilder=T(nt),this.dateUtils=T(Zt),this.router=T(qe),this.route=T(Ie),this.clientsService=T(Oi),this.settingsService=T(At),this.maxDate=new Date,this.minAge=0,this.route.data.subscribe(t=>{this.addFamilyMemberTemplate=t.clientTemplate.familyMemberOptions}),this.clientId=this.route.parent.parent.snapshot.params.clientId}ngOnInit(){this.maxDate=this.settingsService.businessDate,this.createAddFamilyMemberForm(),this.addFamilyMemberForm.get("dateOfBirth").valueChanges.subscribe(t=>{if(t){let n=this.calculateAge(t);this.addFamilyMemberForm.get("age").setValue(n)}else this.addFamilyMemberForm.get("age").setValue("")})}calculateAge(t){let n=new Date(this.settingsService.businessDate),i=new Date(t),s=n.getFullYear()-i.getFullYear(),d=n.getMonth()-i.getMonth();return(d<0||d===0&&n.getDate(){this.router.navigate(["../"],{relativeTo:this.route})})}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275cmp=me({type:e,selectors:[["mifosx-add-family-member"]],decls:78,vars:51,consts:[["dueDatePicker",""],[1,"add-family-member-container"],[3,"ngSubmit","formGroup"],[1,"layout-row-wrap","responsive-column","align-start-center"],[1,"flex-50-minus-25px"],["formControlName","firstName","required","","matInput","","aria-label","First Name","placeholder","First Name","title","First Name"],["formControlName","middleName","matInput","","aria-label","Middle Name","placeholder","Middle Name","title","Middle Name"],["formControlName","lastName","required","","matInput","","aria-label","Last Name","placeholder","Last Name","title","Last Name"],["formControlName","qualification","matInput","","aria-label","Qualification","placeholder","Qualification","title","Qualification"],["type","number","formControlName","age","matInput","","disabled","","aria-label","Age","placeholder","Age","title","Age",3,"min"],["formControlName","isDependent","labelPosition","before",1,"flex-50-minus-25px"],["formControlName","relationshipId","required",""],[3,"value"],["formControlName","genderId","required",""],["formControlName","professionId"],["formControlName","maritalStatusId"],[1,"flex-fill",3,"click"],["formControlName","dateOfBirth","matInput","","placeholder","Optional","aria-label","Date Of Birth","title","Date Of Birth",3,"max","matDatepicker"],["matSuffix","",3,"for"],[1,"layout-row","gap-32px","layout-align-center"],["type","button","mat-raised-button","",3,"routerLink"],["type","submit","mat-raised-button","","color","primary",3,"disabled"]],template:function(n,i){if(n&1){let s=Y();l(0,"div",1)(1,"form",2),R("ngSubmit",function(){return V(s),q(i.submit())}),l(2,"div",3)(3,"mat-form-field",4)(4,"mat-label"),c(5),p(6,"translate"),r(),b(7,"input",5),E(8,_xe,7,9,"mat-error"),r(),l(9,"mat-form-field",4)(10,"mat-label"),c(11),p(12,"translate"),r(),b(13,"input",6),r(),l(14,"mat-form-field",4)(15,"mat-label"),c(16),p(17,"translate"),r(),b(18,"input",7),E(19,Cxe,7,9,"mat-error"),r(),l(20,"mat-form-field",4)(21,"mat-label"),c(22),p(23,"translate"),r(),b(24,"input",8),r(),l(25,"mat-form-field",4)(26,"mat-label"),c(27),p(28,"translate"),r(),b(29,"input",9),r(),l(30,"mat-checkbox",10),c(31),p(32,"translate"),r(),l(33,"mat-form-field",4)(34,"mat-label"),c(35),p(36,"translate"),r(),l(37,"mat-select",11),Se(38,vxe,3,5,"mat-option",12,Pe),r(),E(40,xxe,7,9,"mat-error"),r(),l(41,"mat-form-field",4)(42,"mat-label"),c(43),p(44,"translate"),r(),l(45,"mat-select",13),Se(46,bxe,3,5,"mat-option",12,Pe),r(),E(48,yxe,7,9,"mat-error"),r(),l(49,"mat-form-field",4)(50,"mat-label"),c(51),p(52,"translate"),r(),l(53,"mat-select",14),Se(54,Sxe,3,5,"mat-option",12,Pe),r()(),l(56,"mat-form-field",4)(57,"mat-label"),c(58),p(59,"translate"),r(),l(60,"mat-select",15),Se(61,wxe,3,5,"mat-option",12,Pe),r()(),l(63,"mat-form-field",16),R("click",function(){V(s);let u=xe(70);return q(u.open())}),l(64,"mat-label"),c(65),p(66,"translate"),r(),b(67,"input",17)(68,"mat-datepicker-toggle",18)(69,"mat-datepicker",null,0),r()(),l(71,"div",19)(72,"button",20),c(73),p(74,"translate"),r(),l(75,"button",21),c(76),p(77,"translate"),r()()()()}if(n&2){let s=xe(70);a(),g("formGroup",i.addFamilyMemberForm),a(4),h(m(6,24,"labels.inputs.First Name")),a(3),I(i.addFamilyMemberForm.controls.firstName.hasError("required")?8:-1),a(3),h(m(12,26,"labels.inputs.Middle Name")),a(5),h(m(17,28,"labels.inputs.Last Name")),a(3),I(i.addFamilyMemberForm.controls.lastName.hasError("required")?19:-1),a(3),h(m(23,30,"labels.inputs.Qualification")),a(5),h(m(28,32,"labels.inputs.Age")),a(2),g("min",i.minAge),a(2),v(" ",m(32,34,"labels.inputs.Is Dependent"),"? "),a(4),h(m(36,36,"labels.inputs.Relationship")),a(3),we(i.addFamilyMemberTemplate.relationshipIdOptions),a(2),I(i.addFamilyMemberForm.controls.relationshipId.hasError("required")?40:-1),a(3),h(m(44,38,"labels.inputs.Gender")),a(3),we(i.addFamilyMemberTemplate.genderIdOptions),a(2),I(i.addFamilyMemberForm.controls.genderId.hasError("required")?48:-1),a(3),h(m(52,40,"labels.inputs.Profession")),a(3),we(i.addFamilyMemberTemplate.professionIdOptions),a(4),h(m(59,42,"labels.inputs.Marital Status")),a(3),we(i.addFamilyMemberTemplate.maritalStatusIdOptions),a(4),h(m(66,44,"labels.inputs.Date Of Birth")),a(2),g("max",i.maxDate)("matDatepicker",s),a(),g("for",s),a(4),g("routerLink",oe(50,gxe)),a(),h(m(74,46,"labels.buttons.Cancel")),a(2),g("disabled",!i.addFamilyMemberForm.valid),a(),v(" ",m(77,48,"labels.buttons.Submit")," ")}},dependencies:[ue,fe,tt,st,tn,Ue,Xe,dt,Da,Ze,et,Ae,Fe,Be,ut,ai,ze,gt,ft,mi,di,pi,ve,fi,he,Fi],styles:[".add-family-member-container[_ngcontent-%COMP%]{width:70%;margin:0 auto;padding:5%}@media screen and (width >= 960px){.add-family-member-container[_ngcontent-%COMP%] .layout-row-wrap[_ngcontent-%COMP%] > .flex-fill[_ngcontent-%COMP%]:nth-child(odd), .add-family-member-container[_ngcontent-%COMP%] .layout-row-wrap[_ngcontent-%COMP%] > .flex-50-minus-25px[_ngcontent-%COMP%]:nth-child(odd){margin-right:25px}.add-family-member-container[_ngcontent-%COMP%] .layout-row-wrap[_ngcontent-%COMP%] > .flex-fill[_ngcontent-%COMP%]:last-child, .add-family-member-container[_ngcontent-%COMP%] .layout-row-wrap[_ngcontent-%COMP%] > .flex-50-minus-25px[_ngcontent-%COMP%]:last-child{margin-right:0}}.mat-form-field-hint[_ngcontent-%COMP%]{font-size:75%;color:#0009;margin-top:4px;margin-bottom:8px}"]})}}return e})();var Pxe=()=>["../../"];function Txe(e,o){e&1&&(l(0,"mat-error"),c(1),p(2,"translate"),p(3,"translate"),l(4,"strong"),c(5),p(6,"translate"),r()()),e&2&&(a(),le(" ",m(2,3,"labels.inputs.First Name")," ",m(3,5,"labels.commons.is")," "),a(4),h(m(6,7,"labels.commons.required")))}function Mxe(e,o){e&1&&(l(0,"mat-error"),c(1),p(2,"translate"),p(3,"translate"),l(4,"strong"),c(5),p(6,"translate"),r()()),e&2&&(a(),le(" ",m(2,3,"labels.inputs.Last Name")," ",m(3,5,"labels.commons.is")," "),a(4),h(m(6,7,"labels.commons.required")))}function Dxe(e,o){if(e&1&&(l(0,"mat-option",12),c(1),p(2,"translateKey"),r()),e&2){let t=o.$implicit;g("value",t.id),a(),v(" ",Ot(2,2,t.name,"catalogs")," ")}}function Exe(e,o){e&1&&(l(0,"mat-error"),c(1),p(2,"translate"),p(3,"translate"),l(4,"strong"),c(5),p(6,"translate"),r()()),e&2&&(a(),le(" ",m(2,3,"labels.inputs.Relationship")," ",m(3,5,"labels.commons.is")," "),a(4),h(m(6,7,"labels.commons.required")))}function Ixe(e,o){if(e&1&&(l(0,"mat-option",12),c(1),p(2,"translateKey"),r()),e&2){let t=o.$implicit;g("value",t.id),a(),v(" ",Ot(2,2,t.name,"catalogs")," ")}}function Oxe(e,o){e&1&&(l(0,"mat-error"),c(1),p(2,"translate"),p(3,"translate"),l(4,"strong"),c(5),p(6,"translate"),r()()),e&2&&(a(),le(" ",m(2,3,"labels.inputs.Gender")," ",m(3,5,"labels.commons.is")," "),a(4),h(m(6,7,"labels.commons.required")))}function Axe(e,o){if(e&1&&(l(0,"mat-option",12),c(1),p(2,"translateKey"),r()),e&2){let t=o.$implicit;g("value",t.id),a(),v(" ",Ot(2,2,t.name,"catalogs")," ")}}function Fxe(e,o){if(e&1&&(l(0,"mat-option",12),c(1),p(2,"translateKey"),r()),e&2){let t=o.$implicit;g("value",t.id),a(),v(" ",Ot(2,2,t.name,"catalogs")," ")}}var jC=(()=>{class e{constructor(){this.formBuilder=T(nt),this.dateUtils=T(Zt),this.router=T(qe),this.route=T(Ie),this.clientsService=T(Oi),this.settingsService=T(At),this.maxDate=new Date,this.route.data.subscribe(t=>{this.addFamilyMemberTemplate=t.clientTemplate.familyMemberOptions,this.familyMemberDetails=t.editFamilyMember})}ngOnInit(){this.maxDate=this.settingsService.businessDate,this.createEditFamilyMemberForm(this.familyMemberDetails),this.editFamilyMemberForm.get("dateOfBirth").valueChanges.subscribe(t=>{if(t){let n=this.calculateAge(t);this.editFamilyMemberForm.get("age").setValue(n)}else this.editFamilyMemberForm.get("age").setValue("")})}calculateAge(t){let n=new Date(this.settingsService.businessDate),i=new Date(t),s=n.getFullYear()-i.getFullYear(),d=n.getMonth()-i.getMonth();return(d<0||d===0&&n.getDate(){this.router.navigate(["../../"],{relativeTo:this.route})})}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275cmp=me({type:e,selectors:[["mifosx-edit-family-member"]],decls:78,vars:50,consts:[["dueDatePicker",""],[1,"add-family-member-container"],[3,"ngSubmit","formGroup"],[1,"layout-row-wrap","responsive-column","align-start-center"],[1,"flex-50-minus-25px"],["formControlName","firstName","required","","matInput",""],["formControlName","middleName","matInput",""],["formControlName","lastName","required","","matInput",""],["formControlName","qualification","matInput",""],["type","number","formControlName","age","matInput","","disabled",""],["formControlName","isDependent","labelPosition","before",1,"flex-50-minus-25px"],["formControlName","relationshipId","required",""],[3,"value"],["formControlName","genderId","required",""],["formControlName","professionId"],["formControlName","maritalStatusId"],[1,"flex-fill",3,"click"],["formControlName","dateOfBirth","matInput","","placeholder","Optional",3,"max","matDatepicker"],["matSuffix","",3,"for"],[1,"layout-row","gap-32px","layout-align-center"],["type","button","mat-raised-button","",3,"routerLink"],["type","submit","mat-raised-button","","color","primary",3,"disabled"]],template:function(n,i){if(n&1){let s=Y();l(0,"div",1)(1,"form",2),R("ngSubmit",function(){return V(s),q(i.submit())}),l(2,"div",3)(3,"mat-form-field",4)(4,"mat-label"),c(5),p(6,"translate"),r(),b(7,"input",5),E(8,Txe,7,9,"mat-error"),r(),l(9,"mat-form-field",4)(10,"mat-label"),c(11),p(12,"translate"),r(),b(13,"input",6),r(),l(14,"mat-form-field",4)(15,"mat-label"),c(16),p(17,"translate"),r(),b(18,"input",7),E(19,Mxe,7,9,"mat-error"),r(),l(20,"mat-form-field",4)(21,"mat-label"),c(22),p(23,"translate"),r(),b(24,"input",8),r(),l(25,"mat-form-field",4)(26,"mat-label"),c(27),p(28,"translate"),r(),b(29,"input",9),r(),l(30,"mat-checkbox",10),c(31),p(32,"translate"),r(),l(33,"mat-form-field",4)(34,"mat-label"),c(35),p(36,"translate"),r(),l(37,"mat-select",11),Se(38,Dxe,3,5,"mat-option",12,Pe),r(),E(40,Exe,7,9,"mat-error"),r(),l(41,"mat-form-field",4)(42,"mat-label"),c(43),p(44,"translate"),r(),l(45,"mat-select",13),Se(46,Ixe,3,5,"mat-option",12,Pe),r(),E(48,Oxe,7,9,"mat-error"),r(),l(49,"mat-form-field",4)(50,"mat-label"),c(51),p(52,"translate"),r(),l(53,"mat-select",14),Se(54,Axe,3,5,"mat-option",12,Pe),r()(),l(56,"mat-form-field",4)(57,"mat-label"),c(58),p(59,"translate"),r(),l(60,"mat-select",15),Se(61,Fxe,3,5,"mat-option",12,Pe),r()(),l(63,"mat-form-field",16),R("click",function(){V(s);let u=xe(70);return q(u.open())}),l(64,"mat-label"),c(65),p(66,"translate"),r(),b(67,"input",17)(68,"mat-datepicker-toggle",18)(69,"mat-datepicker",null,0),r()(),l(71,"div",19)(72,"button",20),c(73),p(74,"translate"),r(),l(75,"button",21),c(76),p(77,"translate"),r()()()()}if(n&2){let s=xe(70);a(),g("formGroup",i.editFamilyMemberForm),a(4),h(m(6,23,"labels.inputs.First Name")),a(3),I(i.editFamilyMemberForm.controls.firstName.hasError("required")?8:-1),a(3),h(m(12,25,"labels.inputs.Middle Name")),a(5),h(m(17,27,"labels.inputs.Last Name")),a(3),I(i.editFamilyMemberForm.controls.lastName.hasError("required")?19:-1),a(3),h(m(23,29,"labels.inputs.Qualification")),a(5),h(m(28,31,"labels.inputs.Age")),a(4),v(" ",m(32,33,"labels.inputs.Is Dependent")," "),a(4),h(m(36,35,"labels.inputs.Relationship")),a(3),we(i.addFamilyMemberTemplate.relationshipIdOptions),a(2),I(i.editFamilyMemberForm.controls.relationshipId.hasError("required")?40:-1),a(3),h(m(44,37,"labels.inputs.Gender")),a(3),we(i.addFamilyMemberTemplate.genderIdOptions),a(2),I(i.editFamilyMemberForm.controls.genderId.hasError("required")?48:-1),a(3),h(m(52,39,"labels.inputs.Profession")),a(3),we(i.addFamilyMemberTemplate.professionIdOptions),a(4),h(m(59,41,"labels.inputs.Marital Status")),a(3),we(i.addFamilyMemberTemplate.maritalStatusIdOptions),a(4),h(m(66,43,"labels.inputs.Date Of Birth")),a(2),g("max",i.maxDate)("matDatepicker",s),a(),g("for",s),a(4),g("routerLink",oe(49,Pxe)),a(),v(" ",m(74,45,"labels.buttons.Cancel")," "),a(2),g("disabled",i.editFamilyMemberForm.pristine||!i.editFamilyMemberForm.valid),a(),v(" ",m(77,47,"labels.buttons.Submit")," ")}},dependencies:[ue,fe,tt,st,tn,Ue,Xe,dt,Ze,et,Ae,Fe,Be,ut,ai,ze,gt,ft,mi,di,pi,ve,fi,he,Fi],styles:[".add-family-member-container[_ngcontent-%COMP%]{width:70%;margin:0 auto;padding:5%}@media screen and (width >= 960px){.add-family-member-container[_ngcontent-%COMP%] .flex-50-minus-25px[_ngcontent-%COMP%]:nth-child(odd){margin-right:25px}.add-family-member-container[_ngcontent-%COMP%] .flex-50-minus-25px[_ngcontent-%COMP%]:last-child{margin-right:0}}.mat-form-field-hint[_ngcontent-%COMP%]{font-size:75%;color:#0009;margin-top:4px;margin-bottom:8px}"]})}}return e})();var kxe=["identifiersTable"],Bxe=["identityLightbox"],Rxe=()=>({"margin-top":"3%"});function Nxe(e,o){if(e&1){let t=Y();l(0,"button",18),R("click",function(){V(t);let i=w();return q(i.addIdentifier())}),b(1,"fa-icon",19),c(2),p(3,"translate"),r()}e&2&&(a(2),v(" ",m(3,1,"labels.buttons.Add")," "))}function Lxe(e,o){e&1&&(l(0,"th",20),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.Id")))}function Vxe(e,o){if(e&1&&(l(0,"td",21),c(1),r()),e&2){let t=o.$implicit;a(),h(t.id)}}function qxe(e,o){e&1&&(l(0,"th",20),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.Type")))}function zxe(e,o){if(e&1&&(l(0,"td",21),c(1),r()),e&2){let t=o.$implicit;a(),h(t.documentType.name)}}function Hxe(e,o){e&1&&(l(0,"th",20),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.Document Key")))}function Gxe(e,o){if(e&1&&(l(0,"td",21),c(1),r()),e&2){let t=o.$implicit;a(),h(t.documentKey)}}function jxe(e,o){e&1&&(l(0,"th",20),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.Description")))}function $xe(e,o){if(e&1&&(l(0,"td",21),c(1),r()),e&2){let t=o.$implicit;a(),h(t.description)}}function Uxe(e,o){e&1&&(l(0,"th",20),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.Identity Documents")))}function Wxe(e,o){if(e&1&&b(0,"img",26),e&2){let t=w().$implicit,n=w(3);g("src",n.previewThumbnails[t.id],f0)("alt",t.name)("title",t.name)}}function Qxe(e,o){if(e&1&&(l(0,"div",27),b(1,"fa-icon",32),l(2,"span"),c(3),r()()),e&2){let t=w().$implicit;a(3),h(t.fileName||t.name)}}function Yxe(e,o){e&1&&(l(0,"div",28),b(1,"fa-icon",33),r())}function Jxe(e,o){if(e&1&&(l(0,"div",31),c(1),r()),e&2){let t=w().$implicit;a(),h(t.fileName)}}function Kxe(e,o){if(e&1){let t=Y();l(0,"div",24)(1,"div",25),p(2,"translate"),R("keydown.enter",function(){let i=V(t).$implicit,s=w(2).$implicit,d=w();return q(d.isPreviewable(i)&&d.openDocumentPreview(s,i))})("keydown.space",function(){let i=V(t).$implicit,s=w(2).$implicit,d=w();return q(d.isPreviewable(i)&&d.openDocumentPreview(s,i))})("click",function(){let i=V(t).$implicit,s=w(2).$implicit,d=w();return q(d.isPreviewable(i)&&d.openDocumentPreview(s,i))}),E(3,Wxe,1,3,"img",26)(4,Qxe,4,1,"div",27),E(5,Yxe,2,0,"div",28),r(),l(6,"div",29)(7,"div",30),c(8),r(),E(9,Jxe,2,1,"div",31),r()()}if(e&2){let t=o.$implicit,n=w(3);a(),Cl("clickable",n.isPreviewable(t)),Dn("aria-label",m(2,7,"labels.buttons.Preview")+": "+t.name),a(2),I(n.previewThumbnails[t.id]?3:4),a(2),I(n.isPreviewable(t)?5:-1),a(3),h(t.name),a(),I(t.fileName?9:-1)}}function Xxe(e,o){if(e&1&&(l(0,"div",22),Se(1,Kxe,10,9,"div",24,dd().trackByDocumentId,!0),r()),e&2){let t=w().$implicit;a(),we(t.documents)}}function Zxe(e,o){e&1&&(l(0,"span",23),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.text.NoDocuments")))}function ebe(e,o){if(e&1&&(l(0,"td",21),E(1,Xxe,3,0,"div",22)(2,Zxe,3,3,"span",23),r()),e&2){let t=o.$implicit;a(),I(t.documents!=null&&t.documents.length?1:2)}}function tbe(e,o){e&1&&(l(0,"th",20),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.Status")))}function ibe(e,o){if(e&1&&(l(0,"td",21),c(1),r()),e&2){let t=o.$implicit;a(),v(" ",t.status==="clientIdentifierStatusType.active"?"active":"inactive"," ")}}function nbe(e,o){e&1&&(l(0,"th",20),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.Actions")))}function obe(e,o){if(e&1){let t=Y();l(0,"button",35),p(1,"translate"),p(2,"translate"),R("click",function(){V(t);let i=w(),s=i.$implicit,d=i.index,u=w();return q(u.deleteIdentifier(s.clientId,s.id,d))}),b(3,"fa-icon",36),r()}e&2&&(g("title",m(1,2,"labels.buttons.Delete")),Dn("aria-label",m(2,4,"labels.buttons.Delete")))}function abe(e,o){e&1&&(l(0,"td",21),F(1,obe,4,6,"button",34),r()),e&2&&(a(),g("mifosxHasPermission","DELETE_CLIENTIDENTIFIER"))}function rbe(e,o){e&1&&b(0,"tr",37)}function lbe(e,o){e&1&&b(0,"tr",38)}var $C=(()=>{class e{constructor(){this.route=T(Ie),this.dialog=T(Ht),this.clientService=T(Oi),this.translateService=T(yi),this.documentPreviewService=T(Ok),this.destroyRef=T(mF),this.identitiesColumns=["id","description","type","documentKey","documents","status","actions"],this.previewThumbnails={},this.lightboxInstance=null,this.lightboxPlugins=[Ik,Ek,Dk],this.clientId=this.route.parent.snapshot.paramMap.get("clientId"),this.route.data.pipe(Rk(this.destroyRef)).subscribe(t=>{this.clientIdentities=t.clientIdentities,this.clientIdentifierTemplate=t.clientIdentifierTemplate,this.prefetchThumbnails()})}ngOnDestroy(){this.destroyLightbox(),Array.isArray(this.clientIdentities)&&this.clientIdentities.forEach(t=>{t.documents?.forEach(n=>this.documentPreviewService.release(n.id))})}trackByDocumentId(t,n){return n?.id}addIdentifier(){let t=this.clientIdentifierTemplate.allowedDocumentTypes.map(s=>qt(at({},s),{name:this.translateService.instant(`labels.catalogs.${s.name}`)})),n=[{label:this.translateService.instant("labels.catalogs.Active"),value:"Active"},{label:this.translateService.instant("labels.catalogs.Inactive"),value:"Inactive"}];this.dialog.open(Ug,{data:{documentIdentifier:!0,allowedDocumentTypes:t,statusOptions:n}}).afterClosed().subscribe(s=>{if(s){let d={documentTypeId:s.documentTypeId,status:s.status,documentKey:s.documentKey,description:s.description};this.clientService.addClientIdentifier(this.clientId,d).subscribe({next:u=>{let f=u.resourceId,_=this.clientIdentifierTemplate.allowedDocumentTypes.find(x=>x.id===s.documentTypeId),C={id:f,description:s.description,documentType:_,documentKey:s.documentKey,documents:[],clientId:this.clientId,status:s.status==="Active"?"clientIdentifierStatusType.active":"clientIdentifierStatusType.inactive"};if(s.file){let x=new FormData;x.append("name",s.fileName),x.append("file",s.file),this.clientService.uploadClientIdentifierDocument(f,x).subscribe({next:y=>{let P={id:y.resourceId,parentEntityType:"client_identifiers",parentEntityId:f,name:s.fileName,fileName:s.file.name};C.documents.push(P),this.clientIdentities.push(C),this.identifiersTable.renderRows(),this.setThumbnail(P)},error:y=>{console.error("Failed to upload document",y),this.clientIdentities.push(C),this.identifiersTable.renderRows()}})}else this.clientIdentities.push(C),this.identifiersTable.renderRows()},error:u=>{console.error("Failed to create identifier",u)}})}})}deleteIdentifier(t,n,i){this.dialog.open(vi,{data:{deleteContext:`${this.translateService.instant("labels.heading.identifier id")} : ${n}`}}).afterClosed().subscribe(d=>{d.delete&&this.clientService.deleteClientIdentifier(t,n).subscribe(u=>{this.clientIdentities.splice(i,1),this.identifiersTable.renderRows()})})}isPreviewable(t){return this.documentPreviewService.isPreviewable(t)}openDocumentPreview(t,n){return qn(this,null,function*(){if(this.isPreviewable(n))try{let i=(t.documents||[]).filter(u=>this.isPreviewable(u)),s=[];for(let u of i)try{let f=yield this.documentPreviewService.resolvePreviewUrl(u,()=>this.clientService.downloadClientIdentificationDocument(u.parentEntityId||t.id,u.id));f.type==="image"&&(this.previewThumbnails[u.id]=f.url),s.push({src:f.url,thumb:f.type==="image"?f.url:void 0,subHtml:this.buildSubHtml(u,t),iframe:f.type==="pdf"})}catch(f){console.error("Preview failed for document",u.id,f)}if(!s.length)return;let d=Math.max(0,i.findIndex(u=>u.id===n.id));this.destroyLightbox(),this.lightboxInstance=Mk(this.identityLightbox.nativeElement,{dynamic:!0,dynamicEl:s,plugins:this.lightboxPlugins,licenseKey:"0000-0000-000-0000",download:!1,escKey:!0,closable:!0,zoomFromOrigin:!0}),this.lightboxInstance.openGallery(d)}catch(i){console.error("Unable to open preview",i)}})}buildSubHtml(t,n){let i=t.description?`

${this.escapeHtml(t.description)}

`:"",s=n?.documentKey?`

${this.escapeHtml(n.documentKey)}

`:"";return`

${this.escapeHtml(t.name||"Document")}

${i}${s}
`}escapeHtml(t){return t?t.replace(/&/g,"&").replace(//g,">").replace(/"/g,"""):""}destroyLightbox(){this.lightboxInstance&&(this.lightboxInstance.destroy(),this.lightboxInstance=null)}setThumbnail(t){this.documentPreviewService.isPreviewable(t)&&this.documentPreviewService.resolvePreviewUrl(t,()=>this.clientService.downloadClientIdentificationDocument(t.parentEntityId||this.clientId,t.id)).then(n=>{n.type==="image"&&(this.previewThumbnails[t.id]=n.url)}).catch(()=>{})}prefetchThumbnails(){Array.isArray(this.clientIdentities)&&this.clientIdentities.forEach(t=>{t.documents?.forEach(n=>this.setThumbnail(n))})}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275cmp=me({type:e,selectors:[["mifosx-identities-tab"]],viewQuery:function(n,i){if(n&1&&(Ee(kxe,7),Ee(Bxe,7)),n&2){let s;Te(s=Me())&&(i.identifiersTable=s.first),Te(s=Me())&&(i.identityLightbox=s.first)}},decls:33,vars:9,consts:[["identifiersTable",""],["identityLightbox",""],[1,"tab-container","mat-typography"],[1,"layout-row","align-flex-end"],["mat-raised-button","","color","primary",3,"click",4,"mifosxHasPermission"],["mat-table","",3,"dataSource","ngStyle"],["matColumnDef","id"],["mat-header-cell","",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","type"],["matColumnDef","documentKey"],["matColumnDef","description"],["matColumnDef","documents"],["matColumnDef","status"],["matColumnDef","actions"],["mat-header-row","",4,"matHeaderRowDef"],["mat-row","",4,"matRowDef","matRowDefColumns"],[1,"document-lightbox-host"],["mat-raised-button","","color","primary",3,"click"],["icon","plus",1,"m-r-10"],["mat-header-cell",""],["mat-cell",""],[1,"document-grid"],[1,"muted"],[1,"document-card"],["role","button","tabindex","0",1,"thumb",3,"keydown.enter","keydown.space","click"],["loading","lazy",3,"src","alt","title"],[1,"placeholder"],[1,"preview-overlay"],[1,"card-body"],[1,"title"],[1,"meta"],["icon","file"],["icon","eye"],["class","identity-action-button","mat-raised-button","","color","warn",3,"title","click",4,"mifosxHasPermission"],["mat-raised-button","","color","warn",1,"identity-action-button",3,"click","title"],["icon","times"],["mat-header-row",""],["mat-row",""]],template:function(n,i){n&1&&(l(0,"div",2)(1,"h3"),c(2),p(3,"translate"),r(),l(4,"div",3),F(5,Nxe,4,3,"button",4),r(),l(6,"table",5,0),X(8,6),F(9,Lxe,3,3,"th",7)(10,Vxe,2,1,"td",8),Z(),X(11,9),F(12,qxe,3,3,"th",7)(13,zxe,2,1,"td",8),Z(),X(14,10),F(15,Hxe,3,3,"th",7)(16,Gxe,2,1,"td",8),Z(),X(17,11),F(18,jxe,3,3,"th",7)(19,$xe,2,1,"td",8),Z(),X(20,12),F(21,Uxe,3,3,"th",7)(22,ebe,3,1,"td",8),Z(),X(23,13),F(24,tbe,3,3,"th",7)(25,ibe,2,1,"td",8),Z(),X(26,14),F(27,nbe,3,3,"th",7)(28,abe,2,1,"td",8),Z(),F(29,rbe,1,0,"tr",15)(30,lbe,1,0,"tr",16),r()(),b(31,"div",17,1)),n&2&&(a(2),h(m(3,6,"labels.heading.Identities")),a(3),g("mifosxHasPermission","CREATE_CLIENTIDENTIFIER"),a(),g("dataSource",i.clientIdentities)("ngStyle",oe(8,Rxe)),a(23),g("matHeaderRowDef",i.identitiesColumns),a(),g("matRowDefColumns",i.identitiesColumns))},dependencies:[ue,ns,fe,ve,Ke,ke,_t,xt,vt,bt,Ct,yt,St,Pt,wt,Tt,he],styles:[".column-mandatory[_ngcontent-%COMP%]{color:#5cb85c;text-align:center}.not-column-mandatory[_ngcontent-%COMP%]{color:#666f73;text-align:center}.cdk-drag-placeholder[_ngcontent-%COMP%]{background:#3498db}.yes[_ngcontent-%COMP%]{color:#5cb85c!important;background-color:#5cb85c;height:4px;cursor:none}.no[_ngcontent-%COMP%]{color:red;background-color:red;height:4px;cursor:none}.strike[_ngcontent-%COMP%]{text-decoration:line-through;color:red}.transfer[_ngcontent-%COMP%]{color:#16a085}.linked[_ngcontent-%COMP%]{color:#4461e2}.accrual[_ngcontent-%COMP%]{color:#999}.fa-question[_ngcontent-%COMP%]{color:#4461e2}.enabled[_ngcontent-%COMP%]{color:#32cd32}.disabled[_ngcontent-%COMP%]{color:#f44366}.tab-container[_ngcontent-%COMP%]{padding:1rem;margin:1rem 0}.tab-container[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{margin:0}.tab-container[_ngcontent-%COMP%] table[_ngcontent-%COMP%]{width:100%}.tab-container[_ngcontent-%COMP%] table[_ngcontent-%COMP%] .identity-action-button[_ngcontent-%COMP%]{min-width:26px;padding:0 6px;margin:4px;line-height:25px}.document-grid[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;gap:.75rem}.document-card[_ngcontent-%COMP%]{width:200px;background:#fff;border:1px solid #bdc3c7;border-radius:4px;overflow:hidden;box-shadow:0 1px 4px #353b3b1f;display:flex;flex-direction:column}.document-card[_ngcontent-%COMP%]:hover{box-shadow:0 4px 12px #353b3b24}.thumb[_ngcontent-%COMP%]{position:relative;background:#ecf0f1;min-height:7.5rem;display:flex;align-items:center;justify-content:center;cursor:default}.thumb.clickable[_ngcontent-%COMP%]{cursor:pointer}.thumb[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{width:100%;height:100%;object-fit:cover}.preview-overlay[_ngcontent-%COMP%]{position:absolute;bottom:.5rem;right:.5rem;background:#ffffffe6;border-radius:50%;padding:.4rem;color:#3498db;display:flex;align-items:center;justify-content:center;opacity:0;transition:opacity .2s ease}.thumb[_ngcontent-%COMP%]:hover .preview-overlay[_ngcontent-%COMP%], .thumb[_ngcontent-%COMP%]:focus .preview-overlay[_ngcontent-%COMP%]{opacity:1}.placeholder[_ngcontent-%COMP%]{color:#f5f5f5;text-align:center;padding:.75rem;display:flex;flex-direction:column;gap:.4rem;align-items:center;justify-content:center}.placeholder[_ngcontent-%COMP%] fa-icon[_ngcontent-%COMP%]{font-size:1.125rem}.placeholder[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{font-size:.75rem;line-height:1.2}.preview-btn[_ngcontent-%COMP%]{position:absolute;right:.5rem;bottom:.5rem;background:#000000a6;color:#fff}.card-body[_ngcontent-%COMP%]{padding:.625rem .75rem .75rem;display:flex;flex-direction:column;gap:.25rem}.title[_ngcontent-%COMP%]{font-weight:700;color:#353b3b}.meta[_ngcontent-%COMP%]{font-size:.75rem;color:#7f8c8d}.muted[_ngcontent-%COMP%]{color:#95a5a6}.document-lightbox-host[_ngcontent-%COMP%]{display:none}"]})}}return e})();var UC=(()=>{class e{constructor(){this.route=T(Ie),this.clientsService=T(Oi),this.authenticationService=T(Wo),this.entityId=this.route.parent.snapshot.params.clientId,this.addNote=this.addNote.bind(this)}ngOnInit(){let t=this.authenticationService.getCredentials();this.username=t.username,this.route.data.subscribe(n=>{this.entityNotes=n.clientNotes})}editNote(t,n,i){this.clientsService.editClientNote(this.entityId,t,n).subscribe(()=>{this.entityNotes[i].note=n.note})}deleteNote(t,n){this.clientsService.deleteClientNote(this.entityId,t).subscribe(()=>{this.entityNotes.splice(n,1)})}addNote(t){this.clientsService.createClientNote(this.entityId,t).subscribe(n=>{this.entityNotes.push({id:n.resourceId,createdByUsername:this.username,createdOn:new Date,note:t.note})})}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275cmp=me({type:e,selectors:[["mifosx-notes-tab"]],decls:1,vars:5,consts:[[3,"entityId","entityNotes","callbackAdd","callbackEdit","callbackDelete"]],template:function(n,i){n&1&&b(0,"mifosx-entity-notes-tab",0),n&2&&g("entityId",i.entityId)("entityNotes",i.entityNotes)("callbackAdd",i.addNote)("callbackEdit",i.editNote)("callbackDelete",i.deleteNote)},dependencies:[ue,fe,I0],encapsulation:2})}}return e})();var WC=(()=>{class e{constructor(){this.route=T(Ie),this.clientsService=T(Oi),this.dialog=T(Ht),this.entityType="clients",this.route.data.subscribe(t=>{this.entityDocuments=t.clientDocuments}),this.entityId=this.route.parent.snapshot.paramMap.get("clientId")}deleteDocument(t){this.clientsService.deleteClientDocument(this.entityId,t).subscribe(n=>{})}uploadDocument(t){return this.clientsService.uploadClientDocument(this.entityId,t)}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275cmp=me({type:e,selectors:[["mifosx-documents-tab"]],decls:1,vars:5,consts:[[3,"entityType","entityId","entityDocuments","callbackUpload","callbackDelete"]],template:function(n,i){n&1&&b(0,"mifosx-entity-documents-tab",0),n&2&&g("entityType",i.entityType)("entityId",i.entityId)("entityDocuments",i.entityDocuments)("callbackUpload",i.uploadDocument)("callbackDelete",i.deleteDocument)},dependencies:[ue,fe,Ak],styles:[".tab-container[_ngcontent-%COMP%]{padding:1%;margin:1%}.tab-container[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{margin:1% auto}.tab-container[_ngcontent-%COMP%] table[_ngcontent-%COMP%]{width:100%}.tab-container[_ngcontent-%COMP%] table[_ngcontent-%COMP%] .document-action-button[_ngcontent-%COMP%]{min-width:26px;padding:0 6px;margin:4px;line-height:25px}"]})}}return e})();var QC=(()=>{class e{constructor(){this.route=T(Ie),this.entityId=this.route.parent.parent.snapshot.paramMap.get("clientId"),this.route.data.subscribe(t=>{this.entityDatatable=t.clientDatatable,this.multiRowDatatableFlag=this.entityDatatable.columnHeaders[0].columnName==="id"})}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275cmp=me({type:e,selectors:[["mifosx-datatable-tab"]],decls:2,vars:3,consts:[[1,"tab-container","mat-typography"],["entityType","Client",3,"entityId","multiRowDatatableFlag","entityDatatable"]],template:function(n,i){n&1&&(l(0,"div",0),b(1,"mifosx-entity-datatable-tab",1),r()),n&2&&(a(),g("entityId",i.entityId)("multiRowDatatableFlag",i.multiRowDatatableFlag)("entityDatatable",i.entityDatatable))},dependencies:[ue,fe,Or],encapsulation:2})}}return e})();function sbe(e,o){if(e&1&&(l(0,"span"),c(1),p(2,"translate"),b(3,"br"),r()),e&2){let t=w().$implicit;a(),le("",m(2,2,"labels.inputs.Street")," : ",t.street)}}function cbe(e,o){if(e&1&&(l(0,"span"),c(1),p(2,"translate"),b(3,"br"),r()),e&2){let t=w().$implicit;a(),le("",m(2,2,"labels.inputs.Address Line")," 1 : ",t.addressLine1)}}function pbe(e,o){if(e&1&&(l(0,"span"),c(1),p(2,"translate"),b(3,"br"),r()),e&2){let t=w().$implicit;a(),le("",m(2,2,"labels.inputs.Address Line")," 2 : ",t.addressLine2)}}function mbe(e,o){if(e&1&&(l(0,"span"),c(1),p(2,"translate"),b(3,"br"),r()),e&2){let t=w().$implicit;a(),le("",m(2,2,"labels.inputs.Address Line")," 3 : ",t.addressLine3)}}function dbe(e,o){if(e&1&&(l(0,"span"),c(1),p(2,"translate"),b(3,"br"),r()),e&2){let t=w().$implicit;a(),le("",m(2,2,"labels.inputs.Town / Village")," : ",t.townVillage)}}function ube(e,o){if(e&1&&(l(0,"span"),c(1),p(2,"translate"),b(3,"br"),r()),e&2){let t=w().$implicit;a(),le("",m(2,2,"labels.inputs.City")," : ",t.city)}}function fbe(e,o){if(e&1&&(l(0,"span"),c(1),p(2,"translate"),b(3,"br"),r()),e&2){let t,n=w().$implicit,i=w();a(),le("",m(2,2,"labels.inputs.State / Province")," : ",(t=i.getSelectedValue("stateProvinceIdOptions",n.stateProvinceId))==null?null:t.name)}}function hbe(e,o){if(e&1&&(l(0,"span"),c(1),p(2,"translate"),b(3,"br"),r()),e&2){let t,n=w().$implicit,i=w();a(),le("",m(2,2,"labels.inputs.Country")," : ",(t=i.getSelectedValue("countryIdOptions",n.countryId))==null?null:t.name)}}function gbe(e,o){if(e&1&&(l(0,"span"),c(1),p(2,"translate"),b(3,"br"),r()),e&2){let t=w().$implicit;a(),le("",m(2,2,"labels.inputs.Postal Code")," : ",t.postalCode)}}function _be(e,o){if(e&1&&(l(0,"span"),c(1),p(2,"translate"),b(3,"br"),r()),e&2){let t=w().$implicit;a(),le("",m(2,2,"labels.inputs.Active Status")," : ",t.isActive)}}function Cbe(e,o){if(e&1){let t=Y();l(0,"mat-expansion-panel",4)(1,"mat-expansion-panel-header")(2,"mat-panel-title"),c(3),r(),l(4,"mat-panel-description"),c(5),r()(),b(6,"mat-divider",5),l(7,"div",6)(8,"button",7),R("click",function(){let i=V(t),s=i.$implicit,d=i.$index,u=w();return q(u.editAddress(s,d))}),b(9,"fa-icon",8),r(),l(10,"mat-slide-toggle",9),R("change",function(){let i=V(t).$implicit,s=w();return q(s.toggleAddress(i))}),r()(),l(11,"p"),E(12,sbe,4,4,"span"),E(13,cbe,4,4,"span"),E(14,pbe,4,4,"span"),E(15,mbe,4,4,"span"),E(16,dbe,4,4,"span"),E(17,ube,4,4,"span"),E(18,fbe,4,4,"span"),E(19,hbe,4,4,"span"),E(20,gbe,4,4,"span"),E(21,_be,4,4,"span"),r()()}if(e&2){let t=o.$implicit,n=w();a(3),v(" ",t.addressType," "),a(2),v(" ",t.relationship," "),a(),g("inset",!0),a(4),g("checked",t.isActive),a(2),I(n.isFieldEnabled("street")?12:-1),a(),I(n.isFieldEnabled("addressLine1")?13:-1),a(),I(n.isFieldEnabled("addressLine2")?14:-1),a(),I(n.isFieldEnabled("addressLine3")?15:-1),a(),I(n.isFieldEnabled("townVillage")?16:-1),a(),I(n.isFieldEnabled("city")?17:-1),a(),I(n.isFieldEnabled("stateProvinceId")?18:-1),a(),I(n.isFieldEnabled("countryId")?19:-1),a(),I(n.isFieldEnabled("postalCode")?20:-1),a(),I(n.isFieldEnabled("isActive")?21:-1)}}var YC=(()=>{class e{constructor(){this.route=T(Ie),this.clientService=T(Oi),this.dialog=T(Ht),this.translateService=T(yi),this.route.data.subscribe(t=>{this.clientAddressData=t.clientAddressData,this.clientAddressFieldConfig=t.clientAddressFieldConfig,this.clientAddressTemplate=t.clientAddressTemplateData,this.clientId=this.route.parent.snapshot.paramMap.get("clientId")})}addAddress(){let t={title:this.translateService.instant("labels.buttons.Add")+" "+this.translateService.instant("labels.catalogs.Client")+" "+this.translateService.instant("labels.heading.Address"),formfields:this.getAddressFormFields("add")};this.dialog.open(an,{data:t}).afterClosed().subscribe(i=>{i.data&&this.clientService.createClientAddress(this.clientId,i.data.value.addressType,i.data.value).subscribe(s=>{let d=i.data.value;d.addressId=s.resourceId,d.addressType=this.getSelectedValue("addressTypeIdOptions",d.addressType).name,d.isActive=!1,this.clientAddressData.push(d)})})}editAddress(t,n){let i={title:this.translateService.instant("labels.buttons.Edit")+" "+this.translateService.instant("labels.catalogs.Client")+" "+this.translateService.instant("labels.heading.Address"),formfields:this.getAddressFormFields("edit",t),layout:{addButtonText:"Edit"}};this.dialog.open(an,{data:i}).afterClosed().subscribe(d=>{if(d.data){let u=d.data.value;u.addressId=t.addressId,u.isActive=t.isActive,this.clientService.editClientAddress(this.clientId,t.addressTypeId,u).subscribe(f=>{u.addressTypeId=t.addressTypeId,u.addressType=t.addressType,this.clientAddressData[n]=u})}})}toggleAddress(t){let n={addressId:t.addressId,isActive:!t.isActive};this.clientService.editClientAddress(this.clientId,t.addressTypeId,n).subscribe(()=>{t.isActive=!t.isActive})}isFieldEnabled(t){return this.clientAddressFieldConfig.find(n=>n.field===t)?.isEnabled}getSelectedValue(t,n){return this.clientAddressTemplate[t].find(i=>i.id===n)}getAddressFormFields(t,n){let i=[];for(let s=0;ss!==null),i}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275cmp=me({type:e,selectors:[["mifosx-address-tab"]],decls:12,vars:6,consts:[[1,"tab-container","mat-typography"],[1,"layout-row","align-flex-end"],["mat-raised-button","","color","primary",3,"click"],["icon","plus",1,"m-r-10"],[1,"address"],[3,"inset"],[1,"address-actions","layout-row","align-end","align-items-center"],["mat-button","","color","primary",3,"click"],["icon","edit"],[3,"change","checked"]],template:function(n,i){n&1&&(l(0,"div",0)(1,"h3"),c(2),p(3,"translate"),r(),l(4,"div",1)(5,"button",2),R("click",function(){return i.addAddress()}),b(6,"fa-icon",3),c(7),p(8,"translate"),r()(),l(9,"mat-accordion"),Se(10,Cbe,22,14,"mat-expansion-panel",4,Pe),r()()),n&2&&(a(2),h(m(3,2,"labels.heading.Address")),a(5),v("",m(8,4,"labels.buttons.Add")," "),a(3),we(i.clientAddressData))},dependencies:[ue,fe,ve,ke,Er,Tr,Mr,Dr,oc,Ri,Ip,he],styles:[".tab-container[_ngcontent-%COMP%]{padding:1%;margin:1%}.tab-container[_ngcontent-%COMP%] .address[_ngcontent-%COMP%] .address-actions[_ngcontent-%COMP%]{margin-top:1%}.tab-container[_ngcontent-%COMP%] .address[_ngcontent-%COMP%] .address-actions[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{margin-right:1%}.tab-container[_ngcontent-%COMP%] .address[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{margin:1% auto}.tab-container[_ngcontent-%COMP%] .address[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{line-height:30px;margin-left:2%}"]})}}return e})();var vbe=()=>["../../"];function xbe(e,o){if(e&1&&(l(0,"mat-option",5),c(1),r()),e&2){let t=o.$implicit;g("value",t.id),a(),v(" ",t.displayName," ")}}function bbe(e,o){e&1&&(l(0,"mat-error"),c(1),p(2,"translate"),p(3,"translate"),l(4,"strong"),c(5),p(6,"translate"),r()()),e&2&&(a(),le(" ",m(2,3,"labels.inputs.Staff")," ",m(3,5,"labels.commons.is")," "),a(4),h(m(6,7,"labels.commons.required")))}var JC=(()=>{class e{constructor(){this.formBuilder=T(nt),this.clientsService=T(Oi),this.route=T(Ie),this.router=T(qe),this.route.data.subscribe(t=>{this.clientData=t.clientActionData})}ngOnInit(){this.staffData=this.clientData.staffOptions,this.createClientAssignStaffForm()}createClientAssignStaffForm(){this.clientAssignStaffForm=this.formBuilder.group({staffId:[""]})}submit(){this.clientsService.executeClientCommand(this.clientData.id,"assignStaff",this.clientAssignStaffForm.value).subscribe(()=>{this.router.navigate(["../../"],{relativeTo:this.route})})}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275cmp=me({type:e,selectors:[["mifosx-client-assign-staff"]],decls:20,vars:14,consts:[[1,"container"],[3,"ngSubmit","formGroup"],[1,"layout-column"],[1,"flex-48"],["formControlName","staffId"],[3,"value"],[1,"layout-row","align-center","gap-5px","responsive-column"],["type","button","mat-raised-button","",3,"routerLink"],["mat-raised-button","","color","primary",3,"disabled"]],template:function(n,i){n&1&&(l(0,"div",0)(1,"mat-card")(2,"form",1),R("ngSubmit",function(){return i.submit()}),l(3,"mat-card-content")(4,"div",2)(5,"mat-form-field",3)(6,"mat-label"),c(7),p(8,"translate"),r(),l(9,"mat-select",4),Se(10,xbe,2,2,"mat-option",5,Pe),r(),E(12,bbe,7,9,"mat-error"),r()()(),l(13,"mat-card-actions",6)(14,"button",7),c(15),p(16,"translate"),r(),l(17,"button",8),c(18),p(19,"translate"),r()()()()()),n&2&&(a(2),g("formGroup",i.clientAssignStaffForm),a(5),h(m(8,7,"labels.inputs.Staff")),a(3),we(i.staffData),a(2),I(i.clientAssignStaffForm.controls.staffId.hasError("required")?12:-1),a(2),g("routerLink",oe(13,vbe)),a(),v(" ",m(16,9,"labels.buttons.Cancel")," "),a(2),g("disabled",!i.clientAssignStaffForm.valid),a(),v(" ",m(19,11,"labels.buttons.Confirm")," "))},dependencies:[ue,fe,tt,Ue,Xe,Ze,et,Ae,$e,Je,Et,Fe,Be,ut,gt,ft,ve,he],styles:[".container[_ngcontent-%COMP%]{max-width:37rem}"]})}}return e})();var ybe=()=>["../../"];function Sbe(e,o){e&1&&(l(0,"mat-error"),c(1),p(2,"translate"),p(3,"translate"),l(4,"strong"),c(5),p(6,"translate"),r()()),e&2&&(a(),le(" ",m(2,3,"labels.inputs.Closed On Date")," ",m(3,5,"labels.commons.is")," "),a(4),h(m(6,7,"labels.commons.required")))}function wbe(e,o){if(e&1&&(l(0,"mat-option",9),c(1),r()),e&2){let t=o.$implicit;g("value",t.id),a(),v(" ",t.name," ")}}function Pbe(e,o){e&1&&(l(0,"mat-error"),c(1),p(2,"translate"),p(3,"translate"),l(4,"strong"),c(5),p(6,"translate"),r()()),e&2&&(a(),le(" ",m(2,3,"labels.inputs.Closure Reason")," ",m(3,5,"labels.commons.is")," "),a(4),h(m(6,7,"labels.commons.required")))}var KC=(()=>{class e{constructor(){this.formBuilder=T(nt),this.clientsService=T(Oi),this.dateUtils=T(Zt),this.route=T(Ie),this.router=T(qe),this.settingsService=T(At),this.minDate=new Date(2e3,0,1),this.maxDate=new Date,this.route.data.subscribe(t=>{this.closureData=t.clientActionData.narrations}),this.clientId=this.route.parent.snapshot.params.clientId}ngOnInit(){this.maxDate=this.settingsService.businessDate,this.createCloseClientForm()}createCloseClientForm(){this.closeClientForm=this.formBuilder.group({closureDate:["",se.required],closureReasonId:["",se.required]})}submit(){let t=this.closeClientForm.value,n=this.settingsService.language.code,i=this.settingsService.dateFormat,s=this.closeClientForm.value.closureDate;t.closureDate instanceof Date&&(t.closureDate=this.dateUtils.formatDate(s,i));let d=qt(at({},t),{dateFormat:i,locale:n});this.clientsService.executeClientCommand(this.clientId,"close",d).subscribe(()=>{this.router.navigate(["../../"],{relativeTo:this.route})})}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275cmp=me({type:e,selectors:[["mifosx-close-client"]],decls:29,vars:22,consts:[["closureDatePicker",""],[1,"container"],[3,"ngSubmit","formGroup"],[1,"layout-column"],[3,"click"],["matInput","","required","","formControlName","closureDate",3,"min","max","matDatepicker"],["matSuffix","",3,"for"],[1,"flex-48"],["formControlName","closureReasonId"],[3,"value"],[1,"layout-row","align-center","gap-5px","responsive-column"],["type","button","mat-raised-button","",3,"routerLink"],["mat-raised-button","","color","warn",3,"disabled"]],template:function(n,i){if(n&1){let s=Y();l(0,"div",1)(1,"mat-card")(2,"form",2),R("ngSubmit",function(){return V(s),q(i.submit())}),l(3,"mat-card-content")(4,"div",3)(5,"mat-form-field",4),R("click",function(){V(s);let u=xe(12);return q(u.open())}),l(6,"mat-label"),c(7),p(8,"translate"),r(),b(9,"input",5)(10,"mat-datepicker-toggle",6)(11,"mat-datepicker",null,0),E(13,Sbe,7,9,"mat-error"),r(),l(14,"mat-form-field",7)(15,"mat-label"),c(16),p(17,"translate"),r(),l(18,"mat-select",8),Se(19,wbe,2,2,"mat-option",9,Pe),r(),E(21,Pbe,7,9,"mat-error"),r()()(),l(22,"mat-card-actions",10)(23,"button",11),c(24),p(25,"translate"),r(),l(26,"button",12),c(27),p(28,"translate"),r()()()()()}if(n&2){let s=xe(12);a(2),g("formGroup",i.closeClientForm),a(5),h(m(8,13,"labels.inputs.Closed On Date")),a(2),g("min",i.minDate)("max",i.maxDate)("matDatepicker",s),a(),g("for",s),a(3),I(i.closeClientForm.controls.closureDate.hasError("required")?13:-1),a(3),h(m(17,15,"labels.inputs.Closure Reason")),a(3),we(i.closureData),a(2),I(i.closeClientForm.controls.closureReasonId.hasError("required")?21:-1),a(2),g("routerLink",oe(21,ybe)),a(),v(" ",m(25,17,"labels.buttons.Cancel")," "),a(2),g("disabled",!i.closeClientForm.valid),a(),v(" ",m(28,19,"labels.buttons.Confirm")," ")}},dependencies:[ue,fe,tt,st,Ue,Xe,dt,Ze,et,Ae,$e,Je,Et,Fe,Be,ut,ai,ze,gt,ft,mi,di,pi,ve,he],styles:[".container[_ngcontent-%COMP%]{max-width:37rem}"]})}}return e})();var Tbe=()=>["../Take Survey"],Mbe=()=>[10,25,50,100];function Dbe(e,o){e&1&&(l(0,"th",20),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.Survey")))}function Ebe(e,o){if(e&1&&(l(0,"td",21),c(1),r()),e&2){let t=o.$implicit;a(),h(t.surveyName)}}function Ibe(e,o){e&1&&(l(0,"th",22),c(1),p(2,"translate"),r()),e&2&&(a(),v(" ",m(2,1,"labels.inputs.Created By")," "))}function Obe(e,o){if(e&1&&(l(0,"td",21),c(1),r()),e&2){let t=o.$implicit;a(),h(t.createdBy)}}function Abe(e,o){e&1&&(l(0,"th",23),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.DateTime")))}function Fbe(e,o){if(e&1&&(l(0,"td",21),c(1),p(2,"datetimeFormat"),r()),e&2){let t=o.$implicit;a(),h(m(2,1,t.date))}}function kbe(e,o){e&1&&(l(0,"th",23),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.Score")))}function Bbe(e,o){if(e&1&&(l(0,"td",21),c(1),p(2,"formatNumber"),r()),e&2){let t=o.$implicit;a(),h(m(2,1,t.score))}}function Rbe(e,o){e&1&&b(0,"tr",24)}function Nbe(e,o){e&1&&b(0,"tr",25)}var XC=(()=>{class e{constructor(){this.route=T(Ie),this.displayedColumns=["surveyName","createdBy","date","score"],this.route.data.subscribe(t=>{this.surveyData=t.clientActionData})}ngOnInit(){this.constructSurveys(this.surveyData)}constructSurveys(t){let n=[];t.forEach(i=>{let s=i.scorecardValues.map(d=>({surveyName:i.surveyName,createdBy:i.username,date:d.createdOn,score:d.value}));n=n.concat(s)}),this.dataSource=new Wt(n),this.dataSource.paginator=this.paginator,this.dataSource.sort=this.sort}applyFilter(t){this.dataSource.filter=t.trim().toLowerCase()}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275cmp=me({type:e,selectors:[["mifosx-view-survey"]],viewQuery:function(n,i){if(n&1&&(Ee(kt,7),Ee(It,7)),n&2){let s;Te(s=Me())&&(i.paginator=s.first),Te(s=Me())&&(i.sort=s.first)}},decls:29,vars:13,consts:[[1,"container","m-b-20","layout-align-end"],["mat-raised-button","","color","primary",3,"routerLink"],["icon","edit",1,"m-r-10"],[1,"container"],[1,"layout-row"],[1,"flex-fill"],["matInput","",3,"keyup"],[1,"mat-elevation-z8"],["mat-table","","matSort","",3,"dataSource"],["matColumnDef","surveyName"],["mat-header-cell","","mat-sort-header","surveyName",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","createdBy"],["mat-header-cell","","mat-sort-header","createdBy",4,"matHeaderCellDef"],["matColumnDef","date"],["mat-header-cell","","mat-sort-header","",4,"matHeaderCellDef"],["matColumnDef","score"],["mat-header-row","",4,"matHeaderRowDef"],["mat-row","",4,"matRowDef","matRowDefColumns"],["showFirstLastButtons","",3,"pageSizeOptions"],["mat-header-cell","","mat-sort-header","surveyName"],["mat-cell",""],["mat-header-cell","","mat-sort-header","createdBy"],["mat-header-cell","","mat-sort-header",""],["mat-header-row",""],["mat-row",""]],template:function(n,i){n&1&&(l(0,"div",0)(1,"button",1),b(2,"fa-icon",2),c(3),p(4,"translate"),r()(),l(5,"div",3)(6,"div",4)(7,"mat-form-field",5)(8,"mat-label"),c(9),p(10,"translate"),r(),l(11,"input",6),R("keyup",function(d){return i.applyFilter(d.target.value)}),r()()(),l(12,"div",7)(13,"table",8),X(14,9),F(15,Dbe,3,3,"th",10)(16,Ebe,2,1,"td",11),Z(),X(17,12),F(18,Ibe,3,3,"th",13)(19,Obe,2,1,"td",11),Z(),X(20,14),F(21,Abe,3,3,"th",15)(22,Fbe,3,3,"td",11),Z(),X(23,16),F(24,kbe,3,3,"th",15)(25,Bbe,3,3,"td",11),Z(),F(26,Rbe,1,0,"tr",17)(27,Nbe,1,0,"tr",18),r(),b(28,"mat-paginator",19),r()()),n&2&&(a(),g("routerLink",oe(11,Tbe)),a(2),v(" ",m(4,7,"labels.buttons.Take Survey")," "),a(6),h(m(10,9,"labels.inputs.Filter")),a(4),g("dataSource",i.dataSource),a(13),g("matHeaderRowDef",i.displayedColumns),a(),g("matRowDefColumns",i.displayedColumns),a(),g("pageSizeOptions",oe(12,Mbe)))},dependencies:[ue,fe,Ae,Fe,Be,ze,ve,ke,_t,It,xt,vt,bt,ri,Ct,yt,St,Pt,wt,Tt,kt,he,Jr,On],styles:[".headingContent[_ngcontent-%COMP%]{margin-bottom:1%;margin-top:1%}.headingName[_ngcontent-%COMP%]{display:block}"]})}}return e})();var Lbe=()=>["../../"];function Vbe(e,o){e&1&&(l(0,"mat-error"),c(1),p(2,"translate"),p(3,"translate"),l(4,"strong"),c(5),p(6,"translate"),r()()),e&2&&(a(),le(" ",m(2,3,"labels.inputs.Rejection Date")," ",m(3,5,"labels.commons.is")," "),a(4),h(m(6,7,"labels.commons.required")))}function qbe(e,o){if(e&1&&(l(0,"mat-option",9),c(1),r()),e&2){let t=o.$implicit;g("value",t.id),a(),v(" ",t.name," ")}}function zbe(e,o){e&1&&(l(0,"mat-error"),c(1),p(2,"translate"),p(3,"translate"),l(4,"strong"),c(5),p(6,"translate"),r()()),e&2&&(a(),le(" ",m(2,3,"labels.inputs.Rejection Reason")," ",m(3,5,"labels.commons.is")," "),a(4),h(m(6,7,"labels.commons.required")))}var ZC=(()=>{class e{constructor(){this.formBuilder=T(nt),this.clientsService=T(Oi),this.dateUtils=T(Zt),this.route=T(Ie),this.router=T(qe),this.settingsService=T(At),this.minDate=new Date(2e3,0,1),this.maxDate=new Date,this.route.data.subscribe(t=>{this.rejectionData=t.clientActionData.narrations}),this.clientId=this.route.parent.snapshot.params.clientId}ngOnInit(){this.maxDate=this.settingsService.businessDate,this.createRejectClientForm()}createRejectClientForm(){this.rejectClientForm=this.formBuilder.group({rejectionDate:["",se.required],rejectionReasonId:["",se.required]})}submit(){let t=this.rejectClientForm.value,n=this.settingsService.language.code,i=this.settingsService.dateFormat,s=this.rejectClientForm.value.rejectionDate;t.rejectionDate instanceof Date&&(t.rejectionDate=this.dateUtils.formatDate(s,i));let d=qt(at({},t),{dateFormat:i,locale:n});this.clientsService.executeClientCommand(this.clientId,"reject",d).subscribe(()=>{this.router.navigate(["../../"],{relativeTo:this.route})})}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275cmp=me({type:e,selectors:[["mifosx-reject-client"]],decls:29,vars:22,consts:[["rejectionDatePicker",""],[1,"container"],[3,"ngSubmit","formGroup"],[1,"layout-column"],[3,"click"],["matInput","","required","","formControlName","rejectionDate",3,"min","max","matDatepicker"],["matSuffix","",3,"for"],[1,"flex-48"],["formControlName","rejectionReasonId"],[3,"value"],[1,"layout-row","align-center","gap-5px","responsive-column"],["type","button","mat-raised-button","",3,"routerLink"],["mat-raised-button","","color","warn",3,"disabled"]],template:function(n,i){if(n&1){let s=Y();l(0,"div",1)(1,"mat-card")(2,"form",2),R("ngSubmit",function(){return V(s),q(i.submit())}),l(3,"mat-card-content")(4,"div",3)(5,"mat-form-field",4),R("click",function(){V(s);let u=xe(12);return q(u.open())}),l(6,"mat-label"),c(7),p(8,"translate"),r(),b(9,"input",5)(10,"mat-datepicker-toggle",6)(11,"mat-datepicker",null,0),E(13,Vbe,7,9,"mat-error"),r(),l(14,"mat-form-field",7)(15,"mat-label"),c(16),p(17,"translate"),r(),l(18,"mat-select",8),Se(19,qbe,2,2,"mat-option",9,Pe),r(),E(21,zbe,7,9,"mat-error"),r()()(),l(22,"mat-card-actions",10)(23,"button",11),c(24),p(25,"translate"),r(),l(26,"button",12),c(27),p(28,"translate"),r()()()()()}if(n&2){let s=xe(12);a(2),g("formGroup",i.rejectClientForm),a(5),h(m(8,13,"labels.inputs.Rejection Date")),a(2),g("min",i.minDate)("max",i.maxDate)("matDatepicker",s),a(),g("for",s),a(3),I(i.rejectClientForm.controls.rejectionDate.hasError("required")?13:-1),a(3),h(m(17,15,"labels.inputs.Rejection Reason")),a(3),we(i.rejectionData),a(2),I(i.rejectClientForm.controls.rejectionReasonId.hasError("required")?21:-1),a(2),g("routerLink",oe(21,Lbe)),a(),v(" ",m(25,17,"labels.buttons.Cancel")," "),a(2),g("disabled",!i.rejectClientForm.valid),a(),v(" ",m(28,19,"labels.buttons.Confirm")," ")}},dependencies:[ue,fe,tt,st,Ue,Xe,dt,Ze,et,Ae,$e,Je,Et,Fe,Be,ut,ai,ze,gt,ft,mi,di,pi,ve,he],styles:[".container[_ngcontent-%COMP%]{max-width:37rem}"]})}}return e})();var Hbe=()=>["../../"];function Gbe(e,o){e&1&&(l(0,"mat-error"),c(1),p(2,"translate"),p(3,"translate"),l(4,"strong"),c(5),p(6,"translate"),r()()),e&2&&(a(),le(" ",m(2,3,"labels.inputs.Activated On Date")," ",m(3,5,"labels.commons.is")," "),a(4),h(m(6,7,"labels.commons.required")))}var e2=(()=>{class e{constructor(){this.formBuilder=T(nt),this.clientsService=T(Oi),this.dateUtils=T(Zt),this.route=T(Ie),this.router=T(qe),this.settingsService=T(At),this.minDate=new Date(2e3,0,1),this.maxDate=new Date,this.clientId=this.route.parent.snapshot.params.clientId}ngOnInit(){this.maxDate=this.settingsService.businessDate,this.createActivateClientForm()}createActivateClientForm(){this.activateClientForm=this.formBuilder.group({activationDate:["",se.required]})}submit(){let t=this.activateClientForm.value,n=this.settingsService.language.code,i=this.settingsService.dateFormat,s=this.activateClientForm.value.activationDate;t.activationDate instanceof Date&&(t.activationDate=this.dateUtils.formatDate(s,i));let d=qt(at({},t),{dateFormat:i,locale:n});this.clientsService.executeClientCommand(this.clientId,"activate",d).subscribe(()=>{this.router.navigate(["../../"],{relativeTo:this.route})})}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275cmp=me({type:e,selectors:[["mifosx-activate-client"]],decls:20,vars:18,consts:[["activationDatePicker",""],[1,"container"],[3,"ngSubmit","formGroup"],[1,"flex-fill",3,"click"],["matInput","","required","","formControlName","activationDate",3,"min","max","matDatepicker"],["matSuffix","",3,"for"],[1,"layout-row","align-center","gap-5px","responsive-column"],["type","button","mat-raised-button","",3,"routerLink"],["mat-raised-button","","color","primary",3,"disabled"]],template:function(n,i){if(n&1){let s=Y();l(0,"div",1)(1,"mat-card")(2,"form",2),R("ngSubmit",function(){return V(s),q(i.submit())}),l(3,"mat-card-content")(4,"mat-form-field",3),R("click",function(){V(s);let u=xe(11);return q(u.open())}),l(5,"mat-label"),c(6),p(7,"translate"),r(),b(8,"input",4)(9,"mat-datepicker-toggle",5)(10,"mat-datepicker",null,0),E(12,Gbe,7,9,"mat-error"),r()(),l(13,"mat-card-actions",6)(14,"button",7),c(15),p(16,"translate"),r(),l(17,"button",8),c(18),p(19,"translate"),r()()()()()}if(n&2){let s=xe(11);a(2),g("formGroup",i.activateClientForm),a(4),h(m(7,11,"labels.inputs.Activated On Date")),a(2),g("min",i.minDate)("max",i.maxDate)("matDatepicker",s),a(),g("for",s),a(3),I(i.activateClientForm.controls.activationDate.hasError("required")?12:-1),a(2),g("routerLink",oe(17,Hbe)),a(),v(" ",m(16,13,"labels.buttons.Cancel")," "),a(2),g("disabled",!i.activateClientForm.valid),a(),v(" ",m(19,15,"labels.buttons.Confirm")," ")}},dependencies:[ue,fe,tt,st,Ue,Xe,dt,Ze,et,Ae,$e,Je,Et,Fe,Be,ut,ai,ze,mi,di,pi,ve,he],styles:[".container[_ngcontent-%COMP%]{max-width:37rem}"]})}}return e})();var jbe=()=>["../../"];function $be(e,o){e&1&&(l(0,"mat-error"),c(1),p(2,"translate"),p(3,"translate"),l(4,"strong"),c(5),p(6,"translate"),r()()),e&2&&(a(),le(" ",m(2,3,"labels.inputs.Withdrawal Date")," ",m(3,5,"labels.commons.is")," "),a(4),h(m(6,7,"labels.commons.required")))}function Ube(e,o){if(e&1&&(l(0,"mat-option",9),c(1),r()),e&2){let t=o.$implicit;g("value",t.id),a(),v(" ",t.name," ")}}function Wbe(e,o){e&1&&(l(0,"mat-error"),c(1),p(2,"translate"),p(3,"translate"),l(4,"strong"),c(5),p(6,"translate"),r()()),e&2&&(a(),le(" ",m(2,3,"labels.inputs.Withdrawal Reason")," ",m(3,5,"labels.commons.is")," "),a(4),h(m(6,7,"labels.commons.required")))}var t2=(()=>{class e{constructor(){this.formBuilder=T(nt),this.clientsService=T(Oi),this.dateUtils=T(Zt),this.route=T(Ie),this.router=T(qe),this.settingsService=T(At),this.minDate=new Date(2e3,0,1),this.maxDate=new Date,this.route.data.subscribe(t=>{this.withdrawalData=t.clientActionData.narrations}),this.clientId=this.route.parent.snapshot.params.clientId}ngOnInit(){this.maxDate=this.settingsService.businessDate,this.createWithdrawClientForm()}createWithdrawClientForm(){this.withdrawClientForm=this.formBuilder.group({withdrawalDate:["",se.required],withdrawalReasonId:["",se.required]})}submit(){let t=this.withdrawClientForm.value,n=this.settingsService.language.code,i=this.settingsService.dateFormat,s=this.withdrawClientForm.value.withdrawalDate;t.withdrawalDate instanceof Date&&(t.withdrawalDate=this.dateUtils.formatDate(s,i));let d=qt(at({},t),{dateFormat:i,locale:n});this.clientsService.executeClientCommand(this.clientId,"withdraw",d).subscribe(()=>{this.router.navigate(["../../"],{relativeTo:this.route})})}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275cmp=me({type:e,selectors:[["mifosx-withdraw-client"]],decls:29,vars:22,consts:[["withdrawalDatePicker",""],[1,"container"],[3,"ngSubmit","formGroup"],[1,"layout-column"],[3,"click"],["matInput","","required","","formControlName","withdrawalDate",3,"min","max","matDatepicker"],["matSuffix","",3,"for"],[1,"flex-48"],["formControlName","withdrawalReasonId"],[3,"value"],[1,"layout-row","align-center","gap-5px","responsive-column"],["type","button","mat-raised-button","",3,"routerLink"],["mat-raised-button","","color","primary",3,"disabled"]],template:function(n,i){if(n&1){let s=Y();l(0,"div",1)(1,"mat-card")(2,"form",2),R("ngSubmit",function(){return V(s),q(i.submit())}),l(3,"mat-card-content")(4,"div",3)(5,"mat-form-field",4),R("click",function(){V(s);let u=xe(12);return q(u.open())}),l(6,"mat-label"),c(7),p(8,"translate"),r(),b(9,"input",5)(10,"mat-datepicker-toggle",6)(11,"mat-datepicker",null,0),E(13,$be,7,9,"mat-error"),r(),l(14,"mat-form-field",7)(15,"mat-label"),c(16),p(17,"translate"),r(),l(18,"mat-select",8),Se(19,Ube,2,2,"mat-option",9,Pe),r(),E(21,Wbe,7,9,"mat-error"),r()()(),l(22,"mat-card-actions",10)(23,"button",11),c(24),p(25,"translate"),r(),l(26,"button",12),c(27),p(28,"translate"),r()()()()()}if(n&2){let s=xe(12);a(2),g("formGroup",i.withdrawClientForm),a(5),h(m(8,13,"labels.inputs.Withdrawal Date")),a(2),g("min",i.minDate)("max",i.maxDate)("matDatepicker",s),a(),g("for",s),a(3),I(i.withdrawClientForm.controls.withdrawalDate.hasError("required")?13:-1),a(3),h(m(17,15,"labels.inputs.Withdrawal Reason")),a(3),we(i.withdrawalData),a(2),I(i.withdrawClientForm.controls.withdrawalReasonId.hasError("required")?21:-1),a(2),g("routerLink",oe(21,jbe)),a(),v(" ",m(25,17,"labels.buttons.Cancel")," "),a(2),g("disabled",!i.withdrawClientForm.valid),a(),v(" ",m(28,19,"labels.buttons.Confirm")," ")}},dependencies:[ue,fe,tt,st,Ue,Xe,dt,Ze,et,Ae,$e,Je,Et,Fe,Be,ut,ai,ze,gt,ft,mi,di,pi,ve,he],styles:[".container[_ngcontent-%COMP%]{max-width:37rem}"]})}}return e})();var Qbe=()=>["../../"];function Ybe(e,o){if(e&1&&(l(0,"mat-option",5),c(1),r()),e&2){let t=o.$implicit;g("value",t.id),a(),v(" ",t.accountNo," ")}}function Jbe(e,o){e&1&&(l(0,"mat-error"),c(1),p(2,"translate"),p(3,"translate"),l(4,"strong"),c(5),p(6,"translate"),r()()),e&2&&(a(),le(" ",m(2,3,"labels.inputs.Account")," ",m(3,5,"labels.commons.is")," "),a(4),h(m(6,7,"labels.commons.required")))}var i2=(()=>{class e{constructor(){this.formBuilder=T(nt),this.clientsService=T(Oi),this.route=T(Ie),this.router=T(qe),this.route.data.subscribe(t=>{this.clientData=t.clientActionData})}ngOnInit(){this.savingsAccounts=this.clientData.savingAccountOptions,this.createClientSavingsAccountForm()}createClientSavingsAccountForm(){this.clientSavingsAccountForm=this.formBuilder.group({savingsAccountId:[this.clientData.savingsAccountId]})}submit(){this.clientsService.executeClientCommand(this.clientData.id,"updateSavingsAccount",this.clientSavingsAccountForm.value).subscribe(()=>{this.router.navigate(["../../"],{relativeTo:this.route})})}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275cmp=me({type:e,selectors:[["mifosx-update-client-savings-account"]],decls:20,vars:14,consts:[[1,"container"],[3,"ngSubmit","formGroup"],[1,"layout-column"],[1,"flex-48"],["formControlName","savingsAccountId"],[3,"value"],[1,"layout-row","align-center","gap-5px","responsive-column"],["type","button","mat-raised-button","",3,"routerLink"],["mat-raised-button","","color","primary",3,"disabled"]],template:function(n,i){n&1&&(l(0,"div",0)(1,"mat-card")(2,"form",1),R("ngSubmit",function(){return i.submit()}),l(3,"mat-card-content")(4,"div",2)(5,"mat-form-field",3)(6,"mat-label"),c(7),p(8,"translate"),r(),l(9,"mat-select",4),Se(10,Ybe,2,2,"mat-option",5,Pe),r(),E(12,Jbe,7,9,"mat-error"),r()()(),l(13,"mat-card-actions",6)(14,"button",7),c(15),p(16,"translate"),r(),l(17,"button",8),c(18),p(19,"translate"),r()()()()()),n&2&&(a(2),g("formGroup",i.clientSavingsAccountForm),a(5),h(m(8,7,"labels.inputs.Default Savings Account")),a(3),we(i.savingsAccounts),a(2),I(i.clientSavingsAccountForm.controls.savingsAccountId.hasError("required")?12:-1),a(2),g("routerLink",oe(13,Qbe)),a(),v(" ",m(16,9,"labels.buttons.Cancel")," "),a(2),g("disabled",!i.clientSavingsAccountForm.valid),a(),v(" ",m(19,11,"labels.buttons.Confirm")," "))},dependencies:[ue,fe,tt,Ue,Xe,Ze,et,Ae,$e,Je,Et,Fe,Be,ut,gt,ft,ve,he],styles:[".container[_ngcontent-%COMP%]{max-width:37rem}"]})}}return e})();var Kbe=()=>["../../"];function Xbe(e,o){if(e&1&&(l(0,"mat-option",5),c(1),r()),e&2){let t=o.$implicit;g("value",t.id),a(),v(" ",t.name," ")}}function Zbe(e,o){e&1&&(l(0,"mat-error"),c(1),p(2,"translate"),p(3,"translate"),l(4,"strong"),c(5),p(6,"translate"),r()()),e&2&&(a(),le(" ",m(2,3,"labels.inputs.Office")," ",m(3,5,"labels.commons.is")," "),a(4),h(m(6,7,"labels.commons.required")))}function eye(e,o){e&1&&(l(0,"mat-error"),c(1),p(2,"translate"),p(3,"translate"),l(4,"strong"),c(5),p(6,"translate"),r()()),e&2&&(a(),le(" ",m(2,3,"labels.inputs.Transfer Date")," ",m(3,5,"labels.commons.is")," "),a(4),h(m(6,7,"labels.commons.required")))}var n2=(()=>{class e{constructor(){this.formBuilder=T(nt),this.clientsService=T(Oi),this.dateUtils=T(Zt),this.route=T(Ie),this.router=T(qe),this.settingsService=T(At),this.minDate=new Date(2e3,0,1),this.maxDate=new Date,this.route.data.subscribe(t=>{this.officeData=t.clientActionData}),this.clientId=this.route.parent.snapshot.params.clientId}ngOnInit(){this.maxDate=this.settingsService.businessDate,this.createTransferClientForm()}createTransferClientForm(){this.transferClientForm=this.formBuilder.group({destinationOfficeId:["",se.required],transferDate:["",se.required],note:[""]})}submit(){let t=this.transferClientForm.value,n=this.settingsService.language.code,i=this.settingsService.dateFormat,s=this.transferClientForm.value.transferDate;t.transferDate instanceof Date&&(t.transferDate=this.dateUtils.formatDate(s,i));let d=qt(at({},t),{dateFormat:i,locale:n});this.clientsService.executeClientCommand(this.clientId,"proposeTransfer",d).subscribe(()=>{this.router.navigate(["../../"],{relativeTo:this.route})})}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275cmp=me({type:e,selectors:[["mifosx-transfer-client"]],decls:34,vars:25,consts:[["transferDatePicker",""],[1,"container"],[3,"ngSubmit","formGroup"],[1,"layout-column"],["required","","formControlName","destinationOfficeId"],[3,"value"],[3,"click"],["matInput","","required","","formControlName","transferDate",3,"min","max","matDatepicker"],["matSuffix","",3,"for"],["matInput","","formControlName","note","cdkTextareaAutosize","","cdkAutosizeMinRows","2"],[1,"layout-row","align-center","gap-5px","responsive-column"],["type","button","mat-raised-button","",3,"routerLink"],["mat-raised-button","","color","primary",3,"disabled"]],template:function(n,i){if(n&1){let s=Y();l(0,"div",1)(1,"mat-card")(2,"form",2),R("ngSubmit",function(){return V(s),q(i.submit())}),l(3,"mat-card-content")(4,"div",3)(5,"mat-form-field")(6,"mat-label"),c(7),p(8,"translate"),r(),l(9,"mat-select",4),Se(10,Xbe,2,2,"mat-option",5,Pe),r(),E(12,Zbe,7,9,"mat-error"),r(),l(13,"mat-form-field",6),R("click",function(){V(s);let u=xe(20);return q(u.open())}),l(14,"mat-label"),c(15),p(16,"translate"),r(),b(17,"input",7)(18,"mat-datepicker-toggle",8)(19,"mat-datepicker",null,0),E(21,eye,7,9,"mat-error"),r(),l(22,"mat-form-field")(23,"mat-label"),c(24),p(25,"translate"),r(),b(26,"textarea",9),r()()(),l(27,"mat-card-actions",10)(28,"button",11),c(29),p(30,"translate"),r(),l(31,"button",12),c(32),p(33,"translate"),r()()()()()}if(n&2){let s=xe(20);a(2),g("formGroup",i.transferClientForm),a(5),h(m(8,14,"labels.inputs.Office")),a(3),we(i.officeData),a(2),I(i.transferClientForm.controls.destinationOfficeId.hasError("required")?12:-1),a(3),h(m(16,16,"labels.inputs.Transfer Date")),a(2),g("min",i.minDate)("max",i.maxDate)("matDatepicker",s),a(),g("for",s),a(3),I(i.transferClientForm.controls.transferDate.hasError("required")?21:-1),a(3),h(m(25,18,"labels.inputs.Note")),a(4),g("routerLink",oe(24,Kbe)),a(),v(" ",m(30,20,"labels.buttons.Cancel")," "),a(2),g("disabled",!i.transferClientForm.valid),a(),v(" ",m(33,22,"labels.buttons.Confirm")," ")}},dependencies:[ue,fe,tt,st,Ue,Xe,dt,Ze,et,Ae,$e,Je,Et,Fe,Be,ut,ai,ze,gt,ft,mi,di,pi,ve,Ln,he],styles:[".container[_ngcontent-%COMP%]{max-width:37rem}"]})}}return e})();var tye=()=>["../../"],o2=(()=>{class e{constructor(){this.formBuilder=T(nt),this.clientsService=T(Oi),this.settingsService=T(At),this.dateUtils=T(Zt),this.route=T(Ie),this.router=T(qe),this.route.data.subscribe(t=>{this.transferDate=t.clientActionData}),this.clientId=this.route.parent.snapshot.params.clientId}ngOnInit(){this.createUndoClientTransferForm()}createUndoClientTransferForm(){this.undoClientTransferForm=this.formBuilder.group({transferDate:{value:new Date(this.transferDate),disabled:!0},note:[""]})}submit(){let t=this.undoClientTransferForm.value,n=this.settingsService.language.code,i=this.settingsService.dateFormat,s=this.undoClientTransferForm.value.transferDate;t.transferDate instanceof Date&&(t.transferDate=this.dateUtils.formatDate(s,i));let d=at({},t);this.clientsService.executeClientCommand(this.clientId,"withdrawTransfer",d).subscribe(()=>{this.router.navigate(["../../"],{relativeTo:this.route})})}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275cmp=me({type:e,selectors:[["mifosx-undo-client-transfer"]],decls:24,vars:18,consts:[["transferDatePicker",""],[1,"container"],[3,"ngSubmit","formGroup"],[1,"layout-column"],[3,"click"],["matInput","","required","","formControlName","transferDate",3,"matDatepicker"],["matSuffix","",3,"for"],[1,"flex-fill"],["matInput","","formControlName","note","cdkTextareaAutosize","","cdkAutosizeMinRows","2"],[1,"layout-row","align-center","gap-5px","responsive-column"],["type","button","mat-raised-button","",3,"routerLink"],["mat-raised-button","","color","primary",3,"disabled"]],template:function(n,i){if(n&1){let s=Y();l(0,"div",1)(1,"mat-card")(2,"form",2),R("ngSubmit",function(){return V(s),q(i.submit())}),l(3,"mat-card-content",3)(4,"mat-form-field",4),R("click",function(){V(s);let u=xe(11);return q(u.open())}),l(5,"mat-label"),c(6),p(7,"translate"),r(),b(8,"input",5)(9,"mat-datepicker-toggle",6)(10,"mat-datepicker",null,0),r(),l(12,"mat-form-field",7)(13,"mat-label"),c(14),p(15,"translate"),r(),b(16,"textarea",8),r()(),l(17,"mat-card-actions",9)(18,"button",10),c(19),p(20,"translate"),r(),l(21,"button",11),c(22),p(23,"translate"),r()()()()()}if(n&2){let s=xe(11);a(2),g("formGroup",i.undoClientTransferForm),a(4),h(m(7,9,"labels.inputs.Transfer Date")),a(2),g("matDatepicker",s),a(),g("for",s),a(5),h(m(15,11,"labels.inputs.Note")),a(4),g("routerLink",oe(17,tye)),a(),v(" ",m(20,13,"labels.buttons.Cancel")," "),a(2),g("disabled",!i.undoClientTransferForm.valid),a(),v(" ",m(23,15,"labels.buttons.Confirm")," ")}},dependencies:[ue,fe,tt,st,Ue,Xe,dt,Ze,et,Ae,$e,Je,Et,Fe,Be,ai,ze,mi,di,pi,ve,Ln,he],styles:[".container[_ngcontent-%COMP%]{max-width:37rem}"]})}}return e})();var iye=()=>["../../"],a2=(()=>{class e{constructor(){this.formBuilder=T(nt),this.clientsService=T(Oi),this.settingsService=T(At),this.dateUtils=T(Zt),this.route=T(Ie),this.router=T(qe),this.route.data.subscribe(t=>{this.transferDate=t.clientActionData}),this.clientId=this.route.parent.snapshot.params.clientId}ngOnInit(){this.createRejectClientTransferForm()}createRejectClientTransferForm(){this.rejectClientTransferForm=this.formBuilder.group({transferDate:{value:new Date(this.transferDate),disabled:!0},note:[""]})}submit(){let t=this.rejectClientTransferForm.value,n=this.settingsService.language.code,i=this.settingsService.dateFormat,s=this.rejectClientTransferForm.value.transferDate;t.transferDate instanceof Date&&(t.transferDate=this.dateUtils.formatDate(s,i));let d=at({},t);this.clientsService.executeClientCommand(this.clientId,"rejectTransfer",d).subscribe(()=>{this.router.navigate(["../../"],{relativeTo:this.route})})}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275cmp=me({type:e,selectors:[["mifosx-reject-client-transfer"]],decls:24,vars:18,consts:[["transferDatePicker",""],[1,"container"],[3,"ngSubmit","formGroup"],[1,"layout-column"],[3,"click"],["matInput","","required","","formControlName","transferDate",3,"matDatepicker"],["matSuffix","",3,"for"],[1,"flex-fill"],["matInput","","formControlName","note","cdkTextareaAutosize","","cdkAutosizeMinRows","2"],[1,"layout-row","align-center","gap-5px","responsive-column"],["type","button","mat-raised-button","",3,"routerLink"],["mat-raised-button","","color","primary",3,"disabled"]],template:function(n,i){if(n&1){let s=Y();l(0,"div",1)(1,"mat-card")(2,"form",2),R("ngSubmit",function(){return V(s),q(i.submit())}),l(3,"mat-card-content",3)(4,"mat-form-field",4),R("click",function(){V(s);let u=xe(11);return q(u.open())}),l(5,"mat-label"),c(6),p(7,"translate"),r(),b(8,"input",5)(9,"mat-datepicker-toggle",6)(10,"mat-datepicker",null,0),r(),l(12,"mat-form-field",7)(13,"mat-label"),c(14),p(15,"translate"),r(),b(16,"textarea",8),r()(),l(17,"mat-card-actions",9)(18,"button",10),c(19),p(20,"translate"),r(),l(21,"button",11),c(22),p(23,"translate"),r()()()()()}if(n&2){let s=xe(11);a(2),g("formGroup",i.rejectClientTransferForm),a(4),h(m(7,9,"labels.inputs.Transfer Date")),a(2),g("matDatepicker",s),a(),g("for",s),a(5),h(m(15,11,"labels.inputs.Note")),a(4),g("routerLink",oe(17,iye)),a(),v(" ",m(20,13,"labels.buttons.Cancel")," "),a(2),g("disabled",!i.rejectClientTransferForm.valid),a(),v(" ",m(23,15,"labels.buttons.Confirm")," ")}},dependencies:[ue,fe,tt,st,Ue,Xe,dt,Ze,et,Ae,$e,Je,Et,Fe,Be,ai,ze,mi,di,pi,ve,Ln,he],styles:[".container[_ngcontent-%COMP%]{max-width:37rem}"]})}}return e})();var nye=()=>["../../"],r2=(()=>{class e{constructor(){this.formBuilder=T(nt),this.clientsService=T(Oi),this.settingsService=T(At),this.dateUtils=T(Zt),this.route=T(Ie),this.router=T(qe),this.route.data.subscribe(t=>{this.transferDate=t.clientActionData}),this.clientId=this.route.parent.snapshot.params.clientId}ngOnInit(){this.createAcceptClientTransferForm()}createAcceptClientTransferForm(){this.acceptClientTransferForm=this.formBuilder.group({transferDate:{value:new Date(this.transferDate),disabled:!0},note:[""]})}submit(){let t=this.acceptClientTransferForm.value,n=this.settingsService.dateFormat,i=this.acceptClientTransferForm.value.transferDate;t.transferDate instanceof Date&&(t.transferDate=this.dateUtils.formatDate(i,n));let s=at({},t);this.clientsService.executeClientCommand(this.clientId,"acceptTransfer",s).subscribe(()=>{this.router.navigate(["../../"],{relativeTo:this.route})})}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275cmp=me({type:e,selectors:[["mifosx-accept-client-transfer"]],decls:24,vars:18,consts:[["transferDatePicker",""],[1,"container"],[3,"ngSubmit","formGroup"],[1,"layout-column"],[3,"click"],["matInput","","required","","formControlName","transferDate",3,"matDatepicker"],["matSuffix","",3,"for"],[1,"flex-fill"],["matInput","","formControlName","note","cdkTextareaAutosize","","cdkAutosizeMinRows","2"],[1,"layout-row","align-center","gap-5px","responsive-column"],["type","button","mat-raised-button","",3,"routerLink"],["mat-raised-button","","color","primary",3,"disabled"]],template:function(n,i){if(n&1){let s=Y();l(0,"div",1)(1,"mat-card")(2,"form",2),R("ngSubmit",function(){return V(s),q(i.submit())}),l(3,"mat-card-content",3)(4,"mat-form-field",4),R("click",function(){V(s);let u=xe(11);return q(u.open())}),l(5,"mat-label"),c(6),p(7,"translate"),r(),b(8,"input",5)(9,"mat-datepicker-toggle",6)(10,"mat-datepicker",null,0),r(),l(12,"mat-form-field",7)(13,"mat-label"),c(14),p(15,"translate"),r(),b(16,"textarea",8),r()(),l(17,"mat-card-actions",9)(18,"button",10),c(19),p(20,"translate"),r(),l(21,"button",11),c(22),p(23,"translate"),r()()()()()}if(n&2){let s=xe(11);a(2),g("formGroup",i.acceptClientTransferForm),a(4),h(m(7,9,"labels.inputs.Transfer Date")),a(2),g("matDatepicker",s),a(),g("for",s),a(5),h(m(15,11,"labels.inputs.Note")),a(4),g("routerLink",oe(17,nye)),a(),v(" ",m(20,13,"labels.buttons.Cancel")," "),a(2),g("disabled",!i.acceptClientTransferForm.valid),a(),v(" ",m(23,15,"labels.buttons.Confirm")," ")}},dependencies:[ue,fe,tt,st,Ue,Xe,dt,Ze,et,Ae,$e,Je,Et,Fe,Be,ai,ze,mi,di,pi,ve,Ln,he],styles:[".container[_ngcontent-%COMP%]{max-width:37rem}"]})}}return e})();var oye=()=>["../../"];function aye(e,o){e&1&&(l(0,"mat-error"),c(1),p(2,"translate"),p(3,"translate"),l(4,"strong"),c(5),p(6,"translate"),r()()),e&2&&(a(),le(" ",m(2,3,"labels.inputs.Reactivation Date")," ",m(3,5,"labels.commons.is")," "),a(4),h(m(6,7,"labels.commons.required")))}var l2=(()=>{class e{constructor(){this.formBuilder=T(nt),this.clientsService=T(Oi),this.dateUtils=T(Zt),this.route=T(Ie),this.router=T(qe),this.settingsService=T(At),this.minDate=new Date(2e3,0,1),this.maxDate=new Date,this.clientId=this.route.parent.snapshot.params.clientId}ngOnInit(){this.maxDate=this.settingsService.businessDate,this.createReactivateClientForm()}createReactivateClientForm(){this.reactivateClientForm=this.formBuilder.group({reactivationDate:["",se.required]})}submit(){let t=this.reactivateClientForm.value,n=this.settingsService.language.code,i=this.settingsService.dateFormat,s=this.reactivateClientForm.value.reactivationDate;t.reactivationDate instanceof Date&&(t.reactivationDate=this.dateUtils.formatDate(s,i));let d=qt(at({},t),{dateFormat:i,locale:n});this.clientsService.executeClientCommand(this.clientId,"reactivate",d).subscribe(()=>{this.router.navigate(["../../"],{relativeTo:this.route})})}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275cmp=me({type:e,selectors:[["mifosx-reactivate-client"]],decls:20,vars:18,consts:[["reactivationDatePicker",""],[1,"container"],[3,"ngSubmit","formGroup"],[1,"flex-fill",3,"click"],["matInput","","required","","formControlName","reactivationDate",3,"min","max","matDatepicker"],["matSuffix","",3,"for"],[1,"layout-row","align-center","gap-5px","responsive-column"],["type","button","mat-raised-button","",3,"routerLink"],["mat-raised-button","","color","primary",3,"disabled"]],template:function(n,i){if(n&1){let s=Y();l(0,"div",1)(1,"mat-card")(2,"form",2),R("ngSubmit",function(){return V(s),q(i.submit())}),l(3,"mat-card-content")(4,"mat-form-field",3),R("click",function(){V(s);let u=xe(11);return q(u.open())}),l(5,"mat-label"),c(6),p(7,"translate"),r(),b(8,"input",4)(9,"mat-datepicker-toggle",5)(10,"mat-datepicker",null,0),E(12,aye,7,9,"mat-error"),r()(),l(13,"mat-card-actions",6)(14,"button",7),c(15),p(16,"translate"),r(),l(17,"button",8),c(18),p(19,"translate"),r()()()()()}if(n&2){let s=xe(11);a(2),g("formGroup",i.reactivateClientForm),a(4),h(m(7,11,"labels.inputs.Re Activation On Date")),a(2),g("min",i.minDate)("max",i.maxDate)("matDatepicker",s),a(),g("for",s),a(3),I(i.reactivateClientForm.controls.reactivationDate.hasError("required")?12:-1),a(2),g("routerLink",oe(17,oye)),a(),v(" ",m(16,13,"labels.buttons.Cancel")," "),a(2),g("disabled",!i.reactivateClientForm.valid),a(),v(" ",m(19,15,"labels.buttons.Confirm")," ")}},dependencies:[ue,fe,tt,st,Ue,Xe,dt,Ze,et,Ae,$e,Je,Et,Fe,Be,ut,ai,ze,mi,di,pi,ve,he],styles:[".container[_ngcontent-%COMP%]{max-width:37rem}"]})}}return e})();var rye=()=>["../../"];function lye(e,o){e&1&&(l(0,"mat-error"),c(1),p(2,"translate"),p(3,"translate"),l(4,"strong"),c(5),p(6,"translate"),r()()),e&2&&(a(),le(" ",m(2,3,"labels.inputs.Reopened On Date")," ",m(3,5,"labels.commons.is")," "),a(4),h(m(6,7,"labels.commons.required")))}var s2=(()=>{class e{constructor(){this.formBuilder=T(nt),this.clientsService=T(Oi),this.dateUtils=T(Zt),this.route=T(Ie),this.router=T(qe),this.settingsService=T(At),this.minDate=new Date(2e3,0,1),this.maxDate=new Date,this.clientId=this.route.parent.snapshot.params.clientId}ngOnInit(){this.maxDate=this.settingsService.businessDate,this.createUndoClientRejectionForm()}createUndoClientRejectionForm(){this.undoClientRejectionForm=this.formBuilder.group({reopenedDate:["",se.required]})}submit(){let t=this.undoClientRejectionForm.value,n=this.settingsService.language.code,i=this.settingsService.dateFormat,s=this.undoClientRejectionForm.value.reopenedDate;t.reopenedDate instanceof Date&&(t.reopenedDate=this.dateUtils.formatDate(s,i));let d=qt(at({},t),{dateFormat:i,locale:n});this.clientsService.executeClientCommand(this.clientId,"undoRejection",d).subscribe(()=>{this.router.navigate(["../../"],{relativeTo:this.route})})}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275cmp=me({type:e,selectors:[["mifosx-undo-client-rejection"]],decls:20,vars:18,consts:[["reopenedDatePicker",""],[1,"container"],[3,"ngSubmit","formGroup"],[1,"flex-fill",3,"click"],["matInput","","required","","formControlName","reopenedDate",3,"min","max","matDatepicker"],["matSuffix","",3,"for"],[1,"layout-row","align-center","gap-5px","responsive-column"],["type","button","mat-raised-button","",3,"routerLink"],["mat-raised-button","","color","primary",3,"disabled"]],template:function(n,i){if(n&1){let s=Y();l(0,"div",1)(1,"mat-card")(2,"form",2),R("ngSubmit",function(){return V(s),q(i.submit())}),l(3,"mat-card-content")(4,"mat-form-field",3),R("click",function(){V(s);let u=xe(11);return q(u.open())}),l(5,"mat-label"),c(6),p(7,"translate"),r(),b(8,"input",4)(9,"mat-datepicker-toggle",5)(10,"mat-datepicker",null,0),E(12,lye,7,9,"mat-error"),r()(),l(13,"mat-card-actions",6)(14,"button",7),c(15),p(16,"translate"),r(),l(17,"button",8),c(18),p(19,"translate"),r()()()()()}if(n&2){let s=xe(11);a(2),g("formGroup",i.undoClientRejectionForm),a(4),h(m(7,11,"labels.inputs.Reopened On Date")),a(2),g("min",i.minDate)("max",i.maxDate)("matDatepicker",s),a(),g("for",s),a(3),I(i.undoClientRejectionForm.controls.reopenedDate.hasError("required")?12:-1),a(2),g("routerLink",oe(17,rye)),a(),v(" ",m(16,13,"labels.buttons.Cancel")," "),a(2),g("disabled",!i.undoClientRejectionForm.valid),a(),v(" ",m(19,15,"labels.buttons.Confirm")," ")}},dependencies:[ue,fe,tt,st,Ue,Xe,dt,Ze,et,Ae,$e,Je,Et,Fe,Be,ut,ai,ze,mi,di,pi,ve,he],styles:[".container[_ngcontent-%COMP%]{max-width:37rem}"]})}}return e})();var sye=()=>["../../"];function cye(e,o){if(e&1&&(l(0,"mat-option",6),c(1),r()),e&2){let t=o.$implicit;g("value",t.id),a(),v(" ",t.name+" ("+t.currency.name+")"," ")}}function pye(e,o){e&1&&(l(0,"mat-error"),c(1),p(2,"translate"),p(3,"translate"),l(4,"strong"),c(5),p(6,"translate"),r()()),e&2&&(a(),le(" ",m(2,3,"labels.inputs.Charge")," ",m(3,5,"labels.commons.is")," "),a(4),h(m(6,7,"labels.commons.required")))}function mye(e,o){e&1&&(l(0,"mat-error"),c(1),p(2,"translate"),p(3,"translate"),l(4,"strong"),c(5),p(6,"translate"),r()()),e&2&&(a(),le(" ",m(2,3,"labels.inputs.Amount")," ",m(3,5,"labels.commons.is")," "),a(4),h(m(6,7,"labels.commons.required")))}function dye(e,o){if(e&1&&(l(0,"mat-option",6),c(1),r()),e&2){let t=o.$implicit;g("value",t.id),a(),v(" ",t.value," ")}}function uye(e,o){if(e&1&&(l(0,"mat-option",6),c(1),r()),e&2){let t=o.$implicit;g("value",t.id),a(),v(" ",t.value," ")}}function fye(e,o){e&1&&(l(0,"mat-error"),c(1),p(2,"translate"),p(3,"translate"),l(4,"strong"),c(5),p(6,"translate"),r()()),e&2&&(a(),le(" ",m(2,3,"labels.inputs.Due for collection on")," ",m(3,5,"labels.commons.is")," "),a(4),h(m(6,7,"labels.commons.required")))}function hye(e,o){if(e&1){let t=Y();l(0,"mat-form-field",13),R("click",function(){V(t);let i=xe(7);return q(i.open())}),l(1,"mat-label"),c(2),p(3,"translate"),r(),b(4,"input",14)(5,"mat-datepicker-toggle",15)(6,"mat-datepicker",null,0),E(8,fye,7,9,"mat-error"),r()}if(e&2){let t=xe(7),n=w(2);a(2),h(m(3,6,"labels.inputs.Due for collection on")),a(2),g("min",n.minDate)("max",n.maxDate)("matDatepicker",t),a(),g("for",t),a(3),I(n.clientChargeForm.controls.dueDate.hasError("required")?8:-1)}}function gye(e,o){e&1&&(l(0,"mat-error"),c(1),p(2,"translate"),p(3,"translate"),l(4,"strong"),c(5),p(6,"translate"),r()()),e&2&&(a(),le(" ",m(2,3,"labels.inputs.Due Date")," ",m(3,5,"labels.commons.is")," "),a(4),h(m(6,7,"labels.commons.required")))}function _ye(e,o){if(e&1){let t=Y();l(0,"mat-form-field",13),R("click",function(){V(t);let i=xe(7);return q(i.open())}),l(1,"mat-label"),c(2),p(3,"translate"),r(),b(4,"input",16)(5,"mat-datepicker-toggle",15)(6,"mat-datepicker",null,1),E(8,gye,7,9,"mat-error"),r()}if(e&2){let t=xe(7),n=w(2);a(2),h(m(3,6,"labels.inputs.Due On")),a(2),g("min",n.minDate)("max",n.maxDate)("matDatepicker",t),a(),g("for",t),a(3),I(n.clientChargeForm.controls.feeOnMonthDay.hasError("required")?8:-1)}}function Cye(e,o){e&1&&(l(0,"mat-form-field")(1,"mat-label"),c(2),p(3,"translate"),r(),b(4,"input",17),r()),e&2&&(a(2),h(m(3,1,"labels.inputs.Repeats Every")))}function vye(e,o){if(e&1&&(l(0,"div",4)(1,"mat-form-field")(2,"mat-label"),c(3),p(4,"translate"),r(),b(5,"input",10),E(6,mye,7,9,"mat-error"),r(),l(7,"mat-form-field")(8,"mat-label"),c(9),p(10,"translate"),r(),l(11,"mat-select",11),Se(12,dye,2,2,"mat-option",6,Pe),r()(),l(14,"mat-form-field")(15,"mat-label"),c(16),p(17,"translate"),r(),l(18,"mat-select",12),Se(19,uye,2,2,"mat-option",6,Pe),r()(),E(21,hye,9,8,"mat-form-field"),E(22,_ye,9,8,"mat-form-field"),E(23,Cye,5,3,"mat-form-field"),r()),e&2){let t=w();a(3),h(m(4,7,"labels.inputs.Amount")),a(3),I(t.clientChargeForm.controls.amount.hasError("required")?6:-1),a(3),h(m(10,9,"labels.inputs.Charge Calculation")),a(3),we(t.chargeDetails.chargeCalculationTypeOptions),a(4),h(m(17,11,"labels.inputs.Charge time type")),a(3),we(t.chargeDetails.chargeTimeTypeOptions),a(2),I(t.clientChargeForm.contains("dueDate")?21:-1),a(),I(t.clientChargeForm.contains("feeOnMonthDay")?22:-1),a(),I(t.clientChargeForm.contains("feeInterval")?23:-1)}}var c2=(()=>{class e{constructor(){this.formBuilder=T(nt),this.route=T(Ie),this.router=T(qe),this.dateUtils=T(Zt),this.clientsService=T(Oi),this.settingsService=T(At),this.minDate=new Date(2e3,0,1),this.maxDate=new Date,this.route.data.subscribe(t=>{this.clientChargeOptions=t.clientActionData.chargeOptions}),this.clientId=this.route.parent.snapshot.params.clientId}ngOnInit(){this.maxDate=this.settingsService.maxFutureDate,this.createClientsChargeForm(),this.buildDependencies()}buildDependencies(){this.clientChargeForm.controls.chargeId.valueChanges.subscribe(t=>{this.clientsService.getChargeAndTemplate(t).subscribe(n=>{this.chargeDetails=n;let i=n.chargeTimeType.id;(n.chargeTimeType.value==="Withdrawal Fee"||n.chargeTimeType.value==="Saving No Activity Fee")&&(this.chargeDetails.dueDateNotRequired=!0),(n.chargeTimeType.value==="Annual Fee"||n.chargeTimeType.value==="Monthly Fee")&&(this.chargeDetails.chargeTimeTypeAnnualOrMonth=!0),!this.chargeDetails.dueDateNotRequired&&!this.chargeDetails.chargeTimeTypeAnnualOrMonth?this.clientChargeForm.addControl("dueDate",new it("",se.required)):this.clientChargeForm.removeControl("dueDate"),!this.chargeDetails.dueDateNotRequired&&this.chargeDetails.chargeTimeTypeAnnualOrMonth?this.clientChargeForm.addControl("feeOnMonthDay",new it("",se.required)):this.clientChargeForm.removeControl("feeOnMonthDay"),i.value==="Monthly Fee"?this.clientChargeForm.addControl("feeInterval",new it(n.feeInterval,se.required)):this.clientChargeForm.removeControl("feeInterval"),this.clientChargeForm.patchValue({amount:n.amount,chargeCalculationType:n.chargeCalculationType.id,chargeTimeType:n.chargeTimeType.id})})})}createClientsChargeForm(){this.clientChargeForm=this.formBuilder.group({chargeId:["",se.required],amount:["",se.required],chargeCalculationType:[{value:"",disabled:!0}],chargeTimeType:[{value:"",disabled:!0}]})}submit(){let t=this.clientChargeForm.value;if(t.locale=this.settingsService.language.code,t.feeInterval||(t.feeInterval=this.chargeDetails.feeInterval),this.chargeDetails.dueDateNotRequired!==!0)if(this.chargeDetails.chargeTimeTypeAnnualOrMonth===!0){let n="MMMM-dd";if(t.monthDayFormat=n,t.feeOnMonthDay){let i=this.clientChargeForm.value.feeOnMonthDay;t.feeOnMonthDay=this.dateUtils.formatDate(i,n)}}else{let n=this.settingsService.dateFormat;if(t.dateFormat=n,t.dueDate){let i=this.clientChargeForm.value.dueDate;t.dueDate=this.dateUtils.formatDate(i,n)}}this.clientsService.createClientCharge(this.clientId,t).subscribe(()=>{this.router.navigate(["../../"],{relativeTo:this.route})})}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275cmp=me({type:e,selectors:[["mifosx-add-client-charge"]],decls:21,vars:15,consts:[["dueDatePicker",""],["feeOnMonthDayPicker",""],[1,"container"],[3,"ngSubmit","formGroup"],[1,"layout-column"],["required","","formControlName","chargeId"],[3,"value"],[1,"layout-row","layout-xs-column","layout-align-center","gap-5px"],["type","button","mat-raised-button","",3,"routerLink"],["mat-raised-button","","color","primary",3,"disabled"],["type","number","required","","matInput","","formControlName","amount"],["formControlName","chargeCalculationType"],["formControlName","chargeTimeType"],[3,"click"],["matInput","","required","","formControlName","dueDate",3,"min","max","matDatepicker"],["matSuffix","",3,"for"],["matInput","","required","","formControlName","feeOnMonthDay",3,"min","max","matDatepicker"],["matInput","","formControlName","feeInterval"]],template:function(n,i){n&1&&(l(0,"div",2)(1,"mat-card")(2,"form",3),R("ngSubmit",function(){return i.submit()}),l(3,"mat-card-content")(4,"div",4)(5,"mat-form-field")(6,"mat-label"),c(7),p(8,"translate"),r(),l(9,"mat-select",5),Se(10,cye,2,2,"mat-option",6,Pe),r(),E(12,pye,7,9,"mat-error"),r(),E(13,vye,24,13,"div",4),r(),l(14,"mat-card-actions",7)(15,"button",8),c(16),p(17,"translate"),r(),l(18,"button",9),c(19),p(20,"translate"),r()()()()()()),n&2&&(a(2),g("formGroup",i.clientChargeForm),a(5),h(m(8,8,"labels.inputs.Charge")),a(3),we(i.clientChargeOptions),a(2),I(i.clientChargeForm.controls.chargeId.hasError("required")?12:-1),a(),I(i.chargeDetails?13:-1),a(2),g("routerLink",oe(14,sye)),a(),v(" ",m(17,10,"labels.buttons.Cancel")," "),a(2),g("disabled",!i.clientChargeForm.valid),a(),v(" ",m(20,12,"labels.buttons.Submit")," "))},dependencies:[ue,fe,tt,st,tn,Ue,Xe,dt,Ze,et,Ae,$e,Je,Et,Fe,Be,ut,ai,ze,gt,ft,mi,di,pi,ve,he],styles:[".container[_ngcontent-%COMP%]{width:37rem}"]})}}return e})();var xye=()=>["../../general"];function bye(e,o){if(e&1&&(l(0,"mat-option",5),c(1),r()),e&2){let t=o.$implicit;g("value",t),a(),v(" ",t.name," ")}}function yye(e,o){e&1&&(l(0,"h2"),c(1,"component[0].componentKey"),r())}function Sye(e,o){if(e&1&&(l(0,"mat-radio-button",12)(1,"span",13),c(2),r()()),e&2){let t=o.$implicit;g("value",t),a(2),v(" ",t.text," ")}}function wye(e,o){if(e&1&&(l(0,"div"),c(1),p(2,"translate"),r()),e&2){let t=w().$implicit;a(),le("",m(2,2,"labels.text.Your answer is"),": ",t.answer.text)}}function Pye(e,o){if(e&1){let t=Y();l(0,"div",9)(1,"mat-label",10),c(2),r(),l(3,"mat-radio-group",11),Rc("ngModelChange",function(i){let s=V(t).$implicit;return Bc(s.answer,i)||(s.answer=i),q(i)}),Se(4,Sye,3,2,"mat-radio-button",12,Pe),r()(),E(6,wye,3,4,"div")}if(e&2){let t=o.$implicit;a(2),h(t.text),a(),kc("ngModel",t.answer),a(),we(t.responseDatas),a(2),I(t.answer?6:-1)}}function Tye(e,o){if(e&1&&(E(0,yye,2,0,"h2"),l(1,"div",8),Se(2,Pye,7,3,null,null,Pe),r()),e&2){let t=o.$implicit;I(t[0].componentKey?0:-1),a(2),we(t)}}var p2=(()=>{class e{constructor(){this.route=T(Ie),this.clientsService=T(Oi),this.router=T(qe),this.authenticationService=T(Wo),this.route.data.subscribe(n=>{this.allSurveyData=n.clientActionData,this.clientId=this.route.parent.snapshot.params.clientId});let t=this.authenticationService.getCredentials();this.userId=t.userId}onSurveyChange(t){if(t.value){this.surveyData=t.value;let n=this.groupBy(this.surveyData.questionDatas,function(i){return[i.componentKey]});this.componentGroups=n}}groupBy(t,n){let i={};return t.forEach(s=>{let d=JSON.stringify(n(s));i[d]=i[d]||[],i[d].push(s)}),Object.keys(i).map(function(s){return i[s]})}isAnyResponse(){return this.surveyData&&this.surveyData.questionDatas.forEach(t=>{if(t.answer)return!1}),!0}submit(){this.formData={userId:this.userId,clientId:this.clientId,surveyId:this.surveyData.id,surveyName:"",username:"",id:0,scorecardValues:[]},this.surveyData.questionDatas.forEach(t=>{if(t.answer){let n={questionId:t.id,responseId:t.answer.id,value:t.answer.value,createdOn:new Date().getTime()};this.formData.scorecardValues.push(n)}}),this.clientsService.createNewSurvey(this.surveyData.id,this.formData).subscribe(()=>{this.router.navigate(["../../general"],{relativeTo:this.route})})}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275cmp=me({type:e,selectors:[["mifosx-take-survey"]],decls:19,vars:11,consts:[[1,"container","mat-typography"],[1,"mat-elevation-z2-surveycont"],[1,"survey-select","layout-row"],[1,"name-label"],[3,"selectionChange"],[3,"value"],["mat-raised-button","","color","danger",1,"button-cancel",3,"routerLink"],["mat-raised-button","","color","primary",1,"button-submit",3,"click"],[1,"layout-column","display-questions"],[1,"layout-row","question"],[1,"flex-40","question-text"],[1,"flex-60","radio-group-spacing",3,"ngModelChange","ngModel"],[1,"layout-column","radio-button",3,"value"],[1,"wrap-mat-radio-label"]],template:function(n,i){n&1&&(l(0,"div",0)(1,"div",1)(2,"div",2)(3,"mat-label",3),c(4),p(5,"translate"),r(),l(6,"mat-select",4),R("selectionChange",function(d){return i.onSurveyChange(d)}),Se(7,bye,2,2,"mat-option",5,Pe),r()(),b(9,"hr"),l(10,"div"),Se(11,Tye,4,1,null,null,Pe),r(),l(13,"button",6),c(14),p(15,"translate"),r(),l(16,"button",7),R("click",function(){return i.submit()}),c(17),p(18,"translate"),r()()()),n&2&&(a(4),h(m(5,4,"labels.inputs.Survey Name")),a(3),we(i.allSurveyData),a(4),we(i.componentGroups),a(2),g("routerLink",oe(10,xye)),a(),v(" ",m(15,6,"labels.buttons.Cancel")," "),a(3),v(" ",m(18,8,"labels.buttons.Submit")," "))},dependencies:[ue,fe,Ue,Ae,Be,gt,ft,ve,tr,ec,Sp,ir,he],styles:[".surveyOption[_ngcontent-%COMP%]{border:1px solid #cbcbcb;padding:5px}.display-questions[_ngcontent-%COMP%]{margin-top:20px}.question[_ngcontent-%COMP%]{padding:10px 0}.wrap-mat-radio-label[_ngcontent-%COMP%]{white-space:normal}.question-text[_ngcontent-%COMP%]{font-weight:700}.survey-select[_ngcontent-%COMP%]{height:40px;margin-bottom:20px}.name-label[_ngcontent-%COMP%]{width:25%}.surveyCont[_ngcontent-%COMP%]{padding:5%}.button-cancel[_ngcontent-%COMP%]{margin-left:35%}.button-submit[_ngcontent-%COMP%]{margin-left:2%}.radio-button[_ngcontent-%COMP%]{margin-bottom:5px;align-items:normal;white-space:normal}.radio-group-spacing[_ngcontent-%COMP%]{display:flex;gap:2rem;flex-direction:row}@media (width <= 768px){.radio-group-spacing[_ngcontent-%COMP%]{flex-direction:column}}"]})}}return e})();var Mye=["screenReport"],Dye=()=>["../../"];function Eye(e,o){if(e&1&&(l(0,"mat-option",6),c(1),r()),e&2){let t=o.$implicit;g("value",t.id),a(),v(" ",t.name," ")}}function Iye(e,o){e&1&&(l(0,"mat-error"),c(1),p(2,"translate"),p(3,"translate"),l(4,"strong"),c(5),p(6,"translate"),r()()),e&2&&(a(),le(" ",m(2,3,"labels.inputs.Screen Report")," ",m(3,5,"labels.commons.is")," "),a(4),h(m(6,7,"labels.commons.required")))}var m2=(()=>{class e{constructor(){this.formBuilder=T(nt),this.clientsService=T(Oi),this.route=T(Ie),this.sanitizer=T(Zs),this.renderer=T(_g),this.route.data.subscribe(t=>{this.templatesData=t.clientActionData}),this.clientId=this.route.parent.snapshot.params.clientId}ngOnInit(){this.createClientScreenReportForm()}createClientScreenReportForm(){this.clientScreenReportForm=this.formBuilder.group({templateId:[""]})}print(){let t=window.open("","Screen Report","height=400,width=600");t.document.write(""),t.document.write(""),t.document.write(this.template),t.document.write(""),t.print(),t.close()}generate(){let t=this.clientScreenReportForm.get("templateId").value;this.clientsService.retrieveClientReportTemplate(t,this.clientId).subscribe(n=>{this.template=this.sanitizer.sanitize(fF.HTML,n),this.renderer.setProperty(this.screenReportRef.nativeElement,"innerHTML",this.template)})}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275cmp=me({type:e,selectors:[["mifosx-client-screen-reports"]],viewQuery:function(n,i){if(n&1&&Ee(Mye,7),n&2){let s;Te(s=Me())&&(i.screenReportRef=s.first)}},decls:34,vars:21,consts:[["output",""],["screenReport",""],[1,"container","m-b-20"],[3,"ngSubmit","formGroup"],[1,"flex-fill"],["formControlName","templateId"],[3,"value"],[1,"layout-row","align-center","gap-5px","actions-spacing","responsive-column"],["type","button","mat-raised-button","",3,"routerLink"],["mat-raised-button","","color","primary",3,"disabled"],["icon","cogs","size","sm",1,"m-r-10"],[1,"container","m-t-20"],[1,"layout-column","gap-3percent"],[1,"layout-align-end"],["mat-stroked-button","","color","primary",3,"click","disabled"],["icon","file",1,"m-r-10"],[1,"layout-align-center"]],template:function(n,i){if(n&1){let s=Y();l(0,"div",2)(1,"mat-card")(2,"form",3),R("ngSubmit",function(){return V(s),q(i.generate())}),l(3,"mat-card-content")(4,"div")(5,"mat-form-field",4)(6,"mat-label"),c(7),p(8,"translate"),r(),l(9,"mat-select",5),Se(10,Eye,2,2,"mat-option",6,Pe),r(),E(12,Iye,7,9,"mat-error"),r()()(),l(13,"mat-card-actions",7)(14,"button",8),c(15),p(16,"translate"),r(),l(17,"button",9),b(18,"fa-icon",10),c(19),p(20,"translate"),r()()()()(),l(21,"div",11,0)(23,"mat-card",12)(24,"div",13)(25,"button",14),R("click",function(){return V(s),q(i.print())}),b(26,"fa-icon",15),c(27),p(28,"translate"),r()(),l(29,"div",16,1)(31,"p"),c(32),p(33,"translate"),r()()()()}n&2&&(a(2),g("formGroup",i.clientScreenReportForm),a(5),h(m(8,10,"labels.inputs.Client Screen Reports")),a(3),we(i.templatesData),a(2),I(i.clientScreenReportForm.controls.templateId.hasError("required")?12:-1),a(2),g("routerLink",oe(20,Dye)),a(),v(" ",m(16,12,"labels.buttons.Cancel")," "),a(2),g("disabled",!i.clientScreenReportForm.valid),a(2),v("",m(20,14,"labels.buttons.Generate Report")," "),a(6),g("disabled",!i.template),a(2),v(" ",m(28,16,"labels.buttons.Print")," "),a(5),h(m(33,18,"labels.text.Please select a screen report.")))},dependencies:[ue,fe,tt,Ue,Xe,Ze,et,Ae,$e,Je,Et,Fe,Be,ut,gt,ft,ve,ke,he],styles:[".container[_ngcontent-%COMP%]{max-width:37rem}.container[_ngcontent-%COMP%] .print[_ngcontent-%COMP%]{align-self:flex-end} mat-card{margin-bottom:1rem;padding:1rem;box-shadow:0 2px 4px #0000001a;border:1px solid var(--border-color, #ddd);border-radius:8px;background-color:var(--card-background, #fff);transition:background-color .3s ease,border-color .3s ease;height:10rem}.m-t-20[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{background-color:#1976d2;color:#fff} .container.m-t-20 mat-card p{display:block;margin-top:-1.9rem}.m-b-20[_ngcontent-%COMP%] form[_ngcontent-%COMP%]{margin-top:-1.5rem}.actions-spacing[_ngcontent-%COMP%]{margin-top:24px}"]})}}return e})();var ci=(()=>{class e{constructor(){this.http=T(ko),this.settingsService=T(At)}getLoanProducts(){return this.http.get("/loanproducts")}createLoanProduct(t){return this.http.post("/loanproducts",t)}getLoanProductsTemplate(){return this.http.get("/loanproducts/template")}getLoanProduct(t,n=!1){let i=new rn().set("template",n.toString());return this.http.get(`/loanproducts/${t}`,{params:i})}updateLoanProduct(t,n){return this.http.put(`/loanproducts/${t}`,n)}getSavingProducts(){return this.http.get("/savingsproducts")}createSavingProduct(t){return this.http.post("/savingsproducts",t)}getSavingProductsTemplate(){return this.http.get("/savingsproducts/template")}getSavingProduct(t,n=!1){let i=new rn().set("template",n.toString());return this.http.get(`/savingsproducts/${t}`,{params:i})}updateSavingProduct(t,n){return this.http.put(`/savingsproducts/${t}`,n)}getShareProducts(){return this.http.get("/products/share")}createShareProduct(t){return this.http.post("/products/share",t)}getShareProductsTemplate(){return this.http.get("/products/share/template")}getShareProduct(t,n=!1){let i=new rn().set("template",n.toString());return this.http.get(`/products/share/${t}`,{params:i})}updateShareProduct(t,n){return this.http.put(`/products/share/${t}`,n)}getDividends(t){return this.http.get(`/shareproduct/${t}/dividend`)}createDividend(t,n){return this.http.post(`/shareproduct/${t}/dividend`,n)}getDividendData(t,n){let i=new rn().set("dateFormat",this.settingsService.dateFormat).set("limit","10").set("locale",this.settingsService.language.code).set("offset","0");return this.http.get(`/shareproduct/${t}/dividend/${n}`,{params:i})}approveDividend(t,n,i){let s=new rn().set("command","approve");return this.http.put(`/shareproduct/${t}/dividend/${n}`,i,{params:s})}getRecurringDepositProducts(){return this.http.get("/recurringdepositproducts")}getRecurringDepositProduct(t,n=!1){let i=new rn().set("template",n.toString());return this.http.get(`/recurringdepositproducts/${t}`,{params:i})}getRecurringDepositProductsTemplate(){return this.http.get("/recurringdepositproducts/template")}getCharges(){return this.http.get("/charges")}getChargesTemplate(){return this.http.get("/charges/template")}getCharge(t,n=!1){let i=new rn().set("template",n.toString());return this.http.get(`/charges/${t}`,{params:i})}updateCharge(t,n){return this.http.put(`/charges/${t}`,n)}deleteCharge(t){return this.http.delete(`/charges/${t}`)}createCharge(t){return this.http.post("/charges",t)}getFixedDepositProducts(){return this.http.get("/fixeddepositproducts")}createFixedDepositProduct(t){return this.http.post("/fixeddepositproducts",t)}getFixedDepositProductsTemplate(){return this.http.get("/fixeddepositproducts/template")}getFixedDepositProduct(t){return this.http.get(`/fixeddepositproducts/${t}`)}getFixedDepositProductAndTemplate(t){let n=new rn().set("template","true");return this.http.get(`/fixeddepositproducts/${t}`,{params:n})}updateFixedDepositProduct(t,n){return this.http.put(`/fixeddepositproducts/${t}`,n)}getTaxComponents(){return this.http.get("/taxes/component")}getTaxComponent(t){return this.http.get(`/taxes/component/${t}`)}getTaxComponentTemplate(){return this.http.get("/taxes/component/template")}createTaxComponent(t){return this.http.post("/taxes/component",t)}updateTaxComponent(t,n){return this.http.put(`/taxes/component/${t}`,n)}getTaxGroups(){return this.http.get("/taxes/group")}getTaxGroup(t,n){let i=new rn().set("template",n);return this.http.get(`/taxes/group/${t}`,{params:i})}getTaxGroupTemplate(){return this.http.get("/taxes/group/template")}createTaxGroup(t){return this.http.post("/taxes/group",t)}updateTaxGroup(t,n){return this.http.put(`/taxes/group/${t}`,n)}getDelinquencyRanges(){return this.http.get("/delinquency/ranges")}getDelinquencyRange(t){return this.http.get(`/delinquency/ranges/${t}`)}createDelinquencyRange(t){return this.http.post("/delinquency/ranges",t)}updateDelinquencyRange(t,n){return this.http.put(`/delinquency/ranges/${t}`,n)}deleteDelinquencyRange(t){return this.http.delete(`/delinquency/ranges/${t}`)}getDelinquencyBuckets(){return this.http.get("/delinquency/buckets")}getDelinquencyBucket(t){return this.http.get(`/delinquency/buckets/${t}`)}createDelinquencyBucket(t){return this.http.post("/delinquency/buckets",t)}updateDelinquencyBucket(t,n){return this.http.put(`/delinquency/buckets/${t}`,n)}deleteDelinquencyBucket(t){return this.http.delete(`/delinquency/buckets/${t}`)}getProductMixes(){let t=new rn;return t=t.set("associations","productMixes"),this.http.get("/loanproducts",{params:t})}getFloatingRates(){return this.http.get("/floatingrates")}createFloatingRate(t){return this.http.post("/floatingrates",t)}getFloatingRate(t){return this.http.get(`/floatingrates/${t}`)}updateFloatingRate(t,n){return this.http.put(`/floatingrates/${t}`,n)}getProductMix(t){return this.http.get(`/loanproducts/${t}/productmix`)}getProductsMixTemplate(){let t=new rn;return t=t.set("isProductMixTemplate","true"),this.http.get("/loanproducts/template",{params:t})}getProductMixTemplate(t){let n=new rn;return n=n.set("template","true"),this.http.get(`/loanproducts/${t}/productmix`,{params:n})}createProductMix(t,n){return this.http.post(`/loanproducts/${n}/productmix`,t)}updateProductMix(t,n){return this.http.put(`/loanproducts/${n}/productmix`,t)}deleteProductMix(t){return this.http.delete(`/loanproducts/${t}/productmix`)}getAllInterestRateCharts(t){let n=new rn().set("productId",t);return this.http.get("/interestratecharts",{params:n})}createRecurringDepositProduct(t){return this.http.post("/recurringdepositproducts",t)}getRecurringDepositProductAndTemplate(t){let n=new rn().set("template","true");return this.http.get(`/recurringdepositproducts/${t}`,{params:n})}updateRecurringDepositProduct(t,n){return this.http.put(`/recurringdepositproducts/${t}`,n)}getCollaterals(){return this.http.get("/collateral-management")}getCollateralTemplate(){return this.http.get("/collateral-management/template")}getCollateral(t,n=!1){let i=new rn().set("template",n.toString());return this.http.get(`/collateral-management/${t}`,{params:i})}updateCollateral(t,n){return this.http.put(`/collateral-management/${t}`,n)}deleteCollateral(t){return this.http.delete(`/collateral-management/${t}`)}createCollateral(t){return this.http.post("/collateral-management",t)}getProductDatatables(t){let n=new rn().set("apptable",t);return this.http.get("/datatables",{params:n})}getProductDatatable(t,n){let i=new rn().set("genericResultSet","true");return this.http.get(`/datatables/${n}/${t}`,{params:i})}addProductDatatableEntry(t,n,i){let s=new rn().set("genericResultSet","true");return this.http.post(`/datatables/${n}/${t}`,i,{params:s})}editProductDatatableEntry(t,n,i){let s=new rn().set("genericResultSet","true");return this.http.put(`/datatables/${n}/${t}`,i,{params:s})}deleteDatatableContent(t,n){let i=new rn().set("genericResultSet","true");return this.http.delete(`/datatables/${n}/${t}`,{params:i})}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275prov=Re({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();var Oye=()=>["../../"];function Aye(e,o){if(e&1&&(l(0,"mat-option",4),c(1),r()),e&2){let t=o.$implicit;g("value",t.id),a(),v(" ",t.name," ")}}function Fye(e,o){e&1&&(l(0,"mat-error"),c(1),p(2,"translate"),p(3,"translate"),l(4,"strong"),c(5),p(6,"translate"),r()()),e&2&&(a(),le(" ",m(2,3,"labels.inputs.Collateral")," ",m(3,5,"labels.commons.is")," "),a(4),h(m(6,7,"labels.commons.required")))}function kye(e,o){e&1&&(l(0,"mat-error"),c(1),p(2,"translate"),p(3,"translate"),l(4,"strong"),c(5),p(6,"translate"),r()()),e&2&&(a(),le(" ",m(2,3,"labels.inputs.Quantity")," ",m(3,5,"labels.commons.is")," "),a(4),h(m(6,7,"labels.commons.required")))}function Bye(e,o){if(e&1&&(l(0,"div",2)(1,"mat-form-field")(2,"mat-label"),c(3),p(4,"translate"),r(),b(5,"input",8),r(),l(6,"mat-form-field")(7,"mat-label"),c(8),p(9,"translate"),r(),b(10,"input",9),r(),l(11,"mat-form-field")(12,"mat-label"),c(13),p(14,"translate"),r(),b(15,"input",10),r(),l(16,"mat-form-field")(17,"mat-label"),c(18),p(19,"translate"),r(),b(20,"input",11),r(),l(21,"mat-form-field")(22,"mat-label"),c(23),p(24,"translate"),r(),b(25,"input",12),r(),l(26,"mat-form-field")(27,"mat-label"),c(28),p(29,"translate"),r(),b(30,"input",13),E(31,kye,7,9,"mat-error"),r(),l(32,"mat-form-field")(33,"mat-label"),c(34),p(35,"translate"),r(),b(36,"input",14),r(),l(37,"mat-form-field")(38,"mat-label"),c(39),p(40,"translate"),r(),b(41,"input",15),r()()),e&2){let t=w();a(3),h(m(4,9,"labels.inputs.name")),a(5),h(m(9,11,"labels.inputs.Type/Quality")),a(5),h(m(14,13,"labels.inputs.Unit Type")),a(5),h(m(19,15,"labels.inputs.Base Price")),a(5),h(m(24,17,"labels.inputs.Percentage To Base")),a(5),h(m(29,19,"labels.inputs.Quantity")),a(3),I(t.clientCollateralForm.controls.quantity.hasError("required")?31:-1),a(3),h(m(35,21,"labels.inputs.Total")),a(5),h(m(40,23,"labels.inputs.Total Collateral Value"))}}var d2=(()=>{class e{constructor(){this.formBuilder=T(nt),this.route=T(Ie),this.router=T(qe),this.productsService=T(ci),this.clientsService=T(Oi),this.settingsService=T(At),this.route.data.subscribe(t=>{this.clientCollateralOptions=t.clientActionData}),this.clientId=this.route.parent.snapshot.params.clientId}ngOnInit(){this.createClientCollateralForm(),this.buildDependencies()}buildDependencies(){this.clientCollateralForm.controls.collateralId.valueChanges.subscribe(t=>{this.productsService.getCollateral(t).subscribe(n=>{this.collateralDetails=n,this.clientCollateralForm.patchValue({name:n.name,quality:n.quality,unitType:n.unitType,basePrice:this.collateralDetails.basePrice,pctToBase:this.collateralDetails.pctToBase})})}),this.clientCollateralForm.controls.quantity.valueChanges.subscribe(t=>{this.clientCollateralForm.patchValue({totalValue:this.collateralDetails.basePrice*t,totalCollateralValue:this.collateralDetails.basePrice*this.collateralDetails.pctToBase*t/100})})}createClientCollateralForm(){this.clientCollateralForm=this.formBuilder.group({collateralId:["",se.required],quantity:["",se.required],name:[{value:"",disabled:!0}],quality:[{value:"",disabled:!0}],unitType:[{value:"",disabled:!0}],basePrice:[{value:"",disabled:!0}],pctToBase:[{value:"",disabled:!0}],totalValue:[{value:"",disabled:!0}],totalCollateralValue:[{value:"",disabled:!0}]})}submit(){let t=this.clientCollateralForm.value.collateralId,n=this.clientCollateralForm.value.quantity,i=this.settingsService.language.code,s={collateralId:t,quantity:n,locale:i};this.clientsService.createClientCollateral(this.clientId,s).subscribe(()=>{this.router.navigate(["../../"],{relativeTo:this.route})})}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275cmp=me({type:e,selectors:[["mifosx-add-client-collateral"]],decls:21,vars:15,consts:[[1,"container"],[3,"ngSubmit","formGroup"],[1,"layout-column"],["required","","formControlName","collateralId"],[3,"value"],[1,"layout-row","layout-xs-column","layout-align-center","gap-5px"],["type","button","mat-raised-button","",3,"routerLink"],["mat-raised-button","","color","primary",3,"disabled"],["matInput","","required","","formControlName","name"],["matInput","","required","","formControlName","quality"],["matInput","","required","","formControlName","unitType"],["matInput","","required","","formControlName","basePrice"],["matInput","","required","","formControlName","pctToBase"],["matInput","","required","","formControlName","quantity"],["matInput","","required","","formControlName","totalValue"],["matInput","","required","","formControlName","totalCollateralValue"]],template:function(n,i){n&1&&(l(0,"div",0)(1,"mat-card")(2,"form",1),R("ngSubmit",function(){return i.submit()}),l(3,"mat-card-content")(4,"div",2)(5,"mat-form-field")(6,"mat-label"),c(7),p(8,"translate"),r(),l(9,"mat-select",3),Se(10,Aye,2,2,"mat-option",4,Pe),r(),E(12,Fye,7,9,"mat-error"),r(),E(13,Bye,42,25,"div",2),r()(),l(14,"mat-card-actions",5)(15,"button",6),c(16),p(17,"translate"),r(),l(18,"button",7),c(19),p(20,"translate"),r()()()()()),n&2&&(a(2),g("formGroup",i.clientCollateralForm),a(5),h(m(8,8,"labels.inputs.Collateral")),a(3),we(i.clientCollateralOptions),a(2),I(i.clientCollateralForm.controls.collateralId.hasError("required")?12:-1),a(),I(i.collateralDetails?13:-1),a(2),g("routerLink",oe(14,Oye)),a(),v(" ",m(17,10,"labels.buttons.Cancel")," "),a(2),g("disabled",!i.clientCollateralForm.valid),a(),v(" ",m(20,12,"labels.buttons.Submit")," "))},dependencies:[ue,fe,tt,st,Ue,Xe,dt,Ze,et,Ae,$e,Je,Et,Fe,Be,ut,ze,gt,ft,ve,he],styles:[".container[_ngcontent-%COMP%]{width:37rem}"]})}}return e})();function Rye(e,o){e&1&&b(0,"mifosx-client-assign-staff")}function Nye(e,o){e&1&&b(0,"mifosx-close-client")}function Lye(e,o){e&1&&b(0,"mifosx-view-survey")}function Vye(e,o){e&1&&b(0,"mifosx-reject-client")}function qye(e,o){e&1&&b(0,"mifosx-activate-client")}function zye(e,o){e&1&&b(0,"mifosx-withdraw-client")}function Hye(e,o){e&1&&b(0,"mifosx-update-client-savings-account")}function Gye(e,o){e&1&&b(0,"mifosx-transfer-client")}function jye(e,o){e&1&&b(0,"mifosx-undo-client-transfer")}function $ye(e,o){e&1&&b(0,"mifosx-reject-client-transfer")}function Uye(e,o){e&1&&b(0,"mifosx-accept-client-transfer")}function Wye(e,o){e&1&&b(0,"mifosx-reactivate-client")}function Qye(e,o){e&1&&b(0,"mifosx-undo-client-rejection")}function Yye(e,o){e&1&&b(0,"mifosx-add-client-charge")}function Jye(e,o){e&1&&b(0,"mifosx-take-survey")}function Kye(e,o){e&1&&b(0,"mifosx-client-screen-reports")}function Xye(e,o){e&1&&b(0,"mifosx-add-client-collateral")}var u2=(()=>{class e{constructor(){this.route=T(Ie),this.router=T(qe),this.actions={"Assign Staff":!1,Close:!1,Reject:!1,Survey:!1,Withdraw:!1,"Update Default Savings":!1,"Transfer Client":!1,"Undo Transfer":!1,"Accept Transfer":!1,"Reject Transfer":!1,Reactivate:!1,Activate:!1,"Undo Rejection":!1,"Add Charge":!1,"Take Survey":!1,"Client Screen Reports":!1,"Create Collateral":!1},this.router.routeReuseStrategy.shouldReuseRoute=()=>!1;let t=this.route.snapshot.params.name;this.actions[t]=!0}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275cmp=me({type:e,selectors:[["mifosx-client-actions"]],decls:17,vars:17,template:function(n,i){n&1&&(E(0,Rye,1,0,"mifosx-client-assign-staff"),E(1,Nye,1,0,"mifosx-close-client"),E(2,Lye,1,0,"mifosx-view-survey"),E(3,Vye,1,0,"mifosx-reject-client"),E(4,qye,1,0,"mifosx-activate-client"),E(5,zye,1,0,"mifosx-withdraw-client"),E(6,Hye,1,0,"mifosx-update-client-savings-account"),E(7,Gye,1,0,"mifosx-transfer-client"),E(8,jye,1,0,"mifosx-undo-client-transfer"),E(9,$ye,1,0,"mifosx-reject-client-transfer"),E(10,Uye,1,0,"mifosx-accept-client-transfer"),E(11,Wye,1,0,"mifosx-reactivate-client"),E(12,Qye,1,0,"mifosx-undo-client-rejection"),E(13,Yye,1,0,"mifosx-add-client-charge"),E(14,Jye,1,0,"mifosx-take-survey"),E(15,Kye,1,0,"mifosx-client-screen-reports"),E(16,Xye,1,0,"mifosx-add-client-collateral")),n&2&&(I(i.actions["Assign Staff"]?0:-1),a(),I(i.actions.Close?1:-1),a(),I(i.actions.Survey?2:-1),a(),I(i.actions.Reject?3:-1),a(),I(i.actions.Activate?4:-1),a(),I(i.actions.Withdraw?5:-1),a(),I(i.actions["Update Default Savings"]?6:-1),a(),I(i.actions["Transfer Client"]?7:-1),a(),I(i.actions["Undo Transfer"]?8:-1),a(),I(i.actions["Reject Transfer"]?9:-1),a(),I(i.actions["Accept Transfer"]?10:-1),a(),I(i.actions.Reactivate?11:-1),a(),I(i.actions["Undo Rejection"]?12:-1),a(),I(i.actions["Add Charge"]?13:-1),a(),I(i.actions["Take Survey"]?14:-1),a(),I(i.actions["Client Screen Reports"]?15:-1),a(),I(i.actions["Create Collateral"]?16:-1))},dependencies:[ue,fe,JC,KC,XC,ZC,e2,t2,i2,n2,o2,a2,r2,l2,s2,c2,p2,m2,d2],encapsulation:2})}}return e})();var Zye=()=>["../../","general"],e3e=()=>["pay"],Z0=e=>({strikeoff:e});function t3e(e,o){e&1&&(l(0,"button",12),b(1,"fa-icon",13),c(2),p(3,"translate"),r()),e&2&&(g("routerLink",oe(4,e3e)),a(2),v(" ",m(3,2,"labels.buttons.Pay")," "))}function i3e(e,o){if(e&1){let t=Y();l(0,"button",3),R("click",function(){V(t);let i=w();return q(i.waiveCharge())}),b(1,"i",14),c(2),p(3,"translate"),r()}e&2&&(a(2),v(" ",m(3,1,"labels.buttons.Waive Charge")," "))}function n3e(e,o){e&1&&(l(0,"th",25),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.ID")))}function o3e(e,o){if(e&1&&(l(0,"td",26),c(1),r()),e&2){let t=o.$implicit;g("ngClass",Nt(2,Z0,t.reversed)),a(),h(t.id)}}function a3e(e,o){e&1&&(l(0,"th",25),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.Office Name")))}function r3e(e,o){if(e&1&&(l(0,"td",26),c(1),r()),e&2){let t=o.$implicit;g("ngClass",Nt(2,Z0,t.reversed)),a(),v(" ",t.officeName," ")}}function l3e(e,o){e&1&&(l(0,"th",25),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.Type")))}function s3e(e,o){if(e&1&&(l(0,"td",26),c(1),r()),e&2){let t=o.$implicit;g("ngClass",Nt(2,Z0,t.reversed)),a(),v(" ",t.type.value," ")}}function c3e(e,o){e&1&&(l(0,"th",25),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.Transaction Date")))}function p3e(e,o){if(e&1&&(l(0,"td",26),c(1),p(2,"dateFormat"),r()),e&2){let t=o.$implicit;g("ngClass",Nt(4,Z0,t.reversed)),a(),v(" ",m(2,2,t.date)," ")}}function m3e(e,o){e&1&&(l(0,"th",25),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.Amount")))}function d3e(e,o){if(e&1&&(l(0,"td",26),c(1),p(2,"formatNumber"),r()),e&2){let t=o.$implicit;g("ngClass",Nt(4,Z0,t.reversed)),a(),v(" ",m(2,2,t.amount)," ")}}function u3e(e,o){e&1&&(l(0,"th",25),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.Actions")))}function f3e(e,o){if(e&1){let t=Y();l(0,"td",26)(1,"button",27),R("click",function(){let i=V(t).$implicit,s=w(2);return q(s.undoTransaction(i.id))}),b(2,"fa-icon",4),r()()}if(e&2){let t=o.$implicit;g("ngClass",Nt(1,Z0,t.reversed))}}function h3e(e,o){e&1&&b(0,"tr",28)}function g3e(e,o){e&1&&b(0,"tr",29)}function _3e(e,o){if(e&1&&(l(0,"table",9),X(1,15),F(2,n3e,3,3,"th",16)(3,o3e,2,4,"td",17),Z(),X(4,18),F(5,a3e,3,3,"th",16)(6,r3e,2,4,"td",17),Z(),X(7,19),F(8,l3e,3,3,"th",16)(9,s3e,2,4,"td",17),Z(),X(10,20),F(11,c3e,3,3,"th",16)(12,p3e,3,6,"td",17),Z(),X(13,21),F(14,m3e,3,3,"th",16)(15,d3e,3,6,"td",17),Z(),X(16,22),F(17,u3e,3,3,"th",16)(18,f3e,3,3,"td",17),Z(),F(19,h3e,1,0,"tr",23)(20,g3e,1,0,"tr",24),r()),e&2){let t=w();g("dataSource",t.chargeData.clientTransactionDatas),a(19),g("matHeaderRowDef",t.viewChargeTableColumns),a(),g("matRowDefColumns",t.viewChargeTableColumns)}}var f2=(()=>{class e{constructor(){this.route=T(Ie),this.router=T(qe),this.clientService=T(Oi),this.viewChargeTableColumns=["id","officeName","type","transactionDate","amount","actions"],this.route.data.subscribe(t=>{this.chargeData=t.clientChargeData})}waiveCharge(){let t={clientId:this.chargeData.clientId,resourceType:this.chargeData.id};this.clientService.waiveClientCharge(t).subscribe(()=>{this.getChargeData()})}undoTransaction(t){let n={clientId:this.chargeData.clientId.toString(),transactionId:t};this.clientService.undoTransaction(n).subscribe(()=>{this.getChargeData()})}getChargeData(){this.clientService.getSelectedChargeData(this.chargeData.clientId,this.chargeData.id).subscribe(t=>{this.chargeData=t})}deleteCharge(){this.clientService.deleteCharge(this.chargeData.clientId,this.chargeData.id).subscribe(()=>{this.router.navigate(["../../clients",this.chargeData.clientId,"general"])})}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275cmp=me({type:e,selectors:[["mifosx-view-charge"]],decls:77,vars:52,consts:[[1,"layout-row","align-end","gap-2px","responsive-column","container","m-b-20"],["mat-raised-button","","color","primary",3,"routerLink",4,"mifosxHasPermission"],["mat-raised-button","","color","primary",3,"click",4,"mifosxHasPermission"],["mat-raised-button","","color","primary",3,"click"],["icon","trash",1,"m-r-10"],[1,"container"],[1,"fa","fa-stop",3,"ngClass"],[1,"share-account-tables","p-t-20","layout-row-wrap","flex-50"],[1,"layout-row-wrap"],["mat-table","",3,"dataSource"],[1,"layout-row","align-center","gap-5px","responsive-column"],["type","button","mat-raised-button","",3,"routerLink"],["mat-raised-button","","color","primary",3,"routerLink"],["icon","dollar-sign",1,"m-r-10"],[1,"fa","fa-flag"],["matColumnDef","id"],["mat-header-cell","",4,"matHeaderCellDef"],["mat-cell","",3,"ngClass",4,"matCellDef"],["matColumnDef","officeName"],["matColumnDef","type"],["matColumnDef","transactionDate"],["matColumnDef","amount"],["matColumnDef","actions"],["mat-header-row","",4,"matHeaderRowDef"],["mat-row","",4,"matRowDef","matRowDefColumns"],["mat-header-cell",""],["mat-cell","",3,"ngClass"],["mat-raised-button","","color","primary",1,"del-btn",3,"click"],["mat-header-row",""],["mat-row",""]],template:function(n,i){n&1&&(l(0,"div",0),F(1,t3e,4,5,"button",1)(2,i3e,4,3,"button",2),l(3,"button",3),R("click",function(){return i.deleteCharge()}),b(4,"fa-icon",4),c(5),p(6,"translate"),r()(),l(7,"div",5)(8,"mat-card")(9,"mat-card-title"),b(10,"i",6),p(11,"statusLookup"),c(12),r(),b(13,"mat-divider"),l(14,"mat-card-content")(15,"div",7)(16,"table")(17,"tbody")(18,"tr")(19,"td"),c(20),p(21,"translate"),r(),l(22,"td"),c(23),r()(),l(24,"tr")(25,"td"),c(26),p(27,"translate"),r(),l(28,"td"),c(29),r()(),l(30,"tr")(31,"td"),c(32),p(33,"translate"),r(),l(34,"td"),c(35),r()(),l(36,"tr")(37,"td"),c(38),p(39,"translate"),r(),l(40,"td"),c(41),p(42,"dateFormat"),r()(),l(43,"tr")(44,"td"),c(45),p(46,"translate"),r(),l(47,"td"),c(48),r()(),l(49,"tr")(50,"td"),c(51),p(52,"translate"),r(),l(53,"td"),c(54),r()(),l(55,"tr")(56,"td"),c(57),p(58,"translate"),r(),l(59,"td"),c(60),r()(),l(61,"tr")(62,"td"),c(63),p(64,"translate"),r(),l(65,"td"),c(66),r()()()()()(),l(67,"div",8)(68,"h1")(69,"b"),c(70),p(71,"translate"),r()(),E(72,_3e,21,3,"table",9),r(),l(73,"mat-card-actions",10)(74,"button",11),c(75),p(76,"translate"),r()()()()),n&2&&(a(),g("mifosxHasPermission","PAY_CLIENTCHARGE"),a(),g("mifosxHasPermission","WAIVE_CLIENTCHARGE"),a(3),v(" ",m(6,25,"labels.buttons.Delete")," "),a(5),g("ngClass",m(11,27,!(i.chargeData.isWaived||i.chargeData.isPaid))),a(2),v(" ",i.chargeData.name," "),a(8),h(m(21,29,"labels.inputs.Currency")),a(3),h(i.chargeData.currency.name),a(3),h(m(27,31,"labels.inputs.Charge Time Type")),a(3),h(i.chargeData.chargeTimeType.value),a(3),h(m(33,33,"labels.inputs.Charge Calculation Type")),a(3),h(i.chargeData.chargeCalculationType.value),a(3),h(m(39,35,"labels.inputs.Due as of")),a(3),h(m(42,37,i.chargeData.dueDate)),a(4),h(m(46,39,"labels.inputs.Due")),a(3),h(i.chargeData.amount),a(3),h(m(52,41,"labels.inputs.Paid")),a(3),h(i.chargeData.amountPaid),a(3),h(m(58,43,"labels.inputs.Waived")),a(3),h(i.chargeData.amountWaived),a(3),h(m(64,45,"labels.inputs.Outstanding")),a(3),h(i.chargeData.amountOutstanding),a(4),v(" ",m(71,47,"labels.heading.Transactions")," "),a(2),I(i.chargeData.clientTransactionDatas?72:-1),a(2),g("routerLink",oe(51,Zye)),a(),v(" ",m(76,49,"labels.buttons.Back")," "))},dependencies:[ue,co,fe,Ae,$e,Je,Et,ve,Ke,ke,Qo,Ri,_t,xt,vt,bt,Ct,yt,St,Pt,wt,Tt,Pi,he,go,On],styles:[".del-btn[_ngcontent-%COMP%]{width:20px!important;height:25px;min-width:20px!important;line-height:0px;padding-left:10px;padding-right:25px}.strikeoff[_ngcontent-%COMP%]{color:red!important;text-decoration:line-through;text-decoration-style:double}.share-account-tables[_ngcontent-%COMP%]{display:flex;justify-content:space-between}.content[_ngcontent-%COMP%]{padding-top:10px}"]})}}return e})();var C3e=()=>["../../..","general"];function v3e(e,o){e&1&&(l(0,"mat-error"),c(1),p(2,"translate"),p(3,"translate"),l(4,"strong"),c(5),p(6,"translate"),r()()),e&2&&(a(),le(" ",m(2,3,"labels.inputs.Amount")," ",m(3,5,"labels.commons.is")," "),a(4),h(m(6,7,"labels.commons.required")))}function x3e(e,o){e&1&&(l(0,"mat-error"),c(1),p(2,"translate"),p(3,"translate"),l(4,"strong"),c(5),p(6,"translate"),r()()),e&2&&(a(),le(" ",m(2,3,"labels.inputs.Transaction date")," ",m(3,5,"labels.commons.is")," "),a(4),h(m(6,7,"labels.commons.required")))}var h2=(()=>{class e{constructor(){this.clientsService=T(Oi),this.formBuilder=T(nt),this.route=T(Ie),this.router=T(qe),this.dateUtils=T(Zt),this.settingsService=T(At),this.minDate=new Date(2e3,0,1),this.route.data.subscribe(t=>{this.transactionData=t.transactionData})}ngOnInit(){this.setTransactionForm()}setTransactionForm(){this.transactionForm=this.formBuilder.group({amount:[this.transactionData.amount,se.required],transactionDate:[new Date,se.required]})}submit(){let t=this.transactionForm.value,n=this.settingsService.language.code,i=this.settingsService.dateFormat,s=this.transactionForm.value.transactionDate;t.transactionDate instanceof Date&&(t.transactionDate=this.dateUtils.formatDate(s,i));let d=qt(at({},t),{dateFormat:i,locale:n});this.clientsService.payClientCharge(this.transactionData.clientId,this.transactionData.id,d).subscribe(()=>{this.router.navigate(["../../..","general"],{relativeTo:this.route})})}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275cmp=me({type:e,selectors:[["mifosx-client-pay-charges"]],decls:26,vars:21,consts:[["transactionDatePicker",""],[1,"container","mat-typography"],[3,"ngSubmit","formGroup"],[1,"layout-column"],["matInput","","required","","autofocus","","formControlName","amount"],[3,"click"],["matInput","","required","","formControlName","transactionDate",3,"min","matDatepicker"],["matSuffix","",3,"for"],[1,"layout-row","align-center","gap-5px"],["type","button","mat-raised-button","",3,"routerLink"],["mat-raised-button","","color","primary",3,"disabled"]],template:function(n,i){if(n&1){let s=Y();l(0,"div",1)(1,"mat-card")(2,"form",2),R("ngSubmit",function(){return V(s),q(i.submit())}),l(3,"div",3)(4,"mat-form-field")(5,"mat-label"),c(6),p(7,"translate"),r(),b(8,"input",4),E(9,v3e,7,9,"mat-error"),r(),l(10,"mat-form-field",5),R("click",function(){V(s);let u=xe(17);return q(u.open())}),l(11,"mat-label"),c(12),p(13,"translate"),r(),b(14,"input",6)(15,"mat-datepicker-toggle",7)(16,"mat-datepicker",null,0),E(18,x3e,7,9,"mat-error"),r()(),l(19,"div",8)(20,"button",9),c(21),p(22,"translate"),r(),l(23,"button",10),c(24),p(25,"translate"),r()()()()()}if(n&2){let s=xe(17);a(2),g("formGroup",i.transactionForm),a(4),v(" ",m(7,12,"labels.inputs.Amount")," "),a(3),I(i.transactionForm.controls.amount.hasError("required")?9:-1),a(3),v(" ",m(13,14,"labels.inputs.Transaction date")," "),a(2),g("min",i.minDate)("matDatepicker",s),a(),g("for",s),a(3),I(i.transactionForm.controls.transactionDate.hasError("required")?18:-1),a(2),g("routerLink",oe(20,C3e)),a(),v(" ",m(22,16,"labels.buttons.Cancel")," "),a(2),g("disabled",!i.transactionForm.valid),a(),v(" ",m(25,18,"labels.buttons.Submit")," ")}},dependencies:[ue,fe,tt,st,Ue,Xe,dt,Ze,et,Ae,$e,Fe,Be,ut,ai,ze,mi,di,pi,ve,he],styles:[".container[_ngcontent-%COMP%]{max-width:37rem}"]})}}return e})();var HM=()=>["Date of Birth","Incorporation Date"],b3e=()=>["../general"],GM=()=>["Name","Entity Name"];function y3e(e,o){if(e&1&&(l(0,"mat-option",9),c(1),r()),e&2){let t=o.$implicit;g("value",t.id),a(),v(" ",t.name," ")}}function S3e(e,o){e&1&&(l(0,"mat-error"),c(1),p(2,"translate"),p(3,"translate"),l(4,"strong"),c(5),p(6,"translate"),r()()),e&2&&(a(),le(" ",m(2,3,"labels.inputs.Office")," ",m(3,5,"labels.commons.is")," "),a(4),h(m(6,7,"labels.commons.required")))}function w3e(e,o){if(e&1&&(l(0,"mat-option",9),c(1),r()),e&2){let t=o.$implicit;g("value",t.id),a(),v(" ",t.value," ")}}function P3e(e,o){e&1&&(l(0,"mat-error"),c(1),p(2,"translate"),p(3,"translate"),l(4,"strong"),c(5),p(6,"translate"),r()()),e&2&&(a(),le(" ",m(2,3,"labels.inputs.Client name")," ",m(3,5,"labels.commons.is")," "),a(4),h(m(6,7,"labels.commons.required")))}function T3e(e,o){if(e&1&&(l(0,"mat-form-field",13)(1,"mat-label"),c(2),p(3,"translate"),r(),b(4,"input",32),p(5,"translate"),p(6,"translate"),E(7,P3e,7,9,"mat-error"),r()),e&2){let t=w();a(2),h(m(3,4,"labels.inputs."+t.getDateLabel(t.legalFormId,oe(10,GM)))),a(2),g("placeholder",m(5,6,"labels.inputs."+t.getDateLabel(t.legalFormId,oe(11,GM))))("title",m(6,8,"labels.inputs."+t.getDateLabel(t.legalFormId,oe(12,GM)))),a(3),I(t.editClientForm.controls.fullname.hasError("required")?7:-1)}}function M3e(e,o){e&1&&(l(0,"mat-error"),c(1),p(2,"translate"),p(3,"translate"),l(4,"strong"),c(5),p(6,"translate"),r()()),e&2&&(a(),le(" ",m(2,3,"labels.inputs.Client first name")," ",m(3,5,"labels.commons.is")," "),a(4),h(m(6,7,"labels.commons.required")))}function D3e(e,o){if(e&1&&(l(0,"mat-form-field",14)(1,"mat-label"),c(2),p(3,"translate"),r(),b(4,"input",33),p(5,"translate"),p(6,"translate"),E(7,M3e,7,9,"mat-error"),r()),e&2){let t=w();a(2),h(m(3,4,"labels.inputs.First Name")),a(2),g("placeholder",m(5,6,"labels.inputs.First Name"))("title",m(6,8,"labels.inputs.First Name")),a(3),I(t.editClientForm.controls.firstname.hasError("required")?7:-1)}}function E3e(e,o){e&1&&(l(0,"mat-form-field",14)(1,"mat-label"),c(2),p(3,"translate"),r(),b(4,"input",34),p(5,"translate"),p(6,"translate"),r()),e&2&&(a(2),h(m(3,3,"labels.inputs.Middle Name")),a(2),g("placeholder",m(5,5,"labels.inputs.Middle Name"))("title",m(6,7,"labels.inputs.Middle Name")))}function I3e(e,o){e&1&&(l(0,"mat-error"),c(1),p(2,"translate"),p(3,"translate"),l(4,"strong"),c(5),p(6,"translate"),r()()),e&2&&(a(),le(" ",m(2,3,"labels.inputs.Client last name")," ",m(3,5,"labels.commons.is")," "),a(4),h(m(6,7,"labels.commons.required")))}function O3e(e,o){if(e&1&&(l(0,"mat-form-field",14)(1,"mat-label"),c(2),p(3,"translate"),r(),b(4,"input",35),p(5,"translate"),p(6,"translate"),E(7,I3e,7,9,"mat-error"),r()),e&2){let t=w();a(2),h(m(3,4,"labels.inputs.Last Name")),a(2),g("placeholder",m(5,6,"labels.inputs.Last Name"))("title",m(6,8,"labels.inputs.Last Name")),a(3),I(t.editClientForm.controls.lastname.hasError("required")?7:-1)}}function A3e(e,o){if(e&1&&(l(0,"mat-option",9),c(1),r()),e&2){let t=o.$implicit;g("value",t.id),a(),v(" ",t.name," ")}}function F3e(e,o){if(e&1&&(l(0,"mat-form-field",13)(1,"mat-label"),c(2),p(3,"translate"),r(),l(4,"mat-select",36),Se(5,A3e,2,2,"mat-option",9,Pe),r()()),e&2){let t=w();a(2),h(m(3,1,"labels.inputs.Gender")),a(3),we(t.genderOptions)}}function k3e(e,o){if(e&1&&(l(0,"mat-option",9),c(1),r()),e&2){let t=o.$implicit;g("value",t.id),a(),v(" ",t.displayName," ")}}function B3e(e,o){e&1&&(l(0,"mat-checkbox",21),c(1),p(2,"translate"),r()),e&2&&(a(),v(" ",m(2,1,"labels.inputs.Is staff"),"? "))}function R3e(e,o){if(e&1&&(l(0,"mat-option",9),c(1),r()),e&2){let t=o.$implicit;g("value",t.id),a(),v(" ",t.name," ")}}function N3e(e,o){if(e&1&&(l(0,"mat-option",9),c(1),r()),e&2){let t=o.$implicit;g("value",t.id),a(),v(" ",t.name," ")}}function L3e(e,o){if(e&1){let t=Y();l(0,"div",22)(1,"mat-form-field",13)(2,"mat-label"),c(3),p(4,"translate"),r(),l(5,"mat-select",37),Se(6,R3e,2,2,"mat-option",9,Pe),r()(),l(8,"mat-form-field",13)(9,"mat-label"),c(10),p(11,"translate"),r(),l(12,"mat-select",38),Se(13,N3e,2,2,"mat-option",9,Pe),r()(),l(15,"mat-form-field",16),R("click",function(){V(t);let i=xe(24);return q(i.open())}),l(16,"mat-label"),c(17),p(18,"translate"),r(),b(19,"input",39),p(20,"translate"),p(21,"translate"),b(22,"mat-datepicker-toggle",18)(23,"mat-datepicker",null,3),r(),l(25,"mat-form-field",13)(26,"mat-label"),c(27),p(28,"translate"),r(),b(29,"input",40),p(30,"translate"),p(31,"translate"),r(),l(32,"mat-form-field",41)(33,"mat-label"),c(34),p(35,"translate"),r(),b(36,"textarea",42),p(37,"translate"),p(38,"translate"),r()()}if(e&2){let t=xe(24),n=w();a(3),h(m(4,15,"labels.inputs.Constitution")),a(3),we(n.constitutionOptions),a(4),h(m(11,17,"labels.inputs.Main Business Line")),a(3),we(n.businessLineOptions),a(4),h(m(18,19,"labels.inputs.Incorporation Validity Till Date")),a(2),g("placeholder",m(20,21,"labels.inputs.Incorporation Validity Till Date"))("title",m(21,23,"labels.inputs.Incorporation Validity Till Date"))("min",n.minDate)("max",n.maxDate)("matDatepicker",t),a(3),g("for",t),a(5),h(m(28,25,"labels.inputs.Incorporation No")),a(2),g("placeholder",m(30,27,"labels.inputs.Incorporation No"))("title",m(31,29,"labels.inputs.Incorporation No")),a(5),h(m(35,31,"labels.inputs.Remarks")),a(2),g("placeholder",m(37,33,"labels.inputs.Remarks"))("title",m(38,35,"labels.inputs.Remarks"))}}function V3e(e,o){e&1&&(l(0,"mat-error"),c(1," Email not valid "),r())}function q3e(e,o){if(e&1&&(l(0,"mat-option",9),c(1),r()),e&2){let t=o.$implicit;g("value",t.id),a(),v(" ",t.name," ")}}function z3e(e,o){if(e&1&&(l(0,"mat-option",9),c(1),r()),e&2){let t=o.$implicit;g("value",t.id),a(),v(" ",t.name," ")}}function H3e(e,o){e&1&&(l(0,"mat-error"),c(1),p(2,"translate"),p(3,"translate"),l(4,"strong"),c(5),p(6,"translate"),r()()),e&2&&(a(),le(" ",m(2,3,"labels.inputs.Submitted Date")," ",m(3,5,"labels.commons.is")," "),a(4),h(m(6,7,"labels.commons.required")))}var g2=(()=>{class e{constructor(){this.formBuilder=T(nt),this.route=T(Ie),this.router=T(qe),this.clientsService=T(Oi),this.dateUtils=T(Zt),this.settingsService=T(At),this.minDate=new Date(2e3,0,1),this.maxDate=new Date,this.legalFormId=1,this.route.data.subscribe(t=>{this.clientDataAndTemplate=t.clientDataAndTemplate})}ngOnInit(){this.maxDate=this.settingsService.businessDate,this.createEditClientForm(),this.setOptions(),this.buildDependencies(),this.legalFormId=1,this.editClientForm.patchValue({officeId:this.clientDataAndTemplate.officeId,staffId:this.clientDataAndTemplate.staffId,legalFormId:this.clientDataAndTemplate.legalForm&&this.clientDataAndTemplate.legalForm.id,accountNo:this.clientDataAndTemplate.accountNo,externalId:this.clientDataAndTemplate.externalId,genderId:this.clientDataAndTemplate.gender&&this.clientDataAndTemplate.gender.id,isStaff:this.clientDataAndTemplate.isStaff,active:this.clientDataAndTemplate.active,mobileNo:this.clientDataAndTemplate.mobileNo,emailAddress:this.clientDataAndTemplate.emailAddress,dateOfBirth:this.clientDataAndTemplate.dateOfBirth&&new Date(this.clientDataAndTemplate.dateOfBirth),clientTypeId:this.clientDataAndTemplate.clientType&&this.clientDataAndTemplate.clientType.id,clientClassificationId:this.clientDataAndTemplate.clientClassification&&this.clientDataAndTemplate.clientClassification.id,submittedOnDate:this.clientDataAndTemplate.timeline.submittedOnDate&&new Date(this.clientDataAndTemplate.timeline.submittedOnDate),activationDate:this.clientDataAndTemplate.timeline.activatedOnDate&&new Date(this.clientDataAndTemplate.timeline.activatedOnDate)}),this.clientDataAndTemplate.legalForm&&(this.legalFormId=this.clientDataAndTemplate.legalForm.id)}createEditClientForm(){this.editClientForm=this.formBuilder.group({officeId:[{value:"",disabled:!0}],staffId:[""],legalFormId:[{value:"",disabled:!0}],isStaff:[!1],active:[!1],accountNo:[{value:"",disabled:!0}],externalId:[""],genderId:[""],mobileNo:[""],emailAddress:["",se.email],dateOfBirth:[""],clientTypeId:[""],clientClassificationId:[""],submittedOnDate:["",se.required],activationDate:[""]})}setOptions(){this.officeOptions=this.clientDataAndTemplate.officeOptions,this.staffOptions=this.clientDataAndTemplate.staffOptions,this.legalFormOptions=this.clientDataAndTemplate.clientLegalFormOptions,this.clientTypeOptions=this.clientDataAndTemplate.clientTypeOptions,this.clientClassificationTypeOptions=this.clientDataAndTemplate.clientClassificationOptions,this.businessLineOptions=this.clientDataAndTemplate.clientNonPersonMainBusinessLineOptions,this.constitutionOptions=this.clientDataAndTemplate.clientNonPersonConstitutionOptions,this.genderOptions=this.clientDataAndTemplate.genderOptions}buildDependencies(){this.editClientForm.get("legalFormId").valueChanges.subscribe(t=>{t===1?(this.editClientForm.removeControl("fullname"),this.editClientForm.removeControl("clientNonPersonDetails"),this.editClientForm.addControl("firstname",new it(this.clientDataAndTemplate.firstname,se.required)),this.editClientForm.addControl("middlename",new it(this.clientDataAndTemplate.middlename)),this.editClientForm.addControl("lastname",new it(this.clientDataAndTemplate.lastname,se.required))):(this.editClientForm.removeControl("firstname"),this.editClientForm.removeControl("middlename"),this.editClientForm.removeControl("lastname"),this.editClientForm.addControl("fullname",new it(this.clientDataAndTemplate.fullname,se.required)),this.editClientForm.addControl("clientNonPersonDetails",this.formBuilder.group({constitutionId:[this.clientDataAndTemplate.clientNonPersonDetails.constitution&&this.clientDataAndTemplate.clientNonPersonDetails.constitution.id,se.required],incorpValidityTillDate:[this.clientDataAndTemplate.clientNonPersonDetails.incorpValidityTillDate&&new Date(this.clientDataAndTemplate.clientNonPersonDetails.incorpValidityTillDate)],incorpNumber:[this.clientDataAndTemplate.clientNonPersonDetails.incorpNumber],mainBusinessLineId:[this.clientDataAndTemplate.clientNonPersonDetails.mainBusinessLine&&this.clientDataAndTemplate.clientNonPersonDetails.mainBusinessLine.id],remarks:[this.clientDataAndTemplate.clientNonPersonDetails.remarks]})))})}getDateLabel(t,n){return t===1?n[0]:n[1]}submit(){let t=this.settingsService.language.code,n=this.settingsService.dateFormat,i=this.editClientForm.getRawValue(),s=qt(at({},i),{dateOfBirth:i.dateOfBirth&&this.dateUtils.formatDate(i.dateOfBirth,n),submittedOnDate:i.submittedOnDate&&this.dateUtils.formatDate(i.submittedOnDate,n),activationDate:this.dateUtils.formatDate(i.activationDate,n),dateFormat:n,locale:t});delete s.officeId,i.clientNonPersonDetails?s.clientNonPersonDetails=qt(at({},i.clientNonPersonDetails),{incorpValidityTillDate:i.clientNonPersonDetails.incorpValidityTillDate&&this.dateUtils.formatDate(i.clientNonPersonDetails.incorpValidityTillDate,n),dateFormat:n,locale:t}):s.clientNonPersonDetails={},this.clientsService.updateClient(this.clientDataAndTemplate.id,s).subscribe(()=>{this.router.navigate(["../"],{relativeTo:this.route})})}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275cmp=me({type:e,selectors:[["mifosx-edit-client"]],decls:122,vars:112,consts:[["dateOfBirthDatePicker",""],["submittedOnDatePicker",""],["activatedOnDatePicker",""],["incorpValidityTillDateDatePicker",""],[1,"container"],[3,"formGroup"],[1,"responsive-row"],[1,"flex-24"],["required","","formControlName","officeId"],[3,"value"],["formControlName","legalFormId"],["matInput","","formControlName","accountNo","placeholder","Account No","title","Account No",3,"placeholder","title"],["matInput","","formControlName","externalId","placeholder","External Id","title","External Id",3,"placeholder","title"],[1,"flex-48"],[1,"flex-32"],[1,"section-divider"],[1,"flex-48",3,"click"],["matInput","","formControlName","dateOfBirth","placeholder","Date of Birth","title","Date of Birth",3,"max","matDatepicker","placeholder","title"],["matSuffix","",3,"for"],[1,"responsive-row","align-center"],["formControlName","staffId"],["labelPosition","before","formControlName","isStaff",1,"flex-48","margin-v"],["formGroupName","clientNonPersonDetails",1,"flex-100","layout-row-wrap","gap-2percent","column-on-small"],["matInput","","type","text","formControlName","mobileNo","placeholder","Mobile No","title","Mobile No",3,"placeholder","title"],["matInput","","formControlName","emailAddress","placeholder","Email Address","title","Email Address",3,"placeholder","title"],["formControlName","clientTypeId"],["formControlName","clientClassificationId"],["placeholder","Submitted On","title","Submitted On","matInput","","formControlName","submittedOnDate","required","",3,"placeholder","title","min","max","matDatepicker"],["placeholder","Activated On","title","Activated On","matInput","","formControlName","activationDate",3,"placeholder","title","min","max","matDatepicker"],[1,"button-container"],["type","button","mat-raised-button","",3,"routerLink"],["type","submit","mat-raised-button","","color","primary",3,"click","disabled"],["matInput","","required","","formControlName","fullname","placeholder","Full Name","title","Full Name",3,"placeholder","title"],["matInput","","required","","formControlName","firstname","placeholder","First Name","title","First Name",3,"placeholder","title"],["matInput","","formControlName","middlename","placeholder","Middle Name","title","Middle Name",3,"placeholder","title"],["matInput","","required","","formControlName","lastname","placeholder","Last Name","title","Last Name",3,"placeholder","title"],["formControlName","genderId"],["formControlName","constitutionId","required",""],["formControlName","mainBusinessLineId"],["placeholder","Incorporation Validity Till Date","title","Incorporation Validity Till Date","matInput","","formControlName","incorpValidityTillDate",3,"placeholder","title","min","max","matDatepicker"],["matInput","","formControlName","incorpNumber","placeholder","Incorporation No","title","Incorporation No",3,"placeholder","title"],[1,"flex-98"],["matInput","","formControlName","remarks","cdkTextareaAutosize","","cdkAutosizeMinRows","2","placeholder","Remarks","title","Remarks",3,"placeholder","title"]],template:function(n,i){if(n&1){let s=Y();l(0,"div",4)(1,"mat-card")(2,"form",5)(3,"mat-card-content")(4,"div",6)(5,"mat-form-field",7)(6,"mat-label"),c(7),p(8,"translate"),r(),l(9,"mat-select",8),Se(10,y3e,2,2,"mat-option",9,Pe),r(),E(12,S3e,7,9,"mat-error"),r(),l(13,"mat-form-field",7)(14,"mat-label"),c(15),p(16,"translate"),r(),l(17,"mat-select",10),Se(18,w3e,2,2,"mat-option",9,Pe),r()(),l(20,"mat-form-field",7)(21,"mat-label"),c(22),p(23,"translate"),r(),b(24,"input",11),p(25,"translate"),p(26,"translate"),r(),l(27,"mat-form-field",7)(28,"mat-label"),c(29),p(30,"translate"),r(),b(31,"input",12),p(32,"translate"),p(33,"translate"),r()(),l(34,"div",6),E(35,T3e,8,13,"mat-form-field",13),E(36,D3e,8,10,"mat-form-field",14),E(37,E3e,7,9,"mat-form-field",14),E(38,O3e,8,10,"mat-form-field",14),r(),b(39,"mat-divider",15),l(40,"div",6)(41,"mat-form-field",16),R("click",function(){V(s);let u=xe(50);return q(u.open())}),l(42,"mat-label"),c(43),p(44,"translate"),r(),b(45,"input",17),p(46,"translate"),p(47,"translate"),b(48,"mat-datepicker-toggle",18)(49,"mat-datepicker",null,0),r(),E(51,F3e,7,3,"mat-form-field",13),r(),l(52,"div",19)(53,"mat-form-field",13)(54,"mat-label"),c(55),p(56,"translate"),r(),l(57,"mat-select",20),Se(58,k3e,2,2,"mat-option",9,Pe),r()(),E(60,B3e,3,3,"mat-checkbox",21),r(),E(61,L3e,39,37,"div",22),l(62,"div",6)(63,"mat-form-field",13)(64,"mat-label"),c(65),p(66,"translate"),r(),b(67,"input",23),p(68,"translate"),p(69,"translate"),r(),l(70,"mat-form-field",13)(71,"mat-label"),c(72),p(73,"translate"),r(),b(74,"input",24),p(75,"translate"),p(76,"translate"),E(77,V3e,2,0,"mat-error"),r()(),l(78,"div",6)(79,"mat-form-field",13)(80,"mat-label"),c(81),p(82,"translate"),r(),l(83,"mat-select",25),Se(84,q3e,2,2,"mat-option",9,Pe),r()(),l(86,"mat-form-field",13)(87,"mat-label"),c(88),p(89,"translate"),r(),l(90,"mat-select",26),Se(91,z3e,2,2,"mat-option",9,Pe),r()()(),l(93,"div",6)(94,"mat-form-field",16),R("click",function(){V(s);let u=xe(103);return q(u.open())}),l(95,"mat-label"),c(96),p(97,"translate"),r(),b(98,"input",27),p(99,"translate"),p(100,"translate"),b(101,"mat-datepicker-toggle",18)(102,"mat-datepicker",null,1),E(104,H3e,7,9,"mat-error"),r(),l(105,"mat-form-field",16),R("click",function(){V(s);let u=xe(114);return q(u.open())}),l(106,"mat-label"),c(107),p(108,"translate"),r(),b(109,"input",28),p(110,"translate"),p(111,"translate"),b(112,"mat-datepicker-toggle",18)(113,"mat-datepicker",null,2),r()()(),l(115,"mat-card-actions",29)(116,"button",30),c(117),p(118,"translate"),r(),l(119,"button",31),R("click",function(){return V(s),q(i.submit())}),c(120),p(121,"translate"),r()()()()()}if(n&2){let s=xe(50),d=xe(103),u=xe(114);a(2),g("formGroup",i.editClientForm),a(5),h(m(8,52,"labels.inputs.Office")),a(3),we(i.officeOptions),a(2),I(i.editClientForm.controls.officeId.hasError("required")?12:-1),a(3),h(m(16,54,"labels.inputs.Legal Form")),a(3),we(i.legalFormOptions),a(4),h(m(23,56,"labels.inputs.Account No")),a(2),g("placeholder",m(25,58,"labels.inputs.Account No"))("title",m(26,60,"labels.inputs.Account No")),a(5),h(m(30,62,"labels.inputs.External Id")),a(2),g("placeholder",m(32,64,"labels.inputs.External Id"))("title",m(33,66,"labels.inputs.External Id")),a(4),I(i.editClientForm.contains("fullname")?35:-1),a(),I(i.editClientForm.contains("firstname")?36:-1),a(),I(i.editClientForm.contains("middlename")?37:-1),a(),I(i.editClientForm.contains("lastname")?38:-1),a(5),h(m(44,68,"labels.inputs."+i.getDateLabel(i.legalFormId,oe(108,HM)))),a(2),g("max",i.maxDate)("matDatepicker",s)("placeholder",m(46,70,"labels.inputs."+i.getDateLabel(i.legalFormId,oe(109,HM))))("title",m(47,72,"labels.inputs."+i.getDateLabel(i.legalFormId,oe(110,HM)))),a(3),g("for",s),a(3),I(i.legalFormId===1?51:-1),a(4),h(m(56,74,"labels.inputs.Staff")),a(3),we(i.staffOptions),a(2),I(i.legalFormId===1?60:-1),a(),I(i.editClientForm.contains("clientNonPersonDetails")?61:-1),a(4),h(m(66,76,"labels.inputs.Mobile No")),a(2),g("placeholder",m(68,78,"labels.inputs.Mobile No"))("title",m(69,80,"labels.inputs.Mobile No")),a(5),h(m(73,82,"labels.inputs.Email Address")),a(2),g("placeholder",m(75,84,"labels.inputs.Email Address"))("title",m(76,86,"labels.inputs.Email Address")),a(3),I(i.editClientForm.controls.emailAddress.errors!=null&&i.editClientForm.controls.emailAddress.errors.email?77:-1),a(4),h(m(82,88,"labels.inputs.Client Type")),a(3),we(i.clientTypeOptions),a(4),h(m(89,90,"labels.inputs.Client Classification")),a(3),we(i.clientClassificationTypeOptions),a(5),h(m(97,92,"labels.inputs.Submitted On")),a(2),g("placeholder",m(99,94,"labels.inputs.Submitted On"))("title",m(100,96,"labels.inputs.Submitted On"))("min",i.minDate)("max",i.maxDate)("matDatepicker",d),a(3),g("for",d),a(3),I(i.editClientForm.controls.submittedOnDate.hasError("required")?104:-1),a(3),h(m(108,98,"labels.inputs.Activated On")),a(2),g("placeholder",m(110,100,"labels.inputs.Activated On"))("title",m(111,102,"labels.inputs.Activated On"))("min",i.editClientForm.value.submittedOnDate)("max",i.maxDate)("matDatepicker",u),a(3),g("for",u),a(4),g("routerLink",oe(111,b3e)),a(),v(" ",m(118,104,"labels.buttons.Cancel")," "),a(2),g("disabled",!i.editClientForm.valid),a(),v(" ",m(121,106,"labels.buttons.Submit")," ")}},dependencies:[ue,fe,tt,st,Ue,Xe,dt,Ze,et,la,Ae,$e,Je,Et,Fe,Be,ut,ai,ze,gt,ft,mi,di,pi,ve,fi,Ri,Ln,he],styles:[".margin-v[_ngcontent-%COMP%]{margin:2em 0 0}.flex-32[_ngcontent-%COMP%]{flex:0 1 32%;max-width:32%}.gap-2percent[_ngcontent-%COMP%]{gap:2%}.align-center[_ngcontent-%COMP%]{align-items:center}.container[_ngcontent-%COMP%]{margin:24px auto;max-width:1200px;width:100%;padding:0 24px;box-sizing:border-box}[_nghost-%COMP%] .mat-card{padding:32px;margin:16px 0;border-radius:12px;box-shadow:0 4px 12px #0000001a}[_nghost-%COMP%] .mat-card-content{padding:0}.flex-24[_ngcontent-%COMP%]{flex:0 1 calc(25% - 15px);max-width:calc(25% - 15px);margin-right:0}.flex-48[_ngcontent-%COMP%]{flex:0 1 calc(50% - 10px);max-width:calc(50% - 10px);margin-right:0}.responsive-row[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;gap:20px;margin-bottom:24px;align-items:flex-start}.responsive-row[_ngcontent-%COMP%]:last-child{margin-bottom:0}[_nghost-%COMP%] .mat-form-field{margin-bottom:16px;width:100%}[_nghost-%COMP%] .mat-form-field:last-child{margin-right:0}[_nghost-%COMP%] .responsive-row .mat-form-field{min-height:56px}[_nghost-%COMP%] .responsive-row .mat-form-field .mat-form-field-wrapper{padding-bottom:1.3438em}[_nghost-%COMP%] .mat-form-field-appearance-outline .mat-form-field-outline{color:#0000001f}[_nghost-%COMP%] .mat-form-field-appearance-outline .mat-form-field-outline-thick{color:#3f51b5}[_nghost-%COMP%] .mat-form-field.mat-form-field-invalid .mat-form-field-outline-thick{color:#f44336;opacity:1}[_nghost-%COMP%] .mat-error{font-size:12px;margin-top:4px}.section-divider[_ngcontent-%COMP%]{margin:32px 0 24px;border-color:#0000001f}[_nghost-%COMP%] .mat-checkbox{margin:20px 0}[_nghost-%COMP%] mat-card-actions{display:flex;justify-content:center;gap:20px;padding:24px 0;margin-top:32px;border-top:1px solid rgba(0,0,0,.12);width:100%}[_nghost-%COMP%] mat-card-actions button{min-width:100px;height:36px;padding:0 20px;border-radius:4px;font-weight:500;text-transform:none;letter-spacing:.3px;font-size:13px;margin:0}@media (width <= 1024px){.flex-24[_ngcontent-%COMP%]{flex:0 1 calc(50% - 10px);max-width:calc(50% - 10px)}.flex-48[_ngcontent-%COMP%]{flex:0 1 100%;max-width:100%}}@media (width <= 768px){.flex-32[_ngcontent-%COMP%], .flex-24[_ngcontent-%COMP%], .flex-48[_ngcontent-%COMP%]{flex:0 1 100%;max-width:100%}.container[_ngcontent-%COMP%]{margin:16px;padding:0 16px}[_nghost-%COMP%] .mat-card{padding:20px}.responsive-row[_ngcontent-%COMP%]{gap:12px;margin-bottom:16px}.responsive-row[_ngcontent-%COMP%] .mat-form-field[_ngcontent-%COMP%]{flex:1 1 100%;max-width:100%;margin-right:0}}@media (width <= 600px){[_nghost-%COMP%] mat-card-actions{flex-direction:column;gap:12px}[_nghost-%COMP%] mat-card-actions button{width:100%;margin:0}}@media (width <= 480px){[_nghost-%COMP%] .mat-card{padding:16px;margin:8px 0}.responsive-row[_ngcontent-%COMP%]{gap:8px;margin-bottom:12px}.container[_ngcontent-%COMP%]{padding:0 12px}}[_nghost-%COMP%]{display:block;width:100%}[_nghost-%COMP%] form{width:100%}[_nghost-%COMP%] .mat-datepicker-toggle{color:#0000008a}[_nghost-%COMP%] .mat-select-panel{max-height:256px}"]})}}return e})();var G3e=()=>["Date of Birth","Incorporation Date"],j3e=()=>["Name","Entity Name"];function $3e(e,o){if(e&1&&(l(0,"mat-option",8),c(1),r()),e&2){let t=o.$implicit;g("value",t.id),a(),v(" ",t.name," ")}}function U3e(e,o){e&1&&(l(0,"mat-error"),c(1),p(2,"translate"),p(3,"translate"),l(4,"strong"),c(5),p(6,"translate"),r()()),e&2&&(a(),le(" ",m(2,3,"labels.inputs.Office")," ",m(3,5,"labels.commons.is")," "),a(4),h(m(6,7,"labels.commons.required")))}function W3e(e,o){if(e&1&&(l(0,"mat-option",8),c(1),p(2,"translateKey"),r()),e&2){let t=o.$implicit;g("value",t.id),a(),v(" ",Ot(2,2,t.value,"inputs")," ")}}function Q3e(e,o){e&1&&(l(0,"mat-error"),c(1),p(2,"translate"),p(3,"translate"),l(4,"strong"),c(5),p(6,"translate"),r()()),e&2&&(a(),le(" ",m(2,3,"labels.inputs.Client name")," ",m(3,5,"labels.commons.is")," "),a(4),h(m(6,7,"labels.commons.required")))}function Y3e(e,o){e&1&&(l(0,"mat-error"),c(1),p(2,"translate"),l(3,"strong"),c(4),p(5,"translate"),r(),c(6),p(7,"translate"),r()),e&2&&(a(),v(" ",m(2,3,"labels.inputs.Client name")," "),a(3),h(m(5,5,"labels.inputs.cannot")),a(2),v(" ",m(7,7,"labels.commons.begin with a special character or number")," "))}function J3e(e,o){if(e&1&&(l(0,"mat-form-field",11)(1,"mat-label"),c(2),p(3,"translate"),r(),b(4,"input",32),E(5,Q3e,7,9,"mat-error"),E(6,Y3e,8,9,"mat-error"),r()),e&2){let t=w();a(2),v(" ",m(3,3,"labels.inputs."+t.getDateLabel(t.createClientForm.value.legalFormId,oe(5,j3e)))," "),a(3),I(t.createClientForm.controls.fullname.hasError("required")?5:-1),a(),I(t.createClientForm.controls.fullname.hasError("pattern")?6:-1)}}function K3e(e,o){e&1&&(l(0,"mat-error"),c(1),p(2,"translate"),p(3,"translate"),l(4,"strong"),c(5),p(6,"translate"),r()()),e&2&&(a(),le(" ",m(2,3,"labels.inputs.Client first name")," ",m(3,5,"labels.commons.is")," "),a(4),h(m(6,7,"labels.commons.required")))}function X3e(e,o){e&1&&(l(0,"mat-error"),c(1),p(2,"translate"),l(3,"strong"),c(4),p(5,"translate"),r(),c(6),p(7,"translate"),r()),e&2&&(a(),v(" ",m(2,3,"labels.inputs.Client first name")," "),a(3),h(m(5,5,"labels.inputs.cannot")),a(2),v(" ",m(7,7,"labels.commons.begin with a special character or number")," "))}function Z3e(e,o){if(e&1&&(l(0,"mat-form-field",33)(1,"mat-label"),c(2),p(3,"translate"),r(),b(4,"input",36),E(5,K3e,7,9,"mat-error"),E(6,X3e,8,9,"mat-error"),r()),e&2){let t=w(2);a(2),h(m(3,3,"labels.inputs.First Name")),a(3),I(t.createClientForm.controls.firstname.hasError("required")?5:-1),a(),I(t.createClientForm.controls.firstname.hasError("pattern")?6:-1)}}function eSe(e,o){e&1&&(l(0,"mat-error"),c(1),p(2,"translate"),l(3,"strong"),c(4),p(5,"translate"),r(),c(6),p(7,"translate"),r()),e&2&&(a(),v(" ",m(2,3,"labels.inputs.Client middle name")," "),a(3),h(m(5,5,"labels.inputs.cannot")),a(2),v(" ",m(7,7,"labels.commons.begin with a special character or number")," "))}function tSe(e,o){if(e&1&&(l(0,"mat-form-field",34)(1,"mat-label"),c(2),p(3,"translate"),r(),b(4,"input",37),E(5,eSe,8,9,"mat-error"),r()),e&2){let t=w(2);a(2),h(m(3,2,"labels.inputs.Middle Name")),a(3),I(t.createClientForm.controls.middlename.hasError("pattern")?5:-1)}}function iSe(e,o){e&1&&(l(0,"mat-error"),c(1),p(2,"translate"),p(3,"translate"),l(4,"strong"),c(5),p(6,"translate"),r()()),e&2&&(a(),le(" ",m(2,3,"labels.inputs.Client last name")," ",m(3,5,"labels.commons.is")," "),a(4),h(m(6,7,"labels.commons.required")))}function nSe(e,o){e&1&&(l(0,"mat-error"),c(1),p(2,"translate"),l(3,"strong"),c(4),p(5,"translate"),r(),c(6),p(7,"translate"),r()),e&2&&(a(),v(" ",m(2,3,"labels.inputs.Client last name")," "),a(3),h(m(5,5,"labels.inputs.cannot")),a(2),v(" ",m(7,7,"labels.commons.begin with a special character or number")," "))}function oSe(e,o){if(e&1&&(l(0,"mat-form-field",35)(1,"mat-label"),c(2),p(3,"translate"),r(),b(4,"input",38),E(5,iSe,7,9,"mat-error"),E(6,nSe,8,9,"mat-error"),r()),e&2){let t=w(2);a(2),h(m(3,3,"labels.inputs.Last Name")),a(3),I(t.createClientForm.controls.lastname.hasError("required")?5:-1),a(),I(t.createClientForm.controls.lastname.hasError("pattern")?6:-1)}}function aSe(e,o){if(e&1&&(l(0,"div",12),E(1,Z3e,7,5,"mat-form-field",33),E(2,tSe,6,4,"mat-form-field",34),E(3,oSe,7,5,"mat-form-field",35),r()),e&2){let t=w();a(),I(t.createClientForm.contains("firstname")?1:-1),a(),I(t.createClientForm.contains("middlename")?2:-1),a(),I(t.createClientForm.contains("lastname")?3:-1)}}function rSe(e,o){if(e&1&&(l(0,"mat-option",8),c(1),r()),e&2){let t=o.$implicit;g("value",t.id),a(),v(" ",t.name," ")}}function lSe(e,o){if(e&1&&(l(0,"mat-option",8),c(1),r()),e&2){let t=o.$implicit;g("value",t.id),a(),v(" ",t.name," ")}}function sSe(e,o){if(e&1){let t=Y();l(0,"div",16)(1,"mat-form-field",11)(2,"mat-label"),c(3),p(4,"translate"),r(),l(5,"mat-select",39),Se(6,rSe,2,2,"mat-option",8,Pe),r()(),l(8,"mat-form-field",11)(9,"mat-label"),c(10),p(11,"translate"),r(),l(12,"mat-select",40),Se(13,lSe,2,2,"mat-option",8,Pe),r()(),l(15,"mat-form-field",13),R("click",function(){V(t);let i=xe(22);return q(i.open())}),l(16,"mat-label"),c(17),p(18,"translate"),r(),b(19,"input",41)(20,"mat-datepicker-toggle",15)(21,"mat-datepicker",null,2),r(),l(23,"mat-form-field",11)(24,"mat-label"),c(25),p(26,"translate"),r(),b(27,"input",42),r(),l(28,"mat-form-field",19)(29,"mat-label"),c(30),p(31,"translate"),r(),b(32,"textarea",43),r()()}if(e&2){let t=xe(22),n=w();a(3),h(m(4,9,"labels.inputs.Constitution")),a(3),we(n.constitutionOptions),a(4),h(m(11,11,"labels.inputs.Main Business Line")),a(3),we(n.businessLineOptions),a(4),h(m(18,13,"labels.inputs.Incorporation Validity Till Date")),a(2),g("min",n.minDate)("max",n.maxDate)("matDatepicker",t),a(),g("for",t),a(5),h(m(26,15,"labels.inputs.Incorporation Number")),a(5),h(m(31,17,"labels.inputs.Remarks"))}}function cSe(e,o){if(e&1&&(l(0,"mat-option",8),c(1),r()),e&2){let t=o.$implicit;g("value",t.id),a(),v(" ",t.name," ")}}function pSe(e,o){if(e&1&&(l(0,"mat-form-field",11)(1,"mat-label"),c(2),p(3,"translate"),r(),l(4,"mat-select",44),Se(5,cSe,2,2,"mat-option",8,Pe),r()()),e&2){let t=w();a(2),h(m(3,1,"labels.inputs.Gender")),a(3),we(t.genderOptions)}}function mSe(e,o){if(e&1&&(l(0,"mat-option",8),c(1),r()),e&2){let t=o.$implicit;g("value",t.id),a(),v(" ",t.displayName," ")}}function dSe(e,o){e&1&&(l(0,"mat-checkbox",18),c(1),p(2,"translate"),r()),e&2&&(a(),v(" ",m(2,1,"labels.inputs.Is staff"),"? "))}function uSe(e,o){e&1&&(l(0,"mat-error"),c(1),p(2,"translate"),r()),e&2&&(a(),v(" ",m(2,1,"error.Email not valid")," "))}function fSe(e,o){if(e&1&&(l(0,"mat-option",8),c(1),r()),e&2){let t=o.$implicit;g("value",t.id),a(),v(" ",t.name," ")}}function hSe(e,o){if(e&1&&(l(0,"mat-option",8),c(1),r()),e&2){let t=o.$implicit;g("value",t.id),a(),v(" ",t.name," ")}}function gSe(e,o){e&1&&(l(0,"mat-error"),c(1),p(2,"translate"),p(3,"translate"),l(4,"strong"),c(5),p(6,"translate"),r()()),e&2&&(a(),le(" ",m(2,3,"labels.inputs.Activation Date")," ",m(3,5,"labels.commons.is")," "),a(4),h(m(6,7,"labels.commons.required")))}function _Se(e,o){if(e&1){let t=Y();l(0,"mat-form-field",13),R("click",function(){V(t);let i=xe(7);return q(i.open())}),l(1,"mat-label"),c(2),p(3,"translate"),r(),b(4,"input",45)(5,"mat-datepicker-toggle",15)(6,"mat-datepicker",null,3),E(8,gSe,7,9,"mat-error"),r()}if(e&2){let t=xe(7),n=w();a(2),h(m(3,6,"labels.inputs.Activation Date")),a(2),g("min",n.createClientForm.value.submittedOnDate)("max",n.maxDate)("matDatepicker",t),a(),g("for",t),a(3),I(n.createClientForm.controls.activationDate.hasError("required")?8:-1)}}function CSe(e,o){if(e&1&&(l(0,"mat-option",8),c(1),r()),e&2){let t=o.$implicit;g("value",t.id),a(),v(" ",t.name," ")}}function vSe(e,o){e&1&&(l(0,"mat-error"),c(1),p(2,"translate"),p(3,"translate"),l(4,"strong"),c(5),p(6,"translate"),r()()),e&2&&(a(),le(" ",m(2,3,"labels.inputs.Savings Product")," ",m(3,5,"labels.commons.is")," "),a(4),h(m(6,7,"labels.commons.required")))}function xSe(e,o){if(e&1&&(l(0,"mat-form-field",11)(1,"mat-label"),c(2),p(3,"translate"),r(),l(4,"mat-select",46),Se(5,CSe,2,2,"mat-option",8,Pe),r(),E(7,vSe,7,9,"mat-error"),r()),e&2){let t=w();a(2),h(m(3,2,"labels.inputs.Savings Product")),a(3),we(t.savingProductOptions),a(2),I(t.createClientForm.controls.savingsProductId.hasError("required")?7:-1)}}var Yf=(()=>{class e{constructor(){this.formBuilder=T(nt),this.dateUtils=T(Zt),this.settingsService=T(At),this.clientService=T(Oi),this.legalFormChangeEvent=new bi,this.minDate=new Date(2e3,0,1),this.maxDate=new Date,this.setClientForm()}ngOnInit(){this.maxDate=this.settingsService.businessDate,this.setOptions(),this.buildDependencies()}setClientForm(){this.createClientForm=this.formBuilder.group({officeId:["",se.required],staffId:[""],legalFormId:["",se.required],isStaff:[!1],active:[!1],addSavings:[!1],accountNo:[""],externalId:[""],genderId:[""],mobileNo:[""],emailAddress:["",se.email],dateOfBirth:[""],clientTypeId:[""],clientClassificationId:[""],submittedOnDate:[this.settingsService.businessDate,se.required]})}setOptions(){this.officeOptions=this.clientTemplate.officeOptions,this.staffOptions=this.clientTemplate.staffOptions,this.legalFormOptions=this.clientTemplate.clientLegalFormOptions,this.clientTypeOptions=this.clientTemplate.clientTypeOptions,this.clientClassificationTypeOptions=this.clientTemplate.clientClassificationOptions,this.businessLineOptions=this.clientTemplate.clientNonPersonMainBusinessLineOptions,this.constitutionOptions=this.clientTemplate.clientNonPersonConstitutionOptions,this.genderOptions=this.clientTemplate.genderOptions,this.savingProductOptions=this.clientTemplate.savingProductOptions}buildDependencies(){this.createClientForm.get("legalFormId").valueChanges.subscribe(t=>{this.legalFormChangeEvent.emit({legalForm:t}),t===1?(this.createClientForm.removeControl("fullname"),this.createClientForm.removeControl("clientNonPersonDetails"),this.createClientForm.addControl("firstname",new it("",[se.required,se.pattern("(^[A-z]).*")])),this.createClientForm.addControl("middlename",new it("",se.pattern("(^[A-z]).*"))),this.createClientForm.addControl("lastname",new it("",[se.required,se.pattern("(^[A-z]).*")]))):(this.createClientForm.removeControl("firstname"),this.createClientForm.removeControl("middlename"),this.createClientForm.removeControl("lastname"),this.createClientForm.addControl("fullname",new it("",[se.required,se.pattern("(^[A-z]).*")])),this.createClientForm.addControl("clientNonPersonDetails",this.formBuilder.group({constitutionId:["",se.required],incorpValidityTillDate:[""],incorpNumber:[""],mainBusinessLineId:[""],remarks:[""]})))}),this.createClientForm.get("legalFormId").patchValue(1),this.createClientForm.get("active").valueChanges.subscribe(t=>{t?this.createClientForm.addControl("activationDate",new it("",se.required)):this.createClientForm.removeControl("activationDate")}),this.createClientForm.get("addSavings").valueChanges.subscribe(t=>{t?this.createClientForm.addControl("savingsProductId",new it("",se.required)):this.createClientForm.removeControl("savingsProductId")}),this.createClientForm.get("officeId").valueChanges.subscribe(t=>{this.clientService.getClientWithOfficeTemplate(t).subscribe(n=>{this.staffOptions=n.staffOptions})})}getDateLabel(t,n){return t===1?n[0]:n[1]}get clientGeneralDetails(){let t=this.createClientForm.value,n=this.settingsService.dateFormat,i=this.settingsService.language.code;for(let s in t)(t[s]===""||s==="addSavings")&&delete t[s];return t.submittedOnDate instanceof Date&&(t.submittedOnDate=this.dateUtils.formatDate(t.submittedOnDate,n)),t.activationDate instanceof Date&&(t.activationDate=this.dateUtils.formatDate(t.activationDate,n)),t.dateOfBirth instanceof Date&&(t.dateOfBirth=this.dateUtils.formatDate(t.dateOfBirth,n)),t.clientNonPersonDetails&&t.clientNonPersonDetails.incorpValidityTillDate&&(t.clientNonPersonDetails=qt(at({},t.clientNonPersonDetails),{incorpValidityTillDate:this.dateUtils.formatDate(t.clientNonPersonDetails.incorpValidityTillDate,n),dateFormat:n,locale:i})),t}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275cmp=me({type:e,selectors:[["mifosx-client-general-step"]],inputs:{clientTemplate:"clientTemplate"},outputs:{legalFormChangeEvent:"legalFormChangeEvent"},decls:95,vars:60,consts:[["dateOfBirthDatePicker",""],["submittedOnDatePicker",""],["incorpValidityTillDateDatePicker",""],["activatedOnDatePicker",""],[3,"formGroup"],[1,"layout-row-wrap","gap-2px","responsive-column"],[1,"flex-fill","flex-23"],["required","","formControlName","officeId"],[3,"value"],["required","","formControlName","legalFormId"],["matInput","","formControlName","externalId"],[1,"flex-48"],[1,"name-fields-row"],[1,"flex-48",3,"click"],["matInput","","formControlName","dateOfBirth",3,"max","matDatepicker"],["matSuffix","",3,"for"],["formGroupName","clientNonPersonDetails",1,"flex-100","layout-row-wrap","responsive-column","gap-4percent"],["formControlName","staffId"],["labelPosition","before","formControlName","isStaff",1,"flex-48","margin-v"],[1,"flex-98"],["matInput","","type","text","formControlName","mobileNo"],["matInput","","formControlName","emailAddress"],["formControlName","clientTypeId"],["formControlName","clientClassificationId"],["matInput","","formControlName","submittedOnDate","required","",3,"min","max","matDatepicker"],["labelPosition","before","formControlName","active",1,"margin-v","flex-48"],["labelPosition","before","formControlName","addSavings",1,"margin-v","flex-48"],[1,"layout-row","align-center","gap-2percent","margin-t","responsive-column"],["mat-raised-button","","matStepperPrevious","","disabled",""],["icon","arrow-left",1,"m-r-10"],["mat-raised-button","","matStepperNext",""],["icon","arrow-right",1,"m-l-10"],["matInput","","required","","formControlName","fullname"],[1,"name-field","first-name"],[1,"name-field","middle-name"],[1,"name-field","last-name"],["matInput","","required","","formControlName","firstname"],["matInput","","formControlName","middlename"],["matInput","","required","","formControlName","lastname"],["formControlName","constitutionId","required",""],["formControlName","mainBusinessLineId"],["matInput","","formControlName","incorpValidityTillDate",3,"min","max","matDatepicker"],["matInput","","formControlName","incorpNumber"],["matInput","","formControlName","remarks","cdkTextareaAutosize","","cdkAutosizeMinRows","2"],["formControlName","genderId"],["matInput","","required","","formControlName","activationDate",3,"min","max","matDatepicker"],["required","","formControlName","savingsProductId"]],template:function(n,i){if(n&1){let s=Y();l(0,"form",4)(1,"div",5)(2,"mat-form-field",6)(3,"mat-label"),c(4),p(5,"translate"),r(),l(6,"mat-select",7),Se(7,$3e,2,2,"mat-option",8,Pe),r(),E(9,U3e,7,9,"mat-error"),r(),l(10,"mat-form-field",6)(11,"mat-label"),c(12),p(13,"translate"),r(),l(14,"mat-select",9),Se(15,W3e,3,5,"mat-option",8,Pe),r()(),l(17,"mat-form-field",6)(18,"mat-label"),c(19),p(20,"translate"),r(),b(21,"input",10),r(),E(22,J3e,7,6,"mat-form-field",11),E(23,aSe,4,3,"div",12),b(24,"mat-divider"),l(25,"mat-form-field",13),R("click",function(){V(s);let u=xe(32);return q(u.open())}),l(26,"mat-label"),c(27),p(28,"translate"),r(),b(29,"input",14)(30,"mat-datepicker-toggle",15)(31,"mat-datepicker",null,0),r(),E(33,sSe,33,19,"div",16),E(34,pSe,7,3,"mat-form-field",11),l(35,"mat-form-field",11)(36,"mat-label"),c(37),p(38,"translate"),r(),l(39,"mat-select",17),Se(40,mSe,2,2,"mat-option",8,Pe),r()(),E(42,dSe,3,3,"mat-checkbox",18),b(43,"mat-divider",19),l(44,"mat-form-field",11)(45,"mat-label"),c(46),p(47,"translate"),r(),b(48,"input",20),r(),l(49,"mat-form-field",11)(50,"mat-label"),c(51),p(52,"translate"),r(),b(53,"input",21),E(54,uSe,3,3,"mat-error"),r(),l(55,"mat-form-field",11)(56,"mat-label"),c(57),p(58,"translate"),r(),l(59,"mat-select",22),Se(60,fSe,2,2,"mat-option",8,Pe),r()(),l(62,"mat-form-field",11)(63,"mat-label"),c(64),p(65,"translate"),r(),l(66,"mat-select",23),Se(67,hSe,2,2,"mat-option",8,Pe),r()(),l(69,"mat-form-field",13),R("click",function(){V(s);let u=xe(76);return q(u.open())}),l(70,"mat-label"),c(71),p(72,"translate"),r(),b(73,"input",24)(74,"mat-datepicker-toggle",15)(75,"mat-datepicker",null,1),r(),b(77,"br"),l(78,"mat-checkbox",25),c(79),p(80,"translate"),r(),E(81,_Se,9,8,"mat-form-field",11),l(82,"mat-checkbox",26),c(83),p(84,"translate"),r(),E(85,xSe,8,4,"mat-form-field",11),r(),l(86,"div",27)(87,"button",28),b(88,"fa-icon",29),c(89),p(90,"translate"),r(),l(91,"button",30),c(92),p(93,"translate"),b(94,"fa-icon",31),r()()()}if(n&2){let s=xe(32),d=xe(76);g("formGroup",i.createClientForm),a(4),h(m(5,31,"labels.inputs.Office")),a(3),we(i.officeOptions),a(2),I(i.createClientForm.controls.officeId.hasError("required")?9:-1),a(3),h(m(13,33,"labels.inputs.Legal Form")),a(3),we(i.legalFormOptions),a(4),h(m(20,35,"labels.inputs.External Id")),a(3),I(i.createClientForm.contains("fullname")?22:-1),a(),I(i.createClientForm.contains("firstname")||i.createClientForm.contains("middlename")||i.createClientForm.contains("lastname")?23:-1),a(4),v(" ",m(28,37,"labels.inputs."+i.getDateLabel(i.createClientForm.value.legalFormId,oe(59,G3e)))," "),a(2),g("max",i.maxDate)("matDatepicker",s),a(),g("for",s),a(3),I(i.createClientForm.get("clientNonPersonDetails")?33:-1),a(),I(i.createClientForm.value.legalFormId===1?34:-1),a(3),h(m(38,39,"labels.inputs.Staff")),a(3),we(i.staffOptions),a(2),I(i.createClientForm.value.legalFormId===1?42:-1),a(4),h(m(47,41,"labels.inputs.Mobile No")),a(5),h(m(52,43,"labels.inputs.Email Address")),a(3),I(i.createClientForm.controls.emailAddress.errors!=null&&i.createClientForm.controls.emailAddress.errors.email?54:-1),a(3),h(m(58,45,"labels.inputs.Client Type")),a(3),we(i.clientTypeOptions),a(4),h(m(65,47,"labels.inputs.Client Classification")),a(3),we(i.clientClassificationTypeOptions),a(4),h(m(72,49,"labels.inputs.Submitted On")),a(2),g("min",i.minDate)("max",i.maxDate)("matDatepicker",d),a(),g("for",d),a(5),v(" ",m(80,51,"labels.inputs.Active"),"? "),a(2),I(i.createClientForm.contains("activationDate")?81:-1),a(2),v(" ",m(84,53,"labels.inputs.Open Savings Account"),"? "),a(2),I(i.createClientForm.contains("savingsProductId")?85:-1),a(4),v(" ",m(90,55,"labels.buttons.Previous")," "),a(3),v(" ",m(93,57,"labels.buttons.Next")," ")}},dependencies:[ue,fe,tt,st,Ue,Xe,dt,Ze,et,la,Fe,Be,ut,ai,ze,gt,ft,mi,di,pi,ve,fi,Ri,Ln,qi,ke,Ji,he,Fi],styles:["form[_ngcontent-%COMP%]{padding:16px 0}form[_ngcontent-%COMP%] .layout-row-wrap[_ngcontent-%COMP%]{gap:8px!important}mat-form-field[_ngcontent-%COMP%]{margin-bottom:8px}mat-divider[_ngcontent-%COMP%]{margin:16px 0}.margin-v[_ngcontent-%COMP%]{margin:2em 0 0}.margin-t[_ngcontent-%COMP%]{margin-top:2em}.name-fields-row[_ngcontent-%COMP%]{display:flex;gap:8px;flex-wrap:wrap;width:100%;margin-bottom:8px}.name-fields-row[_ngcontent-%COMP%] .name-field[_ngcontent-%COMP%]{flex:1;min-width:200px}.name-fields-row[_ngcontent-%COMP%] .name-field.first-name[_ngcontent-%COMP%], .name-fields-row[_ngcontent-%COMP%] .name-field.last-name[_ngcontent-%COMP%]{flex:1.2}.name-fields-row[_ngcontent-%COMP%] .name-field.middle-name[_ngcontent-%COMP%]{flex:1}@media (width <= 768px){.name-fields-row[_ngcontent-%COMP%]{flex-direction:column;gap:4px}.name-fields-row[_ngcontent-%COMP%] .name-field[_ngcontent-%COMP%]{width:100%;min-width:unset;flex:none}}.name-fields-row[_ngcontent-%COMP%] + mat-form-field[_ngcontent-%COMP%], .name-fields-row[_ngcontent-%COMP%] + mat-divider[_ngcontent-%COMP%], .name-fields-row[_ngcontent-%COMP%] + div[_ngcontent-%COMP%]{margin-top:8px}.layout-row.align-center[_ngcontent-%COMP%]{padding-top:16px;margin-top:12px}.layout-row.align-center[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{margin:0 6px}.flex-100[_ngcontent-%COMP%]{margin:16px 0;padding:8px 0}mat-checkbox[_ngcontent-%COMP%]{margin:8px 0}mat-checkbox.margin-v[_ngcontent-%COMP%]{margin-top:12px}@media (width <= 768px){form[_ngcontent-%COMP%]{padding:12px 0}form[_ngcontent-%COMP%] .layout-row-wrap[_ngcontent-%COMP%]{gap:6px!important}mat-form-field[_ngcontent-%COMP%]{margin-bottom:6px}mat-divider[_ngcontent-%COMP%]{margin:12px 0}.layout-row.align-center[_ngcontent-%COMP%]{padding-top:12px;margin-top:8px;flex-direction:column;gap:8px}.layout-row.align-center[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{width:100%;margin:2px 0}}@media (width <= 480px){form[_ngcontent-%COMP%]{padding:8px 0}form[_ngcontent-%COMP%] .layout-row-wrap[_ngcontent-%COMP%]{gap:4px!important}}"]})}}return e})();var bSe=e=>({member:e});function ySe(e,o){e&1&&(l(0,"mat-error"),c(1),p(2,"translate"),p(3,"translate"),l(4,"strong"),c(5),p(6,"translate"),r()()),e&2&&(a(),le(" ",m(2,3,"labels.inputs.First Name")," ",m(3,5,"labels.commons.is")," "),a(4),h(m(6,7,"labels.commons.required")))}function SSe(e,o){e&1&&(l(0,"mat-error"),c(1),p(2,"translate"),p(3,"translate"),l(4,"strong"),c(5),p(6,"translate"),r()()),e&2&&(a(),le(" ",m(2,3,"labels.inputs.Last Name")," ",m(3,5,"labels.commons.is")," "),a(4),h(m(6,7,"labels.commons.required")))}function wSe(e,o){if(e&1&&(l(0,"mat-option",12),c(1),p(2,"translateKey"),r()),e&2){let t=o.$implicit;g("value",t.id),a(),v(" ",Ot(2,2,t.name,"catalogs")," ")}}function PSe(e,o){e&1&&(l(0,"mat-error"),c(1),p(2,"translate"),p(3,"translate"),l(4,"strong"),c(5),p(6,"translate"),r()()),e&2&&(a(),le(" ",m(2,3,"labels.inputs.Relationship")," ",m(3,5,"labels.commons.is")," "),a(4),h(m(6,7,"labels.commons.required")))}function TSe(e,o){if(e&1&&(l(0,"mat-option",12),c(1),p(2,"translateKey"),r()),e&2){let t=o.$implicit;g("value",t.id),a(),v(" ",Ot(2,2,t.name,"catalogs")," ")}}function MSe(e,o){e&1&&(l(0,"mat-error"),c(1),p(2,"translate"),p(3,"translate"),l(4,"strong"),c(5),p(6,"translate"),r()()),e&2&&(a(),le(" ",m(2,3,"labels.inputs.Gender")," ",m(3,5,"labels.commons.is")," "),a(4),h(m(6,7,"labels.commons.required")))}function DSe(e,o){if(e&1&&(l(0,"mat-option",12),c(1),p(2,"translateKey"),r()),e&2){let t=o.$implicit;g("value",t.id),a(),v(" ",Ot(2,2,t.name,"catalogs")," ")}}function ESe(e,o){if(e&1&&(l(0,"mat-option",12),c(1),p(2,"translateKey"),r()),e&2){let t=o.$implicit;g("value",t.id),a(),v(" ",Ot(2,2,t.name,"catalogs")," ")}}var Jf=(()=>{class e{constructor(){this.dialogRef=T(eo),this.formBuilder=T(nt),this.dateUtils=T(Zt),this.data=T(Po),this.settingsService=T(At),this.maxDate=new Date}ngOnInit(){this.maxDate=this.settingsService.businessDate,this.createFamilyMemberForm(),this.data.context==="Edit"&&this.familyMemberForm.patchValue({firstName:this.data.member.firstName,middleName:this.data.member.middleName,lastName:this.data.member.lastName,qualification:this.data.member.qualification,age:this.data.member.age,isDependent:this.data.member.isDependent,relationshipId:this.data.member.relationshipId,genderId:this.data.member.genderId,professionId:this.data.member.professionId,maritalStatusId:this.data.member.maritalStatusId,dateOfBirth:this.data.member.dateOfBirth&&new Date(this.data.member.dateOfBirth)}),this.familyMemberForm.get("dateOfBirth").valueChanges.subscribe(n=>{if(n){let i=this.calculateAge(n);this.familyMemberForm.get("age").setValue(i)}else this.familyMemberForm.get("age").setValue("")});let t=this.familyMemberForm.get("dateOfBirth").value;if(t){let n=this.calculateAge(t);this.familyMemberForm.get("age").setValue(n)}}calculateAge(t){let n=new Date(this.settingsService.businessDate),i=new Date(t),s=n.getFullYear()-i.getFullYear(),d=n.getMonth()-i.getMonth();return(d<0||d===0&&n.getDate(){class e{constructor(){this.dialog=T(Ht),this.translateService=T(yi),this.clientFamilyMembers=[]}addFamilyMember(){this.dialog.open(Jf,{data:{context:this.translateService.instant("labels.buttons.Add"),options:this.clientTemplate.familyMemberOptions},width:"50rem"}).afterClosed().subscribe(n=>{n.member&&this.clientFamilyMembers.push(n.member)})}editFamilyMember(t,n){this.dialog.open(Jf,{data:{context:"Edit",member:t,options:this.clientTemplate.familyMemberOptions},width:"50rem"}).afterClosed().subscribe(s=>{s.member&&this.clientFamilyMembers.splice(n,1,s.member)})}deleteFamilyMember(t,n){this.dialog.open(vi,{data:{deleteContext:`Family member name : ${t} ${n}`}}).afterClosed().subscribe(s=>{s.delete&&this.clientFamilyMembers.splice(n,1)})}get familyMembers(){return{familyMembers:this.clientFamilyMembers}}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275cmp=me({type:e,selectors:[["mifosx-client-family-members-step"]],inputs:{clientTemplate:"clientTemplate"},decls:21,vars:12,consts:[[1,"mat-typography"],[1,"layout-row","align-end","m-b-20"],["mat-raised-button","","color","primary",3,"click"],["icon","plus",1,"m-r-10"],[1,"family-member"],[1,"layout-row","align-center","gap-2percent","margin-t","responsive-column"],["mat-raised-button","","matStepperPrevious",""],["icon","arrow-left",1,"m-r-10"],["mat-raised-button","","matStepperNext",""],["icon","arrow-right",1,"m-l-10"],[1,"family-member-actions","layout-row","align-end"],["mat-button","","color","primary"],["icon","edit",3,"click"],["mat-button","","color","warn",3,"click"],["icon","trash"]],template:function(n,i){n&1&&(l(0,"div",0)(1,"h3"),c(2),p(3,"translate"),r(),l(4,"div",1)(5,"button",2),R("click",function(){return i.addFamilyMember()}),b(6,"fa-icon",3),c(7),p(8,"translate"),r()(),l(9,"mat-accordion"),Se(10,ISe,51,69,"mat-expansion-panel",4,Pe),r(),l(12,"div",5)(13,"button",6),b(14,"fa-icon",7),c(15),p(16,"translate"),r(),l(17,"button",8),c(18),p(19,"translate"),b(20,"fa-icon",9),r()()()),n&2&&(a(2),h(m(3,4,"labels.heading.Family Members")),a(5),v("",m(8,6,"labels.buttons.Add")," "),a(3),we(i.clientFamilyMembers),a(5),v(" ",m(16,8,"labels.buttons.Previous")," "),a(3),v(" ",m(19,10,"labels.buttons.Next")," "))},dependencies:[ue,fe,ve,ke,Er,Tr,Mr,Dr,oc,Ri,qi,Ji,Pi,he,Qn],styles:[".family-member[_ngcontent-%COMP%] .family-member-actions[_ngcontent-%COMP%]{margin-top:1%}.family-member[_ngcontent-%COMP%] .family-member-actions[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{margin-right:1%}.family-member[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{margin:1% auto}.family-member[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{line-height:30px;margin-left:2%}.margin-t[_ngcontent-%COMP%]{margin-top:2em}"]})}}return e})();function OSe(e,o){if(e&1&&(l(0,"span"),c(1),p(2,"translate"),b(3,"br"),r()),e&2){let t=w().$implicit;a(),le("",m(2,2,"labels.inputs.Street")," : ",t.street)}}function ASe(e,o){if(e&1&&(l(0,"span"),c(1),p(2,"translate"),b(3,"br"),r()),e&2){let t=w().$implicit;a(),le("",m(2,2,"labels.inputs.Address Line")," 1 : ",t.addressLine1)}}function FSe(e,o){if(e&1&&(l(0,"span"),c(1),p(2,"translate"),b(3,"br"),r()),e&2){let t=w().$implicit;a(),le("",m(2,2,"labels.inputs.Address Line")," 2 : ",t.addressLine2)}}function kSe(e,o){if(e&1&&(l(0,"span"),c(1),p(2,"translate"),b(3,"br"),r()),e&2){let t=w().$implicit;a(),le("",m(2,2,"labels.inputs.Address Line")," 3 : ",t.addressLine3)}}function BSe(e,o){if(e&1&&(l(0,"span"),c(1),p(2,"translate"),b(3,"br"),r()),e&2){let t=w().$implicit;a(),le("",m(2,2,"labels.inputs.Town / Village")," : ",t.townVillage)}}function RSe(e,o){if(e&1&&(l(0,"span"),c(1),p(2,"translate"),b(3,"br"),r()),e&2){let t=w().$implicit;a(),le("",m(2,2,"labels.inputs.City")," : ",t.city)}}function NSe(e,o){if(e&1&&(l(0,"span"),c(1),p(2,"translate"),b(3,"br"),r()),e&2){let t,n=w().$implicit,i=w(2);a(),le("",m(2,2,"labels.inputs.State / Province")," : ",(t=i.getSelectedValue("stateProvinceIdOptions",n.stateProvinceId))==null?null:t.name)}}function LSe(e,o){if(e&1&&(l(0,"span"),c(1),p(2,"translate"),b(3,"br"),r()),e&2){let t,n=w().$implicit,i=w(2);a(),le("",m(2,2,"labels.inputs.Country")," : ",(t=i.getSelectedValue("countryIdOptions",n.countryId))==null?null:t.name)}}function VSe(e,o){if(e&1&&(l(0,"span"),c(1),p(2,"translate"),b(3,"br"),r()),e&2){let t=w().$implicit;a(),le("",m(2,2,"labels.inputs.Postal Code")," : ",t.postalCode)}}function qSe(e,o){if(e&1&&(l(0,"span"),c(1),p(2,"translate"),b(3,"br"),r()),e&2){let t=w().$implicit;a(),le("",m(2,2,"labels.inputs.Active Status")," : ",t.isActive)}}function zSe(e,o){if(e&1){let t=Y();l(0,"mat-expansion-panel",9)(1,"mat-expansion-panel-header")(2,"mat-panel-title"),c(3),r(),l(4,"mat-panel-description"),c(5),r()(),b(6,"mat-divider"),l(7,"div",10)(8,"button",11),R("click",function(){let i=V(t),s=i.$implicit,d=i.$index,u=w(2);return q(u.editAddress(s,d))}),b(9,"fa-icon",12),r(),l(10,"button",13),R("click",function(){let i=V(t),s=i.$implicit,d=i.$index,u=w(2);return q(u.deleteAddress(s,d))}),b(11,"fa-icon",14),r(),l(12,"mat-slide-toggle",15),R("change",function(){let i=V(t).$implicit,s=w(2);return q(s.toggleAddress(i))}),r()(),l(13,"p"),E(14,OSe,4,4,"span"),E(15,ASe,4,4,"span"),E(16,FSe,4,4,"span"),E(17,kSe,4,4,"span"),E(18,BSe,4,4,"span"),E(19,RSe,4,4,"span"),E(20,NSe,4,4,"span"),E(21,LSe,4,4,"span"),E(22,VSe,4,4,"span"),E(23,qSe,4,4,"span"),r()()}if(e&2){let t,n=o.$implicit,i=w(2);a(3),v(" ",(t=i.getSelectedValue("addressTypeIdOptions",n.addressTypeId))==null?null:t.name," "),a(2),v(" ",n.relationship," "),a(7),g("checked",n.isActive),a(2),I(i.isFieldEnabled("street")?14:-1),a(),I(i.isFieldEnabled("addressLine1")?15:-1),a(),I(i.isFieldEnabled("addressLine2")?16:-1),a(),I(i.isFieldEnabled("addressLine3")?17:-1),a(),I(i.isFieldEnabled("townVillage")?18:-1),a(),I(i.isFieldEnabled("city")?19:-1),a(),I(i.isFieldEnabled("stateProvinceId")?20:-1),a(),I(i.isFieldEnabled("countryId")?21:-1),a(),I(i.isFieldEnabled("postalCode")?22:-1),a(),I(i.isFieldEnabled("isActive")?23:-1)}}function HSe(e,o){if(e&1&&(l(0,"mat-accordion"),Se(1,zSe,24,13,"mat-expansion-panel",9,Pe),r()),e&2){let t=w();a(),we(t.clientAddressData)}}var C2=(()=>{class e{constructor(){this.dialog=T(Ht),this.translateService=T(yi),this.clientAddressData=[],this.clientAddressData=[]}addAddress(){let t={title:this.translateService.instant("labels.buttons.Add")+" "+this.translateService.instant("labels.catalogs.Client")+" "+this.translateService.instant("labels.heading.Address"),formfields:this.getAddressFormFields()};this.dialog.open(an,{data:t,width:"50rem"}).afterClosed().subscribe(i=>{if(i.data){let s=i.data.value;s.isActive=!1;for(let d in s)(s[d]===""||s[d]===void 0)&&delete s[d];this.clientAddressData.push(s)}})}editAddress(t,n){let i={title:this.translateService.instant("labels.buttons.Edit")+" "+this.translateService.instant("labels.catalogs.Client")+" "+this.translateService.instant("labels.heading.Address"),formfields:this.getAddressFormFields(t),layout:{addButtonText:"Edit"}};this.dialog.open(an,{data:i,width:"50rem"}).afterClosed().subscribe(d=>{if(d.data){let u=d.data.value;u.isActive=t.isActive;for(let f in u)(u[f]===""||u[f]===void 0)&&delete u[f];this.clientAddressData[n]=u}})}deleteAddress(t,n){this.dialog.open(vi,{data:{deleteContext:`${this.translateService.instant("labels.heading.Address")} ${this.translateService.instant("labels.inputs.Type")} : ${t.addressType} ${n}`}}).afterClosed().subscribe(s=>{s.delete&&this.clientAddressData.splice(n,1)})}toggleAddress(t){t.isActive=!t.isActive}isFieldEnabled(t){return this.clientAddressFieldConfig.find(n=>n.field===t)?.isEnabled}getSelectedValue(t,n){return this.clientTemplate.address[0][t].find(i=>i.id===n)}getAddressFormFields(t){let n=[];for(let i=0;ii!==null),n}get address(){return{address:this.clientAddressData?this.clientAddressData:[]}}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275cmp=me({type:e,selectors:[["mifosx-client-address-step"]],inputs:{clientAddressFieldConfig:"clientAddressFieldConfig",clientTemplate:"clientTemplate"},decls:19,vars:13,consts:[[1,"mat-typography"],[1,"layout-row","align-end","m-b-20"],["mat-raised-button","","color","primary",3,"click"],["icon","plus",1,"m-r-10"],[1,"layout-row","align-center","gap-2percent","margin-t","responsive-column"],["mat-raised-button","","matStepperPrevious",""],["icon","arrow-left",1,"m-r-10"],["mat-raised-button","","matStepperNext",""],["icon","arrow-right",1,"m-l-10"],[1,"address"],[1,"address-actions","layout-row","align-end","align-items-center"],["mat-button","","color","primary",3,"click"],["icon","edit"],["mat-button","","color","warn",3,"click"],["icon","trash"],[3,"change","checked"]],template:function(n,i){n&1&&(l(0,"div",0)(1,"h3"),c(2),p(3,"translate"),r(),l(4,"div",1)(5,"button",2),R("click",function(){return i.addAddress()}),b(6,"fa-icon",3),c(7),p(8,"translate"),r()(),E(9,HSe,3,0,"mat-accordion"),l(10,"div",4)(11,"button",5),b(12,"fa-icon",6),c(13),p(14,"translate"),r(),l(15,"button",7),c(16),p(17,"translate"),b(18,"fa-icon",8),r()()()),n&2&&(a(2),h(m(3,5,"labels.heading.Address")),a(5),v("",m(8,7,"labels.buttons.Add")," "),a(2),I(i.clientAddressData.length>0?9:-1),a(4),v(" ",m(14,9,"labels.buttons.Previous")," "),a(3),v(" ",m(17,11,"labels.buttons.Next")," "))},dependencies:[ue,fe,ve,ke,Er,Tr,Mr,Dr,oc,Ri,Ip,qi,Ji,he],styles:[".address[_ngcontent-%COMP%] .address-actions[_ngcontent-%COMP%]{margin-top:1%}.address[_ngcontent-%COMP%] .address-actions[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{margin-right:1%}.address[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{margin:1% auto}.address[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{line-height:30px;margin-left:2%}.margin-t[_ngcontent-%COMP%]{margin-top:2em}"]})}}return e})();function GSe(e,o){if(e&1&&(l(0,"mat-option",14),c(1),r()),e&2){let t=o.$implicit;g("value",t.id),a(),v(" ",t.value," ")}}function jSe(e,o){if(e&1&&(l(0,"mat-select",11),Se(1,GSe,2,2,"mat-option",14,Pe),r()),e&2){let t=w(2).$implicit;g("formControlName",Le(t.controlName)),a(),we(t.columnValues)}}function $Se(e,o){if(e&1&&b(0,"input",12),e&2){let t=w(2).$implicit;g("formControlName",Le(t.controlName))}}function USe(e,o){if(e&1&&b(0,"input",13),e&2){let t=w(2).$implicit;g("formControlName",Le(t.controlName))}}function WSe(e,o){if(e&1&&b(0,"textarea",13),e&2){let t=w(2).$implicit;g("formControlName",Le(t.controlName))}}function QSe(e,o){if(e&1){let t=Y();l(0,"span",15),R("click",function(){V(t);let i=xe(4);return q(i.open())}),b(1,"input",16)(2,"mat-datepicker-toggle",17)(3,"mat-datepicker",null,0),r()}if(e&2){let t=xe(4),n=w(2).$implicit;a(),g("formControlName",Le(n.controlName))("matDatepicker",t),a(),g("for",t)}}function YSe(e,o){if(e&1&&(l(0,"mat-form-field",9)(1,"mat-label"),c(2),r(),E(3,jSe,3,2,"mat-select",11),E(4,$Se,1,2,"input",12),E(5,USe,1,2,"input",13),E(6,WSe,1,2,"textarea",13),E(7,QSe,5,4,"span"),r()),e&2){let t=w().$implicit,n=w();a(2),h(n.getInputName(t)),a(),I(n.isDropdown(t.columnDisplayType)?3:-1),a(),I(n.isNumeric(t.columnDisplayType)?4:-1),a(),I(n.isString(t.columnDisplayType)?5:-1),a(),I(n.isText(t.columnDisplayType)?6:-1),a(),I(n.isDate(t.columnDisplayType)?7:-1)}}function JSe(e,o){if(e&1&&(l(0,"mat-checkbox",10),c(1),r()),e&2){let t=w().$implicit,n=w();g("formControlName",Le(t.controlName)),a(),v(" ",n.getInputName(t)," ")}}function KSe(e,o){if(e&1&&(l(0,"div",3),E(1,YSe,8,6,"mat-form-field",9),E(2,JSe,2,3,"mat-checkbox",10),r()),e&2){let t=o.$implicit,n=w();a(),I(n.isBoolean(t.columnDisplayType)?-1:1),a(),I(n.isBoolean(t.columnDisplayType)?2:-1)}}var v2=(()=>{class e{constructor(){this.formBuilder=T(nt),this.settingsService=T(At),this.datatableService=T(Qg),this.datatableInputs=[]}ngOnInit(){this.datatableInputs=this.datatableService.filterSystemColumns(this.datatableData.columnHeaderData);let t={};this.datatableInputs.forEach(n=>{n.controlName=this.getInputName(n),n.isColumnNullable?t[n.controlName]=new it(""):this.isNumeric(n.columnDisplayType)?t[n.controlName]=new it(0,[se.required]):t[n.controlName]=new it("",[se.required])}),this.datatableForm=this.formBuilder.group(t)}getInputName(t){return this.datatableService.getInputName(t)}isNumeric(t){return this.datatableService.isNumeric(t)}isDate(t){return this.datatableService.isDate(t)}isBoolean(t){return this.datatableService.isBoolean(t)}isDropdown(t){return this.datatableService.isDropdown(t)}isString(t){return this.datatableService.isString(t)}isText(t){return this.datatableService.isText(t)}get payload(){let t=this.settingsService.dateFormat,n=this.datatableForm.value,i=this.datatableService.buildPayload(this.datatableInputs,n,t,{locale:this.settingsService.language.code});return{registeredTableName:this.datatableData.registeredTableName,data:i}}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275cmp=me({type:e,selectors:[["mifosx-client-datatable-step"]],inputs:{datatableData:"datatableData"},decls:13,vars:7,consts:[["datePicker",""],[3,"formGroup"],[1,"layout-row-wrap","gap-2px","responsive-column"],[1,"flex-48"],[1,"layout-row","align-center","gap-2percent","margin-t","responsive-column"],["mat-raised-button","","matStepperPrevious","","disabled",""],["icon","arrow-left",1,"m-r-10"],["mat-raised-button","","matStepperNext",""],["icon","arrow-right",1,"m-l-10"],[1,"flex-100"],["labelPosition","before",1,"margin-v",3,"formControlName"],[3,"formControlName"],["matInput","","type","number",3,"formControlName"],["matInput","",3,"formControlName"],[3,"value"],[3,"click"],["matInput","",1,"date-picker",3,"matDatepicker","formControlName"],["matSuffix","",3,"for"]],template:function(n,i){n&1&&(l(0,"form",1)(1,"div",2),Se(2,KSe,3,2,"div",3,Pe),r(),l(4,"div",4)(5,"button",5),b(6,"fa-icon",6),c(7),p(8,"translate"),r(),l(9,"button",7),c(10),p(11,"translate"),b(12,"fa-icon",8),r()()()),n&2&&(g("formGroup",i.datatableForm),a(2),we(i.datatableInputs),a(5),v(" ",m(8,3,"labels.buttons.Previous")," "),a(3),v(" ",m(11,5,"labels.buttons.Next")," "))},dependencies:[ue,fe,tt,st,tn,Ue,Xe,Ze,et,Fe,Be,ai,ze,gt,ft,mi,di,pi,ve,fi,qi,ke,Ji,he],styles:[".date-picker[_ngcontent-%COMP%]{width:92%}mat-checkbox[_ngcontent-%COMP%]{margin-top:30px}"]})}}return e})();var XSe=()=>["../"];function ZSe(e,o){if(e&1&&(l(0,"span",4),c(1),r()),e&2){let t=w();a(),h(t.client.fullname)}}function ewe(e,o){if(e&1&&(l(0,"span",4),c(1),r()),e&2){let t=w();a(),le("",t.client.firstname," ",t.client.middlename?t.client.middlename+" "+t.client.lastname:t.client.lastname)}}function twe(e,o){if(e&1&&(l(0,"div",2)(1,"span",3),c(2),p(3,"translate"),r(),l(4,"span",4),c(5),p(6,"find"),r()()),e&2){let t=w();a(2),h(m(3,2,"labels.inputs.Staff")),a(3),h($t(6,4,t.client.staffId,t.clientTemplate.staffOptions,"id","displayName"))}}function iwe(e,o){if(e&1&&(l(0,"div",2)(1,"span",3),c(2),r(),l(3,"span",4),c(4),p(5,"dateFormat"),r()()),e&2){let t=w();a(2),h(t.client.legalFormId===1?"Date of Birth":"Incorporation Date"),a(2),h(m(5,2,t.client.dateOfBirth))}}function nwe(e,o){if(e&1&&(l(0,"div",2)(1,"span",3),c(2),p(3,"translate"),r(),l(4,"span",4),b(5,"mifosx-external-identifier",12),r()()),e&2){let t=w();a(2),h(m(3,3,"labels.inputs.External Id")),a(3),g("externalId",Le(t.client.externalId))}}function owe(e,o){if(e&1&&(l(0,"div",2)(1,"span",3),c(2),p(3,"translate"),r(),l(4,"span",4),c(5),r()()),e&2){let t=w();a(2),h(m(3,2,"labels.inputs.Mobile No")),a(3),h(t.client.mobileNo)}}function awe(e,o){if(e&1&&(l(0,"div",2)(1,"span",3),c(2),p(3,"translate"),r(),l(4,"span",4),c(5),r()()),e&2){let t=w();a(2),h(m(3,2,"labels.inputs.Email Address")),a(3),h(t.client.emailAddress)}}function rwe(e,o){if(e&1&&(l(0,"div",2)(1,"span",3),c(2),p(3,"translate"),r(),l(4,"span",4),c(5),p(6,"find"),r()()),e&2){let t=w();a(2),h(m(3,2,"labels.inputs.Client Type")),a(3),h($t(6,4,t.client.clientTypeId,t.clientTemplate.clientTypeOptions,"id","name"))}}function lwe(e,o){if(e&1&&(l(0,"div",2)(1,"span",3),c(2),p(3,"translate"),r(),l(4,"span",4),c(5),p(6,"find"),r()()),e&2){let t=w();a(2),h(m(3,2,"labels.inputs.Client Classification")),a(3),h($t(6,4,t.client.clientClassificationId,t.clientTemplate.clientClassificationOptions,"id","name"))}}function swe(e,o){if(e&1&&(l(0,"div",2)(1,"span",3),c(2),p(3,"translate"),r(),l(4,"span",4),c(5),p(6,"find"),r()()),e&2){let t=w();a(2),h(m(3,2,"labels.inputs.Savings Product")),a(3),h($t(6,4,t.client.savingsProductId,t.clientTemplate.savingProductOptions,"id","name"))}}function cwe(e,o){if(e&1&&(l(0,"div",2)(1,"span",3),c(2),p(3,"translate"),r(),l(4,"span",4),c(5),p(6,"dateFormat"),r()()),e&2){let t=w();a(2),h(m(3,2,"labels.inputs.Submitted On Date")),a(3),h(m(6,4,t.client.submittedOnDate))}}function pwe(e,o){if(e&1&&(l(0,"div",2)(1,"span",3),c(2),p(3,"translate"),r(),l(4,"span",4),c(5),p(6,"dateFormat"),r()()),e&2){let t=w();a(2),h(m(3,2,"labels.inputs.Activation Date")),a(3),h(m(6,4,t.client.activationDate))}}function mwe(e,o){if(e&1&&(l(0,"div",2)(1,"span",3),c(2),p(3,"translate"),r(),l(4,"span",4),c(5),p(6,"find"),r()()),e&2){let t=w(2);a(2),h(m(3,2,"labels.inputs.Gender")),a(3),h($t(6,4,t.client.genderId,t.clientTemplate.genderOptions,"id","name"))}}function dwe(e,o){if(e&1&&(E(0,mwe,7,9,"div",2),l(1,"div",2)(2,"span",3),c(3),p(4,"translate"),r(),l(5,"span",4),c(6),p(7,"yesNo"),r()()),e&2){let t=w();I(t.client.genderId?0:-1),a(3),v("",m(4,3,"labels.inputs.Is staff"),"?"),a(3),h(m(7,5,t.client.isStaff))}}function uwe(e,o){if(e&1&&(l(0,"div",2)(1,"span",3),c(2),p(3,"translate"),r(),l(4,"span",4),c(5),p(6,"dateFormat"),r()()),e&2){let t=w(2);a(2),h(m(3,2,"labels.inputs.Incorporation Validity Till Date")),a(3),h(m(6,4,t.client.clientNonPersonDetails.incorpValidityTillDate))}}function fwe(e,o){if(e&1&&(l(0,"div",2)(1,"span",3),c(2),p(3,"translate"),r(),l(4,"span",4),c(5),p(6,"find"),r()()),e&2){let t=w(2);a(2),h(m(3,2,"labels.inputs.Main Business Line")),a(3),h($t(6,4,t.client.clientNonPersonDetails.mainBusinessLineId,t.clientTemplate.clientNonPersonMainBusinessLineOptions,"id","name"))}}function hwe(e,o){if(e&1&&(l(0,"div",2)(1,"span",3),c(2),p(3,"translate"),r(),l(4,"span",4),c(5),p(6,"find"),r()()),e&2){let t=w(2);a(2),h(m(3,2,"labels.inputs.Constitution")),a(3),h($t(6,4,t.client.clientNonPersonDetails.constitutionId,t.clientTemplate.clientNonPersonConstitutionOptions,"id","name"))}}function gwe(e,o){if(e&1&&(E(0,uwe,7,6,"div",2),l(1,"div",2)(2,"span",3),c(3),p(4,"translate"),r(),l(5,"span",4),c(6),r()(),E(7,fwe,7,9,"div",2),E(8,hwe,7,9,"div",2),l(9,"div",2)(10,"span",3),c(11),p(12,"translate"),r(),l(13,"span",4),c(14),r()()),e&2){let t=w();I(t.client.clientNonPersonDetails.incorpValidityTillDate?0:-1),a(3),h(m(4,7,"labels.inputs.Incorportation Number")),a(3),h(t.client.clientNonPersonDetails.incorpNumber||"Not Provided"),a(),I(t.client.clientNonPersonDetails.mainBusinessLineId?7:-1),a(),I(t.client.clientNonPersonDetails.constitutionId?8:-1),a(3),h(m(12,9,"labels.inputs.Remarks")),a(3),h(t.client.clientNonPersonDetails.remarks||"N/A")}}function _we(e,o){if(e&1&&(l(0,"mat-expansion-panel",15)(1,"mat-expansion-panel-header")(2,"mat-panel-title"),c(3),r(),l(4,"mat-panel-description"),c(5),r()(),b(6,"mat-divider"),l(7,"p"),c(8),p(9,"translate"),b(10,"br"),c(11),p(12,"translate"),b(13,"br"),c(14),p(15,"translate"),b(16,"br"),c(17),p(18,"translate"),b(19,"br"),c(20),p(21,"translate"),p(22,"find"),b(23,"br"),c(24),p(25,"translate"),b(26,"br"),c(27),p(28,"translate"),b(29,"br"),c(30),p(31,"translate"),p(32,"find"),b(33,"br"),c(34),p(35,"translate"),p(36,"find"),b(37,"br"),c(38),p(39,"translate"),p(40,"find"),b(41,"br"),c(42),p(43,"translate"),p(44,"dateFormat"),b(45,"br"),r()()),e&2){let t=o.$implicit,n=w(2);a(3),le(" ",t.firstName," ",t.middleName?t.middleName+" "+t.lastName:t.lastName," "),a(2),v(" ",t.relationship," "),a(3),le(" ",m(9,25,"labels.inputs.First Name")," : ",t.firstName),a(3),le(" ",m(12,27,"labels.inputs.Middle Name")," : ",t.middleName),a(3),le(" ",m(15,29,"labels.inputs.Last Name")," : ",t.lastName),a(3),le(" ",m(18,31,"labels.inputs.Qualification")," : ",t.qualification),a(3),le(" ",m(21,33,"labels.inputs.Relationship")," : ",$t(22,35,t.relationshipId,n.clientTemplate.familyMemberOptions.relationshipIdOptions,"id","name")),a(4),le(" ",m(25,40,"labels.inputs.Age")," : ",t.age),a(3),le(" ",m(28,42,"labels.inputs.Is Dependent")," : ",t.isDependent?"Yes":"No"),a(3),le(" ",m(31,44,"labels.inputs.Marital Status")," : ",$t(32,46,t.maritalStatusId,n.clientTemplate.familyMemberOptions.maritalStatusIdOptions,"id","name")),a(4),le(" ",m(35,51,"labels.inputs.Gender")," : ",$t(36,53,t.genderId,n.clientTemplate.familyMemberOptions.genderIdOptions,"id","name")),a(4),le(" ",m(39,58,"labels.inputs.Profession")," : ",$t(40,60,t.professionId,n.clientTemplate.familyMemberOptions.professionIdOptions,"id","name")),a(4),le(" ",m(43,65,"labels.inputs.Date Of Birth")," : ",m(44,67,t.dateOfBirth))}}function Cwe(e,o){if(e&1&&(l(0,"div",5)(1,"h3",13),c(2),p(3,"translate"),r(),b(4,"mat-divider",2),l(5,"mat-accordion",14),Se(6,_we,46,69,"mat-expansion-panel",15,Pe),r()()),e&2){let t=w();a(2),h(m(3,1,"labels.heading.Family Members")),a(4),we(t.client.familyMembers)}}function vwe(e,o){if(e&1&&(l(0,"span"),c(1),p(2,"translate"),b(3,"br"),r()),e&2){let t=w().$implicit;a(),le("",m(2,2,"labels.inputs.Street")," : ",t.street)}}function xwe(e,o){if(e&1&&(l(0,"span"),c(1),p(2,"translate"),b(3,"br"),r()),e&2){let t=w().$implicit;a(),le("",m(2,2,"labels.inputs.Address Line")," 1 : ",t.addressLine1)}}function bwe(e,o){if(e&1&&(l(0,"span"),c(1),p(2,"translate"),b(3,"br"),r()),e&2){let t=w().$implicit;a(),le("",m(2,2,"labels.inputs.Address Line")," 2 : ",t.addressLine2)}}function ywe(e,o){if(e&1&&(l(0,"span"),c(1),p(2,"translate"),b(3,"br"),r()),e&2){let t=w().$implicit;a(),le("",m(2,2,"labels.inputs.Address Line")," 3 : ",t.addressLine3)}}function Swe(e,o){if(e&1&&(l(0,"span"),c(1),p(2,"translate"),b(3,"br"),r()),e&2){let t=w().$implicit;a(),le("",m(2,2,"labels.inputs.Town / Village")," : ",t.townVillage)}}function wwe(e,o){if(e&1&&(l(0,"span"),c(1),p(2,"translate"),b(3,"br"),r()),e&2){let t=w().$implicit;a(),le("",m(2,2,"labels.inputs.City")," : ",t.city)}}function Pwe(e,o){if(e&1&&(l(0,"span"),c(1),p(2,"translate"),b(3,"br"),r()),e&2){let t,n=w().$implicit,i=w(2);a(),le("",m(2,2,"labels.inputs.State / Province")," : ",(t=i.getSelectedValue("stateProvinceIdOptions",n.stateProvinceId))==null?null:t.name)}}function Twe(e,o){if(e&1&&(l(0,"span"),c(1),p(2,"translate"),b(3,"br"),r()),e&2){let t,n=w().$implicit,i=w(2);a(),le("",m(2,2,"labels.inputs.Country")," : ",(t=i.getSelectedValue("countryIdOptions",n.countryId))==null?null:t.name)}}function Mwe(e,o){if(e&1&&(l(0,"span"),c(1),p(2,"translate"),b(3,"br"),r()),e&2){let t=w().$implicit;a(),le("",m(2,2,"labels.inputs.Postal Code")," : ",t.postalCode)}}function Dwe(e,o){if(e&1&&(l(0,"span"),c(1),p(2,"translate"),b(3,"br"),r()),e&2){let t=w().$implicit;a(),le("",m(2,2,"labels.inputs.Active Status")," : ",t.isActive)}}function Ewe(e,o){if(e&1&&(l(0,"mat-expansion-panel",16)(1,"mat-expansion-panel-header")(2,"mat-panel-title"),c(3),r(),l(4,"mat-panel-description"),c(5),r()(),b(6,"mat-divider"),l(7,"p"),E(8,vwe,4,4,"span"),E(9,xwe,4,4,"span"),E(10,bwe,4,4,"span"),E(11,ywe,4,4,"span"),E(12,Swe,4,4,"span"),E(13,wwe,4,4,"span"),E(14,Pwe,4,4,"span"),E(15,Twe,4,4,"span"),E(16,Mwe,4,4,"span"),E(17,Dwe,4,4,"span"),r()()),e&2){let t,n=o.$implicit,i=w(2);a(3),v(" ",(t=i.getSelectedValue("addressTypeIdOptions",n.addressTypeId))==null?null:t.name," "),a(2),v(" ",n.relationship," "),a(3),I(i.isFieldEnabled("street")?8:-1),a(),I(i.isFieldEnabled("addressLine1")?9:-1),a(),I(i.isFieldEnabled("addressLine2")?10:-1),a(),I(i.isFieldEnabled("addressLine3")?11:-1),a(),I(i.isFieldEnabled("townVillage")?12:-1),a(),I(i.isFieldEnabled("city")?13:-1),a(),I(i.isFieldEnabled("stateProvinceId")?14:-1),a(),I(i.isFieldEnabled("countryId")?15:-1),a(),I(i.isFieldEnabled("postalCode")?16:-1),a(),I(i.isFieldEnabled("isActive")?17:-1)}}function Iwe(e,o){if(e&1&&(l(0,"div",6)(1,"h3",13),c(2),p(3,"translate"),r(),b(4,"mat-divider",2),l(5,"mat-accordion",14),Se(6,Ewe,18,12,"mat-expansion-panel",16,Pe),r()()),e&2){let t=w();a(2),h(m(3,1,"labels.heading.Address")),a(4),we(t.client.address)}}var x2=(()=>{class e{constructor(){this.submitEvent=new bi}getSelectedValue(t,n){return this.clientTemplate.address[0][t].find(i=>i.id===n)}isFieldEnabled(t){return this.clientAddressFieldConfig.find(n=>n.field===t)?.isEnabled}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275cmp=me({type:e,selectors:[["mifosx-client-preview-step"]],inputs:{clientAddressFieldConfig:"clientAddressFieldConfig",clientTemplate:"clientTemplate",client:"client"},outputs:{submitEvent:"submitEvent"},decls:57,vars:58,consts:[[1,"container","p-b-20"],[3,"inset"],[1,"flex-fill"],[1,"flex-40"],[1,"flex-60"],[1,"layout-row-wrap","responsive-column","flex-fill","m-b-20"],[1,"flex-fill","layout-row-wrap","responsive-column"],[1,"layout-row","responsive-column","align-center","gap-2px","margin-t"],["mat-raised-button","","matStepperPrevious",""],["icon","arrow-left",1,"m-r-10"],["mat-raised-button","",3,"routerLink"],["mat-raised-button","","color","primary",3,"click"],[3,"externalId"],[1,"mat-h3","flex-fill"],[1,"flex-fill","m-t-5"],[1,"family-member"],[1,"address"]],template:function(n,i){n&1&&(l(0,"div",0)(1,"h3"),c(2),p(3,"translate"),r(),b(4,"mat-divider",1),l(5,"div",2)(6,"span",3),c(7),p(8,"translate"),r(),E(9,ZSe,2,1,"span",4),E(10,ewe,2,2,"span",4),r(),l(11,"div",2)(12,"span",3),c(13),p(14,"translate"),r(),l(15,"span",4),c(16),p(17,"find"),r()(),l(18,"div",2)(19,"span",3),c(20),p(21,"translate"),r(),l(22,"span",4),c(23),p(24,"find"),r()(),E(25,twe,7,9,"div",2),E(26,iwe,6,4,"div",2),E(27,nwe,6,5,"div",2),E(28,owe,6,4,"div",2),E(29,awe,6,4,"div",2),E(30,rwe,7,9,"div",2),E(31,lwe,7,9,"div",2),E(32,swe,7,9,"div",2),E(33,cwe,7,6,"div",2),l(34,"div",2)(35,"span",3),c(36),p(37,"translate"),r(),l(38,"span",4),c(39),p(40,"yesNo"),r()(),E(41,pwe,7,6,"div",2),E(42,dwe,8,7),E(43,gwe,15,11),E(44,Cwe,8,3,"div",5),E(45,Iwe,8,3,"div",6),r(),l(46,"div",7)(47,"button",8),b(48,"fa-icon",9),c(49),p(50,"translate"),r(),l(51,"button",10),c(52),p(53,"translate"),r(),l(54,"button",11),R("click",function(){return i.submitEvent.emit()}),c(55),p(56,"translate"),r()()),n&2&&(a(2),h(m(3,29,"labels.heading.General")),a(2),g("inset",!0),a(3),h(m(8,31,"labels.inputs.name")),a(2),I(i.client.legalFormId===2?9:-1),a(),I(i.client.legalFormId===1?10:-1),a(3),h(m(14,33,"labels.inputs.Office")),a(3),h($t(17,35,i.client.officeId,i.clientTemplate.officeOptions,"id","name")),a(4),h(m(21,40,"labels.inputs.Legal Form")),a(3),h($t(24,42,i.client.legalFormId,i.clientTemplate.clientLegalFormOptions,"id","value")),a(2),I(i.client.staffId?25:-1),a(),I(i.client.dateOfBirth?26:-1),a(),I(i.client.externalId?27:-1),a(),I(i.client.mobileNo?28:-1),a(),I(i.client.emailAddress?29:-1),a(),I(i.client.clientTypeId?30:-1),a(),I(i.client.clientClassificationId?31:-1),a(),I(i.client.savingsProductId?32:-1),a(),I(i.client.submittedOnDate?33:-1),a(3),v("",m(37,47,"labels.inputs.Active"),"?"),a(3),h(m(40,49,i.client.active)),a(2),I(i.client.activationDate?41:-1),a(),I(i.client.legalFormId===1?42:-1),a(),I(i.client.legalFormId===2?43:-1),a(),I(i.client.familyMembers.length?44:-1),a(),I(i.clientTemplate.isAddressEnabled&&i.client.address&&i.client.address.length?45:-1),a(4),v(" ",m(50,51,"labels.buttons.Previous")," "),a(2),g("routerLink",oe(57,XSe)),a(),v(" ",m(53,53,"labels.buttons.Cancel")," "),a(3),v(" ",m(56,55,"labels.buttons.Submit")," "))},dependencies:[ue,fe,Ae,ve,Ri,Ea,Er,Tr,Mr,Dr,oc,qi,ke,Pi,he,Qn,po],styles:["h2[_ngcontent-%COMP%], h3[_ngcontent-%COMP%], h4[_ngcontent-%COMP%]{margin:0;font-weight:500}span[_ngcontent-%COMP%]{margin:.5em 0}mat-divider[_ngcontent-%COMP%]{margin:0 0 .5em}.margin-t[_ngcontent-%COMP%]{margin-top:2em}.family-member[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{margin:1% auto}.family-member[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{line-height:30px;margin-left:2%}.address[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{margin:1% auto}.address[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{line-height:30px;margin-left:2%}"]})}}return e})();var Owe=["clientFamily"],Awe=["clientAddress"],Fwe=["dtclient"];function kwe(e,o){e&1&&b(0,"fa-icon",16)}function Bwe(e,o){e&1&&b(0,"fa-icon",16)}function Rwe(e,o){e&1&&b(0,"fa-icon",17)}function Nwe(e,o){e&1&&b(0,"fa-icon",18)}function Lwe(e,o){e&1&&b(0,"fa-icon",19)}function Vwe(e,o){e&1&&(c(0),p(1,"translate")),e&2&&h(m(1,1,"labels.inputs.GENERAL"))}function qwe(e,o){e&1&&(c(0),p(1,"translate")),e&2&&h(m(1,1,"labels.inputs.FAMILY MEMBERS"))}function zwe(e,o){e&1&&(c(0),p(1,"translate")),e&2&&h(m(1,1,"labels.inputs.ADDRESS"))}function Hwe(e,o){if(e&1&&(l(0,"mat-step"),F(1,zwe,2,3,"ng-template",12),b(2,"mifosx-client-address-step",20,2),r()),e&2){let t=w();a(2),g("clientTemplate",t.clientTemplate)("clientAddressFieldConfig",t.clientAddressFieldConfig)}}function Gwe(e,o){if(e&1&&c(0),e&2){let t=w().$implicit;h(t.registeredTableName)}}function jwe(e,o){if(e&1&&(l(0,"mat-step"),F(1,Gwe,1,1,"ng-template",12),b(2,"mifosx-client-datatable-step",21,3),r()),e&2){let t=o.$implicit;a(2),g("datatableData",t)}}function $we(e,o){e&1&&(c(0),p(1,"translate")),e&2&&h(m(1,1,"labels.inputs.PREVIEW"))}function Uwe(e,o){if(e&1){let t=Y();l(0,"mat-step",15),F(1,$we,2,3,"ng-template",12),l(2,"mifosx-client-preview-step",22),R("submitEvent",function(){V(t);let i=w();return q(i.submit())}),r()()}if(e&2){let t=w();a(2),g("clientTemplate",t.clientTemplate)("clientAddressFieldConfig",t.clientAddressFieldConfig)("client",t.client)}}var b2=(()=>{class e{constructor(){this.route=T(Ie),this.router=T(qe),this.clientsService=T(Oi),this.settingsService=T(At),this.datatables=[],this.legalFormType=1,this.route.data.subscribe(t=>{this.clientTemplate=t.clientTemplate,this.clientAddressFieldConfig=t.clientAddressFieldConfig,this.setDatatables()})}get clientGeneralForm(){return this.clientGeneralStep.createClientForm}get client(){return this.clientTemplate.isAddressEnabled?at(at(at({},this.clientGeneralStep.clientGeneralDetails),this.clientFamilyMembersStep.familyMembers),this.clientAddressStep.address):at(at({},this.clientGeneralStep.clientGeneralDetails),this.clientFamilyMembersStep.familyMembers)}areFormvalids(){let t=this.clientGeneralForm.valid;return this.clientTemplate.isAddressEnabled&&(t=t&&this.clientAddressStep.address.address.length>0),this.clientTemplate.datatables&&this.clientTemplate.datatables.length>0&&this.clientDatatables&&this.clientDatatables.forEach(n=>{t=t&&n.datatableForm.valid}),t}setDatatables(){this.datatables=[];let t="person";this.legalFormType===2&&(t="entity"),this.clientTemplate.datatables&&this.clientTemplate.datatables.forEach(n=>{n.entitySubType.toLowerCase()===t&&this.datatables.push(n)})}legalFormChange(t){this.legalFormType=t.legalForm,this.setDatatables()}submit(){let t=this.settingsService.language.code,n=this.settingsService.dateFormat,i=qt(at({},this.client),{dateFormat:n,locale:t});if(this.clientTemplate.datatables&&this.clientTemplate.datatables.length>0){let s=[];this.clientDatatables.forEach(d=>{s.push(d.payload)}),i.datatables=s}this.clientsService.createClient(i).subscribe(s=>{this.router.navigate(["../",s.resourceId],{relativeTo:this.route})})}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275cmp=me({type:e,selectors:[["mifosx-create-client"]],viewQuery:function(n,i){if(n&1&&(Ee(Yf,7),Ee(Owe,5),Ee(Awe,5),Ee(Fwe,5)),n&2){let s;Te(s=Me())&&(i.clientGeneralStep=s.first),Te(s=Me())&&(i.clientFamilyMembersStep=s.first),Te(s=Me())&&(i.clientAddressStep=s.first),Te(s=Me())&&(i.clientDatatables=s)}},decls:19,vars:6,consts:[["clientStepper",""],["clientFamily",""],["clientAddress",""],["dtclient",""],[1,"container"],["orientation","vertical","labelPosition","bottom",1,"mat-elevation-z8",3,"linear"],["matStepperIcon","number"],["matStepperIcon","edit"],["matStepperIcon","done"],["matStepperIcon","error"],["matStepperIcon","preview"],[3,"stepControl"],["matStepLabel",""],[3,"legalFormChangeEvent","clientTemplate"],[3,"clientTemplate"],["completed",""],["icon","pencil-alt","size","sm"],["icon","check","size","sm"],["icon","exclamation-triangle","size","lg"],["icon","eye","size","sm"],[3,"clientTemplate","clientAddressFieldConfig"],[3,"datatableData"],[3,"submitEvent","clientTemplate","clientAddressFieldConfig","client"]],template:function(n,i){if(n&1){let s=Y();l(0,"div",4)(1,"mat-stepper",5,0),F(3,kwe,1,0,"ng-template",6)(4,Bwe,1,0,"ng-template",7)(5,Rwe,1,0,"ng-template",8)(6,Nwe,1,0,"ng-template",9)(7,Lwe,1,0,"ng-template",10),l(8,"mat-step",11),F(9,Vwe,2,3,"ng-template",12),l(10,"mifosx-client-general-step",13),R("legalFormChangeEvent",function(u){return V(s),q(i.legalFormChange(u))}),r()(),l(11,"mat-step"),F(12,qwe,2,3,"ng-template",12),b(13,"mifosx-client-family-members-step",14,1),r(),E(15,Hwe,4,2,"mat-step"),Se(16,jwe,4,1,"mat-step",null,Pe),E(18,Uwe,3,3,"mat-step",15),r()()}n&2&&(a(),g("linear",!1),a(7),g("stepControl",i.clientGeneralForm),a(2),g("clientTemplate",i.clientTemplate),a(3),g("clientTemplate",i.clientTemplate),a(2),I(i.clientTemplate.isAddressEnabled?15:-1),a(),we(i.datatables),a(2),I(i.areFormvalids()?18:-1))},dependencies:[ue,fe,fa,da,ke,ua,ma,Yf,_2,C2,v2,x2,he],encapsulation:2})}}return e})();var y2=(()=>{class e{constructor(){this.clientsService=T(Oi)}resolve(t){let n=t.paramMap.get("clientId");return this.clientsService.getClientData(n)}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275prov=Re({token:e,factory:e.\u0275fac})}}return e})();var jM=(()=>{class e{constructor(){this.clientsService=T(Oi)}resolve(t){let n=t.parent.paramMap.get("clientId");return this.clientsService.getClientAccountData(n)}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275prov=Re({token:e,factory:e.\u0275fac})}}return e})();var $M=(()=>{class e{constructor(){this.clientsService=T(Oi)}resolve(t){let n=t.parent.paramMap.get("clientId");return this.clientsService.getClientAddressData(n)}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275prov=Re({token:e,factory:e.\u0275fac})}}return e})();var UM=(()=>{class e{constructor(){this.clientsService=T(Oi)}resolve(t){let n=t.parent.paramMap.get("clientId");return this.clientsService.getClientChargesData(n)}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275prov=Re({token:e,factory:e.\u0275fac})}}return e})();var J9=(()=>{class e{constructor(){this.clientsService=T(Oi)}resolve(t){let n=t.parent.paramMap.get("clientId");return this.clientsService.getClientSummary(n)}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275prov=Re({token:e,factory:e.\u0275fac})}}return e})();var WM=(()=>{class e{constructor(){this.clientsService=T(Oi)}resolve(t){let n=t.parent.parent.paramMap.get("clientId");return this.clientsService.getClientFamilyMembers(n)}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275prov=Re({token:e,factory:e.\u0275fac})}}return e})();var QM=(()=>{class e{constructor(){this.clientsService=T(Oi)}resolve(t){let n=t.parent.parent.parent.paramMap.get("clientId"),i=t.parent.paramMap.get("familyMemberId");return this.clientsService.getClientFamilyMember(n,i)}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275prov=Re({token:e,factory:e.\u0275fac})}}return e})();var eu=(()=>{class e{constructor(){this.clientsService=T(Oi)}resolve(t){return this.clientsService.getClientTemplate()}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275prov=Re({token:e,factory:e.\u0275fac})}}return e})();var YM=(()=>{class e{constructor(){this.clientsService=T(Oi)}resolve(t){let n=t.parent.paramMap.get("clientId"),i;return this.clientsService.getClientIdentifiers(n).pipe(Mn(s=>{i=s;let d=[];return s.forEach(u=>{d.push(this.clientsService.getClientIdentificationDocuments(u.id))}),d0(d).subscribe(u=>{u.forEach((f,_)=>{i[_].documents=f})}),i}))}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275prov=Re({token:e,factory:e.\u0275fac})}}return e})();var JM=(()=>{class e{constructor(){this.clientsService=T(Oi)}resolve(t){let n=t.parent.paramMap.get("clientId");return this.clientsService.getClientNotes(n)}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275prov=Re({token:e,factory:e.\u0275fac})}}return e})();var KM=(()=>{class e{constructor(){this.clientsService=T(Oi)}resolve(t){let n=t.parent.paramMap.get("clientId");return this.clientsService.getClientDocuments(n)}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275prov=Re({token:e,factory:e.\u0275fac})}}return e})();var XM=(()=>{class e{constructor(){this.clientsService=T(Oi)}resolve(){return this.clientsService.getClientDatatables()}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275prov=Re({token:e,factory:e.\u0275fac})}}return e})();var ZM=(()=>{class e{constructor(){this.clientsService=T(Oi)}resolve(t){let n=t.parent.parent.paramMap.get("clientId"),i=t.paramMap.get("datatableName");return this.clientsService.getClientDatatable(n,i)}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275prov=Re({token:e,factory:e.\u0275fac})}}return e})();var e5=(()=>{class e{constructor(){this.clientsService=T(Oi)}resolve(t){let n=t.parent.paramMap.get("clientId");return this.clientsService.getClientIdentifierTemplate(n)}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275prov=Re({token:e,factory:e.\u0275fac})}}return e})();var S2=(()=>{class e{constructor(){this.clientsService=T(Oi)}resolve(){return this.clientsService.getAddressFieldConfiguration()}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275prov=Re({token:e,factory:e.\u0275fac})}}return e})();var t5=(()=>{class e{constructor(){this.clientsService=T(Oi)}resolve(){return this.clientsService.getClientAddressTemplate()}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275prov=Re({token:e,factory:e.\u0275fac})}}return e})();var Wwe=()=>[10,20,25];function Qwe(e,o){e&1&&(l(0,"th",14),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.name")))}function Ywe(e,o){if(e&1&&(l(0,"td",15),b(1,"i",16),p(2,"statusLookup"),c(3),r()),e&2){let t=o.$implicit;a(),g("ngClass",m(2,2,!(t.isWaived||t.isPaid))),a(2),v(" ",t.name," ")}}function Jwe(e,o){e&1&&(l(0,"th",14),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.Due as of")))}function Kwe(e,o){if(e&1&&(l(0,"td",15),c(1),p(2,"dateFormat"),r()),e&2){let t=o.$implicit;a(),h(m(2,1,t.dueDate))}}function Xwe(e,o){e&1&&(l(0,"th",14),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.Due")))}function Zwe(e,o){if(e&1&&(l(0,"td",15),c(1),r()),e&2){let t=o.$implicit;a(),h(t.amount)}}function ePe(e,o){e&1&&(l(0,"th",14),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.Paid")))}function tPe(e,o){if(e&1&&(l(0,"td",15),c(1),r()),e&2){let t=o.$implicit;a(),h(t.amountPaid)}}function iPe(e,o){e&1&&(l(0,"th",14),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.Waived")))}function nPe(e,o){if(e&1&&(l(0,"td",15),c(1),r()),e&2){let t=o.$implicit;a(),h(t.amountWaived)}}function oPe(e,o){e&1&&(l(0,"th",14),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.Outstanding")))}function aPe(e,o){if(e&1&&(l(0,"td",15),c(1),r()),e&2){let t=o.$implicit;a(),h(t.amountOutstanding)}}function rPe(e,o){e&1&&b(0,"tr",17)}function lPe(e,o){e&1&&b(0,"tr",18)}var w2=(()=>{class e{constructor(){this.route=T(Ie),this.dialog=T(Ht),this.displayedColumns=["name","dueAsOf","due","paid","waived","outstanding"],this.route.data.subscribe(t=>{this.chargeOverviewData=t.clientChargesData})}ngOnInit(){this.setLoanClientChargeOverview()}setLoanClientChargeOverview(){this.dataSource=new Wt(this.chargeOverviewData.pageItems),this.dataSource.paginator=this.paginator}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275cmp=me({type:e,selectors:[["mifosx-charges-overview"]],viewQuery:function(n,i){if(n&1&&Ee(kt,7),n&2){let s;Te(s=Me())&&(i.paginator=s.first)}},decls:27,vars:8,consts:[[1,"charges-card"],[1,"tab-container","mat-typography"],["mat-table","",3,"dataSource"],["matColumnDef","name"],["mat-header-cell","",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","dueAsOf"],["matColumnDef","due"],["matColumnDef","paid"],["matColumnDef","waived"],["matColumnDef","outstanding"],["mat-header-row","",4,"matHeaderRowDef"],["mat-row","",4,"matRowDef","matRowDefColumns"],["showFirstLastButtons","",3,"pageSizeOptions"],["mat-header-cell",""],["mat-cell",""],[1,"fa","fa-stop",3,"ngClass"],["mat-header-row",""],["mat-row",""]],template:function(n,i){n&1&&(l(0,"mat-card",0)(1,"div",1)(2,"h2"),c(3),p(4,"translate"),r(),l(5,"table",2),X(6,3),F(7,Qwe,3,3,"th",4)(8,Ywe,4,4,"td",5),Z(),X(9,6),F(10,Jwe,3,3,"th",4)(11,Kwe,3,3,"td",5),Z(),X(12,7),F(13,Xwe,3,3,"th",4)(14,Zwe,2,1,"td",5),Z(),X(15,8),F(16,ePe,3,3,"th",4)(17,tPe,2,1,"td",5),Z(),X(18,9),F(19,iPe,3,3,"th",4)(20,nPe,2,1,"td",5),Z(),X(21,10),F(22,oPe,3,3,"th",4)(23,aPe,2,1,"td",5),Z(),F(24,rPe,1,0,"tr",11)(25,lPe,1,0,"tr",12),r(),b(26,"mat-paginator",13),r()()),n&2&&(a(3),h(m(4,5,"labels.heading.Charges Overview")),a(2),g("dataSource",i.dataSource),a(19),g("matHeaderRowDef",i.displayedColumns),a(),g("matRowDefColumns",i.displayedColumns),a(),g("pageSizeOptions",oe(7,Wwe)))},dependencies:[ue,co,fe,$e,_t,xt,vt,bt,Ct,yt,St,Pt,wt,Tt,kt,Pi,he,go],styles:["table[_ngcontent-%COMP%]{width:100%;margin-top:3%}.tab-container[_ngcontent-%COMP%]{padding:1%;margin:1%}.charges-card[_ngcontent-%COMP%]{margin:0 auto;max-width:80rem;width:90%}"]})}}return e})();var i5=(()=>{class e{constructor(){this.clientsService=T(Oi)}resolve(t){let n=t.parent.params.clientId;return this.clientsService.getAllClientCharges(n)}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275prov=Re({token:e,factory:e.\u0275fac})}}return e})();var n5=(()=>{class e{constructor(){this.clientsService=T(Oi),this.productsService=T(ci)}resolve(t){let n=t.paramMap.get("name"),i=t.paramMap.get("clientId")||t.parent.parent.paramMap.get("clientId");switch(n){case"Survey":return this.clientsService.getSurveys(i);case"Take Survey":return this.clientsService.getAllSurveysType();case"Close":return this.clientsService.getClientCommandTemplate("close");case"Reject":return this.clientsService.getClientCommandTemplate("reject");case"Withdraw":return this.clientsService.getClientCommandTemplate("withdraw");case"Transfer Client":return this.clientsService.getOffices();case"Add Charge":return this.clientsService.getClientChargeTemplate(i);case"Create Collateral":return this.productsService.getCollaterals();case"Client Screen Reports":return this.clientsService.getClientReportTemplates();case"Assign Staff":case"Update Default Savings":return this.clientsService.getClientDataAndTemplate(i);case"Undo Transfer":case"Accept Transfer":case"Reject Transfer":return this.clientsService.getClientTransferProposalDate(i);default:return}}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275prov=Re({token:e,factory:e.\u0275fac})}}return e})();var o5=(()=>{class e{constructor(){this.clientsService=T(Oi)}resolve(t){let n=t.parent.parent.parent.paramMap.get("clientId"),i=t.paramMap.get("chargeId");return this.clientsService.getSelectedChargeData(n,i)}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275prov=Re({token:e,factory:e.\u0275fac})}}return e})();var a5=(()=>{class e{constructor(){this.clientsService=T(Oi)}resolve(t){let n=t.parent.parent.parent.paramMap.get("clientId"),i=t.paramMap.get("chargeId");return this.clientsService.getClientTransactionPay(n,i)}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275prov=Re({token:e,factory:e.\u0275fac})}}return e})();var r5=(()=>{class e{constructor(){this.clientsService=T(Oi)}resolve(t){let n=t.paramMap.get("clientId");return this.clientsService.getClientDataAndTemplate(n)}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275prov=Re({token:e,factory:e.\u0275fac})}}return e})();var l5=(()=>{class e{constructor(){this.clientsService=T(Oi)}resolve(t){let n=t.parent.paramMap.get("clientId");return this.clientsService.getCollateralTemplate(n)}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275prov=Re({token:e,factory:e.\u0275fac})}}return e})();var sPe=[_o.withShell([{path:"clients",data:{title:"Clients",breadcrumb:"Clients",routeParamBreadcrumb:!1},children:[{path:"",component:IC},{path:"create",data:{title:"Create Client",breadcrumb:"Create Client",routeParamBreadcrumb:!1},component:b2,resolve:{clientAddressFieldConfig:S2,clientTemplate:eu}},{path:":clientId",component:qC,data:{title:"Clients View",routeParamBreadcrumb:"clientId"},resolve:{clientViewData:y2,clientTemplateData:eu,clientDatatables:XM},children:[{path:"",redirectTo:"general",pathMatch:"full"},{path:"general",component:zC,data:{title:"General",breadcrumb:"General",routeParamBreadcrumb:!1},resolve:{clientAccountsData:jM,clientChargesData:UM,clientCollateralData:l5}},{path:"address",component:YC,data:{title:"Address",breadcrumb:"Address",routeParamBreadcrumb:!1},resolve:{clientAddressFieldConfig:S2,clientAddressTemplateData:t5,clientAddressData:$M}},{path:"family-members",data:{title:"Family Members",breadcrumb:"Family Members",routeParamBreadcrumb:!1},children:[{path:"",component:HC,resolve:{clientFamilyMembers:WM}},{path:"add",component:GC,data:{title:"Add",breadcrumb:"Add",routeParamBreadcrumb:!1},resolve:{clientTemplate:eu}},{path:":familyMemberId",children:[{path:"edit",component:jC,data:{title:"Family Member View",routeParamBreadcrumb:"familyMemberId"},resolve:{clientTemplate:eu,editFamilyMember:QM}}]}]},{path:"identities",component:$C,data:{title:"Identities",breadcrumb:"Identities",routeParamBreadcrumb:!1},resolve:{clientIdentities:YM,clientIdentifierTemplate:e5}},{path:"documents",component:WC,data:{title:"Documents",breadcrumb:"Documents",routeParamBreadcrumb:!1},resolve:{clientDocuments:KM}},{path:"notes",component:UC,data:{title:"Notes",breadcrumb:"Notes",routeParamBreadcrumb:!1},resolve:{clientNotes:JM}},{path:"datatables",children:[{path:":datatableName",component:QC,data:{title:"Data Table View",routeParamBreadcrumb:"datatableName"},resolve:{clientDatatable:ZM}}]}]}]},{path:"clients",data:{title:"Clients",breadcrumb:"Clients",routeParamBreadcrumb:!1},children:[{path:":clientId",data:{title:"Clients View",routeParamBreadcrumb:"clientId"},resolve:{clientViewData:y2},children:[{path:"edit",data:{title:"Edit Client",breadcrumb:"Edit",routeParamBreadcrumb:!1},component:g2,resolve:{clientDataAndTemplate:r5}},{path:"actions/:name",data:{title:"Client Actions",routeParamBreadcrumb:"name"},component:u2,resolve:{clientActionData:n5}},{path:"charges",children:[{path:"overview",data:{title:"Charges Overview",breadcrumb:"Charges Overview"},component:w2,resolve:{clientChargesData:i5}},{path:":chargeId",data:{title:"Charges",routeParamBreadcrumb:"chargeId"},children:[{path:"",component:f2,resolve:{clientChargeData:o5}},{path:"pay",data:{title:"Pay Charge",routeParamBreadcrumb:!1},component:h2,resolve:{transactionData:a5}}]}]},{path:"loans-accounts",loadChildren:()=>import("./loans.module-2KH4LJVS.js").then(e=>e.LoansModule)},{path:"client-collateral",loadChildren:()=>import("./collaterals.module-WP7AP2ZF.js").then(e=>e.CollateralsModule)},{path:"fixed-deposits-accounts",loadChildren:()=>import("./fixed-deposits.module-47AX7ZXR.js").then(e=>e.FixedDepositsModule)},{path:"savings-accounts",loadChildren:()=>import("./savings.module-XEA55LW5.js").then(e=>e.SavingsModule)},{path:"recurring-deposits-accounts",loadChildren:()=>import("./recurring-deposits.module-ORDTWEA6.js").then(e=>e.RecurringDepositsModule)},{path:"shares-accounts",loadChildren:()=>import("./shares.module-7U5BMOVV.js").then(e=>e.SharesModule)},{path:"standing-instructions",loadChildren:()=>import("./account-transfers.module-IS46QWMU.js").then(e=>e.AccountTransfersModule)}]}]}])],K9=(()=>{class e{static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275mod=Gi({type:e})}static{this.\u0275inj=Hi({providers:[y2,jM,$M,UM,J9,WM,QM,eu,YM,JM,KM,XM,ZM,e5,S2,t5,i5,n5,o5,a5,r5,l5],imports:[gn.forChild(sPe),gn]})}}return e})();var cPe=e=>({editForm:e}),X9=(()=>{class e{constructor(){this.dialogRef=T(eo),this.formBuilder=T(nt),this.data=T(Po)}ngOnInit(){this.createNoteForm()}createNoteForm(){this.noteForm=this.formBuilder.group({note:[this.data.noteContent,se.required]})}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275cmp=me({type:e,selectors:[["mifosx-edit-notes-dialog"]],decls:15,vars:14,consts:[["formRef","ngForm"],["mat-dialog-title",""],[3,"formGroup"],["formControlName","note","matInput","","placeholder","Write a note ...."],["align","end"],["mat-raised-button","","mat-dialog-close",""],["mat-raised-button","","color","primary",3,"disabled","mat-dialog-close"]],template:function(n,i){n&1&&(l(0,"h1",1),c(1),p(2,"translate"),r(),l(3,"div")(4,"form",2,0)(6,"mat-form-field"),b(7,"textarea",3),r(),l(8,"mat-dialog-actions",4)(9,"button",5),c(10),p(11,"translate"),r(),l(12,"button",6),c(13),p(14,"translate"),r()()()()),n&2&&(a(),h(m(2,6,"labels.heading.Edit Note")),a(3),g("formGroup",i.noteForm),a(6),h(m(11,8,"labels.buttons.Cancel")),a(2),g("disabled",i.noteForm.pristine)("mat-dialog-close",Nt(12,cPe,i.noteForm)),a(),v(" ",m(14,10,"labels.buttons.Confirm")," "))},dependencies:[ue,fe,tt,st,Ue,Xe,Ze,et,Fe,ze,ve,Wn,Nn,Un,he],encapsulation:2})}}return e})();var Z9=(()=>{class e{static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275mod=Gi({type:e})}static{this.\u0275inj=Hi({imports:[oo,K9,ha,Ir,IC,qC,zC,HC,GC,jC,$C,Ug,UC,X9,WC,QC,YC,w2,u2,JC,OC,KC,XC,ZC,e2,t2,p2,i2,n2,o2,a2,r2,l2,s2,c2,f2,h2,RC,AC,NC,LC,m2,g2,b2,Yf,_2,x2,C2,Jf,VC,d2,v2]})}}return e})();var P2=class{constructor(o){this.groupsService=o,this.groupsSubject=new Na([]),this.recordsSubject=new Na(0),this.records$=this.recordsSubject.asObservable()}getGroups(o,t="",n="",i=0,s=10,d=!0){this.groupsSubject.next([]),this.groupsService.getGroups(o,t,n,i*s,s).subscribe(u=>{u.pageItems=d?u.pageItems.filter(f=>f.active):u.pageItems,this.recordsSubject.next(u.totalFilteredRecords),this.groupsSubject.next(u.pageItems)})}connect(o){return this.groupsSubject.asObservable()}disconnect(o){this.groupsSubject.complete(),this.recordsSubject.complete()}};var pPe=["showClosedGroups"],mPe=()=>["../","organization","bulk-import","Groups"],dPe=()=>[10,25,50,100],uPe=()=>["create"],fPe=e=>[e,"general"];function hPe(e,o){e&1&&(l(0,"button",8),b(1,"fa-icon",23),c(2),p(3,"translate"),r()),e&2&&(g("routerLink",oe(4,uPe)),a(2),v("",m(3,2,"labels.buttons.Create Group")," "))}function gPe(e,o){e&1&&(l(0,"th",24),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.name")))}function _Pe(e,o){if(e&1&&(l(0,"td",25),c(1),r()),e&2){let t=o.$implicit;a(),h(t.name)}}function CPe(e,o){e&1&&(l(0,"th",26),c(1),p(2,"translate"),r()),e&2&&(a(),v("",m(2,1,"labels.inputs.Account")," #"))}function vPe(e,o){if(e&1&&(l(0,"td",25),c(1),r()),e&2){let t=o.$implicit;a(),h(t.accountNo)}}function xPe(e,o){e&1&&(l(0,"th",26),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.External Id")))}function bPe(e,o){if(e&1&&(l(0,"td",25),c(1),r()),e&2){let t=o.$implicit;a(),h(t.externalId)}}function yPe(e,o){e&1&&(l(0,"th",26),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.Status")))}function SPe(e,o){if(e&1&&(l(0,"td",25)(1,"div",27),p(2,"statusLookup"),b(3,"fa-icon",28),r()()),e&2){let t=o.$implicit;a(),g("ngClass",m(2,1,t.status.code))}}function wPe(e,o){e&1&&(l(0,"th",24),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.Office Name")))}function PPe(e,o){if(e&1&&(l(0,"td",25),c(1),r()),e&2){let t=o.$implicit;a(),h(t.officeName)}}function TPe(e,o){e&1&&b(0,"tr",29)}function MPe(e,o){if(e&1&&b(0,"tr",30),e&2){let t=o.$implicit;g("routerLink",Nt(1,fPe,t.id))}}var T2=(()=>{class e{constructor(){this.groupsService=T(An),this.name=new it,this.displayedColumns=["name","accountNo","externalId","status","officeName"],this.filterGroupsBy=[{type:"name",value:""}]}ngOnInit(){this.getGroups()}ngAfterViewInit(){this.name.valueChanges.pipe(Oo(500),Ao(),Eo(t=>{this.applyFilter(t,"name")})).subscribe(),this.sort.sortChange.subscribe(()=>this.paginator.pageIndex=0),fl(this.sort.sortChange,this.paginator.page).pipe(Eo(()=>this.loadGroupsPage())).subscribe()}changeShowClosedGroups(){this.loadGroupsPage()}loadGroupsPage(){this.sort.direction||delete this.sort.active,this.dataSource.getGroups(this.filterGroupsBy,this.sort.active,this.sort.direction,this.paginator.pageIndex,this.paginator.pageSize,!this.showClosedGroups.checked)}applyFilter(t,n){this.paginator.pageIndex=0;let i=this.filterGroupsBy.findIndex(s=>s.type===n);this.filterGroupsBy[i].value=t,this.loadGroupsPage()}getGroups(){this.dataSource=new P2(this.groupsService),this.dataSource.getGroups(this.filterGroupsBy,this.sort.active,this.sort.direction,this.paginator.pageIndex,this.paginator.pageSize)}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275cmp=me({type:e,selectors:[["mifosx-app-groups"]],viewQuery:function(n,i){if(n&1&&(Ee(pPe,7),Ee(kt,7),Ee(It,7)),n&2){let s;Te(s=Me())&&(i.showClosedGroups=s.first),Te(s=Me())&&(i.paginator=s.first),Te(s=Me())&&(i.sort=s.first)}},decls:35,vars:19,consts:[["showClosedGroups",""],[1,"container"],[1,"layout-column","layout-gt-sm-row","align-gt-sm-start-center"],[1,"search-box","m-r-30"],[1,"search-box"],["matInput","","placeholder","Search by Name",3,"formControl"],["labelPosition","after",1,"m-r-10",3,"change"],[1,"action-button","gap-25px"],["mat-raised-button","","color","primary",3,"routerLink"],["icon","download",1,"m-r-20"],["mat-raised-button","","color","primary",3,"routerLink",4,"mifosxHasPermission"],["mat-table","","matSort","",1,"bordered-table",3,"dataSource"],["matColumnDef","name"],["mat-header-cell","","mat-sort-header","",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","accountNo"],["mat-header-cell","",4,"matHeaderCellDef"],["matColumnDef","externalId"],["matColumnDef","status"],["matColumnDef","officeName"],["mat-header-row","",4,"matHeaderRowDef"],["mat-row","","class","select-row",3,"routerLink",4,"matRowDef","matRowDefColumns"],["showFirstLastButtons","",3,"length","pageSize","pageSizeOptions"],["icon","plus",1,"m-r-20"],["mat-header-cell","","mat-sort-header",""],["mat-cell",""],["mat-header-cell",""],[3,"ngClass"],["icon","stop"],["mat-header-row",""],["mat-row","",1,"select-row",3,"routerLink"]],template:function(n,i){if(n&1){let s=Y();l(0,"mat-card",1)(1,"div",2)(2,"div",3)(3,"mat-form-field",4),b(4,"input",5),r(),l(5,"mat-checkbox",6,0),R("change",function(){return V(s),q(i.changeShowClosedGroups())}),c(7),p(8,"translate"),r()(),l(9,"div",7)(10,"button",8),b(11,"fa-icon",9),c(12),p(13,"translate"),r(),F(14,hPe,4,5,"button",10),r()(),l(15,"table",11),X(16,12),F(17,gPe,3,3,"th",13)(18,_Pe,2,1,"td",14),Z(),X(19,15),F(20,CPe,3,3,"th",16)(21,vPe,2,1,"td",14),Z(),X(22,17),F(23,xPe,3,3,"th",16)(24,bPe,2,1,"td",14),Z(),X(25,18),F(26,yPe,3,3,"th",16)(27,SPe,4,3,"td",14),Z(),X(28,19),F(29,wPe,3,3,"th",13)(30,PPe,2,1,"td",14),Z(),F(31,TPe,1,0,"tr",20)(32,MPe,1,3,"tr",21),r(),b(33,"mat-paginator",22),p(34,"async"),r()}n&2&&(a(4),g("formControl",i.name),a(3),h(m(8,11,"labels.inputs.Show Closed Groups")),a(3),g("routerLink",oe(17,mPe)),a(2),v("",m(13,13,"labels.buttons.Import Group")," "),a(2),g("mifosxHasPermission","CREATE_GROUP"),a(),g("dataSource",i.dataSource),a(16),g("matHeaderRowDef",i.displayedColumns),a(),g("matRowDefColumns",i.displayedColumns),a(),g("length",m(34,15,i.dataSource==null?null:i.dataSource.records$))("pageSize",10)("pageSizeOptions",oe(18,dPe)))},dependencies:[ue,co,fe,st,Ue,_n,Ae,$e,Fe,ze,ve,fi,Ke,ke,_t,It,xt,vt,bt,ri,Ct,yt,St,Pt,wt,Tt,kt,Xa,he,go],styles:[".container[_ngcontent-%COMP%]{padding:24px}.container[_ngcontent-%COMP%] .layout-column[_ngcontent-%COMP%], .container[_ngcontent-%COMP%] .layout-gt-sm-row[_ngcontent-%COMP%]{display:flex;align-items:center;margin-bottom:20px;flex-wrap:nowrap;gap:20px}.container[_ngcontent-%COMP%] .layout-column.align-gt-sm-start-center[_ngcontent-%COMP%], .container[_ngcontent-%COMP%] .layout-gt-sm-row.align-gt-sm-start-center[_ngcontent-%COMP%]{align-items:center;justify-content:flex-start}.container[_ngcontent-%COMP%] .layout-column[_ngcontent-%COMP%] .search-box[_ngcontent-%COMP%], .container[_ngcontent-%COMP%] .layout-gt-sm-row[_ngcontent-%COMP%] .search-box[_ngcontent-%COMP%]{display:flex;align-items:center;gap:15px;flex:1;min-width:0}.container[_ngcontent-%COMP%] .layout-column[_ngcontent-%COMP%] .search-box.m-r-30[_ngcontent-%COMP%], .container[_ngcontent-%COMP%] .layout-gt-sm-row[_ngcontent-%COMP%] .search-box.m-r-30[_ngcontent-%COMP%]{margin-right:30px}.container[_ngcontent-%COMP%] .layout-column[_ngcontent-%COMP%] .search-box[_ngcontent-%COMP%] mat-form-field[_ngcontent-%COMP%], .container[_ngcontent-%COMP%] .layout-gt-sm-row[_ngcontent-%COMP%] .search-box[_ngcontent-%COMP%] mat-form-field[_ngcontent-%COMP%]{min-width:200px;flex:1}.container[_ngcontent-%COMP%] .layout-column[_ngcontent-%COMP%] .search-box[_ngcontent-%COMP%] mat-form-field.search-box[_ngcontent-%COMP%], .container[_ngcontent-%COMP%] .layout-gt-sm-row[_ngcontent-%COMP%] .search-box[_ngcontent-%COMP%] mat-form-field.search-box[_ngcontent-%COMP%]{width:auto}.container[_ngcontent-%COMP%] .layout-column[_ngcontent-%COMP%] .search-box[_ngcontent-%COMP%] mat-form-field[_ngcontent-%COMP%] + mat-form-field[_ngcontent-%COMP%], .container[_ngcontent-%COMP%] .layout-gt-sm-row[_ngcontent-%COMP%] .search-box[_ngcontent-%COMP%] mat-form-field[_ngcontent-%COMP%] + mat-form-field[_ngcontent-%COMP%]{margin-left:15px}.container[_ngcontent-%COMP%] .layout-column[_ngcontent-%COMP%] .search-box[_ngcontent-%COMP%] mat-checkbox[_ngcontent-%COMP%], .container[_ngcontent-%COMP%] .layout-gt-sm-row[_ngcontent-%COMP%] .search-box[_ngcontent-%COMP%] mat-checkbox[_ngcontent-%COMP%]{white-space:nowrap;flex-shrink:0;margin-left:15px}.container[_ngcontent-%COMP%] .layout-column[_ngcontent-%COMP%] .search-box[_ngcontent-%COMP%] mat-checkbox.m-r-10[_ngcontent-%COMP%], .container[_ngcontent-%COMP%] .layout-gt-sm-row[_ngcontent-%COMP%] .search-box[_ngcontent-%COMP%] mat-checkbox.m-r-10[_ngcontent-%COMP%]{margin-right:10px}.container[_ngcontent-%COMP%] .layout-column[_ngcontent-%COMP%] .action-button[_ngcontent-%COMP%], .container[_ngcontent-%COMP%] .layout-gt-sm-row[_ngcontent-%COMP%] .action-button[_ngcontent-%COMP%]{display:flex;align-items:center;flex-shrink:0;margin-left:auto}.container[_ngcontent-%COMP%] .layout-column[_ngcontent-%COMP%] .action-button.gap-25px[_ngcontent-%COMP%], .container[_ngcontent-%COMP%] .layout-gt-sm-row[_ngcontent-%COMP%] .action-button.gap-25px[_ngcontent-%COMP%]{gap:25px}.container[_ngcontent-%COMP%] .layout-column[_ngcontent-%COMP%] .action-button[_ngcontent-%COMP%] button[_ngcontent-%COMP%], .container[_ngcontent-%COMP%] .layout-gt-sm-row[_ngcontent-%COMP%] .action-button[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{white-space:nowrap}.container[_ngcontent-%COMP%] .layout-column[_ngcontent-%COMP%] .action-button[_ngcontent-%COMP%] button[_ngcontent-%COMP%] fa-icon.m-r-10[_ngcontent-%COMP%], .container[_ngcontent-%COMP%] .layout-column[_ngcontent-%COMP%] .action-button[_ngcontent-%COMP%] button[_ngcontent-%COMP%] fa-icon.m-r-20[_ngcontent-%COMP%], .container[_ngcontent-%COMP%] .layout-gt-sm-row[_ngcontent-%COMP%] .action-button[_ngcontent-%COMP%] button[_ngcontent-%COMP%] fa-icon.m-r-10[_ngcontent-%COMP%], .container[_ngcontent-%COMP%] .layout-gt-sm-row[_ngcontent-%COMP%] .action-button[_ngcontent-%COMP%] button[_ngcontent-%COMP%] fa-icon.m-r-20[_ngcontent-%COMP%]{margin-right:10px}.container[_ngcontent-%COMP%] .bordered-table[_ngcontent-%COMP%]{width:100%;border:1px solid #e0e0e0;border-radius:4px;overflow:hidden;margin-top:16px}.container[_ngcontent-%COMP%] .bordered-table[_ngcontent-%COMP%] .select-row[_ngcontent-%COMP%]{cursor:pointer}.container[_ngcontent-%COMP%] .bordered-table[_ngcontent-%COMP%] .select-row[_ngcontent-%COMP%]:hover{background-color:#f5f5f5}.container[_ngcontent-%COMP%] .bordered-table[_ngcontent-%COMP%] th[_ngcontent-%COMP%], .container[_ngcontent-%COMP%] .bordered-table[_ngcontent-%COMP%] td[_ngcontent-%COMP%]{padding:12px 16px}.container[_ngcontent-%COMP%] .bordered-table[_ngcontent-%COMP%] th[_ngcontent-%COMP%]{font-weight:500;border-bottom:1px solid #e0e0e0}.container[_ngcontent-%COMP%] .bordered-table[_ngcontent-%COMP%] tr[_ngcontent-%COMP%]{border-bottom:1px solid #f0f0f0}.container[_ngcontent-%COMP%] .bordered-table[_ngcontent-%COMP%] tr[_ngcontent-%COMP%]:last-child{border-bottom:none}.container[_ngcontent-%COMP%] mat-paginator[_ngcontent-%COMP%]{border-top:1px solid #e0e0e0;margin-top:0}.container[_ngcontent-%COMP%] mat-progress-bar[_ngcontent-%COMP%]{margin:0}@media (width <= 768px){.container[_ngcontent-%COMP%]{padding:16px}.container[_ngcontent-%COMP%] .layout-column[_ngcontent-%COMP%], .container[_ngcontent-%COMP%] .layout-gt-sm-row[_ngcontent-%COMP%]{flex-wrap:wrap}.container[_ngcontent-%COMP%] .layout-column[_ngcontent-%COMP%] .search-box[_ngcontent-%COMP%], .container[_ngcontent-%COMP%] .layout-gt-sm-row[_ngcontent-%COMP%] .search-box[_ngcontent-%COMP%]{width:100%;margin-right:0!important;margin-bottom:15px;flex-wrap:wrap}.container[_ngcontent-%COMP%] .layout-column[_ngcontent-%COMP%] .search-box[_ngcontent-%COMP%] mat-form-field[_ngcontent-%COMP%], .container[_ngcontent-%COMP%] .layout-gt-sm-row[_ngcontent-%COMP%] .search-box[_ngcontent-%COMP%] mat-form-field[_ngcontent-%COMP%]{min-width:150px;margin-bottom:10px}.container[_ngcontent-%COMP%] .layout-column[_ngcontent-%COMP%] .search-box[_ngcontent-%COMP%] mat-form-field[_ngcontent-%COMP%] + mat-form-field[_ngcontent-%COMP%], .container[_ngcontent-%COMP%] .layout-gt-sm-row[_ngcontent-%COMP%] .search-box[_ngcontent-%COMP%] mat-form-field[_ngcontent-%COMP%] + mat-form-field[_ngcontent-%COMP%]{margin-left:0}.container[_ngcontent-%COMP%] .layout-column[_ngcontent-%COMP%] .search-box[_ngcontent-%COMP%] mat-checkbox[_ngcontent-%COMP%], .container[_ngcontent-%COMP%] .layout-gt-sm-row[_ngcontent-%COMP%] .search-box[_ngcontent-%COMP%] mat-checkbox[_ngcontent-%COMP%]{margin-left:0;margin-top:10px}.container[_ngcontent-%COMP%] .layout-column[_ngcontent-%COMP%] .action-button[_ngcontent-%COMP%], .container[_ngcontent-%COMP%] .layout-gt-sm-row[_ngcontent-%COMP%] .action-button[_ngcontent-%COMP%]{margin-left:0;width:100%;justify-content:center}.container[_ngcontent-%COMP%] .layout-column[_ngcontent-%COMP%] .action-button.gap-25px[_ngcontent-%COMP%], .container[_ngcontent-%COMP%] .layout-gt-sm-row[_ngcontent-%COMP%] .action-button.gap-25px[_ngcontent-%COMP%]{gap:15px}}table[_ngcontent-%COMP%]{width:100%}table[_ngcontent-%COMP%] tr.select-row[_ngcontent-%COMP%]:hover{cursor:pointer}.m-r-10[_ngcontent-%COMP%]{margin-right:10px!important}.m-r-20[_ngcontent-%COMP%]{margin-right:20px!important}.m-r-30[_ngcontent-%COMP%]{margin-right:30px!important}"]})}}return e})();var DPe=()=>({confirm:!0}),M2=(()=>{class e{constructor(){this.dialogRef=T(eo)}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275cmp=me({type:e,selectors:[["mifosx-unassign-staff-dialog"]],decls:14,vars:14,consts:[["mat-dialog-title",""],["mat-dialog-content",""],["align","end"],["mat-raised-button","","mat-dialog-close",""],["mat-raised-button","","color","warn",3,"mat-dialog-close"]],template:function(n,i){n&1&&(l(0,"h1",0),c(1),p(2,"translate"),r(),l(3,"div",1)(4,"p"),c(5),p(6,"translate"),r()(),l(7,"mat-dialog-actions",2)(8,"button",3),c(9),p(10,"translate"),r(),l(11,"button",4),c(12),p(13,"translate"),r()()),n&2&&(a(),h(m(2,5,"labels.heading.Unassign Role")),a(4),v("",m(6,7,"labels.text.Unassign staff for this group")," ?"),a(4),h(m(10,9,"labels.buttons.Cancel")),a(2),g("mat-dialog-close",oe(13,DPe)),a(),v(" ",m(13,11,"labels.buttons.Confirm")," "))},dependencies:[ue,fe,ve,Wn,ho,Nn,Un,he],encapsulation:2})}}return e})();var EPe=()=>["./general"],IPe=()=>["./committee"],OPe=()=>["savings-accounts","create"],APe=()=>["loans-accounts","create"],FPe=()=>["loans-accounts","glim-account","create"],kPe=()=>["savings-accounts","gsim-account","create"],BPe=()=>["./notes"],RPe=e=>["./datatables",e];function NPe(e,o){if(e&1&&(l(0,"span")(1,"b"),c(2),p(3,"translate"),r(),c(4),p(5,"dateFormat"),r()),e&2){let t=w();a(2),v("",m(3,2,"labels.inputs.Closure Date")," :"),a(2),v(" ",m(5,4,t.groupViewData.timeline.closedOnDate)," ")}}function LPe(e,o){if(e&1){let t=Y();l(0,"i",30),R("click",function(){V(t);let i=w(2);return q(i.doAction("Edit Meeting"))}),r()}}function VPe(e,o){if(e&1&&(l(0,"div")(1,"p"),c(2),p(3,"translate"),p(4,"dateFormat"),E(5,LPe,1,0,"i",29),b(6,"br"),c(7),p(8,"translate"),p(9,"lowercase"),r()()),e&2){let t=w();a(2),le(" ",m(3,5,"labels.inputs.Next Meeting on"),": ",m(4,7,t.groupViewData.collectionMeetingCalendar==null?null:t.groupViewData.collectionMeetingCalendar.nextTenRecurringDates[0])," "),a(3),I(t.editMeeting?5:-1),a(2),le(" ",m(8,9,"labels.inputs.Meeting Frequency"),": ",m(9,11,t.groupViewData.collectionMeetingCalendar==null?null:t.groupViewData.collectionMeetingCalendar.frequency.value)," ")}}function qPe(e,o){e&1&&(l(0,"div")(1,"p"),c(2),p(3,"translate"),p(4,"translate"),b(5,"i",31)(6,"br"),c(7),p(8,"translate"),p(9,"translate"),r()()),e&2&&(a(2),le(" ",m(3,4,"labels.inputs.Next Meeting on"),": ",m(4,6,"labels.inputs.Unassigned")," "),a(5),le(" ",m(8,8,"labels.inputs.Meeting Frequency"),": ",m(9,10,"labels.inputs.N/A")," "))}function zPe(e,o){if(e&1){let t=Y();l(0,"button",32),R("click",function(){V(t);let i=w(2);return q(i.doAction("Activate"))}),l(1,"mat-icon",33),b(2,"fa-icon",34),r(),l(3,"span"),c(4),p(5,"translate"),r()()}e&2&&(a(4),h(m(5,1,"labels.buttons.Activate")))}function HPe(e,o){e&1&&(l(0,"span"),F(1,zPe,6,3,"button",23),r()),e&2&&(a(),g("mifosxHasPermission","UPDATE_GROUP"))}function GPe(e,o){if(e&1){let t=Y();l(0,"button",32),R("click",function(){V(t);let i=w();return q(i.doAction("Edit"))}),l(1,"mat-icon",33),b(2,"fa-icon",35),r(),l(3,"span"),c(4),p(5,"translate"),r()()}e&2&&(a(4),h(m(5,1,"labels.buttons.Edit")))}function jPe(e,o){if(e&1){let t=Y();l(0,"button",32),R("click",function(){V(t);let i=w();return q(i.doAction("Transfer Clients"))}),l(1,"mat-icon",33),b(2,"fa-icon",36),r(),l(3,"span"),c(4),p(5,"translate"),r()()}e&2&&(a(4),h(m(5,1,"labels.buttons.Transfer Clients")))}function $Pe(e,o){if(e&1){let t=Y();l(0,"button",32),R("click",function(){V(t);let i=w();return q(i.doAction("Manage Members"))}),l(1,"mat-icon",33),b(2,"fa-icon",37),r(),l(3,"span"),c(4),p(5,"translate"),r()()}e&2&&(a(4),h(m(5,1,"labels.buttons.Manage Members")))}function UPe(e,o){if(e&1&&(l(0,"button",24)(1,"mat-icon",33),b(2,"fa-icon",38),r(),l(3,"span"),c(4),p(5,"translate"),r()()),e&2){w();let t=xe(55);g("matMenuTriggerFor",t),a(4),h(m(5,2,"labels.buttons.Applications"))}}function WPe(e,o){e&1&&(l(0,"button",40),c(1),p(2,"translate"),r()),e&2&&(a(),v(" ",m(2,1,"labels.buttons.Bulk JLG Loan Application")," "))}function QPe(e,o){e&1&&(l(0,"span"),F(1,WPe,3,3,"button",39),r()),e&2&&(a(),g("mifosxHasPermission","CREATE_LOAN"))}function YPe(e,o){e&1&&(l(0,"button",41),c(1),p(2,"translate"),r()),e&2&&(g("routerLink",oe(4,OPe)),a(),v(" ",m(2,2,"labels.buttons.Group Saving Application")," "))}function JPe(e,o){e&1&&(l(0,"button",41),c(1),p(2,"translate"),r()),e&2&&(g("routerLink",oe(4,APe)),a(),v(" ",m(2,2,"labels.buttons.Group Loan Application")," "))}function KPe(e,o){e&1&&(l(0,"button",41),c(1),p(2,"translate"),r()),e&2&&(g("routerLink",oe(4,FPe)),a(),v(" ",m(2,2,"labels.buttons.GLIM Application")," "))}function XPe(e,o){e&1&&(l(0,"span"),F(1,KPe,3,5,"button",25),r()),e&2&&(a(),g("mifosxHasPermission","CREATE_LOAN"))}function ZPe(e,o){e&1&&(l(0,"button",41),c(1),p(2,"translate"),r()),e&2&&(g("routerLink",oe(4,kPe)),a(),v(" ",m(2,2,"labels.buttons.GSIM Application")," "))}function eTe(e,o){e&1&&(l(0,"span"),F(1,ZPe,3,5,"button",25),r()),e&2&&(a(),g("mifosxHasPermission","CREATE_GSIMACCOUNT"))}function tTe(e,o){if(e&1){let t=Y();l(0,"button",32),R("click",function(){V(t);let i=w(2);return q(i.doAction("Attendance"))}),c(1),p(2,"translate"),r()}e&2&&(a(),v(" ",m(2,1,"labels.buttons.Attendance")," "))}function iTe(e,o){e&1&&(l(0,"span"),F(1,tTe,3,3,"button",23),r()),e&2&&(a(),g("mifosxHasPermission","SAVEORUPDATEATTENDANCE_MEETING"))}function nTe(e,o){if(e&1){let t=Y();l(0,"button",32),R("click",function(){V(t);let i=w(2);return q(i.doAction("Assign Staff"))}),c(1),p(2,"translate"),r()}e&2&&(a(),v(" ",m(2,1,"labels.buttons.Assign Staff")," "))}function oTe(e,o){e&1&&(l(0,"span"),F(1,nTe,3,3,"button",23),r()),e&2&&(a(),g("mifosxHasPermission","ASSIGNSTAFF_GROUP"))}function aTe(e,o){if(e&1){let t=Y();l(0,"button",32),R("click",function(){V(t);let i=w(2);return q(i.doAction("Unassign Staff"))}),c(1),p(2,"translate"),r()}e&2&&(a(),v(" ",m(2,1,"labels.buttons.Unassign Staff")," "))}function rTe(e,o){e&1&&(l(0,"span"),F(1,aTe,3,3,"button",23),r()),e&2&&(a(),g("mifosxHasPermission","UNASSIGNSTAFF_GROUP"))}function lTe(e,o){if(e&1){let t=Y();l(0,"button",32),R("click",function(){V(t);let i=w(2);return q(i.doAction("Attach Meeting"))}),c(1),p(2,"translate"),r()}e&2&&(a(),v(" ",m(2,1,"labels.buttons.Attach Meeting")," "))}function sTe(e,o){e&1&&(l(0,"span"),F(1,lTe,3,3,"button",23),r()),e&2&&(a(),g("mifosxHasPermission","CREATE_MEETING"))}function cTe(e,o){if(e&1){let t=Y();l(0,"button",32),R("click",function(){V(t);let i=w();return q(i.doAction("Close"))}),c(1),p(2,"translate"),r()}e&2&&(a(),v(" ",m(2,1,"labels.buttons.Close")," "))}function pTe(e,o){if(e&1){let t=Y();l(0,"button",32),R("click",function(){V(t);let i=w();return q(i.doAction("Delete"))}),c(1),p(2,"translate"),r()}e&2&&(a(),v(" ",m(2,1,"labels.buttons.Delete")," "))}function mTe(e,o){if(e&1&&(l(0,"a",27,6),c(2),p(3,"translate"),r()),e&2){let t=xe(1);g("routerLink",oe(5,BPe))("active",t.isActive),a(2),v(" ",m(3,3,"labels.inputs.Notes")," ")}}function dTe(e,o){if(e&1&&(l(0,"a",27,7),c(2),r()),e&2){let t=xe(1),n=w().$implicit;g("routerLink",Nt(3,RPe,n.registeredTableName))("active",t.isActive),a(2),v(" ",n.registeredTableName," ")}}function uTe(e,o){if(e&1&&(l(0,"span"),F(1,dTe,3,5,"a",28),r()),e&2){let t=o.$implicit;a(),g("mifosxHasPermission","READ_"+t.registeredTableName)}}var D2=(()=>{class e{constructor(){this.route=T(Ie),this.groupsService=T(An),this.router=T(qe),this.dialog=T(Ht),this.route.data.subscribe(t=>{this.groupViewData=t.groupViewData,this.groupDatatables=t.groupDatatables})}doAction(t){switch(t){case"Assign Staff":case"Close":case"Activate":case"Attach Meeting":case"Attendance":case"Manage Members":case"Transfer Clients":if(this.router.navigate([`actions/${t}`],{relativeTo:this.route}),t==="Activate"){let i=this.getGeneralTabComponent();i&&i.refreshAccounts(this.groupViewData.id)}break;case"Edit Meeting":let n={calendarId:this.groupViewData.collectionMeetingCalendar.id};this.router.navigate([`actions/${t}`],{relativeTo:this.route,queryParams:n});break;case"Edit":this.router.navigate(["edit"],{relativeTo:this.route});break;case"Unassign Staff":this.unassignStaff();break;case"Delete":this.deleteGroup();break}}getGeneralTabComponent(){return null}get editMeeting(){return!!(this.groupViewData.collectionMeetingCalendar&&this.groupViewData.collectionMeetingCalendar.entityType.value==="GROUPS"&&this.groupViewData.hierarchy==="."+this.groupViewData.id+".")}reload(){let t=this.router.url;this.router.navigateByUrl("/groups",{skipLocationChange:!0}).then(()=>this.router.navigate([t]))}unassignStaff(){this.dialog.open(M2).afterClosed().subscribe(n=>{n.confirm&&this.groupsService.executeGroupCommand(this.groupViewData.id,"unassignStaff",{staffId:this.groupViewData.staffId}).subscribe(()=>{this.reload()})})}deleteGroup(){this.dialog.open(vi,{data:{deleteContext:`group with id: ${this.groupViewData.id}`}}).afterClosed().subscribe(n=>{n.delete&&this.groupsService.deleteGroup(this.groupViewData.id).subscribe(()=>{this.router.navigate(["/groups"],{relativeTo:this.route})})})}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275cmp=me({type:e,selectors:[["mifosx-groups-view"]],decls:88,vars:67,consts:[["groupMenu","matMenu"],["AccountApplications","matMenu"],["More","matMenu"],["general","routerLinkActive"],["committee","routerLinkActive"],["tabPanel",""],["notes","routerLinkActive"],["datatable","routerLinkActive"],[1,"group-card"],[1,"header","layout-column"],[1,"header-title-group"],[1,"profile-image-container"],["mat-card-md-image","","src","assets/images/group_placeholder.png",1,"profile-image"],[1,"mat-typography","group-card-title"],[1,"make-flex"],[1,"flex-95"],[1,"fa","fa-stop",3,"ngClass","matTooltip"],[1,"flex-5","flex-xs-15","flex-sm-10","flex-md-5"],["mat-icon-button","","aria-label","Group actions","yPosition","below",3,"matMenuTriggerFor"],["matListIcon","",1,"actions-menu"],["icon","bars","size","sm"],[1,"flex-45"],[1,"group-meeting","flex-45","align-start-start"],["mat-menu-item","",3,"click",4,"mifosxHasPermission"],["mat-menu-item","",3,"matMenuTriggerFor"],["mat-menu-item","",3,"routerLink",4,"mifosxHasPermission"],["mat-tab-nav-bar","",1,"navigation-tabs",3,"tabPanel"],["mat-tab-link","","routerLinkActive","",3,"routerLink","active"],["mat-tab-link","","routerLinkActive","",3,"routerLink","active",4,"mifosxHasPermission"],[1,"fa","fa-edit"],[1,"fa","fa-edit",3,"click"],[1,"fa","fa-calendar"],["mat-menu-item","",3,"click"],["matListIcon",""],["icon","checkSign","size","sm"],["icon","edit","size","sm"],["icon","users","size","sm"],["icon","user","size","sm"],["icon","money-bill-alt","size","sm"],["mat-menu-item","",4,"mifosxHasPermission"],["mat-menu-item",""],["mat-menu-item","",3,"routerLink"]],template:function(n,i){if(n&1&&(l(0,"mat-card",8)(1,"mat-card-header",9)(2,"mat-card-title-group",10)(3,"div",11)(4,"div"),b(5,"img",12),r()(),l(6,"div",13)(7,"mat-card-title",14)(8,"h3",15),b(9,"i",16),p(10,"statusLookup"),c(11),p(12,"translate"),r(),l(13,"div",17)(14,"button",18)(15,"mat-icon",19),b(16,"fa-icon",20),r()()()(),l(17,"mat-card-subtitle",14)(18,"div",21)(19,"b"),c(20),p(21,"translate"),r(),c(22),l(23,"b"),c(24),p(25,"translate"),r(),c(26),l(27,"b"),c(28),p(29,"translate"),r(),c(30),b(31,"br"),l(32,"b"),c(33),p(34,"translate"),r(),c(35),b(36,"br"),l(37,"b"),c(38),p(39,"translate"),r(),c(40),p(41,"dateFormat"),b(42,"br"),E(43,NPe,6,6,"span"),r(),l(44,"div",22),E(45,VPe,10,13,"div")(46,qPe,10,12,"div"),r()()(),l(47,"mat-menu",null,0),E(49,HPe,2,1,"span"),F(50,GPe,6,3,"button",23)(51,jPe,6,3,"button",23)(52,$Pe,6,3,"button",23),E(53,UPe,6,4,"button",24),l(54,"mat-menu",null,1),E(56,QPe,2,1,"span"),F(57,YPe,3,5,"button",25)(58,JPe,3,5,"button",25),E(59,XPe,2,1,"span"),E(60,eTe,2,1,"span"),r(),l(61,"button",24),c(62),p(63,"translate"),r(),l(64,"mat-menu",null,2),E(66,iTe,2,1,"span"),E(67,oTe,2,1,"span"),E(68,rTe,2,1,"span"),E(69,sTe,2,1,"span"),F(70,cTe,3,3,"button",23)(71,pTe,3,3,"button",23),r()()()(),l(72,"mat-card-content")(73,"nav",26)(74,"a",27,3),c(76),p(77,"translate"),r(),F(78,mTe,4,6,"a",28),l(79,"a",27,4),c(81),p(82,"translate"),r(),Se(83,uTe,2,1,"span",null,Pe),r(),l(85,"mat-tab-nav-panel",null,5),b(87,"router-outlet"),r()()()),n&2){let s=xe(48),d=xe(65),u=xe(75),f=xe(80),_=xe(86);a(9),g("ngClass",m(10,43,i.groupViewData.status.code))("matTooltip",i.groupViewData.status.value),a(2),le(" ",m(12,45,"labels.heading.Group Name")," : ",i.groupViewData.name," "),a(3),g("matMenuTriggerFor",s),a(6),v("",m(21,47,"labels.inputs.Group")," :"),a(2),v(" ",i.groupViewData.name," | "),a(2),v("",m(25,49,"labels.inputs.Center Name"),":"),a(2),v(" ",i.groupViewData.centerName," | "),a(2),v("",m(29,51,"labels.inputs.Staff"),":"),a(2),v(" ",i.groupViewData.staffName||"Unassigned"),a(3),v("",m(34,53,"labels.inputs.Office Name")," :"),a(2),v(" ",i.groupViewData.officeName),a(3),v("",m(39,55,"labels.inputs.Activation Date")," :"),a(2),v(" ",i.groupViewData.activationDate?m(41,57,i.groupViewData.activationDate):"Not Activated"),a(3),I(i.groupViewData.active?-1:43),a(2),I(i.groupViewData.collectionMeetingCalendar?45:46),a(4),I(i.groupViewData.status.value!=="Active"?49:-1),a(),g("mifosxHasPermission","UPDATE_GROUP"),a(),g("mifosxHasPermission","ASSOCIATECLIENTS_GROUP"),a(),g("mifosxHasPermission","TRANSFERCLIENTS_GROUP"),a(),I(i.groupViewData.active?53:-1),a(3),I(i.groupViewData.clientMembers?56:-1),a(),g("mifosxHasPermission","CREATE_SAVINGSACCOUNT"),a(),g("mifosxHasPermission","CREATE_LOAN"),a(),I(i.groupViewData.clientMembers?59:-1),a(),I(i.groupViewData.clientMembers?60:-1),a(),g("matMenuTriggerFor",d),a(),h(m(63,59,"labels.buttons.More")),a(4),I(i.groupViewData.collectionMeetingCalendar?66:-1),a(),I(i.groupViewData.staffId?-1:67),a(),I(i.groupViewData.staffId?68:-1),a(),I(!(i.groupViewData.centerId||i.groupViewData.collectionMeetingCalendar)&&i.groupViewData.status.value==="Active"?69:-1),a(),g("mifosxHasPermission","CLOSE_GROUP"),a(),g("mifosxHasPermission","DELETE_GROUP"),a(2),g("tabPanel",_),a(),g("routerLink",oe(65,EPe))("active",u.isActive),a(2),v(" ",m(77,61,"labels.inputs.General")," "),a(2),g("mifosxHasPermission","READ_GROUPNOTE"),a(),g("routerLink",oe(66,IPe))("active",f.isActive),a(2),v(" ",m(82,63,"labels.inputs.Committee")," "),a(2),we(i.groupDatatables)}},dependencies:[ue,co,fe,Ae,$e,Je,Ke,sa,Qr,b0,Qo,si,wi,nc,Yo,ke,vl,ic,tc,nr,or,La,ar,ra,bg,Pi,he,go],styles:[".group-card[_ngcontent-%COMP%]{margin:0 auto;max-width:80rem;width:90%;padding:0}.group-card[_ngcontent-%COMP%] i[_ngcontent-%COMP%]:hover{cursor:pointer}.group-card[_ngcontent-%COMP%] .header[_ngcontent-%COMP%]{padding:1%}.group-card[_ngcontent-%COMP%] .header-title-group[_ngcontent-%COMP%] .group-card-title[_ngcontent-%COMP%]{color:#fff;width:90%}.group-card[_ngcontent-%COMP%] .header-title-group[_ngcontent-%COMP%] .group-card-title[_ngcontent-%COMP%] mat-card-subtitle[_ngcontent-%COMP%]{color:#fff}.group-card[_ngcontent-%COMP%] .profile-image-container[_ngcontent-%COMP%]{margin:1%}.group-card[_ngcontent-%COMP%] .profile-image-container[_ngcontent-%COMP%] .profile-image[_ngcontent-%COMP%]{object-fit:cover;border-radius:20px}.group-card[_ngcontent-%COMP%] .group-meeting[_ngcontent-%COMP%]{align-self:flex-end;width:100%}.group-card[_ngcontent-%COMP%] .group-meeting[_ngcontent-%COMP%] div[_ngcontent-%COMP%], .group-card[_ngcontent-%COMP%] .group-meeting[_ngcontent-%COMP%] ng-template[_ngcontent-%COMP%] > div[_ngcontent-%COMP%]{background-color:#0a6aac}.group-card[_ngcontent-%COMP%] .group-meeting[_ngcontent-%COMP%] div[_ngcontent-%COMP%] p[_ngcontent-%COMP%], .group-card[_ngcontent-%COMP%] .group-meeting[_ngcontent-%COMP%] ng-template[_ngcontent-%COMP%] > div[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{color:#fff;padding:0 10px}.group-card[_ngcontent-%COMP%] .group-actions[_ngcontent-%COMP%]{align-self:flex-end;margin:0 1%}.group-card[_ngcontent-%COMP%] .group-actions[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{margin-bottom:2px;margin-right:4px}.group-card[_ngcontent-%COMP%] .navigation-tabs[_ngcontent-%COMP%]{overflow:auto}.make-flex[_ngcontent-%COMP%]{display:flex}"]})}}return e})();var fTe=e=>["/clients",e,"general"],eN=e=>["../","loans-accounts",e,"general"],hTe=e=>["../","savings-accounts","gsim-account",e],gTe=e=>["../","loans-accounts","glim-account",e],_Te=e=>["../","savings-accounts",e,"actions","Deposit"],CTe=e=>["../","savings-accounts",e,"actions","Withdrawal"],vTe=e=>["../","savings-accounts",e,"actions","Approve"],xTe=e=>["../","savings-accounts",e,"actions","Undo Approval"],bTe=e=>["../","savings-accounts",e,"actions","Activate"],tN=e=>["../","savings-accounts",e,"transactions"];function yTe(e,o){e&1&&(l(0,"th",11),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.name")))}function STe(e,o){if(e&1&&(l(0,"td",12),b(1,"i",13),p(2,"statusLookup"),c(3),r()),e&2){let t=o.$implicit;a(),g("ngClass",m(2,3,t.status.code))("matTooltip",t.status.value),a(2),v(" ",t.displayName," ")}}function wTe(e,o){e&1&&(l(0,"th",11),c(1),p(2,"translate"),r()),e&2&&(a(),v("",m(2,1,"labels.inputs.Account No"),"."))}function PTe(e,o){if(e&1&&(l(0,"td",12),c(1),r()),e&2){let t=o.$implicit;a(),h(t.accountNo)}}function TTe(e,o){e&1&&(l(0,"th",11),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.Office")))}function MTe(e,o){if(e&1&&(l(0,"td",12),c(1),r()),e&2){let t=o.$implicit;a(),h(t.officeName)}}function DTe(e,o){e&1&&(l(0,"th",11),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.JLG Loan Application")))}function ETe(e,o){e&1&&(l(0,"div",14)(1,"button",15),b(2,"i",16),p(3,"translate"),r()()),e&2&&(a(2),g("matTooltip",Le(m(3,2,"tooltips.New Loan Application"))))}function ITe(e,o){if(e&1&&(l(0,"td",12),E(1,ETe,4,4,"div",14),r()),e&2){let t=o.$implicit;a(),I(t.status.code!=="clientStatusType.closed"?1:-1)}}function OTe(e,o){e&1&&b(0,"tr",17)}function ATe(e,o){if(e&1&&b(0,"tr",18),e&2){let t=o.$implicit;g("routerLink",Nt(1,fTe,t.id))}}function FTe(e,o){if(e&1&&(l(0,"div")(1,"h3"),c(2),p(3,"translate"),r(),l(4,"table",2),X(5,3),F(6,yTe,3,3,"th",4)(7,STe,4,5,"td",5),Z(),X(8,6),F(9,wTe,3,3,"th",4)(10,PTe,2,1,"td",5),Z(),X(11,7),F(12,TTe,3,3,"th",4)(13,MTe,2,1,"td",5),Z(),X(14,8),F(15,DTe,3,3,"th",4)(16,ITe,2,1,"td",5),Z(),F(17,OTe,1,0,"tr",9)(18,ATe,1,3,"tr",10),r()()),e&2){let t=w();a(2),h(m(3,4,"labels.heading.Client Members")),a(2),g("dataSource",t.groupClientMembers),a(13),g("matHeaderRowDef",t.clientMemberColumns),a(),g("matRowDefColumns",t.clientMemberColumns)}}function kTe(e,o){if(e&1){let t=Y();l(0,"div",21)(1,"button",22),R("click",function(){V(t);let i=w(2);return q(i.toggleLoanAccountsOverview())}),c(2),r()()}if(e&2){let t=w(2);a(2),v(" ",t.showClosedLoanAccounts?"View Active Accounts":"View Closed Accounts"," ")}}function BTe(e,o){e&1&&(l(0,"th",11),c(1),p(2,"translate"),r()),e&2&&(a(),v("",m(2,1,"labels.inputs.Account No"),"."))}function RTe(e,o){if(e&1&&(l(0,"td",12),b(1,"i",13),p(2,"statusLookup"),c(3),r()),e&2){let t=o.$implicit;a(),g("ngClass",t.inArrears?"status-active-overdue":m(2,3,t.status.code))("matTooltip",t.inArrears?"Active Overdue":t.status.value),a(2),v(" ",t.accountNo," ")}}function NTe(e,o){e&1&&(l(0,"th",11),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.Loan Account")))}function LTe(e,o){if(e&1&&(l(0,"td",12),c(1),r()),e&2){let t=o.$implicit;a(),h(t.productName)}}function VTe(e,o){e&1&&(l(0,"th",11),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.Original Loan")))}function qTe(e,o){if(e&1&&(l(0,"td",12),c(1),r()),e&2){let t=o.$implicit;a(),h(t.originalLoan)}}function zTe(e,o){e&1&&(l(0,"th",11),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.Loan Balance")))}function HTe(e,o){if(e&1&&(l(0,"td",12),c(1),p(2,"currency"),r()),e&2){let t=o.$implicit;a(),v(" ",$t(2,1,t.loanBalance,(t.currency==null?null:t.currency.code)||"USD","symbol","1.2-2")," ")}}function GTe(e,o){e&1&&(l(0,"th",11),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.Amount Paid")))}function jTe(e,o){if(e&1&&(l(0,"td",12),c(1),p(2,"currency"),r()),e&2){let t=o.$implicit;a(),v(" ",$t(2,1,t.amountPaid,(t.currency==null?null:t.currency.code)||"USD","symbol","1.2-2")," ")}}function $Te(e,o){e&1&&(l(0,"th",11),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.Type")))}function UTe(e,o){if(e&1&&(l(0,"td",12),b(1,"i",30),r()),e&2){let t=o.$implicit;a(),g("ngClass",t.loanType.value==="Individual"?"fa-user":"fa-group")("matTooltip",t.loanType.value==="Individual"?"Individual":"Group")}}function WTe(e,o){e&1&&(l(0,"th",11),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.Actions")))}function QTe(e,o){e&1&&(l(0,"button",31),b(1,"i",32),p(2,"translate"),r()),e&2&&(a(),g("matTooltip",Le(m(2,2,"tooltips.Make Repayment"))))}function YTe(e,o){e&1&&(l(0,"button",31),b(1,"i",33),p(2,"translate"),r()),e&2&&(a(),g("matTooltip",Le(m(2,2,"tooltips.Approve"))))}function JTe(e,o){e&1&&(l(0,"button",31),b(1,"i",34),p(2,"translate"),r()),e&2&&(a(),g("matTooltip",Le(m(2,2,"tooltips.Disburse"))))}function KTe(e,o){e&1&&(l(0,"button",31),b(1,"i",35),p(2,"translate"),r()),e&2&&(a(),g("matTooltip",Le(m(2,2,"tooltips.Transfer Funds"))))}function XTe(e,o){if(e&1&&(l(0,"td",12),E(1,QTe,3,4,"button",31),E(2,YTe,3,4,"button",31),E(3,JTe,3,4,"button",31),E(4,KTe,3,4,"button",31),r()),e&2){let t=o.$implicit;a(),I(t.status.active?1:-1),a(),I(t.status.pendingApproval?2:-1),a(),I(!t.status.pendingApproval&&!t.status.active&&!t.status.overpaid?3:-1),a(),I(!t.status.pendingApproval&&!t.status.active&&t.status.overpaid?4:-1)}}function ZTe(e,o){e&1&&b(0,"tr",17)}function e4e(e,o){if(e&1&&b(0,"tr",36),e&2){let t=o.$implicit;g("routerLink",Nt(1,eN,t.id))}}function t4e(e,o){if(e&1&&(l(0,"table",2),p(1,"accountsFilter"),X(2,6),F(3,BTe,3,3,"th",4)(4,RTe,4,5,"td",5),Z(),X(5,23),F(6,NTe,3,3,"th",4)(7,LTe,2,1,"td",5),Z(),X(8,24),F(9,VTe,3,3,"th",4)(10,qTe,2,1,"td",5),Z(),X(11,25),F(12,zTe,3,3,"th",4)(13,HTe,3,6,"td",5),Z(),X(14,26),F(15,GTe,3,3,"th",4)(16,jTe,3,6,"td",5),Z(),X(17,27),F(18,$Te,3,3,"th",4)(19,UTe,2,2,"td",5),Z(),X(20,28),F(21,WTe,3,3,"th",4)(22,XTe,5,4,"td",5),Z(),F(23,ZTe,1,0,"tr",9)(24,e4e,1,3,"tr",29),r()),e&2){let t=w(2);g("dataSource",Ot(1,3,t.loanAccounts,"loan")),a(23),g("matHeaderRowDef",t.openLoansColumns),a(),g("matRowDefColumns",t.openLoansColumns)}}function i4e(e,o){e&1&&(l(0,"th",11),c(1),p(2,"translate"),r()),e&2&&(a(),v("",m(2,1,"labels.inputs.Account No"),"."))}function n4e(e,o){if(e&1&&(l(0,"td",12),b(1,"i",13),p(2,"statusLookup"),c(3),r()),e&2){let t=o.$implicit;a(),g("ngClass",t.inArrears?"status-active-overdue":m(2,3,t.status.code))("matTooltip",t.inArrears?"Active Overdue":t.status.value),a(2),v(" ",t.accountNo," ")}}function o4e(e,o){e&1&&(l(0,"th",11),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.Loan Account")))}function a4e(e,o){if(e&1&&(l(0,"td",12),c(1),r()),e&2){let t=o.$implicit;a(),h(t.productName)}}function r4e(e,o){e&1&&(l(0,"th",11),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.Original Loan")))}function l4e(e,o){if(e&1&&(l(0,"td",12),c(1),p(2,"dateFormat"),r()),e&2){let t=o.$implicit;a(),h(m(2,1,t.lastActiveTransactionDate))}}function s4e(e,o){e&1&&(l(0,"th",11),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.Loan Balance")))}function c4e(e,o){if(e&1&&(l(0,"td",12),c(1),r()),e&2){let t=o.$implicit;a(),h(t.loanBalance)}}function p4e(e,o){e&1&&(l(0,"th",11),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.Amount Paid")))}function m4e(e,o){if(e&1&&(l(0,"td",12),c(1),r()),e&2){let t=o.$implicit;a(),h(t.accountBalance)}}function d4e(e,o){e&1&&(l(0,"th",11),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.Type")))}function u4e(e,o){if(e&1&&(l(0,"td",12),b(1,"i",30),r()),e&2){let t=o.$implicit;a(),g("ngClass",t.loanType.value==="Individual"?"fa-user":"fa-group")("matTooltip",t.loanType.value==="Individual"?"Individual":"Group")}}function f4e(e,o){e&1&&(l(0,"th",11),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.Closed Date")))}function h4e(e,o){if(e&1&&(l(0,"td",12),c(1),p(2,"dateFormat"),r()),e&2){let t=o.$implicit;a(),h(m(2,1,t.timeline.closedOnDate))}}function g4e(e,o){e&1&&b(0,"tr",17)}function _4e(e,o){if(e&1&&b(0,"tr",36),e&2){let t=o.$implicit;g("routerLink",Nt(1,eN,t.id))}}function C4e(e,o){if(e&1&&(l(0,"table",2),p(1,"accountsFilter"),X(2,6),F(3,i4e,3,3,"th",4)(4,n4e,4,5,"td",5),Z(),X(5,23),F(6,o4e,3,3,"th",4)(7,a4e,2,1,"td",5),Z(),X(8,24),F(9,r4e,3,3,"th",4)(10,l4e,3,3,"td",5),Z(),X(11,25),F(12,s4e,3,3,"th",4)(13,c4e,2,1,"td",5),Z(),X(14,26),F(15,p4e,3,3,"th",4)(16,m4e,2,1,"td",5),Z(),X(17,27),F(18,d4e,3,3,"th",4)(19,u4e,2,2,"td",5),Z(),X(20,37),F(21,f4e,3,3,"th",4)(22,h4e,3,3,"td",5),Z(),F(23,g4e,1,0,"tr",9)(24,_4e,1,3,"tr",29),r()),e&2){let t=w(2);g("dataSource",yr(1,3,t.loanAccounts,"loan","closed")),a(23),g("matHeaderRowDef",t.closedLoansColumns),a(),g("matRowDefColumns",t.closedLoansColumns)}}function v4e(e,o){if(e&1&&(l(0,"div")(1,"div",19)(2,"div",20)(3,"h3"),c(4),p(5,"translate"),r()(),E(6,kTe,3,1,"div",21),p(7,"accountsFilter"),r(),E(8,t4e,25,6,"table",2),E(9,C4e,25,7,"table",2),r()),e&2){let t=w();a(4),h(m(5,4,"labels.heading.Loan Accounts")),a(2),I(yr(7,6,t.loanAccounts,"loan","closed").length?6:-1),a(2),I(t.showClosedLoanAccounts?-1:8),a(),I(t.showClosedLoanAccounts?9:-1)}}function x4e(e,o){e&1&&(l(0,"th",11),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.GSIM Id")))}function b4e(e,o){if(e&1&&(l(0,"td",12),c(1),r()),e&2){let t=o.$implicit;a(),v(" ",t.gsimId," ")}}function y4e(e,o){e&1&&(l(0,"th",11),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.Account Number")))}function S4e(e,o){if(e&1&&(l(0,"td",12),c(1),r()),e&2){let t=o.$implicit;a(),h(t.accountNumber)}}function w4e(e,o){e&1&&(l(0,"th",11),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.Product")))}function P4e(e,o){if(e&1&&(l(0,"td",12),c(1),r()),e&2){let t=o.$implicit;a(),h(t.childGSIMAccounts[0].productName)}}function T4e(e,o){e&1&&(l(0,"th",11),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.Balance")))}function M4e(e,o){if(e&1&&(l(0,"td",12),c(1),r()),e&2){let t=o.$implicit;a(),h(t.parentBalance)}}function D4e(e,o){e&1&&(l(0,"th",11),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.Status")))}function E4e(e,o){if(e&1&&(l(0,"td",12),c(1),r()),e&2){let t=o.$implicit;a(),h(t.savingsStatus)}}function I4e(e,o){e&1&&b(0,"tr",17)}function O4e(e,o){if(e&1&&b(0,"tr",36),e&2){let t=o.$implicit;g("routerLink",Nt(1,hTe,t.accountNumber))}}function A4e(e,o){if(e&1&&(l(0,"div")(1,"div",19)(2,"div",20)(3,"h3"),c(4),p(5,"translate"),r()()(),l(6,"table",2),X(7,38),F(8,x4e,3,3,"th",4)(9,b4e,2,1,"td",5),Z(),X(10,39),F(11,y4e,3,3,"th",4)(12,S4e,2,1,"td",5),Z(),X(13,40),F(14,w4e,3,3,"th",4)(15,P4e,2,1,"td",5),Z(),X(16,41),F(17,T4e,3,3,"th",4)(18,M4e,2,1,"td",5),Z(),X(19,42),F(20,D4e,3,3,"th",4)(21,E4e,2,1,"td",5),Z(),F(22,I4e,1,0,"tr",9)(23,O4e,1,3,"tr",29),r()()),e&2){let t=w();a(4),h(m(5,4,"labels.heading.GSIM Account Overview")),a(2),g("dataSource",t.gsimAccounts),a(16),g("matHeaderRowDef",t.gsimAccountsColumns),a(),g("matRowDefColumns",t.gsimAccountsColumns)}}function F4e(e,o){e&1&&(l(0,"th",11),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.GLIM Id")))}function k4e(e,o){if(e&1&&(l(0,"td",12),c(1),r()),e&2){let t=o.$implicit;a(),v(" ",t.glimId," ")}}function B4e(e,o){e&1&&(l(0,"th",11),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.Account Number")))}function R4e(e,o){if(e&1&&(l(0,"td",12),c(1),r()),e&2){let t=o.$implicit;a(),h(t.accountNumber)}}function N4e(e,o){e&1&&(l(0,"th",11),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.Product")))}function L4e(e,o){if(e&1&&(l(0,"td",12),c(1),r()),e&2){let t=o.$implicit;a(),h(t.childGLIMAccounts[0].productName)}}function V4e(e,o){e&1&&(l(0,"th",11),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.Original Loan")))}function q4e(e,o){if(e&1&&(l(0,"td",12),c(1),r()),e&2){let t=o.$implicit;a(),h(t.parentPrincipalAmount)}}function z4e(e,o){e&1&&(l(0,"th",11),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.Status")))}function H4e(e,o){if(e&1&&(l(0,"td",12),c(1),r()),e&2){let t=o.$implicit;a(),h(t.loanStatus)}}function G4e(e,o){e&1&&b(0,"tr",17)}function j4e(e,o){if(e&1&&b(0,"tr",36),e&2){let t=o.$implicit;g("routerLink",Nt(1,gTe,t.glimId))}}function $4e(e,o){if(e&1&&(l(0,"div")(1,"div",19)(2,"div",20)(3,"h3"),c(4),p(5,"translate"),r()()(),l(6,"table",2),X(7,43),F(8,F4e,3,3,"th",4)(9,k4e,2,1,"td",5),Z(),X(10,39),F(11,B4e,3,3,"th",4)(12,R4e,2,1,"td",5),Z(),X(13,40),F(14,N4e,3,3,"th",4)(15,L4e,2,1,"td",5),Z(),X(16,24),F(17,V4e,3,3,"th",4)(18,q4e,2,1,"td",5),Z(),X(19,42),F(20,z4e,3,3,"th",4)(21,H4e,2,1,"td",5),Z(),F(22,G4e,1,0,"tr",9)(23,j4e,1,3,"tr",29),r()()),e&2){let t=w();a(4),h(m(5,4,"labels.heading.GLIM Loans Account Overview")),a(2),g("dataSource",t.glimAccounts),a(16),g("matHeaderRowDef",t.glimAccountsColumns),a(),g("matRowDefColumns",t.glimAccountsColumns)}}function U4e(e,o){if(e&1){let t=Y();l(0,"button",22),R("click",function(){V(t);let i=w(2);return q(i.toggleSavingAccountsOverview())}),c(1),r()}if(e&2){let t=w(2);a(),v(" ",t.showClosedSavingAccounts?"View Active Accounts":"View Closed Accounts"," ")}}function W4e(e,o){e&1&&(l(0,"th",11),c(1),p(2,"translate"),r()),e&2&&(a(),v("",m(2,1,"labels.inputs.Account No"),"."))}function Q4e(e,o){if(e&1&&(l(0,"td",12),b(1,"i",13),p(2,"statusLookup"),c(3),r()),e&2){let t=o.$implicit;a(),g("ngClass",m(2,3,t.status.code))("matTooltip",t.status.value),a(2),v(" ",t.accountNo," ")}}function Y4e(e,o){e&1&&(l(0,"th",11),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.Saving Account")))}function J4e(e,o){if(e&1&&(l(0,"td",12),c(1),r()),e&2){let t=o.$implicit;a(),h(t.productName)}}function K4e(e,o){e&1&&(l(0,"th",11),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.Last Active")))}function X4e(e,o){if(e&1&&(l(0,"td",12),c(1),p(2,"dateFormat"),r()),e&2){let t=o.$implicit;a(),h(m(2,1,t.lastActiveTransactionDate))}}function Z4e(e,o){e&1&&(l(0,"th",11),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.Balance")))}function eMe(e,o){if(e&1&&(l(0,"td",12),c(1),r()),e&2){let t=o.$implicit;a(),h(t.accountBalance)}}function tMe(e,o){e&1&&(l(0,"th",11),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.Actions")))}function iMe(e,o){if(e&1){let t=Y();l(0,"button",48),R("click",function(i){V(t);let s=w(4);return q(s.routeEdit(i))}),b(1,"i",49),p(2,"translate"),r()}if(e&2){let t=w().$implicit;g("routerLink",Nt(5,_Te,t.id)),a(),g("matTooltip",Le(m(2,3,"tooltips.Deposit")))}}function nMe(e,o){if(e&1){let t=Y();l(0,"button",48),R("click",function(i){V(t);let s=w(4);return q(s.routeEdit(i))}),b(1,"i",50),p(2,"translate"),r()}if(e&2){let t=w().$implicit;g("routerLink",Nt(5,CTe,t.id)),a(),g("matTooltip",Le(m(2,3,"tooltips.Withdraw")))}}function oMe(e,o){if(e&1){let t=Y();l(0,"button",48),R("click",function(i){V(t);let s=w(4);return q(s.routeEdit(i))}),b(1,"i",33),p(2,"translate"),r()}if(e&2){let t=w().$implicit;g("routerLink",Nt(5,vTe,t.id)),a(),g("matTooltip",Le(m(2,3,"tooltips.Approve")))}}function aMe(e,o){if(e&1){let t=Y();l(0,"button",48),R("click",function(i){V(t);let s=w(4);return q(s.routeEdit(i))}),b(1,"i",51),p(2,"translate"),r()}if(e&2){let t=w().$implicit;g("routerLink",Nt(5,xTe,t.id)),a(),g("matTooltip",Le(m(2,3,"tooltips.Undo Approval")))}}function rMe(e,o){if(e&1){let t=Y();l(0,"button",48),R("click",function(i){V(t);let s=w(4);return q(s.routeEdit(i))}),b(1,"i",52),p(2,"translate"),r()}if(e&2){let t=w().$implicit;g("routerLink",Nt(5,bTe,t.id)),a(),g("matTooltip",Le(m(2,3,"tooltips.Activate")))}}function lMe(e,o){if(e&1&&(l(0,"td",12),E(1,iMe,3,7,"button",47),E(2,nMe,3,7,"button",47),E(3,oMe,3,7,"button",47),E(4,aMe,3,7,"button",47),E(5,rMe,3,7,"button",47),r()),e&2){let t=o.$implicit;a(),I(t.status.active?1:-1),a(),I(t.status.active?2:-1),a(),I(t.status.submittedAndPendingApproval?3:-1),a(),I(!t.status.submittedAndPendingApproval&&!t.status.active?4:-1),a(),I(!t.status.submittedAndPendingApproval&&!t.status.active?5:-1)}}function sMe(e,o){e&1&&b(0,"tr",17)}function cMe(e,o){if(e&1&&b(0,"tr",36),e&2){let t=o.$implicit;g("routerLink",Nt(1,tN,t.id))}}function pMe(e,o){if(e&1&&(l(0,"table",2),p(1,"accountsFilter"),X(2,6),F(3,W4e,3,3,"th",4)(4,Q4e,4,5,"td",5),Z(),X(5,45),F(6,Y4e,3,3,"th",4)(7,J4e,2,1,"td",5),Z(),X(8,46),F(9,K4e,3,3,"th",4)(10,X4e,3,3,"td",5),Z(),X(11,41),F(12,Z4e,3,3,"th",4)(13,eMe,2,1,"td",5),Z(),X(14,28),F(15,tMe,3,3,"th",4)(16,lMe,6,5,"td",5),Z(),F(17,sMe,1,0,"tr",9)(18,cMe,1,3,"tr",29),r()),e&2){let t=w(2);g("dataSource",Ot(1,3,t.savingAccounts,"saving")),a(17),g("matHeaderRowDef",t.openSavingsColumns),a(),g("matRowDefColumns",t.openSavingsColumns)}}function mMe(e,o){e&1&&(l(0,"th",11),c(1),p(2,"translate"),r()),e&2&&(a(),v("",m(2,1,"labels.inputs.Account No"),"."))}function dMe(e,o){if(e&1&&(l(0,"td",12),b(1,"i",13),p(2,"statusLookup"),c(3),r()),e&2){let t=o.$implicit;a(),g("ngClass",m(2,3,t.status.code))("matTooltip",t.status.value),a(2),v(" ",t.accountNo," ")}}function uMe(e,o){e&1&&(l(0,"th",11),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.Saving Account")))}function fMe(e,o){if(e&1&&(l(0,"td",12),c(1),r()),e&2){let t=o.$implicit;a(),h(t.productName)}}function hMe(e,o){e&1&&(l(0,"th",11),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.Closed Date")))}function gMe(e,o){if(e&1&&(l(0,"td",12),c(1),p(2,"dateFormat"),r()),e&2){let t=o.$implicit;a(),h(m(2,1,t.timeline.closedOnDate))}}function _Me(e,o){e&1&&b(0,"tr",17)}function CMe(e,o){if(e&1&&b(0,"tr",36),e&2){let t=o.$implicit;g("routerLink",Nt(1,tN,t.id))}}function vMe(e,o){if(e&1&&(l(0,"table",2),p(1,"accountsFilter"),X(2,6),F(3,mMe,3,3,"th",4)(4,dMe,4,5,"td",5),Z(),X(5,45),F(6,uMe,3,3,"th",4)(7,fMe,2,1,"td",5),Z(),X(8,37),F(9,hMe,3,3,"th",4)(10,gMe,3,3,"td",5),Z(),F(11,_Me,1,0,"tr",9)(12,CMe,1,3,"tr",29),r()),e&2){let t=w(2);g("dataSource",yr(1,3,t.savingAccounts,"saving","closed")),a(11),g("matHeaderRowDef",t.closedSavingsColumns),a(),g("matRowDefColumns",t.closedSavingsColumns)}}function xMe(e,o){if(e&1&&(l(0,"div")(1,"div",19)(2,"div",20)(3,"h3"),c(4),p(5,"translate"),r()(),l(6,"div",21),E(7,U4e,2,1,"button",44),p(8,"accountsFilter"),r()(),E(9,pMe,19,6,"table",2),E(10,vMe,13,7,"table",2),r()),e&2){let t=w();a(4),h(m(5,4,"labels.heading.Saving Accounts")),a(3),I(yr(8,6,t.savingAccounts,"saving","closed").length?7:-1),a(2),I(t.showClosedSavingAccounts?-1:9),a(),I(t.showClosedSavingAccounts?10:-1)}}var E2=(()=>{class e{constructor(){this.route=T(Ie),this.groupsService=T(An),this.clientMemberColumns=["Name","Account No","Office","JLG Loan Application"],this.openLoansColumns=["Account No","Loan Account","Original Loan","Loan Balance","Amount Paid","Type","Actions"],this.closedLoansColumns=["Account No","Loan Account","Original Loan","Loan Balance","Amount Paid","Type","Closed Date"],this.openSavingsColumns=["Account No","Saving Account","Last Active","Balance","Actions"],this.closedSavingsColumns=["Account No","Saving Account","Closed Date"],this.gsimAccountsColumns=["GSIM Id","Account Number","Product","Balance","Status"],this.glimAccountsColumns=["GLIM Id","Account Number","Product","Original Loan","Status"],this.showClosedLoanAccounts=!1,this.showClosedSavingAccounts=!1,this.route.data.subscribe(t=>{this.glimAccounts=t.glimData,this.gsimAccounts=t.gsimData,this.groupAccountData=t.groupAccountsData,this.savingAccounts=t.groupAccountsData.savingsAccounts,this.loanAccounts=t.groupAccountsData.loanAccounts,this.groupSummary=t.groupSummary[0]}),this.route.parent.data.subscribe(t=>{this.groupClientMembers=t.groupViewData.clientMembers})}refreshAccounts(t){this.groupsService.getGroupAccountsData(t).subscribe(n=>{this.groupAccountData=n,this.savingAccounts=n.savingsAccounts,this.loanAccounts=n.loanAccounts})}toggleLoanAccountsOverview(){this.showClosedLoanAccounts=!this.showClosedLoanAccounts}toggleSavingAccountsOverview(){this.showClosedSavingAccounts=!this.showClosedSavingAccounts}routeEdit(t){t.stopPropagation()}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275cmp=me({type:e,selectors:[["mifosx-general-tab"]],decls:34,vars:36,consts:[[1,"tab-container","mat-typography"],[1,"layout-row","gap-32px","group-details-container","m-b-30"],["mat-table","",1,"mat-elevation-z1","m-b-30",3,"dataSource"],["matColumnDef","Name"],["mat-header-cell","",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","Account No"],["matColumnDef","Office"],["matColumnDef","JLG Loan Application"],["mat-header-row","",4,"matHeaderRowDef"],["mat-row","","class","select-row",3,"routerLink",4,"matRowDef","matRowDefColumns"],["mat-header-cell",""],["mat-cell",""],[1,"fa","fa-stop",3,"ngClass","matTooltip"],[1,"m-l-30"],["mat-raised-button","","color","primary","disabled","",1,"account-action-button"],[1,"fa","fa-plus",3,"matTooltip"],["mat-header-row",""],["mat-row","",1,"select-row",3,"routerLink"],[1,"layout-row","align-start","table-header"],[1,"m-b-10"],[1,"action-button","m-b-10"],["mat-raised-button","","color","primary",1,"f-right",3,"click"],["matColumnDef","Loan Account"],["matColumnDef","Original Loan"],["matColumnDef","Loan Balance"],["matColumnDef","Amount Paid"],["matColumnDef","Type"],["matColumnDef","Actions"],["mat-row","",3,"routerLink",4,"matRowDef","matRowDefColumns"],[1,"fa","fa-large",3,"ngClass","matTooltip"],["mat-raised-button","","color","primary",1,"account-action-button"],[1,"fa","fa-dollar",3,"matTooltip"],[1,"fa","fa-check",3,"matTooltip"],[1,"fa","fa-flag",3,"matTooltip"],[1,"fa","fa-exchange",3,"matTooltip"],["mat-row","",3,"routerLink"],["matColumnDef","Closed Date"],["matColumnDef","GSIM Id"],["matColumnDef","Account Number"],["matColumnDef","Product"],["matColumnDef","Balance"],["matColumnDef","Status"],["matColumnDef","GLIM Id"],["mat-raised-button","","color","primary",1,"f-right"],["matColumnDef","Saving Account"],["matColumnDef","Last Active"],["mat-raised-button","","color","primary",1,"account-action-button",3,"routerLink"],["mat-raised-button","","color","primary",1,"account-action-button",3,"click","routerLink"],[1,"fa","fa-arrow-up",3,"matTooltip"],[1,"fa","fa-arrow-down",3,"matTooltip"],[1,"fa","fa-undo",3,"matTooltip"],[1,"fa","fa-check-circle",3,"matTooltip"]],template:function(n,i){n&1&&(l(0,"div",0)(1,"h3"),c(2),p(3,"translate"),r(),l(4,"div",1)(5,"p"),c(6),p(7,"translate"),b(8,"br"),c(9),p(10,"translate"),b(11,"br"),c(12),p(13,"translate"),b(14,"br"),r(),l(15,"p"),c(16),p(17,"translate"),b(18,"br"),c(19),p(20,"translate"),b(21,"br"),c(22),p(23,"translate"),b(24,"br"),r(),l(25,"p"),c(26),p(27,"translate"),b(28,"br"),r()(),E(29,FTe,19,6,"div"),E(30,v4e,10,10,"div"),E(31,A4e,24,6,"div"),E(32,$4e,24,6,"div"),E(33,xMe,11,10,"div"),r()),n&2&&(a(2),h(m(3,20,"labels.heading.Group Details")),a(4),le(" ",m(7,22,"labels.inputs.Active Client Loans"),": ",i.groupSummary==null?null:i.groupSummary.activeClientLoans),a(3),le(" ",m(10,24,"labels.inputs.Active Client Borrowers"),": ",i.groupSummary==null?null:i.groupSummary.activeClientBorrowers),a(3),le(" ",m(13,26,"labels.inputs.Active Overdue Client Loans"),": ",i.groupSummary==null?null:i.groupSummary.overdueClientLoans),a(4),le(" ",m(17,28,"labels.inputs.Active Group Loans"),": ",i.groupSummary==null?null:i.groupSummary.activeGroupLoans),a(3),le(" ",m(20,30,"labels.inputs.Active Group Borrowers"),": ",i.groupSummary==null?null:i.groupSummary.activeGroupBorrowers),a(3),le(" ",m(23,32,"labels.inputs.Active Overdue Group Loans"),": ",i.groupSummary==null?null:i.groupSummary.overdueGroupLoans),a(4),le("",m(27,34,"labels.inputs.Active Clients"),": ",i.groupSummary==null?null:i.groupSummary.activeClients),a(3),I(i.groupClientMembers?29:-1),a(),I(i.loanAccounts?30:-1),a(),I(i.gsimAccounts?31:-1),a(),I(i.glimAccounts?32:-1),a(),I(i.savingAccounts?33:-1))},dependencies:[ue,co,fe,Ae,ve,_t,xt,vt,bt,Ct,yt,si,St,Pt,wt,Tt,wg,Pi,he,go,as],styles:[".tab-container[_ngcontent-%COMP%]{padding:1%;margin:1%}.tab-container[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{margin:1% auto}.tab-container[_ngcontent-%COMP%] .group-details-container[_ngcontent-%COMP%]{border:1px solid;padding:1%}.tab-container[_ngcontent-%COMP%] .action-button[_ngcontent-%COMP%]{margin-left:auto}.tab-container[_ngcontent-%COMP%] table[_ngcontent-%COMP%]{width:100%}.tab-container[_ngcontent-%COMP%] table[_ngcontent-%COMP%] .account-action-button[_ngcontent-%COMP%]{min-width:26px;padding:0 6px;margin:4px;line-height:25px}.tab-container[_ngcontent-%COMP%] table[_ngcontent-%COMP%] tr.select-row[_ngcontent-%COMP%]:hover, .tab-container[_ngcontent-%COMP%] i[_ngcontent-%COMP%]:hover, .tab-container[_ngcontent-%COMP%] tr[_ngcontent-%COMP%]:hover{cursor:pointer}"]})}}return e})();var I2=(()=>{class e{constructor(){this.route=T(Ie),this.authenticationService=T(Wo),this.groupsService=T(An),this.entityId=this.route.parent.snapshot.params.groupId,this.addNote=this.addNote.bind(this)}ngOnInit(){let t=this.authenticationService.getCredentials();this.username=t.username,this.route.data.subscribe(n=>{this.entityNotes=n.groupNotes})}addNote(t){this.groupsService.createGroupNote(this.entityId,t).subscribe(n=>{this.entityNotes.push({id:n.resourceId,createdByUsername:this.username,createdOn:new Date,note:t.note})})}editNote(t,n,i){this.groupsService.editGroupNote(this.entityId,t,n).subscribe(()=>{this.entityNotes[i].note=n.note})}deleteNote(t,n){this.groupsService.deleteGroupNote(this.entityId,t).subscribe(()=>{this.entityNotes.splice(n,1)})}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275cmp=me({type:e,selectors:[["mifosx-notes-tab"]],decls:1,vars:5,consts:[[3,"entityId","entityNotes","callbackAdd","callbackEdit","callbackDelete"]],template:function(n,i){n&1&&b(0,"mifosx-entity-notes-tab",0),n&2&&g("entityId",i.entityId)("entityNotes",i.entityNotes)("callbackAdd",i.addNote)("callbackEdit",i.editNote)("callbackDelete",i.deleteNote)},dependencies:[ue,fe,I0],encapsulation:2})}}return e})();var bMe=()=>({confirm:!0}),O2=(()=>{class e{constructor(){this.dialogRef=T(eo),this.data=T(Po)}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275cmp=me({type:e,selectors:[["mifosx-unassign-role-dialog"]],decls:14,vars:15,consts:[["mat-dialog-title",""],["mat-dialog-content",""],["align","end"],["mat-raised-button","","mat-dialog-close",""],["mat-raised-button","","color","warn",3,"mat-dialog-close"]],template:function(n,i){n&1&&(l(0,"h1",0),c(1),p(2,"translate"),r(),l(3,"div",1)(4,"p"),c(5),p(6,"translate"),r()(),l(7,"mat-dialog-actions",2)(8,"button",3),c(9),p(10,"translate"),r(),l(11,"button",4),c(12),p(13,"translate"),r()()),n&2&&(a(),h(m(2,6,"labels.heading.Unassign Role")),a(4),le("",m(6,8,"labels.text.Unassign role for client member"),": ",i.data.id," ?"),a(4),h(m(10,10,"labels.buttons.Cancel")),a(2),g("mat-dialog-close",oe(14,bMe)),a(),v(" ",m(13,12,"labels.buttons.Confirm")," "))},dependencies:[ue,fe,ve,Wn,ho,Nn,Un,he],encapsulation:2})}}return e})();var yMe=["rolesTable"],SMe=()=>["add-role"];function wMe(e,o){e&1&&(l(0,"button",6),b(1,"i",7),c(2),p(3,"translate"),r()),e&2&&(g("routerLink",oe(4,SMe)),a(2),v("\xA0 ",m(3,2,"labels.buttons.Add")," "))}function PMe(e,o){e&1&&(l(0,"div",4),F(1,wMe,4,5,"button",5),r()),e&2&&(a(),g("mifosxHasPermission","ASSIGNROLE_GROUP"))}function TMe(e,o){e&1&&(l(0,"th",17),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.name")))}function MMe(e,o){if(e&1&&(l(0,"td",18),c(1),r()),e&2){let t=o.$implicit;a(),h(t.clientName)}}function DMe(e,o){e&1&&(l(0,"th",17),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.Role")))}function EMe(e,o){if(e&1&&(l(0,"td",18),c(1),r()),e&2){let t=o.$implicit;a(),h(t.role.name)}}function IMe(e,o){e&1&&(l(0,"th",17),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.Client Id")))}function OMe(e,o){if(e&1&&(l(0,"td",18),c(1),r()),e&2){let t=o.$implicit;a(),h(t.clientId)}}function AMe(e,o){e&1&&(l(0,"th",17),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.Actions")))}function FMe(e,o){if(e&1){let t=Y();l(0,"button",20),R("click",function(){V(t);let i=w(2).$implicit,s=w(2);return q(s.unassignRole(i.clientId,i.id))}),b(1,"i",21),p(2,"translate"),r()}e&2&&(a(),g("matTooltip",Le(m(2,2,"tooltips.Unassign"))))}function kMe(e,o){e&1&&(l(0,"span"),F(1,FMe,3,4,"button",19),r()),e&2&&(a(),g("mifosxHasPermission","UNASSIGNROLE_GROUP"))}function BMe(e,o){if(e&1&&(l(0,"td",18),E(1,kMe,2,1,"span"),r()),e&2){let t=w(2);a(),I(t.groupStatus!=="Closed"?1:-1)}}function RMe(e,o){e&1&&b(0,"tr",22)}function NMe(e,o){e&1&&b(0,"tr",23)}function LMe(e,o){if(e&1&&(l(0,"div")(1,"table",8,0),X(3,9),F(4,TMe,3,3,"th",10)(5,MMe,2,1,"td",11),Z(),X(6,12),F(7,DMe,3,3,"th",10)(8,EMe,2,1,"td",11),Z(),X(9,13),F(10,IMe,3,3,"th",10)(11,OMe,2,1,"td",11),Z(),X(12,14),F(13,AMe,3,3,"th",10)(14,BMe,2,1,"td",11),Z(),F(15,RMe,1,0,"tr",15)(16,NMe,1,0,"tr",16),r()()),e&2){let t=w();a(),g("dataSource",t.groupRolesData),a(14),g("matHeaderRowDef",t.groupRolesColumns),a(),g("matRowDefColumns",t.groupRolesColumns)}}var A2=(()=>{class e{constructor(){this.route=T(Ie),this.groupsService=T(An),this.dialog=T(Ht),this.groupRolesColumns=["Name","Role","Client Id","Actions"],this.route.parent.data.subscribe(t=>{this.groupViewData=t.groupViewData,this.groupRolesData=this.groupViewData.groupRoles,this.groupStatus=this.groupViewData.status.value})}unassignRole(t,n){this.dialog.open(O2,{data:{id:t}}).afterClosed().subscribe(s=>{if(s.confirm){let d=this.groupRolesData.findIndex(u=>u.clientId===t);this.groupRolesData.splice(d,1),this.rolesTableRef.renderRows(),this.groupsService.unAssignRoleCommand(this.groupViewData.id,n).subscribe(()=>{})}})}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275cmp=me({type:e,selectors:[["mifosx-committee-tab"]],viewQuery:function(n,i){if(n&1&&Ee(yMe,5),n&2){let s;Te(s=Me())&&(i.rolesTableRef=s.first)}},decls:8,vars:5,consts:[["rolesTable",""],[1,"tab-container","mat-typography"],[1,"layout-row","align-start"],[1,"m-b-10"],[1,"action-button","m-b-10","gap-25px"],["mat-raised-button","","class","f-right","color","primary",3,"routerLink",4,"mifosxHasPermission"],["mat-raised-button","","color","primary",1,"f-right",3,"routerLink"],[1,"fa","fa-plus"],["mat-table","",1,"mat-elevation-z1","m-b-25",3,"dataSource"],["matColumnDef","Name"],["mat-header-cell","",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","Role"],["matColumnDef","Client Id"],["matColumnDef","Actions"],["mat-header-row","",4,"matHeaderRowDef"],["mat-row","",4,"matRowDef","matRowDefColumns"],["mat-header-cell",""],["mat-cell",""],["class","account-action-button","mat-raised-button","","color","warn",3,"click",4,"mifosxHasPermission"],["mat-raised-button","","color","warn",1,"account-action-button",3,"click"],[1,"fa","fa-ban",3,"matTooltip"],["mat-header-row",""],["mat-row",""]],template:function(n,i){n&1&&(l(0,"div",1)(1,"div",2)(2,"div",3)(3,"h3"),c(4),p(5,"translate"),r()(),E(6,PMe,2,1,"div",4),r(),E(7,LMe,17,3,"div"),r()),n&2&&(a(4),h(m(5,3,"labels.heading.Client Members")),a(2),I(i.groupStatus!=="Closed"?6:-1),a(),I(i.groupRolesData?7:-1))},dependencies:[ue,fe,Ae,ve,Ke,_t,xt,vt,bt,Ct,yt,si,St,Pt,wt,Tt,he],styles:[".tab-container[_ngcontent-%COMP%]{padding:1%;margin:1%}.tab-container[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{margin:1% auto}.tab-container[_ngcontent-%COMP%] .action-button[_ngcontent-%COMP%]{margin-left:auto}.tab-container[_ngcontent-%COMP%] table[_ngcontent-%COMP%]{width:100%}.tab-container[_ngcontent-%COMP%] table[_ngcontent-%COMP%] .account-action-button[_ngcontent-%COMP%]{min-width:26px;padding:0 6px;margin:4px;line-height:25px}"]})}}return e})();var VMe=()=>["../"];function qMe(e,o){e&1&&(l(0,"mat-error"),c(1),p(2,"translate"),p(3,"translate"),l(4,"strong"),c(5),p(6,"translate"),r()()),e&2&&(a(),le(" ",m(2,3,"labels.inputs.Group Name")," ",m(3,5,"labels.commons.is")," "),a(4),h(m(6,7,"labels.commons.required")))}function zMe(e,o){e&1&&(l(0,"mat-error"),c(1),p(2,"translate"),l(3,"strong"),c(4),p(5,"translate"),r(),c(6),p(7,"translate"),r()),e&2&&(a(),v(" ",m(2,3,"labels.inputs.Group Name")," "),a(3),h(m(5,5,"labels.inputs.cannot")),a(2),v(" ",m(7,7,"labels.commons.begin with a special character or number")," "))}function HMe(e,o){if(e&1&&(l(0,"mat-option",8),c(1),r()),e&2){let t=o.$implicit;g("value",t.id),a(),v(" ",t.name," ")}}function GMe(e,o){e&1&&(l(0,"mat-error"),c(1),p(2,"translate"),p(3,"translate"),l(4,"strong"),c(5),p(6,"translate"),r()()),e&2&&(a(),le(" ",m(2,3,"labels.inputs.Office")," ",m(3,5,"labels.commons.is")," "),a(4),h(m(6,7,"labels.commons.required")))}function jMe(e,o){if(e&1&&(l(0,"mat-option",8),c(1),r()),e&2){let t=o.$implicit;g("value",t.id),a(),v(" ",t.displayName," ")}}function $Me(e,o){e&1&&(l(0,"mat-error"),c(1),p(2,"translate"),p(3,"translate"),l(4,"strong"),c(5),p(6,"translate"),r()()),e&2&&(a(),le(" ",m(2,3,"labels.inputs.Submission Date")," ",m(3,5,"labels.commons.is")," "),a(4),h(m(6,7,"labels.commons.required")))}function UMe(e,o){e&1&&(l(0,"mat-error"),c(1),p(2,"translate"),p(3,"translate"),l(4,"strong"),c(5),p(6,"translate"),r()()),e&2&&(a(),le(" ",m(2,3,"labels.inputs.Activation Date")," ",m(3,5,"labels.commons.is")," "),a(4),h(m(6,7,"labels.commons.required")))}function WMe(e,o){if(e&1){let t=Y();l(0,"mat-form-field",10),R("click",function(){V(t);let i=xe(7);return q(i.open())}),l(1,"mat-label"),c(2),p(3,"translate"),r(),b(4,"input",22)(5,"mat-datepicker-toggle",12)(6,"mat-datepicker",null,2),E(8,UMe,7,9,"mat-error"),r()}if(e&2){let t=xe(7),n=w();a(2),h(m(3,6,"labels.inputs.Activation Date")),a(2),g("min",n.groupForm.value.submittedOnDate)("max",n.maxDate)("matDatepicker",t),a(),g("for",t),a(3),I(n.groupForm.controls.activationDate.hasError("required")?8:-1)}}function QMe(e,o){if(e&1&&(l(0,"mat-option",8),c(1),r()),e&2){let t=o.$implicit;g("value",t),a(),v(" ",t.displayName," ")}}function YMe(e,o){if(e&1){let t=Y();l(0,"div",18)(1,"div",23)(2,"div",24),c(3),p(4,"translate"),r(),l(5,"button",25),R("click",function(){V(t);let i=w();return q(i.addClient())}),b(6,"fa-icon",26),r()(),l(7,"div",27)(8,"div",28),c(9),p(10,"translate"),r(),l(11,"div",28),c(12),r()(),l(13,"div",27)(14,"div",28),c(15),p(16,"translate"),r(),l(17,"div",28),c(18),r()(),l(19,"div",27)(20,"div",28),c(21),p(22,"translate"),r(),l(23,"div",28),c(24),r()()()}if(e&2){let t=w();a(3),h(m(4,7,"labels.inputs.Client Details")),a(6),h(m(10,9,"labels.inputs.name")),a(3),h(t.clientChoice.value.displayName),a(3),h(m(16,11,"labels.inputs.Id")),a(3),h(t.clientChoice.value.id),a(3),h(m(22,13,"labels.inputs.Office")),a(3),h(t.clientChoice.value.officeName)}}function JMe(e,o){if(e&1){let t=Y();l(0,"div",30)(1,"span",31),c(2),r(),l(3,"button",32),R("click",function(){let i=V(t).$index,s=w(2);return q(s.removeClient(i))}),b(4,"fa-icon",33),r()()}if(e&2){let t=o.$implicit;a(2),h(t.displayName)}}function KMe(e,o){if(e&1&&(l(0,"mat-nav-list")(1,"h3",29),c(2),p(3,"translate"),r(),Se(4,JMe,5,1,"div",30,Pe),r()),e&2){let t=w();a(2),h(m(3,1,"labels.heading.Selected Clients")),a(2),we(t.clientMembers)}}var F2=(()=>{class e{constructor(){this.formBuilder=T(nt),this.route=T(Ie),this.router=T(qe),this.clientsService=T(Oi),this.groupService=T(An),this.dateUtils=T(Zt),this.settingsService=T(At),this.minDate=new Date(2e3,0,1),this.maxDate=new Date,this.clientsData=[],this.clientMembers=[],this.clientChoice=new it(""),this.route.data.subscribe(t=>{this.officeData=t.offices})}ngOnInit(){this.maxDate=this.settingsService.businessDate,this.createGroupForm()}ngAfterViewInit(){this.clientChoice.valueChanges.subscribe(t=>{t.length>=2&&this.clientsService.getFilteredClients("displayName","ASC",!0,t,this.groupForm.get("officeId").value).subscribe(n=>{this.clientsData=n.pageItems})})}createGroupForm(){this.groupForm=this.formBuilder.group({name:["",[se.required,se.pattern("(^[A-z]).*")]],officeId:["",se.required],submittedOnDate:[this.settingsService.businessDate,se.required],staffId:[""],externalId:[""],active:[!1]}),this.buildDependencies()}buildDependencies(){this.groupForm.get("officeId").valueChanges.subscribe(t=>{this.groupService.getStaff(t).subscribe(n=>{this.staffData=n.staffOptions,this.staffData===void 0?this.groupForm.controls.staffId.disable():this.groupForm.controls.staffId.enable()})}),this.groupForm.get("active").valueChanges.subscribe(t=>{t?this.groupForm.addControl("activationDate",new it("",se.required)):this.groupForm.removeControl("activationDate")})}addClient(){this.clientMembers.includes(this.clientChoice.value)||this.clientMembers.push(this.clientChoice.value)}removeClient(t){this.clientMembers.splice(t,1)}displayClient(t){return t?t.displayName:void 0}submit(){let t=this.groupForm.value,n=this.settingsService.language.code,i=this.settingsService.dateFormat,s=this.groupForm.value.submittedOnDate,d=this.groupForm.value.activationDate;t.submittedOnDate instanceof Date&&(t.submittedOnDate=this.dateUtils.formatDate(s,i)),t.activationDate instanceof Date&&(t.activationDate=this.dateUtils.formatDate(d,i));let u=qt(at({},t),{dateFormat:i,locale:n});u.clientMembers=[],this.clientMembers.forEach(f=>u.clientMembers.push(f.id)),this.groupService.createGroup(u).subscribe(f=>{this.router.navigate(["../groups",f.resourceId,"general"])})}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275cmp=me({type:e,selectors:[["mifosx-create-group"]],decls:64,vars:45,consts:[["submittedOnDatePicker",""],["clientsAutocomplete","matAutocomplete"],["activationDatePicker",""],[1,"container"],[3,"formGroup"],[1,"layout-column"],["matInput","","required","","formControlName","name"],["required","","formControlName","officeId"],[3,"value"],["formControlName","staffId"],[3,"click"],["matInput","","required","","formControlName","submittedOnDate",3,"min","max","matDatepicker"],["matSuffix","",3,"for"],["labelPosition","before","formControlName","active"],["matInput","","formControlName","externalId"],["matInput","",3,"formControl","matAutocomplete"],["autoActiveFirstOption","",3,"displayWith"],[1,"layout-row"],[1,"mat-table"],[1,"layout-row","align-center","gap-5px","responsive-column"],["type","button","mat-raised-button","",3,"routerLink"],["mat-raised-button","","color","primary",3,"click","disabled"],["matInput","","required","","formControlName","activationDate",3,"min","max","matDatepicker"],[1,"mat-header-row"],[1,"mat-header-cell"],["mat-icon-button","",3,"click"],["icon","plus"],[1,"mat-row"],[1,"mat-cell"],["matSubheader",""],["mat-list-item",""],["matLine",""],["mat-icon-button","","color","warn",3,"click"],["icon","trash"]],template:function(n,i){if(n&1){let s=Y();l(0,"div",3)(1,"mat-card")(2,"form",4)(3,"mat-card-content")(4,"div",5)(5,"mat-form-field")(6,"mat-label"),c(7),p(8,"translate"),r(),b(9,"input",6),E(10,qMe,7,9,"mat-error"),E(11,zMe,8,9,"mat-error"),r(),l(12,"mat-form-field")(13,"mat-label"),c(14),p(15,"translate"),r(),l(16,"mat-select",7),Se(17,HMe,2,2,"mat-option",8,Pe),r(),E(19,GMe,7,9,"mat-error"),r(),l(20,"mat-form-field")(21,"mat-label"),c(22),p(23,"translate"),r(),l(24,"mat-select",9),Se(25,jMe,2,2,"mat-option",8,Pe),r()(),l(27,"mat-form-field",10),R("click",function(){V(s);let u=xe(34);return q(u.open())}),l(28,"mat-label"),c(29),p(30,"translate"),r(),b(31,"input",11)(32,"mat-datepicker-toggle",12)(33,"mat-datepicker",null,0),E(35,$Me,7,9,"mat-error"),r(),l(36,"mat-checkbox",13),c(37),p(38,"translate"),r(),E(39,WMe,9,8,"mat-form-field"),l(40,"mat-form-field")(41,"mat-label"),c(42),p(43,"translate"),r(),b(44,"input",14),r(),l(45,"mat-form-field")(46,"mat-label"),c(47),p(48,"translate"),r(),b(49,"input",15),r()(),l(50,"mat-autocomplete",16,1),Se(52,QMe,2,2,"mat-option",8,Pe),r(),l(54,"div",17),E(55,YMe,25,15,"div",18),E(56,KMe,6,3,"mat-nav-list"),r()(),l(57,"mat-card-actions",19)(58,"button",20),c(59),p(60,"translate"),r(),l(61,"button",21),R("click",function(){return V(s),q(i.submit())}),c(62),p(63,"translate"),r()()()()()}if(n&2){let s=xe(34),d=xe(51);a(2),g("formGroup",i.groupForm),a(5),h(m(8,26,"labels.inputs.name")),a(3),I(i.groupForm.controls.name.hasError("required")?10:-1),a(),I(i.groupForm.controls.name.hasError("pattern")?11:-1),a(3),h(m(15,28,"labels.inputs.Office")),a(3),we(i.officeData),a(2),I(i.groupForm.controls.officeId.hasError("required")?19:-1),a(3),h(m(23,30,"labels.inputs.Staff")),a(3),we(i.staffData),a(4),h(m(30,32,"labels.inputs.Submitted On")),a(2),g("min",i.minDate)("max",i.maxDate)("matDatepicker",s),a(),g("for",s),a(3),I(i.groupForm.controls.submittedOnDate.hasError("required")?35:-1),a(2),v(" ",m(38,34,"labels.inputs.Active")," "),a(2),I(i.groupForm.controls.active.value?39:-1),a(3),h(m(43,36,"labels.inputs.External id")),a(5),h(m(48,38,"labels.inputs.Add Clients")),a(2),g("formControl",i.clientChoice)("matAutocomplete",d),a(),g("displayWith",i.displayClient),a(2),we(i.clientsData),a(3),I(i.clientChoice.value?55:-1),a(),I(i.clientMembers.length?56:-1),a(2),g("routerLink",oe(44,VMe)),a(),v(" ",m(60,40,"labels.buttons.Cancel")," "),a(2),g("disabled",!i.groupForm.valid),a(),v(" ",m(63,42,"labels.buttons.Submit")," ")}},dependencies:[ue,fe,tt,st,Ue,Xe,dt,_n,Ze,et,Ae,$e,Je,Et,Fe,Be,ut,ai,ze,gt,ft,mi,di,pi,ve,fi,er,Za,wi,ke,pa,Ep,ca,he],styles:[".container[_ngcontent-%COMP%]{max-width:50rem}.mat-table[_ngcontent-%COMP%]{display:block;font-family:Tahoma,Verdana,sans-serif;width:50%}.mat-row[_ngcontent-%COMP%], .mat-header-row[_ngcontent-%COMP%]{display:flex;border-bottom-width:1px;border-bottom-style:solid;align-items:center;min-height:48px;padding:0 24px}.mat-cell[_ngcontent-%COMP%], .mat-header-cell[_ngcontent-%COMP%]{flex:1;overflow:hidden;word-wrap:break-word}"]})}}return e})();var k2=(()=>{class e{constructor(){this.route=T(Ie),this.entityId=this.route.parent.parent.snapshot.paramMap.get("groupId"),this.route.data.subscribe(t=>{this.entityDatatable=t.groupDatatable,this.multiRowDatatableFlag=this.entityDatatable.columnHeaders[0].columnName==="id"})}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275cmp=me({type:e,selectors:[["mifosx-datatable-tabs"]],decls:2,vars:3,consts:[[1,"tab-container","mat-typography"],["entityType","Group",3,"entityId","multiRowDatatableFlag","entityDatatable"]],template:function(n,i){n&1&&(l(0,"div",0),b(1,"mifosx-entity-datatable-tab",1),r()),n&2&&(a(),g("entityId",i.entityId)("multiRowDatatableFlag",i.multiRowDatatableFlag)("entityDatatable",i.entityDatatable))},dependencies:[ue,fe,Or],encapsulation:2})}}return e})();var XMe=()=>["../"];function ZMe(e,o){if(e&1&&(l(0,"mat-option",4),c(1),r()),e&2){let t=o.$implicit;g("value",t.id),a(),v(" ",t.displayName," ")}}function e5e(e,o){e&1&&(l(0,"mat-error"),c(1),p(2,"translate"),p(3,"translate"),l(4,"strong"),c(5),p(6,"translate"),r()()),e&2&&(a(),le(" ",m(2,3,"labels.inputs.Client Member")," ",m(3,5,"labels.commons.is")," "),a(4),h(m(6,7,"labels.commons.required")))}function t5e(e,o){if(e&1&&(l(0,"mat-option",4),c(1),r()),e&2){let t=o.$implicit;g("value",t.id),a(),v(" ",t.name," ")}}function i5e(e,o){e&1&&(l(0,"mat-error"),c(1),p(2,"translate"),p(3,"translate"),l(4,"strong"),c(5),p(6,"translate"),r()()),e&2&&(a(),le(" ",m(2,3,"labels.inputs.Role")," ",m(3,5,"labels.commons.is")," "),a(4),h(m(6,7,"labels.commons.required")))}function n5e(e,o){if(e&1&&(l(0,"button",9),c(1),p(2,"translate"),r()),e&2){let t=w();g("disabled",!t.groupsAddRoleForm.valid),a(),v(" ",m(2,2,"labels.buttons.Confirm")," ")}}var B2=(()=>{class e{constructor(){this.formBuilder=T(nt),this.groupsService=T(An),this.route=T(Ie),this.router=T(qe),this.route.data.subscribe(t=>{this.groupAndTemplateData=t.groupAndTemplateData})}ngOnInit(){this.clientMemberData=this.groupAndTemplateData.activeClientMembers,this.roleData=this.groupAndTemplateData.availableRoles,this.createGroupsAddRoleForm()}createGroupsAddRoleForm(){this.groupsAddRoleForm=this.formBuilder.group({clientId:["",se.required],role:["",se.required]})}submit(){this.groupsService.executeGroupCommand(this.groupAndTemplateData.id,"assignRole",this.groupsAddRoleForm.value).subscribe(()=>{this.router.navigate(["../"],{relativeTo:this.route})})}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275cmp=me({type:e,selectors:[["mifosx-add-role"]],decls:26,vars:15,consts:[[1,"container"],[3,"ngSubmit","formGroup"],[1,"layout-column"],["formControlName","clientId"],[3,"value"],["formControlName","role"],[1,"layout-row","align-center","gap-5px","responsive-column"],["type","button","mat-raised-button","",3,"routerLink"],["mat-raised-button","","color","primary",3,"disabled",4,"mifosxHasPermission"],["mat-raised-button","","color","primary",3,"disabled"]],template:function(n,i){n&1&&(l(0,"div",0)(1,"mat-card")(2,"form",1),R("ngSubmit",function(){return i.submit()}),l(3,"mat-card-content")(4,"div",2)(5,"mat-form-field")(6,"mat-label"),c(7),p(8,"translate"),r(),l(9,"mat-select",3),Se(10,ZMe,2,2,"mat-option",4,Pe),r(),E(12,e5e,7,9,"mat-error"),r(),l(13,"mat-form-field")(14,"mat-label"),c(15),p(16,"translate"),r(),l(17,"mat-select",5),Se(18,t5e,2,2,"mat-option",4,Pe),r(),E(20,i5e,7,9,"mat-error"),r()()(),l(21,"mat-card-actions",6)(22,"button",7),c(23),p(24,"translate"),r(),F(25,n5e,3,4,"button",8),r()()()()),n&2&&(a(2),g("formGroup",i.groupsAddRoleForm),a(5),h(m(8,8,"labels.inputs.Client")),a(3),we(i.clientMemberData),a(2),I(i.groupsAddRoleForm.controls.clientId.hasError("required")?12:-1),a(3),h(m(16,10,"labels.inputs.Role")),a(3),we(i.roleData),a(2),I(i.groupsAddRoleForm.controls.role.hasError("required")?20:-1),a(2),g("routerLink",oe(14,XMe)),a(),v(" ",m(24,12,"labels.buttons.Cancel")," "),a(2),g("mifosxHasPermission","ASSIGNROLE_GROUP"))},dependencies:[ue,fe,tt,Ue,Xe,Ze,et,Ae,$e,Je,Et,Fe,Be,ut,gt,ft,ve,Ke,he],styles:[".container[_ngcontent-%COMP%]{max-width:37rem}"]})}}return e})();var o5e=()=>["../../"];function a5e(e,o){if(e&1&&(l(0,"mat-option",5),c(1),r()),e&2){let t=o.$implicit;g("value",t.id),a(),v(" ",t.displayName," ")}}function r5e(e,o){e&1&&(l(0,"mat-error"),c(1),p(2,"translate"),p(3,"translate"),l(4,"strong"),c(5),p(6,"translate"),r()()),e&2&&(a(),le(" ",m(2,3,"labels.inputs.Staff")," ",m(3,5,"labels.commons.is")," "),a(4),h(m(6,7,"labels.commons.required")))}var R2=(()=>{class e{constructor(){this.formBuilder=T(nt),this.groupsService=T(An),this.route=T(Ie),this.router=T(qe),this.route.data.subscribe(t=>{this.groupData=t.groupActionData})}ngOnInit(){this.staffData=this.groupData.staffOptions,this.createGroupAssignStaffForm()}createGroupAssignStaffForm(){this.groupAssignStaffForm=this.formBuilder.group({staffId:[""]})}submit(){this.groupsService.executeGroupCommand(this.groupData.id,"assignStaff",this.groupAssignStaffForm.value).subscribe(()=>{this.router.navigate(["../../"],{relativeTo:this.route})})}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275cmp=me({type:e,selectors:[["mifosx-group-assign-staff"]],decls:20,vars:14,consts:[[1,"container"],[3,"ngSubmit","formGroup"],[1,"layout-column"],[1,"flex-48"],["formControlName","staffId"],[3,"value"],[1,"layout-row","align-center","gap-5px","responsive-column"],["type","button","mat-raised-button","",3,"routerLink"],["mat-raised-button","","color","primary",3,"disabled"]],template:function(n,i){n&1&&(l(0,"div",0)(1,"mat-card")(2,"form",1),R("ngSubmit",function(){return i.submit()}),l(3,"mat-card-content")(4,"div",2)(5,"mat-form-field",3)(6,"mat-label"),c(7),p(8,"translate"),r(),l(9,"mat-select",4),Se(10,a5e,2,2,"mat-option",5,Pe),r(),E(12,r5e,7,9,"mat-error"),r()()(),l(13,"mat-card-actions",6)(14,"button",7),c(15),p(16,"translate"),r(),l(17,"button",8),c(18),p(19,"translate"),r()()()()()),n&2&&(a(2),g("formGroup",i.groupAssignStaffForm),a(5),h(m(8,7,"labels.inputs.Staff")),a(3),we(i.staffData),a(2),I(i.groupAssignStaffForm.controls.staffId.hasError("required")?12:-1),a(2),g("routerLink",oe(13,o5e)),a(),v(" ",m(16,9,"labels.buttons.Cancel")," "),a(2),g("disabled",!i.groupAssignStaffForm.valid),a(),v(" ",m(19,11,"labels.buttons.Confirm")," "))},dependencies:[ue,fe,tt,Ue,Xe,Ze,et,Ae,$e,Je,Et,Fe,Be,ut,gt,ft,ve,he],styles:[".container[_ngcontent-%COMP%]{max-width:37rem}"]})}}return e})();var l5e=()=>["../../"];function s5e(e,o){e&1&&(l(0,"mat-error"),c(1),p(2,"translate"),p(3,"translate"),l(4,"strong"),c(5),p(6,"translate"),r()()),e&2&&(a(),le(" ",m(2,3,"labels.inputs.Closed On Date")," ",m(3,5,"labels.commons.is")," "),a(4),h(m(6,7,"labels.commons.required")))}function c5e(e,o){if(e&1&&(l(0,"mat-option",9),c(1),r()),e&2){let t=o.$implicit;g("value",t.id),a(),v(" ",t.name," ")}}function p5e(e,o){e&1&&(l(0,"mat-error"),c(1),p(2,"translate"),p(3,"translate"),l(4,"strong"),c(5),p(6,"translate"),r()()),e&2&&(a(),le(" ",m(2,3,"labels.inputs.Closure Reason")," ",m(3,5,"labels.commons.is")," "),a(4),h(m(6,7,"labels.commons.required")))}var N2=(()=>{class e{constructor(){this.formBuilder=T(nt),this.groupsService=T(An),this.dateUtils=T(Zt),this.route=T(Ie),this.router=T(qe),this.settingsService=T(At),this.minDate=new Date(2e3,0,1),this.maxDate=new Date,this.route.data.subscribe(t=>{this.closureData=t.groupActionData.closureReasons}),this.groupId=this.route.parent.snapshot.params.groupId}ngOnInit(){this.maxDate=this.settingsService.businessDate,this.createCloseGroupForm()}createCloseGroupForm(){this.closeGroupForm=this.formBuilder.group({closureDate:["",se.required],closureReasonId:["",se.required]})}submit(){let t=this.closeGroupForm.value,n=this.settingsService.language.code,i=this.settingsService.dateFormat,s=this.closeGroupForm.value.closureDate;t.closureDate instanceof Date&&(t.closureDate=this.dateUtils.formatDate(s,i));let d=qt(at({},t),{dateFormat:i,locale:n});this.groupsService.executeGroupCommand(this.groupId,"close",d).subscribe(()=>{this.router.navigate(["../../"],{relativeTo:this.route})})}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275cmp=me({type:e,selectors:[["mifosx-close-group"]],decls:29,vars:22,consts:[["closureDatePicker",""],[1,"container"],[3,"ngSubmit","formGroup"],[1,"layout-column"],[3,"click"],["matInput","","required","","formControlName","closureDate",3,"min","max","matDatepicker"],["matSuffix","",3,"for"],[1,"flex-48"],["formControlName","closureReasonId"],[3,"value"],[1,"layout-row","align-center","gap-5px","responsive-column"],["type","button","mat-raised-button","",3,"routerLink"],["mat-raised-button","","color","warn",3,"disabled"]],template:function(n,i){if(n&1){let s=Y();l(0,"div",1)(1,"mat-card")(2,"form",2),R("ngSubmit",function(){return V(s),q(i.submit())}),l(3,"mat-card-content")(4,"div",3)(5,"mat-form-field",4),R("click",function(){V(s);let u=xe(12);return q(u.open())}),l(6,"mat-label"),c(7),p(8,"translate"),r(),b(9,"input",5)(10,"mat-datepicker-toggle",6)(11,"mat-datepicker",null,0),E(13,s5e,7,9,"mat-error"),r(),l(14,"mat-form-field",7)(15,"mat-label"),c(16),p(17,"translate"),r(),l(18,"mat-select",8),Se(19,c5e,2,2,"mat-option",9,Pe),r(),E(21,p5e,7,9,"mat-error"),r()()(),l(22,"mat-card-actions",10)(23,"button",11),c(24),p(25,"translate"),r(),l(26,"button",12),c(27),p(28,"translate"),r()()()()()}if(n&2){let s=xe(12);a(2),g("formGroup",i.closeGroupForm),a(5),h(m(8,13,"labels.inputs.Closed On Date")),a(2),g("min",i.minDate)("max",i.maxDate)("matDatepicker",s),a(),g("for",s),a(3),I(i.closeGroupForm.controls.closureDate.hasError("required")?13:-1),a(3),h(m(17,15,"labels.inputs.Closure Reason")),a(3),we(i.closureData),a(2),I(i.closeGroupForm.controls.closureReasonId.hasError("required")?21:-1),a(2),g("routerLink",oe(21,l5e)),a(),v(" ",m(25,17,"labels.buttons.Cancel")," "),a(2),g("disabled",!i.closeGroupForm.valid),a(),v(" ",m(28,19,"labels.buttons.Confirm")," ")}},dependencies:[ue,fe,tt,st,Ue,Xe,dt,Ze,et,Ae,$e,Je,Et,Fe,Be,ut,ai,ze,gt,ft,mi,di,pi,ve,he],styles:[".container[_ngcontent-%COMP%]{max-width:37rem}"]})}}return e})();var m5e=()=>["../../"];function d5e(e,o){e&1&&(l(0,"mat-error"),c(1),p(2,"translate"),p(3,"translate"),l(4,"strong"),c(5),p(6,"translate"),r()()),e&2&&(a(),le(" ",m(2,3,"labels.inputs.Activated On Date")," ",m(3,5,"labels.commons.is")," "),a(4),h(m(6,7,"labels.commons.required")))}var L2=(()=>{class e{constructor(){this.formBuilder=T(nt),this.groupsService=T(An),this.dateUtils=T(Zt),this.route=T(Ie),this.router=T(qe),this.settingsService=T(At),this.minDate=new Date(2e3,0,1),this.maxDate=new Date,this.groupId=this.route.parent.snapshot.params.groupId}ngOnInit(){this.maxDate=this.settingsService.businessDate,this.createActivateGroupForm()}createActivateGroupForm(){this.activateGroupForm=this.formBuilder.group({activationDate:["",se.required]})}submit(){let t=this.activateGroupForm.value,n=this.settingsService.language.code,i=this.settingsService.dateFormat,s=this.activateGroupForm.value.activationDate;t.activationDate instanceof Date&&(t.activationDate=this.dateUtils.formatDate(s,i));let d=qt(at({},t),{dateFormat:i,locale:n});this.groupsService.executeGroupCommand(this.groupId,"activate",d).subscribe(()=>{this.router.navigate(["../../"],{relativeTo:this.route})})}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275cmp=me({type:e,selectors:[["mifosx-activate-group"]],decls:20,vars:18,consts:[["activationDatePicker",""],[1,"container"],[3,"ngSubmit","formGroup"],[1,"flex-fill",3,"click"],["matInput","","required","","formControlName","activationDate",3,"min","max","matDatepicker"],["matSuffix","",3,"for"],[1,"layout-row","align-center","gap-5px","responsive-column"],["type","button","mat-raised-button","",3,"routerLink"],["mat-raised-button","","color","primary",3,"disabled"]],template:function(n,i){if(n&1){let s=Y();l(0,"div",1)(1,"mat-card")(2,"form",2),R("ngSubmit",function(){return V(s),q(i.submit())}),l(3,"mat-card-content")(4,"mat-form-field",3),R("click",function(){V(s);let u=xe(11);return q(u.open())}),l(5,"mat-label"),c(6),p(7,"translate"),r(),b(8,"input",4)(9,"mat-datepicker-toggle",5)(10,"mat-datepicker",null,0),E(12,d5e,7,9,"mat-error"),r()(),l(13,"mat-card-actions",6)(14,"button",7),c(15),p(16,"translate"),r(),l(17,"button",8),c(18),p(19,"translate"),r()()()()()}if(n&2){let s=xe(11);a(2),g("formGroup",i.activateGroupForm),a(4),h(m(7,11,"labels.inputs.Activated On Date")),a(2),g("min",i.minDate)("max",i.maxDate)("matDatepicker",s),a(),g("for",s),a(3),I(i.activateGroupForm.controls.activationDate.hasError("required")?12:-1),a(2),g("routerLink",oe(17,m5e)),a(),v(" ",m(16,13,"labels.buttons.Cancel")," "),a(2),g("disabled",!i.activateGroupForm.valid),a(),v(" ",m(19,15,"labels.buttons.Confirm")," ")}},dependencies:[ue,fe,tt,st,Ue,Xe,dt,Ze,et,Ae,$e,Je,Et,Fe,Be,ut,ai,ze,mi,di,pi,ve,he],styles:[".container[_ngcontent-%COMP%]{max-width:37rem}"]})}}return e})();var u5e=()=>["../../"];function f5e(e,o){e&1&&(l(0,"mat-error"),c(1),p(2,"translate"),p(3,"translate"),l(4,"strong"),c(5),p(6,"translate"),r()()),e&2&&(a(),le(" ",m(2,3,"labels.inputs.Start Date")," ",m(3,5,"labels.commons.is")," "),a(4),h(m(6,7,"labels.commons.required")))}function h5e(e,o){if(e&1&&(l(0,"mat-option",12),c(1),r()),e&2){let t=o.$implicit;g("value",t.id),a(),v(" ",t.value," ")}}function g5e(e,o){e&1&&(l(0,"mat-error"),c(1),p(2,"translate"),p(3,"translate"),l(4,"strong"),c(5),p(6,"translate"),r()()),e&2&&(a(),le(" ",m(2,3,"labels.inputs.Repetition Frequency")," ",m(3,5,"labels.commons.is")," "),a(4),h(m(6,7,"labels.commons.required")))}function _5e(e,o){if(e&1&&(l(0,"mat-form-field")(1,"mat-label"),c(2),p(3,"translate"),r(),l(4,"mat-select",11),Se(5,h5e,2,2,"mat-option",12,Pe),r(),E(7,g5e,7,9,"mat-error"),r()),e&2){let t=w();a(2),h(m(3,2,"labels.inputs.Repetition Frequency")),a(3),we(t.frequencyOptions),a(2),I(t.groupMeetingForm.controls.frequency.hasError("repeatsOnDay")?7:-1)}}function C5e(e,o){if(e&1&&(l(0,"mat-option",12),c(1),r()),e&2){let t=o.$implicit;g("value",t),a(),v(" ",t," ")}}function v5e(e,o){e&1&&(l(0,"mat-error"),c(1),p(2,"translate"),p(3,"translate"),l(4,"strong"),c(5),p(6,"translate"),r()()),e&2&&(a(),le(" ",m(2,3,"labels.inputs.Repeition Interval")," ",m(3,5,"labels.commons.is")," "),a(4),h(m(6,7,"labels.commons.required")))}function x5e(e,o){if(e&1&&(l(0,"mat-form-field")(1,"mat-label"),c(2),p(3,"translate"),r(),l(4,"mat-select",13),Se(5,C5e,2,2,"mat-option",12,Pe),r(),E(7,v5e,7,9,"mat-error"),r()),e&2){let t=w();a(2),h(m(3,2,"labels.inputs.Repetition Interval")),a(3),we(t.repetitionIntervals),a(2),I(t.groupMeetingForm.controls.interval.hasError("repeatsOnDay")?7:-1)}}function b5e(e,o){if(e&1&&(l(0,"mat-option",12),c(1),r()),e&2){let t=o.$implicit;g("value",t.id),a(),v(" ",t.value," ")}}function y5e(e,o){e&1&&(l(0,"mat-error"),c(1),p(2,"translate"),l(3,"strong"),c(4),p(5,"translate"),r(),c(6),p(7,"translate"),r()),e&2&&(a(),v(" ",m(2,3,"labels.inputs.At least")," "),a(3),h(m(5,5,"labels.inputs.one")),a(2),v(" ",m(7,7,"labels.inputs.day must be selected")," "))}function S5e(e,o){if(e&1&&(l(0,"mat-form-field")(1,"mat-label"),c(2),p(3,"translate"),r(),l(4,"mat-select",14),Se(5,b5e,2,2,"mat-option",12,Pe),r(),E(7,y5e,8,9,"mat-error"),r()),e&2){let t=w();a(2),h(m(3,2,"labels.inputs.Repeats on Day")),a(3),we(t.repeatsOnDays),a(2),I(t.groupMeetingForm.controls.repeatsOnDay.hasError("repeatsOnDay")?7:-1)}}function w5e(e,o){if(e&1){let t=Y();l(0,"button",15),R("click",function(){V(t);let i=w();return q(i.submit())}),c(1),p(2,"translate"),r()}if(e&2){let t=w();g("disabled",!t.groupMeetingForm.valid),a(),v(" ",m(2,2,"labels.buttons.Submit")," ")}}var V2=(()=>{class e{constructor(){this.formBuilder=T(nt),this.groupsService=T(An),this.dateUtils=T(Zt),this.route=T(Ie),this.router=T(qe),this.settingsService=T(At),this.minDate=new Date(2e3,0,1),this.maxDate=new Date,this.route.data.subscribe(t=>{this.calendarTemplate=t.groupActionData,this.frequencyOptions=this.calendarTemplate.frequencyOptions,this.repeatsOnDays=this.calendarTemplate.repeatsOnDayOptions}),this.groupId=this.route.parent.snapshot.params.groupId}ngOnInit(){this.maxDate=this.settingsService.maxFutureDate,this.createGroupMeetingForm(),this.buildDependencies()}createGroupMeetingForm(){this.groupMeetingForm=this.formBuilder.group({startDate:["",se.required],repeating:[!1]})}buildDependencies(){this.groupMeetingForm.get("repeating").valueChanges.subscribe(t=>{t?(this.groupMeetingForm.addControl("frequency",new it),this.groupMeetingForm.addControl("interval",new it),this.groupMeetingForm.get("frequency").valueChanges.subscribe(n=>{switch(this.groupMeetingForm.removeControl("repeatsOnDay"),n){case 1:this.repetitionIntervals=["1","2","3"];break;case 2:this.repetitionIntervals=["1","2","3"],this.groupMeetingForm.addControl("repeatsOnDay",new it("",se.required));break;case 3:this.repetitionIntervals=["1","2","3","4","5","6","7","8","9","10","11"];break;case 4:this.repetitionIntervals=["1","2","3","4","5"];break}}),this.groupMeetingForm.patchValue({frequency:1,interval:"1"})):(this.groupMeetingForm.removeControl("frequency"),this.groupMeetingForm.removeControl("interval"))})}submit(){let t=this.groupMeetingForm.value,n=this.settingsService.language.code,i=this.settingsService.dateFormat,s=`groups_${this.groupId}_CollectionMeeting`,d=t.repeating?"1":"4",u=this.groupMeetingForm.value.startDate;t.startDate instanceof Date&&(t.startDate=this.dateUtils.formatDate(u,i));let f=qt(at({},t),{title:s,typeId:d,dateFormat:i,locale:n});this.groupsService.createGroupMeeting(this.groupId,f).subscribe(_=>{this.router.navigate(["../../"],{relativeTo:this.route})})}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275cmp=me({type:e,selectors:[["mifosx-attach-group-meeting"]],decls:25,vars:21,consts:[["startDatePicker",""],[1,"container"],[3,"formGroup"],[1,"layout-column"],[3,"click"],["matInput","","required","","formControlName","startDate",3,"min","max","matDatepicker"],["matSuffix","",3,"for"],["labelPosition","before","formControlName","repeating",1,"m-t-10","m-b-10"],[1,"layout-row","align-center","gap-5px","responsive-column"],["type","button","mat-raised-button","",3,"routerLink"],["mat-raised-button","","color","primary",3,"disabled","click",4,"mifosxHasPermission"],["formControlName","frequency"],[3,"value"],["formControlName","interval"],["formControlName","repeatsOnDay","required",""],["mat-raised-button","","color","primary",3,"click","disabled"]],template:function(n,i){if(n&1){let s=Y();l(0,"div",1)(1,"mat-card")(2,"form",2)(3,"mat-card-content")(4,"div",3)(5,"mat-form-field",4),R("click",function(){V(s);let u=xe(12);return q(u.open())}),l(6,"mat-label"),c(7),p(8,"translate"),r(),b(9,"input",5)(10,"mat-datepicker-toggle",6)(11,"mat-datepicker",null,0),E(13,f5e,7,9,"mat-error"),r(),l(14,"mat-checkbox",7),c(15),p(16,"translate"),r(),E(17,_5e,8,4,"mat-form-field"),E(18,x5e,8,4,"mat-form-field"),E(19,S5e,8,4,"mat-form-field"),r()(),l(20,"mat-card-actions",8)(21,"button",9),c(22),p(23,"translate"),r(),F(24,w5e,3,4,"button",10),r()()()()}if(n&2){let s=xe(12);a(2),g("formGroup",i.groupMeetingForm),a(5),h(m(8,14,"labels.inputs.Meeting Start Date")),a(2),g("min",i.minDate)("max",i.maxDate)("matDatepicker",s),a(),g("for",s),a(3),I(i.groupMeetingForm.controls.startDate.hasError("required")?13:-1),a(2),v(" ",m(16,16,"labels.inputs.Repeats"),"? "),a(2),I(i.groupMeetingForm.contains("frequency")?17:-1),a(),I(i.groupMeetingForm.contains("interval")?18:-1),a(),I(i.groupMeetingForm.contains("repeatsOnDay")?19:-1),a(2),g("routerLink",oe(20,u5e)),a(),v(" ",m(23,18,"labels.buttons.Cancel")," "),a(2),g("mifosxHasPermission","CREATE_MEETING")}},dependencies:[ue,fe,tt,st,Ue,Xe,dt,Ze,et,Ae,$e,Je,Et,Fe,Be,ut,ai,ze,gt,ft,mi,di,pi,ve,fi,Ke,he],styles:[".container[_ngcontent-%COMP%]{max-width:37rem}"]})}}return e})();var P5e=()=>["../../"];function T5e(e,o){if(e&1&&(l(0,"mat-option",16),c(1),p(2,"dateFormat"),r()),e&2){let t=o.$implicit;g("value",t),a(),v(" ",m(2,2,t)," ")}}function M5e(e,o){e&1&&(l(0,"th",17),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.name")))}function D5e(e,o){if(e&1&&(l(0,"td",18),c(1),p(2,"find"),r()),e&2){let t=o.$implicit,n=w();a(),h($t(2,1,t.clientId,n.membersData,"id","displayName"))}}function E5e(e,o){e&1&&(l(0,"th",17),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.Attendance")))}function I5e(e,o){e&1&&(l(0,"span"),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.Present")))}function O5e(e,o){e&1&&(l(0,"span"),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.Absent")))}function A5e(e,o){e&1&&(l(0,"span"),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.Approved")))}function F5e(e,o){e&1&&(l(0,"span"),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.Leave")))}function k5e(e,o){e&1&&(l(0,"span"),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.Late")))}function B5e(e,o){if(e&1){let t=Y();l(0,"td",19),F(1,I5e,3,3,"span",20)(2,O5e,3,3,"span",20)(3,A5e,3,3,"span",20)(4,F5e,3,3,"span",20)(5,k5e,3,3,"span",20),l(6,"button",21),R("click",function(){let i=V(t).$implicit,s=w();return q(s.editAttendance(i))}),b(7,"fa-icon",22),r()()}if(e&2){let t=o.$implicit;g("ngSwitch",t.attendanceType),a(),g("ngSwitchCase",1),a(),g("ngSwitchCase",2),a(),g("ngSwitchCase",3),a(),g("ngSwitchCase",4),a(),g("ngSwitchCase",5)}}function R5e(e,o){e&1&&b(0,"tr",23)}function N5e(e,o){e&1&&b(0,"tr",24)}function L5e(e,o){if(e&1){let t=Y();l(0,"button",25),R("click",function(){V(t);let i=w();return q(i.submit())}),c(1),p(2,"translate"),r()}e&2&&(a(),v(" ",m(2,1,"labels.buttons.Confirm")," "))}var q2=(()=>{class e{constructor(){this.route=T(Ie),this.dateUtils=T(Zt),this.router=T(qe),this.groupsService=T(An),this.dialog=T(Ht),this.settingsService=T(At),this.displayedColumns=["name","attendance"],this.meetingDate=new it,this.route.data.subscribe(t=>{this.groupData=t.groupActionData,this.membersData=t.groupActionData.clientMembers})}ngOnInit(){this.dataSource=this.membersData.map(t=>({clientId:t.id,attendanceType:1})),this.meetingDates=this.groupData.collectionMeetingCalendar.recurringDates.filter(t=>new Date(t).getTime(){this.attendanceTypeOptions=t.attendanceTypeOptions})}editAttendance(t){let n=[new $i({controlName:"attendanceType",label:"Attendance",value:t.attendanceType,options:{label:"value",value:"id",data:this.attendanceTypeOptions},required:!1})],i={title:"Assign Member Attendance",layout:{addButtonText:"Confirm"},formfields:n};this.dialog.open(an,{data:i}).afterClosed().subscribe(d=>{if(d.data){let u=at(at({},t),d.data.value);this.dataSource.splice(this.dataSource.indexOf(t),1,u),this.dataSource=this.dataSource.concat([])}})}submit(){let t=this.settingsService.language.code,n=this.settingsService.dateFormat,i=new Date(this.meetingDate.value),s={meetingDate:this.dateUtils.formatDate(i,n),calendarId:this.groupData.collectionMeetingCalendar.id,clientsAttendance:this.dataSource,dateFormat:n,locale:t};this.groupsService.assignGroupAttendance(this.groupData.id,this.groupData.collectionMeetingCalendar.id,s).subscribe(()=>{this.router.navigate(["../../"],{relativeTo:this.route})})}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275cmp=me({type:e,selectors:[["mifosx-group-attendance"]],decls:26,vars:20,consts:[[1,"container"],[1,"layout-column","gap-3percent"],[1,"flex-fill"],[3,"formControl"],[3,"value",4,"ngFor","ngForOf"],["mat-table","",1,"mat-elevation-z1",3,"dataSource"],["matColumnDef","name"],["mat-header-cell","",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","attendance"],["mat-cell","",3,"ngSwitch",4,"matCellDef"],["mat-header-row","",4,"matHeaderRowDef"],["mat-row","",4,"matRowDef","matRowDefColumns"],[1,"layout-row","align-center","gap-5px","responsive-column"],["type","button","mat-raised-button","",3,"routerLink"],["mat-raised-button","","color","primary",3,"click",4,"mifosxHasPermission"],[3,"value"],["mat-header-cell",""],["mat-cell",""],["mat-cell","",3,"ngSwitch"],[4,"ngSwitchCase"],["mat-icon-button","","color","primary",3,"click"],["icon","pen"],["mat-header-row",""],["mat-row",""],["mat-raised-button","","color","primary",3,"click"]],template:function(n,i){n&1&&(l(0,"div",0)(1,"mat-card",1)(2,"mat-form-field",2)(3,"mat-label"),c(4),p(5,"translate"),r(),l(6,"mat-select",3),F(7,T5e,3,4,"mat-option",4),r(),l(8,"mat-hint"),c(9),p(10,"translate"),p(11,"dateFormat"),r()(),l(12,"table",5),X(13,6),F(14,M5e,3,3,"th",7)(15,D5e,3,6,"td",8),Z(),X(16,9),F(17,E5e,3,3,"th",7)(18,B5e,8,6,"td",10),Z(),F(19,R5e,1,0,"tr",11)(20,N5e,1,0,"tr",12),r(),l(21,"mat-card-actions",13)(22,"button",14),c(23),p(24,"translate"),r(),F(25,L5e,3,3,"button",15),r()()()),n&2&&(a(4),h(m(5,11,"labels.inputs.Meeting Date")),a(2),g("formControl",i.meetingDate),a(),g("ngForOf",i.meetingDates),a(2),le("",m(10,13,"labels.inputs.Next Meeting on"),": ",m(11,15,i.groupData.collectionMeetingCalendar.nextTenRecurringDates[0])),a(3),g("dataSource",i.dataSource),a(7),g("matHeaderRowDef",i.displayedColumns),a(),g("matRowDefColumns",i.displayedColumns),a(2),g("routerLink",oe(19,P5e)),a(),v(" ",m(24,17,"labels.buttons.Cancel")," "),a(2),g("mifosxHasPermission","SAVEORUPDATEATTENDANCE_MEETING"))},dependencies:[ue,is,Ks,Xs,fe,Ue,_n,Ae,$e,Et,Fe,Be,za,gt,ft,ve,Ke,_t,xt,vt,bt,Ct,yt,wi,ke,St,Pt,wt,Tt,Pi,he,Qn],styles:[".container[_ngcontent-%COMP%]{max-width:37rem}"]})}}return e})();function V5e(e,o){if(e&1&&(l(0,"mat-option",6),c(1),r()),e&2){let t=o.$implicit;g("value",t),a(),v(" ",t.displayName," ")}}function q5e(e,o){if(e&1){let t=Y();l(0,"div",16)(1,"span",17),c(2),r(),b(3,"div",18),l(4,"button",19),p(5,"translate"),R("click",function(){let i=V(t),s=i.$implicit,d=i.$index,u=w(2);return q(u.removeClient(d,s))}),b(6,"fa-icon",20),r()()}if(e&2){let t=o.$implicit;a(2),h(t.displayName),a(2),g("matTooltip",Le(m(5,3,"tooltips.Remove Client from Group")))}}function z5e(e,o){if(e&1&&(l(0,"mat-nav-list"),Se(1,q5e,7,5,"div",16,Pe),r()),e&2){let t=w();a(),we(t.clientMembers)}}var z2=(()=>{class e{constructor(){this.route=T(Ie),this.groupsService=T(An),this.clientsService=T(Oi),this.dialog=T(Ht),this.clientsData=[],this.clientMembers=[],this.clientChoice=new it(""),this.route.data.subscribe(t=>{this.groupData=t.groupActionData,this.clientMembers=t.groupActionData.clientMembers||[]})}ngAfterViewInit(){this.clientChoice.valueChanges.subscribe(t=>{t.length>=2&&this.clientsService.getFilteredClients("displayName","ASC",!0,t,this.groupData.officeId).subscribe(n=>{this.clientsData=n.pageItems})})}addClient(){this.clientMembers.includes(this.clientChoice.value)||this.groupsService.executeGroupCommand(this.groupData.id,"associateClients",{clientMembers:[this.clientChoice.value.id]}).subscribe(()=>{this.clientMembers.push(this.clientChoice.value)})}removeClient(t,n){this.dialog.open(vi,{data:{deleteContext:`client member: ${n.displayName}`}}).afterClosed().subscribe(s=>{s.delete&&this.groupsService.executeGroupCommand(this.groupData.id,"disassociateClients",{clientMembers:[n.id]}).subscribe(()=>{this.clientMembers.splice(t,1)})})}displayClient(t){return t?t.displayName:void 0}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275cmp=me({type:e,selectors:[["mifosx-manage-group-members"]],decls:41,vars:25,consts:[["clientsAutocomplete","matAutocomplete"],[1,"container","layout-row","gap-3percent"],[1,"client-card","layout-column","flex","gap-2px"],[1,"flex-30"],["matInput","",3,"formControl","matAutocomplete"],["autoActiveFirstOption","",3,"displayWith"],[3,"value"],[1,"mat-table"],[1,"mat-header-row"],[1,"mat-header-cell"],["mat-icon-button","",3,"click"],["icon","plus"],[1,"mat-row"],[1,"mat-cell"],[1,"flex-50"],["matSubheader",""],["mat-list-item",""],["matLine","",1,"p-t-10"],[1,"flex-fill"],["mat-icon-button","","color","warn","matTooltipPosition","left",3,"click","matTooltip"],["icon","trash"]],template:function(n,i){if(n&1){let s=Y();l(0,"div",1)(1,"mat-card",2)(2,"mat-form-field",3)(3,"mat-label"),c(4),p(5,"translate"),r(),b(6,"input",4),r(),l(7,"mat-autocomplete",5,0),Se(9,V5e,2,2,"mat-option",6,Pe),r(),l(11,"div",7)(12,"div",8)(13,"div",9),c(14),p(15,"translate"),r(),l(16,"button",10),R("click",function(){return V(s),q(i.addClient())}),b(17,"fa-icon",11),r()(),l(18,"div",12)(19,"div",13),c(20),p(21,"translate"),r(),l(22,"div",13),c(23),r()(),l(24,"div",12)(25,"div",13),c(26),p(27,"translate"),r(),l(28,"div",13),c(29),r()(),l(30,"div",12)(31,"div",13),c(32),p(33,"translate"),r(),l(34,"div",13),c(35),r()()()(),l(36,"mat-card",14)(37,"h3",15),c(38),p(39,"translate"),r(),E(40,z5e,3,0,"mat-nav-list"),r()()}if(n&2){let s=xe(8);a(4),h(m(5,13,"labels.inputs.Add Clients")),a(2),g("formControl",i.clientChoice)("matAutocomplete",s),a(),g("displayWith",i.displayClient),a(2),we(i.clientsData),a(5),h(m(15,15,"labels.inputs.Client Details")),a(6),h(m(21,17,"labels.inputs.name")),a(3),h(i.clientChoice.value.displayName),a(3),h(m(27,19,"labels.inputs.Id")),a(3),h(i.clientChoice.value.id),a(3),h(m(33,21,"labels.inputs.Office")),a(3),h(i.clientChoice.value.officeName),a(3),h(m(39,23,"labels.heading.Client Members")),a(2),I(i.clientMembers!=null&&i.clientMembers.length?40:-1)}},dependencies:[ue,fe,st,Ue,_n,$e,Fe,Be,ze,ft,er,Za,wi,ke,Ep,pa,ca,si,he],styles:[".container[_ngcontent-%COMP%]{max-width:70rem}.container[_ngcontent-%COMP%] .mat-table[_ngcontent-%COMP%]{display:block;font-family:Roboto,Helvetica Neue,sans-serif;width:100%;margin-top:-2rem;padding:1.5rem}.container[_ngcontent-%COMP%] .mat-row[_ngcontent-%COMP%], .container[_ngcontent-%COMP%] .mat-header-row[_ngcontent-%COMP%]{display:flex;border-bottom:1px solid var(--border-color-light, #eee);color:var(--text-color, inherit);font-weight:500;align-items:center;min-height:48px;padding:0 24px}.container[_ngcontent-%COMP%] .mat-cell[_ngcontent-%COMP%], .container[_ngcontent-%COMP%] .mat-header-cell[_ngcontent-%COMP%]{flex:1;overflow:hidden;word-wrap:break-word;flex-direction:column}.container[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{padding-left:0;margin-bottom:0;font-weight:500;border-bottom:2px solid var(--border-color-light, #eee)}.container[_ngcontent-%COMP%] .p-t-10[_ngcontent-%COMP%]{font-weight:500;margin-left:1rem}.container[_ngcontent-%COMP%] .client-card[_ngcontent-%COMP%], .container[_ngcontent-%COMP%] .flex-50[_ngcontent-%COMP%]{max-height:20rem;margin-bottom:1rem;padding:1.5rem;box-shadow:0 2px 4px #0000001a;border:1px solid var(--border-color, #ddd);border-radius:8px;transition:background-color .3s ease,border-color .3s ease}.container[_ngcontent-%COMP%] .flex-50[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{left:0}.container[_ngcontent-%COMP%] .flex-fill[_ngcontent-%COMP%]{margin-top:.5rem;display:inline;font-weight:500}"]})}}return e})();var H5e=()=>["../../"];function G5e(e,o){if(e&1&&(l(0,"mat-option",8),c(1),r()),e&2){let t=o.$implicit;g("value",t.id),a(),v(" ",t.value," ")}}function j5e(e,o){e&1&&(l(0,"mat-error"),c(1),p(2,"translate"),p(3,"translate"),l(4,"strong"),c(5),p(6,"translate"),r()()),e&2&&(a(),le(" ",m(2,3,"labels.inputs.Repetition Frequency")," ",m(3,5,"labels.commons.is")," "),a(4),h(m(6,7,"labels.commons.required")))}function $5e(e,o){if(e&1&&(l(0,"mat-option",8),c(1),r()),e&2){let t=o.$implicit;g("value",t),a(),v(" ",t," ")}}function U5e(e,o){e&1&&(l(0,"mat-error"),c(1),p(2,"translate"),p(3,"translate"),l(4,"strong"),c(5),p(6,"translate"),r()()),e&2&&(a(),le(" ",m(2,3,"labels.inputs.Repeition Interval")," ",m(3,5,"labels.commons.is")," "),a(4),h(m(6,7,"labels.commons.required")))}function W5e(e,o){if(e&1&&(l(0,"mat-option",8),c(1),r()),e&2){let t=o.$implicit;g("value",t.id),a(),v(" ",t.value," ")}}function Q5e(e,o){e&1&&(l(0,"mat-error"),c(1),p(2,"translate"),l(3,"strong"),c(4),p(5,"translate"),r(),c(6),p(7,"translate"),r()),e&2&&(a(),v(" ",m(2,3,"labels.inputs.At least")," "),a(3),h(m(5,5,"labels.inputs.one")),a(2),v(" ",m(7,7,"labels.inputs.day must be selected")," "))}function Y5e(e,o){if(e&1&&(l(0,"mat-form-field")(1,"mat-label"),c(2),p(3,"translate"),r(),l(4,"mat-select",16),Se(5,W5e,2,2,"mat-option",8,Pe),r(),E(7,Q5e,8,9,"mat-error"),r()),e&2){let t=w();a(2),h(m(3,2,"labels.inputs.Repeats on Day")),a(3),we(t.repeatsOnDays),a(2),I(t.groupEditMeetingForm.controls.repeatsOnDay.hasError("repeatsOnDay")?7:-1)}}function J5e(e,o){e&1&&(l(0,"mat-error"),c(1),p(2,"translate"),p(3,"translate"),l(4,"strong"),c(5),p(6,"translate"),r()()),e&2&&(a(),le(" ",m(2,3,"labels.inputs.Changes Affection Date")," ",m(3,5,"labels.commons.is")," "),a(4),h(m(6,7,"labels.commons.required")))}function K5e(e,o){if(e&1){let t=Y();l(0,"button",17),R("click",function(){V(t);let i=w();return q(i.submit())}),c(1),p(2,"translate"),r()}if(e&2){let t=w();g("disabled",!t.groupEditMeetingForm.valid),a(),v(" ",m(2,2,"labels.buttons.Submit")," ")}}var H2=(()=>{class e{constructor(){this.formBuilder=T(nt),this.groupsService=T(An),this.dateUtils=T(Zt),this.route=T(Ie),this.router=T(qe),this.settingsService=T(At),this.minDate=new Date(2e3,0,1),this.maxDate=new Date,this.route.data.subscribe(t=>{this.calendarTemplate=t.groupActionData,this.frequencyOptions=this.calendarTemplate.frequencyOptions,this.repeatsOnDays=this.calendarTemplate.repeatsOnDayOptions}),this.calendarId=this.route.snapshot.queryParams.calendarId,this.groupId=this.route.parent.snapshot.params.groupId}ngOnInit(){this.maxDate=this.settingsService.businessDate,this.createEditGroupMeetingForm(),this.buildDependencies()}createEditGroupMeetingForm(){this.groupEditMeetingForm=this.formBuilder.group({startDate:["",se.required],frequency:["",se.required],interval:["",se.required]})}buildDependencies(){this.groupEditMeetingForm.get("frequency").valueChanges.subscribe(t=>{switch(this.groupEditMeetingForm.removeControl("repeatsOnDay"),t){case 1:this.repetitionIntervals=["1","2","3"];break;case 2:this.repetitionIntervals=["1","2","3"],this.groupEditMeetingForm.addControl("repeatsOnDay",new it("",se.required)),this.groupEditMeetingForm.get("repeatsOnDay").patchValue(this.calendarTemplate.repeatsOnDay.id);break;case 3:this.repetitionIntervals=["1","2","3","4","5","6","7","8","9","10","11"];break;case 4:this.repetitionIntervals=["1","2","3","4","5"];break}}),this.groupEditMeetingForm.patchValue({startDate:this.calendarTemplate.startDate&&new Date(this.calendarTemplate.startDate),frequency:this.calendarTemplate.frequency.id,interval:`${this.calendarTemplate.interval}`})}editSchedule(){let t={calendarId:this.calendarId};this.router.navigate(["../Edit Meeting Schedule"],{relativeTo:this.route,queryParams:t})}submit(){let t=this.groupEditMeetingForm.value,n=this.settingsService.language.code,i=this.settingsService.dateFormat,s=`groups_${this.groupId}_CollectionMeeting`,d="1",u=this.groupEditMeetingForm.value.startDate;t.startDate instanceof Date&&(t.startDate=this.dateUtils.formatDate(u,i));let f=qt(at({},t),{repeating:!0,title:s,typeId:d,dateFormat:i,locale:n});this.groupsService.updateGroupMeeting(this.groupId,f,this.calendarId).subscribe(_=>{this.router.navigate(["../../"],{relativeTo:this.route})})}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275cmp=me({type:e,selectors:[["mifosx-edit-group-meeting"]],decls:44,vars:30,consts:[["startDatePicker",""],[1,"container","m-b-20","layout-row","align-end"],["mat-raised-button","","color","primary",3,"click"],["icon","edit",1,"m-r-10"],[1,"container"],[3,"formGroup"],[1,"layout-column"],["formControlName","frequency"],[3,"value"],["formControlName","interval"],[1,"m-b-5",3,"click"],["matInput","","required","","formControlName","startDate",3,"min","max","matDatepicker"],["matSuffix","",3,"for"],[1,"layout-row","align-center","gap-5px","responsive-column"],["type","button","mat-raised-button","",3,"routerLink"],["mat-raised-button","","color","primary",3,"disabled","click",4,"mifosxHasPermission"],["formControlName","repeatsOnDay","required",""],["mat-raised-button","","color","primary",3,"click","disabled"]],template:function(n,i){if(n&1){let s=Y();l(0,"div",1)(1,"button",2),R("click",function(){return V(s),q(i.editSchedule())}),b(2,"fa-icon",3),c(3),p(4,"translate"),r()(),l(5,"div",4)(6,"mat-card")(7,"form",5)(8,"mat-card-content")(9,"div",6)(10,"mat-form-field")(11,"mat-label"),c(12),p(13,"translate"),r(),l(14,"mat-select",7),Se(15,G5e,2,2,"mat-option",8,Pe),r(),E(17,j5e,7,9,"mat-error"),r(),l(18,"mat-form-field")(19,"mat-label"),c(20),p(21,"translate"),r(),l(22,"mat-select",9),Se(23,$5e,2,2,"mat-option",8,Pe),r(),E(25,U5e,7,9,"mat-error"),r(),E(26,Y5e,8,4,"mat-form-field"),l(27,"mat-form-field",10),R("click",function(){V(s);let u=xe(34);return q(u.open())}),l(28,"mat-label"),c(29),p(30,"translate"),r(),b(31,"input",11)(32,"mat-datepicker-toggle",12)(33,"mat-datepicker",null,0),E(35,J5e,7,9,"mat-error"),l(36,"mat-hint"),c(37),p(38,"translate"),r()()()(),l(39,"mat-card-actions",13)(40,"button",14),c(41),p(42,"translate"),r(),F(43,K5e,3,4,"button",15),r()()()()}if(n&2){let s=xe(34);a(3),v(" ",m(4,17,"labels.buttons.Edit Schedule")," "),a(4),g("formGroup",i.groupEditMeetingForm),a(5),h(m(13,19,"labels.inputs.Repetition Frequency")),a(3),we(i.frequencyOptions),a(2),I(i.groupEditMeetingForm.controls.frequency.hasError("repeatsOnDay")?17:-1),a(3),h(m(21,21,"labels.inputs.Repetition Interval")),a(3),we(i.repetitionIntervals),a(2),I(i.groupEditMeetingForm.controls.interval.hasError("repeatsOnDay")?25:-1),a(),I(i.groupEditMeetingForm.contains("repeatsOnDay")?26:-1),a(3),h(m(30,23,"labels.inputs.Above Changes are Effective from")),a(2),g("min",i.minDate)("max",i.maxDate)("matDatepicker",s),a(),g("for",s),a(3),I(i.groupEditMeetingForm.controls.startDate.hasError("required")?35:-1),a(2),v(" ",m(38,25,"labels.text.Repeats' and 'Repeats every")," "),a(3),g("routerLink",oe(29,H5e)),a(),v(" ",m(42,27,"labels.buttons.Cancel")," "),a(2),g("mifosxHasPermission","CREATE_MEETING")}},dependencies:[ue,fe,tt,st,Ue,Xe,dt,Ze,et,Ae,$e,Je,Et,Fe,Be,ut,ai,za,ze,gt,ft,mi,di,pi,ve,Ke,ke,he],styles:[".container[_ngcontent-%COMP%]{max-width:37rem}"]})}}return e})();var X5e=()=>["../../"];function Z5e(e,o){if(e&1&&(l(0,"mat-option",5),c(1),p(2,"dateFormat"),r()),e&2){let t=o.$implicit;g("value",t),a(),v(" ",m(2,2,t)," ")}}function eDe(e,o){e&1&&(l(0,"mat-error"),c(1),p(2,"translate"),p(3,"translate"),l(4,"strong"),c(5),p(6,"translate"),r()()),e&2&&(a(),le(" ",m(2,3,"labels.inputs.Existing Meeting Date")," ",m(3,5,"labels.commons.is")," "),a(4),h(m(6,7,"labels.commons.required")))}function tDe(e,o){e&1&&(l(0,"mat-error"),c(1),p(2,"translate"),p(3,"translate"),l(4,"strong"),c(5),p(6,"translate"),r()()),e&2&&(a(),le(" ",m(2,3,"labels.inputs.Revised Meeting Date")," ",m(3,5,"labels.commons.is")," "),a(4),h(m(6,7,"labels.commons.required")))}function iDe(e,o){if(e&1){let t=Y();l(0,"button",12),R("click",function(){V(t);let i=w();return q(i.submit())}),c(1),p(2,"translate"),r()}if(e&2){let t=w();g("disabled",!t.groupEditMeetingScheduleForm.valid),a(),v(" ",m(2,2,"labels.buttons.Submit")," ")}}var G2=(()=>{class e{constructor(){this.formBuilder=T(nt),this.groupsService=T(An),this.dateUtils=T(Zt),this.route=T(Ie),this.router=T(qe),this.settingsService=T(At),this.minDate=new Date(2e3,0,1),this.maxDate=new Date,this.route.data.subscribe(t=>{this.calendarTemplate=t.groupActionData,this.nextMeetingDates=this.calendarTemplate.nextTenRecurringDates}),this.calendarId=this.route.snapshot.queryParams.calendarId,this.groupId=this.route.parent.snapshot.params.groupId}ngOnInit(){this.maxDate=this.settingsService.businessDate,this.createEditMeetingScheduleForm()}createEditMeetingScheduleForm(){this.groupEditMeetingScheduleForm=this.formBuilder.group({presentMeetingDate:["",se.required],newMeetingDate:["",se.required]})}submit(){let t=this.groupEditMeetingScheduleForm.value,n=this.settingsService.language.code,i=this.settingsService.dateFormat,s=!0,d=new Date(this.groupEditMeetingScheduleForm.value.presentMeetingDate),u=this.groupEditMeetingScheduleForm.value.newMeetingDate;t.presentMeetingDate instanceof Date&&(t.presentMeetingDate=this.dateUtils.formatDate(d,i)),t.newMeetingDate instanceof Date&&(t.newMeetingDate=this.dateUtils.formatDate(u,i));let f=qt(at({},t),{reschedulebasedOnMeetingDates:s,dateFormat:i,locale:n});this.groupsService.updateGroupMeeting(this.groupId,f,this.calendarId).subscribe(_=>{this.router.navigate(["../../"],{relativeTo:this.route})})}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275cmp=me({type:e,selectors:[["mifosx-edit-group-meeting-schedule"]],decls:27,vars:19,consts:[["newMeetingDatePicker",""],[1,"container"],[3,"formGroup"],[1,"layout-column"],["formControlName","presentMeetingDate"],[3,"value"],[3,"click"],["matInput","","required","","formControlName","newMeetingDate",3,"min","max","matDatepicker"],["matSuffix","",3,"for"],[1,"layout-row","align-center","gap-5px","responsive-column"],["type","button","mat-raised-button","",3,"routerLink"],["mat-raised-button","","color","primary",3,"disabled","click",4,"mifosxHasPermission"],["mat-raised-button","","color","primary",3,"click","disabled"]],template:function(n,i){if(n&1){let s=Y();l(0,"div",1)(1,"mat-card")(2,"form",2)(3,"mat-card-content")(4,"div",3)(5,"mat-form-field")(6,"mat-label"),c(7),p(8,"translate"),r(),l(9,"mat-select",4),Se(10,Z5e,3,4,"mat-option",5,Pe),r(),E(12,eDe,7,9,"mat-error"),r(),l(13,"mat-form-field",6),R("click",function(){V(s);let u=xe(20);return q(u.open())}),l(14,"mat-label"),c(15),p(16,"translate"),r(),b(17,"input",7)(18,"mat-datepicker-toggle",8)(19,"mat-datepicker",null,0),E(21,tDe,7,9,"mat-error"),r()()(),l(22,"mat-card-actions",9)(23,"button",10),c(24),p(25,"translate"),r(),F(26,iDe,3,4,"button",11),r()()()()}if(n&2){let s=xe(20);a(2),g("formGroup",i.groupEditMeetingScheduleForm),a(5),h(m(8,12,"labels.inputs.Existing Meeting Date")),a(3),we(i.nextMeetingDates),a(2),I(i.groupEditMeetingScheduleForm.controls.presentMeetingDate.hasError("repeatsOnDay")?12:-1),a(3),h(m(16,14,"labels.inputs.Revised Meeting Date")),a(2),g("min",i.minDate)("max",i.maxDate)("matDatepicker",s),a(),g("for",s),a(3),I(i.groupEditMeetingScheduleForm.controls.newMeetingDate.hasError("required")?21:-1),a(2),g("routerLink",oe(18,X5e)),a(),v(" ",m(25,16,"labels.buttons.Cancel")," "),a(2),g("mifosxHasPermission","CREATE_MEETING")}},dependencies:[ue,fe,tt,st,Ue,Xe,dt,Ze,et,Ae,$e,Je,Et,Fe,Be,ut,ai,ze,gt,ft,mi,di,pi,ve,Ke,Pi,he],styles:[".container[_ngcontent-%COMP%]{max-width:37rem}"]})}}return e})();var nDe=()=>["../../"],oDe=e=>({id:e});function aDe(e,o){if(e&1&&(l(0,"mat-option",5),c(1),r()),e&2){let t=o.$implicit;g("value",Nt(2,oDe,t.id)),a(),v(" ",t.displayName," ")}}function rDe(e,o){e&1&&(l(0,"mat-error"),c(1),p(2,"translate"),p(3,"translate"),l(4,"strong"),c(5),p(6,"translate"),r()()),e&2&&(a(),le(" ",m(2,3,"labels.inputs.Destination Group")," ",m(3,5,"labels.commons.is")," "),a(4),h(m(6,7,"labels.commons.required")))}function lDe(e,o){if(e&1&&(l(0,"mat-option",5),c(1),r()),e&2){let t=o.$implicit;g("value",t),a(),v(" ",t.name," ")}}function sDe(e,o){if(e&1&&(l(0,"div",9)(1,"div",13)(2,"div",14),c(3),p(4,"translate"),r()(),l(5,"div",15)(6,"div",16),c(7),p(8,"translate"),r(),l(9,"div",16),c(10),r()(),l(11,"div",15)(12,"div",16),c(13),p(14,"translate"),r(),l(15,"div",16),c(16),r()(),l(17,"div",15)(18,"div",16),c(19),p(20,"translate"),r(),l(21,"div",16),c(22),p(23,"dateFormat"),r()(),l(24,"div",15)(25,"div",16),c(26),p(27,"translate"),r(),l(28,"div",16),c(29),r()(),l(30,"div",15)(31,"div",16),c(32),p(33,"translate"),r(),l(34,"div",16),c(35),r()()()),e&2){let t=w();a(3),h(m(4,11,"labels.inputs.Destination Group Details")),a(4),h(m(8,13,"labels.inputs.name")),a(3),h(t.transferClientsForm.get("destinationGroupId").value.name),a(3),h(m(14,15,"labels.inputs.Id")),a(3),h(t.transferClientsForm.get("destinationGroupId").value.id),a(3),h(m(20,17,"labels.inputs.Activation Date")),a(3),v(" ",m(23,19,t.transferClientsForm.get("destinationGroupId").value.activationDate)||"Not Activated"," "),a(4),h(m(27,21,"labels.inputs.Staff")),a(3),v(" ",t.transferClientsForm.get("destinationGroupId").value.staffName||"Unassigned"," "),a(3),h(m(33,23,"labels.inputs.External Id")),a(3),v(" ",t.transferClientsForm.get("destinationGroupId").value.externalId||"Unassigned"," ")}}function cDe(e,o){if(e&1){let t=Y();l(0,"button",17),R("click",function(){V(t);let i=w();return q(i.submit())}),c(1),p(2,"translate"),r()}if(e&2){let t=w();g("disabled",!t.transferClientsForm.valid),a(),v(" ",m(2,2,"labels.buttons.Submit")," ")}}var j2=(()=>{class e{constructor(){this.formBuilder=T(nt),this.route=T(Ie),this.router=T(qe),this.groupsService=T(An),this.settingsService=T(At),this.groupsData=[],this.clientMembers=[],this.route.data.subscribe(t=>{this.groupData=t.groupActionData,this.clientMembers=this.groupData.clientMembers})}ngOnInit(){this.createTransferClientsForm()}ngAfterViewInit(){this.transferClientsForm.get("destinationGroupId").valueChanges.subscribe(t=>{t.length>=2&&this.groupsService.getFilteredGroups("name","ASC",t,this.groupData.officeId).subscribe(n=>{this.groupsData=n})})}createTransferClientsForm(){this.transferClientsForm=this.formBuilder.group({clients:["",se.required],inheritDestinationGroupLoanOfficer:[!1],destinationGroupId:["",se.required]})}displayGroup(t){return t?t.name:void 0}submit(){let t=this.settingsService.language.code,n=qt(at({},this.transferClientsForm.value),{destinationGroupId:this.transferClientsForm.get("destinationGroupId").value.id,locale:t});this.groupsService.executeGroupCommand(this.groupData.id,"transferClients",n).subscribe(()=>{this.router.navigate(["../../"],{relativeTo:this.route})})}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275cmp=me({type:e,selectors:[["mifosx-group-transfer-clients"]],decls:31,vars:20,consts:[["groupsAutocomplete","matAutocomplete"],[1,"container"],[3,"formGroup"],[1,"layout-column"],["required","","formControlName","clients","multiple",""],[3,"value"],["labelPosition","before","formControlName","inheritDestinationGroupLoanOfficer",1,"m-t-10","m-b-10"],["matInput","","formControlName","destinationGroupId",3,"matAutocomplete"],["autoActiveFirstOption","",3,"displayWith"],[1,"mat-table"],[1,"layout-row","align-center","gap-5px","responsive-column"],["type","button","mat-raised-button","",3,"routerLink"],["mat-raised-button","","color","primary",3,"disabled","click",4,"mifosxHasPermission"],[1,"mat-header-row"],[1,"mat-header-cell"],[1,"mat-row"],[1,"mat-cell"],["mat-raised-button","","color","primary",3,"click","disabled"]],template:function(n,i){if(n&1&&(l(0,"div",1)(1,"mat-card")(2,"form",2)(3,"mat-card-content")(4,"div",3)(5,"mat-form-field")(6,"mat-label"),c(7),p(8,"translate"),r(),l(9,"mat-select",4),Se(10,aDe,2,4,"mat-option",5,Pe),r()(),l(12,"mat-checkbox",6),c(13),p(14,"translate"),r(),l(15,"mat-form-field")(16,"mat-label"),c(17),p(18,"translate"),r(),b(19,"input",7),E(20,rDe,7,9,"mat-error"),r()(),l(21,"mat-autocomplete",8,0),Se(23,lDe,2,2,"mat-option",5,Pe),r(),E(25,sDe,36,25,"div",9),r(),l(26,"mat-card-actions",10)(27,"button",11),c(28),p(29,"translate"),r(),F(30,cDe,3,4,"button",12),r()()()()),n&2){let s,d=xe(22);a(2),g("formGroup",i.transferClientsForm),a(5),h(m(8,11,"labels.inputs.Select Client Members for Transfer")),a(3),we(i.clientMembers),a(3),v(" ",m(14,13,"labels.inputs.Inherit Group Loan Officer"),"? "),a(4),h(m(18,15,"labels.inputs.Destination Group")),a(2),g("matAutocomplete",d),a(),I(i.transferClientsForm.controls.destinationGroupId.hasError("required")?20:-1),a(),g("displayWith",i.displayGroup),a(2),we(i.groupsData),a(2),I((s=i.transferClientsForm.get("destinationGroupId").value)!=null&&s.id?25:-1),a(2),g("routerLink",oe(19,nDe)),a(),v(" ",m(29,17,"labels.buttons.Cancel")," "),a(2),g("mifosxHasPermission","TRANSFERCLIENTS_GROUP")}},dependencies:[ue,fe,tt,st,Ue,Xe,dt,Ze,et,Ae,$e,Je,Et,Fe,Be,ut,ze,gt,ft,ve,fi,Ke,er,Za,Pi,he],styles:[".container[_ngcontent-%COMP%]{max-width:37rem}.mat-table[_ngcontent-%COMP%]{display:block;font-family:Tahoma,Verdana,sans-serif;width:100%}.mat-row[_ngcontent-%COMP%], .mat-header-row[_ngcontent-%COMP%]{display:flex;border-bottom-width:1px;border-bottom-style:solid;align-items:center;min-height:30px;padding:0 24px}.mat-cell[_ngcontent-%COMP%], .mat-header-cell[_ngcontent-%COMP%]{flex:1;overflow:hidden;word-wrap:break-word}"]})}}return e})();function pDe(e,o){e&1&&b(0,"mifosx-group-assign-staff")}function mDe(e,o){e&1&&b(0,"mifosx-close-group")}function dDe(e,o){e&1&&b(0,"mifosx-activate-group")}function uDe(e,o){e&1&&b(0,"mifosx-attach-group-meeting")}function fDe(e,o){e&1&&b(0,"mifosx-group-attendance")}function hDe(e,o){e&1&&b(0,"mifosx-manage-group-members")}function gDe(e,o){e&1&&b(0,"mifosx-edit-group-meeting")}function _De(e,o){e&1&&b(0,"mifosx-edit-group-meeting-schedule")}function CDe(e,o){e&1&&b(0,"mifosx-group-transfer-clients")}var $2=(()=>{class e{constructor(){this.route=T(Ie),this.router=T(qe),this.actions={"Assign Staff":!1,Close:!1,Activate:!1,"Attach Meeting":!1,Attendance:!1,"Manage Members":!1,"Edit Meeting":!1,"Edit Meeting Schedule":!1,"Transfer Clients":!1},this.router.routeReuseStrategy.shouldReuseRoute=()=>!1;let t=this.route.snapshot.params.action;t&&t in this.actions&&(this.actions[t]=!0)}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275cmp=me({type:e,selectors:[["mifosx-group-actions"]],decls:9,vars:9,template:function(n,i){n&1&&(E(0,pDe,1,0,"mifosx-group-assign-staff"),E(1,mDe,1,0,"mifosx-close-group"),E(2,dDe,1,0,"mifosx-activate-group"),E(3,uDe,1,0,"mifosx-attach-group-meeting"),E(4,fDe,1,0,"mifosx-group-attendance"),E(5,hDe,1,0,"mifosx-manage-group-members"),E(6,gDe,1,0,"mifosx-edit-group-meeting"),E(7,_De,1,0,"mifosx-edit-group-meeting-schedule"),E(8,CDe,1,0,"mifosx-group-transfer-clients")),n&2&&(I(i.actions["Assign Staff"]?0:-1),a(),I(i.actions.Close?1:-1),a(),I(i.actions.Activate?2:-1),a(),I(i.actions["Attach Meeting"]?3:-1),a(),I(i.actions.Attendance?4:-1),a(),I(i.actions["Manage Members"]?5:-1),a(),I(i.actions["Edit Meeting"]?6:-1),a(),I(i.actions["Edit Meeting Schedule"]?7:-1),a(),I(i.actions["Transfer Clients"]?8:-1))},dependencies:[ue,fe,R2,N2,L2,V2,q2,z2,H2,G2,j2],encapsulation:2})}}return e})();var vDe=()=>["../"];function xDe(e,o){e&1&&(l(0,"mat-error"),c(1),p(2,"translate"),p(3,"translate"),l(4,"strong"),c(5),p(6,"translate"),r()()),e&2&&(a(),le(" ",m(2,3,"labels.inputs.Group Name")," ",m(3,5,"labels.commons.is")," "),a(4),h(m(6,7,"labels.commons.required")))}function bDe(e,o){e&1&&(l(0,"mat-error"),c(1),p(2,"translate"),l(3,"strong"),c(4),p(5,"translate"),r(),c(6),p(7,"translate"),r()),e&2&&(a(),v(" ",m(2,3,"labels.inputs.Group Name")," "),a(3),h(m(5,5,"labels.inputs.cannot")),a(2),v(" ",m(7,7,"labels.commons.begin with a special character or number")," "))}function yDe(e,o){if(e&1&&(l(0,"mat-option",7),c(1),r()),e&2){let t=o.$implicit;g("value",t.id),a(),v(" ",t.displayName," ")}}function SDe(e,o){e&1&&(l(0,"mat-error"),c(1),p(2,"translate"),p(3,"translate"),l(4,"strong"),c(5),p(6,"translate"),r()()),e&2&&(a(),le(" ",m(2,3,"labels.inputs.Submission Date")," ",m(3,5,"labels.commons.is")," "),a(4),h(m(6,7,"labels.commons.required")))}function wDe(e,o){e&1&&(l(0,"mat-error"),c(1),p(2,"translate"),p(3,"translate"),l(4,"strong"),c(5),p(6,"translate"),r()()),e&2&&(a(),le(" ",m(2,3,"labels.inputs.Activation Date")," ",m(3,5,"labels.commons.is")," "),a(4),h(m(6,7,"labels.commons.required")))}function PDe(e,o){if(e&1){let t=Y();l(0,"mat-form-field",8),R("click",function(){V(t);let i=xe(7);return q(i.open())}),l(1,"mat-label"),c(2),p(3,"translate"),r(),b(4,"input",15)(5,"mat-datepicker-toggle",10)(6,"mat-datepicker",null,1),E(8,wDe,7,9,"mat-error"),r()}if(e&2){let t=xe(7),n=w();a(2),h(m(3,6,"labels.inputs.Activation Date")),a(2),g("min",n.editGroupForm.value.submittedOnDate)("max",n.maxDate)("matDatepicker",t),a(),g("for",t),a(3),I(n.editGroupForm.controls.activationDate.hasError("required")?8:-1)}}var U2=(()=>{class e{constructor(){this.formBuilder=T(nt),this.route=T(Ie),this.router=T(qe),this.groupService=T(An),this.dateUtils=T(Zt),this.settingsService=T(At),this.minDate=new Date(2e3,0,1),this.maxDate=new Date,this.route.data.subscribe(t=>{this.staffData=t.groupAndTemplateData.staffOptions,this.groupData=t.groupAndTemplateData,this.submittedOnDate=t.groupViewData.timeline.submittedOnDate&&new Date(t.groupViewData.timeline.submittedOnDate)})}ngOnInit(){this.maxDate=this.settingsService.businessDate,this.createEditGroupForm(),this.editGroupForm.patchValue({name:this.groupData.name,submittedOnDate:this.submittedOnDate,staffId:this.groupData.staffId,externalId:this.groupData.externalId})}createEditGroupForm(){this.editGroupForm=this.formBuilder.group({name:["",[se.required,se.pattern("(^[A-z]).*")]],submittedOnDate:["",se.required],staffId:[""],externalId:[""]}),this.buildDependencies()}buildDependencies(){this.groupData.active?(this.editGroupForm.addControl("activationDate",new it("",se.required)),this.editGroupForm.get("activationDate").patchValue(this.groupData.activationDate&&new Date(this.groupData.activationDate))):this.editGroupForm.removeControl("activationDate")}submit(){let t=this.editGroupForm.value,n=this.settingsService.language.code,i=this.settingsService.dateFormat,s=this.editGroupForm.value.submittedOnDate,d=this.editGroupForm.value.activationDate;t.submittedOnDate instanceof Date&&(t.submittedOnDate=this.dateUtils.formatDate(s,i)),t.activationDate instanceof Date&&(t.activationDate=this.dateUtils.formatDate(d,i));let u=qt(at({},t),{dateFormat:i,locale:n});this.groupService.updateGroup(u,this.groupData.id).subscribe(f=>{this.router.navigate(["../"],{relativeTo:this.route})})}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275cmp=me({type:e,selectors:[["mifosx-edit-group"]],decls:41,vars:30,consts:[["submittedOnDatePicker",""],["activationDatePicker",""],[1,"container"],[3,"formGroup"],[1,"layout-column"],["matInput","","required","","formControlName","name"],["formControlName","staffId"],[3,"value"],[3,"click"],["matInput","","required","","formControlName","submittedOnDate",3,"min","max","matDatepicker"],["matSuffix","",3,"for"],["matInput","","formControlName","externalId"],[1,"layout-row","align-center","gap-5px","responsive-column"],["type","button","mat-raised-button","",3,"routerLink"],["mat-raised-button","","color","primary",3,"click","disabled"],["matInput","","required","","formControlName","activationDate",3,"min","max","matDatepicker"]],template:function(n,i){if(n&1){let s=Y();l(0,"div",2)(1,"mat-card")(2,"form",3)(3,"mat-card-content")(4,"div",4)(5,"mat-form-field")(6,"mat-label"),c(7),p(8,"translate"),r(),b(9,"input",5),E(10,xDe,7,9,"mat-error"),E(11,bDe,8,9,"mat-error"),r(),l(12,"mat-form-field")(13,"mat-label"),c(14),p(15,"translate"),r(),l(16,"mat-select",6),Se(17,yDe,2,2,"mat-option",7,Pe),r()(),l(19,"mat-form-field",8),R("click",function(){V(s);let u=xe(26);return q(u.open())}),l(20,"mat-label"),c(21),p(22,"translate"),r(),b(23,"input",9)(24,"mat-datepicker-toggle",10)(25,"mat-datepicker",null,0),E(27,SDe,7,9,"mat-error"),r(),E(28,PDe,9,8,"mat-form-field"),l(29,"mat-form-field")(30,"mat-label"),c(31),p(32,"translate"),r(),b(33,"input",11),r()()(),l(34,"mat-card-actions",12)(35,"button",13),c(36),p(37,"translate"),r(),l(38,"button",14),R("click",function(){return V(s),q(i.submit())}),c(39),p(40,"translate"),r()()()()()}if(n&2){let s=xe(26);a(2),g("formGroup",i.editGroupForm),a(5),h(m(8,17,"labels.inputs.name")),a(3),I(i.editGroupForm.controls.name.hasError("required")?10:-1),a(),I(i.editGroupForm.controls.name.hasError("pattern")?11:-1),a(3),h(m(15,19,"labels.inputs.Staff")),a(3),we(i.staffData),a(4),h(m(22,21,"labels.inputs.Submitted On")),a(2),g("min",i.minDate)("max",i.maxDate)("matDatepicker",s),a(),g("for",s),a(3),I(i.editGroupForm.controls.submittedOnDate.hasError("required")?27:-1),a(),I(i.editGroupForm.contains("activationDate")?28:-1),a(3),h(m(32,23,"labels.inputs.External id")),a(4),g("routerLink",oe(29,vDe)),a(),v(" ",m(37,25,"labels.buttons.Cancel")," "),a(2),g("disabled",!i.editGroupForm.valid),a(),v(" ",m(40,27,"labels.buttons.Submit")," ")}},dependencies:[ue,fe,tt,st,Ue,Xe,dt,Ze,et,Ae,$e,Je,Et,Fe,Be,ut,ai,ze,gt,ft,mi,di,pi,ve,he],styles:[".container[_ngcontent-%COMP%]{max-width:50rem}"]})}}return e})();var s5=(()=>{class e{constructor(){this.groupsService=T(An)}resolve(t){let n=t.parent.paramMap.get("groupId");return this.groupsService.getGroupSummary(n)}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275prov=Re({token:e,factory:e.\u0275fac})}}return e})();var c5=(()=>{class e{constructor(){this.groupsService=T(An)}resolve(t){let n=t.parent.paramMap.get("groupId");return this.groupsService.getGroupNotes(n)}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275prov=Re({token:e,factory:e.\u0275fac})}}return e})();var p5=(()=>{class e{constructor(){this.groupsService=T(An)}resolve(){return this.groupsService.getGroupDatatables()}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275prov=Re({token:e,factory:e.\u0275fac})}}return e})();var m5=(()=>{class e{constructor(){this.groupsService=T(An)}resolve(t){let n=t.parent.parent.paramMap.get("groupId"),i=t.paramMap.get("datatableName");return this.groupsService.getGroupDatatable(n,i)}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275prov=Re({token:e,factory:e.\u0275fac})}}return e})();var W2=(()=>{class e{constructor(){this.groupsService=T(An)}resolve(t){let n=t.paramMap.get("groupId");return this.groupsService.getGroupData(n,"true")}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275prov=Re({token:e,factory:e.\u0275fac})}}return e})();var d5=(()=>{class e{constructor(){this.groupsService=T(An)}resolve(t){let n=t.paramMap.get("action"),i=t.paramMap.get("groupId")||t.parent.parent.paramMap.get("groupId");switch(n){case"Attendance":case"Manage Members":case"Transfer Clients":return this.groupsService.getGroupData(i);case"Assign Staff":return this.groupsService.getGroupData(i,"true");case"Close":return this.groupsService.getGroupCommandTemplate("close");case"Attach Meeting":return this.groupsService.getGroupCalendarTemplate(i);case"Edit Meeting":case"Edit Meeting Schedule":let s=t.queryParamMap.get("calendarId");return this.groupsService.getGroupCalendarAndTemplate(i,s);default:return}}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275prov=Re({token:e,factory:e.\u0275fac})}}return e})();var u5=(()=>{class e{constructor(){this.groupsService=T(An)}resolve(t){let n=t.parent.paramMap.get("groupId");return this.groupsService.getGLIMAccountsData(n)}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275prov=Re({token:e,factory:e.\u0275fac})}}return e})();var TDe=[_o.withShell([{path:"groups",data:{title:"Groups",breadcrumb:"Groups",routeParamBreadcrumb:!1},children:[{path:"",component:T2},{path:"create",component:F2,data:{title:"Create Group",breadcrumb:"Create",routeParamBreadcrumb:!1},resolve:{offices:Hr}},{path:":groupId",data:{title:"View Group",routeParamBreadcrumb:"groupId"},resolve:{groupViewData:mf},children:[{path:"",component:D2,resolve:{groupViewData:mf,groupDatatables:p5},children:[{path:"",redirectTo:"general",pathMatch:"full"},{path:"general",component:E2,data:{title:"General",breadcrumb:"General",routeParamBreadcrumb:!1},resolve:{groupAccountsData:BT,groupSummary:s5,gsimData:RT,glimData:u5}},{path:"notes",component:I2,data:{title:"Notes",breadcrumb:"Notes",routeParamBreadcrumb:!1},resolve:{groupNotes:c5}},{path:"committee",component:A2,data:{title:"Committee",breadcrumb:"Committee",routeParamBreadcrumb:!1}},{path:"datatables",children:[{path:":datatableName",component:k2,data:{title:"View Data Table",routeParamBreadcrumb:"datatableName"},resolve:{groupDatatable:m5}}]}]},{path:"edit",component:U2,data:{title:"Edit Group",breadcrumb:"Edit",routeParamBreadcrumb:!1},resolve:{groupAndTemplateData:W2,groupViewData:mf}},{path:"committee",children:[{path:"",redirectTo:"../committee",pathMatch:"prefix"},{path:"add-role",data:{title:"Add Role",breadcrumb:"Add Role",routeParamBreadcrumb:!1},component:B2,resolve:{groupAndTemplateData:W2}}]},{path:"actions/:action",data:{title:"Group Actions",breadcrumb:"action",routeParamBreadcrumb:"action"},component:$2,resolve:{groupActionData:d5}},{path:"loans-accounts",loadChildren:()=>import("./loans.module-2KH4LJVS.js").then(e=>e.LoansModule)},{path:"savings-accounts",loadChildren:()=>import("./savings.module-XEA55LW5.js").then(e=>e.SavingsModule)}]}]}])],iN=(()=>{class e{static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275mod=Gi({type:e})}static{this.\u0275inj=Hi({providers:[mf,BT,s5,c5,p5,m5,W2,d5,RT,u5],imports:[gn.forChild(TDe),gn]})}}return e})();var nN=(()=>{class e{static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275mod=Gi({type:e})}static{this.\u0275inj=Hi({imports:[oo,ha,Ir,iN,T2,D2,E2,I2,A2,F2,k2,B2,O2,$2,R2,M2,N2,L2,U2,V2,q2,z2,H2,G2,j2]})}}return e})();var Jn=(()=>{class e{constructor(){this.http=T(ko)}getCenters(t,n,i,s,d){let u=new rn().set("offset",s.toString()).set("limit",d.toString()).set("sortOrder",i).set("orderBy",n).set("paged","true");return t.forEach(function(f){f.value&&(u=u.set(f.type,f.value))}),this.http.get("/centers",{params:u})}createCenter(t){return this.http.post("/centers",t)}getStaff(t){let n=new rn().set("officeId",t.toString()).set("staffInSelectedOfficeOnly","true");return this.http.get("/centers/template",{params:n})}getCenterData(t){let n=new rn().set("associations","groupMembers,collectionMeetingCalendar");return this.http.get(`/centers/${t}`,{params:n})}getCenterSummary(t){let n=new rn().set("R_groupId",t).set("genericResultSet","false");return this.http.get("/runreports/GroupSummaryCounts",{params:n})}getSavingsAccountDetails(t){return this.http.get(`/centers/${t}/accounts`)}getCenterNotes(t){return this.http.get(`/groups/${t}/notes`)}createCenterNote(t,n){return this.http.post(`/groups/${t}/notes`,n)}editCenterNote(t,n,i){return this.http.put(`/groups/${t}/notes/${n}`,i)}deleteCenterNote(t,n){return this.http.delete(`/groups/${t}/notes/${n}`)}getcenterDatatables(){let t=new rn().set("apptable","m_center");return this.http.get("/datatables",{params:t})}getCenterDatatable(t,n){let i=new rn().set("genericResultSet","true");return this.http.get(`/datatables/${n}/${t}`,{params:i})}addCenterDatatableEntry(t,n,i){let s=new rn().set("genericResultSet","true");return this.http.post(`/datatables/${n}/${t}`,i,{params:s})}editCenterDatatableEntry(t,n,i){let s=new rn().set("genericResultSet","true");return this.http.put(`/datatables/${n}/${t}`,i,{params:s})}deleteDatatableContent(t,n){let i=new rn().set("genericResultSet","true");return this.http.delete(`/datatables/${n}/${t}`,{params:i})}executeCenterActionCommand(t,n,i){let s=new rn().set("command",n);return this.http.post(`/centers/${t}`,i,{params:s})}executeGroupActionCommand(t,n,i){let s=new rn().set("command",n);return this.http.post(`/groups/${t}`,i,{params:s})}getGroupStaffData(t){let n=new rn().set("groupOrCenter","centers").set("staffInSelectedOfficeOnly","true").set("template","true");return this.http.get(`/groups/${t}`,{params:n})}deleteCenter(t){return this.http.delete(`/centers/${t}`)}getCentersData(t,n,i){let s=new rn().set("associations",n);return s=i?s.set("template",i):s,this.http.get(`/centers/${t}`,{params:s})}getMeetingsTemplate(t,n){let i=new rn().set("calenderId",n);return this.http.get(`/centers/${t}/meetings/template`)}assignCenterAttendance(t,n,i){let s=new rn().set("calenderId",n);return this.http.post(`/centers/${t}/meetings`,i,{params:s})}getCalendarTemplate(t){return this.http.get(`/centers/${t}/calendars/template`)}createCenterMeeting(t,n){return this.http.post(`/centers/${t}/calendars`,n)}getCalendarAndTemplate(t,n){let i=new rn().set("template","true");return this.http.get(`/centers/${t}/calendars/${n}`,{params:i})}updateCenterMeeting(t,n,i){return this.http.put(`/centers/${t}/calendars/${i}`,n)}getStaffAssignmentHistoryData(t,n,i,s){let d=new rn().set("tenantIdentifier",i).set("locale",s).set("R_centerId",n);return this.http.get(`/runreports/${t}`,{responseType:"arraybuffer",observe:"response",params:d})}getCenterAndTemplateData(t){let n=new rn().set("staffInSelectedOfficeOnly","true").set("template","true");return this.http.get(`/centers/${t}`,{params:n})}executeEditCenter(t,n){return this.http.put(`/groups/${t}`,n)}getAllMeetingFallCenters(t,n,i,s,d){return this.http.get(`/centers?dateFormat=${s}&locale=${d}&meetingDate=${i}&officeId=${t}&staffId=${n}`)}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275prov=Re({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();var Q2=class{constructor(o){this.centersService=o,this.centersSubject=new Na([]),this.recordsSubject=new Na(0),this.records$=this.recordsSubject.asObservable()}getCenters(o,t="",n="",i=0,s=10,d=!0){this.centersSubject.next([]),this.centersService.getCenters(o,t,n,i*s,s).subscribe(u=>{u.pageItems=d?u.pageItems.filter(f=>f.active):u.pageItems,this.recordsSubject.next(u.totalFilteredRecords),this.centersSubject.next(u.pageItems)})}connect(o){return this.centersSubject.asObservable()}disconnect(o){this.centersSubject.complete(),this.recordsSubject.complete()}};var MDe=["showClosedCenters"],DDe=()=>[10,25,50,100],EDe=()=>["../","organization","bulk-import","Centers"],IDe=()=>["create"],ODe=e=>[e,"general"];function ADe(e,o){e&1&&(l(0,"button",22),b(1,"fa-icon",23),c(2),p(3,"translate"),r()),e&2&&(g("routerLink",oe(4,EDe)),a(2),v("",m(3,2,"labels.buttons.Import Center")," "))}function FDe(e,o){e&1&&(l(0,"button",22),b(1,"fa-icon",24),c(2),p(3,"translate"),r()),e&2&&(g("routerLink",oe(4,IDe)),a(2),v("",m(3,2,"labels.buttons.Create Center")," "))}function kDe(e,o){e&1&&(l(0,"th",25),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.name")))}function BDe(e,o){if(e&1&&(l(0,"td",26),c(1),r()),e&2){let t=o.$implicit;a(),h(t.name)}}function RDe(e,o){e&1&&(l(0,"th",27),c(1),p(2,"translate"),r()),e&2&&(a(),v("",m(2,1,"labels.inputs.Account")," #"))}function NDe(e,o){if(e&1&&(l(0,"td",26),c(1),r()),e&2){let t=o.$implicit;a(),h(t.accountNo)}}function LDe(e,o){e&1&&(l(0,"th",27),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.External Id")))}function VDe(e,o){if(e&1&&(l(0,"td",26),c(1),r()),e&2){let t=o.$implicit;a(),h(t.externalId)}}function qDe(e,o){e&1&&(l(0,"th",27),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.Status")))}function zDe(e,o){if(e&1&&(l(0,"td",26)(1,"div",28),p(2,"statusLookup"),b(3,"fa-icon",29),r()()),e&2){let t=o.$implicit;a(),g("ngClass",m(2,1,t.status.code))}}function HDe(e,o){e&1&&(l(0,"th",25),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.Office Name")))}function GDe(e,o){if(e&1&&(l(0,"td",26),c(1),r()),e&2){let t=o.$implicit;a(),h(t.officeName)}}function jDe(e,o){e&1&&b(0,"tr",30)}function $De(e,o){if(e&1&&b(0,"tr",31),e&2){let t=o.$implicit;g("routerLink",Nt(1,ODe,t.id))}}var Y2=(()=>{class e{constructor(){this.centersService=T(Jn),this.name=new it,this.externalId=new it,this.displayedColumns=["name","accountNo","externalId","status","officeName"],this.filterCentersBy=[{type:"name",value:""},{type:"externalId",value:""}]}ngOnInit(){this.getCenters()}ngAfterViewInit(){this.name.valueChanges.pipe(Oo(500),Ao(),Eo(t=>{this.applyFilter(t,"name")})).subscribe(),this.externalId.valueChanges.pipe(Oo(500),Ao(),Eo(t=>{this.applyFilter(t,"externalId")})).subscribe(),this.sort.sortChange.subscribe(()=>this.paginator.pageIndex=0),fl(this.sort.sortChange,this.paginator.page).pipe(Eo(()=>this.loadCentersPage())).subscribe()}changeShowClosedCenters(){this.loadCentersPage()}loadCentersPage(){this.sort.direction||delete this.sort.active,this.dataSource.getCenters(this.filterCentersBy,this.sort.active,this.sort.direction,this.paginator.pageIndex,this.paginator.pageSize,!this.showClosedCenters.checked)}applyFilter(t,n){this.paginator.pageIndex=0;let i=this.filterCentersBy.findIndex(s=>s.type===n);this.filterCentersBy[i].value=t,this.loadCentersPage()}getCenters(){this.dataSource=new Q2(this.centersService),this.dataSource.getCenters(this.filterCentersBy,this.sort.active,this.sort.direction,this.paginator.pageIndex,this.paginator.pageSize)}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275cmp=me({type:e,selectors:[["mifosx-app-centers"]],viewQuery:function(n,i){if(n&1&&(Ee(MDe,7),Ee(kt,7),Ee(It,7)),n&2){let s;Te(s=Me())&&(i.showClosedCenters=s.first),Te(s=Me())&&(i.paginator=s.first),Te(s=Me())&&(i.sort=s.first)}},decls:34,vars:16,consts:[["showClosedCenters",""],[1,"container"],[1,"layout-column","layout-gt-sm-row","align-gt-sm-start-center"],[1,"search-box","m-r-30"],[1,"search-box"],["matInput","","placeholder","Search by Name",3,"formControl"],["matInput","","placeholder","Search by ExternalID",3,"formControl"],["labelPosition","after",1,"m-r-10",3,"change"],[1,"action-button","gap-25px"],["mat-raised-button","","color","primary",3,"routerLink",4,"mifosxHasPermission"],["mat-table","","matSort","",1,"bordered-table",3,"dataSource"],["matColumnDef","name"],["mat-header-cell","","mat-sort-header","",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","accountNo"],["mat-header-cell","",4,"matHeaderCellDef"],["matColumnDef","externalId"],["matColumnDef","status"],["matColumnDef","officeName"],["mat-header-row","",4,"matHeaderRowDef"],["mat-row","","class","select-row",3,"routerLink",4,"matRowDef","matRowDefColumns"],["showFirstLastButtons","",3,"length","pageSize","pageSizeOptions"],["mat-raised-button","","color","primary",3,"routerLink"],["icon","download",1,"m-r-10"],["icon","plus",1,"m-r-10"],["mat-header-cell","","mat-sort-header",""],["mat-cell",""],["mat-header-cell",""],[3,"ngClass"],["icon","stop"],["mat-header-row",""],["mat-row","",1,"select-row",3,"routerLink"]],template:function(n,i){if(n&1){let s=Y();l(0,"mat-card",1)(1,"div",2)(2,"div",3)(3,"mat-form-field",4),b(4,"input",5),r(),l(5,"mat-form-field",4),b(6,"input",6),r(),l(7,"mat-checkbox",7,0),R("change",function(){return V(s),q(i.changeShowClosedCenters())}),c(9),p(10,"translate"),r()(),l(11,"div",8),F(12,ADe,4,5,"button",9)(13,FDe,4,5,"button",9),r()(),l(14,"table",10),X(15,11),F(16,kDe,3,3,"th",12)(17,BDe,2,1,"td",13),Z(),X(18,14),F(19,RDe,3,3,"th",15)(20,NDe,2,1,"td",13),Z(),X(21,16),F(22,LDe,3,3,"th",15)(23,VDe,2,1,"td",13),Z(),X(24,17),F(25,qDe,3,3,"th",15)(26,zDe,4,3,"td",13),Z(),X(27,18),F(28,HDe,3,3,"th",12)(29,GDe,2,1,"td",13),Z(),F(30,jDe,1,0,"tr",19)(31,$De,1,3,"tr",20),r(),b(32,"mat-paginator",21),p(33,"async"),r()}n&2&&(a(4),g("formControl",i.name),a(2),g("formControl",i.externalId),a(3),v(" ",m(10,11,"labels.inputs.Show Closed Centers")," "),a(3),g("mifosxHasPermission","CREATE_CENTER"),a(),g("mifosxHasPermission","CREATE_CENTER"),a(),g("dataSource",i.dataSource),a(16),g("matHeaderRowDef",i.displayedColumns),a(),g("matRowDefColumns",i.displayedColumns),a(),g("length",m(33,13,i.dataSource==null?null:i.dataSource.records$))("pageSize",10)("pageSizeOptions",oe(15,DDe)))},dependencies:[ue,co,fe,st,Ue,_n,Ae,$e,Fe,ze,ve,fi,Ke,ke,_t,It,xt,vt,bt,ri,Ct,yt,St,Pt,wt,Tt,kt,Xa,he,go],styles:[".container[_ngcontent-%COMP%]{padding:24px}.container[_ngcontent-%COMP%] .layout-column[_ngcontent-%COMP%], .container[_ngcontent-%COMP%] .layout-gt-sm-row[_ngcontent-%COMP%]{display:flex;align-items:center;margin-bottom:20px;flex-wrap:nowrap;gap:20px}.container[_ngcontent-%COMP%] .layout-column.align-gt-sm-start-center[_ngcontent-%COMP%], .container[_ngcontent-%COMP%] .layout-gt-sm-row.align-gt-sm-start-center[_ngcontent-%COMP%]{align-items:center;justify-content:flex-start}.container[_ngcontent-%COMP%] .layout-column[_ngcontent-%COMP%] .search-box[_ngcontent-%COMP%], .container[_ngcontent-%COMP%] .layout-gt-sm-row[_ngcontent-%COMP%] .search-box[_ngcontent-%COMP%]{display:flex;align-items:center;gap:15px;flex:1;min-width:0}.container[_ngcontent-%COMP%] .layout-column[_ngcontent-%COMP%] .search-box.m-r-30[_ngcontent-%COMP%], .container[_ngcontent-%COMP%] .layout-gt-sm-row[_ngcontent-%COMP%] .search-box.m-r-30[_ngcontent-%COMP%]{margin-right:30px}.container[_ngcontent-%COMP%] .layout-column[_ngcontent-%COMP%] .search-box[_ngcontent-%COMP%] mat-form-field[_ngcontent-%COMP%], .container[_ngcontent-%COMP%] .layout-gt-sm-row[_ngcontent-%COMP%] .search-box[_ngcontent-%COMP%] mat-form-field[_ngcontent-%COMP%]{min-width:200px;flex:1}.container[_ngcontent-%COMP%] .layout-column[_ngcontent-%COMP%] .search-box[_ngcontent-%COMP%] mat-form-field.search-box[_ngcontent-%COMP%], .container[_ngcontent-%COMP%] .layout-gt-sm-row[_ngcontent-%COMP%] .search-box[_ngcontent-%COMP%] mat-form-field.search-box[_ngcontent-%COMP%]{width:auto}.container[_ngcontent-%COMP%] .layout-column[_ngcontent-%COMP%] .search-box[_ngcontent-%COMP%] mat-form-field[_ngcontent-%COMP%] + mat-form-field[_ngcontent-%COMP%], .container[_ngcontent-%COMP%] .layout-gt-sm-row[_ngcontent-%COMP%] .search-box[_ngcontent-%COMP%] mat-form-field[_ngcontent-%COMP%] + mat-form-field[_ngcontent-%COMP%]{margin-left:15px}.container[_ngcontent-%COMP%] .layout-column[_ngcontent-%COMP%] .search-box[_ngcontent-%COMP%] mat-checkbox[_ngcontent-%COMP%], .container[_ngcontent-%COMP%] .layout-gt-sm-row[_ngcontent-%COMP%] .search-box[_ngcontent-%COMP%] mat-checkbox[_ngcontent-%COMP%]{white-space:nowrap;flex-shrink:0;margin-left:15px}.container[_ngcontent-%COMP%] .layout-column[_ngcontent-%COMP%] .search-box[_ngcontent-%COMP%] mat-checkbox.m-r-10[_ngcontent-%COMP%], .container[_ngcontent-%COMP%] .layout-gt-sm-row[_ngcontent-%COMP%] .search-box[_ngcontent-%COMP%] mat-checkbox.m-r-10[_ngcontent-%COMP%]{margin-right:10px}.container[_ngcontent-%COMP%] .layout-column[_ngcontent-%COMP%] .action-button[_ngcontent-%COMP%], .container[_ngcontent-%COMP%] .layout-gt-sm-row[_ngcontent-%COMP%] .action-button[_ngcontent-%COMP%]{display:flex;align-items:center;flex-shrink:0;margin-left:auto}.container[_ngcontent-%COMP%] .layout-column[_ngcontent-%COMP%] .action-button.gap-25px[_ngcontent-%COMP%], .container[_ngcontent-%COMP%] .layout-gt-sm-row[_ngcontent-%COMP%] .action-button.gap-25px[_ngcontent-%COMP%]{gap:25px}.container[_ngcontent-%COMP%] .layout-column[_ngcontent-%COMP%] .action-button[_ngcontent-%COMP%] button[_ngcontent-%COMP%], .container[_ngcontent-%COMP%] .layout-gt-sm-row[_ngcontent-%COMP%] .action-button[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{white-space:nowrap}.container[_ngcontent-%COMP%] .layout-column[_ngcontent-%COMP%] .action-button[_ngcontent-%COMP%] button[_ngcontent-%COMP%] fa-icon.m-r-10[_ngcontent-%COMP%], .container[_ngcontent-%COMP%] .layout-column[_ngcontent-%COMP%] .action-button[_ngcontent-%COMP%] button[_ngcontent-%COMP%] fa-icon.m-r-20[_ngcontent-%COMP%], .container[_ngcontent-%COMP%] .layout-gt-sm-row[_ngcontent-%COMP%] .action-button[_ngcontent-%COMP%] button[_ngcontent-%COMP%] fa-icon.m-r-10[_ngcontent-%COMP%], .container[_ngcontent-%COMP%] .layout-gt-sm-row[_ngcontent-%COMP%] .action-button[_ngcontent-%COMP%] button[_ngcontent-%COMP%] fa-icon.m-r-20[_ngcontent-%COMP%]{margin-right:10px}.container[_ngcontent-%COMP%] .bordered-table[_ngcontent-%COMP%]{width:100%;border:1px solid #e0e0e0;border-radius:4px;overflow:hidden;margin-top:16px}.container[_ngcontent-%COMP%] .bordered-table[_ngcontent-%COMP%] .select-row[_ngcontent-%COMP%]{cursor:pointer}.container[_ngcontent-%COMP%] .bordered-table[_ngcontent-%COMP%] .select-row[_ngcontent-%COMP%]:hover{background-color:#f5f5f5}.container[_ngcontent-%COMP%] .bordered-table[_ngcontent-%COMP%] th[_ngcontent-%COMP%], .container[_ngcontent-%COMP%] .bordered-table[_ngcontent-%COMP%] td[_ngcontent-%COMP%]{padding:12px 16px}.container[_ngcontent-%COMP%] .bordered-table[_ngcontent-%COMP%] th[_ngcontent-%COMP%]{font-weight:500;border-bottom:1px solid #e0e0e0}.container[_ngcontent-%COMP%] .bordered-table[_ngcontent-%COMP%] tr[_ngcontent-%COMP%]{border-bottom:1px solid #f0f0f0}.container[_ngcontent-%COMP%] .bordered-table[_ngcontent-%COMP%] tr[_ngcontent-%COMP%]:last-child{border-bottom:none}.container[_ngcontent-%COMP%] mat-paginator[_ngcontent-%COMP%]{border-top:1px solid #e0e0e0;margin-top:0}.container[_ngcontent-%COMP%] mat-progress-bar[_ngcontent-%COMP%]{margin:0}@media (width <= 768px){.container[_ngcontent-%COMP%]{padding:16px}.container[_ngcontent-%COMP%] .layout-column[_ngcontent-%COMP%], .container[_ngcontent-%COMP%] .layout-gt-sm-row[_ngcontent-%COMP%]{flex-wrap:wrap}.container[_ngcontent-%COMP%] .layout-column[_ngcontent-%COMP%] .search-box[_ngcontent-%COMP%], .container[_ngcontent-%COMP%] .layout-gt-sm-row[_ngcontent-%COMP%] .search-box[_ngcontent-%COMP%]{width:100%;margin-right:0!important;margin-bottom:15px;flex-wrap:wrap}.container[_ngcontent-%COMP%] .layout-column[_ngcontent-%COMP%] .search-box[_ngcontent-%COMP%] mat-form-field[_ngcontent-%COMP%], .container[_ngcontent-%COMP%] .layout-gt-sm-row[_ngcontent-%COMP%] .search-box[_ngcontent-%COMP%] mat-form-field[_ngcontent-%COMP%]{min-width:150px;margin-bottom:10px}.container[_ngcontent-%COMP%] .layout-column[_ngcontent-%COMP%] .search-box[_ngcontent-%COMP%] mat-form-field[_ngcontent-%COMP%] + mat-form-field[_ngcontent-%COMP%], .container[_ngcontent-%COMP%] .layout-gt-sm-row[_ngcontent-%COMP%] .search-box[_ngcontent-%COMP%] mat-form-field[_ngcontent-%COMP%] + mat-form-field[_ngcontent-%COMP%]{margin-left:0}.container[_ngcontent-%COMP%] .layout-column[_ngcontent-%COMP%] .search-box[_ngcontent-%COMP%] mat-checkbox[_ngcontent-%COMP%], .container[_ngcontent-%COMP%] .layout-gt-sm-row[_ngcontent-%COMP%] .search-box[_ngcontent-%COMP%] mat-checkbox[_ngcontent-%COMP%]{margin-left:0;margin-top:10px}.container[_ngcontent-%COMP%] .layout-column[_ngcontent-%COMP%] .action-button[_ngcontent-%COMP%], .container[_ngcontent-%COMP%] .layout-gt-sm-row[_ngcontent-%COMP%] .action-button[_ngcontent-%COMP%]{margin-left:0;width:100%;justify-content:center}.container[_ngcontent-%COMP%] .layout-column[_ngcontent-%COMP%] .action-button.gap-25px[_ngcontent-%COMP%], .container[_ngcontent-%COMP%] .layout-gt-sm-row[_ngcontent-%COMP%] .action-button.gap-25px[_ngcontent-%COMP%]{gap:15px}}table[_ngcontent-%COMP%]{width:100%}table[_ngcontent-%COMP%] tr.select-row[_ngcontent-%COMP%]:hover{cursor:pointer}.m-r-10[_ngcontent-%COMP%]{margin-right:10px!important}.m-r-20[_ngcontent-%COMP%]{margin-right:20px!important}.m-r-30[_ngcontent-%COMP%]{margin-right:30px!important}"]})}}return e})();var UDe=()=>["../"];function WDe(e,o){e&1&&(l(0,"mat-error"),c(1),p(2,"translate"),p(3,"translate"),l(4,"strong"),c(5),p(6,"translate"),r()()),e&2&&(a(),le(" ",m(2,3,"labels.inputs.Center Name")," ",m(3,5,"labels.commons.is")," "),a(4),h(m(6,7,"labels.commons.required")))}function QDe(e,o){e&1&&(l(0,"mat-error"),c(1),p(2,"translate"),l(3,"strong"),c(4),p(5,"translate"),r(),c(6),p(7,"translate"),r()),e&2&&(a(),v(" ",m(2,3,"labels.inputs.Center Name")," "),a(3),h(m(5,5,"labels.inputs.cannot")),a(2),v(" ",m(7,7,"labels.inputs.begin with a special character or number")," "))}function YDe(e,o){if(e&1&&(l(0,"mat-option",7),c(1),r()),e&2){let t=o.$implicit;g("value",t.id),a(),v(" ",t.name," ")}}function JDe(e,o){e&1&&(l(0,"mat-error"),c(1),p(2,"translate"),p(3,"translate"),l(4,"strong"),c(5),p(6,"translate"),r()()),e&2&&(a(),le(" ",m(2,3,"labels.inputs.Office")," ",m(3,5,"labels.commons.is")," "),a(4),h(m(6,7,"labels.commons.required")))}function KDe(e,o){if(e&1&&(l(0,"mat-option",7),c(1),r()),e&2){let t=o.$implicit;g("value",t.id),a(),v(" ",t.displayName," ")}}function XDe(e,o){e&1&&(l(0,"mat-error"),c(1),p(2,"translate"),p(3,"translate"),l(4,"strong"),c(5),p(6,"translate"),r()()),e&2&&(a(),le(" ",m(2,3,"labels.inputs.Activation Date")," ",m(3,5,"labels.commons.is")," "),a(4),h(m(6,7,"labels.commons.required")))}function ZDe(e,o){if(e&1){let t=Y();l(0,"mat-form-field",11),R("click",function(){V(t);let i=xe(7);return q(i.open())}),l(1,"mat-label"),c(2),p(3,"translate"),r(),b(4,"input",20)(5,"mat-datepicker-toggle",13)(6,"mat-datepicker",null,1),E(8,XDe,7,9,"mat-error"),r()}if(e&2){let t=xe(7),n=w();a(2),h(m(3,6,"labels.inputs.Activation Date")),a(2),g("min",n.minDate)("max",n.maxDate)("matDatepicker",t),a(),g("for",t),a(3),I(n.centerForm.controls.activationDate.hasError("required")?8:-1)}}function eEe(e,o){e&1&&(l(0,"mat-error"),c(1),p(2,"translate"),p(3,"translate"),l(4,"strong"),c(5),p(6,"translate"),r()()),e&2&&(a(),le(" ",m(2,3,"labels.inputs.Submission Date")," ",m(3,5,"labels.commons.is")," "),a(4),h(m(6,7,"labels.commons.required")))}function tEe(e,o){if(e&1&&(l(0,"mat-option",7),c(1),r()),e&2){let t=o.$implicit;g("value",t),a(),v(" ",t.name," ")}}function iEe(e,o){if(e&1){let t=Y();l(0,"div",16)(1,"div",21)(2,"div",22),c(3),p(4,"translate"),r(),l(5,"button",23),R("click",function(){V(t);let i=w();return q(i.addGroup())}),b(6,"fa-icon",24),r()(),l(7,"div",25)(8,"div",26),c(9),p(10,"translate"),r(),l(11,"div",26),c(12),r()(),l(13,"div",25)(14,"div",26),c(15),p(16,"translate"),r(),l(17,"div",26),c(18),r()(),l(19,"div",25)(20,"div",26),c(21),p(22,"translate"),r(),l(23,"div",26),c(24),r()()()}if(e&2){let t=w();a(3),h(m(4,7,"labels.inputs.Group Details")),a(6),h(m(10,9,"labels.inputs.name")),a(3),h(t.groupChoice.value.name),a(3),h(m(16,11,"labels.inputs.Id")),a(3),h(t.groupChoice.value.id),a(3),h(m(22,13,"labels.inputs.Office")),a(3),h(t.groupChoice.value.officeName)}}function nEe(e,o){if(e&1){let t=Y();l(0,"div",28)(1,"button",23),R("click",function(){let i=V(t).$index,s=w(2);return q(s.removeGroup(i))}),b(2,"fa-icon",29),r(),l(3,"span",30),c(4),r()()}if(e&2){let t=o.$implicit;a(4),h(t.name)}}function oEe(e,o){if(e&1&&(l(0,"mat-nav-list")(1,"h3",27),c(2),p(3,"translate"),r(),Se(4,nEe,5,1,"div",28,Pe),r()),e&2){let t=w();a(2),h(m(3,1,"labels.heading.Selected Groups")),a(2),we(t.groupMembers)}}function aEe(e,o){if(e&1){let t=Y();l(0,"button",31),R("click",function(){V(t);let i=w();return q(i.submit())}),c(1),p(2,"translate"),r()}if(e&2){let t=w();g("disabled",!t.centerForm.valid),a(),v(" ",m(2,2,"labels.buttons.Submit")," ")}}var J2=(()=>{class e{constructor(){this.formBuilder=T(nt),this.route=T(Ie),this.router=T(qe),this.centerService=T(Jn),this.settingsService=T(At),this.groupService=T(An),this.dateUtils=T(Zt),this.minDate=new Date(2e3,0,1),this.maxDate=new Date,this.groupMembers=[],this.groupChoice=new it(""),this.route.data.subscribe(t=>{this.officeData=t.offices})}ngOnInit(){this.maxDate=this.settingsService.businessDate,this.createCenterForm()}createCenterForm(){this.centerForm=this.formBuilder.group({name:["",[se.required,se.pattern("(^[A-z]).*")]],officeId:["",se.required],submittedOnDate:["",se.required],staffId:[""],externalId:[""],active:[""]}),this.buildDependencies()}buildDependencies(){this.centerForm.get("officeId").valueChanges.subscribe(t=>{this.groupService.getGroupsByOfficeId(t).subscribe(n=>{this.groupsData=n,this.groupsData.length?this.groupChoice.enable():this.groupChoice.disable()}),this.centerService.getStaff(t).subscribe(n=>{this.staffData=n.staffOptions,this.staffData===void 0?this.centerForm.controls.staffId.disable():this.centerForm.controls.staffId.enable()})}),this.centerForm.get("active").valueChanges.subscribe(t=>{t?this.centerForm.addControl("activationDate",new it("",se.required)):this.centerForm.removeControl("activationDate")})}addGroup(){this.groupMembers.includes(this.groupChoice.value)||this.groupMembers.push(this.groupChoice.value)}removeGroup(t){this.groupMembers.splice(t,1)}submit(){let t=this.centerForm.value,n=this.centerForm.value.submittedOnDate,i=this.centerForm.value.activationDate,s=this.settingsService.language.code,d=this.settingsService.dateFormat;t.submittedOnDate instanceof Date&&(t.submittedOnDate=this.dateUtils.formatDate(n,d)),t.activationDate instanceof Date&&(t.activationDate=this.dateUtils.formatDate(i,d));let u=qt(at({},t),{dateFormat:d,locale:s});u.groupMembers=[],this.groupMembers.forEach(f=>u.groupMembers.push(f.id)),this.centerService.createCenter(u).subscribe(f=>{this.router.navigate(["../centers"])})}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275cmp=me({type:e,selectors:[["mifosx-create-center"]],decls:60,vars:40,consts:[["submittedOnDatePicker",""],["activationDatePicker",""],[1,"container"],[3,"formGroup"],[1,"layout-column"],["matInput","","required","","formControlName","name"],["required","","formControlName","officeId"],[3,"value"],["formControlName","staffId"],["labelPosition","before","formControlName","active"],["matInput","","formControlName","externalId"],[3,"click"],["matInput","","required","","formControlName","submittedOnDate",3,"min","max","matDatepicker"],["matSuffix","",3,"for"],[3,"formControl"],[1,"layout-row"],[1,"mat-table"],[1,"layout-row","align-center","gap-5px","responsive-column"],["type","button","mat-raised-button","",3,"routerLink"],["mat-raised-button","","color","primary",3,"disabled","click",4,"mifosxHasPermission"],["matInput","","required","","formControlName","activationDate",3,"min","max","matDatepicker"],[1,"mat-header-row"],[1,"mat-header-cell"],["mat-icon-button","",3,"click"],["icon","plus"],[1,"mat-row"],[1,"mat-cell"],["matSubheader",""],["mat-list-item",""],["icon","trash"],["matLine",""],["mat-raised-button","","color","primary",3,"click","disabled"]],template:function(n,i){if(n&1){let s=Y();l(0,"div",2)(1,"mat-card")(2,"form",3)(3,"mat-card-content")(4,"div",4)(5,"mat-form-field")(6,"mat-label"),c(7),p(8,"translate"),r(),b(9,"input",5),E(10,WDe,7,9,"mat-error"),E(11,QDe,8,9,"mat-error"),r(),l(12,"mat-form-field")(13,"mat-label"),c(14),p(15,"translate"),r(),l(16,"mat-select",6),Se(17,YDe,2,2,"mat-option",7,Pe),r(),E(19,JDe,7,9,"mat-error"),r(),l(20,"mat-form-field")(21,"mat-label"),c(22),p(23,"translate"),r(),l(24,"mat-select",8),Se(25,KDe,2,2,"mat-option",7,Pe),r()(),l(27,"mat-checkbox",9),c(28),p(29,"translate"),r(),E(30,ZDe,9,8,"mat-form-field"),l(31,"mat-form-field")(32,"mat-label"),c(33),p(34,"translate"),r(),b(35,"input",10),r(),l(36,"mat-form-field",11),R("click",function(){V(s);let u=xe(43);return q(u.open())}),l(37,"mat-label"),c(38),p(39,"translate"),r(),b(40,"input",12)(41,"mat-datepicker-toggle",13)(42,"mat-datepicker",null,0),E(44,eEe,7,9,"mat-error"),r(),l(45,"mat-form-field")(46,"mat-label"),c(47),p(48,"translate"),r(),l(49,"mat-select",14),Se(50,tEe,2,2,"mat-option",7,Pe),r()()(),l(52,"div",15),E(53,iEe,25,15,"div",16),E(54,oEe,6,3,"mat-nav-list"),r()(),l(55,"mat-card-actions",17)(56,"button",18),c(57),p(58,"translate"),r(),F(59,aEe,3,4,"button",19),r()()()()}if(n&2){let s=xe(43);a(2),g("formGroup",i.centerForm),a(5),h(m(8,23,"labels.inputs.name")),a(3),I(i.centerForm.controls.name.hasError("required")?10:-1),a(),I(i.centerForm.controls.name.hasError("pattern")?11:-1),a(3),h(m(15,25,"labels.inputs.Office")),a(3),we(i.officeData),a(2),I(i.centerForm.controls.officeId.hasError("required")?19:-1),a(3),h(m(23,27,"labels.inputs.Staff")),a(3),we(i.staffData),a(3),v(" ",m(29,29,"labels.inputs.Active")," "),a(2),I(i.centerForm.controls.active.value?30:-1),a(3),h(m(34,31,"labels.inputs.External Id")),a(5),h(m(39,33,"labels.inputs.Submitted On")),a(2),g("min",i.minDate)("max",i.maxDate)("matDatepicker",s),a(),g("for",s),a(3),I(i.centerForm.controls.submittedOnDate.hasError("required")?44:-1),a(3),h(m(48,35,"labels.inputs.Select and Add groups")),a(2),g("formControl",i.groupChoice),a(),we(i.groupsData),a(3),I(i.groupChoice.value?53:-1),a(),I(i.groupMembers.length?54:-1),a(2),g("routerLink",oe(39,UDe)),a(),v(" ",m(58,37,"labels.buttons.Cancel")," "),a(2),g("mifosxHasPermission","CREATE_CENTER")}},dependencies:[ue,fe,tt,st,Ue,Xe,dt,_n,Ze,et,Ae,$e,Je,Et,Fe,Be,ut,ai,ze,gt,ft,mi,di,pi,ve,fi,Ke,wi,ke,pa,Ep,ca,he],styles:[".container[_ngcontent-%COMP%]{max-width:37rem}.mat-table[_ngcontent-%COMP%]{display:block;font-family:Tahoma,Verdana,sans-serif;width:50%}.mat-row[_ngcontent-%COMP%], .mat-header-row[_ngcontent-%COMP%]{display:flex;border-bottom-width:1px;border-bottom-style:solid;align-items:center;min-height:48px;padding:0 24px}.mat-cell[_ngcontent-%COMP%], .mat-header-cell[_ngcontent-%COMP%]{flex:1;overflow:hidden;word-wrap:break-word}"]})}}return e})();var rEe=()=>["./general"],lEe=()=>["savings-accounts","create"],sEe=()=>["./notes"],cEe=e=>["./datatables",e];function pEe(e,o){if(e&1&&(l(0,"div")(1,"button",23)(2,"mat-icon",24),b(3,"fa-icon",25),r()()()),e&2){w();let t=xe(36);a(),g("matMenuTriggerFor",t)}}function mEe(e,o){if(e&1&&(l(0,"span"),c(1),p(2,"translate"),b(3,"mifosx-external-identifier",26)(4,"br"),r()),e&2){let t=w();a(),v(" ",m(2,3,"labels.inputs.External Id"),": "),a(2),g("externalId",Le(t.centerViewData.externalId))}}function dEe(e,o){if(e&1&&(l(0,"span"),c(1),p(2,"translate"),b(3,"br"),r()),e&2){let t=w();a(),le(" ",m(2,2,"labels.inputs.Staff"),": ",t.centerViewData.staffName," ")}}function uEe(e,o){if(e&1){let t=Y();l(0,"i",28),R("click",function(){V(t);let i=w(3);return q(i.doAction("Edit Meeting"))}),r()}}function fEe(e,o){e&1&&(l(0,"span"),F(1,uEe,1,0,"i",27),b(2,"br"),r()),e&2&&(a(),g("mifosxHasPermission","UPDATE_MEETING"))}function hEe(e,o){if(e&1&&(l(0,"div")(1,"p"),c(2),p(3,"translate"),p(4,"dateFormat"),E(5,fEe,3,1,"span"),c(6),p(7,"translate"),p(8,"lowercase"),r()()),e&2){let t=w();a(2),le(" ",m(3,5,"labels.inputs.Next Meeting on"),": ",m(4,7,t.centerViewData.collectionMeetingCalendar==null?null:t.centerViewData.collectionMeetingCalendar.nextTenRecurringDates[0])," "),a(3),I(t.editMeeting?5:-1),a(),le(" ",m(7,9,"labels.inputs.Meeting Frequency"),": ",m(8,11,t.centerViewData.collectionMeetingCalendar==null?null:t.centerViewData.collectionMeetingCalendar.frequency.value)," ")}}function gEe(e,o){e&1&&(l(0,"div")(1,"p"),c(2),p(3,"translate"),p(4,"translate"),b(5,"i",29)(6,"br"),c(7),p(8,"translate"),p(9,"translate"),r()()),e&2&&(a(2),le(" ",m(3,4,"labels.inputs.Next Meeting on"),": ",m(4,6,"labels.text.Unassigned")," "),a(5),le(" ",m(8,8,"labels.inputs.Meeting Frequency"),": ",m(9,10,"labels.text.N/A")," "))}function _Ee(e,o){if(e&1){let t=Y();l(0,"button",30),R("click",function(){V(t);let i=w(2);return q(i.doAction("Activate"))}),l(1,"mat-icon",31),b(2,"fa-icon",32),r(),l(3,"span"),c(4),p(5,"translate"),r()()}e&2&&(a(4),h(m(5,1,"labels.buttons.Activate")))}function CEe(e,o){e&1&&(l(0,"span"),F(1,_Ee,6,3,"button",17),r()),e&2&&(a(),g("mifosxHasPermission","ACTIVATE_CENTER"))}function vEe(e,o){if(e&1){let t=Y();l(0,"button",30),R("click",function(){V(t);let i=w();return q(i.doAction("Edit"))}),l(1,"mat-icon",31),b(2,"fa-icon",33),r(),l(3,"span"),c(4),p(5,"translate"),r()()}e&2&&(a(4),h(m(5,1,"labels.buttons.Edit")))}function xEe(e,o){e&1&&(l(0,"button",34)(1,"mat-icon",31),b(2,"fa-icon",35),r(),l(3,"span"),c(4),p(5,"translate"),r()()),e&2&&(g("disabled",!0),a(4),h(m(5,2,"labels.buttons.Add Group")))}function bEe(e,o){if(e&1){let t=Y();l(0,"button",30),R("click",function(){V(t);let i=w();return q(i.doAction("Manage Groups"))}),l(1,"mat-icon",31),b(2,"fa-icon",33),r(),l(3,"span"),c(4),p(5,"translate"),r()()}e&2&&(a(4),h(m(5,1,"labels.buttons.Manage Groups")))}function yEe(e,o){e&1&&(l(0,"button",37)(1,"mat-icon",31),b(2,"fa-icon",38),r(),l(3,"span"),c(4),p(5,"translate"),r()()),e&2&&(g("disabled",!0)("routerLink",oe(5,lEe)),a(4),h(m(5,3,"labels.buttons.Centers Saving Application")))}function SEe(e,o){e&1&&(l(0,"span"),F(1,yEe,6,6,"button",36),r()),e&2&&(a(),g("mifosxHasPermission","CREATE_SAVINGSACCOUNT"))}function wEe(e,o){if(e&1){let t=Y();l(0,"button",30),R("click",function(){V(t);let i=w(2);return q(i.doAction("Attendance"))}),c(1),p(2,"translate"),r()}e&2&&(a(),v(" ",m(2,1,"labels.buttons.Attendance")," "))}function PEe(e,o){e&1&&(l(0,"span"),F(1,wEe,3,3,"button",17),r()),e&2&&(a(),g("mifosxHasPermission","SAVEORUPDATEATTENDANCE_MEETING"))}function TEe(e,o){if(e&1){let t=Y();l(0,"button",30),R("click",function(){V(t);let i=w(2);return q(i.doAction("Assign Staff"))}),c(1),p(2,"translate"),r()}e&2&&(a(),v(" ",m(2,1,"labels.buttons.Assign Staff")," "))}function MEe(e,o){e&1&&(l(0,"span"),F(1,TEe,3,3,"button",17),r()),e&2&&(a(),g("mifosxHasPermission","ASSIGNSTAFF_GROUP"))}function DEe(e,o){if(e&1){let t=Y();l(0,"button",30),R("click",function(){V(t);let i=w(2);return q(i.doAction("Unassign Staff"))}),c(1),p(2,"translate"),r()}e&2&&(a(),v(" ",m(2,1,"labels.buttons.Unassign Staff")," "))}function EEe(e,o){e&1&&(l(0,"span"),F(1,DEe,3,3,"button",17),r()),e&2&&(a(),g("mifosxHasPermission","UNASSIGNSTAFF_GROUP"))}function IEe(e,o){if(e&1){let t=Y();l(0,"button",30),R("click",function(){V(t);let i=w(2);return q(i.doAction("Delete"))}),c(1),p(2,"translate"),r()}e&2&&(a(),v(" ",m(2,1,"labels.buttons.Delete")," "))}function OEe(e,o){e&1&&(l(0,"span"),F(1,IEe,3,3,"button",17),r()),e&2&&(a(),g("mifosxHasPermission","DELETE_CENTER"))}function AEe(e,o){if(e&1){let t=Y();l(0,"button",30),R("click",function(){V(t);let i=w();return q(i.doAction("Close"))}),c(1),p(2,"translate"),r()}e&2&&(a(),v(" ",m(2,1,"labels.buttons.Close")," "))}function FEe(e,o){if(e&1){let t=Y();l(0,"button",30),R("click",function(){V(t);let i=w(2);return q(i.doAction("Attach Meeting"))}),c(1),p(2,"translate"),r()}e&2&&(a(),v(" ",m(2,1,"labels.buttons.Attach Meeting")," "))}function kEe(e,o){e&1&&(l(0,"span"),F(1,FEe,3,3,"button",17),r()),e&2&&(a(),g("mifosxHasPermission","CREATE_MEETING"))}function BEe(e,o){if(e&1){let t=Y();l(0,"button",30),R("click",function(){V(t);let i=w();return q(i.doAction("Staff Assignment History"))}),c(1),p(2,"translate"),r()}e&2&&(a(),v(" ",m(2,1,"labels.buttons.Staff Assignment History")," "))}function REe(e,o){if(e&1&&(l(0,"a",21,4),c(2),p(3,"translate"),r()),e&2){let t=xe(1);g("routerLink",oe(5,sEe))("active",t.isActive),a(2),v(" ",m(3,3,"labels.inputs.Notes")," ")}}function NEe(e,o){if(e&1&&(l(0,"a",21,5),c(2),r()),e&2){let t=xe(1),n=w().$implicit;g("routerLink",Nt(3,cEe,n.registeredTableName))("active",t.isActive),a(2),v(" ",n.registeredTableName," ")}}function LEe(e,o){if(e&1&&(l(0,"span"),F(1,NEe,3,5,"a",22),r()),e&2){let t=o.$implicit;a(),g("mifosxHasPermission","READ_"+t.registeredTableName)}}var K2=(()=>{class e{constructor(){this.route=T(Ie),this.router=T(qe),this.dialog=T(Ht),this.centersService=T(Jn),this.translateService=T(yi),this.route.data.subscribe(t=>{this.centerViewData=t.centerViewData,this.centerDatatables=t.centerDatatables})}ngOnInit(){this.centerViewData.collectionMeetingCalendar?this.meetingData=!0:this.meetingData=!1}get editMeeting(){return!!(this.centerViewData.collectionMeetingCalendar&&this.centerViewData.collectionMeetingCalendar.entityType.value==="CENTERS"&&this.centerViewData.hierarchy==="."+this.centerViewData.id+".")}doAction(t){switch(t){case"Activate":case"Assign Staff":case"Close":case"Attendance":case"Attach Meeting":case"Manage Groups":case"Staff Assignment History":this.router.navigate([`actions/${t}`],{relativeTo:this.route});break;case"Edit Meeting":let n={calendarId:this.centerViewData.collectionMeetingCalendar.id};this.router.navigate([`actions/${t}`],{relativeTo:this.route,queryParams:n});break;case"Unassign Staff":this.centersUnassignStaff();break;case"Delete":this.deleteCenter();break;case"Edit":this.router.navigate(["edit"],{relativeTo:this.route})}}centersUnassignStaff(){this.dialog.open(Pr,{data:{heading:this.translateService.instant("labels.heading.Unassign Staff"),dialogContext:this.translateService.instant("labels.dialogContext.Are you sure you want Unassign Staff")}}).afterClosed().subscribe(n=>{n.confirm&&this.centersService.executeGroupActionCommand(this.centerViewData.id,"unassignStaff",{staffId:this.centerViewData.staffId}).subscribe(()=>{this.reload()})})}deleteCenter(){this.dialog.open(vi,{data:{deleteContext:`center with id: ${this.centerViewData.id}`}}).afterClosed().subscribe(n=>{n.delete&&this.centersService.deleteCenter(this.centerViewData.id).subscribe(()=>{this.router.navigate(["/centers"],{relativeTo:this.route})})})}reload(){let t=this.router.url;this.router.navigateByUrl("/centers",{skipLocationChange:!0}).then(()=>this.router.navigate([t]))}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275cmp=me({type:e,selectors:[["mifosx-centers-view"]],decls:66,vars:51,consts:[["centerMenu","matMenu"],["More","matMenu"],["general","routerLinkActive"],["tabPanel",""],["notes","routerLinkActive"],["datatable","routerLinkActive"],[1,"account-card"],[1,"header","layout-column"],[1,"header-title-group"],["mat-card-md-image","","src","assets/images/center_placeholder.png",1,"profile-image"],[1,"mat-typography","account-card-title"],[1,"make-flex"],[1,"flex-95"],[1,"fa","fa-stop",3,"matTooltip","ngClass"],[1,"layout-row","responsive-column"],[1,"flex-45"],[1,"center-meeting","flex-45","align-start-start"],["mat-menu-item","",3,"click",4,"mifosxHasPermission"],["mat-menu-item","",3,"disabled",4,"mifosxHasPermission"],["mat-menu-item","",3,"matMenuTriggerFor"],["mat-tab-nav-bar","",1,"navigation-tabs",3,"tabPanel"],["mat-tab-link","","routerLinkActive","",3,"routerLink","active"],["mat-tab-link","","routerLinkActive","",3,"routerLink","active",4,"mifosxHasPermission"],["mat-icon-button","","aria-label","Center actions","yPosition","below",3,"matMenuTriggerFor"],["matListIcon","",1,"actions-menu"],["icon","bars","size","sm"],[3,"externalId"],["class","fa fa-edit",3,"click",4,"mifosxHasPermission"],[1,"fa","fa-edit",3,"click"],[1,"fa","fa-calendar"],["mat-menu-item","",3,"click"],["matListIcon",""],["icon","checkSign","size","sm"],["icon","edit","size","sm"],["mat-menu-item","",3,"disabled"],["icon","add","size","sm"],["mat-menu-item","",3,"disabled","routerLink",4,"mifosxHasPermission"],["mat-menu-item","",3,"disabled","routerLink"],["icon","file","size","sm"]],template:function(n,i){if(n&1&&(l(0,"mat-card",6)(1,"mat-card-header",7)(2,"mat-card-title-group",8)(3,"div")(4,"div"),b(5,"img",9),r()(),l(6,"div",10)(7,"mat-card-title",11)(8,"h3",12),b(9,"i",13),p(10,"statusLookup"),l(11,"b"),c(12),p(13,"translate"),r(),c(14),r(),E(15,pEe,4,1,"div"),r(),l(16,"mat-card-subtitle")(17,"div",14)(18,"div",15)(19,"p"),c(20),p(21,"translate"),b(22,"br"),c(23),p(24,"translate"),b(25,"br"),E(26,mEe,5,5,"span"),E(27,dEe,4,4,"span"),c(28),p(29,"translate"),p(30,"dateFormat"),b(31,"br"),r()(),l(32,"div",16),E(33,hEe,9,13,"div")(34,gEe,10,12,"div"),r()()()(),l(35,"mat-menu",null,0),E(37,CEe,2,1,"span"),F(38,vEe,6,3,"button",17)(39,xEe,6,4,"button",18)(40,bEe,6,3,"button",17),E(41,SEe,2,1,"span"),l(42,"button",19),c(43),p(44,"translate"),r(),l(45,"mat-menu",null,1),E(47,PEe,2,1,"span"),E(48,MEe,2,1,"span"),E(49,EEe,2,1,"span"),E(50,OEe,2,1,"span"),F(51,AEe,3,3,"button",17),E(52,kEe,2,1,"span"),F(53,BEe,3,3,"button",17),r()()()(),l(54,"mat-card-content")(55,"nav",20)(56,"a",21,2),c(58),p(59,"translate"),r(),F(60,REe,4,6,"a",22),Se(61,LEe,2,1,"span",null,Pe),r(),l(63,"mat-tab-nav-panel",null,3),b(65,"router-outlet"),r()()()),n&2){let s=xe(46),d=xe(57),u=xe(64);a(9),g("matTooltip",Le(i.centerViewData.status.value))("ngClass",m(10,34,i.centerViewData.status.code)),a(3),v("",m(13,36,"labels.heading.Center Name")," :"),a(2),v(" ",i.centerViewData.name," "),a(),I(i.centerViewData.status.value!=="Closed"?15:-1),a(5),le(" ",m(21,38,"labels.inputs.Account")," #:",i.centerViewData.accountNo," "),a(3),le(" ",m(24,40,"labels.inputs.Office"),": ",i.centerViewData.officeName," "),a(3),I(i.centerViewData.externalId?26:-1),a(),I(i.centerViewData.staffName?27:-1),a(),le(" ",m(29,42,"labels.inputs.Activation Date")," : ",i.centerViewData.activationDate?m(30,44,i.centerViewData.activationDate):"Not Activated"),a(5),I(i.centerViewData.collectionMeetingCalendar?33:34),a(4),I(i.centerViewData.status.value!=="Active"?37:-1),a(),g("mifosxHasPermission","UPDATE_CENTER"),a(),g("mifosxHasPermission","CREATE_GROUP"),a(),g("mifosxHasPermission","ASSOCIATEGROUPS_CENTER"),a(),I(i.centerViewData.active?41:-1),a(),g("matMenuTriggerFor",s),a(),h(m(44,46,"labels.buttons.More")),a(4),I(i.centerViewData.collectionMeetingCalendar?47:-1),a(),I(i.centerViewData.staffId?-1:48),a(),I(i.centerViewData.staffId?49:-1),a(),I(i.centerViewData.status.value==="Active"?50:-1),a(),g("mifosxHasPermission","CLOSE_CENTER"),a(),I(i.centerViewData.status.value==="Active"&&!i.centerViewData.collectionMeetingCalendar?52:-1),a(),g("mifosxHasPermission","READ_Staff Assignment History"),a(2),g("tabPanel",u),a(),g("routerLink",oe(50,rEe))("active",d.isActive),a(2),v(" ",m(59,48,"labels.inputs.General")," "),a(2),g("mifosxHasPermission","READ_GROUPNOTE"),a(),we(i.centerDatatables)}},dependencies:[ue,co,fe,Ae,$e,Je,Ke,sa,Qr,b0,Qo,si,wi,nc,Yo,ke,vl,Ea,ic,tc,nr,or,La,ar,ra,bg,Pi,he,go],styles:[".account-card[_ngcontent-%COMP%] .center-meeting[_ngcontent-%COMP%]{align-self:flex-end;width:100%}.account-card[_ngcontent-%COMP%] .center-meeting[_ngcontent-%COMP%] div[_ngcontent-%COMP%], .account-card[_ngcontent-%COMP%] .center-meeting[_ngcontent-%COMP%] ng-template[_ngcontent-%COMP%] > div[_ngcontent-%COMP%]{background-color:#0a6aac}.account-card[_ngcontent-%COMP%] .center-meeting[_ngcontent-%COMP%] div[_ngcontent-%COMP%] p[_ngcontent-%COMP%], .account-card[_ngcontent-%COMP%] .center-meeting[_ngcontent-%COMP%] ng-template[_ngcontent-%COMP%] > div[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{color:#fff;padding:0 10px}.meetingDetails[_ngcontent-%COMP%]{float:right;margin-right:10px;border:1px black solid;padding:10px}.make-flex[_ngcontent-%COMP%]{display:flex}"]})}}return e})();var VEe=e=>["/groups",e,"general"],oN=e=>["../","savings-accounts",e,"actions","Deposit"],aN=e=>["../","savings-accounts",e,"actions","Withdrawal"],qEe=e=>["../","savings-accounts",e,"actions","Approve"],zEe=e=>["../","savings-accounts",e,"actions","Undo Approval"],HEe=e=>["../","savings-accounts",e,"actions","Activate"],GEe=e=>["../","savings-accounts",e,"transactions"];function jEe(e,o){e&1&&(l(0,"div")(1,"h3",2),c(2),p(3,"translate"),r()()),e&2&&(a(2),h(m(3,1,"labels.heading.Center Closed")))}function $Ee(e,o){e&1&&(l(0,"th",12),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.Account Number")))}function UEe(e,o){if(e&1&&(l(0,"td",13),b(1,"i",14),p(2,"statusLookup"),c(3),r()),e&2){let t=o.$implicit;a(),g("matTooltip",Le(t.status.value))("ngClass",m(2,4,t.status.code)),a(2),v(" ",t.accountNo," ")}}function WEe(e,o){e&1&&(l(0,"th",12),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.Group Name")))}function QEe(e,o){if(e&1&&(l(0,"td",13),c(1),r()),e&2){let t=o.$implicit;a(),h(t.name)}}function YEe(e,o){e&1&&(l(0,"th",12),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.Office Name")))}function JEe(e,o){if(e&1&&(l(0,"td",13),c(1),r()),e&2){let t=o.$implicit;a(),h(t.officeName)}}function KEe(e,o){e&1&&(l(0,"th",12),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.Submitted On")))}function XEe(e,o){if(e&1&&(l(0,"td",13),c(1),p(2,"dateFormat"),r()),e&2){let t=o.$implicit;a(),h(m(2,1,t.timeline.submittedOnDate))}}function ZEe(e,o){e&1&&b(0,"tr",15)}function eIe(e,o){if(e&1&&b(0,"tr",16),e&2){let t=o.$implicit;g("routerLink",Nt(1,VEe,t.id))}}function tIe(e,o){if(e&1&&(l(0,"h3"),c(1),p(2,"translate"),r(),l(3,"table",3),X(4,4),F(5,$Ee,3,3,"th",5)(6,UEe,4,6,"td",6),Z(),X(7,7),F(8,WEe,3,3,"th",5)(9,QEe,2,1,"td",6),Z(),X(10,8),F(11,YEe,3,3,"th",5)(12,JEe,2,1,"td",6),Z(),X(13,9),F(14,KEe,3,3,"th",5)(15,XEe,3,3,"td",6),Z(),F(16,ZEe,1,0,"tr",10)(17,eIe,1,3,"tr",11),r()),e&2){let t=w();a(),h(m(2,4,"labels.heading.Groups")),a(2),g("dataSource",t.groupResourceData),a(13),g("matHeaderRowDef",t.groupsColumns),a(),g("matRowDefColumns",t.groupsColumns)}}function iIe(e,o){e&1&&(l(0,"th",12),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.Account No")))}function nIe(e,o){if(e&1&&(l(0,"td",13),b(1,"i",14),p(2,"statusLookup"),c(3),r()),e&2){let t=o.$implicit;a(),g("matTooltip",Le(t.status.value))("ngClass",m(2,4,t.status.code)),a(2),v(" ",t.accountNo," ")}}function oIe(e,o){e&1&&(l(0,"th",12),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.Products")))}function aIe(e,o){if(e&1&&(l(0,"td",13),c(1),r()),e&2){let t=o.$implicit;a(),h(t.productName)}}function rIe(e,o){e&1&&(l(0,"th",12),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.Balance")))}function lIe(e,o){if(e&1&&(l(0,"td",13),c(1),r()),e&2){let t=o.$implicit;a(),h(t.accountBalance)}}function sIe(e,o){e&1&&(l(0,"th",12),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.Actions")))}function cIe(e,o){if(e&1){let t=Y();l(0,"button",21),R("click",function(i){V(t);let s=w(5);return q(s.routeEdit(i))}),b(1,"i",22),p(2,"translate"),r()}if(e&2){let t=w(2).$implicit;g("routerLink",Nt(5,oN,t.id)),a(),g("matTooltip",Le(m(2,3,"tooltips.Deposit")))}}function pIe(e,o){if(e&1){let t=Y();l(0,"button",21),R("click",function(i){V(t);let s=w(5);return q(s.routeEdit(i))}),b(1,"i",22),p(2,"translate"),r()}if(e&2){let t=w(2).$implicit;g("routerLink",Nt(5,oN,t.id)),a(),g("matTooltip",Le(m(2,3,"tooltips.Deposit")))}}function mIe(e,o){if(e&1){let t=Y();l(0,"button",21),R("click",function(i){V(t);let s=w(5);return q(s.routeEdit(i))}),b(1,"i",23),p(2,"translate"),r()}if(e&2){let t=w(2).$implicit;g("routerLink",Nt(5,aN,t.id)),a(),g("matTooltip",Le(m(2,3,"tooltips.Withdraw")))}}function dIe(e,o){if(e&1){let t=Y();l(0,"button",21),R("click",function(i){V(t);let s=w(5);return q(s.routeEdit(i))}),b(1,"i",23),p(2,"translate"),r()}if(e&2){let t=w(2).$implicit;g("routerLink",Nt(5,aN,t.id)),a(),g("matTooltip",Le(m(2,3,"tooltips.Withdraw")))}}function uIe(e,o){if(e&1&&(E(0,cIe,3,7,"button",20),E(1,pIe,3,7,"button",20),E(2,mIe,3,7,"button",20),E(3,dIe,3,7,"button",20)),e&2){let t=w().$implicit;I(t.depositType.id===100?0:-1),a(),I(t.depositType.id===300?1:-1),a(),I(t.depositType.id===100?2:-1),a(),I(t.depositType.id===300?3:-1)}}function fIe(e,o){if(e&1){let t=Y();l(0,"button",21),R("click",function(i){V(t);let s=w(4);return q(s.routeEdit(i))}),b(1,"i",24),p(2,"translate"),r()}if(e&2){let t=w().$implicit;g("routerLink",Nt(5,qEe,t.id)),a(),g("matTooltip",Le(m(2,3,"tooltips.Approve")))}}function hIe(e,o){if(e&1){let t=Y();l(0,"button",21),R("click",function(i){V(t);let s=w(4);return q(s.routeEdit(i))}),b(1,"i",25),p(2,"translate"),r(),l(3,"button",21),R("click",function(i){V(t);let s=w(4);return q(s.routeEdit(i))}),b(4,"i",26),p(5,"translate"),r()}if(e&2){let t=w().$implicit;g("routerLink",Nt(10,zEe,t.id)),a(),g("matTooltip",Le(m(2,6,"tooltips.Undo Approve"))),a(2),g("routerLink",Nt(12,HEe,t.id)),a(),g("matTooltip",Le(m(5,8,"tooltips.Activate")))}}function gIe(e,o){if(e&1&&(l(0,"td",13),E(1,uIe,4,4),E(2,fIe,3,7,"button",20),E(3,hIe,6,14),r()),e&2){let t=o.$implicit;a(),I(t.status.active?1:-1),a(),I(t.status.submittedAndPendingApproval?2:-1),a(),I(!t.status.submittedAndPendingApproval&&!t.status.active?3:-1)}}function _Ie(e,o){e&1&&b(0,"tr",15)}function CIe(e,o){if(e&1&&b(0,"tr",16),e&2){let t=o.$implicit;g("routerLink",Nt(1,GEe,t.id))}}function vIe(e,o){if(e&1&&(l(0,"h3"),c(1),p(2,"translate"),r(),l(3,"table",3),X(4,4),F(5,iIe,3,3,"th",5)(6,nIe,4,6,"td",6),Z(),X(7,17),F(8,oIe,3,3,"th",5)(9,aIe,2,1,"td",6),Z(),X(10,18),F(11,rIe,3,3,"th",5)(12,lIe,2,1,"td",6),Z(),X(13,19),F(14,sIe,3,3,"th",5)(15,gIe,4,3,"td",6),Z(),F(16,_Ie,1,0,"tr",10)(17,CIe,1,3,"tr",11),r()),e&2){let t=w(2);a(),h(m(2,4,"labels.heading.Savings Account Overview")),a(2),g("dataSource",t.savingsAccountData),a(13),g("matHeaderRowDef",t.savingsAccountColumns),a(),g("matRowDefColumns",t.savingsAccountColumns)}}function xIe(e,o){if(e&1&&E(0,vIe,18,6),e&2){let t=w();I(t.savingsAccountData.length>0?0:-1)}}var X2=(()=>{class e{constructor(){this.route=T(Ie),this.savingsAccountColumns=["Account No","Products","Balance","Actions"],this.groupsColumns=["Account No","Group Name","Office Name","Submitted On"],this.route.data.subscribe(t=>{this.centerSummaryData=t.centerSummaryData[0],this.centerViewData=t.centerViewData,this.savingsAccountData=t.savingsAccountData.savingsAccounts,this.groupResourceData=t.centerViewData.groupMembers})}routeEdit(t){t.stopPropagation()}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275cmp=me({type:e,selectors:[["mifosx-general-tab"]],decls:31,vars:34,consts:[[1,"tab-container","mat-typography"],[1,"layout-row","gap-32px","summary-details-container"],[1,"closedCenter"],["mat-table","","matSort","",3,"dataSource"],["matColumnDef","Account No"],["mat-header-cell","",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","Group Name"],["matColumnDef","Office Name"],["matColumnDef","Submitted On"],["mat-header-row","",4,"matHeaderRowDef"],["mat-row","",3,"routerLink",4,"matRowDef","matRowDefColumns"],["mat-header-cell",""],["mat-cell",""],[1,"fa","fa-stop",3,"matTooltip","ngClass"],["mat-header-row",""],["mat-row","",3,"routerLink"],["matColumnDef","Products"],["matColumnDef","Balance"],["matColumnDef","Actions"],["mat-raised-button","","color","primary",1,"account-action-button",3,"routerLink"],["mat-raised-button","","color","primary",1,"account-action-button",3,"click","routerLink"],[1,"fa","fa-arrow-right",3,"matTooltip"],[1,"fa","fa-arrow-left",3,"matTooltip"],[1,"fa","fa-check",3,"matTooltip"],[1,"fa","fa-undo",3,"matTooltip"],[1,"fa","fa-power-off",3,"matTooltip"]],template:function(n,i){n&1&&(l(0,"div",0),E(1,jEe,4,3,"div"),l(2,"h3"),c(3),p(4,"translate"),r(),l(5,"div",1)(6,"p"),c(7),p(8,"translate"),b(9,"br"),c(10),p(11,"translate"),b(12,"br"),c(13),p(14,"translate"),b(15,"br"),c(16),p(17,"translate"),b(18,"br"),r(),l(19,"p"),c(20),p(21,"translate"),b(22,"br"),c(23),p(24,"translate"),b(25,"br"),c(26),p(27,"translate"),b(28,"br"),r()(),E(29,tIe,18,6),E(30,xIe,1,1),r()),n&2&&(a(),I(i.centerViewData.status.value==="Closed"?1:-1),a(2),h(m(4,18,"labels.heading.Summary Details")),a(4),le(" ",m(8,20,"labels.inputs.Active Clients"),": ",i.centerSummaryData.activeClients),a(3),le(" ",m(11,22,"labels.inputs.Active Group Loans"),": ",i.centerSummaryData.activeGroupLoans),a(3),le(" ",m(14,24,"labels.inputs.Active Client Loans"),": ",i.centerSummaryData.activeClientLoans),a(3),le(" ",m(17,26,"labels.inputs.Active Overdue Group Loans"),": ",i.centerSummaryData.overdueGroupLoans),a(4),le(" ",m(21,28,"labels.inputs.Active Group Borrowers"),": ",i.centerSummaryData.activeGroupBorrowers),a(3),le(" ",m(24,30,"labels.inputs.Active Client Borrowers"),": ",i.centerSummaryData.activeClientBorrowers),a(3),le(" ",m(27,32,"labels.inputs.Active Overdue Client Loans"),": ",i.centerSummaryData.overdueClientLoans),a(3),I(i.groupResourceData.length>0?29:-1),a(),I(i.savingsAccountData!==void 0?30:-1))},dependencies:[ue,co,fe,Ae,ve,_t,It,xt,vt,bt,Ct,yt,si,St,Pt,wt,Tt,Pi,he,go],styles:[".tab-container[_ngcontent-%COMP%]{padding:1%;margin:1%}.tab-container[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{margin:1% auto}.tab-container[_ngcontent-%COMP%] .summary-details-container[_ngcontent-%COMP%]{border:1px solid;padding:1%}.tab-container[_ngcontent-%COMP%] table[_ngcontent-%COMP%]{width:100%}.tab-container[_ngcontent-%COMP%] table[_ngcontent-%COMP%] .account-action-button[_ngcontent-%COMP%]{min-width:26px;padding:0 6px;margin:4px;line-height:25px}.closedCenter[_ngcontent-%COMP%]{text-align:center;color:red;font-size:2rem}"]})}}return e})();var Z2=(()=>{class e{constructor(){this.route=T(Ie),this.authenticationService=T(Wo),this.centersService=T(Jn),this.entityId=this.route.parent.parent.snapshot.params.centerId,this.addNote=this.addNote.bind(this),this.editNote=this.editNote.bind(this),this.deleteNote=this.deleteNote.bind(this)}ngOnInit(){let t=this.authenticationService.getCredentials();this.username=t.username,this.route.data.subscribe(n=>{this.entityNotes=n.centerNotes})}addNote(t){this.centersService.createCenterNote(this.entityId,t).subscribe(n=>{this.entityNotes.push({id:n.resourceId,createdByUsername:this.username,createdOn:new Date,note:t.note})})}editNote(t,n,i){this.centersService.editCenterNote(this.entityId,t,n).subscribe(()=>{this.entityNotes[i].note=n.note})}deleteNote(t,n){this.centersService.deleteCenterNote(this.entityId,t).subscribe(()=>{this.entityNotes.splice(n,1)})}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275cmp=me({type:e,selectors:[["mifosx-notes-tab"]],decls:1,vars:5,consts:[[3,"entityId","entityNotes","callbackAdd","callbackEdit","callbackDelete"]],template:function(n,i){n&1&&b(0,"mifosx-entity-notes-tab",0),n&2&&g("entityId",i.entityId)("entityNotes",i.entityNotes)("callbackAdd",i.addNote)("callbackEdit",i.editNote)("callbackDelete",i.deleteNote)},dependencies:[ue,fe,I0],styles:[".tab-container[_ngcontent-%COMP%]{padding:1%;margin:1%}"]})}}return e})();var ev=(()=>{class e{constructor(){this.route=T(Ie),this.entityId=this.route.parent.parent.snapshot.paramMap.get("centerId"),this.route.data.subscribe(t=>{this.entityDatatable=t.centerDatatable,this.multiRowDatatableFlag=this.entityDatatable.columnHeaders[0].columnName==="id"})}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275cmp=me({type:e,selectors:[["mifosx-datatable-tab"]],decls:2,vars:3,consts:[[1,"tab-container","mat-typography"],["entityType","Center",3,"entityId","multiRowDatatableFlag","entityDatatable"]],template:function(n,i){n&1&&(l(0,"div",0),b(1,"mifosx-entity-datatable-tab",1),r()),n&2&&(a(),g("entityId",i.entityId)("multiRowDatatableFlag",i.multiRowDatatableFlag)("entityDatatable",i.entityDatatable))},dependencies:[ue,fe,Or],encapsulation:2})}}return e})();var bIe=()=>["../general"];function yIe(e,o){e&1&&(l(0,"mat-error"),c(1),p(2,"translate"),p(3,"translate"),l(4,"strong"),c(5),p(6,"translate"),r()()),e&2&&(a(),le(" ",m(2,3,"labels.inputs.Center Name")," ",m(3,5,"labels.commons.is")," "),a(4),h(m(6,7,"labels.commons.required")))}function SIe(e,o){e&1&&(l(0,"mat-error"),c(1),p(2,"translate"),l(3,"strong"),c(4),p(5,"translate"),r(),c(6),p(7,"translate"),r()),e&2&&(a(),v(" ",m(2,3,"labels.inputs.Center Name")," "),a(3),h(m(5,5,"labels.inputs.cannot")),a(2),v(" ",m(7,7,"labels.inputs.begin with a special character or number")," "))}function wIe(e,o){if(e&1&&(l(0,"mat-option",6),c(1),r()),e&2){let t=o.$implicit;g("value",t.id),a(),v(" ",t.displayName," ")}}function PIe(e,o){e&1&&(l(0,"mat-error"),c(1),p(2,"translate"),p(3,"translate"),l(4,"strong"),c(5),p(6,"translate"),r()()),e&2&&(a(),le(" ",m(2,3,"labels.inputs.Activation Date")," ",m(3,5,"labels.commons.is")," "),a(4),h(m(6,7,"labels.commons.required")))}function TIe(e,o){if(e&1){let t=Y();X(0,11),R("click",function(){V(t);let i=xe(8);return q(i.open())}),l(1,"mat-form-field")(2,"mat-label"),c(3),p(4,"translate"),r(),b(5,"input",12)(6,"mat-datepicker-toggle",13)(7,"mat-datepicker",null,0),E(9,PIe,7,9,"mat-error"),r(),Z()}if(e&2){let t=xe(8),n=w();a(3),h(m(4,6,"labels.inputs.Activation Date")),a(2),g("min",n.minDate)("max",n.maxDate)("matDatepicker",t),a(),g("for",t),a(3),I(n.editCenterForm.controls.activationDate.hasError("required")?9:-1)}}var tv=(()=>{class e{constructor(){this.formBuilder=T(nt),this.route=T(Ie),this.router=T(qe),this.centersService=T(Jn),this.settingsService=T(At),this.dateUtils=T(Zt),this.minDate=new Date(2e3,0,1),this.maxDate=new Date,this.route.data.subscribe(t=>{this.centerData=t.centerData,this.staffs=this.centerData.staffOptions})}ngOnInit(){this.maxDate=this.settingsService.businessDate,this.createEditCenterForm()}createEditCenterForm(){let t=this.settingsService.dateFormat;this.editCenterForm=this.formBuilder.group({name:[this.centerData.name,[se.required,se.pattern("(^[A-z]).*")]],staffId:[this.centerData.staffId],externalId:[this.centerData.externalId]}),this.centerData.status.value==="Pending"&&this.editCenterForm.addControl("activationDate",new it(this.centerData.activationDate?this.centerData.activationDate:new Date,se.required))}submit(){let t=this.editCenterForm.value,n=this.settingsService.language.code,i=this.settingsService.dateFormat;if(this.centerData.status.value==="Pending"){let d=this.editCenterForm.value.activationDate;t.activationDate instanceof Date&&(t.activationDate=this.dateUtils.formatDate(d,i))}let s=qt(at({},t),{name:this.centerData.name,dateFormat:i,locale:n});this.centersService.executeEditCenter(this.centerData.id,s).subscribe(()=>{this.router.navigate(["../general"],{relativeTo:this.route})})}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275cmp=me({type:e,selectors:[["mifosx-edit-center"]],decls:32,vars:22,consts:[["activatedOnDatePicker",""],[1,"container"],[3,"ngSubmit","formGroup"],[1,"layout-column"],["matInput","","required","","formControlName","name"],["formControlName","staffId"],[3,"value"],["matInput","","formControlName","externalId"],[1,"layout-row","align-center","gap-5px","responsive-column"],["type","button","mat-raised-button","",3,"routerLink"],["mat-raised-button","","color","primary",3,"disabled"],[3,"click"],["matInput","","required","","formControlName","activationDate",3,"min","max","matDatepicker"],["matSuffix","",3,"for"]],template:function(n,i){n&1&&(l(0,"div",1)(1,"mat-card")(2,"form",2),R("ngSubmit",function(){return i.submit()}),l(3,"mat-card-content")(4,"div",3)(5,"mat-form-field")(6,"mat-label"),c(7),p(8,"translate"),r(),b(9,"input",4),E(10,yIe,7,9,"mat-error"),E(11,SIe,8,9,"mat-error"),r(),l(12,"mat-form-field")(13,"mat-label"),c(14),p(15,"translate"),r(),l(16,"mat-select",5),Se(17,wIe,2,2,"mat-option",6,Pe),r()(),l(19,"mat-form-field")(20,"mat-label"),c(21),p(22,"translate"),r(),b(23,"input",7),r(),E(24,TIe,10,8,"ng-container"),r()(),l(25,"mat-card-actions",8)(26,"button",9),c(27),p(28,"translate"),r(),l(29,"button",10),c(30),p(31,"translate"),r()()()()()),n&2&&(a(2),g("formGroup",i.editCenterForm),a(5),h(m(8,11,"labels.inputs.name")),a(3),I(i.editCenterForm.controls.name.hasError("required")?10:-1),a(),I(i.editCenterForm.controls.name.hasError("pattern")?11:-1),a(3),h(m(15,13,"labels.inputs.Staff")),a(3),we(i.staffs),a(4),h(m(22,15,"labels.inputs.External Id")),a(3),I(i.centerData.status.value==="Pending"?24:-1),a(2),g("routerLink",oe(21,bIe)),a(),v(" ",m(28,17,"labels.buttons.Cancel")," "),a(2),g("disabled",!i.editCenterForm.valid),a(),v(" ",m(31,19,"labels.buttons.Confirm")," "))},dependencies:[ue,fe,tt,st,Ue,Xe,dt,Ze,et,Ae,$e,Je,Et,Fe,Be,ut,ai,ze,gt,ft,mi,di,pi,ve,he],styles:[".container[_ngcontent-%COMP%]{max-width:37rem}"]})}}return e})();var MIe=()=>["../../"];function DIe(e,o){e&1&&(l(0,"mat-error"),c(1),p(2,"translate"),p(3,"translate"),l(4,"strong"),c(5),p(6,"translate"),r()()),e&2&&(a(),le(" ",m(2,3,"labels.inputs.Activated On Date")," ",m(3,5,"labels.commons.is")," "),a(4),h(m(6,7,"labels.commons.required")))}var iv=(()=>{class e{constructor(){this.formBuilder=T(nt),this.centersService=T(Jn),this.settingsService=T(At),this.dateUtils=T(Zt),this.route=T(Ie),this.router=T(qe),this.minDate=new Date(2e3,0,1),this.maxDate=new Date,this.centerId=this.route.parent.snapshot.params.centerId}ngOnInit(){this.maxDate=this.settingsService.businessDate,this.createActivateCenterForm()}createActivateCenterForm(){this.activateCenterForm=this.formBuilder.group({activationDate:[new Date,se.required]})}submit(){let t=this.activateCenterForm.value,n=this.settingsService.language.code,i=this.settingsService.dateFormat,s=this.activateCenterForm.value.activationDate;t.activationDate instanceof Date&&(t.activationDate=this.dateUtils.formatDate(s,i));let d=qt(at({},t),{dateFormat:i,locale:n});this.centersService.executeCenterActionCommand(this.centerId,"activate",d).subscribe(()=>{this.router.navigate(["../../"],{relativeTo:this.route})})}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275cmp=me({type:e,selectors:[["mifosx-activate-center"]],decls:20,vars:18,consts:[["activationDatePicker",""],[1,"container"],[3,"ngSubmit","formGroup"],[1,"flex-fill",3,"click"],["matInput","","required","","formControlName","activationDate",3,"min","max","matDatepicker"],["matSuffix","",3,"for"],[1,"layout-row","align-center","gap-5px","responsive-column"],["type","button","mat-raised-button","",3,"routerLink"],["mat-raised-button","","color","primary",3,"disabled"]],template:function(n,i){if(n&1){let s=Y();l(0,"div",1)(1,"mat-card")(2,"form",2),R("ngSubmit",function(){return V(s),q(i.submit())}),l(3,"mat-card-content")(4,"mat-form-field",3),R("click",function(){V(s);let u=xe(11);return q(u.open())}),l(5,"mat-label"),c(6),p(7,"translate"),r(),b(8,"input",4)(9,"mat-datepicker-toggle",5)(10,"mat-datepicker",null,0),E(12,DIe,7,9,"mat-error"),r()(),l(13,"mat-card-actions",6)(14,"button",7),c(15),p(16,"translate"),r(),l(17,"button",8),c(18),p(19,"translate"),r()()()()()}if(n&2){let s=xe(11);a(2),g("formGroup",i.activateCenterForm),a(4),h(m(7,11,"labels.inputs.Activated On Date")),a(2),g("min",i.minDate)("max",i.maxDate)("matDatepicker",s),a(),g("for",s),a(3),I(i.activateCenterForm.controls.activationDate.hasError("required")?12:-1),a(2),g("routerLink",oe(17,MIe)),a(),v(" ",m(16,13,"labels.buttons.Cancel")," "),a(2),g("disabled",!i.activateCenterForm.valid),a(),v(" ",m(19,15,"labels.buttons.Confirm")," ")}},dependencies:[ue,fe,tt,st,Ue,Xe,dt,Ze,et,Ae,$e,Je,Et,Fe,Be,ut,ai,ze,mi,di,pi,ve,he],styles:[".container[_ngcontent-%COMP%]{max-width:37rem}"]})}}return e})();var EIe=()=>["../../"];function IIe(e,o){if(e&1&&(l(0,"mat-option",5),c(1),r()),e&2){let t=o.$implicit;g("value",t.id),a(),v(" ",t.displayName," ")}}function OIe(e,o){e&1&&(l(0,"mat-error"),c(1),p(2,"translate"),p(3,"translate"),l(4,"strong"),c(5),p(6,"translate"),r()()),e&2&&(a(),le(" ",m(2,3,"labels.inputs.Staff")," ",m(3,5,"labels.commons.is")," "),a(4),h(m(6,7,"labels.commons.required")))}var nv=(()=>{class e{constructor(){this.formBuilder=T(nt),this.centersService=T(Jn),this.route=T(Ie),this.router=T(qe),this.route.data.subscribe(t=>{this.centerData=t.centersActionData})}ngOnInit(){this.staffData=this.centerData.staffOptions,this.createCenterAssignStaffForm()}createCenterAssignStaffForm(){this.centerAssignStaffForm=this.formBuilder.group({staffId:[""]})}submit(){this.centersService.executeGroupActionCommand(this.centerData.id,"assignStaff",this.centerAssignStaffForm.value).subscribe(()=>{this.router.navigate(["../../"],{relativeTo:this.route})})}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275cmp=me({type:e,selectors:[["mifosx-center-assign-staff"]],decls:20,vars:14,consts:[[1,"container"],[3,"ngSubmit","formGroup"],[1,"layout-column"],[1,"flex-48"],["formControlName","staffId"],[3,"value"],[1,"layout-row","align-center","gap-5px","responsive-column"],["type","button","mat-raised-button","",3,"routerLink"],["mat-raised-button","","color","primary",3,"disabled"]],template:function(n,i){n&1&&(l(0,"div",0)(1,"mat-card")(2,"form",1),R("ngSubmit",function(){return i.submit()}),l(3,"mat-card-content")(4,"div",2)(5,"mat-form-field",3)(6,"mat-label"),c(7),p(8,"translate"),r(),l(9,"mat-select",4),Se(10,IIe,2,2,"mat-option",5,Pe),r(),E(12,OIe,7,9,"mat-error"),r()()(),l(13,"mat-card-actions",6)(14,"button",7),c(15),p(16,"translate"),r(),l(17,"button",8),c(18),p(19,"translate"),r()()()()()),n&2&&(a(2),g("formGroup",i.centerAssignStaffForm),a(5),h(m(8,7,"labels.inputs.Staff")),a(3),we(i.staffData),a(2),I(i.centerAssignStaffForm.controls.staffId.hasError("required")?12:-1),a(2),g("routerLink",oe(13,EIe)),a(),v(" ",m(16,9,"labels.buttons.Cancel")," "),a(2),g("disabled",!i.centerAssignStaffForm.valid),a(),v(" ",m(19,11,"labels.buttons.Confirm")," "))},dependencies:[ue,fe,tt,Ue,Xe,Ze,et,Ae,$e,Je,Et,Fe,Be,ut,gt,ft,ve,he],styles:[".container[_ngcontent-%COMP%]{max-width:37rem}"]})}}return e})();var AIe=()=>["../../"];function FIe(e,o){e&1&&(l(0,"mat-error"),c(1),p(2,"translate"),p(3,"translate"),l(4,"strong"),c(5),p(6,"translate"),r()()),e&2&&(a(),le(" ",m(2,3,"labels.inputs.Closed On Date")," ",m(3,5,"labels.commons.is")," "),a(4),h(m(6,7,"labels.commons.required")))}function kIe(e,o){if(e&1&&(l(0,"mat-option",9),c(1),r()),e&2){let t=o.$implicit;g("value",t.id),a(),v(" ",t.name," ")}}function BIe(e,o){e&1&&(l(0,"mat-error"),c(1),p(2,"translate"),p(3,"translate"),l(4,"strong"),c(5),p(6,"translate"),r()()),e&2&&(a(),le(" ",m(2,3,"labels.inputs.Closure Reason")," ",m(3,5,"labels.commons.is")," "),a(4),h(m(6,7,"labels.commons.required")))}function RIe(e,o){if(e&1&&(l(0,"button",13),c(1),p(2,"translate"),r()),e&2){let t=w();g("disabled",!t.closeCenterForm.valid),a(),v(" ",m(2,2,"labels.buttons.Confirm")," ")}}var ov=(()=>{class e{constructor(){this.formBuilder=T(nt),this.centersService=T(Jn),this.settingsService=T(At),this.dateUtils=T(Zt),this.route=T(Ie),this.router=T(qe),this.minDate=new Date(2e3,0,1),this.maxDate=new Date,this.route.data.subscribe(t=>{this.closureData=t.centeractionData.closureReasons}),this.centerId=this.route.parent.snapshot.params.centerId}ngOnInit(){this.maxDate=this.settingsService.businessDate,this.createCloseCenterForm()}createCloseCenterForm(){this.closeCenterForm=this.formBuilder.group({closureDate:["",se.required],closureReasonId:["",se.required]})}submit(){let t=this.closeCenterForm.value,n=this.settingsService.language.code,i=this.settingsService.dateFormat,s=this.closeCenterForm.value.closureDate;t.closureDate instanceof Date&&(t.closureDate=this.dateUtils.formatDate(s,i));let d=qt(at({},t),{dateFormat:i,locale:n});this.centersService.executeCenterActionCommand(this.centerId,"close",d).subscribe(()=>{this.router.navigate(["../../"],{relativeTo:this.route})})}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275cmp=me({type:e,selectors:[["mifosx-close-center"]],decls:27,vars:19,consts:[["closureDatePicker",""],[1,"container"],[3,"ngSubmit","formGroup"],[1,"layout-column"],[3,"click"],["matInput","","required","","formControlName","closureDate",3,"min","max","matDatepicker"],["matSuffix","",3,"for"],[1,"flex-48"],["formControlName","closureReasonId"],[3,"value"],[1,"layout-row","align-center","gap-5px","responsive-column"],["type","button","mat-raised-button","",3,"routerLink"],["mat-raised-button","","color","warn",3,"disabled",4,"mifosxHasPermission"],["mat-raised-button","","color","warn",3,"disabled"]],template:function(n,i){if(n&1){let s=Y();l(0,"div",1)(1,"mat-card")(2,"form",2),R("ngSubmit",function(){return V(s),q(i.submit())}),l(3,"mat-card-content")(4,"div",3)(5,"mat-form-field",4),R("click",function(){V(s);let u=xe(12);return q(u.open())}),l(6,"mat-label"),c(7),p(8,"translate"),r(),b(9,"input",5)(10,"mat-datepicker-toggle",6)(11,"mat-datepicker",null,0),E(13,FIe,7,9,"mat-error"),r(),l(14,"mat-form-field",7)(15,"mat-label"),c(16),p(17,"translate"),r(),l(18,"mat-select",8),Se(19,kIe,2,2,"mat-option",9,Pe),r(),E(21,BIe,7,9,"mat-error"),r()()(),l(22,"mat-card-actions",10)(23,"button",11),c(24),p(25,"translate"),r(),F(26,RIe,3,4,"button",12),r()()()()}if(n&2){let s=xe(12);a(2),g("formGroup",i.closeCenterForm),a(5),h(m(8,12,"labels.inputs.Closed On Date")),a(2),g("min",i.minDate)("max",i.maxDate)("matDatepicker",s),a(),g("for",s),a(3),I(i.closeCenterForm.controls.closureDate.hasError("required")?13:-1),a(3),h(m(17,14,"labels.inputs.Closure Reason")),a(3),we(i.closureData),a(2),I(i.closeCenterForm.controls.closureReasonId.hasError("required")?21:-1),a(2),g("routerLink",oe(18,AIe)),a(),v(" ",m(25,16,"labels.buttons.Cancel")," "),a(2),g("mifosxHasPermission","CLOSE_CENTER")}},dependencies:[ue,fe,tt,st,Ue,Xe,dt,Ze,et,Ae,$e,Je,Et,Fe,Be,ut,ai,ze,gt,ft,mi,di,pi,ve,Ke,he],styles:[".container[_ngcontent-%COMP%]{max-width:37rem}"]})}}return e})();var NIe=()=>["../../"];function LIe(e,o){if(e&1&&(l(0,"mat-option",16),c(1),p(2,"dateFormat"),r()),e&2){let t=o.$implicit;g("value",t),a(),v(" ",m(2,2,t)," ")}}function VIe(e,o){e&1&&(l(0,"th",17),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.name")))}function qIe(e,o){if(e&1&&(l(0,"td",18),c(1),p(2,"find"),r()),e&2){let t=o.$implicit,n=w();a(),h($t(2,1,t.clientId,n.membersData,"id","displayName"))}}function zIe(e,o){e&1&&(l(0,"th",17),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.Attendance")))}function HIe(e,o){e&1&&(l(0,"span"),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.Present")))}function GIe(e,o){e&1&&(l(0,"span"),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.Absent")))}function jIe(e,o){e&1&&(l(0,"span"),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.Approved")))}function $Ie(e,o){e&1&&(l(0,"span"),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.Leave")))}function UIe(e,o){e&1&&(l(0,"span"),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.Late")))}function WIe(e,o){if(e&1){let t=Y();l(0,"td",19),F(1,HIe,3,3,"span",20)(2,GIe,3,3,"span",20)(3,jIe,3,3,"span",20)(4,$Ie,3,3,"span",20)(5,UIe,3,3,"span",20),l(6,"button",21),R("click",function(){let i=V(t).$implicit,s=w();return q(s.editAttendance(i))}),b(7,"fa-icon",22),r()()}if(e&2){let t=o.$implicit;g("ngSwitch",t.attendanceType),a(),g("ngSwitchCase",1),a(),g("ngSwitchCase",2),a(),g("ngSwitchCase",3),a(),g("ngSwitchCase",4),a(),g("ngSwitchCase",5)}}function QIe(e,o){e&1&&b(0,"tr",23)}function YIe(e,o){e&1&&b(0,"tr",24)}function JIe(e,o){if(e&1){let t=Y();l(0,"button",25),R("click",function(){V(t);let i=w();return q(i.submit())}),c(1),p(2,"translate"),r()}e&2&&(a(),v(" ",m(2,1,"labels.buttons.Confirm")," "))}var av=(()=>{class e{constructor(){this.route=T(Ie),this.dateUtils=T(Zt),this.router=T(qe),this.centersService=T(Jn),this.settingsService=T(At),this.dialog=T(Ht),this.translateService=T(yi),this.displayedColumns=["name","attendance"],this.meetingDate=new it,this.dataSource=[],this.minDate=new Date(2e3,0,1),this.maxDate=new Date,this.route.data.subscribe(t=>{this.centerData=t.centersActionData,this.membersData=t.centersActionData.clients})}ngOnInit(){this.maxDate=this.settingsService.businessDate,this.membersData!==void 0&&this.membersData!==null&&(this.dataSource=this.membersData.map(t=>({clientId:t.id,attendanceType:1}))),this.meetingDates=this.centerData.collectionMeetingCalendar.recurringDates.filter(t=>new Date(t).getTime(){this.attendanceTypeOptions=t.attendanceTypeOptions})}editAttendance(t){let n=[new $i({controlName:"attendanceType",label:this.translateService.instant("labels.buttons.Attendance"),value:t.attendanceType,options:{label:"value",value:"id",data:this.attendanceTypeOptions},required:!1})],i={title:this.translateService.instant("labels.buttons.Assign Member")+" "+this.translateService.instant("labels.buttons.Attendance"),layout:{addButtonText:"Confirm"},formfields:n};this.dialog.open(an,{data:i}).afterClosed().subscribe(d=>{if(d.data){let u=at(at({},t),d.data.value);this.dataSource.splice(this.dataSource.indexOf(t),1,u),this.dataSource=this.dataSource.concat([])}})}submit(){let t=this.settingsService.language.code,n=this.settingsService.dateFormat,i=new Date(this.meetingDate.value),s={meetingDate:this.dateUtils.formatDate(this.meetingDate.value,n),calendarId:this.centerData.collectionMeetingCalendar.id,clientsAttendance:this.dataSource,dateFormat:n,locale:t};this.centersService.assignCenterAttendance(this.centerData.id,this.centerData.collectionMeetingCalendar.id,s).subscribe(()=>{this.router.navigate(["../../"],{relativeTo:this.route})})}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275cmp=me({type:e,selectors:[["mifosx-center-attendance"]],decls:26,vars:20,consts:[[1,"container"],[1,"layout-column","gap-3percent"],[1,"flex-fill"],[3,"formControl"],[3,"value",4,"ngFor","ngForOf"],["mat-table","",1,"mat-elevation-z1",3,"dataSource"],["matColumnDef","name"],["mat-header-cell","",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","attendance"],["mat-cell","",3,"ngSwitch",4,"matCellDef"],["mat-header-row","",4,"matHeaderRowDef"],["mat-row","",4,"matRowDef","matRowDefColumns"],[1,"layout-row","align-center","gap-5px","responsive-column"],["type","button","mat-raised-button","",3,"routerLink"],["mat-raised-button","","color","primary",3,"click",4,"mifosxHasPermission"],[3,"value"],["mat-header-cell",""],["mat-cell",""],["mat-cell","",3,"ngSwitch"],[4,"ngSwitchCase"],["mat-icon-button","","color","primary",3,"click"],["icon","pen"],["mat-header-row",""],["mat-row",""],["mat-raised-button","","color","primary",3,"click"]],template:function(n,i){n&1&&(l(0,"div",0)(1,"mat-card",1)(2,"mat-form-field",2)(3,"mat-label"),c(4),p(5,"translate"),r(),l(6,"mat-select",3),F(7,LIe,3,4,"mat-option",4),r(),l(8,"mat-hint"),c(9),p(10,"translate"),p(11,"dateFormat"),r()(),l(12,"table",5),X(13,6),F(14,VIe,3,3,"th",7)(15,qIe,3,6,"td",8),Z(),X(16,9),F(17,zIe,3,3,"th",7)(18,WIe,8,6,"td",10),Z(),F(19,QIe,1,0,"tr",11)(20,YIe,1,0,"tr",12),r(),l(21,"mat-card-actions",13)(22,"button",14),c(23),p(24,"translate"),r(),F(25,JIe,3,3,"button",15),r()()()),n&2&&(a(4),h(m(5,11,"labels.inputs.Meeting Date")),a(2),g("formControl",i.meetingDate),a(),g("ngForOf",i.meetingDates),a(2),le("",m(10,13,"labels.inputs.Next Meeting on"),": ",m(11,15,i.centerData.collectionMeetingCalendar.nextTenRecurringDates[0])),a(3),g("dataSource",i.dataSource),a(7),g("matHeaderRowDef",i.displayedColumns),a(),g("matRowDefColumns",i.displayedColumns),a(2),g("routerLink",oe(19,NIe)),a(),v(" ",m(24,17,"labels.buttons.Cancel")," "),a(2),g("mifosxHasPermission","CREATE_MEETING"))},dependencies:[ue,is,Ks,Xs,fe,Ue,_n,Ae,$e,Et,Fe,Be,za,gt,ft,ve,Ke,_t,xt,vt,bt,Ct,yt,wi,ke,St,Pt,wt,Tt,Pi,he,Qn],styles:[".container[_ngcontent-%COMP%]{max-width:37rem}"]})}}return e})();var KIe=()=>["../../"];function XIe(e,o){e&1&&(l(0,"mat-error"),c(1),p(2,"translate"),p(3,"translate"),l(4,"strong"),c(5),p(6,"translate"),r()()),e&2&&(a(),le(" ",m(2,3,"labels.inputs.Start Date")," ",m(3,5,"labels.commons.is")," "),a(4),h(m(6,7,"labels.commons.required")))}function ZIe(e,o){if(e&1&&(l(0,"mat-option",12),c(1),r()),e&2){let t=o.$implicit;g("value",t.id),a(),v(" ",t.value," ")}}function e6e(e,o){e&1&&(l(0,"mat-error"),c(1),p(2,"translate"),p(3,"translate"),l(4,"strong"),c(5),p(6,"translate"),r()()),e&2&&(a(),le(" ",m(2,3,"labels.inputs.Repetition Frequency")," ",m(3,5,"labels.commons.is")," "),a(4),h(m(6,7,"labels.commons.required")))}function t6e(e,o){if(e&1&&(l(0,"mat-form-field")(1,"mat-label"),c(2),p(3,"translate"),r(),l(4,"mat-select",11),Se(5,ZIe,2,2,"mat-option",12,Pe),r(),E(7,e6e,7,9,"mat-error"),r()),e&2){let t=w();a(2),h(m(3,2,"labels.inputs.Repetition Frequency")),a(3),we(t.frequencyOptions),a(2),I(t.centerMeetingForm.controls.frequency.hasError("repeatsOnDay")?7:-1)}}function i6e(e,o){if(e&1&&(l(0,"mat-option",12),c(1),r()),e&2){let t=o.$implicit;g("value",t),a(),v(" ",t," ")}}function n6e(e,o){e&1&&(l(0,"mat-error"),c(1),p(2,"translate"),p(3,"translate"),l(4,"strong"),c(5),p(6,"translate"),r()()),e&2&&(a(),le(" ",m(2,3,"labels.inputs.Repetition Interval")," ",m(3,5,"labels.commons.is")," "),a(4),h(m(6,7,"labels.commons.required")))}function o6e(e,o){if(e&1&&(l(0,"mat-form-field")(1,"mat-label"),c(2),p(3,"translate"),r(),l(4,"mat-select",13),Se(5,i6e,2,2,"mat-option",12,Pe),r(),E(7,n6e,7,9,"mat-error"),r()),e&2){let t=w();a(2),h(m(3,2,"labels.inputs.Repetition Interval")),a(3),we(t.repetitionIntervals),a(2),I(t.centerMeetingForm.controls.interval.hasError("repeatsOnDay")?7:-1)}}function a6e(e,o){if(e&1&&(l(0,"mat-option",12),c(1),r()),e&2){let t=o.$implicit;g("value",t.id),a(),v(" ",t.value," ")}}function r6e(e,o){e&1&&(l(0,"mat-error"),c(1),p(2,"translate"),l(3,"strong"),c(4),p(5,"translate"),r(),c(6),p(7,"translate"),r()),e&2&&(a(),v(" ",m(2,3,"labels.inputs.At least")," "),a(3),h(m(5,5,"labels.inputs.one")),a(2),v(" ",m(7,7,"labels.inputs.day must be selected")," "))}function l6e(e,o){if(e&1&&(l(0,"mat-form-field")(1,"mat-label"),c(2),p(3,"translate"),r(),l(4,"mat-select",14),Se(5,a6e,2,2,"mat-option",12,Pe),r(),E(7,r6e,8,9,"mat-error"),r()),e&2){let t=w();a(2),h(m(3,2,"labels.inputs.Repeats on Day")),a(3),we(t.repeatsOnDays),a(2),I(t.centerMeetingForm.controls.repeatsOnDay.hasError("repeatsOnDay")?7:-1)}}var rv=(()=>{class e{constructor(){this.formBuilder=T(nt),this.centersService=T(Jn),this.settingsService=T(At),this.dateUtils=T(Zt),this.route=T(Ie),this.router=T(qe),this.minDate=new Date(2e3,0,1),this.maxDate=new Date,this.route.data.subscribe(t=>{this.calendarTemplate=t.centersActionData,this.frequencyOptions=this.calendarTemplate.frequencyOptions,this.repeatsOnDays=this.calendarTemplate.repeatsOnDayOptions}),this.centerId=this.route.parent.snapshot.params.centerId}ngOnInit(){this.maxDate=this.settingsService.businessDate,this.createCenterMeetingForm(),this.buildDependencies()}createCenterMeetingForm(){this.centerMeetingForm=this.formBuilder.group({startDate:["",se.required],repeating:[!1]})}buildDependencies(){this.centerMeetingForm.get("repeating").valueChanges.subscribe(t=>{t?(this.centerMeetingForm.addControl("frequency",new it),this.centerMeetingForm.addControl("interval",new it),this.centerMeetingForm.get("frequency").valueChanges.subscribe(n=>{switch(this.centerMeetingForm.removeControl("repeatsOnDay"),n){case 1:this.repetitionIntervals=["1","2","3"];break;case 2:this.repetitionIntervals=["1","2","3"],this.centerMeetingForm.addControl("repeatsOnDay",new it("",se.required));break;case 3:this.repetitionIntervals=["1","2","3","4","5","6","7","8","9","10","11"];break;case 4:this.repetitionIntervals=["1","2","3","4","5"];break}}),this.centerMeetingForm.patchValue({frequency:1,interval:"1"})):(this.centerMeetingForm.removeControl("frequency"),this.centerMeetingForm.removeControl("interval"))})}submit(){let t=this.centerMeetingForm.value,n=this.settingsService.language.code,i=this.settingsService.dateFormat,s=`centers_${this.centerId}_CollectionMeeting`,d="1",u=this.centerMeetingForm.value.startDate;t.startDate instanceof Date&&(t.startDate=this.dateUtils.formatDate(u,i));let f=qt(at({},t),{title:s,typeId:d,dateFormat:i,locale:n});this.centersService.createCenterMeeting(this.centerId,f).subscribe(_=>{this.router.navigate(["../../general"],{relativeTo:this.route})})}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275cmp=me({type:e,selectors:[["mifosx-attach-center-meeting"]],decls:27,vars:24,consts:[["startDatePicker",""],[1,"container"],[3,"formGroup"],[1,"layout-column"],[3,"click"],["matInput","","required","","formControlName","startDate",3,"min","max","matDatepicker"],["matSuffix","",3,"for"],["labelPosition","before","formControlName","repeating",1,"m-t-10","m-b-10"],[1,"layout-row","align-center","gap-5px","responsive-column"],["type","button","mat-raised-button","",3,"routerLink"],["mat-raised-button","","color","primary",3,"click","disabled"],["formControlName","frequency"],[3,"value"],["formControlName","interval"],["formControlName","repeatsOnDay","required",""]],template:function(n,i){if(n&1){let s=Y();l(0,"div",1)(1,"mat-card")(2,"form",2)(3,"mat-card-content")(4,"div",3)(5,"mat-form-field",4),R("click",function(){V(s);let u=xe(12);return q(u.open())}),l(6,"mat-label"),c(7),p(8,"translate"),r(),b(9,"input",5)(10,"mat-datepicker-toggle",6)(11,"mat-datepicker",null,0),E(13,XIe,7,9,"mat-error"),r(),l(14,"mat-checkbox",7),c(15),p(16,"translate"),r(),E(17,t6e,8,4,"mat-form-field"),E(18,o6e,8,4,"mat-form-field"),E(19,l6e,8,4,"mat-form-field"),r()(),l(20,"mat-card-actions",8)(21,"button",9),c(22),p(23,"translate"),r(),l(24,"button",10),R("click",function(){return V(s),q(i.submit())}),c(25),p(26,"translate"),r()()()()()}if(n&2){let s=xe(12);a(2),g("formGroup",i.centerMeetingForm),a(5),h(m(8,15,"labels.inputs.Meeting Start Date")),a(2),g("min",i.minDate)("max",i.maxDate)("matDatepicker",s),a(),g("for",s),a(3),I(i.centerMeetingForm.controls.startDate.hasError("required")?13:-1),a(2),v(" ",m(16,17,"labels.inputs.Repeats?")," "),a(2),I(i.centerMeetingForm.contains("frequency")?17:-1),a(),I(i.centerMeetingForm.contains("interval")?18:-1),a(),I(i.centerMeetingForm.contains("repeatsOnDay")?19:-1),a(2),g("routerLink",oe(23,KIe)),a(),v(" ",m(23,19,"labels.buttons.Cancel")," "),a(2),g("disabled",!i.centerMeetingForm.valid),a(),v(" ",m(26,21,"labels.buttons.Submit")," ")}},dependencies:[ue,fe,tt,st,Ue,Xe,dt,Ze,et,Ae,$e,Je,Et,Fe,Be,ut,ai,ze,gt,ft,mi,di,pi,ve,fi,he],styles:[".container[_ngcontent-%COMP%]{max-width:37rem}"]})}}return e})();var s6e=()=>["../../"];function c6e(e,o){if(e&1&&(l(0,"mat-option",8),c(1),r()),e&2){let t=o.$implicit;g("value",t.id),a(),v(" ",t.value," ")}}function p6e(e,o){e&1&&(l(0,"mat-error"),c(1),p(2,"translate"),p(3,"translate"),l(4,"strong"),c(5),p(6,"translate"),r()()),e&2&&(a(),le(" ",m(2,3,"labels.inputs.Repetition Frequency")," ",m(3,5,"labels.commons.is")," "),a(4),h(m(6,7,"labels.commons.required")))}function m6e(e,o){if(e&1&&(l(0,"mat-option",8),c(1),r()),e&2){let t=o.$implicit;g("value",t),a(),v(" ",t," ")}}function d6e(e,o){e&1&&(l(0,"mat-error"),c(1),p(2,"translate"),p(3,"translate"),l(4,"strong"),c(5),p(6,"translate"),r()()),e&2&&(a(),le(" ",m(2,3,"labels.inputs.Repetition Interval")," ",m(3,5,"labels.commons.is")," "),a(4),h(m(6,7,"labels.commons.required")))}function u6e(e,o){if(e&1&&(l(0,"mat-option",8),c(1),r()),e&2){let t=o.$implicit;g("value",t.id),a(),v(" ",t.value," ")}}function f6e(e,o){e&1&&(l(0,"mat-error"),c(1),p(2,"translate"),l(3,"strong"),c(4),p(5,"translate"),r(),c(6),p(7,"translate"),r()),e&2&&(a(),v(" ",m(2,3,"labels.inputs.At least")," "),a(3),h(m(5,5,"labels.inputs.one")),a(2),v(" ",m(7,7,"labels.inputs.day must be selected")," "))}function h6e(e,o){if(e&1&&(l(0,"mat-form-field")(1,"mat-label"),c(2),p(3,"translate"),r(),l(4,"mat-select",16),Se(5,u6e,2,2,"mat-option",8,Pe),r(),E(7,f6e,8,9,"mat-error"),r()),e&2){let t=w();a(2),h(m(3,2,"labels.inputs.Repeats on Day")),a(3),we(t.repeatsOnDays),a(2),I(t.centerEditMeetingForm.controls.repeatsOnDay.hasError("repeatsOnDay")?7:-1)}}function g6e(e,o){e&1&&(l(0,"mat-error"),c(1),p(2,"translate"),p(3,"translate"),l(4,"strong"),c(5),p(6,"translate"),r()()),e&2&&(a(),le(" ",m(2,3,"labels.inputs.Changes Affection Date")," ",m(3,5,"labels.commons.is")," "),a(4),h(m(6,7,"labels.commons.required")))}var lv=(()=>{class e{constructor(){this.formBuilder=T(nt),this.centersService=T(Jn),this.settingsService=T(At),this.dateUtils=T(Zt),this.route=T(Ie),this.router=T(qe),this.minDate=new Date(2e3,0,1),this.maxDate=new Date,this.route.data.subscribe(t=>{this.calendarTemplate=t.centersActionData,this.frequencyOptions=this.calendarTemplate.frequencyOptions,this.repeatsOnDays=this.calendarTemplate.repeatsOnDayOptions}),this.calendarId=this.route.snapshot.queryParams.calendarId,this.centerId=this.route.parent.snapshot.params.centerId}ngOnInit(){this.maxDate=this.settingsService.businessDate,this.createEditCenterMeetingForm(),this.buildDependencies()}createEditCenterMeetingForm(){this.centerEditMeetingForm=this.formBuilder.group({startDate:["",se.required],frequency:["",se.required],interval:["",se.required]})}buildDependencies(){this.centerEditMeetingForm.get("frequency").valueChanges.subscribe(t=>{switch(this.centerEditMeetingForm.removeControl("repeatsOnDay"),t){case 1:this.repetitionIntervals=["1","2","3"];break;case 2:this.repetitionIntervals=["1","2","3"],this.centerEditMeetingForm.addControl("repeatsOnDay",new it("",se.required)),this.centerEditMeetingForm.get("repeatsOnDay").patchValue(this.calendarTemplate.repeatsOnDay.id);break;case 3:this.repetitionIntervals=["1","2","3","4","5","6","7","8","9","10","11"];break;case 4:this.repetitionIntervals=["1","2","3","4","5"];break}}),this.centerEditMeetingForm.patchValue({startDate:this.calendarTemplate.startDate&&new Date(this.calendarTemplate.startDate),frequency:this.calendarTemplate.frequency.id,interval:`${this.calendarTemplate.interval}`})}editSchedule(){let t={calendarId:this.calendarId};this.router.navigate(["../Edit Meeting Schedule"],{relativeTo:this.route,queryParams:t})}submit(){let t=this.centerEditMeetingForm.value,n=this.settingsService.language.code,i=this.settingsService.dateFormat,s=`centers_${this.centerId}_CollectionMeeting`,d="1",u=this.centerEditMeetingForm.value.startDate;t.startDate instanceof Date&&(t.startDate=this.dateUtils.formatDate(u,i));let f=qt(at({},t),{repeating:!0,title:s,typeId:d,dateFormat:i,locale:n});this.centersService.updateCenterMeeting(this.centerId,f,this.calendarId).subscribe(_=>{this.router.navigate(["../../"],{relativeTo:this.route})})}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275cmp=me({type:e,selectors:[["mifosx-edit-center-meeting"]],decls:46,vars:33,consts:[["startDatePicker",""],[1,"container","m-b-20","layout-row","align-end"],["mat-raised-button","","color","primary",3,"click"],["icon","edit",1,"m-r-10"],[1,"container"],[3,"formGroup"],[1,"layout-column"],["formControlName","frequency"],[3,"value"],["formControlName","interval"],[1,"m-b-5",3,"click"],["matInput","","required","","formControlName","startDate",3,"min","max","matDatepicker"],["matSuffix","",3,"for"],[1,"layout-row","align-center","gap-5px","responsive-column"],["type","button","mat-raised-button","",3,"routerLink"],["mat-raised-button","","color","primary",3,"click","disabled"],["formControlName","repeatsOnDay","required",""]],template:function(n,i){if(n&1){let s=Y();l(0,"div",1)(1,"button",2),R("click",function(){return V(s),q(i.editSchedule())}),b(2,"fa-icon",3),c(3),p(4,"translate"),r()(),l(5,"div",4)(6,"mat-card")(7,"form",5)(8,"mat-card-content")(9,"div",6)(10,"mat-form-field")(11,"mat-label"),c(12),p(13,"translate"),r(),l(14,"mat-select",7),Se(15,c6e,2,2,"mat-option",8,Pe),r(),E(17,p6e,7,9,"mat-error"),r(),l(18,"mat-form-field")(19,"mat-label"),c(20),p(21,"translate"),r(),l(22,"mat-select",9),Se(23,m6e,2,2,"mat-option",8,Pe),r(),E(25,d6e,7,9,"mat-error"),r(),E(26,h6e,8,4,"mat-form-field"),l(27,"mat-form-field",10),R("click",function(){V(s);let u=xe(34);return q(u.open())}),l(28,"mat-label"),c(29),p(30,"translate"),r(),b(31,"input",11)(32,"mat-datepicker-toggle",12)(33,"mat-datepicker",null,0),E(35,g6e,7,9,"mat-error"),l(36,"mat-hint"),c(37),p(38,"translate"),r()()()(),l(39,"mat-card-actions",13)(40,"button",14),c(41),p(42,"translate"),r(),l(43,"button",15),R("click",function(){return V(s),q(i.submit())}),c(44),p(45,"translate"),r()()()()()}if(n&2){let s=xe(34);a(3),v(" ",m(4,18,"labels.buttons.Edit Schedule")," "),a(4),g("formGroup",i.centerEditMeetingForm),a(5),h(m(13,20,"labels.inputs.Repetition Frequency")),a(3),we(i.frequencyOptions),a(2),I(i.centerEditMeetingForm.controls.frequency.hasError("repeatsOnDay")?17:-1),a(3),h(m(21,22,"labels.inputs.Repetition Interval")),a(3),we(i.repetitionIntervals),a(2),I(i.centerEditMeetingForm.controls.interval.hasError("repeatsOnDay")?25:-1),a(),I(i.centerEditMeetingForm.contains("repeatsOnDay")?26:-1),a(3),h(m(30,24,"labels.inputs.Above Changes are Effective from")),a(2),g("min",i.minDate)("max",i.maxDate)("matDatepicker",s),a(),g("for",s),a(3),I(i.centerEditMeetingForm.controls.startDate.hasError("required")?35:-1),a(2),v(" ",m(38,26,"labels.text.Repeats' and 'Repeats every")," "),a(3),g("routerLink",oe(32,s6e)),a(),v(" ",m(42,28,"labels.buttons.Cancel")," "),a(2),g("disabled",!i.centerEditMeetingForm.valid),a(),v(" ",m(45,30,"labels.buttons.Submit")," ")}},dependencies:[ue,fe,tt,st,Ue,Xe,dt,Ze,et,Ae,$e,Je,Et,Fe,Be,ut,ai,za,ze,gt,ft,mi,di,pi,ve,ke,he],styles:[".container[_ngcontent-%COMP%]{max-width:37rem}"]})}}return e})();var _6e=()=>["../../"];function C6e(e,o){if(e&1&&(l(0,"mat-option",5),c(1),p(2,"dateFormat"),r()),e&2){let t=o.$implicit;g("value",t),a(),v(" ",m(2,2,t)," ")}}function v6e(e,o){e&1&&(l(0,"mat-error"),c(1),p(2,"translate"),p(3,"translate"),l(4,"strong"),c(5),p(6,"translate"),r()()),e&2&&(a(),le(" ",m(2,3,"labels.inputs.Existing Meeting Date")," ",m(3,5,"labels.commons.is")," "),a(4),h(m(6,7,"labels.commons.required")))}function x6e(e,o){e&1&&(l(0,"mat-error"),c(1),p(2,"translate"),p(3,"translate"),l(4,"strong"),c(5),p(6,"translate"),r()()),e&2&&(a(),le(" ",m(2,3,"labels.inputs.Revised Meeting Date")," ",m(3,5,"labels.commons.is")," "),a(4),h(m(6,7,"labels.commons.required")))}var sv=(()=>{class e{constructor(){this.formBuilder=T(nt),this.centersService=T(Jn),this.settingsService=T(At),this.dateUtils=T(Zt),this.route=T(Ie),this.router=T(qe),this.minDate=new Date(2e3,0,1),this.maxDate=new Date,this.route.data.subscribe(t=>{this.calendarTemplate=t.centersActionData,this.nextMeetingDates=this.calendarTemplate.nextTenRecurringDates}),this.calendarId=this.route.snapshot.queryParams.calendarId,this.centerId=this.route.parent.snapshot.params.centerId}ngOnInit(){this.maxDate=this.settingsService.businessDate,this.createEditMeetingScheduleForm()}createEditMeetingScheduleForm(){this.centerEditMeetingScheduleForm=this.formBuilder.group({presentMeetingDate:["",se.required],newMeetingDate:["",se.required]})}submit(){let t=this.centerEditMeetingScheduleForm.value,n=this.settingsService.language.code,i=this.settingsService.dateFormat,s=!0,d=new Date(this.centerEditMeetingScheduleForm.value.presentMeetingDate);t.startDate instanceof Date&&(t.presentMeetingDate=this.dateUtils.formatDate(d,i));let u=this.centerEditMeetingScheduleForm.value.newMeetingDate;t.newMeetingDate instanceof Date&&(t.newMeetingDate=this.dateUtils.formatDate(u,i));let f=qt(at({},t),{reschedulebasedOnMeetingDates:s,dateFormat:i,locale:n});this.centersService.updateCenterMeeting(this.centerId,f,this.calendarId).subscribe(_=>{this.router.navigate(["../../"],{relativeTo:this.route})})}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275cmp=me({type:e,selectors:[["mifosx-edit-center-meeting-schedule"]],decls:29,vars:22,consts:[["newMeetingDatePicker",""],[1,"container"],[3,"formGroup"],[1,"layout-column"],["formControlName","presentMeetingDate"],[3,"value"],[3,"click"],["matInput","","required","","formControlName","newMeetingDate",3,"min","max","matDatepicker"],["matSuffix","",3,"for"],[1,"layout-row","align-center","gap-5px","responsive-column"],["type","button","mat-raised-button","",3,"routerLink"],["mat-raised-button","","color","primary",3,"click","disabled"]],template:function(n,i){if(n&1){let s=Y();l(0,"div",1)(1,"mat-card")(2,"form",2)(3,"mat-card-content")(4,"div",3)(5,"mat-form-field")(6,"mat-label"),c(7),p(8,"translate"),r(),l(9,"mat-select",4),Se(10,C6e,3,4,"mat-option",5,Pe),r(),E(12,v6e,7,9,"mat-error"),r(),l(13,"mat-form-field",6),R("click",function(){V(s);let u=xe(20);return q(u.open())}),l(14,"mat-label"),c(15),p(16,"translate"),r(),b(17,"input",7)(18,"mat-datepicker-toggle",8)(19,"mat-datepicker",null,0),E(21,x6e,7,9,"mat-error"),r()()(),l(22,"mat-card-actions",9)(23,"button",10),c(24),p(25,"translate"),r(),l(26,"button",11),R("click",function(){return V(s),q(i.submit())}),c(27),p(28,"translate"),r()()()()()}if(n&2){let s=xe(20);a(2),g("formGroup",i.centerEditMeetingScheduleForm),a(5),h(m(8,13,"labels.inputs.Existing Meeting Date")),a(3),we(i.nextMeetingDates),a(2),I(i.centerEditMeetingScheduleForm.controls.presentMeetingDate.hasError("repeatsOnDay")?12:-1),a(3),h(m(16,15,"labels.inputs.Revised Meeting Date")),a(2),g("min",i.minDate)("max",i.maxDate)("matDatepicker",s),a(),g("for",s),a(3),I(i.centerEditMeetingScheduleForm.controls.newMeetingDate.hasError("required")?21:-1),a(2),g("routerLink",oe(21,_6e)),a(),v(" ",m(25,17,"labels.buttons.Cancel")," "),a(2),g("disabled",!i.centerEditMeetingScheduleForm.valid),a(),v(" ",m(28,19,"labels.buttons.Submit")," ")}},dependencies:[ue,fe,tt,st,Ue,Xe,dt,Ze,et,Ae,$e,Je,Et,Fe,Be,ut,ai,ze,gt,ft,mi,di,pi,ve,Pi,he],styles:[".container[_ngcontent-%COMP%]{max-width:37rem}"]})}}return e})();function b6e(e,o){if(e&1&&(l(0,"mat-option",6),c(1),r()),e&2){let t=o.$implicit;g("value",t),a(),v(" ",t.name," ")}}function y6e(e,o){if(e&1){let t=Y();l(0,"div",16)(1,"span",17),c(2),r(),l(3,"button",18),R("click",function(){let i=V(t),s=i.$implicit,d=i.$index,u=w(2);return q(u.removeGroup(d,s))}),b(4,"fa-icon",19),r()()}if(e&2){let t=o.$implicit;a(2),h(t.name)}}function S6e(e,o){if(e&1&&(l(0,"mat-nav-list"),Se(1,y6e,5,1,"div",16,Pe),r()),e&2){let t=w();a(),we(t.groupMembers)}}var cv=(()=>{class e{constructor(){this.route=T(Ie),this.centersService=T(Jn),this.groupsService=T(An),this.dialog=T(Ht),this.groupsData=[],this.groupMembers=[],this.groupChoice=new it(""),this.route.data.subscribe(t=>{this.centerData=t.centersActionData,this.groupMembers=t.centersActionData.groupMembers})}ngAfterViewInit(){this.groupChoice.valueChanges.subscribe(t=>{t.length>=2&&this.groupsService.getFilteredGroups("name","ASC",t,this.centerData.officeId,"true").subscribe(n=>{this.groupsData=n})})}addGroup(){this.groupMembers!==null&&this.groupMembers!==void 0?this.groupMembers.includes(this.groupChoice.value)||this.centersService.executeCenterActionCommand(this.centerData.id,"associateGroups",{groupMembers:[this.groupChoice.value.id]}).subscribe(()=>{this.groupMembers.push(this.groupChoice.value)}):this.centersService.executeCenterActionCommand(this.centerData.id,"associateGroups",{groupMembers:[this.groupChoice.value.id]}).subscribe(()=>{this.groupMembers.push(this.groupChoice.value)})}removeGroup(t,n){this.dialog.open(vi,{data:{deleteContext:`group member: ${n.name}`}}).afterClosed().subscribe(s=>{s.delete&&this.centersService.executeCenterActionCommand(this.centerData.id,"disassociateGroups",{groupMembers:[n.id]}).subscribe(()=>{this.groupMembers.splice(t,1)})})}displayGroup(t){return t?t.name:void 0}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275cmp=me({type:e,selectors:[["mifosx-manage-groups"]],decls:41,vars:25,consts:[["groupsAutocomplete","matAutocomplete"],[1,"container","layout-row","gap-3percent"],[1,"group-card","flex-fill","layout-column","gap-2percent"],[1,"flex-30"],["matInput","",3,"formControl","matAutocomplete"],["autoActiveFirstOption","",3,"displayWith"],[3,"value"],[1,"mat-table"],[1,"mat-header-row"],[1,"mat-header-cell"],["mat-icon-button","",3,"click"],["icon","plus"],[1,"mat-row"],[1,"mat-cell"],[1,"flex-50"],["matSubheader",""],["mat-list-item","",1,"member-item","center-gap"],["matLine","",1,"p-t-10"],["mat-icon-button","","color","warn","aria-label","Remove group",1,"delete-btn",3,"click"],["icon","trash"]],template:function(n,i){if(n&1){let s=Y();l(0,"div",1)(1,"mat-card",2)(2,"mat-form-field",3)(3,"mat-label"),c(4),p(5,"translate"),r(),b(6,"input",4),r(),l(7,"mat-autocomplete",5,0),Se(9,b6e,2,2,"mat-option",6,Pe),r(),l(11,"div",7)(12,"div",8)(13,"div",9),c(14),p(15,"translate"),r(),l(16,"button",10),R("click",function(){return V(s),q(i.addGroup())}),b(17,"fa-icon",11),r()(),l(18,"div",12)(19,"div",13),c(20),p(21,"translate"),r(),l(22,"div",13),c(23),r()(),l(24,"div",12)(25,"div",13),c(26),p(27,"translate"),r(),l(28,"div",13),c(29),r()(),l(30,"div",12)(31,"div",13),c(32),p(33,"translate"),r(),l(34,"div",13),c(35),r()()()(),l(36,"mat-card",14)(37,"h3",15),c(38),p(39,"translate"),r(),E(40,S6e,3,0,"mat-nav-list"),r()()}if(n&2){let s=xe(8);a(4),h(m(5,13,"labels.inputs.Add Groups")),a(2),g("formControl",i.groupChoice)("matAutocomplete",s),a(),g("displayWith",i.displayGroup),a(2),we(i.groupsData),a(5),h(m(15,15,"labels.inputs.Group Details")),a(6),h(m(21,17,"labels.inputs.name")),a(3),h(i.groupChoice.value.name),a(3),h(m(27,19,"labels.inputs.Id")),a(3),h(i.groupChoice.value.id),a(3),h(m(33,21,"labels.inputs.Office")),a(3),h(i.groupChoice.value.officeName),a(3),h(m(39,23,"labels.heading.Group Members")),a(2),I(i.groupMembers!=null&&i.groupMembers.length?40:-1)}},dependencies:[ue,fe,st,Ue,_n,$e,Fe,Be,ze,ft,er,Za,wi,ke,Ep,pa,ca,he],styles:[".container[_ngcontent-%COMP%]{max-width:70rem}.container[_ngcontent-%COMP%] .mat-table[_ngcontent-%COMP%]{display:block;font-family:Roboto,Helvetica Neue,sans-serif;width:100%;margin-top:-2rem;padding:1.5rem}.container[_ngcontent-%COMP%] .mat-row[_ngcontent-%COMP%], .container[_ngcontent-%COMP%] .mat-header-row[_ngcontent-%COMP%]{display:flex;border-bottom:1px solid var(--border-color-light, #eee);color:var(--text-color, inherit);font-weight:500;align-items:center;min-height:48px;padding:0 24px}.container[_ngcontent-%COMP%] .mat-cell[_ngcontent-%COMP%], .container[_ngcontent-%COMP%] .mat-header-cell[_ngcontent-%COMP%]{flex:1;overflow:hidden;word-wrap:break-word;flex-direction:column}.container[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{padding-left:0;margin-bottom:0;font-weight:500;border-bottom:2px solid var(--border-color-light, #eee);padding-bottom:1rem}.container[_ngcontent-%COMP%] .group-card[_ngcontent-%COMP%]{max-height:20rem;margin-bottom:1rem;padding:1.5rem;box-shadow:0 2px 4px #0000001a;border:1px solid var(--border-color, #ddd);border-radius:8px;transition:background-color .3s ease,border-color .3s ease}.container[_ngcontent-%COMP%] .p-t-10[_ngcontent-%COMP%]{padding-top:10px;font-weight:500;margin-left:1rem}.container[_ngcontent-%COMP%] .flex-50[_ngcontent-%COMP%]{max-height:20rem;margin-bottom:1rem;padding:1.5rem;box-shadow:0 2px 4px #0000001a;border:1px solid var(--border-color, #ddd);border-radius:8px;transition:background-color .3s ease,border-color .3s ease}.container[_ngcontent-%COMP%] .flex-50[_ngcontent-%COMP%] .mat-nav-list[_ngcontent-%COMP%] .member-item[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.5rem;padding:.25rem 0}.container[_ngcontent-%COMP%] .flex-50[_ngcontent-%COMP%] .mat-nav-list[_ngcontent-%COMP%] .center-gap[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.5rem}.container[_ngcontent-%COMP%] .flex-50[_ngcontent-%COMP%] .mat-nav-list[_ngcontent-%COMP%] .member-item[_ngcontent-%COMP%] .p-t-10[_ngcontent-%COMP%]{margin:0;font-weight:500}.container[_ngcontent-%COMP%] .flex-50[_ngcontent-%COMP%] .mat-nav-list[_ngcontent-%COMP%] .delete-btn[_ngcontent-%COMP%]{margin-left:.25rem}"]})}}return e})();var w6e=()=>["../../"],pv=(()=>{class e{constructor(){this.sanitizer=T(Zs),this.route=T(Ie),this.route.data.subscribe(t=>{this.staffAssignmentHistoryData=t.centersActionData})}ngOnInit(){let t=this.staffAssignmentHistoryData.headers.get("Content-Type"),n=new Blob([this.staffAssignmentHistoryData.body],{type:t}),i=URL.createObjectURL(n);this.pentahoUrl=this.sanitizer.bypassSecurityTrustResourceUrl(i)}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275cmp=me({type:e,selectors:[["mifosx-staff-assignment-history"]],decls:7,vars:6,consts:[[1,"container"],[1,"back-button"],["type","button","color","primary","mat-raised-button","",3,"routerLink"],["icon","arrow-left",1,"m-r-10"],["frameborder","0","width","100%","height","600px;",3,"src"]],template:function(n,i){n&1&&(l(0,"mat-card",0)(1,"div",1)(2,"button",2),b(3,"fa-icon",3),c(4),p(5,"translate"),r()(),b(6,"iframe",4),r()),n&2&&(a(2),g("routerLink",oe(5,w6e)),a(2),v("",m(5,3,"labels.buttons.Back")," "),a(2),g("src",i.pentahoUrl,gg))},dependencies:[ue,fe,Ae,$e,ve,ke,he],styles:[".container[_ngcontent-%COMP%]{max-width:60rem}.container[_ngcontent-%COMP%] .back-button[_ngcontent-%COMP%]{max-height:2%;margin-bottom:2%}"]})}}return e})();function P6e(e,o){e&1&&b(0,"mifosx-activate-center")}function T6e(e,o){e&1&&b(0,"mifosx-center-assign-staff")}function M6e(e,o){e&1&&b(0,"mifosx-close-center")}function D6e(e,o){e&1&&b(0,"mifosx-center-attendance")}function E6e(e,o){e&1&&b(0,"mifosx-attach-center-meeting")}function I6e(e,o){e&1&&b(0,"mifosx-edit-center-meeting")}function O6e(e,o){e&1&&b(0,"mifosx-edit-center-meeting-schedule")}function A6e(e,o){e&1&&b(0,"mifosx-manage-groups")}function F6e(e,o){e&1&&b(0,"mifosx-staff-assignment-history")}var mv=(()=>{class e{constructor(){this.route=T(Ie),this.router=T(qe),this.actions={Activate:!1,"Assign Staff":!1,Close:!1,Attendance:!1,"Attach Meeting":!1,"Edit Meeting":!1,"Edit Meeting Schedule":!1,"Manage Groups":!1,"Staff Assignment History":!1},this.router.routeReuseStrategy.shouldReuseRoute=()=>!1;let t=this.route.snapshot.params.action;t&&t in this.actions&&(this.actions[t]=!0)}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275cmp=me({type:e,selectors:[["mifosx-center-actions"]],decls:9,vars:9,template:function(n,i){n&1&&(E(0,P6e,1,0,"mifosx-activate-center"),E(1,T6e,1,0,"mifosx-center-assign-staff"),E(2,M6e,1,0,"mifosx-close-center"),E(3,D6e,1,0,"mifosx-center-attendance"),E(4,E6e,1,0,"mifosx-attach-center-meeting"),E(5,I6e,1,0,"mifosx-edit-center-meeting"),E(6,O6e,1,0,"mifosx-edit-center-meeting-schedule"),E(7,A6e,1,0,"mifosx-manage-groups"),E(8,F6e,1,0,"mifosx-staff-assignment-history")),n&2&&(I(i.actions.Activate?0:-1),a(),I(i.actions["Assign Staff"]?1:-1),a(),I(i.actions.Close?2:-1),a(),I(i.actions.Attendance?3:-1),a(),I(i.actions["Attach Meeting"]?4:-1),a(),I(i.actions["Edit Meeting"]?5:-1),a(),I(i.actions["Edit Meeting Schedule"]?6:-1),a(),I(i.actions["Manage Groups"]?7:-1),a(),I(i.actions["Staff Assignment History"]?8:-1))},dependencies:[ue,fe,iv,nv,ov,av,rv,lv,sv,cv,pv],encapsulation:2})}}return e})();var Kf=(()=>{class e{constructor(){this.centersService=T(Jn)}resolve(t){let n=t.paramMap.get("centerId");return this.centersService.getCenterData(n)}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275prov=Re({token:e,factory:e.\u0275fac})}}return e})();var Xf=(()=>{class e{constructor(){this.centersService=T(Jn)}resolve(t){let n=t.parent.paramMap.get("centerId");return this.centersService.getSavingsAccountDetails(n)}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275prov=Re({token:e,factory:e.\u0275fac})}}return e})();var Zf=(()=>{class e{constructor(){this.centersService=T(Jn)}resolve(t){let n=t.parent.paramMap.get("centerId");return this.centersService.getCenterData(n)}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275prov=Re({token:e,factory:e.\u0275fac})}}return e})();var e1=(()=>{class e{constructor(){this.centersService=T(Jn)}resolve(t){let n=t.parent.paramMap.get("centerId");return this.centersService.getCenterSummary(n)}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275prov=Re({token:e,factory:e.\u0275fac})}}return e})();var t1=(()=>{class e{constructor(){this.centersService=T(Jn)}resolve(t){let n=t.parent.parent.paramMap.get("centerId");return this.centersService.getCenterNotes(n)}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275prov=Re({token:e,factory:e.\u0275fac})}}return e})();var i1=(()=>{class e{constructor(){this.centersService=T(Jn)}resolve(t){let n=t.parent.parent.paramMap.get("centerId"),i=t.paramMap.get("datatableName");return this.centersService.getCenterDatatable(n,i)}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275prov=Re({token:e,factory:e.\u0275fac})}}return e})();var n1=(()=>{class e{constructor(){this.centersService=T(Jn)}resolve(){return this.centersService.getcenterDatatables()}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275prov=Re({token:e,factory:e.\u0275fac})}}return e})();var f5=(()=>{class e{constructor(){this.centersService=T(Jn)}resolve(t){let n=t.paramMap.get("action"),i=t.paramMap.get("centerId")||t.parent.parent.paramMap.get("centerId");switch(n){case"Assign Staff":return this.centersService.getGroupStaffData(i);case"Attendance":return this.centersService.getCentersData(i,"groupMembers,collectionMeetingCalendar");case"Manage Groups":return this.centersService.getCentersData(i,"groupMembers","true");case"Attach Meeting":return this.centersService.getCalendarTemplate(i);case"Edit Meeting":case"Edit Meeting Schedule":let s=t.queryParamMap.get("calendarId");return this.centersService.getCalendarAndTemplate(i,s);case"Staff Assignment History":return this.centersService.getStaffAssignmentHistoryData("Staff Assignment History",i,"default","en");default:return}}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275prov=Re({token:e,factory:e.\u0275fac})}}return e})();var h5=(()=>{class e{constructor(){this.centersService=T(Jn)}resolve(t){let n=t.parent.paramMap.get("centerId");return this.centersService.getCenterAndTemplateData(n)}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275prov=Re({token:e,factory:e.\u0275fac})}}return e})();var k6e=[_o.withShell([{path:"centers",data:{title:"Centers",breadcrumb:"Centers"},children:[{path:"",component:Y2},{path:"create",component:J2,data:{title:"Create Center",breadcrumb:"Create"},resolve:{offices:Hr}},{path:":centerId",data:{title:"Centers View",routeParamBreadcrumb:"centerId"},resolve:{centerViewData:Kf},children:[{path:"",component:K2,resolve:{centerDatatables:n1},children:[{path:"general",component:X2,data:{title:"General",breadcrumb:"General",routeParamBreadcrumb:!1},resolve:{centerSummaryData:e1,centerViewData:Zf,savingsAccountData:Xf}},{path:"notes",component:Z2,data:{title:"Notes",breadcrumb:"Notes",routeParamBreadcrumb:!1},resolve:{centerNotes:t1}},{path:"datatables",children:[{path:":datatableName",component:ev,data:{title:"Data Table View",routeParamBreadcrumb:"datatableName"},resolve:{centerDatatable:i1}}]}]},{path:"actions/:action",data:{title:"Center Actions",breadcrumb:"action",routeParamBreadcrumb:"action"},component:mv,resolve:{centersActionData:f5}},{path:"edit",component:tv,data:{title:"Edit Center",breadcrumb:"Edit",routeParamBreadcrumb:!1},resolve:{centerData:h5}}]}]}])],rN=(()=>{class e{static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275mod=Gi({type:e})}static{this.\u0275inj=Hi({providers:[Hr,Kf,Xf,Zf,e1,t1,i1,n1,f5,h5],imports:[gn.forChild(k6e),gn]})}}return e})();var lN=(()=>{class e{static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275mod=Gi({type:e})}static{this.\u0275inj=Hi({providers:[Kf,i1,n1,e1,Zf,Xf,t1],imports:[oo,rN,ha,Ir,Y2,J2,K2,X2,Z2,ev,mv,iv,nv,ov,av,rv,lv,sv,cv,pv,tv]})}}return e})();var B6e=["chartofAccounts"],R6e=["templateChartofAccounts"],N6e=["accountsLinked"],L6e=["templateAccountsLinked"],V6e=["migrateOpeningBalances"],q6e=["templateMigrateOpeningBalances"],z6e=["closingEntries"],H6e=["templateClosingEntries"],G6e=["createJournalEntries"],j6e=["templateCreateJournalEntries"],sN=()=>["journal-entries/frequent-postings"],cN=()=>["journal-entries/create"],pN=()=>["journal-entries"],mN=()=>["financial-activity-mappings"],dN=()=>["migrate-opening-balances"],uN=()=>["chart-of-accounts"],fN=()=>["closing-entries"],hN=()=>["accounting-rules"],gN=()=>["periodic-accruals"],_N=()=>["provisioning-entries"];function $6e(e,o){e&1&&(l(0,"p",19),c(1),p(2,"translate"),r()),e&2&&(g("routerLink",oe(4,sN)),a(),v(" ",m(2,2,"labels.text.These are predefined postings")," "))}function U6e(e,o){if(e&1){let t=Y();l(0,"fa-icon",23),R("click",function(){V(t);let i=w(2);return q(i.arrowBooleansToggle(0))}),r()}}function W6e(e,o){if(e&1){let t=Y();l(0,"fa-icon",24),R("click",function(){V(t);let i=w(2);return q(i.arrowBooleansToggle(0))}),r()}}function Q6e(e,o){if(e&1&&(l(0,"mat-list-item")(1,"div",14)(2,"div",15)(3,"mat-icon",16),b(4,"fa-icon",17),r(),l(5,"div",18),c(6),p(7,"translate"),E(8,$6e,3,5,"p",19),r()(),l(9,"div",20),E(10,U6e,1,0,"fa-icon",21),E(11,W6e,1,0,"fa-icon",22),r()()()),e&2){let t=w();a(2),g("routerLink",oe(7,sN)),a(4),v(" ",m(7,5,"labels.heading.Frequent Postings")," "),a(2),I(t.arrowBooleans[0]?8:-1),a(2),I(t.arrowBooleans[0]?-1:10),a(),I(t.arrowBooleans[0]?11:-1)}}function Y6e(e,o){e&1&&(l(0,"p",19),c(1),p(2,"translate"),r()),e&2&&(g("routerLink",oe(4,cN)),a(),v(" ",m(2,2,"labels.text.Manual journal entry transactions recorded in a journal")," "))}function J6e(e,o){if(e&1){let t=Y();l(0,"fa-icon",23),R("click",function(){V(t);let i=w(2);return q(i.arrowBooleansToggle(1))}),r()}}function K6e(e,o){if(e&1){let t=Y();l(0,"fa-icon",24),R("click",function(){V(t);let i=w(2);return q(i.arrowBooleansToggle(1))}),r()}}function X6e(e,o){if(e&1&&(l(0,"mat-list-item")(1,"div",14)(2,"div",15)(3,"mat-icon",16),b(4,"fa-icon",25),r(),l(5,"div",18),c(6),p(7,"translate"),E(8,Y6e,3,5,"p",19),r()(),l(9,"div",20),E(10,J6e,1,0,"fa-icon",21),E(11,K6e,1,0,"fa-icon",22),r()()()),e&2){let t=w();a(2),g("routerLink",oe(7,cN)),a(4),v(" ",m(7,5,"labels.heading.Create Journal Entries")," "),a(2),I(t.arrowBooleans[1]?8:-1),a(2),I(t.arrowBooleans[1]?-1:10),a(),I(t.arrowBooleans[1]?11:-1)}}function Z6e(e,o){e&1&&(l(0,"p",19),c(1),p(2,"translate"),r()),e&2&&(g("routerLink",oe(4,pN)),a(),v(" ",m(2,2,"labels.text.Advanced search option for journal entries")," "))}function eOe(e,o){if(e&1){let t=Y();l(0,"fa-icon",23),R("click",function(){V(t);let i=w(2);return q(i.arrowBooleansToggle(2))}),r()}}function tOe(e,o){if(e&1){let t=Y();l(0,"fa-icon",24),R("click",function(){V(t);let i=w(2);return q(i.arrowBooleansToggle(2))}),r()}}function iOe(e,o){if(e&1&&(l(0,"mat-list-item")(1,"div",14)(2,"div",15)(3,"mat-icon",16),b(4,"fa-icon",26),r(),l(5,"div",18),c(6),p(7,"translate"),E(8,Z6e,3,5,"p",19),r()(),l(9,"div",20),E(10,eOe,1,0,"fa-icon",21),E(11,tOe,1,0,"fa-icon",22),r()()()),e&2){let t=w();a(2),g("routerLink",oe(7,pN)),a(4),v(" ",m(7,5,"labels.heading.Search Journal Entries")," "),a(2),I(t.arrowBooleans[2]?8:-1),a(2),I(t.arrowBooleans[2]?-1:10),a(),I(t.arrowBooleans[2]?11:-1)}}function nOe(e,o){e&1&&(l(0,"p",19),c(1),p(2,"translate"),r()),e&2&&(g("routerLink",oe(4,mN)),a(),v(" ",m(2,2,"labels.text.List of Financial Activities and GL Account Mappings")," "))}function oOe(e,o){if(e&1){let t=Y();l(0,"fa-icon",23),R("click",function(){V(t);let i=w(2);return q(i.arrowBooleansToggle(3))}),r()}}function aOe(e,o){if(e&1){let t=Y();l(0,"fa-icon",24),R("click",function(){V(t);let i=w(2);return q(i.arrowBooleansToggle(3))}),r()}}function rOe(e,o){if(e&1&&(l(0,"mat-list-item")(1,"div",14)(2,"div",15)(3,"mat-icon",16),b(4,"fa-icon",27),r(),l(5,"div",18),c(6),p(7,"translate"),E(8,nOe,3,5,"p",19),r()(),l(9,"div",20),E(10,oOe,1,0,"fa-icon",21),E(11,aOe,1,0,"fa-icon",22),r()()()),e&2){let t=w();a(2),g("routerLink",oe(7,mN)),a(4),v(" ",m(7,5,"labels.heading.Accounts Linked to Financial Activities")," "),a(2),I(t.arrowBooleans[3]?8:-1),a(2),I(t.arrowBooleans[3]?-1:10),a(),I(t.arrowBooleans[3]?11:-1)}}function lOe(e,o){e&1&&(l(0,"p",19),c(1),p(2,"translate"),r()),e&2&&(g("routerLink",oe(4,dN)),a(),v(" ",m(2,2,"labels.text.Set or update office-level opening balances for GL accounts")," "))}function sOe(e,o){if(e&1){let t=Y();l(0,"fa-icon",23),R("click",function(){V(t);let i=w(2);return q(i.arrowBooleansToggle(4))}),r()}}function cOe(e,o){if(e&1){let t=Y();l(0,"fa-icon",24),R("click",function(){V(t);let i=w(2);return q(i.arrowBooleansToggle(4))}),r()}}function pOe(e,o){if(e&1&&(l(0,"mat-list-item")(1,"div",14)(2,"div",15)(3,"mat-icon",16),b(4,"fa-icon",28),r(),l(5,"div",18),c(6),p(7,"translate"),E(8,lOe,3,5,"p",19),r()(),l(9,"div",20),E(10,sOe,1,0,"fa-icon",21),E(11,cOe,1,0,"fa-icon",22),r()()()),e&2){let t=w();a(2),g("routerLink",oe(7,dN)),a(4),v(" ",m(7,5,"labels.heading.Migrate Opening Balances (Office-wise)")," "),a(2),I(t.arrowBooleans[4]?8:-1),a(2),I(t.arrowBooleans[4]?-1:10),a(),I(t.arrowBooleans[4]?11:-1)}}function mOe(e,o){e&1&&(l(0,"p",19),c(1),p(2,"translate"),r()),e&2&&(g("routerLink",oe(4,uN)),a(),v(" ",m(2,2,"labels.text.List of accounts used by the organization")," "))}function dOe(e,o){if(e&1){let t=Y();l(0,"fa-icon",23),R("click",function(){V(t);let i=w(2);return q(i.arrowBooleansToggle(5))}),r()}}function uOe(e,o){if(e&1){let t=Y();l(0,"fa-icon",24),R("click",function(){V(t);let i=w(2);return q(i.arrowBooleansToggle(5))}),r()}}function fOe(e,o){if(e&1&&(l(0,"mat-list-item")(1,"div",14)(2,"div",15)(3,"mat-icon",16),b(4,"fa-icon",29),r(),l(5,"div",18),c(6),p(7,"translate"),E(8,mOe,3,5,"p",19),r()(),l(9,"div",20),E(10,dOe,1,0,"fa-icon",21),E(11,uOe,1,0,"fa-icon",22),r()()()),e&2){let t=w();a(2),g("routerLink",oe(7,uN)),a(4),v(" ",m(7,5,"labels.heading.Chart of Accounts")," "),a(2),I(t.arrowBooleans[5]?8:-1),a(2),I(t.arrowBooleans[5]?-1:10),a(),I(t.arrowBooleans[5]?11:-1)}}function hOe(e,o){e&1&&(l(0,"p",19),c(1),p(2,"translate"),r()),e&2&&(g("routerLink",oe(4,fN)),a(),v(" ",m(2,2,"labels.text.Journal entries made at the end of accounting period")," "))}function gOe(e,o){if(e&1){let t=Y();l(0,"fa-icon",23),R("click",function(){V(t);let i=w(2);return q(i.arrowBooleansToggle(6))}),r()}}function _Oe(e,o){if(e&1){let t=Y();l(0,"fa-icon",24),R("click",function(){V(t);let i=w(2);return q(i.arrowBooleansToggle(6))}),r()}}function COe(e,o){if(e&1&&(l(0,"mat-list-item")(1,"div",14)(2,"div",15)(3,"mat-icon",16),b(4,"fa-icon",30),r(),l(5,"div",18),c(6),p(7,"translate"),E(8,hOe,3,5,"p",19),r()(),l(9,"div",20),E(10,gOe,1,0,"fa-icon",21),E(11,_Oe,1,0,"fa-icon",22),r()()()),e&2){let t=w();a(2),g("routerLink",oe(7,fN)),a(4),v(" ",m(7,5,"labels.heading.Closing Entries")," "),a(2),I(t.arrowBooleans[6]?8:-1),a(2),I(t.arrowBooleans[6]?-1:10),a(),I(t.arrowBooleans[6]?11:-1)}}function vOe(e,o){e&1&&(l(0,"p",19),c(1),p(2,"translate"),r()),e&2&&(g("routerLink",oe(4,hN)),a(),v(" ",m(2,2,"labels.text.List of all accounting rules")," "))}function xOe(e,o){if(e&1){let t=Y();l(0,"fa-icon",23),R("click",function(){V(t);let i=w(2);return q(i.arrowBooleansToggle(7))}),r()}}function bOe(e,o){if(e&1){let t=Y();l(0,"fa-icon",24),R("click",function(){V(t);let i=w(2);return q(i.arrowBooleansToggle(7))}),r()}}function yOe(e,o){if(e&1&&(l(0,"mat-list-item")(1,"div",14)(2,"div",15)(3,"mat-icon",16),b(4,"fa-icon",31),r(),l(5,"div",18),c(6),p(7,"translate"),E(8,vOe,3,5,"p",19),r()(),l(9,"div",20),E(10,xOe,1,0,"fa-icon",21),E(11,bOe,1,0,"fa-icon",22),r()()()),e&2){let t=w();a(2),g("routerLink",oe(7,hN)),a(4),v(" ",m(7,5,"labels.heading.Accounting Rules")," "),a(2),I(t.arrowBooleans[7]?8:-1),a(2),I(t.arrowBooleans[7]?-1:10),a(),I(t.arrowBooleans[7]?11:-1)}}function SOe(e,o){e&1&&(l(0,"p",19),c(1),p(2,"translate"),r()),e&2&&(g("routerLink",oe(4,gN)),a(),v(" ",m(2,2,"labels.text.Accrues income, expenses and liabilities")," "))}function wOe(e,o){if(e&1){let t=Y();l(0,"fa-icon",23),R("click",function(){V(t);let i=w(2);return q(i.arrowBooleansToggle(8))}),r()}}function POe(e,o){if(e&1){let t=Y();l(0,"fa-icon",24),R("click",function(){V(t);let i=w(2);return q(i.arrowBooleansToggle(8))}),r()}}function TOe(e,o){if(e&1&&(l(0,"mat-list-item")(1,"div",14)(2,"div",15)(3,"mat-icon",16),b(4,"fa-icon",32),r(),l(5,"div",18),c(6),p(7,"translate"),E(8,SOe,3,5,"p",19),r()(),l(9,"div",20),E(10,wOe,1,0,"fa-icon",21),E(11,POe,1,0,"fa-icon",22),r()()()),e&2){let t=w();a(2),g("routerLink",oe(7,gN)),a(4),v(" ",m(7,5,"labels.heading.Accruals")," "),a(2),I(t.arrowBooleans[8]?8:-1),a(2),I(t.arrowBooleans[8]?-1:10),a(),I(t.arrowBooleans[8]?11:-1)}}function MOe(e,o){e&1&&(l(0,"p",19),c(1),p(2,"translate"),r()),e&2&&(g("routerLink",oe(4,_N)),a(),v(" ",m(2,2,"labels.text.Create provisioning entries")," "))}function DOe(e,o){if(e&1){let t=Y();l(0,"fa-icon",23),R("click",function(){V(t);let i=w(2);return q(i.arrowBooleansToggle(9))}),r()}}function EOe(e,o){if(e&1){let t=Y();l(0,"fa-icon",24),R("click",function(){V(t);let i=w(2);return q(i.arrowBooleansToggle(9))}),r()}}function IOe(e,o){if(e&1&&(l(0,"mat-list-item")(1,"div",14)(2,"div",15)(3,"mat-icon",16),b(4,"fa-icon",33),r(),l(5,"div",18),c(6),p(7,"translate"),E(8,MOe,3,5,"p",19),r()(),l(9,"div",20),E(10,DOe,1,0,"fa-icon",21),E(11,EOe,1,0,"fa-icon",22),r()()()),e&2){let t=w();a(2),g("routerLink",oe(7,_N)),a(4),v(" ",m(7,5,"labels.heading.Provisioning Entries")," "),a(2),I(t.arrowBooleans[9]?8:-1),a(2),I(t.arrowBooleans[9]?-1:10),a(),I(t.arrowBooleans[9]?11:-1)}}function OOe(e,o){if(e&1){let t=Y();l(0,"h2"),c(1),p(2,"translate"),r(),l(3,"p",34),c(4),p(5,"translate"),r(),l(6,"div",35)(7,"button",36),R("click",function(){let i=V(t).popover,s=w();return i.close(),q(s.configurationWizardService.closeConfigWizard())}),c(8),p(9,"translate"),r(),l(10,"button",37),R("click",function(){let i=V(t).popover,s=w();return i.close(),q(s.previousStepChartofAccounts())}),c(11),p(12,"translate"),r(),l(13,"button",37),R("click",function(){let i=V(t).popover,s=w();return i.close(),q(s.nextStepChartofAccounts())}),c(14),p(15,"translate"),r()()}e&2&&(a(),h(m(2,5,"labels.heading.Chart of Accounts")),a(3),h(m(5,7,"labels.text.The Chart of Accounts - General Ledger Setup")),a(4),v(" ",m(9,9,"labels.buttons.Close")," "),a(3),v(" ",m(12,11,"labels.buttons.Back")," "),a(3),v(" ",m(15,13,"labels.buttons.Next")," "))}function AOe(e,o){if(e&1){let t=Y();l(0,"h2"),c(1),p(2,"translate"),r(),l(3,"p",38),c(4),p(5,"translate"),r(),l(6,"div",35)(7,"button",36),R("click",function(){let i=V(t).popover,s=w();return i.close(),q(s.configurationWizardService.closeConfigWizard())}),c(8),p(9,"translate"),r(),l(10,"button",37),R("click",function(){let i=V(t).popover,s=w();return i.close(),q(s.previousStepAccountsLinked())}),c(11),p(12,"translate"),r(),l(13,"button",37),R("click",function(){let i=V(t).popover,s=w();return i.close(),q(s.nextStepAccountsLinked())}),c(14),p(15,"translate"),r()()}e&2&&(a(),h(m(2,5,"labels.heading.Accounts Linked to Financial Activities")),a(3),h(m(5,7,"labels.text.Accounts linked to Financial Activities")),a(4),v(" ",m(9,9,"labels.buttons.Close")," "),a(3),v(" ",m(12,11,"labels.buttons.Back")," "),a(3),v(" ",m(15,13,"labels.buttons.Next")," "))}function FOe(e,o){if(e&1){let t=Y();l(0,"h2"),c(1),p(2,"translate"),r(),l(3,"p",38),c(4),p(5,"translate"),r(),l(6,"div",35)(7,"button",36),R("click",function(){let i=V(t).popover,s=w();return i.close(),q(s.configurationWizardService.closeConfigWizard())}),c(8),p(9,"translate"),r(),l(10,"button",37),R("click",function(){let i=V(t).popover,s=w();return i.close(),q(s.previousStepMigrateOpeningBalances())}),c(11),p(12,"translate"),r(),l(13,"button",37),R("click",function(){let i=V(t).popover,s=w();return i.close(),q(s.nextStepMigrateOpeningBalances())}),c(14),p(15,"translate"),r()()}e&2&&(a(),h(m(2,5,"labels.heading.Migrate Opening Balances (Office-wise)")),a(3),h(m(5,7,"labels.text.GLAccount Balances Application")),a(4),v(" ",m(9,9,"labels.buttons.Close")," "),a(3),v(" ",m(12,11,"labels.buttons.Back")," "),a(3),v(" ",m(15,13,"labels.buttons.Next")," "))}function kOe(e,o){if(e&1){let t=Y();l(0,"h2"),c(1),p(2,"translate"),r(),l(3,"p",34),c(4),p(5,"translate"),r(),l(6,"div",35)(7,"button",36),R("click",function(){let i=V(t).popover,s=w();return i.close(),q(s.configurationWizardService.closeConfigWizard())}),c(8),p(9,"translate"),r(),l(10,"button",37),R("click",function(){let i=V(t).popover,s=w();return i.close(),q(s.previousStepClosingEntries())}),c(11),p(12,"translate"),r(),l(13,"button",37),R("click",function(){let i=V(t).popover,s=w();return i.close(),q(s.nextStepClosingEntries())}),c(14),p(15,"translate"),r()()}e&2&&(a(),h(m(2,5,"labels.heading.Closing Entries")),a(3),h(m(5,7,"labels.text.Accounting to journal entries")),a(4),v(" ",m(9,9,"labels.buttons.Close")," "),a(3),v(" ",m(12,11,"labels.buttons.Back")," "),a(3),v(" ",m(15,13,"labels.buttons.Next")," "))}function BOe(e,o){if(e&1){let t=Y();l(0,"h2"),c(1),p(2,"translate"),r(),l(3,"p",34),c(4),p(5,"translate"),r(),l(6,"div",35)(7,"button",36),R("click",function(){let i=V(t).popover,s=w();return i.close(),q(s.configurationWizardService.closeConfigWizard())}),c(8),p(9,"translate"),r(),l(10,"button",37),R("click",function(){let i=V(t).popover,s=w();return i.close(),q(s.previousStepCreateJournalEntries())}),c(11),p(12,"translate"),r(),l(13,"button",37),R("click",function(){let i=V(t).popover,s=w();return i.close(),q(s.nextStepCreateJournalEntries())}),c(14),p(15,"translate"),r()()}e&2&&(a(),h(m(2,5,"labels.heading.Create Journal Entries")),a(3),h(m(5,7,"labels.text.Journal Entries Transactions")),a(4),v(" ",m(9,9,"labels.buttons.Close")," "),a(3),v(" ",m(12,11,"labels.buttons.Back")," "),a(3),v(" ",m(15,13,"labels.buttons.Next")," "))}var dv=(()=>{class e{constructor(){this.router=T(qe),this.configurationWizardService=T(Qi),this.popoverService=T(Wi),this.arrowBooleans=new Array(10).fill(!1)}showPopover(t,n,i,s){setTimeout(()=>this.popoverService.open(t,n,i,s,{}),200)}ngAfterViewInit(){this.configurationWizardService.showChartofAccounts===!0&&setTimeout(()=>{this.showPopover(this.templateChartofAccounts,this.chartofAccounts.nativeElement,"bottom",!0)}),this.configurationWizardService.showAccountsLinked===!0&&setTimeout(()=>{this.showPopover(this.templateAccountsLinked,this.accountsLinked.nativeElement,"bottom",!0)}),this.configurationWizardService.showMigrateOpeningBalances===!0&&setTimeout(()=>{this.showPopover(this.templateMigrateOpeningBalances,this.migrateOpeningBalances.nativeElement,"bottom",!0)}),this.configurationWizardService.showClosingEntries===!0&&setTimeout(()=>{this.showPopover(this.templateClosingEntries,this.closingEntries.nativeElement,"bottom",!0)}),this.configurationWizardService.showCreateJournalEntries===!0&&setTimeout(()=>{this.showPopover(this.templateCreateJournalEntries,this.createJournalEntries.nativeElement,"bottom",!0)})}nextStepChartofAccounts(){this.configurationWizardService.showChartofAccounts=!1,this.configurationWizardService.showChartofAccountsPage=!0,this.router.navigate(["/accounting/chart-of-accounts"])}previousStepChartofAccounts(){this.configurationWizardService.showChartofAccounts=!1,this.configurationWizardService.showSchedulerJobsList=!0,this.router.navigate(["/system/scheduler-jobs"])}nextStepAccountsLinked(){this.configurationWizardService.showAccountsLinked=!1,this.configurationWizardService.showAccountsLinkedPage=!0,this.router.navigate(["/accounting/financial-activity-mappings"])}previousStepAccountsLinked(){this.configurationWizardService.showAccountsLinked=!1,this.configurationWizardService.showChartofAccountsForm=!0,this.router.navigate(["/accounting/chart-of-accounts/gl-accounts/create"])}nextStepMigrateOpeningBalances(){this.router.navigate(["/accounting/migrate-opening-balances"])}previousStepMigrateOpeningBalances(){this.configurationWizardService.showMigrateOpeningBalances=!1,this.configurationWizardService.showAccountsLinkedList=!0,this.router.navigate(["accounting/financial-activity-mappings"])}nextStepClosingEntries(){this.configurationWizardService.showClosingEntries=!1,this.configurationWizardService.showClosingEntriesPage=!0,this.router.navigate(["/accounting/closing-entries"])}previousStepClosingEntries(){this.configurationWizardService.showClosingEntries=!1,this.configurationWizardService.showMigrateOpeningBalances=!0,this.router.navigate(["/accounting/migrate-opening-balances"])}nextStepCreateJournalEntries(){this.router.navigate(["/accounting/journal-entries/create"])}previousStepCreateJournalEntries(){this.configurationWizardService.showCreateJournalEntries=!1,this.configurationWizardService.showClosingEntriesList=!0,this.router.navigate(["/accounting/closing-entries"])}arrowBooleansToggle(t){this.arrowBooleans[t]=!this.arrowBooleans[t]}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275cmp=me({type:e,selectors:[["mifosx-accounting"]],viewQuery:function(n,i){if(n&1&&(Ee(B6e,5),Ee(R6e,5),Ee(N6e,5),Ee(L6e,5),Ee(V6e,5),Ee(q6e,5),Ee(z6e,5),Ee(H6e,5),Ee(G6e,5),Ee(j6e,5)),n&2){let s;Te(s=Me())&&(i.chartofAccounts=s.first),Te(s=Me())&&(i.templateChartofAccounts=s.first),Te(s=Me())&&(i.accountsLinked=s.first),Te(s=Me())&&(i.templateAccountsLinked=s.first),Te(s=Me())&&(i.migrateOpeningBalances=s.first),Te(s=Me())&&(i.templateMigrateOpeningBalances=s.first),Te(s=Me())&&(i.closingEntries=s.first),Te(s=Me())&&(i.templateClosingEntries=s.first),Te(s=Me())&&(i.createJournalEntries=s.first),Te(s=Me())&&(i.templateCreateJournalEntries=s.first)}},decls:37,vars:10,consts:[["createJournalEntries",""],["accountsLinked",""],["migrateOpeningBalances",""],["chartofAccounts",""],["closingEntries",""],["templateChartofAccounts",""],["templateAccountsLinked",""],["templateMigrateOpeningBalances",""],["templateClosingEntries",""],["templateCreateJournalEntries",""],[1,"container"],[1,"layout-row","responsive-column","gap-20px"],[1,"flex-50"],[4,"mifosxHasPermission"],[1,"menu-list-item-content"],[1,"menu-left-section",3,"routerLink"],["matListIcon",""],["icon","sync","size","sm"],["matLine",""],["matLine","",1,"menu-explanation",3,"routerLink"],[1,"menu-right-section"],["icon","arrow-down","size","md"],["icon","arrow-up","size","md"],["icon","arrow-down","size","md",3,"click"],["icon","arrow-up","size","md",3,"click"],["icon","plus","size","sm"],["icon","search","size","sm"],["icon","link","size","sm"],["icon","hand-holding-usd","size","sm"],["icon","sitemap","size","sm"],["icon","archive","size","sm"],["icon","list","size","sm"],["icon","calendar","size","sm"],["icon","cogs","size","sm"],[1,"mw300"],[1,"layout-row","align-end","gap-2px","responsive-column"],["mat-raised-button","","color","warn",3,"click"],["mat-raised-button","","color","primary",3,"click"],[1,"mw400"]],template:function(n,i){n&1&&(l(0,"div",10)(1,"mat-card")(2,"div",11)(3,"div",12)(4,"mat-nav-list"),F(5,Q6e,12,8,"mat-list-item",13),l(6,"div",null,0),F(8,X6e,12,8,"mat-list-item",13),r(),F(9,iOe,12,8,"mat-list-item",13),l(10,"div",null,1),F(12,rOe,12,8,"mat-list-item",13),r(),l(13,"div",null,2),F(15,pOe,12,8,"mat-list-item",13),r()()(),l(16,"div",12)(17,"mat-nav-list")(18,"div",null,3),F(20,fOe,12,8,"mat-list-item",13),r(),l(21,"div",null,4),F(23,COe,12,8,"mat-list-item",13),r(),F(24,yOe,12,8,"mat-list-item",13)(25,TOe,12,8,"mat-list-item",13)(26,IOe,12,8,"mat-list-item",13),r()()()()(),F(27,OOe,16,15,"ng-template",null,5,ti)(29,AOe,16,15,"ng-template",null,6,ti)(31,FOe,16,15,"ng-template",null,7,ti)(33,kOe,16,15,"ng-template",null,8,ti)(35,BOe,16,15,"ng-template",null,9,ti)),n&2&&(a(5),g("mifosxHasPermission","CREATE_JOURNALENTRY"),a(3),g("mifosxHasPermission","CREATE_JOURNALENTRY"),a(),g("mifosxHasPermission","READ_JOURNALENTRY"),a(3),g("mifosxHasPermission","READ_FINANCIALACTIVITYACCOUNT"),a(3),g("mifosxHasPermission","READ_JOURNALENTRY"),a(5),g("mifosxHasPermission","READ_GLACCOUNT"),a(3),g("mifosxHasPermission","READ_GLCLOSURE"),a(),g("mifosxHasPermission","READ_ACCOUNTINGRULE"),a(),g("mifosxHasPermission","EXECUTE_PERIODICACCRUALACCOUNTING"),a(),g("mifosxHasPermission","VIEW_PROVISIONING_ENTRIES"))},dependencies:[ue,fe,Ae,$e,ve,Ke,pa,Vo,Yo,ke,ca,he],encapsulation:2})}}return e})();var ROe=()=>["../../"];function NOe(e,o){if(e&1&&(l(0,"mat-option",6),c(1),r()),e&2){let t=o.$implicit;g("value",t.id),a(),v(" ",t.name," ")}}function LOe(e,o){e&1&&(l(0,"mat-error"),c(1),p(2,"translate"),p(3,"translate"),l(4,"strong"),c(5),p(6,"translate"),r()()),e&2&&(a(),le(" ",m(2,3,"labels.inputs.Office")," ",m(3,5,"labels.commons.is")," "),a(4),h(m(6,7,"labels.commons.required")))}function VOe(e,o){if(e&1&&(l(0,"mat-option",6),c(1),r()),e&2){let t=o.$implicit;g("value",t),a(),v(" ",t.name," ")}}function qOe(e,o){e&1&&(l(0,"mat-error"),c(1),p(2,"translate"),p(3,"translate"),l(4,"strong"),c(5),p(6,"translate"),r()()),e&2&&(a(),le(" ",m(2,3,"labels.inputs.Accounting Rule")," ",m(3,5,"labels.commons.is")," "),a(4),h(m(6,7,"labels.commons.required")))}function zOe(e,o){if(e&1&&(l(0,"mat-option",6),c(1),r()),e&2){let t=o.$implicit;g("value",t.code),a(),v(" ",t.displayLabel," ")}}function HOe(e,o){e&1&&(l(0,"mat-error"),c(1),p(2,"translate"),p(3,"translate"),l(4,"strong"),c(5),p(6,"translate"),r()()),e&2&&(a(),le(" ",m(2,3,"labels.inputs.Currency")," ",m(3,5,"labels.commons.is")," "),a(4),h(m(6,7,"labels.commons.required")))}function GOe(e,o){if(e&1&&(l(0,"mat-option",6),c(1),r()),e&2){let t=o.$implicit;g("value",t.id),a(),v(" ",t.name," ")}}function jOe(e,o){e&1&&(l(0,"mat-error"),c(1),p(2,"translate"),p(3,"translate"),l(4,"strong"),c(5),p(6,"translate"),r()()),e&2&&(a(),le(" ",m(2,3,"labels.inputs.Affected GL Entry (Debit)")," ",m(3,5,"labels.commons.is")," "),a(4),h(m(6,7,"labels.commons.required")))}function $Oe(e,o){e&1&&(l(0,"mat-error"),c(1),p(2,"translate"),p(3,"translate"),l(4,"strong"),c(5),p(6,"translate"),r()()),e&2&&(a(),le(" ",m(2,3,"labels.inputs.Debit Amount")," ",m(3,5,"labels.commons.is")," "),a(4),h(m(6,7,"labels.commons.required")))}function UOe(e,o){if(e&1){let t=Y();l(0,"button",34),R("click",function(){V(t);let i=w().$index,s=w();return q(s.removeAffectedGLEntry(s.debits,i))}),b(1,"fa-icon",35),r()}}function WOe(e,o){if(e&1){let t=Y();l(0,"button",36),R("click",function(){V(t);let i=w(2);return q(i.addAffectedGLEntry(i.debits))}),b(1,"fa-icon",37),r()}}function QOe(e,o){if(e&1&&(l(0,"div",10)(1,"div",27)(2,"mat-form-field",4)(3,"mat-label"),c(4),p(5,"translate"),r(),l(6,"mat-select",28),Se(7,GOe,2,2,"mat-option",6,Pe),r(),E(9,jOe,7,9,"mat-error"),r(),l(10,"mat-form-field",29)(11,"mat-label"),c(12),p(13,"translate"),r(),b(14,"input",30),E(15,$Oe,7,9,"mat-error"),r(),l(16,"span",31),E(17,UOe,2,0,"button",32),E(18,WOe,2,0,"button",33),r()()()),e&2){let t=o.$index,n=w();a(),g("formGroupName",t),a(3),h(m(5,7,"labels.inputs.Affected GL Entry (Debit)")),a(3),we(n.debitAccountData),a(2),I(n.debits.at(t).controls.glAccountId.hasError("required")?9:-1),a(3),h(m(13,9,"labels.inputs.Debit Amount")),a(3),I(n.debits.at(t).controls.amount.hasError("required")?15:-1),a(2),I(t!==0?17:-1),a(),I(t===0&&n.allowMultipleDebitEntries?18:-1)}}function YOe(e,o){if(e&1&&(l(0,"mat-option",6),c(1),r()),e&2){let t=o.$implicit;g("value",t.id),a(),v(" ",t.name," ")}}function JOe(e,o){e&1&&(l(0,"mat-error"),c(1),p(2,"translate"),p(3,"translate"),l(4,"strong"),c(5),p(6,"translate"),r()()),e&2&&(a(),le(" ",m(2,3,"labels.inputs.Affected GL Entry (Credit)")," ",m(3,5,"labels.commons.is")," "),a(4),h(m(6,7,"labels.commons.required")))}function KOe(e,o){e&1&&(l(0,"mat-error"),c(1),p(2,"translate"),p(3,"translate"),l(4,"strong"),c(5),p(6,"translate"),r()()),e&2&&(a(),le(" ",m(2,3,"labels.inputs.Credit Amount")," ",m(3,5,"labels.commons.is")," "),a(4),h(m(6,7,"labels.commons.required")))}function XOe(e,o){if(e&1){let t=Y();l(0,"button",34),R("click",function(){V(t);let i=w().$index,s=w();return q(s.removeAffectedGLEntry(s.credits,i))}),b(1,"fa-icon",35),r()}}function ZOe(e,o){if(e&1){let t=Y();l(0,"button",36),R("click",function(){V(t);let i=w(2);return q(i.addAffectedGLEntry(i.credits))}),b(1,"fa-icon",37),r()}}function eAe(e,o){if(e&1&&(l(0,"div",11)(1,"div",27)(2,"mat-form-field",4)(3,"mat-label"),c(4),p(5,"translate"),r(),l(6,"mat-select",28),Se(7,YOe,2,2,"mat-option",6,Pe),r(),E(9,JOe,7,9,"mat-error"),r(),l(10,"mat-form-field",29)(11,"mat-label"),c(12),p(13,"translate"),r(),b(14,"input",30),E(15,KOe,7,9,"mat-error"),r(),l(16,"span",31),E(17,XOe,2,0,"button",32),E(18,ZOe,2,0,"button",33),r()()()),e&2){let t=o.$index,n=w();a(),g("formGroupName",t),a(3),h(m(5,7,"labels.inputs.Affected GL Entry (Credit)")),a(3),we(n.creditAccountData),a(2),I(n.credits.at(t).controls.glAccountId.hasError("required")?9:-1),a(3),h(m(13,9,"labels.inputs.Credit Amount")),a(3),I(n.credits.at(t).controls.amount.hasError("required")?15:-1),a(2),I(t!==0?17:-1),a(),I(t===0&&n.allowMultipleCreditEntries?18:-1)}}function tAe(e,o){e&1&&(l(0,"mat-error"),c(1),p(2,"translate"),p(3,"translate"),l(4,"strong"),c(5),p(6,"translate"),r()()),e&2&&(a(),le(" ",m(2,3,"labels.inputs.Transaction Date")," ",m(3,5,"labels.commons.is")," "),a(4),h(m(6,7,"labels.commons.required")))}function iAe(e,o){if(e&1&&(l(0,"mat-option",6),c(1),r()),e&2){let t=o.$implicit;g("value",t.id),a(),v(" ",t.name," ")}}function nAe(e,o){if(e&1&&(l(0,"button",38),c(1),p(2,"translate"),r()),e&2){let t=w();g("disabled",!t.frequentPostingsForm.valid),a(),v(" ",m(2,2,"labels.buttons.Submit")," ")}}var uv=(()=>{class e{constructor(){this.formBuilder=T(nt),this.accountingService=T(Ui),this.settingsService=T(At),this.dateUtils=T(Zt),this.route=T(Ie),this.router=T(qe),this.minDate=new Date(2e3,0,1),this.maxDate=new Date,this.route.data.subscribe(t=>{this.officeData=t.offices,this.accountingRuleData=t.accountingRules,this.currencyData=t.currencies.selectedCurrencyOptions,this.paymentTypeData=t.paymentTypes})}ngOnInit(){this.maxDate=this.settingsService.businessDate,this.createFrequentPostingsForm(),this.setAffectedGLEntryForm()}createFrequentPostingsForm(){this.frequentPostingsForm=this.formBuilder.group({officeId:["",se.required],accountingRule:["",se.required],currencyCode:["",se.required],debits:this.formBuilder.array([]),credits:this.formBuilder.array([]),referenceNumber:[""],transactionDate:["",se.required],paymentTypeId:[""],accountNumber:[""],checkNumber:[""],routingCode:[""],receiptNumber:[""],bankNumber:[""],comments:[""]})}setAffectedGLEntryForm(){this.frequentPostingsForm.get("accountingRule").valueChanges.subscribe(t=>{for(;this.debits.length;)this.debits.removeAt(0);for(;this.credits.length;)this.credits.removeAt(0);this.allowMultipleDebitEntries=t.allowMultipleDebitEntries,this.allowMultipleCreditEntries=t.allowMultipleCreditEntries,this.debitAccountData=t.debitAccounts,this.creditAccountData=t.creditAccounts,this.addAffectedGLEntry(this.debits),this.addAffectedGLEntry(this.credits)})}createAffectedGLEntryForm(){return this.formBuilder.group({glAccountId:["",se.required],amount:["",se.required]})}get debits(){return this.frequentPostingsForm.get("debits")}get credits(){return this.frequentPostingsForm.get("credits")}addAffectedGLEntry(t){t.push(this.createAffectedGLEntryForm())}removeAffectedGLEntry(t,n){t.removeAt(n)}submit(){let t=this.frequentPostingsForm.value;t.accountingRule=t.accountingRule.id,t.locale=this.settingsService.language.code,t.dateFormat=this.settingsService.dateFormat,t.transactionDate instanceof Date&&(t.transactionDate=this.dateUtils.formatDate(t.transactionDate,this.settingsService.dateFormat)),this.accountingService.createJournalEntry(t).subscribe(n=>{this.router.navigate(["../transactions/view",n.transactionId],{relativeTo:this.route})})}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275cmp=me({type:e,selectors:[["mifosx-frequent-postings"]],decls:90,vars:51,consts:[["transactionDatePicker",""],[1,"container"],[3,"ngSubmit","formGroup"],[1,"layout-row-wrap","gap-2px","responsive-column"],[1,"flex-48"],["required","","formControlName","officeId"],[3,"value"],["required","","formControlName","accountingRule"],["required","","formControlName","currencyCode"],[1,"flex-48","hide-lt-md"],["formArrayName","debits",1,"flex-fill","layout-row-wrap","responsive-column"],["formArrayName","credits",1,"flex-fill","layout-row-wrap","responsive-column"],["matInput","","formControlName","referenceNumber"],[1,"flex-48",3,"click"],["matInput","","required","","formControlName","transactionDate",3,"min","max","matDatepicker"],["matSuffix","",3,"for"],["formControlName","paymentTypeId"],["matInput","","formControlName","accountNumber"],["matInput","","formControlName","checkNumber"],["matInput","","formControlName","routingCode"],["matInput","","formControlName","receiptNumber"],["matInput","","formControlName","bankNumber"],[1,"flex-98"],["matInput","","formControlName","comments","cdkTextareaAutosize","","cdkAutosizeMinRows","2"],[1,"layout-row","align-center","gap-5px","responsive-column"],["type","button","mat-raised-button","",3,"routerLink"],["mat-raised-button","","color","primary",3,"disabled",4,"mifosxHasPermission"],[1,"flex-fill","layout-row-wrap","gap-2percent","responsive-column",3,"formGroupName"],["required","","formControlName","glAccountId"],[1,"flex-43"],["type","number","matInput","","required","","formControlName","amount"],[1,"flex-fill"],["type","button","mat-icon-button",""],["type","button","mat-icon-button","","color","primary"],["type","button","mat-icon-button","",3,"click"],["icon","minus-circle","size","lg"],["type","button","mat-icon-button","","color","primary",3,"click"],["icon","plus-circle","size","lg"],["mat-raised-button","","color","primary",3,"disabled"]],template:function(n,i){if(n&1){let s=Y();l(0,"div",1)(1,"mat-card")(2,"form",2),R("ngSubmit",function(){return V(s),q(i.submit())}),l(3,"mat-card-content")(4,"div",3)(5,"mat-form-field",4)(6,"mat-label"),c(7),p(8,"translate"),r(),l(9,"mat-select",5),Se(10,NOe,2,2,"mat-option",6,Pe),r(),E(12,LOe,7,9,"mat-error"),r(),l(13,"mat-form-field",4)(14,"mat-label"),c(15),p(16,"translate"),r(),l(17,"mat-select",7),Se(18,VOe,2,2,"mat-option",6,Pe),r(),E(20,qOe,7,9,"mat-error"),r(),l(21,"mat-form-field",4)(22,"mat-label"),c(23),p(24,"translate"),r(),l(25,"mat-select",8),Se(26,zOe,2,2,"mat-option",6,Pe),r(),E(28,HOe,7,9,"mat-error"),r(),b(29,"span",9),Se(30,QOe,19,11,"div",10,Pe),Se(32,eAe,19,11,"div",11,Pe),l(34,"mat-form-field",4)(35,"mat-label"),c(36),p(37,"translate"),r(),b(38,"input",12),r(),l(39,"mat-form-field",13),R("click",function(){V(s);let u=xe(46);return q(u.open())}),l(40,"mat-label"),c(41),p(42,"translate"),r(),b(43,"input",14)(44,"mat-datepicker-toggle",15)(45,"mat-datepicker",null,0),E(47,tAe,7,9,"mat-error"),r(),l(48,"mat-form-field",4)(49,"mat-label"),c(50),p(51,"translate"),r(),l(52,"mat-select",16),Se(53,iAe,2,2,"mat-option",6,Pe),r()(),l(55,"mat-form-field",4)(56,"mat-label"),c(57),p(58,"translate"),r(),b(59,"input",17),r(),l(60,"mat-form-field",4)(61,"mat-label"),c(62),p(63,"translate"),r(),b(64,"input",18),r(),l(65,"mat-form-field",4)(66,"mat-label"),c(67),p(68,"translate"),r(),b(69,"input",19),r(),l(70,"mat-form-field",4)(71,"mat-label"),c(72),p(73,"translate"),r(),b(74,"input",20),r(),l(75,"mat-form-field",4)(76,"mat-label"),c(77),p(78,"translate"),r(),b(79,"input",21),r(),l(80,"mat-form-field",22)(81,"mat-label"),c(82),p(83,"translate"),r(),b(84,"textarea",23),r()()(),l(85,"mat-card-actions",24)(86,"button",25),c(87),p(88,"translate"),r(),F(89,nAe,3,4,"button",26),r()()()()}if(n&2){let s=xe(46);a(2),g("formGroup",i.frequentPostingsForm),a(5),h(m(8,24,"labels.inputs.Office")),a(3),we(i.officeData),a(2),I(i.frequentPostingsForm.controls.officeId.hasError("required")?12:-1),a(3),h(m(16,26,"labels.inputs.Accounting Rule")),a(3),we(i.accountingRuleData),a(2),I(i.frequentPostingsForm.controls.accountingRule.hasError("required")?20:-1),a(3),h(m(24,28,"labels.inputs.Currency")),a(3),we(i.currencyData),a(2),I(i.frequentPostingsForm.controls.currencyCode.hasError("required")?28:-1),a(2),we(i.debits.controls),a(2),we(i.credits.controls),a(4),h(m(37,30,"labels.inputs.Reference Number")),a(5),h(m(42,32,"labels.inputs.Transaction Date")),a(2),g("min",i.minDate)("max",i.maxDate)("matDatepicker",s),a(),g("for",s),a(3),I(i.frequentPostingsForm.controls.transactionDate.hasError("required")?47:-1),a(3),h(m(51,34,"labels.inputs.Payment Type")),a(3),we(i.paymentTypeData),a(4),h(m(58,36,"labels.inputs.Account Number")),a(5),h(m(63,38,"labels.inputs.Cheque Number")),a(5),h(m(68,40,"labels.inputs.Routing Code")),a(5),h(m(73,42,"labels.inputs.Receipt Number")),a(5),h(m(78,44,"labels.inputs.Bank Number")),a(5),h(m(83,46,"labels.inputs.Comments")),a(4),g("routerLink",oe(50,ROe)),a(),v(" ",m(88,48,"labels.buttons.Cancel")," "),a(2),g("mifosxHasPermission","CREATE_JOURNALENTRY")}},dependencies:[ue,fe,tt,st,tn,Ue,Xe,dt,Ze,et,la,Va,Ae,$e,Je,Et,Fe,Be,ut,ai,ze,gt,ft,mi,di,pi,ve,Ke,wi,ke,Ln,he],encapsulation:2})}}return e})();var oAe=["createJournalFormRef"],aAe=["templateCreateJournalFormRef"],rAe=()=>["../../"];function lAe(e,o){if(e&1&&(l(0,"mat-option",8),c(1),r()),e&2){let t=o.$implicit;g("value",t.id),a(),v(" ",t.name," ")}}function sAe(e,o){e&1&&(l(0,"mat-error"),c(1),p(2,"translate"),p(3,"translate"),l(4,"strong"),c(5),p(6,"translate"),r()()),e&2&&(a(),le(" ",m(2,3,"labels.inputs.Office")," ",m(3,5,"labels.commons.is")," "),a(4),h(m(6,7,"labels.commons.required")))}function cAe(e,o){if(e&1&&(l(0,"mat-option",8),c(1),r()),e&2){let t=o.$implicit;g("value",t.code),a(),v(" ",t.displayLabel," ")}}function pAe(e,o){e&1&&(l(0,"mat-error"),c(1),p(2,"translate"),p(3,"translate"),l(4,"strong"),c(5),p(6,"translate"),r()()),e&2&&(a(),le(" ",m(2,3,"labels.inputs.Currency")," ",m(3,5,"labels.commons.is")," "),a(4),h(m(6,7,"labels.commons.required")))}function mAe(e,o){e&1&&(l(0,"mat-form-field",9)(1,"mat-label"),c(2),p(3,"translate"),r(),b(4,"input",28),r()),e&2&&(a(2),h(m(3,1,"labels.inputs.External Asset Owner")))}function dAe(e,o){e&1&&(l(0,"mat-error"),c(1),p(2,"translate"),p(3,"translate"),l(4,"strong"),c(5),p(6,"translate"),r()()),e&2&&(a(),le(" ",m(2,3,"labels.inputs.Debit Amount")," ",m(3,5,"labels.commons.is")," "),a(4),h(m(6,7,"labels.commons.required")))}function uAe(e,o){if(e&1){let t=Y();l(0,"button",36),R("click",function(){V(t);let i=w().$index,s=w();return q(s.removeAffectedGLEntry(s.debits,i))}),b(1,"fa-icon",37),r()}}function fAe(e,o){if(e&1){let t=Y();l(0,"button",38),R("click",function(){V(t);let i=w(2);return q(i.addAffectedGLEntry(i.debits))}),b(1,"fa-icon",39),r()}}function hAe(e,o){if(e&1){let t=Y();l(0,"div",11)(1,"div",29),b(2,"mifosx-gl-account-selector",30),l(3,"mat-form-field",31)(4,"mat-label"),c(5),p(6,"translate"),r(),l(7,"input",32),R("input",function(i){V(t);let s=w();return q(s.onAmountInput(i))}),r(),E(8,dAe,7,9,"mat-error"),r(),l(9,"span",33),E(10,uAe,2,0,"button",34),E(11,fAe,2,0,"button",35),r()()()}if(e&2){let t=o.$index,n=w();a(),g("formGroupName",t),a(),g("inputFormControl",n.debits.at(t).controls.glAccountId)("glAccountList",n.glAccountData)("required",!0)("inputLabel","Affected GL Entry (Debit)"),a(3),h(m(6,9,"labels.inputs.Debit Amount")),a(3),I(n.debits.at(t).controls.amount.hasError("required")?8:-1),a(2),I(t!==0?10:-1),a(),I(t===0?11:-1)}}function gAe(e,o){e&1&&(l(0,"mat-error"),c(1),p(2,"translate"),p(3,"translate"),l(4,"strong"),c(5),p(6,"translate"),r()()),e&2&&(a(),le(" ",m(2,3,"labels.inputs.Credit Amount")," ",m(3,5,"labels.commons.is")," "),a(4),h(m(6,7,"labels.commons.required")))}function _Ae(e,o){if(e&1){let t=Y();l(0,"button",36),R("click",function(){V(t);let i=w().$index,s=w();return q(s.removeAffectedGLEntry(s.credits,i))}),b(1,"fa-icon",37),r()}}function CAe(e,o){if(e&1){let t=Y();l(0,"button",38),R("click",function(){V(t);let i=w(2);return q(i.addAffectedGLEntry(i.credits))}),b(1,"fa-icon",39),r()}}function vAe(e,o){if(e&1){let t=Y();l(0,"div",12)(1,"div",29),b(2,"mifosx-gl-account-selector",30),l(3,"mat-form-field",31)(4,"mat-label"),c(5),p(6,"translate"),r(),l(7,"input",32),R("input",function(i){V(t);let s=w();return q(s.onAmountInput(i))}),r(),E(8,gAe,7,9,"mat-error"),r(),l(9,"span",33),E(10,_Ae,2,0,"button",34),E(11,CAe,2,0,"button",35),r()()()}if(e&2){let t=o.$index,n=w();a(),g("formGroupName",t),a(),g("inputFormControl",n.credits.at(t).controls.glAccountId)("glAccountList",n.glAccountData)("required",!0)("inputLabel","Affected GL Entry (Credit)"),a(3),h(m(6,9,"labels.inputs.Credit Amount")),a(3),I(n.credits.at(t).controls.amount.hasError("required")?8:-1),a(2),I(t!==0?10:-1),a(),I(t===0?11:-1)}}function xAe(e,o){e&1&&(l(0,"mat-error"),c(1),p(2,"translate"),p(3,"translate"),l(4,"strong"),c(5),p(6,"translate"),r()()),e&2&&(a(),le(" ",m(2,3,"labels.inputs.Transaction Date")," ",m(3,5,"labels.commons.is")," "),a(4),h(m(6,7,"labels.commons.required")))}function bAe(e,o){if(e&1&&(l(0,"mat-option",8),c(1),r()),e&2){let t=o.$implicit;g("value",t.id),a(),v(" ",t.name," ")}}function yAe(e,o){if(e&1&&(l(0,"button",40),c(1),p(2,"translate"),r()),e&2){let t=w();g("disabled",!t.journalEntryForm.valid),a(),v(" ",m(2,2,"labels.buttons.Submit")," ")}}function SAe(e,o){if(e&1){let t=Y();l(0,"h2"),c(1),p(2,"translate"),r(),l(3,"p",41),c(4),p(5,"translate"),l(6,"a",42),c(7),p(8,"translate"),r()(),l(9,"div",43)(10,"button",44),R("click",function(){let i=V(t).popover,s=w();return i.close(),q(s.configurationWizardService.closeConfigWizard())}),c(11),p(12,"translate"),r(),l(13,"button",45),R("click",function(){let i=V(t).popover,s=w();return i.close(),q(s.previousStep())}),c(14),p(15,"translate"),r(),l(16,"button",45),R("click",function(){let i=V(t).popover,s=w();return i.close(),q(s.nextStep())}),c(17),p(18,"translate"),r()()}e&2&&(a(),h(m(2,6,"labels.heading.Add Journal Entry Form")),a(3),v(" ",m(5,8,"labels.text.Red asterisk field")," "),a(3),h(m(8,10,"labels.inputs.Add Journal Entries")),a(4),v(" ",m(12,12,"labels.buttons.Close")," "),a(3),v(" ",m(15,14,"labels.buttons.Back")," "),a(3),v(" ",m(18,16,"labels.buttons.Next")," "))}var fv=(()=>{class e{onAmountInput(t){let n=t.target;if(!(n instanceof HTMLInputElement))return;let i=n.value.trim();if(i==="")return;let s=Number(i);(!Number.isFinite(s)||s<1)&&(n.value="1",n.dispatchEvent(new Event("input",{bubbles:!0})))}constructor(){this.formBuilder=T(nt),this.accountingService=T(Ui),this.settingsService=T(At),this.dateUtils=T(Zt),this.route=T(Ie),this.router=T(qe),this.dialog=T(Ht),this.configurationWizardService=T(Qi),this.popoverService=T(Wi),this.minDate=new Date(2e3,0,1),this.maxDate=new Date,this.assetExternalizationEnabled=!1,this.assetExternalizationEnabled=!1,this.route.data.subscribe(t=>{this.officeData=t.offices,this.currencyData=t.currencies.selectedCurrencyOptions,this.paymentTypeData=t.paymentTypes,this.glAccountData=t.glAccounts,this.assetExternalizationConfig=t.globalConfig})}ngOnInit(){this.maxDate=this.settingsService.businessDate,this.createJournalEntryForm()}createJournalEntryForm(){this.journalEntryForm=this.formBuilder.group({officeId:["",se.required],currencyCode:["",se.required],debits:this.formBuilder.array([this.createAffectedGLEntryForm()]),credits:this.formBuilder.array([this.createAffectedGLEntryForm()]),referenceNumber:[""],transactionDate:["",se.required],paymentTypeId:[""],accountNumber:[""],checkNumber:[""],routingCode:[""],receiptNumber:[""],bankNumber:[""],comments:[""]})}createAffectedGLEntryForm(){return this.formBuilder.group({glAccountId:["",se.required],amount:["",[se.required,se.min(1)]]})}get debits(){return this.journalEntryForm.get("debits")}get credits(){return this.journalEntryForm.get("credits")}addAffectedGLEntry(t){t.push(this.createAffectedGLEntryForm())}removeAffectedGLEntry(t,n){t.removeAt(n)}submit(){let t=this.journalEntryForm.value;t.locale=this.settingsService.language.code,t.dateFormat=this.settingsService.dateFormat,t.transactionDate&&(t.transactionDate=this.dateUtils.formatDate(t.transactionDate,this.settingsService.dateFormat)),t.externalAssetOwner||delete t.externalAssetOwner,this.accountingService.createJournalEntry(t).subscribe(n=>{this.router.navigate(["../transactions/view",n.transactionId],{relativeTo:this.route})})}showPopover(t,n,i,s){setTimeout(()=>this.popoverService.open(t,n,i,s,{}),200)}ngAfterViewInit(){this.configurationWizardService.showCreateJournalEntries===!0&&setTimeout(()=>{this.showPopover(this.templateCreateJournalFormRef,this.createJournalFormRef.nativeElement,"top",!0)}),this.assetExternalizationEnabled=this.assetExternalizationConfig.enabled,this.assetExternalizationEnabled&&this.journalEntryForm.addControl("externalAssetOwner",new it)}nextStep(){this.configurationWizardService.showCreateJournalEntries=!1,this.openNextStepDialog()}previousStep(){this.router.navigate(["/accounting"])}openNextStepDialog(){this.dialog.open(cs,{data:{nextStepName:"Setup Products",previousStepName:"Accounting",stepPercentage:74}}).afterClosed().subscribe(n=>{n.nextStep?(this.configurationWizardService.showCreateJournalEntries=!1,this.configurationWizardService.showCharges=!0,this.router.navigate(["/products"])):(this.configurationWizardService.showCreateJournalEntries=!1,this.router.navigate(["/home"]))})}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275cmp=me({type:e,selectors:[["mifosx-create-journal-entry"]],viewQuery:function(n,i){if(n&1&&(Ee(oAe,5),Ee(aAe,5)),n&2){let s;Te(s=Me())&&(i.createJournalFormRef=s.first),Te(s=Me())&&(i.templateCreateJournalFormRef=s.first)}},decls:85,vars:48,consts:[["createJournalFormRef",""],["transactionDatePicker",""],["templateCreateJournalFormRef",""],[1,"container"],[3,"ngSubmit","formGroup"],[1,"layout-row-wrap","responsive-column","gap-2percent"],[1,"flex-48"],["required","","formControlName","officeId"],[3,"value"],[1,"flex-24"],["required","","formControlName","currencyCode"],["formArrayName","debits",1,"flex-fill","layout-row-wrap","responsive-column"],["formArrayName","credits",1,"flex-fill","layout-row-wrap","responsive-column"],["matInput","","formControlName","referenceNumber"],[1,"flex-48",3,"click"],["matInput","","required","","formControlName","transactionDate",3,"min","max","matDatepicker"],["matSuffix","",3,"for"],["formControlName","paymentTypeId"],["matInput","","formControlName","accountNumber"],["matInput","","formControlName","checkNumber"],["matInput","","formControlName","routingCode"],["matInput","","formControlName","receiptNumber"],["matInput","","formControlName","bankNumber"],[1,"flex-98"],["matInput","","formControlName","comments","cdkTextareaAutosize","","cdkAutosizeMinRows","2"],[1,"layout-row","align-center","gap-5px","responsive-column"],["type","button","mat-raised-button","",3,"routerLink"],["mat-raised-button","","color","primary",3,"disabled",4,"mifosxHasPermission"],["matInput","","formControlName","externalAssetOwner"],[1,"flex-fill","layout-row-wrap","gap-2percent","responsive-column",3,"formGroupName"],[1,"flex-48",3,"inputFormControl","glAccountList","required","inputLabel"],[1,"flex-43"],["type","number","matInput","","required","","formControlName","amount","min","1",3,"input"],[1,"flex-fill"],["type","button","mat-icon-button",""],["type","button","mat-icon-button","","color","primary"],["type","button","mat-icon-button","",3,"click"],["icon","minus-circle","size","lg"],["type","button","mat-icon-button","","color","primary",3,"click"],["icon","plus-circle","size","lg"],["mat-raised-button","","color","primary",3,"disabled"],[1,"mw300"],["href","https://mifosforge.jira.com/wiki/spaces/docs/pages/67895310/Add+Journal+Entries","target","_blank"],[1,"layout-row","align-end","gap-2px","responsive-column"],["mat-raised-button","","color","warn",3,"click"],["mat-raised-button","","color","primary",3,"click"]],template:function(n,i){if(n&1){let s=Y();l(0,"div",3)(1,"mat-card")(2,"form",4),R("ngSubmit",function(){return V(s),q(i.submit())}),l(3,"mat-card-content")(4,"div",5,0)(6,"mat-form-field",6)(7,"mat-label"),c(8),p(9,"translate"),r(),l(10,"mat-select",7),Se(11,lAe,2,2,"mat-option",8,Pe),r(),E(13,sAe,7,9,"mat-error"),r(),l(14,"mat-form-field",9)(15,"mat-label"),c(16),p(17,"translate"),r(),l(18,"mat-select",10),Se(19,cAe,2,2,"mat-option",8,Pe),r(),E(21,pAe,7,9,"mat-error"),r(),E(22,mAe,5,3,"mat-form-field",9),Se(23,hAe,12,11,"div",11,Pe),Se(25,vAe,12,11,"div",12,Pe),l(27,"mat-form-field",6)(28,"mat-label"),c(29),p(30,"translate"),r(),b(31,"input",13),r(),l(32,"mat-form-field",14),R("click",function(){V(s);let u=xe(39);return q(u.open())}),l(33,"mat-label"),c(34),p(35,"translate"),r(),b(36,"input",15)(37,"mat-datepicker-toggle",16)(38,"mat-datepicker",null,1),E(40,xAe,7,9,"mat-error"),r(),l(41,"mat-form-field",6)(42,"mat-label"),c(43),p(44,"translate"),r(),l(45,"mat-select",17),Se(46,bAe,2,2,"mat-option",8,Pe),r()(),l(48,"mat-form-field",6)(49,"mat-label"),c(50),p(51,"translate"),r(),b(52,"input",18),r(),l(53,"mat-form-field",6)(54,"mat-label"),c(55),p(56,"translate"),r(),b(57,"input",19),r(),l(58,"mat-form-field",6)(59,"mat-label"),c(60),p(61,"translate"),r(),b(62,"input",20),r(),l(63,"mat-form-field",6)(64,"mat-label"),c(65),p(66,"translate"),r(),b(67,"input",21),r(),l(68,"mat-form-field",6)(69,"mat-label"),c(70),p(71,"translate"),r(),b(72,"input",22),r(),l(73,"mat-form-field",23)(74,"mat-label"),c(75),p(76,"translate"),r(),b(77,"textarea",24),r()()(),l(78,"mat-card-actions",25)(79,"button",26),c(80),p(81,"translate"),r(),F(82,yAe,3,4,"button",27),r()()()(),F(83,SAe,19,18,"ng-template",null,2,ti)}if(n&2){let s=xe(39);a(2),g("formGroup",i.journalEntryForm),a(6),h(m(9,23,"labels.inputs.Office")),a(3),we(i.officeData),a(2),I(i.journalEntryForm.controls.officeId.hasError("required")?13:-1),a(3),h(m(17,25,"labels.inputs.Currency")),a(3),we(i.currencyData),a(2),I(i.journalEntryForm.controls.currencyCode.hasError("required")?21:-1),a(),I(i.assetExternalizationEnabled?22:-1),a(),we(i.debits.controls),a(2),we(i.credits.controls),a(4),h(m(30,27,"labels.inputs.Reference Number")),a(5),h(m(35,29,"labels.inputs.Transaction Date")),a(2),g("min",i.minDate)("max",i.maxDate)("matDatepicker",s),a(),g("for",s),a(3),I(i.journalEntryForm.controls.transactionDate.hasError("required")?40:-1),a(3),h(m(44,31,"labels.inputs.Payment Type")),a(3),we(i.paymentTypeData),a(4),h(m(51,33,"labels.inputs.Account Number")),a(5),h(m(56,35,"labels.inputs.Cheque Number")),a(5),h(m(61,37,"labels.inputs.Routing Code")),a(5),h(m(66,39,"labels.inputs.Receipt Number")),a(5),h(m(71,41,"labels.inputs.Bank Number")),a(5),h(m(76,43,"labels.inputs.Comments")),a(4),g("routerLink",oe(47,rAe)),a(),v(" ",m(81,45,"labels.buttons.Cancel")," "),a(2),g("mifosxHasPermission","CREATE_JOURNALENTRY")}},dependencies:[ue,fe,tt,st,tn,Ue,Xe,dt,Da,Ze,et,la,Va,Ae,$e,Je,Et,Fe,Be,ut,ai,ze,gt,ft,mi,di,pi,ve,Ke,ta,wi,ke,Ln,he],encapsulation:2})}}return e})();var hv=class{constructor(o){this.accountingService=o,this.journalEntriesSubject=new Na([]),this.recordsSubject=new Na(0),this.records$=this.recordsSubject.asObservable()}getJournalEntries(o,t="",n="",i=0,s=10){this.journalEntriesSubject.next([]),t=t==="debit"||t==="credit"?"amount":t,this.accountingService.getJournalEntries(o,t,n,i*s,s).subscribe(d=>{this.recordsSubject.next(d.totalFilteredRecords),this.journalEntriesSubject.next(d.pageItems)})}connect(o){return this.journalEntriesSubject.asObservable()}disconnect(o){this.journalEntriesSubject.complete(),this.recordsSubject.complete()}};var wAe=()=>[10,25,50,100],PAe=(e,o)=>({id:e,name:o}),TAe=e=>["transactions/view",e];function MAe(e,o){if(e&1&&(l(0,"mat-option",10),c(1),r()),e&2){let t=o.$implicit;g("value",t.value),a(),v(" ",t.option," ")}}function DAe(e,o){if(e&1&&(l(0,"mat-option",10),c(1),r()),e&2){let t=o.$implicit;g("value",Ka(2,PAe,t.id,t.name)),a(),v(" ",t.name," ")}}function EAe(e,o){e&1&&(l(0,"th",38),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.Entry ID")))}function IAe(e,o){if(e&1&&(l(0,"td",39),c(1),r()),e&2){let t=o.$implicit;a(),h(t.id)}}function OAe(e,o){e&1&&(l(0,"th",38),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.Office")))}function AAe(e,o){if(e&1&&(l(0,"td",39),c(1),r()),e&2){let t=o.$implicit;a(),h(t.officeName)}}function FAe(e,o){e&1&&(l(0,"th",38),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.Transaction ID")))}function kAe(e,o){if(e&1&&(l(0,"td",39),c(1),r()),e&2){let t=o.$implicit;a(),h(t.transactionId)}}function BAe(e,o){e&1&&(l(0,"th",38),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.Transaction Date")))}function RAe(e,o){if(e&1&&(l(0,"td",39),c(1),p(2,"dateFormat"),r()),e&2){let t=o.$implicit;a(),h(m(2,1,t.transactionDate))}}function NAe(e,o){e&1&&(l(0,"th",40),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.Type")))}function LAe(e,o){if(e&1&&(l(0,"td",39),c(1),r()),e&2){let t=o.$implicit;a(),h(t.glAccountType.value)}}function VAe(e,o){e&1&&(l(0,"th",40),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.Created By")))}function qAe(e,o){if(e&1&&(l(0,"td",39),c(1),r()),e&2){let t=o.$implicit;a(),h(t.createdByUserName)}}function zAe(e,o){e&1&&(l(0,"th",40),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.Submitted on date")))}function HAe(e,o){if(e&1&&(l(0,"td",39),c(1),p(2,"datetimeFormat"),r()),e&2){let t=o.$implicit;a(),h(m(2,1,t.submittedOnDate))}}function GAe(e,o){e&1&&(l(0,"th",38),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.Account Code")))}function jAe(e,o){if(e&1&&(l(0,"td",39),c(1),r()),e&2){let t=o.$implicit;a(),h(t.glAccountCode)}}function $Ae(e,o){e&1&&(l(0,"th",38),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.Account Name")))}function UAe(e,o){if(e&1&&(l(0,"td",39),c(1),r()),e&2){let t=o.$implicit;a(),h(t.glAccountName)}}function WAe(e,o){e&1&&(l(0,"th",38),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.Currency")))}function QAe(e,o){if(e&1&&(l(0,"td",39),c(1),r()),e&2){let t=o.$implicit;a(),h(t.currency.code)}}function YAe(e,o){e&1&&(l(0,"th",38),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.Debit")))}function JAe(e,o){if(e&1&&(l(0,"span"),c(1),p(2,"formatNumber"),r()),e&2){let t=w().$implicit;a(),v(" ",m(2,1,t.amount)," ")}}function KAe(e,o){if(e&1&&(l(0,"td",39),E(1,JAe,3,3,"span"),r()),e&2){let t=o.$implicit;a(),I(t.entryType.value==="DEBIT"?1:-1)}}function XAe(e,o){e&1&&(l(0,"th",38),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.Credit")))}function ZAe(e,o){if(e&1&&(l(0,"span"),c(1),p(2,"formatNumber"),r()),e&2){let t=w().$implicit;a(),v(" ",m(2,1,t.amount)," ")}}function e7e(e,o){if(e&1&&(l(0,"td",39),E(1,ZAe,3,3,"span"),r()),e&2){let t=o.$implicit;a(),I(t.entryType.value==="CREDIT"?1:-1)}}function t7e(e,o){e&1&&b(0,"tr",41)}function i7e(e,o){if(e&1&&b(0,"tr",42),e&2){let t=o.$implicit;g("routerLink",Nt(1,TAe,t.transactionId))}}var gv=(()=>{class e{constructor(){this.accountingService=T(Ui),this.settingsService=T(At),this.dateUtils=T(Zt),this.route=T(Ie),this.minDate=new Date(2e3,0,1),this.maxDate=new Date,this.officeName=new it,this.glAccount=new it,this.entryTypeFilter=new it(""),this.entryTypeFilterData=[{option:"All",value:""},{option:"Manual Entries",value:!0},{option:"System Entries",value:!1}],this.transactionDateFrom=new it(new Date(new Date().setMonth(new Date().getMonth()-1))),this.transactionDateTo=new it(new Date),this.transactionId=new it,this.submittedOnDateFrom=new it,this.submittedOnDateTo=new it,this.displayedColumns=["id","officeName","transactionId","transactionDate","glAccountType","createdByUserName","submittedOnDate","glAccountCode","glAccountName","currency","debit","credit"],this.filterJournalEntriesBy=[{type:"officeId",value:""},{type:"glAccountId",value:""},{type:"manualEntriesOnly",value:""},{type:"transactionId",value:""},{type:"fromDate",value:this.dateUtils.formatDate(new Date(new Date().setMonth(new Date().getMonth()-1)),this.settingsService.dateFormat)},{type:"toDate",value:this.dateUtils.formatDate(new Date,this.settingsService.dateFormat)},{type:"submittedOnDateFrom",value:""},{type:"submittedOnDateTo",value:""},{type:"dateFormat",value:this.settingsService.dateFormat},{type:"locale",value:this.settingsService.language.code}],this.route.data.subscribe(t=>{this.officeData=t.offices,this.glAccountData=t.glAccounts})}ngOnInit(){this.maxDate=this.settingsService.businessDate,this.setFilteredOffices(),this.setFilteredGlAccounts(),this.getJournalEntries()}ngAfterViewInit(){this.officeName.valueChanges.pipe(Mn(t=>t.id?t.id:""),Oo(500),Ao(),Eo(t=>{this.applyFilter(t,"officeId")})).subscribe(),this.glAccount.valueChanges.pipe(Mn(t=>t||""),Oo(500),Ao(),Eo(t=>{this.applyFilter(t,"glAccountId")})).subscribe(),this.transactionId.valueChanges.pipe(Oo(500),Ao(),Eo(t=>{this.applyFilter(t,"transactionId")})).subscribe(),this.transactionDateFrom.valueChanges.pipe(Oo(500),Ao(),Eo(t=>{this.applyFilter(this.dateUtils.formatDate(t,this.settingsService.dateFormat),"fromDate")})).subscribe(),this.transactionDateTo.valueChanges.pipe(Oo(500),Ao(),Eo(t=>{this.applyFilter(this.dateUtils.formatDate(t,this.settingsService.dateFormat),"toDate")})).subscribe(),this.submittedOnDateFrom.valueChanges.pipe(Oo(500),Ao(),Eo(t=>{this.applyFilter(this.dateUtils.formatDate(t,this.settingsService.dateFormat),"submittedOnDateFrom")})).subscribe(),this.submittedOnDateTo.valueChanges.pipe(Oo(500),Ao(),Eo(t=>{this.applyFilter(this.dateUtils.formatDate(t,this.settingsService.dateFormat),"submittedOnDateTo")})).subscribe(),this.sort.sortChange.subscribe(()=>this.paginator.pageIndex=0),fl(this.sort.sortChange,this.paginator.page).pipe(Eo(()=>this.loadJournalEntriesPage())).subscribe()}loadJournalEntriesPage(){this.sort.direction||delete this.sort.active,this.dataSource.getJournalEntries(this.filterJournalEntriesBy,this.sort.active,this.sort.direction,this.paginator.pageIndex,this.paginator.pageSize)}applyFilter(t,n){this.paginator.pageIndex=0;let i=this.filterJournalEntriesBy.findIndex(s=>s.type===n);this.filterJournalEntriesBy[i].value=t,this.loadJournalEntriesPage()}displayOfficeName(t){return t?t.name:void 0}setFilteredOffices(){this.filteredOfficeData=this.officeName.valueChanges.pipe(hl(""),Mn(t=>typeof t=="string"?t:t.name),Mn(t=>t?this.filterOfficeAutocompleteData(t):this.officeData))}setFilteredGlAccounts(){this.filteredGLAccountData=this.glAccount.valueChanges.pipe(hl(""),Mn(t=>typeof t=="string"?t:t.name+" ("+t.glCode+")"),Mn(t=>t?this.filterGLAccountAutocompleteData(t):this.glAccountData))}filterOfficeAutocompleteData(t){return this.officeData.filter(n=>n.name.toLowerCase().includes(t.toLowerCase()))}filterGLAccountAutocompleteData(t){return this.glAccountData.filter(n=>(n.name+" ("+n.glCode+")").toLowerCase().includes(t.toLowerCase()))}getJournalEntries(){this.dataSource=new hv(this.accountingService),this.dataSource.getJournalEntries(this.filterJournalEntriesBy,this.sort.active,this.sort.direction,this.paginator.pageIndex,this.paginator.pageSize)}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275cmp=me({type:e,selectors:[["mifosx-search-journal-entry"]],viewQuery:function(n,i){if(n&1&&(Ee(kt,7),Ee(It,7)),n&2){let s;Te(s=Me())&&(i.paginator=s.first),Te(s=Me())&&(i.sort=s.first)}},decls:98,vars:59,consts:[["transactionDateFromPicker",""],["transactionDateToPicker",""],["submittedOnDateFromPicker",""],["submittedOnDateToPicker",""],["officeNameAutocomplete","matAutocomplete"],[1,"container","layout-row-wrap","gap-2px","responsive-column","filter-container"],[1,"flex-31"],["matInput","",3,"formControl","matAutocomplete"],[1,"flex-31",3,"inputFormControl","glAccountList","required","inputLabel"],[3,"selectionChange","formControl"],[3,"value"],[1,"flex-31",3,"click"],["matInput","",3,"min","max","matDatepicker","formControl"],["matSuffix","",3,"for"],["matInput","",3,"formControl"],["matInput","",3,"max","matDatepicker","formControl"],["matInput","",3,"min","matDatepicker","formControl"],["autoActiveFirstOption","",3,"displayWith"],[1,"mat-elevation-z8","container","table-container"],["mat-table","","matSort","",3,"dataSource"],["matColumnDef","id"],["mat-header-cell","","mat-sort-header","",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","officeName"],["matColumnDef","transactionId"],["matColumnDef","transactionDate"],["matColumnDef","glAccountType"],["mat-header-cell","",4,"matHeaderCellDef"],["matColumnDef","createdByUserName"],["matColumnDef","submittedOnDate"],["matColumnDef","glAccountCode"],["matColumnDef","glAccountName"],["matColumnDef","currency"],["matColumnDef","debit"],["matColumnDef","credit"],["mat-header-row","",4,"matHeaderRowDef"],["mat-row","","class","select-row",3,"routerLink",4,"matRowDef","matRowDefColumns"],["showFirstLastButtons","",3,"length","pageSize","pageSizeOptions"],["mat-header-cell","","mat-sort-header",""],["mat-cell",""],["mat-header-cell",""],["mat-header-row",""],["mat-row","",1,"select-row",3,"routerLink"]],template:function(n,i){if(n&1){let s=Y();l(0,"div",5)(1,"mat-form-field",6)(2,"mat-label"),c(3),p(4,"translate"),r(),b(5,"input",7),r(),b(6,"mifosx-gl-account-selector",8),l(7,"mat-form-field",6)(8,"mat-label"),c(9),p(10,"translate"),r(),l(11,"mat-select",9),R("selectionChange",function(u){return V(s),q(i.applyFilter(u.value,"manualEntriesOnly"))}),Se(12,MAe,2,2,"mat-option",10,Pe),r()(),l(14,"mat-form-field",11),R("click",function(){V(s);let u=xe(21);return q(u.open())}),l(15,"mat-label"),c(16),p(17,"translate"),r(),b(18,"input",12)(19,"mat-datepicker-toggle",13)(20,"mat-datepicker",null,0),r(),l(22,"mat-form-field",11),R("click",function(){V(s);let u=xe(29);return q(u.open())}),l(23,"mat-label"),c(24),p(25,"translate"),r(),b(26,"input",12)(27,"mat-datepicker-toggle",13)(28,"mat-datepicker",null,1),r(),l(30,"mat-form-field",6)(31,"mat-label"),c(32),p(33,"translate"),r(),b(34,"input",14),r(),l(35,"mat-form-field",11),R("click",function(){V(s);let u=xe(42);return q(u.open())}),l(36,"mat-label"),c(37),p(38,"translate"),r(),b(39,"input",15)(40,"mat-datepicker-toggle",13)(41,"mat-datepicker",null,2),r(),l(43,"mat-form-field",11),R("click",function(){V(s);let u=xe(50);return q(u.open())}),l(44,"mat-label"),c(45),p(46,"translate"),r(),b(47,"input",16)(48,"mat-datepicker-toggle",13)(49,"mat-datepicker",null,3),r()(),l(51,"mat-autocomplete",17,4),Se(53,DAe,2,5,"mat-option",10,Pe),p(55,"async"),r(),l(56,"div",18)(57,"table",19),X(58,20),F(59,EAe,3,3,"th",21)(60,IAe,2,1,"td",22),Z(),X(61,23),F(62,OAe,3,3,"th",21)(63,AAe,2,1,"td",22),Z(),X(64,24),F(65,FAe,3,3,"th",21)(66,kAe,2,1,"td",22),Z(),X(67,25),F(68,BAe,3,3,"th",21)(69,RAe,3,3,"td",22),Z(),X(70,26),F(71,NAe,3,3,"th",27)(72,LAe,2,1,"td",22),Z(),X(73,28),F(74,VAe,3,3,"th",27)(75,qAe,2,1,"td",22),Z(),X(76,29),F(77,zAe,3,3,"th",27)(78,HAe,3,3,"td",22),Z(),X(79,30),F(80,GAe,3,3,"th",21)(81,jAe,2,1,"td",22),Z(),X(82,31),F(83,$Ae,3,3,"th",21)(84,UAe,2,1,"td",22),Z(),X(85,32),F(86,WAe,3,3,"th",21)(87,QAe,2,1,"td",22),Z(),X(88,33),F(89,YAe,3,3,"th",21)(90,KAe,2,1,"td",22),Z(),X(91,34),F(92,XAe,3,3,"th",21)(93,e7e,2,1,"td",22),Z(),F(94,t7e,1,0,"tr",35)(95,i7e,1,3,"tr",36),r(),b(96,"mat-paginator",37),p(97,"async"),r()}if(n&2){let s=xe(21),d=xe(29),u=xe(42),f=xe(50),_=xe(52);a(3),h(m(4,40,"labels.inputs.Office Name")),a(2),g("formControl",i.officeName)("matAutocomplete",_),a(),g("inputFormControl",i.glAccount)("glAccountList",i.glAccountData)("required",!0)("inputLabel","GL Account Name or Code"),a(3),h(m(10,42,"labels.inputs.Filter")),a(2),g("formControl",i.entryTypeFilter),a(),we(i.entryTypeFilterData),a(4),h(m(17,44,"labels.inputs.Transaction Date From")),a(2),g("min",i.minDate)("max",i.maxDate)("matDatepicker",s)("formControl",i.transactionDateFrom),a(),g("for",s),a(5),h(m(25,46,"labels.inputs.Transaction Date To")),a(2),g("min",i.minDate)("max",i.maxDate)("matDatepicker",d)("formControl",i.transactionDateTo),a(),g("for",d),a(5),h(m(33,48,"labels.inputs.Transaction ID")),a(2),g("formControl",i.transactionId),a(3),h(m(38,50,"labels.inputs.Submitted on Date From")),a(2),g("max",i.submittedOnDateTo.value)("matDatepicker",u)("formControl",i.submittedOnDateFrom),a(),g("for",u),a(5),v("",m(46,52,"labels.inputs.Submitted on Date To")," "),a(2),g("min",i.submittedOnDateFrom.value)("matDatepicker",f)("formControl",i.submittedOnDateTo),a(),g("for",f),a(3),g("displayWith",i.displayOfficeName),a(2),we(m(55,54,i.filteredOfficeData)),a(4),g("dataSource",i.dataSource),a(37),g("matHeaderRowDef",i.displayedColumns),a(),g("matRowDefColumns",i.displayedColumns),a(),g("length",m(97,56,i.dataSource==null?null:i.dataSource.records$))("pageSize",50)("pageSizeOptions",oe(58,wAe))}},dependencies:[ue,fe,st,Ue,_n,Ae,Fe,Be,ai,ze,gt,ft,mi,di,pi,er,ta,Za,_t,It,xt,vt,bt,ri,Ct,yt,St,Pt,wt,Tt,kt,Xa,Pi,he,Jr,On],styles:["table[_ngcontent-%COMP%]{width:100%;box-shadow:0 2px 4px #0000001a;border:1px solid var(--border-color, #ddd);border-radius:8px;transition:background-color .3s ease,border-color .3s ease}table[_ngcontent-%COMP%] .select-row[_ngcontent-%COMP%]:hover{cursor:pointer}.filter-container[_ngcontent-%COMP%]{margin-bottom:1rem;padding:1.5rem;box-shadow:0 2px 4px #0000001a;border:1px solid var(--border-color, #ddd);border-radius:8px;transition:background-color .3s ease,border-color .3s ease}.table-container[_ngcontent-%COMP%]{box-shadow:0 2px 4px #0000001a;border:1px solid var(--border-color, #ddd);border-radius:8px;transition:background-color .3s ease,border-color .3s ease}"]})}}return e})();var n7e=["buttonDefineMapping"],o7e=["templateButtonDefineMapping"],a7e=["activitiesTable"],r7e=["templateActivitiesTable"],l7e=()=>[10,25],s7e=()=>["create"],c7e=e=>["view",e];function p7e(e,o){e&1&&(l(0,"button",17),b(1,"fa-icon",18),c(2),p(3,"translate"),r()),e&2&&(g("routerLink",oe(4,s7e)),a(2),v(" ",m(3,2,"labels.buttons.Define New Mapping")," "))}function m7e(e,o){e&1&&(l(0,"th",19),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.Financial Activity")))}function d7e(e,o){if(e&1&&(l(0,"td",20),c(1),p(2,"translate"),r()),e&2){let t=o.$implicit;a(),le(" (",t.financialActivityData.id,") ",m(2,2,"labels.accounting.financialActivity."+t.financialActivityData.name)," ")}}function u7e(e,o){e&1&&(l(0,"th",19),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.Account Type")))}function f7e(e,o){if(e&1&&(l(0,"td",20),c(1),p(2,"translate"),r()),e&2){let t=o.$implicit;a(),v(" ",m(2,1,"labels.inputs.accounting."+t.financialActivityData.mappedGLAccountType)," ")}}function h7e(e,o){e&1&&(l(0,"th",19),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.Account Code")))}function g7e(e,o){if(e&1&&(l(0,"td",20),c(1),r()),e&2){let t=o.$implicit;a(),h(t.glAccountData.glCode)}}function _7e(e,o){e&1&&(l(0,"th",19),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.Account Name")))}function C7e(e,o){if(e&1&&(l(0,"td",20),c(1),r()),e&2){let t=o.$implicit;a(),h(t.glAccountData.name)}}function v7e(e,o){e&1&&b(0,"tr",21)}function x7e(e,o){if(e&1&&b(0,"tr",22),e&2){let t=o.$implicit;g("routerLink",Nt(1,c7e,t.id))}}function b7e(e,o){if(e&1){let t=Y();l(0,"h2"),c(1),p(2,"translate"),r(),l(3,"p",23),c(4),p(5,"translate"),r(),l(6,"div",24)(7,"button",25),R("click",function(){let i=V(t).popover,s=w();return i.close(),q(s.configurationWizardService.closeConfigWizard())}),c(8),p(9,"translate"),r(),l(10,"button",26),R("click",function(){let i=V(t).popover,s=w();return i.close(),q(s.previousStep())}),c(11),p(12,"translate"),r(),l(13,"button",26),R("click",function(){let i=V(t).popover,s=w(),d=xe(5),u=xe(25);return i.close(),q(s.showPopover(u,d,"top",!0))}),c(14),p(15,"translate"),r()()}e&2&&(a(),h(m(2,5,"labels.heading.Define New Mapping")),a(3),h(m(5,7,"labels.text.To define new mapping.")),a(4),v(" ",m(9,9,"labels.buttons.Close")," "),a(3),v(" ",m(12,11,"labels.buttons.Back")," "),a(3),v(" ",m(15,13,"labels.buttons.Next")," "))}function y7e(e,o){if(e&1){let t=Y();l(0,"h4",23),c(1),p(2,"translate"),l(3,"a",27),c(4),p(5,"translate"),r()(),l(6,"div",24)(7,"button",25),R("click",function(){let i=V(t).popover,s=w();return i.close(),q(s.configurationWizardService.closeConfigWizard())}),c(8),p(9,"translate"),r(),l(10,"button",26),R("click",function(){let i=V(t).popover,s=w(),d=xe(2),u=xe(23);return i.close(),q(s.showPopover(u,d,"bottom",!0))}),c(11),p(12,"translate"),r(),l(13,"button",26),R("click",function(){let i=V(t).popover,s=w();return i.close(),q(s.nextStep())}),c(14),p(15,"translate"),r()()}e&2&&(a(),v(" ",m(2,5,"labels.heading.Account Linked Financial")," "),a(3),h(m(5,7,"labels.heading.Accounts linked to Financial Activities")),a(4),v(" ",m(9,9,"labels.buttons.Close")," "),a(3),v(" ",m(12,11,"labels.buttons.Back")," "),a(3),v(" ",m(15,13,"labels.buttons.Next")," "))}var _v=(()=>{class e{constructor(){this.route=T(Ie),this.router=T(qe),this.configurationWizardService=T(Qi),this.popoverService=T(Wi),this.displayedColumns=["financialActivity","glAccountType","glAccountCode","glAccountName"],this.route.data.subscribe(t=>{this.financialActivityAccountData=t.financialActivityAccounts})}ngOnInit(){this.setFinancialActivityAccounts()}setFinancialActivityAccounts(){this.dataSource=new Wt(this.financialActivityAccountData),this.dataSource.paginator=this.paginator,this.dataSource.sortingDataAccessor=(t,n)=>{switch(n){case"financialActivity":return t.financialActivityData.name;case"glAccountName":return t.glAccountData.name;case"glAccountCode":return t.glAccountData.glCode;default:return t[n]}},this.dataSource.sort=this.sort}showPopover(t,n,i,s){setTimeout(()=>this.popoverService.open(t,n,i,s,{}),200)}ngAfterViewInit(){this.configurationWizardService.showAccountsLinkedPage===!0&&setTimeout(()=>{this.showPopover(this.templateButtonDefineMapping,this.buttonDefineMapping.nativeElement,"bottom",!0)}),this.configurationWizardService.showAccountsLinkedList===!0&&setTimeout(()=>{this.showPopover(this.templateActivitiesTable,this.activitiesTable.nativeElement,"top",!0)})}nextStep(){this.configurationWizardService.showAccountsLinkedPage=!1,this.configurationWizardService.showAccountsLinkedList=!1,this.configurationWizardService.showMigrateOpeningBalances=!0,this.router.navigate(["/accounting"])}previousStep(){this.configurationWizardService.showAccountsLinkedPage=!1,this.configurationWizardService.showAccountsLinkedList=!1,this.configurationWizardService.showAccountsLinked=!0,this.router.navigate(["/accounting"])}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275cmp=me({type:e,selectors:[["mifosx-financial-activity-mappings"]],viewQuery:function(n,i){if(n&1&&(Ee(kt,7),Ee(It,7),Ee(n7e,5),Ee(o7e,5),Ee(a7e,5),Ee(r7e,5)),n&2){let s;Te(s=Me())&&(i.paginator=s.first),Te(s=Me())&&(i.sort=s.first),Te(s=Me())&&(i.buttonDefineMapping=s.first),Te(s=Me())&&(i.templateButtonDefineMapping=s.first),Te(s=Me())&&(i.activitiesTable=s.first),Te(s=Me())&&(i.templateActivitiesTable=s.first)}},decls:26,vars:6,consts:[["buttonDefineMapping",""],["activitiesTable",""],["templateButtonDefineMapping",""],["templateActivitiesTable",""],[1,"layout-row","align-end","container","m-b-20"],["mat-raised-button","","color","primary",3,"routerLink",4,"mifosxHasPermission"],[1,"mat-elevation-z8","container"],["mat-table","","matSort","",3,"dataSource"],["matColumnDef","financialActivity"],["mat-header-cell","","mat-sort-header","",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","glAccountType"],["matColumnDef","glAccountCode"],["matColumnDef","glAccountName"],["mat-header-row","",4,"matHeaderRowDef"],["mat-row","","class","select-row",3,"routerLink",4,"matRowDef","matRowDefColumns"],["showFirstLastButtons","",3,"pageSizeOptions"],["mat-raised-button","","color","primary",3,"routerLink"],["icon","plus",1,"m-r-10"],["mat-header-cell","","mat-sort-header",""],["mat-cell",""],["mat-header-row",""],["mat-row","",1,"select-row",3,"routerLink"],[1,"mw300"],[1,"layout-row","align-end","gap-2px","responsive-column"],["mat-raised-button","","color","warn",3,"click"],["mat-raised-button","","color","primary",3,"click"],["href","https://mifosforge.jira.com/wiki/spaces/docs/pages/106430472/Accounts+linked+to+Financial+Activities","target","_blank"]],template:function(n,i){n&1&&(l(0,"div",4)(1,"div",null,0),F(3,p7e,4,5,"button",5),r()(),l(4,"div",6,1)(6,"table",7),X(7,8),F(8,m7e,3,3,"th",9)(9,d7e,3,4,"td",10),Z(),X(10,11),F(11,u7e,3,3,"th",9)(12,f7e,3,3,"td",10),Z(),X(13,12),F(14,h7e,3,3,"th",9)(15,g7e,2,1,"td",10),Z(),X(16,13),F(17,_7e,3,3,"th",9)(18,C7e,2,1,"td",10),Z(),F(19,v7e,1,0,"tr",14)(20,x7e,1,3,"tr",15),r(),b(21,"mat-paginator",16),r(),F(22,b7e,16,15,"ng-template",null,2,ti)(24,y7e,16,15,"ng-template",null,3,ti)),n&2&&(a(3),g("mifosxHasPermission","CREATE_FINANCIALACTIVITYACCOUNT"),a(3),g("dataSource",i.dataSource),a(13),g("matHeaderRowDef",i.displayedColumns),a(),g("matRowDefColumns",i.displayedColumns),a(),g("pageSizeOptions",oe(5,l7e)))},dependencies:[ue,fe,Ae,ve,Ke,ke,_t,It,xt,vt,bt,ri,Ct,yt,St,Pt,wt,Tt,kt,he],styles:["table[_ngcontent-%COMP%]{width:100%}table[_ngcontent-%COMP%] .select-row[_ngcontent-%COMP%]:hover{cursor:pointer}"]})}}return e})();var S7e=()=>["../"];function w7e(e,o){if(e&1&&(l(0,"mat-option",4),c(1),p(2,"translate"),r()),e&2){let t=o.$implicit;g("value",t.id),a(),le(" (",t.id,") ",m(2,3,"labels.accounting.financialActivity."+t.name)," ")}}function P7e(e,o){e&1&&(l(0,"mat-error"),c(1),p(2,"translate"),p(3,"translate"),l(4,"strong"),c(5),p(6,"translate"),r()()),e&2&&(a(),le(" ",m(2,3,"labels.inputs.Financial Activity")," ",m(3,5,"labels.commons.is")," "),a(4),h(m(6,7,"labels.commons.required")))}function T7e(e,o){if(e&1&&(l(0,"button",9),c(1),p(2,"translate"),r()),e&2){let t=w();g("disabled",!t.financialActivityMappingForm.valid),a(),v(" ",m(2,2,"labels.buttons.Submit")," ")}}var Cv=(()=>{class e{constructor(){this.formBuilder=T(nt),this.accountingService=T(Ui),this.route=T(Ie),this.router=T(qe),this.glAccountData=[],this.route.data.subscribe(t=>{this.glAccountOptions=t.financialActivityAccountsTemplate.glAccountOptions,this.financialActivityData=t.financialActivityAccountsTemplate.financialActivityOptions})}ngOnInit(){this.createFinancialActivityMappingForm(),this.setGlAccountData()}createFinancialActivityMappingForm(){this.financialActivityMappingForm=this.formBuilder.group({financialActivityId:["",se.required],glAccountId:["",se.required]})}setGlAccountData(){this.financialActivityMappingForm.get("financialActivityId").valueChanges.subscribe(t=>{switch(t){case 100:case 101:case 102:case 103:this.glAccountData=this.glAccountOptions.assetAccountOptions;break;case 200:case 201:this.glAccountData=this.glAccountOptions.liabilityAccountOptions;break;case 300:this.glAccountData=this.glAccountOptions.equityAccountOptions;break}})}submit(){this.accountingService.createFinancialActivityAccount(this.financialActivityMappingForm.value).subscribe(t=>{this.router.navigate(["../view",t.resourceId],{relativeTo:this.route})})}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275cmp=me({type:e,selectors:[["mifosx-create-financial-activity-mapping"]],decls:19,vars:15,consts:[[1,"container"],[3,"ngSubmit","formGroup"],[1,"layout-column"],["required","","formControlName","financialActivityId"],[3,"value"],[3,"inputFormControl","glAccountList","required","inputLabel"],[1,"layout-row","align-center","gap-5px","responsive-column"],["type","button","mat-raised-button","",3,"routerLink"],["mat-raised-button","","color","primary",3,"disabled",4,"mifosxHasPermission"],["mat-raised-button","","color","primary",3,"disabled"]],template:function(n,i){n&1&&(l(0,"div",0)(1,"mat-card")(2,"form",1),R("ngSubmit",function(){return i.submit()}),l(3,"mat-card-content")(4,"div",2)(5,"mat-form-field")(6,"mat-label"),c(7),p(8,"translate"),r(),l(9,"mat-select",3),Se(10,w7e,3,5,"mat-option",4,Pe),r(),E(12,P7e,7,9,"mat-error"),r(),b(13,"mifosx-gl-account-selector",5),r()(),l(14,"mat-card-actions",6)(15,"button",7),c(16),p(17,"translate"),r(),F(18,T7e,3,4,"button",8),r()()()()),n&2&&(a(2),g("formGroup",i.financialActivityMappingForm),a(5),h(m(8,10,"labels.inputs.Financial Activity")),a(3),we(i.financialActivityData),a(2),I(i.financialActivityMappingForm.controls.financialActivityId.hasError("required")?12:-1),a(),g("inputFormControl",i.financialActivityMappingForm.controls.glAccountId)("glAccountList",i.glAccountData)("required",!0)("inputLabel","Account"),a(2),g("routerLink",oe(14,S7e)),a(),v(" ",m(17,12,"labels.buttons.Cancel")," "),a(2),g("mifosxHasPermission","CREATE_FINANCIALACTIVITYACCOUNT"))},dependencies:[ue,fe,tt,Ue,Xe,dt,Ze,et,Ae,$e,Je,Et,Fe,Be,ut,gt,ft,ve,Ke,ta,he],styles:[".container[_ngcontent-%COMP%]{max-width:37rem}"]})}}return e})();var M7e=()=>["../.."],D7e=()=>["edit"];function E7e(e,o){e&1&&(l(0,"button",10),b(1,"fa-icon",11),c(2),p(3,"translate"),r()),e&2&&(g("routerLink",oe(4,D7e)),a(2),v(" ",m(3,2,"labels.buttons.Edit")," "))}function I7e(e,o){if(e&1){let t=Y();l(0,"button",12),R("click",function(){V(t);let i=w();return q(i.deleteFinancialActivityAccount())}),b(1,"fa-icon",13),c(2),p(3,"translate"),r()}e&2&&(a(2),v(" ",m(3,1,"labels.buttons.Delete")," "))}var vv=(()=>{class e{constructor(){this.accountingService=T(Ui),this.route=T(Ie),this.router=T(qe),this.dialog=T(Ht),this.location=T(C0),this.route.data.subscribe(t=>{this.financialActivityAccount=t.financialActivityAccount,this.financialActivityAccountId=t.financialActivityAccount.id})}deleteFinancialActivityAccount(){this.dialog.open(vi,{data:{deleteContext:`financial activity mapping ${this.financialActivityAccountId}`}}).afterClosed().subscribe(n=>{n.delete&&this.accountingService.deleteFinancialActivityAccount(this.financialActivityAccountId).subscribe(()=>{this.router.navigate(["/accounting/financial-activity-mappings"])})})}goBack(){this.location.back()}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275cmp=me({type:e,selectors:[["mifosx-view-financial-activity-mapping"]],decls:24,vars:22,consts:[[1,"layout-row","align-end","gap-2percent","container","m-b-20"],["mat-raised-button","","color","primary",3,"routerLink",4,"mifosxHasPermission"],["mat-raised-button","","color","warn",3,"click",4,"mifosxHasPermission"],[1,"container"],[1,"layout-row-wrap"],[1,"flex-50","header"],[1,"flex-50"],[1,"flex-100",3,"glAccount","accountTitle"],[1,"layout-row","align-center","gap-5px","responsive-column"],["type","button","color","primary","mat-raised-button","",3,"routerLink"],["mat-raised-button","","color","primary",3,"routerLink"],["icon","edit",1,"m-r-10"],["mat-raised-button","","color","warn",3,"click"],["icon","trash",1,"m-r-10"]],template:function(n,i){n&1&&(l(0,"div",0),F(1,E7e,4,5,"button",1)(2,I7e,4,3,"button",2),r(),l(3,"div",3)(4,"mat-card")(5,"mat-card-content")(6,"div",4)(7,"div",5),c(8),p(9,"translate"),r(),l(10,"div",6),c(11),p(12,"translate"),r(),l(13,"div",5),c(14),p(15,"translate"),r(),l(16,"div",6),c(17),p(18,"translate"),r(),b(19,"mifosx-gl-account-display",7),r()(),l(20,"mat-card-actions",8)(21,"button",9),c(22),p(23,"translate"),r()()()()),n&2&&(a(),g("mifosxHasPermission","UPDATE_FINANCIALACTIVITYACCOUNT"),a(),g("mifosxHasPermission","DELETE_FINANCIALACTIVITYACCOUNT"),a(6),v(" ",m(9,11,"labels.inputs.Financial Activity")," "),a(3),le(" (",i.financialActivityAccount==null?null:i.financialActivityAccount.financialActivityData.id,") ",m(12,13,"labels.accounting.financialActivity."+(i.financialActivityAccount==null?null:i.financialActivityAccount.financialActivityData.name))," "),a(3),v(" ",m(15,15,"labels.inputs.Account Type")," "),a(3),v(" ",m(18,17,"labels.inputs.accounting."+(i.financialActivityAccount==null?null:i.financialActivityAccount.financialActivityData.mappedGLAccountType))," "),a(2),g("glAccount",i.financialActivityAccount==null?null:i.financialActivityAccount.glAccountData)("accountTitle","Account Name"),a(2),g("routerLink",oe(21,M7e)),a(),v(" ",m(23,19,"labels.buttons.Back")," "))},dependencies:[ue,fe,Ae,$e,Je,Et,ve,Ke,ke,rs,he],styles:[".container[_ngcontent-%COMP%]{max-width:37rem}.container[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] div[_ngcontent-%COMP%]{margin:1rem 0;word-wrap:break-word}.container[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] div.header[_ngcontent-%COMP%]{font-weight:500}"]})}}return e})();var O7e=()=>["../"];function A7e(e,o){if(e&1&&(l(0,"mat-option",4),c(1),p(2,"translate"),r()),e&2){let t=o.$implicit;g("value",t.id),a(),le(" (",t.id,") ",m(2,3,"labels.accounting.financialActivity."+t.name)," ")}}function F7e(e,o){if(e&1&&(l(0,"button",9),c(1),p(2,"translate"),r()),e&2){let t=w();g("disabled",t.financialActivityMappingForm.pristine),a(),v(" ",m(2,2,"labels.buttons.Submit")," ")}}var xv=(()=>{class e{constructor(){this.formBuider=T(nt),this.accountingService=T(Ui),this.route=T(Ie),this.router=T(qe),this.glAccountData=[],this.route.data.subscribe(t=>{this.financialActivityAccountId=t.financialActivityAccountAndTemplate.id,this.financialActivityId=t.financialActivityAccountAndTemplate.financialActivityData.id,this.glAccountId=t.financialActivityAccountAndTemplate.glAccountData.id,this.glAccountOptions=t.financialActivityAccountAndTemplate.glAccountOptions,this.financialActivityData=t.financialActivityAccountAndTemplate.financialActivityOptions})}ngOnInit(){this.createFinancialActivityMappingForm(),this.setGLAccountData(),this.financialActivityMappingForm.get("financialActivityId").setValue(this.financialActivityId),this.financialActivityMappingForm.get("glAccountId").setValue(this.glAccountId)}createFinancialActivityMappingForm(){this.financialActivityMappingForm=this.formBuider.group({financialActivityId:["",se.required],glAccountId:["",se.required]})}setGLAccountData(){this.financialActivityMappingForm.get("financialActivityId").valueChanges.subscribe(t=>{switch(t){case 100:case 101:case 102:case 103:this.glAccountData=this.glAccountOptions.assetAccountOptions;break;case 200:case 201:this.glAccountData=this.glAccountOptions.liabilityAccountOptions;break;case 300:this.glAccountData=this.glAccountOptions.equityAccountOptions;break}})}submit(){this.accountingService.updateFinancialActivityAccount(this.financialActivityAccountId,this.financialActivityMappingForm.value).subscribe(t=>{this.router.navigate(["../../",t.resourceId],{relativeTo:this.route})})}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275cmp=me({type:e,selectors:[["mifosx-edit-financial-activity-mapping"]],decls:18,vars:14,consts:[[1,"container"],[3,"ngSubmit","formGroup"],[1,"layout-column"],["required","","formControlName","financialActivityId"],[3,"value"],[3,"inputFormControl","glAccountList","required","inputLabel"],[1,"layout-row","align-center","gap-5px","responsive-column"],["type","button","mat-raised-button","",3,"routerLink"],["mat-raised-button","","color","primary",3,"disabled",4,"mifosxHasPermission"],["mat-raised-button","","color","primary",3,"disabled"]],template:function(n,i){n&1&&(l(0,"div",0)(1,"mat-card")(2,"form",1),R("ngSubmit",function(){return i.submit()}),l(3,"mat-card-content")(4,"div",2)(5,"mat-form-field")(6,"mat-label"),c(7),p(8,"translate"),r(),l(9,"mat-select",3),Se(10,A7e,3,5,"mat-option",4,Pe),r()(),b(12,"mifosx-gl-account-selector",5),r()(),l(13,"mat-card-actions",6)(14,"button",7),c(15),p(16,"translate"),r(),F(17,F7e,3,4,"button",8),r()()()()),n&2&&(a(2),g("formGroup",i.financialActivityMappingForm),a(5),h(m(8,9,"labels.inputs.Financial Activity")),a(3),we(i.financialActivityData),a(2),g("inputFormControl",i.financialActivityMappingForm.controls.glAccountId)("glAccountList",i.glAccountData)("required",!0)("inputLabel","Account"),a(2),g("routerLink",oe(13,O7e)),a(),v(" ",m(16,11,"labels.buttons.Cancel")," "),a(2),g("mifosxHasPermission","UPDATE_FINANCIALACTIVITYACCOUNT"))},dependencies:[ue,fe,tt,Ue,Xe,dt,Ze,et,Ae,$e,Je,Et,Fe,Be,gt,ft,ve,Ke,ta,he],styles:[".container[_ngcontent-%COMP%]{max-width:37rem}"]})}}return e})();var CN=e=>{let o=e.controls.debit.value,t=e.controls.credit.value;return o&&t&&o>0&&t>0?{error:!0}:null};var k7e=["searchFormRef"],B7e=["templateSearchFormRef"],R7e=()=>["../"];function N7e(e,o){if(e&1&&(l(0,"mat-option",9),c(1),r()),e&2){let t=o.$implicit;g("value",t.id),a(),v(" ",t.name," ")}}function L7e(e,o){e&1&&(l(0,"mat-error"),c(1),p(2,"translate"),p(3,"translate"),l(4,"strong"),c(5),p(6,"translate"),r()()),e&2&&(a(),le(" ",m(2,3,"labels.inputs.Office")," ",m(3,5,"labels.commons.is")," "),a(4),h(m(6,7,"labels.commons.required")))}function V7e(e,o){if(e&1&&(l(0,"mat-option",9),c(1),r()),e&2){let t=o.$implicit;g("value",t.code),a(),v(" ",t.displayLabel," ")}}function q7e(e,o){e&1&&(l(0,"mat-error"),c(1),p(2,"translate"),p(3,"translate"),l(4,"strong"),c(5),p(6,"translate"),r()()),e&2&&(a(),le(" ",m(2,3,"labels.inputs.Currency")," ",m(3,5,"labels.commons.is")," "),a(4),h(m(6,7,"labels.commons.required")))}function z7e(e,o){e&1&&(l(0,"mat-error"),c(1),p(2,"translate"),p(3,"translate"),l(4,"strong"),c(5),p(6,"translate"),r()()),e&2&&(a(),le(" ",m(2,3,"labels.inputs.Opening Balances Date")," ",m(3,5,"labels.commons.is")," "),a(4),h(m(6,7,"labels.commons.required")))}function H7e(e,o){if(e&1&&(l(0,"div",25)(1,"div",26)(2,"div",27),c(3),r(),l(4,"div",28),c(5),r(),l(6,"div",29),c(7),r(),l(8,"div",30)(9,"mat-form-field")(10,"mat-label"),c(11),p(12,"translate"),r(),b(13,"input",31),r()(),l(14,"div",30)(15,"mat-form-field")(16,"mat-label"),c(17),p(18,"translate"),r(),b(19,"input",32),r()()()()),e&2){let t=o.$index,n=w(2);a(),g("formGroupName",t),a(2),v(" ",n.openingBalancesData.glAccounts[t].glAccountType.value!==(n.openingBalancesData.glAccounts[t-1]==null?null:n.openingBalancesData.glAccounts[t-1].glAccountType.value)?n.glAccountTypeLabel(n.openingBalancesData.glAccounts[t].glAccountType.value):""," "),a(2),v(" ",n.openingBalancesData.glAccounts[t].glAccountCode," "),a(2),v(" ",n.openingBalancesData.glAccounts[t].glAccountName," "),a(4),h(m(12,6,"labels.inputs.Debit")),a(6),h(m(18,8,"labels.inputs.Credit"))}}function G7e(e,o){if(e&1){let t=Y();l(0,"div",12),b(1,"mifosx-gl-account-display",14),l(2,"mat-form-field",15)(3,"mat-label"),c(4),p(5,"translate"),r(),l(6,"mat-select",16),Se(7,V7e,2,2,"mat-option",9,Pe),r(),E(9,q7e,7,9,"mat-error"),r(),l(10,"mat-form-field",17),R("click",function(){V(t);let i=xe(17);return q(i.open())}),l(11,"mat-label"),c(12),p(13,"translate"),r(),b(14,"input",18)(15,"mat-datepicker-toggle",19)(16,"mat-datepicker",null,2),E(18,z7e,7,9,"mat-error"),r(),l(19,"div",20)(20,"div",21),c(21),p(22,"translate"),r(),l(23,"div",22),c(24),p(25,"translate"),r(),l(26,"div",22),c(27),p(28,"translate"),p(29,"translate"),r(),l(30,"div",23),c(31),p(32,"translate"),p(33,"currency"),r(),l(34,"div",24),c(35),p(36,"translate"),p(37,"currency"),r()(),Se(38,H7e,20,10,"div",25,Pe),r()}if(e&2){let t=xe(17),n=w();a(),g("accountTitle","Opening Balances Contra Account")("glAccount",n.openingBalancesData.contraAccount)("withTitle","50%"),a(3),h(m(5,19,"labels.inputs.Currency")),a(3),we(n.currencyData),a(2),I(n.openingBalancesForm.controls.currencyCode.hasError("required")?9:-1),a(3),h(m(13,21,"labels.inputs.Opening Balances Date")),a(2),g("min",n.minDate)("max",n.maxDate)("matDatepicker",t),a(),g("for",t),a(3),I(n.openingBalancesForm.controls.transactionDate.hasError("required")?18:-1),a(3),v(" ",m(22,23,"labels.inputs.Type")," "),a(3),v(" ",m(25,25,"labels.inputs.GL Code")," "),a(3),le(" ",m(28,27,"labels.inputs.GL Name")," ",m(29,29,"labels.inputs.Account")," "),a(4),le(" ",m(32,31,"labels.inputs.Total Debit"),": ",$t(33,33,n.debitsSum,n.currencyCode,"symbol-narrow","1.2-2")," "),a(4),le(" ",m(36,38,"labels.inputs.Total Credit"),": ",$t(37,40,n.creditsSum,n.currencyCode,"symbol-narrow","1.2-2")," "),a(3),we(n.glAccountEntries.controls)}}function j7e(e,o){if(e&1&&(l(0,"button",35),c(1),p(2,"translate"),r()),e&2){let t=w(2);g("disabled",!t.openingBalancesForm.valid),a(),v(" ",m(2,2,"labels.buttons.Submit")," ")}}function $7e(e,o){e&1&&(l(0,"mat-card-actions",13)(1,"button",33),c(2),p(3,"translate"),r(),F(4,j7e,3,4,"button",34),r()),e&2&&(a(),g("routerLink",oe(5,R7e)),a(),v(" ",m(3,3,"labels.buttons.Cancel")," "),a(2),g("mifosxHasPermission","DEFINEOPENINGBALANCE_JOURNALENTRY"))}function U7e(e,o){if(e&1){let t=Y();l(0,"h2"),c(1),p(2,"translate"),r(),l(3,"p",36),c(4),p(5,"translate"),l(6,"a",37),c(7),p(8,"translate"),r()(),l(9,"div",38)(10,"button",39),R("click",function(){let i=V(t).popover,s=w();return i.close(),q(s.configurationWizardService.closeConfigWizard())}),c(11),p(12,"translate"),r(),l(13,"button",11),R("click",function(){let i=V(t).popover,s=w();return i.close(),i.close(),q(s.previousStep())}),c(14),p(15,"translate"),r(),l(16,"button",11),R("click",function(){let i=V(t).popover,s=w();return i.close(),i.close(),q(s.nextStep())}),c(17),p(18,"translate"),r()()}e&2&&(a(),h(m(2,6,"labels.heading.Migrate opening balances (Office-wise)")),a(3),v(" ",m(5,8,"labels.text.Migrate Opening Balances")," "),a(3),h(m(8,10,"labels.inputs.Migrate opening balances (Office-wise)")),a(4),v(" ",m(12,12,"labels.buttons.Close")," "),a(3),v(" ",m(15,14,"labels.buttons.Back")," "),a(3),v(" ",m(18,16,"labels.buttons.Next")," "))}var bv=(()=>{class e{constructor(){this.formBuilder=T(nt),this.accountingService=T(Ui),this.settingsService=T(At),this.dateUtils=T(Zt),this.route=T(Ie),this.router=T(qe),this.configurationWizardService=T(Qi),this.popoverService=T(Wi),this.translateService=T(yi),this.minDate=new Date(2e3,0,1),this.maxDate=new Date,this.debitsSum=0,this.creditsSum=0,this.route.data.subscribe(t=>{this.officeData=t.offices,this.currencyData=t.currencies.selectedCurrencyOptions})}ngOnInit(){this.maxDate=this.settingsService.businessDate,this.createOpeningBalancesForm()}createOpeningBalancesForm(){this.openingBalancesForm=this.formBuilder.group({officeId:["",se.required],currencyCode:["",se.required],transactionDate:["",se.required],glAccountEntries:this.formBuilder.array([])}),this.openingBalancesForm.controls.currencyCode.valueChanges.subscribe(t=>{this.currencyCode=t})}createGLAccountEntryForm(t){return this.formBuilder.group({glAccountId:[t.glAccountId],debit:[null],credit:[null]},{validator:CN})}get glAccountEntries(){return this.openingBalancesForm.get("glAccountEntries")}retrieveOpeningBalances(){this.accountingService.retrieveOpeningBalances(this.openingBalancesForm.value.officeId).subscribe(t=>{let n=this.openingBalancesForm.get("glAccountEntries");t.glAccounts=t.assetAccountOpeningBalances.concat(t.liabityAccountOpeningBalances,t.equityAccountOpeningBalances,t.incomeAccountOpeningBalances,t.expenseAccountOpeningBalances),t.glAccounts.forEach(i=>{n.push(this.createGLAccountEntryForm(i))}),this.openingBalancesData=t,n.valueChanges.subscribe(()=>{this.debitsSum=0,this.creditsSum=0,n.controls.forEach(i=>{this.debitsSum+=i.value.debit,this.creditsSum+=i.value.credit})})})}submit(){if(this.amountsAreOK()){let t=this.openingBalancesForm.value;t.locale=this.settingsService.language.code,t.dateFormat=this.settingsService.dateFormat,t.transactionDate instanceof Date&&(t.transactionDate=this.dateUtils.formatDate(t.transactionDate,this.settingsService.dateFormat)),t.debits=[],t.credits=[],this.openingBalancesForm.value.glAccountEntries.forEach(n=>{n.debit&&t.debits.push({glAccountId:n.glAccountId,amount:n.debit}),n.credit&&t.credits.push({glAccountId:n.glAccountId,amount:n.credit})}),delete t.glAccountEntries,this.accountingService.defineOpeningBalances(t).subscribe(n=>{this.router.navigate(["/accounting/journal-entries/transactions/view",n.transactionId])})}}showPopover(t,n,i,s){setTimeout(()=>this.popoverService.open(t,n,i,s,{}),200)}ngAfterViewInit(){this.configurationWizardService.showMigrateOpeningBalances===!0&&setTimeout(()=>{this.showPopover(this.templateSearchFormRef,this.searchFormRef.nativeElement,"bottom",!0)})}nextStep(){this.configurationWizardService.showMigrateOpeningBalances=!1,this.configurationWizardService.showClosingEntries=!0,this.router.navigate(["/accounting"])}previousStep(){this.router.navigate(["/accounting"])}amountsAreOK(){let t=0,n=0;return this.openingBalancesForm.value.glAccountEntries.forEach(i=>{i.debit&&(t=t+i.debit),i.credit&&(n=n+i.credit)}),t>0&&t===n}glAccountTypeLabel(t){return this.translateService.instant("labels.inputs.accounting."+t)}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275cmp=me({type:e,selectors:[["mifosx-migrate-opening-balances"]],viewQuery:function(n,i){if(n&1&&(Ee(k7e,5),Ee(B7e,5)),n&2){let s;Te(s=Me())&&(i.searchFormRef=s.first),Te(s=Me())&&(i.templateSearchFormRef=s.first)}},decls:23,vars:10,consts:[["searchFormRef",""],["templateSearchFormRef",""],["openingBalancesDatePicker",""],[1,"container"],[3,"ngSubmit","formGroup"],[1,"layout-row-wrap","responsive-column","gap-2px"],[1,"m-r-30","flex-83"],[1,"flex-96"],["required","","formControlName","officeId"],[3,"value"],[1,"flex-15"],["mat-raised-button","","color","primary",3,"click"],[1,"layout-row-wrap","gap-2percent","responsive-column"],[1,"layout-row","gap-5px","align-center","responsive-column"],[1,"flex-100",3,"accountTitle","glAccount","withTitle"],[1,"flex-48"],["required","","formControlName","currencyCode"],[1,"flex-48",3,"click"],["matInput","","required","","formControlName","transactionDate",3,"min","max","matDatepicker"],["matSuffix","",3,"for"],[1,"layout-row-wrap","gap-2percent","responsive-column","flex-100","content"],[1,"header","flex-8"],[1,"header","flex-18"],[1,"header","r-amount","flex-18"],[1,"header","r-amount","flex-23"],["formArrayName","glAccountEntries",1,"flex-fill","layout-row-wrap","responsive-column","content"],[1,"flex-fill","layout-row-wrap","gap-2percent","responsive-column",3,"formGroupName"],[1,"flex-8"],[1,"flex-13"],[1,"flex-29"],[1,"flex-20"],["matInput","","type","number","formControlName","debit"],["matInput","","type","number","formControlName","credit"],["type","button","mat-raised-button","",3,"routerLink"],["mat-raised-button","","color","primary",3,"disabled",4,"mifosxHasPermission"],["mat-raised-button","","color","primary",3,"disabled"],[1,"mw300"],["href","https://mifosforge.jira.com/wiki/spaces/docs/pages/90243328/Migrate+opening+balances+Office-wise","target","_blank"],[1,"layout-row","align-end","gap-2px","responsive-column"],["mat-raised-button","","color","warn",3,"click"]],template:function(n,i){if(n&1){let s=Y();l(0,"div",3)(1,"mat-card")(2,"form",4),R("ngSubmit",function(){return V(s),q(i.submit())}),l(3,"mat-card-content")(4,"div",5,0)(6,"div",6)(7,"mat-form-field",7)(8,"mat-label"),c(9),p(10,"translate"),r(),l(11,"mat-select",8),Se(12,N7e,2,2,"mat-option",9,Pe),r(),E(14,L7e,7,9,"mat-error"),r()(),l(15,"div",10)(16,"button",11),R("click",function(){return V(s),q(i.retrieveOpeningBalances())}),c(17),p(18,"translate"),r()()(),E(19,G7e,40,45,"div",12),r(),E(20,$7e,5,6,"mat-card-actions",13),r()()(),F(21,U7e,19,18,"ng-template",null,1,ti)}n&2&&(a(2),g("formGroup",i.openingBalancesForm),a(7),h(m(10,6,"labels.inputs.Office")),a(3),we(i.officeData),a(2),I(i.openingBalancesForm.controls.officeId.hasError("required")?14:-1),a(3),v(" ",m(18,8,"labels.buttons.Retrieve")," "),a(2),I(i.openingBalancesData?19:-1),a(),I(i.openingBalancesData?20:-1))},dependencies:[ue,fe,tt,st,tn,Ue,Xe,dt,Ze,et,la,Va,Ae,$e,Je,Et,Fe,Be,ut,ai,ze,gt,ft,mi,di,pi,ve,Ke,rs,wg,he],styles:[".content[_ngcontent-%COMP%]{padding-top:20px}.content[_ngcontent-%COMP%] div[_ngcontent-%COMP%]{word-wrap:break-word}.content[_ngcontent-%COMP%] div.header[_ngcontent-%COMP%]{font-weight:500}"]})}}return e})();var _c=class{constructor(o,t="",n="",i="",s=!1,d=""){this.name=o,this.glCode=t,this.type=n,this.usage=i,this.manualEntriesAllowed=s,this.description=d,this.children=[]}};var vN=(()=>{class e{constructor(){this.translateService=T(yi),this.treeDataChange=new Na([])}get treeData(){return this.treeDataChange.value}initialize(t){let n=this.buildGLAccountTree(t);this.treeDataChange.next(n)}buildGLAccountTree(t){let n=[];if(n.push(new _c("ACCOUNTS")),n[0].children.push(new _c(this.translateService.instant("labels.inputs.accounting.ASSET"))),n[0].children.push(new _c(this.translateService.instant("labels.inputs.accounting.EQUITY"))),n[0].children.push(new _c(this.translateService.instant("labels.inputs.accounting.EXPENSE"))),n[0].children.push(new _c(this.translateService.instant("labels.inputs.accounting.INCOME"))),n[0].children.push(new _c(this.translateService.instant("labels.inputs.accounting.LIABILITY"))),t.length===0)return n;t[0].parentId||(t[0].parentId=0),t.sort((s,d)=>(s.parentId||(s.parentId=0),s.parentId-d.parentId));let i=[];for(let s of t)i[s.id]=new _c(s.name,s.glCode,s.type.value,s.usage.value,s.manualEntriesAllowed,s.description);for(let s of t)s.parentId===0?s.type.value==="ASSET"?n[0].children[0].children.push(i[s.id]):s.type.value==="EQUITY"?n[0].children[1].children.push(i[s.id]):s.type.value==="EXPENSE"?n[0].children[2].children.push(i[s.id]):s.type.value==="INCOME"?n[0].children[3].children.push(i[s.id]):s.type.value==="LIABILITY"&&n[0].children[4].children.push(i[s.id]):i[s.parentId]&&i[s.parentId].children.push(i[s.id]);return n}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275prov=Re({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();var yv=(()=>{class e{constructor(){}toggleExpandCollapse(t,n){return n?t.collapseAll():t.expandAll(),!n}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275prov=Re({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();var W7e=["buttonTreeView"],Q7e=["templateButtonTreeView"],Y7e=["accountsTable"],J7e=["templateAccountsTable"],K7e=()=>[10,25,50,100],X7e=()=>["gl-accounts/create"],Z7e=e=>["gl-accounts/view",e];function eFe(e,o){e&1&&(l(0,"button",40),b(1,"fa-icon",41),c(2),p(3,"translate"),r()),e&2&&(g("routerLink",oe(4,X7e)),a(2),v(" ",m(3,2,"labels.buttons.Add Account")," "))}function tFe(e,o){e&1&&(l(0,"th",42),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.Account")))}function iFe(e,o){if(e&1&&(l(0,"td",43),c(1),r()),e&2){let t=o.$implicit;a(),h(t.name)}}function nFe(e,o){e&1&&(l(0,"th",42),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.GL Code")))}function oFe(e,o){if(e&1&&(l(0,"td",43),c(1),r()),e&2){let t=o.$implicit;a(),h(t.glCode)}}function aFe(e,o){e&1&&(l(0,"th",42),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.Type")))}function rFe(e,o){if(e&1&&(l(0,"td",43),c(1),p(2,"translate"),r()),e&2){let t=o.$implicit;a(),v(" ",m(2,1,"labels.inputs.accounting."+t.type.value)," ")}}function lFe(e,o){e&1&&(l(0,"th",42),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.Disabled")))}function sFe(e,o){if(e&1&&(l(0,"td",43)(1,"div",44),b(2,"fa-icon",45),r()()),e&2){let t=o.$implicit;a(),g("className",t.disabled===!0?"disabled":"enabled"),a(),g("matTooltip",Le(t.disabled===!0?"Disabled":"Enabled"))}}function cFe(e,o){e&1&&(l(0,"th",42),c(1),p(2,"translate"),r()),e&2&&(a(),v(" ",m(2,1,"labels.inputs.Manual Entries Allowed")," "))}function pFe(e,o){e&1&&(b(0,"fa-icon",46),p(1,"translate")),e&2&&g("matTooltip",Le(m(1,2,"tooltips.Allowed")))}function mFe(e,o){e&1&&(b(0,"fa-icon",47),p(1,"translate")),e&2&&g("matTooltip",Le(m(1,2,"tooltips.")))}function dFe(e,o){if(e&1&&(l(0,"td",43),E(1,pFe,2,4,"fa-icon",46),E(2,mFe,2,4,"fa-icon",47),r()),e&2){let t=o.$implicit;a(),I(t.manualEntriesAllowed?1:-1),a(),I(t.manualEntriesAllowed?-1:2)}}function uFe(e,o){e&1&&(l(0,"th",42),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.Used as")))}function fFe(e,o){if(e&1&&(l(0,"td",43),c(1),r()),e&2){let t=o.$implicit;a(),h(t.usage.value)}}function hFe(e,o){e&1&&b(0,"tr",48)}function gFe(e,o){if(e&1&&b(0,"tr",49),e&2){let t=o.$implicit;g("routerLink",Nt(1,Z7e,t.id))}}function _Fe(e,o){if(e&1&&(l(0,"span",54),c(1),r()),e&2){let t=w().$implicit;a(),h("("+t.glCode+")")}}function CFe(e,o){if(e&1){let t=Y();l(0,"mat-tree-node",50)(1,"li",51),b(2,"button",52),l(3,"span",53),R("click",function(){let i=V(t).$implicit,s=w();return q(s.viewGLAccountNode(i))}),E(4,_Fe,2,1,"span",54),c(5),r()()()}if(e&2){let t=o.$implicit;a(4),I(t.glCode?4:-1),a(),v(" ",t.name," ")}}function vFe(e,o){if(e&1&&(l(0,"span",54),c(1),r()),e&2){let t=w().$implicit;a(),h("("+t.glCode+")")}}function xFe(e,o){if(e&1){let t=Y();l(0,"mat-nested-tree-node")(1,"li")(2,"div",51)(3,"button",55),b(4,"fa-icon",56),r(),l(5,"span",53),R("click",function(){let i=V(t).$implicit,s=w();return q(s.viewGLAccountNode(i))}),E(6,vFe,2,1,"span",54),c(7),r()(),l(8,"ul"),_l(9,57),r()()()}if(e&2){let t=o.$implicit,n=w();a(3),Dn("aria-label","toggle "+t.name),a(),g("icon",Le(n.nestedTreeControl.isExpanded(t)?"chevron-down":"chevron-right")),a(2),I(t.glCode?6:-1),a(),v(" ",t.name," "),a(),Cl("gl-account-tree-invisible",!n.nestedTreeControl.isExpanded(t))}}function bFe(e,o){if(e&1&&(l(0,"div",39)(1,"mat-card")(2,"mat-card-content")(3,"div",58)(4,"div",59),c(5),p(6,"translate"),r(),l(7,"div",60),c(8),r(),l(9,"div",59),c(10),p(11,"translate"),r(),l(12,"div",60),c(13),r(),l(14,"div",59),c(15),p(16,"translate"),r(),l(17,"div",60),c(18),p(19,"translate"),r(),l(20,"div",59),c(21),p(22,"translate"),r(),l(23,"div",60),c(24),r(),l(25,"div",59),c(26),p(27,"translate"),r(),l(28,"div",60),c(29),r(),l(30,"div",59),c(31),p(32,"translate"),r(),l(33,"div",60),c(34),r()()()()()),e&2){let t=w();a(5),v(" ",m(6,12,"labels.inputs.Account Name")," "),a(3),v(" ",t.glAccount.name," "),a(2),v(" ",m(11,14,"labels.inputs.GL Code")," "),a(3),v(" ",t.glAccount.glCode," "),a(2),v(" ",m(16,16,"labels.inputs.Account Type")," "),a(3),v(" ",m(19,18,"labels.inputs.accounting."+t.glAccount.type)," "),a(3),v(" ",m(22,20,"labels.inputs.Account Usage")," "),a(3),v(" ",t.glAccount.usage," "),a(2),v(" ",m(27,22,"labels.inputs.Manual Entries Allowed")," "),a(3),v(" ",t.glAccount.manualEntriesAllowed," "),a(2),v(" ",m(32,24,"labels.inputs.Description")," "),a(3),v(" ",t.glAccount.description," ")}}function yFe(e,o){if(e&1){let t=Y();l(0,"h2"),c(1),p(2,"translate"),r(),l(3,"p",61),c(4),p(5,"translate"),r(),l(6,"div",62)(7,"button",63),R("click",function(){let i=V(t).popover,s=w();return i.close(),q(s.configurationWizardService.closeConfigWizard())}),c(8),p(9,"translate"),r(),l(10,"button",64),R("click",function(){let i=V(t).popover,s=w();return i.close(),q(s.previousStep())}),c(11),p(12,"translate"),r(),l(13,"button",64),R("click",function(){let i=V(t).popover,s=w(),d=xe(9),u=xe(57);return i.close(),q(s.showPopover(u,d,"bottom",!0))}),c(14),p(15,"translate"),r()()}e&2&&(a(),h(m(2,5,"labels.heading.Tree View")),a(3),h(m(5,7,"labels.text.Alternative way-Tree view")),a(4),v(" ",m(9,9,"labels.buttons.Close")," "),a(3),v(" ",m(12,11,"labels.buttons.Back")," "),a(3),v(" ",m(15,13,"labels.buttons.Next")," "))}function SFe(e,o){if(e&1){let t=Y();l(0,"h2"),c(1),p(2,"translate"),r(),l(3,"p",61),c(4),p(5,"translate"),r(),l(6,"div",62)(7,"button",63),R("click",function(){let i=V(t).popover,s=w();return i.close(),q(s.configurationWizardService.closeConfigWizard())}),c(8),p(9,"translate"),r(),l(10,"button",64),R("click",function(){let i=V(t).popover,s=w(),d=xe(2),u=xe(55);return i.close(),q(s.showPopover(u,d,"bottom",!0))}),c(11),p(12,"translate"),r(),l(13,"button",64),R("click",function(){let i=V(t).popover,s=w(),d=xe(13),u=xe(59);return i.close(),q(s.showPopover(u,d,"bottom",!0))}),c(14),p(15,"translate"),r()()}e&2&&(a(),h(m(2,5,"labels.heading.Add Account")),a(3),h(m(5,7,"labels.text.Create New GL Account")),a(4),v(" ",m(9,9,"labels.buttons.Close")," "),a(3),v(" ",m(12,11,"labels.buttons.Back")," "),a(3),v(" ",m(15,13,"labels.buttons.Next")," "))}function wFe(e,o){if(e&1){let t=Y();l(0,"h4"),c(1),p(2,"translate"),r(),l(3,"div",62)(4,"button",63),R("click",function(){let i=V(t).popover,s=w();return i.close(),q(s.configurationWizardService.closeConfigWizard())}),c(5),p(6,"translate"),r(),l(7,"button",64),R("click",function(){let i=V(t).popover,s=w(),d=xe(9),u=xe(57);return i.close(),q(s.showPopover(u,d,"bottom",!0))}),c(8),p(9,"translate"),r(),l(10,"button",64),R("click",function(){let i=V(t).popover,s=w(),d=xe(20),u=xe(61);return i.close(),q(s.showPopover(u,d,"top",!0))}),c(11),p(12,"translate"),r()()}e&2&&(a(),h(m(2,4,"labels.heading.Search bar to filter GL accounts.")),a(4),v(" ",m(6,6,"labels.buttons.Close")," "),a(3),v(" ",m(9,8,"labels.buttons.Back")," "),a(3),v(" ",m(12,10,"labels.buttons.Next")," "))}function PFe(e,o){if(e&1){let t=Y();l(0,"h4",61),c(1),p(2,"translate"),r(),l(3,"div",62)(4,"button",63),R("click",function(){let i=V(t).popover,s=w();return i.close(),q(s.configurationWizardService.closeConfigWizard())}),c(5),p(6,"translate"),r(),l(7,"button",64),R("click",function(){let i=V(t).popover,s=w(),d=xe(13),u=xe(59);return i.close(),q(s.showPopover(u,d,"bottom",!0))}),c(8),p(9,"translate"),r(),l(10,"button",64),R("click",function(){let i=V(t).popover,s=w();return i.close(),q(s.nextStep())}),c(11),p(12,"translate"),r()()}e&2&&(a(),v(" ",m(2,4,"labels.heading.List of chart of all the accounts being used by your organization.")," "),a(4),v(" ",m(6,6,"labels.buttons.Close")," "),a(3),v(" ",m(9,8,"labels.buttons.Back")," "),a(3),v(" ",m(12,10,"labels.buttons.Next")," "))}var Sv=(()=>{class e{constructor(){this.glAccountTreeService=T(vN),this.route=T(Ie),this.router=T(qe),this.treeControlService=T(yv),this.configurationWizardService=T(Qi),this.popoverService=T(Wi),this.viewGroup=new it("listView"),this.displayedColumns=["name","glCode","glAccountType","disabled","manualEntriesAllowed","usedAs"],this.isTreeExpanded=!0,this.hasNestedChild=(n,i)=>i.children.length,this._getChildren=n=>sd(n.children);let t=this.glAccountTreeService;this.route.data.subscribe(n=>{this.glAccountData=n.chartOfAccounts,t.initialize(this.glAccountData)}),this.nestedTreeControl=new zg(this._getChildren),this.nestedTreeDataSource=new jg}ngOnInit(){this.tableDataSource=new Wt(this.glAccountData),this.glAccountTreeService.treeDataChange.subscribe(t=>{this.nestedTreeDataSource.data=t,this.nestedTreeControl.expand(this.nestedTreeDataSource.data[0]),this.nestedTreeControl.dataNodes=t})}ngAfterViewInit(){this.tableDataSource.paginator=this.paginator,this.tableDataSource.sortingDataAccessor=(t,n)=>{switch(n){case"glAccountType":return t.type.value;case"usedAs":return t.usage.value;default:return t[n]}},this.tableDataSource.sort=this.sort,this.configurationWizardService.showChartofAccountsPage===!0&&setTimeout(()=>{this.showPopover(this.templateButtonTreeView,this.buttonTreeView.nativeElement,"bottom",!0)}),this.configurationWizardService.showChartofAccountsList===!0&&setTimeout(()=>{this.showPopover(this.templateAccountsTable,this.accountsTable.nativeElement,"top",!0)})}applyFilter(t){this.tableDataSource.filter=t.trim().toLowerCase()}viewGLAccountNode(t){t.glCode?this.glAccount=t:delete this.glAccount}showPopover(t,n,i,s){setTimeout(()=>this.popoverService.open(t,n,i,s,{}),200)}nextStep(){this.configurationWizardService.showChartofAccountsPage=!1,this.configurationWizardService.showChartofAccountsList=!1,this.configurationWizardService.showChartofAccountsForm=!0,this.router.navigate(["/accounting/chart-of-accounts/gl-accounts/create"])}previousStep(){this.configurationWizardService.showChartofAccountsPage=!1,this.configurationWizardService.showChartofAccountsList=!1,this.configurationWizardService.showChartofAccounts=!0,this.router.navigate(["/accounting"])}toggleExpandCollapse(){this.isTreeExpanded=this.treeControlService.toggleExpandCollapse(this.nestedTreeControl,this.isTreeExpanded)}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275cmp=me({type:e,selectors:[["mifosx-chart-of-accounts"]],viewQuery:function(n,i){if(n&1&&(Ee(kt,7),Ee(It,7),Ee(W7e,5),Ee(Q7e,5),Ee(Y7e,5),Ee(J7e,5)),n&2){let s;Te(s=Me())&&(i.paginator=s.first),Te(s=Me())&&(i.sort=s.first),Te(s=Me())&&(i.buttonTreeView=s.first),Te(s=Me())&&(i.templateButtonTreeView=s.first),Te(s=Me())&&(i.accountsTable=s.first),Te(s=Me())&&(i.templateAccountsTable=s.first)}},decls:62,vars:19,consts:[["buttonTreeView",""],["buttonAddAccount",""],["filter",""],["accountsTable",""],["templateButtonTreeView",""],["templateButtonAddAccount",""],["templateFilter",""],["templateAccountsTable",""],[1,"container","m-b-20","layout-row","align-end","gap-20px"],[3,"formControl"],["value","listView"],["icon","list"],["value","treeView"],["icon","sitemap"],["mat-raised-button","","color","primary",3,"routerLink",4,"mifosxHasPermission"],[1,"container",3,"hidden"],[1,"layout-row","gap-20px"],[1,"flex-fill"],["matInput","",3,"keyup"],[1,"mat-elevation-z8"],["mat-table","","matSort","",3,"dataSource"],["matColumnDef","name"],["mat-header-cell","","mat-sort-header","",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","glCode"],["matColumnDef","glAccountType"],["matColumnDef","disabled"],["matColumnDef","manualEntriesAllowed"],["matColumnDef","usedAs"],["mat-header-row","",4,"matHeaderRowDef"],["mat-row","","class","select-row",3,"routerLink",4,"matRowDef","matRowDefColumns"],["showFirstLastButtons","",3,"pageSizeOptions"],[1,"m-b-20","layout-row","align-start","gap-20px"],["mat-raised-button","",3,"click"],[1,"layout-row","gap-4percent","responsive-column"],[1,"mat-elevation-z8","flex"],[1,"gl-account-tree",3,"dataSource","treeControl"],["matTreeNodeToggle","",4,"matTreeNodeDef"],[4,"matTreeNodeDef","matTreeNodeDefWhen"],[1,"flex-48"],["mat-raised-button","","color","primary",3,"routerLink"],["icon","plus",1,"m-r-10"],["mat-header-cell","","mat-sort-header",""],["mat-cell",""],[3,"className"],["matTooltipPosition","right","icon","circle","size","lg",3,"matTooltip"],["matTooltipPosition","right","icon","check-circle","size","lg",1,"manual-entries-allowed",3,"matTooltip"],["matTooltipPosition","right","icon","times-circle","size","lg",1,"manual-entries-not-allowed",3,"matTooltip"],["mat-header-row",""],["mat-row","",1,"select-row",3,"routerLink"],["matTreeNodeToggle",""],[1,"mat-tree-node"],["mat-icon-button","","disabled",""],[3,"click"],[1,"m-r-10"],["mat-icon-button","","matTreeNodeToggle",""],[1,"mat-icon-rtl-mirror",3,"icon"],["matTreeNodeOutlet",""],[1,"layout-row-wrap"],[1,"flex-50","header"],[1,"flex-50"],[1,"mw300"],[1,"layout-row","align-end","gap-2px","responsive-column"],["mat-raised-button","","color","warn",3,"click"],["mat-raised-button","","color","primary",3,"click"]],template:function(n,i){if(n&1){let s=Y();l(0,"div",8)(1,"div",null,0)(3,"mat-button-toggle-group",9)(4,"mat-button-toggle",10),b(5,"fa-icon",11),r(),l(6,"mat-button-toggle",12),b(7,"fa-icon",13),r()()(),l(8,"div",null,1),F(10,eFe,4,5,"button",14),r()(),l(11,"div",15)(12,"div",16,2)(14,"mat-form-field",17)(15,"mat-label"),c(16),p(17,"translate"),r(),l(18,"input",18),R("keyup",function(u){return V(s),q(i.applyFilter(u.target.value))}),r()()(),l(19,"div",19,3)(21,"table",20),X(22,21),F(23,tFe,3,3,"th",22)(24,iFe,2,1,"td",23),Z(),X(25,24),F(26,nFe,3,3,"th",22)(27,oFe,2,1,"td",23),Z(),X(28,25),F(29,aFe,3,3,"th",22)(30,rFe,3,3,"td",23),Z(),X(31,26),F(32,lFe,3,3,"th",22)(33,sFe,3,3,"td",23),Z(),X(34,27),F(35,cFe,3,3,"th",22)(36,dFe,3,2,"td",23),Z(),X(37,28),F(38,uFe,3,3,"th",22)(39,fFe,2,1,"td",23),Z(),F(40,hFe,1,0,"tr",29)(41,gFe,1,3,"tr",30),r(),b(42,"mat-paginator",31),r()(),l(43,"div",15)(44,"div",32)(45,"button",33),R("click",function(){return V(s),q(i.toggleExpandCollapse())}),c(46),p(47,"translate"),r()(),l(48,"div",34)(49,"div",35)(50,"mat-tree",36),F(51,CFe,6,2,"mat-tree-node",37)(52,xFe,10,7,"mat-nested-tree-node",38),r()(),E(53,bFe,35,26,"div",39),r()(),F(54,yFe,16,15,"ng-template",null,4,ti)(56,SFe,16,15,"ng-template",null,5,ti)(58,wFe,13,12,"ng-template",null,6,ti)(60,PFe,13,12,"ng-template",null,7,ti)}n&2&&(a(3),g("formControl",i.viewGroup),a(7),g("mifosxHasPermission","CREATE_GLACCOUNT"),a(),g("hidden",i.viewGroup.value!=="listView"),a(5),h(m(17,14,"labels.inputs.Filter")),a(5),g("dataSource",i.tableDataSource),a(19),g("matHeaderRowDef",i.displayedColumns),a(),g("matRowDefColumns",i.displayedColumns),a(),g("pageSizeOptions",oe(18,K7e)),a(),g("hidden",i.viewGroup.value!=="treeView"),a(3),v(" ",m(47,16,i.isTreeExpanded?"labels.buttons.Collapse All":"labels.buttons.Expand All")," "),a(4),g("dataSource",i.nestedTreeDataSource)("treeControl",i.nestedTreeControl),a(2),g("matTreeNodeDefWhen",i.hasNestedChild),a(),I(i.glAccount?53:-1))},dependencies:[ue,fe,Ue,_n,Ae,$e,Je,Fe,Be,ze,ve,Ke,Mp,Dp,ke,_t,It,xt,vt,bt,ri,Ct,yt,si,St,Pt,wt,Tt,kt,D0,M0,T0,E0,wi,Hg,Gg,he],styles:["table[_ngcontent-%COMP%]{width:100%}table[_ngcontent-%COMP%] .select-row[_ngcontent-%COMP%]:hover{cursor:pointer}.gl-account-tree[_ngcontent-%COMP%] ul[_ngcontent-%COMP%], .gl-account-tree[_ngcontent-%COMP%] li[_ngcontent-%COMP%]{margin-top:0;margin-bottom:0;list-style-type:none}.gl-account-tree[_ngcontent-%COMP%] li[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{cursor:pointer}.gl-account-tree[_ngcontent-%COMP%] .gl-account-tree-invisible[_ngcontent-%COMP%]{display:none}.content[_ngcontent-%COMP%] div[_ngcontent-%COMP%]{margin:1rem 0;word-wrap:break-word}.content[_ngcontent-%COMP%] div.header[_ngcontent-%COMP%]{font-weight:500}.enabled[_ngcontent-%COMP%]{color:#32cd32}.disabled[_ngcontent-%COMP%]{color:#f44366}.manual-entries-allowed[_ngcontent-%COMP%]{color:#32cd32}.manual-entries-not-allowed[_ngcontent-%COMP%]{color:#f44366}"]})}}return e})();var TFe=()=>({step:1}),MFe=()=>({step:2}),DFe=()=>({step:3}),Fr=(()=>{class e{constructor(){this.dialogRef=T(eo),this.data=T(Po);let t=this.data;this.stepName=t.stepName}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275cmp=me({type:e,selectors:[["mifosx-continue-setup-dialog"]],decls:18,vars:26,consts:[["mat-dialog-title",""],[1,"mw600"],["mat-raised-button","","color","warn",3,"mat-dialog-close"],["mat-raised-button","","color","primary",3,"mat-dialog-close"]],template:function(n,i){n&1&&(l(0,"h2",0),c(1),p(2,"translate"),r(),l(3,"mat-dialog-content")(4,"h3",1),c(5),p(6,"translate"),p(7,"translate"),r()(),l(8,"mat-dialog-actions")(9,"button",2),c(10),p(11,"translate"),r(),l(12,"button",3),c(13),p(14,"translate"),r(),l(15,"button",3),c(16),p(17,"translate"),r()()),n&2&&(a(),h(m(2,11,"labels.heading.Configuration Wizard")),a(4),ea(" ",m(6,13,"labels.heading.You have created")," ",i.stepName," ",m(7,15,"labels.heading.successfully select option")," "),a(4),g("mat-dialog-close",oe(23,TFe)),a(),v(" ",m(11,17,"labels.buttons.Close Configuration Wizard")," "),a(2),g("mat-dialog-close",oe(24,MFe)),a(),le(" ",m(14,19,"labels.buttons.Create more")," ",i.stepName," "),a(2),g("mat-dialog-close",oe(25,DFe)),a(),v(" ",m(17,21,"labels.buttons.Go to next step")," "))},dependencies:[ue,fe,ve,Wn,ho,Nn,Un,he],encapsulation:2})}}return e})();var EFe=["accountFormRef"],IFe=["templateAccountFormRef"],OFe=e=>[e];function AFe(e,o){if(e&1&&(l(0,"mat-option",7),c(1),p(2,"translate"),r()),e&2){let t=o.$implicit;g("value",t.id),a(),v(" ",m(2,2,"labels.inputs.accounting."+t.value)," ")}}function FFe(e,o){e&1&&(l(0,"mat-error"),c(1),p(2,"translate"),p(3,"translate"),l(4,"strong"),c(5),p(6,"translate"),r()()),e&2&&(a(),le(" ",m(2,3,"labels.inputs.Account Type")," ",m(3,5,"labels.commons.is")," "),a(4),h(m(6,7,"labels.commons.required")))}function kFe(e,o){e&1&&(l(0,"mat-error"),c(1),p(2,"translate"),p(3,"translate"),l(4,"strong"),c(5),p(6,"translate"),r()()),e&2&&(a(),le(" ",m(2,3,"labels.inputs.Account Name")," ",m(3,5,"labels.commons.is")," "),a(4),h(m(6,7,"labels.commons.required")))}function BFe(e,o){if(e&1&&(l(0,"mat-option",7),c(1),r()),e&2){let t=o.$implicit;g("value",t.id),a(),v(" ",t.value," ")}}function RFe(e,o){e&1&&(l(0,"mat-error"),c(1),p(2,"translate"),p(3,"translate"),l(4,"strong"),c(5),p(6,"translate"),r()()),e&2&&(a(),le(" ",m(2,3,"labels.inputs.Account Usage")," ",m(3,5,"labels.commons.is")," "),a(4),h(m(6,7,"labels.commons.required")))}function NFe(e,o){e&1&&(l(0,"mat-error"),c(1),p(2,"translate"),p(3,"translate"),l(4,"strong"),c(5),p(6,"translate"),r()()),e&2&&(a(),le(" ",m(2,3,"labels.inputs.GL Code")," ",m(3,5,"labels.commons.is")," "),a(4),h(m(6,7,"labels.commons.required")))}function LFe(e,o){if(e&1&&(l(0,"mat-option",7),c(1),r()),e&2){let t=o.$implicit;g("value",t.id),a(),v(" ",t.name," ")}}function VFe(e,o){if(e&1&&(l(0,"button",21),c(1),p(2,"translate"),r()),e&2){let t=w();g("disabled",!t.glAccountForm.valid),a(),v(" ",m(2,2,"labels.buttons.Submit")," ")}}function qFe(e,o){if(e&1){let t=Y();l(0,"h2"),c(1),p(2,"translate"),r(),l(3,"p",22),c(4),p(5,"translate"),l(6,"a",23),c(7),p(8,"translate"),r()(),l(9,"div",24)(10,"button",25),R("click",function(){let i=V(t).popover,s=w();return i.close(),q(s.configurationWizardService.closeConfigWizard())}),c(11),p(12,"translate"),r(),l(13,"button",26),R("click",function(){let i=V(t).popover;return q(i.close())}),c(14),p(15,"translate"),r(),l(16,"button",26),R("click",function(){let i=V(t).popover,s=w();return i.close(),q(s.previousStep())}),c(17),p(18,"translate"),r(),l(19,"button",26),R("click",function(){let i=V(t).popover,s=w();return i.close(),q(s.nextStep())}),c(20),p(21,"translate"),r()()}e&2&&(a(),h(m(2,7,"labels.heading.Create GL account")),a(3),v(" ",m(5,9,"labels.text.Filling Details")," "),a(3),h(m(8,11,"labels.inputs.Chart of Accounts")),a(4),v(" ",m(12,13,"labels.buttons.Close")," "),a(3),v(" ",m(15,15,"labels.buttons.Create GL Account")," "),a(3),v(" ",m(18,17,"labels.buttons.Back")," "),a(3),v(" ",m(21,19,"labels.buttons.Next")," "))}var wv=(()=>{class e{constructor(){this.formBuilder=T(nt),this.accountingService=T(Ui),this.route=T(Ie),this.router=T(qe),this.configurationWizardService=T(Qi),this.popoverService=T(Wi),this.dialog=T(Ht),this.parentData=[],this.cancelRoute="../../",this.route.queryParamMap.subscribe(t=>{this.accountTypeId=Number(t.get("accountType")),this.parentId=Number(t.get("parent")),this.parentId&&(this.cancelRoute=`../view/${this.parentId}`)}),this.route.data.subscribe(t=>{this.chartOfAccountsData=t.chartOfAccountsTemplate,this.accountTypeData=t.chartOfAccountsTemplate.accountTypeOptions,this.accountUsageData=t.chartOfAccountsTemplate.usageOptions})}ngOnInit(){this.createGlAccountForm(),this.setGLAccountForm()}createGlAccountForm(){this.glAccountForm=this.formBuilder.group({type:["",se.required],name:["",se.required],usage:["",se.required],glCode:["",se.required],parentId:[this.parentId||void 0],tagId:[""],manualEntriesAllowed:[!0],description:[""]})}setGLAccountForm(){this.glAccountForm.get("type").valueChanges.subscribe(t=>{switch(t){case 1:this.parentData=this.chartOfAccountsData.assetHeaderAccountOptions,this.tagData=this.chartOfAccountsData.allowedAssetsTagOptions;break;case 2:this.parentData=this.chartOfAccountsData.liabilityHeaderAccountOptions,this.tagData=this.chartOfAccountsData.allowedLiabilitiesTagOptions;break;case 3:this.parentData=this.chartOfAccountsData.equityHeaderAccountOptions,this.tagData=this.chartOfAccountsData.allowedEquityTagOptions;break;case 4:this.parentData=this.chartOfAccountsData.incomeHeaderAccountOptions,this.tagData=this.chartOfAccountsData.allowedIncomeTagOptions;break;case 5:this.parentData=this.chartOfAccountsData.expenseHeaderAccountOptions,this.tagData=this.chartOfAccountsData.allowedExpensesTagOptions;break}})}submit(){this.glAccountForm.invalid||this.accountingService.createGlAccount(this.glAccountForm.value).subscribe(t=>{this.configurationWizardService.showChartofAccounts===!0?(this.configurationWizardService.showChartofAccounts=!1,this.openDialog()):this.router.navigate(["../view",t.resourceId],{relativeTo:this.route})})}showPopover(t,n,i,s){setTimeout(()=>this.popoverService.open(t,n,i,s,{}),200)}ngAfterViewInit(){this.configurationWizardService.showChartofAccountsForm===!0&&setTimeout(()=>{this.showPopover(this.templateAccountFormRef,this.accountFormRef.nativeElement,"bottom",!0)})}nextStep(){this.configurationWizardService.showChartofAccountsForm=!1,this.configurationWizardService.showAccountsLinked=!0,this.router.navigate(["/accounting"])}previousStep(){this.configurationWizardService.showChartofAccountsForm=!1,this.configurationWizardService.showChartofAccountsList=!0,this.router.navigate(["/accounting/chart-of-accounts"])}openDialog(){this.dialog.open(Fr,{data:{stepName:"GL account"}}).afterClosed().subscribe(n=>{n.step===1?(this.configurationWizardService.showChartofAccountsForm=!1,this.router.navigate(["../"],{relativeTo:this.route})):n.step===2?(this.configurationWizardService.showChartofAccountsForm=!0,this.router.routeReuseStrategy.shouldReuseRoute=()=>!1,this.router.onSameUrlNavigation="reload",this.router.navigate(["/accounting/chart-of-accounts/gl-accounts/create"])):n.step===3&&(this.configurationWizardService.showChartofAccountsForm=!1,this.configurationWizardService.showAccountsLinked=!0,this.router.navigate(["/accounting"]))})}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275cmp=me({type:e,selectors:[["mifosx-create-gl-account"]],viewQuery:function(n,i){if(n&1&&(Ee(EFe,5),Ee(IFe,5)),n&2){let s;Te(s=Me())&&(i.accountFormRef=s.first),Te(s=Me())&&(i.templateAccountFormRef=s.first)}},decls:58,vars:37,consts:[["accountFormRef",""],["templateAccountFormRef",""],[1,"container"],[3,"ngSubmit","formGroup"],[1,"layout-row-wrap","gap-2px","responsive-column"],[1,"flex-48"],["required","","formControlName","type"],[3,"value"],["matInput","","required","","formControlName","name"],["required","","formControlName","usage"],["matInput","","required","","formControlName","glCode"],[1,"flex-48",3,"inputFormControl","glAccountList","required","inputLabel"],[1,"flex-28"],["formControlName","tagId"],[1,"manual-entries-allowed-wrapper","flex-18"],["labelPosition","before","formControlName","manualEntriesAllowed",1,"manual-entries-allowed"],[1,"flex-98"],["matInput","","formControlName","description","cdkTextareaAutosize","","cdkAutosizeMinRows","2"],[1,"layout-row","align-center","gap-5px","responsive-column"],["type","button","mat-raised-button","",3,"routerLink"],["mat-raised-button","","color","primary",3,"disabled",4,"mifosxHasPermission"],["mat-raised-button","","color","primary",3,"disabled"],[1,"mw400"],["href","https://mifosforge.jira.com/wiki/spaces/docs/pages/67141745/Chart+of+Accounts+-+General+Ledger+Setup","target","_blank"],[1,"layout-row","align-end","gap-2px","responsive-column"],["mat-raised-button","","color","warn",3,"click"],["mat-raised-button","","color","primary",3,"click"]],template:function(n,i){if(n&1){let s=Y();l(0,"div",2)(1,"mat-card")(2,"form",3,0),R("ngSubmit",function(){return V(s),q(i.submit())}),l(4,"mat-card-content")(5,"div",4)(6,"mat-form-field",5)(7,"mat-label"),c(8),p(9,"translate"),r(),l(10,"mat-select",6),Se(11,AFe,3,4,"mat-option",7,Pe),r(),E(13,FFe,7,9,"mat-error"),r(),l(14,"mat-form-field",5)(15,"mat-label"),c(16),p(17,"translate"),r(),b(18,"input",8),E(19,kFe,7,9,"mat-error"),r(),l(20,"mat-form-field",5)(21,"mat-label"),c(22),p(23,"translate"),r(),l(24,"mat-select",9),Se(25,BFe,2,2,"mat-option",7,Pe),r(),E(27,RFe,7,9,"mat-error"),r(),l(28,"mat-form-field",5)(29,"mat-label"),c(30),p(31,"translate"),r(),b(32,"input",10),E(33,NFe,7,9,"mat-error"),r(),b(34,"mifosx-gl-account-selector",11),l(35,"mat-form-field",12)(36,"mat-label"),c(37),p(38,"translate"),r(),l(39,"mat-select",13),Se(40,LFe,2,2,"mat-option",7,Pe),r()(),l(42,"div",14)(43,"mat-checkbox",15),c(44),p(45,"translate"),r()(),l(46,"mat-form-field",16)(47,"mat-label"),c(48),p(49,"translate"),r(),b(50,"textarea",17),r()()(),l(51,"mat-card-actions",18)(52,"button",19),c(53),p(54,"translate"),r(),F(55,VFe,3,4,"button",20),r()()()(),F(56,qFe,22,21,"ng-template",null,1,ti)}n&2&&(a(2),g("formGroup",i.glAccountForm),a(6),h(m(9,19,"labels.inputs.Account Type")),a(3),we(i.accountTypeData),a(2),I(i.glAccountForm.controls.type.hasError("required")&&(i.glAccountForm.controls.type.touched||i.glAccountForm.controls.type.dirty)?13:-1),a(3),h(m(17,21,"labels.inputs.Account Name")),a(3),I(i.glAccountForm.controls.name.hasError("required")&&(i.glAccountForm.controls.name.touched||i.glAccountForm.controls.name.dirty)?19:-1),a(3),h(m(23,23,"labels.inputs.Account Usage")),a(3),we(i.accountUsageData),a(2),I(i.glAccountForm.controls.usage.hasError("required")&&(i.glAccountForm.controls.usage.touched||i.glAccountForm.controls.usage.dirty)?27:-1),a(3),h(m(31,25,"labels.inputs.GL Code")),a(3),I(i.glAccountForm.controls.glCode.hasError("required")&&(i.glAccountForm.controls.glCode.touched||i.glAccountForm.controls.glCode.dirty)?33:-1),a(),g("inputFormControl",i.glAccountForm.controls.parentId)("glAccountList",i.parentData)("required",!1)("inputLabel","Parent"),a(3),h(m(38,27,"labels.inputs.Tag")),a(3),we(i.tagData),a(4),v(" ",m(45,29,"labels.inputs.Manual Entries Allowed")," "),a(4),h(m(49,31,"labels.inputs.Description")),a(4),g("routerLink",Nt(35,OFe,i.cancelRoute)),a(),v(" ",m(54,33,"labels.buttons.Cancel")," "),a(2),g("mifosxHasPermission","CREATE_GLACCOUNT"))},dependencies:[ue,fe,tt,st,Ue,Xe,dt,Ze,et,Ae,$e,Je,Et,Fe,Be,ut,ze,gt,ft,ve,fi,Ke,ta,Ln,he],styles:[".manual-entries-allowed-wrapper[_ngcontent-%COMP%]{position:relative}.manual-entries-allowed-wrapper[_ngcontent-%COMP%] .manual-entries-allowed[_ngcontent-%COMP%]{padding:0 0 17.5px;position:absolute;bottom:0;right:0}"]})}}return e})();var zFe=()=>["/accounting/chart-of-accounts/gl-accounts/create"],HFe=(e,o)=>({parent:e,accountType:o}),GFe=()=>["edit"],jFe=e=>[e];function $Fe(e,o){if(e&1&&(l(0,"button",10),b(1,"fa-icon",11),c(2),p(3,"translate"),r()),e&2){let t=w(2);g("routerLink",oe(5,zFe))("queryParams",Ka(6,HFe,t.glAccount.id,t.glAccount.type.id)),a(2),v(" ",m(3,3,"labels.buttons.Subledger Account")," ")}}function UFe(e,o){if(e&1&&(l(0,"span"),E(1,$Fe,4,9,"button",10),r()),e&2){let t=w();a(),I(t.glAccount.usage.value==="HEADER"?1:-1)}}function WFe(e,o){e&1&&(l(0,"span")(1,"button",12),b(2,"fa-icon",13),c(3),p(4,"translate"),r()()),e&2&&(a(),g("routerLink",oe(4,GFe)),a(2),v(" ",m(4,2,"labels.buttons.Edit")," "))}function QFe(e,o){if(e&1){let t=Y();l(0,"button",15),R("click",function(){V(t);let i=w(2);return q(i.changeGlAccountState())}),b(1,"fa-icon",16),c(2),p(3,"translate"),r()}e&2&&(a(2),v(" ",m(3,1,"labels.buttons.Disable")," "))}function YFe(e,o){if(e&1&&(l(0,"span"),E(1,QFe,4,3,"button",14),r()),e&2){let t=w();a(),I(t.glAccount.disabled?-1:1)}}function JFe(e,o){if(e&1){let t=Y();l(0,"button",18),R("click",function(){V(t);let i=w(2);return q(i.changeGlAccountState())}),b(1,"fa-icon",19),c(2),p(3,"translate"),r()}e&2&&(a(2),v(" ",m(3,1,"labels.buttons.Enable")," "))}function KFe(e,o){if(e&1&&(l(0,"span"),E(1,JFe,4,3,"button",17),r()),e&2){let t=w();a(),I(t.glAccount.disabled?1:-1)}}function XFe(e,o){if(e&1){let t=Y();l(0,"button",15),R("click",function(){V(t);let i=w();return q(i.deleteGlAccount())}),b(1,"fa-icon",20),c(2),p(3,"translate"),r()}e&2&&(a(2),v(" ",m(3,1,"labels.buttons.Delete")," "))}function ZFe(e,o){if(e&1&&(l(0,"div",5)(1,"div",6),c(2),p(3,"translate"),r(),l(4,"div",7)(5,"a",21),b(6,"mifosx-gl-account-display",22),r()()()),e&2){let t=w();a(2),h(m(3,3,"labels.inputs.Parent Account Name")),a(3),g("routerLink",Nt(5,jFe,"/accounting/chart-of-accounts/gl-accounts/view/"+t.glAccount.parent.id)),a(),g("glAccount",t.glAccount.parent)}}function eke(e,o){if(e&1&&(l(0,"div",5)(1,"div",6),c(2),p(3,"translate"),r(),l(4,"div",7),c(5),r()()),e&2){let t=w();a(2),h(m(3,2,"labels.inputs.Tag")),a(3),h(t.glAccount.tagId.name)}}function tke(e,o){if(e&1&&(l(0,"div",5)(1,"div",6),c(2),p(3,"translate"),r(),l(4,"div",7),c(5),r()()),e&2){let t=w();a(2),h(m(3,2,"labels.inputs.Description")),a(3),h(t.glAccount.description)}}var Pv=(()=>{class e{constructor(){this.accountingService=T(Ui),this.route=T(Ie),this.router=T(qe),this.dialog=T(Ht),this.location=T(C0),this.route.data.subscribe(t=>{this.glAccount=t.glAccountAndChartOfAccountsTemplate})}deleteGlAccount(){this.dialog.open(vi,{data:{deleteContext:`gl account ${this.glAccount.id}`}}).afterClosed().subscribe(n=>{n.delete&&this.accountingService.deleteGlAccount(this.glAccount.id).subscribe(()=>{this.router.navigate(["/accounting/chart-of-accounts"])})})}changeGlAccountState(){this.accountingService.updateGlAccount(this.glAccount.id,{disabled:!this.glAccount.disabled}).subscribe(t=>{this.glAccount.disabled=t.changes.disabled})}goBack(){this.router.navigateByUrl("/accounting/chart-of-accounts")}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275cmp=me({type:e,selectors:[["mifosx-view-gl-account"]],decls:43,vars:31,consts:[[1,"container","m-b-20","layout-row","layout-lt-md-column","align-end","gap-2percent"],[4,"mifosxHasPermission"],["mat-raised-button","","color","warn",3,"click",4,"mifosxHasPermission"],[1,"container"],[1,"content-rows"],[1,"content-row"],[1,"label"],[1,"value"],[1,"layout-row","align-center","gap-5px","responsive-column"],["type","button","color","primary","mat-raised-button","",3,"click"],["mat-raised-button","","color","primary",3,"routerLink","queryParams"],["icon","plus",1,"m-r-10"],["mat-raised-button","","color","primary",3,"routerLink"],["icon","edit",1,"m-r-10"],["mat-raised-button","","color","warn"],["mat-raised-button","","color","warn",3,"click"],["icon","lock",1,"m-r-10"],["mat-raised-button","","color","accent"],["mat-raised-button","","color","accent",3,"click"],["icon","lock-open",1,"m-r-10"],["icon","trash",1,"m-r-10"],[1,"tab-link",3,"routerLink"],[3,"glAccount"]],template:function(n,i){n&1&&(l(0,"div",0),F(1,UFe,2,1,"span",1)(2,WFe,5,5,"span",1)(3,YFe,2,1,"span",1)(4,KFe,2,1,"span",1)(5,XFe,4,3,"button",2),r(),l(6,"div",3)(7,"mat-card")(8,"mat-card-content")(9,"div",4)(10,"div",5)(11,"div",6),c(12),p(13,"translate"),r(),l(14,"div",7),c(15),p(16,"translate"),r()(),l(17,"div",5)(18,"div",6),c(19),p(20,"translate"),r(),l(21,"div",7),c(22),r()(),E(23,ZFe,7,7,"div",5),E(24,eke,6,4,"div",5),l(25,"div",5)(26,"div",6),c(27),p(28,"translate"),r(),l(29,"div",7),c(30),r()(),l(31,"div",5)(32,"div",6),c(33),p(34,"translate"),r(),l(35,"div",7),c(36),p(37,"yesNo"),r()(),E(38,tke,6,4,"div",5),r()(),l(39,"mat-card-actions",8)(40,"button",9),R("click",function(){return i.goBack()}),c(41),p(42,"translate"),r()()()()),n&2&&(a(),g("mifosxHasPermission","CREATE_GLACCOUNT"),a(),g("mifosxHasPermission","UPDATE_GLACCOUNT"),a(),g("mifosxHasPermission","UPDATE_GLACCOUNT"),a(),g("mifosxHasPermission","UPDATE_GLACCOUNT"),a(),g("mifosxHasPermission","DELETE_GLACCOUNT"),a(7),h(m(13,17,"labels.inputs.Account Type")),a(3),h(m(16,19,"labels.inputs.accounting."+(i.glAccount.type==null?null:i.glAccount.type.value))),a(4),h(m(20,21,"labels.inputs.GL Code")),a(3),h(i.glAccount.glCode),a(),I(i.glAccount.parent?23:-1),a(),I(i.glAccount.tagId.id?24:-1),a(3),h(m(28,23,"labels.inputs.Account Usage")),a(3),h(i.glAccount.usage==null?null:i.glAccount.usage.value),a(3),h(m(34,25,"labels.inputs.Manual Entries Allowed")),a(3),h(m(37,27,i.glAccount.manualEntriesAllowed)),a(2),I(i.glAccount.description?38:-1),a(3),v(" ",m(42,29,"labels.buttons.Back")," "))},dependencies:[ue,fe,Ae,$e,Je,Et,ve,Ke,ke,rs,he,po],styles:[".container[_ngcontent-%COMP%]{max-width:37rem;margin:0 auto;padding:1rem}.container[_ngcontent-%COMP%] mat-card[_ngcontent-%COMP%]{margin-bottom:1rem;padding:1.5rem;box-shadow:0 2px 4px #0000001a;border:1px solid var(--border-color, #ddd);border-radius:8px;background-color:var(--card-background, #fff);transition:background-color .3s ease,border-color .3s ease}.container[_ngcontent-%COMP%] .layout-row-wrap[_ngcontent-%COMP%]{display:grid;grid-template-columns:50% 50%;gap:1rem}.container[_ngcontent-%COMP%] .layout-row-wrap[_ngcontent-%COMP%] .flex-50[_ngcontent-%COMP%]{padding:.5rem}.container[_ngcontent-%COMP%] .layout-row-wrap[_ngcontent-%COMP%] .flex-50.mat-body-strong[_ngcontent-%COMP%]{color:var(--label-color, #555);font-weight:600}.container[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] div[_ngcontent-%COMP%]{margin:1rem 0;word-wrap:break-word}.container[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] div[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{display:block;padding:.25rem 0;color:var(--text-color, inherit)}.container[_ngcontent-%COMP%] .content-rows[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1rem}.container[_ngcontent-%COMP%] .content-rows[_ngcontent-%COMP%] .content-row[_ngcontent-%COMP%]{display:flex;flex-direction:row;border-bottom:1px solid var(--border-color-light, #eee);padding-bottom:.5rem}.container[_ngcontent-%COMP%] .content-rows[_ngcontent-%COMP%] .content-row[_ngcontent-%COMP%] .label[_ngcontent-%COMP%]{flex:0 0 40%;font-weight:600;color:var(--label-color, #555);padding:.5rem 1rem .5rem 0}.container[_ngcontent-%COMP%] .content-rows[_ngcontent-%COMP%] .content-row[_ngcontent-%COMP%] .value[_ngcontent-%COMP%]{flex:0 0 60%;padding:.5rem 0;color:var(--text-color, inherit)}.container[_ngcontent-%COMP%] .content-rows[_ngcontent-%COMP%] .content-row[_ngcontent-%COMP%] .value[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{display:block;padding:.25rem 0}.container[_ngcontent-%COMP%] .back-button-container[_ngcontent-%COMP%]{margin-top:2rem}.container[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{transition:all .2s ease}.container[_ngcontent-%COMP%] button[_ngcontent-%COMP%]:hover{transform:translateY(-2px)}.dark-theme[_nghost-%COMP%], .dark-theme [_nghost-%COMP%]{--border-color: #444;--border-color-light: #3a3a3a;--card-background: #2d2d2d;--label-color: #b8b8b8;--text-color: #e0e0e0}.dark-theme[_nghost-%COMP%] .container[_ngcontent-%COMP%] mat-card[_ngcontent-%COMP%], .dark-theme [_nghost-%COMP%] .container[_ngcontent-%COMP%] mat-card[_ngcontent-%COMP%]{box-shadow:0 2px 4px #0000004d}"]})}}return e})();var ike=()=>["../"];function nke(e,o){if(e&1&&(l(0,"mat-option",5),c(1),r()),e&2){let t=o.$implicit;g("value",t.id),a(),v(" ",t.value," ")}}function oke(e,o){e&1&&(l(0,"mat-error"),c(1),p(2,"translate"),p(3,"translate"),l(4,"strong"),c(5),p(6,"translate"),r()()),e&2&&(a(),le(" ",m(2,3,"labels.inputs.Account Type")," ",m(3,5,"labels.commons.is")," "),a(4),h(m(6,7,"labels.commons.required")))}function ake(e,o){e&1&&(l(0,"mat-error"),c(1),p(2,"translate"),p(3,"translate"),l(4,"strong"),c(5),p(6,"translate"),r()()),e&2&&(a(),le(" ",m(2,3,"labels.inputs.Account Name")," ",m(3,5,"labels.commons.is")," "),a(4),h(m(6,7,"labels.commons.required")))}function rke(e,o){if(e&1&&(l(0,"mat-option",5),c(1),r()),e&2){let t=o.$implicit;g("value",t.id),a(),v(" ",t.value," ")}}function lke(e,o){e&1&&(l(0,"mat-error"),c(1),p(2,"translate"),p(3,"translate"),l(4,"strong"),c(5),p(6,"translate"),r()()),e&2&&(a(),le(" ",m(2,3,"labels.inputs.Account Usage")," ",m(3,5,"labels.commons.is")," "),a(4),h(m(6,7,"labels.commons.required")))}function ske(e,o){e&1&&(l(0,"mat-error"),c(1),p(2,"translate"),p(3,"translate"),l(4,"strong"),c(5),p(6,"translate"),r()()),e&2&&(a(),le(" ",m(2,3,"labels.inputs.GL Code")," ",m(3,5,"labels.commons.is")," "),a(4),h(m(6,7,"labels.commons.required")))}function cke(e,o){if(e&1&&(l(0,"mat-option",5),c(1),r()),e&2){let t=o.$implicit;g("value",t.id),a(),v(" ",t.name," ")}}function pke(e,o){if(e&1&&(l(0,"button",19),c(1),p(2,"translate"),r()),e&2){let t=w();g("disabled",t.glAccountForm.invalid||t.glAccountForm.pristine),a(),v(" ",m(2,2,"labels.buttons.Submit")," ")}}var Tv=(()=>{class e{constructor(){this.formBuilder=T(nt),this.accountingService=T(Ui),this.route=T(Ie),this.router=T(qe),this.route.data.subscribe(t=>{this.glAccount=t.glAccountAndChartOfAccountsTemplate})}ngOnInit(){this.createGlAccountForm(),this.setGLAccountForm()}createGlAccountForm(){this.glAccountForm=this.formBuilder.group({type:["",se.required],name:[this.glAccount.name,se.required],usage:[this.glAccount.usage.id,se.required],glCode:[this.glAccount.glCode,se.required],parentId:[this.glAccount.parentId],tagId:[this.glAccount.tagId.id],manualEntriesAllowed:[this.glAccount.manualEntriesAllowed,se.required],description:[this.glAccount.description]})}setGLAccountForm(){this.accountTypeData=this.glAccount.accountTypeOptions,this.accountUsageData=this.glAccount.usageOptions,this.glAccountForm.get("type").valueChanges.subscribe(t=>{switch(t){case 1:this.parentData=this.glAccount.assetHeaderAccountOptions,this.tagData=this.glAccount.allowedAssetsTagOptions;break;case 2:this.parentData=this.glAccount.liabilityHeaderAccountOptions,this.tagData=this.glAccount.allowedLiabilitiesTagOptions;break;case 3:this.parentData=this.glAccount.equityHeaderAccountOptions,this.tagData=this.glAccount.allowedEquityTagOptions;break;case 4:this.parentData=this.glAccount.incomeHeaderAccountOptions,this.tagData=this.glAccount.allowedIncomeTagOptions;break;case 5:this.parentData=this.glAccount.expenseHeaderAccountOptions,this.tagData=this.glAccount.allowedExpensesTagOptions;break}}),this.glAccountForm.get("type").setValue(this.glAccount.type.id)}submit(){this.accountingService.updateGlAccount(this.glAccount.id,this.glAccountForm.value).subscribe(t=>{this.router.navigate(["../../",t.resourceId],{relativeTo:this.route})})}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275cmp=me({type:e,selectors:[["mifosx-edit-gl-account"]],decls:55,vars:36,consts:[[1,"container"],[3,"ngSubmit","formGroup"],[1,"layout-row-wrap","gap-2px","responsive-column"],[1,"flex-48"],["required","","formControlName","type"],[3,"value"],["matInput","","required","","formControlName","name"],["required","","formControlName","usage"],["matInput","","required","","formControlName","glCode"],[1,"flex-48",3,"inputFormControl","glAccountList","required","inputLabel"],[1,"flex-28"],["formControlName","tagId"],[1,"manual-entries-allowed-wrapper","flex-18"],["labelPosition","before","required","","formControlName","manualEntriesAllowed",1,"manual-entries-allowed"],[1,"flex-98"],["matInput","","formControlName","description","cdkTextareaAutosize","","cdkAutosizeMinRows","2"],[1,"layout-row","align-center","gap-5px","responsive-column"],["type","button","mat-raised-button","",3,"routerLink"],["mat-raised-button","","color","primary",3,"disabled",4,"mifosxHasPermission"],["mat-raised-button","","color","primary",3,"disabled"]],template:function(n,i){n&1&&(l(0,"div",0)(1,"mat-card")(2,"form",1),R("ngSubmit",function(){return i.submit()}),l(3,"mat-card-content")(4,"div",2)(5,"mat-form-field",3)(6,"mat-label"),c(7),p(8,"translate"),r(),l(9,"mat-select",4),Se(10,nke,2,2,"mat-option",5,Pe),r(),E(12,oke,7,9,"mat-error"),r(),l(13,"mat-form-field",3)(14,"mat-label"),c(15),p(16,"translate"),r(),b(17,"input",6),E(18,ake,7,9,"mat-error"),r(),l(19,"mat-form-field",3)(20,"mat-label"),c(21),p(22,"translate"),r(),l(23,"mat-select",7),Se(24,rke,2,2,"mat-option",5,Pe),r(),E(26,lke,7,9,"mat-error"),r(),l(27,"mat-form-field",3)(28,"mat-label"),c(29),p(30,"translate"),r(),b(31,"input",8),E(32,ske,7,9,"mat-error"),r(),b(33,"mifosx-gl-account-selector",9),l(34,"mat-form-field",10)(35,"mat-label"),c(36),p(37,"translate"),r(),l(38,"mat-select",11),Se(39,cke,2,2,"mat-option",5,Pe),r()(),l(41,"div",12)(42,"mat-checkbox",13),c(43),p(44,"translate"),r()(),l(45,"mat-form-field",14)(46,"mat-label"),c(47),p(48,"translate"),r(),b(49,"textarea",15),r()()(),l(50,"mat-card-actions",16)(51,"button",17),c(52),p(53,"translate"),r(),F(54,pke,3,4,"button",18),r()()()()),n&2&&(a(2),g("formGroup",i.glAccountForm),a(5),h(m(8,19,"labels.inputs.Account Type")),a(3),we(i.accountTypeData),a(2),I(i.glAccountForm.controls.type.hasError("required")?12:-1),a(3),h(m(16,21,"labels.inputs.Account Name")),a(3),I(i.glAccountForm.controls.name.hasError("required")?18:-1),a(3),h(m(22,23,"labels.inputs.Account Usage")),a(3),we(i.accountUsageData),a(2),I(i.glAccountForm.controls.usage.hasError("required")?26:-1),a(3),h(m(30,25,"labels.inputs.GL Code")),a(3),I(i.glAccountForm.controls.glCode.hasError("required")?32:-1),a(),g("inputFormControl",i.glAccountForm.controls.parentId)("glAccountList",i.parentData)("required",!1)("inputLabel","Parent"),a(3),h(m(37,27,"labels.inputs.Tag")),a(3),we(i.tagData),a(4),v(" ",m(44,29,"labels.inputs.Manual Entries Allowed")," "),a(4),h(m(48,31,"labels.inputs.Description")),a(4),g("routerLink",oe(35,ike)),a(),v(" ",m(53,33,"labels.buttons.Cancel")," "),a(2),g("mifosxHasPermission","UPDATE_GLACCOUNT"))},dependencies:[ue,fe,tt,st,Ue,Xe,dt,Ze,et,Ae,$e,Je,Et,Fe,Be,ut,ze,gt,ft,ve,fi,Ke,ta,Ln,he],styles:[".manual-entries-allowed-wrapper[_ngcontent-%COMP%]{position:relative}.manual-entries-allowed-wrapper[_ngcontent-%COMP%] .manual-entries-allowed[_ngcontent-%COMP%]{padding:0 0 17.5px;position:absolute;bottom:0;right:0}"]})}}return e})();var mke=["buttonCreateClosure"],dke=["templateButtonCreateClosure"],uke=["closuresTable"],fke=["templateClosuresTable"],hke=()=>[10,25,50,100],gke=()=>["create"],_ke=e=>["view",e];function Cke(e,o){e&1&&(l(0,"button",26),b(1,"fa-icon",27),c(2),p(3,"translate"),r()),e&2&&(g("routerLink",oe(4,gke)),a(2),v(" ",m(3,2,"labels.buttons.Create Closure")," "))}function vke(e,o){if(e&1&&(l(0,"mat-option",13),c(1),r()),e&2){let t=o.$implicit;g("value",t.name),a(),v(" ",t.name," ")}}function xke(e,o){e&1&&(l(0,"th",28),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.Office")))}function bke(e,o){if(e&1&&(l(0,"td",29),c(1),r()),e&2){let t=o.$implicit;a(),h(t.officeName)}}function yke(e,o){e&1&&(l(0,"th",28),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.Closure Date")))}function Ske(e,o){if(e&1&&(l(0,"td",29),c(1),r()),e&2){let t=o.$implicit;a(),h(t.closingDate)}}function wke(e,o){e&1&&(l(0,"th",28),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.Comments")))}function Pke(e,o){if(e&1&&(l(0,"td",29),c(1),r()),e&2){let t=o.$implicit;a(),h(t.comments)}}function Tke(e,o){e&1&&(l(0,"th",28),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.Created By")))}function Mke(e,o){if(e&1&&(l(0,"td",29),c(1),r()),e&2){let t=o.$implicit;a(),h(t.createdByUsername)}}function Dke(e,o){e&1&&b(0,"tr",30)}function Eke(e,o){if(e&1&&b(0,"tr",31),e&2){let t=o.$implicit;g("routerLink",Nt(1,_ke,t.id))}}function Ike(e,o){if(e&1){let t=Y();l(0,"h2"),c(1),p(2,"translate"),r(),l(3,"p",32),c(4),p(5,"translate"),r(),l(6,"div",33)(7,"button",34),R("click",function(){let i=V(t).popover,s=w();return i.close(),q(s.configurationWizardService.closeConfigWizard())}),c(8),p(9,"translate"),r(),l(10,"button",35),R("click",function(){let i=V(t).popover,s=w();return i.close(),q(s.previousStep())}),c(11),p(12,"translate"),r(),l(13,"button",35),R("click",function(){let i=V(t).popover,s=w(),d=xe(5),u=xe(38);return i.close(),q(s.showPopover(u,d,"bottom",!0))}),c(14),p(15,"translate"),r()()}e&2&&(a(),h(m(2,5,"labels.heading.Create Closure")),a(3),h(m(5,7,"labels.text.Create new closure")),a(4),v(" ",m(9,9,"labels.buttons.Close")," "),a(3),v(" ",m(12,11,"labels.buttons.Back")," "),a(3),v(" ",m(15,13,"labels.buttons.Next")," "))}function Oke(e,o){if(e&1){let t=Y();l(0,"h4"),c(1),p(2,"translate"),r(),l(3,"div",33)(4,"button",34),R("click",function(){let i=V(t).popover,s=w();return i.close(),q(s.configurationWizardService.closeConfigWizard())}),c(5),p(6,"translate"),r(),l(7,"button",35),R("click",function(){let i=V(t).popover,s=w(),d=xe(2),u=xe(36);return i.close(),q(s.showPopover(u,d,"bottom",!0))}),c(8),p(9,"translate"),r(),l(10,"button",35),R("click",function(){let i=V(t).popover,s=w(),d=xe(18),u=xe(40);return i.close(),q(s.showPopover(u,d,"top",!0))}),c(11),p(12,"translate"),r()()}e&2&&(a(),h(m(2,4,"labels.heading.Search bar to filter closures by office.")),a(4),v(" ",m(6,6,"labels.buttons.Close")," "),a(3),v(" ",m(9,8,"labels.buttons.Back")," "),a(3),v(" ",m(12,10,"labels.buttons.Next")," "))}function Ake(e,o){if(e&1){let t=Y();l(0,"h4"),c(1),p(2,"translate"),l(3,"a",36),c(4),p(5,"translate"),r()(),l(6,"div",33)(7,"button",34),R("click",function(){let i=V(t).popover,s=w();return i.close(),q(s.configurationWizardService.closeConfigWizard())}),c(8),p(9,"translate"),r(),l(10,"button",35),R("click",function(){let i=V(t).popover,s=w(),d=xe(5),u=xe(38);return i.close(),q(s.showPopover(u,d,"bottom",!0))}),c(11),p(12,"translate"),r(),l(13,"button",35),R("click",function(){let i=V(t).popover,s=w();return i.close(),q(s.nextStep())}),c(14),p(15,"translate"),r()()}e&2&&(a(),v(" ",m(2,5,"labels.heading.List of closures. To know more click"),": "),a(3),h(m(5,7,"labels.inputs.Closing Entries")),a(4),v(" ",m(9,9,"labels.buttons.Close")," "),a(3),v(" ",m(12,11,"labels.buttons.Back")," "),a(3),v(" ",m(15,13,"labels.buttons.Next")," "))}var Mv=(()=>{class e{constructor(){this.route=T(Ie),this.router=T(qe),this.configurationWizardService=T(Qi),this.popoverService=T(Wi),this.displayedColumns=["officeName","closingDate","comments","createdByUsername"],this.officeName=new it,this.route.data.subscribe(t=>{this.officeData=t.offices,this.glAccountClosureData=t.glAccountClosures})}ngOnInit(){this.applyFilter(),this.setFilteredOffices(),this.setAccountingClosures()}applyFilter(){this.officeName.valueChanges.subscribe(t=>{this.dataSource.filter=t.trim().toLowerCase()})}setAccountingClosures(){this.dataSource=new Wt(this.glAccountClosureData),this.dataSource.paginator=this.paginator,this.dataSource.sort=this.sort}setFilteredOffices(){this.filteredOfficeData=this.officeName.valueChanges.pipe(hl(""),Mn(t=>typeof t=="string"?t:t.name),Mn(t=>t?this.filterOfficeAutocompleteData(t):this.officeData))}filterOfficeAutocompleteData(t){return this.officeData.filter(n=>n.name.toLowerCase().includes(t.toLowerCase()))}showPopover(t,n,i,s){setTimeout(()=>this.popoverService.open(t,n,i,s,{}),200)}ngAfterViewInit(){this.configurationWizardService.showClosingEntriesPage===!0&&setTimeout(()=>{this.showPopover(this.templateButtonCreateClosure,this.buttonCreateClosure.nativeElement,"bottom",!0)}),this.configurationWizardService.showClosingEntriesList===!0&&setTimeout(()=>{this.showPopover(this.templateClosuresTable,this.closuresTable.nativeElement,"top",!0)})}nextStep(){this.configurationWizardService.showClosingEntriesPage=!1,this.configurationWizardService.showClosingEntriesList=!1,this.configurationWizardService.showCreateJournalEntries=!0,this.router.navigate(["/accounting"])}previousStep(){this.configurationWizardService.showClosingEntriesPage=!1,this.configurationWizardService.showClosingEntriesList=!1,this.configurationWizardService.showClosingEntries=!0,this.router.navigate(["/accounting"])}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275cmp=me({type:e,selectors:[["mifosx-closing-entries"]],viewQuery:function(n,i){if(n&1&&(Ee(kt,7),Ee(It,7),Ee(mke,5),Ee(dke,5),Ee(uke,5),Ee(fke,5)),n&2){let s;Te(s=Me())&&(i.paginator=s.first),Te(s=Me())&&(i.sort=s.first),Te(s=Me())&&(i.buttonCreateClosure=s.first),Te(s=Me())&&(i.templateButtonCreateClosure=s.first),Te(s=Me())&&(i.closuresTable=s.first),Te(s=Me())&&(i.templateClosuresTable=s.first)}},decls:41,vars:13,consts:[["buttonCreateClosure",""],["filter",""],["officeNameAutocomplete","matAutocomplete"],["closuresTable",""],["templateButtonCreateClosure",""],["templateFilter",""],["templateClosuresTable",""],[1,"container","m-b-20","layout-row","align-end","gap-20px"],["mat-raised-button","","color","primary",3,"routerLink",4,"mifosxHasPermission"],[1,"container","layout-row"],[1,"flex-fill"],["matInput","",3,"formControl","matAutocomplete"],["autoActiveFirstOption",""],[3,"value"],[1,"container"],[1,"mat-elevation-z8"],["mat-table","","matSort","",3,"dataSource"],["matColumnDef","officeName"],["mat-header-cell","","mat-sort-header","",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","closingDate"],["matColumnDef","comments"],["matColumnDef","createdByUsername"],["mat-header-row","",4,"matHeaderRowDef"],["mat-row","","class","select-row",3,"routerLink",4,"matRowDef","matRowDefColumns"],["showFirstLastButtons","",3,"pageSizeOptions"],["mat-raised-button","","color","primary",3,"routerLink"],["icon","plus",1,"m-r-10"],["mat-header-cell","","mat-sort-header",""],["mat-cell",""],["mat-header-row",""],["mat-row","",1,"select-row",3,"routerLink"],[1,"mw300"],[1,"layout-row","align-end","gap-2px","responsive-column"],["mat-raised-button","","color","warn",3,"click"],["mat-raised-button","","color","primary",3,"click"],["href","https://mifosforge.jira.com/wiki/spaces/docs/pages/67895316/Closing+Entries","target","_blank"]],template:function(n,i){if(n&1&&(l(0,"div",7)(1,"div",null,0),F(3,Cke,4,5,"button",8),r()(),l(4,"div",9,1)(6,"mat-form-field",10)(7,"mat-label"),c(8),p(9,"translate"),r(),b(10,"input",11),r()(),l(11,"mat-autocomplete",12,2),Se(13,vke,2,2,"mat-option",13,Pe),p(15,"async"),r(),l(16,"div",14)(17,"div",15,3)(19,"table",16),X(20,17),F(21,xke,3,3,"th",18)(22,bke,2,1,"td",19),Z(),X(23,20),F(24,yke,3,3,"th",18)(25,Ske,2,1,"td",19),Z(),X(26,21),F(27,wke,3,3,"th",18)(28,Pke,2,1,"td",19),Z(),X(29,22),F(30,Tke,3,3,"th",18)(31,Mke,2,1,"td",19),Z(),F(32,Dke,1,0,"tr",23)(33,Eke,1,3,"tr",24),r(),b(34,"mat-paginator",25),r()(),F(35,Ike,16,15,"ng-template",null,4,ti)(37,Oke,13,12,"ng-template",null,5,ti)(39,Ake,16,15,"ng-template",null,6,ti)),n&2){let s=xe(12);a(3),g("mifosxHasPermission","CREATE_GLCLOSURE"),a(5),h(m(9,8,"labels.inputs.Office Name")),a(2),g("formControl",i.officeName)("matAutocomplete",s),a(3),we(m(15,10,i.filteredOfficeData)),a(6),g("dataSource",i.dataSource),a(13),g("matHeaderRowDef",i.displayedColumns),a(),g("matRowDefColumns",i.displayedColumns),a(),g("pageSizeOptions",oe(12,hke))}},dependencies:[ue,fe,st,Ue,_n,Ae,Fe,Be,ze,ft,ve,Ke,ke,er,Za,_t,It,xt,vt,bt,ri,Ct,yt,St,Pt,wt,Tt,kt,Xa,he],styles:["table[_ngcontent-%COMP%]{width:100%}table[_ngcontent-%COMP%] .select-row[_ngcontent-%COMP%]:hover{cursor:pointer}"]})}}return e})();var Fke=()=>["../"];function kke(e,o){if(e&1&&(l(0,"mat-option",5),c(1),r()),e&2){let t=o.$implicit;g("value",t.id),a(),v(" ",t.name," ")}}function Bke(e,o){e&1&&(l(0,"mat-error"),c(1),p(2,"translate"),p(3,"translate"),l(4,"strong"),c(5),p(6,"translate"),r()()),e&2&&(a(),le(" ",m(2,3,"labels.inputs.Office")," ",m(3,5,"labels.commons.is")," "),a(4),h(m(6,7,"labels.commons.required")))}function Rke(e,o){e&1&&(l(0,"mat-error"),c(1),p(2,"translate"),p(3,"translate"),l(4,"strong"),c(5),p(6,"translate"),r()()),e&2&&(a(),le(" ",m(2,3,"labels.inputs.Closing Date")," ",m(3,5,"labels.commons.is")," "),a(4),h(m(6,7,"labels.commons.required")))}function Nke(e,o){if(e&1&&(l(0,"button",13),c(1),p(2,"translate"),r()),e&2){let t=w();g("disabled",!t.accountingClosureForm.valid),a(),v(" ",m(2,2,"labels.buttons.Submit")," ")}}var Dv=(()=>{class e{constructor(){this.formBuilder=T(nt),this.accountingService=T(Ui),this.settingsService=T(At),this.dateUtils=T(Zt),this.route=T(Ie),this.router=T(qe),this.minDate=new Date(2e3,0,1),this.maxDate=new Date,this.route.data.subscribe(t=>{this.officeData=t.offices})}ngOnInit(){this.maxDate=this.settingsService.businessDate,this.createAccountingClosureForm()}createAccountingClosureForm(){this.accountingClosureForm=this.formBuilder.group({officeId:["",se.required],closingDate:["",se.required],comments:[""]})}submit(){let t=this.accountingClosureForm.value;t.locale=this.settingsService.language.code,t.dateFormat=this.settingsService.dateFormat,t.closingDate&&(t.closingDate=this.dateUtils.formatDate(t.closingDate,this.settingsService.dateFormat)),this.accountingService.createAccountingClosure(t).subscribe(n=>{this.router.navigate(["../view",n.resourceId],{relativeTo:this.route})})}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275cmp=me({type:e,selectors:[["mifosx-create-closure"]],decls:32,vars:22,consts:[["closingDatePicker",""],[1,"container"],[3,"ngSubmit","formGroup"],[1,"layout-column"],["required","","formControlName","officeId"],[3,"value"],[3,"click"],["matInput","","required","","formControlName","closingDate",3,"min","max","matDatepicker"],["matSuffix","",3,"for"],["matInput","","formControlName","comments","cdkTextareaAutosize","","cdkAutosizeMinRows","2"],[1,"layout-row","align-center","gap-5px","responsive-column"],["type","button","mat-raised-button","",3,"routerLink"],["mat-raised-button","","color","primary",3,"disabled",4,"mifosxHasPermission"],["mat-raised-button","","color","primary",3,"disabled"]],template:function(n,i){if(n&1){let s=Y();l(0,"div",1)(1,"mat-card")(2,"form",2),R("ngSubmit",function(){return V(s),q(i.submit())}),l(3,"mat-card-content")(4,"div",3)(5,"mat-form-field")(6,"mat-label"),c(7),p(8,"translate"),r(),l(9,"mat-select",4),Se(10,kke,2,2,"mat-option",5,Pe),r(),E(12,Bke,7,9,"mat-error"),r(),l(13,"mat-form-field",6),R("click",function(){V(s);let u=xe(20);return q(u.open())}),l(14,"mat-label"),c(15),p(16,"translate"),r(),b(17,"input",7)(18,"mat-datepicker-toggle",8)(19,"mat-datepicker",null,0),E(21,Rke,7,9,"mat-error"),r(),l(22,"mat-form-field")(23,"mat-label"),c(24),p(25,"translate"),r(),b(26,"textarea",9),r()()(),l(27,"mat-card-actions",10)(28,"button",11),c(29),p(30,"translate"),r(),F(31,Nke,3,4,"button",12),r()()()()}if(n&2){let s=xe(20);a(2),g("formGroup",i.accountingClosureForm),a(5),h(m(8,13,"labels.inputs.Office")),a(3),we(i.officeData),a(2),I(i.accountingClosureForm.controls.officeId.hasError("required")?12:-1),a(3),h(m(16,15,"labels.inputs.Closing Date")),a(2),g("min",i.minDate)("max",i.maxDate)("matDatepicker",s),a(),g("for",s),a(3),I(i.accountingClosureForm.controls.closingDate.hasError("required")?21:-1),a(3),h(m(25,17,"labels.inputs.Comments")),a(4),g("routerLink",oe(21,Fke)),a(),v(" ",m(30,19,"labels.buttons.Cancel")," "),a(2),g("mifosxHasPermission","CREATE_GLCLOSURE")}},dependencies:[ue,fe,tt,st,Ue,Xe,dt,Ze,et,Ae,$e,Je,Et,Fe,Be,ut,ai,ze,gt,ft,mi,di,pi,ve,Ke,Ln,he],styles:[".container[_ngcontent-%COMP%]{max-width:37rem}"]})}}return e})();var Lke=()=>["edit"];function Vke(e,o){if(e&1){let t=Y();l(0,"button",5),R("click",function(){V(t);let i=w();return q(i.deleteAccountingClosure())}),b(1,"fa-icon",6),c(2),p(3,"translate"),r()}e&2&&(a(2),v(" ",m(3,1,"labels.buttons.Delete")," "))}function qke(e,o){if(e&1&&(l(0,"div",4)(1,"mat-card")(2,"mat-card-content")(3,"div",7)(4,"div",8),c(5),p(6,"translate"),r(),l(7,"div",9),c(8),r(),l(9,"div",8),c(10),p(11,"translate"),r(),l(12,"div",9),c(13),r(),l(14,"div",8),c(15),p(16,"translate"),r(),l(17,"div",9),c(18),r(),l(19,"div",8),c(20),p(21,"translate"),r(),l(22,"div",9),c(23),r(),l(24,"div",8),c(25),p(26,"translate"),r(),l(27,"div",9),c(28),r(),l(29,"div",8),c(30),p(31,"translate"),r(),l(32,"div",9),c(33),r(),l(34,"div",8),c(35),p(36,"translate"),r(),l(37,"div",9),c(38),r()()()()()),e&2){let t=w();a(5),v(" ",m(6,14,"labels.inputs.Office")," "),a(3),v(" ",t.glAccountClosure.officeName," "),a(2),v(" ",m(11,16,"labels.inputs.Closure Date")," "),a(3),v(" ",t.glAccountClosure.closingDate," "),a(2),v(" ",m(16,18,"labels.inputs.Closed By")," "),a(3),v(" ",t.glAccountClosure.createdByUsername," "),a(2),v(" ",m(21,20,"labels.inputs.Updated By")," "),a(3),v(" ",t.glAccountClosure.lastUpdatedByUsername," "),a(2),v(" ",m(26,22,"labels.inputs.Updated on")," "),a(3),v(" ",t.glAccountClosure.lastUpdatedDate," "),a(2),v(" ",m(31,24,"labels.inputs.Closure Creation Date")," "),a(3),v(" ",t.glAccountClosure.createdDate," "),a(2),v(" ",m(36,26,"labels.inputs.Comments")," "),a(3),v(" ",t.glAccountClosure.comments," ")}}var Ev=(()=>{class e{constructor(){this.accountingService=T(Ui),this.route=T(Ie),this.router=T(qe),this.dialog=T(Ht),this.route.data.subscribe(t=>{this.glAccountClosure=t.glAccountClosure})}deleteAccountingClosure(){this.dialog.open(vi,{data:{deleteContext:`accounting closure ${this.glAccountClosure.id}`}}).afterClosed().subscribe(n=>{n.delete&&this.accountingService.deleteAccountingClosure(this.glAccountClosure.id).subscribe(()=>{this.router.navigate(["/accounting/closing-entries"])})})}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275cmp=me({type:e,selectors:[["mifosx-view-closure"]],decls:7,vars:7,consts:[[1,"layout-row","align-end","gap-2px","responsive-column","container","m-b-20"],["mat-raised-button","","color","primary",3,"routerLink"],["icon","edit",1,"m-r-10"],["mat-raised-button","","color","warn",3,"click",4,"mifosxHasPermission"],[1,"container"],["mat-raised-button","","color","warn",3,"click"],["icon","trash",1,"m-r-10"],[1,"layout-row-wrap"],[1,"flex-50","header"],[1,"flex-50"]],template:function(n,i){n&1&&(l(0,"div",0)(1,"button",1),b(2,"fa-icon",2),c(3),p(4,"translate"),r(),F(5,Vke,4,3,"button",3),r(),E(6,qke,39,28,"div",4)),n&2&&(a(),g("routerLink",oe(6,Lke)),a(2),v(" ",m(4,4,"labels.buttons.Edit")," "),a(2),g("mifosxHasPermission","DELETE_GLCLOSURE"),a(),I(i.glAccountClosure?6:-1))},dependencies:[ue,fe,Ae,$e,Je,ve,Ke,ke,he],styles:[".container[_ngcontent-%COMP%]{max-width:37rem}.container[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] div[_ngcontent-%COMP%]{margin:1rem 0;word-wrap:break-word}.container[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] div.header[_ngcontent-%COMP%]{font-weight:500}"]})}}return e})();var zke=()=>["../"];function Hke(e,o){if(e&1&&(l(0,"mat-option",5),c(1),r()),e&2){let t=o.$implicit;g("value",t.id),a(),v(" ",t.name," ")}}var Iv=(()=>{class e{constructor(){this.formBuilder=T(nt),this.accountingService=T(Ui),this.route=T(Ie),this.router=T(qe),this.route.data.subscribe(t=>{this.glAccountClosure=t.glAccountClosure})}ngOnInit(){this.createAccountingClosureForm(),this.setAccountingClosure()}createAccountingClosureForm(){this.accountingClosureForm=this.formBuilder.group({officeId:[{value:"",disabled:!0},se.required],closingDate:[{value:"",disabled:!0},se.required],comments:[""]})}setAccountingClosure(){this.officeData=[{id:this.glAccountClosure.officeId,name:this.glAccountClosure.officeName}],this.accountingClosureForm.get("officeId").setValue(this.glAccountClosure.officeId),this.accountingClosureForm.get("closingDate").setValue(new Date(this.glAccountClosure.closingDate)),this.accountingClosureForm.get("comments").setValue(this.glAccountClosure.comments)}submit(){this.accountingService.updateAccountingClosure(this.glAccountClosure.id,{comments:this.accountingClosureForm.value.comments}).subscribe(t=>{this.router.navigate(["../../",t.resourceId],{relativeTo:this.route})})}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275cmp=me({type:e,selectors:[["mifosx-edit-closure"]],decls:32,vars:21,consts:[["closingDatePicker",""],[1,"container"],[3,"ngSubmit","formGroup"],[1,"layout-column"],["required","","formControlName","officeId"],[3,"value"],[3,"click"],["matInput","","required","","formControlName","closingDate",3,"matDatepicker"],["matSuffix","",3,"for"],["matInput","","formControlName","comments","cdkTextareaAutosize","","cdkAutosizeMinRows","2"],[1,"layout-row","align-center","gap-5px","responsive-column"],["type","button","mat-raised-button","",3,"routerLink"],["mat-raised-button","","color","primary",3,"disabled"]],template:function(n,i){if(n&1){let s=Y();l(0,"div",1)(1,"mat-card")(2,"form",2),R("ngSubmit",function(){return V(s),q(i.submit())}),l(3,"mat-card-content")(4,"div",3)(5,"mat-form-field")(6,"mat-label"),c(7),p(8,"translate"),r(),l(9,"mat-select",4),Se(10,Hke,2,2,"mat-option",5,Pe),r()(),l(12,"mat-form-field",6),R("click",function(){V(s);let u=xe(19);return q(u.open())}),l(13,"mat-label"),c(14),p(15,"translate"),r(),b(16,"input",7)(17,"mat-datepicker-toggle",8)(18,"mat-datepicker",null,0),r(),l(20,"mat-form-field")(21,"mat-label"),c(22),p(23,"translate"),r(),b(24,"textarea",9),r()()(),l(25,"mat-card-actions",10)(26,"button",11),c(27),p(28,"translate"),r(),l(29,"button",12),c(30),p(31,"translate"),r()()()()()}if(n&2){let s=xe(19);a(2),g("formGroup",i.accountingClosureForm),a(5),h(m(8,10,"labels.inputs.Office")),a(3),we(i.officeData),a(4),h(m(15,12,"labels.inputs.Closing Date")),a(2),g("matDatepicker",s),a(),g("for",s),a(5),h(m(23,14,"labels.inputs.Comments")),a(4),g("routerLink",oe(20,zke)),a(),v(" ",m(28,16,"labels.buttons.Cancel")," "),a(2),g("disabled",i.accountingClosureForm.pristine),a(),v(" ",m(31,18,"labels.buttons.Submit")," ")}},dependencies:[ue,fe,tt,st,Ue,Xe,dt,Ze,et,Ae,$e,Je,Et,Fe,Be,ai,ze,gt,ft,mi,di,pi,ve,Ln,he],styles:[".container[_ngcontent-%COMP%]{max-width:37rem}"]})}}return e})();var Gke=()=>[10,25,50,100],jke=()=>["create"],$ke=e=>["view",e];function Uke(e,o){e&1&&(l(0,"button",19),b(1,"fa-icon",20),c(2),p(3,"translate"),r()),e&2&&(g("routerLink",oe(4,jke)),a(2),v(" ",m(3,2,"labels.buttons.Add Rule")," "))}function Wke(e,o){e&1&&(l(0,"th",21),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.name")))}function Qke(e,o){if(e&1&&(l(0,"td",22),c(1),r()),e&2){let t=o.$implicit;a(),h(t.name)}}function Yke(e,o){e&1&&(l(0,"th",21),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.Office")))}function Jke(e,o){if(e&1&&(l(0,"td",22),c(1),r()),e&2){let t=o.$implicit;a(),h(t.officeName)}}function Kke(e,o){e&1&&(l(0,"th",21),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.Debit Tags")))}function Xke(e,o){if(e&1&&(l(0,"td",22),c(1),r()),e&2){let t=o.$implicit;a(),h(t.debitTags)}}function Zke(e,o){e&1&&(l(0,"th",21),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.Debit Account")))}function e8e(e,o){if(e&1&&(l(0,"td",22),c(1),r()),e&2){let t=o.$implicit;a(),v(" ",t.debitAccounts?t.debitAccounts[0].name:""," ")}}function t8e(e,o){e&1&&(l(0,"th",21),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.Credit Tags")))}function i8e(e,o){if(e&1&&(l(0,"td",22),c(1),r()),e&2){let t=o.$implicit;a(),h(t.creditTags)}}function n8e(e,o){e&1&&(l(0,"th",21),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.Credit Account")))}function o8e(e,o){if(e&1&&(l(0,"td",22),c(1),r()),e&2){let t=o.$implicit;a(),v(" ",t.creditAccounts?t.creditAccounts[0].name:""," ")}}function a8e(e,o){e&1&&b(0,"tr",23)}function r8e(e,o){if(e&1&&b(0,"tr",24),e&2){let t=o.$implicit;g("routerLink",Nt(1,$ke,t.id))}}var Ov=(()=>{class e{constructor(){this.route=T(Ie),this.displayedColumns=["name","officeName","debitTags","debitAccount","creditTags","creditAccount"],this.route.data.subscribe(t=>{this.accountingRuleData=t.accountingRules})}ngOnInit(){this.setAccountingRules()}setAccountingRules(){this.accountingRuleData.forEach(t=>{t.debitTags=t.debitTags?t.debitTags.map(n=>n.tag.name).join(", "):"",t.creditTags=t.creditTags?t.creditTags.map(n=>n.tag.name).join(", "):""}),this.dataSource=new Wt(this.accountingRuleData),this.dataSource.paginator=this.paginator,this.dataSource.sortingDataAccessor=(t,n)=>{switch(n){case"debitAccount":return t.debitAccounts[0].name;case"creditAccount":return t.creditAccounts[0].name;default:return t[n]}},this.dataSource.sort=this.sort}applyFilter(t){this.dataSource.filter=t.trim().toLowerCase()}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275cmp=me({type:e,selectors:[["mifosx-accounting-rules"]],viewQuery:function(n,i){if(n&1&&(Ee(kt,7),Ee(It,7)),n&2){let s;Te(s=Me())&&(i.paginator=s.first),Te(s=Me())&&(i.sort=s.first)}},decls:32,vars:9,consts:[[1,"container","m-b-20","layout-row","align-end","gap-20px"],["mat-raised-button","","color","primary",3,"routerLink",4,"mifosxHasPermission"],[1,"container"],[1,"layout-row"],[1,"flex-fill"],["matInput","",3,"keyup"],[1,"mat-elevation-z8"],["mat-table","","matSort","",3,"dataSource"],["matColumnDef","name"],["mat-header-cell","","mat-sort-header","",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","officeName"],["matColumnDef","debitTags"],["matColumnDef","debitAccount"],["matColumnDef","creditTags"],["matColumnDef","creditAccount"],["mat-header-row","",4,"matHeaderRowDef"],["mat-row","","class","select-row",3,"routerLink",4,"matRowDef","matRowDefColumns"],["showFirstLastButtons","",3,"pageSizeOptions"],["mat-raised-button","","color","primary",3,"routerLink"],["icon","plus",1,"m-r-10"],["mat-header-cell","","mat-sort-header",""],["mat-cell",""],["mat-header-row",""],["mat-row","",1,"select-row",3,"routerLink"]],template:function(n,i){n&1&&(l(0,"div",0),F(1,Uke,4,5,"button",1),r(),l(2,"div",2)(3,"div",3)(4,"mat-form-field",4)(5,"mat-label"),c(6),p(7,"translate"),r(),l(8,"input",5),R("keyup",function(d){return i.applyFilter(d.target.value)}),r()()(),l(9,"div",6)(10,"table",7),X(11,8),F(12,Wke,3,3,"th",9)(13,Qke,2,1,"td",10),Z(),X(14,11),F(15,Yke,3,3,"th",9)(16,Jke,2,1,"td",10),Z(),X(17,12),F(18,Kke,3,3,"th",9)(19,Xke,2,1,"td",10),Z(),X(20,13),F(21,Zke,3,3,"th",9)(22,e8e,2,1,"td",10),Z(),X(23,14),F(24,t8e,3,3,"th",9)(25,i8e,2,1,"td",10),Z(),X(26,15),F(27,n8e,3,3,"th",9)(28,o8e,2,1,"td",10),Z(),F(29,a8e,1,0,"tr",16)(30,r8e,1,3,"tr",17),r(),b(31,"mat-paginator",18),r()()),n&2&&(a(),g("mifosxHasPermission","CREATE_ACCOUNTINGRULE"),a(5),h(m(7,6,"labels.inputs.Filter")),a(4),g("dataSource",i.dataSource),a(19),g("matHeaderRowDef",i.displayedColumns),a(),g("matRowDefColumns",i.displayedColumns),a(),g("pageSizeOptions",oe(8,Gke)))},dependencies:[ue,fe,Ae,Fe,Be,ze,ve,Ke,ke,_t,It,xt,vt,bt,ri,Ct,yt,St,Pt,wt,Tt,kt,he],styles:["table[_ngcontent-%COMP%]{width:100%}table[_ngcontent-%COMP%] .select-row[_ngcontent-%COMP%]:hover{cursor:pointer}"]})}}return e})();var Av=e=>{let o=e.controls.accountToDebit.value,t=e.controls.debitTags.value,n=e.controls.accountToCredit.value,i=e.controls.creditTags.value;return(o||t)&&(n||i)?null:{error:!0}};var l8e=()=>["../../"];function s8e(e,o){e&1&&(l(0,"mat-error"),c(1),p(2,"translate"),p(3,"translate"),l(4,"strong"),c(5),p(6,"translate"),r()()),e&2&&(a(),le(" ",m(2,3,"labels.inputs.Accounting Rule Name")," ",m(3,5,"labels.commons.is")," "),a(4),h(m(6,7,"labels.commons.required")))}function c8e(e,o){if(e&1&&(l(0,"mat-option",6),c(1),r()),e&2){let t=o.$implicit;g("value",t.id),a(),v(" ",t.name," ")}}function p8e(e,o){e&1&&(l(0,"mat-error"),c(1),p(2,"translate"),p(3,"translate"),l(4,"strong"),c(5),p(6,"translate"),r()()),e&2&&(a(),le(" ",m(2,3,"labels.inputs.Office")," ",m(3,5,"labels.commons.is")," "),a(4),h(m(6,7,"labels.commons.required")))}function m8e(e,o){if(e&1&&(l(0,"mat-option",6),c(1),r()),e&2){let t=o.$implicit;g("value",t.id),a(),v(" ",t.name," ")}}function d8e(e,o){if(e&1&&(l(0,"mat-form-field",3)(1,"mat-label"),c(2),p(3,"translate"),r(),l(4,"mat-select",19),Se(5,m8e,2,2,"mat-option",6,Pe),r()()),e&2){let t=w();a(2),h(m(3,1,"labels.inputs.Account to Debit")),a(3),we(t.glAccountData)}}function u8e(e,o){if(e&1&&(l(0,"mat-option",6),c(1),r()),e&2){let t=o.$implicit;g("value",t.id),a(),v(" ",t.name," ")}}function f8e(e,o){if(e&1&&(l(0,"div",12)(1,"mat-form-field",8)(2,"mat-label"),c(3),p(4,"translate"),r(),l(5,"mat-select",20),Se(6,u8e,2,2,"mat-option",6,Pe),r()(),l(8,"div",21)(9,"mat-checkbox",22),c(10),p(11,"translate"),r()()()),e&2){let t=w();a(3),h(m(4,2,"labels.inputs.Debit Tags")),a(3),we(t.debitTagData),a(4),v(" ",m(11,4,"labels.inputs.Multiple Debit Entries Allowed")," ")}}function h8e(e,o){if(e&1&&(l(0,"mat-option",6),c(1),r()),e&2){let t=o.$implicit;g("value",t.id),a(),v(" ",t.name," ")}}function g8e(e,o){if(e&1&&(l(0,"mat-form-field",3)(1,"mat-label"),c(2),p(3,"translate"),r(),l(4,"mat-select",23),Se(5,h8e,2,2,"mat-option",6,Pe),r()()),e&2){let t=w();a(2),h(m(3,1,"labels.inputs.Account to Credit")),a(3),we(t.glAccountData)}}function _8e(e,o){if(e&1&&(l(0,"mat-option",6),c(1),r()),e&2){let t=o.$implicit;g("value",t.id),a(),v(" ",t.name," ")}}function C8e(e,o){if(e&1&&(l(0,"div",12)(1,"mat-form-field",8)(2,"mat-label"),c(3),p(4,"translate"),r(),l(5,"mat-select",24),Se(6,_8e,2,2,"mat-option",6,Pe),r()(),l(8,"div",21)(9,"mat-checkbox",25),c(10),p(11,"translate"),r()()()),e&2){let t=w();a(3),h(m(4,2,"labels.inputs.Credit Tags")),a(3),we(t.creditTagData),a(4),v(" ",m(11,4,"labels.inputs.Multiple Credit Entries Allowed")," ")}}function v8e(e,o){if(e&1&&(l(0,"button",26),c(1),p(2,"translate"),r()),e&2){let t=w();g("disabled",!t.accountingRuleForm.valid),a(),v(" ",m(2,2,"labels.buttons.Submit")," ")}}var Fv=(()=>{class e{constructor(){this.formBuilder=T(nt),this.accountingService=T(Ui),this.route=T(Ie),this.router=T(qe),this.snackBar=T(x0),this.translateService=T(yi),this.route.data.subscribe(t=>{this.officeData=t.accountingRulesTemplate.allowedOffices,this.glAccountData=t.accountingRulesTemplate.allowedAccounts,this.debitTagData=t.accountingRulesTemplate.allowedDebitTagOptions,this.creditTagData=t.accountingRulesTemplate.allowedCreditTagOptions})}ngOnInit(){this.createAccountingRuleForm(),this.setAccountingRulesForm()}createAccountingRuleForm(){this.accountingRuleForm=this.formBuilder.group({name:["",se.required],officeId:["",se.required],debitRuleType:["fixedAccount"],accountToDebit:[""],debitTags:[""],allowMultipleDebitEntries:[""],creditRuleType:["fixedAccount"],accountToCredit:[""],creditTags:[""],allowMultipleCreditEntries:[""],description:[""]},{validator:Av})}setAccountingRulesForm(){this.accountingRuleForm.get("debitRuleType").valueChanges.subscribe(t=>{t==="fixedAccount"?(this.accountingRuleForm.get("debitTags").reset(),this.accountingRuleForm.get("allowMultipleDebitEntries").reset()):(this.accountingRuleForm.get("accountToDebit").reset(),this.accountingRuleForm.get("allowMultipleDebitEntries").setValue(!1))}),this.accountingRuleForm.get("creditRuleType").valueChanges.subscribe(t=>{t==="fixedAccount"?(this.accountingRuleForm.get("creditTags").reset(),this.accountingRuleForm.get("allowMultipleCreditEntries").reset()):(this.accountingRuleForm.get("accountToCredit").reset(),this.accountingRuleForm.get("allowMultipleCreditEntries").setValue(!1))})}submit(){let t=this.accountingRuleForm.value;t.debitRuleType==="fixedAccount"?(delete t.debitTags,delete t.allowMultipleDebitEntries):delete t.accountToDebit,t.creditRuleType==="fixedAccount"?(delete t.creditTags,delete t.allowMultipleCreditEntries):delete t.accountToCredit,delete t.debitRuleType,delete t.creditRuleType,this.accountingService.createAccountingRule(t).subscribe({next:n=>{this.router.navigate(["../view",n.resourceId],{relativeTo:this.route})},error:n=>{let i=this.translateService.instant("errors.accountingRule.duplicateName");n?.error?.defaultUserMessage?.includes("Duplicate entry")||typeof n?.error?.message=="string"&&n.error.message.includes("Duplicate entry")||typeof n?.error=="string"&&n.error.includes("Duplicate entry")?this.snackBar.open(i,"Close",{duration:7e3,verticalPosition:"top",horizontalPosition:"right",panelClass:"custom-snackbar-top-right"}):this.snackBar.open(n?.error?.defaultUserMessage||n?.error?.message||"An error occurred. Please try again.","Close",{duration:7e3,verticalPosition:"top",horizontalPosition:"right",panelClass:"custom-snackbar-top-right"})}})}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275cmp=me({type:e,selectors:[["mifosx-create-rule"]],decls:55,vars:40,consts:[[1,"container"],[3,"ngSubmit","formGroup"],[1,"layout-row-wrap","gap-2px","responsive-column"],[1,"flex-48"],["matInput","","required","","formControlName","name"],["required","","formControlName","officeId"],[3,"value"],[1,"rule-wrapper","flex-48","layout-row","responsive-column"],[1,"flex-50"],["formControlName","debitRuleType",1,"flex-50","layout-row","gap-5percent","radio-group-spacing"],["value","fixedAccount"],["value","listOfAccounts"],[1,"flex-48","layout-row","gap-2percent","responsive-column"],["formControlName","creditRuleType",1,"flex-50","layout-row","gap-5-percent","radio-group-spacing"],[1,"flex-98"],["matInput","","formControlName","description","cdkTextareaAutosize","","cdkAutosizeMinRows","2"],[1,"layout-row","align-center","gap-5px","responsive-column"],["type","button","mat-raised-button","",3,"routerLink"],["mat-raised-button","","color","primary",3,"disabled",4,"mifosxHasPermission"],["formControlName","accountToDebit"],["formControlName","debitTags","multiple",""],["ngClass.gt-md","entries-wrapper",1,"flex-50"],["labelPosition","before","formControlName","allowMultipleDebitEntries",1,"entries"],["formControlName","accountToCredit"],["formControlName","creditTags","multiple",""],["labelPosition","before","formControlName","allowMultipleCreditEntries",1,"entries"],["mat-raised-button","","color","primary",3,"disabled"]],template:function(n,i){n&1&&(l(0,"div",0)(1,"mat-card")(2,"form",1),R("ngSubmit",function(){return i.submit()}),l(3,"mat-card-content")(4,"div",2)(5,"mat-form-field",3)(6,"mat-label"),c(7),p(8,"translate"),r(),b(9,"input",4),E(10,s8e,7,9,"mat-error"),r(),l(11,"mat-form-field",3)(12,"mat-label"),c(13),p(14,"translate"),r(),l(15,"mat-select",5),Se(16,c8e,2,2,"mat-option",6,Pe),r(),E(18,p8e,7,9,"mat-error"),r(),l(19,"div",7)(20,"mat-label",8),c(21),p(22,"translate"),r(),l(23,"mat-radio-group",9)(24,"mat-radio-button",10),c(25),p(26,"translate"),r(),l(27,"mat-radio-button",11),c(28),p(29,"translate"),r()()(),E(30,d8e,7,3,"mat-form-field",3),E(31,f8e,12,6,"div",12),l(32,"div",7)(33,"mat-label",8),c(34),p(35,"translate"),r(),l(36,"mat-radio-group",13)(37,"mat-radio-button",10),c(38),p(39,"translate"),r(),l(40,"mat-radio-button",11),c(41),p(42,"translate"),r()()(),E(43,g8e,7,3,"mat-form-field",3),E(44,C8e,12,6,"div",12),l(45,"mat-form-field",14)(46,"mat-label"),c(47),p(48,"translate"),r(),b(49,"textarea",15),r()()(),l(50,"mat-card-actions",16)(51,"button",17),c(52),p(53,"translate"),r(),F(54,v8e,3,4,"button",18),r()()()()),n&2&&(a(2),g("formGroup",i.accountingRuleForm),a(5),h(m(8,19,"labels.inputs.Accounting Rule Name")),a(3),I(i.accountingRuleForm.controls.name.hasError("required")?10:-1),a(3),h(m(14,21,"labels.inputs.Office")),a(3),we(i.officeData),a(2),I(i.accountingRuleForm.controls.officeId.hasError("required")?18:-1),a(3),v("",m(22,23,"labels.inputs.Affected GL Entry (Debit) Rule Type")," *"),a(4),h(m(26,25,"labels.inputs.Fixed Account")),a(3),h(m(29,27,"labels.inputs.List of Accounts")),a(2),I(i.accountingRuleForm.controls.debitRuleType.value==="fixedAccount"?30:-1),a(),I(i.accountingRuleForm.controls.debitRuleType.value==="listOfAccounts"?31:-1),a(3),v("",m(35,29,"labels.inputs.Affected GL Entry (Credit) Rule Type")," *"),a(4),h(m(39,31,"labels.inputs.Fixed Account")),a(3),h(m(42,33,"labels.inputs.List of Accounts")),a(2),I(i.accountingRuleForm.controls.creditRuleType.value==="fixedAccount"?43:-1),a(),I(i.accountingRuleForm.controls.creditRuleType.value==="listOfAccounts"?44:-1),a(3),h(m(48,35,"labels.inputs.Description")),a(4),g("routerLink",oe(39,l8e)),a(),v(" ",m(53,37,"labels.buttons.Cancel")," "),a(2),g("mifosxHasPermission","CREATE_ACCOUNTINGRULE"))},dependencies:[ue,fe,tt,st,Ue,Xe,dt,Ze,et,Ae,$e,Je,Et,Fe,Be,ut,ze,gt,ft,ve,fi,Ke,tr,ir,Ln,he],styles:[".rule-wrapper[_ngcontent-%COMP%]{margin:17.5px 0 0}.entries-wrapper[_ngcontent-%COMP%]{position:relative}.entries-wrapper[_ngcontent-%COMP%] .entries[_ngcontent-%COMP%]{padding:0 0 17.5px;position:absolute;bottom:0;right:0}.radio-group-spacing[_ngcontent-%COMP%]{display:flex;gap:2rem;flex-direction:row}@media (width <= 768px){.radio-group-spacing[_ngcontent-%COMP%]{flex-direction:column}}"]})}}return e})();var x8e=()=>["edit"];function b8e(e,o){e&1&&(l(0,"button",8),b(1,"fa-icon",9),c(2),p(3,"translate"),r()),e&2&&(g("routerLink",oe(4,x8e)),a(2),v(" ",m(3,2,"labels.buttons.Edit")," "))}function y8e(e,o){if(e&1){let t=Y();l(0,"button",10),R("click",function(){V(t);let i=w();return q(i.deleteAccountingRule())}),b(1,"fa-icon",11),c(2),p(3,"translate"),r()}e&2&&(a(2),v(" ",m(3,1,"labels.buttons.Delete")," "))}function S8e(e,o){if(e&1&&(l(0,"div",5)(1,"div",6),c(2),p(3,"translate"),r(),l(4,"div",7),c(5),r()()),e&2){let t=w();a(2),h(m(3,2,"labels.inputs.Description")),a(3),h(t.accountingRule.description)}}function w8e(e,o){if(e&1&&(l(0,"span"),c(1),r()),e&2){let t=o.$implicit;a(),h(t.tag.name)}}function P8e(e,o){if(e&1&&(l(0,"div",5)(1,"div",6),c(2),p(3,"translate"),r(),l(4,"div",7),Se(5,w8e,2,1,"span",null,Pe),r()()),e&2){let t=w();a(2),h(m(3,1,"labels.inputs.Debit Tags")),a(3),we(t.accountingRule.debitTags)}}function T8e(e,o){if(e&1&&(l(0,"span"),c(1),r()),e&2){let t=o.$implicit;a(),h(t.name+" ("+t.glCode+")")}}function M8e(e,o){if(e&1&&(l(0,"div",5)(1,"div",6),c(2),p(3,"translate"),r(),l(4,"div",7),Se(5,T8e,2,1,"span",null,Pe),r()()),e&2){let t=w();a(2),h(m(3,1,"labels.inputs.Debit Account Name")),a(3),we(t.accountingRule.debitAccounts)}}function D8e(e,o){if(e&1&&(l(0,"span"),c(1),r()),e&2){let t=o.$implicit;a(),h(t.tag.name)}}function E8e(e,o){if(e&1&&(l(0,"div",5)(1,"div",6),c(2),p(3,"translate"),r(),l(4,"div",7),Se(5,D8e,2,1,"span",null,Pe),r()()),e&2){let t=w();a(2),h(m(3,1,"labels.inputs.Credit Tags")),a(3),we(t.accountingRule.creditTags)}}function I8e(e,o){if(e&1&&(l(0,"span"),c(1),r()),e&2){let t=o.$implicit;a(),h(t.name+" ("+t.glCode+")")}}function O8e(e,o){if(e&1&&(l(0,"div",5)(1,"div",6),c(2),p(3,"translate"),r(),l(4,"div",7),Se(5,I8e,2,1,"span",null,Pe),r()()),e&2){let t=w();a(2),h(m(3,1,"labels.inputs.Credit Account Name")),a(3),we(t.accountingRule.creditAccounts)}}var kv=(()=>{class e{constructor(){this.accountingService=T(Ui),this.route=T(Ie),this.router=T(qe),this.dialog=T(Ht),this.route.data.subscribe(t=>{this.accountingRule=t.accountingRule})}deleteAccountingRule(){this.dialog.open(vi,{data:{deleteContext:`accounting rule ${this.accountingRule.id}`}}).afterClosed().subscribe(n=>{n.delete&&this.accountingService.deleteAccountingRule(this.accountingRule.id).subscribe(()=>{this.router.navigate(["/accounting/accounting-rules"])})})}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275cmp=me({type:e,selectors:[["mifosx-view-rule"]],decls:31,vars:19,consts:[[1,"container"],[1,"layout-row","align-end","gap-2px","responsive-column","m-b-20"],["mat-raised-button","","color","primary",3,"routerLink",4,"mifosxHasPermission"],["mat-raised-button","","color","warn",3,"click",4,"mifosxHasPermission"],[1,"content-rows"],[1,"content-row"],[1,"label"],[1,"value"],["mat-raised-button","","color","primary",3,"routerLink"],["icon","edit",1,"m-r-10"],["mat-raised-button","","color","warn",3,"click"],["icon","trash",1,"m-r-10"]],template:function(n,i){n&1&&(l(0,"div",0)(1,"div",1),F(2,b8e,4,5,"button",2)(3,y8e,4,3,"button",3),r(),l(4,"mat-card")(5,"mat-card-content",4)(6,"div",5)(7,"div",6),c(8),p(9,"translate"),r(),l(10,"div",7),c(11),r()(),E(12,S8e,6,4,"div",5),l(13,"div",5)(14,"div",6),c(15),p(16,"translate"),r(),l(17,"div",7),c(18),r()(),l(19,"div",5)(20,"div",6),c(21),p(22,"translate"),r(),l(23,"div",7),c(24),r()()()(),l(25,"mat-card")(26,"mat-card-content",4),E(27,P8e,7,3,"div",5),E(28,M8e,7,3,"div",5),E(29,E8e,7,3,"div",5),E(30,O8e,7,3,"div",5),r()()()),n&2&&(a(2),g("mifosxHasPermission","UPDATE_ACCOUNTINGRULE"),a(),g("mifosxHasPermission","DELETE_ACCOUNTINGRULE"),a(5),h(m(9,13,"labels.inputs.Office")),a(3),h(i.accountingRule.officeName),a(),I(i.accountingRule.description?12:-1),a(3),h(m(16,15,"labels.inputs.Multiple Debit Entries Allowed")),a(3),h(i.accountingRule.allowMultipleDebitEntries),a(3),h(m(22,17,"labels.inputs.Multiple Credit Entries Allowed")),a(3),h(i.accountingRule.allowMultipleCreditEntries),a(3),I(i.accountingRule.debitTags!=null&&i.accountingRule.debitTags.length?27:-1),a(),I(i.accountingRule.debitAccounts!=null&&i.accountingRule.debitAccounts.length?28:-1),a(),I(i.accountingRule.creditTags!=null&&i.accountingRule.creditTags.length?29:-1),a(),I(i.accountingRule.creditAccounts!=null&&i.accountingRule.creditAccounts.length?30:-1))},dependencies:[ue,fe,Ae,$e,Je,ve,Ke,ke,he],styles:[".container[_ngcontent-%COMP%]{max-width:37rem;margin:0 auto;padding:1rem}.container[_ngcontent-%COMP%] mat-card[_ngcontent-%COMP%]{margin-bottom:1rem;padding:1.5rem;box-shadow:0 2px 4px #0000001a;border:1px solid var(--border-color, #ddd);border-radius:8px;background-color:var(--card-background, #fff);transition:background-color .3s ease,border-color .3s ease}.container[_ngcontent-%COMP%] .layout-row-wrap[_ngcontent-%COMP%]{display:grid;grid-template-columns:50% 50%;gap:1rem}.container[_ngcontent-%COMP%] .layout-row-wrap[_ngcontent-%COMP%] .flex-50[_ngcontent-%COMP%]{padding:.5rem}.container[_ngcontent-%COMP%] .layout-row-wrap[_ngcontent-%COMP%] .flex-50.mat-body-strong[_ngcontent-%COMP%]{color:var(--label-color, #555);font-weight:600}.container[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] div[_ngcontent-%COMP%]{margin:1rem 0;word-wrap:break-word}.container[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] div[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{display:block;padding:.25rem 0;color:var(--text-color, inherit)}.container[_ngcontent-%COMP%] .content-rows[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1rem}.container[_ngcontent-%COMP%] .content-rows[_ngcontent-%COMP%] .content-row[_ngcontent-%COMP%]{display:flex;flex-direction:row;border-bottom:1px solid var(--border-color-light, #eee);padding-bottom:.5rem}.container[_ngcontent-%COMP%] .content-rows[_ngcontent-%COMP%] .content-row[_ngcontent-%COMP%] .label[_ngcontent-%COMP%]{flex:0 0 40%;font-weight:600;color:var(--label-color, #555);padding:.5rem 1rem .5rem 0}.container[_ngcontent-%COMP%] .content-rows[_ngcontent-%COMP%] .content-row[_ngcontent-%COMP%] .value[_ngcontent-%COMP%]{flex:0 0 60%;padding:.5rem 0;color:var(--text-color, inherit)}.container[_ngcontent-%COMP%] .content-rows[_ngcontent-%COMP%] .content-row[_ngcontent-%COMP%] .value[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{display:block;padding:.25rem 0}.container[_ngcontent-%COMP%] .back-button-container[_ngcontent-%COMP%]{margin-top:2rem}.container[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{transition:all .2s ease}.container[_ngcontent-%COMP%] button[_ngcontent-%COMP%]:hover{transform:translateY(-2px)}.dark-theme[_nghost-%COMP%], .dark-theme [_nghost-%COMP%]{--border-color: #444;--border-color-light: #3a3a3a;--card-background: #2d2d2d;--label-color: #b8b8b8;--text-color: #e0e0e0}.dark-theme[_nghost-%COMP%] .container[_ngcontent-%COMP%] mat-card[_ngcontent-%COMP%], .dark-theme [_nghost-%COMP%] .container[_ngcontent-%COMP%] mat-card[_ngcontent-%COMP%]{box-shadow:0 2px 4px #0000004d}"]})}}return e})();var A8e=()=>["../"];function F8e(e,o){e&1&&(l(0,"mat-error"),c(1),p(2,"translate"),p(3,"translate"),l(4,"strong"),c(5),p(6,"translate"),r()()),e&2&&(a(),le(" ",m(2,3,"labels.inputs.Accounting Rule Name")," ",m(3,5,"labels.commons.is")," "),a(4),h(m(6,7,"labels.commons.required")))}function k8e(e,o){if(e&1&&(l(0,"mat-option",6),c(1),r()),e&2){let t=o.$implicit;g("value",t.id),a(),v(" ",t.name," ")}}function B8e(e,o){e&1&&(l(0,"mat-error"),c(1),p(2,"translate"),p(3,"translate"),l(4,"strong"),c(5),p(6,"translate"),r()()),e&2&&(a(),le(" ",m(2,3,"labels.inputs.Office")," ",m(3,5,"labels.commons.is")," "),a(4),h(m(6,7,"labels.commons.required")))}function R8e(e,o){if(e&1&&(l(0,"mat-option",6),c(1),r()),e&2){let t=o.$implicit;g("value",t.id),a(),v(" ",t.name," ")}}function N8e(e,o){if(e&1&&(l(0,"mat-form-field",3)(1,"mat-label"),c(2),p(3,"translate"),r(),l(4,"mat-select",19),Se(5,R8e,2,2,"mat-option",6,Pe),r()()),e&2){let t=w();a(2),h(m(3,1,"labels.inputs.Account to Debit")),a(3),we(t.glAccountData)}}function L8e(e,o){if(e&1&&(l(0,"mat-option",6),c(1),r()),e&2){let t=o.$implicit;g("value",t.id),a(),v(" ",t.name," ")}}function V8e(e,o){if(e&1&&(l(0,"div",12)(1,"mat-form-field",8)(2,"mat-label"),c(3),p(4,"translate"),r(),l(5,"mat-select",20),Se(6,L8e,2,2,"mat-option",6,Pe),r()(),l(8,"div",21)(9,"mat-checkbox",22),c(10),p(11,"translate"),r()()()),e&2){let t=w();a(3),h(m(4,2,"labels.inputs.Debit Tags")),a(3),we(t.debitTagData),a(4),v(" ",m(11,4,"labels.inputs.Multiple Debit Entries Allowed")," ")}}function q8e(e,o){if(e&1&&(l(0,"mat-option",6),c(1),r()),e&2){let t=o.$implicit;g("value",t.id),a(),v(" ",t.name," ")}}function z8e(e,o){if(e&1&&(l(0,"mat-form-field",3)(1,"mat-label"),c(2),p(3,"translate"),r(),l(4,"mat-select",23),Se(5,q8e,2,2,"mat-option",6,Pe),r()()),e&2){let t=w();a(2),h(m(3,1,"labels.inputs.Account to Credit")),a(3),we(t.glAccountData)}}function H8e(e,o){if(e&1&&(l(0,"mat-option",6),c(1),r()),e&2){let t=o.$implicit;g("value",t.id),a(),v(" ",t.name," ")}}function G8e(e,o){if(e&1&&(l(0,"div",12)(1,"mat-form-field",8)(2,"mat-label"),c(3),p(4,"translate"),r(),l(5,"mat-select",24),Se(6,H8e,2,2,"mat-option",6,Pe),r()(),l(8,"div",21)(9,"mat-checkbox",25),c(10),p(11,"translate"),r()()()),e&2){let t=w();a(3),h(m(4,2,"labels.inputs.Credit Tags")),a(3),we(t.creditTagData),a(4),v(" ",m(11,4,"labels.inputs.Multiple Credit Entries Allowed")," ")}}function j8e(e,o){if(e&1&&(l(0,"button",26),c(1),p(2,"translate"),r()),e&2){let t=w();g("disabled",t.accountingRuleForm.pristine||!t.accountingRuleForm.valid),a(),v(" ",m(2,2,"labels.buttons.Submit")," ")}}var Bv=(()=>{class e{constructor(){this.formBuilder=T(nt),this.accountingService=T(Ui),this.route=T(Ie),this.router=T(qe),this.route.data.subscribe(t=>{this.officeData=t.accountingRulesTemplate.allowedOffices,this.glAccountData=t.accountingRulesTemplate.allowedAccounts,this.debitTagData=t.accountingRulesTemplate.allowedDebitTagOptions,this.creditTagData=t.accountingRulesTemplate.allowedCreditTagOptions,this.accountingRule=t.accountingRule})}ngOnInit(){this.createAccountingRuleForm(),this.setAccountingRulesForm()}createAccountingRuleForm(){this.accountingRuleForm=this.formBuilder.group({name:[this.accountingRule.name,se.required],officeId:[this.accountingRule.officeId,se.required],debitRuleType:[""],accountToDebit:[""],debitTags:[""],allowMultipleDebitEntries:[""],creditRuleType:[""],accountToCredit:[""],creditTags:[""],allowMultipleCreditEntries:[""],description:[this.accountingRule.description]},{validator:Av})}setAccountingRulesForm(){this.accountingRuleForm.get("debitRuleType").valueChanges.subscribe(t=>{t==="fixedAccount"?(this.accountingRuleForm.get("debitTags").reset(),this.accountingRuleForm.get("allowMultipleDebitEntries").reset()):(this.accountingRuleForm.get("accountToDebit").reset(),this.accountingRuleForm.get("allowMultipleDebitEntries").setValue(!1))}),this.accountingRuleForm.get("creditRuleType").valueChanges.subscribe(t=>{t==="fixedAccount"?(this.accountingRuleForm.get("creditTags").reset(),this.accountingRuleForm.get("allowMultipleCreditEntries").reset()):(this.accountingRuleForm.get("accountToCredit").reset(),this.accountingRuleForm.get("allowMultipleCreditEntries").setValue(!1))}),this.accountingRule.debitAccounts?(this.accountingRuleForm.get("debitRuleType").setValue("fixedAccount"),this.accountingRuleForm.get("accountToDebit").setValue(this.accountingRule.debitAccounts[0].id)):(this.accountingRuleForm.get("debitRuleType").setValue("listOfAccounts"),this.accountingRuleForm.get("debitTags").setValue(this.accountingRule.debitTags.map(t=>t.tag.id)),this.accountingRuleForm.get("allowMultipleDebitEntries").setValue(this.accountingRule.allowMultipleDebitEntries)),this.accountingRule.creditAccounts?(this.accountingRuleForm.get("creditRuleType").setValue("fixedAccount"),this.accountingRuleForm.get("accountToCredit").setValue(this.accountingRule.creditAccounts[0].id)):(this.accountingRuleForm.get("creditRuleType").setValue("listOfAccounts"),this.accountingRuleForm.get("creditTags").setValue(this.accountingRule.creditTags.map(t=>t.tag.id)),this.accountingRuleForm.get("allowMultipleCreditEntries").setValue(this.accountingRule.allowMultipleCreditEntries))}submit(){let t=this.accountingRuleForm.value;t.debitRuleType==="fixedAccount"?(delete t.debitTags,delete t.allowMultipleDebitEntries):delete t.accountToDebit,t.creditRuleType==="fixedAccount"?(delete t.creditTags,delete t.allowMultipleCreditEntries):delete t.accountToCredit,delete t.debitRuleType,delete t.creditRuleType,this.accountingService.updateAccountingRule(this.accountingRule.id,t).subscribe(n=>{this.router.navigate(["../../",n.resourceId],{relativeTo:this.route})})}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275cmp=me({type:e,selectors:[["mifosx-edit-rule"]],decls:55,vars:40,consts:[[1,"container"],[3,"ngSubmit","formGroup"],[1,"layout-row-wrap","gap-2px","responsive-column"],[1,"flex-48"],["matInput","","required","","formControlName","name"],["required","","formControlName","officeId"],[3,"value"],[1,"rule-wrapper","flex-48","layout-row","responsive-column"],[1,"flex-50"],["formControlName","debitRuleType",1,"flex-50","layout-row","gap-5percent","radio-group-spacing"],["value","fixedAccount"],["value","listOfAccounts"],[1,"flex-48","layout-row","gap-2percent","responsive-column"],["formControlName","creditRuleType",1,"flex-50","layout-row","gap-5-percent","radio-group-spacing"],[1,"flex-98"],["matInput","","formControlName","description","cdkTextareaAutosize","","cdkAutosizeMinRows","2"],[1,"layout-row","align-center","gap-5px","responsive-column"],["type","button","mat-raised-button","",3,"routerLink"],["mat-raised-button","","color","primary",3,"disabled",4,"mifosxHasPermission"],["formControlName","accountToDebit"],["formControlName","debitTags","multiple",""],[1,"flex-50","entries-wrapper"],["labelPosition","before","formControlName","allowMultipleDebitEntries",1,"entries"],["formControlName","accountToCredit"],["formControlName","creditTags","multiple",""],["labelPosition","before","formControlName","allowMultipleCreditEntries",1,"entries"],["mat-raised-button","","color","primary",3,"disabled"]],template:function(n,i){n&1&&(l(0,"div",0)(1,"mat-card")(2,"form",1),R("ngSubmit",function(){return i.submit()}),l(3,"mat-card-content")(4,"div",2)(5,"mat-form-field",3)(6,"mat-label"),c(7),p(8,"translate"),r(),b(9,"input",4),E(10,F8e,7,9,"mat-error"),r(),l(11,"mat-form-field",3)(12,"mat-label"),c(13),p(14,"translate"),r(),l(15,"mat-select",5),Se(16,k8e,2,2,"mat-option",6,Pe),r(),E(18,B8e,7,9,"mat-error"),r(),l(19,"div",7)(20,"mat-label",8),c(21),p(22,"translate"),r(),l(23,"mat-radio-group",9)(24,"mat-radio-button",10),c(25),p(26,"translate"),r(),l(27,"mat-radio-button",11),c(28),p(29,"translate"),r()()(),E(30,N8e,7,3,"mat-form-field",3),E(31,V8e,12,6,"div",12),l(32,"div",7)(33,"mat-label",8),c(34),p(35,"translate"),r(),l(36,"mat-radio-group",13)(37,"mat-radio-button",10),c(38),p(39,"translate"),r(),l(40,"mat-radio-button",11),c(41),p(42,"translate"),r()()(),E(43,z8e,7,3,"mat-form-field",3),E(44,G8e,12,6,"div",12),l(45,"mat-form-field",14)(46,"mat-label"),c(47),p(48,"translate"),r(),b(49,"textarea",15),r()()(),l(50,"mat-card-actions",16)(51,"button",17),c(52),p(53,"translate"),r(),F(54,j8e,3,4,"button",18),r()()()()),n&2&&(a(2),g("formGroup",i.accountingRuleForm),a(5),h(m(8,19,"labels.inputs.Accounting Rule Name")),a(3),I(i.accountingRuleForm.controls.name.hasError("required")?10:-1),a(3),h(m(14,21,"labels.inputs.Office")),a(3),we(i.officeData),a(2),I(i.accountingRuleForm.controls.officeId.hasError("required")?18:-1),a(3),v("",m(22,23,"labels.inputs.Affected GL Entry (Debit) Rule Type")," *"),a(4),h(m(26,25,"labels.inputs.Fixed Account")),a(3),h(m(29,27,"labels.inputs.List of Accounts")),a(2),I(i.accountingRuleForm.controls.debitRuleType.value==="fixedAccount"?30:-1),a(),I(i.accountingRuleForm.controls.debitRuleType.value==="listOfAccounts"?31:-1),a(3),v("",m(35,29,"labels.inputs.Affected GL Entry (Credit) Rule Type")," *"),a(4),h(m(39,31,"labels.inputs.Fixed Account")),a(3),h(m(42,33,"labels.inputs.List of Accounts")),a(2),I(i.accountingRuleForm.controls.creditRuleType.value==="fixedAccount"?43:-1),a(),I(i.accountingRuleForm.controls.creditRuleType.value==="listOfAccounts"?44:-1),a(3),h(m(48,35,"labels.inputs.Description")),a(4),g("routerLink",oe(39,A8e)),a(),v(" ",m(53,37,"labels.buttons.Cancel")," "),a(2),g("mifosxHasPermission","UPDATE_ACCOUNTINGRULE"))},dependencies:[ue,fe,tt,st,Ue,Xe,dt,Ze,et,Ae,$e,Je,Et,Fe,Be,ut,ze,gt,ft,ve,fi,Ke,tr,ir,Ln,he],styles:[".rule-wrapper[_ngcontent-%COMP%]{margin:17.5px 0 0}.entries-wrapper[_ngcontent-%COMP%]{position:relative}.entries-wrapper[_ngcontent-%COMP%] .entries[_ngcontent-%COMP%]{padding:0 0 17.5px;position:absolute;bottom:0;right:0}.radio-group-spacing[_ngcontent-%COMP%]{display:flex;gap:2rem;flex-direction:row}@media (width <= 768px){.radio-group-spacing[_ngcontent-%COMP%]{flex-direction:column}}"]})}}return e})();var $8e=()=>["../"];function U8e(e,o){e&1&&(l(0,"mat-error"),c(1),p(2,"translate"),p(3,"translate"),l(4,"strong"),c(5),p(6,"translate"),r()()),e&2&&(a(),le(" ",m(2,3,"labels.inputs.Accrue Date")," ",m(3,5,"labels.commons.is")," "),a(4),h(m(6,7,"labels.commons.required")))}function W8e(e,o){if(e&1&&(l(0,"button",10),b(1,"fa-icon",11),c(2),p(3,"translate"),r()),e&2){let t=w();g("disabled",!t.periodicAccrualsForm.valid),a(2),v(" ",m(3,2,"labels.buttons.Run Periodic Accruals")," ")}}var Rv=(()=>{class e{constructor(){this.formBuilder=T(nt),this.accountingService=T(Ui),this.settingsService=T(At),this.dateUtils=T(Zt),this.route=T(Ie),this.router=T(qe),this.minDate=new Date(2e3,0,1),this.maxDate=new Date}ngOnInit(){this.maxDate=this.settingsService.businessDate,this.createPeriodicAccrualsForm()}createPeriodicAccrualsForm(){this.periodicAccrualsForm=this.formBuilder.group({tillDate:["",se.required]})}submit(){let t=this.periodicAccrualsForm.value;t.locale=this.settingsService.language.code,t.dateFormat=this.settingsService.dateFormat,t.tillDate instanceof Date&&(t.tillDate=this.dateUtils.formatDate(t.tillDate,this.settingsService.dateFormat)),this.accountingService.executePeriodicAccruals(t).subscribe(()=>{this.router.navigate(["../"],{relativeTo:this.route})})}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275cmp=me({type:e,selectors:[["mifosx-periodic-accruals"]],decls:19,vars:15,consts:[["tillDatePicker",""],[1,"container"],[3,"ngSubmit","formGroup"],[1,"layout-row"],[1,"flex-fill",3,"click"],["matInput","","required","","formControlName","tillDate",3,"min","max","matDatepicker"],["matSuffix","",3,"for"],[1,"layout-row","align-center","gap-5px","responsive-column"],["type","button","mat-raised-button","",3,"routerLink"],["mat-raised-button","","color","primary",3,"disabled",4,"mifosxHasPermission"],["mat-raised-button","","color","primary",3,"disabled"],["icon","play",1,"m-r-10"]],template:function(n,i){if(n&1){let s=Y();l(0,"div",1)(1,"mat-card")(2,"form",2),R("ngSubmit",function(){return V(s),q(i.submit())}),l(3,"mat-card-content")(4,"div",3)(5,"mat-form-field",4),R("click",function(){V(s);let u=xe(12);return q(u.open())}),l(6,"mat-label"),c(7),p(8,"translate"),r(),b(9,"input",5)(10,"mat-datepicker-toggle",6)(11,"mat-datepicker",null,0),E(13,U8e,7,9,"mat-error"),r()()(),l(14,"mat-card-actions",7)(15,"button",8),c(16),p(17,"translate"),r(),F(18,W8e,4,4,"button",9),r()()()()}if(n&2){let s=xe(12);a(2),g("formGroup",i.periodicAccrualsForm),a(5),h(m(8,10,"labels.inputs.Accrue Till Date")),a(2),g("min",i.minDate)("max",i.maxDate)("matDatepicker",s),a(),g("for",s),a(3),I(i.periodicAccrualsForm.controls.tillDate.hasError("required")?13:-1),a(2),g("routerLink",oe(14,$8e)),a(),v(" ",m(17,12,"labels.buttons.Cancel")," "),a(2),g("mifosxHasPermission","EXECUTE_PERIODICACCRUALACCOUNTING")}},dependencies:[ue,fe,tt,st,Ue,Xe,dt,Ze,et,Ae,$e,Je,Et,Fe,Be,ut,ai,ze,mi,di,pi,ve,Ke,ke,he],styles:[".container[_ngcontent-%COMP%]{max-width:37rem}"]})}}return e})();var Q8e=()=>[10,25,50,100],Y8e=()=>["create"],J8e=e=>["view",e];function K8e(e,o){e&1&&(l(0,"button",20),b(1,"fa-icon",21),c(2),p(3,"translate"),r()),e&2&&(g("routerLink",oe(4,Y8e)),a(2),v(" ",m(3,2,"labels.buttons.Create Provisioning Entry")," "))}function X8e(e,o){e&1&&(l(0,"th",22),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.Created By")))}function Z8e(e,o){if(e&1&&(l(0,"td",23),c(1),r()),e&2){let t=o.$implicit;a(),h(t.createdUser)}}function eBe(e,o){e&1&&(l(0,"th",22),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.Created On")))}function tBe(e,o){if(e&1&&(l(0,"td",23),c(1),r()),e&2){let t=o.$implicit;a(),h(t.createdDate)}}function iBe(e,o){e&1&&(l(0,"th",22),c(1),p(2,"translate"),r()),e&2&&(a(),v(" ",m(2,1,"labels.inputs.Journal Entry Created")," "))}function nBe(e,o){if(e&1&&(l(0,"td",23),b(1,"mat-checkbox",24),r()),e&2){let t=o.$implicit;a(),g("disabled",!0)("checked",t.journalEntry)}}function oBe(e,o){e&1&&(l(0,"th",25),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.View Report")))}function aBe(e,o){if(e&1&&(l(0,"td",23)(1,"button",26),b(2,"fa-icon",27),c(3),p(4,"translate"),r()()),e&2){let t=o.$implicit;a(),g("routerLink",Nt(4,J8e,t.id)),a(2),v("",m(4,2,"labels.buttons.View")," ")}}function rBe(e,o){e&1&&(l(0,"th",25),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.Recreate Provisioning")))}function lBe(e,o){if(e&1){let t=Y();l(0,"td",23)(1,"button",28),R("click",function(i){let s=V(t).$implicit,d=w();return q(d.recreateProvisioning(i,s.id))}),b(2,"fa-icon",29),c(3),p(4,"translate"),r()()}if(e&2){let t=o.$implicit;a(),g("disabled",t.journalEntry),a(2),v("",m(4,2,"labels.buttons.Recreate")," ")}}function sBe(e,o){e&1&&(l(0,"th",25),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.View Journal Entry")))}function cBe(e,o){if(e&1){let t=Y();l(0,"td",23)(1,"button",28),R("click",function(i){let s=V(t).$implicit,d=w();return q(d.viewJournalEntry(i,s.id))}),b(2,"fa-icon",27),c(3),p(4,"translate"),r()()}if(e&2){let t=o.$implicit;a(),g("disabled",!t.journalEntry),a(2),v("",m(4,2,"labels.buttons.View")," ")}}function pBe(e,o){e&1&&b(0,"tr",30)}function mBe(e,o){e&1&&b(0,"tr",31)}var Nv=(()=>{class e{constructor(){this.accountingService=T(Ui),this.route=T(Ie),this.router=T(qe),this.displayedColumns=["createdUser","createdDate","journalEntry","viewReport","recreateProvisioning","viewJournalEntry"],this.route.data.subscribe(t=>{this.provisioningEntryData=t.provisioningEntries.pageItems})}ngOnInit(){this.setProvisioningEntries()}setProvisioningEntries(){this.dataSource=new Wt(this.provisioningEntryData),this.dataSource.paginator=this.paginator,this.dataSource.sort=this.sort}applyFilter(t){this.dataSource.filter=t.trim().toLowerCase()}recreateProvisioning(t,n){this.accountingService.recreateProvisioningEntries(n).subscribe(i=>{this.router.navigate(["view",i.resourceId],{relativeTo:this.route})}),t.stopPropagation()}viewJournalEntry(t,n){this.router.navigate(["journal-entries/view",n],{relativeTo:this.route}),t.stopPropagation()}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275cmp=me({type:e,selectors:[["mifosx-provisioning-entries"]],viewQuery:function(n,i){if(n&1&&(Ee(kt,7),Ee(It,7)),n&2){let s;Te(s=Me())&&(i.paginator=s.first),Te(s=Me())&&(i.sort=s.first)}},decls:32,vars:9,consts:[[1,"container","m-b-20","layout-row","align-end","gap-20px"],["mat-raised-button","","color","primary",3,"routerLink",4,"mifosxHasPermission"],[1,"container"],[1,"layout-row"],[1,"flex-fill"],["matInput","",3,"keyup"],[1,"mat-elevation-z8"],["mat-table","","matSort","",3,"dataSource"],["matColumnDef","createdUser"],["mat-header-cell","","mat-sort-header","",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","createdDate"],["matColumnDef","journalEntry"],["matColumnDef","viewReport"],["mat-header-cell","",4,"matHeaderCellDef"],["matColumnDef","recreateProvisioning"],["matColumnDef","viewJournalEntry"],["mat-header-row","",4,"matHeaderRowDef"],["mat-row","",4,"matRowDef","matRowDefColumns"],["showFirstLastButtons","",3,"pageSizeOptions"],["mat-raised-button","","color","primary",3,"routerLink"],["icon","plus",1,"m-r-10"],["mat-header-cell","","mat-sort-header",""],["mat-cell",""],[3,"disabled","checked"],["mat-header-cell",""],["mat-button","","color","primary",3,"routerLink"],["icon","eye",1,"m-r-10"],["mat-button","","color","primary",3,"click","disabled"],["icon","edit",1,"m-r-10"],["mat-header-row",""],["mat-row",""]],template:function(n,i){n&1&&(l(0,"div",0),F(1,K8e,4,5,"button",1),r(),l(2,"div",2)(3,"div",3)(4,"mat-form-field",4)(5,"mat-label"),c(6),p(7,"translate"),r(),l(8,"input",5),R("keyup",function(d){return i.applyFilter(d.target.value)}),r()()(),l(9,"div",6)(10,"table",7),X(11,8),F(12,X8e,3,3,"th",9)(13,Z8e,2,1,"td",10),Z(),X(14,11),F(15,eBe,3,3,"th",9)(16,tBe,2,1,"td",10),Z(),X(17,12),F(18,iBe,3,3,"th",9)(19,nBe,2,2,"td",10),Z(),X(20,13),F(21,oBe,3,3,"th",14)(22,aBe,5,6,"td",10),Z(),X(23,15),F(24,rBe,3,3,"th",14)(25,lBe,5,4,"td",10),Z(),X(26,16),F(27,sBe,3,3,"th",14)(28,cBe,5,4,"td",10),Z(),F(29,pBe,1,0,"tr",17)(30,mBe,1,0,"tr",18),r(),b(31,"mat-paginator",19),r()()),n&2&&(a(),g("mifosxHasPermission","VIEW_ALL_PROVISIONING_ENTRIES"),a(5),h(m(7,6,"labels.inputs.Filter")),a(4),g("dataSource",i.dataSource),a(19),g("matHeaderRowDef",i.displayedColumns),a(),g("matRowDefColumns",i.displayedColumns),a(),g("pageSizeOptions",oe(8,Q8e)))},dependencies:[ue,fe,Ae,Fe,Be,ze,ve,fi,Ke,ke,_t,It,xt,vt,bt,ri,Ct,yt,St,Pt,wt,Tt,kt,he],styles:["table[_ngcontent-%COMP%]{width:100%}"]})}}return e})();var dBe=()=>["../"];function uBe(e,o){e&1&&(l(0,"mat-error"),c(1),p(2,"translate"),p(3,"translate"),l(4,"strong"),c(5),p(6,"translate"),r()()),e&2&&(a(),le(" ",m(2,3,"labels.inputs.Date")," ",m(3,5,"labels.commons.is")," "),a(4),h(m(6,7,"labels.commons.required")))}function fBe(e,o){if(e&1&&(l(0,"button",12),c(1),p(2,"translate"),r()),e&2){let t=w();g("disabled",!t.provisioningEntryForm.valid),a(),v(" ",m(2,2,"labels.buttons.Submit")," ")}}var Lv=(()=>{class e{constructor(){this.formBuilder=T(nt),this.accountingService=T(Ui),this.settingsService=T(At),this.dateUtils=T(Zt),this.route=T(Ie),this.router=T(qe),this.minDate=new Date(2e3,0,1),this.maxDate=new Date}ngOnInit(){this.maxDate=this.settingsService.businessDate,this.createProvisioningEntryForm()}createProvisioningEntryForm(){this.provisioningEntryForm=this.formBuilder.group({date:["",se.required],createjournalentries:[!1]})}submit(){let t=this.provisioningEntryForm.value;t.locale=this.settingsService.language.code,t.dateFormat=this.settingsService.dateFormat,t.date instanceof Date&&(t.date=this.dateUtils.formatDate(t.date,this.settingsService.dateFormat)),this.accountingService.createProvisioningEntry(t).subscribe(n=>{this.router.navigate(["../view",n.resourceId],{relativeTo:this.route})})}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275cmp=me({type:e,selectors:[["mifosx-create-provisioning-entry"]],decls:23,vars:18,consts:[["datePicker",""],[1,"container"],[3,"ngSubmit","formGroup"],[1,"layout-column"],[1,"flex-fill",3,"click"],["matInput","","required","","formControlName","date",3,"min","max","matDatepicker"],["matSuffix","",3,"for"],[1,"flex-fill"],["labelPosition","before","formControlName","createjournalentries"],[1,"layout-row","align-center","gap-5px","responsive-column"],["type","button","mat-raised-button","",3,"routerLink"],["mat-raised-button","","color","primary",3,"disabled",4,"mifosxHasPermission"],["mat-raised-button","","color","primary",3,"disabled"]],template:function(n,i){if(n&1){let s=Y();l(0,"div",1)(1,"mat-card")(2,"form",2),R("ngSubmit",function(){return V(s),q(i.submit())}),l(3,"mat-card-content")(4,"div",3)(5,"mat-form-field",4),R("click",function(){V(s);let u=xe(12);return q(u.open())}),l(6,"mat-label"),c(7),p(8,"translate"),r(),b(9,"input",5)(10,"mat-datepicker-toggle",6)(11,"mat-datepicker",null,0),E(13,uBe,7,9,"mat-error"),r(),l(14,"div",7)(15,"mat-checkbox",8),c(16),p(17,"translate"),r()()()(),l(18,"mat-card-actions",9)(19,"button",10),c(20),p(21,"translate"),r(),F(22,fBe,3,4,"button",11),r()()()()}if(n&2){let s=xe(12);a(2),g("formGroup",i.provisioningEntryForm),a(5),h(m(8,11,"labels.inputs.Date")),a(2),g("min",i.minDate)("max",i.maxDate)("matDatepicker",s),a(),g("for",s),a(3),I(i.provisioningEntryForm.controls.date.hasError("required")?13:-1),a(3),v(" ",m(17,13,"labels.inputs.Create Journal Entries")," "),a(3),g("routerLink",oe(17,dBe)),a(),v(" ",m(21,15,"labels.buttons.Cancel")," "),a(2),g("mifosxHasPermission","CREATE_PROVISIONING_ENTRIES")}},dependencies:[ue,fe,tt,st,Ue,Xe,dt,Ze,et,Ae,$e,Je,Et,Fe,Be,ut,ai,ze,mi,di,pi,ve,fi,Ke,he],styles:[".container[_ngcontent-%COMP%]{max-width:37rem}"]})}}return e})();var hBe=()=>[10,25,50,100];function gBe(e,o){if(e&1){let t=Y();l(0,"button",30),R("click",function(){V(t);let i=w(2);return q(i.createProvisioningJournalEntries())}),b(1,"fa-icon",31),c(2),p(3,"translate"),r()}if(e&2){let t=w(2);g("disabled",t.provisioningEntry.journalEntry),a(2),v(" ",m(3,2,"labels.buttons.Create Journal Entries")," ")}}function _Be(e,o){if(e&1&&(l(0,"div",3)(1,"div",23),F(2,gBe,4,4,"button",24),r(),l(3,"mat-card")(4,"mat-card-content")(5,"div",25)(6,"div",26),c(7),p(8,"translate"),r(),l(9,"div",27),c(10),r(),l(11,"div",26),c(12),p(13,"translate"),r(),l(14,"div",27),c(15),r(),l(16,"div",28),c(17),p(18,"translate"),r(),l(19,"div",29),c(20),r()()()()()),e&2){let t=w();a(2),g("mifosxHasPermission","CREATE_JOURNAL_ENTRY"),a(5),v(" ",m(8,7,"labels.inputs.Created By")," "),a(3),v(" ",t.provisioningEntry.createdUser," "),a(2),v(" ",m(13,9,"labels.inputs.Created On")," "),a(3),v(" ",t.provisioningEntry.createdDate," "),a(2),v(" ",m(18,11,"labels.inputs.Amount to be Reserved")," "),a(3),v(" ",t.provisioningEntry.reservedAmount," ")}}function CBe(e,o){if(e&1&&(l(0,"mat-option",8),c(1),r()),e&2){let t=o.$implicit;g("value",t.name),a(),v(" ",t.name," ")}}function vBe(e,o){if(e&1&&(l(0,"mat-option",8),c(1),r()),e&2){let t=o.$implicit;g("value",t.name),a(),v(" ",t.name," ")}}function xBe(e,o){if(e&1&&(l(0,"mat-option",8),c(1),r()),e&2){let t=o.$implicit;g("value",t.categoryName),a(),v(" ",t.categoryName," ")}}function bBe(e,o){e&1&&(l(0,"th",32),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.Office Name")))}function yBe(e,o){if(e&1&&(l(0,"td",33),c(1),r()),e&2){let t=o.$implicit;a(),h(t.officeName)}}function SBe(e,o){e&1&&(l(0,"th",32),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.Product Name")))}function wBe(e,o){if(e&1&&(l(0,"td",33),c(1),r()),e&2){let t=o.$implicit;a(),h(t.productName)}}function PBe(e,o){e&1&&(l(0,"th",32),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.Currency Code")))}function TBe(e,o){if(e&1&&(l(0,"td",33),c(1),r()),e&2){let t=o.$implicit;a(),h(t.currencyCode)}}function MBe(e,o){e&1&&(l(0,"th",32),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.Category Name")))}function DBe(e,o){if(e&1&&(l(0,"td",33),c(1),r()),e&2){let t=o.$implicit;a(),h(t.categoryName)}}function EBe(e,o){e&1&&(l(0,"th",32),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.Provisioning Amount")))}function IBe(e,o){if(e&1&&(l(0,"td",33),c(1),r()),e&2){let t=o.$implicit;a(),h(t.amountreserved)}}function OBe(e,o){e&1&&(l(0,"th",32),c(1),p(2,"translate"),r()),e&2&&(a(),v(" ",m(2,1,"labels.inputs.Liability Account (CR)")," "))}function ABe(e,o){if(e&1&&(l(0,"td",33),c(1),r()),e&2){let t=o.$implicit;a(),h(t.liabilityAccountName)}}function FBe(e,o){e&1&&(l(0,"th",32),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.Expense Account (DR)")))}function kBe(e,o){if(e&1&&(l(0,"td",33),c(1),r()),e&2){let t=o.$implicit;a(),h(t.expenseAccountName)}}function BBe(e,o){e&1&&b(0,"tr",34)}function RBe(e,o){e&1&&b(0,"tr",35)}var Vv=(()=>{class e{constructor(){this.accountingService=T(Ui),this.route=T(Ie),this.router=T(qe),this.officeName=new it,this.loanProduct=new it,this.provisioningCategory=new it,this.displayedColumns=["officeName","productName","currencyCode","categoryName","amountreserved","liabilityAccountName","expenseAccountName"],this.filterValue={officeName:"",productName:"",categoryName:""},this.route.data.subscribe(t=>{this.provisioningEntryId=t.provisioningEntry.id,this.provisioningEntry=t.provisioningEntry,this.provisioningEntryEntries=t.provisioningEntryEntries,this.officeData=t.offices,this.loanProductData=t.loanProducts,this.provisioningCategoryData=t.provisiningCategories})}ngOnInit(){this.setProvisioningEntryEntries(),this.setFilteredOffices(),this.setFilteredLoanProducts(),this.setFilteredProvisioningCategories()}ngAfterViewInit(){this.officeName.valueChanges.pipe(Mn(t=>t.toLowerCase()),Oo(500),Ao(),Eo(t=>{this.applyFilter(t,"officeName")})).subscribe(),this.loanProduct.valueChanges.pipe(Mn(t=>t.toLowerCase()),Oo(500),Ao(),Eo(t=>{this.applyFilter(t,"productName")})).subscribe(),this.provisioningCategory.valueChanges.pipe(Mn(t=>t.toLowerCase()),Oo(500),Ao(),Eo(t=>{this.applyFilter(t,"categoryName")})).subscribe()}filterPredicate(t,n){return t.officeName.toLowerCase().indexOf(n.officeName)!==-1&&t.productName.toLowerCase().indexOf(n.productName)!==-1&&t.categoryName.toLowerCase().indexOf(n.categoryName)!==-1}setProvisioningEntryEntries(){this.dataSource=new Wt(this.provisioningEntryEntries.pageItems),this.dataSource.paginator=this.paginator,this.dataSource.sort=this.sort,this.dataSource.filterPredicate=this.filterPredicate}applyFilter(t,n){this.filterValue[n]=t,this.dataSource.filter=this.filterValue}setFilteredOffices(){this.filteredOfficeData=this.officeName.valueChanges.pipe(hl(""),Mn(t=>typeof t=="string"?t:t.name),Mn(t=>t?this.filterOfficeAutocompleteData(t):this.officeData))}setFilteredLoanProducts(){this.filteredLoanProductData=this.loanProduct.valueChanges.pipe(hl(""),Mn(t=>typeof t=="string"?t:t.name),Mn(t=>t?this.filterLoanProductAutocompleteData(t):this.loanProductData))}setFilteredProvisioningCategories(){this.filteredProvisioningCategoryData=this.provisioningCategory.valueChanges.pipe(hl(""),Mn(t=>typeof t=="string"?t:t.categoryName),Mn(t=>t?this.filterProvisioningCategoryAutocompleteData(t):this.provisioningCategoryData))}filterOfficeAutocompleteData(t){return this.officeData.filter(n=>n.name.toLowerCase().includes(t.toLowerCase()))}filterLoanProductAutocompleteData(t){return this.loanProductData.filter(n=>n.name.toLowerCase().includes(t.toLocaleLowerCase()))}filterProvisioningCategoryAutocompleteData(t){return this.provisioningCategoryData.filter(n=>n.categoryName.toLowerCase().includes(t.toLocaleLowerCase()))}createProvisioningJournalEntries(){this.accountingService.createProvisioningJournalEntries(this.provisioningEntryId).subscribe(t=>{this.router.navigate(["../../journal-entries/view",t.resourceId],{relativeTo:this.route})})}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275cmp=me({type:e,selectors:[["mifosx-view-provisioning-entry"]],viewQuery:function(n,i){if(n&1&&(Ee(kt,7),Ee(It,7)),n&2){let s;Te(s=Me())&&(i.paginator=s.first),Te(s=Me())&&(i.sort=s.first)}},decls:58,vars:27,consts:[["officeNameAutocomplete","matAutocomplete"],["loanProductAutocomplete","matAutocomplete"],["provisioningCategoryAutocomplete","matAutocomplete"],[1,"container"],[1,"container","m-t-20","layout-row-wrap","responsive-column","gap-2percent"],[1,"flex-31"],["matInput","",3,"formControl","matAutocomplete"],["autoActiveFirstOption",""],[3,"value"],[1,"mat-elevation-z8","container"],["mat-table","","matSort","",3,"dataSource"],["matColumnDef","officeName"],["mat-header-cell","","mat-sort-header","",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","productName"],["matColumnDef","currencyCode"],["matColumnDef","categoryName"],["matColumnDef","amountreserved"],["matColumnDef","liabilityAccountName"],["matColumnDef","expenseAccountName"],["mat-header-row","",4,"matHeaderRowDef"],["mat-row","",4,"matRowDef","matRowDefColumns"],["showFirstLastButtons","",3,"pageSizeOptions"],[1,"m-b-20","layout-row","align-end","gap-20px"],["mat-raised-button","","color","primary",3,"disabled","click",4,"mifosxHasPermission"],[1,"layout-row-wrap","responsive-column","content"],[1,"flex-16","header"],[1,"flex-16"],[1,"flex-18","header"],[1,"flex-18"],["mat-raised-button","","color","primary",3,"click","disabled"],["icon","plus",1,"m-r-10"],["mat-header-cell","","mat-sort-header",""],["mat-cell",""],["mat-header-row",""],["mat-row",""]],template:function(n,i){if(n&1&&(E(0,_Be,21,13,"div",3),l(1,"div",4)(2,"mat-form-field",5)(3,"mat-label"),c(4),p(5,"translate"),r(),b(6,"input",6),r(),l(7,"mat-form-field",5)(8,"mat-label"),c(9),p(10,"translate"),r(),b(11,"input",6),r(),l(12,"mat-form-field",5)(13,"mat-label"),c(14),p(15,"translate"),r(),b(16,"input",6),r()(),l(17,"mat-autocomplete",7,0),Se(19,CBe,2,2,"mat-option",8,Pe),p(21,"async"),r(),l(22,"mat-autocomplete",7,1),Se(24,vBe,2,2,"mat-option",8,Pe),p(26,"async"),r(),l(27,"mat-autocomplete",7,2),Se(29,xBe,2,2,"mat-option",8,Pe),p(31,"async"),r(),l(32,"div",9)(33,"table",10),X(34,11),F(35,bBe,3,3,"th",12)(36,yBe,2,1,"td",13),Z(),X(37,14),F(38,SBe,3,3,"th",12)(39,wBe,2,1,"td",13),Z(),X(40,15),F(41,PBe,3,3,"th",12)(42,TBe,2,1,"td",13),Z(),X(43,16),F(44,MBe,3,3,"th",12)(45,DBe,2,1,"td",13),Z(),X(46,17),F(47,EBe,3,3,"th",12)(48,IBe,2,1,"td",13),Z(),X(49,18),F(50,OBe,3,3,"th",12)(51,ABe,2,1,"td",13),Z(),X(52,19),F(53,FBe,3,3,"th",12)(54,kBe,2,1,"td",13),Z(),F(55,BBe,1,0,"tr",20)(56,RBe,1,0,"tr",21),r(),b(57,"mat-paginator",22),r()),n&2){let s=xe(18),d=xe(23),u=xe(28);I(i.provisioningEntry?0:-1),a(4),h(m(5,14,"labels.inputs.Office Name")),a(2),g("formControl",i.officeName)("matAutocomplete",s),a(3),h(m(10,16,"labels.inputs.Loan Product")),a(2),g("formControl",i.loanProduct)("matAutocomplete",d),a(3),h(m(15,18,"labels.inputs.Provisioning Category")),a(2),g("formControl",i.provisioningCategory)("matAutocomplete",u),a(3),we(m(21,20,i.filteredOfficeData)),a(5),we(m(26,22,i.filteredLoanProductData)),a(5),we(m(31,24,i.filteredProvisioningCategoryData)),a(4),g("dataSource",i.dataSource),a(22),g("matHeaderRowDef",i.displayedColumns),a(),g("matRowDefColumns",i.displayedColumns),a(),g("pageSizeOptions",oe(26,hBe))}},dependencies:[ue,fe,st,Ue,_n,$e,Je,Fe,Be,ze,ft,ve,Ke,ke,er,Za,_t,It,xt,vt,bt,ri,Ct,yt,St,Pt,wt,Tt,kt,Xa,he],styles:["table[_ngcontent-%COMP%]{width:100%}.content[_ngcontent-%COMP%] div[_ngcontent-%COMP%]{margin:1rem 0;word-wrap:break-word}.content[_ngcontent-%COMP%] div.header[_ngcontent-%COMP%]{font-weight:500}"]})}}return e})();var NBe=()=>[10,25,50,100];function LBe(e,o){e&1&&(l(0,"th",21),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.Entry ID")))}function VBe(e,o){if(e&1&&(l(0,"td",22),c(1),r()),e&2){let t=o.$implicit;a(),h(t.id)}}function qBe(e,o){e&1&&(l(0,"th",21),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.Office")))}function zBe(e,o){if(e&1&&(l(0,"td",22),c(1),r()),e&2){let t=o.$implicit;a(),h(t.officeName)}}function HBe(e,o){e&1&&(l(0,"th",21),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.Transaction Date")))}function GBe(e,o){if(e&1&&(l(0,"td",22),c(1),r()),e&2){let t=o.$implicit;a(),h(t.transactionDate)}}function jBe(e,o){e&1&&(l(0,"th",21),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.Transaction ID")))}function $Be(e,o){if(e&1&&(l(0,"td",22),c(1),r()),e&2){let t=o.$implicit;a(),h(t.transactionId)}}function UBe(e,o){e&1&&(l(0,"th",21),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.Type")))}function WBe(e,o){if(e&1&&(l(0,"td",22),c(1),r()),e&2){let t=o.$implicit;a(),h(t.glAccountType.value)}}function QBe(e,o){e&1&&(l(0,"th",21),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.Type")))}function YBe(e,o){if(e&1&&(l(0,"td",22),c(1),r()),e&2){let t=o.$implicit;a(),h(t.createdByUserName)}}function JBe(e,o){e&1&&(l(0,"th",21),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.Account Code")))}function KBe(e,o){if(e&1&&(l(0,"td",22),c(1),r()),e&2){let t=o.$implicit;a(),h(t.glAccountCode)}}function XBe(e,o){e&1&&(l(0,"th",21),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.Account Name")))}function ZBe(e,o){if(e&1&&(l(0,"td",22),c(1),r()),e&2){let t=o.$implicit;a(),h(t.glAccountName)}}function eRe(e,o){e&1&&(l(0,"th",21),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.Debit")))}function tRe(e,o){if(e&1&&(l(0,"span"),c(1),r()),e&2){let t=w().$implicit;a(),v(" ",(t.currency.displaySymbol||t.currency.code)+" "+t.amount," ")}}function iRe(e,o){if(e&1&&(l(0,"td",22),E(1,tRe,2,1,"span"),r()),e&2){let t=o.$implicit;a(),I(t.entryType.value==="DEBIT"?1:-1)}}function nRe(e,o){e&1&&(l(0,"th",21),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.Credit")))}function oRe(e,o){if(e&1&&(l(0,"span"),c(1),r()),e&2){let t=w().$implicit;a(),v(" ",(t.currency.displaySymbol||t.currency.code)+" "+t.amount," ")}}function aRe(e,o){if(e&1&&(l(0,"td",22),E(1,oRe,2,1,"span"),r()),e&2){let t=o.$implicit;a(),I(t.entryType.value==="CREDIT"?1:-1)}}function rRe(e,o){e&1&&b(0,"tr",23)}function lRe(e,o){e&1&&b(0,"tr",24)}var qv=(()=>{class e{constructor(){this.route=T(Ie),this.displayedColumns=["id","officeName","transactionDate","transactionId","glAccountType","createdByUserName","glAccountCode","glAccountName","debit","credit"],this.route.data.subscribe(t=>{this.provisioningJournalEntryData=t.provisioningJournalEntry.pageItems})}ngOnInit(){this.setProvisioningJournalEntry()}setProvisioningJournalEntry(){this.dataSource=new Wt(this.provisioningJournalEntryData),this.dataSource.paginator=this.paginator,this.dataSource.sortingDataAccessor=(t,n)=>{switch(n){case"glAccountType":return t.glAccountType.value;case"debit":return t.amount;case"credit":return t.amount;default:return t[n]}},this.dataSource.sort=this.sort}applyFilter(t){this.dataSource.filter=t.trim().toLowerCase()}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275cmp=me({type:e,selectors:[["mifosx-view-provisioning-journal-entries"]],viewQuery:function(n,i){if(n&1&&(Ee(kt,7),Ee(It,7)),n&2){let s;Te(s=Me())&&(i.paginator=s.first),Te(s=Me())&&(i.sort=s.first)}},decls:42,vars:8,consts:[[1,"container"],[1,"layout-row","gap-20px"],[1,"flex-fill"],["matInput","",3,"keyup"],[1,"mat-elevation-z8"],["mat-table","","matSort","",3,"dataSource"],["matColumnDef","id"],["mat-header-cell","","mat-sort-header","",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","officeName"],["matColumnDef","transactionDate"],["matColumnDef","transactionId"],["matColumnDef","glAccountType"],["matColumnDef","createdByUserName"],["matColumnDef","glAccountCode"],["matColumnDef","glAccountName"],["matColumnDef","debit"],["matColumnDef","credit"],["mat-header-row","",4,"matHeaderRowDef"],["mat-row","",4,"matRowDef","matRowDefColumns"],["showFirstLastButtons","",3,"pageSizeOptions"],["mat-header-cell","","mat-sort-header",""],["mat-cell",""],["mat-header-row",""],["mat-row",""]],template:function(n,i){n&1&&(l(0,"div",0)(1,"div",1)(2,"mat-form-field",2)(3,"mat-label"),c(4),p(5,"translate"),r(),l(6,"input",3),R("keyup",function(d){return i.applyFilter(d.target.value)}),r()()(),l(7,"div",4)(8,"table",5),X(9,6),F(10,LBe,3,3,"th",7)(11,VBe,2,1,"td",8),Z(),X(12,9),F(13,qBe,3,3,"th",7)(14,zBe,2,1,"td",8),Z(),X(15,10),F(16,HBe,3,3,"th",7)(17,GBe,2,1,"td",8),Z(),X(18,11),F(19,jBe,3,3,"th",7)(20,$Be,2,1,"td",8),Z(),X(21,12),F(22,UBe,3,3,"th",7)(23,WBe,2,1,"td",8),Z(),X(24,13),F(25,QBe,3,3,"th",7)(26,YBe,2,1,"td",8),Z(),X(27,14),F(28,JBe,3,3,"th",7)(29,KBe,2,1,"td",8),Z(),X(30,15),F(31,XBe,3,3,"th",7)(32,ZBe,2,1,"td",8),Z(),X(33,16),F(34,eRe,3,3,"th",7)(35,iRe,2,1,"td",8),Z(),X(36,17),F(37,nRe,3,3,"th",7)(38,aRe,2,1,"td",8),Z(),F(39,rRe,1,0,"tr",18)(40,lRe,1,0,"tr",19),r(),b(41,"mat-paginator",20),r()()),n&2&&(a(4),h(m(5,5,"labels.inputs.Filter")),a(4),g("dataSource",i.dataSource),a(31),g("matHeaderRowDef",i.displayedColumns),a(),g("matRowDefColumns",i.displayedColumns),a(),g("pageSizeOptions",oe(7,NBe)))},dependencies:[ue,fe,Fe,Be,ze,_t,It,xt,vt,bt,ri,Ct,yt,St,Pt,wt,Tt,kt,he],styles:["table[_ngcontent-%COMP%]{width:100%}"]})}}return e})();var g5=(()=>{class e{constructor(){this.accountingService=T(Ui)}resolve(){return this.accountingService.getAccountingRules(!0)}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275prov=Re({token:e,factory:e.\u0275fac})}}return e})();var o1=(()=>{class e{constructor(){this.accountingService=T(Ui)}resolve(){return this.accountingService.getCurrencies()}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275prov=Re({token:e,factory:e.\u0275fac})}}return e})();var zv=(()=>{class e{constructor(){this.accountingService=T(Ui)}resolve(){return this.accountingService.getPaymentTypes()}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275prov=Re({token:e,factory:e.\u0275fac})}}return e})();var tu=(()=>{class e{constructor(){this.accountingService=T(Ui)}resolve(){return this.accountingService.getGlAccounts()}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275prov=Re({token:e,factory:e.\u0275fac})}}return e})();var _5=(()=>{class e{constructor(){this.accountingService=T(Ui)}resolve(){return this.accountingService.getFinancialActivityAccounts()}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275prov=Re({token:e,factory:e.\u0275fac})}}return e})();var C5=(()=>{class e{constructor(){this.accountingService=T(Ui)}resolve(){return this.accountingService.getFinancialActivityAccountsTemplate()}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275prov=Re({token:e,factory:e.\u0275fac})}}return e})();var v5=(()=>{class e{constructor(){this.accountingService=T(Ui)}resolve(t){let n=t.paramMap.get("id");return this.accountingService.getFinancialActivityAccount(n,!1)}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275prov=Re({token:e,factory:e.\u0275fac})}}return e})();var x5=(()=>{class e{constructor(){this.accountingService=T(Ui)}resolve(t){let n=t.paramMap.get("id");return this.accountingService.getFinancialActivityAccount(n,!0)}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275prov=Re({token:e,factory:e.\u0275fac})}}return e})();var b5=(()=>{class e{constructor(){this.accountingService=T(Ui)}resolve(){return this.accountingService.getChartOfAccounts()}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275prov=Re({token:e,factory:e.\u0275fac})}}return e})();var y5=(()=>{class e{constructor(){this.accountingService=T(Ui)}resolve(){return this.accountingService.getChartOfAccountsTemplate()}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275prov=Re({token:e,factory:e.\u0275fac})}}return e})();var S5=(()=>{class e{constructor(){this.accountingService=T(Ui)}resolve(t){let n=t.paramMap.get("id");return this.accountingService.getGlAccount(n,!0).pipe(Mn(i=>{let s=[];switch(i.type.value){case"ASSET":s=i.assetHeaderAccountOptions;break;case"EQUITY":s=i.equityHeaderAccountOptions;break;case"EXPENSE":s=i.expenseHeaderAccountOptions;break;case"INCOME":s=i.incomeHeaderAccountOptions;break;case"LIABILITY":s=i.liabilityHeaderAccountOptions;break}return i.parentId&&(i.parent=s.find(d=>d.id===i.parentId)),i}))}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275prov=Re({token:e,factory:e.\u0275fac})}}return e})();var w5=(()=>{class e{constructor(){this.accountingService=T(Ui)}resolve(){return this.accountingService.getAccountingClosures()}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275prov=Re({token:e,factory:e.\u0275fac})}}return e})();var P5=(()=>{class e{constructor(){this.accountingService=T(Ui)}resolve(t){let n=t.paramMap.get("id");return this.accountingService.getAccountingClosure(n)}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275prov=Re({token:e,factory:e.\u0275fac})}}return e})();var T5=(()=>{class e{constructor(){this.accountingService=T(Ui)}resolve(){return this.accountingService.getAccountingRules()}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275prov=Re({token:e,factory:e.\u0275fac})}}return e})();var Hv=(()=>{class e{constructor(){this.accountingService=T(Ui)}resolve(){return this.accountingService.getAccountingRulesTemplate()}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275prov=Re({token:e,factory:e.\u0275fac})}}return e})();var M5=(()=>{class e{constructor(){this.accountingService=T(Ui)}resolve(t){let n=t.paramMap.get("id");return this.accountingService.getAccountingRule(n)}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275prov=Re({token:e,factory:e.\u0275fac})}}return e})();var D5=(()=>{class e{constructor(){this.accountingService=T(Ui)}resolve(){return this.accountingService.getProvisioningEntries()}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275prov=Re({token:e,factory:e.\u0275fac})}}return e})();var E5=(()=>{class e{constructor(){this.accountingService=T(Ui)}resolve(t){let n=t.paramMap.get("id");return this.accountingService.getProvisioningEntry(n)}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275prov=Re({token:e,factory:e.\u0275fac})}}return e})();var I5=(()=>{class e{constructor(){this.accountingService=T(Ui)}resolve(t){let n=t.paramMap.get("id");return this.accountingService.getProvisioningEntryEntries(n)}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275prov=Re({token:e,factory:e.\u0275fac})}}return e})();var O5=(()=>{class e{constructor(){this.accountingService=T(Ui)}resolve(){return this.accountingService.getLoanProducts()}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275prov=Re({token:e,factory:e.\u0275fac})}}return e})();var A5=(()=>{class e{constructor(){this.accountingService=T(Ui)}resolve(){return this.accountingService.getProvisioningCategories()}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275prov=Re({token:e,factory:e.\u0275fac})}}return e})();var F5=(()=>{class e{constructor(){this.accountingService=T(Ui)}resolve(t){let n=t.paramMap.get("id");return this.accountingService.getProvisioningJournalEntries(n)}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275prov=Re({token:e,factory:e.\u0275fac})}}return e})();var Gv=(()=>{class e{constructor(){this.accountingService=T(Ui)}resolve(t){let n=t.paramMap.get("id");return this.accountingService.getJournalEntry(n)}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275prov=Re({token:e,factory:e.\u0275fac})}}return e})();var xN=(()=>{class e{constructor(){this.externalAssetOwnerService=T(Xg)}resolve(t){let n=t.paramMap.get("transferId")||t.parent.paramMap.get("transferId");return this.externalAssetOwnerService.retrieveExternalAssetOwnerTransferJournalEntries(n)}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275prov=Re({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();var k5=(()=>{class e{constructor(){this.systemService=T(ii)}resolve(){return this.systemService.getConfigurationByName(ii.CONFIG_ASSET_EXTERNALIZATION)}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275prov=Re({token:e,factory:e.\u0275fac})}}return e})();var sRe=[_o.withShell([{path:"accounting",data:{title:"Accounting",breadcrumb:"Accounting"},children:[{path:"",component:dv},{path:"journal-entries",data:{title:"Search Journal Entry",breadcrumb:"Journal Entries"},children:[{path:"",component:gv,resolve:{offices:Hr,glAccounts:tu}},{path:"frequent-postings",component:uv,data:{title:"Frequent Postings",breadcrumb:"Frequent Postings"},resolve:{offices:Hr,accountingRules:g5,currencies:o1,paymentTypes:zv}},{path:"create",component:fv,data:{title:"Create Journal Entry",breadcrumb:"Create"},resolve:{offices:Hr,currencies:o1,paymentTypes:zv,glAccounts:tu,globalConfig:k5}},{path:"transactions",data:{title:"Transactions",breadcrumb:"Transactions",addBreadcrumbLink:!1},children:[{path:"view/:id",component:Yg,data:{title:"View Transaction",routeParamBreadcrumb:"id"},resolve:{transaction:Gv}}]}]},{path:"financial-activity-mappings",data:{title:"Financial Activity Mappings",breadcrumb:"Financial Activity Mappings"},children:[{path:"",component:_v,resolve:{financialActivityAccounts:_5}},{path:"create",component:Cv,data:{title:"Create Financial Activity Mapping",breadcrumb:"Create"},resolve:{financialActivityAccountsTemplate:C5}},{path:"view/:id",data:{title:"View Financial Activity Mapping",routeParamBreadcrumb:"id"},children:[{path:"",component:vv,resolve:{financialActivityAccount:v5}},{path:"edit",component:xv,data:{title:"Edit Financial Activity Mapping",breadcrumb:"Edit",routeParamBreadcrumb:!1},resolve:{financialActivityAccountAndTemplate:x5}}]}]},{path:"migrate-opening-balances",component:bv,data:{title:"Migrate Opening Balances",breadcrumb:"Migrate Opening Balances"},resolve:{offices:Hr,currencies:o1}},{path:"chart-of-accounts",data:{title:"Chart of Accounts",breadcrumb:"Chart of Accounts"},children:[{path:"",component:Sv,resolve:{chartOfAccounts:b5}},{path:"gl-accounts",children:[{path:"create",component:wv,data:{title:"Create GL Account",breadcrumb:"Create GL Account"},resolve:{chartOfAccountsTemplate:y5}},{path:"view/:id",data:{title:"View GL Account",routeResolveBreadcrumb:["glAccountAndChartOfAccountsTemplate","name"]},resolve:{glAccountAndChartOfAccountsTemplate:S5},runGuardsAndResolvers:"always",children:[{path:"",component:Pv},{path:"edit",component:Tv,data:{title:"Edit GL Account",breadcrumb:"Edit",routeResolveBreadcrumb:!1}}]}]}]},{path:"closing-entries",data:{title:"Accounting Closures",breadcrumb:"Closing Entries"},children:[{path:"",component:Mv,resolve:{offices:Hr,glAccountClosures:w5}},{path:"create",component:Dv,data:{title:"Create Accounting Closure",breadcrumb:"Create"},resolve:{offices:Hr}},{path:"view/:id",data:{title:"View Accounting Closure",routeParamBreadcrumb:"id"},resolve:{glAccountClosure:P5},runGuardsAndResolvers:"always",children:[{path:"",component:Ev},{path:"edit",component:Iv,data:{title:"Edit Accounting Closure",breadcrumb:"Edit",routeParamBreadcrumb:!1}}]}]},{path:"accounting-rules",data:{title:"Accounting Rules",breadcrumb:"Accounting Rules"},children:[{path:"",component:Ov,resolve:{accountingRules:T5}},{path:"create",component:Fv,data:{title:"Create Accounting Rule",breadcrumb:"Create"},resolve:{accountingRulesTemplate:Hv}},{path:"view/:id",data:{title:"View Accounting Rule",routeResolveBreadcrumb:["accountingRule","name"]},resolve:{accountingRule:M5},runGuardsAndResolvers:"always",children:[{path:"",component:kv},{path:"edit",component:Bv,data:{title:"Edit Accounting Rules",breadcrumb:"Edit",routeResolveBreadcrumb:!1},resolve:{accountingRulesTemplate:Hv}}]}]},{path:"periodic-accruals",component:Rv,data:{title:"Periodic Accrual Accounting",breadcrumb:"Execute Periodic Accrual Accounting"}},{path:"provisioning-entries",data:{title:"Provisioning Entries",breadcrumb:"Provisioning Entries"},children:[{path:"",component:Nv,resolve:{provisioningEntries:D5}},{path:"create",component:Lv,data:{title:"Create Provisioning Entry",breadcrumb:"Create"}},{path:"view/:id",component:Vv,data:{title:"View Provisioning Entry",routeParamBreadcrumb:"id"},resolve:{provisioningEntry:E5,provisioningEntryEntries:I5,office:Hr,loanProducts:O5,provisioningCategories:A5}},{path:"journal-entries",data:{breadcrumb:"Journal Entries",addBreadcrumbLink:!1},children:[{path:"view/:id",component:qv,data:{title:"View Provisioning Journal Entry",routeParamBreadcrumb:"id"},resolve:{provisioningJournalEntries:F5}}]}]}]},{path:"journal-entry",data:{title:"Journal Entries",breadcrumb:"Journal Entries"},children:[{path:"view/:id",component:Yg,data:{title:"View Transaction",routeParamBreadcrumb:"id"},resolve:{transaction:Gv}},{path:"view-transfer/:transferId",component:Yg,data:{title:"View Transfer",routeParamBreadcrumb:"transferId"},resolve:{transferJournalEntryData:xN}}]}])],bN=(()=>{class e{static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275mod=Gi({type:e})}static{this.\u0275inj=Hi({providers:[Hr,g5,o1,zv,tu,Gv,_5,C5,v5,x5,b5,y5,S5,w5,P5,T5,Hv,M5,D5,E5,I5,O5,A5,F5,k5],imports:[gn.forChild(sRe),gn]})}}return e})();var yN=(()=>{class e{static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275mod=Gi({type:e})}static{this.\u0275inj=Hi({imports:[oo,Ir,bN,ha,dv,uv,fv,gv,Fk,_v,Cv,vv,xv,bv,Sv,wv,Pv,Tv,Mv,Dv,Ev,Iv,Ov,Fv,kv,Bv,Rv,Nv,Lv,Vv,qv]})}}return e})();var cRe=()=>[10,25,50,100],pRe=()=>["create"],mRe=e=>[e];function dRe(e,o){e&1&&(l(0,"button",14),b(1,"fa-icon",15),c(2),p(3,"translate"),r()),e&2&&(g("routerLink",oe(4,pRe)),a(2),v(" ",m(3,2,"labels.buttons.Create Preference")," "))}function uRe(e,o){e&1&&(l(0,"th",16),c(1),p(2,"translate"),r()),e&2&&(a(),v(" ",m(2,1,"labels.inputs.Account Number Preferences")," "))}function fRe(e,o){if(e&1&&(l(0,"td",17),c(1),p(2,"translateKey"),r()),e&2){let t=o.$implicit;a(),v(" ",Ot(2,1,t.accountType.value,"catalogs")," ")}}function hRe(e,o){e&1&&b(0,"tr",18)}function gRe(e,o){if(e&1&&b(0,"tr",19),e&2){let t=o.$implicit;g("routerLink",Nt(1,mRe,t.id))}}var jv=(()=>{class e{constructor(){this.route=T(Ie),this.displayedColumns=["accountType"],this.route.data.subscribe(t=>{this.accountNumberPreferencesData=t.accountNumberPreferences})}ngOnInit(){this.setAccountNumberPreferences()}setAccountNumberPreferences(){this.dataSource=new Wt(this.accountNumberPreferencesData),this.dataSource.paginator=this.paginator,this.dataSource.sortingDataAccessor=(t,n)=>t.accountType.value,this.dataSource.sort=this.sort,this.dataSource.filterPredicate=(t,n)=>t.accountType.value.toLowerCase().indexOf(n)!==-1}applyFilter(t){this.dataSource.filter=t.toLowerCase().trim()}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275cmp=me({type:e,selectors:[["mifosx-account-number-preferences"]],viewQuery:function(n,i){if(n&1&&(Ee(kt,7),Ee(It,7)),n&2){let s;Te(s=Me())&&(i.paginator=s.first),Te(s=Me())&&(i.sort=s.first)}},decls:17,vars:9,consts:[[1,"container","m-b-20","layout-row","align-end","gap-20px"],["mat-raised-button","","color","primary",3,"routerLink",4,"mifosxHasPermission"],[1,"container"],[1,"layout-row"],[1,"flex-fill"],["matInput","",3,"keyup"],[1,"mat-elevation-z8"],["mat-table","","matSort","",3,"dataSource"],["matColumnDef","accountType"],["mat-header-cell","","mat-sort-header","",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["mat-header-row","",4,"matHeaderRowDef"],["mat-row","","class","select-row",3,"routerLink",4,"matRowDef","matRowDefColumns"],["showFirstLastButtons","",3,"pageSizeOptions"],["mat-raised-button","","color","primary",3,"routerLink"],["icon","plus",1,"m-r-10"],["mat-header-cell","","mat-sort-header",""],["mat-cell",""],["mat-header-row",""],["mat-row","",1,"select-row",3,"routerLink"]],template:function(n,i){n&1&&(l(0,"div",0),F(1,dRe,4,5,"button",1),r(),l(2,"div",2)(3,"div",3)(4,"mat-form-field",4)(5,"mat-label"),c(6),p(7,"translate"),r(),l(8,"input",5),R("keyup",function(d){return i.applyFilter(d.target.value)}),r()()(),l(9,"div",6)(10,"table",7),X(11,8),F(12,uRe,3,3,"th",9)(13,fRe,3,4,"td",10),Z(),F(14,hRe,1,0,"tr",11)(15,gRe,1,3,"tr",12),r(),b(16,"mat-paginator",13),r()()),n&2&&(a(),g("mifosxHasPermission","ADD_PREFERENCES"),a(5),h(m(7,6,"labels.inputs.Filter")),a(4),g("dataSource",i.dataSource),a(4),g("matHeaderRowDef",i.displayedColumns),a(),g("matRowDefColumns",i.displayedColumns),a(),g("pageSizeOptions",oe(8,cRe)))},dependencies:[ue,fe,Ae,Fe,Be,ze,ve,Ke,ke,_t,It,xt,vt,bt,ri,Ct,yt,St,Pt,wt,Tt,kt,he,Fi],styles:["table[_ngcontent-%COMP%]{width:100%}table[_ngcontent-%COMP%] .select-row[_ngcontent-%COMP%]:hover{cursor:pointer}"]})}}return e})();var _Re=()=>["../"];function CRe(e,o){if(e&1&&(l(0,"mat-option",4),c(1),p(2,"translateKey"),r()),e&2){let t=o.$implicit;g("value",t.id),a(),v(" ",Ot(2,2,t.value,"catalogs")," ")}}function vRe(e,o){e&1&&(l(0,"mat-error"),c(1),p(2,"translate"),p(3,"translate"),l(4,"strong"),c(5),p(6,"translate"),r()()),e&2&&(a(),le(" ",m(2,3,"labels.inputs.Account Type")," ",m(3,5,"labels.commons.is")," "),a(4),h(m(6,7,"labels.commons.required")))}function xRe(e,o){if(e&1&&(l(0,"mat-option",4),c(1),r()),e&2){let t=o.$implicit;g("value",t.id),a(),v(" ",t.value," ")}}function bRe(e,o){if(e&1&&(l(0,"button",9),c(1),p(2,"translate"),r()),e&2){let t=w();g("disabled",!t.accountNumberPreferenceForm.valid),a(),v(" ",m(2,2,"labels.buttons.Submit")," ")}}var $v=(()=>{class e{constructor(){this.formBuilder=T(nt),this.systemService=T(ii),this.route=T(Ie),this.router=T(qe),this.route.data.subscribe(t=>{this.accountNumberPreferencesTemplateData=t.accountNumberPreferencesTemplate})}ngOnInit(){this.createAccountNumberPreferenceForm(),this.getPrefixTypeValue()}getPrefixTypeValue(){this.accountNumberPreferenceForm.get("accountType").valueChanges.subscribe(t=>{this.prefixTypeData=this.accountNumberPreferencesTemplateData.prefixTypeOptions[`accountType.${this.accountNumberPreferencesTemplateData.accountTypeOptions.find(n=>n.id===t).value.toLowerCase()}`]})}createAccountNumberPreferenceForm(){this.accountNumberPreferenceForm=this.formBuilder.group({accountType:["",se.required],prefixType:[""]})}submit(){let t=this.accountNumberPreferenceForm.value;t.prefixType===""&&(t.prefixType=void 0),this.systemService.createAccountNumberPreference(t).subscribe(n=>{this.router.navigate(["../",n.resourceId],{relativeTo:this.route})})}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275cmp=me({type:e,selectors:[["mifosx-create-account-number-preference"]],decls:25,vars:14,consts:[[1,"container"],[3,"ngSubmit","formGroup"],[1,"layout-column"],["required","","formControlName","accountType"],[3,"value"],["formControlName","prefixType"],[1,"layout-row","align-center","gap-5px","responsive-column"],["type","button","mat-raised-button","",3,"routerLink"],["mat-raised-button","","color","primary",3,"disabled",4,"mifosxHasPermission"],["mat-raised-button","","color","primary",3,"disabled"]],template:function(n,i){n&1&&(l(0,"div",0)(1,"mat-card")(2,"form",1),R("ngSubmit",function(){return i.submit()}),l(3,"mat-card-content")(4,"div",2)(5,"mat-form-field")(6,"mat-label"),c(7),p(8,"translate"),r(),l(9,"mat-select",3),Se(10,CRe,3,5,"mat-option",4,Pe),r(),E(12,vRe,7,9,"mat-error"),r(),l(13,"mat-form-field")(14,"mat-label"),c(15),p(16,"translate"),r(),l(17,"mat-select",5),Se(18,xRe,2,2,"mat-option",4,Pe),r()()()(),l(20,"mat-card-actions",6)(21,"button",7),c(22),p(23,"translate"),r(),F(24,bRe,3,4,"button",8),r()()()()),n&2&&(a(2),g("formGroup",i.accountNumberPreferenceForm),a(5),h(m(8,7,"labels.inputs.Account Type")),a(3),we(i.accountNumberPreferencesTemplateData.accountTypeOptions),a(2),I(i.accountNumberPreferenceForm.controls.accountType.hasError("required")?12:-1),a(3),h(m(16,9,"labels.inputs.Prefix Field")),a(3),we(i.prefixTypeData),a(3),g("routerLink",oe(13,_Re)),a(),v(" ",m(23,11,"labels.buttons.Cancel")," "),a(2),g("mifosxHasPermission","CREATE_ACCOUNTNUMBERFORMAT"))},dependencies:[ue,fe,tt,Ue,Xe,dt,Ze,et,Ae,$e,Je,Et,Fe,Be,ut,gt,ft,ve,Ke,he,Fi],styles:[".container[_ngcontent-%COMP%]{max-width:37rem}"]})}}return e})();var yRe=()=>["../"];function SRe(e,o){if(e&1&&(l(0,"mat-option",4),c(1),p(2,"translateKey"),r()),e&2){let t=o.$implicit;g("value",t.id),a(),v(" ",Ot(2,2,t.value,"catalogs")," ")}}function wRe(e,o){e&1&&(l(0,"mat-error"),c(1),p(2,"translate"),p(3,"translate"),l(4,"strong"),c(5),p(6,"translate"),r()()),e&2&&(a(),le(" ",m(2,3,"labels.inputs.Account Type")," ",m(3,5,"labels.commons.is")," "),a(4),h(m(6,7,"labels.commons.required")))}function PRe(e,o){if(e&1&&(l(0,"mat-option",4),c(1),r()),e&2){let t=o.$implicit;g("value",t.id),a(),v(" ",t.value," ")}}function TRe(e,o){if(e&1&&(l(0,"button",9),c(1),p(2,"translate"),r()),e&2){let t=w();g("disabled",!t.accountNumberPreferenceForm.valid||t.accountNumberPreferenceForm.pristine),a(),v(" ",m(2,2,"labels.buttons.Submit")," ")}}var Uv=(()=>{class e{constructor(){this.route=T(Ie),this.formBuilder=T(nt),this.systemService=T(ii),this.router=T(qe),this.route.data.subscribe(t=>{this.accountNumberPreferenceData=t.accountNumberPreference,this.accountNumberPreferencesTemplateData=t.accountNumberPreferencesTemplate})}ngOnInit(){this.prefixTypeData=this.accountNumberPreferencesTemplateData.prefixTypeOptions[this.accountNumberPreferenceData.accountType.code],this.createAccountNumberPreferenceForm()}createAccountNumberPreferenceForm(){this.accountNumberPreferenceForm=this.formBuilder.group({accountType:[{value:this.accountNumberPreferenceData.accountType.id,disabled:!0},se.required],prefixType:[this.accountNumberPreferenceData.prefixType?this.accountNumberPreferenceData.prefixType.id:0]})}submit(){let t=this.accountNumberPreferenceForm.value;t.prefixType===""&&(t.prefixType=void 0),this.systemService.updateAccountNumberPreference(this.accountNumberPreferenceData.id,t).subscribe(n=>{this.router.navigate(["../"],{relativeTo:this.route})})}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275cmp=me({type:e,selectors:[["mifosx-edit-account-number-preference"]],decls:25,vars:14,consts:[[1,"container"],[3,"ngSubmit","formGroup"],[1,"layout-column"],["required","","formControlName","accountType"],[3,"value"],["formControlName","prefixType"],[1,"layout-row","align-center","gap-5px","responsive-column"],["type","button","mat-raised-button","",3,"routerLink"],["mat-raised-button","","color","primary",3,"disabled",4,"mifosxHasPermission"],["mat-raised-button","","color","primary",3,"disabled"]],template:function(n,i){n&1&&(l(0,"div",0)(1,"mat-card")(2,"form",1),R("ngSubmit",function(){return i.submit()}),l(3,"mat-card-content")(4,"div",2)(5,"mat-form-field")(6,"mat-label"),c(7),p(8,"translate"),r(),l(9,"mat-select",3),Se(10,SRe,3,5,"mat-option",4,Pe),r(),E(12,wRe,7,9,"mat-error"),r(),l(13,"mat-form-field")(14,"mat-label"),c(15),p(16,"translate"),r(),l(17,"mat-select",5),Se(18,PRe,2,2,"mat-option",4,Pe),r()()()(),l(20,"mat-card-actions",6)(21,"button",7),c(22),p(23,"translate"),r(),F(24,TRe,3,4,"button",8),r()()()()),n&2&&(a(2),g("formGroup",i.accountNumberPreferenceForm),a(5),h(m(8,7,"labels.inputs.Account Type")),a(3),we(i.accountNumberPreferencesTemplateData.accountTypeOptions),a(2),I(i.accountNumberPreferenceForm.controls.accountType.hasError("required")?12:-1),a(3),h(m(16,9,"labels.inputs.Prefix Field")),a(3),we(i.prefixTypeData),a(3),g("routerLink",oe(13,yRe)),a(),v(" ",m(23,11,"labels.buttons.Cancel")," "),a(2),g("mifosxHasPermission","UPDATE_ACCOUNTNUMBERFORMAT"))},dependencies:[ue,fe,tt,Ue,Xe,dt,Ze,et,Ae,$e,Je,Et,Fe,Be,ut,gt,ft,ve,Ke,he,Fi],styles:[".container[_ngcontent-%COMP%]{max-width:37rem}"]})}}return e})();var MRe=()=>["edit"];function DRe(e,o){e&1&&(l(0,"button",7),b(1,"fa-icon",8),c(2),p(3,"translate"),r()),e&2&&(g("routerLink",oe(4,MRe)),a(2),v(" ",m(3,2,"labels.buttons.Edit")," "))}function ERe(e,o){if(e&1){let t=Y();l(0,"button",9),R("click",function(){V(t);let i=w();return q(i.delete())}),b(1,"fa-icon",10),c(2),p(3,"translate"),r()}e&2&&(a(2),v(" ",m(3,1,"labels.buttons.Delete")," "))}function IRe(e,o){e&1&&(l(0,"div",5),c(1),p(2,"translate"),r()),e&2&&(a(),v(" ",m(2,1,"labels.inputs.Prefix Type")," "))}function ORe(e,o){if(e&1&&(l(0,"div",6),c(1),r()),e&2){let t=w();a(),v(" ",t.accountNumberPreferenceData.prefixType.value," ")}}var Wv=(()=>{class e{constructor(){this.route=T(Ie),this.systemService=T(ii),this.router=T(qe),this.dialog=T(Ht),this.translateService=T(yi),this.route.data.subscribe(t=>{this.accountNumberPreferenceData=t.accountNumberPreference})}delete(){this.dialog.open(vi,{data:{deleteContext:this.translateService.instant("labels.heading.Account Number Preferences")+" "+this.accountNumberPreferenceData.id}}).afterClosed().subscribe(n=>{n.delete&&this.systemService.deleteAccountNumberPreference(this.accountNumberPreferenceData.id).subscribe(()=>{this.router.navigate(["/system/account-number-preferences"])})})}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275cmp=me({type:e,selectors:[["mifosx-view-account-number-preference"]],decls:15,vars:11,consts:[[1,"container","m-b-20","layout-row","align-end","gap-20px"],["mat-raised-button","","color","primary",3,"routerLink",4,"mifosxHasPermission"],["mat-raised-button","","color","warn",3,"click",4,"mifosxHasPermission"],[1,"container"],[1,"layout-row-wrap"],[1,"flex-50","mat-body-strong"],[1,"flex-50"],["mat-raised-button","","color","primary",3,"routerLink"],["icon","edit",1,"m-r-10"],["mat-raised-button","","color","warn",3,"click"],["icon","trash",1,"m-r-10"]],template:function(n,i){n&1&&(l(0,"div",0),F(1,DRe,4,5,"button",1)(2,ERe,4,3,"button",2),r(),l(3,"div",3)(4,"mat-card")(5,"mat-card-content")(6,"div",4)(7,"div",5),c(8),p(9,"translate"),r(),l(10,"div",6),c(11),p(12,"translateKey"),r(),E(13,IRe,3,3,"div",5),E(14,ORe,2,1,"div",6),r()()()()),n&2&&(a(),g("mifosxHasPermission","UPDATE_ACCOUNTNUMBERFORMAT"),a(),g("mifosxHasPermission","DELETE_ACCOUNTNUMBERFORMAT"),a(6),v(" ",m(9,6,"labels.inputs.Account Type")," "),a(3),v(" ",Ot(12,8,i.accountNumberPreferenceData.accountType.value,"catalogs")," "),a(2),I(i.accountNumberPreferenceData.prefixType?13:-1),a(),I(i.accountNumberPreferenceData.prefixType?14:-1))},dependencies:[ue,fe,Ae,$e,Je,ve,Ke,ke,he,Fi],styles:[".container[_ngcontent-%COMP%]{max-width:37rem}.container[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] div[_ngcontent-%COMP%]{margin:1rem 0;word-wrap:break-word}"]})}}return e})();var Qv=class{constructor(o){this.systemService=o,this.auditTrailsSubject=new Na([]),this.recordsSubject=new Na(0),this.records$=this.recordsSubject.asObservable()}getAuditTrails(o,t="",n="",i=0,s=10){this.auditTrailsSubject.next([]),this.systemService.getAuditTrails(o,t,n,i*s,s).subscribe(d=>{this.recordsSubject.next(d.totalFilteredRecords),this.auditTrailsSubject.next(d.pageItems)})}connect(o){return this.auditTrailsSubject.asObservable()}disconnect(o){this.auditTrailsSubject.complete(),this.recordsSubject.complete()}};var SN=(e,o)=>({id:e,name:o}),ARe=e=>[e],FRe=()=>[10,25,50,100];function kRe(e,o){if(e&1&&(l(0,"mat-option",16),c(1),r()),e&2){let t=o.$implicit;g("value",t.id),a(),v(" ",t.processingResult," ")}}function BRe(e,o){if(e&1&&(l(0,"mat-option",16),c(1),r()),e&2){let t=o.$implicit;g("value",Ka(2,SN,t.id,t.username)),a(),v(" ",t.username," ")}}function RRe(e,o){if(e&1&&(l(0,"mat-option",16),c(1),r()),e&2){let t=o.$implicit;g("value",t),a(),v(" ",t," ")}}function NRe(e,o){if(e&1&&(l(0,"mat-option",16),c(1),r()),e&2){let t=o.$implicit;g("value",t),a(),v(" ",t," ")}}function LRe(e,o){if(e&1&&(l(0,"mat-option",16),c(1),r()),e&2){let t=o.$implicit;g("value",Ka(2,SN,t.id,t.username)),a(),v(" ",t.username," ")}}function VRe(e,o){e&1&&(l(0,"div"),b(1,"mat-progress-bar",28),r())}function qRe(e,o){e&1&&(l(0,"th",44),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.Trail ID")))}function zRe(e,o){if(e&1&&(l(0,"td",45),c(1),r()),e&2){let t=o.$implicit;a(),h(t.id)}}function HRe(e,o){e&1&&(l(0,"th",44),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.Resource ID")))}function GRe(e,o){if(e&1&&(l(0,"td",45),c(1),r()),e&2){let t=o.$implicit;a(),h(t.resourceId)}}function jRe(e,o){e&1&&(l(0,"th",44),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.Status")))}function $Re(e,o){if(e&1&&(l(0,"td",45),c(1),r()),e&2){let t=o.$implicit;a(),h(t.processingResult)}}function URe(e,o){e&1&&(l(0,"th",44),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.Made By")))}function WRe(e,o){if(e&1&&(l(0,"td",45),c(1),r()),e&2){let t=o.$implicit;a(),h(t.maker)}}function QRe(e,o){e&1&&(l(0,"th",44),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.Action")))}function YRe(e,o){if(e&1&&(l(0,"td",45),c(1),p(2,"translateKey"),r()),e&2){let t=o.$implicit;a(),h(Ot(2,1,t.actionName,"auditTrail.actions"))}}function JRe(e,o){e&1&&(l(0,"th",44),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.Entity")))}function KRe(e,o){if(e&1&&(l(0,"td",45),c(1),p(2,"translateKey"),r()),e&2){let t=o.$implicit;a(),h(Ot(2,1,t.entityName,"auditTrail.entities"))}}function XRe(e,o){e&1&&(l(0,"th",44),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.Office")))}function ZRe(e,o){if(e&1&&(l(0,"td",45),c(1),r()),e&2){let t=o.$implicit;a(),h(t.officeName)}}function e9e(e,o){e&1&&(l(0,"th",44),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.Made Date")))}function t9e(e,o){if(e&1&&(l(0,"td",45),c(1),p(2,"datetimeFormat"),r()),e&2){let t=o.$implicit;a(),h(m(2,1,t.madeOnDate))}}function i9e(e,o){e&1&&(l(0,"th",44),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.Checker")))}function n9e(e,o){if(e&1&&(l(0,"td",45),c(1),r()),e&2){let t=o.$implicit;a(),h(t.checker)}}function o9e(e,o){e&1&&(l(0,"th",44),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.Checked Date")))}function a9e(e,o){if(e&1&&(l(0,"td",45),c(1),p(2,"datetimeFormat"),r()),e&2){let t=o.$implicit;a(),h(m(2,1,t.checkedOnDate))}}function r9e(e,o){e&1&&(l(0,"th",44),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.Client Ip")))}function l9e(e,o){if(e&1&&(l(0,"td",45),c(1),r()),e&2){let t=o.$implicit;a(),h(t.ip)}}function s9e(e,o){e&1&&b(0,"tr",46)}function c9e(e,o){if(e&1&&b(0,"tr",47),e&2){let t=o.$implicit;g("routerLink",Nt(1,ARe,t.id))}}function p9e(e,o){if(e&1&&(l(0,"table",26),X(1,29),F(2,qRe,3,3,"th",30)(3,zRe,2,1,"td",31),Z(),X(4,32),F(5,HRe,3,3,"th",30)(6,GRe,2,1,"td",31),Z(),X(7,33),F(8,jRe,3,3,"th",30)(9,$Re,2,1,"td",31),Z(),X(10,34),F(11,URe,3,3,"th",30)(12,WRe,2,1,"td",31),Z(),X(13,35),F(14,QRe,3,3,"th",30)(15,YRe,3,4,"td",31),Z(),X(16,36),F(17,JRe,3,3,"th",30)(18,KRe,3,4,"td",31),Z(),X(19,37),F(20,XRe,3,3,"th",30)(21,ZRe,2,1,"td",31),Z(),X(22,38),F(23,e9e,3,3,"th",30)(24,t9e,3,3,"td",31),Z(),X(25,39),F(26,i9e,3,3,"th",30)(27,n9e,2,1,"td",31),Z(),X(28,40),F(29,o9e,3,3,"th",30)(30,a9e,3,3,"td",31),Z(),X(31,41),F(32,r9e,3,3,"th",30)(33,l9e,2,1,"td",31),Z(),F(34,s9e,1,0,"tr",42)(35,c9e,1,3,"tr",43),r()),e&2){let t=w();g("dataSource",t.dataSource),a(34),g("matHeaderRowDef",t.displayedColumns),a(),g("matRowDefColumns",t.displayedColumns)}}function m9e(e,o){if(e&1&&(b(0,"mat-paginator",27),p(1,"async")),e&2){let t=w();g("length",m(1,3,t.dataSource==null?null:t.dataSource.records$))("pageSize",10)("pageSizeOptions",oe(5,FRe))}}var Yv=(()=>{class e{constructor(){this.route=T(Ie),this.systemService=T(ii),this.dateUtils=T(Zt),this.settingsService=T(At),this.minDate=new Date(2e3,0,1),this.maxDate=new Date,this.displayedColumns=["id","resourceId","processingResult","maker","actionName","entityName","officeName","madeOnDate","checker","checkedOnDate","clientIp"],this.filterAuditTrailsBy=[{type:"actionName",value:""},{type:"entityName",value:""},{type:"resourceId",value:""},{type:"makerId",value:""},{type:"makerDateTimeFrom",value:""},{type:"makerDateTimeTo",value:""},{type:"checkerDateTimeFrom",value:""},{type:"checkerDateTimeTo",value:""},{type:"checkerId",value:""},{type:"processingResult",value:""},{type:"dateFormat",value:this.settingsService.dateFormat},{type:"locale",value:this.settingsService.language.code}],this.user=new it(""),this.fromDate=new it,this.fromTime=new it,this.checkedFromDate=new it,this.checkedFromTime=new it,this.processingResult=new it,this.actionName=new it,this.resourceId=new it(""),this.toDate=new it,this.toTime=new it,this.checkedToDate=new it,this.checkedToTime=new it,this.entityName=new it,this.checker=new it,this.isLoading=!1,this.route.data.subscribe(t=>{this.auditTrailSearchTemplateData=t.auditTrailSearchTemplate})}ngOnInit(){this.maxDate=this.settingsService.businessDate,this.setFilteredUsers(),this.setFilteredActions(),this.setFilteredEntities(),this.setFilteredCheckers(),this.dataSource=new Qv(this.systemService),this.getAuditTrails()}ngAfterViewInit(){this.user.valueChanges.pipe(Mn(t=>t.id?t.id:""),Oo(500),Ao(),Eo(t=>{this.applyFilter(t,"makerId")})).subscribe(),this.fromDate.valueChanges.pipe(Oo(500),Ao(),Eo(t=>{this.applyFilter(this.getDateTime(t,this.fromTime.value),"makerDateTimeFrom")})).subscribe(),this.fromTime.valueChanges.pipe(Oo(500),Ao(),Eo(t=>{this.applyFilter(this.getDateTime(this.fromDate.value,t),"makerDateTimeFrom")})).subscribe(),this.toDate.valueChanges.pipe(Oo(500),Ao(),Eo(t=>{this.applyFilter(this.getDateTime(t,this.toTime.value),"makerDateTimeTo")})).subscribe(),this.toTime.valueChanges.pipe(Oo(500),Ao(),Eo(t=>{this.applyFilter(this.getDateTime(this.toDate.value,t),"makerDateTimeTo")})).subscribe(),this.checkedFromDate.valueChanges.pipe(Oo(500),Ao(),Eo(t=>{this.applyFilter(this.getDateTime(t,this.checkedFromTime.value),"checkerDateTimeFrom")})).subscribe(),this.checkedFromTime.valueChanges.pipe(Oo(500),Ao(),Eo(t=>{this.applyFilter(this.getDateTime(this.checkedFromDate.value,t),"checkerDateTimeFrom")})).subscribe(),this.checkedToDate.valueChanges.pipe(Oo(500),Ao(),Eo(t=>{this.applyFilter(this.getDateTime(t,this.checkedToTime.value),"checkerDateTimeTo")})).subscribe(),this.checkedToTime.valueChanges.pipe(Oo(500),Ao(),Eo(t=>{this.applyFilter(this.getDateTime(this.checkedToDate.value,t),"checkerDateTimeTo")})).subscribe(),this.resourceId.valueChanges.pipe(Oo(500),Ao(),Eo(t=>{this.applyFilter(t,"resourceId")})).subscribe(),this.actionName.valueChanges.pipe(Mn(t=>t||""),Oo(500),Ao(),Eo(t=>{this.applyFilter(t,"actionName")})).subscribe(),this.entityName.valueChanges.pipe(Mn(t=>t||""),Oo(500),Ao(),Eo(t=>{this.applyFilter(t,"entityName")})).subscribe(),this.checker.valueChanges.pipe(Mn(t=>t||""),Oo(500),Ao(),Eo(t=>{this.applyFilter(t.id,"checkerId")})).subscribe(),this.sort&&this.paginator&&fl(this.sort.sortChange,this.paginator.page).pipe(Eo(()=>this.loadAuditTrailsPage())).subscribe()}getAuditTrails(){this.isLoading=!0;let t=this.sort?this.sort.active:"",n=this.sort?this.sort.direction:"",i=this.paginator?this.paginator.pageIndex:0,s=this.paginator?this.paginator.pageSize:20;this.dataSource.getAuditTrails(this.filterAuditTrailsBy,t,n,i,s),this.isLoading=!1}loadAuditTrailsPage(){this.sort&&!this.sort.direction&&delete this.sort.active,this.getAuditTrails()}applyFilter(t,n){this.paginator&&(this.paginator.pageIndex=0);let i=this.filterAuditTrailsBy.findIndex(s=>s.type===n);this.filterAuditTrailsBy[i].value=t,this.loadAuditTrailsPage()}displayUserName(t){return t?t.name:void 0}displayActionName(t){return t||void 0}displayEntityName(t){return t||void 0}setFilteredUsers(){this.filteredUserData=this.user.valueChanges.pipe(hl(""),Mn(t=>typeof t=="string"?t:t.name),Mn(t=>t?this.filterUserAutocompleteData(t):this.auditTrailSearchTemplateData.appUsers))}setFilteredCheckers(){this.filteredCheckerData=this.checker.valueChanges.pipe(hl(""),Mn(t=>typeof t=="string"?t:t.name),Mn(t=>t?this.filterUserAutocompleteData(t):this.auditTrailSearchTemplateData.appUsers))}setFilteredActions(){this.filteredActionData=this.actionName.valueChanges.pipe(hl(""),Mn(t=>typeof t=="string"?t:""),Mn(t=>t?this.filterActionAutocompleteData(t):this.auditTrailSearchTemplateData.actionNames))}setFilteredEntities(){this.filteredEntityData=this.entityName.valueChanges.pipe(hl(""),Mn(t=>typeof t=="string"?t:""),Mn(t=>t?this.filterEntityAutocompleteData(t):this.auditTrailSearchTemplateData.entityNames))}filterUserAutocompleteData(t){return this.auditTrailSearchTemplateData.appUsers.filter(n=>n.username.toLowerCase().includes(t.toLowerCase()))}filterActionAutocompleteData(t){return this.auditTrailSearchTemplateData.actionNames.filter(n=>n.toLowerCase().includes(t.toLowerCase()))}filterEntityAutocompleteData(t){return this.auditTrailSearchTemplateData.entityNames.filter(n=>n.toLowerCase().includes(t.toLowerCase()))}downloadCSV(){let t=this.settingsService.dateFormat,n=(d,u)=>u===void 0?"":u,i=["ID","Resource ID","Status","Office","Made On","Maker","Checked On","Checker","Entity","Action","Client"],s=["id","resourceId","processingResult","officeName","madeOnDate","maker","checkedOnDate","checker","entityName","actionName","clientName"];this.systemService.getAuditTrails(this.filterAuditTrailsBy,this.sort?.active??"",this.sort?.direction??"",0,-1).subscribe(d=>{if(d!==void 0){let u=d.pageItems.map(_=>s.map(C=>(C==="madeOnDate"||C==="checkedOnDate")&&_[C]!=null&&_[C]!==""?JSON.stringify(this.dateUtils.formatDate(_[C],"yyyy-MM-ddTHH:mm:ssZ")):JSON.stringify(_[C],n)));u.unshift(`data:text/csv;charset=utf-8,${i.join()}`),u=u.join(`\r `);let f=document.createElement("a");f.setAttribute("href",encodeURI(u)),f.setAttribute("download","Audit Trails.csv"),document.body.appendChild(f),f.click(),document.body.removeChild(f)}})}getDate(t){let n=this.settingsService.dateFormat;return this.dateUtils.formatDate(t,n)}getDateTime(t,n){if(!t)return"";let i=new Date(t);if(n){let[s,d,u]=n.split(":").map(Number);i.setHours(s||0),i.setMinutes(d||0),i.setSeconds(u||0)}return this.dateUtils.formatDate(i,"yyyy-MM-ddTHH:mm:ssZ")}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275cmp=me({type:e,selectors:[["mifosx-audit-trails"]],viewQuery:function(n,i){if(n&1&&(Ee(kt,5),Ee(It,5)),n&2){let s;Te(s=Me())&&(i.paginator=s.first),Te(s=Me())&&(i.sort=s.first)}},decls:120,vars:94,consts:[["fromDatePicker",""],["toDatePicker",""],["checkedFromDatePicker",""],["checkedToDatePicker",""],["userNameAutocomplete","matAutocomplete"],["actionNameAutocomplete","matAutocomplete"],["entityNameAutocomplete","matAutocomplete"],["checkerAutocomplete","matAutocomplete"],[1,"container","m-b-20","layout-row","align-end"],["mat-raised-button","","color","primary",3,"click"],["icon","file",1,"m-r-10"],[1,"container","audit-filters-card"],[1,"layout-row-wrap","gap-8px","responsive-column"],[1,"flex-48"],["matInput","",3,"formControl"],[3,"selectionChange","formControl"],[3,"value"],["matInput","",3,"formControl","matAutocomplete"],[1,"flex-48","layout-row-wrap","gap-8px"],[1,"flex-60",3,"click"],["matInput","","placeholder","yyyy-MM-dd",3,"min","max","matDatepicker","formControl"],["matSuffix","",3,"for"],[1,"flex-38"],["matInput","","type","time","step","1","placeholder","HH:MM:SS",1,"time-input",3,"formControl"],["autoActiveFirstOption","",3,"displayWith"],[1,"container","mat-elevation-z8","table-container"],["mat-table","","matSort","",3,"dataSource"],["showFirstLastButtons","",3,"length","pageSize","pageSizeOptions"],["mode","indeterminate"],["matColumnDef","id"],["mat-header-cell","","mat-sort-header","",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","resourceId"],["matColumnDef","processingResult"],["matColumnDef","maker"],["matColumnDef","actionName"],["matColumnDef","entityName"],["matColumnDef","officeName"],["matColumnDef","madeOnDate"],["matColumnDef","checker"],["matColumnDef","checkedOnDate"],["matColumnDef","clientIp"],["mat-header-row","",4,"matHeaderRowDef"],["mat-row","","class","select-row",3,"routerLink",4,"matRowDef","matRowDefColumns"],["mat-header-cell","","mat-sort-header",""],["mat-cell",""],["mat-header-row",""],["mat-row","",1,"select-row",3,"routerLink"]],template:function(n,i){if(n&1){let s=Y();l(0,"div",8)(1,"button",9),R("click",function(){return V(s),q(i.downloadCSV())}),b(2,"fa-icon",10),c(3),p(4,"translate"),r()(),l(5,"mat-card",11)(6,"mat-card-content")(7,"div",12)(8,"mat-form-field",13)(9,"mat-label"),c(10),p(11,"translate"),r(),b(12,"input",14),r(),l(13,"mat-form-field",13)(14,"mat-label"),c(15),p(16,"translate"),r(),l(17,"mat-select",15),R("selectionChange",function(u){return V(s),q(i.applyFilter(u.value,"processingResult"))}),Se(18,kRe,2,2,"mat-option",16,Pe),r()(),l(20,"mat-form-field",13)(21,"mat-label"),c(22),p(23,"translate"),r(),b(24,"input",17),r(),l(25,"mat-form-field",13)(26,"mat-label"),c(27),p(28,"translate"),r(),b(29,"input",17),r(),l(30,"mat-form-field",13)(31,"mat-label"),c(32),p(33,"translate"),r(),b(34,"input",17),r(),l(35,"mat-form-field",13)(36,"mat-label"),c(37),p(38,"translate"),r(),b(39,"input",17),r(),l(40,"div",18)(41,"mat-form-field",19),R("click",function(){V(s);let u=xe(48);return q(u.open())}),l(42,"mat-label"),c(43),p(44,"translate"),r(),b(45,"input",20)(46,"mat-datepicker-toggle",21)(47,"mat-datepicker",null,0),r(),l(49,"mat-form-field",22)(50,"mat-label"),c(51),p(52,"translate"),r(),b(53,"input",23),r()(),l(54,"div",18)(55,"mat-form-field",19),R("click",function(){V(s);let u=xe(62);return q(u.open())}),l(56,"mat-label"),c(57),p(58,"translate"),r(),b(59,"input",20)(60,"mat-datepicker-toggle",21)(61,"mat-datepicker",null,1),r(),l(63,"mat-form-field",22)(64,"mat-label"),c(65),p(66,"translate"),r(),b(67,"input",23),r()(),l(68,"div",18)(69,"mat-form-field",19),R("click",function(){V(s);let u=xe(76);return q(u.open())}),l(70,"mat-label"),c(71),p(72,"translate"),r(),b(73,"input",20)(74,"mat-datepicker-toggle",21)(75,"mat-datepicker",null,2),r(),l(77,"mat-form-field",22)(78,"mat-label"),c(79),p(80,"translate"),r(),b(81,"input",23),r()(),l(82,"div",18)(83,"mat-form-field",19),R("click",function(){V(s);let u=xe(90);return q(u.open())}),l(84,"mat-label"),c(85),p(86,"translate"),r(),b(87,"input",20)(88,"mat-datepicker-toggle",21)(89,"mat-datepicker",null,3),r(),l(91,"mat-form-field",22)(92,"mat-label"),c(93),p(94,"translate"),r(),b(95,"input",23),r()()()()(),l(96,"mat-autocomplete",24,4),Se(98,BRe,2,5,"mat-option",16,Pe),p(100,"async"),r(),l(101,"mat-autocomplete",24,5),Se(103,RRe,2,2,"mat-option",16,Pe),p(105,"async"),r(),l(106,"mat-autocomplete",24,6),Se(108,NRe,2,2,"mat-option",16,Pe),p(110,"async"),r(),l(111,"mat-autocomplete",24,7),Se(113,LRe,2,5,"mat-option",16,Pe),p(115,"async"),r(),l(116,"div",25),E(117,VRe,2,0,"div"),E(118,p9e,36,3,"table",26),E(119,m9e,2,6,"mat-paginator",27),r()}if(n&2){let s=xe(48),d=xe(62),u=xe(76),f=xe(90),_=xe(97),C=xe(102),x=xe(107),y=xe(112);a(3),v(" ",m(4,56,"labels.buttons.Download CSV")," "),a(7),h(m(11,58,"labels.inputs.Resource ID")),a(2),g("formControl",i.resourceId),a(3),h(m(16,60,"labels.inputs.Status")),a(2),g("formControl",i.processingResult),a(),we(i.auditTrailSearchTemplateData.processingResults),a(4),h(m(23,62,"labels.inputs.User")),a(2),g("formControl",i.user)("matAutocomplete",_),a(3),h(m(28,64,"labels.inputs.Action")),a(2),g("formControl",i.actionName)("matAutocomplete",C),a(3),h(m(33,66,"labels.inputs.Entity")),a(2),g("formControl",i.entityName)("matAutocomplete",x),a(3),h(m(38,68,"labels.inputs.Checker")),a(2),g("formControl",i.checker)("matAutocomplete",y),a(4),h(m(44,70,"labels.inputs.Maker From Date")),a(2),g("min",i.minDate)("max",i.maxDate)("matDatepicker",s)("formControl",i.fromDate),a(),g("for",s),a(5),h(m(52,72,"labels.inputs.Time")),a(2),g("formControl",i.fromTime),a(4),h(m(58,74,"labels.inputs.Maker To Date")),a(2),g("min",i.minDate)("max",i.maxDate)("matDatepicker",d)("formControl",i.toDate),a(),g("for",d),a(5),h(m(66,76,"labels.inputs.Time")),a(2),g("formControl",i.toTime),a(4),h(m(72,78,"labels.inputs.Checker From Date")),a(2),g("min",i.minDate)("max",i.maxDate)("matDatepicker",u)("formControl",i.checkedFromDate),a(),g("for",u),a(5),h(m(80,80,"labels.inputs.Time")),a(2),g("formControl",i.checkedFromTime),a(4),h(m(86,82,"labels.inputs.Checked To Date")),a(2),g("min",i.minDate)("max",i.maxDate)("matDatepicker",f)("formControl",i.checkedToDate),a(),g("for",f),a(5),h(m(94,84,"labels.inputs.Time")),a(2),g("formControl",i.checkedToTime),a(),g("displayWith",i.displayUserName),a(2),we(m(100,86,i.filteredUserData)),a(3),g("displayWith",i.displayActionName),a(2),we(m(105,88,i.filteredActionData)),a(3),g("displayWith",i.displayEntityName),a(2),we(m(110,90,i.filteredEntityData)),a(3),g("displayWith",i.displayUserName),a(2),we(m(115,92,i.filteredCheckerData)),a(4),I(i.isLoading?117:-1),a(),I(i.isLoading?-1:118),a(),I(i.isLoading?-1:119)}},dependencies:[ue,fe,st,Ue,_n,Ae,$e,Je,Fe,Be,ai,ze,gt,ft,mi,di,pi,ve,ke,er,Za,os,_t,It,xt,vt,bt,ri,Ct,yt,St,Pt,wt,Tt,kt,Xa,he,Fi,Jr],styles:["table[_ngcontent-%COMP%]{width:100%}table[_ngcontent-%COMP%] .select-row[_ngcontent-%COMP%]:hover{cursor:pointer}.flex-38[_ngcontent-%COMP%] .time-input[_ngcontent-%COMP%]{font-size:14px;width:100%}.gap-8px[_ngcontent-%COMP%]{gap:8px}.audit-filters-card[_ngcontent-%COMP%]{margin-bottom:1.5rem;padding:.75rem 1rem}"]})}}return e})();var d9e=()=>["../"];function u9e(e,o){e&1&&(l(0,"div",5),c(1),p(2,"translate"),r()),e&2&&(a(),v(" ",m(2,1,"labels.inputs.Office")," "))}function f9e(e,o){if(e&1&&(l(0,"div",6),c(1),r()),e&2){let t=w();a(),v(" ",t.auditTrailData.officeName," ")}}function h9e(e,o){e&1&&(l(0,"div",5),c(1),p(2,"translate"),r()),e&2&&(a(),v(" ",m(2,1,"labels.inputs.Savings Account No")," "))}function g9e(e,o){if(e&1&&(l(0,"div",6),c(1),r()),e&2){let t=w();a(),v(" ",t.auditTrailData.savingsAccountNo," ")}}function _9e(e,o){e&1&&(l(0,"div",5),c(1),p(2,"translate"),r()),e&2&&(a(),v(" ",m(2,1,"labels.inputs.Group Level")," "))}function C9e(e,o){if(e&1&&(l(0,"div",6),c(1),r()),e&2){let t=w();a(),v(" ",t.auditTrailData.groupLevelName," ")}}function v9e(e,o){e&1&&(l(0,"div",7),c(1),p(2,"translate"),r()),e&2&&(a(),v(" ",m(2,1,"labels.inputs.Client Ip")," "))}function x9e(e,o){if(e&1&&(l(0,"div",8),c(1),r()),e&2){let t=w();a(),v(" ",t.auditTrailData.ip," ")}}function b9e(e,o){e&1&&(l(0,"th",21),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.Command")))}function y9e(e,o){if(e&1&&(l(0,"td",22),c(1),r()),e&2){let t=o.$implicit;a(),h(t.command)}}function S9e(e,o){e&1&&(l(0,"th",23),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.Command Value")))}function w9e(e,o){if(e&1&&(l(0,"td",24),c(1),r()),e&2){let t=o.$implicit;a(),v(" ",t.commandValue," ")}}function P9e(e,o){e&1&&b(0,"tr",25)}function T9e(e,o){e&1&&b(0,"tr",26)}var Jv=(()=>{class e{constructor(){this.route=T(Ie),this.displayedColumns=["command","commandValue"],this.route.data.subscribe(t=>{this.auditTrailData=t.auditTrail})}ngOnInit(){this.setAuditTrailCommands()}get auditTrailCommandsData(){if(!this.auditTrailData||!this.auditTrailData.commandAsJson)return[];try{let t=JSON.parse(this.auditTrailData.commandAsJson);return t&&typeof t=="object"&&!Array.isArray(t)?Object.entries(t).map(([n,i])=>({command:n,commandValue:i})):[]}catch(t){return console.error("Invalid commandAsJson in audit trail:",t),[]}}setAuditTrailCommands(){this.dataSource=new Wt(this.auditTrailCommandsData),this.dataSource.paginator=this.paginator,this.dataSource.sort=this.sort}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275cmp=me({type:e,selectors:[["mifosx-view-audit"]],viewQuery:function(n,i){if(n&1&&(Ee(kt,5),Ee(It,7)),n&2){let s;Te(s=Me())&&(i.paginator=s.first),Te(s=Me())&&(i.sort=s.first)}},decls:66,vars:52,consts:[[1,"container","layout-row","align-between","responsive-column"],[1,"flex-100"],[1,"layout-row","flex-100"],[1,"flex-46"],[1,"layout-row-wrap"],[1,"flex-50","mat-body-strong"],[1,"flex-50"],["fxFlex","50%",1,"mat-body-strong"],["fxFlex","50%"],[1,"flex-46","command"],["mat-table","","matSort","",1,"command-table",3,"dataSource"],["matColumnDef","command"],["mat-header-cell","","mat-sort-header","",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","commandValue"],["mat-header-cell","",4,"matHeaderCellDef"],["mat-cell","","class","column-value-wrapper",4,"matCellDef"],["mat-header-row","",4,"matHeaderRowDef"],["mat-row","",4,"matRowDef","matRowDefColumns"],[1,"layout-row","layout-align-center","m-t-20","column-on-mobile"],["type","button","mat-raised-button","","color","primary",3,"routerLink"],["mat-header-cell","","mat-sort-header",""],["mat-cell",""],["mat-header-cell",""],["mat-cell","",1,"column-value-wrapper"],["mat-header-row",""],["mat-row",""]],template:function(n,i){n&1&&(l(0,"div",0)(1,"mat-card",1)(2,"mat-card-content",1)(3,"div",2)(4,"div",3)(5,"div",4)(6,"div",5),c(7),p(8,"translate"),r(),l(9,"div",6),c(10),r(),l(11,"div",5),c(12),p(13,"translate"),r(),l(14,"div",6),c(15),r(),l(16,"div",5),c(17),p(18,"translate"),r(),l(19,"div",6),c(20),r(),l(21,"div",5),c(22),p(23,"translate"),r(),l(24,"div",6),c(25),p(26,"translateKey"),r(),l(27,"div",5),c(28),p(29,"translate"),r(),l(30,"div",6),c(31),p(32,"translateKey"),r(),l(33,"div",5),c(34),p(35,"translate"),r(),l(36,"div",6),c(37),r(),l(38,"div",5),c(39),p(40,"translate"),r(),l(41,"div",6),c(42),p(43,"datetimeFormat"),r(),E(44,u9e,3,3,"div",5),E(45,f9e,2,1,"div",6),E(46,h9e,3,3,"div",5),E(47,g9e,2,1,"div",6),E(48,_9e,3,3,"div",5),E(49,C9e,2,1,"div",6),r(),E(50,v9e,3,3,"div",7),E(51,x9e,2,1,"div",8),r(),l(52,"div",9)(53,"table",10),X(54,11),F(55,b9e,3,3,"th",12)(56,y9e,2,1,"td",13),Z(),X(57,14),F(58,S9e,3,3,"th",15)(59,w9e,2,1,"td",16),Z(),F(60,P9e,1,0,"tr",17)(61,T9e,1,0,"tr",18),r()()(),l(62,"div",19)(63,"button",20),c(64),p(65,"translate"),r()()()()()),n&2&&(a(7),v(" ",m(8,27,"labels.inputs.ID")," "),a(3),v(" ",i.auditTrailData.id," "),a(2),v(" ",m(13,29,"labels.inputs.Status")," "),a(3),v(" ",i.auditTrailData.processingResult," "),a(2),v(" ",m(18,31,"labels.inputs.User")," "),a(3),v(" ",i.auditTrailData.maker," "),a(2),v(" ",m(23,33,"labels.inputs.Action")," "),a(3),v(" ",Ot(26,35,i.auditTrailData.actionName,"auditTrail.actions")," "),a(3),v(" ",m(29,38,"labels.inputs.Entity")," "),a(3),v(" ",Ot(32,40,i.auditTrailData.entityName,"auditTrail.entities")," "),a(3),v(" ",m(35,43,"labels.inputs.Resource ID")," "),a(3),v(" ",i.auditTrailData.resourceId," "),a(2),v(" ",m(40,45,"labels.inputs.Date")," "),a(3),v(" ",m(43,47,i.auditTrailData.madeOnDate)," "),a(2),I(i.auditTrailData.officeName?44:-1),a(),I(i.auditTrailData.officeName?45:-1),a(),I(i.auditTrailData.savingsAccountNo?46:-1),a(),I(i.auditTrailData.savingsAccountNo?47:-1),a(),I(i.auditTrailData.groupLevelName?48:-1),a(),I(i.auditTrailData.groupLevelName?49:-1),a(),I(i.auditTrailData.ip?50:-1),a(),I(i.auditTrailData.ip?51:-1),a(2),g("dataSource",i.dataSource),a(7),g("matHeaderRowDef",i.displayedColumns),a(),g("matRowDefColumns",i.displayedColumns),a(2),g("routerLink",oe(51,d9e)),a(),v(" ",m(65,49,"labels.buttons.Back")," "))},dependencies:[ue,fe,Ae,$e,Je,ve,_t,It,xt,vt,bt,ri,Ct,yt,St,Pt,wt,Tt,he,Fi,Jr],styles:[".content[_ngcontent-%COMP%] div[_ngcontent-%COMP%]{margin:1rem 0;word-wrap:break-word}table[_ngcontent-%COMP%]{width:100%}.column-value-wrapper[_ngcontent-%COMP%]{word-break:break-all}.command[_ngcontent-%COMP%]{background-color:#eee}.command-table[_ngcontent-%COMP%]{background-color:inherit}"]})}}return e})();var M9e=["buttonCreateCode"],D9e=["templateButtonCreateCode"],E9e=["tableCodes"],I9e=["templateTableCodes"],O9e=()=>[10,25,50,100],A9e=()=>["create"],F9e=e=>[e];function k9e(e,o){e&1&&(l(0,"button",21),b(1,"fa-icon",22),c(2),p(3,"translate"),r()),e&2&&(g("routerLink",oe(4,A9e)),a(2),v(" ",m(3,2,"labels.buttons.Create Code")," "))}function B9e(e,o){e&1&&(l(0,"th",23),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.Code Name")))}function R9e(e,o){if(e&1&&(l(0,"td",24),c(1),r()),e&2){let t=o.$implicit;a(),h(t.name)}}function N9e(e,o){e&1&&(l(0,"th",23),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.System Defined")))}function L9e(e,o){e&1&&(b(0,"fa-icon",25),p(1,"translate")),e&2&&g("matTooltip",Le(m(1,2,"tooltips.Yes")))}function V9e(e,o){e&1&&(b(0,"fa-icon",26),p(1,"translate")),e&2&&g("matTooltip",Le(m(1,2,"tooltips.No")))}function q9e(e,o){if(e&1&&(l(0,"td",24),E(1,L9e,2,4,"fa-icon",25),E(2,V9e,2,4,"fa-icon",26),r()),e&2){let t=o.$implicit;a(),I(t.systemDefined?1:-1),a(),I(t.systemDefined?-1:2)}}function z9e(e,o){e&1&&b(0,"tr",27)}function H9e(e,o){if(e&1&&b(0,"tr",28),e&2){let t=o.$implicit;g("routerLink",Nt(1,F9e,t.id))}}function G9e(e,o){if(e&1){let t=Y();l(0,"h2"),c(1),p(2,"translate"),r(),l(3,"p",29),c(4),p(5,"translate"),r(),l(6,"div",30)(7,"button",31),R("click",function(){let i=V(t).popover,s=w();return i.close(),q(s.configurationWizardService.closeConfigWizard())}),c(8),p(9,"translate"),r(),l(10,"button",32),R("click",function(){let i=V(t).popover,s=w();return i.close(),q(s.previousStep())}),c(11),p(12,"translate"),r(),l(13,"button",32),R("click",function(){let i=V(t).popover,s=w(),d=xe(6),u=xe(27);return i.close(),q(s.showPopover(u,d,"bottom",!0))}),c(14),p(15,"translate"),r()()}e&2&&(a(),h(m(2,5,"labels.heading.Manage Codes")),a(3),h(m(5,7,"labels.text.To create additional codes.")),a(4),v(" ",m(9,9,"labels.buttons.Close")," "),a(3),v(" ",m(12,11,"labels.buttons.Back")," "),a(3),v(" ",m(15,13,"labels.buttons.Next")," "))}function j9e(e,o){if(e&1){let t=Y();l(0,"h4"),c(1),p(2,"translate"),r(),l(3,"div",30)(4,"button",31),R("click",function(){let i=V(t).popover,s=w();return i.close(),q(s.configurationWizardService.closeConfigWizard())}),c(5),p(6,"translate"),r(),l(7,"button",32),R("click",function(){let i=V(t).popover,s=w(),d=xe(2),u=xe(25);return i.close(),q(s.showPopover(u,d,"bottom",!0))}),c(8),p(9,"translate"),r(),l(10,"button",32),R("click",function(){let i=V(t).popover,s=w(),d=xe(13),u=xe(29);return i.close(),q(s.showPopover(u,d,"top",!0))}),c(11),p(12,"translate"),r()()}e&2&&(a(),h(m(2,4,"labels.heading.Search bar to filter codes")),a(4),v(" ",m(6,6,"labels.buttons.Close")," "),a(3),v(" ",m(9,8,"labels.buttons.Back")," "),a(3),v(" ",m(12,10,"labels.buttons.Next")," "))}function $9e(e,o){if(e&1){let t=Y();l(0,"h4"),c(1),p(2,"translate"),r(),l(3,"div",30)(4,"button",31),R("click",function(){let i=V(t).popover,s=w();return i.close(),q(s.configurationWizardService.closeConfigWizard())}),c(5),p(6,"translate"),r(),l(7,"button",32),R("click",function(){let i=V(t).popover,s=w(),d=xe(6),u=xe(27);return i.close(),q(s.showPopover(u,d,"bottom",!0))}),c(8),p(9,"translate"),r(),l(10,"button",32),R("click",function(){let i=V(t).popover,s=w();return i.close(),q(s.nextStep())}),c(11),p(12,"translate"),r()()}e&2&&(a(),h(m(2,4,"labels.heading.List of all codes in the Mifos system")),a(4),v(" ",m(6,6,"labels.buttons.Close")," "),a(3),v(" ",m(9,8,"labels.buttons.Back")," "),a(3),v(" ",m(12,10,"labels.buttons.Next")," "))}var Kv=(()=>{class e{constructor(){this.route=T(Ie),this.router=T(qe),this.configurationWizardService=T(Qi),this.popoverService=T(Wi),this.displayedColumns=["name","systemDefined"],this.route.data.subscribe(t=>{this.codesData=t.codes})}ngOnInit(){this.setCodes()}setCodes(){this.dataSource=new Wt(this.codesData),this.dataSource.paginator=this.paginator,this.dataSource.sort=this.sort}applyFilter(t){this.dataSource.filter=t.trim().toLowerCase()}showPopover(t,n,i,s){setTimeout(()=>this.popoverService.open(t,n,i,s,{}),200)}ngAfterViewInit(){this.configurationWizardService.showSystemCodesPage===!0&&setTimeout(()=>{this.showPopover(this.templateButtonCreateCode,this.buttonCreateCode.nativeElement,"bottom",!0)}),this.configurationWizardService.showSystemCodesList===!0&&setTimeout(()=>{this.showPopover(this.templateTableCodes,this.tableCodes.nativeElement,"top",!0)})}nextStep(){this.configurationWizardService.showSystemCodesPage=!1,this.configurationWizardService.showSystemCodesList=!1,this.configurationWizardService.showSystemCodesForm=!0,this.router.navigate(["/system/codes/create"])}previousStep(){this.configurationWizardService.showSystemCodesPage=!1,this.configurationWizardService.showSystemCodesList=!1,this.configurationWizardService.showSystemCodes=!0,this.router.navigate(["/system"])}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275cmp=me({type:e,selectors:[["mifosx-codes"]],viewQuery:function(n,i){if(n&1&&(Ee(kt,7),Ee(It,7),Ee(M9e,5),Ee(D9e,5),Ee(E9e,5),Ee(I9e,5)),n&2){let s;Te(s=Me())&&(i.paginator=s.first),Te(s=Me())&&(i.sort=s.first),Te(s=Me())&&(i.buttonCreateCode=s.first),Te(s=Me())&&(i.templateButtonCreateCode=s.first),Te(s=Me())&&(i.tableCodes=s.first),Te(s=Me())&&(i.templateTableCodes=s.first)}},decls:30,vars:9,consts:[["buttonCreateCode",""],["filter",""],["tableCodes",""],["templateButtonCreateCode",""],["templateFilter",""],["templateTableCodes",""],[1,"container","m-b-20","layout-row","align-end","gap-20px"],["mat-raised-button","","color","primary",3,"routerLink",4,"mifosxHasPermission"],[1,"container"],[1,"layout-row"],[1,"flex-fill"],["matInput","",3,"keyup"],[1,"mat-elevation-z8"],["mat-table","","matSort","",3,"dataSource"],["matColumnDef","name"],["mat-header-cell","","mat-sort-header","",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","systemDefined"],["mat-header-row","",4,"matHeaderRowDef"],["mat-row","","class","select-row",3,"routerLink",4,"matRowDef","matRowDefColumns"],["showFirstLastButtons","",3,"pageSizeOptions"],["mat-raised-button","","color","primary",3,"routerLink"],["icon","plus",1,"m-r-10"],["mat-header-cell","","mat-sort-header",""],["mat-cell",""],["icon","check-circle","size","lg","matTooltipPosition","right",1,"system-defined",3,"matTooltip"],["icon","times-circle","size","lg","matTooltipPosition","right",1,"not-system-defined",3,"matTooltip"],["mat-header-row",""],["mat-row","",1,"select-row",3,"routerLink"],[1,"mw300"],[1,"layout-row","align-end","gap-2px","responsive-column"],["mat-raised-button","","color","warn",3,"click"],["mat-raised-button","","color","primary",3,"click"]],template:function(n,i){if(n&1){let s=Y();l(0,"div",6)(1,"div",null,0),F(3,k9e,4,5,"button",7),r()(),l(4,"div",8)(5,"div",9,1)(7,"mat-form-field",10)(8,"mat-label"),c(9),p(10,"translate"),r(),l(11,"input",11),R("keyup",function(u){return V(s),q(i.applyFilter(u.target.value))}),r()()(),l(12,"div",12,2)(14,"table",13),X(15,14),F(16,B9e,3,3,"th",15)(17,R9e,2,1,"td",16),Z(),X(18,17),F(19,N9e,3,3,"th",15)(20,q9e,3,2,"td",16),Z(),F(21,z9e,1,0,"tr",18)(22,H9e,1,3,"tr",19),r(),b(23,"mat-paginator",20),r()(),F(24,G9e,16,15,"ng-template",null,3,ti)(26,j9e,13,12,"ng-template",null,4,ti)(28,$9e,13,12,"ng-template",null,5,ti)}n&2&&(a(3),g("mifosxHasPermission","CREATE_CODE"),a(6),h(m(10,6,"labels.inputs.Filter")),a(5),g("dataSource",i.dataSource),a(7),g("matHeaderRowDef",i.displayedColumns),a(),g("matRowDefColumns",i.displayedColumns),a(),g("pageSizeOptions",oe(8,O9e)))},dependencies:[ue,fe,Ae,Fe,Be,ze,ve,Ke,ke,_t,It,xt,vt,bt,ri,Ct,yt,si,St,Pt,wt,Tt,kt,he],styles:["table[_ngcontent-%COMP%]{width:100%}table[_ngcontent-%COMP%] .select-row[_ngcontent-%COMP%]:hover{cursor:pointer}.system-defined[_ngcontent-%COMP%]{color:#32cd32}.not-system-defined[_ngcontent-%COMP%]{color:#f44366}"]})}}return e})();var U9e=["codeFormRef"],W9e=["templateCodeFormRef"],Q9e=()=>["../"];function Y9e(e,o){e&1&&(l(0,"mat-error"),c(1),p(2,"translate"),p(3,"translate"),l(4,"strong"),c(5),p(6,"translate"),r()()),e&2&&(a(),le(" ",m(2,3,"labels.inputs.Code Name")," ",m(3,5,"labels.commons.is")," "),a(4),h(m(6,7,"labels.commons.required")))}function J9e(e,o){if(e&1&&(l(0,"button",9),c(1),p(2,"translate"),r()),e&2){let t=w();g("disabled",!t.codeForm.valid),a(),v(" ",m(2,2,"labels.buttons.Submit")," ")}}function K9e(e,o){if(e&1){let t=Y();l(0,"h2"),c(1),p(2,"translate"),r(),l(3,"p",10),c(4),p(5,"translate"),b(6,"br"),c(7),p(8,"translate"),l(9,"a",11),c(10),p(11,"translate"),r()(),l(12,"div",12)(13,"button",13),R("click",function(){let i=V(t).popover,s=w();return i.close(),q(s.configurationWizardService.closeConfigWizard())}),c(14),p(15,"translate"),r(),l(16,"button",14),R("click",function(){let i=V(t).popover;return q(i.close())}),c(17),p(18,"translate"),r(),l(19,"button",14),R("click",function(){let i=V(t).popover,s=w();return i.close(),q(s.previousStep())}),c(20),p(21,"translate"),r(),l(22,"button",14),R("click",function(){let i=V(t).popover,s=w();return i.close(),q(s.nextStep())}),c(23),p(24,"translate"),r()()}e&2&&(a(),h(m(2,8,"labels.heading.Create Code")),a(3),v(" ",m(5,10,"labels.text.To create code,create")),a(3),v(" ",m(8,12,"labels.text.For more details click"),": "),a(3),h(m(11,14,"labels.inputs.Manage Codes")),a(4),v(" ",m(15,16,"labels.buttons.Close")," "),a(3),v(" ",m(18,18,"labels.buttons.Create Code")," "),a(3),v(" ",m(21,20,"labels.buttons.Back")," "),a(3),v(" ",m(24,22,"labels.buttons.Next")," "))}var Xv=(()=>{class e{constructor(){this.formBuilder=T(nt),this.systemService=T(ii),this.route=T(Ie),this.router=T(qe),this.configurationWizardService=T(Qi),this.popoverService=T(Wi)}ngOnInit(){this.createCodeForm()}createCodeForm(){this.codeForm=this.formBuilder.group({name:["",se.required]})}submit(){this.systemService.createCode(this.codeForm.value).subscribe(t=>{this.configurationWizardService.showSystemCodesForm===!0?(this.configurationWizardService.showSystemCodesForm=!1,this.configurationWizardService.showRolesandPermission=!0,this.router.navigate(["/system"])):this.router.navigate(["../",t.resourceId],{relativeTo:this.route})})}showPopover(t,n,i,s){setTimeout(()=>this.popoverService.open(t,n,i,s,{}),200)}ngAfterViewInit(){this.configurationWizardService.showSystemCodesForm===!0&&setTimeout(()=>{this.showPopover(this.templateCodeFormRef,this.codeFormRef.nativeElement,"right",!0)})}nextStep(){this.configurationWizardService.showSystemCodesForm=!1,this.configurationWizardService.showRolesandPermission=!0,this.router.navigate(["/system"])}previousStep(){this.configurationWizardService.showSystemCodesForm=!1,this.configurationWizardService.showSystemCodesList=!0,this.router.navigate(["/system/codes"])}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275cmp=me({type:e,selectors:[["mifosx-create-code"]],viewQuery:function(n,i){if(n&1&&(Ee(U9e,5),Ee(W9e,5)),n&2){let s;Te(s=Me())&&(i.codeFormRef=s.first),Te(s=Me())&&(i.templateCodeFormRef=s.first)}},decls:19,vars:11,consts:[["codeFormRef",""],["templateCodeFormRef",""],[1,"container"],[3,"ngSubmit","formGroup"],[1,"layout-column"],["matInput","","required","","formControlName","name"],[1,"layout-row","align-center","gap-5px","responsive-column"],["type","button","mat-raised-button","",3,"routerLink"],["mat-raised-button","","color","primary",3,"disabled",4,"mifosxHasPermission"],["mat-raised-button","","color","primary",3,"disabled"],[1,"mw400"],["href","https://mifosforge.jira.com/wiki/spaces/docs/pages/67895350/Manage+Codes","target","_blank"],[1,"layout-row","align-end","gap-2px","responsive-column"],["mat-raised-button","","color","warn",3,"click"],["mat-raised-button","","color","primary",3,"click"]],template:function(n,i){if(n&1){let s=Y();l(0,"div",2)(1,"mat-card")(2,"form",3),R("ngSubmit",function(){return V(s),q(i.submit())}),l(3,"mat-card-content")(4,"div",4,0)(6,"mat-form-field")(7,"mat-label"),c(8),p(9,"translate"),r(),b(10,"input",5),E(11,Y9e,7,9,"mat-error"),r()()(),l(12,"mat-card-actions",6)(13,"button",7),c(14),p(15,"translate"),r(),F(16,J9e,3,4,"button",8),r()()()(),F(17,K9e,25,24,"ng-template",null,1,ti)}n&2&&(a(2),g("formGroup",i.codeForm),a(6),h(m(9,6,"labels.inputs.Code Name")),a(3),I(i.codeForm.controls.name.hasError("required")?11:-1),a(2),g("routerLink",oe(10,Q9e)),a(),v(" ",m(15,8,"labels.buttons.Cancel")," "),a(2),g("mifosxHasPermission","CREATE_CODE"))},dependencies:[ue,fe,tt,st,Ue,Xe,dt,Ze,et,Ae,$e,Je,Et,Fe,Be,ut,ze,ve,Ke,he],styles:[".container[_ngcontent-%COMP%]{max-width:37rem}"]})}}return e})();var X9e=()=>["../"];function Z9e(e,o){e&1&&(l(0,"mat-error"),c(1),p(2,"translate"),p(3,"translate"),l(4,"strong"),c(5),p(6,"translate"),r()()),e&2&&(a(),le(" ",m(2,3,"labels.inputs.Code Name")," ",m(3,5,"labels.commons.is")," "),a(4),h(m(6,7,"labels.commons.required")))}function eNe(e,o){if(e&1&&(l(0,"button",7),c(1),p(2,"translate"),r()),e&2){let t=w();g("disabled",!t.codeForm.valid||t.codeForm.pristine),a(),v(" ",m(2,2,"labels.buttons.Submit")," ")}}var Zv=(()=>{class e{constructor(){this.formBuilder=T(nt),this.systemService=T(ii),this.route=T(Ie),this.router=T(qe),this.route.data.subscribe(t=>{this.codeData=t.code})}ngOnInit(){this.createCodeForm()}createCodeForm(){this.codeForm=this.formBuilder.group({name:[this.codeData.name,se.required]})}submit(){this.systemService.updateCode(this.codeForm.value,this.codeData.id).subscribe(t=>{this.router.navigate(["../../",t.resourceId],{relativeTo:this.route})})}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275cmp=me({type:e,selectors:[["mifosx-edit-code"]],decls:16,vars:11,consts:[[1,"container"],[3,"ngSubmit","formGroup"],[1,"layout-column"],["matInput","","required","","formControlName","name"],[1,"layout-row","align-center","gap-5px","responsive-column"],["type","button","mat-raised-button","",3,"routerLink"],["mat-raised-button","","color","primary",3,"disabled",4,"mifosxHasPermission"],["mat-raised-button","","color","primary",3,"disabled"]],template:function(n,i){n&1&&(l(0,"div",0)(1,"mat-card")(2,"form",1),R("ngSubmit",function(){return i.submit()}),l(3,"mat-card-content")(4,"div",2)(5,"mat-form-field")(6,"mat-label"),c(7),p(8,"translate"),r(),b(9,"input",3),E(10,Z9e,7,9,"mat-error"),r()()(),l(11,"mat-card-actions",4)(12,"button",5),c(13),p(14,"translate"),r(),F(15,eNe,3,4,"button",6),r()()()()),n&2&&(a(2),g("formGroup",i.codeForm),a(5),h(m(8,6,"labels.inputs.Code Name")),a(3),I(i.codeForm.controls.name.hasError("required")?10:-1),a(2),g("routerLink",oe(10,X9e)),a(),v(" ",m(14,8,"labels.buttons.Cancel")," "),a(2),g("mifosxHasPermission","UPDATE_CODE"))},dependencies:[ue,fe,tt,st,Ue,Xe,dt,Ze,et,Ae,$e,Je,Et,Fe,Be,ut,ze,ve,Ke,he],styles:[".container[_ngcontent-%COMP%]{max-width:37rem}"]})}}return e})();var tNe=()=>["edit"];function iNe(e,o){if(e&1){let t=Y();l(0,"button",6),R("click",function(){V(t);let i=w();return q(i.addCodeValueRow())}),b(1,"fa-icon",7),c(2),p(3,"translate"),r()}e&2&&(a(2),v(" ",m(3,1,"labels.buttons.Add Code Value")," "))}function nNe(e,o){e&1&&(l(0,"button",9),b(1,"fa-icon",10),c(2),p(3,"translate"),r()),e&2&&(g("routerLink",oe(4,tNe)),a(2),v(" ",m(3,2,"labels.buttons.Edit Code")," "))}function oNe(e,o){e&1&&(l(0,"span"),F(1,nNe,4,5,"button",8),r()),e&2&&(a(),g("mifosxHasPermission","UPDATE_CODE"))}function aNe(e,o){if(e&1){let t=Y();l(0,"button",12),R("click",function(){V(t);let i=w(2);return q(i.delete())}),b(1,"fa-icon",13),c(2),p(3,"translate"),r()}e&2&&(a(2),v(" ",m(3,1,"labels.buttons.Delete Code")," "))}function rNe(e,o){e&1&&(l(0,"span"),F(1,aNe,4,3,"button",11),r()),e&2&&(a(),g("mifosxHasPermission","DELETE_CODEVALUE"))}function lNe(e,o){e&1&&(l(0,"mat-error"),c(1),p(2,"translate"),p(3,"translate"),l(4,"strong"),c(5),p(6,"translate"),r()()),e&2&&(a(),le(" ",m(2,3,"labels.inputs.name")," ",m(3,5,"labels.commons.is")," "),a(4),h(m(6,7,"labels.commons.required")))}function sNe(e,o){e&1&&(l(0,"mat-error"),c(1),p(2,"translate"),p(3,"translate"),l(4,"strong"),c(5),p(6,"translate"),r()()),e&2&&(a(),le(" ",m(2,3,"labels.inputs.name")," ",m(3,5,"labels.commons.is")," "),a(4),h(m(6,7,"labels.commons.required")))}function cNe(e,o){if(e&1){let t=Y();l(0,"button",29),R("click",function(){V(t);let i=w(2).$index,s=w();return q(s.updateCodeValue(i))}),c(1),p(2,"translate"),r()}if(e&2){let t=w(2).$index,n=w();g("disabled",!n.codeValues.at(t).valid||n.codeValues.at(t).pristine),a(),v(" ",m(2,2,"labels.buttons.Submit")," ")}}function pNe(e,o){e&1&&(l(0,"span"),F(1,cNe,3,4,"button",28),r()),e&2&&(a(),g("mifosxHasPermission","UPDATE_CODEVALUE"))}function mNe(e,o){if(e&1){let t=Y();l(0,"button",30),R("click",function(){V(t);let i=w().$index,s=w();return q(s.disableRow(i))}),c(1),p(2,"translate"),r()}e&2&&(a(),v(" ",m(2,1,"labels.buttons.Cancel")," "))}function dNe(e,o){if(e&1){let t=Y();l(0,"button",31),p(1,"translate"),p(2,"translate"),R("click",function(){V(t);let i=w().$index,s=w();return q(s.addCodeValue(i))}),b(3,"fa-icon",32),r()}if(e&2){let t=w().$index,n=w();g("title",Le(m(1,5,"tooltips.Add")))("matTooltip",Le(m(2,7,"tooltips.Add")))("disabled",!n.codeValuesForm.get("codeValues").at(t).valid)}}function uNe(e,o){if(e&1){let t=Y();l(0,"button",33),p(1,"translate"),p(2,"translate"),R("click",function(){V(t);let i=w().$index,s=w();return q(s.enableRow(i))}),b(3,"fa-icon",34),r()}e&2&&g("title",Le(m(1,4,"tooltips.Edit")))("matTooltip",Le(m(2,6,"tooltips.Edit")))}function fNe(e,o){if(e&1){let t=Y();l(0,"button",35),p(1,"translate"),p(2,"translate"),R("click",function(){V(t);let i=w().$index,s=w();return q(s.codeValueRowStatus[i]==="new"?s.removeNewCodeValue(i):s.deleteCodeValue(i))}),b(3,"fa-icon",36),r()}e&2&&g("title",Le(m(1,4,"tooltips.Delete")))("matTooltip",Le(m(2,6,"tooltips.Delete")))}function hNe(e,o){if(e&1&&(l(0,"div",5)(1,"div",14)(2,"mat-form-field",15)(3,"mat-label"),c(4),p(5,"translate"),r(),b(6,"input",16),p(7,"translate"),E(8,lNe,7,9,"mat-error"),r(),l(9,"mat-form-field",17)(10,"mat-label"),c(11),p(12,"translate"),r(),b(13,"input",18),p(14,"translate"),r(),l(15,"mat-form-field",19)(16,"mat-label"),c(17),p(18,"translate"),r(),b(19,"input",20),p(20,"translate"),E(21,sNe,7,9,"mat-error"),r(),l(22,"div",21)(23,"mat-checkbox",22),c(24),p(25,"translate"),r()(),l(26,"div",23),E(27,pNe,2,1,"span"),E(28,mNe,3,3,"button",24),E(29,dNe,4,9,"button",25),E(30,uNe,4,8,"button",26),F(31,fNe,4,8,"button",27),r()()()),e&2){let t=o.$index,n=w();a(),g("formGroupName",t),a(3),h(m(5,18,"labels.inputs.name")),a(2),g("placeholder",Le(m(7,20,"labels.inputs.name"))),a(2),I(n.codeValues.at(t).controls.name.hasError("required")?8:-1),a(3),h(m(12,22,"labels.inputs.Description")),a(2),g("placeholder",Le(m(14,24,"labels.inputs.Description"))),a(4),h(m(18,26,"labels.inputs.Position")),a(2),g("placeholder",Le(m(20,28,"labels.inputs.Position"))),a(2),I(n.codeValues.at(t).controls.position.hasError("required")?21:-1),a(3),h(m(25,30,"labels.inputs.Active")),a(3),I(n.codeValueRowStatus[t]==="edit"?27:-1),a(),I(n.codeValueRowStatus[t]==="edit"?28:-1),a(),I(n.codeValueRowStatus[t]==="new"?29:-1),a(),I(n.codeValueRowStatus[t]==="disabled"?30:-1),a(),g("mifosxHasPermission","DELETE_CODEVALUE")}}var ex=(()=>{class e{constructor(){this.route=T(Ie),this.systemService=T(ii),this.router=T(qe),this.formBuilder=T(nt),this.dialog=T(Ht),this.translateService=T(yi),this.codeValueRowStatus=[],this.route.data.subscribe(t=>{this.codeData=t.code,this.codeValuesData=t.codeValues})}ngOnInit(){this.createCodeValuesForm(),this.initCodeValuesForm()}initCodeValuesForm(){this.codeValuesData.forEach(t=>{this.codeValues.push(this.createCodeValuesRow(t)),this.codeValueRowStatus.push("disabled")})}get codeValues(){return this.codeValuesForm.get("codeValues")}createCodeValuesForm(){this.codeValuesForm=this.formBuilder.group({codeValues:this.formBuilder.array([])})}addCodeValueRow(){this.codeValues.push(this.createCodeValuesRow()),this.codeValues.at(this.codeValues.length-1).enable(),this.codeValueRowStatus.push("new")}createCodeValuesRow(t){return this.formBuilder.group({name:[{value:t?t.name:"",disabled:!0},se.required],description:[{value:t?t.description:"",disabled:!0}],position:[{value:t?t.position:0,disabled:!0},se.required],isActive:[{value:t?t.active:!1,disabled:!0}]})}deleteCodeValue(t){let n=this.codeValuesData[t].id;this.systemService.deleteCodeValue(this.codeData.id,n).subscribe(i=>{this.codeValuesData.splice(t,1),this.codeValues.removeAt(t),this.codeValueRowStatus.splice(t,1)})}removeNewCodeValue(t){this.codeValues.removeAt(t),this.codeValueRowStatus.splice(t,1)}updateCodeValue(t){let n=this.codeValues.at(t).value;this.systemService.updateCodeValue(this.codeData.id,this.codeValuesData[t].id,n).subscribe(i=>{this.codeValues.at(t).disable(),this.codeValueRowStatus[t]="disabled",this.codeValues.at(t).markAsPristine()})}delete(){this.dialog.open(vi,{data:{deleteContext:this.translateService.instant("labels.inputs.Code")+" "+this.codeData.name}}).afterClosed().subscribe(n=>{n.delete&&this.systemService.deleteCode(this.codeData.id).subscribe(()=>{this.router.navigate(["/system/codes"])})})}disableRow(t){this.codeValues.at(t).get("name").setValue(this.codeValuesData[t].name),this.codeValues.at(t).get("description").setValue(this.codeValuesData[t].description),this.codeValues.at(t).get("position").setValue(this.codeValuesData[t].position),this.codeValues.at(t).get("isActive").setValue(this.codeValuesData[t].isActive),this.codeValues.at(t).disable(),this.codeValueRowStatus[t]="disabled",this.codeValues.at(t).markAsPristine()}addCodeValue(t){let n=this.codeValues.at(t).value;this.systemService.createCodeValue(this.codeData.id,n).subscribe(i=>{this.codeValues.at(t).disable(),this.codeValueRowStatus[t]="disabled",this.codeValuesData.push({id:i.subResourceId,name:this.codeValues.at(t).get("name").value,description:this.codeValues.at(t).get("description").value,position:this.codeValues.at(t).get("position").value,isActive:this.codeValues.at(t).get("isActive").value}),this.codeValues.at(t).markAsPristine()})}enableRow(t){this.codeValues.at(t).enable(),this.codeValueRowStatus[t]="edit"}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275cmp=me({type:e,selectors:[["mifosx-view-code"]],decls:13,vars:5,consts:[[1,"container","m-b-20","layout-row","align-end","layout-xs-column","gap-20px"],["mat-raised-button","","color","primary",3,"click",4,"mifosxHasPermission"],[1,"container"],[1,"m-t-20","m-l-20"],[3,"formGroup"],["formArrayName","codeValues"],["mat-raised-button","","color","primary",3,"click"],["icon","plus",1,"m-r-10"],["mat-raised-button","","color","primary",3,"routerLink",4,"mifosxHasPermission"],["mat-raised-button","","color","primary",3,"routerLink"],["icon","edit",1,"m-r-10"],["mat-raised-button","","color","warn",3,"click",4,"mifosxHasPermission"],["mat-raised-button","","color","warn",3,"click"],["icon","trash",1,"m-r-10"],[1,"flex-fill","layout-row-wrap","gap-2percent","responsive-column",3,"formGroupName"],[1,"flex-fill","flex-20"],["required","","matInput","","formControlName","name",3,"placeholder"],[1,"flex-fill","flex-22"],["matInput","","formControlName","description",3,"placeholder"],[1,"flex-fill","flex-18"],["required","","matInput","","formControlName","position","type","number",3,"placeholder"],[1,"active-wrapper","flex-8"],["formControlName","isActive",1,"active"],[1,"options-wrapper","gap-2percent","flex-22"],["mat-button","","type","button"],["mat-icon-button","","color","primary","type","button","matTooltipPosition","above",3,"title","disabled","matTooltip"],["type","button","color","primary","mat-icon-button","","matTooltipPosition","above",3,"title","matTooltip"],["type","button","color","warn","mat-icon-button","","matTooltipPosition","above",3,"title","matTooltip","click",4,"mifosxHasPermission"],["mat-stroked-button","","color","primary","type","button",3,"disabled","click",4,"mifosxHasPermission"],["mat-stroked-button","","color","primary","type","button",3,"click","disabled"],["mat-button","","type","button",3,"click"],["mat-icon-button","","color","primary","type","button","matTooltipPosition","above",3,"click","title","disabled","matTooltip"],["icon","plus","size","lg"],["type","button","color","primary","mat-icon-button","","matTooltipPosition","above",3,"click","title","matTooltip"],["icon","edit","size","lg"],["type","button","color","warn","mat-icon-button","","matTooltipPosition","above",3,"click","title","matTooltip"],["icon","trash","size","lg"]],template:function(n,i){n&1&&(l(0,"div",0),F(1,iNe,4,3,"button",1),E(2,oNe,2,1,"span"),E(3,rNe,2,1,"span"),r(),l(4,"div",2)(5,"mat-card")(6,"mat-card-title",3)(7,"h4"),c(8),r()(),l(9,"form",4)(10,"mat-card-content"),Se(11,hNe,32,32,"div",5,Pe),r()()()()),n&2&&(a(),g("mifosxHasPermission","CREATE_CODEVALUE"),a(),I(i.codeData.systemDefined?-1:2),a(),I(i.codeData.systemDefined?-1:3),a(5),h(i.codeData.name),a(),g("formGroup",i.codeValuesForm),a(2),we(i.codeValues.controls))},dependencies:[ue,fe,tt,st,tn,Ue,Xe,dt,Ze,et,la,Va,Ae,$e,Je,Fe,Be,ut,ze,ve,fi,Ke,ke,Qo,wi,si,he],styles:["@media (width >= 992px){.active-wrapper[_ngcontent-%COMP%]{position:relative}.active-wrapper[_ngcontent-%COMP%] .active[_ngcontent-%COMP%]{padding:0 0 17.5px;position:absolute;bottom:0;right:0}}.options-wrapper[_ngcontent-%COMP%]{padding:18px 0 0}"]})}}return e})();var gNe=()=>[10,25,50,100];function _Ne(e,o){e&1&&(l(0,"th",8),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.Mapping Between Entities")))}function CNe(e,o){e&1&&(l(0,"span"),c(1),p(2,"translate"),r()),e&2&&(a(),v(" ",m(2,1,"labels.inputs.Offices Loan Products")," "))}function vNe(e,o){e&1&&(l(0,"span"),c(1),p(2,"translate"),r()),e&2&&(a(),v(" ",m(2,1,"labels.inputs.Offices Savings Products")," "))}function xNe(e,o){e&1&&(l(0,"span"),c(1),p(2,"translate"),r()),e&2&&(a(),v(" ",m(2,1,"labels.inputs.Offices Charges/Fees")," "))}function bNe(e,o){e&1&&(l(0,"span"),c(1),p(2,"translate"),r()),e&2&&(a(),v(" ",m(2,1,"labels.inputs.Roles Loan Products")," "))}function yNe(e,o){e&1&&(l(0,"span"),c(1),p(2,"translate"),r()),e&2&&(a(),v(" ",m(2,1,"labels.inputs.Roles Savings Products")," "))}function SNe(e,o){if(e&1){let t=Y();l(0,"td",9),R("click",function(){let i=V(t).$implicit,s=w();return q(s.showFilters(i.id))}),E(1,CNe,3,3,"span"),E(2,vNe,3,3,"span"),E(3,xNe,3,3,"span"),E(4,bNe,3,3,"span"),E(5,yNe,3,3,"span"),r()}if(e&2){let t=o.$implicit;a(),I(t.mappingTypes==="office_access_to_loan_products"?1:-1),a(),I(t.mappingTypes==="office_access_to_savings_products"?2:-1),a(),I(t.mappingTypes==="office_access_to_fees/charges"?3:-1),a(),I(t.mappingTypes==="role_access_to_loan_products"?4:-1),a(),I(t.mappingTypes==="role_access_to_savings_products"?5:-1)}}function wNe(e,o){e&1&&b(0,"tr",10)}function PNe(e,o){e&1&&b(0,"tr",11)}function TNe(e,o){if(e&1&&(l(0,"mat-option",15),c(1),r()),e&2){let t=o.$implicit;g("value",t.id),a(),v(" ",t.name," ")}}function MNe(e,o){if(e&1&&(l(0,"mat-error"),c(1),p(2,"translateKey"),p(3,"translate"),l(4,"strong"),c(5),p(6,"translate"),r()()),e&2){let t=w(2);a(),le(" ",Ot(2,3,t.firstMappingEntity,"inputs")," ",m(3,6,"labels.commons.is")," "),a(4),h(m(6,8,"labels.commons.required"))}}function DNe(e,o){if(e&1&&(l(0,"mat-option",15),c(1),r()),e&2){let t=o.$implicit;g("value",t.id),a(),v(" ",t.name," ")}}function ENe(e,o){if(e&1&&(l(0,"mat-error"),c(1),p(2,"translateKey"),p(3,"translate"),l(4,"strong"),c(5),p(6,"translate"),r()()),e&2){let t=w(2);a(),le(" ",Ot(2,3,t.secondMappingEntity,"text")," ",m(3,6,"labels.commons.is")," "),a(4),h(m(6,8,"labels.commons.required"))}}function INe(e,o){if(e&1){let t=Y();l(0,"button",20),R("click",function(){V(t);let i=w(2);return q(i.showAddScreen(i.selectedMappingType))}),c(1),p(2,"translate"),r()}e&2&&(a(),v(" ",m(2,1,"labels.buttons.Add")," "))}function ONe(e,o){if(e&1&&(l(0,"th",8),c(1),p(2,"translateKey"),r()),e&2){let t=w(3);a(),h(Ot(2,1,t.firstMappingEntity,"inputs"))}}function ANe(e,o){if(e&1&&(l(0,"td",29),c(1),r()),e&2){let t=o.$implicit;a(),h(t.fromEntity)}}function FNe(e,o){if(e&1&&(l(0,"th",8),c(1),p(2,"translateKey"),r()),e&2){let t=w(3);a(),h(Ot(2,1,t.secondMappingEntity,"text"))}}function kNe(e,o){if(e&1&&(l(0,"td",29),c(1),r()),e&2){let t=o.$implicit;a(),h(t.toEntity)}}function BNe(e,o){e&1&&(l(0,"th",8),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.Start Date")))}function RNe(e,o){if(e&1&&(l(0,"td",29),c(1),p(2,"dateFormat"),r()),e&2){let t=o.$implicit;a(),h(m(2,1,t.startDate))}}function NNe(e,o){e&1&&(l(0,"th",8),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.End Date")))}function LNe(e,o){if(e&1&&(l(0,"td",29),c(1),p(2,"dateFormat"),r()),e&2){let t=o.$implicit;a(),h(m(2,1,t.endDate))}}function VNe(e,o){e&1&&b(0,"th",8)}function qNe(e,o){if(e&1){let t=Y();l(0,"button",31),p(1,"translate"),R("click",function(){V(t);let i=w().$implicit,s=w(3);return q(s.showEditScreen(i.mapId,s.selectedMappingType))}),b(2,"fa-icon",32),r()}e&2&&g("matTooltip",Le(m(1,2,"tooltips.Edit")))}function zNe(e,o){e&1&&(l(0,"td",29),F(1,qNe,3,4,"button",30),r()),e&2&&(a(),g("mifosxHasPermission","UPDATE_ENTITYMAPPING"))}function HNe(e,o){e&1&&b(0,"th",8)}function GNe(e,o){if(e&1){let t=Y();l(0,"button",34),p(1,"translate"),R("click",function(){V(t);let i=w().$implicit,s=w(3);return q(s.delete(i.mapId))}),b(2,"fa-icon",35),r()}e&2&&g("matTooltip",Le(m(1,2,"tooltips.Delete")))}function jNe(e,o){e&1&&(l(0,"td",29),F(1,GNe,3,4,"button",33),r()),e&2&&(a(),g("mifosxHasPermission","DELETE_ENTITYMAPPING"))}function $Ne(e,o){e&1&&b(0,"tr",10)}function UNe(e,o){e&1&&b(0,"tr",11)}function WNe(e,o){if(e&1&&(l(0,"div")(1,"table",2),X(2,21),F(3,ONe,3,4,"th",4)(4,ANe,2,1,"td",22),Z(),X(5,23),F(6,FNe,3,4,"th",4)(7,kNe,2,1,"td",22),Z(),X(8,24),F(9,BNe,3,3,"th",4)(10,RNe,3,3,"td",22),Z(),X(11,25),F(12,NNe,3,3,"th",4)(13,LNe,3,3,"td",22),Z(),X(14,26),F(15,VNe,1,0,"th",4)(16,zNe,2,1,"td",22),Z(),X(17,27),F(18,HNe,1,0,"th",4)(19,jNe,2,1,"td",22),Z(),F(20,$Ne,1,0,"tr",6)(21,UNe,1,0,"tr",7),r(),b(22,"mat-paginator",28),r()),e&2){let t=w(2);a(),g("dataSource",t.entityMappingsListData),a(19),g("matHeaderRowDef",t.entityMappingListColumns),a(),g("matRowDefColumns",t.entityMappingListColumns),a(),g("pageSizeOptions",oe(4,gNe))}}function QNe(e,o){if(e&1){let t=Y();l(0,"mat-card")(1,"form",12),R("ngSubmit",function(){V(t);let i=w();return q(i.showFilteredData())}),l(2,"mat-card-title"),c(3),p(4,"translateKey"),p(5,"translate"),p(6,"translateKey"),r(),l(7,"mat-card-content")(8,"div",13)(9,"mat-form-field")(10,"mat-label"),c(11),p(12,"translateKey"),r(),l(13,"mat-select",14)(14,"mat-option",15),c(15),p(16,"translate"),r(),Se(17,TNe,2,2,"mat-option",15,Pe),r(),E(19,MNe,7,10,"mat-error"),r(),l(20,"mat-form-field")(21,"mat-label"),c(22),p(23,"translateKey"),r(),l(24,"mat-select",16)(25,"mat-option",15),c(26),p(27,"translate"),r(),Se(28,DNe,2,2,"mat-option",15,Pe),r(),E(30,ENe,7,10,"mat-error"),r(),l(31,"mat-card-actions",17)(32,"button",18),c(33),p(34,"translate"),r(),E(35,INe,3,3,"button",19),r()()()(),E(36,WNe,23,5,"div"),r()}if(e&2){let t=w();a(),g("formGroup",t.filterPreferenceForm),a(2),ea(" ",Ot(4,16,t.firstMappingEntity,"inputs")," ",m(5,19,"labels.text.access to")," ",Ot(6,21,t.secondMappingEntity,"text")," "),a(8),h(Ot(12,24,t.firstMappingEntity,"inputs")),a(3),g("value",0),a(),v(" ",m(16,27,"labels.inputs.All")," "),a(2),we(t.firstEntityData),a(2),I(t.filterPreferenceForm.controls.mappingFirstParamId.hasError("required")?19:-1),a(3),h(Ot(23,29,t.secondMappingEntity,"text")),a(3),g("value",0),a(),v(" ",m(27,32,"labels.inputs.All")," "),a(2),we(t.secondEntityData),a(2),I(t.filterPreferenceForm.controls.mappingSecondParamId.hasError("required")?30:-1),a(2),g("disabled",!t.filterPreferenceForm.valid),a(),v(" ",m(34,34,"labels.buttons.Submit")," "),a(2),I(t.hasClickedFilters?35:-1),a(),I(t.hasClickedFilters?36:-1)}}var tx=(()=>{class e{constructor(){this.route=T(Ie),this.formBuilder=T(nt),this.systemService=T(ii),this.dateUtils=T(Zt),this.dialog=T(Ht),this.settingsService=T(At),this.translateService=T(yi),this.entityMappings=[],this.selectedMappingType=0,this.selectedFromId=0,this.selectedToId=0,this.hasClickedFilters=!1,this.retrieveById=0,this.firstEntityData=[],this.secondEntityData=[],this.displayedColumns=["entitymapping"],this.entityMappingListColumns=["fromentity","toentity","startdate","enddate","edit","delete"],this.route.data.subscribe(t=>{this.entityMappings=t.entityMappings})}createFilterPreferenceForm(){this.filterPreferenceForm=this.formBuilder.group({mappingFirstParamId:["",se.required],mappingSecondParamId:["",se.required]})}ngOnInit(){this.setMapping()}setMapping(){this.datasource=new Wt(this.entityMappings)}showFilters(t){this.selectedMappingType=t,this.hasClickedFilters=!1,this.fetchRelatedData(this.selectedMappingType),this.selectedFromId=0,this.selectedToId=0}fetchRelatedData(t){switch(this.retrieveById=t,this.createFilterPreferenceForm(),this.retrieveById){case 1:this.systemService.getOffices().subscribe(n=>{this.firstEntityData=n,this.firstMappingEntity="Office"}),this.systemService.getLoanProducts().subscribe(n=>{this.secondEntityData=n,this.secondMappingEntity="Loan Products"});break;case 2:this.systemService.getOffices().subscribe(n=>{this.firstEntityData=n,this.firstMappingEntity="Office"}),this.systemService.getSavingProducts().subscribe(n=>{this.secondEntityData=n,this.secondMappingEntity="Saving Products"});break;case 3:this.systemService.getOffices().subscribe(n=>{this.firstEntityData=n,this.firstMappingEntity="Office"}),this.systemService.getCharges().subscribe(n=>{this.secondEntityData=n,this.secondMappingEntity="Charges"});break;case 4:this.systemService.getRoles().subscribe(n=>{this.firstEntityData=n,this.firstMappingEntity="Role"}),this.systemService.getLoanProducts().subscribe(n=>{this.secondEntityData=n,this.secondMappingEntity="Loan Products"});break;case 5:this.systemService.getRoles().subscribe(n=>{this.firstEntityData=n,this.firstMappingEntity="Role"}),this.systemService.getSavingProducts().subscribe(n=>{this.secondEntityData=n,this.secondMappingEntity="Saving Products"});break}}showFilteredData(){this.filterPreference=this.filterPreferenceForm.value,this.filterPreference.mappingFirstParamId===""&&(this.filterPreference.mappingFirstParamId=0),this.filterPreference.mappingSecondParamId===""&&(this.filterPreference.mappingSecondParamId=0),this.hasClickedFilters=!0,this.selectedFromId=this.filterPreference.mappingFirstParamId,this.selectedToId=this.filterPreference.mappingSecondParamId,this.systemService.getEntitytoEntityData(this.retrieveById,this.selectedFromId,this.selectedToId).subscribe(t=>{this.entityMappingsListData=new Wt(t),this.entityMappingsListData.paginator=this.paginator,this.entityMappingsListData.sort=this.sort})}showAddScreen(t){this.relId=t,this.fetchRelatedData(this.relId);let n=[new $i({controlName:"fromId",label:this.translateService.instant(`labels.inputs.${this.firstMappingEntity}`),options:{label:"name",value:"id",data:this.firstEntityData},required:!0}),new $i({controlName:"toId",label:this.translateService.instant(`labels.text.${this.secondMappingEntity}`),options:{label:"name",value:"id",data:this.secondEntityData},required:!0}),new rr({controlName:"startDate",label:this.translateService.instant("labels.inputs.Start Date"),type:"date",required:!1}),new rr({controlName:"endDate",label:this.translateService.instant("labels.inputs.End Date"),type:"date",required:!1})],i={title:this.translateService.instant("labels.buttons.Add")+" "+this.translateService.instant("labels.heading.Entity to Entity Mapping"),layout:{addButtonText:"Confirm"},formfields:n};this.dialog.open(an,{data:i}).afterClosed().subscribe(d=>{d.data&&this.submitNew(d.data)})}showEditScreen(t,n){this.relId=n,this.mapIdToEdit=t,this.fetchRelatedData(this.relId),this.systemService.getMapIdData(t).subscribe(u=>{this.entityMap=u});let i=[new $i({controlName:"fromId",label:this.translateService.instant(`labels.inputs.${this.firstMappingEntity}`),options:{label:"name",value:"id",data:this.firstEntityData},required:!0}),new $i({controlName:"toId",label:this.translateService.instant(`labels.text.${this.secondMappingEntity}`),options:{label:"name",value:"id",data:this.secondEntityData},required:!0}),new rr({controlName:"startDate",label:this.translateService.instant("labels.inputs.Start Date"),type:"date",required:!1}),new rr({controlName:"endDate",label:this.translateService.instant("labels.inputs.End Date"),type:"date",required:!1})],s={title:this.translateService.instant("labels.buttons.Edit")+" "+this.translateService.instant("labels.heading.Entity to Entity Mapping"),layout:{addButtonText:"Confirm"},formfields:i};this.dialog.open(an,{data:s}).afterClosed().subscribe(u=>{u.data&&this.submitEdit(u.data)})}submitNew(t){t.value.fromId===""&&(t.value.fromId=void 0),t.value.toId===""&&(t.value.toId=void 0);let n=this.settingsService.dateFormat,i=t.value.startDate,s=t.value.endDate,d=t.value;d.startDate=this.dateUtils.formatDate(i,n),d.endDate=this.dateUtils.formatDate(s,n),d.dateFormat=n,d.locale=this.settingsService.language.code,this.systemService.createMapping(this.relId,d).subscribe(u=>{this.showFilteredData()})}submitEdit(t){let n=this.settingsService.dateFormat,i=t.value.startDate,s=t.value.endDate,d=t.value;d.startDate=this.dateUtils.formatDate(i,n),d.endDate=this.dateUtils.formatDate(s,n),d.dateFormat=n,d.locale=this.settingsService.language.code,this.systemService.editMapping(this.mapIdToEdit,d).subscribe(u=>{this.showFilteredData()})}delete(t){this.dialog.open(vi,{data:{deleteContext:this.translateService.instant("labels.inputs.Mapping id")+" "+t}}).afterClosed().subscribe(i=>{i.delete&&this.systemService.deleteMapping(t).subscribe(()=>{this.showFilteredData()})})}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275cmp=me({type:e,selectors:[["mifosx-entity-to-entity-mapping"]],viewQuery:function(n,i){if(n&1&&(Ee(kt,5),Ee(It,5)),n&2){let s;Te(s=Me())&&(i.paginator=s.first),Te(s=Me())&&(i.sort=s.first)}},decls:9,vars:4,consts:[[1,"container"],[1,"mat-elevation-z8"],["mat-table","",3,"dataSource"],["matColumnDef","entitymapping"],["mat-header-cell","",4,"matHeaderCellDef"],["mat-cell","",3,"click",4,"matCellDef"],["mat-header-row","",4,"matHeaderRowDef"],["mat-row","","class","select-row",4,"matRowDef","matRowDefColumns"],["mat-header-cell",""],["mat-cell","",3,"click"],["mat-header-row",""],["mat-row","",1,"select-row"],[3,"ngSubmit","formGroup"],[1,"layout-row","align-space-evenly-center"],["required","","formControlName","mappingFirstParamId"],[3,"value"],["required","","formControlName","mappingSecondParamId"],[1,"layout-row","align-center","gap-5px","responsive-column"],["mat-raised-button","","color","primary",3,"disabled"],["mat-raised-button","","color","primary"],["mat-raised-button","","color","primary",3,"click"],["matColumnDef","fromentity"],["mat-cell","",4,"matCellDef"],["matColumnDef","toentity"],["matColumnDef","startdate"],["matColumnDef","enddate"],["matColumnDef","edit"],["matColumnDef","delete"],["showFirstLastButtons","",3,"pageSizeOptions"],["mat-cell",""],["type","button","color","primary","mat-icon-button","","matTooltipPosition","above",3,"matTooltip","click",4,"mifosxHasPermission"],["type","button","color","primary","mat-icon-button","","matTooltipPosition","above",3,"click","matTooltip"],["icon","edit","size","lg"],["type","button","color","warn","mat-icon-button","","matTooltipPosition","above",3,"matTooltip","click",4,"mifosxHasPermission"],["type","button","color","warn","mat-icon-button","","matTooltipPosition","above",3,"click","matTooltip"],["icon","trash","size","lg"]],template:function(n,i){n&1&&(l(0,"div",0)(1,"div",1)(2,"table",2),X(3,3),F(4,_Ne,3,3,"th",4)(5,SNe,6,5,"td",5),Z(),F(6,wNe,1,0,"tr",6)(7,PNe,1,0,"tr",7),r(),E(8,QNe,37,36,"mat-card"),r()()),n&2&&(a(2),g("dataSource",i.datasource),a(4),g("matHeaderRowDef",i.displayedColumns),a(),g("matRowDefColumns",i.displayedColumns),a(),I(i.selectedMappingType>0?8:-1))},dependencies:[ue,fe,tt,Ue,Xe,dt,Ze,et,$e,Je,Et,Fe,Be,ut,gt,ft,ve,Ke,_t,xt,vt,bt,Ct,yt,St,Pt,wt,Tt,Qo,wi,si,ke,kt,Pi,he,Fi],styles:["table[_ngcontent-%COMP%] .select-row[_ngcontent-%COMP%]{cursor:pointer}"]})}}return e})();var YNe=()=>["edit"];function JNe(e,o){e&1&&(l(0,"th",11),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.name")))}function KNe(e,o){if(e&1&&(l(0,"td",12),c(1),p(2,"translateKey"),r()),e&2){let t=o.$implicit;a(),h(Ot(2,1,t.name,"inputs"))}}function XNe(e,o){e&1&&(l(0,"th",11),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.Value")))}function ZNe(e,o){if(e&1&&(l(0,"td",12),c(1),r()),e&2){let t=o.$implicit,n=w();a(),h(n.getConfigurationValue(t))}}function eLe(e,o){e&1&&b(0,"tr",13)}function tLe(e,o){e&1&&b(0,"tr",14)}var ix=(()=>{class e{constructor(){this.route=T(Ie),this.displayedColumns=["name","value"],this.route.data.subscribe(t=>{this.amazonS3ConfigurationData=t.amazonS3Configuration})}ngOnInit(){this.setAmazonS3Configuration()}setAmazonS3Configuration(){this.dataSource=new Wt(this.amazonS3ConfigurationData),this.dataSource.sort=this.sort}getConfigurationValue(t){let n=t.value;return t.name==="s3_access_key"||t.name==="s3_secret_key"?n?n.replace(n.substr(1,n.length-3),n.substr(1,n.length-3).replace(/./g,"*")):"":n}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275cmp=me({type:e,selectors:[["mifosx-amazon-s3"]],viewQuery:function(n,i){if(n&1&&Ee(It,7),n&2){let s;Te(s=Me())&&(i.sort=s.first)}},decls:15,vars:8,consts:[[1,"container","m-b-20","layout-row","align-end","gap-20px"],["mat-raised-button","","color","primary",3,"routerLink"],["icon","edit",1,"m-r-10"],[1,"container","mat-elevation-z8"],["mat-table","","matSort","",3,"dataSource"],["matColumnDef","name"],["mat-header-cell","","mat-sort-header","",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","value"],["mat-header-row","",4,"matHeaderRowDef"],["mat-row","",4,"matRowDef","matRowDefColumns"],["mat-header-cell","","mat-sort-header",""],["mat-cell",""],["mat-header-row",""],["mat-row",""]],template:function(n,i){n&1&&(l(0,"div",0)(1,"button",1),b(2,"fa-icon",2),c(3),p(4,"translate"),r()(),l(5,"div",3)(6,"table",4),X(7,5),F(8,JNe,3,3,"th",6)(9,KNe,3,4,"td",7),Z(),X(10,8),F(11,XNe,3,3,"th",6)(12,ZNe,2,1,"td",7),Z(),F(13,eLe,1,0,"tr",9)(14,tLe,1,0,"tr",10),r()()),n&2&&(a(),g("routerLink",oe(7,YNe)),a(2),v(" ",m(4,5,"labels.buttons.Edit")," "),a(3),g("dataSource",i.dataSource),a(7),g("matHeaderRowDef",i.displayedColumns),a(),g("matRowDefColumns",i.displayedColumns))},dependencies:[ue,fe,Ae,ve,ke,_t,It,xt,vt,bt,ri,Ct,yt,St,Pt,wt,Tt,he,Fi],styles:["table[_ngcontent-%COMP%]{width:100%}"]})}}return e})();var iLe=()=>["../"];function nLe(e,o){e&1&&(l(0,"mat-error"),c(1),p(2,"translate"),p(3,"translate"),l(4,"strong"),c(5),p(6,"translate"),r()()),e&2&&(a(),le(" ",m(2,3,"labels.inputs.S3 Bucket Name")," ",m(3,5,"labels.commons.is")," "),a(4),h(m(6,7,"labels.commons.required")))}function oLe(e,o){e&1&&b(0,"fa-icon",11)}function aLe(e,o){e&1&&b(0,"fa-icon",12)}function rLe(e,o){if(e&1){let t=Y();l(0,"button",10),R("mousedown",function(){V(t);let i=w();return q(i.accessKeyInputType="text")})("mouseup",function(){V(t);let i=w();return q(i.accessKeyInputType="password")}),E(1,oLe,1,0,"fa-icon",11),E(2,aLe,1,0,"fa-icon",12),r()}if(e&2){let t=w();a(),I(t.accessKeyInputType==="password"?1:-1),a(),I(t.accessKeyInputType==="text"?2:-1)}}function lLe(e,o){e&1&&(l(0,"mat-error"),c(1),p(2,"translate"),p(3,"translate"),l(4,"strong"),c(5),p(6,"translate"),r()()),e&2&&(a(),le(" ",m(2,3,"labels.inputs.S3 Access Key")," ",m(3,5,"labels.commons.is")," "),a(4),h(m(6,7,"labels.commons.required")))}function sLe(e,o){e&1&&b(0,"fa-icon",11)}function cLe(e,o){e&1&&b(0,"fa-icon",12)}function pLe(e,o){if(e&1){let t=Y();l(0,"button",10),R("mousedown",function(){V(t);let i=w();return q(i.secretKeyInputType="text")})("mouseup",function(){V(t);let i=w();return q(i.secretKeyInputType="password")}),E(1,sLe,1,0,"fa-icon",11),E(2,cLe,1,0,"fa-icon",12),r()}if(e&2){let t=w();a(),I(t.secretKeyInputType==="password"?1:-1),a(),I(t.secretKeyInputType==="text"?2:-1)}}function mLe(e,o){e&1&&(l(0,"mat-error"),c(1),p(2,"translate"),p(3,"translate"),l(4,"strong"),c(5),p(6,"translate"),r()()),e&2&&(a(),le(" ",m(2,3,"labels.inputs.S3 Secret Key")," ",m(3,5,"labels.commons.is")," "),a(4),h(m(6,7,"labels.commons.required")))}var nx=(()=>{class e{constructor(){this.formBuilder=T(nt),this.systemService=T(ii),this.route=T(Ie),this.router=T(qe),this.route.data.subscribe(t=>{this.amazonS3ConfigurationData=t.amazonS3Configuration})}ngOnInit(){this.createAmazonS3ConfigurationForm(),this.secretKeyInputType="password",this.accessKeyInputType="password"}createAmazonS3ConfigurationForm(){this.amazonS3ConfigurationForm=this.formBuilder.group({s3_bucket_name:[this.amazonS3ConfigurationData[1].value,se.required],s3_access_key:[this.amazonS3ConfigurationData[0].value,se.required],s3_secret_key:[this.amazonS3ConfigurationData[2].value,se.required]})}submit(){this.systemService.updateExternalConfiguration("S3",this.amazonS3ConfigurationForm.value).subscribe(t=>{this.router.navigate(["../"],{relativeTo:this.route})})}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275cmp=me({type:e,selectors:[["mifosx-edit-amazon-s3"]],decls:32,vars:28,consts:[[1,"container"],[3,"ngSubmit","formGroup"],[1,"layout-column"],["matInput","","required","","formControlName","s3_bucket_name"],["matInput","","required","","formControlName","s3_access_key",3,"type"],["mat-button","","matSuffix","","mat-icon-button",""],["matInput","","required","","formControlName","s3_secret_key",3,"type"],[1,"layout-row","align-center","gap-5px","responsive-column"],["type","button","mat-raised-button","",3,"routerLink"],["mat-raised-button","","color","primary",3,"disabled"],["mat-button","","matSuffix","","mat-icon-button","",3,"mousedown","mouseup"],["icon","eye"],["icon","eye-slash"]],template:function(n,i){n&1&&(l(0,"div",0)(1,"mat-card")(2,"form",1),R("ngSubmit",function(){return i.submit()}),l(3,"mat-card-content")(4,"div",2)(5,"mat-form-field")(6,"mat-label"),c(7),p(8,"translate"),r(),b(9,"input",3),E(10,nLe,7,9,"mat-error"),r(),l(11,"mat-form-field")(12,"mat-label"),c(13),p(14,"translate"),r(),b(15,"input",4),E(16,rLe,3,2,"button",5),E(17,lLe,7,9,"mat-error"),r(),l(18,"mat-form-field")(19,"mat-label"),c(20),p(21,"translate"),r(),b(22,"input",6),E(23,pLe,3,2,"button",5),E(24,mLe,7,9,"mat-error"),r()()(),l(25,"mat-card-actions",7)(26,"button",8),c(27),p(28,"translate"),r(),l(29,"button",9),c(30),p(31,"translate"),r()()()()()),n&2&&(a(2),g("formGroup",i.amazonS3ConfigurationForm),a(5),h(m(8,17,"labels.inputs.S3 Bucket Name")),a(3),I(i.amazonS3ConfigurationForm.controls.s3_bucket_name.hasError("required")?10:-1),a(3),h(m(14,19,"labels.inputs.S3 Access Key")),a(2),g("type",Le(i.accessKeyInputType)),a(),I(i.amazonS3ConfigurationForm.controls.s3_access_key.value?16:-1),a(),I(i.amazonS3ConfigurationForm.controls.s3_access_key.hasError("required")?17:-1),a(3),h(m(21,21,"labels.inputs.S3 Secret Key")),a(2),g("type",Le(i.secretKeyInputType)),a(),I(i.amazonS3ConfigurationForm.controls.s3_secret_key.value?23:-1),a(),I(i.amazonS3ConfigurationForm.controls.s3_secret_key.hasError("required")?24:-1),a(2),g("routerLink",oe(27,iLe)),a(),v(" ",m(28,23,"labels.buttons.Cancel")," "),a(2),g("disabled",!i.amazonS3ConfigurationForm.valid||i.amazonS3ConfigurationForm.pristine),a(),v(" ",m(31,25,"labels.buttons.Submit")," "))},dependencies:[ue,fe,tt,st,Ue,Xe,dt,Ze,et,Ae,$e,Je,Et,Fe,Be,ut,ai,ze,ve,wi,ke,he],styles:[".container[_ngcontent-%COMP%]{max-width:37rem}"]})}}return e})();var dLe=()=>["../"];function uLe(e,o){e&1&&(l(0,"mat-error"),c(1),p(2,"translate"),p(3,"translate"),l(4,"strong"),c(5),p(6,"translate"),r()()),e&2&&(a(),le(" ",m(2,3,"labels.inputs.Username")," ",m(3,5,"labels.commons.is")," "),a(4),h(m(6,7,"labels.commons.required")))}function fLe(e,o){e&1&&b(0,"fa-icon",15)}function hLe(e,o){e&1&&b(0,"fa-icon",16)}function gLe(e,o){if(e&1){let t=Y();l(0,"button",14),R("mousedown",function(){V(t);let i=w();return q(i.passwordInputType="text")})("mouseup",function(){V(t);let i=w();return q(i.passwordInputType="password")}),E(1,fLe,1,0,"fa-icon",15),E(2,hLe,1,0,"fa-icon",16),r()}if(e&2){let t=w();a(),I(t.passwordInputType==="password"?1:-1),a(),I(t.passwordInputType==="text"?2:-1)}}function _Le(e,o){e&1&&(l(0,"mat-error"),c(1),p(2,"translate"),p(3,"translate"),l(4,"strong"),c(5),p(6,"translate"),r()()),e&2&&(a(),le(" ",m(2,3,"labels.inputs.Password")," ",m(3,5,"labels.commons.is")," "),a(4),h(m(6,7,"labels.commons.required")))}function CLe(e,o){e&1&&(l(0,"mat-error"),c(1),p(2,"translate"),p(3,"translate"),l(4,"strong"),c(5),p(6,"translate"),r()()),e&2&&(a(),le(" ",m(2,3,"labels.inputs.Host")," ",m(3,5,"labels.commons.is")," "),a(4),h(m(6,7,"labels.commons.required")))}function vLe(e,o){e&1&&(l(0,"mat-error"),c(1),p(2,"translate"),p(3,"translate"),l(4,"strong"),c(5),p(6,"translate"),r()()),e&2&&(a(),le(" ",m(2,3,"labels.inputs.Port")," ",m(3,5,"labels.commons.is")," "),a(4),h(m(6,7,"labels.commons.required")))}function xLe(e,o){e&1&&(l(0,"mat-error"),c(1),p(2,"translate"),p(3,"translate"),l(4,"strong"),c(5),p(6,"translate"),r()()),e&2&&(a(),le(" ",m(2,3,"labels.inputs.From Email")," ",m(3,5,"labels.commons.is")," "),a(4),h(m(6,7,"labels.commons.required")))}function bLe(e,o){e&1&&(l(0,"mat-error"),c(1),p(2,"translate"),p(3,"translate"),l(4,"strong"),c(5),p(6,"translate"),r()()),e&2&&(a(),le(" ",m(2,3,"labels.inputs.From Name")," ",m(3,5,"labels.commons.is")," "),a(4),h(m(6,7,"labels.commons.required")))}var ox=(()=>{class e{constructor(){this.formBuilder=T(nt),this.systemService=T(ii),this.route=T(Ie),this.router=T(qe),this.route.data.subscribe(t=>{this.emailConfigurationData=t.emailConfiguration})}ngOnInit(){this.setEmailConfigurationForm(),this.passwordInputType="password"}setEmailConfigurationForm(){this.emailConfigurationForm=this.formBuilder.group({username:[this.emailConfigurationData[0].value,se.required],password:[this.emailConfigurationData[1].value,se.required],host:[this.emailConfigurationData[2].value,se.required],port:[this.emailConfigurationData[3].value,se.required],useTLS:[this.emailConfigurationData[4].value,se.required],fromEmail:[this.emailConfigurationData[5].value,se.required],fromName:[this.emailConfigurationData[6].value,se.required]})}submit(){this.systemService.updateExternalConfiguration("SMTP",this.emailConfigurationForm.value).subscribe(t=>{this.router.navigate(["../"],{relativeTo:this.route})})}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275cmp=me({type:e,selectors:[["mifosx-edit-email"]],decls:52,vars:40,consts:[[1,"container"],[3,"ngSubmit","formGroup"],[1,"layout-column"],["matInput","","required","","formControlName","username"],["matInput","","required","","formControlName","password",3,"type"],["mat-button","","matSuffix","","mat-icon-button",""],["matInput","","required","","formControlName","host"],["matInput","","type","number","required","","formControlName","port"],["labelPosition","before","formControlName","useTLS",1,"margin-v","flex-48"],["matInput","","type","email","required","","formControlName","fromEmail"],["matInput","","required","","formControlName","fromName"],[1,"layout-row","align-center","gap-5px","responsive-column"],["type","button","mat-raised-button","",3,"routerLink"],["mat-raised-button","","color","primary",3,"disabled"],["mat-button","","matSuffix","","mat-icon-button","",3,"mousedown","mouseup"],["icon","eye"],["icon","eye-slash"]],template:function(n,i){n&1&&(l(0,"div",0)(1,"mat-card")(2,"form",1),R("ngSubmit",function(){return i.submit()}),l(3,"mat-card-content")(4,"div",2)(5,"mat-form-field")(6,"mat-label"),c(7),p(8,"translate"),r(),b(9,"input",3),E(10,uLe,7,9,"mat-error"),r(),l(11,"mat-form-field")(12,"mat-label"),c(13),p(14,"translate"),r(),b(15,"input",4),E(16,gLe,3,2,"button",5),E(17,_Le,7,9,"mat-error"),r(),l(18,"mat-form-field")(19,"mat-label"),c(20),p(21,"translate"),r(),b(22,"input",6),E(23,CLe,7,9,"mat-error"),r(),l(24,"mat-form-field")(25,"mat-label"),c(26),p(27,"translate"),r(),b(28,"input",7),E(29,vLe,7,9,"mat-error"),r(),l(30,"mat-checkbox",8),c(31),p(32,"translate"),r(),l(33,"mat-form-field")(34,"mat-label"),c(35),p(36,"translate"),r(),b(37,"input",9),E(38,xLe,7,9,"mat-error"),r(),l(39,"mat-form-field")(40,"mat-label"),c(41),p(42,"translate"),r(),b(43,"input",10),E(44,bLe,7,9,"mat-error"),r()()(),l(45,"mat-card-actions",11)(46,"button",12),c(47),p(48,"translate"),r(),l(49,"button",13),c(50),p(51,"translate"),r()()()()()),n&2&&(a(2),g("formGroup",i.emailConfigurationForm),a(5),h(m(8,21,"labels.inputs.Username")),a(3),I(i.emailConfigurationForm.controls.username.hasError("required")?10:-1),a(3),h(m(14,23,"labels.inputs.Password")),a(2),g("type",Le(i.passwordInputType)),a(),I(i.emailConfigurationForm.controls.password.value?16:-1),a(),I(i.emailConfigurationForm.controls.password.hasError("required")?17:-1),a(3),h(m(21,25,"labels.inputs.Host")),a(3),I(i.emailConfigurationForm.controls.host.hasError("required")?23:-1),a(3),h(m(27,27,"labels.inputs.Port")),a(3),I(i.emailConfigurationForm.controls.port.hasError("required")?29:-1),a(2),v(" ",m(32,29,"labels.inputs.Use TLS"),"? "),a(4),h(m(36,31,"labels.inputs.From Email")),a(3),I(i.emailConfigurationForm.controls.fromEmail.hasError("required")?38:-1),a(3),h(m(42,33,"labels.inputs.From Name")),a(3),I(i.emailConfigurationForm.controls.fromName.hasError("required")?44:-1),a(2),g("routerLink",oe(39,dLe)),a(),v(" ",m(48,35,"labels.buttons.Cancel")," "),a(2),g("disabled",!i.emailConfigurationForm.valid||i.emailConfigurationForm.pristine),a(),v(" ",m(51,37,"labels.buttons.Submit")," "))},dependencies:[ue,fe,tt,st,tn,Ue,Xe,dt,Ze,et,Ae,$e,Je,Et,Fe,Be,ut,ai,ze,ve,fi,wi,ke,he],styles:[".container[_ngcontent-%COMP%]{max-width:37rem}"]})}}return e})();var yLe=()=>["edit"];function SLe(e,o){e&1&&(l(0,"th",11),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.name")))}function wLe(e,o){if(e&1&&(l(0,"td",12),c(1),p(2,"translateKey"),r()),e&2){let t=o.$implicit;a(),h(Ot(2,1,t.name,"text"))}}function PLe(e,o){e&1&&(l(0,"th",11),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.Value")))}function TLe(e,o){if(e&1&&(l(0,"td",12),c(1),r()),e&2){let t=o.$implicit;a(),h(t.value)}}function MLe(e,o){e&1&&b(0,"tr",13)}function DLe(e,o){e&1&&b(0,"tr",14)}var ax=(()=>{class e{constructor(){this.route=T(Ie),this.displayedColumns=["name","value"],this.route.data.subscribe(t=>{this.emailConfigurationData=t.emailConfiguration})}ngOnInit(){this.setEmailConfiguration()}setEmailConfiguration(){this.dataSource=new Wt(this.emailConfigurationData),this.dataSource.sort=this.sort}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275cmp=me({type:e,selectors:[["mifosx-email"]],viewQuery:function(n,i){if(n&1&&Ee(It,7),n&2){let s;Te(s=Me())&&(i.sort=s.first)}},decls:15,vars:8,consts:[[1,"container","m-b-20","layout-row","align-end","gap-20px"],["mat-raised-button","","color","primary",3,"routerLink"],["icon","edit",1,"m-r-10"],[1,"container","mat-elevation-z8"],["mat-table","","matSort","",3,"dataSource"],["matColumnDef","name"],["mat-header-cell","","mat-sort-header","",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","value"],["mat-header-row","",4,"matHeaderRowDef"],["mat-row","",4,"matRowDef","matRowDefColumns"],["mat-header-cell","","mat-sort-header",""],["mat-cell",""],["mat-header-row",""],["mat-row",""]],template:function(n,i){n&1&&(l(0,"div",0)(1,"button",1),b(2,"fa-icon",2),c(3),p(4,"translate"),r()(),l(5,"div",3)(6,"table",4),X(7,5),F(8,SLe,3,3,"th",6)(9,wLe,3,4,"td",7),Z(),X(10,8),F(11,PLe,3,3,"th",6)(12,TLe,2,1,"td",7),Z(),F(13,MLe,1,0,"tr",9)(14,DLe,1,0,"tr",10),r()()),n&2&&(a(),g("routerLink",oe(7,yLe)),a(2),v(" ",m(4,5,"labels.buttons.Edit")," "),a(3),g("dataSource",i.dataSource),a(7),g("matHeaderRowDef",i.displayedColumns),a(),g("matRowDefColumns",i.displayedColumns))},dependencies:[ue,fe,Ae,ve,ke,_t,It,xt,vt,bt,ri,Ct,yt,St,Pt,wt,Tt,he,Fi],styles:["table[_ngcontent-%COMP%]{width:100%}"]})}}return e})();var rx=()=>["amazon-s3"],lx=()=>["sms"],sx=()=>["email"],cx=()=>["notification"];function ELe(e,o){if(e&1){let t=Y();l(0,"fa-icon",12),R("click",function(i){return V(t),w().arrowBooleansToggle(0),q(i.stopPropagation())}),r()}}function ILe(e,o){if(e&1){let t=Y();l(0,"fa-icon",13),R("click",function(i){return V(t),w().arrowBooleansToggle(0),q(i.stopPropagation())}),r()}}function OLe(e,o){e&1&&(l(0,"p",6),c(1),p(2,"translate"),r()),e&2&&(g("routerLink",oe(4,rx)),a(),v(" ",m(2,2,"labels.text.S3 Amazon Service Configuration")," "))}function ALe(e,o){if(e&1){let t=Y();l(0,"fa-icon",12),R("click",function(i){return V(t),w().arrowBooleansToggle(1),q(i.stopPropagation())}),r()}}function FLe(e,o){if(e&1){let t=Y();l(0,"fa-icon",13),R("click",function(i){return V(t),w().arrowBooleansToggle(1),q(i.stopPropagation())}),r()}}function kLe(e,o){e&1&&(l(0,"p",6),c(1),p(2,"translate"),r()),e&2&&(g("routerLink",oe(4,lx)),a(),v(" ",m(2,2,"labels.text.SMS Service Configuration")," "))}function BLe(e,o){if(e&1){let t=Y();l(0,"fa-icon",12),R("click",function(i){return V(t),w().arrowBooleansToggle(2),q(i.stopPropagation())}),r()}}function RLe(e,o){if(e&1){let t=Y();l(0,"fa-icon",13),R("click",function(i){return V(t),w().arrowBooleansToggle(2),q(i.stopPropagation())}),r()}}function NLe(e,o){e&1&&(l(0,"p",6),c(1),p(2,"translate"),r()),e&2&&(g("routerLink",oe(4,sx)),a(),v(" ",m(2,2,"labels.text.Email Service Configuration")," "))}function LLe(e,o){if(e&1){let t=Y();l(0,"fa-icon",12),R("click",function(i){return V(t),w().arrowBooleansToggle(3),q(i.stopPropagation())}),r()}}function VLe(e,o){if(e&1){let t=Y();l(0,"fa-icon",13),R("click",function(i){return V(t),w().arrowBooleansToggle(3),q(i.stopPropagation())}),r()}}function qLe(e,o){e&1&&(l(0,"p",6),c(1),p(2,"translate"),r()),e&2&&(g("routerLink",oe(4,cx)),a(),v(" ",m(2,2,"labels.text.Notification Service Configuration")," "))}var px=(()=>{class e{constructor(){this.arrowBooleans=new Array(4).fill(!1)}arrowBooleansToggle(t){this.arrowBooleans[t]=!this.arrowBooleans[t]}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275cmp=me({type:e,selectors:[["mifosx-external-services"]],decls:43,vars:48,consts:[[1,"container"],[1,"layout-row","responsive-column","gap-20px"],[1,"flex-50"],[3,"routerLink"],["matListIcon","",3,"routerLink"],["icon","cloud","size","sm"],["matLine","",3,"routerLink"],["icon","arrow-down","size","md"],["icon","arrow-up","size","md"],["icon","comment-alt","size","sm"],["icon","envelope","size","sm"],["icon","bell","size","sm"],["icon","arrow-down","size","md",3,"click"],["icon","arrow-up","size","md",3,"click"]],template:function(n,i){n&1&&(l(0,"div",0)(1,"mat-card")(2,"div",1)(3,"div",2)(4,"mat-nav-list")(5,"mat-list-item",3)(6,"mat-icon",4),b(7,"fa-icon",5),r(),l(8,"h4",6),c(9),p(10,"translate"),r(),E(11,ELe,1,0,"fa-icon",7),E(12,ILe,1,0,"fa-icon",8),E(13,OLe,3,5,"p",6),r(),l(14,"mat-list-item",3)(15,"mat-icon",4),b(16,"fa-icon",9),r(),l(17,"h4",6),c(18),p(19,"translate"),r(),E(20,ALe,1,0,"fa-icon",7),E(21,FLe,1,0,"fa-icon",8),E(22,kLe,3,5,"p",6),r()()(),l(23,"div",2)(24,"mat-nav-list")(25,"mat-list-item",3)(26,"mat-icon",4),b(27,"fa-icon",10),r(),l(28,"h4",6),c(29),p(30,"translate"),r(),E(31,BLe,1,0,"fa-icon",7),E(32,RLe,1,0,"fa-icon",8),E(33,NLe,3,5,"p",6),r(),l(34,"mat-list-item",3)(35,"mat-icon",4),b(36,"fa-icon",11),r(),l(37,"h4",6),c(38),p(39,"translate"),r(),E(40,LLe,1,0,"fa-icon",7),E(41,VLe,1,0,"fa-icon",8),E(42,qLe,3,5,"p",6),r()()()()()()),n&2&&(a(5),g("routerLink",oe(36,rx)),a(),g("routerLink",oe(37,rx)),a(2),g("routerLink",oe(38,rx)),a(),h(m(10,28,"labels.heading.S3 Amazon External Service")),a(2),I(i.arrowBooleans[0]?-1:11),a(),I(i.arrowBooleans[0]?12:-1),a(),I(i.arrowBooleans[0]?13:-1),a(),g("routerLink",oe(39,lx)),a(),g("routerLink",oe(40,lx)),a(2),g("routerLink",oe(41,lx)),a(),h(m(19,30,"labels.heading.SMS External Service")),a(2),I(i.arrowBooleans[1]?-1:20),a(),I(i.arrowBooleans[1]?21:-1),a(),I(i.arrowBooleans[1]?22:-1),a(3),g("routerLink",oe(42,sx)),a(),g("routerLink",oe(43,sx)),a(2),g("routerLink",oe(44,sx)),a(),h(m(30,32,"labels.heading.Email External Service")),a(2),I(i.arrowBooleans[2]?-1:31),a(),I(i.arrowBooleans[2]?32:-1),a(),I(i.arrowBooleans[2]?33:-1),a(),g("routerLink",oe(45,cx)),a(),g("routerLink",oe(46,cx)),a(2),g("routerLink",oe(47,cx)),a(),v(" ",m(39,34,"labels.heading.Notification External Service")," "),a(2),I(i.arrowBooleans[3]?-1:40),a(),I(i.arrowBooleans[3]?41:-1),a(),I(i.arrowBooleans[3]?42:-1))},dependencies:[ue,fe,Ae,$e,pa,Vo,Yo,ke,ca,he],encapsulation:2})}}return e})();var zLe=()=>["../"];function HLe(e,o){e&1&&(l(0,"mat-error"),c(1),p(2,"translate"),p(3,"translate"),l(4,"strong"),c(5),p(6,"translate"),r()()),e&2&&(a(),le(" ",m(2,3,"labels.inputs.Server Key")," ",m(3,5,"labels.commons.is")," "),a(4),h(m(6,7,"labels.commons.required")))}function GLe(e,o){e&1&&(l(0,"mat-error"),c(1),p(2,"translate"),p(3,"translate"),l(4,"strong"),c(5),p(6,"translate"),r()()),e&2&&(a(),le(" ",m(2,3,"labels.inputs.GCM End Point")," ",m(3,5,"labels.commons.is")," "),a(4),h(m(6,7,"labels.commons.required")))}function jLe(e,o){e&1&&(l(0,"mat-error"),c(1),p(2,"translate"),p(3,"translate"),l(4,"strong"),c(5),p(6,"translate"),r()()),e&2&&(a(),le(" ",m(2,3,"labels.inputs.FCM End Point")," ",m(3,5,"labels.commons.is")," "),a(4),h(m(6,7,"labels.commons.required")))}var mx=(()=>{class e{constructor(){this.formBuilder=T(nt),this.systemService=T(ii),this.route=T(Ie),this.router=T(qe),this.route.data.subscribe(t=>{this.notificationConfigurationData=t.notificationConfiguration})}ngOnInit(){this.setNotificationConfigurationForm()}setNotificationConfigurationForm(){this.notificationConfigurationForm=this.formBuilder.group({server_key:[this.notificationConfigurationData[0].value,se.required],gcm_end_point:[this.notificationConfigurationData[1].value,se.required],fcm_end_point:[this.notificationConfigurationData[2].value,se.required]})}submit(){this.systemService.updateExternalConfiguration("NOTIFICATION",this.notificationConfigurationForm.value).subscribe(t=>{this.router.navigate(["../"],{relativeTo:this.route})})}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275cmp=me({type:e,selectors:[["mifosx-edit-notification"]],decls:30,vars:22,consts:[[1,"container"],[3,"ngSubmit","formGroup"],[1,"layout-column"],["matInput","","required","","formControlName","server_key"],["matInput","","required","","formControlName","gcm_end_point"],["matInput","","required","","formControlName","fcm_end_point"],[1,"layout-row","align-center","gap-5px","responsive-column"],["type","button","mat-raised-button","",3,"routerLink"],["mat-raised-button","","color","primary",3,"disabled"]],template:function(n,i){n&1&&(l(0,"div",0)(1,"mat-card")(2,"form",1),R("ngSubmit",function(){return i.submit()}),l(3,"mat-card-content")(4,"div",2)(5,"mat-form-field")(6,"mat-label"),c(7),p(8,"translate"),r(),b(9,"input",3),E(10,HLe,7,9,"mat-error"),r(),l(11,"mat-form-field")(12,"mat-label"),c(13),p(14,"translate"),r(),b(15,"input",4),E(16,GLe,7,9,"mat-error"),r(),l(17,"mat-form-field")(18,"mat-label"),c(19),p(20,"translate"),r(),b(21,"input",5),E(22,jLe,7,9,"mat-error"),r()()(),l(23,"mat-card-actions",6)(24,"button",7),c(25),p(26,"translate"),r(),l(27,"button",8),c(28),p(29,"translate"),r()()()()()),n&2&&(a(2),g("formGroup",i.notificationConfigurationForm),a(5),h(m(8,11,"labels.inputs.Server Key")),a(3),I(i.notificationConfigurationForm.controls.server_key.hasError("required")?10:-1),a(3),h(m(14,13,"labels.inputs.GCM End Point")),a(3),I(i.notificationConfigurationForm.controls.gcm_end_point.hasError("required")?16:-1),a(3),h(m(20,15,"labels.inputs.FCM End Point")),a(3),I(i.notificationConfigurationForm.controls.fcm_end_point.hasError("required")?22:-1),a(2),g("routerLink",oe(21,zLe)),a(),v(" ",m(26,17,"labels.buttons.Cancel")," "),a(2),g("disabled",!i.notificationConfigurationForm.valid||i.notificationConfigurationForm.pristine),a(),v(" ",m(29,19,"labels.buttons.Submit")," "))},dependencies:[ue,fe,tt,st,Ue,Xe,dt,Ze,et,Ae,$e,Je,Et,Fe,Be,ut,ze,ve,he],styles:[".container[_ngcontent-%COMP%]{max-width:37rem}"]})}}return e})();var $Le=()=>["edit"];function ULe(e,o){e&1&&(l(0,"th",11),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.name")))}function WLe(e,o){if(e&1&&(l(0,"td",12),c(1),p(2,"translateKey"),r()),e&2){let t=o.$implicit;a(),h(Ot(2,1,t.name,"text"))}}function QLe(e,o){e&1&&(l(0,"th",11),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.Value")))}function YLe(e,o){if(e&1&&(l(0,"td",12),c(1),r()),e&2){let t=o.$implicit,n=w();a(),h(n.getConfigurationValue(t))}}function JLe(e,o){e&1&&b(0,"tr",13)}function KLe(e,o){e&1&&b(0,"tr",14)}var dx=(()=>{class e{constructor(){this.route=T(Ie),this.displayedColumns=["name","value"],this.route.data.subscribe(t=>{this.notificationConfigurationData=t.notificationConfiguration})}ngOnInit(){this.setNotificationConfiguration()}setNotificationConfiguration(){this.dataSource=new Wt(this.notificationConfigurationData),this.dataSource.sort=this.sort}getConfigurationValue(t){let n=t.value;return t.name==="server_key"?n.replace(n.substr(1,n.length-3),n.substr(1,n.length-3).replace(/./g,"*")):n}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275cmp=me({type:e,selectors:[["mifosx-notification"]],viewQuery:function(n,i){if(n&1&&Ee(It,7),n&2){let s;Te(s=Me())&&(i.sort=s.first)}},decls:15,vars:8,consts:[[1,"container","m-b-20","layout-row","align-end","gap-20px"],["mat-raised-button","","color","primary",3,"routerLink"],["icon","edit",1,"m-r-10"],[1,"container","mat-elevation-z8"],["mat-table","","matSort","",3,"dataSource"],["matColumnDef","name"],["mat-header-cell","","mat-sort-header","",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","value"],["mat-header-row","",4,"matHeaderRowDef"],["mat-row","",4,"matRowDef","matRowDefColumns"],["mat-header-cell","","mat-sort-header",""],["mat-cell",""],["mat-header-row",""],["mat-row",""]],template:function(n,i){n&1&&(l(0,"div",0)(1,"button",1),b(2,"fa-icon",2),c(3),p(4,"translate"),r()(),l(5,"div",3)(6,"table",4),X(7,5),F(8,ULe,3,3,"th",6)(9,WLe,3,4,"td",7),Z(),X(10,8),F(11,QLe,3,3,"th",6)(12,YLe,2,1,"td",7),Z(),F(13,JLe,1,0,"tr",9)(14,KLe,1,0,"tr",10),r()()),n&2&&(a(),g("routerLink",oe(7,$Le)),a(2),v(" ",m(4,5,"labels.buttons.Edit")," "),a(3),g("dataSource",i.dataSource),a(7),g("matHeaderRowDef",i.displayedColumns),a(),g("matRowDefColumns",i.displayedColumns))},dependencies:[ue,fe,Ae,ve,ke,_t,It,xt,vt,bt,ri,Ct,yt,St,Pt,wt,Tt,he,Fi],styles:["table[_ngcontent-%COMP%]{width:100%}"]})}}return e})();var XLe=()=>["../"];function ZLe(e,o){e&1&&(l(0,"mat-error"),c(1),p(2,"translate"),p(3,"translate"),l(4,"strong"),c(5),p(6,"translate"),r()()),e&2&&(a(),le(" ",m(2,3,"labels.inputs.Host Name")," ",m(3,5,"labels.commons.is")," "),a(4),h(m(6,7,"labels.commons.required")))}function eVe(e,o){e&1&&(l(0,"mat-error"),c(1),p(2,"translate"),p(3,"translate"),l(4,"strong"),c(5),p(6,"translate"),r()()),e&2&&(a(),le(" ",m(2,3,"labels.inputs.Port Number")," ",m(3,5,"labels.commons.is")," "),a(4),h(m(6,7,"labels.commons.required")))}function tVe(e,o){e&1&&(l(0,"mat-error"),c(1),p(2,"translate"),p(3,"translate"),l(4,"strong"),c(5),p(6,"translate"),r()()),e&2&&(a(),le(" ",m(2,3,"labels.inputs.End Point")," ",m(3,5,"labels.commons.is")," "),a(4),h(m(6,7,"labels.commons.required")))}function iVe(e,o){e&1&&(l(0,"mat-error"),c(1),p(2,"translate"),p(3,"translate"),l(4,"strong"),c(5),p(6,"translate"),r()()),e&2&&(a(),le(" ",m(2,3,"labels.inputs.Tenant App Key")," ",m(3,5,"labels.commons.is")," "),a(4),h(m(6,7,"labels.commons.required")))}var ux=(()=>{class e{constructor(){this.formBuilder=T(nt),this.systemService=T(ii),this.route=T(Ie),this.router=T(qe),this.route.data.subscribe(t=>{this.smsConfigurationData=t.smsConfiguration})}ngOnInit(){this.setSMSConfigurationForm()}setSMSConfigurationForm(){this.smsConfigurationForm=this.formBuilder.group({host_name:[this.smsConfigurationData[0].value,se.required],port_number:[this.smsConfigurationData[1].value,se.required],end_point:[this.smsConfigurationData[2].value,se.required],tenant_app_key:[this.smsConfigurationData[3].value,se.required]})}submit(){this.systemService.updateExternalConfiguration("SMS",this.smsConfigurationForm.value).subscribe(t=>{this.router.navigate(["../"],{relativeTo:this.route})})}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275cmp=me({type:e,selectors:[["mifosx-edit-sms"]],decls:36,vars:26,consts:[[1,"container"],[3,"ngSubmit","formGroup"],[1,"layout-column"],["matInput","","required","","formControlName","host_name"],["matInput","","required","","formControlName","port_number"],["matInput","","required","","formControlName","end_point"],["matInput","","required","","formControlName","tenant_app_key"],[1,"layout-row","align-center","gap-5px","responsive-column"],["type","button","mat-raised-button","",3,"routerLink"],["mat-raised-button","","color","primary",3,"disabled"]],template:function(n,i){n&1&&(l(0,"div",0)(1,"mat-card")(2,"form",1),R("ngSubmit",function(){return i.submit()}),l(3,"mat-card-content")(4,"div",2)(5,"mat-form-field")(6,"mat-label"),c(7),p(8,"translate"),r(),b(9,"input",3),E(10,ZLe,7,9,"mat-error"),r(),l(11,"mat-form-field")(12,"mat-label"),c(13),p(14,"translate"),r(),b(15,"input",4),E(16,eVe,7,9,"mat-error"),r(),l(17,"mat-form-field")(18,"mat-label"),c(19),p(20,"translate"),r(),b(21,"input",5),E(22,tVe,7,9,"mat-error"),r(),l(23,"mat-form-field")(24,"mat-label"),c(25),p(26,"translate"),r(),b(27,"input",6),E(28,iVe,7,9,"mat-error"),r()()(),l(29,"mat-card-actions",7)(30,"button",8),c(31),p(32,"translate"),r(),l(33,"button",9),c(34),p(35,"translate"),r()()()()()),n&2&&(a(2),g("formGroup",i.smsConfigurationForm),a(5),h(m(8,13,"labels.inputs.Host Name")),a(3),I(i.smsConfigurationForm.controls.host_name.hasError("required")?10:-1),a(3),h(m(14,15,"labels.inputs.Port Number")),a(3),I(i.smsConfigurationForm.controls.port_number.hasError("required")?16:-1),a(3),h(m(20,17,"labels.inputs.End Point")),a(3),I(i.smsConfigurationForm.controls.end_point.hasError("required")?22:-1),a(3),h(m(26,19,"labels.inputs.Tenant App Key")),a(3),I(i.smsConfigurationForm.controls.tenant_app_key.hasError("required")?28:-1),a(2),g("routerLink",oe(25,XLe)),a(),v(" ",m(32,21,"labels.buttons.Cancel")," "),a(2),g("disabled",!i.smsConfigurationForm.valid||i.smsConfigurationForm.pristine),a(),v(" ",m(35,23,"labels.buttons.Submit")," "))},dependencies:[ue,fe,tt,st,Ue,Xe,dt,Ze,et,Ae,$e,Je,Et,Fe,Be,ut,ze,ve,he],styles:[".container[_ngcontent-%COMP%]{max-width:37rem}"]})}}return e})();var nVe=()=>["edit"];function oVe(e,o){e&1&&(l(0,"th",11),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.name")))}function aVe(e,o){if(e&1&&(l(0,"td",12),c(1),p(2,"translateKey"),r()),e&2){let t=o.$implicit;a(),h(Ot(2,1,t.name,"text"))}}function rVe(e,o){e&1&&(l(0,"th",11),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.Value")))}function lVe(e,o){if(e&1&&(l(0,"td",12),c(1),r()),e&2){let t=o.$implicit;a(),h(t.value)}}function sVe(e,o){e&1&&b(0,"tr",13)}function cVe(e,o){e&1&&b(0,"tr",14)}var fx=(()=>{class e{constructor(){this.route=T(Ie),this.displayedColumns=["name","value"],this.route.data.subscribe(t=>{this.smsConfigurationData=t.smsConfiguration})}ngOnInit(){this.setSMSConfiguration()}setSMSConfiguration(){this.dataSource=new Wt(this.smsConfigurationData),this.dataSource.sort=this.sort}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275cmp=me({type:e,selectors:[["mifosx-sms"]],viewQuery:function(n,i){if(n&1&&Ee(It,7),n&2){let s;Te(s=Me())&&(i.sort=s.first)}},decls:15,vars:8,consts:[[1,"container","m-b-20","layout-row","align-end","gap-20px"],["mat-raised-button","","color","primary",3,"routerLink"],["icon","edit",1,"m-r-10"],[1,"container","mat-elevation-z8"],["mat-table","","matSort","",3,"dataSource"],["matColumnDef","name"],["mat-header-cell","","mat-sort-header","",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","value"],["mat-header-row","",4,"matHeaderRowDef"],["mat-row","",4,"matRowDef","matRowDefColumns"],["mat-header-cell","","mat-sort-header",""],["mat-cell",""],["mat-header-row",""],["mat-row",""]],template:function(n,i){n&1&&(l(0,"div",0)(1,"button",1),b(2,"fa-icon",2),c(3),p(4,"translate"),r()(),l(5,"div",3)(6,"table",4),X(7,5),F(8,oVe,3,3,"th",6)(9,aVe,3,4,"td",7),Z(),X(10,8),F(11,rVe,3,3,"th",6)(12,lVe,2,1,"td",7),Z(),F(13,sVe,1,0,"tr",9)(14,cVe,1,0,"tr",10),r()()),n&2&&(a(),g("routerLink",oe(7,nVe)),a(2),v(" ",m(4,5,"labels.buttons.Edit")," "),a(3),g("dataSource",i.dataSource),a(7),g("matHeaderRowDef",i.displayedColumns),a(),g("matRowDefColumns",i.displayedColumns))},dependencies:[ue,fe,Ae,ve,ke,_t,It,xt,vt,bt,ri,Ct,yt,St,Pt,wt,Tt,he,Fi],styles:["table[_ngcontent-%COMP%]{width:100%}"]})}}return e})();var hx=[{displayValue:"Client",value:"m_client"},{displayValue:"Group",value:"m_group"},{displayValue:"Center",value:"m_center"},{displayValue:"Office",value:"m_office"},{displayValue:"Loan Account",value:"m_loan"},{displayValue:"Saving Account",value:"m_savings_account"},{displayValue:"Loan Product",value:"m_product_loan"},{displayValue:"Saving Account Transaction",value:"m_savings_account_transaction"},{displayValue:"Savings Product",value:"m_savings_product"},{displayValue:"Share Product",value:"m_share_product"}],gx=[{displayValue:"Person",value:"Person"},{displayValue:"Entity",value:"Entity"}],wN=[{displayValue:"Savings Product",value:"Savings Product"},{displayValue:"Fixed Deposit",value:"Fixed Deposit"},{displayValue:"Recurring Deposit",value:"Recurring Deposit"}];var PN=[{displayValue:"Boolean",value:"Boolean"},{displayValue:"Date",value:"Date"},{displayValue:"Date and Time",value:"Datetime"},{displayValue:"Decimal",value:"Decimal"},{displayValue:"Dropdown",value:"Dropdown"},{displayValue:"Number",value:"Number"},{displayValue:"String",value:"String"},{displayValue:"Text",value:"Text"}];function pVe(e,o){e&1&&(l(0,"mat-error"),c(1),p(2,"translate"),p(3,"translate"),l(4,"strong"),c(5),p(6,"translate"),r()()),e&2&&(a(),le(" ",m(2,3,"labels.inputs.Column Name")," ",m(3,5,"labels.commons.is")," "),a(4),h(m(6,7,"labels.commons.required")))}function mVe(e,o){if(e&1&&(l(0,"mat-option",5),c(1),p(2,"translateKey"),r()),e&2){let t=o.$implicit;g("value",t.value),a(),v(" ",Ot(2,2,t.displayValue,"inputs")," ")}}function dVe(e,o){e&1&&(l(0,"mat-error"),c(1),p(2,"translate"),p(3,"translate"),l(4,"strong"),c(5),p(6,"translate"),r()()),e&2&&(a(),le(" ",m(2,3,"labels.inputs.Column Type")," ",m(3,5,"labels.commons.is")," "),a(4),h(m(6,7,"labels.commons.required")))}function uVe(e,o){e&1&&(l(0,"mat-form-field")(1,"mat-label"),c(2),p(3,"translate"),r(),b(4,"input",12),p(5,"translate"),r()),e&2&&(a(2),v(" ",m(3,3,"labels.inputs.Column Length")),a(2),g("placeholder",Le(m(5,5,"labels.inputs.Column Length"))))}function fVe(e,o){if(e&1&&(l(0,"mat-option",5),c(1),r()),e&2){let t=o.$implicit;g("value",t.name),a(),v(" ",t.name," ")}}function hVe(e,o){if(e&1&&(l(0,"mat-form-field")(1,"mat-label"),c(2),p(3,"translate"),r(),l(4,"mat-select",13),Se(5,fVe,2,2,"mat-option",5,Pe),r()()),e&2){let t=w();a(2),v(" ",m(3,1,"labels.inputs.Column Code")),a(3),we(t.data.columnCodes)}}var $p=(()=>{class e{constructor(){this.dialogRef=T(eo),this.formBuilder=T(nt),this.data=T(Po),this.columnTypeData=PN}ngOnInit(){this.columnForm=this.formBuilder.group({name:[this.data?this.data.columnName:"",se.required],type:[{value:this.data?this.data.columnDisplayType===""?"":this.getColumnType(this.data.columnDisplayType):"",disabled:this.data.type==="existing"},se.required],length:[{value:this.data?+this.data.columnLength:"",disabled:this.getColumnType(this.data.columnDisplayType)!=="String"||this.data.type==="existing"},se.required],mandatory:[{value:this.data.isColumnNullable,disabled:this.data.type==="existing"}],unique:[{value:this.data.isColumnUnique,disabled:this.data.isColumnNullable||this.data.type==="existing"}],indexed:[{value:this.data.isColumnIndexed,disabled:this.data.type==="existing"}],code:[{value:this.data?this.data.columnCode:"",disabled:this.getColumnType(this.data.columnDisplayType)!=="Dropdown"||this.data.type==="existing"},se.required]}),this.onColumnTypeChanges()}getColumnType(t){switch(t){case void 0:return"";case"INTEGER":return"Number";case"CODELOOKUP":return"Dropdown";default:return t[0]+t.substr(1).toLowerCase()}}onColumnTypeChanges(){this.columnForm.get("type").valueChanges.subscribe(t=>{switch(t){case"String":{this.columnForm.get("length").enable(),this.columnForm.get("code").disable();break}case"Dropdown":{this.columnForm.get("code").enable(),this.columnForm.get("length").disable();break}default:this.columnForm.get("code").disable(),this.columnForm.get("length").disable()}})}submit(){this.dialogRef.close(this.columnForm.value)}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275cmp=me({type:e,selectors:[["mifosx-column-dialog"]],decls:44,vars:39,consts:[["mat-dialog-title",""],[3,"formGroup"],[1,"layout-column"],["matInput","","required","","formControlName","name",3,"placeholder"],["required","","formControlName","type"],[3,"value"],["labelPosition","after","formControlName","mandatory"],["labelPosition","after","formControlName","unique"],["labelPosition","after","formControlName","indexed"],["align","end"],["mat-button","","mat-dialog-close",""],["mat-raised-button","","color","primary",3,"click","disabled"],["matInput","","required","","type","number","formControlName","length",3,"placeholder"],["required","","formControlName","code"]],template:function(n,i){n&1&&(l(0,"h1",0),c(1),p(2,"translate"),p(3,"translate"),p(4,"translate"),r(),l(5,"mat-dialog-content")(6,"form",1)(7,"div",2)(8,"mat-form-field")(9,"mat-label"),c(10),p(11,"translate"),r(),b(12,"input",3),p(13,"translate"),E(14,pVe,7,9,"mat-error"),r(),l(15,"mat-form-field")(16,"mat-label"),c(17),p(18,"translate"),r(),l(19,"mat-select",4),Se(20,mVe,3,5,"mat-option",5,Pe),r(),E(22,dVe,7,9,"mat-error"),r(),E(23,uVe,6,7,"mat-form-field"),E(24,hVe,7,3,"mat-form-field"),l(25,"div")(26,"mat-checkbox",6),c(27),p(28,"translate"),r()(),l(29,"div")(30,"mat-checkbox",7),c(31),p(32,"translate"),r()(),l(33,"div")(34,"mat-checkbox",8),c(35),p(36,"translate"),r()()()()(),l(37,"mat-dialog-actions",9)(38,"button",10),c(39),p(40,"translate"),r(),l(41,"button",11),R("click",function(){return i.submit()}),c(42),p(43,"translate"),r()()),n&2&&(a(),le(" ",i.data.columnName?m(2,17,"labels.buttons.Edit"):m(3,19,"labels.buttons.Add")," ",m(4,21,"labels.inputs.Column"),` `),a(5),g("formGroup",i.columnForm),a(4),h(m(11,23,"labels.inputs.Column Name")),a(2),g("placeholder",Le(m(13,25,"labels.inputs.Column Name"))),a(2),I(i.columnForm.controls.name.hasError("required")?14:-1),a(3),h(m(18,27,"labels.inputs.Column Type")),a(3),we(i.columnTypeData),a(2),I(i.columnForm.controls.type.hasError("required")?22:-1),a(),I(i.columnForm.value.type==="String"?23:-1),a(),I(i.columnForm.value.type==="Dropdown"?24:-1),a(3),h(m(28,29,"labels.text.Mandatory")),a(4),h(m(32,31,"labels.inputs.Unique")),a(4),h(m(36,33,"labels.inputs.Indexed")),a(4),h(m(40,35,"labels.buttons.Cancel")),a(2),g("disabled",!i.columnForm.valid||i.columnForm.pristine),a(),v(" ",m(43,37,"labels.buttons.Submit")," "))},dependencies:[ue,fe,tt,st,tn,Ue,Xe,dt,Ze,et,Fe,Be,ut,ze,gt,ft,ve,fi,Wn,ho,Nn,Un,he,Fi],encapsulation:2})}}return e})();var gVe=["dataTableFormRef"],_Ve=["templateDataTableFormRef"],CVe=()=>[10,25,50,100],vVe=()=>["../"];function xVe(e,o){e&1&&(l(0,"mat-error"),c(1),p(2,"translate"),p(3,"translate"),l(4,"strong"),c(5),p(6,"translate"),r()()),e&2&&(a(),le(" ",m(2,3,"labels.inputs.Data Table Name")," ",m(3,5,"labels.commons.is")," "),a(4),h(m(6,7,"labels.commons.required")))}function bVe(e,o){if(e&1&&(l(0,"mat-option",9),c(1),p(2,"translateKey"),r()),e&2){let t=o.$implicit;g("value",t.value),a(),v(" ",Ot(2,2,t.displayValue,"inputs")," ")}}function yVe(e,o){e&1&&(l(0,"mat-error"),c(1),p(2,"translate"),p(3,"translate"),l(4,"strong"),c(5),p(6,"translate"),r()()),e&2&&(a(),le(" ",m(2,3,"labels.inputs.Application Table Name")," ",m(3,5,"labels.commons.is")," "),a(4),h(m(6,7,"labels.commons.required")))}function SVe(e,o){if(e&1&&(l(0,"mat-option",9),c(1),p(2,"translateKey"),r()),e&2){let t=o.$implicit;g("value",t.value),a(),v(" ",Ot(2,2,t.displayValue,"inputs")," ")}}function wVe(e,o){if(e&1&&(l(0,"mat-form-field",7)(1,"mat-label"),c(2),p(3,"translate"),r(),l(4,"mat-select",36),Se(5,SVe,3,5,"mat-option",9,Pe),r()()),e&2){let t=w();a(2),h(m(3,1,"labels.inputs.Entity SubType")),a(3),we(t.entitySubTypeData)}}function PVe(e,o){if(e&1&&(l(0,"mat-option",9),c(1),p(2,"translateKey"),r()),e&2){let t=o.$implicit;g("value",t.value),a(),v(" ",Ot(2,2,t.displayValue,"inputs")," ")}}function TVe(e,o){if(e&1&&(l(0,"mat-form-field",7)(1,"mat-label"),c(2),p(3,"translate"),r(),l(4,"mat-select",36),Se(5,PVe,3,5,"mat-option",9,Pe),r()()),e&2){let t=w();a(2),h(m(3,1,"labels.inputs.Savings SubType")),a(3),we(t.savingsSubTypeData)}}function MVe(e,o){e&1&&(l(0,"th",37),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.Name")))}function DVe(e,o){e&1&&(b(0,"fa-icon",39),p(1,"translate")),e&2&&g("matTooltip",Le(m(1,2,"tooltips.Primary Key")))}function EVe(e,o){if(e&1&&(l(0,"td",38),c(1),E(2,DVe,2,4,"fa-icon",39),r()),e&2){let t=o.$implicit;a(),v(" ",t.columnName," "),a(),I(t.isColumnPrimaryKey?2:-1)}}function IVe(e,o){e&1&&(l(0,"th",37),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.Type")))}function OVe(e,o){if(e&1&&(l(0,"td",38),c(1),r()),e&2){let t=o.$implicit;a(),h(t.columnDisplayType)}}function AVe(e,o){e&1&&(l(0,"th",37),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.Length")))}function FVe(e,o){if(e&1&&(l(0,"td",38),c(1),r()),e&2){let t=o.$implicit;a(),h(t.columnLength)}}function kVe(e,o){e&1&&(l(0,"th",37),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.Code")))}function BVe(e,o){if(e&1&&(l(0,"td",38),c(1),r()),e&2){let t=o.$implicit;a(),h(t.columnCode)}}function RVe(e,o){e&1&&(l(0,"th",37),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.text.Mandatory")))}function NVe(e,o){e&1&&(b(0,"fa-icon",39),p(1,"translate")),e&2&&g("matTooltip",Le(m(1,2,"tooltips.Yes")))}function LVe(e,o){e&1&&(b(0,"fa-icon",41),p(1,"translate")),e&2&&g("matTooltip",Le(m(1,2,"tooltips.No")))}function VVe(e,o){if(e&1&&(l(0,"td",40),E(1,NVe,2,4,"fa-icon",39),E(2,LVe,2,4,"fa-icon",41),r()),e&2){let t=o.$implicit;a(),I(t.isColumnNullable?-1:1),a(),I(t.isColumnNullable?2:-1)}}function qVe(e,o){e&1&&(l(0,"th",42),c(1),p(2,"translate"),r()),e&2&&(a(),v(" ",m(2,1,"labels.inputs.Unique")," "))}function zVe(e,o){e&1&&(b(0,"fa-icon",39),p(1,"translate")),e&2&&g("matTooltip",Le(m(1,2,"tooltips.Yes")))}function HVe(e,o){e&1&&(b(0,"fa-icon",43),p(1,"translate")),e&2&&g("matTooltip",Le(m(1,2,"tooltips.No")))}function GVe(e,o){if(e&1&&(l(0,"td",38),E(1,zVe,2,4,"fa-icon",39),E(2,HVe,2,4,"fa-icon",43),r()),e&2){let t=o.$implicit;a(),I(t.isColumnUnique?1:-1),a(),I(t.isColumnUnique?-1:2)}}function jVe(e,o){e&1&&(l(0,"th",42),c(1),p(2,"translate"),r()),e&2&&(a(),v(" ",m(2,1,"labels.inputs.Indexed")," "))}function $Ve(e,o){e&1&&(b(0,"fa-icon",39),p(1,"translate")),e&2&&g("matTooltip",Le(m(1,2,"tooltips.Yes")))}function UVe(e,o){e&1&&(b(0,"fa-icon",41),p(1,"translate")),e&2&&g("matTooltip",Le(m(1,2,"tooltips.No")))}function WVe(e,o){if(e&1&&(l(0,"td",38),E(1,$Ve,2,4,"fa-icon",39),E(2,UVe,2,4,"fa-icon",41),r()),e&2){let t=o.$implicit;a(),I(t.isColumnIndexed?1:-1),a(),I(t.isColumnIndexed?-1:2)}}function QVe(e,o){e&1&&(l(0,"th",37),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.Actions")))}function YVe(e,o){if(e&1){let t=Y();l(0,"td",44)(1,"button",45),R("click",function(){let i=V(t).$implicit,s=w();return q(s.editColumn(i))}),b(2,"fa-icon",46),r(),l(3,"button",47),R("click",function(){let i=V(t).$implicit,s=w();return q(s.deleteColumn(i))}),b(4,"fa-icon",48),r()()}}function JVe(e,o){e&1&&b(0,"tr",49)}function KVe(e,o){e&1&&b(0,"tr",50)}function XVe(e,o){if(e&1){let t=Y();l(0,"h2"),c(1),p(2,"translate"),r(),l(3,"p",51),c(4),p(5,"translate"),l(6,"a",52),c(7),p(8,"translate"),r()(),l(9,"div",53)(10,"button",54),R("click",function(){let i=V(t).popover,s=w();return i.close(),q(s.configurationWizardService.closeConfigWizard())}),c(11),p(12,"translate"),r(),l(13,"button",55),R("click",function(){let i=V(t).popover;return q(i.close())}),c(14),p(15,"translate"),r(),l(16,"button",55),R("click",function(){let i=V(t).popover,s=w();return i.close(),q(s.previousStep())}),c(17),p(18,"translate"),r(),l(19,"button",55),R("click",function(){let i=V(t).popover,s=w();return i.close(),q(s.nextStep())}),c(20),p(21,"translate"),r()()}e&2&&(a(),h(m(2,7,"labels.buttons.Create Datatable")),a(3),v(" ",m(5,9,"labels.text.Filling Details")," "),a(3),h(m(8,11,"labels.inputs.Manage Datatables")),a(4),v(" ",m(12,13,"labels.buttons.Close")," "),a(3),v(" ",m(15,15,"labels.buttons.Create Datatable")," "),a(3),v(" ",m(18,17,"labels.buttons.Back")," "),a(3),v(" ",m(21,19,"labels.buttons.Next")," "))}var _x=(()=>{class e{constructor(){this.formBuilder=T(nt),this.systemService=T(ii),this.route=T(Ie),this.router=T(qe),this.dialog=T(Ht),this.configurationWizardService=T(Qi),this.popoverService=T(Wi),this.translateService=T(yi),this.appTableData=hx,this.entitySubTypeData=gx,this.savingsSubTypeData=wN,this.columnData=[],this.dataForDialog={columnName:void 0,columnDisplayType:void 0,isColumnNullable:void 0,columnLength:void 0,columnCode:void 0,columnCodes:void 0,type:void 0,isColumnUnique:void 0,isColumnIndexed:void 0},this.displayedColumns=["name","type","length","code","mandatory","unique","indexed","actions"],this.route.data.subscribe(t=>{this.dataForDialog.columnCodes=t.columnCodes})}ngOnInit(){this.createDataTableForm(),this.setColumns(),this.dataTableForm.controls.apptableName.valueChanges.subscribe(t=>{this.showEntitySubType=t==="m_client",this.showSavingsSubType=t==="m_savings_product"})}setColumns(){this.dataSource=new Wt(this.columnData),this.dataSource.paginator=this.paginator,this.dataSource.sort=this.sort}createDataTableForm(){this.dataTableForm=this.formBuilder.group({datatableName:["",se.required],apptableName:["",se.required],multiRow:[!1],entitySubType:[""]})}addColumn(){this.dataForDialog.columnName=void 0,this.dataForDialog.columnDisplayType=void 0,this.dataForDialog.isColumnNullable=void 0,this.dataForDialog.columnLength=void 0,this.dataForDialog.columnCode=void 0,this.dataForDialog.isColumnUnique=void 0,this.dataForDialog.isColumnIndexed=void 0,this.dataForDialog.type="new",this.dialog.open($p,{data:this.dataForDialog,height:"450px",width:"400px"}).afterClosed().subscribe(n=>{n!==""&&(this.columnData.push({columnName:n.name,columnDisplayType:n.type,isColumnNullable:!n.mandatory,isColumnUnique:n.unique,isColumnIndexed:n.indexed,columnLength:n.length,columnCode:n.code,type:"new"}),this.dataSource.connect().next(this.columnData))})}editColumn(t){this.dataForDialog.columnName=t.columnName,this.dataForDialog.columnDisplayType=t.columnDisplayType,this.dataForDialog.isColumnNullable=!t.isColumnNullable,this.dataForDialog.isColumnUnique=t.isColumnUnique,this.dataForDialog.isColumnIndexed=t.isColumnIndexed,this.dataForDialog.columnLength=t.columnLength,this.dataForDialog.columnCode=t.columnCode,this.dataForDialog.type=t.type,this.dialog.open($p,{data:this.dataForDialog,height:"450px",width:"400px"}).afterClosed().subscribe(i=>{i!==""&&(this.columnData[this.columnData.findIndex(s=>s.columnName===t.name)]={columnName:i.name,columnDisplayType:i.type,isColumnNullable:!i.mandatory,isColumnUnique:i.unique,isColumnIndexed:i.indexed,columnLength:i.length,columnCode:i.code,type:"existing"},this.dataSource.connect().next(this.columnData))})}deleteColumn(t){this.dialog.open(vi,{data:{deleteContext:this.translateService.instant("labels.inputs.Column")+" "+t.name}}).afterClosed().subscribe(i=>{i.delete&&(this.columnData.splice(this.columnData.indexOf(t),1),this.dataSource.connect().next(this.columnData))})}submit(){let t=[];this.columnData.forEach(i=>{t.push({name:i.columnName,type:i.columnDisplayType,code:i.columnCode,length:i.columnLength,mandatory:!i.isColumnNullable,unique:i.isColumnUnique,indexed:i.isColumnIndexed})}),this.dataTableForm.value.columns=t;let n=this.dataTableForm.value;(this.dataTableForm.value.entitySubType==null||this.dataTableForm.value.entitySubType==="")&&delete n.entitySubType,this.systemService.createDataTable(n).subscribe(i=>{this.configurationWizardService.showDatatablesForm===!0?(this.configurationWizardService.showDatatablesForm=!1,this.openDialog()):this.router.navigate(["../",i.resourceIdentifier],{relativeTo:this.route})})}showPopover(t,n,i,s){setTimeout(()=>this.popoverService.open(t,n,i,s,{}),200)}ngAfterViewInit(){this.configurationWizardService.showDatatablesForm===!0&&setTimeout(()=>{this.showPopover(this.templateDataTableFormRef,this.dataTableFormRef.nativeElement,"bottom",!0)})}nextStep(){this.configurationWizardService.showDatatablesForm=!1,this.configurationWizardService.showSystemCodes=!0,this.router.navigate(["/system"])}previousStep(){this.configurationWizardService.showDatatablesForm=!1,this.configurationWizardService.showDatatablesList=!0,this.router.navigate(["/system/data-tables"])}openDialog(){this.dialog.open(Fr,{data:{stepName:"data table"}}).afterClosed().subscribe(n=>{n.step===1?(this.configurationWizardService.showDatatablesForm=!1,this.router.navigate(["../"],{relativeTo:this.route})):n.step===2?(this.configurationWizardService.showDatatablesForm=!0,this.router.routeReuseStrategy.shouldReuseRoute=()=>!1,this.router.onSameUrlNavigation="reload",this.router.navigate(["/organization/data-tables/create"])):n.step===3&&(this.configurationWizardService.showDatatablesForm=!1,this.configurationWizardService.showSystemCodes=!0,this.router.navigate(["/system"]))})}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275cmp=me({type:e,selectors:[["mifosx-create-data-table"]],viewQuery:function(n,i){if(n&1&&(Ee(kt,7),Ee(It,7),Ee(gVe,5),Ee(_Ve,5)),n&2){let s;Te(s=Me())&&(i.paginator=s.first),Te(s=Me())&&(i.sort=s.first),Te(s=Me())&&(i.dataTableFormRef=s.first),Te(s=Me())&&(i.templateDataTableFormRef=s.first)}},decls:74,vars:37,consts:[["dataTableFormRef",""],["templateDataTableFormRef",""],[1,"container"],[3,"ngSubmit","formGroup"],[1,"layout-row-wrap","gap-2px","responsive-column"],[1,"flex-40"],["matInput","","required","","formControlName","datatableName"],[1,"flex-fill","flex-20"],["required","","formControlName","apptableName"],[3,"value"],[1,"multi-row-wrapper","flex-14"],["labelPosition","before","formControlName","multiRow",1,"multi-row"],[1,"layout-row-wrap","gap-60percent","layout-lt-md-column"],[1,"mat-title","flex-20"],["mat-raised-button","","type","button","color","primary",1,"flex-20",3,"click"],["icon","plus",1,"m-r-10"],["mat-table","","matSort","",3,"dataSource"],["matColumnDef","name"],["mat-header-cell","","mat-sort-header","",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","type"],["matColumnDef","length"],["matColumnDef","code"],["matColumnDef","mandatory"],["mat-cell","","class","left",4,"matCellDef"],["matColumnDef","unique"],["mat-header-cell","","mat-sort-header","","class","center",4,"matHeaderCellDef"],["matColumnDef","indexed"],["matColumnDef","actions"],["mat-cell","","class","gap-15percent",4,"matCellDef"],["mat-header-row","",4,"matHeaderRowDef"],["mat-row","",4,"matRowDef","matRowDefColumns"],["showFirstLastButtons","",3,"pageSizeOptions"],[1,"layout-row","align-center","gap-5px","responsive-column"],["type","button","mat-raised-button","",3,"routerLink"],["mat-raised-button","","color","primary",3,"disabled"],["formControlName","entitySubType"],["mat-header-cell","","mat-sort-header",""],["mat-cell",""],["icon","check-circle","size","lg","matTooltipPosition","right",1,"column-mandatory",3,"matTooltip"],["mat-cell","",1,"left"],["icon","times-circle","size","lg","matTooltipPosition","right",1,"not-column-mandatory",3,"matTooltip"],["mat-header-cell","","mat-sort-header","",1,"center"],["icon","times-circle","size","lg","unique","right",1,"not-column-mandatory",3,"matTooltip"],["mat-cell","",1,"gap-15percent"],["type","button","color","primary","mat-icon-button","",3,"click"],["icon","edit","size","lg"],["type","button","color","warn","mat-icon-button","",3,"click"],["icon","trash","size","lg"],["mat-header-row",""],["mat-row",""],[1,"mw400"],["href","https://mifosforge.jira.com/wiki/spaces/docs/pages/52592760/Manage+Data+Tables","target","_blank"],[1,"layout-row","align-end","gap-2px","responsive-column"],["mat-raised-button","","color","warn",3,"click"],["mat-raised-button","","color","primary",3,"click"]],template:function(n,i){if(n&1){let s=Y();l(0,"div",2)(1,"mat-card")(2,"form",3,0),R("ngSubmit",function(){return V(s),q(i.submit())}),l(4,"mat-card-content")(5,"div",4)(6,"mat-form-field",5)(7,"mat-label"),c(8),p(9,"translate"),r(),b(10,"input",6),E(11,xVe,7,9,"mat-error"),r(),l(12,"mat-form-field",7)(13,"mat-label"),c(14),p(15,"translate"),r(),l(16,"mat-select",8),Se(17,bVe,3,5,"mat-option",9,Pe),r(),E(19,yVe,7,9,"mat-error"),r(),E(20,wVe,7,3,"mat-form-field",7),E(21,TVe,7,3,"mat-form-field",7),l(22,"div",10)(23,"mat-checkbox",11),c(24),p(25,"translate"),r()()(),b(26,"br"),l(27,"div",12)(28,"p",13),c(29),p(30,"translate"),r(),l(31,"button",14),R("click",function(){return V(s),q(i.addColumn())}),b(32,"fa-icon",15),c(33),p(34,"translate"),p(35,"translate"),r()(),b(36,"br"),l(37,"table",16),X(38,17),F(39,MVe,3,3,"th",18)(40,EVe,3,2,"td",19),Z(),X(41,20),F(42,IVe,3,3,"th",18)(43,OVe,2,1,"td",19),Z(),X(44,21),F(45,AVe,3,3,"th",18)(46,FVe,2,1,"td",19),Z(),X(47,22),F(48,kVe,3,3,"th",18)(49,BVe,2,1,"td",19),Z(),X(50,23),F(51,RVe,3,3,"th",18)(52,VVe,3,2,"td",24),Z(),X(53,25),F(54,qVe,3,3,"th",26)(55,GVe,3,2,"td",19),Z(),X(56,27),F(57,jVe,3,3,"th",26)(58,WVe,3,2,"td",19),Z(),X(59,28),F(60,QVe,3,3,"th",18)(61,YVe,5,0,"td",29),Z(),F(62,JVe,1,0,"tr",30)(63,KVe,1,0,"tr",31),r(),b(64,"mat-paginator",32),r(),l(65,"mat-card-actions",33)(66,"button",34),c(67),p(68,"translate"),r(),l(69,"button",35),c(70),p(71,"translate"),r()()()()(),F(72,XVe,22,21,"ng-template",null,1,ti)}n&2&&(a(2),g("formGroup",i.dataTableForm),a(6),h(m(9,19,"labels.inputs.Data Table Name")),a(3),I(i.dataTableForm.controls.datatableName.hasError("required")?11:-1),a(3),h(m(15,21,"labels.inputs.Entity Type")),a(3),we(i.appTableData),a(2),I(i.dataTableForm.controls.apptableName.hasError("required")?19:-1),a(),I(i.showEntitySubType?20:-1),a(),I(i.showSavingsSubType?21:-1),a(3),h(m(25,23,"labels.inputs.Multi Row")),a(5),h(m(30,25,"labels.inputs.Columns")),a(4),le(" ",m(34,27,"labels.buttons.Add")," ",m(35,29,"labels.inputs.Columns")," "),a(4),g("dataSource",i.dataSource),a(25),g("matHeaderRowDef",i.displayedColumns),a(),g("matRowDefColumns",i.displayedColumns),a(),g("pageSizeOptions",oe(35,CVe)),a(2),g("routerLink",oe(36,vVe)),a(),v(" ",m(68,31,"labels.buttons.Cancel")," "),a(2),g("disabled",!i.dataTableForm.valid||i.columnData.length===0),a(),v(" ",m(71,33,"labels.buttons.Submit")," "))},dependencies:[ue,fe,tt,st,Ue,Xe,dt,Ze,et,Ae,$e,Je,Et,Fe,Be,ut,ze,gt,ft,ve,fi,ke,_t,It,xt,vt,bt,ri,Ct,yt,si,wi,St,Pt,wt,Tt,kt,he,Fi],styles:["@media (width >= 992px){.multi-row-wrapper[_ngcontent-%COMP%]{position:relative}.multi-row-wrapper[_ngcontent-%COMP%] .multi-row[_ngcontent-%COMP%]{padding:0 0 17.5px;position:absolute;bottom:0;right:0}}table[_ngcontent-%COMP%]{width:100%}"]})}}return e})();var ZVe=()=>[10,25],eqe=()=>["../"];function tqe(e,o){if(e&1&&(l(0,"mat-option",7),c(1),p(2,"translateKey"),r()),e&2){let t=o.$implicit;g("value",t.value),a(),v(" ",Ot(2,2,t.displayValue,"inputs")," ")}}function iqe(e,o){e&1&&(l(0,"mat-error"),c(1),p(2,"translate"),p(3,"translate"),l(4,"strong"),c(5),p(6,"translate"),r()()),e&2&&(a(),le(" ",m(2,3,"labels.inputs.Application Table Name")," ",m(3,5,"labels.commons.is")," "),a(4),h(m(6,7,"labels.commons.required")))}function nqe(e,o){if(e&1&&(l(0,"mat-option",7),c(1),p(2,"translateKey"),r()),e&2){let t=o.$implicit;g("value",t.value),a(),v(" ",Ot(2,2,t.displayValue,"inputs")," ")}}function oqe(e,o){if(e&1&&(l(0,"mat-form-field",5)(1,"mat-label"),c(2),p(3,"translate"),r(),l(4,"mat-select",30),Se(5,nqe,3,5,"mat-option",7,Pe),r()()),e&2){let t=w();a(2),h(m(3,1,"labels.inputs.Entity SubType")),a(3),we(t.entitySubTypeData)}}function aqe(e,o){e&1&&(l(0,"th",31),c(1),p(2,"translate"),r()),e&2&&(a(),v(" ",m(2,1,"labels.inputs.Name")," "))}function rqe(e,o){if(e&1&&(l(0,"td",32),c(1),r()),e&2){let t=o.$implicit;a(),h(t.columnName)}}function lqe(e,o){e&1&&(l(0,"th",31),c(1),p(2,"translate"),r()),e&2&&(a(),v(" ",m(2,1,"labels.inputs.Type")," "))}function sqe(e,o){if(e&1&&(l(0,"td",32),c(1),r()),e&2){let t=o.$implicit;a(),h(t.columnDisplayType)}}function cqe(e,o){e&1&&(l(0,"th",31),c(1),p(2,"translate"),r()),e&2&&(a(),v(" ",m(2,1,"labels.inputs.Length")," "))}function pqe(e,o){if(e&1&&(l(0,"td",32),c(1),r()),e&2){let t=o.$implicit;a(),h(t.columnLength)}}function mqe(e,o){e&1&&(l(0,"th",31),c(1),p(2,"translate"),r()),e&2&&(a(),v(" ",m(2,1,"labels.inputs.Code")," "))}function dqe(e,o){if(e&1&&(l(0,"td",32),c(1),r()),e&2){let t=o.$implicit;a(),h(t.columnCode)}}function uqe(e,o){e&1&&(l(0,"th",31),c(1),p(2,"translate"),r()),e&2&&(a(),v(" ",m(2,1,"labels.text.Mandatory")," "))}function fqe(e,o){e&1&&(b(0,"fa-icon",33),p(1,"translate")),e&2&&g("matTooltip",Le(m(1,2,"tooltips.Yes")))}function hqe(e,o){e&1&&(b(0,"fa-icon",34),p(1,"translate")),e&2&&g("matTooltip",Le(m(1,2,"tooltips.No")))}function gqe(e,o){if(e&1&&(l(0,"td",32),E(1,fqe,2,4,"fa-icon",33),E(2,hqe,2,4,"fa-icon",34),r()),e&2){let t=o.$implicit;a(),I(t.isColumnNullable?-1:1),a(),I(t.isColumnNullable?2:-1)}}function _qe(e,o){e&1&&(l(0,"th",31),c(1),p(2,"translate"),r()),e&2&&(a(),v(" ",m(2,1,"labels.inputs.Unique")," "))}function Cqe(e,o){e&1&&(b(0,"fa-icon",33),p(1,"translate")),e&2&&g("matTooltip",Le(m(1,2,"tooltips.Yes")))}function vqe(e,o){e&1&&(b(0,"fa-icon",35),p(1,"translate")),e&2&&g("matTooltip",Le(m(1,2,"tooltips.No")))}function xqe(e,o){if(e&1&&(l(0,"td",32),E(1,Cqe,2,4,"fa-icon",33),E(2,vqe,2,4,"fa-icon",35),r()),e&2){let t=o.$implicit;a(),I(t.isColumnUnique?1:-1),a(),I(t.isColumnUnique?-1:2)}}function bqe(e,o){e&1&&(l(0,"th",31),c(1),p(2,"translate"),r()),e&2&&(a(),v(" ",m(2,1,"labels.inputs.Indexed")," "))}function yqe(e,o){e&1&&(b(0,"fa-icon",33),p(1,"translate")),e&2&&g("matTooltip",Le(m(1,2,"tooltips.Yes")))}function Sqe(e,o){e&1&&(b(0,"fa-icon",34),p(1,"translate")),e&2&&g("matTooltip",Le(m(1,2,"tooltips.No")))}function wqe(e,o){if(e&1&&(l(0,"td",32),E(1,yqe,2,4,"fa-icon",33),E(2,Sqe,2,4,"fa-icon",34),r()),e&2){let t=o.$implicit;a(),I(t.isColumnIndexed?1:-1),a(),I(t.isColumnIndexed?-1:2)}}function Pqe(e,o){e&1&&(l(0,"th",31),c(1),p(2,"translate"),r()),e&2&&(a(),v(" ",m(2,1,"labels.inputs.Actions")," "))}function Tqe(e,o){if(e&1){let t=Y();l(0,"button",39),R("click",function(){V(t);let i=w().$implicit,s=w();return q(s.editColumn(i))}),b(1,"fa-icon",40),r()}}function Mqe(e,o){if(e&1){let t=Y();l(0,"button",41),R("click",function(){V(t);let i=w().$implicit,s=w();return q(s.deleteColumn(i))}),b(1,"fa-icon",42),r()}}function Dqe(e,o){if(e&1&&(l(0,"td",36),E(1,Tqe,2,0,"button",37),E(2,Mqe,2,0,"button",38),r()),e&2){let t=o.$implicit;a(),I(t.system?-1:1),a(),I(t.system?-1:2)}}function Eqe(e,o){e&1&&b(0,"tr",43)}function Iqe(e,o){e&1&&b(0,"tr",44)}function Oqe(e,o){if(e&1&&(l(0,"button",45),c(1),p(2,"translate"),r()),e&2){let t=w();g("disabled",!t.isFormEdited),a(),v(" ",m(2,2,"labels.buttons.Submit")," ")}}var Cx=(()=>{class e{constructor(){this.systemService=T(ii),this.formBuilder=T(nt),this.route=T(Ie),this.router=T(qe),this.dialog=T(Ht),this.translateService=T(yi),this.entitySubTypeData=gx,this.appTableData=hx,this.isFormEdited=!1,this.dataTableChangesData={apptableName:"",changeColumns:[],addColumns:[],dropColumns:[],entitySubType:""},this.dataForDialog={columnName:void 0,columnDisplayType:void 0,isColumnNullable:void 0,columnLength:void 0,columnCode:void 0,columnCodes:void 0,type:void 0,isColumnUnique:void 0,isColumnIndexed:void 0},this.displayedColumns=["name","type","length","code","mandatory","unique","indexed","actions"],this.route.data.subscribe(t=>{this.dataTableData=t.dataTable;let n=this.getRelationshipColumnName(this.dataTableData.applicationTableName);this.dataTableData.columnHeaderData.forEach(i=>{i.system=["id","created_at","updated_at"].includes(i.columnName)||i.columnName===n}),this.columnData=this.dataTableData.columnHeaderData,this.dataForDialog.columnCodes=t.columnCodes})}getRelationshipColumnName(t){return{m_client:"client_id",m_group:"group_id",m_center:"center_id",m_office:"office_id",m_loan:"loan_id",m_savings_account:"savings_account_id",m_savings_account_transaction:"savings_transaction_id",m_product_loan:"product_loan_id",m_savings_product:"savings_product_id",m_share_product:"share_product_id"}[t]||""}ngOnInit(){this.initData(),this.createDataTableForm(),this.setColumns(),this.dataTableForm.controls.apptableName.valueChanges.subscribe(t=>{this.showEntitySubType=t==="m_client"})}setColumns(){this.dataSource=new Wt(this.columnData),this.dataSource.paginator=this.paginator,this.dataSource.sort=this.sort}initData(){this.columnData.length>0&&this.columnData[0].columnName==="id"&&this.columnData.shift(),this.dataTableChangesData.apptableName=this.dataTableData.applicationTableName,this.dataTableChangesData.entitySubType=this.dataTableData.entitySubType;for(let t=0;t{if(n!==""){this.isFormEdited=!0;let i={columnName:n.name,columnDisplayType:n.type,isColumnNullable:!n.mandatory,isColumnUnique:n.unique,isColumnIndexed:n.indexed,columnLength:n.length,columnCode:n.code,type:"new"},s=!1;this.columnData.forEach(d=>{(i.columnName===d.columnName||i.columnName===d.columnName&&i.columnDisplayType===d.columnDisplayType&&i.isColumnNullable===d.isColumnNullable)&&(s=!0)}),s||(this.dataTableChangesData.addColumns.push({name:n.name,type:n.type,mandatory:n.mandatory,unique:n.unique,indexed:n.indexed,length:n.length,code:n.code}),this.columnData.push(i),this.dataSource.connect().next(this.columnData))}})}editColumn(t){this.dataForDialog.columnName=t.columnName,this.dataForDialog.columnDisplayType=t.columnDisplayType,this.dataForDialog.isColumnNullable=!t.isColumnNullable,this.dataForDialog.isColumnUnique=t.isColumnUnique,this.dataForDialog.isColumnIndexed=t.isColumnIndexed,this.dataForDialog.columnLength=t.columnLength,this.dataForDialog.columnCode=t.columnCode,this.dataForDialog.type=t.type,this.dialog.open($p,{data:this.dataForDialog,height:"450px",width:"400px"}).afterClosed().subscribe(i=>{if(i!==""){if(this.isFormEdited=!0,t.type==="new")this.dataTableChangesData.addColumns[this.dataTableChangesData.addColumns.findIndex(s=>s.name===t.columnName&&s.type===t.columnDisplayType&&s.mandatory===t.isColumnNullable)]={name:i.name,type:i.type,code:i.code,mandatory:i.mandatory,length:i.length},this.columnData[this.columnData.indexOf(t)]={columnName:i.name,columnDisplayType:i.type,isColumnNullable:!i.mandatory,isColumnUnique:i.unique,isColumnIndexed:i.indexed,columnLength:i.length,columnCode:i.code,type:"new"};else if(t.type==="existing"){this.columnData[this.columnData.indexOf(t)]={columnName:i.name,columnDisplayType:t.columnDisplayType,isColumnNullable:t.isColumnNullable,isColumnUnique:t.unique,isColumnIndexed:t.indexed,columnLength:t.columnLength,columnCode:t.columnCode,type:"existing"};let s=this.dataTableChangesData.changeColumns.findIndex(d=>d.newName===t.columnName);s===-1?this.dataTableChangesData.changeColumns.push({name:t.columnName,newName:i.name,code:t.columnCode,newCode:i.code,mandatory:i.mandatory,length:i.length}):this.dataTableChangesData.changeColumns[s]={name:t.columnName,newName:i.name,code:t.columnCode,newCode:i.code,mandatory:i.mandatory,length:i.length}}this.dataSource.connect().next(this.columnData)}})}deleteColumn(t){this.dialog.open(vi,{data:{deleteContext:this.translateService.instant("labels.inputs.Column")+" "+t.columnName}}).afterClosed().subscribe(i=>{i.delete&&(this.isFormEdited=!0,this.columnData.splice(this.columnData.indexOf(t),1),this.dataSource.connect().next(this.columnData),t.type==="existing"?this.dataTableChangesData.dropColumns.push({name:t.columnName}):t.type==="new"&&this.dataTableChangesData.addColumns.splice(this.dataTableChangesData.addColumns.findIndex(s=>s.name===t.columnName&&s.type===t.columnDisplayType&&s.mandatory===t.isColumnNullable),1))})}getColumnType(t){switch(t){case"INTEGER":return"Number";case"CODELOOKUP":return"Dropdown";default:return t[0]+t.substr(1).toLowerCase()}}submit(){(!this.dataTableChangesData.addColumns||this.dataTableChangesData.addColumns.length===0)&&(this.dataTableChangesData.addColumns=void 0),(!this.dataTableChangesData.changeColumns||this.dataTableChangesData.changeColumns.length===0)&&(this.dataTableChangesData.changeColumns=void 0),(!this.dataTableChangesData.dropColumns||this.dataTableChangesData.dropColumns.length===0)&&(this.dataTableChangesData.dropColumns=void 0),this.systemService.updateDataTable(this.dataTableChangesData,this.dataTableData.registeredTableName).subscribe(t=>{this.router.navigate(["../"],{relativeTo:this.route})})}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275cmp=me({type:e,selectors:[["mifosx-edit-data-table"]],viewQuery:function(n,i){if(n&1&&(Ee(kt,7),Ee(It,7)),n&2){let s;Te(s=Me())&&(i.paginator=s.first),Te(s=Me())&&(i.sort=s.first)}},decls:63,vars:29,consts:[[1,"container"],[3,"ngSubmit","formGroup"],[1,"layout-row-wrap","gap-2px","responsive-column"],[1,"flex-40"],["matInput","","required","","formControlName","datatableName"],[1,"flex-fill","flex-20"],["required","","formControlName","apptableName"],[3,"value"],[1,"layout-row-wrap","gap-60percent","layout-lt-md-column"],[1,"mat-title","flex-20"],["mat-raised-button","","type","button","color","primary",1,"flex-20",3,"click"],["icon","plus",1,"m-r-10"],["mat-table","","matSort","",3,"dataSource"],["matColumnDef","name"],["mat-header-cell","","mat-sort-header","","class","center",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","type"],["matColumnDef","length"],["matColumnDef","code"],["matColumnDef","mandatory"],["matColumnDef","unique"],["matColumnDef","indexed"],["matColumnDef","actions"],["mat-cell","","class","center gap-15percent",4,"matCellDef"],["mat-header-row","",4,"matHeaderRowDef"],["mat-row","",4,"matRowDef","matRowDefColumns"],["showFirstLastButtons","",3,"pageSizeOptions"],[1,"layout-row","align-center","gap-5px","responsive-column"],["type","button","mat-raised-button","",3,"routerLink"],["mat-raised-button","","color","primary",3,"disabled",4,"mifosxHasPermission"],["formControlName","entitySubType"],["mat-header-cell","","mat-sort-header","",1,"center"],["mat-cell",""],["icon","check-circle","size","lg","matTooltipPosition","right",1,"column-mandatory",3,"matTooltip"],["icon","times-circle","size","lg","matTooltipPosition","right",1,"not-column-mandatory",3,"matTooltip"],["icon","times-circle","size","lg","unique","right",1,"not-column-mandatory",3,"matTooltip"],["mat-cell","",1,"center","gap-15percent"],["type","button","color","primary","mat-icon-button",""],["type","button","color","warn","mat-icon-button",""],["type","button","color","primary","mat-icon-button","",3,"click"],["icon","edit","size","lg"],["type","button","color","warn","mat-icon-button","",3,"click"],["icon","trash","size","lg"],["mat-header-row",""],["mat-row",""],["mat-raised-button","","color","primary",3,"disabled"]],template:function(n,i){n&1&&(l(0,"div",0)(1,"mat-card")(2,"form",1),R("ngSubmit",function(){return i.submit()}),l(3,"mat-card-content")(4,"div",2)(5,"mat-form-field",3)(6,"mat-label"),c(7),p(8,"translate"),r(),b(9,"input",4),r(),l(10,"mat-form-field",5)(11,"mat-label"),c(12),p(13,"translate"),r(),l(14,"mat-select",6),Se(15,tqe,3,5,"mat-option",7,Pe),r(),E(17,iqe,7,9,"mat-error"),r(),E(18,oqe,7,3,"mat-form-field",5),r(),b(19,"br"),l(20,"div",8)(21,"p",9),c(22),p(23,"translate"),r(),l(24,"button",10),R("click",function(){return i.addColumn()}),b(25,"fa-icon",11),c(26),p(27,"translate"),p(28,"translate"),r()(),b(29,"br"),l(30,"table",12),X(31,13),F(32,aqe,3,3,"th",14)(33,rqe,2,1,"td",15),Z(),X(34,16),F(35,lqe,3,3,"th",14)(36,sqe,2,1,"td",15),Z(),X(37,17),F(38,cqe,3,3,"th",14)(39,pqe,2,1,"td",15),Z(),X(40,18),F(41,mqe,3,3,"th",14)(42,dqe,2,1,"td",15),Z(),X(43,19),F(44,uqe,3,3,"th",14)(45,gqe,3,2,"td",15),Z(),X(46,20),F(47,_qe,3,3,"th",14)(48,xqe,3,2,"td",15),Z(),X(49,21),F(50,bqe,3,3,"th",14)(51,wqe,3,2,"td",15),Z(),X(52,22),F(53,Pqe,3,3,"th",14)(54,Dqe,3,2,"td",23),Z(),F(55,Eqe,1,0,"tr",24)(56,Iqe,1,0,"tr",25),r(),b(57,"mat-paginator",26),r(),l(58,"mat-card-actions",27)(59,"button",28),c(60),p(61,"translate"),r(),F(62,Oqe,3,4,"button",29),r()()()()),n&2&&(a(2),g("formGroup",i.dataTableForm),a(5),h(m(8,15,"labels.inputs.Data Table Name")),a(5),h(m(13,17,"labels.inputs.Application Table Name")),a(3),we(i.appTableData),a(2),I(i.dataTableForm.controls.apptableName.hasError("required")?17:-1),a(),I(i.showEntitySubType?18:-1),a(4),h(m(23,19,"labels.inputs.Columns")),a(4),le(" ",m(27,21,"labels.buttons.Add")," ",m(28,23,"labels.inputs.Columns")," "),a(4),g("dataSource",i.dataSource),a(25),g("matHeaderRowDef",i.displayedColumns),a(),g("matRowDefColumns",i.displayedColumns),a(),g("pageSizeOptions",oe(27,ZVe)),a(2),g("routerLink",oe(28,eqe)),a(),v(" ",m(61,25,"labels.buttons.Cancel")," "),a(2),g("mifosxHasPermission","UPDATE_DATATABLE"))},dependencies:[ue,fe,tt,st,Ue,Xe,dt,Ze,et,Ae,$e,Je,Et,Fe,Be,ut,ze,gt,ft,ve,Ke,ke,_t,It,xt,vt,bt,ri,Ct,yt,si,wi,St,Pt,wt,Tt,kt,he,Fi],styles:["table[_ngcontent-%COMP%]{width:100%}"]})}}return e})();var Aqe=["createDatatableRef"],Fqe=["templateCreateDatatableRef"],kqe=["datatablesList"],Bqe=["templateDatatablesList"],Rqe=()=>[10,25,50,100],Nqe=()=>["create"],Lqe=e=>[e];function Vqe(e,o){e&1&&(l(0,"button",23),b(1,"fa-icon",24),c(2),p(3,"translate"),r()),e&2&&(g("routerLink",oe(4,Nqe)),a(2),v(" ",m(3,2,"labels.buttons.Create Data Table")," "))}function qqe(e,o){e&1&&(l(0,"th",25),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.Data Table Name")))}function zqe(e,o){if(e&1&&(l(0,"td",26),c(1),r()),e&2){let t=o.$implicit;a(),h(t.registeredTableName)}}function Hqe(e,o){e&1&&(l(0,"th",25),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.Associated With")))}function Gqe(e,o){if(e&1&&(l(0,"td",26),c(1),r()),e&2){let t=o.$implicit;a(),h(t.applicationTableName)}}function jqe(e,o){e&1&&(l(0,"th",25),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.Sub Type")))}function $qe(e,o){if(e&1&&(l(0,"td",26),c(1),r()),e&2){let t=o.$implicit;a(),h(t.entitySubType)}}function Uqe(e,o){e&1&&b(0,"tr",27)}function Wqe(e,o){if(e&1&&b(0,"tr",28),e&2){let t=o.$implicit;g("routerLink",Nt(1,Lqe,t.registeredTableName))}}function Qqe(e,o){if(e&1){let t=Y();l(0,"h2"),c(1),p(2,"translate"),r(),l(3,"p",29),c(4),p(5,"translate"),r(),l(6,"div",30)(7,"button",31),R("click",function(){let i=V(t).popover,s=w();return i.close(),q(s.configurationWizardService.closeConfigWizard())}),c(8),p(9,"translate"),r(),l(10,"button",32),R("click",function(){let i=V(t).popover,s=w();return i.close(),q(s.previousStep())}),c(11),p(12,"translate"),r(),l(13,"button",32),R("click",function(){let i=V(t).popover,s=w(),d=xe(6),u=xe(30);return i.close(),q(s.showPopover(u,d,"bottom",!0))}),c(14),p(15,"translate"),r()()}e&2&&(a(),h(m(2,5,"labels.buttons.Create Data Table")),a(3),h(m(5,7,"labels.text.Launch a page that create new data table")),a(4),v(" ",m(9,9,"labels.buttons.Close")," "),a(3),v(" ",m(12,11,"labels.buttons.Back")," "),a(3),v(" ",m(15,13,"labels.buttons.Next")," "))}function Yqe(e,o){if(e&1){let t=Y();l(0,"h4"),c(1),p(2,"translate"),r(),l(3,"div",30)(4,"button",31),R("click",function(){let i=V(t).popover,s=w();return i.close(),q(s.configurationWizardService.closeConfigWizard())}),c(5),p(6,"translate"),r(),l(7,"button",32),R("click",function(){let i=V(t).popover,s=w(),d=xe(2),u=xe(28);return i.close(),q(s.showPopover(u,d,"bottom",!0))}),c(8),p(9,"translate"),r(),l(10,"button",32),R("click",function(){let i=V(t).popover,s=w(),d=xe(13),u=xe(32);return i.close(),q(s.showPopover(u,d,"top",!0))}),c(11),p(12,"translate"),r()()}e&2&&(a(),h(m(2,4,"labels.heading.Search bar to filter datatables")),a(4),v(" ",m(6,6,"labels.buttons.Close")," "),a(3),v(" ",m(9,8,"labels.buttons.Back")," "),a(3),v(" ",m(12,10,"labels.buttons.Next")," "))}function Jqe(e,o){if(e&1){let t=Y();l(0,"h4"),c(1),p(2,"translate"),r(),l(3,"div",30)(4,"button",31),R("click",function(){let i=V(t).popover,s=w();return i.close(),q(s.configurationWizardService.closeConfigWizard())}),c(5),p(6,"translate"),r(),l(7,"button",32),R("click",function(){let i=V(t).popover,s=w(),d=xe(6),u=xe(30);return i.close(),q(s.showPopover(u,d,"bottom",!0))}),c(8),p(9,"translate"),r(),l(10,"button",32),R("click",function(){let i=V(t).popover,s=w();return i.close(),q(s.nextStep())}),c(11),p(12,"translate"),r()()}e&2&&(a(),h(m(2,4,"labels.heading.List of all currently available data tables")),a(4),v(" ",m(6,6,"labels.buttons.Close")," "),a(3),v(" ",m(9,8,"labels.buttons.Back")," "),a(3),v(" ",m(12,10,"labels.buttons.Next")," "))}var vx=(()=>{class e{constructor(){this.route=T(Ie),this.router=T(qe),this.configurationWizardService=T(Qi),this.popoverService=T(Wi),this.displayedColumns=["registeredTableName","applicationTableName","entitySubType"],this.route.data.subscribe(t=>{this.dataTableData=t.dataTables})}applyFilter(t){this.dataSource.filter=t.trim().toLowerCase()}ngOnInit(){this.setDataTables()}setDataTables(){this.dataSource=new Wt(this.dataTableData),this.dataSource.paginator=this.paginator,this.dataSource.sort=this.sort}showPopover(t,n,i,s){setTimeout(()=>this.popoverService.open(t,n,i,s,{}),200)}ngAfterViewInit(){this.configurationWizardService.showDatatablesPage===!0&&setTimeout(()=>{this.showPopover(this.templateCreateDatatableRef,this.createDatatableRef.nativeElement,"bottom",!0)}),this.configurationWizardService.showDatatablesList===!0&&setTimeout(()=>{this.showPopover(this.templateDatatablesList,this.datatablesList.nativeElement,"top",!0)})}nextStep(){this.configurationWizardService.showDatatablesPage=!1,this.configurationWizardService.showDatatablesList=!1,this.configurationWizardService.showDatatablesForm=!0,this.router.navigate(["/system/data-tables/create"])}previousStep(){this.configurationWizardService.showDatatablesPage=!1,this.configurationWizardService.showDatatablesList=!1,this.configurationWizardService.showDatatables=!0,this.router.navigate(["/system"])}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275cmp=me({type:e,selectors:[["mifosx-manage-data-tables"]],viewQuery:function(n,i){if(n&1&&(Ee(kt,7),Ee(It,7),Ee(Aqe,5),Ee(Fqe,5),Ee(kqe,5),Ee(Bqe,5)),n&2){let s;Te(s=Me())&&(i.paginator=s.first),Te(s=Me())&&(i.sort=s.first),Te(s=Me())&&(i.createDatatableRef=s.first),Te(s=Me())&&(i.templateCreateDatatableRef=s.first),Te(s=Me())&&(i.datatablesList=s.first),Te(s=Me())&&(i.templateDatatablesList=s.first)}},decls:33,vars:9,consts:[["createDatatableRef",""],["filter",""],["datatablesList",""],["templateCreateDatatableRef",""],["templateFilter",""],["templateDatatablesList",""],[1,"container","m-b-20","layout-row","align-end","gap-20px"],[1,"in-block"],["mat-raised-button","","color","primary",3,"routerLink",4,"mifosxHasPermission"],[1,"container"],[1,"layout-row","gap-20px"],[1,"flex-fill"],["matInput","",3,"keyup"],[1,"mat-elevation-z8"],["mat-table","","matSort","",3,"dataSource"],["matColumnDef","registeredTableName"],["mat-header-cell","","mat-sort-header","",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","applicationTableName"],["matColumnDef","entitySubType"],["mat-header-row","",4,"matHeaderRowDef"],["mat-row","","class","select-row",3,"routerLink",4,"matRowDef","matRowDefColumns"],["showFirstLastButtons","",3,"pageSizeOptions"],["mat-raised-button","","color","primary",3,"routerLink"],["icon","plus",1,"m-r-10"],["mat-header-cell","","mat-sort-header",""],["mat-cell",""],["mat-header-row",""],["mat-row","",1,"select-row",3,"routerLink"],[1,"mw300"],[1,"layout-row","align-end","gap-2px","responsive-column"],["mat-raised-button","","color","warn",3,"click"],["mat-raised-button","","color","primary",3,"click"]],template:function(n,i){if(n&1){let s=Y();l(0,"div",6)(1,"div",7,0),F(3,Vqe,4,5,"button",8),r()(),l(4,"div",9)(5,"div",10,1)(7,"mat-form-field",11)(8,"mat-label"),c(9),p(10,"translate"),r(),l(11,"input",12),R("keyup",function(u){return V(s),q(i.applyFilter(u.target.value))}),r()()(),l(12,"div",13,2)(14,"table",14),X(15,15),F(16,qqe,3,3,"th",16)(17,zqe,2,1,"td",17),Z(),X(18,18),F(19,Hqe,3,3,"th",16)(20,Gqe,2,1,"td",17),Z(),X(21,19),F(22,jqe,3,3,"th",16)(23,$qe,2,1,"td",17),Z(),F(24,Uqe,1,0,"tr",20)(25,Wqe,1,3,"tr",21),r(),b(26,"mat-paginator",22),r()(),F(27,Qqe,16,15,"ng-template",null,3,ti)(29,Yqe,13,12,"ng-template",null,4,ti)(31,Jqe,13,12,"ng-template",null,5,ti)}n&2&&(a(3),g("mifosxHasPermission","CREATE_DATATABLE"),a(6),h(m(10,6,"labels.inputs.Filter")),a(5),g("dataSource",i.dataSource),a(10),g("matHeaderRowDef",i.displayedColumns),a(),g("matRowDefColumns",i.displayedColumns),a(),g("pageSizeOptions",oe(8,Rqe)))},dependencies:[ue,fe,Ae,Fe,Be,ze,ve,Ke,ke,_t,It,xt,vt,bt,ri,Ct,yt,St,Pt,wt,Tt,kt,he],styles:["table[_ngcontent-%COMP%]{width:100%}table[_ngcontent-%COMP%] .select-row[_ngcontent-%COMP%]:hover{cursor:pointer}"]})}}return e})();var Kqe=()=>[10,25,50,100],Xqe=()=>["edit"];function Zqe(e,o){e&1&&(l(0,"button",20),b(1,"fa-icon",21),c(2),p(3,"translate"),r()),e&2&&(g("routerLink",oe(4,Xqe)),a(2),v(" ",m(3,2,"labels.buttons.Edit")," "))}function eze(e,o){if(e&1){let t=Y();l(0,"button",22),R("click",function(){V(t);let i=w();return q(i.delete())}),b(1,"fa-icon",23),c(2),p(3,"translate"),r()}e&2&&(a(2),v(" ",m(3,1,"labels.buttons.Delete")," "))}function tze(e,o){e&1&&(l(0,"th",24),c(1),p(2,"translate"),r()),e&2&&(a(),v(" ",m(2,1,"labels.inputs.Field Name")," "))}function ize(e,o){if(e&1&&(l(0,"span",26),c(1),r()),e&2){let t=w().$implicit,n=w();a(),v("(",n.datatables.getCodeName(t.columnName),")")}}function nze(e,o){if(e&1&&(l(0,"td",25),c(1),E(2,ize,2,1,"span",26),r()),e&2){let t=o.$implicit,n=w();a(),v(" ",n.getFieldDisplayName(t.columnName)," "),a(),I(n.datatables.getCodeName(t.columnName)?2:-1)}}function oze(e,o){e&1&&(l(0,"th",24),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.Type")))}function aze(e,o){if(e&1&&(l(0,"td",25),c(1),r()),e&2){let t=o.$implicit;a(),h(t.columnDisplayType)}}function rze(e,o){e&1&&(l(0,"th",24),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.Length")))}function lze(e,o){if(e&1&&(l(0,"td",25),c(1),r()),e&2){let t=o.$implicit;a(),h(t.columnLength)}}function sze(e,o){e&1&&(l(0,"th",24),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.Code")))}function cze(e,o){if(e&1&&(l(0,"td",25),c(1),r()),e&2){let t=o.$implicit;a(),h(t.columnCode)}}function pze(e,o){e&1&&(l(0,"th",24),c(1),p(2,"translate"),r()),e&2&&(a(),v(" ",m(2,1,"labels.text.Mandatory")," "))}function mze(e,o){e&1&&(b(0,"fa-icon",27),p(1,"translate")),e&2&&g("matTooltip",Le(m(1,2,"tooltips.Yes")))}function dze(e,o){e&1&&(b(0,"fa-icon",28),p(1,"translate")),e&2&&g("matTooltip",Le(m(1,2,"tooltips.No")))}function uze(e,o){if(e&1&&(l(0,"td",25),E(1,mze,2,4,"fa-icon",27),E(2,dze,2,4,"fa-icon",28),r()),e&2){let t=o.$implicit;a(),I(t.isColumnNullable?-1:1),a(),I(t.isColumnNullable?2:-1)}}function fze(e,o){e&1&&(l(0,"th",24),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.Unique")))}function hze(e,o){e&1&&(b(0,"fa-icon",27),p(1,"translate")),e&2&&g("matTooltip",Le(m(1,2,"tooltips.Yes")))}function gze(e,o){e&1&&(b(0,"fa-icon",28),p(1,"translate")),e&2&&g("matTooltip",Le(m(1,2,"tooltips.No")))}function _ze(e,o){if(e&1&&(l(0,"td",25),E(1,hze,2,4,"fa-icon",27),E(2,gze,2,4,"fa-icon",28),r()),e&2){let t=o.$implicit;a(),I(t.isColumnUnique?1:-1),a(),I(t.isColumnUnique?-1:2)}}function Cze(e,o){e&1&&(l(0,"th",24),c(1),p(2,"translate"),r()),e&2&&(a(),v(" ",m(2,1,"labels.inputs.Indexed")," "))}function vze(e,o){e&1&&(b(0,"fa-icon",27),p(1,"translate")),e&2&&g("matTooltip",Le(m(1,2,"tooltips.Yes")))}function xze(e,o){e&1&&(b(0,"fa-icon",28),p(1,"translate")),e&2&&g("matTooltip",Le(m(1,2,"tooltips.No")))}function bze(e,o){if(e&1&&(l(0,"td",25),E(1,vze,2,4,"fa-icon",27),E(2,xze,2,4,"fa-icon",28),r()),e&2){let t=o.$implicit;a(),I(t.isColumnIndexed?1:-1),a(),I(t.isColumnIndexed?-1:2)}}function yze(e,o){e&1&&b(0,"tr",29)}function Sze(e,o){e&1&&b(0,"tr",30)}var xx=(()=>{class e{constructor(){this.route=T(Ie),this.systemService=T(ii),this.router=T(qe),this.dialog=T(Ht),this.translateService=T(yi),this.datatables=T(Qg),this.displayedColumns=["columnName","columnDisplayType","columnLength","columnCode","isColumnNullable","isColumnUnique","isColumnIndexed"],this.route.data.subscribe(t=>{this.dataTableData=t.dataTable,this.columnsData=this.dataTableData.columnHeaderData})}ngOnInit(){this.setColumnsTable()}getFieldDisplayName(t){return this.datatables.toDisplayLabel(t)}setColumnsTable(){this.columnsData.shift(),this.dataSource=new Wt(this.columnsData),this.dataSource.paginator=this.paginator,this.dataSource.sort=this.sort}delete(){this.dialog.open(vi,{data:{deleteContext:this.translateService.instant("labels.inputs.Data Table")+" "+this.dataTableData.registeredTableName}}).afterClosed().subscribe(n=>{n.delete&&this.systemService.deleteDataTable(this.dataTableData.registeredTableName).subscribe(()=>{this.router.navigate(["/system/data-tables"],{relativeTo:this.route})})})}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275cmp=me({type:e,selectors:[["mifosx-view-data-table"]],viewQuery:function(n,i){if(n&1&&(Ee(kt,7),Ee(It,7)),n&2){let s;Te(s=Me())&&(i.paginator=s.first),Te(s=Me())&&(i.sort=s.first)}},decls:38,vars:11,consts:[[1,"container","m-b-20","layout-row","align-end","gap-20px"],["mat-raised-button","","color","primary",3,"routerLink",4,"mifosxHasPermission"],["mat-raised-button","","color","warn",3,"click",4,"mifosxHasPermission"],[1,"container","m-b-15","layout-align-start"],[1,"layout-row-wrap","responsive-column","gap-12px"],[1,"mat-body-strong"],[1,"container","mat-elevation-z8"],["mat-table","","matSort","",3,"dataSource"],["matColumnDef","columnName"],["mat-header-cell","","mat-sort-header","","class","center",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","columnDisplayType"],["matColumnDef","columnLength"],["matColumnDef","columnCode"],["matColumnDef","isColumnNullable"],["matColumnDef","isColumnUnique"],["matColumnDef","isColumnIndexed"],["mat-header-row","",4,"matHeaderRowDef"],["mat-row","",4,"matRowDef","matRowDefColumns"],["showFirstLastButtons","",3,"pageSizeOptions"],["mat-raised-button","","color","primary",3,"routerLink"],["icon","edit",1,"m-r-10"],["mat-raised-button","","color","warn",3,"click"],["icon","trash",1,"m-r-10"],["mat-header-cell","","mat-sort-header","",1,"center"],["mat-cell",""],[1,"code-name"],["icon","check-circle","size","lg","matTooltipPosition","right",1,"column-mandatory",3,"matTooltip"],["icon","times-circle","size","lg","matTooltipPosition","right",1,"not-column-mandatory",3,"matTooltip"],["mat-header-row",""],["mat-row",""]],template:function(n,i){n&1&&(l(0,"div",0),F(1,Zqe,4,5,"button",1)(2,eze,4,3,"button",2),r(),l(3,"div",3)(4,"mat-card")(5,"mat-card-content")(6,"div",4)(7,"div",5),c(8),p(9,"translate"),r(),l(10,"div"),c(11),r()()()()(),l(12,"div",6)(13,"table",7),X(14,8),F(15,tze,3,3,"th",9)(16,nze,3,2,"td",10),Z(),X(17,11),F(18,oze,3,3,"th",9)(19,aze,2,1,"td",10),Z(),X(20,12),F(21,rze,3,3,"th",9)(22,lze,2,1,"td",10),Z(),X(23,13),F(24,sze,3,3,"th",9)(25,cze,2,1,"td",10),Z(),X(26,14),F(27,pze,3,3,"th",9)(28,uze,3,2,"td",10),Z(),X(29,15),F(30,fze,3,3,"th",9)(31,_ze,3,2,"td",10),Z(),X(32,16),F(33,Cze,3,3,"th",9)(34,bze,3,2,"td",10),Z(),F(35,yze,1,0,"tr",17)(36,Sze,1,0,"tr",18),r(),b(37,"mat-paginator",19),r()),n&2&&(a(),g("mifosxHasPermission","UPDATE_DATATABLE"),a(),g("mifosxHasPermission","DELETE_DATATABLE"),a(6),v(" ",m(9,8,"labels.inputs.Associated With")," "),a(3),v(" ",i.dataTableData.applicationTableName," "),a(2),g("dataSource",i.dataSource),a(22),g("matHeaderRowDef",i.displayedColumns),a(),g("matRowDefColumns",i.displayedColumns),a(),g("pageSizeOptions",oe(10,Kqe)))},dependencies:[ue,fe,Ae,$e,Je,ve,Ke,ke,_t,It,xt,vt,bt,ri,Ct,yt,si,St,Pt,wt,Tt,kt,he],styles:["table[_ngcontent-%COMP%]{width:100%}.code-name[_ngcontent-%COMP%]{opacity:.6;font-size:.9em;margin-left:4px}"]})}}return e})();function wze(e,o){if(e&1&&(l(0,"mat-option",4),c(1),p(2,"translateKey"),r()),e&2){let t=o.$implicit;g("value",t.name),a(),v(" ",Ot(2,2,t.name,"catalogs")," ")}}function Pze(e,o){e&1&&(l(0,"mat-error"),c(1),p(2,"translate"),p(3,"translate"),l(4,"strong"),c(5),p(6,"translate"),r()()),e&2&&(a(),le(" ",m(2,3,"labels.inputs.Grouping")," ",m(3,5,"labels.commons.is")," "),a(4),h(m(6,7,"labels.commons.required")))}function Tze(e,o){if(e&1&&(l(0,"mat-option",4),c(1),r()),e&2){let t=o.$implicit;g("value",t.name),a(),v(" ",t.name," ")}}function Mze(e,o){e&1&&(l(0,"mat-error"),c(1),p(2,"translate"),p(3,"translate"),l(4,"strong"),c(5),p(6,"translate"),r()()),e&2&&(a(),le(" ",m(2,3,"labels.inputs.Entity")," ",m(3,5,"labels.commons.is")," "),a(4),h(m(6,7,"labels.commons.required")))}function Dze(e,o){if(e&1&&(l(0,"mat-option",4),c(1),r()),e&2){let t=o.$implicit;g("value",t),a(),v(" ",t," ")}}function Eze(e,o){e&1&&(l(0,"mat-error"),c(1),p(2,"translate"),p(3,"translate"),l(4,"strong"),c(5),p(6,"translate"),r()()),e&2&&(a(),le(" ",m(2,3,"labels.inputs.Action")," ",m(3,5,"labels.commons.is")," "),a(4),h(m(6,7,"labels.commons.required")))}var iu=(()=>{class e{constructor(){this.dialogRef=T(eo),this.formBuilder=T(nt),this.data=T(Po),this.entityData=new Array,this.actionData=new Array}ngOnInit(){this.eventForm=this.formBuilder.group({grouping:["",se.required],entity:["",se.required],action:["",se.required]}),this.setGroupingListener(),this.setEntityListener()}setGroupingListener(){this.eventForm.get("grouping").valueChanges.subscribe(t=>{this.entityData=this.data.groupings.find(n=>n.name===t).entities})}setEntityListener(){this.eventForm.get("entity").valueChanges.subscribe(t=>{this.actionData=this.entityData.find(n=>n.name===t).actions})}submit(){this.dialogRef.close(this.eventForm.value)}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275cmp=me({type:e,selectors:[["mifosx-add-event-dialog"]],decls:37,vars:23,consts:[["mat-dialog-title",""],[3,"formGroup"],[1,"layout-column"],["required","","formControlName","grouping"],[3,"value"],["required","","formControlName","entity"],["required","","formControlName","action"],["align","end"],["mat-button","","mat-dialog-close",""],["mat-raised-button","","color","primary",3,"click","disabled"]],template:function(n,i){n&1&&(l(0,"h1",0),c(1),p(2,"translate"),r(),l(3,"mat-dialog-content")(4,"form",1)(5,"div",2)(6,"mat-form-field")(7,"mat-label"),c(8),p(9,"translate"),r(),l(10,"mat-select",3),Se(11,wze,3,5,"mat-option",4,Pe),r(),E(13,Pze,7,9,"mat-error"),r(),l(14,"mat-form-field")(15,"mat-label"),c(16),p(17,"translate"),r(),l(18,"mat-select",5),Se(19,Tze,2,2,"mat-option",4,Pe),r(),E(21,Mze,7,9,"mat-error"),r(),l(22,"mat-form-field")(23,"mat-label"),c(24),p(25,"translate"),r(),l(26,"mat-select",6),Se(27,Dze,2,2,"mat-option",4,Pe),r(),E(29,Eze,7,9,"mat-error"),r()()()(),l(30,"mat-dialog-actions",7)(31,"button",8),c(32),p(33,"translate"),r(),l(34,"button",9),R("click",function(){return i.submit()}),c(35),p(36,"translate"),r()()),n&2&&(a(),h(m(2,11,"labels.buttons.Add Event")),a(3),g("formGroup",i.eventForm),a(4),h(m(9,13,"labels.inputs.Select Grouping")),a(3),we(i.data.groupings),a(2),I(i.eventForm.controls.grouping.hasError("required")?13:-1),a(3),h(m(17,15,"labels.inputs.Select Entity")),a(3),we(i.entityData),a(2),I(i.eventForm.controls.entity.hasError("required")?21:-1),a(3),h(m(25,17,"labels.inputs.Select Action")),a(3),we(i.actionData),a(2),I(i.eventForm.controls.action.hasError("required")?29:-1),a(3),h(m(33,19,"labels.buttons.Cancel")),a(2),g("disabled",!i.eventForm.valid||i.eventForm.pristine),a(),v(" ",m(36,21,"labels.buttons.Submit")," "))},dependencies:[ue,fe,tt,Ue,Xe,dt,Ze,et,Fe,Be,ut,gt,ft,ve,Wn,ho,Nn,Un,he,Fi],encapsulation:2})}}return e})();var Ize=()=>["../"];function Oze(e,o){if(e&1&&(l(0,"mat-option",6),c(1),p(2,"translateKey"),r()),e&2){let t=o.$implicit;g("value",t.name),a(),v(" ",Ot(2,2,t.name,"text")," ")}}function Aze(e,o){e&1&&(l(0,"mat-error"),c(1),p(2,"translate"),p(3,"translate"),l(4,"strong"),c(5),p(6,"translate"),r()()),e&2&&(a(),le(" ",m(2,3,"labels.inputs.Hook Template")," ",m(3,5,"labels.commons.is")," "),a(4),h(m(6,7,"labels.commons.required")))}function Fze(e,o){e&1&&(l(0,"mat-error"),c(1),p(2,"translate"),p(3,"translate"),l(4,"strong"),c(5),p(6,"translate"),r()()),e&2&&(a(),le(" ",m(2,3,"labels.inputs.Display Name")," ",m(3,5,"labels.commons.is")," "),a(4),h(m(6,7,"labels.commons.required")))}function kze(e,o){e&1&&(l(0,"mat-error"),c(1),p(2,"translate"),p(3,"translate"),l(4,"strong"),c(5),p(6,"translate"),r()()),e&2&&(a(),le(" ",m(2,3,"labels.inputs.Content Type")," ",m(3,5,"labels.commons.is")," "),a(4),h(m(6,7,"labels.commons.required")))}function Bze(e,o){if(e&1&&(l(0,"mat-form-field",4)(1,"mat-label"),c(2),p(3,"translate"),r(),l(4,"mat-select",29)(5,"mat-option",6),c(6),p(7,"translate"),r(),l(8,"mat-option",6),c(9),p(10,"translate"),r()(),E(11,kze,7,9,"mat-error"),r()),e&2){let t=w();a(2),h(m(3,6,"labels.inputs.Content Type")),a(3),g("value","json"),a(),v(" ",m(7,8,"labels.inputs.json")," "),a(2),g("value","form"),a(),v(" ",m(10,10,"labels.inputs.form")," "),a(2),I(t.hookForm.controls.contentType.hasError("required")?11:-1)}}function Rze(e,o){e&1&&(l(0,"mat-error"),c(1),p(2,"translate"),p(3,"translate"),l(4,"strong"),c(5),p(6,"translate"),r()()),e&2&&(a(),le(" ",m(2,3,"labels.inputs.Payload URL")," ",m(3,5,"labels.commons.is")," "),a(4),h(m(6,7,"labels.commons.required")))}function Nze(e,o){if(e&1&&(l(0,"mat-form-field",8)(1,"mat-label"),c(2),p(3,"translate"),r(),b(4,"input",30,0),l(6,"mat-hint",31),c(7),r(),E(8,Rze,7,9,"mat-error"),r()),e&2){let t=xe(5),n=w();a(2),h(m(3,3,"labels.inputs.Phone Number")),a(5),v("",(t.value==null?null:t.value.length)||0,"/10"),a(),I(n.hookForm.controls.phoneNumber.hasError("required")?8:-1)}}function Lze(e,o){e&1&&(l(0,"mat-error"),c(1),p(2,"translate"),p(3,"translate"),l(4,"strong"),c(5),p(6,"translate"),r()()),e&2&&(a(),le(" ",m(2,3,"labels.inputs.Payload URL")," ",m(3,5,"labels.commons.is")," "),a(4),h(m(6,7,"labels.commons.required")))}function Vze(e,o){e&1&&(l(0,"mat-error"),c(1),p(2,"translate"),p(3,"translate"),l(4,"strong"),c(5),p(6,"translate"),r()()),e&2&&(a(),le(" ",m(2,3,"labels.inputs.SMS Provider")," ",m(3,5,"labels.commons.is")," "),a(4),h(m(6,7,"labels.commons.required")))}function qze(e,o){e&1&&(l(0,"mat-error"),c(1),p(2,"translate"),p(3,"translate"),l(4,"strong"),c(5),p(6,"translate"),r()()),e&2&&(a(),le(" ",m(2,3,"labels.inputs.SMS Provider Account ID")," ",m(3,5,"labels.commons.is")," "),a(4),h(m(6,7,"labels.commons.required")))}function zze(e,o){e&1&&(l(0,"mat-error"),c(1),p(2,"translate"),p(3,"translate"),l(4,"strong"),c(5),p(6,"translate"),r()()),e&2&&(a(),le(" ",m(2,3,"labels.inputs.SMS Provider Token")," ",m(3,5,"labels.commons.is")," "),a(4),h(m(6,7,"labels.commons.required")))}function Hze(e,o){if(e&1&&(l(0,"div",3)(1,"mat-form-field",32)(2,"mat-label"),c(3),p(4,"translate"),r(),b(5,"input",33),E(6,Vze,7,9,"mat-error"),r(),l(7,"mat-form-field",32)(8,"mat-label"),c(9),p(10,"translate"),r(),b(11,"input",34),E(12,qze,7,9,"mat-error"),r(),l(13,"mat-form-field",32)(14,"mat-label"),c(15),p(16,"translate"),r(),b(17,"input",35),E(18,zze,7,9,"mat-error"),r()()),e&2){let t=w();a(3),h(m(4,6,"labels.inputs.SMS Provider")),a(3),I(t.hookForm.controls.smsProvider.hasError("required")?6:-1),a(3),h(m(10,8,"labels.inputs.SMS Provider Account ID")),a(3),I(t.hookForm.controls.smsProviderAccountId.hasError("required")?12:-1),a(3),h(m(16,10,"labels.inputs.SMS Provider Token")),a(3),I(t.hookForm.controls.smsProviderToken.hasError("required")?18:-1)}}function Gze(e,o){e&1&&(l(0,"th",36),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.Entity Name")))}function jze(e,o){if(e&1&&(l(0,"td",37),c(1),r()),e&2){let t=o.$implicit;a(),h(t.entityName)}}function $ze(e,o){e&1&&(l(0,"th",36),c(1),p(2,"translate"),p(3,"translate"),r()),e&2&&(a(),le(" ",m(2,2,"labels.inputs.Action")," ",m(3,4,"labels.inputs.Name")," "))}function Uze(e,o){if(e&1&&(l(0,"td",37),c(1),r()),e&2){let t=o.$implicit;a(),h(t.actionName)}}function Wze(e,o){e&1&&(l(0,"th",38),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.Actions")))}function Qze(e,o){if(e&1){let t=Y();l(0,"td",39)(1,"button",40),R("click",function(){let i=V(t).index,s=w();return q(s.deleteEvent(i))}),b(2,"fa-icon",41),r()()}}function Yze(e,o){e&1&&b(0,"tr",42)}function Jze(e,o){e&1&&b(0,"tr",43)}function Kze(e,o){if(e&1&&(l(0,"button",44),c(1),p(2,"translate"),r()),e&2){let t=w();g("disabled",!t.hookForm.valid),a(),v(" ",m(2,2,"labels.buttons.Submit")," ")}}var bx=(()=>{class e{constructor(){this.route=T(Ie),this.systemService=T(ii),this.router=T(qe),this.formBuilder=T(nt),this.dialog=T(Ht),this.translateService=T(yi),this.displayedColumns=["entityName","actionName","actions"],this.eventsData=[],this.route.data.subscribe(t=>{this.hooksTemplateData=t.hooksTemplate})}ngOnInit(){this.createHookForm(),this.hookForm.get("name").valueChanges.subscribe(t=>{t==="Web"?(this.hookForm.get("contentType").enable(),this.hookForm.get("phoneNumber").disable(),this.hookForm.get("smsProvider").disable(),this.hookForm.get("smsProviderAccountId").disable(),this.hookForm.get("smsProviderToken").disable()):(this.hookForm.get("contentType").disable(),this.hookForm.get("phoneNumber").enable(),this.hookForm.get("smsProvider").enable(),this.hookForm.get("smsProviderAccountId").enable(),this.hookForm.get("smsProviderToken").enable())}),this.setEvents()}setEvents(){this.dataSource=new Wt(this.eventsData),this.dataSource.sort=this.sort}createHookForm(){this.hookForm=this.formBuilder.group({name:["Web",se.required],displayName:["",se.required],isActive:[""],phoneNumber:[{value:"",disabled:!0},se.required],smsProvider:[{value:"",disabled:!0},se.required],smsProviderAccountId:[{value:"",disabled:!0},se.required],smsProviderToken:[{value:"",disabled:!0},se.required],contentType:["",se.required],payloadUrl:["",se.required]})}addEvent(){this.dialog.open(iu,{data:this.hooksTemplateData}).afterClosed().subscribe(n=>{n&&(this.eventsData.push({entityName:n.entity,actionName:n.action}),this.dataSource.connect().next(this.eventsData))})}deleteEvent(t){this.dialog.open(vi,{data:{deleteContext:this.translateService.instant("labels.inputs.event with entity name of")+" "+this.eventsData[t].entityName}}).afterClosed().subscribe(i=>{i.delete&&(this.eventsData.splice(t,1),this.dataSource.connect().next(this.eventsData))})}submit(){let t={name:this.hookForm.get("name").value,isActive:this.hookForm.get("isActive").value,displayName:this.hookForm.get("displayName").value,events:this.eventsData,config:{"Payload URL":this.hookForm.get("payloadUrl").value,"Content Type":this.hookForm.get("contentType").enabled?this.hookForm.get("contentType").value:void 0,"SMS Provider":this.hookForm.get("smsProvider").enabled?this.hookForm.get("smsProvider").value:void 0,"SMS Provider Account Id":this.hookForm.get("smsProviderAccountId").enabled?this.hookForm.get("smsProviderAccountId").value:void 0,"SMS Provider Token":this.hookForm.get("smsProviderToken").enabled?this.hookForm.get("smsProviderToken").value:void 0}};this.systemService.createHook(t).subscribe(n=>{this.router.navigate(["../",n.resourceId],{relativeTo:this.route})})}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275cmp=me({type:e,selectors:[["mifosx-create-hook"]],viewQuery:function(n,i){if(n&1&&Ee(It,7),n&2){let s;Te(s=Me())&&(i.sort=s.first)}},decls:62,vars:37,consts:[["input",""],[1,"container"],[3,"ngSubmit","formGroup"],[1,"layout-row-wrap","responsive-column","gap-4percent"],[1,"flex-40"],["required","","formControlName","name"],[3,"value"],["matInput","","required","","formControlName","displayName"],[1,"flex-fill","flex-40"],["matInput","","required","","formControlName","payloadUrl"],[1,"layout-row-wrap","responsive-column","align-center"],[1,"mat-title","flex-20"],[1,"red"],["mat-raised-button","","type","button","color","primary",1,"AddEventButton","flex-20",3,"click"],["icon","plus",1,"m-r-10"],["labelPosition","before","formControlName","isActive",1,"is-active","flex-10","m-l-20"],["mat-table","","matSort","",3,"dataSource"],["matColumnDef","entityName"],["mat-header-cell","","mat-sort-header","",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","actionName"],["matColumnDef","actions"],["mat-header-cell","",4,"matHeaderCellDef"],["mat-cell","","class","gap-15percent",4,"matCellDef"],["mat-header-row","",4,"matHeaderRowDef"],["mat-row","",4,"matRowDef","matRowDefColumns"],[1,"layout-row","align-center","gap-5px","responsive-column"],["type","button","mat-raised-button","",3,"routerLink"],["mat-raised-button","","color","primary",3,"disabled",4,"mifosxHasPermission"],["required","","formControlName","contentType"],["matInput","","type","tel","maxlength","10","required","","formControlName","phoneNumber"],["align","end"],[1,"flex-30"],["matInput","","required","","formControlName","smsProvider"],["matInput","","required","","formControlName","smsProviderAccountId"],["matInput","","required","","formControlName","smsProviderToken"],["mat-header-cell","","mat-sort-header",""],["mat-cell",""],["mat-header-cell",""],["mat-cell","",1,"gap-15percent"],["type","button","color","warn","mat-icon-button","",1,"flex-8",3,"click"],["icon","trash","size","lg"],["mat-header-row",""],["mat-row",""],["mat-raised-button","","color","primary",3,"disabled"]],template:function(n,i){n&1&&(l(0,"div",1)(1,"mat-card")(2,"form",2),R("ngSubmit",function(){return i.submit()}),l(3,"mat-card-content")(4,"div",3)(5,"mat-form-field",4)(6,"mat-label"),c(7),p(8,"translate"),r(),l(9,"mat-select",5),Se(10,Oze,3,5,"mat-option",6,Pe),r(),E(12,Aze,7,9,"mat-error"),r(),l(13,"mat-form-field",4)(14,"mat-label"),c(15),p(16,"translate"),r(),b(17,"input",7),E(18,Fze,7,9,"mat-error"),r()(),l(19,"div",3),E(20,Bze,12,12,"mat-form-field",4),E(21,Nze,9,5,"mat-form-field",8),l(22,"mat-form-field",4)(23,"mat-label"),c(24),p(25,"translate"),r(),b(26,"input",9),E(27,Lze,7,9,"mat-error"),r()(),E(28,Hze,19,12,"div",3),b(29,"br")(30,"br"),l(31,"div",10)(32,"p",11),c(33),p(34,"translate"),l(35,"span",12),c(36,"*"),r()(),l(37,"button",13),R("click",function(){return i.addEvent()}),b(38,"fa-icon",14),c(39),p(40,"translate"),p(41,"translate"),r(),l(42,"mat-checkbox",15),c(43),p(44,"translate"),r()(),l(45,"table",16),X(46,17),F(47,Gze,3,3,"th",18)(48,jze,2,1,"td",19),Z(),X(49,20),F(50,$ze,4,6,"th",18)(51,Uze,2,1,"td",19),Z(),X(52,21),F(53,Wze,3,3,"th",22)(54,Qze,3,0,"td",23),Z(),F(55,Yze,1,0,"tr",24)(56,Jze,1,0,"tr",25),r()(),l(57,"mat-card-actions",26)(58,"button",27),c(59),p(60,"translate"),r(),F(61,Kze,3,4,"button",28),r()()()()),n&2&&(a(2),g("formGroup",i.hookForm),a(5),h(m(8,20,"labels.inputs.Hook Template")),a(3),we(i.hooksTemplateData.templates),a(2),I(i.hookForm.controls.name.hasError("required")?12:-1),a(3),h(m(16,22,"labels.inputs.Display Name")),a(3),I(i.hookForm.controls.displayName.hasError("required")?18:-1),a(2),I(i.hookForm.controls.name.value==="Web"?20:-1),a(),I(i.hookForm.controls.name.value==="SMS Bridge"?21:-1),a(3),h(m(25,24,"labels.inputs.Payload URL")),a(3),I(i.hookForm.controls.payloadUrl.hasError("required")?27:-1),a(),I(i.hookForm.controls.name.value==="SMS Bridge"?28:-1),a(5),h(m(34,26,"labels.inputs.Events")),a(6),le(" ",m(40,28,"labels.buttons.Add")," ",m(41,30,"labels.inputs.Events")," "),a(4),v(" ",m(44,32,"labels.inputs.Is Active"),"? "),a(2),g("dataSource",i.dataSource),a(10),g("matHeaderRowDef",i.displayedColumns),a(),g("matRowDefColumns",i.displayedColumns),a(2),g("routerLink",oe(36,Ize)),a(),v(" ",m(60,34,"labels.buttons.Cancel")," "),a(2),g("mifosxHasPermission","CREATE_HOOK"))},dependencies:[ue,fe,tt,st,Ue,Xe,dt,qa,Ze,et,Ae,$e,Je,Et,Fe,Be,ut,za,ze,gt,ft,ve,fi,Ke,ke,_t,It,xt,vt,bt,ri,Ct,yt,wi,St,Pt,wt,Tt,he,Fi],styles:["@media (width >= 992px){.is-active-wrapper[_ngcontent-%COMP%]{position:relative}.is-active-wrapper[_ngcontent-%COMP%] .is-active[_ngcontent-%COMP%]{padding:0 0 17.5px;position:absolute;bottom:0;right:0}}mat-divider[_ngcontent-%COMP%]{margin:0 0 .5em}table[_ngcontent-%COMP%]{width:100%}.AddEventButton[_ngcontent-%COMP%]{margin-bottom:10px}"]})}}return e})();var Xze=()=>["../"];function Zze(e,o){if(e&1&&(l(0,"mat-option",6),c(1),p(2,"translateKey"),r()),e&2){let t=o.$implicit;g("value",t.name),a(),v(" ",Ot(2,2,t.name,"text")," ")}}function eHe(e,o){e&1&&(l(0,"mat-error"),c(1),p(2,"translate"),p(3,"translate"),l(4,"strong"),c(5),p(6,"translate"),r()()),e&2&&(a(),le(" ",m(2,3,"labels.inputs.Hook Template")," ",m(3,5,"labels.commons.is")," "),a(4),h(m(6,7,"labels.commons.required")))}function tHe(e,o){e&1&&(l(0,"mat-error"),c(1),p(2,"translate"),p(3,"translate"),l(4,"strong"),c(5),p(6,"translate"),r()()),e&2&&(a(),le(" ",m(2,3,"labels.inputs.Display Name")," ",m(3,5,"labels.commons.is")," "),a(4),h(m(6,7,"labels.commons.required")))}function iHe(e,o){e&1&&(l(0,"mat-error"),c(1),p(2,"translate"),p(3,"translate"),l(4,"strong"),c(5),p(6,"translate"),r()()),e&2&&(a(),le(" ",m(2,3,"labels.inputs.Content Type")," ",m(3,5,"labels.commons.is")," "),a(4),h(m(6,7,"labels.commons.required")))}function nHe(e,o){if(e&1&&(l(0,"mat-form-field",10)(1,"mat-label"),c(2),p(3,"translate"),r(),l(4,"mat-select",31)(5,"mat-option",6),c(6),p(7,"translate"),r(),l(8,"mat-option",6),c(9),p(10,"translate"),r()(),E(11,iHe,7,9,"mat-error"),r()),e&2){let t=w();a(2),h(m(3,6,"labels.inputs.Content Type")),a(3),g("value","json"),a(),v(" ",m(7,8,"labels.inputs.json")," "),a(2),g("value","form"),a(),v(" ",m(10,10,"labels.inputs.form")," "),a(2),I(t.hookForm.controls.contentType.hasError("required")?11:-1)}}function oHe(e,o){e&1&&(l(0,"mat-error"),c(1),p(2,"translate"),p(3,"translate"),l(4,"strong"),c(5),p(6,"translate"),r()()),e&2&&(a(),le(" ",m(2,3,"labels.inputs.Payload URL")," ",m(3,5,"labels.commons.is")," "),a(4),h(m(6,7,"labels.commons.required")))}function aHe(e,o){if(e&1&&(l(0,"mat-form-field",10)(1,"mat-label"),c(2),p(3,"translate"),r(),b(4,"input",32,0),l(6,"mat-hint",33),c(7),r(),E(8,oHe,7,9,"mat-error"),r()),e&2){let t=xe(5),n=w();a(2),h(m(3,3,"labels.inputs.Phone Number")),a(5),v("",(t.value==null?null:t.value.length)||0,"/10"),a(),I(n.hookForm.controls.phoneNumber.hasError("required")?8:-1)}}function rHe(e,o){e&1&&(l(0,"mat-error"),c(1),p(2,"translate"),p(3,"translate"),l(4,"strong"),c(5),p(6,"translate"),r()()),e&2&&(a(),le(" ",m(2,3,"labels.inputs.Payload URL")," ",m(3,5,"labels.commons.is")," "),a(4),h(m(6,7,"labels.commons.required")))}function lHe(e,o){e&1&&(l(0,"mat-error"),c(1),p(2,"translate"),p(3,"translate"),l(4,"strong"),c(5),p(6,"translate"),r()()),e&2&&(a(),le(" ",m(2,3,"labels.inputs.SMS Provider")," ",m(3,5,"labels.commons.is")," "),a(4),h(m(6,7,"labels.commons.required")))}function sHe(e,o){e&1&&(l(0,"mat-error"),c(1),p(2,"translate"),p(3,"translate"),l(4,"strong"),c(5),p(6,"translate"),r()()),e&2&&(a(),le(" ",m(2,3,"labels.inputs.SMS Provider Account ID")," ",m(3,5,"labels.commons.is")," "),a(4),h(m(6,7,"labels.commons.required")))}function cHe(e,o){e&1&&(l(0,"mat-error"),c(1),p(2,"translate"),p(3,"translate"),l(4,"strong"),c(5),p(6,"translate"),r()()),e&2&&(a(),le(" ",m(2,3,"labels.inputs.SMS Provider Token")," ",m(3,5,"labels.commons.is")," "),a(4),h(m(6,7,"labels.commons.required")))}function pHe(e,o){if(e&1&&(l(0,"div",3)(1,"mat-form-field",34)(2,"mat-label"),c(3),p(4,"translate"),r(),b(5,"input",35),E(6,lHe,7,9,"mat-error"),r(),l(7,"mat-form-field",34)(8,"mat-label"),c(9),p(10,"translate"),r(),b(11,"input",36),E(12,sHe,7,9,"mat-error"),r(),l(13,"mat-form-field",34)(14,"mat-label"),c(15),p(16,"translate"),r(),b(17,"input",37),E(18,cHe,7,9,"mat-error"),r()()),e&2){let t=w();a(3),h(m(4,6,"labels.inputs.SMS Provider")),a(3),I(t.hookForm.controls.smsProvider.hasError("required")?6:-1),a(3),h(m(10,8,"labels.inputs.SMS Provider Account ID")),a(3),I(t.hookForm.controls.smsProviderAccountId.hasError("required")?12:-1),a(3),h(m(16,10,"labels.inputs.SMS Provider Token")),a(3),I(t.hookForm.controls.smsProviderToken.hasError("required")?18:-1)}}function mHe(e,o){e&1&&(l(0,"th",38),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.Entity Name")))}function dHe(e,o){if(e&1&&(l(0,"td",39),c(1),r()),e&2){let t=o.$implicit;a(),h(t.entityName)}}function uHe(e,o){e&1&&(l(0,"th",38),c(1),p(2,"translate"),p(3,"translate"),r()),e&2&&(a(),le(" ",m(2,2,"labels.inputs.Action")," ",m(3,4,"labels.inputs.Name")," "))}function fHe(e,o){if(e&1&&(l(0,"td",39),c(1),r()),e&2){let t=o.$implicit;a(),h(t.actionName)}}function hHe(e,o){e&1&&(l(0,"div",23)(1,"p"),c(2,"At least one event is required. Cannot delete the last event."),r()())}function gHe(e,o){e&1&&(l(0,"th",40),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.Actions")))}function _He(e,o){if(e&1){let t=Y();l(0,"td",39)(1,"button",41),R("click",function(){let i=V(t).index,s=w();return q(s.deleteEvent(i))}),b(2,"fa-icon",42),r()()}}function CHe(e,o){e&1&&b(0,"tr",43)}function vHe(e,o){e&1&&b(0,"tr",44)}function xHe(e,o){if(e&1&&(l(0,"button",45),c(1),p(2,"translate"),r()),e&2){let t=w();g("disabled",(!t.hookForm.valid||t.hookForm.pristine)&&!t.eventsDataChanged),a(),v(" ",m(2,2,"labels.buttons.Submit")," ")}}var yx=(()=>{class e{constructor(){this.route=T(Ie),this.systemService=T(ii),this.router=T(qe),this.formBuilder=T(nt),this.dialog=T(Ht),this.translateService=T(yi),this.snackBar=T(x0),this.cdr=T(ts),this.displayedColumns=["entityName","actionName","actions"],this.eventsData=[],this.cannotDeleteLastEvent=!1,this.eventsDataChanged=!1,this.route.data.subscribe(t=>{this.hooksTemplateData=t.hooksTemplate,this.hookData=t.hook,this.eventsData=t.hook.events?t.hook.events:[]})}ngOnInit(){this.createHookForm(),this.setEvents()}setEvents(){this.dataSource=new Wt(this.eventsData),this.dataSource.sort=this.sort}createHookForm(){this.hookForm=this.formBuilder.group({name:[{value:this.hookData.name,disabled:!0},se.required],displayName:[this.hookData.displayName,se.required],isActive:[this.hookData.isActive],phoneNumber:[{value:this.hookData.name==="SMS Bridge"?this.hookData.config[1].fieldValue:"",disabled:this.hookData.name!=="SMS Bridge"},se.required],smsProvider:[{value:this.hookData.name==="SMS Bridge"?this.hookData.config[2].fieldValue:"",disabled:this.hookData.name!=="SMS Bridge"},se.required],smsProviderAccountId:[{value:this.hookData.name==="SMS Bridge"?this.hookData.config[3].fieldValue:"",disabled:this.hookData.name!=="SMS Bridge"},se.required],smsProviderToken:[{value:this.hookData.name==="SMS Bridge"?this.hookData.config[4].fieldValue:"",disabled:this.hookData.name!=="SMS Bridge"},se.required],contentType:[{value:this.hookData.name==="Web"?this.hookData.config[0].fieldValue:"",disabled:this.hookData.name!=="Web"},se.required],payloadUrl:[this.hookData.name==="Web"?this.hookData.config[1].fieldValue:this.hookData.config[0].fieldValue,se.required]})}addEvent(){this.dialog.open(iu,{data:this.hooksTemplateData}).afterClosed().subscribe(n=>{n&&(this.eventsData.push({entityName:n.entity,actionName:n.action}),this.dataSource.connect().next(this.eventsData),this.eventsDataChanged=!0)})}deleteEvent(t){if(this.eventsData.length===1){this.snackBar.open("At least one event is required. Cannot delete the last event.","Close",{duration:3e3,panelClass:["error-snackbar"]});return}this.dialog.open(vi,{data:{deleteContext:this.translateService.instant("labels.inputs.event with entity name of")+" "+this.eventsData[t].entityName}}).afterClosed().subscribe(i=>{i.delete&&(this.eventsData.splice(t,1),this.dataSource.connect().next(this.eventsData),this.eventsDataChanged=!0,this.cdr.detectChanges())})}submit(){let t={name:this.hookForm.get("name").value,isActive:this.hookForm.get("isActive").value,displayName:this.hookForm.get("displayName").value,events:this.eventsData,config:{"Payload URL":this.hookForm.get("payloadUrl").value,"Content Type":this.hookForm.get("contentType").enabled?this.hookForm.get("contentType").value:void 0,"SMS Provider":this.hookForm.get("smsProvider").enabled?this.hookForm.get("smsProvider").value:void 0,"SMS Provider Account Id":this.hookForm.get("smsProviderAccountId").enabled?this.hookForm.get("smsProviderAccountId").value:void 0,"SMS Provider Token":this.hookForm.get("smsProviderToken").enabled?this.hookForm.get("smsProviderToken").value:void 0}};this.systemService.updateHook(this.hookData.id,t).subscribe(n=>{this.router.navigate(["../"],{relativeTo:this.route})})}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275cmp=me({type:e,selectors:[["mifosx-edit-hook"]],viewQuery:function(n,i){if(n&1&&Ee(It,7),n&2){let s;Te(s=Me())&&(i.sort=s.first)}},decls:65,vars:39,consts:[["input",""],[1,"container"],[3,"ngSubmit","formGroup"],[1,"layout-row-wrap","responsive-column","gap-4percent"],[1,"flex-40"],["required","","formControlName","name"],[3,"value"],["matInput","","required","","formControlName","displayName"],[1,"is-active-wrapper"],["labelPosition","before","formControlName","isActive",1,"is-active","flex-10"],[1,"flex-fill","flex-40"],["matInput","","required","","formControlName","payloadUrl"],[3,"inset"],[1,"layout-row-wrap","responsive-column"],[1,"mat-title","flex-20"],[1,"red"],["mat-raised-button","","type","button","color","primary",1,"AddEventButton","flex-20",3,"click"],["icon","plus",1,"m-r-10"],["mat-table","","matSort","",3,"dataSource"],["matColumnDef","entityName"],["mat-header-cell","","mat-sort-header","",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","actionName"],[1,"error-message"],["matColumnDef","actions"],["mat-header-cell","",4,"matHeaderCellDef"],["mat-header-row","",4,"matHeaderRowDef"],["mat-row","",4,"matRowDef","matRowDefColumns"],[1,"layout-row","align-center","gap-5px","responsive-column"],["type","button","mat-raised-button","",3,"routerLink"],["mat-raised-button","","color","primary",3,"disabled",4,"mifosxHasPermission"],["required","","formControlName","contentType"],["matInput","","type","tel","maxlength","10","required","","formControlName","phoneNumber"],["align","end"],[1,"flex-30"],["matInput","","required","","formControlName","smsProvider"],["matInput","","required","","formControlName","smsProviderAccountId"],["matInput","","required","","formControlName","smsProviderToken"],["mat-header-cell","","mat-sort-header",""],["mat-cell",""],["mat-header-cell",""],["type","button","color","warn","mat-icon-button","",3,"click"],["icon","trash","size","lg"],["mat-header-row",""],["mat-row",""],["mat-raised-button","","color","primary",3,"disabled"]],template:function(n,i){n&1&&(l(0,"div",1)(1,"mat-card")(2,"form",2),R("ngSubmit",function(){return i.submit()}),l(3,"mat-card-content")(4,"div",3)(5,"mat-form-field",4)(6,"mat-label"),c(7),p(8,"translate"),r(),l(9,"mat-select",5),Se(10,Zze,3,5,"mat-option",6,Pe),r(),E(12,eHe,7,9,"mat-error"),r(),l(13,"mat-form-field",4)(14,"mat-label"),c(15),p(16,"translate"),r(),b(17,"input",7),E(18,tHe,7,9,"mat-error"),r(),l(19,"div",8)(20,"mat-checkbox",9),c(21),p(22,"translate"),r()()(),l(23,"div",3),E(24,nHe,12,12,"mat-form-field",10),E(25,aHe,9,5,"mat-form-field",10),l(26,"mat-form-field",4)(27,"mat-label"),c(28),p(29,"translate"),r(),b(30,"input",11),E(31,rHe,7,9,"mat-error"),r()(),E(32,pHe,19,12,"div",3),b(33,"br")(34,"mat-divider",12)(35,"br"),l(36,"div",13)(37,"p",14),c(38),p(39,"translate"),l(40,"span",15),c(41,"*"),r()(),l(42,"button",16),R("click",function(){return i.addEvent()}),b(43,"fa-icon",17),c(44),p(45,"translate"),p(46,"translate"),r()(),l(47,"table",18),X(48,19),F(49,mHe,3,3,"th",20)(50,dHe,2,1,"td",21),Z(),X(51,22),F(52,uHe,4,6,"th",20)(53,fHe,2,1,"td",21),Z(),E(54,hHe,3,0,"div",23),X(55,24),F(56,gHe,3,3,"th",25)(57,_He,3,0,"td",21),Z(),F(58,CHe,1,0,"tr",26)(59,vHe,1,0,"tr",27),r()(),l(60,"mat-card-actions",28)(61,"button",29),c(62),p(63,"translate"),r(),F(64,xHe,3,4,"button",30),r()()()()),n&2&&(a(2),g("formGroup",i.hookForm),a(5),h(m(8,22,"labels.inputs.Hook Template")),a(3),we(i.hooksTemplateData.templates),a(2),I(i.hookForm.controls.name.hasError("required")?12:-1),a(3),h(m(16,24,"labels.inputs.Display Name")),a(3),I(i.hookForm.controls.displayName.hasError("required")?18:-1),a(3),v(" ",m(22,26,"labels.inputs.Is Active"),"? "),a(3),I(i.hookForm.controls.name.value==="Web"?24:-1),a(),I(i.hookForm.controls.name.value==="SMS Bridge"?25:-1),a(3),h(m(29,28,"labels.inputs.Payload URL")),a(3),I(i.hookForm.controls.payloadUrl.hasError("required")?31:-1),a(),I(i.hookForm.controls.name.value==="SMS Bridge"?32:-1),a(2),g("inset",!0),a(4),v("",m(39,30,"labels.inputs.Events")," "),a(6),le(" ",m(45,32,"labels.buttons.Add")," ",m(46,34,"labels.inputs.Events")," "),a(3),g("dataSource",i.dataSource),a(7),I(i.cannotDeleteLastEvent?54:-1),a(4),g("matHeaderRowDef",i.displayedColumns),a(),g("matRowDefColumns",i.displayedColumns),a(2),g("routerLink",oe(38,Xze)),a(),v(" ",m(63,36,"labels.buttons.Cancel")," "),a(2),g("mifosxHasPermission","UPDATE_HOOK"))},dependencies:[ue,fe,tt,st,Ue,Xe,dt,qa,Ze,et,Ae,$e,Je,Et,Fe,Be,ut,za,ze,gt,ft,ve,fi,Ke,Ri,ke,_t,It,xt,vt,bt,ri,Ct,yt,wi,St,Pt,wt,Tt,he,Fi],styles:["@media (width >= 992px){.is-active-wrapper[_ngcontent-%COMP%]{position:relative}.is-active-wrapper[_ngcontent-%COMP%] .is-active[_ngcontent-%COMP%]{padding:0 0 17.5px;position:absolute;bottom:0;right:0}}table[_ngcontent-%COMP%]{width:100%}.AddEventButton[_ngcontent-%COMP%]{margin-bottom:10px}.error-message[_ngcontent-%COMP%]{color:red;font-weight:700;margin-top:10px;padding:5px;background-color:#ffe6e6;border:1px solid red;border-radius:5px}.error-snackbar[_ngcontent-%COMP%]{background-color:#f44336;color:#fff}.error-snackbar[_ngcontent-%COMP%] .mat-simple-snackbar-action[_ngcontent-%COMP%]{color:#fff}"]})}}return e})();var bHe=()=>[10,25,50,100],yHe=()=>["create"],SHe=e=>[e];function wHe(e,o){e&1&&(l(0,"button",16),b(1,"fa-icon",17),c(2),p(3,"translate"),r()),e&2&&(g("routerLink",oe(4,yHe)),a(2),v(" ",m(3,2,"labels.buttons.Create Hook")," "))}function PHe(e,o){e&1&&(l(0,"th",18),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.Hook Template")))}function THe(e,o){if(e&1&&(l(0,"td",19),c(1),p(2,"translateKey"),r()),e&2){let t=o.$implicit;a(),h(Ot(2,1,t.name,"text"))}}function MHe(e,o){e&1&&(l(0,"th",18),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.Hook Name")))}function DHe(e,o){if(e&1&&(l(0,"td",19),c(1),r()),e&2){let t=o.$implicit;a(),h(t.displayName)}}function EHe(e,o){e&1&&(l(0,"th",18),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.Status")))}function IHe(e,o){if(e&1&&(l(0,"td",19)(1,"div",20),b(2,"fa-icon",21),p(3,"translate"),p(4,"translate"),r()()),e&2){let t=o.$implicit;a(),g("className",t.isActive===!0?"true":"false"),a(),g("matTooltip",Le(t.isActive===!0?m(3,3,"labels.inputs.Active"):m(4,5,"labels.catalogs.Inactive")))}}function OHe(e,o){e&1&&b(0,"tr",22)}function AHe(e,o){if(e&1&&b(0,"tr",23),e&2){let t=o.$implicit;g("routerLink",Nt(1,SHe,t.id))}}var Sx=(()=>{class e{constructor(){this.route=T(Ie),this.displayedColumns=["name","displayName","isActive"],this.route.data.subscribe(t=>{this.hookData=t.hooks})}applyFilter(t){this.dataSource.filter=t.trim().toLowerCase()}ngOnInit(){this.setHooks()}setHooks(){this.dataSource=new Wt(this.hookData),this.dataSource.paginator=this.paginator,this.dataSource.sort=this.sort}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275cmp=me({type:e,selectors:[["mifosx-manage-hooks"]],viewQuery:function(n,i){if(n&1&&(Ee(kt,7),Ee(It,7)),n&2){let s;Te(s=Me())&&(i.paginator=s.first),Te(s=Me())&&(i.sort=s.first)}},decls:23,vars:9,consts:[[1,"container","m-b-20","layout-row","align-end","gap-20px"],["mat-raised-button","","color","primary",3,"routerLink",4,"mifosxHasPermission"],[1,"container"],[1,"layout-row","gap-20px"],[1,"flex-fill"],["matInput","",3,"keyup"],[1,"mat-elevation-z8"],["mat-table","","matSort","",3,"dataSource"],["matColumnDef","name"],["mat-header-cell","","mat-sort-header","",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","displayName"],["matColumnDef","isActive"],["mat-header-row","",4,"matHeaderRowDef"],["mat-row","","class","select-row",3,"routerLink",4,"matRowDef","matRowDefColumns"],["showFirstLastButtons","",3,"pageSizeOptions"],["mat-raised-button","","color","primary",3,"routerLink"],["icon","plus",1,"m-r-10"],["mat-header-cell","","mat-sort-header",""],["mat-cell",""],[3,"className"],["matTooltipPosition","right","icon","circle","size","lg",3,"matTooltip"],["mat-header-row",""],["mat-row","",1,"select-row",3,"routerLink"]],template:function(n,i){n&1&&(l(0,"div",0),F(1,wHe,4,5,"button",1),r(),l(2,"div",2)(3,"div",3)(4,"mat-form-field",4)(5,"mat-label"),c(6),p(7,"translate"),r(),l(8,"input",5),R("keyup",function(d){return i.applyFilter(d.target.value)}),r()()(),l(9,"div",6)(10,"table",7),X(11,8),F(12,PHe,3,3,"th",9)(13,THe,3,4,"td",10),Z(),X(14,11),F(15,MHe,3,3,"th",9)(16,DHe,2,1,"td",10),Z(),X(17,12),F(18,EHe,3,3,"th",9)(19,IHe,5,7,"td",10),Z(),F(20,OHe,1,0,"tr",13)(21,AHe,1,3,"tr",14),r(),b(22,"mat-paginator",15),r()()),n&2&&(a(),g("mifosxHasPermission","CREATE_HOOK"),a(5),h(m(7,6,"labels.inputs.Filter")),a(4),g("dataSource",i.dataSource),a(10),g("matHeaderRowDef",i.displayedColumns),a(),g("matRowDefColumns",i.displayedColumns),a(),g("pageSizeOptions",oe(8,bHe)))},dependencies:[ue,fe,Ae,Fe,Be,ze,ve,Ke,ke,_t,It,xt,vt,bt,ri,Ct,yt,si,St,Pt,wt,Tt,kt,he,Fi],styles:["table[_ngcontent-%COMP%]{width:100%}table[_ngcontent-%COMP%] .select-row[_ngcontent-%COMP%]:hover{cursor:pointer}.true[_ngcontent-%COMP%]{color:#32cd32}.false[_ngcontent-%COMP%]{color:#f44366}"]})}}return e})();var FHe=()=>["edit"];function kHe(e,o){e&1&&(l(0,"button",7),b(1,"fa-icon",8),c(2),p(3,"translate"),r()),e&2&&(g("routerLink",oe(4,FHe)),a(2),v(" ",m(3,2,"labels.buttons.Edit")," "))}function BHe(e,o){if(e&1){let t=Y();l(0,"button",9),R("click",function(){V(t);let i=w();return q(i.delete())}),b(1,"fa-icon",10),c(2),p(3,"translate"),r()}e&2&&(a(2),v(" ",m(3,1,"labels.buttons.Delete")," "))}function RHe(e,o){if(e&1&&(l(0,"mat-label"),c(1),b(2,"br"),r()),e&2){let t=o.$implicit;a(),v(" ",t.actionName+" - "+t.entityName," ")}}function NHe(e,o){e&1&&(l(0,"div",5),c(1),p(2,"translate"),r()),e&2&&(a(),v("",m(2,1,"labels.inputs.Content Type"),":"))}function LHe(e,o){if(e&1&&(l(0,"div",6),c(1),r()),e&2){let t=w();a(),v(" ",t.hookData.config[0].fieldValue," ")}}function VHe(e,o){if(e&1&&(l(0,"div",6),c(1),r()),e&2){let t=w();a(),v(" ",t.hookData.config[1].fieldValue," ")}}function qHe(e,o){if(e&1&&(l(0,"div",6),c(1),r()),e&2){let t=w();a(),v(" ",t.hookData.config[0].fieldValue," ")}}function zHe(e,o){e&1&&(l(0,"div",5),c(1),p(2,"translate"),r()),e&2&&(a(),v("",m(2,1,"labels.inputs.Phone Number"),":"))}function HHe(e,o){if(e&1&&(l(0,"div",6),c(1),r()),e&2){let t=w();a(),v(" ",t.hookData.config[1].fieldValue," ")}}function GHe(e,o){e&1&&(l(0,"div",5),c(1),p(2,"translate"),r()),e&2&&(a(),v("",m(2,1,"labels.inputs.SMS Provider"),":"))}function jHe(e,o){if(e&1&&(l(0,"div",6),c(1),r()),e&2){let t=w();a(),v(" ",t.hookData.config[2].fieldValue," ")}}function $He(e,o){e&1&&(l(0,"div",5),c(1),p(2,"translate"),r()),e&2&&(a(),v("",m(2,1,"labels.inputs.SMS Provider Account ID"),":"))}function UHe(e,o){if(e&1&&(l(0,"div",6),c(1),r()),e&2){let t=w();a(),v(" ",t.hookData.config[3].fieldValue," ")}}function WHe(e,o){e&1&&(l(0,"div",5),c(1),p(2,"translate"),r()),e&2&&(a(),v("",m(2,1,"labels.inputs.SMS Provider Token"),":"))}function QHe(e,o){if(e&1&&(l(0,"div",6),c(1),r()),e&2){let t=w();a(),v(" ",t.hookData.config[4].fieldValue," ")}}var wx=(()=>{class e{constructor(){this.route=T(Ie),this.dialog=T(Ht),this.systemService=T(ii),this.router=T(qe),this.translateService=T(yi),this.route.data.subscribe(t=>{this.hookData=t.hook})}delete(){this.dialog.open(vi,{data:{deleteContext:this.translateService.instant("labels.inputs.hook")+" "+this.hookData.id}}).afterClosed().subscribe(n=>{n.delete&&this.systemService.deleteHook(this.hookData.id).subscribe(()=>{this.router.navigate(["/system/hooks"])})})}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275cmp=me({type:e,selectors:[["mifosx-view-hook"]],decls:52,vars:44,consts:[[1,"container","m-b-20","layout-row","align-end","gap-20px"],["mat-raised-button","","color","primary",3,"routerLink",4,"mifosxHasPermission"],["mat-raised-button","","color","warn",3,"click",4,"mifosxHasPermission"],[1,"container"],[1,"layout-row-wrap"],[1,"flex-50","mat-body-strong"],[1,"flex-50"],["mat-raised-button","","color","primary",3,"routerLink"],["icon","edit",1,"m-r-10"],["mat-raised-button","","color","warn",3,"click"],["icon","trash",1,"m-r-10"]],template:function(n,i){n&1&&(l(0,"div",0),F(1,kHe,4,5,"button",1)(2,BHe,4,3,"button",2),r(),l(3,"div",3)(4,"mat-card")(5,"mat-card-content")(6,"div",4)(7,"div",5),c(8),p(9,"translate"),r(),l(10,"div",6),c(11),r(),l(12,"div",5),c(13),p(14,"translate"),r(),l(15,"div",6),c(16),p(17,"translate"),p(18,"translate"),r(),l(19,"div",5),c(20),p(21,"translate"),r(),l(22,"div",6),c(23),p(24,"dateFormat"),r(),l(25,"div",5),c(26),p(27,"translate"),r(),l(28,"div",6),c(29),p(30,"dateFormat"),r(),l(31,"div",5),c(32),p(33,"translate"),r(),l(34,"div",6),Se(35,RHe,3,1,"mat-label",null,Pe),r(),E(37,NHe,3,3,"div",5),E(38,LHe,2,1,"div",6),l(39,"div",5),c(40),p(41,"translate"),r(),E(42,VHe,2,1,"div",6),E(43,qHe,2,1,"div",6),E(44,zHe,3,3,"div",5),E(45,HHe,2,1,"div",6),E(46,GHe,3,3,"div",5),E(47,jHe,2,1,"div",6),E(48,$He,3,3,"div",5),E(49,UHe,2,1,"div",6),E(50,WHe,3,3,"div",5),E(51,QHe,2,1,"div",6),r()()()()),n&2&&(a(),g("mifosxHasPermission","UPDATE_HOOK"),a(),g("mifosxHasPermission","DELETE_HOOK"),a(6),v("",m(9,24,"labels.inputs.Hook Name"),":"),a(3),v(" ",i.hookData.displayName," "),a(2),v("",m(14,26,"labels.inputs.Status"),":"),a(3),v(" ",i.hookData.isActive?m(17,28,"labels.inputs.Active"):m(18,30,"labels.catalogs.Inactive")," "),a(4),v("",m(21,32,"labels.inputs.Activation Date"),":"),a(3),v(" ",m(24,34,i.hookData.createdAt)," "),a(3),v("",m(27,36,"labels.inputs.Updated on"),":"),a(3),v(" ",m(30,38,i.hookData.updatedAt)," "),a(3),v("",m(33,40,"labels.inputs.Events"),":"),a(3),we(i.hookData.events),a(2),I(i.hookData.name==="Web"?37:-1),a(),I(i.hookData.name==="Web"?38:-1),a(2),v("",m(41,42,"labels.inputs.Payload URL"),":"),a(2),I(i.hookData.name==="Web"?42:-1),a(),I(i.hookData.name==="SMS Bridge"?43:-1),a(),I(i.hookData.name==="SMS Bridge"?44:-1),a(),I(i.hookData.name==="SMS Bridge"?45:-1),a(),I(i.hookData.name==="SMS Bridge"?46:-1),a(),I(i.hookData.name==="SMS Bridge"?47:-1),a(),I(i.hookData.name==="SMS Bridge"?48:-1),a(),I(i.hookData.name==="SMS Bridge"?49:-1),a(),I(i.hookData.name==="SMS Bridge"?50:-1),a(),I(i.hookData.name==="SMS Bridge"?51:-1))},dependencies:[ue,fe,Ae,$e,Je,Be,ve,Ke,ke,Pi,he],styles:[".container[_ngcontent-%COMP%]{max-width:37rem}.container[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] div[_ngcontent-%COMP%]{margin:1rem 0;word-wrap:break-word}"]})}}return e})();function YHe(e,o){if(e&1&&(l(0,"mat-option",4),c(1),r()),e&2){let t=o.$implicit;g("value",t.id),a(),v(" ",t.parameterName," ")}}function JHe(e,o){e&1&&(l(0,"mat-error"),c(1),p(2,"translate"),p(3,"translate"),l(4,"strong"),c(5),p(6,"translate"),r()()),e&2&&(a(),le(" ",m(2,3,"labels.inputs.Report Parameters")," ",m(3,5,"labels.commons.is")," "),a(4),h(m(6,7,"labels.commons.required")))}var Up=(()=>{class e{constructor(){this.dialogRef=T(eo),this.formBuilder=T(nt),this.data=T(Po)}ngOnInit(){this.reportParameterForm=this.formBuilder.group({parameterName:[this.data.parameterName,se.required],reportParameterName:[this.data.reportParameterName]})}submit(){this.dialogRef.close(this.reportParameterForm.value)}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275cmp=me({type:e,selectors:[["mifosx-add-report-parameter-dialog"]],decls:28,vars:23,consts:[["mat-dialog-title",""],[3,"formGroup"],[1,"layout-column"],["required","","formControlName","parameterName"],[3,"value"],["matInput","","formControlName","reportParameterName"],["align","end"],["mat-button","","mat-dialog-close",""],["mat-raised-button","","color","primary",3,"click","disabled"]],template:function(n,i){n&1&&(l(0,"h1",0),c(1),p(2,"translate"),p(3,"translate"),p(4,"translate"),r(),l(5,"mat-dialog-content")(6,"form",1)(7,"div",2)(8,"mat-form-field")(9,"mat-label"),c(10),p(11,"translate"),r(),l(12,"mat-select",3),Se(13,YHe,2,2,"mat-option",4,Pe),r(),E(15,JHe,7,9,"mat-error"),r(),l(16,"mat-form-field")(17,"mat-label"),c(18),p(19,"translate"),r(),b(20,"input",5),r()()()(),l(21,"mat-dialog-actions",6)(22,"button",7),c(23),p(24,"translate"),r(),l(25,"button",8),R("click",function(){return i.submit()}),c(26),p(27,"translate"),r()()),n&2&&(a(),le(" ",i.data.parameterName?m(2,9,"labels.buttons.Edit"):m(3,11,"labels.buttons.Add")," ",m(4,13,"labels.heading.Report Parameter"),` `),a(5),g("formGroup",i.reportParameterForm),a(4),h(m(11,15,"labels.inputs.Select allowed parameter")),a(3),we(i.data.allowedParameters),a(2),I(i.reportParameterForm.controls.parameterName.hasError("required")?15:-1),a(3),h(m(19,17,"labels.inputs.Parameter Name Passed to Pentaho")),a(5),h(m(24,19,"labels.buttons.Cancel")),a(2),g("disabled",!i.reportParameterForm.valid||i.reportParameterForm.pristine),a(),v(" ",m(27,21,"labels.buttons.Submit")," "))},dependencies:[ue,fe,tt,st,Ue,Xe,dt,Ze,et,Fe,Be,ut,ze,gt,ft,ve,Wn,ho,Nn,Un,he],encapsulation:2})}}return e})();var KHe=()=>[10,25,50,100],XHe=()=>["../"];function ZHe(e,o){e&1&&(l(0,"mat-error"),c(1),p(2,"translate"),p(3,"translate"),l(4,"strong"),c(5),p(6,"translate"),r()()),e&2&&(a(),le(" ",m(2,3,"labels.inputs.Report Name")," ",m(3,5,"labels.commons.is")," "),a(4),h(m(6,7,"labels.commons.required")))}function eGe(e,o){if(e&1&&(l(0,"mat-option",7),c(1),p(2,"translateKey"),r()),e&2){let t=o.$implicit;g("value",t),a(),v(" ",Ot(2,2,t,"text")," ")}}function tGe(e,o){e&1&&(l(0,"mat-error"),c(1),p(2,"translate"),p(3,"translate"),l(4,"strong"),c(5),p(6,"translate"),r()()),e&2&&(a(),le(" ",m(2,3,"labels.inputs.Report Type")," ",m(3,5,"labels.commons.is")," "),a(4),h(m(6,7,"labels.commons.required")))}function iGe(e,o){if(e&1&&(l(0,"mat-option",7),c(1),p(2,"translateKey"),r()),e&2){let t=o.$implicit;g("value",t),a(),v(" ",Ot(2,2,t,"text")," ")}}function nGe(e,o){if(e&1&&(l(0,"mat-option",7),c(1),p(2,"translateKey"),r()),e&2){let t=o.$implicit;g("value",t),a(),v(" ",Ot(2,2,t,"catalogs")," ")}}function oGe(e,o){e&1&&(l(0,"mat-error"),c(1),p(2,"translate"),p(3,"translate"),l(4,"strong"),c(5),p(6,"translate"),r()()),e&2&&(a(),le(" ",m(2,3,"labels.inputs.SQL")," ",m(3,5,"labels.commons.is")," "),a(4),h(m(6,7,"labels.commons.required")))}function aGe(e,o){e&1&&(l(0,"th",32),c(1),p(2,"translate"),r()),e&2&&(a(),v(" ",m(2,1,"labels.buttons.Parameters")," "))}function rGe(e,o){if(e&1&&(l(0,"td",33),c(1),r()),e&2){let t=o.$implicit;a(),v(" ",t.parameterName," ")}}function lGe(e,o){e&1&&(l(0,"th",32),c(1),p(2,"translate"),r()),e&2&&(a(),v(" ",m(2,1,"labels.inputs.Parameter Name Passed to Pentaho")," "))}function sGe(e,o){if(e&1&&(l(0,"td",33),c(1),r()),e&2){let t=o.$implicit;a(),v(" ",t.reportParameterName," ")}}function cGe(e,o){e&1&&(l(0,"th",34),c(1),p(2,"translate"),r()),e&2&&(a(),v(" ",m(2,1,"labels.inputs.Actions")," "))}function pGe(e,o){if(e&1){let t=Y();l(0,"td",33)(1,"div",35)(2,"button",36),R("click",function(){let i=V(t).$implicit,s=w();return q(s.editReportParameter(i))}),b(3,"fa-icon",37),r(),l(4,"button",38),R("click",function(){let i=V(t).$implicit,s=w();return q(s.deleteReportParameter(i))}),b(5,"fa-icon",39),r()()()}}function mGe(e,o){e&1&&b(0,"tr",40)}function dGe(e,o){e&1&&b(0,"tr",41)}function uGe(e,o){if(e&1&&(l(0,"button",42),c(1),p(2,"translate"),r()),e&2){let t=w();g("disabled",!t.reportForm.valid&&t.reportParametersData.length===0),a(),v(" ",m(2,2,"labels.buttons.Submit")," ")}}var Px=(()=>{class e{constructor(){this.formBuilder=T(nt),this.systemService=T(ii),this.route=T(Ie),this.router=T(qe),this.dialog=T(Ht),this.translateServices=T(yi),this.dataForDialog={allowedParameters:void 0,parameterName:void 0,reportParameterName:void 0},this.displayedColumns=["parameterName","parameterNamePassed","actions"],this.reportParametersData=[],this.reportCategoryTypeOptions=["Client","Loan","Savings","Fund","Accounting"],this.route.data.subscribe(t=>{this.reportTemplateData=t.reportTemplate,this.dataForDialog.allowedParameters=this.reportTemplateData.allowedParameters})}ngOnInit(){this.createReportForm(),this.toggleVisibility(),this.setReportParameters()}setReportParameters(){this.dataSource=new Wt(this.reportParametersData),this.dataSource.paginator=this.paginator,this.dataSource.sort=this.sort}createReportForm(){this.reportForm=this.formBuilder.group({reportName:["",se.required],reportCategory:[""],description:[""],reportType:["",se.required],reportSubType:[{value:"",disabled:!0}],useReport:[!1],reportSql:["",se.required]})}addReportParameter(){this.dataForDialog.parameterName=void 0,this.dataForDialog.reportParameterName=void 0,this.dialog.open(Up,{data:qt(at({},this.dataForDialog),{layout:{addButtonText:"Add"}}),width:"25rem"}).afterClosed().subscribe(n=>{n!==""&&(this.reportParametersData.push({id:"",parameterName:this.reportTemplateData.allowedParameters.find(i=>i.id===n.parameterName).parameterName,parameterId:n.parameterName,reportParameterName:n.reportParameterName}),this.dataSource.connect().next(this.reportParametersData))})}editReportParameter(t){this.dataForDialog.parameterName=t.parameterId,this.dataForDialog.reportParameterName=t.reportParameterName,this.dialog.open(Up,{data:this.dataForDialog}).afterClosed().subscribe(i=>{i!==""&&(this.reportParametersData[this.reportParametersData.indexOf(t)]={id:"",parameterName:this.reportTemplateData.allowedParameters.find(s=>s.id===i.parameterName).parameterName,parameterId:i.parameterName,reportParameterName:i.reportParameterName},this.dataSource.connect().next(this.reportParametersData))})}deleteReportParameter(t){this.dialog.open(vi,{data:{deleteContext:this.translateServices.instant("labels.heading.Report Parameter")+" "+t.parameterName}}).afterClosed().subscribe(i=>{i.delete&&(this.reportParametersData.splice(this.reportParametersData.indexOf(t),1),this.dataSource.connect().next(this.reportParametersData))})}toggleVisibility(){this.reportForm.get("reportType").valueChanges.subscribe(t=>{switch(t){case"Chart":this.reportForm.get("reportSubType").enable(),this.reportForm.get("reportSql").enable();break;case"Pentaho":this.reportForm.get("reportSql").disable(),this.reportForm.get("reportSubType").disable();break;default:this.reportForm.get("reportSql").enable(),this.reportForm.get("reportSubType").disable()}})}submit(){this.reportForm.value.reportParameters=this.reportParametersData.map(function(t){return t.parameterName=void 0,t}),this.systemService.createReport(this.reportForm.value).subscribe(t=>{this.router.navigate(["../",t.resourceId],{relativeTo:this.route})})}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275cmp=me({type:e,selectors:[["mifosx-create-report"]],viewQuery:function(n,i){if(n&1&&(Ee(kt,7),Ee(It,7)),n&2){let s;Te(s=Me())&&(i.paginator=s.first),Te(s=Me())&&(i.sort=s.first)}},decls:75,vars:42,consts:[[1,"container"],[3,"ngSubmit","formGroup"],[1,"layout-row-wrap","responsive-column"],[1,"flex-100"],["matInput","","required","","formControlName","reportName"],[1,"flex-50"],["required","","formControlName","reportType"],[3,"value"],["formControlName","reportSubType"],["formControlName","reportCategory"],[1,"user-report-wrapper","flex-50"],["labelPosition","after","formControlName","useReport",1,"user-report"],["matInput","","formControlName","description","cdkTextareaAutosize","","cdkAutosizeMinRows","2"],[1,"flex-98"],["matInput","","required","","formControlName","reportSql","cdkTextareaAutosize","","cdkAutosizeMinRows","6"],[1,"layout-row-wrap","gap-60percent","layout-lt-md-column"],[1,"mat-title","flex-20"],["mat-raised-button","","type","button","color","primary",1,"flex-20",3,"click"],["icon","plus",1,"m-r-10"],["mat-table","","matSort","",3,"dataSource"],["matColumnDef","parameterName"],["mat-header-cell","","mat-sort-header","",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","parameterNamePassed"],["matColumnDef","actions"],["mat-header-cell","",4,"matHeaderCellDef"],["mat-header-row","",4,"matHeaderRowDef"],["mat-row","",4,"matRowDef","matRowDefColumns"],["showFirstLastButtons","",3,"pageSizeOptions"],[1,"layout-row","align-center","gap-5px","responsive-column"],["type","button","mat-raised-button","",3,"routerLink"],["mat-raised-button","","type","submit","color","primary",3,"disabled",4,"mifosxHasPermission"],["mat-header-cell","","mat-sort-header",""],["mat-cell",""],["mat-header-cell",""],[1,"layout-row","gap-15percent"],["type","button","color","primary","mat-icon-button","",1,"flex-8",3,"click"],["icon","edit","size","lg"],["type","button","color","warn","mat-icon-button","",1,"flex-8",3,"click"],["icon","trash","size","lg"],["mat-header-row",""],["mat-row",""],["mat-raised-button","","type","submit","color","primary",3,"disabled"]],template:function(n,i){n&1&&(l(0,"div",0)(1,"mat-card")(2,"form",1),R("ngSubmit",function(){return i.submit()}),l(3,"mat-card-content")(4,"div",2)(5,"mat-form-field",3)(6,"mat-label"),c(7),p(8,"translate"),r(),b(9,"input",4),E(10,ZHe,7,9,"mat-error"),r(),l(11,"mat-form-field",5)(12,"mat-label"),c(13),p(14,"translate"),r(),l(15,"mat-select",6),Se(16,eGe,3,5,"mat-option",7,Pe),r(),E(18,tGe,7,9,"mat-error"),r(),l(19,"mat-form-field",5)(20,"mat-label"),c(21),p(22,"translate"),r(),l(23,"mat-select",8),Se(24,iGe,3,5,"mat-option",7,Pe),r()(),l(26,"mat-form-field",5)(27,"mat-label"),c(28),p(29,"translate"),r(),l(30,"mat-select",9),Se(31,nGe,3,5,"mat-option",7,Pe),r()(),l(33,"div",10)(34,"mat-checkbox",11),c(35),p(36,"translate"),r()(),l(37,"mat-form-field",3)(38,"mat-label"),c(39),p(40,"translate"),r(),b(41,"textarea",12),r(),l(42,"mat-form-field",13)(43,"mat-label"),c(44),p(45,"translate"),r(),b(46,"textarea",14),E(47,oGe,7,9,"mat-error"),r()(),b(48,"br"),l(49,"div",15)(50,"p",16),c(51),p(52,"translate"),r(),l(53,"button",17),R("click",function(){return i.addReportParameter()}),b(54,"fa-icon",18),c(55),p(56,"translate"),r()(),l(57,"table",19),X(58,20),F(59,aGe,3,3,"th",21)(60,rGe,2,1,"td",22),Z(),X(61,23),F(62,lGe,3,3,"th",21)(63,sGe,2,1,"td",22),Z(),X(64,24),F(65,cGe,3,3,"th",25)(66,pGe,6,0,"td",22),Z(),F(67,mGe,1,0,"tr",26)(68,dGe,1,0,"tr",27),r(),b(69,"mat-paginator",28),r(),l(70,"mat-card-actions",29)(71,"button",30),c(72),p(73,"translate"),r(),F(74,uGe,3,4,"button",31),r()()()()),n&2&&(a(2),g("formGroup",i.reportForm),a(5),h(m(8,20,"labels.inputs.Report Name")),a(3),I(i.reportForm.controls.reportName.hasError("required")?10:-1),a(3),h(m(14,22,"labels.inputs.Report Type")),a(3),we(i.reportTemplateData.allowedReportTypes),a(2),I(i.reportForm.controls.reportType.hasError("required")?18:-1),a(3),h(m(22,24,"labels.inputs.Report Sub Type")),a(3),we(i.reportTemplateData.allowedReportSubTypes),a(4),h(m(29,26,"labels.inputs.Report Category")),a(3),we(i.reportCategoryTypeOptions),a(4),v(" ",m(36,28,"labels.inputs.User Report (UI)")," "),a(4),h(m(40,30,"labels.inputs.Description")),a(5),h(m(45,32,"labels.inputs.SQL")),a(3),I(i.reportForm.controls.reportSql.hasError("required")?47:-1),a(4),h(m(52,34,"labels.inputs.Report Parameters")),a(4),v("",m(56,36,"labels.buttons.Add Report Parameter")," "),a(2),g("dataSource",i.dataSource),a(10),g("matHeaderRowDef",i.displayedColumns),a(),g("matRowDefColumns",i.displayedColumns),a(),g("pageSizeOptions",oe(40,KHe)),a(2),g("routerLink",oe(41,XHe)),a(),v(" ",m(73,38,"labels.buttons.Cancel")," "),a(2),g("mifosxHasPermission","CREATE_REPORT"))},dependencies:[ue,fe,tt,st,Ue,Xe,dt,Ze,et,Ae,$e,Je,Et,Fe,Be,ut,ze,gt,ft,ve,fi,Ke,Ln,ke,_t,It,xt,vt,bt,ri,Ct,yt,wi,St,Pt,wt,Tt,kt,he,Fi],styles:["@media (width >= 992px){.user-report-wrapper[_ngcontent-%COMP%]{position:relative}.user-report-wrapper[_ngcontent-%COMP%] .user-report[_ngcontent-%COMP%]{padding:0 0 17.5px;position:absolute;bottom:0}}table[_ngcontent-%COMP%]{width:100%;margin-top:20px}"]})}}return e})();var fGe=()=>[10,25,50,100],hGe=()=>["../"];function gGe(e,o){e&1&&(l(0,"mat-error"),c(1),p(2,"translate"),p(3,"translate"),l(4,"strong"),c(5),p(6,"translate"),r()()),e&2&&(a(),le(" ",m(2,3,"labels.inputs.Report Name")," ",m(3,5,"labels.commons.is")," "),a(4),h(m(6,7,"labels.commons.required")))}function _Ge(e,o){if(e&1&&(l(0,"mat-option",7),c(1),p(2,"translateKey"),r()),e&2){let t=o.$implicit;g("value",t),a(),v(" ",Ot(2,2,t,"text")," ")}}function CGe(e,o){e&1&&(l(0,"mat-error"),c(1),p(2,"translate"),p(3,"translate"),l(4,"strong"),c(5),p(6,"translate"),r()()),e&2&&(a(),le(" ",m(2,3,"labels.inputs.Report Type")," ",m(3,5,"labels.commons.is")," "),a(4),h(m(6,7,"labels.commons.required")))}function vGe(e,o){if(e&1&&(l(0,"mat-option",7),c(1),p(2,"translateKey"),r()),e&2){let t=o.$implicit;g("value",t),a(),v(" ",Ot(2,2,t,"text")," ")}}function xGe(e,o){if(e&1&&(l(0,"mat-option",7),c(1),p(2,"translateKey"),r()),e&2){let t=o.$implicit;g("value",t),a(),v(" ",Ot(2,2,t,"catalogs")," ")}}function bGe(e,o){e&1&&(l(0,"mat-error"),c(1),p(2,"translate"),p(3,"translate"),l(4,"strong"),c(5),p(6,"translate"),r()()),e&2&&(a(),le(" ",m(2,3,"labels.inputs.SQL")," ",m(3,5,"labels.commons.is")," "),a(4),h(m(6,7,"labels.commons.required")))}function yGe(e,o){if(e&1){let t=Y();l(0,"button",31),R("click",function(){V(t);let i=w();return q(i.addReportParameter())}),b(1,"fa-icon",32),c(2),p(3,"translate"),r()}e&2&&(a(2),v(" ",m(3,1,"labels.buttons.Add Report Parameter")," "))}function SGe(e,o){e&1&&(l(0,"th",33),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.buttons.Parameters")))}function wGe(e,o){if(e&1&&(l(0,"td",34),c(1),r()),e&2){let t=o.$implicit;a(),h(t.parameterName)}}function PGe(e,o){e&1&&(l(0,"th",33),c(1),p(2,"translate"),r()),e&2&&(a(),v(" ",m(2,1,"labels.inputs.Parameter Name Passed to Pentaho")," "))}function TGe(e,o){if(e&1&&(l(0,"td",34),c(1),r()),e&2){let t=o.$implicit;a(),h(t.reportParameterName)}}function MGe(e,o){e&1&&(l(0,"th",35),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.Actions")))}function DGe(e,o){if(e&1){let t=Y();l(0,"button",39),R("click",function(){V(t);let i=w().$implicit,s=w();return q(s.editReportParameter(i))}),b(1,"fa-icon",40),r()}}function EGe(e,o){if(e&1){let t=Y();l(0,"button",41),R("click",function(){V(t);let i=w().$implicit,s=w();return q(s.deleteReportParameter(i))}),b(1,"fa-icon",42),r()}}function IGe(e,o){if(e&1&&(l(0,"td",36),E(1,DGe,2,0,"button",37),E(2,EGe,2,0,"button",38),r()),e&2){let t=w();a(),I(t.reportData.coreReport?-1:1),a(),I(t.reportData.coreReport?-1:2)}}function OGe(e,o){e&1&&b(0,"tr",43)}function AGe(e,o){e&1&&b(0,"tr",44)}function FGe(e,o){if(e&1&&(l(0,"button",45),c(1),p(2,"translate"),r()),e&2){let t=w();g("disabled",(!t.reportForm.valid||t.reportForm.pristine)&&!t.isReportParametersChanged),a(),v(" ",m(2,2,"labels.buttons.Submit")," ")}}var Tx=(()=>{class e{constructor(){this.formBuilder=T(nt),this.route=T(Ie),this.router=T(qe),this.systemService=T(ii),this.dialog=T(Ht),this.reportParametersData=[],this.dataForDialog={allowedParameters:void 0,parameterName:void 0,reportParameterName:void 0},this.displayedColumns=["parameterName","parameterNamePassed","actions"],this.isReportParametersChanged=!1,this.reportCategoryTypeOptions=["Client","Loan","Savings","Fund","Accounting"],this.route.data.subscribe(t=>{this.reportData=t.report,this.reportParametersData=t.report.reportParameters?t.report.reportParameters:[],this.reportTemplateData=t.reportTemplate,this.dataForDialog.allowedParameters=this.reportData.allowedParameters})}ngOnInit(){this.createReportForm(),this.setReportParameters(),this.toggleVisibility()}setReportParameters(){this.dataSource=new Wt(this.reportParametersData),this.dataSource.paginator=this.paginator,this.dataSource.sort=this.sort}createReportForm(){this.reportForm=this.formBuilder.group({reportName:[{value:this.reportData.reportName,disabled:this.reportData.coreReport},se.required],reportCategory:[{value:this.reportData.reportCategory?this.reportData.reportCategory:"",disabled:this.reportData.coreReport}],description:[{value:this.reportData.description?this.reportData.description:"",disabled:this.reportData.coreReport}],reportType:[{value:this.reportData.reportType,disabled:this.reportData.coreReport},se.required],reportSubType:[{value:this.reportData.reportSubType?this.reportData.reportSubType:"",disabled:this.reportData.reportType!=="Chart"||this.reportData.coreReport}],useReport:[this.reportData.useReport?this.reportData.useReport:!1],reportSql:[{value:this.reportData.reportSql,disabled:this.reportData.coreReport||this.reportData.reportType==="Pentaho"},se.required]})}addReportParameter(){this.dataForDialog.parameterName=void 0,this.dataForDialog.reportParameterName=void 0,this.dialog.open(Up,{data:this.dataForDialog}).afterClosed().subscribe(n=>{n!==""&&(this.reportParametersData.push({id:"",parameterName:this.reportTemplateData.allowedParameters.find(i=>i.id===n.parameterName).parameterName,parameterId:n.parameterName,reportParameterName:n.reportParameterName?n.reportParameterName:void 0}),this.dataSource.connect().next(this.reportParametersData),this.isReportParametersChanged=!0)})}editReportParameter(t){this.dataForDialog.parameterName=t.parameterId,this.dataForDialog.reportParameterName=t.reportParameterName,this.dialog.open(Up,{data:this.dataForDialog}).afterClosed().subscribe(i=>{i!==""&&(this.reportParametersData[this.reportParametersData.indexOf(t)]={id:t.id,parameterName:this.reportTemplateData.allowedParameters.find(s=>s.id===i.parameterName).parameterName,parameterId:i.parameterName,reportParameterName:i.reportParameterName},this.dataSource.connect().next(this.reportParametersData),this.isReportParametersChanged=!0)})}deleteReportParameter(t){this.dialog.open(vi,{data:{deleteContext:`report parameter ${t.parameterName}`}}).afterClosed().subscribe(i=>{i.delete&&(this.reportParametersData.splice(this.reportParametersData.indexOf(t),1),this.dataSource.connect().next(this.reportParametersData),this.isReportParametersChanged=!0)})}toggleVisibility(){this.reportForm.get("reportType").valueChanges.subscribe(t=>{switch(t){case"Chart":this.reportForm.get("reportSubType").enable(),this.reportForm.get("reportSql").enable();break;case"Pentaho":this.reportForm.get("reportSql").disable(),this.reportForm.get("reportSubType").disable();break;default:this.reportForm.get("reportSql").enable(),this.reportForm.get("reportSubType").disable()}})}submit(){this.reportData.coreReport?this.reportForm.value.reportParameters=void 0:(this.reportForm.value.reportParameters=this.reportParametersData,this.reportForm.value.reportParameters.map(function(t){return t.parameterName=void 0,t})),this.systemService.updateReport(this.reportData.id,this.reportForm.value).subscribe(()=>{this.router.navigate(["../"],{relativeTo:this.route})})}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275cmp=me({type:e,selectors:[["mifosx-edit-report"]],viewQuery:function(n,i){if(n&1&&(Ee(kt,7),Ee(It,7)),n&2){let s;Te(s=Me())&&(i.paginator=s.first),Te(s=Me())&&(i.sort=s.first)}},decls:72,vars:40,consts:[[1,"container"],[3,"ngSubmit","formGroup"],[1,"layout-row-wrap","responsive-column"],[1,"flex-100"],["matInput","","required","","formControlName","reportName"],[1,"flex-50"],["required","","formControlName","reportType"],[3,"value"],["formControlName","reportSubType"],["formControlName","reportCategory"],["labelPosition","after","formControlName","useReport",1,"user-report"],["matInput","","formControlName","description","cdkTextareaAutosize","","cdkAutosizeMinRows","2"],[1,"flex-98"],["matInput","","required","","formControlName","reportSql","cdkTextareaAutosize","","cdkAutosizeMinRows","6"],[1,"layout-row-wrap","gap-60percent","layout-lt-md-column"],[1,"mat-title","flex-20"],["mat-raised-button","","type","button","color","primary",1,"flex-20"],["mat-table","","matSort","",3,"dataSource"],["matColumnDef","parameterName"],["mat-header-cell","","mat-sort-header","",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","parameterNamePassed"],["matColumnDef","actions"],["mat-header-cell","",4,"matHeaderCellDef"],["mat-cell","","class","gap-15percent",4,"matCellDef"],["mat-header-row","",4,"matHeaderRowDef"],["mat-row","",4,"matRowDef","matRowDefColumns"],["showFirstLastButtons","",3,"pageSizeOptions"],[1,"layout-row","align-center","gap-5px","responsive-column"],["type","button","mat-raised-button","",3,"routerLink"],["mat-raised-button","","color","primary",3,"disabled",4,"mifosxHasPermission"],["mat-raised-button","","type","button","color","primary",1,"flex-20",3,"click"],["icon","plus",1,"m-r-10"],["mat-header-cell","","mat-sort-header",""],["mat-cell",""],["mat-header-cell",""],["mat-cell","",1,"gap-15percent"],["type","button","color","primary","mat-icon-button","",1,"flex-8"],["type","button","color","warn","mat-icon-button","",1,"flex-8"],["type","button","color","primary","mat-icon-button","",1,"flex-8",3,"click"],["icon","edit","size","lg"],["type","button","color","warn","mat-icon-button","",1,"flex-8",3,"click"],["icon","trash","size","lg"],["mat-header-row",""],["mat-row",""],["mat-raised-button","","color","primary",3,"disabled"]],template:function(n,i){n&1&&(l(0,"div",0)(1,"mat-card")(2,"form",1),R("ngSubmit",function(){return i.submit()}),l(3,"mat-card-content")(4,"div",2)(5,"mat-form-field",3)(6,"mat-label"),c(7),p(8,"translate"),r(),b(9,"input",4),E(10,gGe,7,9,"mat-error"),r(),l(11,"mat-form-field",5)(12,"mat-label"),c(13),p(14,"translate"),r(),l(15,"mat-select",6),Se(16,_Ge,3,5,"mat-option",7,Pe),r(),E(18,CGe,7,9,"mat-error"),r(),l(19,"mat-form-field",5)(20,"mat-label"),c(21),p(22,"translate"),r(),l(23,"mat-select",8),Se(24,vGe,3,5,"mat-option",7,Pe),r()(),l(26,"mat-form-field",5)(27,"mat-label"),c(28),p(29,"translate"),r(),l(30,"mat-select",9),Se(31,xGe,3,5,"mat-option",7,Pe),r()(),l(33,"div",5)(34,"mat-checkbox",10),c(35),p(36,"translate"),r()(),l(37,"mat-form-field",3)(38,"mat-label"),c(39),p(40,"translate"),r(),b(41,"textarea",11),r(),l(42,"mat-form-field",12)(43,"mat-label"),c(44),p(45,"translate"),r(),b(46,"textarea",13),E(47,bGe,7,9,"mat-error"),r()(),b(48,"br"),l(49,"div",14)(50,"p",15),c(51),p(52,"translate"),r(),E(53,yGe,4,3,"button",16),r(),l(54,"table",17),X(55,18),F(56,SGe,3,3,"th",19)(57,wGe,2,1,"td",20),Z(),X(58,21),F(59,PGe,3,3,"th",19)(60,TGe,2,1,"td",20),Z(),X(61,22),F(62,MGe,3,3,"th",23)(63,IGe,3,2,"td",24),Z(),F(64,OGe,1,0,"tr",25)(65,AGe,1,0,"tr",26),r(),b(66,"mat-paginator",27),r(),l(67,"mat-card-actions",28)(68,"button",29),c(69),p(70,"translate"),r(),F(71,FGe,3,4,"button",30),r()()()()),n&2&&(a(2),g("formGroup",i.reportForm),a(5),h(m(8,20,"labels.inputs.Report Name")),a(3),I(i.reportForm.controls.reportName.hasError("required")?10:-1),a(3),h(m(14,22,"labels.inputs.Report Type")),a(3),we(i.reportData.allowedReportTypes),a(2),I(i.reportForm.controls.reportType.hasError("required")?18:-1),a(3),h(m(22,24,"labels.inputs.Report Sub Type")),a(3),we(i.reportData.allowedReportSubTypes),a(4),h(m(29,26,"labels.inputs.Report Category")),a(3),we(i.reportCategoryTypeOptions),a(4),v(" ",m(36,28,"labels.inputs.User Report (UI)")," "),a(4),h(m(40,30,"labels.inputs.Description")),a(5),v(" ",m(45,32,"labels.inputs.SQL")),a(3),I(i.reportForm.controls.reportSql.hasError("required")?47:-1),a(4),h(m(52,34,"labels.inputs.Report Parameters")),a(2),I(i.reportData.coreReport?-1:53),a(),g("dataSource",i.dataSource),a(10),g("matHeaderRowDef",i.displayedColumns),a(),g("matRowDefColumns",i.displayedColumns),a(),g("pageSizeOptions",oe(38,fGe)),a(2),g("routerLink",oe(39,hGe)),a(),v(" ",m(70,36,"labels.buttons.Cancel")," "),a(2),g("mifosxHasPermission","UPDATE_REPORT"))},dependencies:[ue,fe,tt,st,Ue,Xe,dt,Ze,et,Ae,$e,Je,Et,Fe,Be,ut,ze,gt,ft,ve,fi,Ke,Ln,ke,_t,It,xt,vt,bt,ri,Ct,yt,wi,St,Pt,wt,Tt,kt,he,Fi],styles:["@media (width >= 992px){.user-report-wrapper[_ngcontent-%COMP%]{position:relative}.user-report-wrapper[_ngcontent-%COMP%] .user-report[_ngcontent-%COMP%]{padding:0 0 17.5px;position:absolute;bottom:0}}table[_ngcontent-%COMP%]{width:100%}"]})}}return e})();var Mx=(()=>{class e{constructor(){this.dialogRef=T(eo),this.data=T(Po)}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275cmp=me({type:e,selectors:[["mifosx-completion-dialog"]],decls:18,vars:15,consts:[["mat-dialog-title",""],[1,"mw600"],["mode","determinate","value","100"],["mat-raised-button","","color","warn","mat-dialog-close",""]],template:function(n,i){n&1&&(l(0,"h1",0),c(1),p(2,"translate"),r(),l(3,"mat-dialog-content")(4,"h3",1),c(5),p(6,"translate"),r(),l(7,"h3"),c(8),p(9,"translate"),r(),l(10,"h3"),c(11),p(12,"translate"),r(),b(13,"mat-progress-bar",2),r(),l(14,"mat-dialog-actions")(15,"button",3),c(16),p(17,"translate"),r()()),n&2&&(a(),h(m(2,5,"labels.heading.Welcome to Mifos")),a(4),h(m(6,7,"labels.heading.Configure Mifos Organization Needs")),a(3),h(m(9,9,"labels.heading.Configuration Wizard Setup")),a(3),v("",m(12,11,"labels.heading.Progress Bar")," : 100 %"),a(5),v(" ",m(17,13,"labels.buttons.Close Config. Wizard")," "))},dependencies:[ue,fe,ve,Wn,ho,os,Nn,Un,he],encapsulation:2})}}return e})();var kGe=["buttonCreateReport"],BGe=["templateButtonCreateReport"],RGe=()=>[10,25,50,100],NGe=()=>["create"],LGe=e=>[e];function VGe(e,o){e&1&&(l(0,"button",26),b(1,"fa-icon",27),c(2),p(3,"translate"),r()),e&2&&(g("routerLink",oe(4,NGe)),a(2),v(" ",m(3,2,"labels.buttons.Create Report")," "))}function qGe(e,o){e&1&&(l(0,"th",28),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.Report Name")))}function zGe(e,o){if(e&1&&(l(0,"td",29),c(1),r()),e&2){let t=o.$implicit;a(),h(t.reportName)}}function HGe(e,o){e&1&&(l(0,"th",28),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.Report Type")))}function GGe(e,o){if(e&1&&(l(0,"td",29),c(1),p(2,"translateKey"),r()),e&2){let t=o.$implicit;a(),h(Ot(2,1,t.reportType,"text"))}}function jGe(e,o){e&1&&(l(0,"th",28),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.Report Sub Type")))}function $Ge(e,o){if(e&1&&(l(0,"td",29),c(1),p(2,"translateKey"),r()),e&2){let t=o.$implicit;a(),h(Ot(2,1,t.reportSubType,"text"))}}function UGe(e,o){e&1&&(l(0,"th",28),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.Report Category")))}function WGe(e,o){if(e&1&&(l(0,"td",29),c(1),p(2,"translateKey"),r()),e&2){let t=o.$implicit;a(),h(Ot(2,1,t.reportCategory,"catalogs"))}}function QGe(e,o){e&1&&(l(0,"th",28),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.Core Report")))}function YGe(e,o){e&1&&(b(0,"fa-icon",30),p(1,"translate")),e&2&&g("matTooltip",m(1,1,"tooltips.Yes"))}function JGe(e,o){e&1&&(b(0,"fa-icon",31),p(1,"translate")),e&2&&g("matTooltip",m(1,1,"tooltips.No"))}function KGe(e,o){if(e&1&&(l(0,"td",29),E(1,YGe,2,3,"fa-icon",30),E(2,JGe,2,3,"fa-icon",31),r()),e&2){let t=o.$implicit;a(),I(t.coreReport?1:-1),a(),I(t.coreReport?-1:2)}}function XGe(e,o){e&1&&(l(0,"th",28),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.User Report")))}function ZGe(e,o){e&1&&(b(0,"fa-icon",30),p(1,"translate")),e&2&&g("matTooltip",m(1,1,"tooltips.Yes"))}function eje(e,o){e&1&&(b(0,"fa-icon",31),p(1,"translate")),e&2&&g("matTooltip",m(1,1,"tooltips.No"))}function tje(e,o){if(e&1&&(l(0,"td",29),E(1,ZGe,2,3,"fa-icon",30),E(2,eje,2,3,"fa-icon",31),r()),e&2){let t=o.$implicit;a(),I(t.useReport?1:-1),a(),I(t.useReport?-1:2)}}function ije(e,o){e&1&&b(0,"tr",32)}function nje(e,o){if(e&1&&b(0,"tr",33),e&2){let t=o.$implicit;g("routerLink",Nt(1,LGe,t.id))}}function oje(e,o){if(e&1){let t=Y();l(0,"h2"),c(1),p(2,"translate"),r(),l(3,"p",34),c(4),p(5,"translate"),r(),l(6,"div",35)(7,"button",36),R("click",function(){let i=V(t).popover,s=w();return i.close(),q(s.configurationWizardService.closeConfigWizard())}),c(8),p(9,"translate"),r(),l(10,"button",37),R("click",function(){let i=V(t).popover,s=w();return i.close(),q(s.previousStep())}),c(11),p(12,"translate"),r(),l(13,"button",37),R("click",function(){let i=V(t).popover,s=w(),d=xe(6),u=xe(39);return i.close(),q(s.showPopover(u,d,"bottom",!0))}),c(14),p(15,"translate"),r()()}e&2&&(a(),h(m(2,5,"labels.buttons.Create Report")),a(3),h(m(5,7,"labels.text.Create new report")),a(4),v(" ",m(9,9,"labels.buttons.Close")," "),a(3),v(" ",m(12,11,"labels.buttons.Back")," "),a(3),v(" ",m(15,13,"labels.buttons.Next")," "))}function aje(e,o){if(e&1){let t=Y();l(0,"h4"),c(1),p(2,"translate"),r(),l(3,"div",35)(4,"button",36),R("click",function(){let i=V(t).popover,s=w();return i.close(),q(s.configurationWizardService.closeConfigWizard())}),c(5),p(6,"translate"),r(),l(7,"button",37),R("click",function(){let i=V(t).popover,s=w(),d=xe(2),u=xe(37);return i.close(),q(s.showPopover(u,d,"bottom",!0))}),c(8),p(9,"translate"),r(),l(10,"button",37),R("click",function(){let i=V(t).popover,s=w(),d=xe(13),u=xe(41);return i.close(),q(s.showPopover(u,d,"top",!0))}),c(11),p(12,"translate"),r()()}e&2&&(a(),h(m(2,4,"labels.heading.Filter reports by name")),a(4),v(" ",m(6,6,"labels.buttons.Close")," "),a(3),v(" ",m(9,8,"labels.buttons.Back")," "),a(3),v(" ",m(12,10,"labels.buttons.Next")," "))}function rje(e,o){if(e&1){let t=Y();l(0,"h4",34),c(1),p(2,"translate"),l(3,"a",38),c(4),p(5,"translate"),r()(),l(6,"div",35)(7,"button",36),R("click",function(){let i=V(t).popover,s=w();return i.close(),q(s.configurationWizardService.closeConfigWizard())}),c(8),p(9,"translate"),r(),l(10,"button",37),R("click",function(){let i=V(t).popover,s=w(),d=xe(6),u=xe(39);return i.close(),q(s.showPopover(u,d,"bottom",!0))}),c(11),p(12,"translate"),r(),l(13,"button",37),R("click",function(){let i=V(t).popover,s=w();return i.close(),q(s.nextStep())}),c(14),p(15,"translate"),r()()}e&2&&(a(),v(" ",m(2,5,"labels.heading.List of all currently available reports"),": "),a(3),h(m(5,7,"labels.heading.Manage Reports")),a(4),v(" ",m(9,9,"labels.buttons.Close")," "),a(3),v(" ",m(12,11,"labels.buttons.Back")," "),a(3),v(" ",m(15,13,"labels.buttons.Next")," "))}var Dx=(()=>{class e{constructor(){this.route=T(Ie),this.router=T(qe),this.configurationWizardService=T(Qi),this.popoverService=T(Wi),this.dialog=T(Ht),this.displayedColumns=["reportName","reportType","reportSubType","reportCategory","coreReport","userReport"],this.route.data.subscribe(t=>{this.reportsData=t.reports})}ngOnInit(){this.setReports()}setReports(){this.dataSource=new Wt(this.reportsData),this.dataSource.paginator=this.paginator,this.dataSource.sort=this.sort}applyFilter(t){this.dataSource.filter=t.trim().toLowerCase()}ngAfterViewInit(){this.configurationWizardService.showManageReports===!0&&setTimeout(()=>{this.showPopover(this.templateButtonCreateReport,this.buttonCreateReport.nativeElement,"bottom",!0)})}showPopover(t,n,i,s){setTimeout(()=>this.popoverService.open(t,n,i,s,{}),200)}nextStep(){this.configurationWizardService.showManageReports=!1,this.openNextStepDialog()}previousStep(){this.router.navigate(["/system"])}openNextStepDialog(){this.dialog.open(Mx).afterClosed().subscribe(()=>{this.router.navigate(["/home"])})}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275cmp=me({type:e,selectors:[["mifosx-manage-reports"]],viewQuery:function(n,i){if(n&1&&(Ee(kt,7),Ee(It,7),Ee(kGe,5),Ee(BGe,5)),n&2){let s;Te(s=Me())&&(i.paginator=s.first),Te(s=Me())&&(i.sort=s.first),Te(s=Me())&&(i.buttonCreateReport=s.first),Te(s=Me())&&(i.templateButtonCreateReport=s.first)}},decls:42,vars:9,consts:[["buttonCreateReport",""],["filter",""],["reportsTable",""],["templateButtonCreateReport",""],["templateFilter",""],["templateReportsTable",""],[1,"container","m-b-20","layout-row","align-end","gap-20px"],[1,"in-block"],["mat-raised-button","","color","primary",3,"routerLink",4,"mifosxHasPermission"],[1,"container"],[1,"layout-row"],[1,"flex-fill"],["matInput","",3,"keyup"],[1,"mat-elevation-z8","table-container"],["mat-table","","matSort","",3,"dataSource"],["matColumnDef","reportName"],["mat-header-cell","","mat-sort-header","",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","reportType"],["matColumnDef","reportSubType"],["matColumnDef","reportCategory"],["matColumnDef","coreReport"],["matColumnDef","userReport"],["mat-header-row","",4,"matHeaderRowDef"],["mat-row","","class","select-row",3,"routerLink",4,"matRowDef","matRowDefColumns"],["showFirstLastButtons","",3,"pageSizeOptions"],["mat-raised-button","","color","primary",3,"routerLink"],["icon","plus",1,"m-r-10"],["mat-header-cell","","mat-sort-header",""],["mat-cell",""],["icon","check-circle","size","lg","matTooltipPosition","right",1,"true",3,"matTooltip"],["icon","times-circle","size","lg","matTooltipPosition","right",1,"false",3,"matTooltip"],["mat-header-row",""],["mat-row","",1,"select-row",3,"routerLink"],[1,"mw300"],[1,"layout-row","align-end","gap-2px","responsive-column"],["mat-raised-button","","color","warn",3,"click"],["mat-raised-button","","color","primary",3,"click"],["href","https://mifosforge.jira.com/wiki/spaces/docs/pages/67895354/Manage+Reports","target","_blank"]],template:function(n,i){if(n&1){let s=Y();l(0,"div",6)(1,"div",7,0),F(3,VGe,4,5,"button",8),r()(),l(4,"div",9)(5,"div",10,1)(7,"mat-form-field",11)(8,"mat-label"),c(9),p(10,"translate"),r(),l(11,"input",12),R("keyup",function(u){return V(s),q(i.applyFilter(u.target.value))}),r()()(),l(12,"div",13,2)(14,"table",14),X(15,15),F(16,qGe,3,3,"th",16)(17,zGe,2,1,"td",17),Z(),X(18,18),F(19,HGe,3,3,"th",16)(20,GGe,3,4,"td",17),Z(),X(21,19),F(22,jGe,3,3,"th",16)(23,$Ge,3,4,"td",17),Z(),X(24,20),F(25,UGe,3,3,"th",16)(26,WGe,3,4,"td",17),Z(),X(27,21),F(28,QGe,3,3,"th",16)(29,KGe,3,2,"td",17),Z(),X(30,22),F(31,XGe,3,3,"th",16)(32,tje,3,2,"td",17),Z(),F(33,ije,1,0,"tr",23)(34,nje,1,3,"tr",24),r(),b(35,"mat-paginator",25),r()(),F(36,oje,16,15,"ng-template",null,3,ti)(38,aje,13,12,"ng-template",null,4,ti)(40,rje,16,15,"ng-template",null,5,ti)}n&2&&(a(3),g("mifosxHasPermission","CREATE_REPORT"),a(6),h(m(10,6,"labels.inputs.Filter")),a(5),g("dataSource",i.dataSource),a(19),g("matHeaderRowDef",i.displayedColumns),a(),g("matRowDefColumns",i.displayedColumns),a(),g("pageSizeOptions",oe(8,RGe)))},dependencies:[ue,fe,Ae,Fe,Be,ze,ve,Ke,ke,_t,It,xt,vt,bt,ri,Ct,yt,si,St,Pt,wt,Tt,kt,he,Fi],styles:["table[_ngcontent-%COMP%]{width:100%}table[_ngcontent-%COMP%] .select-row[_ngcontent-%COMP%]:hover{cursor:pointer}.true[_ngcontent-%COMP%]{color:#32cd32}.false[_ngcontent-%COMP%]{color:#f44366}"]})}}return e})();var lje=()=>["edit"];function sje(e,o){e&1&&(l(0,"button",9),b(1,"fa-icon",10),c(2),p(3,"translate"),r()),e&2&&(g("routerLink",oe(4,lje)),a(2),v(" ",m(3,2,"labels.buttons.Edit")," "))}function cje(e,o){if(e&1){let t=Y();l(0,"button",12),R("click",function(){V(t);let i=w(2);return q(i.delete())}),b(1,"fa-icon",13),c(2),p(3,"translate"),r()}e&2&&(a(2),v(" ",m(3,1,"labels.buttons.Delete")," "))}function pje(e,o){e&1&&(l(0,"span"),F(1,cje,4,3,"button",11),r()),e&2&&(a(),g("mifosxHasPermission","DELETE_REPORT"))}function mje(e,o){e&1&&(l(0,"div",8),c(1),p(2,"translate"),r()),e&2&&(a(),v("",m(2,1,"labels.inputs.Report Sub Type"),":"))}function dje(e,o){if(e&1&&(l(0,"div",7),c(1),p(2,"translateKey"),r()),e&2){let t=w();a(),v(" ",Ot(2,1,t.reportData.reportSubType,"text")," ")}}var Ex=(()=>{class e{constructor(){this.route=T(Ie),this.systemService=T(ii),this.dialog=T(Ht),this.router=T(qe),this.route.data.subscribe(t=>{this.reportData=t.report})}delete(){this.dialog.open(vi,{data:{deleteContext:`report ${this.reportData.id}`}}).afterClosed().subscribe(n=>{n.delete&&this.systemService.deleteReport(this.reportData.id).subscribe(()=>{this.router.navigate(["/system/reports"])})})}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275cmp=me({type:e,selectors:[["mifosx-view-report"]],decls:39,vars:34,consts:[[1,"container","m-b-20","layout-row","align-end","gap-20px"],["mat-raised-button","","color","primary",3,"routerLink",4,"mifosxHasPermission"],[1,"container"],[1,"layout-row-wrap","flex-100"],[1,"flex-100","report-name"],[1,"layout-row-wrap"],[1,"flex-50","mat-body-strong"],[1,"flex-50"],[1,"mat-body-strong","flex-50"],["mat-raised-button","","color","primary",3,"routerLink"],["icon","edit",1,"m-r-10"],["mat-raised-button","","color","warn",3,"click",4,"mifosxHasPermission"],["mat-raised-button","","color","warn",3,"click"],["icon","trash",1,"m-r-10"]],template:function(n,i){n&1&&(l(0,"div",0),F(1,sje,4,5,"button",1),E(2,pje,2,1,"span"),r(),l(3,"div",2)(4,"mat-card")(5,"mat-card-title",3)(6,"div",4),c(7),p(8,"translate"),l(9,"b"),c(10),r()()(),l(11,"mat-card-content")(12,"div",5)(13,"div",6),c(14),p(15,"translate"),r(),l(16,"div",7),c(17),p(18,"translateKey"),r(),E(19,mje,3,3,"div",8),E(20,dje,3,4,"div",7),l(21,"div",6),c(22),p(23,"translate"),r(),l(24,"div",7),c(25),p(26,"translateKey"),r(),l(27,"div",6),c(28),p(29,"translate"),r(),l(30,"div",7),c(31),p(32,"yesNo"),r(),l(33,"div",6),c(34),p(35,"translate"),r(),l(36,"div",7),c(37),p(38,"yesNo"),r()()()()()),n&2&&(a(),g("mifosxHasPermission","UPDATE_REPORT"),a(),I(i.reportData.coreReport?-1:2),a(5),v(" ",m(8,14,"labels.catalogs.Report")," : "),a(3),h(i.reportData.reportName),a(4),v("",m(15,16,"labels.inputs.Report Type"),":"),a(3),v(" ",Ot(18,18,i.reportData.reportType,"text")," "),a(2),I(i.reportData.reportSubType?19:-1),a(),I(i.reportData.reportSubType?20:-1),a(2),v("",m(23,21,"labels.inputs.Report Category"),":"),a(3),v(" ",Ot(26,23,i.reportData.reportCategory,"catalogs")," "),a(3),v("",m(29,26,"labels.inputs.Core Report"),":"),a(3),v(" ",m(32,28,i.reportData.coreReport)," "),a(3),v("",m(35,30,"labels.inputs.User Report"),":"),a(3),v(" ",m(38,32,i.reportData.useReport)," "))},dependencies:[ue,fe,Ae,$e,Je,ve,Ke,ke,Qo,he,Fi,po],styles:[".container[_ngcontent-%COMP%]{max-width:37rem}.container[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] div[_ngcontent-%COMP%]{margin:1rem 0;word-wrap:break-word}.report-name[_ngcontent-%COMP%]{margin:18px}"]})}}return e})();var uje=()=>["../"];function fje(e,o){e&1&&(l(0,"mat-error"),c(1),p(2,"translate"),p(3,"translate"),l(4,"strong"),c(5),p(6,"translate"),r()()),e&2&&(a(),le(" ",m(2,3,"labels.inputs.Key")," ",m(3,5,"labels.commons.is")," "),a(4),h(m(6,7,"labels.commons.required")))}function hje(e,o){e&1&&(l(0,"mat-error"),c(1),p(2,"translate"),p(3,"translate"),l(4,"strong"),c(5),p(6,"translate"),r()()),e&2&&(a(),le(" ",m(2,3,"labels.inputs.Name")," ",m(3,5,"labels.commons.is")," "),a(4),h(m(6,7,"labels.commons.required")))}function gje(e,o){e&1&&(l(0,"mat-error"),c(1),p(2,"translate"),p(3,"translate"),l(4,"strong"),c(5),p(6,"translate"),r()()),e&2&&(a(),le(" ",m(2,3,"labels.inputs.Country Code")," ",m(3,5,"labels.commons.is")," "),a(4),h(m(6,7,"labels.commons.required")))}function _je(e,o){e&1&&(l(0,"mat-error"),c(1),p(2,"translate"),l(3,"strong"),c(4),p(5,"translate"),r()()),e&2&&(a(),v(" ",m(2,2,"labels.inputs.Country Code")," "),a(3),h(m(5,4,"labels.commons.must consist of 2 alphabetic characters")))}function Cje(e,o){if(e&1){let t=Y();l(0,"div",10)(1,"button",13),c(2),p(3,"translate"),r(),l(4,"button",14),R("click",function(){V(t);let i=w();return q(i.addQuestion())}),c(5),p(6,"translate"),r()()}if(e&2){let t=w();a(),g("routerLink",oe(8,uje)),a(),v(" ",m(3,4,"labels.buttons.Cancel")," "),a(2),g("disabled",!(t.surveyForm.get("key").valid&&t.surveyForm.get("name").valid&&t.surveyForm.get("countryCode").valid)),a(),v(" ",m(6,6,"labels.buttons.Proceed")," ")}}function vje(e,o){e&1&&(l(0,"mat-error"),c(1),p(2,"translate"),p(3,"translate"),l(4,"strong"),c(5),p(6,"translate"),r()()),e&2&&(a(),le(" ",m(2,3,"labels.inputs.Key")," ",m(3,5,"labels.commons.is")," "),a(4),h(m(6,7,"labels.commons.required")))}function xje(e,o){e&1&&(l(0,"mat-error"),c(1),p(2,"translate"),p(3,"translate"),l(4,"strong"),c(5),p(6,"translate"),r()()),e&2&&(a(),le(" ",m(2,3,"labels.inputs.Text")," ",m(3,5,"labels.commons.is")," "),a(4),h(m(6,7,"labels.commons.required")))}function bje(e,o){e&1&&(l(0,"mat-error"),c(1),p(2,"translate"),p(3,"translate"),l(4,"strong"),c(5),p(6,"translate"),r()()),e&2&&(a(),le(" ",m(2,3,"labels.inputs.Text")," ",m(3,5,"labels.commons.is")," "),a(4),h(m(6,7,"labels.commons.required")))}function yje(e,o){e&1&&(l(0,"mat-error"),c(1),p(2,"translate"),p(3,"translate"),l(4,"strong"),c(5),p(6,"translate"),r()()),e&2&&(a(),le(" ",m(2,3,"labels.inputs.Value")," ",m(3,5,"labels.commons.is")," "),a(4),h(m(6,7,"labels.commons.required")))}function Sje(e,o){e&1&&(l(0,"mat-error"),c(1),p(2,"translate"),l(3,"strong"),c(4),p(5,"translate"),r()()),e&2&&(a(),v(" ",m(2,2,"labels.inputs.Value")," "),a(3),h(m(5,4,"labels.commons.must be an integer between -9999 and 9999")))}function wje(e,o){if(e&1){let t=Y();l(0,"div",27)(1,"div",29)(2,"mat-form-field",30)(3,"mat-label"),c(4),p(5,"translate"),r(),b(6,"input",31),E(7,bje,7,9,"mat-error"),r(),l(8,"mat-form-field",30)(9,"mat-label"),c(10),p(11,"translate"),r(),b(12,"input",32),E(13,yje,7,9,"mat-error"),E(14,Sje,6,6,"mat-error"),r(),l(15,"div",33)(16,"div",34)(17,"button",35),p(18,"translate"),R("click",function(){let i=V(t).$index,s=w().$index,d=w();return q(d.removeResponse(d.getResponseDatas(s),i))}),b(19,"fa-icon",36),r()()()()()}if(e&2){let t=o.$implicit,n=o.$index,i=w().$index,s=w();a(),g("formGroupName",n),a(3),h(m(5,8,"labels.inputs.Text")),a(3),I(t.controls.text.hasError("required")?7:-1),a(3),h(m(11,10,"labels.inputs.Value")),a(3),I(t.controls.value.hasError("required")?13:-1),a(),I(t.controls.value.hasError("pattern")?14:-1),a(3),g("matTooltip",m(18,12,"labels.buttons.Delete"))("disabled",s.getResponseDatas(i).controls.length===1)}}function Pje(e,o){if(e&1){let t=Y();l(0,"mat-card-actions",28)(1,"button",37),R("click",function(){V(t);let i=w(2);return q(i.cancelSurvey())}),c(2),p(3,"translate"),r(),l(4,"button",24),R("click",function(){V(t);let i=w(2);return q(i.addQuestion())}),b(5,"fa-icon",25),c(6),p(7,"translate"),p(8,"translate"),r(),l(9,"button",38),c(10),p(11,"translate"),r()()}if(e&2){let t=w(2);a(2),v(" ",m(3,5,"labels.buttons.Cancel")," "),a(4),le(" ",m(7,7,"labels.buttons.Add")," ",m(8,9,"labels.heading.Question")," "),a(3),g("disabled",!t.surveyForm.valid),a(),v(" ",m(11,11,"labels.buttons.Submit")," ")}}function Tje(e,o){if(e&1){let t=Y();l(0,"mat-card",12)(1,"mat-card-content")(2,"div",15)(3,"div",16)(4,"h2",17),c(5),p(6,"translate"),r(),l(7,"button",18),R("click",function(){let i=V(t).$index,s=w();return q(s.removeQuestion(i))}),b(8,"fa-icon",19),c(9),p(10,"translate"),p(11,"translate"),r()(),l(12,"mat-form-field",4)(13,"mat-label"),c(14),p(15,"translate"),r(),b(16,"input",5),E(17,vje,7,9,"mat-error"),r(),l(18,"mat-form-field",4)(19,"mat-label"),c(20),p(21,"translate"),r(),b(22,"input",20),E(23,xje,7,9,"mat-error"),r(),l(24,"mat-form-field",8)(25,"mat-label"),c(26),p(27,"translate"),r(),b(28,"textarea",9),r(),b(29,"mat-divider",21),l(30,"div",22)(31,"h4",23),c(32),p(33,"translate"),r(),l(34,"button",24),R("click",function(){let i=V(t).$index,s=w();return q(s.addResponse(i))}),b(35,"fa-icon",25),c(36),p(37,"translate"),p(38,"translate"),r()(),l(39,"div",26),R("cdkDropListDropped",function(i){let s=V(t).$index,d=w();return q(d.dropResponse(i,s))}),Se(40,wje,20,14,"div",27,Pe),r()()(),l(42,"div"),E(43,Pje,12,13,"mat-card-actions",28),r()()}if(e&2){let t=o.$implicit,n=o.$index,i=o.$count,s=w();a(2),g("formGroupName",n),a(3),le("",m(6,16,"labels.heading.Question")," ",n+1),a(2),g("disabled",s.questionDatas.controls.length===1),a(2),le(" ",m(10,18,"labels.buttons.Delete")," ",m(11,20,"labels.heading.Question")," "),a(5),h(m(15,22,"labels.inputs.Key")),a(3),I(t.controls.key.hasError("required")?17:-1),a(3),h(m(21,24,"labels.inputs.Text")),a(3),I(t.controls.text.hasError("required")?23:-1),a(3),h(m(27,26,"labels.inputs.Description")),a(3),g("inset",!0),a(3),h(m(33,28,"labels.heading.Options")),a(4),le(" ",m(37,30,"labels.buttons.Add")," ",m(38,32,"labels.inputs.Option")," "),a(4),we(s.getResponseDatas(n).controls),a(3),I(n===i-1?43:-1)}}var Ix=(()=>{class e{constructor(){this.formBuilder=T(nt),this.systemService=T(ii),this.route=T(Ie),this.router=T(qe),this.dialog=T(Ht)}ngOnInit(){this.createSurveyForm()}createSurveyForm(){this.surveyForm=this.formBuilder.group({key:["",se.required],name:["",se.required],countryCode:["",[se.required,se.pattern("^\\s*([A-Za-z]{2})?\\s*$")]],description:[""],questionDatas:this.formBuilder.array([])})}get questionDatas(){return this.surveyForm.get("questionDatas")}getResponseDatas(t){return this.surveyForm.get(["questionDatas",t,"responseDatas"])}createQuestionForm(){return this.formBuilder.group({key:["",se.required],text:["",se.required],description:[""],responseDatas:this.formBuilder.array([this.createResponseForm()]),sequenceNo:[""]})}addQuestion(){this.questionDatas.push(this.createQuestionForm()),this.updateSequenceNumber()}removeQuestion(t){this.questionDatas.removeAt(t),this.updateSequenceNumber()}createResponseForm(){return this.formBuilder.group({text:["",se.required],value:["",[se.required,se.pattern("^\\s*[-]?\\d{0,4}\\s*$")]],sequenceNo:[""]})}addResponse(t){this.getResponseDatas(t).push(this.createResponseForm()),this.updateSequenceNumber()}removeResponse(t,n){t.removeAt(n),this.updateSequenceNumber()}updateSequenceNumber(){for(let t=0;t{n.cancel&&this.router.navigate(["../"],{relativeTo:this.route})})}dropQuestion(t){As(this.questionDatas.controls,t.previousIndex,t.currentIndex),this.updateSequenceNumber()}dropResponse(t,n){As(this.getResponseDatas(n).controls,t.previousIndex,t.currentIndex),this.updateSequenceNumber()}submit(){this.surveyForm.patchValue({countryCode:this.surveyForm.value.countryCode.toUpperCase()}),this.systemService.createSurvey(this.surveyForm.value).subscribe(t=>{this.router.navigate(["../"],{relativeTo:this.route})})}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275cmp=me({type:e,selectors:[["mifosx-create-survey"]],decls:34,vars:18,consts:[[1,"container"],[3,"ngSubmit","formGroup"],[1,"layout-column","gap-4percent"],[1,"layout-row-wrap","gap-2px","responsive-column"],[1,"flex-48"],["matInput","","maxlength","32","required","","formControlName","key"],["matInput","","maxlength","255","required","","formControlName","name"],["matInput","","maxlength","2","required","","formControlName","countryCode"],[1,"flex-98"],["matInput","","formControlName","description","cdkTextareaAutosize","","cdkAutosizeMinRows","2"],[1,"flex-fill","layout-row","layout-align-center","gap-5px","layout-xs-column"],["cdkDropList","",1,"layout-column","gap-4percent",3,"cdkDropListDropped"],["cdkDrag","","cdkDragLockAxis","y","formArrayName","questionDatas"],["type","button","mat-raised-button","",3,"routerLink"],["type","button","mat-raised-button","","color","primary",3,"click","disabled"],[1,"flex-fill","gap-2percent","responsive-column","layout-row-wrap",3,"formGroupName"],[1,"flex-98","layout-row-wrap","gap-2percent","align-between","align-items-center"],[1,"mat-h2"],["mat-raised-button","","color","warn",3,"click","disabled"],["icon","trash",1,"m-r-10"],["matInput","","maxlength","255","required","","formControlName","text"],[3,"inset"],[1,"flex-98","layout-row","align-between","align-items-center"],[1,"mat-h4"],["type","button","mat-raised-button","","color","primary",3,"click"],["icon","plus",1,"m-r-10"],["cdkDropList","",1,"flex-fill","layout-row-wrap","gap-2percent",3,"cdkDropListDropped"],["cdkDrag","","cdkDragLockAxis","y","formArrayName","responseDatas",1,"flex-fill","layout-row-wrap","gap-2percent"],[1,"layout-row","layout-xs-column","layout-align-center","gap-5px"],[1,"flex-fill","layout-row-wrap","gap-2percent",3,"formGroupName"],[1,"flex-43"],["matInput","","required","","formControlName","text"],["matInput","","required","","formControlName","value"],[1,"flex-8"],[1,"delete-wrapper"],["type","button","color","warn","mat-icon-button","","matTooltipPosition","above",3,"click","matTooltip","disabled"],["icon","trash","size","lg"],["type","button","mat-raised-button","",3,"click"],["mat-raised-button","","color","primary",3,"disabled"]],template:function(n,i){n&1&&(l(0,"div",0)(1,"form",1),R("ngSubmit",function(){return i.submit()}),l(2,"div",2)(3,"mat-card")(4,"mat-card-content")(5,"div",3)(6,"mat-form-field",4)(7,"mat-label"),c(8),p(9,"translate"),r(),b(10,"input",5),E(11,fje,7,9,"mat-error"),r(),l(12,"mat-form-field",4)(13,"mat-label"),c(14),p(15,"translate"),r(),b(16,"input",6),E(17,hje,7,9,"mat-error"),r(),l(18,"mat-form-field",4)(19,"mat-label"),c(20),p(21,"translate"),r(),b(22,"input",7),E(23,gje,7,9,"mat-error"),E(24,_je,6,6,"mat-error"),r(),l(25,"mat-form-field",8)(26,"mat-label"),c(27),p(28,"translate"),r(),b(29,"textarea",9),r(),E(30,Cje,7,9,"div",10),r()()(),l(31,"div",11),R("cdkDropListDropped",function(d){return i.dropQuestion(d)}),Se(32,Tje,44,34,"mat-card",12,Pe),r()()()()),n&2&&(a(),g("formGroup",i.surveyForm),a(7),h(m(9,10,"labels.inputs.Key")),a(3),I(i.surveyForm.controls.key.hasError("required")?11:-1),a(3),h(m(15,12,"labels.inputs.Name")),a(3),I(i.surveyForm.controls.name.hasError("required")?17:-1),a(3),h(m(21,14,"labels.inputs.Country Code")),a(3),I(i.surveyForm.controls.countryCode.hasError("required")?23:-1),a(),I(i.surveyForm.controls.countryCode.hasError("pattern")?24:-1),a(3),h(m(28,16,"labels.inputs.Description")),a(3),I(i.questionDatas.length?-1:30),a(2),we(i.questionDatas.controls))},dependencies:[ue,fe,tt,st,Ue,Xe,dt,qa,Ze,et,la,Va,Ae,$e,Je,Et,Fe,Be,ut,ze,ve,Ln,Tp,Pp,ke,Ri,wi,si,he],styles:[".delete-wrapper[_ngcontent-%COMP%]{padding:17.5px 0 0}h2[_ngcontent-%COMP%], h4[_ngcontent-%COMP%]{font-weight:500;margin:0}.mat-card[_ngcontent-%COMP%] .mat-divider-horizontal.mat-divider-inset[_ngcontent-%COMP%]{margin:1em 0 2em}.cdk-drag-placeholder[_ngcontent-%COMP%]{opacity:0}"]})}}return e})();function Mje(e,o){e&1&&(l(0,"mat-error"),c(1),p(2,"translate"),p(3,"translate"),l(4,"strong"),c(5),p(6,"translate"),r()()),e&2&&(a(),le(" ",m(2,3,"labels.inputs.Key")," ",m(3,5,"labels.commons.is")," "),a(4),h(m(6,7,"labels.commons.required")))}function Dje(e,o){e&1&&(l(0,"mat-error"),c(1),p(2,"translate"),p(3,"translate"),l(4,"strong"),c(5),p(6,"translate"),r()()),e&2&&(a(),le(" ",m(2,3,"labels.inputs.Name")," ",m(3,5,"labels.commons.is")," "),a(4),h(m(6,7,"labels.commons.required")))}function Eje(e,o){e&1&&(l(0,"mat-error"),c(1),p(2,"translate"),p(3,"translate"),l(4,"strong"),c(5),p(6,"translate"),r()()),e&2&&(a(),le(" ",m(2,3,"labels.inputs.Country Code")," ",m(3,5,"labels.commons.is")," "),a(4),h(m(6,7,"labels.commons.required")))}function Ije(e,o){e&1&&(l(0,"mat-error"),c(1),p(2,"translate"),l(3,"strong"),c(4),p(5,"translate"),r()()),e&2&&(a(),v(" ",m(2,2,"labels.inputs.Country Code")," "),a(3),h(m(5,4,"labels.commons.must consist of 2 alphabetic characters")))}function Oje(e,o){e&1&&(l(0,"mat-error"),c(1),p(2,"translate"),p(3,"translate"),l(4,"strong"),c(5),p(6,"translate"),r()()),e&2&&(a(),le(" ",m(2,3,"labels.inputs.Key")," ",m(3,5,"labels.commons.is")," "),a(4),h(m(6,7,"labels.commons.required")))}function Aje(e,o){e&1&&(l(0,"mat-error"),c(1),p(2,"translate"),p(3,"translate"),l(4,"strong"),c(5),p(6,"translate"),r()()),e&2&&(a(),le(" ",m(2,3,"labels.inputs.Text")," ",m(3,5,"labels.commons.is")," "),a(4),h(m(6,7,"labels.commons.required")))}function Fje(e,o){e&1&&(l(0,"mat-error"),c(1),p(2,"translate"),p(3,"translate"),l(4,"strong"),c(5),p(6,"translate"),r()()),e&2&&(a(),le(" ",m(2,3,"labels.inputs.Text")," ",m(3,5,"labels.commons.is")," "),a(4),h(m(6,7,"labels.commons.required")))}function kje(e,o){e&1&&(l(0,"mat-error"),c(1),p(2,"translate"),p(3,"translate"),l(4,"strong"),c(5),p(6,"translate"),r()()),e&2&&(a(),le(" ",m(2,3,"labels.inputs.Value")," ",m(3,5,"labels.commons.is")," "),a(4),h(m(6,7,"labels.commons.required")))}function Bje(e,o){e&1&&(l(0,"mat-error"),c(1),p(2,"translate"),l(3,"strong"),c(4),p(5,"translate"),r()()),e&2&&(a(),v(" ",m(2,2,"labels.inputs.Value")),a(3),h(m(5,4,"labels.commons.must be an integer between -9999 and 9999")))}function Rje(e,o){if(e&1){let t=Y();l(0,"div",24)(1,"div",26)(2,"mat-form-field",27)(3,"mat-label"),c(4),p(5,"translate"),r(),b(6,"input",28),E(7,Fje,7,9,"mat-error"),r(),l(8,"mat-form-field",27)(9,"mat-label"),c(10),p(11,"translate"),r(),b(12,"input",29),E(13,kje,7,9,"mat-error"),E(14,Bje,6,6,"mat-error"),r(),l(15,"div",30)(16,"div",31)(17,"button",32),p(18,"translate"),R("click",function(){let i=V(t).$index,s=w().$index,d=w();return q(d.removeResponse(d.getResponseDatas(s),i))}),b(19,"fa-icon",33),r()()()()()}if(e&2){let t=o.$implicit,n=o.$index,i=w().$index,s=w();a(),g("formGroupName",n),a(3),h(m(5,8,"labels.inputs.Text")),a(3),I(t.get("text").hasError("required")?7:-1),a(3),h(m(11,10,"labels.inputs.Value")),a(3),I(t.get("value").hasError("required")?13:-1),a(),I(t.get("value").hasError("pattern")?14:-1),a(3),g("matTooltip",m(18,12,"labels.buttons.Delete"))("disabled",s.getResponseDatas(i).controls.length===1)}}function Nje(e,o){if(e&1){let t=Y();l(0,"mat-card-actions",25)(1,"button",34),R("click",function(){V(t);let i=w(2);return q(i.cancelSurvey())}),c(2),p(3,"translate"),r(),l(4,"button",21),R("click",function(){V(t);let i=w(2);return q(i.addQuestion())}),b(5,"fa-icon",22),c(6),p(7,"translate"),p(8,"translate"),r(),l(9,"button",35),c(10),p(11,"translate"),r()()}if(e&2){let t=w(2);a(2),v(" ",m(3,5,"labels.buttons.Cancel")," "),a(4),le(" ",m(7,7,"labels.buttons.Add")," ",m(8,9,"labels.heading.Question")," "),a(3),g("disabled",!t.surveyForm.valid),a(),v(" ",m(11,11,"labels.text.Edit Survey")," ")}}function Lje(e,o){if(e&1){let t=Y();l(0,"mat-card",11)(1,"mat-card-content")(2,"div",12)(3,"div",13)(4,"h2",14),c(5),p(6,"translate"),r(),l(7,"button",15),R("click",function(){let i=V(t).$index,s=w();return q(s.removeQuestion(i))}),b(8,"fa-icon",16),c(9),p(10,"translate"),p(11,"translate"),r()(),l(12,"mat-form-field",4)(13,"mat-label"),c(14),p(15,"translate"),r(),b(16,"input",5),E(17,Oje,7,9,"mat-error"),r(),l(18,"mat-form-field",4)(19,"mat-label"),c(20),p(21,"translate"),r(),b(22,"input",17),E(23,Aje,7,9,"mat-error"),r(),l(24,"mat-form-field",8)(25,"mat-label"),c(26),p(27,"translate"),r(),b(28,"textarea",9),r(),b(29,"mat-divider",18),l(30,"div",19)(31,"h4",20),c(32),p(33,"translate"),r(),l(34,"button",21),R("click",function(){let i=V(t).$index,s=w();return q(s.addResponse(i))}),b(35,"fa-icon",22),c(36),p(37,"translate"),p(38,"translate"),r()(),l(39,"div",23),R("cdkDropListDropped",function(i){let s=V(t).$index,d=w();return q(d.dropResponse(i,s))}),Se(40,Rje,20,14,"div",24,Pe),r()()(),l(42,"div"),E(43,Nje,12,13,"mat-card-actions",25),r()()}if(e&2){let t=o.$implicit,n=o.$index,i=o.$count,s=w();a(2),g("formGroupName",n),a(3),le("",m(6,16,"labels.heading.Question")," ",n+1),a(2),g("disabled",s.questionDatas.controls.length===1),a(2),le(" ",m(10,18,"labels.buttons.Delete")," ",m(11,20,"labels.heading.Question")," "),a(5),h(m(15,22,"labels.inputs.Key")),a(3),I(t.get("key").hasError("required")?17:-1),a(3),h(m(21,24,"labels.inputs.Text")),a(3),I(t.get("text").hasError("required")?23:-1),a(3),h(m(27,26,"labels.inputs.Description")),a(3),g("inset",!0),a(3),h(m(33,28,"labels.heading.Options")),a(4),le(" ",m(37,30,"labels.buttons.Add")," ",m(38,32,"labels.inputs.Option")," "),a(4),we(s.getResponseDatas(n).controls),a(3),I(n===i-1?43:-1)}}var Ox=(()=>{class e{constructor(){this.formBuilder=T(nt),this.systemService=T(ii),this.route=T(Ie),this.router=T(qe),this.dialog=T(Ht),this.createSurveyForm(),this.route.data.subscribe(t=>{this.prepareSurveyForm(t.survey)})}prepareSurveyForm(t){this.surveyForm.get("key").setValue(t.key),this.surveyForm.get("name").setValue(t.name),this.surveyForm.get("countryCode").setValue(t.countryCode),this.surveyForm.get("description").setValue(t.description),this.prepareQuestionDatas(this.questionDatas,t.questionDatas)}prepareQuestionDatas(t,n){n.forEach((i,s)=>{this.addQuestion();let d=t.at(s);d.get("key").setValue(i.key),d.get("text").setValue(i.text),d.get("description").setValue(i.description),this.prepareResponseDatas(d.get("responseDatas"),i.responseDatas,s)})}prepareResponseDatas(t,n,i){n.forEach((s,d)=>{d&&this.addResponse(i);let u=t.at(d);u.get("text").setValue(s.text),u.get("value").setValue(s.value)})}createSurveyForm(){this.surveyForm=this.formBuilder.group({key:["",se.required],name:["",se.required],countryCode:["",[se.required,se.pattern("^\\s*([A-Za-z]{2})?\\s*$")]],description:[""],questionDatas:this.formBuilder.array([])})}get questionDatas(){return this.surveyForm.get("questionDatas")}getResponseDatas(t){return this.surveyForm.get(["questionDatas",t,"responseDatas"])}createQuestionForm(){return this.formBuilder.group({key:["",se.required],text:["",se.required],description:[""],responseDatas:this.formBuilder.array([this.createResponseForm()]),sequenceNo:[""]})}addQuestion(){this.questionDatas.push(this.createQuestionForm()),this.updateSequenceNumber()}removeQuestion(t){this.questionDatas.removeAt(t),this.updateSequenceNumber()}createResponseForm(){return this.formBuilder.group({text:["",se.required],value:["",[se.required,se.pattern("^\\s*[-]?\\d{0,4}\\s*$")]],sequenceNo:[""]})}addResponse(t){this.getResponseDatas(t).push(this.createResponseForm()),this.updateSequenceNumber()}removeResponse(t,n){t.removeAt(n),this.updateSequenceNumber()}updateSequenceNumber(){for(let t=0;t{n.cancel&&this.router.navigate(["../"],{relativeTo:this.route})})}dropQuestion(t){As(this.questionDatas.controls,t.previousIndex,t.currentIndex),this.updateSequenceNumber()}dropResponse(t,n){As(this.getResponseDatas(n).controls,t.previousIndex,t.currentIndex),this.updateSequenceNumber()}submit(){this.surveyForm.patchValue({countryCode:this.surveyForm.value.countryCode.toUpperCase()}),this.systemService.editSurvey(this.route.snapshot.paramMap.get("id"),this.surveyForm.value).subscribe(t=>{this.router.navigate(["../"],{relativeTo:this.route})})}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275cmp=me({type:e,selectors:[["mifosx-edit-survey"]],decls:33,vars:17,consts:[[1,"container"],[3,"ngSubmit","formGroup"],[1,"layout-column","gap-4percent"],[1,"layout-row-wrap","gap-2px","responsive-column"],[1,"flex-48"],["matInput","","maxlength","32","required","","formControlName","key"],["matInput","","maxlength","255","required","","formControlName","name"],["matInput","","maxlength","2","required","","formControlName","countryCode"],[1,"flex-98"],["matInput","","formControlName","description","cdkTextareaAutosize","","cdkAutosizeMinRows","2"],["cdkDropList","",1,"layout-column","gap-4percent",3,"cdkDropListDropped"],["cdkDrag","","cdkDragLockAxis","y","formArrayName","questionDatas"],[1,"flex-fill","gap-2percent","responsive-column","layout-row-wrap",3,"formGroupName"],[1,"flex-98","layout-row-wrap","gap-2percent","align-between","align-items-center"],[1,"mat-h2"],["mat-raised-button","","color","warn",3,"click","disabled"],["icon","trash",1,"m-r-10"],["matInput","","maxlength","255","required","","formControlName","text"],[3,"inset"],[1,"flex-98","layout-row","align-between","align-items-center"],[1,"mat-h4"],["type","button","mat-raised-button","","color","primary",3,"click"],["icon","plus",1,"m-r-10"],["cdkDropList","",1,"flex-fill","layout-row-wrap","gap-2percent",3,"cdkDropListDropped"],["cdkDrag","","cdkDragLockAxis","y","formArrayName","responseDatas",1,"flex-fill","layout-row-wrap","gap-2percent"],[1,"layout-row","layout-xs-column","layout-align-center","gap-5px"],[1,"flex-fill","layout-row-wrap","gap-2percent",3,"formGroupName"],[1,"flex-43"],["matInput","","required","","formControlName","text"],["matInput","","required","","formControlName","value"],[1,"flex-8"],[1,"delete-wrapper"],["type","button","color","warn","mat-icon-button","","matTooltipPosition","above",3,"click","matTooltip","disabled"],["icon","trash","size","lg"],["type","button","mat-raised-button","",3,"click"],["mat-raised-button","","color","primary",3,"disabled"]],template:function(n,i){n&1&&(l(0,"div",0)(1,"form",1),R("ngSubmit",function(){return i.submit()}),l(2,"div",2)(3,"mat-card")(4,"mat-card-content")(5,"div",3)(6,"mat-form-field",4)(7,"mat-label"),c(8),p(9,"translate"),r(),b(10,"input",5),E(11,Mje,7,9,"mat-error"),r(),l(12,"mat-form-field",4)(13,"mat-label"),c(14),p(15,"translate"),r(),b(16,"input",6),E(17,Dje,7,9,"mat-error"),r(),l(18,"mat-form-field",4)(19,"mat-label"),c(20),p(21,"translate"),r(),b(22,"input",7),E(23,Eje,7,9,"mat-error"),E(24,Ije,6,6,"mat-error"),r(),l(25,"mat-form-field",8)(26,"mat-label"),c(27),p(28,"translate"),r(),b(29,"textarea",9),r()()()(),l(30,"div",10),R("cdkDropListDropped",function(d){return i.dropQuestion(d)}),Se(31,Lje,44,34,"mat-card",11,Pe),r()()()()),n&2&&(a(),g("formGroup",i.surveyForm),a(7),h(m(9,9,"labels.inputs.Key")),a(3),I(i.surveyForm.controls.key.hasError("required")?11:-1),a(3),h(m(15,11,"labels.inputs.Name")),a(3),I(i.surveyForm.controls.name.hasError("required")?17:-1),a(3),v("",m(21,13,"labels.inputs.Country Code")," "),a(3),I(i.surveyForm.controls.countryCode.hasError("required")?23:-1),a(),I(i.surveyForm.controls.countryCode.hasError("pattern")?24:-1),a(3),h(m(28,15,"labels.inputs.Description")),a(4),we(i.questionDatas.controls))},dependencies:[ue,fe,tt,st,Ue,Xe,dt,qa,Ze,et,la,Va,$e,Je,Et,Fe,Be,ut,ze,ve,Ln,Tp,Pp,ke,Ri,wi,si,he],styles:[".delete-wrapper[_ngcontent-%COMP%]{padding:17.5px 0 0}h2[_ngcontent-%COMP%], h4[_ngcontent-%COMP%]{font-weight:500;margin:0}.mat-card[_ngcontent-%COMP%] .mat-divider-horizontal.mat-divider-inset[_ngcontent-%COMP%]{margin:1em 0 2em}.cdk-drag-placeholder[_ngcontent-%COMP%]{opacity:0}"]})}}return e})();var Vje=()=>["create"],qje=()=>[10,25,50,100],zje=e=>[e];function Hje(e,o){e&1&&(l(0,"th",20),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.Key")))}function Gje(e,o){if(e&1&&(l(0,"td",21),c(1),r()),e&2){let t=o.$implicit;a(),h(t.key)}}function jje(e,o){e&1&&(l(0,"th",20),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.Name")))}function $je(e,o){if(e&1&&(l(0,"td",21),c(1),r()),e&2){let t=o.$implicit;a(),h(t.name)}}function Uje(e,o){e&1&&(l(0,"th",20),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.Description")))}function Wje(e,o){if(e&1&&(l(0,"td",21),c(1),r()),e&2){let t=o.$implicit;a(),h(t.description)}}function Qje(e,o){e&1&&(l(0,"th",20),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.Country Code")))}function Yje(e,o){if(e&1&&(l(0,"td",21),c(1),r()),e&2){let t=o.$implicit;a(),h(t.countryCode)}}function Jje(e,o){e&1&&(l(0,"th",20),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.Status")))}function Kje(e,o){if(e&1&&(l(0,"td",21)(1,"div",22),b(2,"fa-icon",23),p(3,"translate"),p(4,"translate"),r()()),e&2){let t=o.$implicit,n=w();a(),g("className",n.isActive(t.validFrom,t.validTo)?"enabled":"disabled"),a(),g("matTooltip",Le(n.isActive(t.validFrom,t.validTo)?m(4,5,"labels.inputs.Enabled"):m(3,3,"labels.inputs.Disabled")))}}function Xje(e,o){e&1&&(l(0,"th",20),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.Action")))}function Zje(e,o){if(e&1){let t=Y();l(0,"button",26),R("click",function(i){V(t);let s=w().$implicit;return w().activate(s),q(i.stopPropagation())}),b(1,"fa-icon",27),c(2),p(3,"translate"),r()}e&2&&(a(2),v("",m(3,1,"labels.buttons.Activate")," "))}function e$e(e,o){if(e&1){let t=Y();l(0,"button",28),R("click",function(i){V(t);let s=w().$implicit;return w().deactivate(s),q(i.stopPropagation())}),b(1,"fa-icon",29),c(2),p(3,"translate"),r()}e&2&&(a(2),v("",m(3,1,"labels.buttons.Deactivate")," "))}function t$e(e,o){if(e&1&&(l(0,"td",21),E(1,Zje,4,3,"button",24),E(2,e$e,4,3,"button",25),r()),e&2){let t=o.$implicit,n=w();a(),I(n.isActive(t.validFrom,t.validTo)?-1:1),a(),I(n.isActive(t.validFrom,t.validTo)?2:-1)}}function i$e(e,o){e&1&&b(0,"tr",30)}function n$e(e,o){if(e&1&&b(0,"tr",31),e&2){let t=o.$implicit;g("routerLink",Nt(1,zje,t.id))}}var Ax=(()=>{class e{constructor(){this.route=T(Ie),this.systemService=T(ii),this.displayedColumns=["key","name","description","countryCode","status","action"],this.route.data.subscribe(t=>{this.surveysData=t.surveys})}isActive(t,n){let i=new Date().toISOString().split("T")[0];return i>=t&&i<=n}ngOnInit(){this.setSurveys(),this.dataSource.sortingDataAccessor=(t,n)=>{switch(n){case"status":return this.isActive(t.validFrom,t.validTo);case"action":return this.isActive(t.validFrom,t.validTo);default:return t[n]}}}setSurveys(){this.dataSource=new Wt(this.surveysData),this.dataSource.paginator=this.paginator,this.dataSource.sort=this.sort}applyFilter(t){this.dataSource.filter=t.trim().toLowerCase()}activate(t){this.systemService.activateSurvey(t.id).subscribe(()=>{let n=new Date().toISOString().split("T")[0];t.validFrom=n,t.validTo=n})}deactivate(t){this.systemService.deactivateSurvey(t.id).subscribe(()=>{let n=new Date;n.setDate(n.getDate()-1);let i=n.toISOString().split("T")[0];t.validTo=i})}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275cmp=me({type:e,selectors:[["mifosx-manage-surveys"]],viewQuery:function(n,i){if(n&1&&(Ee(kt,7),Ee(It,7)),n&2){let s;Te(s=Me())&&(i.paginator=s.first),Te(s=Me())&&(i.sort=s.first)}},decls:35,vars:13,consts:[[1,"container","m-b-20","layout-row","align-end","gap-20px"],["mat-raised-button","","color","primary",3,"routerLink"],["icon","plus",1,"m-r-10"],[1,"container"],[1,"layout-row"],[1,"flex-fill"],["matInput","",3,"keyup"],[1,"mat-elevation-z8"],["mat-table","","matSort","",3,"dataSource"],["matColumnDef","key"],["mat-header-cell","","mat-sort-header","",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","name"],["matColumnDef","description"],["matColumnDef","countryCode"],["matColumnDef","status"],["matColumnDef","action"],["mat-header-row","",4,"matHeaderRowDef"],["mat-row","","class","select-row",3,"routerLink",4,"matRowDef","matRowDefColumns"],["showFirstLastButtons","",3,"pageSizeOptions"],["mat-header-cell","","mat-sort-header",""],["mat-cell",""],[3,"className"],["matTooltipPosition","right","icon","circle","size","lg",3,"matTooltip"],["mat-button","","color","accent"],["mat-button","","color","warn"],["mat-button","","color","accent",3,"click"],["icon","lock-open",1,"m-r-10"],["mat-button","","color","warn",3,"click"],["icon","lock",1,"m-r-10"],["mat-header-row",""],["mat-row","",1,"select-row",3,"routerLink"]],template:function(n,i){n&1&&(l(0,"div",0)(1,"button",1),b(2,"fa-icon",2),c(3),p(4,"translate"),r()(),l(5,"div",3)(6,"div",4)(7,"mat-form-field",5)(8,"mat-label"),c(9),p(10,"translate"),r(),l(11,"input",6),R("keyup",function(d){return i.applyFilter(d.target.value)}),r()()(),l(12,"div",7)(13,"table",8),X(14,9),F(15,Hje,3,3,"th",10)(16,Gje,2,1,"td",11),Z(),X(17,12),F(18,jje,3,3,"th",10)(19,$je,2,1,"td",11),Z(),X(20,13),F(21,Uje,3,3,"th",10)(22,Wje,2,1,"td",11),Z(),X(23,14),F(24,Qje,3,3,"th",10)(25,Yje,2,1,"td",11),Z(),X(26,15),F(27,Jje,3,3,"th",10)(28,Kje,5,7,"td",11),Z(),X(29,16),F(30,Xje,3,3,"th",10)(31,t$e,3,2,"td",11),Z(),F(32,i$e,1,0,"tr",17)(33,n$e,1,3,"tr",18),r(),b(34,"mat-paginator",19),r()()),n&2&&(a(),g("routerLink",oe(11,Vje)),a(2),v(" ",m(4,7,"labels.buttons.Create Surveys")," "),a(6),h(m(10,9,"labels.inputs.Filter")),a(4),g("dataSource",i.dataSource),a(19),g("matHeaderRowDef",i.displayedColumns),a(),g("matRowDefColumns",i.displayedColumns),a(),g("pageSizeOptions",oe(12,qje)))},dependencies:[ue,fe,Ae,Fe,Be,ze,ve,ke,_t,It,xt,vt,bt,ri,Ct,yt,si,St,Pt,wt,Tt,kt,he],styles:["table[_ngcontent-%COMP%]{width:100%}table[_ngcontent-%COMP%] .select-row[_ngcontent-%COMP%]:hover{cursor:pointer}.enabled[_ngcontent-%COMP%]{color:#32cd32}.disabled[_ngcontent-%COMP%]{color:#f44366}"]})}}return e})();function o$e(e,o){if(e&1){let t=Y();l(0,"button",10),R("click",function(){V(t);let i=w();return q(i.onEdit())}),b(1,"fa-icon",11),c(2),p(3,"translate"),r()}e&2&&(a(2),v(" ",m(3,1,"labels.buttons.Edit")," "))}function a$e(e,o){if(e&1&&(l(0,"th"),c(1),p(2,"titlecase"),r()),e&2){let t=o.$implicit;a(),h(m(2,1,t))}}function r$e(e,o){if(e&1&&(l(0,"td"),c(1),r()),e&2){let t=o.$implicit,n=w().$implicit;a(),v(" ",n[t]," ")}}function l$e(e,o){if(e&1&&(l(0,"tr"),Se(1,r$e,2,1,"td",null,Pe),r()),e&2){let t=w(2);a(),we(t.displayedColumns)}}function s$e(e,o){if(e&1&&(l(0,"div",9)(1,"mat-card")(2,"mat-card-content")(3,"div"),c(4),p(5,"translate"),r(),l(6,"div",12)(7,"div",13)(8,"b"),c(9),p(10,"translate"),r()(),l(11,"div",14),c(12),r(),l(13,"div",6)(14,"b"),c(15),p(16,"translate"),r()(),l(17,"div",14),c(18),r()(),l(19,"div",15)(20,"div",16)(21,"b"),c(22),p(23,"translate"),r()(),l(24,"div",14),c(25),r()(),l(26,"div",17)(27,"div")(28,"b"),c(29),p(30,"translate"),r()(),l(31,"table",18)(32,"tr"),Se(33,a$e,3,3,"th",null,Pe),r(),Se(35,l$e,3,0,"tr",null,Pe),r()()()()()),e&2){let t=o.$implicit,n=o.$index,i=w();a(4),le("",m(5,9,"labels.heading.Question"),": ",n+1),a(5),v("",m(10,11,"labels.inputs.Key"),":"),a(3),v(" ",t.key," "),a(3),v("",m(16,13,"labels.inputs.Text"),":"),a(3),v(" ",t.text," "),a(4),v("",m(23,15,"labels.inputs.Description"),":"),a(3),v(" ",t.description," "),a(4),v("",m(30,17,"labels.inputs.Option"),": "),a(4),we(i.displayedColumns),a(2),we(t.responseDatas)}}var Fx=(()=>{class e{constructor(){this.route=T(Ie),this.systemService=T(ii),this.dialog=T(Ht),this.router=T(qe),this.displayedColumns=["text","value"],this.route.data.subscribe(t=>{this.surveyData=t.survey})}onEdit(){this.router.navigate(["./edit"],{relativeTo:this.route})}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275cmp=me({type:e,selectors:[["mifosx-view-survey"]],decls:45,vars:25,consts:[[1,"layout-row","align-end","gap-2px","responsive-column","container","m-b-20"],["mat-raised-button","","color","primary",3,"click",4,"mifosxHasPermission"],[1,"container","m-b-20"],[1,"layout-column"],[3,"inset"],[1,"layout-row-wrap"],[1,"flex-40","flex-lt-md-50","header"],[1,"flex-60","flex-lt-md-50"],[1,"questions"],[1,"survey-questions"],["mat-raised-button","","color","primary",3,"click"],["icon","edit",1,"m-r-10"],["id","key-text",1,"layout-row"],[1,"flex-25","header"],[1,"flex-40","flex-50-lt-md"],["id","description",1,"layout-row"],[1,"flex-20","flex-50-lt-md","header"],["id","questionaire",1,"layout-column"],["id","response"]],template:function(n,i){n&1&&(l(0,"div",0),F(1,o$e,4,3,"button",1),r(),l(2,"div",2)(3,"mat-card")(4,"mat-card-header",3)(5,"mat-card-title"),c(6),p(7,"translate"),r(),b(8,"mat-divider",4),r(),l(9,"mat-card-content")(10,"div",5)(11,"div",6)(12,"b"),c(13),p(14,"translate"),r()(),l(15,"div",7),c(16),r(),l(17,"div",6)(18,"b"),c(19),p(20,"translate"),r()(),l(21,"div",7),c(22),r(),l(23,"div",6)(24,"b"),c(25),p(26,"translate"),r()(),l(27,"div",7),c(28),r(),l(29,"div",6)(30,"b"),c(31),p(32,"translate"),r()(),l(33,"div",7),c(34),r()()()()(),l(35,"div",2)(36,"mat-card",8)(37,"mat-card-header",3)(38,"mat-card-title"),c(39),p(40,"translate"),r(),b(41,"mat-divider",4),r(),l(42,"mat-card-content"),Se(43,s$e,37,19,"div",9,Pe),r()()()),n&2&&(a(),g("mifosxHasPermission","UPDATE_REPORT"),a(5),h(m(7,13,"labels.buttons.Survey")),a(2),g("inset",!0),a(5),v("",m(14,15,"labels.inputs.Key"),":"),a(3),v(" ",i.surveyData.key," "),a(3),v("",m(20,17,"labels.inputs.Name"),":"),a(3),v(" ",i.surveyData.name," "),a(3),v("",m(26,19,"labels.inputs.Country Code"),":"),a(3),v(" ",i.surveyData.countryCode," "),a(3),v("",m(32,21,"labels.inputs.Description"),":"),a(3),v(" ",i.surveyData.description," "),a(5),h(m(40,23,"labels.inputs.Questions")),a(2),g("inset",!0),a(2),we(i.surveyData.questionDatas))},dependencies:[ue,fe,$e,Je,ve,Ke,ke,sa,Qo,Ri,v0,he],styles:[".mat-card[_ngcontent-%COMP%]{margin:5px}.survey-questions[_ngcontent-%COMP%]{margin-bottom:10px}#key-text[_ngcontent-%COMP%], #description[_ngcontent-%COMP%], #questionaire[_ngcontent-%COMP%]{margin:10px}#response[_ngcontent-%COMP%]{width:100%}#response[_ngcontent-%COMP%] th[_ngcontent-%COMP%], #response[_ngcontent-%COMP%] td[_ngcontent-%COMP%]{text-align:left;width:100px}#response[_ngcontent-%COMP%] tr[_ngcontent-%COMP%]:hover{background-color:#ddd}mat-card-header[_ngcontent-%COMP%]{margin-bottom:12px}"]})}}return e})();var c$e=()=>["../"];function p$e(e,o){e&1&&(l(0,"mat-error"),c(1),p(2,"translate"),p(3,"translate"),l(4,"strong"),c(5),p(6,"translate"),r()()),e&2&&(a(),le(" ",m(2,3,"labels.inputs.Role Name")," ",m(3,5,"labels.commons.is")," "),a(4),h(m(6,7,"labels.commons.required")))}function m$e(e,o){e&1&&(l(0,"mat-error"),c(1),p(2,"translate"),p(3,"translate"),l(4,"strong"),c(5),p(6,"translate"),r()()),e&2&&(a(),le(" ",m(2,3,"labels.inputs.Role Description")," ",m(3,5,"labels.commons.is")," "),a(4),h(m(6,7,"labels.commons.required")))}var kx=(()=>{class e{constructor(){this.formBuilder=T(nt),this.systemService=T(ii),this.route=T(Ie),this.router=T(qe),this.authService=T(Oa)}ngOnInit(){this.createRoleForm()}createRoleForm(){this.roleForm=this.formBuilder.group({name:["",se.required],description:["",se.required]})}submit(){this.systemService.createRole(this.roleForm.value).subscribe(t=>{un.OIDC.oidcServerEnabled&&this.authService.createRole(t.resourceId,this.roleForm.value.name,this.roleForm.value.description),this.router.navigate(["../"],{relativeTo:this.route})})}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275cmp=me({type:e,selectors:[["mifosx-add-role"]],decls:24,vars:18,consts:[[1,"container"],[3,"ngSubmit","formGroup"],[1,"layout-column"],["matInput","","required","","formControlName","name"],["matInput","","required","","formControlName","description"],[1,"layout-row","align-center","gap-5px","responsive-column"],["type","button","mat-raised-button","",3,"routerLink"],["mat-raised-button","","color","primary",3,"disabled"]],template:function(n,i){n&1&&(l(0,"div",0)(1,"mat-card")(2,"form",1),R("ngSubmit",function(){return i.submit()}),l(3,"mat-card-content")(4,"div",2)(5,"mat-form-field")(6,"mat-label"),c(7),p(8,"translate"),r(),b(9,"input",3),E(10,p$e,7,9,"mat-error"),r(),l(11,"mat-form-field")(12,"mat-label"),c(13),p(14,"translate"),r(),b(15,"textarea",4),E(16,m$e,7,9,"mat-error"),r()()(),l(17,"mat-card-actions",5)(18,"button",6),c(19),p(20,"translate"),r(),l(21,"button",7),c(22),p(23,"translate"),r()()()()()),n&2&&(a(2),g("formGroup",i.roleForm),a(5),h(m(8,9,"labels.inputs.Name")),a(3),I(i.roleForm.controls.name.hasError("required")?10:-1),a(3),h(m(14,11,"labels.inputs.Description")),a(3),I(i.roleForm.controls.description.hasError("required")?16:-1),a(2),g("routerLink",oe(17,c$e)),a(),v(" ",m(20,13,"labels.buttons.Cancel")," "),a(2),g("disabled",!i.roleForm.valid),a(),v(" ",m(23,15,"labels.buttons.Submit")," "))},dependencies:[ue,fe,tt,st,Ue,Xe,dt,Ze,et,Ae,$e,Je,Et,Fe,Be,ut,ze,ve,he],styles:[".container[_ngcontent-%COMP%]{max-width:37rem}"]})}}return e})();var d$e=()=>["../../"];function u$e(e,o){e&1&&(l(0,"mat-error"),c(1),p(2,"translate"),p(3,"translate"),l(4,"strong"),c(5),p(6,"translate"),r()()),e&2&&(a(),le(" ",m(2,3,"labels.inputs.Description")," ",m(3,5,"labels.commons.is")," "),a(4),h(m(6,7,"labels.commons.required")))}var Bx=(()=>{class e{constructor(){this.formBuilder=T(nt),this.systemService=T(ii),this.route=T(Ie),this.router=T(qe),this.authService=T(Oa),this.route.data.subscribe(t=>{this.roleData=t.role})}ngOnInit(){this.createRoleForm()}createRoleForm(){this.roleForm=this.formBuilder.group({name:[{value:this.roleData.name,disabled:!0},se.required],description:[this.roleData.description,se.required]})}submit(){this.systemService.updateRole(this.roleForm.value,this.roleData.id).subscribe(()=>{un.OIDC.oidcServerEnabled&&this.authService.updateRole(this.roleData.id,this.roleForm.get("name")?.value,this.roleForm.value.description),this.router.navigate(["../../"],{relativeTo:this.route})})}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275cmp=me({type:e,selectors:[["mifosx-edit-role"]],decls:23,vars:17,consts:[[1,"container"],[3,"ngSubmit","formGroup"],[1,"layout-column"],["matInput","","disabled","","formControlName","name"],["matInput","","required","","formControlName","description"],[1,"layout-row","align-center","gap-5px","responsive-column"],["type","button","mat-raised-button","",3,"routerLink"],["mat-raised-button","","color","primary",3,"disabled"]],template:function(n,i){n&1&&(l(0,"div",0)(1,"mat-card")(2,"form",1),R("ngSubmit",function(){return i.submit()}),l(3,"mat-card-content")(4,"div",2)(5,"mat-form-field")(6,"mat-label"),c(7),p(8,"translate"),r(),b(9,"input",3),r(),l(10,"mat-form-field")(11,"mat-label"),c(12),p(13,"translate"),r(),b(14,"input",4),E(15,u$e,7,9,"mat-error"),r()()(),l(16,"mat-card-actions",5)(17,"button",6),c(18),p(19,"translate"),r(),l(20,"button",7),c(21),p(22,"translate"),r()()()()()),n&2&&(a(2),g("formGroup",i.roleForm),a(5),h(m(8,8,"labels.inputs.Role Name")),a(5),h(m(13,10,"labels.inputs.Role Description")),a(3),I(i.roleForm.controls.description.hasError("required")?15:-1),a(2),g("routerLink",oe(16,d$e)),a(),v(" ",m(19,12,"labels.buttons.Cancel")," "),a(2),g("disabled",!i.roleForm.valid||i.roleForm.pristine),a(),v(" ",m(22,14,"labels.buttons.Submit")," "))},dependencies:[ue,fe,tt,st,Ue,Xe,dt,Ze,et,Ae,$e,Je,Et,Fe,Be,ut,ze,ve,he],styles:[".container[_ngcontent-%COMP%]{max-width:37rem}span[_ngcontent-%COMP%]{font-size:1rem}.roleName[_ngcontent-%COMP%]{line-height:3rem}"]})}}return e})();var f$e=["buttonAddRole"],h$e=["templateButtonAddRole"],g$e=["tableRolesandPermissions"],_$e=["templateTableRolesandPermissions"],C$e=()=>["add"],v$e=()=>[10,25,50,100],x$e=e=>[e,"edit"],b$e=e=>[e];function y$e(e,o){e&1&&(l(0,"th",26),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.Name")))}function S$e(e,o){if(e&1&&(l(0,"td",27),c(1),r()),e&2){let t=o.$implicit;a(),h(t.name)}}function w$e(e,o){e&1&&(l(0,"th",26),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.Description")))}function P$e(e,o){if(e&1&&(l(0,"td",27),c(1),r()),e&2){let t=o.$implicit;a(),h(t.description)}}function T$e(e,o){e&1&&(l(0,"th",26),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.Status")))}function M$e(e,o){if(e&1&&(l(0,"td",27)(1,"div",28),b(2,"fa-icon",29),p(3,"translate"),p(4,"translate"),r()()),e&2){let t=o.$implicit;a(),g("className",t.disabled===!0?"false":"true"),a(),g("matTooltip",t.disabled===!0?m(3,2,"labels.inputs.Disabled"):m(4,4,"labels.inputs.Enabled"))}}function D$e(e,o){e&1&&(l(0,"th",30),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.Actions")))}function E$e(e,o){if(e&1){let t=Y();l(0,"button",32),R("click",function(i){V(t);let s=w(2);return q(s.routeEdit(i))}),l(1,"fa-icon",33),c(2),p(3,"translate"),r()()}if(e&2){let t=w().$implicit;g("routerLink",Nt(4,x$e,t.id)),a(2),v(" ",m(3,2,"labels.buttons.Edit")," ")}}function I$e(e,o){if(e&1&&(l(0,"td",27),E(1,E$e,4,6,"button",31),r()),e&2){let t=o.$implicit;a(),I(t.name!=="Super user"?1:-1)}}function O$e(e,o){e&1&&b(0,"tr",34)}function A$e(e,o){if(e&1&&b(0,"tr",35),e&2){let t=o.$implicit;g("routerLink",Nt(1,b$e,t.id))}}function F$e(e,o){if(e&1){let t=Y();l(0,"h2"),c(1),p(2,"translate"),r(),l(3,"p",36),c(4),p(5,"translate"),r(),l(6,"div",37)(7,"button",38),R("click",function(){let i=V(t).popover,s=w();return i.close(),q(s.configurationWizardService.closeConfigWizard())}),c(8),p(9,"translate"),r(),l(10,"button",39),R("click",function(){let i=V(t).popover,s=w();return i.close(),q(s.previousStep())}),c(11),p(12,"translate"),r(),l(13,"button",39),R("click",function(){let i=V(t).popover,s=w(),d=xe(9),u=xe(36);return i.close(),q(s.showPopover(u,d,"bottom",!0))}),c(14),p(15,"translate"),r()()}e&2&&(a(),h(m(2,5,"labels.buttons.Add Role")),a(3),v("",m(5,7,"labels.text.To create a new role"),"."),a(4),v(" ",m(9,9,"labels.buttons.Close")," "),a(3),v(" ",m(12,11,"labels.buttons.Back")," "),a(3),v(" ",m(15,13,"labels.buttons.Next")," "))}function k$e(e,o){if(e&1){let t=Y();l(0,"h4"),c(1),p(2,"translate"),r(),l(3,"div",37)(4,"button",38),R("click",function(){let i=V(t).popover,s=w();return i.close(),q(s.configurationWizardService.closeConfigWizard())}),c(5),p(6,"translate"),r(),l(7,"button",39),R("click",function(){let i=V(t).popover,s=w(),d=xe(2),u=xe(34);return i.close(),q(s.showPopover(u,d,"bottom",!0))}),c(8),p(9,"translate"),r(),l(10,"button",39),R("click",function(){let i=V(t).popover,s=w(),d=xe(16),u=xe(38);return i.close(),q(s.showPopover(u,d,"top",!0))}),c(11),p(12,"translate"),r()()}e&2&&(a(),v("",m(2,4,"labels.heading.Search bar to filter roles"),"."),a(4),v(" ",m(6,6,"labels.buttons.Close")," "),a(3),v(" ",m(9,8,"labels.buttons.Back")," "),a(3),v(" ",m(12,10,"labels.buttons.Next")," "))}function B$e(e,o){if(e&1){let t=Y();l(0,"h4",36),c(1),p(2,"translate"),l(3,"a",40),c(4),p(5,"translate"),r()(),l(6,"div",37)(7,"button",38),R("click",function(){let i=V(t).popover,s=w();return i.close(),q(s.configurationWizardService.closeConfigWizard())}),c(8),p(9,"translate"),r(),l(10,"button",39),R("click",function(){let i=V(t).popover,s=w(),d=xe(9),u=xe(36);return i.close(),q(s.showPopover(u,d,"bottom",!0))}),c(11),p(12,"translate"),r(),l(13,"button",39),R("click",function(){let i=V(t).popover,s=w();return i.close(),q(s.nextStep())}),c(14),p(15,"translate"),r()()}e&2&&(a(),v(" ",m(2,5,"labels.heading.List of roles defined within the organization"),": "),a(3),h(m(5,7,"labels.inputs.Manage Roles and Permission")),a(4),v(" ",m(9,9,"labels.buttons.Close")," "),a(3),v(" ",m(12,11,"labels.buttons.Back")," "),a(3),v(" ",m(15,13,"labels.buttons.Next")," "))}var Rx=(()=>{class e{constructor(){this.route=T(Ie),this.router=T(qe),this.configurationWizardService=T(Qi),this.popoverService=T(Wi),this.displayedColumns=["name","description","disabled","actions"],this.route.data.subscribe(t=>{this.roleData=t.roles})}applyFilter(t){this.dataSource.filter=t.trim().toLowerCase()}ngOnInit(){this.setRoles()}routeEdit(t){t.stopPropagation()}setRoles(){this.dataSource=new Wt(this.roleData),this.dataSource.paginator=this.paginator,this.dataSource.sort=this.sort}showPopover(t,n,i,s){setTimeout(()=>this.popoverService.open(t,n,i,s,{}),200)}ngAfterViewInit(){this.configurationWizardService.showRolesandPermissionPage===!0&&setTimeout(()=>{this.showPopover(this.templateButtonAddRole,this.buttonAddRole.nativeElement,"bottom",!0)}),this.configurationWizardService.showRolesandPermissionList===!0&&setTimeout(()=>{this.showPopover(this.templateTableRolesandPermissions,this.tableRolesandPermissions.nativeElement,"top",!0)})}nextStep(){this.configurationWizardService.showRolesandPermissionPage=!1,this.configurationWizardService.showRolesandPermissionList=!1,this.configurationWizardService.showUsers=!0,this.router.navigate(["/appusers"])}previousStep(){this.configurationWizardService.showRolesandPermissionPage=!1,this.configurationWizardService.showRolesandPermissionList=!1,this.configurationWizardService.showRolesandPermission=!0,this.router.navigate(["/system"])}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275cmp=me({type:e,selectors:[["mifosx-roles-and-permissions"]],viewQuery:function(n,i){if(n&1&&(Ee(kt,7),Ee(It,7),Ee(f$e,5),Ee(h$e,5),Ee(g$e,5),Ee(_$e,5)),n&2){let s;Te(s=Me())&&(i.paginator=s.first),Te(s=Me())&&(i.sort=s.first),Te(s=Me())&&(i.buttonAddRole=s.first),Te(s=Me())&&(i.templateButtonAddRole=s.first),Te(s=Me())&&(i.tableRolesandPermissions=s.first),Te(s=Me())&&(i.templateTableRolesandPermissions=s.first)}},decls:39,vars:13,consts:[["buttonAddRole",""],["filter",""],["tableRolesandPermissions",""],["templateButtonAddRole",""],["templateFilter",""],["templateTableRolesandPermissions",""],[1,"container","m-b-20","layout-row","layout-align-end","gap-20px",3,"routerLink"],[1,"in-block"],["mat-raised-button","","color","primary"],["icon","plus",1,"m-r-10"],[1,"container"],[1,"layout-row","gap-20px"],[1,"flex-fill"],["matInput","",3,"keyup"],[1,"mat-elevation-z8"],["mat-table","","matSort","",3,"dataSource"],["matColumnDef","name"],["mat-header-cell","","mat-sort-header","",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","description"],["matColumnDef","disabled"],["matColumnDef","actions"],["mat-header-cell","",4,"matHeaderCellDef"],["mat-header-row","",4,"matHeaderRowDef"],["mat-row","","class","select-row",3,"routerLink",4,"matRowDef","matRowDefColumns"],["showFirstLastButtons","",3,"pageSizeOptions"],["mat-header-cell","","mat-sort-header",""],["mat-cell",""],[3,"className"],["matTooltipPosition","right","icon","circle","size","lg",3,"matTooltip"],["mat-header-cell",""],["mat-icon-button","","color","primary",3,"routerLink"],["mat-icon-button","","color","primary",3,"click","routerLink"],["icon","edit"],["mat-header-row",""],["mat-row","",1,"select-row",3,"routerLink"],[1,"mw300"],[1,"layout-row","align-end","gap-2px","responsive-column"],["mat-raised-button","","color","warn",3,"click"],["mat-raised-button","","color","primary",3,"click"],["href","https://mifosforge.jira.com/wiki/spaces/docs/pages/67895364/Manage+Roles+and+Permissions","target","_blank"]],template:function(n,i){if(n&1){let s=Y();l(0,"div",6)(1,"div",7,0)(3,"button",8),b(4,"fa-icon",9),c(5),p(6,"translate"),r()()(),l(7,"div",10)(8,"div",11,1)(10,"mat-form-field",12)(11,"mat-label"),c(12),p(13,"translate"),r(),l(14,"input",13),R("keyup",function(u){return V(s),q(i.applyFilter(u.target.value))}),r()()(),l(15,"div",14,2)(17,"table",15),X(18,16),F(19,y$e,3,3,"th",17)(20,S$e,2,1,"td",18),Z(),X(21,19),F(22,w$e,3,3,"th",17)(23,P$e,2,1,"td",18),Z(),X(24,20),F(25,T$e,3,3,"th",17)(26,M$e,5,6,"td",18),Z(),X(27,21),F(28,D$e,3,3,"th",22)(29,I$e,2,1,"td",18),Z(),F(30,O$e,1,0,"tr",23)(31,A$e,1,3,"tr",24),r(),b(32,"mat-paginator",25),r()(),F(33,F$e,16,15,"ng-template",null,3,ti)(35,k$e,13,12,"ng-template",null,4,ti)(37,B$e,16,15,"ng-template",null,5,ti)}n&2&&(g("routerLink",oe(11,C$e)),a(5),v(" ",m(6,7,"labels.buttons.Add Role")," "),a(7),h(m(13,9,"labels.inputs.Filter")),a(5),g("dataSource",i.dataSource),a(13),g("matHeaderRowDef",i.displayedColumns),a(),g("matRowDefColumns",i.displayedColumns),a(),g("pageSizeOptions",oe(12,v$e)))},dependencies:[ue,fe,Ae,Fe,Be,ze,ve,ke,_t,It,xt,vt,bt,ri,Ct,yt,si,wi,St,Pt,wt,Tt,kt,he],styles:["table[_ngcontent-%COMP%]{width:100%}table[_ngcontent-%COMP%] .select-row[_ngcontent-%COMP%]:hover{cursor:pointer}.true[_ngcontent-%COMP%]{color:#32cd32}.false[_ngcontent-%COMP%]{color:#f44366}"]})}}return e})();var B5=Es(vd());function R$e(e,o){if(e&1){let t=Y();l(0,"button",24),R("click",function(){V(t);let i=w();return q(i.disableRolesConfirmation())}),b(1,"fa-icon",25),c(2),p(3,"translate"),p(4,"translate"),r()}if(e&2){let t=w();g("disabled",t.rolePermissionService.name==="Super user"),a(2),le(" ",m(3,3,"labels.buttons.Disable")," ",m(4,5,"labels.inputs.Role")," ")}}function N$e(e,o){if(e&1){let t=Y();l(0,"button",1),R("click",function(){V(t);let i=w();return q(i.enableRolesConfirmation())}),b(1,"fa-icon",26),c(2),p(3,"translate"),p(4,"translate"),r()}if(e&2){let t=w();g("disabled",t.rolePermissionService.name==="Super user"),a(2),le(" ",m(3,3,"labels.buttons.Enable")," ",m(4,5,"labels.inputs.Role")," ")}}function L$e(e,o){if(e&1){let t=Y();l(0,"div",15)(1,"button",27),R("click",function(){V(t);let i=w();return q(i.selectAll())}),c(2),p(3,"translate"),r(),l(4,"button",28),R("click",function(){V(t);let i=w();return q(i.deselectAll())}),c(5),p(6,"translate"),r()()}e&2&&(a(2),v(" ",m(3,2,"labels.buttons.Select All")," "),a(3),v(" ",m(6,4,"labels.buttons.Deselect All")," "))}function V$e(e,o){if(e&1){let t=Y();l(0,"mat-list-item",29),R("click",function(){let i=V(t).$implicit,s=w();return q(s.showPermissions(i))}),l(1,"span",30),c(2),r()()}if(e&2){let t=o.$implicit,n=w();g("ngClass",n.selectedItem===t?"active":"inactive"),a(2),v(" ",n.formatName(t)," ")}}function q$e(e,o){if(e&1&&(l(0,"div",22)(1,"div",31)(2,"div",32)(3,"mat-checkbox",33),c(4),r()()()()),e&2){let t=o.$implicit,n=w();a(2),g("formGroupName",t.id),a(),g("id",Le(t.code)),a(),v(" ",n.permissionName(t.code)," ")}}function z$e(e,o){if(e&1){let t=Y();l(0,"div",23)(1,"mat-card-actions")(2,"button",34),R("click",function(){V(t);let i=w();return i.cancel(),q(i.restoreCheckboxes())}),c(3),p(4,"translate"),r(),l(5,"button",27),R("click",function(){V(t);let i=w();return q(i.submit())}),c(6),p(7,"translate"),r()()()}e&2&&(a(3),v(" ",m(4,2,"labels.buttons.Cancel")," "),a(3),v(" ",m(7,4,"labels.buttons.Submit")," "))}var Nx=(()=>{class e{constructor(){this.route=T(Ie),this.systemService=T(ii),this.router=T(qe),this.formBuilder=T(nt),this.translateService=T(yi),this.dialog=T(Ht),this.authService=T(Oa),this.previousGrouping="",this.groupings=[],this.selectedItem="",this.isDisabled=!0,this.checkboxesChanged=!1,this.bValuesOnly=[],this.tempPermissionUIData={},this.permissions={permissions:[]},this.route.data.subscribe(t=>{this.rolePermissionService=t.roledetails})}ngOnInit(){this.permissions={permissions:[]},this.createForm(),this.groupRules(),this.selectedItem="special",this.showPermissions("special"),this.route.params.subscribe(t=>{this.roleId=t.id})}createForm(){this.formGroup=this.formBuilder.group({roster:this.formBuilder.array(this.rolePermissionService.permissionUsageData.map(t=>this.createMemberGroup(t)))})}createMemberGroup(t){return this.formBuilder.group(qt(at({},t),{code:[t.code,se.required],selected:[{value:t.selected,disabled:!0},se.required]}))}groupRules(){this.tempPermissionUIData={};for(let t in this.rolePermissionService.permissionUsageData)if(this.rolePermissionService.permissionUsageData[t]){this.rolePermissionService.permissionUsageData[t].grouping!==this.currentGrouping&&(this.currentGrouping=this.rolePermissionService.permissionUsageData[t].grouping,this.groupings.push(this.currentGrouping),this.tempPermissionUIData[this.currentGrouping]={permissions:[]});let n={code:this.rolePermissionService.permissionUsageData[t].code,id:+t,selected:this.rolePermissionService.permissionUsageData[t].selected};this.tempPermissionUIData[this.currentGrouping].permissions.push(n)}}showPermissions(t){this.permissions=this.tempPermissionUIData[t],this.selectedItem=t,this.previousGrouping=t}formatName(t){if(t.indexOf("portfolio_")>-1&&(t=t.replace("portfolio_","")),t.indexOf("transaction_")>-1){let n=t.split("_");t=n[1]+" "+n[0].charAt(0).toUpperCase()+n[0].slice(1)+"s"}return t=t.charAt(0).toUpperCase()+t.slice(1),t}permissionName(t){return t=t||"",t=t.replace(/_/g," "),this.previousGrouping==="report"&&(t=t.replace(/READ/g,"View")),t}backupCheckValues(){this.backupform=B5.cloneDeep(this.formGroup)}restoreCheckboxes(){this.formGroup=B5.cloneDeep(this.backupform)}isRoleEnable(t){return t}editRoles(){this.isDisabled=!1,this.formGroup.controls.roster.enable()}cancel(){this.isDisabled=!0,this.formGroup.controls.roster.disable()}submit(){let t=this.formGroup.get("roster").value,n={},i={permissions:{}};for(let s=0;s{})}selectAll(){let t=this.formGroup.get("roster");for(let n=0;n{n.delete&&this.systemService.deleteRole(this.roleId).subscribe(()=>{un.OIDC.oidcServerEnabled&&this.authService.deleteRole(this.roleId),this.router.navigate(["/system/roles-and-permissions"])})})}enableRolesConfirmation(){this.dialog.open(tk,{data:{enableContext:this.translateService.instant("labels.inputs.Role")+" "+this.roleId}}).afterClosed().subscribe(n=>{n.enable&&this.systemService.enableRole(this.roleId).subscribe(()=>{this.router.navigate(["/system/roles-and-permissions"])})})}disableRolesConfirmation(){this.dialog.open(ik,{data:{disableContext:this.translateService.instant("labels.inputs.Role")+" "+this.roleId}}).afterClosed().subscribe(n=>{n.disable&&this.systemService.disableRole(this.roleId).subscribe(()=>{this.router.navigate(["/system/roles-and-permissions"])})})}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275cmp=me({type:e,selectors:[["mifosx-view-role"]],decls:50,vars:29,consts:[[1,"layout-row","align-end","gap-2px","responsive-column","container","m-b-20"],["mat-raised-button","","color","primary",3,"click","disabled"],["icon","edit",1,"m-r-10"],["mat-raised-button","","color","danger",3,"disabled"],["mat-raised-button","","color","primary",3,"disabled"],["mat-raised-button","","color","warn",3,"click","disabled"],["icon","trash",1,"m-r-10"],[1,"container","m-b-20"],[1,"mat-elevation-z8"],[1,"layout-row-wrap"],[1,"flex-40","flex-lt-md-50","header"],[1,"flex-60","flex-lt-md-50"],[1,"mat-elevation-z8","container"],[1,"permission-selected","layout-row"],[1,"flex-75"],[1,"flex-25","layout-row","layout-xs-column","layout-align-end","gap-5px","select-deselect"],[1,"layout-row"],[1,"layout-column","flex-30"],[3,"ngClass"],[3,"vertical"],[1,"flex-70","layout-column","list-permission"],[3,"submit","formGroup"],[1,"display-permissions"],[1,"layout-row","layout-align-center","gap-5px","layout-xs-column"],["mat-raised-button","","color","danger",3,"click","disabled"],["icon","lock",1,"m-r-10"],["icon","lock-open",1,"m-r-10"],["mat-raised-button","","color","primary",3,"click"],["mat-raised-button","","color","default",3,"click"],[3,"click","ngClass"],[1,"grouping-name"],["formArrayName","roster"],[3,"formGroupName"],["name","cp","formControlName","selected",3,"id"],["type","button","mat-raised-button","",3,"click"]],template:function(n,i){n&1&&(l(0,"div",0)(1,"button",1),R("click",function(){return i.editRoles(),i.backupCheckValues()}),b(2,"fa-icon",2),c(3),p(4,"translate"),r(),E(5,R$e,5,7,"button",3),E(6,N$e,5,7,"button",4),l(7,"button",5),R("click",function(){return i.deleteRole()}),b(8,"fa-icon",6),c(9),p(10,"translate"),p(11,"translate"),r()(),l(12,"div",7)(13,"mat-card",8)(14,"mat-card-content")(15,"div",9)(16,"div",10)(17,"b"),c(18),p(19,"translate"),r()(),l(20,"div",11),c(21),r(),l(22,"div",10)(23,"b"),c(24),p(25,"translate"),r()(),l(26,"div",11),c(27),r()()()()(),l(28,"div",12)(29,"mat-card"),X(30),l(31,"div",13)(32,"div",14)(33,"h3"),c(34),p(35,"translate"),l(36,"strong"),c(37),r()()(),E(38,L$e,7,6,"div",15),r(),l(39,"div",16)(40,"div",17)(41,"mat-list"),Se(42,V$e,3,2,"mat-list-item",18,Pe),r()(),b(44,"mat-divider",19),l(45,"div",20)(46,"form",21),R("submit",function(){return i.submit()}),Se(47,q$e,5,4,"div",22,Pe),r()()(),Z(),E(49,z$e,8,6,"div",23),r()()),n&2&&(a(),g("disabled",i.rolePermissionService.name==="Super user"),a(2),v(" ",m(4,17,"labels.text.Edit Role")," "),a(2),I(i.isRoleEnable(i.rolePermissionService.disabled)?-1:5),a(),I(i.isRoleEnable(i.rolePermissionService.disabled)?6:-1),a(),g("disabled",i.rolePermissionService.name==="Super user"),a(2),le(" ",m(10,19,"labels.buttons.Delete")," ",m(11,21,"labels.inputs.Role")," "),a(9),v("",m(19,23,"labels.inputs.Name"),":"),a(3),v(" ",i.rolePermissionService.name," "),a(3),v("",m(25,25,"labels.inputs.Role Description"),":"),a(3),v(" ",i.rolePermissionService.description," "),a(7),v(" ",m(35,27,"labels.buttons.Permissions"),": "),a(3),h(i.formatName(i.previousGrouping)),a(),I(i.isDisabled?-1:38),a(4),we(i.groupings),a(2),g("vertical",!0),a(2),g("formGroup",i.formGroup),a(),we(i.permissions.permissions),a(2),I(i.isDisabled?-1:49))},dependencies:[ue,co,fe,tt,Ue,Xe,Ze,et,la,Va,$e,Je,Et,ve,fi,ke,xl,Vo,Ri,he],styles:[".display-permissions[_ngcontent-%COMP%]{padding-top:15px}span[_ngcontent-%COMP%]{font-size:1rem}mat-list-item[_ngcontent-%COMP%]{cursor:pointer}.mat-list-base[_ngcontent-%COMP%] .mat-list-item[_ngcontent-%COMP%] .mat-list-item-content[_ngcontent-%COMP%]{cursor:pointer}.active[_ngcontent-%COMP%]{background-color:#f2f2f2}.grouping-name[_ngcontent-%COMP%]{padding:0 10px}.list-permission[_ngcontent-%COMP%]{padding-left:20px}.permission-selected[_ngcontent-%COMP%]{margin-top:10px;height:40px}.inactive[_ngcontent-%COMP%]{transition:all .2s ease-in-out}.inactive[_ngcontent-%COMP%]:hover{transform:scale(1.1)}.content[_ngcontent-%COMP%] div[_ngcontent-%COMP%]{line-height:3rem}.content[_ngcontent-%COMP%] div.header[_ngcontent-%COMP%]{font-weight:500}"]})}}return e})();var H$e=["datatables"],G$e=["templateDatatables"],j$e=["codes"],$$e=["templateCodes"],U$e=["rolesandpermission"],W$e=["templateRolesandPermission"],Q$e=["makerCheckerTable"],Y$e=["templateMakerCheckerTable"],J$e=["configurations"],K$e=["templateConfigurations"],X$e=["schedulerJobs"],Z$e=["templateSchedulerJobs"],eUe=["manageReports"],tUe=["templateManageReports"],R5=()=>["data-tables"],N5=()=>["codes"],L5=()=>["roles-and-permissions"],Lx=()=>["configure-mc-tasks"],V5=()=>["hooks"],q5=()=>["entity-to-entity-mapping"],TN=e=>({"disabled-item":e}),z5=()=>["audit-trails"],H5=()=>["reports"],G5=()=>["manage-jobs"],j5=()=>["configurations"],$5=()=>["account-number-preferences"],U5=()=>["external-services"],W5=()=>["external-events"];function iUe(e,o){e&1&&(l(0,"p",21),c(1),p(2,"translate"),r()),e&2&&(g("routerLink",oe(4,R5)),a(),v(" ",m(2,2,"labels.text.Add new extra fields to any entity")," "))}function nUe(e,o){if(e&1){let t=Y();l(0,"fa-icon",42),R("click",function(i){return V(t),w().arrowBooleansToggle(0),q(i.stopPropagation())}),r()}}function oUe(e,o){if(e&1){let t=Y();l(0,"fa-icon",43),R("click",function(i){return V(t),w().arrowBooleansToggle(0),q(i.stopPropagation())}),r()}}function aUe(e,o){e&1&&(l(0,"p",21),c(1),p(2,"translate"),r()),e&2&&(g("routerLink",oe(4,N5)),a(),v(" ",m(2,2,"labels.text.Codes are used to define drop down values")," "))}function rUe(e,o){if(e&1){let t=Y();l(0,"fa-icon",42),R("click",function(i){return V(t),w().arrowBooleansToggle(1),q(i.stopPropagation())}),r()}}function lUe(e,o){if(e&1){let t=Y();l(0,"fa-icon",43),R("click",function(i){return V(t),w().arrowBooleansToggle(1),q(i.stopPropagation())}),r()}}function sUe(e,o){e&1&&(l(0,"p",21),c(1),p(2,"translate"),r()),e&2&&(g("routerLink",oe(4,L5)),a(),v(" ",m(2,2,"labels.text.Define or modify roles and associated permissions")," "))}function cUe(e,o){if(e&1){let t=Y();l(0,"fa-icon",42),R("click",function(i){return V(t),w().arrowBooleansToggle(2),q(i.stopPropagation())}),r()}}function pUe(e,o){if(e&1){let t=Y();l(0,"fa-icon",43),R("click",function(i){return V(t),w().arrowBooleansToggle(2),q(i.stopPropagation())}),r()}}function mUe(e,o){e&1&&(l(0,"p",21),c(1),p(2,"translate"),r()),e&2&&(g("routerLink",oe(4,Lx)),a(),v(" ",m(2,2,"labels.text.Define or modify Maker Checker tasks")," "))}function dUe(e,o){if(e&1){let t=Y();l(0,"fa-icon",42),R("click",function(i){return V(t),w().arrowBooleansToggle(3),q(i.stopPropagation())}),r()}}function uUe(e,o){if(e&1){let t=Y();l(0,"fa-icon",43),R("click",function(i){return V(t),w().arrowBooleansToggle(3),q(i.stopPropagation())}),r()}}function fUe(e,o){e&1&&(l(0,"p",21),c(1),p(2,"translate"),r()),e&2&&(g("routerLink",oe(4,V5)),a(),v(" ",m(2,2,"labels.text.Define Hooks")," "))}function hUe(e,o){if(e&1){let t=Y();l(0,"fa-icon",42),R("click",function(i){return V(t),w().arrowBooleansToggle(4),q(i.stopPropagation())}),r()}}function gUe(e,o){if(e&1){let t=Y();l(0,"fa-icon",43),R("click",function(i){return V(t),w().arrowBooleansToggle(4),q(i.stopPropagation())}),r()}}function _Ue(e,o){e&1&&(l(0,"p",21),c(1),p(2,"translate"),r()),e&2&&(g("routerLink",oe(4,q5)),a(),v(" ",m(2,2,"labels.text.Define or modify entity to entity mappings")," "))}function CUe(e,o){if(e&1){let t=Y();l(0,"fa-icon",42),R("click",function(i){return V(t),w().arrowBooleansToggle(5),q(i.stopPropagation())}),r()}}function vUe(e,o){if(e&1){let t=Y();l(0,"fa-icon",43),R("click",function(i){return V(t),w().arrowBooleansToggle(5),q(i.stopPropagation())}),r()}}function xUe(e,o){e&1&&(l(0,"p",35),c(1),p(2,"translate"),r()),e&2&&(a(),v(" ",m(2,1,"labels.text.Manage Surveys")," "))}function bUe(e,o){if(e&1){let t=Y();l(0,"fa-icon",42),R("click",function(i){return V(t),w().arrowBooleansToggle(6),q(i.stopPropagation())}),r()}}function yUe(e,o){if(e&1){let t=Y();l(0,"fa-icon",43),R("click",function(i){return V(t),w().arrowBooleansToggle(6),q(i.stopPropagation())}),r()}}function SUe(e,o){e&1&&(l(0,"p",21),c(1),p(2,"translate"),r()),e&2&&(g("routerLink",oe(4,W5)),a(),v(" ",m(2,2,"labels.text.External Events configuration, to enable or disable")," "))}function wUe(e,o){if(e&1){let t=Y();l(0,"fa-icon",42),R("click",function(i){return V(t),w(2).arrowBooleansToggle(7),q(i.stopPropagation())}),r()}}function PUe(e,o){if(e&1){let t=Y();l(0,"fa-icon",43),R("click",function(i){return V(t),w(2).arrowBooleansToggle(7),q(i.stopPropagation())}),r()}}function TUe(e,o){if(e&1&&(l(0,"mat-list-item",15)(1,"div",16)(2,"div",17)(3,"mat-icon",18),b(4,"fa-icon",30),r(),l(5,"div",20),c(6),p(7,"translate"),E(8,SUe,3,5,"p",21),r()(),l(9,"div",22),E(10,wUe,1,0,"fa-icon",23),E(11,PUe,1,0,"fa-icon",24),r()()()),e&2){let t=w();g("routerLink",oe(8,W5)),a(2),g("routerLink",oe(9,W5)),a(4),v(" ",m(7,6,"labels.heading.Manage External Events")," "),a(2),I(t.arrowBooleans[7]?8:-1),a(2),I(t.arrowBooleans[7]?-1:10),a(),I(t.arrowBooleans[7]?11:-1)}}function MUe(e,o){e&1&&(l(0,"p",21),c(1),p(2,"translate"),r()),e&2&&(g("routerLink",oe(4,z5)),a(),v(" ",m(2,2,"labels.text.Audit logs of all the activities")," "))}function DUe(e,o){if(e&1){let t=Y();l(0,"fa-icon",42),R("click",function(i){return V(t),w().arrowBooleansToggle(8),q(i.stopPropagation())}),r()}}function EUe(e,o){if(e&1){let t=Y();l(0,"fa-icon",43),R("click",function(i){return V(t),w().arrowBooleansToggle(8),q(i.stopPropagation())}),r()}}function IUe(e,o){e&1&&(l(0,"p",21),c(1),p(2,"translate"),r()),e&2&&(g("routerLink",oe(4,H5)),a(),v(" ",m(2,2,"labels.text.Add new report and classify reports")," "))}function OUe(e,o){if(e&1){let t=Y();l(0,"fa-icon",42),R("click",function(i){return V(t),w().arrowBooleansToggle(9),q(i.stopPropagation())}),r()}}function AUe(e,o){if(e&1){let t=Y();l(0,"fa-icon",43),R("click",function(i){return V(t),w().arrowBooleansToggle(9),q(i.stopPropagation())}),r()}}function FUe(e,o){e&1&&(l(0,"p",21),c(1),p(2,"translate"),r()),e&2&&(g("routerLink",oe(4,G5)),a(),v(" ",m(2,2,"labels.text.Manage Schedule and Workflow jobs, modify jobs")," "))}function kUe(e,o){if(e&1){let t=Y();l(0,"fa-icon",42),R("click",function(i){return V(t),w().arrowBooleansToggle(10),q(i.stopPropagation())}),r()}}function BUe(e,o){if(e&1){let t=Y();l(0,"fa-icon",43),R("click",function(i){return V(t),w().arrowBooleansToggle(10),q(i.stopPropagation())}),r()}}function RUe(e,o){e&1&&(l(0,"p",21),c(1),p(2,"translate"),r()),e&2&&(g("routerLink",oe(4,j5)),a(),v(" ",m(2,2,"labels.text.Global configurations, Cache and Business Date")," "))}function NUe(e,o){if(e&1){let t=Y();l(0,"fa-icon",42),R("click",function(i){return V(t),w().arrowBooleansToggle(11),q(i.stopPropagation())}),r()}}function LUe(e,o){if(e&1){let t=Y();l(0,"fa-icon",43),R("click",function(i){return V(t),w().arrowBooleansToggle(11),q(i.stopPropagation())}),r()}}function VUe(e,o){e&1&&(l(0,"p",21),c(1),p(2,"translate"),r()),e&2&&(g("routerLink",oe(4,$5)),a(),v(" ",m(2,2,"labels.text.Preferences for generating account numbers for client")," "))}function qUe(e,o){if(e&1){let t=Y();l(0,"fa-icon",42),R("click",function(i){return V(t),w().arrowBooleansToggle(12),q(i.stopPropagation())}),r()}}function zUe(e,o){if(e&1){let t=Y();l(0,"fa-icon",43),R("click",function(i){return V(t),w().arrowBooleansToggle(12),q(i.stopPropagation())}),r()}}function HUe(e,o){e&1&&(l(0,"p",21),c(1),p(2,"translate"),r()),e&2&&(g("routerLink",oe(4,U5)),a(),v(" ",m(2,2,"labels.text.External Services Configuration")," "))}function GUe(e,o){if(e&1){let t=Y();l(0,"fa-icon",42),R("click",function(i){return V(t),w().arrowBooleansToggle(13),q(i.stopPropagation())}),r()}}function jUe(e,o){if(e&1){let t=Y();l(0,"fa-icon",43),R("click",function(i){return V(t),w().arrowBooleansToggle(13),q(i.stopPropagation())}),r()}}function $Ue(e,o){e&1&&(l(0,"p",35),c(1),p(2,"translate"),r()),e&2&&(a(),v(" ",m(2,1,"labels.text.Two-factor authentication configuration")," "))}function UUe(e,o){if(e&1){let t=Y();l(0,"fa-icon",42),R("click",function(i){return V(t),w().arrowBooleansToggle(14),q(i.stopPropagation())}),r()}}function WUe(e,o){if(e&1){let t=Y();l(0,"fa-icon",43),R("click",function(i){return V(t),w().arrowBooleansToggle(14),q(i.stopPropagation())}),r()}}function QUe(e,o){if(e&1){let t=Y();l(0,"h2"),c(1),p(2,"translate"),r(),l(3,"p",44),c(4),p(5,"translate"),r(),l(6,"div",45)(7,"button",46),R("click",function(){let i=V(t).popover,s=w();return i.close(),q(s.configurationWizardService.closeConfigWizard())}),c(8),p(9,"translate"),r(),l(10,"button",47),R("click",function(){let i=V(t).popover,s=w();return i.close(),q(s.previousStepDatatables())}),c(11),p(12,"translate"),r(),l(13,"button",47),R("click",function(){let i=V(t).popover,s=w();return i.close(),q(s.nextStepDatatables())}),c(14),p(15,"translate"),r()()}e&2&&(a(),h(m(2,5,"labels.heading.Manage Data Tables")),a(3),h(m(5,7,"labels.text.Mifos X data-tables allow the user to add custom fields")),a(4),v(" ",m(9,9,"labels.buttons.Close")," "),a(3),v(" ",m(12,11,"labels.buttons.Back")," "),a(3),v(" ",m(15,13,"labels.buttons.Next")," "))}function YUe(e,o){if(e&1){let t=Y();l(0,"h2"),c(1),p(2,"translate"),r(),l(3,"p",44),c(4),p(5,"translate"),r(),l(6,"div",45)(7,"button",46),R("click",function(){let i=V(t).popover,s=w();return i.close(),q(s.configurationWizardService.closeConfigWizard())}),c(8),p(9,"translate"),r(),l(10,"button",47),R("click",function(){let i=V(t).popover,s=w();return i.close(),q(s.previousStepCodes())}),c(11),p(12,"translate"),r(),l(13,"button",47),R("click",function(){let i=V(t).popover,s=w();return i.close(),q(s.nextStepCodes())}),c(14),p(15,"translate"),r()()}e&2&&(a(),h(m(2,5,"labels.heading.Manage Codes")),a(3),h(m(5,7,"labels.text.Selection you can create new drop-downs and edit")),a(4),v(" ",m(9,9,"labels.buttons.Close")," "),a(3),v(" ",m(12,11,"labels.buttons.Back")," "),a(3),v(" ",m(15,13,"labels.buttons.Next")," "))}function JUe(e,o){if(e&1){let t=Y();l(0,"h2"),c(1),p(2,"translate"),r(),l(3,"p",44),c(4),p(5,"translate"),r(),l(6,"div",45)(7,"button",46),R("click",function(){let i=V(t).popover,s=w();return i.close(),q(s.configurationWizardService.closeConfigWizard())}),c(8),p(9,"translate"),r(),l(10,"button",47),R("click",function(){let i=V(t).popover,s=w();return i.close(),q(s.previousStepRolesandPermission())}),c(11),p(12,"translate"),r(),l(13,"button",47),R("click",function(){let i=V(t).popover,s=w();return i.close(),q(s.nextStepRolesandPermission())}),c(14),p(15,"translate"),r()()}e&2&&(a(),h(m(2,5,"labels.heading.Manage Roles and Permissions")),a(3),h(m(5,7,"labels.text.Roles and Permissions allow the administrator to control access")),a(4),v(" ",m(9,9,"labels.buttons.Close")," "),a(3),v(" ",m(12,11,"labels.buttons.Back")," "),a(3),v(" ",m(15,13,"labels.buttons.Next")," "))}function KUe(e,o){if(e&1){let t=Y();l(0,"h2"),c(1),p(2,"translate"),r(),l(3,"p",44),c(4),p(5,"translate"),r(),l(6,"div",45)(7,"button",46),R("click",function(){let i=V(t).popover,s=w();return i.close(),q(s.configurationWizardService.closeConfigWizard())}),c(8),p(9,"translate"),r(),l(10,"button",47),R("click",function(){let i=V(t).popover,s=w();return i.close(),q(s.previousStepMakerCheckerTable())}),c(11),p(12,"translate"),r(),l(13,"button",47),R("click",function(){let i=V(t).popover,s=w();return i.close(),q(s.nextStepMakerCheckerTable())}),c(14),p(15,"translate"),r()()}e&2&&(a(),h(m(2,5,"labels.heading.Configure Maker-Checker Tasks")),a(3),h(m(5,7,"labels.text.\u201CMaker-Checker\u201D principle requires every tasks")),a(4),v(" ",m(9,9,"labels.buttons.Close")," "),a(3),v(" ",m(12,11,"labels.buttons.Back")," "),a(3),v(" ",m(15,13,"labels.buttons.Next")," "))}function XUe(e,o){if(e&1){let t=Y();l(0,"h2"),c(1),p(2,"translate"),r(),l(3,"p",44),c(4),p(5,"translate"),r(),l(6,"div",45)(7,"button",46),R("click",function(){let i=V(t).popover,s=w();return i.close(),q(s.configurationWizardService.closeConfigWizard())}),c(8),p(9,"translate"),r(),l(10,"button",47),R("click",function(){let i=V(t).popover,s=w();return i.close(),q(s.previousStepConfigurations())}),c(11),p(12,"translate"),r(),l(13,"button",47),R("click",function(){let i=V(t).popover,s=w();return i.close(),q(s.nextStepConfigurations())}),c(14),p(15,"translate"),r()()}e&2&&(a(),h(m(2,5,"labels.heading.Configuration")),a(3),h(m(5,7,"labels.text.Configurations page allows you to further customize")),a(4),v(" ",m(9,9,"labels.buttons.Close")," "),a(3),v(" ",m(12,11,"labels.buttons.Back")," "),a(3),v(" ",m(15,13,"labels.buttons.Next")," "))}function ZUe(e,o){if(e&1){let t=Y();l(0,"h2"),c(1),p(2,"translate"),r(),l(3,"p",44),c(4),p(5,"translate"),r(),l(6,"div",45)(7,"button",46),R("click",function(){let i=V(t).popover,s=w();return i.close(),q(s.configurationWizardService.closeConfigWizard())}),c(8),p(9,"translate"),r(),l(10,"button",47),R("click",function(){let i=V(t).popover,s=w();return i.close(),q(s.previousStepSchedulerJobs())}),c(11),p(12,"translate"),r(),l(13,"button",47),R("click",function(){let i=V(t).popover,s=w();return i.close(),q(s.nextStepSchedulerJobs())}),c(14),p(15,"translate"),r()()}e&2&&(a(),h(m(2,5,"labels.heading.Manage Scheduler Jobs")),a(3),h(m(5,7,"labels.text.Scheduler Jobs can set batch jobs")),a(4),v(" ",m(9,9,"labels.buttons.Close")," "),a(3),v(" ",m(12,11,"labels.buttons.Back")," "),a(3),v(" ",m(15,13,"labels.buttons.Next")," "))}function eWe(e,o){if(e&1){let t=Y();l(0,"h2"),c(1),p(2,"translate"),r(),l(3,"p",44),c(4),p(5,"translate"),r(),l(6,"div",45)(7,"button",46),R("click",function(){let i=V(t).popover,s=w();return i.close(),q(s.configurationWizardService.closeConfigWizard())}),c(8),p(9,"translate"),r(),l(10,"button",47),R("click",function(){let i=V(t).popover,s=w();return i.close(),q(s.previousStepManageReports())}),c(11),p(12,"translate"),r(),l(13,"button",47),R("click",function(){let i=V(t).popover,s=w();return i.close(),q(s.nextStepManageReports())}),c(14),p(15,"translate"),r()()}e&2&&(a(),h(m(2,5,"labels.heading.Manage Reports")),a(3),h(m(5,7,"labels.text.Add customized reports and edit core reports")),a(4),v(" ",m(9,9,"labels.buttons.Close")," "),a(3),v(" ",m(12,11,"labels.buttons.Back")," "),a(3),v(" ",m(15,13,"labels.buttons.Next")," "))}var Vx=(()=>{class e{constructor(){this.router=T(qe),this.configurationWizardService=T(Qi),this.popoverService=T(Wi),this.isDisabled=!0,this.arrowBooleans=new Array(15).fill(!1)}showPopover(t,n,i,s){setTimeout(()=>this.popoverService.open(t,n,i,s,{}),200)}ngAfterViewInit(){this.configurationWizardService.showDatatables===!0&&setTimeout(()=>{this.showPopover(this.templateDatatables,this.datatables.nativeElement,"bottom",!0)}),this.configurationWizardService.showSystemCodes===!0&&setTimeout(()=>{this.showPopover(this.templateCodes,this.codes.nativeElement,"bottom",!0)}),this.configurationWizardService.showRolesandPermission===!0&&setTimeout(()=>{this.showPopover(this.templateRolesandPermission,this.rolesandpermission.nativeElement,"bottom",!0)}),this.configurationWizardService.showMakerCheckerTable===!0&&setTimeout(()=>{this.showPopover(this.templateMakerCheckerTable,this.makerCheckerTable.nativeElement,"bottom",!0)}),this.configurationWizardService.showConfigurations===!0&&setTimeout(()=>{this.showPopover(this.templateConfigurations,this.configurations.nativeElement,"bottom",!0)}),this.configurationWizardService.showSchedulerJobs===!0&&setTimeout(()=>{this.showPopover(this.templateSchedulerJobs,this.schedulerJobs.nativeElement,"bottom",!0)}),this.configurationWizardService.showManageReports===!0&&setTimeout(()=>{this.showPopover(this.templateManageReports,this.manageReports.nativeElement,"bottom",!0)})}nextStepDatatables(){this.configurationWizardService.showDatatables=!1,this.configurationWizardService.showDatatablesPage=!0,this.router.navigate(["/system/data-tables"])}previousStepDatatables(){this.configurationWizardService.showDatatables=!1,this.configurationWizardService.showDefineWorkingDays=!0,this.router.navigate(["/organization/working-days"])}nextStepCodes(){this.configurationWizardService.showSystemCodes=!1,this.configurationWizardService.showSystemCodesPage=!0,this.router.navigate(["/system/codes"])}previousStepCodes(){this.configurationWizardService.showSystemCodes=!1,this.configurationWizardService.showDatatablesForm=!0,this.router.navigate(["/system/data-tables/create"])}nextStepRolesandPermission(){this.configurationWizardService.showRolesandPermission=!1,this.configurationWizardService.showRolesandPermissionPage=!0,this.router.navigate(["/system/roles-and-permissions"])}previousStepRolesandPermission(){this.configurationWizardService.showRolesandPermission=!1,this.configurationWizardService.showSystemCodesForm=!0,this.router.navigate(["/system/codes/create"])}nextStepMakerCheckerTable(){this.configurationWizardService.showMakerCheckerTable=!1,this.configurationWizardService.showMakerCheckerTablePage=!0,this.router.navigate(["/system/configure-mc-tasks"])}previousStepMakerCheckerTable(){this.configurationWizardService.showMakerCheckerTable=!1,this.configurationWizardService.showUsersForm=!0,this.router.navigate(["/users/create"])}nextStepConfigurations(){this.configurationWizardService.showConfigurations=!1,this.configurationWizardService.showConfigurationsPage=!0,this.router.navigate(["/system/configurations"])}previousStepConfigurations(){this.configurationWizardService.showConfigurations=!1,this.configurationWizardService.showMakerCheckerTableList=!0,this.router.navigate(["/system/configure-mc-tasks"])}nextStepSchedulerJobs(){this.configurationWizardService.showSchedulerJobs=!1,this.configurationWizardService.showSchedulerJobsPage=!0,this.router.navigate(["/system/scheduler-jobs"])}previousStepSchedulerJobs(){this.configurationWizardService.showSchedulerJobs=!1,this.configurationWizardService.showConfigurationsList=!0,this.router.navigate(["/system/global-configurations"])}nextStepManageReports(){this.router.navigate(["/system/reports"])}previousStepManageReports(){this.configurationWizardService.showManageReports=!1,this.configurationWizardService.showManageFunds=!0,this.router.navigate(["/organization/manage-funds"])}arrowBooleansToggle(t){this.arrowBooleans[t]=!this.arrowBooleans[t]}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275cmp=me({type:e,selectors:[["mifosx-system"]],viewQuery:function(n,i){if(n&1&&(Ee(H$e,5),Ee(G$e,5),Ee(j$e,5),Ee($$e,5),Ee(U$e,5),Ee(W$e,5),Ee(Q$e,5),Ee(Y$e,5),Ee(J$e,5),Ee(K$e,5),Ee(X$e,5),Ee(Z$e,5),Ee(eUe,5),Ee(tUe,5)),n&2){let s;Te(s=Me())&&(i.datatables=s.first),Te(s=Me())&&(i.templateDatatables=s.first),Te(s=Me())&&(i.codes=s.first),Te(s=Me())&&(i.templateCodes=s.first),Te(s=Me())&&(i.rolesandpermission=s.first),Te(s=Me())&&(i.templateRolesandPermission=s.first),Te(s=Me())&&(i.makerCheckerTable=s.first),Te(s=Me())&&(i.templateMakerCheckerTable=s.first),Te(s=Me())&&(i.configurations=s.first),Te(s=Me())&&(i.templateConfigurations=s.first),Te(s=Me())&&(i.schedulerJobs=s.first),Te(s=Me())&&(i.templateSchedulerJobs=s.first),Te(s=Me())&&(i.manageReports=s.first),Te(s=Me())&&(i.templateManageReports=s.first)}},decls:200,vars:141,consts:[["datatables",""],["codes",""],["rolesandpermission",""],["makerCheckerTable",""],["manageReports",""],["templateDatatables",""],["templateCodes",""],["templateRolesandPermission",""],["templateMakerCheckerTable",""],["templateConfigurations",""],["templateSchedulerJobs",""],["templateManageReports",""],[1,"container"],[1,"layout-row","responsive-column","gap-20px"],[1,"flex-50"],[3,"routerLink"],[1,"menu-list-item-content"],[1,"menu-left-section",3,"routerLink"],["matListIcon",""],["icon","table","size","sm"],["matLine",""],["matLine","",1,"menu-explanation",3,"routerLink"],[1,"menu-right-section"],["icon","arrow-down","size","md"],["icon","arrow-up","size","md"],["matListIcon","",3,"routerLink"],["icon","list-ul","size","sm"],["icon","key","size","sm"],["icon","sitemap","size","sm"],["matLine","",3,"routerLink"],["icon","anchor","size","sm"],["icon","road","size","sm"],[3,"ngClass"],[1,"menu-left-section"],["icon","file-alt","size","sm"],["matLine","",1,"menu-explanation"],[3,"routerLink",4,"mifosxHasPermission"],["icon","money-check","size","sm"],["icon","file-word","size","sm"],["icon","clock","size","sm"],["icon","cogs","size","sm"],["icon","cog","size","sm"],["icon","arrow-down","size","md",3,"click"],["icon","arrow-up","size","md",3,"click"],[1,"mw300"],[1,"layout-row","align-end","gap-2px","responsive-column"],["mat-raised-button","","color","warn",3,"click"],["mat-raised-button","","color","primary",3,"click"]],template:function(n,i){n&1&&(l(0,"div",12)(1,"mat-card")(2,"div",13)(3,"div",14)(4,"mat-nav-list")(5,"div",null,0)(7,"mat-list-item",15)(8,"div",16)(9,"div",17)(10,"mat-icon",18),b(11,"fa-icon",19),r(),l(12,"div",20),c(13),p(14,"translate"),E(15,iUe,3,5,"p",21),r()(),l(16,"div",22),E(17,nUe,1,0,"fa-icon",23),E(18,oUe,1,0,"fa-icon",24),r()()()(),l(19,"div",null,1)(21,"mat-list-item",25)(22,"div",16)(23,"div",17)(24,"mat-icon",18),b(25,"fa-icon",26),r(),l(26,"div"),c(27),p(28,"translate"),E(29,aUe,3,5,"p",21),r()(),l(30,"div",22),E(31,rUe,1,0,"fa-icon",23),E(32,lUe,1,0,"fa-icon",24),r()()()(),l(33,"div",null,2)(35,"mat-list-item",15)(36,"div",16)(37,"div",17)(38,"mat-icon",18),b(39,"fa-icon",27),r(),l(40,"div",20),c(41),p(42,"translate"),E(43,sUe,3,5,"p",21),r()(),l(44,"div",22),E(45,cUe,1,0,"fa-icon",23),E(46,pUe,1,0,"fa-icon",24),r()()()(),l(47,"div",null,3)(49,"mat-list-item",15)(50,"div",16)(51,"div",17)(52,"mat-icon",18),b(53,"fa-icon",28),r(),l(54,"div",29),c(55),p(56,"translate"),E(57,mUe,3,5,"p",21),r()(),l(58,"div",22),E(59,dUe,1,0,"fa-icon",23),E(60,uUe,1,0,"fa-icon",24),r()()()(),l(61,"mat-list-item",15)(62,"div",16)(63,"div",17)(64,"mat-icon",18),b(65,"fa-icon",30),r(),l(66,"div",20),c(67),p(68,"translate"),E(69,fUe,3,5,"p",21),r()(),l(70,"div",22),E(71,hUe,1,0,"fa-icon",23),E(72,gUe,1,0,"fa-icon",24),r()()(),l(73,"mat-list-item",15)(74,"div",16)(75,"div",17)(76,"mat-icon",18),b(77,"fa-icon",31),r(),l(78,"div",20),c(79),p(80,"translate"),E(81,_Ue,3,5,"p",21),r()(),l(82,"div",22),E(83,CUe,1,0,"fa-icon",23),E(84,vUe,1,0,"fa-icon",24),r()()(),l(85,"mat-list-item",32)(86,"div",16)(87,"div",33)(88,"mat-icon",18),b(89,"fa-icon",34),r(),l(90,"div",20),c(91),p(92,"translate"),E(93,xUe,3,3,"p",35),r()(),l(94,"div",22),E(95,bUe,1,0,"fa-icon",23),E(96,yUe,1,0,"fa-icon",24),r()()(),F(97,TUe,12,10,"mat-list-item",36),r()(),l(98,"div",14)(99,"mat-nav-list")(100,"mat-list-item",15)(101,"div",16)(102,"div",17)(103,"mat-icon",18),b(104,"fa-icon",37),r(),l(105,"div",20),c(106),p(107,"translate"),E(108,MUe,3,5,"p",21),r()(),l(109,"div",22),E(110,DUe,1,0,"fa-icon",23),E(111,EUe,1,0,"fa-icon",24),r()()(),l(112,"div",null,4)(114,"mat-list-item",15)(115,"div",16)(116,"div",17)(117,"mat-icon",18),b(118,"fa-icon",38),r(),l(119,"div",20),c(120),p(121,"translate"),E(122,IUe,3,5,"p",21),r()(),l(123,"div",22),E(124,OUe,1,0,"fa-icon",23),E(125,AUe,1,0,"fa-icon",24),r()()()(),l(126,"mat-list-item",15)(127,"div",16)(128,"div",17)(129,"mat-icon",18),b(130,"fa-icon",39),r(),l(131,"div",20),c(132),p(133,"translate"),E(134,FUe,3,5,"p",21),r()(),l(135,"div",22),E(136,kUe,1,0,"fa-icon",23),E(137,BUe,1,0,"fa-icon",24),r()()(),l(138,"mat-list-item",15)(139,"div",16)(140,"div",17)(141,"mat-icon"),b(142,"fa-icon",40),r(),l(143,"div",20),c(144),p(145,"translate"),E(146,RUe,3,5,"p",21),r()(),l(147,"div",22),E(148,NUe,1,0,"fa-icon",23),E(149,LUe,1,0,"fa-icon",24),r()()(),l(150,"mat-list-item",15)(151,"div",16)(152,"div",17)(153,"mat-icon",18),b(154,"fa-icon",27),r(),l(155,"div",20),c(156),p(157,"translate"),E(158,VUe,3,5,"p",21),r()(),l(159,"div",22),E(160,qUe,1,0,"fa-icon",23),E(161,zUe,1,0,"fa-icon",24),r()()(),l(162,"mat-list-item",15)(163,"div",16)(164,"div",17)(165,"mat-icon",18),b(166,"fa-icon",41),r(),l(167,"div",20),c(168),p(169,"translate"),E(170,HUe,3,5,"p",21),r()(),l(171,"div",22),E(172,GUe,1,0,"fa-icon",23),E(173,jUe,1,0,"fa-icon",24),r()()(),l(174,"mat-list-item",32)(175,"div",16)(176,"div",33)(177,"mat-icon",18),b(178,"fa-icon",27),r(),l(179,"div",20),c(180),p(181,"translate"),E(182,$Ue,3,3,"p",35),r()(),l(183,"div",22),E(184,UUe,1,0,"fa-icon",23),E(185,WUe,1,0,"fa-icon",24),r()()()()()()()(),F(186,QUe,16,15,"ng-template",null,5,ti)(188,YUe,16,15,"ng-template",null,6,ti)(190,JUe,16,15,"ng-template",null,7,ti)(192,KUe,16,15,"ng-template",null,8,ti)(194,XUe,16,15,"ng-template",null,9,ti)(196,ZUe,16,15,"ng-template",null,10,ti)(198,eWe,16,15,"ng-template",null,11,ti)),n&2&&(a(7),g("routerLink",oe(112,R5)),a(2),g("routerLink",oe(113,R5)),a(4),v(" ",m(14,84,"labels.heading.Manage Data tables")," "),a(2),I(i.arrowBooleans[0]?15:-1),a(2),I(i.arrowBooleans[0]?-1:17),a(),I(i.arrowBooleans[0]?18:-1),a(3),g("routerLink",oe(114,N5)),a(2),g("routerLink",oe(115,N5)),a(4),v(" ",m(28,86,"labels.heading.Manage Codes")," "),a(2),I(i.arrowBooleans[1]?29:-1),a(2),I(i.arrowBooleans[1]?-1:31),a(),I(i.arrowBooleans[1]?32:-1),a(3),g("routerLink",oe(116,L5)),a(2),g("routerLink",oe(117,L5)),a(4),v(" ",m(42,88,"labels.heading.Manage Roles and Permissions")," "),a(2),I(i.arrowBooleans[2]?43:-1),a(2),I(i.arrowBooleans[2]?-1:45),a(),I(i.arrowBooleans[2]?46:-1),a(3),g("routerLink",oe(118,Lx)),a(2),g("routerLink",oe(119,Lx)),a(3),g("routerLink",oe(120,Lx)),a(),v(" ",m(56,90,"labels.heading.Configure Maker Checker Tasks")," "),a(2),I(i.arrowBooleans[3]?57:-1),a(2),I(i.arrowBooleans[3]?-1:59),a(),I(i.arrowBooleans[3]?60:-1),a(),g("routerLink",oe(121,V5)),a(2),g("routerLink",oe(122,V5)),a(4),v(" ",m(68,92,"labels.heading.Manage Hooks")," "),a(2),I(i.arrowBooleans[4]?69:-1),a(2),I(i.arrowBooleans[4]?-1:71),a(),I(i.arrowBooleans[4]?72:-1),a(),g("routerLink",oe(123,q5)),a(2),g("routerLink",oe(124,q5)),a(4),v(" ",m(80,94,"labels.heading.Entity to Entity Mapping")," "),a(2),I(i.arrowBooleans[5]?81:-1),a(2),I(i.arrowBooleans[5]?-1:83),a(),I(i.arrowBooleans[5]?84:-1),a(),g("ngClass",Nt(125,TN,i.isDisabled)),a(6),v(" ",m(92,96,"labels.heading.Manage Surveys")," "),a(2),I(i.arrowBooleans[6]?93:-1),a(2),I(i.arrowBooleans[6]?-1:95),a(),I(i.arrowBooleans[6]?96:-1),a(),g("mifosxHasPermission","READ_EXTERNAL_EVENT_CONFIGURATION"),a(3),g("routerLink",oe(127,z5)),a(2),g("routerLink",oe(128,z5)),a(4),v(" ",m(107,98,"labels.heading.Audit Trails")," "),a(2),I(i.arrowBooleans[8]?108:-1),a(2),I(i.arrowBooleans[8]?-1:110),a(),I(i.arrowBooleans[8]?111:-1),a(3),g("routerLink",oe(129,H5)),a(2),g("routerLink",oe(130,H5)),a(4),v(" ",m(121,100,"labels.heading.Manage Reports")," "),a(2),I(i.arrowBooleans[9]?122:-1),a(2),I(i.arrowBooleans[9]?-1:124),a(),I(i.arrowBooleans[9]?125:-1),a(),g("routerLink",oe(131,G5)),a(2),g("routerLink",oe(132,G5)),a(4),v(" ",m(133,102,"labels.heading.Manage Jobs")," "),a(2),I(i.arrowBooleans[10]?134:-1),a(2),I(i.arrowBooleans[10]?-1:136),a(),I(i.arrowBooleans[10]?137:-1),a(),g("routerLink",oe(133,j5)),a(2),g("routerLink",oe(134,j5)),a(4),v(" ",m(145,104,"labels.heading.Configurations")," "),a(2),I(i.arrowBooleans[11]?146:-1),a(2),I(i.arrowBooleans[11]?-1:148),a(),I(i.arrowBooleans[11]?149:-1),a(),g("routerLink",oe(135,$5)),a(2),g("routerLink",oe(136,$5)),a(4),v(" ",m(157,106,"labels.heading.Account Number Preferences")," "),a(2),I(i.arrowBooleans[12]?158:-1),a(2),I(i.arrowBooleans[12]?-1:160),a(),I(i.arrowBooleans[12]?161:-1),a(),g("routerLink",oe(137,U5)),a(2),g("routerLink",oe(138,U5)),a(4),v(" ",m(169,108,"labels.heading.External Services")," "),a(2),I(i.arrowBooleans[13]?170:-1),a(2),I(i.arrowBooleans[13]?-1:172),a(),I(i.arrowBooleans[13]?173:-1),a(),g("ngClass",Nt(139,TN,i.isDisabled)),a(6),v(" ",m(181,110,"labels.heading.Two-Factor Authentication")," "),a(2),I(i.arrowBooleans[14]?182:-1),a(2),I(i.arrowBooleans[14]?-1:184),a(),I(i.arrowBooleans[14]?185:-1))},dependencies:[ue,co,fe,Ae,$e,ve,Ke,pa,Vo,Yo,ke,ca,he],styles:[".disabled-item[_ngcontent-%COMP%]{pointer-events:none;opacity:.5}"]})}}return e})();var Q5=(()=>{class e{constructor(){this.systemService=T(ii)}resolve(){return this.systemService.getAccountNumberPreferences()}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275prov=Re({token:e,factory:e.\u0275fac})}}return e})();var qx=(()=>{class e{constructor(){this.systemService=T(ii)}resolve(){return this.systemService.getAccountNumberPreferencesTemplate()}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275prov=Re({token:e,factory:e.\u0275fac})}}return e})();var zx=(()=>{class e{constructor(){this.systemService=T(ii)}resolve(t){let n=t.paramMap.get("id");return this.systemService.getAccountNumberPreference(n)}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275prov=Re({token:e,factory:e.\u0275fac})}}return e})();var Y5=(()=>{class e{constructor(){this.systemService=T(ii)}resolve(){return this.systemService.getAuditTrailSearchTemplate()}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275prov=Re({token:e,factory:e.\u0275fac})}}return e})();var J5=(()=>{class e{constructor(){this.systemService=T(ii)}resolve(t){let n=t.paramMap.get("id");return this.systemService.getAuditTrail(n)}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275prov=Re({token:e,factory:e.\u0275fac})}}return e})();var Hx=(()=>{class e{constructor(){this.systemService=T(ii)}resolve(t){let n=t.paramMap.get("id");return this.systemService.getCode(n)}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275prov=Re({token:e,factory:e.\u0275fac})}}return e})();var a1=(()=>{class e{constructor(){this.systemService=T(ii)}resolve(){return this.systemService.getCodes()}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275prov=Re({token:e,factory:e.\u0275fac})}}return e})();var K5=(()=>{class e{constructor(){this.systemService=T(ii)}resolve(t){let n=t.paramMap.get("id");return this.systemService.getCodeValues(n)}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275prov=Re({token:e,factory:e.\u0275fac})}}return e})();var tWe=["filter"],iWe=["templateFilter"],nWe=["configurationsTable"],oWe=["templateConfigurationsTable"],aWe=()=>[10,25,50,100],rWe=e=>[e,"edit"];function lWe(e,o){e&1&&(l(0,"th",22),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.name")))}function sWe(e,o){if(e&1&&(b(0,"fa-icon",25),p(1,"translate")),e&2){let t=w().$implicit;g("matTooltip",Le(m(1,2,t.description)))}}function cWe(e,o){if(e&1&&(l(0,"td",23)(1,"span",24),c(2),r(),E(3,sWe,2,4,"fa-icon",25),r()),e&2){let t=o.$implicit;a(2),h(t.name),a(),I(t.description?3:-1)}}function pWe(e,o){e&1&&(l(0,"th",22),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.Status")))}function mWe(e,o){e&1&&(l(0,"span"),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.Enabled")))}function dWe(e,o){e&1&&(l(0,"span"),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.Disabled")))}function uWe(e,o){if(e&1){let t=Y();l(0,"td",23)(1,"mat-slide-toggle",26),Rc("ngModelChange",function(i){let s=V(t).$implicit;return Bc(s.enabled,i)||(s.enabled=i),q(i)}),R("click",function(){let i=V(t).$implicit,s=w();return q(s.toggleStatus(i))}),l(2,"div",27),E(3,mWe,3,3,"span"),E(4,dWe,3,3,"span"),r()()()}if(e&2){let t=o.$implicit;a(),g("name",Le(t.name)),kc("ngModel",t.enabled),a(),g("className",t.enabled?"enabled":"disabled"),a(),I(t.enabled?3:-1),a(),I(t.enabled?-1:4)}}function fWe(e,o){e&1&&(l(0,"th",22),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.Value")))}function hWe(e,o){if(e&1&&(l(0,"td",23),c(1),r()),e&2){let t=o.$implicit;a(),h(t.value)}}function gWe(e,o){e&1&&(l(0,"th",22),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.String Value")))}function _We(e,o){if(e&1&&(l(0,"td",23),c(1),r()),e&2){let t=o.$implicit;a(),h(t.stringValue)}}function CWe(e,o){e&1&&(l(0,"th",22),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.Date Value")))}function vWe(e,o){if(e&1&&(l(0,"td",23),c(1),p(2,"dateFormat"),r()),e&2){let t=o.$implicit;a(),h(m(2,1,t.dateValue))}}function xWe(e,o){e&1&&(l(0,"th",28),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.Actions")))}function bWe(e,o){if(e&1&&(l(0,"td",23)(1,"button",29),b(2,"fa-icon",30),r()()),e&2){let t=o.$implicit;a(),g("routerLink",Nt(1,rWe,t.id))}}function yWe(e,o){e&1&&b(0,"tr",31)}function SWe(e,o){e&1&&b(0,"tr",32)}function wWe(e,o){if(e&1){let t=Y();l(0,"h4"),c(1),p(2,"translate"),r(),l(3,"div",33)(4,"button",34),R("click",function(){let i=V(t).popover,s=w();return i.close(),q(s.configurationWizardService.closeConfigWizard())}),c(5),p(6,"translate"),r(),l(7,"button",35),R("click",function(){let i=V(t).popover,s=w();return i.close(),q(s.previousStep())}),c(8),p(9,"translate"),r(),l(10,"button",35),R("click",function(){let i=V(t).popover,s=w(),d=xe(9),u=xe(35);return i.close(),q(s.showPopover(u,d,"top",!0))}),c(11),p(12,"translate"),r()()}e&2&&(a(),h(m(2,4,"labels.heading.Search bar to filter configurations")),a(4),v(" ",m(6,6,"labels.buttons.Close")," "),a(3),v(" ",m(9,8,"labels.buttons.Back")," "),a(3),v(" ",m(12,10,"labels.buttons.Next")," "))}function PWe(e,o){if(e&1){let t=Y();l(0,"h4",36),c(1),p(2,"translate"),l(3,"a",37),c(4),p(5,"translate"),r()(),l(6,"div",33)(7,"button",34),R("click",function(){let i=V(t).popover,s=w();return i.close(),q(s.configurationWizardService.closeConfigWizard())}),c(8),p(9,"translate"),r(),l(10,"button",35),R("click",function(){let i=V(t).popover,s=w(),d=xe(2),u=xe(33);return i.close(),q(s.showPopover(u,d,"bottom",!0))}),c(11),p(12,"translate"),r(),l(13,"button",35),R("click",function(){let i=V(t).popover,s=w();return i.close(),q(s.nextStep())}),c(14),p(15,"translate"),r()()}e&2&&(a(),v(" ",m(2,5,"labels.heading.Global Configuration options"),": "),a(3),h(m(5,7,"labels.inputs.Global Configurations")),a(4),v(" ",m(9,9,"labels.buttons.Close")," "),a(3),v(" ",m(12,11,"labels.buttons.Back")," "),a(3),v(" ",m(15,13,"labels.buttons.Next")," "))}var Gx=(()=>{class e{constructor(){this.route=T(Ie),this.alertService=T(wr),this.systemService=T(ii),this.router=T(qe),this.configurationWizardService=T(Qi),this.popoverService=T(Wi),this.displayedColumns=["name","enabled","value","stringValue","dateValue","edit"],this.route.data.subscribe(t=>{this.configurationData=t.configurations})}ngOnInit(){this.setConfigurationData()}setConfigurationData(){this.systemService.getConfigurations().subscribe(t=>{this.configurationData=t.globalConfiguration,this.dataSource=new Wt(this.configurationData),this.dataSource.paginator=this.paginator,this.dataSource.sort=this.sort})}applyFilter(t){this.dataSource.filter=t.trim().toLowerCase()}toggleStatus(t){this.systemService.updateConfiguration(t.id,{enabled:t.enabled}).subscribe(n=>{if(t.enabled=n.changes.enabled,t.name===At.businessDateConfigName){let i=t.enabled?"enabled":"disabled";this.alertService.alert({type:At.businessDateType+" Set Config",message:i})}})}showPopover(t,n,i,s){setTimeout(()=>this.popoverService.open(t,n,i,s,{}),200)}ngAfterViewInit(){this.configurationWizardService.showConfigurationsPage===!0&&setTimeout(()=>{this.showPopover(this.templateFilter,this.filter.nativeElement,"bottom",!0)}),this.configurationWizardService.showConfigurationsList===!0&&setTimeout(()=>{this.showPopover(this.templateConfigurationsTable,this.configurationsTable.nativeElement,"top",!0)})}nextStep(){this.configurationWizardService.showConfigurationsPage=!1,this.configurationWizardService.showConfigurationsList=!1,this.configurationWizardService.showSchedulerJobs=!0,this.router.navigate(["/system"])}previousStep(){this.configurationWizardService.showConfigurationsPage=!1,this.configurationWizardService.showConfigurationsList=!1,this.configurationWizardService.showConfigurations=!0,this.router.navigate(["/system"])}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275cmp=me({type:e,selectors:[["mifosx-global-configurations-tab"]],viewQuery:function(n,i){if(n&1&&(Ee(kt,7),Ee(It,7),Ee(tWe,5),Ee(iWe,5),Ee(nWe,5),Ee(oWe,5)),n&2){let s;Te(s=Me())&&(i.paginator=s.first),Te(s=Me())&&(i.sort=s.first),Te(s=Me())&&(i.filter=s.first),Te(s=Me())&&(i.templateFilter=s.first),Te(s=Me())&&(i.configurationsTable=s.first),Te(s=Me())&&(i.templateConfigurationsTable=s.first)}},decls:36,vars:8,consts:[["filter",""],["configurationsTable",""],["templateFilter",""],["templateConfigurationsTable",""],[1,"container"],[1,"layout-row"],[1,"flex-fill"],["matInput","",3,"keyup"],[1,"mat-elevation-z8","m-b-10"],["mat-table","","matSort","",3,"dataSource"],["matColumnDef","name"],["mat-header-cell","","mat-sort-header","",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","enabled"],["matColumnDef","value"],["matColumnDef","stringValue"],["matColumnDef","dateValue"],["matColumnDef","edit"],["mat-header-cell","",4,"matHeaderCellDef"],["mat-header-row","",4,"matHeaderRowDef"],["mat-row","",4,"matRowDef","matRowDefColumns"],["showFirstLastButtons","",3,"pageSizeOptions"],["mat-header-cell","","mat-sort-header",""],["mat-cell",""],[1,"m-r-10"],["icon","question-circle","matTooltipPosition","right",3,"matTooltip"],[3,"ngModelChange","click","ngModel","name"],[3,"className"],["mat-header-cell",""],["mat-button","","color","primary",3,"routerLink"],["icon","edit"],["mat-header-row",""],["mat-row",""],[1,"layout-row","align-end","gap-2px","responsive-column"],["mat-raised-button","","color","warn",3,"click"],["mat-raised-button","","color","primary",3,"click"],[1,"mw300"],["href","https://mifosforge.jira.com/wiki/spaces/docs/pages/67895362/Global+Configuration","target","_blank"]],template:function(n,i){if(n&1){let s=Y();l(0,"div",4)(1,"div",5,0)(3,"mat-form-field",6)(4,"mat-label"),c(5),p(6,"translate"),r(),l(7,"input",7),R("keyup",function(u){return V(s),q(i.applyFilter(u.target.value))}),r()()(),l(8,"div",8,1)(10,"table",9),X(11,10),F(12,lWe,3,3,"th",11)(13,cWe,4,2,"td",12),Z(),X(14,13),F(15,pWe,3,3,"th",11)(16,uWe,5,6,"td",12),Z(),X(17,14),F(18,fWe,3,3,"th",11)(19,hWe,2,1,"td",12),Z(),X(20,15),F(21,gWe,3,3,"th",11)(22,_We,2,1,"td",12),Z(),X(23,16),F(24,CWe,3,3,"th",11)(25,vWe,3,3,"td",12),Z(),X(26,17),F(27,xWe,3,3,"th",18)(28,bWe,3,3,"td",12),Z(),F(29,yWe,1,0,"tr",19)(30,SWe,1,0,"tr",20),r(),b(31,"mat-paginator",21),r()(),F(32,wWe,13,12,"ng-template",null,2,ti)(34,PWe,16,15,"ng-template",null,3,ti)}n&2&&(a(5),h(m(6,5,"labels.inputs.Filter")),a(5),g("dataSource",i.dataSource),a(19),g("matHeaderRowDef",i.displayedColumns),a(),g("matRowDefColumns",i.displayedColumns),a(),g("pageSizeOptions",oe(7,aWe)))},dependencies:[ue,fe,Ue,Ae,Fe,Be,ze,ve,_t,It,xt,vt,bt,ri,Ct,yt,ke,si,Ip,ec,Sp,St,Pt,wt,Tt,kt,Pi,he],styles:["table[_ngcontent-%COMP%]{width:100%}"]})}}return e})();function TWe(e,o){if(e&1&&(l(0,"div")(1,"p"),c(2),p(3,"translate"),l(4,"code"),c(5),r()()()),e&2){let t=w();a(2),v(" ",m(3,2,"labels.text.Business Date functionality is not enabled"),": "),a(3),h(t.configurationName)}}function MWe(e,o){if(e&1&&(l(0,"div",10)(1,"span",7),c(2),p(3,"translate"),r(),l(4,"span",15),c(5),p(6,"dateFormat"),r()()),e&2){let t=w(2);a(2),v("",m(3,2,"labels.inputs.Business Date"),": "),a(3),h(m(6,4,t.businessDate))}}function DWe(e,o){e&1&&(l(0,"mat-error"),c(1),p(2,"translate"),p(3,"translate"),l(4,"strong"),c(5),p(6,"translate"),r()()),e&2&&(a(),le(" ",m(2,3,"labels.inputs.Business Date")," ",m(3,5,"labels.commons.is")," "),a(4),h(m(6,7,"labels.commons.required")))}function EWe(e,o){if(e&1){let t=Y();l(0,"mat-form-field",16),R("click",function(){V(t);let i=xe(7);return q(i.open())}),l(1,"mat-label"),c(2),p(3,"translate"),r(),b(4,"input",17)(5,"mat-datepicker-toggle",18)(6,"mat-datepicker",null,0),E(8,DWe,7,9,"mat-error"),r()}if(e&2){let t=xe(7),n=w(2);a(2),h(m(3,6,"labels.inputs.Business Date")),a(2),g("min",n.minDate)("max",n.maxDate)("matDatepicker",t),a(),g("for",t),a(3),I(n.businessDateForm.controls.businessDate.hasError("required")?8:-1)}}function IWe(e,o){if(e&1){let t=Y();l(0,"button",21),R("click",function(){V(t);let i=w(3);return q(i.submit())}),c(1),p(2,"translate"),r()}if(e&2){let t=w(3);g("disabled",t.businessDateForm.pristine),a(),v(" ",m(2,2,"labels.buttons.Submit")," ")}}function OWe(e,o){if(e&1){let t=Y();l(0,"span"),F(1,IWe,3,4,"button",19),l(2,"button",20),R("click",function(){V(t);let i=w(2);return q(i.editInProgressToggle(0))}),c(3),p(4,"translate"),r()()}e&2&&(a(),g("mifosxHasPermission","UPDATE_BUSINESSDATE"),a(2),v(" ",m(4,2,"labels.buttons.Cancel")," "))}function AWe(e,o){if(e&1){let t=Y();l(0,"button",22),p(1,"translate"),R("click",function(){V(t);let i=w(2);return q(i.editInProgressToggle(0))}),b(2,"fa-icon",23),r()}e&2&&g("matTooltip",Le(m(1,2,"tooltips.Edit the Business Date")))}function FWe(e,o){if(e&1&&(l(0,"div",10)(1,"span",24),c(2),p(3,"translate"),r(),l(4,"span",25),c(5),p(6,"dateFormat"),r()()),e&2){let t=w(2);a(2),v("",m(3,2,"labels.inputs.COB Date"),": "),a(3),h(m(6,4,t.cobDate))}}function kWe(e,o){e&1&&(l(0,"mat-error"),c(1),p(2,"translate"),p(3,"translate"),l(4,"strong"),c(5),p(6,"translate"),r()()),e&2&&(a(),le(" ",m(2,3,"labels.inputs.COB Date")," ",m(3,5,"labels.commons.is")," "),a(4),h(m(6,7,"labels.commons.required")))}function BWe(e,o){if(e&1){let t=Y();l(0,"mat-form-field",16),R("click",function(){V(t);let i=xe(7);return q(i.open())}),l(1,"mat-label"),c(2),p(3,"translate"),r(),b(4,"input",17)(5,"mat-datepicker-toggle",18)(6,"mat-datepicker",null,1),E(8,kWe,7,9,"mat-error"),r()}if(e&2){let t=xe(7),n=w(2);a(2),h(m(3,6,"labels.inputs.COB Date")),a(2),g("min",n.minDate)("max",n.maxDate)("matDatepicker",t),a(),g("for",t),a(3),I(n.businessDateForm.controls.cobDate.hasError("required")?8:-1)}}function RWe(e,o){if(e&1){let t=Y();l(0,"button",27),R("click",function(){V(t);let i=w(3);return q(i.submit())}),c(1),p(2,"translate"),r()}if(e&2){let t=w(3);g("disabled",t.businessDateForm.pristine),a(),v(" ",m(2,2,"labels.buttons.Submit")," ")}}function NWe(e,o){e&1&&(l(0,"span"),F(1,RWe,3,4,"button",26),r()),e&2&&(a(),g("mifosxHasPermission","UPDATE_BUSINESSDATE"))}function LWe(e,o){if(e&1){let t=Y();l(0,"button",28),R("click",function(){V(t);let i=w(2);return q(i.editInProgressToggle(1))}),c(1),p(2,"translate"),r()}e&2&&(a(),v(" ",m(2,1,"labels.buttons.Cancel")," "))}function VWe(e,o){if(e&1){let t=Y();l(0,"button",22),p(1,"translate"),R("click",function(){V(t);let i=w(2);return q(i.editInProgressToggle(1))}),b(2,"fa-icon",23),r()}e&2&&g("matTooltip",Le(m(1,2,"tooltips.Edit the COB Date")))}function qWe(e,o){if(e&1&&(l(0,"div")(1,"mat-card")(2,"form",4)(3,"mat-card-content")(4,"div",5)(5,"div",6)(6,"span",7),c(7),p(8,"translate"),r(),l(9,"span",8),c(10),r()()(),l(11,"div",9),E(12,MWe,7,6,"div",10),E(13,EWe,9,8,"mat-form-field"),l(14,"div",11),E(15,OWe,5,4,"span"),E(16,AWe,3,4,"button",12),r()(),l(17,"div",9),E(18,FWe,7,6,"div",10),E(19,BWe,9,8,"mat-form-field"),l(20,"div",13),E(21,NWe,2,1,"span"),E(22,LWe,3,3,"button",14),E(23,VWe,3,4,"button",12),r()()()()()()),e&2){let t=w();a(2),g("formGroup",t.businessDateForm),a(5),v("",m(8,12,"labels.inputs.User date format"),": "),a(3),h(t.userDateFormat),a(2),I(t.isEditInProgress?-1:12),a(),I(t.isEditInProgress&&t.dateIndex===0?13:-1),a(2),I(t.isEditInProgress&&t.dateIndex===0?15:-1),a(),I(t.isEditInProgress?-1:16),a(2),I(t.isEditInProgress?-1:18),a(),I(t.isEditInProgress&&t.dateIndex===1?19:-1),a(2),I(t.isEditInProgress&&t.dateIndex===1?21:-1),a(),I(t.isEditInProgress&&t.dateIndex===1?22:-1),a(),I(t.isEditInProgress?-1:23)}}var jx=(()=>{class e{constructor(){this.systemService=T(ii),this.settingsService=T(At),this.formBuilder=T(nt),this.dateUtils=T(Zt),this.alertService=T(wr),this.minDate=new Date(2e3,0,1),this.maxDate=new Date(2100,0,1),this.businessDate=new Date,this.cobDate=new Date,this.dateIndex=0,this.isBusinessDateEnabled=!1,this.isEditInProgress=!1}ngOnInit(){this.alert$=this.alertService.alertEvent.subscribe(t=>{t.type===At.businessDateType+" Set Config"&&(this.isBusinessDateEnabled=t.message==="enabled",this.isBusinessDateEnabled&&(this.setBusinessDates(),this.createBusinessDateForm()))}),this.userDateFormat=this.settingsService.dateFormat,this.getConfigurations(),this.createBusinessDateForm()}getConfigurations(){this.systemService.getConfigurationByName(At.businessDateConfigName).subscribe(t=>{this.isBusinessDateEnabled=t.enabled,this.isBusinessDateEnabled&&this.setBusinessDates()})}setBusinessDates(){this.systemService.getBusinessDates().subscribe(t=>{t.forEach(n=>{n.type===At.businessDateType?(this.businessDate=new Date(n.date),this.businessDateForm.patchValue({businessDate:this.businessDate})):(this.cobDate=new Date(n.date),this.businessDateForm.patchValue({cobDate:this.cobDate}))})})}createBusinessDateForm(){this.businessDateForm=this.formBuilder.group({businessDate:[new Date,se.required],cobDate:[new Date,se.required]})}editInProgressToggle(t){this.dateIndex=t,this.isEditInProgress=!this.isEditInProgress}submit(){let t=this.settingsService.language.code,n=this.settingsService.dateFormat,i=this.businessDateForm.value.businessDate,s=At.businessDateType;this.dateIndex===1&&(s=At.cobDateType);let d={date:this.dateUtils.formatDate(i,n),type:s,dateFormat:n,locale:t};this.systemService.updateBusinessDate(d).subscribe(u=>{this.getConfigurations(),this.editInProgressToggle(this.dateIndex)})}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275cmp=me({type:e,selectors:[["mifosx-business-date-tab"]],decls:4,vars:2,consts:[["businessDatePicker",""],["cobDatePicker",""],[1,"container","space"],[1,"mat-elevation-z8"],[3,"formGroup"],[1,"flex-100","layout-row","layout-lt-md-column","space"],[1,"flex-50"],[1,"date-type","flex-40"],[1,"date-value","flex-60","m-l-30"],[1,"flex-100","layout-row","layout-lt-md-column"],[1,"flex-50","table-row"],[1,"options-wrapper","gap-2percent","flex-22"],["type","button","color","primary","mat-icon-button","","matTooltipPosition","above",3,"matTooltip"],[1,"options-wrapper","flex-22","gap-4percent"],["mat-button",""],[1,"date-value","flex-60","m-l-40"],[3,"click"],["matInput","","formControlName","businessDate",3,"min","max","matDatepicker"],["matSuffix","",3,"for"],["mat-raised-button","","color","primary",3,"disabled","click",4,"mifosxHasPermission"],["mat-raised-button","",3,"click"],["mat-raised-button","","color","primary",3,"click","disabled"],["type","button","color","primary","mat-icon-button","","matTooltipPosition","above",3,"click","matTooltip"],["icon","edit","size","lg"],[1,"date-type"],[1,"date-value","flex-60","m-l-80"],["mat-stroked-button","","color","primary",3,"disabled","click",4,"mifosxHasPermission"],["mat-stroked-button","","color","primary",3,"click","disabled"],["mat-button","",3,"click"]],template:function(n,i){n&1&&(l(0,"div",2)(1,"div",3),E(2,TWe,6,4,"div"),E(3,qWe,24,14,"div"),r()()),n&2&&(a(2),I(i.isBusinessDateEnabled?-1:2),a(),I(i.isBusinessDateEnabled?3:-1))},dependencies:[ue,fe,tt,st,Ue,Xe,Ze,et,$e,Je,Fe,Be,ut,ai,ze,mi,di,pi,ve,Ke,wi,si,ke,Pi,he],styles:[".space[_ngcontent-%COMP%]{padding-bottom:40px}.date-type[_ngcontent-%COMP%]{font-size:1.25rem;font-weight:400;min-width:40%}.date-value[_ngcontent-%COMP%]{display:inline;font-size:1rem;min-width:50%}.table-row[_ngcontent-%COMP%]{vertical-align:middle}"]})}}return e})();function zWe(e,o){e&1&&(l(0,"mat-tab",3),p(1,"translate"),b(2,"mifosx-business-date-tab"),r()),e&2&&g("label",Le(m(1,2,"labels.inputs.Business Date")))}var $x=(()=>{class e{constructor(){this.alertService=T(wr),this.systemService=T(ii),this.isBusinessDateEnabled=!1}ngOnInit(){this.alert$=this.alertService.alertEvent.subscribe(t=>{t.type===At.businessDateType+" Set Config"&&(this.isBusinessDateEnabled=t.message==="enabled")}),this.getConfigurations()}getConfigurations(){this.systemService.getConfigurationByName(At.businessDateConfigName).subscribe(t=>{this.isBusinessDateEnabled=t.enabled})}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275cmp=me({type:e,selectors:[["mifosx-configurations"]],decls:8,vars:5,consts:[["tabGroup",""],[1,"configurations-card"],["mat-align-tabs","center"],[3,"label"]],template:function(n,i){n&1&&(l(0,"mat-card",1)(1,"mat-card-content")(2,"mat-tab-group",2,0)(4,"mat-tab",3),p(5,"translate"),b(6,"mifosx-global-configurations-tab"),r(),E(7,zWe,3,4,"mat-tab",3),r()()()),n&2&&(a(4),g("label",Le(m(5,3,"labels.inputs.Global Configurations"))),a(3),I(i.isBusinessDateEnabled?7:-1))},dependencies:[ue,fe,$e,Je,Lr,Yr,Gx,jx,he],styles:[".configurations-card[_ngcontent-%COMP%]{margin:0 auto;max-width:80rem;width:90%;padding:0 0 50px;min-height:500px}.configurations-card[_ngcontent-%COMP%] .header[_ngcontent-%COMP%]{padding:1%}.configurations-card[_ngcontent-%COMP%] .header[_ngcontent-%COMP%] .header-title-group[_ngcontent-%COMP%] .client-card-title[_ngcontent-%COMP%]{margin-top:1.4rem;color:#fff;width:90%}.configurations-card[_ngcontent-%COMP%] .header[_ngcontent-%COMP%] .header-title-group[_ngcontent-%COMP%] .client-card-title[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{color:#fff}.configurations-card[_ngcontent-%COMP%] .navigation-tabs[_ngcontent-%COMP%]{overflow:auto}.configurations-card[_ngcontent-%COMP%] i[_ngcontent-%COMP%]:hover{cursor:pointer}"]})}}return e})();var HWe=()=>["../.."],Ux=(()=>{class e{constructor(){this.formBuilder=T(nt),this.systemService=T(ii),this.settingsService=T(At),this.route=T(Ie),this.router=T(qe),this.minDate=new Date(2e3,0,1),this.maxDate=new Date,this.route.data.subscribe(t=>{this.configuration=t.configuration})}ngOnInit(){this.maxDate=this.settingsService.businessDate,this.createConfigurationForm()}createConfigurationForm(){this.configurationForm=this.formBuilder.group({name:[{value:this.configuration.name,disabled:!0},se.required],description:[{value:this.configuration.description,disabled:!0}],value:[this.configuration.value],stringValue:[this.configuration.stringValue],dateValue:[this.configuration.dateValue]})}submit(){if(this.configurationForm.value.value!=null||this.configurationForm.value.stringValue!=null||this.configurationForm.value.dateValue!=null){let t=at({},this.configurationForm.value);this.configurationForm.value.stringValue||delete t.stringValue,this.configurationForm.value.dateValue!=null?(t.locale=this.settingsService.language.code,t.dateFormat=this.settingsService.dateFormat):delete t.dateValue,this.systemService.updateConfiguration(this.configuration.id,t).subscribe(n=>{this.router.navigate(["../../"],{relativeTo:this.route})})}}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275cmp=me({type:e,selectors:[["mifosx-edit-configuration"]],decls:40,vars:29,consts:[["configurationDatePicker",""],[1,"container","space"],[3,"ngSubmit","formGroup"],[1,"layout-column"],["matInput","","required","","formControlName","name"],["matInput","","formControlName","description","cdkTextareaAutosize","","cdkAutosizeMinRows","2"],["matInput","","type","number","formControlName","value"],["matInput","","formControlName","stringValue"],[1,"flex-48",3,"click"],["matInput","","formControlName","dateValue",3,"min","max","matDatepicker"],["matSuffix","",3,"for"],[1,"layout-row","align-center","gap-5px","responsive-column"],["type","button","mat-raised-button","",3,"routerLink"],["mat-raised-button","","color","primary",3,"disabled"]],template:function(n,i){if(n&1){let s=Y();l(0,"div",1)(1,"mat-card")(2,"form",2),R("ngSubmit",function(){return V(s),q(i.submit())}),l(3,"mat-card-content")(4,"div",3)(5,"mat-form-field")(6,"mat-label"),c(7),p(8,"translate"),r(),b(9,"input",4),r(),l(10,"mat-form-field")(11,"mat-label"),c(12),p(13,"translate"),r(),b(14,"textarea",5),r(),l(15,"mat-form-field")(16,"mat-label"),c(17),p(18,"translate"),r(),b(19,"input",6),r(),l(20,"mat-form-field")(21,"mat-label"),c(22),p(23,"translate"),r(),b(24,"input",7),r(),l(25,"mat-form-field",8),R("click",function(){V(s);let u=xe(32);return q(u.open())}),l(26,"mat-label"),c(27),p(28,"translate"),r(),b(29,"input",9)(30,"mat-datepicker-toggle",10)(31,"mat-datepicker",null,0),r()()(),l(33,"mat-card-actions",11)(34,"button",12),c(35),p(36,"translate"),r(),l(37,"button",13),c(38),p(39,"translate"),r()()()()()}if(n&2){let s=xe(32);a(2),g("formGroup",i.configurationForm),a(5),h(m(8,14,"labels.inputs.Configuration Name")),a(5),h(m(13,16,"labels.inputs.Description")),a(5),h(m(18,18,"labels.inputs.Number Value")),a(5),h(m(23,20,"labels.inputs.String Value")),a(5),h(m(28,22,"labels.inputs.Date Value")),a(2),g("min",i.minDate)("max",i.maxDate)("matDatepicker",s),a(),g("for",s),a(4),g("routerLink",oe(28,HWe)),a(),v(" ",m(36,24,"labels.buttons.Cancel")," "),a(2),g("disabled",i.configurationForm.pristine||!i.configurationForm.valid),a(),v(" ",m(39,26,"labels.buttons.Submit")," ")}},dependencies:[ue,fe,tt,st,tn,Ue,Xe,dt,Ze,et,Ae,$e,Je,Et,Fe,Be,ai,ze,mi,di,pi,ve,Ln,he],styles:[".container[_ngcontent-%COMP%]{max-width:37rem}.space[_ngcontent-%COMP%]{padding-bottom:40px}"]})}}return e})();var X5=(()=>{class e{constructor(){this.systemService=T(ii)}resolve(t){let n=t.paramMap.get("id");return this.systemService.getConfiguration(n)}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275prov=Re({token:e,factory:e.\u0275fac})}}return e})();var Wp=(()=>{class e{constructor(){this.systemService=T(ii)}resolve(){return this.systemService.getConfigurations()}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275prov=Re({token:e,factory:e.\u0275fac})}}return e})();var Z5=Es(vd());var GWe=["buttonEdit"],jWe=["templateButtonEdit"],$We=["mcTable"],UWe=["templateMcTable"];function WWe(e,o){if(e&1){let t=Y();l(0,"button",17),R("click",function(){V(t);let i=w();return i.editTask(),q(i.backupCheckValues())}),b(1,"fa-icon",18),c(2),p(3,"translate"),r()}e&2&&(a(2),v(" ",m(3,1,"labels.buttons.Edit")," "))}function QWe(e,o){if(e&1){let t=Y();l(0,"mat-list-item",19),R("click",function(){let i=V(t).$implicit,s=w();return q(s.showPermissions(i))}),l(1,"span",20),c(2),r()()}if(e&2){let t=o.$implicit,n=w();g("ngClass",n.selectedItem===t?"active":"inactive"),a(2),v(" ",n.formatName(t)," ")}}function YWe(e,o){if(e&1&&(l(0,"div",15)(1,"div",21)(2,"mat-checkbox",22),c(3),r()()()),e&2){let t=o.$implicit,n=o.$index,i=w();a(),g("formGroupName",n),a(),g("id",Le(t.code)),a(),v(" ",i.permissionName(t.code)," ")}}function JWe(e,o){if(e&1){let t=Y();l(0,"button",17),R("click",function(){V(t);let i=w(2);return q(i.submit())}),c(1),p(2,"translate"),r()}e&2&&(a(),v(" ",m(2,1,"labels.buttons.Submit")," "))}function KWe(e,o){if(e&1){let t=Y();l(0,"div",16)(1,"mat-card-actions")(2,"button",23),R("click",function(){V(t);let i=w();return i.cancel(),q(i.restoreCheckboxes())}),c(3),p(4,"translate"),r(),F(5,JWe,3,3,"button",6),r()()}e&2&&(a(3),v(" ",m(4,2,"labels.buttons.Cancel")," "),a(2),g("mifosxHasPermission","UPDATE_PERMISSION"))}function XWe(e,o){if(e&1){let t=Y();l(0,"h2"),c(1),p(2,"translate"),r(),l(3,"p",24),c(4),p(5,"translate"),r(),l(6,"div",25)(7,"button",26),R("click",function(){let i=V(t).popover,s=w();return i.close(),q(s.configurationWizardService.closeConfigWizard())}),c(8),p(9,"translate"),r(),l(10,"button",17),R("click",function(){let i=V(t).popover,s=w();return i.close(),q(s.previousStep())}),c(11),p(12,"translate"),r(),l(13,"button",17),R("click",function(){let i=V(t).popover,s=w(),d=xe(9),u=xe(23);return i.close(),q(s.showPopover(u,d,"top",!0))}),c(14),p(15,"translate"),r()()}e&2&&(a(),h(m(2,5,"labels.heading.Edit")),a(3),h(m(5,7,"labels.text.To add or remove a task from the Maker-Checker list")),a(4),v(" ",m(9,9,"labels.buttons.Close")," "),a(3),v(" ",m(12,11,"labels.buttons.Back")," "),a(3),v(" ",m(15,13,"labels.buttons.Next")," "))}function ZWe(e,o){if(e&1){let t=Y();l(0,"h4",24),c(1),p(2,"translate"),l(3,"a",27),c(4),p(5,"translate"),r()(),l(6,"div",25)(7,"button",26),R("click",function(){let i=V(t).popover,s=w();return i.close(),q(s.configurationWizardService.closeConfigWizard())}),c(8),p(9,"translate"),r(),l(10,"button",17),R("click",function(){let i=V(t).popover,s=w(),d=xe(2),u=xe(21);return i.close(),q(s.showPopover(u,d,"bottom",!0))}),c(11),p(12,"translate"),r(),l(13,"button",17),R("click",function(){let i=V(t).popover,s=w();return i.close(),q(s.nextStep())}),c(14),p(15,"translate"),r()()}e&2&&(a(),v(" ",m(2,5,"labels.heading.List of all maker checker tasks"),": "),a(3),h(m(5,7,"labels.inputs.Configure Maker-Checker Tasks")),a(4),v(" ",m(9,9,"labels.buttons.Close")," "),a(3),v(" ",m(12,11,"labels.buttons.Back")," "),a(3),v(" ",m(15,13,"labels.buttons.Next")," "))}var Wx=(()=>{class e{constructor(){this.route=T(Ie),this.systemService=T(ii),this.formBuilder=T(nt),this.router=T(qe),this.configurationWizardService=T(Qi),this.popoverService=T(Wi),this.permissionsData=[],this.groupings=[],this.currentGrouping="",this.tempPermissionUIData={},this.permissions={permissions:[]},this.formData={},this.isDisabled=!0,this.selectedItem="",this.previousGrouping="",this.checkboxesChanged=!1,this.permissionName=function(t){return t=t||"",t=t.replace(/_/g," "),this.previousGrouping==="report"&&(t=t.replace(/READ/g,"View")),t},this.formatName=function(t){if(t=t||"",t.indexOf("portfolio_")>-1&&(t=t.replace("portfolio_","")),t.indexOf("transaction_")>-1){let n=t.split("_");t=n[1]+" "+n[0].charAt(0).toUpperCase()+n[0].slice(1)+"s"}return t=t.charAt(0).toUpperCase()+t.slice(1),t},this.route.data.subscribe(t=>{this.permissionsData=t.permissions})}ngOnInit(){this.createForm(),this.setMakerCheckerTask(),this.selectedItem="portfolio",this.showPermissions("portfolio")}createForm(){this.formGroup=this.formBuilder.group({roster:this.formBuilder.array(this.permissionsData.map(t=>this.createMemberGroup(t)))})}createMemberGroup(t){return this.formBuilder.group(qt(at({},t),{code:[t.code,se.required],selected:[{value:t.selected,disabled:!0},se.required]}))}setMakerCheckerTask(){this.tempPermissionUIData={};for(let t of this.permissionsData){t.grouping!==this.currentGrouping&&(this.currentGrouping=t.grouping||"",this.groupings.push(this.currentGrouping),this.tempPermissionUIData[this.currentGrouping]={permissions:[]});let n={code:t.code,id:t.id,selected:t.selected};this.tempPermissionUIData[this.currentGrouping].permissions.push(n)}}showPermissions(t){let n=this.tempPermissionUIData[t];n&&(this.permissions=n,this.selectedItem=t,this.previousGrouping=t)}backupCheckValues(){this.backupform=Z5.cloneDeep(this.formGroup)}restoreCheckboxes(){this.formGroup=Z5.cloneDeep(this.backupform)}isTaskEnable(t){return t}editTask(){this.isDisabled=!1,this.formGroup.controls.roster.enable()}cancel(){this.isDisabled=!0,this.formGroup.controls.roster.disable()}submit(){let t=this.formGroup.get("roster")?.value,n={permissions:{}};Array.isArray(t)&&t.forEach(i=>{i.code&&typeof i.selected=="boolean"&&(n.permissions[i.code]=i.selected)}),this.formGroup.get("roster")?.disable(),this.checkboxesChanged=!1,this.isDisabled=!0,this.systemService.updateMakerCheckerPermission(n).subscribe(i=>{})}showPopover(t,n,i,s){setTimeout(()=>this.popoverService.open(t,n,i,s,{}),200)}ngAfterViewInit(){this.configurationWizardService.showMakerCheckerTablePage===!0&&setTimeout(()=>{this.showPopover(this.templateButtonEdit,this.buttonEdit.nativeElement,"bottom",!0)}),this.configurationWizardService.showMakerCheckerTableList===!0&&setTimeout(()=>{this.showPopover(this.templateMcTable,this.mcTable.nativeElement,"top",!0)})}nextStep(){this.configurationWizardService.showMakerCheckerTablePage=!1,this.configurationWizardService.showMakerCheckerTableList=!1,this.configurationWizardService.showConfigurations=!0,this.router.navigate(["/system"])}previousStep(){this.configurationWizardService.showMakerCheckerTablePage=!1,this.configurationWizardService.showMakerCheckerTableList=!1,this.configurationWizardService.showMakerCheckerTable=!0,this.router.navigate(["/system"])}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275cmp=me({type:e,selectors:[["mifosx-configure-maker-checker-tasks"]],viewQuery:function(n,i){if(n&1&&(Ee(GWe,5),Ee(jWe,5),Ee($We,5),Ee(UWe,5)),n&2){let s;Te(s=Me())&&(i.buttonEdit=s.first),Te(s=Me())&&(i.templateButtonEdit=s.first),Te(s=Me())&&(i.mcTable=s.first),Te(s=Me())&&(i.templateMcTable=s.first)}},decls:24,vars:4,consts:[["buttonEdit",""],["mcTable",""],["templateButtonEdit",""],["templateMcTable",""],[1,"layout-row","align-end","gap-2px","responsive-column","container","m-b-20"],[1,"in-block"],["mat-raised-button","","color","primary",3,"click",4,"mifosxHasPermission"],[1,"container"],[1,"layout-row"],[1,"layout-column","flex-30"],[3,"ngClass"],[3,"vertical"],[1,"list-permission","layout-column","flex-70"],[3,"submit","formGroup"],["formArrayName","roster"],[1,"display-permissions"],[1,"layout-row","layout-align-center","gap-5px","layout-xs-column"],["mat-raised-button","","color","primary",3,"click"],["icon","edit",1,"m-r-10"],[3,"click","ngClass"],[1,"grouping-name"],[3,"formGroupName"],["name","cp","formControlName","selected",3,"id"],["type","button","mat-raised-button","",3,"click"],[1,"mw300"],[1,"layout-row","align-end","gap-2px","responsive-column"],["mat-raised-button","","color","warn",3,"click"],["href","https://mifosforge.jira.com/wiki/spaces/docs/pages/67895359/Configure+Maker-Checker+Tasks","target","_blank"]],template:function(n,i){if(n&1){let s=Y();l(0,"div",4)(1,"div",5,0),F(3,WWe,4,3,"button",6),r()(),l(4,"div",7)(5,"mat-card"),X(6),l(7,"div",8)(8,"div",9,1)(10,"mat-list"),Se(11,QWe,3,2,"mat-list-item",10,Pe),r()(),b(13,"mat-divider",11),l(14,"div",12)(15,"form",13),R("submit",function(){return V(s),q(i.submit())}),l(16,"div",14),Se(17,YWe,4,4,"div",15,Pe),r()()()(),Z(),E(19,KWe,6,4,"div",16),r()(),F(20,XWe,16,15,"ng-template",null,2,ti)(22,ZWe,16,15,"ng-template",null,3,ti)}n&2&&(a(3),g("mifosxHasPermission","UPDATE_PERMISSION"),a(8),we(i.groupings),a(2),g("vertical",!0),a(2),g("formGroup",i.formGroup),a(2),we(i.permissions.permissions),a(2),I(i.isDisabled?-1:19))},dependencies:[ue,co,fe,tt,Ue,Xe,Ze,et,la,Va,$e,Et,ve,fi,Ke,ke,xl,Vo,Ri,he],styles:[".display-permissions[_ngcontent-%COMP%]{padding-top:15px}span[_ngcontent-%COMP%]{font-size:1rem}mat-list-item[_ngcontent-%COMP%]{cursor:pointer}.mat-list-base[_ngcontent-%COMP%] .mat-list-item[_ngcontent-%COMP%] .mat-list-item-content[_ngcontent-%COMP%]{cursor:pointer}.active[_ngcontent-%COMP%]{background-color:#f2f2f2}.grouping-name[_ngcontent-%COMP%]{padding:0 10px}.list-permission[_ngcontent-%COMP%]{padding-left:20px}.permission-selected[_ngcontent-%COMP%]{margin-top:10px;height:40px}.inactive[_ngcontent-%COMP%]{transition:all .2s ease-in-out}.inactive[_ngcontent-%COMP%]:hover{transform:scale(1.1)}"]})}}return e})();var eD=(()=>{class e{constructor(){this.systemService=T(ii)}resolve(){return this.systemService.getMakerCheckerPermissions()}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275prov=Re({token:e,factory:e.\u0275fac})}}return e})();var tD=(()=>{class e{constructor(){this.systemService=T(ii)}resolve(){return this.systemService.getEntityMappings()}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275prov=Re({token:e,factory:e.\u0275fac})}}return e})();var Qx=(()=>{class e{constructor(){this.systemService=T(ii)}resolve(){return this.systemService.getExternalConfiguration("S3")}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275prov=Re({token:e,factory:e.\u0275fac})}}return e})();var Yx=(()=>{class e{constructor(){this.systemService=T(ii)}resolve(){return this.systemService.getExternalConfiguration("SMTP")}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275prov=Re({token:e,factory:e.\u0275fac})}}return e})();var Jx=(()=>{class e{constructor(){this.systemService=T(ii)}resolve(){return this.systemService.getExternalConfiguration("NOTIFICATION")}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275prov=Re({token:e,factory:e.\u0275fac})}}return e})();var Kx=(()=>{class e{constructor(){this.systemService=T(ii)}resolve(){return this.systemService.getExternalConfiguration("SMS")}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275prov=Re({token:e,factory:e.\u0275fac})}}return e})();var Xx=(()=>{class e{constructor(){this.systemService=T(ii)}resolve(t){let n=t.paramMap.get("datatableName");return this.systemService.getDataTable(n)}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275prov=Re({token:e,factory:e.\u0275fac})}}return e})();var iD=(()=>{class e{constructor(){this.systemService=T(ii)}resolve(){return this.systemService.getDataTables()}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275prov=Re({token:e,factory:e.\u0275fac})}}return e})();var eQe=()=>[10,25,50,100];function tQe(e,o){if(e&1){let t=Y();l(0,"button",17),R("click",function(){V(t);let i=w();return q(i.applyChanges())}),c(1),p(2,"translate"),r()}if(e&2){let t=w();g("disabled",!t.existAnyUpdate),a(),v(" ",m(2,2,"labels.buttons.Apply Changes")," ")}}function iQe(e,o){e&1&&(l(0,"th",18),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.Event Type")))}function nQe(e,o){if(e&1&&(l(0,"td",19),c(1),p(2,"translateKey"),r()),e&2){let t=o.$implicit;a(),h(Ot(2,1,t.type,"text"))}}function oQe(e,o){e&1&&(l(0,"th",18),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.Status")))}function aQe(e,o){e&1&&(l(0,"span"),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.Enabled")))}function rQe(e,o){e&1&&(l(0,"span"),c(1),p(2,"translate"),r()),e&2&&(a(),h(m(2,1,"labels.inputs.Disabled")))}function lQe(e,o){if(e&1){let t=Y();l(0,"td",19)(1,"mat-slide-toggle",20),Rc("ngModelChange",function(i){let s=V(t).$implicit;return Bc(s.enabled,i)||(s.enabled=i),q(i)}),R("click",function(){let i=V(t).$implicit,s=w();return q(s.toggleStatus(i))}),l(2,"div",21),E(3,aQe,3,3,"span"),E(4,rQe,3,3,"span"),r()()()}if(e&2){let t=o.$implicit;a(),g("name",Le(t.type)),kc("ngModel",t.enabled),a(),g("className",t.enabled?"enabled":"disabled"),a(),I(t.enabled?3:-1),a(),I(t.enabled?-1:4)}}function sQe(e,o){e&1&&b(0,"tr",22)}function cQe(e,o){e&1&&b(0,"tr",23)}var Zx=(()=>{class e{constructor(){this.route=T(Ie),this.systemService=T(ii),this.externalEventConfigurations={},this.existAnyUpdate=!1,this.displayedColumns=["eventType","status"],this.route.data.subscribe(t=>{this.eventsData=t.events.externalEventConfiguration})}ngOnInit(){this.setEventDatasource()}setEventDatasource(){this.dataSource=new Wt(this.eventsData),this.dataSource.paginator=this.paginator,this.dataSource.sort=this.sort}toggleStatus(t){this.externalEventConfigurations[t.type]=t.enabled,this.existAnyUpdate=!0}applyFilter(t){this.dataSource.filter=t.trim().toLowerCase()}applyChanges(){let t={externalEventConfigurations:this.externalEventConfigurations};this.systemService.putExternalEventConfiguration(t).subscribe(()=>{this.existAnyUpdate=!1})}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275cmp=me({type:e,selectors:[["mifosx-manage-external-events"]],viewQuery:function(n,i){if(n&1&&(Ee(kt,7),Ee(It,7)),n&2){let s;Te(s=Me())&&(i.paginator=s.first),Te(s=Me())&&(i.sort=s.first)}},decls:22,vars:9,consts:[["filter",""],["eventsTable",""],[1,"container"],[1,"layout-row"],[1,"flex-fill"],["matInput","",3,"keyup"],[1,"action-button","gap-25px"],["mat-raised-button","","color","primary",3,"disabled","click",4,"mifosxHasPermission"],[1,"mat-elevation-z8","table-container"],["mat-table","","matSort","",3,"dataSource"],["matColumnDef","eventType"],["mat-header-cell","","mat-sort-header","",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","status"],["mat-header-row","",4,"matHeaderRowDef"],["mat-row","","class","select-row",4,"matRowDef","matRowDefColumns"],["showFirstLastButtons","",3,"pageSizeOptions"],["mat-raised-button","","color","primary",3,"click","disabled"],["mat-header-cell","","mat-sort-header",""],["mat-cell",""],[3,"ngModelChange","click","ngModel","name"],[3,"className"],["mat-header-row",""],["mat-row","",1,"select-row"]],template:function(n,i){if(n&1){let s=Y();l(0,"div",2)(1,"div",3,0)(3,"mat-form-field",4)(4,"mat-label"),c(5),p(6,"translate"),r(),l(7,"input",5),R("keyup",function(u){return V(s),q(i.applyFilter(u.target.value))}),r()(),l(8,"div",6),F(9,tQe,3,4,"button",7),r()(),l(10,"div",8,1)(12,"table",9),X(13,10),F(14,iQe,3,3,"th",11)(15,nQe,3,4,"td",12),Z(),X(16,13),F(17,oQe,3,3,"th",11)(18,lQe,5,6,"td",12),Z(),F(19,sQe,1,0,"tr",14)(20,cQe,1,0,"tr",15),r(),b(21,"mat-paginator",16),r()()}n&2&&(a(5),h(m(6,6,"labels.inputs.Filter")),a(4),g("mifosxHasPermission","UPDATE_EXTERNAL_EVENT_CONFIGURATION"),a(3),g("dataSource",i.dataSource),a(7),g("matHeaderRowDef",i.displayedColumns),a(),g("matRowDefColumns",i.displayedColumns),a(),g("pageSizeOptions",oe(8,eQe)))},dependencies:[ue,fe,Ue,Fe,Be,ze,ve,Ke,_t,It,xt,vt,bt,ri,Ct,yt,Ip,ec,Sp,St,Pt,wt,Tt,kt,he,Fi],styles:[".container[_ngcontent-%COMP%] .action-button[_ngcontent-%COMP%]{margin-left:auto}.table-container[_ngcontent-%COMP%]{padding-bottom:10px}"]})}}return e})();var MN=(()=>{class e{constructor(){this.systemService=T(ii)}resolve(t){return this.systemService.getExternalEventConfiguration()}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275prov=Re({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();var eb=(()=>{class e{constructor(){this.systemService=T(ii)}resolve(){return this.systemService.getHooksTemplate()}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275prov=Re({token:e,factory:e.\u0275fac})}}return e})();var nD=(()=>{class e{constructor(){this.systemService=T(ii)}resolve(){return this.systemService.getHooks()}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275prov=Re({token:e,factory:e.\u0275fac})}}return e})();var tb=(()=>{class e{constructor(){this.systemService=T(ii)}resolve(t){let n=t.paramMap.get("id");return this.systemService.getHook(n)}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275prov=Re({token:e,factory:e.\u0275fac})}}return e})();function pQe(e,o){e&1&&(l(0,"th",10),c(1),p(2,"translate"),p(3,"translate"),r()),e&2&&(a(),le(" ",m(2,2,"labels.inputs.Parameter")," ",m(3,4,"labels.inputs.Name")," "))}function mQe(e,o){if(e&1){let t=Y();l(0,"td",11)(1,"mat-form-field")(2,"input",12),p(3,"translate"),p(4,"translate"),Rc("ngModelChange",function(i){let s=V(t).$implicit;return Bc(s.parameterName,i)||(s.parameterName=i),q(i)}),r()()()}if(e&2){let t=o.$implicit;a(2),g("placeholder",m(3,2,"labels.inputs.Parameter")+" "+m(4,4,"labels.inputs.Name")),kc("ngModel",t.parameterName)}}function dQe(e,o){e&1&&(l(0,"th",10),c(1),p(2,"translate"),p(3,"translate"),r()),e&2&&(a(),le(" ",m(2,2,"labels.inputs.Parameter")," ",m(3,4,"labels.inputs.Value")," "))}function uQe(e,o){if(e&1){let t=Y();l(0,"td",11)(1,"mat-form-field")(2,"input",12),p(3,"translate"),p(4,"translate"),Rc("ngModelChange",function(i){let s=V(t).$implicit;return Bc(s.parameterValue,i)||(s.parameterValue=i),q(i)}),r()()()}if(e&2){let t=o.$implicit;a(2),g("placeholder",m(3,2,"labels.inputs.Parameter")+" "+m(4,4,"labels.inputs.Value")),kc("ngModel",t.parameterValue)}}function fQe(e,o){e&1&&b(0,"th",10)}function hQe(e,o){if(e&1){let t=Y();l(0,"td",11)(1,"button",13),p(2,"translate"),R("click",function(){let i=V(t).index,s=w();return q(s.deleteParameter(i))}),b(3,"fa-icon",14),r()()}e&2&&(a(),g("matTooltip",m(2,1,"labels.buttons.Delete")))}function gQe(e,o){e&1&&b(0,"tr",15)}function _Qe(e,o){e&1&&b(0,"tr",16)}var r1=(()=>{class e{constructor(){this.retrieveJob=new bi,this.columnsToDisplay=["parameterName","parameterValue","actions"]}ngOnInit(){this.updatedJobParameters=this.jobParameters,this.updatedJobParameters.push({parameterName:"",parameterValue:""})}addParameter(){this.updatedJobParameters=[...this.updatedJobParameters,{parameterName:"",parameterValue:""}]}deleteParameter(t){let n=0,i=[];for(;n({show:0}),vQe=e=>({green:e});function xQe(e,o){if(e&1){let t=Y();l(0,"div")(1,"mifosx-custom-parameters-table",6),R("retrieveData",function(i){V(t);let s=w();return q(s.runSelectedJobs(i))}),r()()}if(e&2){let t=o.$implicit;a(),g("displayName",t.displayName)("jobId",t.jobId)("jobParameters",t.jobParameters)}}function bQe(e,o){if(e&1&&(l(0,"mat-list-item",2),c(1),r()),e&2){let t=o.$implicit;g("ngClass",Nt(2,vQe,t.status)),a(),v(" ",t.message," ")}}var ib=(()=>{class e{constructor(){this.systemService=T(ii),this.data=T(Po),this.selectedJobs=[],this.messages=[]}ngOnInit(){this.selectedJobs=this.data.selectedJobs.selected.map(t=>qt(at({},t),{jobParameters:[]}))}runSelectedJobs(){this.messages=[];let t=[];this.tableComponents.forEach(n=>{t.push(n.getTableData())}),t.forEach(n=>{this.systemService.runSelectedJobWithParameters(n.jobId,{jobParameters:n.jobParameters}).then(i=>{this.messages.push({message:`${n.displayName}: ${i.statusText} (${i.status})`,status:i.ok})})})}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275cmp=me({type:e,selectors:[["mifosx-custom-parameters-popover"]],viewQuery:function(n,i){if(n&1&&Ee(r1,5),n&2){let s;Te(s=Me())&&(i.tableComponents=s)}},decls:18,vars:11,consts:[["mat-dialog-title",""],[1,"jobs-container"],[1,"message",3,"ngClass"],["mat-raised-button","","color","primary",3,"click"],["icon","play",1,"m-r-10"],["mat-raised-button","","color","warn",3,"mat-dialog-close"],[3,"retrieveData","displayName","jobId","jobParameters"]],template:function(n,i){n&1&&(l(0,"h1",0),c(1),p(2,"translate"),r(),l(3,"mat-dialog-content")(4,"div",1),Se(5,xQe,2,3,"div",null,Pe),r()(),l(7,"mat-list"),Se(8,bQe,2,4,"mat-list-item",2,Pe),r(),l(10,"mat-dialog-actions")(11,"button",3),R("click",function(){return i.runSelectedJobs()}),b(12,"fa-icon",4),c(13),p(14,"translate"),r(),l(15,"button",5),c(16),p(17,"translate"),r()()),n&2&&(a(),h(m(2,4,"labels.buttons.Edit Job Custom Parameters")),a(4),we(i.selectedJobs),a(3),we(i.messages),a(5),v(" ",m(14,6,"labels.buttons.Run Selected Jobs")," "),a(2),g("mat-dialog-close",oe(10,CQe)),a(),v(" ",m(17,8,"labels.buttons.Close Custom Parameters")," "))},dependencies:[ue,co,fe,ve,Wn,ho,r1,xl,Vo,Nn,ke,Un,he],styles:[".message[_ngcontent-%COMP%]{height:auto;font-weight:500;color:#f44366}.message.green[_ngcontent-%COMP%]{color:#32cd32}"]})}}return e})();function yQe(e,o){if(e&1){let t=Y();l(0,"button",11),R("click",function(){V(t);let i=w();return q(i.show=!i.show)}),c(1),r()}if(e&2){let t=w();a(),v(" ",t.buttonLabel()," ")}}var nb=(()=>{class e{constructor(){this.data=T(Po),this.translateService=T(yi),this.show=!1}ngOnInit(){this.job=this.data.job}buttonLabel(){let t=this.show?this.translateService.instant("labels.buttons.Show less"):this.translateService.instant("labels.buttons.Show more");return this.translateService.instant("labels.buttons."+t)}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275cmp=me({type:e,selectors:[["mifosx-error-log-popover"]],decls:32,vars:25,consts:[["content",""],["mat-dialog-title",""],[1,"m-r-10"],[1,"m-b-5"],[1,"m-b-20"],[1,"header"],["colspan","4",1,"message"],[1,"note-field"],["mat-flat-button","",1,"show-button"],["align","center"],["mat-raised-button","","mat-dialog-close",""],["mat-flat-button","",1,"show-button",3,"click"]],template:function(n,i){if(n&1&&(l(0,"h2",1)(1,"span",2),c(2),p(3,"translate"),r(),c(4),r(),l(5,"mat-dialog-content")(6,"table",3)(7,"tbody")(8,"tr",4)(9,"td",5),c(10),p(11,"translate"),r(),l(12,"td"),c(13),p(14,"datetimeFormat"),r(),l(15,"td",5),c(16),p(17,"translate"),r(),l(18,"td"),c(19),p(20,"datetimeFormat"),r()(),l(21,"tr")(22,"td",6)(23,"div",7,0)(25,"span"),c(26),r()(),E(27,yQe,2,1,"button",8),r()()()()(),l(28,"mat-dialog-actions",9)(29,"button",10),c(30),p(31,"translate"),r()()),n&2){let s=xe(24);a(2),v("",m(3,13,"labels.inputs.Job Name"),":"),a(2),v("",i.job.displayName,` diff --git a/browser/recurring-deposits.module-DLE633A7.js b/browser/recurring-deposits.module-ORDTWEA6.js similarity index 99% rename from browser/recurring-deposits.module-DLE633A7.js rename to browser/recurring-deposits.module-ORDTWEA6.js index c13122704..3224d4945 100644 --- a/browser/recurring-deposits.module-DLE633A7.js +++ b/browser/recurring-deposits.module-ORDTWEA6.js @@ -1 +1 @@ -import{a as Tn,b as Sn}from"./chunk-YJQVOBFM.js";import{a as si}from"./chunk-SJ6K46JC.js";import{$d as ce,$f as ni,Ad as Kn,Bc as Vn,Bd as et,Bg as ci,Cc as qn,Cd as gt,Cf as Jn,Da as v,Db as Ge,Dc as Xt,Df as Xn,Ea as P,Eb as Se,Ec as Gn,Ef as Zn,Fb as I,Fc as Hn,Fd as ht,G as At,Ga as y,Gc as Un,Gd as nt,H as Ne,Hc as $n,Hd as Lt,Ia as T,Id as Ct,Ja as f,Jd as yt,Jg as Ee,K as _,Kg as pi,L as S,Lc as Ie,Ld as Ot,M,Mc as w,Na as Pt,Nd as oe,Oa as Tt,Ob as Jt,Od as xt,Pa as St,Pd as Dt,Qa as E,Qd as bt,Qe as Qn,Rb as Fn,Rc as X,Rd as He,Sc as $,Sd as It,T as Yt,Td as Rt,Ua as o,Ud as re,Uf as ti,Va as m,Wa as u,Wc as mt,Xa as A,Xc as q,Xd as _t,Ya as ae,Yc as Z,Zb as Me,Zc as ot,Ze as We,Zf as ei,_ as En,_b as Ae,_d as Ce,_e as Yn,_f as Wt,ac as ee,ad as tt,ag as Xe,bb as Mt,bc as ne,bf as Ke,bg as ii,ca as n,cc as ye,cd as rt,cf as Qe,da as Ve,dd as Re,de as Ue,df as Ye,eb as K,ed as zn,ef as Je,fb as ge,fd as ct,ff as Zt,fg as pe,ge as $e,gf as jt,hb as r,hc as N,he as ze,hf as wt,ib as c,ic as kn,id as pt,ie as Le,if as Et,ja as O,jb as B,jf as Bt,ka as qe,kc as W,lb as U,lc as Q,ld as dt,lf as Ft,mc as Nn,mf as kt,na as h,nc as Pn,ne as je,of as Nt,pa as De,pb as Bn,pd as st,pf as Vt,pg as ai,qb as be,qc as Oe,qg as Ze,ra as x,rc as V,rd as R,rf as qt,rg as we,sa as D,sb as ve,sd as Y,sf as Gt,ta as z,tb as Pe,td as Ln,ua as L,ud as jn,uf as Ht,ug as oi,va as j,vd as ut,wa as d,xa as a,xd as ft,xf as _e,ya as i,yd as Wn,za as C,zb as Te,zg as ri}from"./chunk-OX7PN44D.js";import{a as F,b as J}from"./chunk-PHUH23IY.js";var k=(()=>{class t{constructor(){this.http=_(Fn)}getRecurringDepositsAccountData(e){let l=new Jt().set("associations","all");return this.http.get(`/recurringdepositaccounts/${e}`,{params:l})}getStandingInstructions(e,l,p,g,b){let G=new Jt().set("clientId",e).set("clientName",l).set("fromAccountId",p).set("fromAccountType","2").set("locale",g).set("dateFormat",b);return this.http.get("/standinginstructions",{params:G})}getRecurringDepositsAccountTemplate(e,l){let p=new Jt().set("clientId",e);return p=l?p.set("productId",l):p,this.http.get("/recurringdepositaccounts/template",{params:p})}createRecurringDepositAccount(e){return this.http.post("/recurringdepositaccounts",e)}executeRecurringDepositsAccountCommand(e,l,p){let g=new Jt().set("command",l);return l==="deposit"||l==="withdrawal"?this.http.post(`/recurringdepositaccounts/${e}/transactions`,p,{params:g}):this.http.post(`/recurringdepositaccounts/${e}`,p,{params:g})}deleteRecurringDepositsAccount(e){return this.http.delete(`/recurringdepositaccounts/${e}`)}getRecurringDepositsAccountAndTemplate(e){let l=new Jt().set("associations","charges").set("template","true");return this.http.get(`/recurringdepositaccounts/${e}`,{params:l})}updateRecurringDepositAccount(e,l){return this.http.put(`/recurringdepositaccounts/${e}`,l)}getRecurringDepositAccountActionResource(e,l){let p=new Jt().set("command",l);return this.http.get(`/recurringdepositaccounts/${e}/template`,{params:p})}getRecurringDepositAccountTransactionTemplateResource(e,l){let p=new Jt().set("command",l);return this.http.get(`/recurringdepositaccounts/${e}/transactions/template`,{params:p})}getRecurringDepositsAccountTransaction(e,l){return this.http.get(`/recurringdepositaccounts/${e}/transactions/${l}`)}getRecurringDepositsAccountTransactionTemplate(e,l){let p=new Jt().set("template","true");return this.http.get(`/recurringdepositaccounts/${e}/transactions/${l}`,{params:p})}executeRecurringDepositsAccountTransactionsCommand(e,l,p,g){let b=new Jt().set("command",l);return this.http.post(`/recurringdepositaccounts/${e}/transactions/${g}`,p,{params:b})}static{this.\u0275fac=function(l){return new(l||t)}}static{this.\u0275prov=At({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();var tn=class{constructor(s){this.setOptions(s),this.setButtons(s)}get singleButtons(){return this.buttonsArray}get options(){return this.optionArray}setButtons(s){switch(s){case"Active":this.buttonsArray=[{name:"Deposit",icon:"fa fa-arrow-up",taskPermissionName:"DEPOSIT_RECURRINGDEPOSITACCOUNT"},{name:"Withdrawal",icon:"fa fa-arrow-down",taskPermissionName:"WITHDRAWAL_RECURRINGDEPOSITACCOUNT"},{name:"Premature Close",icon:"fa fa-arrow-left",taskPermissionName:"PREMATURECLOSE_RECURRINGDEPOSITACCOUNT"},{name:"Calculate Interest",icon:"fa fa-calculator",taskPermissionName:"CALCULATEINTEREST_RECURRINGDEPOSITACCOUNT"},{name:"Undo Activation",icon:"fa fa-undo",taskPermissionName:"UNDO_ACTIVATE_RECURRINGDEPOSITACCOUNT"}];break;case"Submitted and pending approval":this.buttonsArray=[{name:"Modify Application",icon:"fa fa-edit",taskPermissionName:"UPDATE_RECURRINGDEPOSITACCOUNT"},{name:"Approve",icon:"fa fa-check",taskPermissionName:"APPROVE_RECURRINGDEPOSITACCOUNT"}];break;case"Approved":this.buttonsArray=[{name:"Undo Approval",icon:"fa fa-undo",taskPermissionName:"APPROVALUNDO_RECURRINGDEPOSITACCOUNT"},{name:"Activate",icon:"fa fa-check",taskPermissionName:"ACTIVATE_RECURRINGDEPOSITACCOUNT"}];break;case"Matured":this.buttonsArray=[{name:"Close",icon:"fa fa-arrow-right",taskPermissionName:"CLOSE_RECURRINGDEPOSITACCOUNT"},{name:"Calculate Interest",icon:"fa fa-calculator",taskPermissionName:"CALCULATEINTEREST_RECURRINGDEPOSITACCOUNT"},{name:"Post Interest",icon:"fa fa-money",taskPermissionName:"POSTINTEREST_RECURRINGDEPOSITACCOUNT"}];break;default:this.buttonsArray=[]}}setOptions(s){switch(s){case"Active":this.optionArray=[{name:"Post Interest",icon:"table",taskPermissionName:"POSTINTEREST_RECURRINGDEPOSITACCOUNT"},{name:"Add Charge",icon:"plus",taskPermissionName:"POSTINTEREST_RECURRINGDEPOSITACCOUNT"}];break;case"Submitted and pending approval":this.optionArray=[{name:"Reject",icon:"ban",taskPermissionName:"REJECT_RECURRINGDEPOSITACCOUNT"},{name:"Withdrawn by Client",icon:"arrow-down",taskPermissionName:"WITHDRAW_RECURRINGDEPOSITACCOUNT"},{name:"Add Charge",icon:"plus",taskPermissionName:"ADDCHARGE_RECURRINGDEPOSITACCOUNT"},{name:"Delete",icon:"trash",taskPermissionName:"DELETE_RECURRINGDEPOSITACCOUNT"}];break;case"Matured":this.optionArray=[{name:"Add Charge",icon:"plus",taskPermissionName:"ADDCHARGE_RECURRINGDEPOSITACCOUNT"}];break;case"Approved":default:this.optionArray=[]}}addOption(s){this.optionArray.push(s)}addButton(s){this.buttonsArray.push(s)}};var di=()=>({confirm:!0}),Kt=(()=>{class t{constructor(){this.dialogRef=_(Vn),this.data=_(qn)}static{this.\u0275fac=function(l){return new(l||t)}}static{this.\u0275cmp=O({type:t,selectors:[["mifosx-recurring-deposit-confirmation-action"]],decls:12,vars:10,consts:[["mat-dialog-title",""],["mat-dialog-content",""],["align","end"],["mat-raised-button","","mat-dialog-close",""],["mat-raised-button","","color","warn",3,"mat-dialog-close"]],template:function(l,p){l&1&&(a(0,"h1",0),o(1),i(),a(2,"div",1)(3,"p"),o(4),i()(),a(5,"mat-dialog-actions",2)(6,"button",3),o(7),r(8,"translate"),i(),a(9,"button",4),o(10),r(11,"translate"),i()()),l&2&&(n(),m(p.data.heading),n(3),m(p.data.dialogContext),n(3),m(c(8,5,"labels.buttons.Cancel")),n(2),d("mat-dialog-close",K(9,di)),n(),u(" ",c(11,7,"labels.buttons.Confirm")," "))},dependencies:[I,R,V,Hn,Un,$n,Gn,w],encapsulation:2})}}return t})();var ui=()=>["./general"],gi=()=>["./interest-rate-chart"],Ci=()=>["./charges"],_i=()=>["./transactions"],fi=()=>["./standing-instructions-tab"],hi=t=>["./datatables",t];function xi(t,s){if(t&1&&(a(0,"span",20),C(1,"mifosx-account-number",18),i()),t&2){let e=f();n(),d("accountNo",Mt(e.recurringDepositsAccountData.clientAccountNo))}}function Di(t,s){if(t&1&&(a(0,"div",21)(1,"h3"),o(2),r(3,"translate"),i(),a(4,"table",19)(5,"tbody")(6,"tr")(7,"td"),o(8),r(9,"translate"),i(),a(10,"td",30),o(11),r(12,"currency"),i()(),a(13,"tr")(14,"td"),o(15),r(16,"translate"),i(),a(17,"td",30),o(18),r(19,"currency"),i()(),a(20,"tr")(21,"td"),o(22),r(23,"translate"),i(),a(24,"td",30),o(25),r(26,"number"),i()()()()()),t&2){let e=f();n(2),m(c(3,7,"labels.heading.Account Overview")),n(6),m(c(9,9,"labels.inputs.Current Balance")),n(3),u(" ",U(12,11,e.recurringDepositsAccountData.summary.accountBalance,e.currency.code,"symbol-narrow","1.2-2")," "),n(4),m(c(16,16,"labels.inputs.Deposit Amount")),n(3),u(" ",U(19,18,e.recurringDepositsAccountData.depositAmount,e.currency.code,"symbol-narrow","1.2-2")," "),n(4),m(c(23,23,"labels.inputs.Deposit Period")),n(3),m(c(26,25,e.recurringDepositsAccountData.depositPeriod))}}function bi(t,s){if(t&1){let e=y();a(0,"button",32),T("click",function(){S(e);let p=f().$implicit,g=f();return M(g.doAction(p.name))}),C(1,"i",33),o(2),r(3,"translate"),i()}if(t&2){let e=f().$implicit;n(),d("ngClass",Mt(e.icon)),n(),u(" ",c(3,3,"labels.menus."+e.name)," ")}}function vi(t,s){if(t&1&&h(0,bi,4,5,"button",31),t&2){let e=s.$implicit;d("mifosxHasPermission",e.taskPermissionName)}}function Pi(t,s){if(t&1){let e=y();a(0,"button",32),T("click",function(){S(e);let p=f().$implicit,g=f(2);return M(g.doAction(p.name))}),o(1),r(2,"translate"),i()}if(t&2){let e=f().$implicit;n(),u(" ",c(2,1,"labels.menus."+e.name)," ")}}function Ti(t,s){if(t&1&&(a(0,"span"),h(1,Pi,3,3,"button",31),i()),t&2){let e=s.$implicit;n(),d("mifosxHasPermission",e.taskPermissionName)}}function Si(t,s){if(t&1&&(a(0,"button",34),o(1),r(2,"translate"),i(),a(3,"mat-menu",null,5),L(5,Ti,2,1,"span",null,z),i()),t&2){let e=E(4),l=f();d("matMenuTriggerFor",e),n(),m(c(2,2,"labels.menus.More")),n(4),j(l.buttonConfig.options)}}function Mi(t,s){if(t&1&&(a(0,"a",29,6),o(2),r(3,"translate"),i()),t&2){let e=E(1);d("routerLink",K(5,_i))("active",e.isActive),n(2),u(" ",c(3,3,"labels.inputs.Transactions")," ")}}function Ai(t,s){if(t&1&&(a(0,"a",29,7),o(2),r(3,"translate"),i()),t&2){let e=E(1);d("routerLink",K(5,fi))("active",e.isActive),n(2),u(" ",c(3,3,"labels.inputs.Standing Instructions")," ")}}function yi(t,s){if(t&1&&(a(0,"a",29,8),o(2),i()),t&2){let e=E(1),l=f().$implicit;d("routerLink",ge(3,hi,l.registeredTableName))("active",e.isActive),n(2),u(" ",l.registeredTableName," ")}}function Oi(t,s){if(t&1&&h(0,yi,3,5,"a",35),t&2){let e=s.$implicit;d("mifosxHasPermission","READ_"+e.registeredTableName)}}var en=(()=>{class t{constructor(){this.route=_(N),this.router=_(W),this.recurringDepositsService=_(k),this.savingsService=_(pe),this.dialog=_(Xt),this.translateService=_(Ie),this.showTransactions=!1,this.route.data.subscribe(e=>{this.recurringDepositsAccountData=e.recurringDepositsAccountData,this.charges=this.recurringDepositsAccountData.charges,this.savingsDatatables=e.savingsDatatables,this.currency=this.recurringDepositsAccountData.currency,this.isprematureAllowed=e.recurringDepositsAccountData.maturityDate!=null,this.router.url.includes("clients")?this.entityType="Client":this.router.url.includes("groups")?this.entityType="Group":this.router.url.includes("centers")&&(this.entityType="Center");let l=e.recurringDepositsAccountData.status;this.showTransactions=l.id>=300})}ngOnInit(){this.setConditionalButtons()}setConditionalButtons(){let e=this.recurringDepositsAccountData.status.value;this.buttonConfig=new tn(e),this.recurringDepositsAccountData.clientId&&this.recurringDepositsAccountData.status.value==="Matured"&&this.buttonConfig.addOption({name:"Transfer Funds",taskPermissionName:"CREATE_ACCOUNTTRANSFER"}),this.recurringDepositsAccountData.charges&&this.recurringDepositsAccountData.status.value==="Matured"&&this.charges.forEach(l=>{l.name==="Annual fee - INR"&&this.buttonConfig.addOption({name:"Apply Annual Fees",taskPermissionName:"APPLYANNUALFEE_SAVINGSACCOUNT"})}),this.recurringDepositsAccountData.clientId&&this.recurringDepositsAccountData.status.value==="Active"&&(this.recurringDepositsAccountData.allowWithdrawal===!0&&this.buttonConfig.addOption({name:"Withdrawal",taskPermissionName:"WITHDRAW_RECURRINGDEPOSITACCOUNT"}),this.recurringDepositsAccountData.charges&&this.charges.forEach(l=>{l.name==="Annual fee - INR"&&this.buttonConfig.addOption({name:"Apply Annual Fees",taskPermissionName:"APPLYANNUALFEE_SAVINGSACCOUNT"})}),this.isprematureAllowed||this.buttonConfig.addButton({name:"Close",icon:"arrow-right",taskPermissionName:"CLOSE_RECURRINGDEPOSITACCOUNT"}),this.recurringDepositsAccountData.taxGroup&&(this.recurringDepositsAccountData.withHoldTax?this.buttonConfig.addOption({name:"Disable Withhold Tax",taskPermissionName:"UPDATEWITHHOLDTAX_SAVINGSACCOUNT"}):this.buttonConfig.addOption({name:"Enable Withhold Tax",taskPermissionName:"UPDATEWITHHOLDTAX_SAVINGSACCOUNT"})))}reload(){let e=this.recurringDepositsAccountData.clientId,l=this.router.url;this.router.navigateByUrl(`/clients/${e}/recurring-deposits-accounts`,{skipLocationChange:!0}).then(()=>this.router.navigate([l]))}doAction(e){switch(e){case"Activate":case"Undo Activation":case"Approve":case"Reject":case"Undo Approval":case"Add Charge":case"Withdrawn by Client":case"Premature Close":case"Close":case"Deposit":case"Withdrawal":this.router.navigate([`actions/${e}`],{relativeTo:this.route});break;case"Modify Application":this.router.navigate(["edit-recurring-deposit-account"],{relativeTo:this.route});break;case"Delete":this.deleteRecurringDepositsAccount();break;case"Calculate Interest":this.calculateInterest();break;case"Post Interest":this.postInterest();break;case"Enable Withhold Tax":this.enableWithHoldTax();break;case"Disable Withhold Tax":this.disableWithHoldTax();break}}deleteRecurringDepositsAccount(){this.dialog.open(ce,{data:{deleteContext:`Recurring deposit account with id: ${this.recurringDepositsAccountData.id}`}}).afterClosed().subscribe(l=>{l.delete&&this.recurringDepositsService.deleteRecurringDepositsAccount(this.recurringDepositsAccountData.id).subscribe(()=>{this.router.navigate(["../../"],{relativeTo:this.route})})})}calculateInterest(){this.dialog.open(Kt,{data:{heading:this.translateService.instant("labels.heading.Calculate Interest"),dialogContext:this.translateService.instant("labels.dialogContext.Are you sure you want to calculate interest ?")}}).afterClosed().subscribe(l=>{l.confirm&&this.recurringDepositsService.executeRecurringDepositsAccountCommand(this.recurringDepositsAccountData.id,"calculateInterest",{}).subscribe(()=>{this.reload()})})}postInterest(){this.dialog.open(Kt,{data:{heading:this.translateService.instant("labels.heading.Post Interest"),dialogContext:this.translateService.instant("labels.text.Are you sure you want to post interest")+" ?"}}).afterClosed().subscribe(l=>{l.confirm&&this.recurringDepositsService.executeRecurringDepositsAccountCommand(this.recurringDepositsAccountData.id,"postInterest",{}).subscribe(()=>{this.reload()})})}enableWithHoldTax(){this.dialog.open(Kt,{data:{heading:this.translateService.instant("labels.heading.Enable Withhold Tax"),dialogContext:this.translateService.instant("labels.dialogContext.Enable withhold tax for this account ?")}}).afterClosed().subscribe(l=>{l.confirm&&this.savingsService.executeSavingsAccountUpdateCommand(this.recurringDepositsAccountData.id,"updateWithHoldTax",{withHoldTax:!0}).subscribe(()=>{this.reload()})})}disableWithHoldTax(){this.dialog.open(Kt,{data:{heading:this.translateService.instant("labels.heading.Disable Withhold Tax"),dialogContext:this.translateService.instant("labels.dialogContext.Disable withhold tax for this account ?")}}).afterClosed().subscribe(l=>{l.confirm&&this.savingsService.executeSavingsAccountUpdateCommand(this.recurringDepositsAccountData.id,"updateWithHoldTax",{withHoldTax:!1}).subscribe(()=>{this.reload()})})}static{this.\u0275fac=function(l){return new(l||t)}}static{this.\u0275cmp=O({type:t,selectors:[["mifosx-recurring-deposits-account-view"]],decls:53,vars:47,consts:[["accountMenu","matMenu"],["general","routerLinkActive"],["IRC","routerLinkActive"],["charges","routerLinkActive"],["tabPanel",""],["More","matMenu"],["transactions","routerLinkActive"],["standingInstructions","routerLinkActive"],["datatable","routerLinkActive"],[1,"account-card"],[1,"header","layout-column"],[1,"header-title-group"],[1,"profile-image-container"],["mat-card-md-image","",1,"profile-image",3,"matTooltip","src"],[1,"mat-typography","account-card-title"],[1,"layout-row","responsive-column"],[1,"flex-60"],[1,"fa","fa-stop",3,"ngClass","matTooltip"],[3,"accountNo"],[1,"account-overview"],[1,"m-l-10"],[1,"flex-30"],[1,"flex-5"],["mat-icon-button","","aria-label","Loan account actions","yPosition","below",3,"matMenuTriggerFor"],["matListIcon","",1,"actions-menu"],["icon","bars","size","sm"],["mat-menu-item",""],[1,"content"],["mat-tab-nav-bar","",1,"navigation-tabs",3,"tabPanel"],["mat-tab-link","","routerLinkActive","",3,"routerLink","active"],[1,"r-amount"],["mat-menu-item","",3,"click",4,"mifosxHasPermission"],["mat-menu-item","",3,"click"],[3,"ngClass"],["mat-menu-item","",3,"matMenuTriggerFor"],["mat-tab-link","","routerLinkActive","",3,"routerLink","active",4,"mifosxHasPermission"]],template:function(l,p){if(l&1&&(a(0,"mat-card",9)(1,"mat-card-header",10)(2,"mat-card-title-group",11)(3,"div",12)(4,"div"),C(5,"img",13),r(6,"translate"),i()(),a(7,"div",14)(8,"mat-card-title")(9,"div",15)(10,"div",16)(11,"h3"),C(12,"i",17),r(13,"statusLookup"),o(14),r(15,"translate"),C(16,"mifosx-account-number",18),i(),a(17,"span",19),o(18),r(19,"translate"),r(20,"translate"),x(21,xi,2,2,"span",20),i()(),x(22,Di,27,27,"div",21),a(23,"div",22)(24,"button",23)(25,"mat-icon",24),C(26,"fa-icon",25),i()()()()()(),a(27,"mat-menu",null,0),L(29,vi,1,1,"button",26,z),x(31,Si,7,4),i()()(),a(32,"mat-card-content",27)(33,"nav",28)(34,"a",29,1),o(36),r(37,"translate"),i(),a(38,"a",29,2),o(40),r(41,"translate"),i(),x(42,Mi,4,6,"a",29),a(43,"a",29,3),o(45),r(46,"translate"),i(),x(47,Ai,4,6,"a",29),L(48,Oi,1,1,"a",29,z),i(),a(50,"mat-tab-nav-panel",null,4),C(52,"router-outlet"),i()()()),l&2){let g=E(28),b=E(35),G=E(39),ue=E(44),ie=E(51);n(5),d("matTooltip",Mt(c(6,28,"tooltips.Recurring Deposits Account")))("src","assets/images/recurring-deposits_account_placeholder.png",En),n(7),d("ngClass",c(13,30,p.recurringDepositsAccountData.status.code))("matTooltip",p.recurringDepositsAccountData.status.value),n(2),A(" ",c(15,32,"labels.inputs.Recurring Deposit")," : ",p.recurringDepositsAccountData.depositProductName," "),n(2),d("accountNo",Mt(p.recurringDepositsAccountData.accountNo)),n(2),ae(" ",c(19,34,"labels.text."+p.entityType)," ",c(20,36,"labels.inputs.name"),": ",p.recurringDepositsAccountData.clientName||p.recurringDepositsAccountData.groupName," "),n(3),D(p.recurringDepositsAccountData.clientAccountNo?21:-1),n(),D(!p.recurringDepositsAccountData.status.rejected&&!p.recurringDepositsAccountData.status.submittedAndPendingApproval?22:-1),n(2),d("matMenuTriggerFor",g),n(5),j(p.buttonConfig.singleButtons),n(2),D(p.buttonConfig.options.length?31:-1),n(2),d("tabPanel",ie),n(),d("routerLink",K(44,ui))("active",b.isActive),n(2),u(" ",c(37,38,"labels.inputs.General")," "),n(2),d("routerLink",K(45,gi))("active",G.isActive),n(2),u(" ",c(41,40,"labels.inputs.Interest Rate Chart")," "),n(2),D(p.showTransactions?42:-1),n(),d("routerLink",K(46,Ci))("active",ue.isActive),n(2),u(" ",c(46,42,"labels.inputs.Charges")," "),n(2),D(p.recurringDepositsAccountData.clientId?47:-1),n(),j(p.savingsDatatables)}},dependencies:[I,be,R,Q,Y,ut,re,Wn,jn,Kn,oe,Ln,ri,Oe,Le,je,_t,ze,$e,Jn,Xn,Nn,Zn,kn,Ge,Se,w,ni],encapsulation:2})}}return t})();function Ii(t,s){t&1&&(a(0,"th",17),o(1),r(2,"translate"),i()),t&2&&(n(),m(c(2,1,"labels.inputs.Period")))}function Ri(t,s){if(t&1&&(a(0,"td",18),o(1),r(2,"translateKey"),i()),t&2){let e=s.$implicit;n(),ae(" ",e.fromPeriod," - ",e.toPeriod,"\xA0",B(2,3,e.periodType.value,"catalogs")," ")}}function wi(t,s){t&1&&(a(0,"th",17),o(1),r(2,"translate"),i()),t&2&&(n(),m(c(2,1,"labels.inputs.Amount Range")))}function Ei(t,s){if(t&1&&(a(0,"td",18),o(1),r(2,"formatNumber"),r(3,"formatNumber"),i()),t&2){let e=s.$implicit;n(),A(" ",c(2,2,e.amountRangeFrom)," - ",c(3,4,e.amountRangeTo)," ")}}function Bi(t,s){t&1&&(a(0,"th",17),o(1),r(2,"translate"),i()),t&2&&(n(),m(c(2,1,"labels.inputs.Interest")))}function Fi(t,s){if(t&1&&(a(0,"td",18),o(1),r(2,"formatNumber"),i()),t&2){let e=s.$implicit;n(),u("",c(2,1,e.annualInterestRate)," %")}}function ki(t,s){t&1&&(a(0,"th",17),o(1),r(2,"translate"),i()),t&2&&(n(),m(c(2,1,"labels.inputs.Description")))}function Ni(t,s){if(t&1&&(a(0,"td",18),o(1),i()),t&2){let e=s.$implicit;n(),m(e.description)}}function Vi(t,s){t&1&&(a(0,"th",17),o(1),r(2,"translate"),i()),t&2&&(n(),m(c(2,1,"labels.inputs.Actions")))}function qi(t,s){t&1&&(a(0,"span"),C(1,"fa-icon",21),o(2),r(3,"translate"),i()),t&2&&(n(2),u(" ",c(3,1,"labels.buttons.View Incentives")," "))}function Gi(t,s){t&1&&(a(0,"span"),C(1,"fa-icon",22),o(2),r(3,"translate"),i()),t&2&&(n(2),u(" ",c(3,1,"labels.buttons.Hide Incentives")," "))}function Hi(t,s){if(t&1){let e=y();a(0,"td",18)(1,"button",19),T("click",function(){let p=S(e).dataIndex,g=f();return M(g.expandChartSlabIndex=g.expandChartSlabIndex===p?null:p)}),h(2,qi,4,3,"span",20)(3,Gi,4,3,"span",20),i()()}if(t&2){let e=s.dataIndex,l=f();n(2),d("ngIf",l.expandChartSlabIndex!==e),n(),d("ngIf",l.expandChartSlabIndex===e)}}function Ui(t,s){t&1&&(a(0,"th",17),o(1),r(2,"translate"),i()),t&2&&(n(),m(c(2,1,"labels.inputs.Entity Type")))}function $i(t,s){if(t&1&&(a(0,"td",18),o(1),i()),t&2){let e=s.$implicit;n(),u(" ",e.entityType.value," ")}}function zi(t,s){t&1&&(a(0,"th",17),o(1),r(2,"translate"),i()),t&2&&(n(),m(c(2,1,"labels.inputs.Attribute Name")))}function Li(t,s){if(t&1&&(a(0,"td",18),o(1),i()),t&2){let e=s.$implicit;n(),u(" ",e.attributeName.value," ")}}function ji(t,s){t&1&&(a(0,"th",17),o(1),r(2,"translate"),i()),t&2&&(n(),m(c(2,1,"labels.inputs.Condition Type")))}function Wi(t,s){if(t&1&&(a(0,"td",18),o(1),r(2,"titlecase"),i()),t&2){let e=s.$implicit;n(),u(" ",c(2,1,e.conditionType.value)," ")}}function Ki(t,s){t&1&&(a(0,"th",17),o(1),r(2,"translate"),i()),t&2&&(n(),m(c(2,1,"labels.inputs.Attribute Value")))}function Qi(t,s){if(t&1&&(a(0,"td",35),o(1),i()),t&2){let e=s.$implicit;d("ngSwitch",e.attributeName),n(),u(" ",e.attributeValueDesc," ")}}function Yi(t,s){t&1&&(a(0,"th",17),o(1),r(2,"translate"),i()),t&2&&(n(),m(c(2,1,"labels.inputs.Incentive Type")))}function Ji(t,s){if(t&1&&(a(0,"td",18),o(1),i()),t&2){let e=s.$implicit;n(),u(" ",e.incentiveType.value," ")}}function Xi(t,s){t&1&&(a(0,"th",17),o(1),r(2,"translate"),i()),t&2&&(n(),m(c(2,1,"labels.inputs.Interest")))}function Zi(t,s){if(t&1&&(a(0,"td",18),o(1),r(2,"formatNumber"),i()),t&2){let e=s.$implicit;n(),u(" ",c(2,1,e.amount)," ")}}function ta(t,s){t&1&&C(0,"tr",36)}function ea(t,s){t&1&&C(0,"tr",37)}function na(t,s){if(t&1&&(a(0,"table",27),v(1,28),h(2,Ui,3,3,"th",7)(3,$i,2,1,"td",8),P(),v(4,29),h(5,zi,3,3,"th",7)(6,Li,2,1,"td",8),P(),v(7,30),h(8,ji,3,3,"th",7)(9,Wi,3,3,"td",8),P(),v(10,31),h(11,Ki,3,3,"th",7)(12,Qi,2,2,"td",32),P(),v(13,33),h(14,Yi,3,3,"th",7)(15,Ji,2,1,"td",8),P(),v(16,34),h(17,Xi,3,3,"th",7)(18,Zi,3,3,"td",8),P(),h(19,ta,1,0,"tr",14)(20,ea,1,0,"tr",15),i()),t&2){let e=f().$implicit,l=f();d("dataSource",e.incentives),n(19),d("matHeaderRowDef",l.incentivesDisplayedColumns),n(),d("matRowDefColumns",l.incentivesDisplayedColumns)}}function ia(t,s){if(t&1&&(a(0,"td",18)(1,"div",23)(2,"mat-card",24)(3,"h4",25),o(4),r(5,"translate"),i(),h(6,na,21,3,"table",26),i()()()),t&2){let e=s.$implicit,l=s.dataIndex,p=f();De("colspan",p.chartSlabsDisplayedColumns.length),n(),d("@expandChartSlab",l===p.expandChartSlabIndex?"expanded":"collapsed"),n(3),u(" ",c(5,4,"labels.heading.Incentives")," "),n(2),d("ngIf",e.incentives==null?null:e.incentives.length)}}function aa(t,s){t&1&&C(0,"tr",36)}function oa(t,s){t&1&&C(0,"tr",37)}function ra(t,s){t&1&&C(0,"tr",38)}var nn=(()=>{class t{constructor(){this.route=_(N),this.interestRateChartData=[],this.chartSlabsDisplayedColumns=["period","amountRange","interest","description","actions"],this.incentivesDisplayedColumns=["entityType","attributeName","conditionType","attributeValue","incentiveType","amount"],this.chartSlabsIncentivesDisplayedColumns=["incentives"],this.route.parent.data.subscribe(e=>{this.interestRateChartData=e.recurringDepositsAccountData.accountChart.chartSlabs})}static{this.\u0275fac=function(l){return new(l||t)}}static{this.\u0275cmp=O({type:t,selectors:[["mifosx-interest-rate-chart-tab"]],decls:29,vars:7,consts:[["chartsTable",""],[1,"tab-container","mat-typography"],[1,"align-start"],[1,"m-b-20"],[1,"mat-elevation-z1","m-b-25"],["mat-table","","multiTemplateDataRows","",3,"dataSource"],["matColumnDef","period"],["mat-header-cell","",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","amountRange"],["matColumnDef","interest"],["matColumnDef","description"],["matColumnDef","actions"],["matColumnDef","incentives"],["mat-header-row","",4,"matHeaderRowDef"],["mat-row","",4,"matRowDef","matRowDefColumns"],["mat-row","","class","incentives-row",4,"matRowDef","matRowDefColumns"],["mat-header-cell",""],["mat-cell",""],["mat-button","","color","primary",3,"click"],[4,"ngIf"],["icon","eye",1,"m-r-10"],["icon","eye-slash",1,"m-r-10"],[1,"layout-row-wrap","flex-fill","incentives"],[1,"layout-row-wrap","flex-fill"],[1,"m-b-10","flex-13"],["class","flex-fill mat-elevation-z1","mat-table","",3,"dataSource",4,"ngIf"],["mat-table","",1,"flex-fill","mat-elevation-z1",3,"dataSource"],["matColumnDef","entityType"],["matColumnDef","attributeName"],["matColumnDef","conditionType"],["matColumnDef","attributeValue"],["mat-cell","",3,"ngSwitch",4,"matCellDef"],["matColumnDef","incentiveType"],["matColumnDef","amount"],["mat-cell","",3,"ngSwitch"],["mat-header-row",""],["mat-row",""],["mat-row","",1,"incentives-row"]],template:function(l,p){l&1&&(a(0,"div",1)(1,"div",2)(2,"div",3)(3,"h3"),o(4),r(5,"translate"),i()()(),a(6,"div",4)(7,"table",5,0),v(9,6),h(10,Ii,3,3,"th",7)(11,Ri,3,6,"td",8),P(),v(12,9),h(13,wi,3,3,"th",7)(14,Ei,4,6,"td",8),P(),v(15,10),h(16,Bi,3,3,"th",7)(17,Fi,3,3,"td",8),P(),v(18,11),h(19,ki,3,3,"th",7)(20,Ni,2,1,"td",8),P(),v(21,12),h(22,Vi,3,3,"th",7)(23,Hi,4,2,"td",8),P(),v(24,13),h(25,ia,7,6,"td",8),P(),h(26,aa,1,0,"tr",14)(27,oa,1,0,"tr",15)(28,ra,1,0,"tr",16),i()()()),l&2&&(n(4),m(c(5,5,"labels.heading.All Interest Rates")),n(3),d("dataSource",p.interestRateChartData),n(19),d("matHeaderRowDef",p.chartSlabsDisplayedColumns),n(),d("matRowDefColumns",p.chartSlabsDisplayedColumns),n(),d("matRowDefColumns",p.chartSlabsIncentivesDisplayedColumns))},dependencies:[I,ve,Pe,R,Y,V,wt,Ft,Bt,kt,Et,Nt,_t,Vt,Gt,qt,Ht,Te,w,Rt,Wt],styles:[".tab-container[_ngcontent-%COMP%]{padding:1%;margin:1%}.tab-container[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{margin:1% auto}.tab-container[_ngcontent-%COMP%] table[_ngcontent-%COMP%]{width:100%}.tab-container[_ngcontent-%COMP%] table[_ngcontent-%COMP%] tr.incentives-row[_ngcontent-%COMP%]{height:0}.tab-container[_ngcontent-%COMP%] table[_ngcontent-%COMP%] tr.incentives-row[_ngcontent-%COMP%] > td[_ngcontent-%COMP%]{padding:0}.tab-container[_ngcontent-%COMP%] table[_ngcontent-%COMP%] tr.incentives-row[_ngcontent-%COMP%] .incentives[_ngcontent-%COMP%]{overflow:hidden}.tab-container[_ngcontent-%COMP%] table[_ngcontent-%COMP%] tr.incentives-row[_ngcontent-%COMP%] .mat-card[_ngcontent-%COMP%]{border-radius:0}"],data:{animation:[Me("expandChartSlab",[ne("collapsed",ee({height:"0px",minHeight:"0"})),ne("expanded",ee({height:"*"})),ye("expanded <=> collapsed",Ae("225ms cubic-bezier(0.4, 0.0, 0.2, 1)"))])]}})}}return t})();var pa=t=>["/","journal-entry","view",t];function sa(t,s){if(t&1){let e=y();a(0,"div",5)(1,"mat-checkbox",23),T("click",function(){S(e);let p=f();return M(p.hideReversed())}),o(2),r(3,"translate"),i(),a(4,"mat-checkbox",23),T("click",function(){S(e);let p=f();return M(p.hideAccruals())}),o(5),r(6,"translate"),i()()}if(t&2){let e=f();n(),d("formControl",e.hideReversedParam),n(),u(" ",c(3,4,"labels.inputs.Hide Reversed")),n(2),d("formControl",e.hideAccrualsParam),n(),u(" ",c(6,6,"labels.inputs.Hide Accruals"))}}function la(t,s){t&1&&(a(0,"th",24),o(1,"#"),i())}function ma(t,s){if(t&1){let e=y();a(0,"td",25),T("click",function(){let p=S(e).$implicit,g=f();return M(g.showTransactions(p))}),o(1),i()}if(t&2){let e=s.index;n(),u(" ",e+1," ")}}function da(t,s){t&1&&(a(0,"th",24),o(1),r(2,"translate"),i()),t&2&&(n(),m(c(2,1,"labels.inputs.ID")))}function ua(t,s){if(t&1){let e=y();a(0,"td",26),T("click",function(){let p=S(e).$implicit,g=f();return M(g.showTransactions(p))}),o(1),i()}if(t&2){let e=s.$implicit,l=f();d("ngClass",l.savingsTransactionColor(e)),n(),u(" ",e.id," ")}}function ga(t,s){t&1&&(a(0,"th",24),o(1),r(2,"translate"),i()),t&2&&(n(),m(c(2,1,"labels.inputs.Transaction Date")))}function Ca(t,s){if(t&1){let e=y();a(0,"td",26),T("click",function(){let p=S(e).$implicit,g=f();return M(g.showTransactions(p))}),o(1),r(2,"dateFormat"),i()}if(t&2){let e=s.$implicit,l=f();d("ngClass",l.savingsTransactionColor(e)),n(),u(" ",c(2,2,e.date)," ")}}function _a(t,s){t&1&&(a(0,"th",24),o(1),r(2,"translate"),i()),t&2&&(n(),m(c(2,1,"labels.inputs.Transaction Type")))}function fa(t,s){if(t&1){let e=y();a(0,"td",26),T("click",function(){let p=S(e).$implicit,g=f();return M(g.showTransactions(p))}),o(1),i()}if(t&2){let e=s.$implicit,l=f();d("ngClass",l.savingsTransactionColor(e)),n(),u(" ",e.transactionType.value," ")}}function ha(t,s){t&1&&(a(0,"th",27),o(1),r(2,"translate"),i()),t&2&&(n(),m(c(2,1,"labels.inputs.Debit")))}function xa(t,s){if(t&1){let e=y();a(0,"td",28),T("click",function(){let p=S(e).$implicit,g=f();return M(g.showTransactions(p))}),o(1),i()}if(t&2){let e=s.$implicit,l=f();d("ngClass",l.savingsTransactionColor(e)),n(),u(" ",l.isDebit(e.transactionType)?e.amount:"N/A"," ")}}function Da(t,s){t&1&&(a(0,"th",27),o(1),r(2,"translate"),i()),t&2&&(n(),m(c(2,1,"labels.inputs.Credit")))}function ba(t,s){if(t&1){let e=y();a(0,"td",28),T("click",function(){let p=S(e).$implicit,g=f();return M(g.showTransactions(p))}),o(1),i()}if(t&2){let e=s.$implicit,l=f();d("ngClass",l.savingsTransactionColor(e)),n(),u(" ",l.isDebit(e.transactionType)?"N/A":e.amount," ")}}function va(t,s){t&1&&(a(0,"th",27),o(1),r(2,"translate"),i()),t&2&&(n(),m(c(2,1,"labels.inputs.Balance")))}function Pa(t,s){if(t&1){let e=y();a(0,"td",28),T("click",function(){let p=S(e).$implicit,g=f();return M(g.showTransactions(p))}),o(1),r(2,"formatNumber"),i()}if(t&2){let e=s.$implicit,l=f();d("ngClass",l.savingsTransactionColor(e)),n(),u(" ",c(2,2,e.runningBalance)," ")}}function Ta(t,s){t&1&&(a(0,"th",24),o(1),r(2,"translate"),i()),t&2&&(n(),m(c(2,1,"labels.inputs.Actions")))}function Sa(t,s){if(t&1){let e=y();a(0,"td",29)(1,"button",30)(2,"mat-icon"),o(3,"more_vert"),i()(),a(4,"mat-menu",null,0)(6,"button",31),T("click",function(){let p=S(e).$implicit,g=f();return M(g.showTransactions(p))}),a(7,"mat-icon"),C(8,"fa-icon",32),i(),a(9,"span"),o(10),r(11,"translate"),i()(),a(12,"button",33),T("click",function(p){S(e);let g=f();return M(g.routeEdit(p))}),a(13,"mat-icon"),C(14,"fa-icon",34),i(),a(15,"span"),o(16),r(17,"translate"),i()()()()}if(t&2){let e=s.$implicit,l=E(5);n(),d("matMenuTriggerFor",l),n(9),m(c(11,4,"labels.text.View Transaction")),n(2),d("routerLink",ge(8,pa,"S"+e.id)),n(4),m(c(17,6,"tooltips.View Journal Entries"))}}function Ma(t,s){t&1&&C(0,"tr",35)}function Aa(t,s){t&1&&C(0,"tr",36)}var an=(()=>{class t{constructor(){this.route=_(N),this.router=_(W),this.displayedColumns=["row","id","transactionDate","transactionType","debit","credit","balance","actions"],this.route.parent.data.subscribe(e=>{this.transactionsData=e.recurringDepositsAccountData.transactions,this.status=e.recurringDepositsAccountData.status.value})}ngOnInit(){this.dataSource=new _e(this.transactionsData),this.hideAccrualsParam=new tt(!1),this.hideReversedParam=new tt(!1)}isDebit(e){return e.withdrawal===!0||e.feeDeduction===!0||e.overdraftInterest===!0||e.withholdTax===!0}hideAccruals(){this.filterTransactions(this.hideReversedParam.value,!this.hideAccrualsParam.value)}hideReversed(){this.filterTransactions(!this.hideReversedParam.value,this.hideAccrualsParam.value)}filterTransactions(e,l){let p=this.transactionsData;(l||e)&&(p=this.transactionsData.filter(g=>!(e&&g.reversed)&&!(l&&g.transactionType.accrual))),this.dataSource=new _e(p),this.dataSource.paginator=this.paginator,this.dataSource.sort=this.sort}savingsTransactionColor(e){return e.reversed?"strike":e.transfer?"transfer":e.transactionType.accrual?"accrual":""}checkStatus(){return this.status==="Active"||this.status==="Closed"||this.status==="Transfer in progress"||this.status==="Transfer on hold"||this.status==="Premature Closed"||this.status==="Matured"}showTransactions(e){e.transfer?this.router.navigate([`../transfer-funds/account-transfers/${e.transfer.id}`],{relativeTo:this.route}):this.router.navigate([e.id],{relativeTo:this.route})}static{this.\u0275fac=function(l){return new(l||t)}}static{this.\u0275cmp=O({type:t,selectors:[["mifosx-transactions-tab"]],viewQuery:function(l,p){if(l&1&&(Pt(Qn,7),Pt(Yn,7)),l&2){let g;Tt(g=St())&&(p.paginator=g.first),Tt(g=St())&&(p.sort=g.first)}},decls:35,vars:7,consts:[["transactionMenu","matMenu"],[1,"tab-container","mat-typography"],[1,"mat-elevation-z1","m-b-25"],[1,"layout-row","align-start"],[1,"m-b-20"],[1,"action-button","m-b-20","layout-row","gap-20px"],["mat-table","",3,"dataSource"],["matColumnDef","row"],["mat-header-cell","",4,"matHeaderCellDef"],["mat-cell","",3,"click",4,"matCellDef"],["matColumnDef","id"],["mat-cell","",3,"ngClass","click",4,"matCellDef"],["matColumnDef","transactionDate"],["matColumnDef","transactionType"],["matColumnDef","debit"],["mat-header-cell","","class","center",4,"matHeaderCellDef"],["mat-cell","","class","r-amount",3,"ngClass","click",4,"matCellDef"],["matColumnDef","credit"],["matColumnDef","balance"],["matColumnDef","actions"],["mat-cell","","class","center",4,"matCellDef"],["mat-header-row","",4,"matHeaderRowDef"],["mat-row","","class","select-row",4,"matRowDef","matRowDefColumns"],[1,"accruals",3,"click","formControl"],["mat-header-cell",""],["mat-cell","",3,"click"],["mat-cell","",3,"click","ngClass"],["mat-header-cell","",1,"center"],["mat-cell","",1,"r-amount",3,"click","ngClass"],["mat-cell","",1,"center"],["mat-icon-button","","aria-label","",1,"action-button",3,"matMenuTriggerFor"],["mat-menu-item","",3,"click"],["icon","eye","size","sm"],["mat-menu-item","",3,"click","routerLink"],["icon","table-cells","size","sm"],["mat-header-row",""],["mat-row","",1,"select-row"]],template:function(l,p){l&1&&(a(0,"div",1)(1,"div",2)(2,"div",3)(3,"div",4)(4,"h3"),o(5),r(6,"translate"),i()(),x(7,sa,7,8,"div",5),i(),a(8,"table",6),v(9,7),h(10,la,2,0,"th",8)(11,ma,2,1,"td",9),P(),v(12,10),h(13,da,3,3,"th",8)(14,ua,2,2,"td",11),P(),v(15,12),h(16,ga,3,3,"th",8)(17,Ca,3,4,"td",11),P(),v(18,13),h(19,_a,3,3,"th",8)(20,fa,2,2,"td",11),P(),v(21,14),h(22,ha,3,3,"th",15)(23,xa,2,2,"td",16),P(),v(24,17),h(25,Da,3,3,"th",15)(26,ba,2,2,"td",16),P(),v(27,18),h(28,va,3,3,"th",15)(29,Pa,3,4,"td",16),P(),v(30,19),h(31,Ta,3,3,"th",8)(32,Sa,18,10,"td",20),P(),h(33,Ma,1,0,"tr",21)(34,Aa,1,0,"tr",22),i()()()),l&2&&(n(5),m(c(6,5,"labels.heading.All Transactions")),n(2),D(p.checkStatus()?7:-1),n(),d("dataSource",p.dataSource),n(25),d("matHeaderRowDef",p.displayedColumns),n(),d("matRowDefColumns",p.displayedColumns))},dependencies:[I,be,R,Z,zn,Q,He,wt,Ft,Bt,kt,Et,Nt,Oe,Le,je,ze,$e,_t,Vt,Gt,qt,Ht,It,w,Wt],styles:["body[_ngcontent-%COMP%] table[_ngcontent-%COMP%] tbody[_ngcontent-%COMP%] tr[_ngcontent-%COMP%]:nth-child(2n){background-color:#f2f2f2}.bg-black[_ngcontent-%COMP%]{background-color:#000}.bg-light-grey[_ngcontent-%COMP%]{background-color:#e5e5e5}.bg-medium-grey[_ngcontent-%COMP%]{background-color:#ccc}.bg-grey[_ngcontent-%COMP%]{background-color:#999}.bg-dark-grey[_ngcontent-%COMP%]{background-color:#222}.bg-white[_ngcontent-%COMP%], .bg-fff[_ngcontent-%COMP%]{background-color:#fff}.bg-none[_ngcontent-%COMP%], .no-bg[_ngcontent-%COMP%]{background:none;background-image:none;background-color:transparent}.bg-facebook[_ngcontent-%COMP%]{background-color:#47639e}.bg-twitter[_ngcontent-%COMP%]{background-color:#02a8f3}body[_ngcontent-%COMP%] table[_ngcontent-%COMP%]{border:1px solid rgba(0,0,0,.12)}.no-border[_ngcontent-%COMP%]{border:none}.no-border-t[_ngcontent-%COMP%]{border-top:none}.no-border-r[_ngcontent-%COMP%]{border-right:none}.no-border-b[_ngcontent-%COMP%]{border-bottom:none}.no-border-l[_ngcontent-%COMP%]{border-left:none}.no-border-lr[_ngcontent-%COMP%], .no-border-rl[_ngcontent-%COMP%]{border-left:none;border-right:none}.no-border-tb[_ngcontent-%COMP%], .no-border-bt[_ngcontent-%COMP%]{border-top:none;border-bottom:none}.no-border-tl[_ngcontent-%COMP%], .no-border-lt[_ngcontent-%COMP%]{border-top:none;border-left:none}.no-border-tr[_ngcontent-%COMP%], .no-border-rt[_ngcontent-%COMP%]{border-top:none;border-right:none}.no-border-bl[_ngcontent-%COMP%], .no-border-lb[_ngcontent-%COMP%]{border-bottom:none;border-left:none}.no-border-br[_ngcontent-%COMP%], .no-border-rb[_ngcontent-%COMP%]{border-bottom:none;border-right:none}.border-dashed[_ngcontent-%COMP%], .border-dotted[_ngcontent-%COMP%]{border-style:dashed}.border-black[_ngcontent-%COMP%]{border-color:#000}.border-light-grey[_ngcontent-%COMP%]{border-color:#e5e5e5}.border-medium-grey[_ngcontent-%COMP%]{border-color:#ccc}.border-grey[_ngcontent-%COMP%]{border-color:#999}.border-dark-grey[_ngcontent-%COMP%]{border-color:#2222}.border-white[_ngcontent-%COMP%], .border-fff[_ngcontent-%COMP%]{border-color:#fff}.no-border-radius[_ngcontent-%COMP%]{border-radius:0}.radius3[_ngcontent-%COMP%]{border-radius:3px}.radius5[_ngcontent-%COMP%]{border-radius:5px}.radius10[_ngcontent-%COMP%]{border-radius:10px}.column-mandatory[_ngcontent-%COMP%]{color:#5cb85c;text-align:center}.not-column-mandatory[_ngcontent-%COMP%]{color:#666f73;text-align:center}.cdk-drag-placeholder[_ngcontent-%COMP%]{background:#3498db}.yes[_ngcontent-%COMP%]{color:#5cb85c!important;background-color:#5cb85c;height:4px;cursor:none}.no[_ngcontent-%COMP%]{color:red;background-color:red;height:4px;cursor:none}.strike[_ngcontent-%COMP%]{text-decoration:line-through;color:red}.transfer[_ngcontent-%COMP%]{color:#16a085}.linked[_ngcontent-%COMP%]{color:#4461e2}.accrual[_ngcontent-%COMP%]{color:#999}.fa-question[_ngcontent-%COMP%]{color:#4461e2}.enabled[_ngcontent-%COMP%]{color:#32cd32}.disabled[_ngcontent-%COMP%]{color:#f44366}.v-mid[_ngcontent-%COMP%], .v-m[_ngcontent-%COMP%]{vertical-align:middle}.v-top[_ngcontent-%COMP%], .v-t[_ngcontent-%COMP%]{vertical-align:top}.v-bottom[_ngcontent-%COMP%], .v-b[_ngcontent-%COMP%]{vertical-align:bottom}.v-super[_ngcontent-%COMP%]{vertical-align:super}.r-amount[_ngcontent-%COMP%]{text-align:right!important;padding-right:5px!important}.left[_ngcontent-%COMP%]{text-align:left!important}.right[_ngcontent-%COMP%]{text-align:right!important}.center[_ngcontent-%COMP%]{text-align:center!important}.amount-plus[_ngcontent-%COMP%]{color:#000}.amount-minus[_ngcontent-%COMP%]{color:#4461e2}.block[_ngcontent-%COMP%]{display:block}.inline[_ngcontent-%COMP%]{display:inline}.in-block[_ngcontent-%COMP%]{display:inline-block;zoom:1}.d-none[_ngcontent-%COMP%], .hide[_ngcontent-%COMP%], .hidden[_ngcontent-%COMP%]{display:none}.t-0[_ngcontent-%COMP%]{top:0}.b-0[_ngcontent-%COMP%]{bottom:0}.l-0[_ngcontent-%COMP%]{left:0}.r-0[_ngcontent-%COMP%]{right:0}.tb-0[_ngcontent-%COMP%]{top:0;bottom:0}.lr-0[_ngcontent-%COMP%]{left:0;right:0}.f-left[_ngcontent-%COMP%]{float:left}.f-right[_ngcontent-%COMP%]{float:right}.f-none[_ngcontent-%COMP%]{float:none}textarea[_ngcontent-%COMP%]{resize:both}textarea.vertical[_ngcontent-%COMP%], textarea.horizontal[_ngcontent-%COMP%]{resize:vertical}textarea.noresize[_ngcontent-%COMP%]{resize:none}.full-input[_ngcontent-%COMP%] input[_ngcontent-%COMP%], .full-input[_ngcontent-%COMP%] select[_ngcontent-%COMP%], .full-input[_ngcontent-%COMP%] textarea[_ngcontent-%COMP%]{width:100%}.normal[_ngcontent-%COMP%] input[_ngcontent-%COMP%], .normal[_ngcontent-%COMP%] select[_ngcontent-%COMP%], .normal[_ngcontent-%COMP%] textarea[_ngcontent-%COMP%], .full-input[_ngcontent-%COMP%] [type=checkbox][_ngcontent-%COMP%], .full-input[_ngcontent-%COMP%] [type=radio][_ngcontent-%COMP%]{width:auto}.mat-tab-body-content[_ngcontent-%COMP%]{margin-bottom:20px}.mat-datepicker-input[_ngcontent-%COMP%]{margin-top:5px;margin-bottom:5px}.loader-wrapper[_ngcontent-%COMP%]{height:100vh;width:100vw}.loader-wrapper[_ngcontent-%COMP%] .triangle[_ngcontent-%COMP%]{width:0;height:0;border-style:solid;position:absolute;animation:_ngcontent-%COMP%_rotate .8s infinite .2s}.loader-wrapper[_ngcontent-%COMP%] .bottom[_ngcontent-%COMP%]{border-width:0 90px 90px;border-color:transparent transparent #1fb050;bottom:calc(50% - 100px);left:calc(50% - 90px)}.loader-wrapper[_ngcontent-%COMP%] .top[_ngcontent-%COMP%]{border-width:90px 90px 0;border-color:#b4d575 transparent transparent;top:calc(50% - 100px);left:calc(50% - 90px)}.loader-wrapper[_ngcontent-%COMP%] .left[_ngcontent-%COMP%]{border-width:90px 0 90px 90px;border-color:transparent transparent transparent #1074b9;top:calc(50% - 90px);left:calc(50% - 100px)}.loader-wrapper[_ngcontent-%COMP%] .right[_ngcontent-%COMP%]{border-width:90px 90px 90px 0;border-color:transparent #1daeec transparent transparent;top:calc(50% - 90px);right:calc(50% - 100px)}@keyframes _ngcontent-%COMP%_rotate{0%{transform:rotate(0)}to{transform:rotate(360deg)}}body[_ngcontent-%COMP%]{margin:0}.container[_ngcontent-%COMP%]{margin:0 auto}.mb-05[_ngcontent-%COMP%]{margin-bottom:.5rem}.mr-05[_ngcontent-%COMP%]{margin-right:.5rem}.mb-1[_ngcontent-%COMP%]{margin-bottom:1rem}.mt-1[_ngcontent-%COMP%]{margin-top:1rem}.m-5[_ngcontent-%COMP%]{margin:5px}.m-t-5[_ngcontent-%COMP%]{margin-top:5px}.m-r-5[_ngcontent-%COMP%]{margin-right:5px}.m-b-5[_ngcontent-%COMP%]{margin-bottom:5px}.m-l-5[_ngcontent-%COMP%]{margin-left:5px}.m-v-5[_ngcontent-%COMP%]{margin:5px 0}.m-h-5[_ngcontent-%COMP%]{margin:0 5px}.m-10[_ngcontent-%COMP%]{margin:10px}.m-t-10[_ngcontent-%COMP%]{margin-top:10px}.m-r-10[_ngcontent-%COMP%]{margin-right:10px}.m-b-10[_ngcontent-%COMP%]{margin-bottom:10px}.m-l-10[_ngcontent-%COMP%]{margin-left:10px}.m-v-10[_ngcontent-%COMP%]{margin:10px 0}.m-h-10[_ngcontent-%COMP%]{margin:0 10px}.m-15[_ngcontent-%COMP%]{margin:15px}.m-t-15[_ngcontent-%COMP%]{margin-top:15px}.m-r-15[_ngcontent-%COMP%]{margin-right:15px}.m-b-15[_ngcontent-%COMP%]{margin-bottom:15px}.m-l-15[_ngcontent-%COMP%]{margin-left:15px}.m-v-15[_ngcontent-%COMP%]{margin:15px 0}.m-h-15[_ngcontent-%COMP%]{margin:0 15px}.m-20[_ngcontent-%COMP%]{margin:20px}.m-t-20[_ngcontent-%COMP%]{margin-top:20px}.m-r-20[_ngcontent-%COMP%]{margin-right:20px}.m-b-20[_ngcontent-%COMP%]{margin-bottom:20px}.m-l-20[_ngcontent-%COMP%]{margin-left:20px}.m-v-20[_ngcontent-%COMP%]{margin:20px 0}.m-h-20[_ngcontent-%COMP%]{margin:0 20px}.m-25[_ngcontent-%COMP%]{margin:25px}.m-t-25[_ngcontent-%COMP%]{margin-top:25px}.m-r-25[_ngcontent-%COMP%]{margin-right:25px}.m-b-25[_ngcontent-%COMP%]{margin-bottom:25px}.m-l-25[_ngcontent-%COMP%]{margin-left:25px}.m-v-25[_ngcontent-%COMP%]{margin:25px 0}.m-h-25[_ngcontent-%COMP%]{margin:0 25px}.m-30[_ngcontent-%COMP%]{margin:30px}.m-t-30[_ngcontent-%COMP%]{margin-top:30px}.m-r-30[_ngcontent-%COMP%]{margin-right:30px}.m-b-30[_ngcontent-%COMP%]{margin-bottom:30px}.m-l-30[_ngcontent-%COMP%]{margin-left:30px}.m-v-30[_ngcontent-%COMP%]{margin:30px 0}.m-h-30[_ngcontent-%COMP%]{margin:0 30px}.m-35[_ngcontent-%COMP%]{margin:35px}.m-t-35[_ngcontent-%COMP%]{margin-top:35px}.m-r-35[_ngcontent-%COMP%]{margin-right:35px}.m-b-35[_ngcontent-%COMP%]{margin-bottom:35px}.m-l-35[_ngcontent-%COMP%]{margin-left:35px}.m-v-35[_ngcontent-%COMP%]{margin:35px 0}.m-h-35[_ngcontent-%COMP%]{margin:0 35px}.m-40[_ngcontent-%COMP%]{margin:40px}.m-t-40[_ngcontent-%COMP%]{margin-top:40px}.m-r-40[_ngcontent-%COMP%]{margin-right:40px}.m-b-40[_ngcontent-%COMP%]{margin-bottom:40px}.m-l-40[_ngcontent-%COMP%]{margin-left:40px}.m-v-40[_ngcontent-%COMP%]{margin:40px 0}.m-h-40[_ngcontent-%COMP%]{margin:0 40px}.m-45[_ngcontent-%COMP%]{margin:45px}.m-t-45[_ngcontent-%COMP%]{margin-top:45px}.m-r-45[_ngcontent-%COMP%]{margin-right:45px}.m-b-45[_ngcontent-%COMP%]{margin-bottom:45px}.m-l-45[_ngcontent-%COMP%]{margin-left:45px}.m-v-45[_ngcontent-%COMP%]{margin:45px 0}.m-h-45[_ngcontent-%COMP%]{margin:0 45px}.m-50[_ngcontent-%COMP%]{margin:50px}.m-t-50[_ngcontent-%COMP%]{margin-top:50px}.m-r-50[_ngcontent-%COMP%]{margin-right:50px}.m-b-50[_ngcontent-%COMP%]{margin-bottom:50px}.m-l-50[_ngcontent-%COMP%]{margin-left:50px}.m-v-50[_ngcontent-%COMP%]{margin:50px 0}.m-h-50[_ngcontent-%COMP%]{margin:0 50px}.m-55[_ngcontent-%COMP%]{margin:55px}.m-t-55[_ngcontent-%COMP%]{margin-top:55px}.m-r-55[_ngcontent-%COMP%]{margin-right:55px}.m-b-55[_ngcontent-%COMP%]{margin-bottom:55px}.m-l-55[_ngcontent-%COMP%]{margin-left:55px}.m-v-55[_ngcontent-%COMP%]{margin:55px 0}.m-h-55[_ngcontent-%COMP%]{margin:0 55px}.m-60[_ngcontent-%COMP%]{margin:60px}.m-t-60[_ngcontent-%COMP%]{margin-top:60px}.m-r-60[_ngcontent-%COMP%]{margin-right:60px}.m-b-60[_ngcontent-%COMP%]{margin-bottom:60px}.m-l-60[_ngcontent-%COMP%]{margin-left:60px}.m-v-60[_ngcontent-%COMP%]{margin:60px 0}.m-h-60[_ngcontent-%COMP%]{margin:0 60px}.m-65[_ngcontent-%COMP%]{margin:65px}.m-t-65[_ngcontent-%COMP%]{margin-top:65px}.m-r-65[_ngcontent-%COMP%]{margin-right:65px}.m-b-65[_ngcontent-%COMP%]{margin-bottom:65px}.m-l-65[_ngcontent-%COMP%]{margin-left:65px}.m-v-65[_ngcontent-%COMP%]{margin:65px 0}.m-h-65[_ngcontent-%COMP%]{margin:0 65px}.m-70[_ngcontent-%COMP%]{margin:70px}.m-t-70[_ngcontent-%COMP%]{margin-top:70px}.m-r-70[_ngcontent-%COMP%]{margin-right:70px}.m-b-70[_ngcontent-%COMP%]{margin-bottom:70px}.m-l-70[_ngcontent-%COMP%]{margin-left:70px}.m-v-70[_ngcontent-%COMP%]{margin:70px 0}.m-h-70[_ngcontent-%COMP%]{margin:0 70px}.m-75[_ngcontent-%COMP%]{margin:75px}.m-t-75[_ngcontent-%COMP%]{margin-top:75px}.m-r-75[_ngcontent-%COMP%]{margin-right:75px}.m-b-75[_ngcontent-%COMP%]{margin-bottom:75px}.m-l-75[_ngcontent-%COMP%]{margin-left:75px}.m-v-75[_ngcontent-%COMP%]{margin:75px 0}.m-h-75[_ngcontent-%COMP%]{margin:0 75px}.m-80[_ngcontent-%COMP%]{margin:80px}.m-t-80[_ngcontent-%COMP%]{margin-top:80px}.m-r-80[_ngcontent-%COMP%]{margin-right:80px}.m-b-80[_ngcontent-%COMP%]{margin-bottom:80px}.m-l-80[_ngcontent-%COMP%]{margin-left:80px}.m-v-80[_ngcontent-%COMP%]{margin:80px 0}.m-h-80[_ngcontent-%COMP%]{margin:0 80px}.no-m[_ngcontent-%COMP%]{margin:0}.no-m-t[_ngcontent-%COMP%]{margin-top:0}.no-m-r[_ngcontent-%COMP%]{margin-right:0}.no-m-b[_ngcontent-%COMP%]{margin-bottom:0}.no-m-l[_ngcontent-%COMP%]{margin-left:0}.no-m-v[_ngcontent-%COMP%], .no-m-h[_ngcontent-%COMP%], .no-margin[_ngcontent-%COMP%]{margin:0}.no-m-lr[_ngcontent-%COMP%], .no-m-rl[_ngcontent-%COMP%]{margin-left:0;margin-right:0}.no-m-tb[_ngcontent-%COMP%], .no-m-bt[_ngcontent-%COMP%]{margin-top:0;margin-bottom:0}.m-t-only[_ngcontent-%COMP%]{margin-left:0;margin-right:0;margin-bottom:0}.m-b-only[_ngcontent-%COMP%]{margin-left:0;margin-right:0;margin-top:0}.m-l-only[_ngcontent-%COMP%]{margin-right:0;margin-top:0;margin-bottom:0}.m-r-only[_ngcontent-%COMP%]{margin-left:0;margin-top:0;margin-bottom:0}.m-auto[_ngcontent-%COMP%]{margin-left:auto;margin-right:auto}.ls-0[_ngcontent-%COMP%]{margin-left:10px;margin-right:10px}html[_ngcontent-%COMP%], body[_ngcontent-%COMP%]{-webkit-tap-highlight-color:transparent}div[_ngcontent-%COMP%]{box-sizing:border-box}.color-inherit[_ngcontent-%COMP%]{color:inherit}.no-shadow[_ngcontent-%COMP%]{box-shadow:none}.pointer[_ngcontent-%COMP%]{cursor:pointer}.nolist[_ngcontent-%COMP%]{list-style:none}.actions-menu[_ngcontent-%COMP%]{color:#fff}.alert[_ngcontent-%COMP%]{background-color:#e8f4fd;padding:6px 16px;font-size:.875rem;font-family:Roboto,Helvetica Neue,sans-serif;font-weight:400;line-height:1.43;border-radius:4px;letter-spacing:normal;margin:10px}.alert[_ngcontent-%COMP%] .message[_ngcontent-%COMP%]{padding:8px 0;font-size:18px}.alert[_ngcontent-%COMP%] .alert-check[_ngcontent-%COMP%]{color:#359ff4;margin-right:2px;font-size:1.4rem} .mat-tooltip{font-size:15px;color:#fff!important;background-color:#4461e2b3;border:1px solid rgb(25.7777777778,51.5555555556,166.2222222222);max-width:400px!important;white-space:pre-line!important}.loading[_ngcontent-%COMP%]{position:absolute;min-width:100%;width:100px;height:12px;background:linear-gradient(125deg,#fff,#4461e2,#fff);animation:grow 4s linear infinite,move 4s linear infinite}mat-card-title[_ngcontent-%COMP%]{font-weight:600;font-size:x-large;padding-left:20px;padding-top:20px}html[_ngcontent-%COMP%], body[_ngcontent-%COMP%]{overflow:hidden}.overflow-x-scroll[_ngcontent-%COMP%]{max-width:100%;overflow-x:auto}.overflow-no[_ngcontent-%COMP%]{overflow:hidden}.overflow-auto[_ngcontent-%COMP%]{overflow:auto}.overflow-scroll[_ngcontent-%COMP%]{overflow:scroll}.table-container[_ngcontent-%COMP%]{overflow-x:auto;max-width:100%}body[_ngcontent-%COMP%], .no-p[_ngcontent-%COMP%]{padding:0}.no-p-t[_ngcontent-%COMP%]{padding-top:0}.no-p-r[_ngcontent-%COMP%]{padding-right:0}.no-p-b[_ngcontent-%COMP%]{padding-bottom:0}.no-p-l[_ngcontent-%COMP%]{padding-left:0}.no-p-v[_ngcontent-%COMP%], .no-p-h[_ngcontent-%COMP%]{padding:0}.p-5[_ngcontent-%COMP%]{padding:5px}.p-t-5[_ngcontent-%COMP%]{padding-top:5px}.p-r-5[_ngcontent-%COMP%]{padding-right:5px}.p-b-5[_ngcontent-%COMP%]{padding-bottom:5px}.p-l-5[_ngcontent-%COMP%]{padding-left:5px}.p-v-5[_ngcontent-%COMP%]{padding:5px 0}.p-h-5[_ngcontent-%COMP%]{padding:0 5px}.p-10[_ngcontent-%COMP%]{padding:10px}.p-t-10[_ngcontent-%COMP%]{padding-top:10px}.p-b-10[_ngcontent-%COMP%]{padding-bottom:10px}.p-v-10[_ngcontent-%COMP%]{padding:10px 0}.p-h-10[_ngcontent-%COMP%]{padding:0 10px}.p-15[_ngcontent-%COMP%]{padding:15px}.p-t-15[_ngcontent-%COMP%]{padding-top:15px}.p-r-15[_ngcontent-%COMP%]{padding-right:15px}.p-b-15[_ngcontent-%COMP%]{padding-bottom:15px}.p-l-15[_ngcontent-%COMP%]{padding-left:15px}.p-v-15[_ngcontent-%COMP%]{padding:15px 0}.p-h-15[_ngcontent-%COMP%]{padding:0 15px}.p-20[_ngcontent-%COMP%]{padding:20px}.p-t-20[_ngcontent-%COMP%]{padding-top:20px}.p-r-20[_ngcontent-%COMP%]{padding-right:20px}.p-b-20[_ngcontent-%COMP%]{padding-bottom:20px}.p-l-20[_ngcontent-%COMP%]{padding-left:20px}.p-v-20[_ngcontent-%COMP%]{padding:20px 0}.p-h-20[_ngcontent-%COMP%]{padding:0 20px}.p-25[_ngcontent-%COMP%]{padding:25px}.p-t-25[_ngcontent-%COMP%]{padding-top:25px}.p-r-25[_ngcontent-%COMP%]{padding-right:25px}.p-b-25[_ngcontent-%COMP%]{padding-bottom:25px}.p-l-25[_ngcontent-%COMP%]{padding-left:25px}.p-v-25[_ngcontent-%COMP%]{padding:25px 0}.p-h-25[_ngcontent-%COMP%]{padding:0 25px}.p-30[_ngcontent-%COMP%]{padding:30px}.p-t-30[_ngcontent-%COMP%]{padding-top:30px}.p-r-30[_ngcontent-%COMP%]{padding-right:30px}.p-b-30[_ngcontent-%COMP%]{padding-bottom:30px}.p-l-30[_ngcontent-%COMP%]{padding-left:30px}.p-v-30[_ngcontent-%COMP%]{padding:30px 0}.p-h-30[_ngcontent-%COMP%]{padding:0 30px}.p-35[_ngcontent-%COMP%]{padding:35px}.p-t-35[_ngcontent-%COMP%]{padding-top:35px}.p-r-35[_ngcontent-%COMP%]{padding-right:35px}.p-b-35[_ngcontent-%COMP%]{padding-bottom:35px}.p-l-35[_ngcontent-%COMP%]{padding-left:35px}.p-v-35[_ngcontent-%COMP%]{padding:35px 0}.p-h-35[_ngcontent-%COMP%]{padding:0 35px}.p-40[_ngcontent-%COMP%]{padding:40px}.p-t-40[_ngcontent-%COMP%]{padding-top:40px}.p-r-40[_ngcontent-%COMP%]{padding-right:40px}.p-b-40[_ngcontent-%COMP%]{padding-bottom:40px}.p-l-40[_ngcontent-%COMP%]{padding-left:40px}.p-v-40[_ngcontent-%COMP%]{padding-top:40px;padding-bottom:40px}.p-h-40[_ngcontent-%COMP%]{padding:0 40px}.p-45[_ngcontent-%COMP%]{padding:45px}.p-t-45[_ngcontent-%COMP%]{padding-top:45px}.p-r-45[_ngcontent-%COMP%]{padding-right:45px}.p-b-45[_ngcontent-%COMP%]{padding-bottom:45px}.p-l-45[_ngcontent-%COMP%]{padding-left:45px}.p-v-45[_ngcontent-%COMP%]{padding:45px 0}.p-h-45[_ngcontent-%COMP%]{padding:0 45px}.p-50[_ngcontent-%COMP%]{padding:50px}.p-t-50[_ngcontent-%COMP%]{padding-top:50px}.p-r-50[_ngcontent-%COMP%]{padding-right:50px}.p-b-50[_ngcontent-%COMP%]{padding-bottom:50px}.p-l-50[_ngcontent-%COMP%]{padding-left:50px}.p-v-50[_ngcontent-%COMP%]{padding:50px 0}.p-h-50[_ngcontent-%COMP%]{padding:0 50px}.p-55[_ngcontent-%COMP%]{padding:55px}.p-t-55[_ngcontent-%COMP%]{padding-top:55px}.p-r-55[_ngcontent-%COMP%]{padding-right:55px}.p-b-55[_ngcontent-%COMP%]{padding-bottom:55px}.p-l-55[_ngcontent-%COMP%]{padding-left:55px}.p-v-55[_ngcontent-%COMP%]{padding:55px 0}.p-h-55[_ngcontent-%COMP%]{padding:0 55px}.p-60[_ngcontent-%COMP%]{padding:60px}.p-t-60[_ngcontent-%COMP%]{padding-top:60px}.p-r-60[_ngcontent-%COMP%]{padding-right:60px}.p-b-60[_ngcontent-%COMP%]{padding-bottom:60px}.p-l-60[_ngcontent-%COMP%]{padding-left:60px}.p-v-60[_ngcontent-%COMP%]{padding:60px 0}.p-h-60[_ngcontent-%COMP%]{padding:0 60px}.p-65[_ngcontent-%COMP%]{padding:65px}.p-t-65[_ngcontent-%COMP%]{padding-top:65px}.p-r-65[_ngcontent-%COMP%]{padding-right:65px}.p-b-65[_ngcontent-%COMP%]{padding-bottom:65px}.p-l-65[_ngcontent-%COMP%]{padding-left:65px}.p-v-65[_ngcontent-%COMP%]{padding:65px 0}.p-h-65[_ngcontent-%COMP%]{padding:0 65px}.p-70[_ngcontent-%COMP%]{padding:70px}.p-t-70[_ngcontent-%COMP%]{padding-top:70px}.p-r-70[_ngcontent-%COMP%]{padding-right:70px}.p-b-70[_ngcontent-%COMP%]{padding-bottom:70px}.p-l-70[_ngcontent-%COMP%]{padding-left:70px}.p-v-70[_ngcontent-%COMP%]{padding:70px 0}.p-h-70[_ngcontent-%COMP%]{padding:0 70px}.p-75[_ngcontent-%COMP%]{padding:75px}.p-t-75[_ngcontent-%COMP%]{padding-top:75px}.p-r-75[_ngcontent-%COMP%]{padding-right:75px}.p-b-75[_ngcontent-%COMP%]{padding-bottom:75px}.p-l-75[_ngcontent-%COMP%]{padding-left:75px}.p-v-75[_ngcontent-%COMP%]{padding:75px 0}.p-h-75[_ngcontent-%COMP%]{padding:0 75px}.p-80[_ngcontent-%COMP%]{padding:80px}.p-t-80[_ngcontent-%COMP%]{padding-top:80px}.p-r-80[_ngcontent-%COMP%]{padding-right:80px}.p-b-80[_ngcontent-%COMP%]{padding-bottom:80px}.p-l-80[_ngcontent-%COMP%]{padding-left:80px}.p-v-80[_ngcontent-%COMP%]{padding:80px 0}.p-h-80[_ngcontent-%COMP%]{padding:0 80px}.no-padding[_ngcontent-%COMP%]{padding:0!important}.no-pad-lr[_ngcontent-%COMP%], .no-pad-rl[_ngcontent-%COMP%]{padding-left:0;padding-right:0}.no-pad-tb[_ngcontent-%COMP%], .no-pad-bt[_ngcontent-%COMP%]{padding-top:0;padding-bottom:0}.pad-t-only[_ngcontent-%COMP%]{padding-left:0;padding-right:0;padding-bottom:0}.pad-b-only[_ngcontent-%COMP%]{padding-left:0;padding-right:0;padding-top:0}.pad-l-only[_ngcontent-%COMP%]{padding-right:0;padding-top:0;padding-bottom:0}.pad-r-only[_ngcontent-%COMP%]{padding-left:0;padding-top:0;padding-bottom:0}html[_ngcontent-%COMP%], body[_ngcontent-%COMP%], .rel[_ngcontent-%COMP%], .relative[_ngcontent-%COMP%]{position:relative}.abs[_ngcontent-%COMP%], .absolute[_ngcontent-%COMP%]{position:absolute}.fixed[_ngcontent-%COMP%]{position:fixed}.status-active[_ngcontent-%COMP%]{color:#5cb85c}.status-inactive[_ngcontent-%COMP%]{color:#666f73}.status-deleted[_ngcontent-%COMP%]{color:#000}.status-pending[_ngcontent-%COMP%]{color:orange}.status-approved[_ngcontent-%COMP%]{color:#4461e2}.status-overpaid[_ngcontent-%COMP%]{color:purple}.status-chargeoff[_ngcontent-%COMP%]{color:#f39c12}.status-active-overdue[_ngcontent-%COMP%], .status-block[_ngcontent-%COMP%]{color:red}.status-matured[_ngcontent-%COMP%]{color:#ff4000}.subStatus-contract-termination[_ngcontent-%COMP%]{color:#b3b3b3}.mat-step-header[_ngcontent-%COMP%] .mat-step-icon-state-done[_ngcontent-%COMP%]{background-color:#2af72a}.mat-step-header[_ngcontent-%COMP%] .mat-step-icon-state-done[_ngcontent-%COMP%] .status-transfer-progress[_ngcontent-%COMP%]{color:#ff4000}.mat-step-header[_ngcontent-%COMP%] .mat-step-icon-state-done[_ngcontent-%COMP%] .status-transfer-hold[_ngcontent-%COMP%]{color:#df0101}html[_ngcontent-%COMP%], body[_ngcontent-%COMP%]{-webkit-font-smoothing:antialiased}html[_ngcontent-%COMP%]{font-size:16px}body[_ngcontent-%COMP%]{font-family:Roboto,Helvetica Neue,sans-serif;font-weight:400;font-size:14px;color:#000000de;line-height:1.5;letter-spacing:normal}.mat-h1[_ngcontent-%COMP%], .mat-headline[_ngcontent-%COMP%], .mat-typography[_ngcontent-%COMP%] .mat-h1[_ngcontent-%COMP%], .mat-typography[_ngcontent-%COMP%] .mat-headline[_ngcontent-%COMP%], .mat-typography[_ngcontent-%COMP%] h1[_ngcontent-%COMP%]{font:400 24px/32px Roboto,Helvetica Neue,sans-serif;letter-spacing:normal;margin:0 0 16px}.lh-1[_ngcontent-%COMP%]{line-height:1}.lh-13[_ngcontent-%COMP%]{line-height:1.3}.lh-15[_ngcontent-%COMP%]{line-height:1.5}.bold[_ngcontent-%COMP%], .strong[_ngcontent-%COMP%]{font-weight:700}.no-bold[_ngcontent-%COMP%]{font-weight:400}.italic[_ngcontent-%COMP%], .em[_ngcontent-%COMP%]{font-style:italic}.strike[_ngcontent-%COMP%]{text-decoration:line-through}.normal[_ngcontent-%COMP%]{font-weight:400;font-style:normal}.uppercase[_ngcontent-%COMP%]{text-transform:uppercase}.text-left[_ngcontent-%COMP%]{text-align:left}.text-center[_ngcontent-%COMP%]{text-align:center}.text-right[_ngcontent-%COMP%]{text-align:right}.w100[_ngcontent-%COMP%]{font-weight:100}.w200[_ngcontent-%COMP%]{font-weight:200}.w300[_ngcontent-%COMP%]{font-weight:300}.w400[_ngcontent-%COMP%]{font-weight:400}.w500[_ngcontent-%COMP%]{font-weight:500}.w600[_ngcontent-%COMP%]{font-weight:600}.w700[_ngcontent-%COMP%]{font-weight:700}.w800[_ngcontent-%COMP%]{font-weight:800}.w900[_ngcontent-%COMP%]{font-weight:900}.f9[_ngcontent-%COMP%]{font-size:9px}.f10[_ngcontent-%COMP%]{font-size:10px}.f11[_ngcontent-%COMP%]{font-size:11px}.f12[_ngcontent-%COMP%]{font-size:12px}.f13[_ngcontent-%COMP%]{font-size:13px}.f14[_ngcontent-%COMP%]{font-size:14px}.f15[_ngcontent-%COMP%]{font-size:15px}.f16[_ngcontent-%COMP%]{font-size:16px}.f17[_ngcontent-%COMP%]{font-size:17px}.f18[_ngcontent-%COMP%]{font-size:18px;line-height:30px}.f19[_ngcontent-%COMP%]{font-size:19px}.f20[_ngcontent-%COMP%]{font-size:20px}.f30[_ngcontent-%COMP%]{font-size:30px}.f40[_ngcontent-%COMP%]{font-size:40px}.f50[_ngcontent-%COMP%]{font-size:50px}.f60[_ngcontent-%COMP%]{font-size:60px}.size-small[_ngcontent-%COMP%]{font-size:75%}.size-normal[_ngcontent-%COMP%]{font-size:100%}.size-medium[_ngcontent-%COMP%]{font-size:125%}.size-big[_ngcontent-%COMP%], .size-large[_ngcontent-%COMP%]{font-size:150%}.size-huge[_ngcontent-%COMP%]{font-size:200%}.inherit[_ngcontent-%COMP%]{font:inherit}.text-shadow[_ngcontent-%COMP%]{text-shadow:1px 1px 1px rgba(0,0,0,.4)}.text-rgb-2[_ngcontent-%COMP%]{color:#0003}.text-rgb-3[_ngcontent-%COMP%]{color:#0000004d}.text-rgb-4[_ngcontent-%COMP%]{color:#0006}.text-rgb-5[_ngcontent-%COMP%]{color:#00000080}.no-ul[_ngcontent-%COMP%], .no-ul[_ngcontent-%COMP%]:hover, .no-ul[_ngcontent-%COMP%] a[_ngcontent-%COMP%], .no-ul[_ngcontent-%COMP%] a[_ngcontent-%COMP%]:hover{text-decoration:none}.no-wrap[_ngcontent-%COMP%]{white-space:nowrap}.auto-cell-size[_ngcontent-%COMP%]{white-space:nowrap;width:1%}.ls-0[_ngcontent-%COMP%]{letter-spacing:-3px;white-space:nowrap}.label-field[_ngcontent-%COMP%]{margin-top:32px}.wrap-content[_ngcontent-%COMP%]{overflow-wrap:break-word;word-wrap:break-word}.no-break-content[_ngcontent-%COMP%]{overflow-wrap:anywhere!important}.fit[_ngcontent-%COMP%]{max-width:100%}.half-width[_ngcontent-%COMP%]{width:50%}.full-width[_ngcontent-%COMP%]{width:100%}.full-height[_ngcontent-%COMP%]{height:100%}html[_ngcontent-%COMP%], body[_ngcontent-%COMP%]{width:100%;height:100%;min-height:100%}body[_ngcontent-%COMP%] table[_ngcontent-%COMP%]{width:100%}.container[_ngcontent-%COMP%]{max-width:74rem;width:90%}.mw300[_ngcontent-%COMP%]{max-width:300px}.mw400[_ngcontent-%COMP%]{max-width:400px}.mw500[_ngcontent-%COMP%]{max-width:500px}.mw600[_ngcontent-%COMP%]{max-width:600px}.fullwidth[_ngcontent-%COMP%]{width:100%}.zindex-1[_ngcontent-%COMP%]{z-index:1}.zindex-2[_ngcontent-%COMP%]{z-index:2}.zindex-3[_ngcontent-%COMP%]{z-index:3}.zindex-4[_ngcontent-%COMP%]{z-index:4}.tab-container[_ngcontent-%COMP%]{padding:1%;margin:1%}.tab-container[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{margin:1% auto}.tab-container[_ngcontent-%COMP%] .action-button[_ngcontent-%COMP%]{margin-left:auto}.tab-container[_ngcontent-%COMP%] table[_ngcontent-%COMP%]{width:100%}.tab-container[_ngcontent-%COMP%] table[_ngcontent-%COMP%] .account-action-button[_ngcontent-%COMP%]{min-width:26px;padding:0 0 3px;margin:0 10%;line-height:25px}.tab-container[_ngcontent-%COMP%] table[_ngcontent-%COMP%] .account-action-button[_ngcontent-%COMP%] .accruals[_ngcontent-%COMP%]{padding-top:1%}.select-row[_ngcontent-%COMP%]:hover{cursor:pointer;font-weight:800}"]})}}return t})();var ya=["instructionsTable"],Oa=t=>["../","standing-instructions",t,"edit"],Ia=t=>["../","standing-instructions",t,"view"];function Ra(t,s){t&1&&(a(0,"th",16),o(1),r(2,"translate"),i()),t&2&&(n(),m(c(2,1,"labels.inputs.Client")))}function wa(t,s){if(t&1&&(a(0,"td",17),o(1),i()),t&2){let e=s.$implicit;n(),A(" ",e.fromClient.displayName,"-",e.fromClient.id," ")}}function Ea(t,s){t&1&&(a(0,"th",16),o(1),r(2,"translate"),i()),t&2&&(n(),m(c(2,1,"labels.inputs.From Account")))}function Ba(t,s){if(t&1&&(a(0,"td",17),o(1),i()),t&2){let e=s.$implicit;n(),A(" ",e.fromAccount.accountNo," (",e.fromAccountType.value,") ")}}function Fa(t,s){t&1&&(a(0,"th",16),o(1),r(2,"translate"),i()),t&2&&(n(),m(c(2,1,"labels.inputs.Beneficiary")))}function ka(t,s){if(t&1&&(a(0,"td",17),o(1),i()),t&2){let e=s.$implicit;n(),m(e.toClient.displayName)}}function Na(t,s){t&1&&(a(0,"th",16),o(1),r(2,"translate"),i()),t&2&&(n(),m(c(2,1,"labels.inputs.To Account")))}function Va(t,s){if(t&1&&(a(0,"td",17),o(1),i()),t&2){let e=s.$implicit;n(),A(" ",e.toAccount.accountNo," (",e.toAccountType.value,") ")}}function qa(t,s){t&1&&(a(0,"th",16),o(1),r(2,"translate"),i()),t&2&&(n(),m(c(2,1,"labels.inputs.Amount")))}function Ga(t,s){if(t&1&&(a(0,"td",17),o(1),i()),t&2){let e=s.$implicit;n(),A("",e.instructionType.value,"/",e.amount)}}function Ha(t,s){t&1&&(a(0,"th",16),o(1),r(2,"translate"),i()),t&2&&(n(),m(c(2,1,"labels.inputs.Validity")))}function Ua(t,s){if(t&1&&(a(0,"td",17),o(1),r(2,"dateFormat"),r(3,"dateFormat"),i()),t&2){let e=s.$implicit;n(),A(" ",c(2,2,e.validFrom)," to ",c(3,4,e.validTill)," ")}}function $a(t,s){t&1&&(a(0,"th",16),o(1),r(2,"translate"),i()),t&2&&(n(),m(c(2,1,"labels.inputs.Actions")))}function za(t,s){if(t&1&&(a(0,"button",19),r(1,"translate"),C(2,"i",20),i()),t&2){let e=f(2).$implicit;d("matTooltip",Mt(c(1,3,"tooltips.Edit Standing Instruction")))("routerLink",ge(5,Oa,e.id))}}function La(t,s){t&1&&(a(0,"span"),h(1,za,3,7,"button",18),i()),t&2&&(n(),d("mifosxHasPermission","UPDATE_STANDINGINSTRUCTION"))}function ja(t,s){if(t&1){let e=y();a(0,"button",22),r(1,"translate"),T("click",function(){S(e);let p=f(2).$implicit,g=f();return M(g.deleteStandingInstruction(p.id))}),C(2,"i",23),i()}t&2&&d("matTooltip",Mt(c(1,2,"tooltips.Delete Standing Instruction")))}function Wa(t,s){t&1&&(a(0,"span"),h(1,ja,3,4,"button",21),i()),t&2&&(n(),d("mifosxHasPermission","DELETE_STANDINGINSTRUCTION"))}function Ka(t,s){if(t&1&&(a(0,"button",19),r(1,"translate"),C(2,"i",24),i()),t&2){let e=f().$implicit;d("matTooltip",Mt(c(1,3,"tooltips.View Standing Instruction")))("routerLink",ge(5,Ia,e.id))}}function Qa(t,s){if(t&1&&(a(0,"td",17),x(1,La,2,1,"span"),x(2,Wa,2,1,"span"),h(3,Ka,3,7,"button",18),i()),t&2){let e=s.$implicit;n(),D(e.status.value!=="Deleted"?1:-1),n(),D(e.status.value!=="Deleted"?2:-1),n(),d("mifosxHasPermission","READ_STANDINGINSTRUCTION")}}function Ya(t,s){t&1&&C(0,"tr",25)}function Ja(t,s){t&1&&C(0,"tr",26)}var on=(()=>{class t{constructor(){this.route=_(N),this.recurringDepositsService=_(k),this.dialog=_(Xt),this.accountTransfersService=_(si),this.settingsService=_($),this.dataSource=new _e,this.displayedColumns=["client","fromAccount","beneficiary","toAccount","amount","validity","actions"],this.route.parent.data.subscribe(e=>{this.recurringDepositsData=e.recurringDepositsAccountData})}ngOnInit(){this.getStandingInstructions()}getStandingInstructions(){let e=this.recurringDepositsData.clientId,l=this.recurringDepositsData.clientName,p=this.recurringDepositsData.id,g=this.settingsService.language.code,b=this.settingsService.dateFormat;this.recurringDepositsService.getStandingInstructions(e,l,p,g,b).subscribe(G=>{this.instructionsData=G.pageItems,this.dataSource.data=this.instructionsData,this.instructionTableRef.renderRows()})}deleteStandingInstruction(e){this.dialog.open(ce,{data:{deleteContext:`standing instruction id: ${e}`}}).afterClosed().subscribe(p=>{p.delete&&this.accountTransfersService.deleteStandingInstrucions(e).subscribe(()=>{})})}static{this.\u0275fac=function(l){return new(l||t)}}static{this.\u0275cmp=O({type:t,selectors:[["mifosx-standing-instructions-tab"]],viewQuery:function(l,p){if(l&1&&Pt(ya,7),l&2){let g;Tt(g=St())&&(p.instructionTableRef=g.first)}},decls:31,vars:6,consts:[["instructionsTable",""],[1,"tab-container","mat-typography"],[1,"m-b-10"],[1,"mat-elevation-z1","m-b-25"],["mat-table","",3,"dataSource"],["matColumnDef","client"],["mat-header-cell","",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","fromAccount"],["matColumnDef","beneficiary"],["matColumnDef","toAccount"],["matColumnDef","amount"],["matColumnDef","validity"],["matColumnDef","actions"],["mat-header-row","",4,"matHeaderRowDef"],["mat-row","",4,"matRowDef","matRowDefColumns"],["mat-header-cell",""],["mat-cell",""],["class","account-action-button","mat-raised-button","","color","primary",3,"matTooltip","routerLink",4,"mifosxHasPermission"],["mat-raised-button","","color","primary",1,"account-action-button",3,"matTooltip","routerLink"],[1,"fa","fa-edit"],["class","account-action-button","mat-raised-button","","color","warn",3,"matTooltip","click",4,"mifosxHasPermission"],["mat-raised-button","","color","warn",1,"account-action-button",3,"click","matTooltip"],[1,"fa","fa-times"],[1,"fa","fa-eye"],["mat-header-row",""],["mat-row",""]],template:function(l,p){l&1&&(a(0,"div",1)(1,"div",2)(2,"h3"),o(3),r(4,"translate"),i()(),a(5,"div",3)(6,"table",4,0),v(8,5),h(9,Ra,3,3,"th",6)(10,wa,2,2,"td",7),P(),v(11,8),h(12,Ea,3,3,"th",6)(13,Ba,2,2,"td",7),P(),v(14,9),h(15,Fa,3,3,"th",6)(16,ka,2,1,"td",7),P(),v(17,10),h(18,Na,3,3,"th",6)(19,Va,2,2,"td",7),P(),v(20,11),h(21,qa,3,3,"th",6)(22,Ga,2,2,"td",7),P(),v(23,12),h(24,Ha,3,3,"th",6)(25,Ua,4,6,"td",7),P(),v(26,13),h(27,$a,3,3,"th",6)(28,Qa,4,3,"td",7),P(),h(29,Ya,1,0,"tr",14)(30,Ja,1,0,"tr",15),i()()()),l&2&&(n(3),m(c(4,4,"labels.heading.All Standing Instructions")),n(3),d("dataSource",p.dataSource),n(23),d("matHeaderRowDef",p.displayedColumns),n(),d("matRowDefColumns",p.displayedColumns))},dependencies:[I,R,Q,V,re,wt,Ft,Bt,kt,Et,Nt,oe,Vt,Gt,qt,Ht,It,w],styles:[".tab-container[_ngcontent-%COMP%]{padding:1%;margin:1%}.tab-container[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{margin:1% auto}.tab-container[_ngcontent-%COMP%] .action-button[_ngcontent-%COMP%]{margin-left:auto}.tab-container[_ngcontent-%COMP%] table[_ngcontent-%COMP%]{width:100%}.tab-container[_ngcontent-%COMP%] table[_ngcontent-%COMP%] .account-action-button[_ngcontent-%COMP%]{min-width:26px;padding:0 6px;margin:4px;line-height:25px}"]})}}return t})();var Xa=["chargesTable"],Za=()=>[2e3];function to(t,s){t&1&&(a(0,"th",21),o(1),r(2,"translate"),i()),t&2&&(n(),m(c(2,1,"labels.inputs.name")))}function eo(t,s){if(t&1&&(a(0,"td",22),o(1),i()),t&2){let e=s.$implicit;n(),m(e.name)}}function no(t,s){t&1&&(a(0,"th",21),o(1),r(2,"translate"),i()),t&2&&(n(),m(c(2,1,"labels.inputs.Fee/Penalty")))}function io(t,s){if(t&1&&(a(0,"td",22),o(1),i()),t&2){let e=s.$implicit;n(),m(e.penalty===!0?"Penalty":"Fee")}}function ao(t,s){t&1&&(a(0,"th",21),o(1),r(2,"translate"),i()),t&2&&(n(),m(c(2,1,"labels.inputs.Payment Due At")))}function oo(t,s){if(t&1&&(a(0,"td",22),o(1),i()),t&2){let e=s.$implicit;n(),m(e.chargeTimeType.value)}}function ro(t,s){t&1&&(a(0,"th",21),o(1),r(2,"translate"),i()),t&2&&(n(),m(c(2,1,"labels.inputs.Due As Of")))}function co(t,s){if(t&1&&(a(0,"td",22),o(1),r(2,"dateFormat"),i()),t&2){let e=s.$implicit;n(),m(c(2,1,e.dueDate))}}function po(t,s){t&1&&(a(0,"th",21),o(1),r(2,"translate"),i()),t&2&&(n(),m(c(2,1,"labels.inputs.Repeats On")))}function so(t,s){if(t&1&&(a(0,"td",22),o(1),r(2,"dateFormat"),i()),t&2){let e=s.$implicit;n(),u(" ",e.feeOnMonthDay?B(2,1,K(4,Za).concat(e.feeOnMonthDay),"dd MMMM"):"Unassigned"," ")}}function lo(t,s){t&1&&(a(0,"th",21),o(1),r(2,"translate"),i()),t&2&&(n(),m(c(2,1,"labels.inputs.Calculation Type")))}function mo(t,s){if(t&1&&(a(0,"td",22),o(1),i()),t&2){let e=s.$implicit;n(),m(e.chargeCalculationType.value)}}function uo(t,s){t&1&&(a(0,"th",21),o(1),r(2,"translate"),i()),t&2&&(n(),m(c(2,1,"labels.inputs.Due")))}function go(t,s){if(t&1&&(a(0,"td",22),o(1),i()),t&2){let e=s.$implicit;n(),A("",e.currency.displaySymbol,"\xA0",e.amount)}}function Co(t,s){t&1&&(a(0,"th",21),o(1),r(2,"translate"),i()),t&2&&(n(),m(c(2,1,"labels.inputs.Paid")))}function _o(t,s){if(t&1&&(a(0,"td",22),o(1),i()),t&2){let e=s.$implicit;n(),A("",e.currency.displaySymbol,"\xA0",e.amountPaid)}}function fo(t,s){t&1&&(a(0,"th",21),o(1),r(2,"translate"),i()),t&2&&(n(),m(c(2,1,"labels.inputs.Waived")))}function ho(t,s){if(t&1&&(a(0,"td",22),o(1),i()),t&2){let e=s.$implicit;n(),A("",e.currency.displaySymbol,"\xA0",e.amountWaived)}}function xo(t,s){t&1&&(a(0,"th",21),o(1),r(2,"translate"),i()),t&2&&(n(),m(c(2,1,"labels.inputs.Outstanding")))}function Do(t,s){if(t&1&&(a(0,"td",22),o(1),i()),t&2){let e=s.$implicit;n(),A(" ",e.currency.displaySymbol,"\xA0",e.amountOutstanding," ")}}function bo(t,s){t&1&&(a(0,"th",21),o(1),r(2,"translate"),i()),t&2&&(n(),m(c(2,1,"labels.inputs.Actions")))}function vo(t,s){if(t&1){let e=y();a(0,"button",25),r(1,"translate"),T("click",function(p){S(e);let g=f(2).$implicit,b=f();return b.routeEdit(p),M(b.editCharge(g))}),C(2,"i",26),i()}t&2&&d("matTooltip",Mt(c(1,2,"tooltips.Edit Charge")))}function Po(t,s){if(t&1){let e=y();a(0,"button",27),r(1,"translate"),T("click",function(p){S(e);let g=f(2).$implicit,b=f();return b.routeEdit(p),M(b.deleteCharge(g.id))}),C(2,"i",28),i()}t&2&&d("matTooltip",Mt(c(1,2,"tooltips.Delete Charge")))}function To(t,s){t&1&&(a(0,"span"),h(1,vo,3,4,"button",23)(2,Po,3,4,"button",24),i()),t&2&&(n(),d("mifosxHasPermission","UPDATE_SAVINGSACCOUNTCHARGE"),n(),d("mifosxHasPermission","DELETE_SAVINGSACCOUNTCHARGE"))}function So(t,s){if(t&1){let e=y();a(0,"button",25),r(1,"translate"),T("click",function(p){S(e);let g=f(3).$implicit,b=f();return b.routeEdit(p),M(b.payCharge(g.id))}),C(2,"i",29),i()}t&2&&d("matTooltip",Mt(c(1,2,"tooltips.Pay Charge")))}function Mo(t,s){if(t&1){let e=y();a(0,"button",25),r(1,"translate"),T("click",function(p){S(e);let g=f(3).$implicit,b=f();return b.routeEdit(p),M(b.waiveCharge(g.id))}),C(2,"i",30),i()}t&2&&d("matTooltip",Mt(c(1,2,"tooltips.Waive Charge")))}function Ao(t,s){t&1&&(a(0,"span"),h(1,So,3,4,"button",23)(2,Mo,3,4,"button",23),i()),t&2&&(n(),d("mifosxHasPermission","PAY_SAVINGSACCOUNTCHARGE"),n(),d("mifosxHasPermission","WAIVE_SAVINGSACCOUNTCHARGE"))}function yo(t,s){if(t&1&&(a(0,"span"),x(1,Ao,3,2,"span"),i()),t&2){let e=f().$implicit;n(),D(e.chargeTimeType.value==="Monthly Fee"||e.chargeTimeType.value==="Annual Fee"||e.chargeTimeType.value==="Specified due date"?1:-1)}}function Oo(t,s){if(t&1&&(a(0,"td",22),x(1,To,3,2,"span"),x(2,yo,2,1,"span"),i()),t&2){let e=s.$implicit,l=f();n(),D(l.recurringDepositsAccountData.status.value==="Submitted and pending approval"?1:-1),n(),D(l.recurringDepositsAccountData.status.value!=="Submitted and pending approval"&&e.amountOutstanding!==0?2:-1)}}function Io(t,s){t&1&&C(0,"tr",31)}function Ro(t,s){t&1&&C(0,"tr",32)}var rn=(()=>{class t{constructor(){this.route=_(N),this.savingsService=_(pe),this.dateUtils=_(X),this.router=_(W),this.dialog=_(Xt),this.translateService=_(Ie),this.settingsService=_($),this.showInactiveCharges=!1,this.displayedColumns=["name","feeOrPenalty","paymentDueAt","dueAsOf","repeatsOn","calculationType","due","paid","waived","outstanding","actions"],this.route.parent.data.subscribe(e=>{this.recurringDepositsAccountData=e.recurringDepositsAccountData,this.chargesData=this.recurringDepositsAccountData.charges})}ngOnInit(){let e=this.chargesData?this.chargesData.filter(l=>l.isActive):[];this.dataSource=new _e(e)}payCharge(e){let l=[new we({controlName:"amount",label:"Amount",value:"",type:"number",required:!0}),new Ze({controlName:"dueDate",label:"Payment Date",value:"",type:"date",required:!0})],p={title:`Pay Charge ${e}`,layout:{addButtonText:"Confirm"},formfields:l};this.dialog.open(Ce,{data:p}).afterClosed().subscribe(b=>{if(b.data){let G=this.settingsService.language.code,ue=this.settingsService.dateFormat,ie=J(F({},b.data.value),{dueDate:this.dateUtils.formatDate(b.data.value.dueDate,ue),dateFormat:ue,locale:G});this.savingsService.executeSavingsAccountChargesCommand(this.recurringDepositsAccountData.id,"paycharge",ie,e).subscribe(()=>{this.reload()})}})}waiveCharge(e){this.dialog.open(Kt,{data:{heading:this.translateService.instant("labels.heading.Waive Charge"),dialogContext:this.translateService.instant("labels.dialogContext.Are you sure you want to waive charge with id: ")+`${e} ?`}}).afterClosed().subscribe(p=>{p.confirm&&this.savingsService.executeSavingsAccountChargesCommand(this.recurringDepositsAccountData.id,"waive",{},e).subscribe(()=>{this.reload()})})}editCharge(e){let l=[new we({controlName:"amount",label:"Amount",value:e.amount||e.amountOrPercentage,type:"number",required:!0})],p={title:`Edit Charge ${e.id}`,layout:{addButtonText:"Confirm"},formfields:l};this.dialog.open(Ce,{data:p}).afterClosed().subscribe(b=>{if(b.data){let ie=J(F({},b.data.value),{dateFormat:"dd MMMM yyyy",locale:"en"});this.savingsService.editSavingsAccountCharge(this.recurringDepositsAccountData.id,ie,e.id).subscribe(()=>{this.reload()})}})}deleteCharge(e){this.dialog.open(ce,{data:{deleteContext:`charge id:${e}`}}).afterClosed().subscribe(p=>{p.delete&&this.savingsService.deleteSavingsAccountCharge(this.recurringDepositsAccountData.id,e).subscribe(()=>{this.reload()})})}routeEdit(e){e.stopPropagation()}reload(){let e=this.recurringDepositsAccountData.clientId,l=this.router.url;this.router.navigateByUrl(`/clients/${e}/recurring-deposits-accounts`,{skipLocationChange:!0}).then(()=>this.router.navigate([l]))}static{this.\u0275fac=function(l){return new(l||t)}}static{this.\u0275cmp=O({type:t,selectors:[["mifosx-charges-tab"]],viewQuery:function(l,p){if(l&1&&Pt(Xa,7),l&2){let g;Tt(g=St())&&(p.chargesTableRef=g.first)}},decls:44,vars:6,consts:[["chargesTable",""],[1,"tab-container","mat-typography"],[1,"layout-row","align-start"],[1,"m-b-10"],[1,"mat-elevation-z1","m-b-25"],["mat-table","",3,"dataSource"],["matColumnDef","name"],["mat-header-cell","",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","feeOrPenalty"],["matColumnDef","paymentDueAt"],["matColumnDef","dueAsOf"],["matColumnDef","repeatsOn"],["matColumnDef","calculationType"],["matColumnDef","due"],["matColumnDef","paid"],["matColumnDef","waived"],["matColumnDef","outstanding"],["matColumnDef","actions"],["mat-header-row","",4,"matHeaderRowDef"],["mat-row","",4,"matRowDef","matRowDefColumns"],["mat-header-cell",""],["mat-cell",""],["class","account-action-button","mat-raised-button","","color","primary",3,"matTooltip","click",4,"mifosxHasPermission"],["class","account-action-button","mat-raised-button","","color","warn",3,"matTooltip","click",4,"mifosxHasPermission"],["mat-raised-button","","color","primary",1,"account-action-button",3,"click","matTooltip"],[1,"fa","fa-pencil"],["mat-raised-button","","color","warn",1,"account-action-button",3,"click","matTooltip"],[1,"fa","fa-trash"],[1,"fa","fa-dollar"],[1,"fa","fa-flag"],["mat-header-row",""],["mat-row",""]],template:function(l,p){l&1&&(a(0,"div",1)(1,"div",2)(2,"div",3)(3,"h3"),o(4),r(5,"translate"),i()()(),a(6,"div",4)(7,"table",5,0),v(9,6),h(10,to,3,3,"th",7)(11,eo,2,1,"td",8),P(),v(12,9),h(13,no,3,3,"th",7)(14,io,2,1,"td",8),P(),v(15,10),h(16,ao,3,3,"th",7)(17,oo,2,1,"td",8),P(),v(18,11),h(19,ro,3,3,"th",7)(20,co,3,3,"td",8),P(),v(21,12),h(22,po,3,3,"th",7)(23,so,3,5,"td",8),P(),v(24,13),h(25,lo,3,3,"th",7)(26,mo,2,1,"td",8),P(),v(27,14),h(28,uo,3,3,"th",7)(29,go,2,2,"td",8),P(),v(30,15),h(31,Co,3,3,"th",7)(32,_o,2,2,"td",8),P(),v(33,16),h(34,fo,3,3,"th",7)(35,ho,2,2,"td",8),P(),v(36,17),h(37,xo,3,3,"th",7)(38,Do,2,2,"td",8),P(),v(39,18),h(40,bo,3,3,"th",7)(41,Oo,3,2,"td",8),P(),h(42,Io,1,0,"tr",19)(43,Ro,1,0,"tr",20),i()()()),l&2&&(n(4),m(c(5,4,"labels.heading.All Charges")),n(3),d("dataSource",p.dataSource),n(35),d("matHeaderRowDef",p.displayedColumns),n(),d("matRowDefColumns",p.displayedColumns))},dependencies:[I,R,V,re,wt,Ft,Bt,kt,Et,Nt,oe,Vt,Gt,qt,Ht,It,w],styles:[".tab-container[_ngcontent-%COMP%]{padding:1%;margin:1%}.tab-container[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{margin:1% auto}.tab-container[_ngcontent-%COMP%] .action-button[_ngcontent-%COMP%]{margin-left:auto}.tab-container[_ngcontent-%COMP%] table[_ngcontent-%COMP%]{width:100%}.tab-container[_ngcontent-%COMP%] table[_ngcontent-%COMP%] .account-action-button[_ngcontent-%COMP%]{min-width:26px;padding:0 6px;margin:4px;line-height:25px}"]})}}return t})();var cn=(()=>{class t{constructor(){this.route=_(N),this.entityId=this.route.parent.parent.snapshot.paramMap.get("recurringDepositAccountId"),this.route.data.subscribe(e=>{this.entityDatatable=e.savingsDatatable,this.multiRowDatatableFlag=this.entityDatatable.columnHeaders[0].columnName==="id"})}static{this.\u0275fac=function(l){return new(l||t)}}static{this.\u0275cmp=O({type:t,selectors:[["mifosx-datatable-tabs"]],decls:2,vars:3,consts:[[1,"tab-container","mat-typography"],["entityType","Recurring Deposit",3,"entityId","multiRowDatatableFlag","entityDatatable"]],template:function(l,p){l&1&&(a(0,"div",0),C(1,"mifosx-entity-datatable-tab",1),i()),l&2&&(n(),d("entityId",p.entityId)("multiRowDatatableFlag",p.multiRowDatatableFlag)("entityDatatable",p.entityDatatable))},dependencies:[I,R,oi],encapsulation:2})}}return t})();function wo(t,s){if(t&1&&(a(0,"mat-option",5),o(1),i()),t&2){let e=s.$implicit;d("value",e.id),n(),u(" ",e.name," ")}}function Eo(t,s){if(t&1){let e=y();a(0,"mat-form-field",11),T("click",function(){S(e);let p=E(7);return M(p.open())}),a(1,"mat-label"),o(2),r(3,"translate"),i(),C(4,"input",12)(5,"mat-datepicker-toggle",13)(6,"mat-datepicker",null,0),a(8,"mat-error"),o(9),r(10,"translate"),r(11,"translate"),a(12,"strong"),o(13),r(14,"translate"),i()()()}if(t&2){let e=E(7),l=f();n(2),m(c(3,8,"labels.inputs.Submitted On")),n(2),d("min",l.minDate)("max",l.maxDate)("matDatepicker",e),n(),d("for",e),n(4),A(" ",c(10,10,"labels.inputs.Submission Date")," ",c(11,12,"labels.commons.is")," "),n(4),m(c(14,14,"labels.commons.required"))}}function Bo(t,s){if(t&1&&(a(0,"mat-option",5),o(1),i()),t&2){let e=s.$implicit;d("value",e.id),n(),u(" ",e.displayName," ")}}function Fo(t,s){if(t&1&&(a(0,"mat-form-field",3)(1,"mat-label"),o(2),r(3,"translate"),i(),a(4,"mat-select",14),L(5,Bo,2,2,"mat-option",5,z),i()()),t&2){let e=f();n(2),m(c(3,1,"labels.inputs.Field Officer")),n(3),j(e.fieldOfficerData)}}function ko(t,s){t&1&&(a(0,"mat-form-field",3)(1,"mat-label"),o(2),r(3,"translate"),i(),C(4,"input",15),r(5,"translate"),i()),t&2&&(n(2),m(c(3,3,"labels.inputs.External id")),n(2),d("matTooltip",Mt(c(5,5,"tooltips.Provides an external id"))))}var se=(()=>{class t{constructor(){this.formBuilder=_(st),this.recurringDepositsService=_(k),this.settingsService=_($),this.minDate=new Date(2e3,0,1),this.maxDate=new Date,this.isFieldOfficerPatched=!1,this.isProductSelected=!1,this.recurringDepositsAccountProductTemplate=new Ve,this.createRecurringDepositsAccountDetailsForm()}ngOnInit(){this.maxDate=this.settingsService.businessDate,this.buildDependencies(),this.recurringDepositsAccountTemplate&&(this.productData=this.recurringDepositsAccountTemplate.productOptions,this.recurringDepositsAccountTemplate.depositProductId&&this.recurringDepositAccountDetailsForm.patchValue({productId:this.recurringDepositsAccountTemplate.depositProductId,submittedOnDate:this.recurringDepositsAccountTemplate.timeline.submittedOnDate&&new Date(this.recurringDepositsAccountTemplate.timeline.submittedOnDate),externalId:this.recurringDepositsAccountTemplate.externalId}))}createRecurringDepositsAccountDetailsForm(){this.recurringDepositAccountDetailsForm=this.formBuilder.group({productId:["",q.required],submittedOnDate:["",q.required],fieldOfficerId:[""],externalId:[""]})}buildDependencies(){let e=this.recurringDepositsAccountTemplate.clientId;this.recurringDepositAccountDetailsForm.get("productId").valueChanges.subscribe(l=>{this.recurringDepositsService.getRecurringDepositsAccountTemplate(e,l).subscribe(p=>{this.recurringDepositsAccountProductTemplate.emit(p),this.fieldOfficerData=p.fieldOfficerOptions,this.isProductSelected=!0,!this.isFieldOfficerPatched&&this.recurringDepositsAccountTemplate.fieldOfficerId?(this.recurringDepositAccountDetailsForm.get("fieldOfficerId").patchValue(this.recurringDepositsAccountTemplate.fieldOfficerId),this.isFieldOfficerPatched=!0):this.recurringDepositAccountDetailsForm.get("fieldOfficerId").patchValue("")})})}get recurringDepositAccountDetails(){return this.recurringDepositAccountDetailsForm.value}static{this.\u0275fac=function(l){return new(l||t)}}static{this.\u0275cmp=O({type:t,selectors:[["mifosx-recurring-deposits-account-details-step"]],inputs:{recurringDepositsAccountTemplate:"recurringDepositsAccountTemplate"},outputs:{recurringDepositsAccountProductTemplate:"recurringDepositsAccountProductTemplate"},decls:28,vars:23,consts:[["submittedOnDatePicker",""],[3,"formGroup"],[1,"layout-row-wrap","gap-2px","responsive-column"],[1,"flex-48"],["formControlName","productId","required",""],[3,"value"],[1,"layout-row","align-center","gap-2percent","margin-t","responsive-column"],["mat-raised-button","","matStepperPrevious","","disabled",""],["icon","arrow-left",1,"m-r-10"],["mat-raised-button","","matStepperNext","",3,"disabled"],["icon","arrow-right",1,"m-l-10"],[1,"flex-48",3,"click"],["matInput","","formControlName","submittedOnDate","required","",3,"min","max","matDatepicker"],["matSuffix","",3,"for"],["formControlName","fieldOfficerId"],["matInput","","formControlName","externalId",3,"matTooltip"]],template:function(l,p){if(l&1&&(a(0,"form",1)(1,"div",2)(2,"mat-form-field",3)(3,"mat-label"),o(4),r(5,"translate"),i(),a(6,"mat-select",4),L(7,wo,2,2,"mat-option",5,z),i(),a(9,"mat-error"),o(10),r(11,"translate"),r(12,"translate"),a(13,"strong"),o(14),r(15,"translate"),i()()(),x(16,Eo,15,16,"mat-form-field",3),x(17,Fo,7,3,"mat-form-field",3),x(18,ko,6,7,"mat-form-field",3),i(),a(19,"div",6)(20,"button",7),C(21,"fa-icon",8),o(22),r(23,"translate"),i(),a(24,"button",9),o(25),r(26,"translate"),C(27,"fa-icon",10),i()()()),l&2){let g;d("formGroup",p.recurringDepositAccountDetailsForm),n(4),m(c(5,11,"labels.inputs.Product Name")),n(3),j(p.productData),n(3),A(" ",c(11,13,"labels.inputs.Product Name")," ",c(12,15,"labels.commons.is")," "),n(4),m(c(15,17,"labels.commons.required")),n(2),D(p.isProductSelected?16:-1),n(),D(p.isProductSelected?17:-1),n(),D(p.isProductSelected?18:-1),n(4),u(" ",c(23,19,"labels.buttons.Previous")," "),n(2),d("disabled",!((g=p.recurringDepositAccountDetailsForm.get("productId"))!=null&&g.value)||!((g=p.recurringDepositAccountDetailsForm.get("submittedOnDate"))!=null&&g.value)),n(),u(" ",c(26,21,"labels.buttons.Next")," ")}},dependencies:[I,R,rt,mt,Z,ot,dt,ct,pt,nt,et,gt,ht,Ct,Ot,yt,Dt,bt,xt,V,oe,jt,_t,Zt,w],styles:[".margin-t[_ngcontent-%COMP%]{margin-top:1em}"]})}}return t})();function No(t,s){if(t&1&&(a(0,"mat-option",4),o(1),r(2,"translateKey"),i()),t&2){let e=s.$implicit;d("value",e.id),n(),u(" ",B(2,2,e.value,"catalogs")," ")}}function Vo(t,s){if(t&1&&(a(0,"mat-option",4),o(1),r(2,"translateKey"),i()),t&2){let e=s.$implicit;d("value",e.id),n(),u(" ",B(2,2,e.value,"catalogs")," ")}}function qo(t,s){if(t&1&&(a(0,"mat-option",4),o(1),r(2,"translateKey"),i()),t&2){let e=s.$implicit;d("value",e.id),n(),u(" ",B(2,2,e.value,"catalogs")," ")}}function Go(t,s){if(t&1&&(a(0,"mat-option",4),o(1),r(2,"translateKey"),i()),t&2){let e=s.$implicit;d("value",e.id),n(),u(" ",B(2,2,e.value,"catalogs")," ")}}var le=(()=>{class t{constructor(){this.formBuilder=_(st),this.settingsService=_($),this.minDate=new Date(2e3,0,1),this.maxDate=new Date,this.createRecurringDepositsAccountTermsForm()}ngOnChanges(){this.recurringDepositsAccountProductTemplate&&this.setOptions()}ngOnInit(){this.maxDate=this.settingsService.businessDate,this.recurringDepositsAccountTemplate.id&&this.recurringDepositAccountTermsForm.patchValue({interestCompoundingPeriodType:this.recurringDepositsAccountTemplate.interestCompoundingPeriodType.id,interestPostingPeriodType:this.recurringDepositsAccountTemplate.interestPostingPeriodType.id,interestCalculationType:this.recurringDepositsAccountTemplate.interestCalculationType.id,interestCalculationDaysInYearType:this.recurringDepositsAccountTemplate.interestCalculationDaysInYearType.id})}createRecurringDepositsAccountTermsForm(){this.recurringDepositAccountTermsForm=this.formBuilder.group({interestCompoundingPeriodType:["",q.required],interestPostingPeriodType:["",q.required],interestCalculationType:["",q.required],interestCalculationDaysInYearType:["",q.required]})}setOptions(){this.interestCompoundingPeriodTypeData=this.recurringDepositsAccountProductTemplate.interestCompoundingPeriodTypeOptions,this.interestPostingPeriodTypeData=this.recurringDepositsAccountProductTemplate.interestPostingPeriodTypeOptions,this.interestCalculationTypeData=this.recurringDepositsAccountProductTemplate.interestCalculationTypeOptions,this.interestCalculationDaysInYearTypeData=this.recurringDepositsAccountProductTemplate.interestCalculationDaysInYearTypeOptions,this.recurringDepositsAccountTemplate.id||this.recurringDepositAccountTermsForm.patchValue({interestCompoundingPeriodType:this.recurringDepositsAccountProductTemplate.interestCompoundingPeriodType.id,interestPostingPeriodType:this.recurringDepositsAccountProductTemplate.interestPostingPeriodType.id,interestCalculationType:this.recurringDepositsAccountProductTemplate.interestCalculationType.id,interestCalculationDaysInYearType:this.recurringDepositsAccountProductTemplate.interestCalculationDaysInYearType.id})}get recurringDepositAccountTerms(){return this.recurringDepositAccountTermsForm.value}static{this.\u0275fac=function(l){return new(l||t)}}static{this.\u0275cmp=O({type:t,selectors:[["mifosx-recurring-deposits-account-terms-step"]],inputs:{recurringDepositsAccountTemplate:"recurringDepositsAccountTemplate",recurringDepositsAccountProductTemplate:"recurringDepositsAccountProductTemplate"},features:[Yt],decls:67,vars:55,consts:[[3,"formGroup"],[1,"layout-row-wrap","gap-2px","responsive-column"],[1,"flex-48"],["formControlName","interestCompoundingPeriodType","required",""],[3,"value"],["formControlName","interestPostingPeriodType","required",""],["formControlName","interestCalculationType","required",""],["formControlName","interestCalculationDaysInYearType","required",""],[1,"layout-row","align-center","gap-2percent","margin-t","responsive-column"],["mat-raised-button","","matStepperPrevious",""],["icon","arrow-left",1,"m-r-10"],["mat-raised-button","","matStepperNext",""],["icon","arrow-right",1,"m-l-10"]],template:function(l,p){l&1&&(a(0,"form",0)(1,"div",1)(2,"mat-form-field",2)(3,"mat-label"),o(4),r(5,"translate"),i(),a(6,"mat-select",3),L(7,No,3,5,"mat-option",4,z),i(),a(9,"mat-error"),o(10),r(11,"translate"),r(12,"translate"),a(13,"strong"),o(14),r(15,"translate"),i()()(),a(16,"mat-form-field",2)(17,"mat-label"),o(18),r(19,"translate"),i(),a(20,"mat-select",5),L(21,Vo,3,5,"mat-option",4,z),i(),a(23,"mat-error"),o(24),r(25,"translate"),r(26,"translate"),a(27,"strong"),o(28),r(29,"translate"),i()()(),a(30,"mat-form-field",2)(31,"mat-label"),o(32),r(33,"translate"),i(),a(34,"mat-select",6),L(35,qo,3,5,"mat-option",4,z),i(),a(37,"mat-error"),o(38),r(39,"translate"),r(40,"translate"),a(41,"strong"),o(42),r(43,"translate"),i()()(),a(44,"mat-form-field",2)(45,"mat-label"),o(46),r(47,"translate"),i(),a(48,"mat-select",7),L(49,Go,3,5,"mat-option",4,z),i(),a(51,"mat-error"),o(52),r(53,"translate"),r(54,"translate"),a(55,"strong"),o(56),r(57,"translate"),i()()()(),a(58,"div",8)(59,"button",9),C(60,"fa-icon",10),o(61),r(62,"translate"),i(),a(63,"button",11),o(64),r(65,"translate"),C(66,"fa-icon",12),i()()()),l&2&&(d("formGroup",p.recurringDepositAccountTermsForm),n(4),m(c(5,19,"labels.inputs.Interest Compounding Period")),n(3),j(p.interestCompoundingPeriodTypeData),n(3),A(" ",c(11,21,"labels.inputs.Interest Compounding Period")," ",c(12,23,"labels.commons.is")," "),n(4),m(c(15,25,"labels.commons.required")),n(4),m(c(19,27,"labels.inputs.Interest Posting Period")),n(3),j(p.interestPostingPeriodTypeData),n(3),A(" ",c(25,29,"labels.inputs.Interest Posting Period")," ",c(26,31,"labels.commons.is")," "),n(4),m(c(29,33,"labels.commons.required")),n(4),m(c(33,35,"labels.inputs.Interest Calculated using")),n(3),j(p.interestCalculationTypeData),n(3),A(" ",c(39,37,"labels.inputs.Interest Calculated using")," ",c(40,39,"labels.commons.is")," "),n(4),m(c(43,41,"labels.commons.required")),n(4),m(c(47,43,"labels.inputs.Days in Year")),n(3),j(p.interestCalculationDaysInYearTypeData),n(3),A(" ",c(53,45,"labels.inputs.Days in Year")," ",c(54,47,"labels.commons.is")," "),n(4),m(c(57,49,"labels.commons.required")),n(5),u(" ",c(62,51,"labels.buttons.Previous")," "),n(3),u(" ",c(65,53,"labels.buttons.Next")," "))},dependencies:[I,R,rt,Z,ot,dt,ct,pt,nt,et,gt,Ot,yt,V,jt,_t,Zt,w,Rt],encapsulation:2})}}return t})();function Ho(t,s){if(t&1&&(a(0,"mat-option",10),o(1),r(2,"translateKey"),i()),t&2){let e=s.$implicit;d("value",e.id),n(),u(" ",B(2,2,e.value,"catalogs")," ")}}function Uo(t,s){if(t&1&&C(0,"mifosx-input-amount",11),t&2){let e=f();d("currency",e.currency)("isRequired",!0)("inputFormControl",e.recurringDepositAccountSettingsForm.controls.mandatoryRecommendedDepositAmount)("inputLabel","Recurring Deposit Amount")}}function $o(t,s){if(t&1&&(a(0,"mat-option",10),o(1),r(2,"translateKey"),i()),t&2){let e=s.$implicit;d("value",e.id),n(),u(" ",B(2,2,e.value,"catalogs")," ")}}function zo(t,s){if(t&1&&(a(0,"mat-option",10),o(1),r(2,"translateKey"),i()),t&2){let e=s.$implicit;d("value",e.id),n(),u(" ",B(2,2,e.value,"catalogs")," ")}}function Lo(t,s){if(t&1){let e=y();a(0,"mat-form-field",31),T("click",function(){S(e);let p=E(7);return M(p.open())}),a(1,"mat-label"),o(2),r(3,"translate"),i(),C(4,"input",32)(5,"mat-datepicker-toggle",33)(6,"mat-datepicker",null,0),i(),a(8,"h4",6),o(9),r(10,"translate"),i(),a(11,"mat-form-field",7)(12,"mat-label"),o(13),r(14,"translate"),i(),C(15,"input",34),a(16,"mat-error"),o(17),r(18,"translate"),r(19,"translate"),a(20,"strong"),o(21),r(22,"translate"),i()()(),a(23,"mat-form-field",7)(24,"mat-label"),o(25),r(26,"translate"),i(),a(27,"mat-select",35),L(28,zo,3,5,"mat-option",10,z),i(),a(30,"mat-error"),o(31),r(32,"translate"),r(33,"translate"),a(34,"strong"),o(35),r(36,"translate"),i()()()}if(t&2){let e=E(7),l=f();n(2),m(c(3,14,"labels.inputs.Deposit Start Date")),n(2),d("min",l.minDate)("max",l.maxDate)("matDatepicker",e),n(),d("for",e),n(4),m(c(10,16,"labels.heading.Deposit Frequency")),n(4),m(c(14,18,"labels.inputs.Deposit Frequency")),n(4),A(" ",c(18,20,"labels.inputs.Deposit Frequency")," ",c(19,22,"labels.commons.is")," "),n(4),m(c(22,24,"labels.commons.required")),n(4),m(c(26,26,"labels.inputs.Type")),n(3),j(l.periodFrequencyTypeData),n(3),A(" ",c(32,28,"labels.inputs.Deposit Frequency Type")," ",c(33,30,"labels.commons.is")," "),n(4),m(c(36,32,"labels.commons.required"))}}function jo(t,s){if(t&1&&(a(0,"mat-option",10),o(1),r(2,"translateKey"),i()),t&2){let e=s.$implicit;d("value",e.id),n(),u(" ",B(2,2,e.value,"catalogs")," ")}}function Wo(t,s){if(t&1&&(a(0,"mat-option",10),o(1),r(2,"translateKey"),i()),t&2){let e=s.$implicit;d("value",e.id),n(),u(" ",B(2,2,e.value,"catalogs")," ")}}function Ko(t,s){if(t&1&&(a(0,"mat-option",10),o(1),r(2,"translateKey"),i()),t&2){let e=s.$implicit;d("value",e.id),n(),u(" ",B(2,2,e.value,"catalogs")," ")}}function Qo(t,s){if(t&1&&(a(0,"mat-option",10),o(1),r(2,"translateKey"),i()),t&2){let e=s.$implicit;d("value",e.id),n(),u(" ",B(2,2,e.value,"catalogs")," ")}}function Yo(t,s){t&1&&(a(0,"mat-form-field",7)(1,"mat-label"),o(2),r(3,"translate"),i(),C(4,"input",37),i()),t&2&&(n(2),m(c(3,1,"labels.inputs.Tax Group")))}function Jo(t,s){if(t&1&&(a(0,"h4",6),o(1),r(2,"translate"),i(),a(3,"mat-checkbox",36),o(4),r(5,"translate"),i(),x(6,Yo,5,3,"mat-form-field",7)),t&2){let e=f();n(),m(c(2,3,"labels.heading.Tax Group")),n(3),u(" ",c(5,5,"labels.inputs.Is Withhold Tax Applicable"),"? "),n(2),D(e.recurringDepositAccountSettingsForm.controls.taxGroupId?6:-1)}}var me=(()=>{class t{constructor(){this.formBuilder=_(st),this.settingsService=_($),this.isNew=!0,this.minDate=new Date(2e3,0,1),this.maxDate=new Date,this.currency=null,this.createRecurringDepositAccountSettingsForm(),this.buildDependencies()}ngOnChanges(){let e=this.isNew?this.recurringDepositsAccountProductTemplate:this.recurringDepositsAccountTemplate;e&&(this.currency=e.currency,this.recurringDepositAccountSettingsForm.patchValue({isMandatoryDeposit:e.isMandatoryDeposit,adjustAdvanceTowardsFuturePayments:e.adjustAdvanceTowardsFuturePayments,allowWithdrawal:e.allowWithdrawal,lockinPeriodFrequency:e.lockinPeriodFrequency,lockinPeriodFrequencyType:e.lockinPeriodFrequencyType?e.lockinPeriodFrequencyType.id:"",minDepositTerm:e.minDepositTerm,minDepositTermTypeId:e.minDepositTermType?e.minDepositTermType.id:"",inMultiplesOfDepositTerm:e.inMultiplesOfDepositTerm,inMultiplesOfDepositTermTypeId:e.inMultiplesOfDepositTermType?e.inMultiplesOfDepositTermType.id:"",maxDepositTerm:e.maxDepositTerm,maxDepositTermTypeId:e.maxDepositTermType?e.maxDepositTermType.id:"",preClosurePenalApplicable:e.preClosurePenalApplicable,preClosurePenalInterest:e.preClosurePenalInterest,preClosurePenalInterestOnTypeId:e.preClosurePenalInterestOnType?e.preClosurePenalInterestOnType.id:"",minBalanceForInterestCalculation:e.minBalanceForInterestCalculation,depositPeriod:e.minDepositTerm,depositPeriodFrequencyId:e.minDepositTermType.id,expectedFirstDepositOnDate:e.expectedFirstDepositOnDate&&new Date(e.expectedFirstDepositOnDate),recurringFrequency:e.recurringFrequency,recurringFrequencyType:e.recurringFrequencyType?e.recurringFrequencyType.id:""}),e.withHoldTax?(this.recurringDepositAccountSettingsForm.addControl("withHoldTax",new tt(!1)),this.recurringDepositAccountSettingsForm.get("withHoldTax").valueChanges.subscribe(l=>{l?(this.recurringDepositAccountSettingsForm.addControl("taxGroupId",new tt({value:"",disabled:!0})),this.recurringDepositAccountSettingsForm.get("taxGroupId").patchValue(e.taxGroup&&e.taxGroup.name)):this.recurringDepositAccountSettingsForm.removeControl("taxGroupId")}),this.recurringDepositAccountSettingsForm.get("withHoldTax").patchValue(this.recurringDepositsAccountTemplate.withHoldTax)):this.recurringDepositAccountSettingsForm.removeControl("withHoldTax"),this.taxGroup=e.taxGroup,this.setOptions(e))}ngOnInit(){this.maxDate=this.settingsService.businessDate,this.recurringDepositsAccountTemplate&&this.recurringDepositAccountSettingsForm.patchValue({lockinPeriodFrequency:this.recurringDepositsAccountTemplate.lockinPeriodFrequency,lockinPeriodFrequencyType:this.recurringDepositsAccountTemplate.lockinPeriodFrequencyType&&this.recurringDepositsAccountTemplate.lockinPeriodFrequencyType.id,mandatoryRecommendedDepositAmount:this.recurringDepositsAccountTemplate.mandatoryRecommendedDepositAmount})}createRecurringDepositAccountSettingsForm(){this.recurringDepositAccountSettingsForm=this.formBuilder.group({isMandatoryDeposit:[""],adjustAdvanceTowardsFuturePayments:[""],allowWithdrawal:[""],lockinPeriodFrequency:[""],lockinPeriodFrequencyType:[""],mandatoryRecommendedDepositAmount:["",q.required],depositPeriod:["",q.required],depositPeriodFrequencyId:["",q.required],isCalendarInherited:[""],expectedFirstDepositOnDate:[""],recurringFrequency:["",q.required],recurringFrequencyType:["",q.required],minDepositTerm:[{value:"",disabled:!0}],minDepositTermTypeId:[{value:"",disabled:!0}],inMultiplesOfDepositTerm:[{value:"",disabled:!0}],inMultiplesOfDepositTermTypeId:[{value:"",disabled:!0}],maxDepositTerm:[{value:"",disabled:!0}],maxDepositTermTypeId:[{value:"",disabled:!0}],preClosurePenalApplicable:[{value:"",disabled:!0}],preClosurePenalInterest:[{value:"",disabled:!0}],preClosurePenalInterestOnTypeId:[{value:"",disabled:!0}],minBalanceForInterestCalculation:[{value:"",disabled:!0}]})}setOptions(e){this.lockinPeriodFrequencyTypeData=e.lockinPeriodFrequencyTypeOptions,this.periodFrequencyTypeData=e.periodFrequencyTypeOptions,this.preClosurePenalInterestOnTypeData=e.preClosurePenalInterestOnTypeOptions}buildDependencies(){this.recurringDepositAccountSettingsForm.get("isCalendarInherited").valueChanges.subscribe(e=>{e?(this.recurringDepositAccountSettingsForm.removeControl("expectedFirstDepositOnDate"),this.recurringDepositAccountSettingsForm.removeControl("recurringFrequency"),this.recurringDepositAccountSettingsForm.removeControl("recurringFrequencyType")):(this.recurringDepositAccountSettingsForm.addControl("expectedFirstDepositOnDate",new tt),this.recurringDepositAccountSettingsForm.addControl("recurringFrequency",new tt("")),this.recurringDepositAccountSettingsForm.addControl("recurringFrequencyType",new tt("")))})}get recurringDepositAccountSettings(){return this.recurringDepositAccountSettingsForm.value}static{this.\u0275fac=function(l){return new(l||t)}}static{this.\u0275cmp=O({type:t,selectors:[["mifosx-recurring-deposits-account-settings-step"]],inputs:{isNew:"isNew",recurringDepositsAccountTemplate:"recurringDepositsAccountTemplate",recurringDepositsAccountProductTemplate:"recurringDepositsAccountProductTemplate"},features:[Yt],decls:143,vars:103,consts:[["expectedFirstDepositOnDatePicker",""],[3,"formGroup"],[1,"layout-row-wrap","gap-2px","responsive-column"],["labelPosition","before","formControlName","isMandatoryDeposit",1,"margin-v","flex-48"],["labelPosition","before","formControlName","adjustAdvanceTowardsFuturePayments",1,"flex-48","margin-v"],["labelPosition","before","formControlName","allowWithdrawal",1,"margin-v","flex-48"],[1,"mat-h4","flex-98"],[1,"flex-48"],["type","number","matInput","","formControlName","lockinPeriodFrequency"],["formControlName","lockinPeriodFrequencyType"],[3,"value"],[1,"flex-48",3,"currency","isRequired","inputFormControl","inputLabel"],["type","number","matInput","","formControlName","depositPeriod","required",""],["formControlName","depositPeriodFrequencyId","required",""],["labelPosition","before","formControlName","isCalendarInherited",1,"margin-v","flex-48"],[1,"flex-98"],["type","number","matInput","","formControlName","minDepositTerm","required",""],["formControlName","minDepositTermTypeId","required",""],["type","number","matInput","","formControlName","inMultiplesOfDepositTerm"],["formControlName","inMultiplesOfDepositTermTypeId"],["type","number","matInput","","formControlName","maxDepositTerm"],["formControlName","maxDepositTermTypeId"],["labelPosition","before","formControlName","preClosurePenalApplicable",1,"flex-73","margin-v"],["type","number","matInput","","formControlName","preClosurePenalInterest"],["formControlName","preClosurePenalInterestOnTypeId"],["type","number","matInput","","formControlName","minBalanceForInterestCalculation"],[1,"layout-row","align-center","gap-2percent","margin-t","responsive-column"],["mat-raised-button","","matStepperPrevious",""],["icon","arrow-left",1,"m-r-10"],["mat-raised-button","","matStepperNext",""],["icon","arrow-right",1,"m-l-10"],[1,"flex-48",3,"click"],["matInput","","formControlName","expectedFirstDepositOnDate","required","",3,"min","max","matDatepicker"],["matSuffix","",3,"for"],["type","number","matInput","","formControlName","recurringFrequency","required",""],["formControlName","recurringFrequencyType","required",""],["labelPosition","before","formControlName","withHoldTax",1,"margin-v","flex-48"],["type","text","matInput","","formControlName","taxGroupId"]],template:function(l,p){l&1&&(a(0,"form",1)(1,"div",2)(2,"mat-checkbox",3),o(3),r(4,"translate"),i(),a(5,"mat-checkbox",4),o(6),r(7,"translate"),i(),a(8,"mat-checkbox",5),o(9),r(10,"translate"),i(),a(11,"h4",6),o(12),r(13,"translate"),i(),a(14,"mat-form-field",7)(15,"mat-label"),o(16),r(17,"translate"),i(),C(18,"input",8),i(),a(19,"mat-form-field",7)(20,"mat-label"),o(21),r(22,"translate"),i(),a(23,"mat-select",9),L(24,Ho,3,5,"mat-option",10,z),i()(),a(26,"h4",6),o(27),r(28,"translate"),i(),x(29,Uo,1,4,"mifosx-input-amount",11),a(30,"h4",6),o(31),r(32,"translate"),i(),a(33,"mat-form-field",7)(34,"mat-label"),o(35),r(36,"translate"),i(),C(37,"input",12),i(),a(38,"mat-form-field",7)(39,"mat-label"),o(40),r(41,"translate"),i(),a(42,"mat-select",13),L(43,$o,3,5,"mat-option",10,z),i()(),a(45,"mat-checkbox",14),o(46),r(47,"translate"),i(),x(48,Lo,37,34),C(49,"mat-divider",15),a(50,"h4",6),o(51),r(52,"translate"),i(),a(53,"mat-form-field",7)(54,"mat-label"),o(55),r(56,"translate"),i(),C(57,"input",16),a(58,"mat-error"),o(59),r(60,"translate"),r(61,"translate"),a(62,"strong"),o(63),r(64,"translate"),i()()(),a(65,"mat-form-field",7)(66,"mat-label"),o(67),r(68,"translate"),i(),a(69,"mat-select",17),L(70,jo,3,5,"mat-option",10,z),i(),a(72,"mat-error"),o(73),r(74,"translate"),r(75,"translate"),a(76,"strong"),o(77),r(78,"translate"),i()()(),a(79,"h4",6),o(80),r(81,"translate"),i(),a(82,"mat-form-field",7)(83,"mat-label"),o(84),r(85,"translate"),i(),C(86,"input",18),i(),a(87,"mat-form-field",7)(88,"mat-label"),o(89),r(90,"translate"),i(),a(91,"mat-select",19),L(92,Wo,3,5,"mat-option",10,z),i()(),a(94,"h4",6),o(95),r(96,"translate"),i(),a(97,"mat-form-field",7)(98,"mat-label"),o(99),r(100,"translate"),i(),C(101,"input",20),i(),a(102,"mat-form-field",7)(103,"mat-label"),o(104),r(105,"translate"),i(),a(106,"mat-select",21),L(107,Ko,3,5,"mat-option",10,z),i()(),C(109,"mat-divider",15),a(110,"h4",6),o(111),r(112,"translate"),i(),a(113,"mat-checkbox",22),o(114),r(115,"translate"),i(),a(116,"mat-form-field",7)(117,"mat-label"),o(118),r(119,"translate"),i(),C(120,"input",23),i(),a(121,"mat-form-field",7)(122,"mat-label"),o(123),r(124,"translate"),i(),a(125,"mat-select",24),L(126,Qo,3,5,"mat-option",10,z),i()(),a(128,"mat-form-field",7)(129,"mat-label"),o(130),r(131,"translate"),i(),C(132,"input",25),i(),x(133,Jo,7,7),i(),a(134,"div",26)(135,"button",27),C(136,"fa-icon",28),o(137),r(138,"translate"),i(),a(139,"button",29),o(140),r(141,"translate"),C(142,"fa-icon",30),i()()()),l&2&&(d("formGroup",p.recurringDepositAccountSettingsForm),n(3),u(" ",c(4,37,"labels.inputs.Is Mandatory Deposit"),"? "),n(3),u(" ",c(7,39,"labels.inputs.Adjust advance payments toward future installments"),"? "),n(3),u(" ",c(10,41,"labels.inputs.Allow Withdrawals"),"? "),n(3),m(c(13,43,"labels.heading.Lock-in Period")),n(4),m(c(17,45,"labels.inputs.Frequency")),n(5),m(c(22,47,"labels.inputs.Type")),n(3),j(p.lockinPeriodFrequencyTypeData),n(3),m(c(28,49,"labels.heading.Recurring Deposit Details")),n(2),D(p.currency?29:-1),n(2),m(c(32,51,"labels.heading.Deposit Period")),n(4),m(c(36,53,"labels.inputs.Deposit Period")),n(5),m(c(41,55,"labels.inputs.Type")),n(3),j(p.periodFrequencyTypeData),n(3),u(" ",c(47,57,"labels.inputs.Deposit Frequency Same as Group/Center meeting")," "),n(2),D(p.recurringDepositAccountSettingsForm.value.isCalendarInherited?-1:48),n(3),m(c(52,59,"labels.heading.Minimum Deposit Term")),n(4),m(c(56,61,"labels.inputs.Frequency")),n(4),A(" ",c(60,63,"labels.inputs.Minimum Deposit Term Frequency")," ",c(61,65,"labels.commons.is")," "),n(4),m(c(64,67,"labels.commons.required")),n(4),m(c(68,69,"labels.inputs.Frequency Type")),n(3),j(p.periodFrequencyTypeData),n(3),A(" ",c(74,71,"labels.inputs.Minimum Deposit Term Frequency Type")," ",c(75,73,"labels.commons.is")," "),n(4),m(c(78,75,"labels.commons.required")),n(3),m(c(81,77,"labels.heading.And thereafter, in Multiples of")),n(4),m(c(85,79,"labels.inputs.Frequency")),n(5),m(c(90,81,"labels.inputs.Type")),n(3),j(p.periodFrequencyTypeData),n(3),m(c(96,83,"labels.heading.Maximum Deposit Term")),n(4),m(c(100,85,"labels.inputs.Frequency")),n(5),m(c(105,87,"labels.inputs.Type")),n(3),j(p.periodFrequencyTypeData),n(4),m(c(112,89,"labels.heading.For Pre-mature closure")),n(3),u(" ",c(115,91,"labels.inputs.Apply Penal Interest (less)")," "),n(4),u("",c(119,93,"labels.inputs.Penal Interest")," (%)"),n(5),m(c(124,95,"labels.inputs.Period")),n(3),j(p.preClosurePenalInterestOnTypeData),n(4),m(c(131,97,"labels.inputs.Minimum Balance For Interest Calculation")),n(3),D(p.taxGroup?133:-1),n(4),u(" ",c(138,99,"labels.buttons.Previous")," "),n(3),u(" ",c(141,101,"labels.buttons.Next")," "))},dependencies:[I,R,rt,mt,Re,Z,ot,dt,ct,pt,nt,et,gt,ht,Ct,Ot,yt,Dt,bt,xt,V,He,Ee,Ue,jt,_t,Zt,w,Rt],styles:["h4[_ngcontent-%COMP%]{font-weight:500;margin:1em 0}h3[_ngcontent-%COMP%]{font-weight:500}mat-divider[_ngcontent-%COMP%]{margin:1em 0 2em}.margin-v[_ngcontent-%COMP%]{margin:1em 0}.margin-b[_ngcontent-%COMP%]{margin:0 0 1em}.margin-t[_ngcontent-%COMP%]{margin-top:1em}"]})}}return t})();function Xo(t,s){if(t&1&&(a(0,"mat-option",3),o(1),i()),t&2){let e=s.$implicit;d("value",e),n(),u(" ",e.name," ")}}function Zo(t,s){t&1&&(a(0,"th",24),o(1),r(2,"translate"),i()),t&2&&(n(),m(c(2,1,"labels.inputs.name")))}function tr(t,s){if(t&1&&(a(0,"td",25),o(1),i()),t&2){let e=s.$implicit;n(),u(" ",e.name+", "+e.currency.displaySymbol," ")}}function er(t,s){t&1&&(a(0,"th",24),o(1),r(2,"translate"),i()),t&2&&(n(),m(c(2,1,"labels.inputs.Type")))}function nr(t,s){if(t&1&&(a(0,"td",25),o(1),r(2,"translateKey"),i()),t&2){let e=s.$implicit;n(),u(" ",B(2,1,e.chargeCalculationType.value,"catalogs")," ")}}function ir(t,s){t&1&&(a(0,"th",24),o(1),r(2,"translate"),i()),t&2&&(n(),m(c(2,1,"labels.inputs.Amount")))}function ar(t,s){if(t&1){let e=y();a(0,"td",25),o(1),r(2,"formatNumber"),a(3,"button",26),T("click",function(){let p=S(e).$implicit,g=f();return M(g.editChargeAmount(p))}),C(4,"fa-icon",27),i()()}if(t&2){let e=s.$implicit;n(),u(" ",c(2,1,e.amount)," ")}}function or(t,s){t&1&&(a(0,"th",24),o(1),r(2,"translate"),i()),t&2&&(n(),m(c(2,1,"labels.inputs.Collected On")))}function rr(t,s){if(t&1&&(a(0,"td",25),o(1),r(2,"translateKey"),i()),t&2){let e=s.$implicit;n(),u(" ",B(2,1,e.chargeTimeType.value,"catalogs")," ")}}function cr(t,s){t&1&&(a(0,"th",24),o(1),r(2,"translate"),i()),t&2&&(n(),m(c(2,1,"labels.inputs.Date")))}function pr(t,s){if(t&1&&(a(0,"span"),o(1),r(2,"dateFormat"),i()),t&2){let e=f().$implicit;n(),u(" ",c(2,1,e.dueDate)||"Unassigned"," ")}}function sr(t,s){if(t&1&&(a(0,"span"),o(1),r(2,"dateFormat"),i()),t&2){let e=f().$implicit;n(),u(" ",c(2,1,e.feeOnMonthDay)||"Unassigned"," ")}}function lr(t,s){t&1&&(a(0,"span"),o(1),r(2,"translate"),i()),t&2&&(n(),u(" ",c(2,1,"labels.inputs.N/A")," "))}function mr(t,s){if(t&1){let e=y();a(0,"button",26),T("click",function(){S(e);let p=f().$implicit,g=f();return M(g.editChargeDate(p))}),C(1,"fa-icon",27),i()}}function dr(t,s){if(t&1&&(a(0,"td",25),x(1,pr,3,3,"span"),x(2,sr,3,3,"span"),x(3,lr,3,3,"span"),x(4,mr,2,0,"button",28),i()),t&2){let e=s.$implicit;n(),D(e.chargeTimeType.value==="Specified due date"||e.chargeTimeType.value==="Weekly Fee"?1:-1),n(),D(e.chargeTimeType.value==="Monthly Fee"||e.chargeTimeType.value==="Annual Fee"?2:-1),n(),D(e.chargeTimeType.value==="Monthly Fee"||e.chargeTimeType.value==="Annual Fee"||e.chargeTimeType.value==="Specified due date"||e.chargeTimeType.value==="Weekly Fee"?-1:3),n(),D(e.chargeTimeType.value==="Weekly Fee"||e.chargeTimeType.value==="Annual Fee"||e.chargeTimeType.value==="Specified due date"?4:-1)}}function ur(t,s){t&1&&(a(0,"th",24),o(1),r(2,"translate"),i()),t&2&&(n(),m(c(2,1,"labels.inputs.Repayments Every")))}function gr(t,s){if(t&1){let e=y();a(0,"button",26),T("click",function(){S(e);let p=f().$implicit,g=f();return M(g.editChargeFeeInterval(p))}),C(1,"fa-icon",27),i()}}function Cr(t,s){if(t&1&&(a(0,"td",25),o(1),x(2,gr,2,0,"button",28),i()),t&2){let e=s.$implicit;n(),u(" ",e.feeInterval||"Not Provided"," "),n(),D(e.chargeTimeType.value==="Weekly Fee"||e.chargeTimeType.value==="Monthly Fee"?2:-1)}}function _r(t,s){t&1&&(a(0,"th",24),o(1),r(2,"translate"),i()),t&2&&(n(),m(c(2,1,"labels.inputs.Actions")))}function fr(t,s){if(t&1){let e=y();a(0,"td",25)(1,"button",29),T("click",function(){let p=S(e).$implicit,g=f();return M(g.deleteCharge(p))}),C(2,"fa-icon",30),i()()}}function hr(t,s){t&1&&C(0,"tr",31)}function xr(t,s){t&1&&C(0,"tr",32)}var de=(()=>{class t{constructor(){this.dialog=_(Xt),this.dateUtils=_(X),this.settingsService=_($),this.chargesDataSource=[],this.displayedColumns=["name","chargeCalculationType","amount","chargeTimeType","date","repaymentsEvery","action"],this.pristine=!0,this.isChargesPatched=!1,this.currency=null}ngOnInit(){this.chargesDataSource=[],this.recurringDepositsAccountTemplate.id&&this.recurringDepositsAccountTemplate.charges&&(this.chargesDataSource=this.recurringDepositsAccountTemplate.charges.map(e=>J(F({},e),{id:e.chargeId}))||[])}ngOnChanges(){this.currency==null&&(this.recurringDepositsAccountTemplate.currency?this.currency=this.recurringDepositsAccountTemplate.currency:this.recurringDepositsAccountProductTemplate&&this.recurringDepositsAccountProductTemplate.currency&&(this.currency=this.recurringDepositsAccountProductTemplate.currency)),this.recurringDepositsAccountProductTemplate&&(this.chargeData=this.recurringDepositsAccountProductTemplate.chargeOptions.filter(e=>e.currency.code===this.currency.code))}addCharge(e){this.chargesDataSource=this.chargesDataSource.concat([e.value]),e.value="",this.pristine=!1}editChargeAmount(e){let l=[new we({controlName:"amount",label:"Amount",value:e.amount,type:"number",required:!1})],p={title:"Edit Charge Amount",layout:{addButtonText:"Confirm"},formfields:l};this.dialog.open(Ce,{data:p}).afterClosed().subscribe(b=>{if(b.data){let G=J(F({},e),{amount:b.data.value.amount});this.chargesDataSource.splice(this.chargesDataSource.indexOf(e),1,G),this.chargesDataSource=this.chargesDataSource.concat([])}}),this.pristine=!1}editChargeDate(e){let l=[new Ze({controlName:"date",label:"Date",value:e.dueDate||e.feeOnMonthDay||"",type:"datetime-local",required:!1})],p={title:"Edit Charge Date",layout:{addButtonText:"Confirm"},formfields:l};this.dialog.open(Ce,{data:p}).afterClosed().subscribe(b=>{if(b.data){let G,ue=this.settingsService.dateFormat,ie=this.dateUtils.formatDate(b.data.value.date,ue);switch(e.chargeTimeType.value){case"Specified due date":case"Weekly Fee":G=J(F({},e),{dueDate:ie});break;case"Annual Fee":G=J(F({},e),{feeOnMonthDay:ie});break}this.chargesDataSource.splice(this.chargesDataSource.indexOf(e),1,G),this.chargesDataSource=this.chargesDataSource.concat([])}}),this.pristine=!1}editChargeFeeInterval(e){let l=[new we({controlName:"feeInterval",label:"Fee Interval",value:e.feeInterval,type:"text",required:!1})],p={title:"Edit Charge Fee Interval",layout:{addButtonText:"Confirm"},formfields:l};this.dialog.open(Ce,{data:p}).afterClosed().subscribe(b=>{if(b.data){let G=J(F({},e),{feeInterval:b.data.value.feeInterval});this.chargesDataSource.splice(this.chargesDataSource.indexOf(e),1,G),this.chargesDataSource=this.chargesDataSource.concat([])}}),this.pristine=!1}deleteCharge(e){this.dialog.open(ce,{data:{deleteContext:`charge ${e.name}`}}).afterClosed().subscribe(p=>{p.delete&&(this.chargesDataSource.splice(this.chargesDataSource.indexOf(e),1),this.chargesDataSource=this.chargesDataSource.concat([]),this.pristine=!1)})}get recurringDepositAccountCharges(){return{charges:this.chargesDataSource}}static{this.\u0275fac=function(l){return new(l||t)}}static{this.\u0275cmp=O({type:t,selectors:[["mifosx-recurring-deposits-account-charges-step"]],inputs:{recurringDepositsAccountTemplate:"recurringDepositsAccountTemplate",recurringDepositsAccountProductTemplate:"recurringDepositsAccountProductTemplate",currencyCode:"currencyCode",recurringDepositAccountFormValid:"recurringDepositAccountFormValid"},features:[Yt],decls:47,vars:18,consts:[["charge",""],[1,"layout-row-wrap","gap-2px","responsive-column"],[1,"flex-48"],[3,"value"],[1,"flex-48","align-center"],["type","button","mat-raised-button","","color","primary",3,"click","disabled"],["icon","plus",1,"m-r-10"],["mat-table","",1,"flex-98","mat-elevation-z1",3,"dataSource","hidden"],["matColumnDef","name"],["mat-header-cell","",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","chargeCalculationType"],["matColumnDef","amount"],["matColumnDef","chargeTimeType"],["matColumnDef","date"],["matColumnDef","repaymentsEvery"],["matColumnDef","action"],["mat-header-row","",4,"matHeaderRowDef"],["mat-row","",4,"matRowDef","matRowDefColumns"],[1,"layout-row","responsive-column","align-center","gap-2px","margin-t"],["mat-raised-button","","matStepperPrevious",""],["icon","arrow-left",1,"m-r-10"],["mat-raised-button","","matStepperNext","",3,"disabled"],["icon","arrow-right",1,"m-l-10"],["mat-header-cell",""],["mat-cell",""],["mat-icon-button","","color","primary",3,"click"],["icon","pen"],["mat-icon-button","","color","primary"],["mat-icon-button","","color","warn",3,"click"],["icon","trash"],["mat-header-row",""],["mat-row",""]],template:function(l,p){if(l&1){let g=y();a(0,"div",1)(1,"mat-form-field",2)(2,"mat-label"),o(3),r(4,"translate"),i(),a(5,"mat-select",null,0),L(7,Xo,2,2,"mat-option",3,z),i()(),a(9,"div",4)(10,"button",5),T("click",function(){S(g);let G=E(6);return M(p.addCharge(G))}),C(11,"fa-icon",6),o(12),r(13,"translate"),i()(),a(14,"table",7),v(15,8),h(16,Zo,3,3,"th",9)(17,tr,2,1,"td",10),P(),v(18,11),h(19,er,3,3,"th",9)(20,nr,3,4,"td",10),P(),v(21,12),h(22,ir,3,3,"th",9)(23,ar,5,3,"td",10),P(),v(24,13),h(25,or,3,3,"th",9)(26,rr,3,4,"td",10),P(),v(27,14),h(28,cr,3,3,"th",9)(29,dr,5,4,"td",10),P(),v(30,15),h(31,ur,3,3,"th",9)(32,Cr,3,2,"td",10),P(),v(33,16),h(34,_r,3,3,"th",9)(35,fr,3,0,"td",10),P(),h(36,hr,1,0,"tr",17)(37,xr,1,0,"tr",18),i()(),a(38,"div",19)(39,"button",20),C(40,"fa-icon",21),o(41),r(42,"translate"),i(),a(43,"button",22),o(44),r(45,"translate"),C(46,"fa-icon",23),i()()}if(l&2){let g=E(6);n(3),m(c(4,10,"labels.inputs.Charge")),n(4),j(p.chargeData),n(3),d("disabled",!g.value),n(2),u(" ",c(13,12,"labels.buttons.Add")," "),n(2),d("dataSource",p.chargesDataSource)("hidden",p.chargesDataSource.length===0),n(22),d("matHeaderRowDef",p.displayedColumns),n(),d("matRowDefColumns",p.displayedColumns),n(4),u(" ",c(42,14,"labels.buttons.Previous")," "),n(2),d("disabled",!p.recurringDepositAccountFormValid),n(),u(" ",c(45,16,"labels.buttons.Next")," ")}},dependencies:[I,R,nt,et,Ot,yt,V,_t,wt,Ft,Bt,kt,Et,Nt,Oe,Vt,Gt,qt,Ht,jt,Zt,It,w,Rt,Wt],styles:["table[_ngcontent-%COMP%]{width:100%}.mat-elevation-z1[_ngcontent-%COMP%]{margin:1em 0 1.5em}.margin-t[_ngcontent-%COMP%]{margin-top:1em}"]})}}return t})();var Dr=["chartsTable"];function br(t,s){if(t&1&&(a(0,"div",3)(1,"span",4),o(2),r(3,"translate"),i(),a(4,"span",5),o(5),i()()),t&2){let e=f();n(2),u("",c(3,2,"labels.inputs.name"),":"),n(3),m(e.recurringDepositsAccountProductTemplate.accountChart.name)}}function vr(t,s){if(t&1&&(a(0,"div",3)(1,"span",4),o(2),r(3,"translate"),i(),a(4,"span",5),o(5),r(6,"dateFormat"),i()()),t&2){let e=f();n(2),u("",c(3,2,"labels.inputs.End Date"),":"),n(3),m(c(6,4,e.recurringDepositsAccountProductTemplate==null?null:e.recurringDepositsAccountProductTemplate.accountChart.endDate))}}function Pr(t,s){if(t&1&&(a(0,"div",3)(1,"span",4),o(2),r(3,"translate"),i(),a(4,"span",5),o(5),i()()),t&2){let e=f();n(2),u("",c(3,2,"labels.inputs.Description"),":"),n(3),m(e.recurringDepositsAccountProductTemplate==null?null:e.recurringDepositsAccountProductTemplate.accountChart.description)}}function Tr(t,s){t&1&&(a(0,"th",23),o(1),r(2,"translate"),i()),t&2&&(n(),m(c(2,1,"labels.inputs.Period")))}function Sr(t,s){if(t&1&&(a(0,"td",24),o(1),r(2,"translateKey"),i()),t&2){let e=s.$implicit;n(),ae(" ",e.fromPeriod," - ",e.toPeriod,"\xA0",B(2,3,e.periodType.value,"catalogs")," ")}}function Mr(t,s){t&1&&(a(0,"th",23),o(1),r(2,"translate"),i()),t&2&&(n(),m(c(2,1,"labels.inputs.Amount Range")))}function Ar(t,s){if(t&1&&(a(0,"td",24),o(1),r(2,"formatNumber"),r(3,"formatNumber"),i()),t&2){let e=s.$implicit;n(),A(" ",c(2,2,e.amountRangeFrom)," - ",c(3,4,e.amountRangeTo)," ")}}function yr(t,s){t&1&&(a(0,"th",23),o(1),r(2,"translate"),i()),t&2&&(n(),m(c(2,1,"labels.inputs.Interest")))}function Or(t,s){if(t&1&&(a(0,"td",24),o(1),r(2,"formatNumber"),i()),t&2){let e=s.$implicit;n(),u("",c(2,1,e.annualInterestRate)," %")}}function Ir(t,s){t&1&&(a(0,"th",23),o(1),r(2,"translate"),i()),t&2&&(n(),m(c(2,1,"labels.inputs.Description")))}function Rr(t,s){if(t&1&&(a(0,"td",24),o(1),i()),t&2){let e=s.$implicit;n(),m(e.description)}}function wr(t,s){t&1&&(a(0,"th",23),o(1),r(2,"translate"),i()),t&2&&(n(),m(c(2,1,"labels.inputs.Actions")))}function Er(t,s){t&1&&(a(0,"span"),C(1,"fa-icon",27),o(2),r(3,"translate"),i()),t&2&&(n(2),u(" ",c(3,1,"labels.buttons.View Incentives")," "))}function Br(t,s){t&1&&(a(0,"span"),C(1,"fa-icon",28),o(2),r(3,"translate"),i()),t&2&&(n(2),u(" ",c(3,1,"labels.buttons.Hide Incentives")," "))}function Fr(t,s){if(t&1){let e=y();a(0,"td",24)(1,"button",25),T("click",function(){let p=S(e).dataIndex,g=f();return M(g.expandChartSlabIndex=g.expandChartSlabIndex===p?null:p)}),h(2,Er,4,3,"span",26)(3,Br,4,3,"span",26),i()()}if(t&2){let e=s.dataIndex,l=f();n(2),d("ngIf",l.expandChartSlabIndex!==e),n(),d("ngIf",l.expandChartSlabIndex===e)}}function kr(t,s){t&1&&(a(0,"th",23),o(1),r(2,"translate"),i()),t&2&&(n(),m(c(2,1,"labels.inputs.Entity Type")))}function Nr(t,s){if(t&1&&(a(0,"td",24),o(1),i()),t&2){let e=s.$implicit;n(),u(" ",e.entityType.value," ")}}function Vr(t,s){t&1&&(a(0,"th",23),o(1),r(2,"translate"),i()),t&2&&(n(),m(c(2,1,"labels.inputs.Attribute Name")))}function qr(t,s){if(t&1&&(a(0,"td",24),o(1),i()),t&2){let e=s.$implicit;n(),u(" ",e.attributeName.value," ")}}function Gr(t,s){t&1&&(a(0,"th",23),o(1),r(2,"translate"),i()),t&2&&(n(),m(c(2,1,"labels.inputs.Condition Type")))}function Hr(t,s){if(t&1&&(a(0,"td",24),o(1),r(2,"titlecase"),i()),t&2){let e=s.$implicit;n(),u(" ",c(2,1,e.conditionType.value)," ")}}function Ur(t,s){t&1&&(a(0,"th",23),o(1),r(2,"translate"),i()),t&2&&(n(),m(c(2,1,"labels.inputs.Attribute Value")))}function $r(t,s){if(t&1&&(a(0,"td",41),o(1),i()),t&2){let e=s.$implicit;d("ngSwitch",e.attributeName),n(),u(" ",e.attributeValueDesc," ")}}function zr(t,s){t&1&&(a(0,"th",23),o(1),r(2,"translate"),i()),t&2&&(n(),m(c(2,1,"labels.inputs.Incentive Type")))}function Lr(t,s){if(t&1&&(a(0,"td",24),o(1),i()),t&2){let e=s.$implicit;n(),u(" ",e.incentiveType.value," ")}}function jr(t,s){t&1&&(a(0,"th",23),o(1),r(2,"translate"),i()),t&2&&(n(),m(c(2,1,"labels.inputs.Interest")))}function Wr(t,s){if(t&1&&(a(0,"td",24),o(1),r(2,"formatNumber"),i()),t&2){let e=s.$implicit;n(),u(" ",c(2,1,e.amount)," ")}}function Kr(t,s){t&1&&C(0,"tr",42)}function Qr(t,s){t&1&&C(0,"tr",43)}function Yr(t,s){if(t&1&&(a(0,"table",33),v(1,34),h(2,kr,3,3,"th",8)(3,Nr,2,1,"td",9),P(),v(4,35),h(5,Vr,3,3,"th",8)(6,qr,2,1,"td",9),P(),v(7,36),h(8,Gr,3,3,"th",8)(9,Hr,3,3,"td",9),P(),v(10,37),h(11,Ur,3,3,"th",8)(12,$r,2,2,"td",38),P(),v(13,39),h(14,zr,3,3,"th",8)(15,Lr,2,1,"td",9),P(),v(16,40),h(17,jr,3,3,"th",8)(18,Wr,3,3,"td",9),P(),h(19,Kr,1,0,"tr",15)(20,Qr,1,0,"tr",16),i()),t&2){let e=f().$implicit,l=f();d("dataSource",e.incentives),n(19),d("matHeaderRowDef",l.incentivesDisplayedColumns),n(),d("matRowDefColumns",l.incentivesDisplayedColumns)}}function Jr(t,s){if(t&1&&(a(0,"td",24)(1,"div",29)(2,"mat-card",30)(3,"h4",31),o(4),r(5,"translate"),i(),h(6,Yr,21,3,"table",32),i()()()),t&2){let e=s.$implicit,l=s.dataIndex,p=f();De("colspan",p.chartSlabsDisplayedColumns.length),n(),d("@expandChartSlab",l===p.expandChartSlabIndex?"expanded":"collapsed"),n(3),u(" ",c(5,4,"labels.heading.Incentives")," "),n(2),d("ngIf",e.incentives.length)}}function Xr(t,s){t&1&&C(0,"tr",42)}function Zr(t,s){t&1&&C(0,"tr",43)}function tc(t,s){t&1&&C(0,"tr",44)}var Fe=(()=>{class t{constructor(){this.interestRateChartData=[],this.chartSlabsDisplayedColumns=["period","amountRange","interest","description","actions"],this.incentivesDisplayedColumns=["entityType","attributeName","conditionType","attributeValue","incentiveType","amount"],this.chartSlabsIncentivesDisplayedColumns=["incentives"]}ngOnChanges(){this.recurringDepositsAccountProductTemplate&&(this.interestRateChartData=this.recurringDepositsAccountProductTemplate.accountChart.chartSlabs)}ngOnInit(){this.interestRateChartData=[]}static{this.\u0275fac=function(l){return new(l||t)}}static{this.\u0275cmp=O({type:t,selectors:[["mifosx-recurring-deposits-account-interest-rate-chart-step"]],viewQuery:function(l,p){if(l&1&&Pt(Dr,7),l&2){let g;Tt(g=St())&&(p.chartsTableRef=g.first)}},inputs:{recurringDepositsAccountTemplate:"recurringDepositsAccountTemplate",recurringDepositsAccountProductTemplate:"recurringDepositsAccountProductTemplate"},features:[Yt],decls:49,vars:25,consts:[["chartsTable",""],[1,"layout-column","gap-2px"],["class","flex-fill",4,"ngIf"],[1,"flex-fill"],[1,"flex-40"],[1,"flex-60"],["mat-table","","multiTemplateDataRows","",1,"mat-elevation-z1",3,"dataSource"],["matColumnDef","period"],["mat-header-cell","",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","amountRange"],["matColumnDef","interest"],["matColumnDef","description"],["matColumnDef","actions"],["matColumnDef","incentives"],["mat-header-row","",4,"matHeaderRowDef"],["mat-row","",4,"matRowDef","matRowDefColumns"],["mat-row","","class","incentives-row",4,"matRowDef","matRowDefColumns"],[1,"layout-row","responsive-column","align-center","gap-2px","margin-t"],["mat-raised-button","","matStepperPrevious",""],["icon","arrow-left",1,"m-r-10"],["mat-raised-button","","matStepperNext",""],["icon","arrow-right",1,"m-l-10"],["mat-header-cell",""],["mat-cell",""],["mat-button","","color","primary",3,"click"],[4,"ngIf"],["icon","eye",1,"m-r-10"],["icon","eye-slash",1,"m-r-10"],[1,"incentives","flex-fill","layout-row","flex-wrap"],[1,"layout-row-wrap","flex-fill"],[1,"m-b-10","flex-13"],["class","mat-elevation-z1 flex-fill","mat-table","",3,"dataSource",4,"ngIf"],["mat-table","",1,"mat-elevation-z1","flex-fill",3,"dataSource"],["matColumnDef","entityType"],["matColumnDef","attributeName"],["matColumnDef","conditionType"],["matColumnDef","attributeValue"],["mat-cell","",3,"ngSwitch",4,"matCellDef"],["matColumnDef","incentiveType"],["matColumnDef","amount"],["mat-cell","",3,"ngSwitch"],["mat-header-row",""],["mat-row",""],["mat-row","",1,"incentives-row"]],template:function(l,p){l&1&&(a(0,"div",1),h(1,br,6,4,"div",2),a(2,"div",3)(3,"span",4),o(4),r(5,"translate"),i(),a(6,"span",5),o(7),r(8,"dateFormat"),i()(),h(9,vr,7,6,"div",2)(10,Pr,6,4,"div",2),a(11,"div",3)(12,"span",4),o(13),r(14,"translate"),i(),a(15,"span",5),o(16),r(17,"yesNo"),i()(),a(18,"table",6,0),v(20,7),h(21,Tr,3,3,"th",8)(22,Sr,3,6,"td",9),P(),v(23,10),h(24,Mr,3,3,"th",8)(25,Ar,4,6,"td",9),P(),v(26,11),h(27,yr,3,3,"th",8)(28,Or,3,3,"td",9),P(),v(29,12),h(30,Ir,3,3,"th",8)(31,Rr,2,1,"td",9),P(),v(32,13),h(33,wr,3,3,"th",8)(34,Fr,4,2,"td",9),P(),v(35,14),h(36,Jr,7,6,"td",9),P(),h(37,Xr,1,0,"tr",15)(38,Zr,1,0,"tr",16)(39,tc,1,0,"tr",17),i()(),a(40,"div",18)(41,"button",19),C(42,"fa-icon",20),o(43),r(44,"translate"),i(),a(45,"button",21),o(46),r(47,"translate"),C(48,"fa-icon",22),i()()),l&2&&(n(),d("ngIf",p.recurringDepositsAccountProductTemplate==null?null:p.recurringDepositsAccountProductTemplate.accountChart.name),n(3),u("",c(5,13,"labels.inputs.Valid from Date"),":"),n(3),m(c(8,15,p.recurringDepositsAccountProductTemplate==null?null:p.recurringDepositsAccountProductTemplate.accountChart.fromDate)),n(2),d("ngIf",p.recurringDepositsAccountProductTemplate==null?null:p.recurringDepositsAccountProductTemplate.accountChart.endDate),n(),d("ngIf",p.recurringDepositsAccountProductTemplate==null?null:p.recurringDepositsAccountProductTemplate.accountChart.description),n(3),u("",c(14,17,"labels.inputs.Primary Grouping by Amount"),":"),n(3),m(c(17,19,p.recurringDepositsAccountProductTemplate==null?null:p.recurringDepositsAccountProductTemplate.accountChart.isPrimaryGroupingByAmount)),n(2),d("dataSource",p.interestRateChartData),n(19),d("matHeaderRowDef",p.chartSlabsDisplayedColumns),n(),d("matRowDefColumns",p.chartSlabsDisplayedColumns),n(),d("matRowDefColumns",p.chartSlabsIncentivesDisplayedColumns),n(4),u(" ",c(44,21,"labels.buttons.Previous")," "),n(3),u(" ",c(47,23,"labels.buttons.Next")," "))},dependencies:[I,ve,Pe,R,Y,V,wt,Ft,Bt,kt,Et,Nt,_t,Vt,Gt,qt,Ht,jt,Zt,Te,It,w,Rt,Wt,Xe],styles:[".margin-t[_ngcontent-%COMP%]{margin-top:2em}table[_ngcontent-%COMP%]{width:100%}table[_ngcontent-%COMP%] tr.incentives-row[_ngcontent-%COMP%]{height:0}table[_ngcontent-%COMP%] tr.incentives-row[_ngcontent-%COMP%] > td[_ngcontent-%COMP%]{padding:0}table[_ngcontent-%COMP%] tr.incentives-row[_ngcontent-%COMP%] .incentives[_ngcontent-%COMP%]{overflow:hidden}table[_ngcontent-%COMP%] tr.incentives-row[_ngcontent-%COMP%] .mat-card[_ngcontent-%COMP%]{border-radius:0}"],data:{animation:[Me("expandChartSlab",[ne("collapsed",ee({height:"0px",minHeight:"0"})),ne("expanded",ee({height:"*"})),ye("expanded <=> collapsed",Ae("225ms cubic-bezier(0.4, 0.0, 0.2, 1)"))])]}})}}return t})();var ec=()=>["../.."];function nc(t,s){if(t&1&&(a(0,"div",3)(1,"span",4),o(2),r(3,"translate"),i(),a(4,"span",5),o(5),r(6,"find"),r(7,"translateKey"),i()()),t&2){let e=f();n(2),u("",c(3,3,"labels.inputs.Lock-in Period"),":"),n(3),A("",e.recurringDepositAccountData.lockinPeriodFrequency," ",B(7,10,U(6,5,e.recurringDepositAccountData.lockinPeriodFrequencyType,e.recurringDepositsAccountProductTemplate.lockinPeriodFrequencyTypeOptions,"id","value"),"catalogs"))}}function ic(t,s){if(t&1&&(a(0,"div",3)(1,"span",4),o(2),r(3,"translate"),i(),a(4,"span",5),o(5),r(6,"formatNumber"),i()()),t&2){let e=f();n(2),u("",c(3,2,"labels.inputs.Recurring Deposit Amount"),":"),n(3),m(c(6,4,e.recurringDepositAccountData.mandatoryRecommendedDepositAmount))}}function ac(t,s){if(t&1&&(a(0,"span",5),o(1),r(2,"find"),r(3,"translateKey"),i()),t&2){let e=f(2);n(),A("",e.recurringDepositAccountData.recurringFrequency," ",B(3,7,U(2,2,e.recurringDepositAccountData.recurringFrequencyType,e.recurringDepositsAccountProductTemplate.periodFrequencyTypeOptions,"id","value"),"catalogs"))}}function oc(t,s){if(t&1&&(v(0),a(1,"div",3)(2,"span",4),o(3),r(4,"translate"),i(),a(5,"span",5),o(6),r(7,"dateFormat"),i()(),a(8,"div",3)(9,"span",4),o(10),r(11,"translate"),i(),h(12,ac,4,10,"span",26),i(),P()),t&2){let e=f();n(3),u("",c(4,4,"labels.inputs.Deposit Start Date"),":"),n(3),m(c(7,6,e.recurringDepositAccountData.expectedFirstDepositOnDate)),n(4),u("",c(11,8,"labels.inputs.Deposit Frequency"),":"),n(2),d("ngIf",e.recurringDepositAccountData.recurringFrequency)}}function rc(t,s){if(t&1&&(a(0,"div",3)(1,"span",4),o(2),r(3,"translate"),i(),a(4,"span",5),o(5),i()()),t&2){let e=f();n(2),u("",c(3,2,"labels.inputs.name"),":"),n(3),m(e.recurringDepositsAccountProductTemplate==null?null:e.recurringDepositsAccountProductTemplate.accountChart.name)}}function cc(t,s){if(t&1&&(a(0,"div",3)(1,"span",4),o(2),r(3,"translate"),i(),a(4,"span",5),o(5),r(6,"dateFormat"),i()()),t&2){let e=f();n(2),u("",c(3,2,"labels.inputs.End Date"),":"),n(3),m(c(6,4,e.recurringDepositsAccountProductTemplate==null?null:e.recurringDepositsAccountProductTemplate.accountChart.endDate))}}function pc(t,s){if(t&1&&(a(0,"div",3)(1,"span",4),o(2),r(3,"translate"),i(),a(4,"span",5),o(5),i()()),t&2){let e=f();n(2),u("",c(3,2,"labels.inputs.Description"),":"),n(3),m(e.recurringDepositsAccountProductTemplate==null?null:e.recurringDepositsAccountProductTemplate.accountChart.description)}}function sc(t,s){t&1&&(a(0,"th",27),o(1),r(2,"translate"),i()),t&2&&(n(),m(c(2,1,"labels.inputs.Period")))}function lc(t,s){if(t&1&&(a(0,"td",28),o(1),r(2,"translateKey"),i()),t&2){let e=s.$implicit;n(),ae(" ",e.fromPeriod," - ",e.toPeriod,"\xA0",B(2,3,e.periodType.value,"catalogs")," ")}}function mc(t,s){t&1&&(a(0,"th",27),o(1),r(2,"translate"),i()),t&2&&(n(),m(c(2,1,"labels.inputs.Amount Range")))}function dc(t,s){if(t&1&&(a(0,"td",28),o(1),r(2,"formatNumber"),r(3,"formatNumber"),i()),t&2){let e=s.$implicit;n(),A(" ",c(2,2,e.amountRangeFrom)," - ",c(3,4,e.amountRangeTo)," ")}}function uc(t,s){t&1&&(a(0,"th",27),o(1),r(2,"translate"),i()),t&2&&(n(),m(c(2,1,"labels.inputs.Interest")))}function gc(t,s){if(t&1&&(a(0,"td",28),o(1),r(2,"formatNumber"),i()),t&2){let e=s.$implicit;n(),u("",c(2,1,e.annualInterestRate)," %")}}function Cc(t,s){t&1&&(a(0,"th",27),o(1),r(2,"translate"),i()),t&2&&(n(),m(c(2,1,"labels.inputs.Description")))}function _c(t,s){if(t&1&&(a(0,"td",28),o(1),i()),t&2){let e=s.$implicit;n(),m(e.description)}}function fc(t,s){t&1&&(a(0,"th",27),o(1),r(2,"translate"),i()),t&2&&(n(),m(c(2,1,"labels.inputs.Actions")))}function hc(t,s){t&1&&(a(0,"span"),C(1,"fa-icon",30),o(2),r(3,"translate"),i()),t&2&&(n(2),u(" ",c(3,1,"labels.buttons.View Incentives")," "))}function xc(t,s){t&1&&(a(0,"span"),C(1,"fa-icon",31),o(2),r(3,"translate"),i()),t&2&&(n(2),u(" ",c(3,1,"labels.buttons.Hide Incentives")," "))}function Dc(t,s){if(t&1){let e=y();a(0,"td",28)(1,"button",29),T("click",function(){let p=S(e).dataIndex,g=f();return M(g.expandChartSlabIndex=g.expandChartSlabIndex===p?null:p)}),h(2,hc,4,3,"span",7)(3,xc,4,3,"span",7),i()()}if(t&2){let e=s.dataIndex,l=f();n(2),d("ngIf",l.expandChartSlabIndex!==e),n(),d("ngIf",l.expandChartSlabIndex===e)}}function bc(t,s){t&1&&(a(0,"th",27),o(1),r(2,"translate"),i()),t&2&&(n(),m(c(2,1,"labels.inputs.Entity Type")))}function vc(t,s){if(t&1&&(a(0,"td",28),o(1),i()),t&2){let e=s.$implicit;n(),u(" ",e.entityType.value," ")}}function Pc(t,s){t&1&&(a(0,"th",27),o(1),r(2,"translate"),i()),t&2&&(n(),m(c(2,1,"labels.inputs.Attribute Name")))}function Tc(t,s){if(t&1&&(a(0,"td",28),o(1),i()),t&2){let e=s.$implicit;n(),u(" ",e.attributeName.value," ")}}function Sc(t,s){t&1&&(a(0,"th",27),o(1),r(2,"translate"),i()),t&2&&(n(),m(c(2,1,"labels.inputs.Condition Type")))}function Mc(t,s){if(t&1&&(a(0,"td",28),o(1),r(2,"titlecase"),i()),t&2){let e=s.$implicit;n(),u(" ",c(2,1,e.conditionType.value)," ")}}function Ac(t,s){t&1&&(a(0,"th",27),o(1),r(2,"translate"),i()),t&2&&(n(),m(c(2,1,"labels.inputs.Attribute Value")))}function yc(t,s){if(t&1&&(a(0,"td",44),o(1),i()),t&2){let e=s.$implicit;d("ngSwitch",e.attributeName),n(),u(" ",e.attributeValueDesc," ")}}function Oc(t,s){t&1&&(a(0,"th",27),o(1),r(2,"translate"),i()),t&2&&(n(),m(c(2,1,"labels.inputs.Incentive Type")))}function Ic(t,s){if(t&1&&(a(0,"td",28),o(1),i()),t&2){let e=s.$implicit;n(),u(" ",e.incentiveType.value," ")}}function Rc(t,s){t&1&&(a(0,"th",27),o(1),r(2,"translate"),i()),t&2&&(n(),m(c(2,1,"labels.inputs.Interest")))}function wc(t,s){if(t&1&&(a(0,"td",28),o(1),i()),t&2){let e=s.$implicit;n(),u(" ",e.amount," ")}}function Ec(t,s){t&1&&C(0,"tr",45)}function Bc(t,s){t&1&&C(0,"tr",46)}function Fc(t,s){if(t&1&&(a(0,"table",36),v(1,37),h(2,bc,3,3,"th",10)(3,vc,2,1,"td",11),P(),v(4,38),h(5,Pc,3,3,"th",10)(6,Tc,2,1,"td",11),P(),v(7,39),h(8,Sc,3,3,"th",10)(9,Mc,3,3,"td",11),P(),v(10,40),h(11,Ac,3,3,"th",10)(12,yc,2,2,"td",41),P(),v(13,42),h(14,Oc,3,3,"th",10)(15,Ic,2,1,"td",11),P(),v(16,43),h(17,Rc,3,3,"th",10)(18,wc,2,1,"td",11),P(),h(19,Ec,1,0,"tr",17)(20,Bc,1,0,"tr",18),i()),t&2){let e=f().$implicit,l=f();d("dataSource",e.incentives),n(19),d("matHeaderRowDef",l.incentivesDisplayedColumns),n(),d("matRowDefColumns",l.incentivesDisplayedColumns)}}function kc(t,s){if(t&1&&(a(0,"td",28)(1,"div",32)(2,"mat-card",33)(3,"h4",34),o(4),r(5,"translate"),i(),h(6,Fc,21,3,"table",35),i()()()),t&2){let e=s.$implicit,l=s.dataIndex,p=f();De("colspan",p.chartSlabsDisplayedColumns.length),n(),d("@expandChartSlab",l===p.expandChartSlabIndex?"expanded":"collapsed"),n(3),u(" ",c(5,4,"labels.heading.Incentives")," "),n(2),d("ngIf",e.incentives.length)}}function Nc(t,s){t&1&&C(0,"tr",45)}function Vc(t,s){t&1&&C(0,"tr",46)}function qc(t,s){t&1&&C(0,"tr",47)}function Gc(t,s){t&1&&(a(0,"th",27),o(1),r(2,"translate"),i()),t&2&&(n(),m(c(2,1,"labels.inputs.name")))}function Hc(t,s){if(t&1&&(a(0,"td",28),o(1),i()),t&2){let e=s.$implicit;n(),u(" ",e.name+", "+e.currency.displaySymbol," ")}}function Uc(t,s){t&1&&(a(0,"th",27),o(1),r(2,"translate"),i()),t&2&&(n(),m(c(2,1,"labels.inputs.Type")))}function $c(t,s){if(t&1&&(a(0,"td",28),o(1),r(2,"translateKey"),i()),t&2){let e=s.$implicit;n(),u(" ",B(2,1,e.chargeCalculationType.value,"catalogs")," ")}}function zc(t,s){t&1&&(a(0,"th",27),o(1),r(2,"translate"),i()),t&2&&(n(),m(c(2,1,"labels.inputs.Amount")))}function Lc(t,s){if(t&1&&(a(0,"td",28),o(1),r(2,"formatNumber"),i()),t&2){let e=s.$implicit;n(),u(" ",c(2,1,e.amount)," ")}}function jc(t,s){t&1&&(a(0,"th",27),o(1),r(2,"translate"),i()),t&2&&(n(),m(c(2,1,"labels.inputs.Date")))}function Wc(t,s){if(t&1&&(a(0,"span"),o(1),r(2,"dateFormat"),i()),t&2){let e=f().$implicit;n(),u(" ",c(2,1,e.dueDate)||"Unassigned"," ")}}function Kc(t,s){if(t&1&&(a(0,"span"),o(1),r(2,"dateFormat"),i()),t&2){let e=f().$implicit;n(),u(" ",c(2,1,e.feeOnMonthDay)||"Unassigned"," ")}}function Qc(t,s){t&1&&(a(0,"span"),o(1),r(2,"translate"),i()),t&2&&(n(),u(" ",c(2,1,"labels.inputs.N/A")," "))}function Yc(t,s){if(t&1&&(a(0,"td",28),h(1,Wc,3,3,"span",7)(2,Kc,3,3,"span",7)(3,Qc,3,3,"span",7),i()),t&2){let e=s.$implicit;n(),d("ngIf",e.chargeTimeType.value==="Specified due date"||e.chargeTimeType.value==="Weekly Fee"),n(),d("ngIf",e.chargeTimeType.value==="Monthly Fee"||e.chargeTimeType.value==="Annual Fee"),n(),d("ngIf",!(e.chargeTimeType.value==="Monthly Fee"||e.chargeTimeType.value==="Annual Fee"||e.chargeTimeType.value==="Specified due date"||e.chargeTimeType.value==="Weekly Fee"))}}function Jc(t,s){t&1&&(a(0,"th",27),o(1),r(2,"translate"),i()),t&2&&(n(),m(c(2,1,"labels.inputs.Repayments Every")))}function Xc(t,s){if(t&1&&(a(0,"td",28),o(1),i()),t&2){let e=s.$implicit;n(),u(" ",e.feeInterval||"Not Provided"," ")}}function Zc(t,s){t&1&&(a(0,"th",27),o(1),r(2,"translate"),i()),t&2&&(n(),m(c(2,1,"labels.inputs.Collected On")))}function tp(t,s){if(t&1&&(a(0,"td",28),o(1),i()),t&2){let e=s.$implicit;n(),u(" ",e.chargeTimeType.value," ")}}function ep(t,s){t&1&&C(0,"tr",45)}function np(t,s){t&1&&C(0,"tr",46)}function ip(t,s){if(t&1&&(a(0,"div",48)(1,"h3",1),o(2),r(3,"translate"),i(),C(4,"mat-divider",2),a(5,"table",36),v(6,49),h(7,Gc,3,3,"th",10)(8,Hc,2,1,"td",11),P(),v(9,50),h(10,Uc,3,3,"th",10)(11,$c,3,4,"td",11),P(),v(12,43),h(13,zc,3,3,"th",10)(14,Lc,3,3,"td",11),P(),v(15,51),h(16,jc,3,3,"th",10)(17,Yc,4,3,"td",11),P(),v(18,52),h(19,Jc,3,3,"th",10)(20,Xc,2,1,"td",11),P(),v(21,53),h(22,Zc,3,3,"th",10)(23,tp,2,1,"td",11),P(),h(24,ep,1,0,"tr",17)(25,np,1,0,"tr",18),i()()),t&2){let e=f();n(2),m(c(3,4,"labels.heading.Charges")),n(3),d("dataSource",e.recurringDepositAccountData.charges),n(19),d("matHeaderRowDef",e.chargesDisplayedColumns),n(),d("matRowDefColumns",e.chargesDisplayedColumns)}}var ke=(()=>{class t{constructor(){this.submitEvent=new Ve,this.chargesDisplayedColumns=["name","chargeCalculationType","amount","chargeTimeType","date","repaymentsEvery"],this.interestRateChartData=[],this.chartSlabsDisplayedColumns=["period","amountRange","interest","description","actions"],this.incentivesDisplayedColumns=["entityType","attributeName","conditionType","attributeValue","incentiveType","amount"],this.chartSlabsIncentivesDisplayedColumns=["incentives"]}ngOnChanges(){this.recurringDepositsAccountProductTemplate&&(this.interestRateChartData=this.recurringDepositsAccountProductTemplate.accountChart.chartSlabs)}static{this.\u0275fac=function(l){return new(l||t)}}static{this.\u0275cmp=O({type:t,selectors:[["mifosx-recurring-deposits-account-preview-step"]],inputs:{recurringDepositsAccountTemplate:"recurringDepositsAccountTemplate",recurringDepositsAccountProductTemplate:"recurringDepositsAccountProductTemplate",recurringDepositAccountData:"recurringDepositAccountData"},outputs:{submitEvent:"submitEvent"},features:[Yt],decls:181,vars:176,consts:[[1,"layout-row-wrap","responsive-column"],[1,"mat-h3","flex-100"],[1,"flex-100"],[1,"layout-row","flex-100"],[1,"flex-40"],[1,"flex-60"],["class","layout-row flex-100",4,"ngIf"],[4,"ngIf"],["mat-table","","multiTemplateDataRows","",1,"mat-elevation-z1","irc-table",3,"dataSource"],["matColumnDef","period"],["mat-header-cell","",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","amountRange"],["matColumnDef","interest"],["matColumnDef","description"],["matColumnDef","actions"],["matColumnDef","incentives"],["mat-header-row","",4,"matHeaderRowDef"],["mat-row","",4,"matRowDef","matRowDefColumns"],["mat-row","","class","incentives-row",4,"matRowDef","matRowDefColumns"],["class","layout-row-wrap responsive-column flex-100",4,"ngIf"],[1,"layout-row","responsive-column","align-center","gap-2px","margin-t"],["mat-raised-button","","matStepperPrevious",""],["icon","arrow-left",1,"m-r-10"],["mat-raised-button","",3,"routerLink"],["mat-raised-button","","color","primary",3,"click"],["class","flex-60",4,"ngIf"],["mat-header-cell",""],["mat-cell",""],["mat-button","","color","primary",3,"click"],["icon","eye",1,"m-r-10"],["icon","eye-slash",1,"m-r-10"],[1,"layout-row-wrap","flex-100","incentives"],[1,"layout-row-wrap","flex-100"],[1,"m-b-10","flex-13"],["class","flex-100 mat-elevation-z1","mat-table","",3,"dataSource",4,"ngIf"],["mat-table","",1,"flex-100","mat-elevation-z1",3,"dataSource"],["matColumnDef","entityType"],["matColumnDef","attributeName"],["matColumnDef","conditionType"],["matColumnDef","attributeValue"],["mat-cell","",3,"ngSwitch",4,"matCellDef"],["matColumnDef","incentiveType"],["matColumnDef","amount"],["mat-cell","",3,"ngSwitch"],["mat-header-row",""],["mat-row",""],["mat-row","",1,"incentives-row"],[1,"layout-row-wrap","responsive-column","flex-100"],["matColumnDef","name"],["matColumnDef","chargeCalculationType"],["matColumnDef","date"],["matColumnDef","repaymentsEvery"],["matColumnDef","chargeTimeType"]],template:function(l,p){l&1&&(a(0,"div",0)(1,"h3",1),o(2),r(3,"translate"),i(),C(4,"mat-divider",2),a(5,"div",3)(6,"span",4),o(7),r(8,"translate"),i(),a(9,"span",5),o(10),r(11,"find"),i()(),a(12,"div",3)(13,"span",4),o(14),r(15,"translate"),i(),a(16,"span",5),o(17),r(18,"dateFormat"),i()(),a(19,"div",3)(20,"span",4),o(21),r(22,"translate"),i(),a(23,"span",5),o(24),r(25,"find"),i()(),a(26,"h3",1),o(27),r(28,"translate"),i(),C(29,"mat-divider",2),a(30,"div",3)(31,"span",4),o(32),r(33,"translate"),i(),a(34,"span",5),o(35),i()(),a(36,"div",3)(37,"span",4),o(38),r(39,"translate"),i(),a(40,"span",5),o(41),i()(),a(42,"div",3)(43,"span",4),o(44),r(45,"translate"),i(),a(46,"span",5),o(47),i()(),a(48,"h3",1),o(49),r(50,"translate"),i(),C(51,"mat-divider",2),a(52,"div",3)(53,"span",4),o(54),r(55,"translate"),i(),a(56,"span",5),o(57),r(58,"find"),r(59,"translateKey"),i()(),a(60,"div",3)(61,"span",4),o(62),r(63,"translate"),i(),a(64,"span",5),o(65),r(66,"find"),r(67,"translateKey"),i()(),a(68,"div",3)(69,"span",4),o(70),r(71,"translate"),i(),a(72,"span",5),o(73),r(74,"find"),r(75,"translateKey"),i()(),a(76,"div",3)(77,"span",4),o(78),r(79,"translate"),i(),a(80,"span",5),o(81),r(82,"find"),r(83,"translateKey"),i()(),a(84,"h3",1),o(85),r(86,"translate"),i(),C(87,"mat-divider",2),h(88,nc,8,13,"div",6)(89,ic,7,6,"div",6),a(90,"div",3)(91,"span",4),o(92),r(93,"translate"),i(),a(94,"span",5),o(95),r(96,"find"),r(97,"translateKey"),i()(),a(98,"div",3)(99,"span",4),o(100),r(101,"translate"),i(),a(102,"span",5),o(103),r(104,"yesNo"),i()(),h(105,oc,13,10,"ng-container",7),a(106,"div",3)(107,"span",4),o(108),r(109,"translate"),i(),a(110,"span",5),o(111),r(112,"translateKey"),i()(),a(113,"div",3)(114,"span",4),o(115),r(116,"translate"),i(),a(117,"span",5),o(118),r(119,"translateKey"),i()(),a(120,"div",3)(121,"span",4),o(122),r(123,"translate"),i(),a(124,"span",5),o(125),r(126,"translateKey"),i()(),a(127,"h3",1),o(128),r(129,"translate"),i(),C(130,"mat-divider",2),h(131,rc,6,4,"div",6),a(132,"div",3)(133,"span",4),o(134),r(135,"translate"),i(),a(136,"span",5),o(137),r(138,"dateFormat"),i()(),h(139,cc,7,6,"div",6)(140,pc,6,4,"div",6),a(141,"div",3)(142,"span",4),o(143),r(144,"translate"),i(),a(145,"span",5),o(146),r(147,"yesNo"),i()(),a(148,"table",8),v(149,9),h(150,sc,3,3,"th",10)(151,lc,3,6,"td",11),P(),v(152,12),h(153,mc,3,3,"th",10)(154,dc,4,6,"td",11),P(),v(155,13),h(156,uc,3,3,"th",10)(157,gc,3,3,"td",11),P(),v(158,14),h(159,Cc,3,3,"th",10)(160,_c,2,1,"td",11),P(),v(161,15),h(162,fc,3,3,"th",10)(163,Dc,4,2,"td",11),P(),v(164,16),h(165,kc,7,6,"td",11),P(),h(166,Nc,1,0,"tr",17)(167,Vc,1,0,"tr",18)(168,qc,1,0,"tr",19),i(),h(169,ip,26,6,"div",20),i(),a(170,"div",21)(171,"button",22),C(172,"fa-icon",23),o(173),r(174,"translate"),i(),a(175,"button",24),o(176),r(177,"translate"),i(),a(178,"button",25),T("click",function(){return p.submitEvent.emit()}),o(179),r(180,"translate"),i()()),l&2&&(n(2),m(c(3,58,"labels.heading.Details")),n(5),m(c(8,60,"labels.inputs.Product")),n(3),m(U(11,62,p.recurringDepositAccountData.productId,p.recurringDepositsAccountTemplate.productOptions,"id","name")),n(4),m(c(15,67,"labels.inputs.Submitted On")),n(3),m(c(18,69,p.recurringDepositAccountData.submittedOnDate)),n(4),m(c(22,71,"labels.inputs.Field Officer")),n(3),m(U(25,73,p.recurringDepositAccountData.fieldOfficerId,p.recurringDepositsAccountProductTemplate.fieldOfficerOptions,"id","displayName")),n(3),m(c(28,78,"labels.heading.Currency")),n(5),m(c(33,80,"labels.inputs.Currency")),n(3),m(p.recurringDepositsAccountProductTemplate.currency.code),n(3),m(c(39,82,"labels.inputs.Decimal Places")),n(3),m(p.recurringDepositsAccountProductTemplate.currency.decimalPlaces),n(3),m(c(45,84,"labels.inputs.Currency In Multiples Of")),n(3),m(p.recurringDepositsAccountProductTemplate.currency.inMultiplesOf),n(2),m(c(50,86,"labels.heading.Terms")),n(5),u("",c(55,88,"labels.inputs.Interest Compounding Period"),":"),n(3),m(B(59,95,U(58,90,p.recurringDepositAccountData.interestCompoundingPeriodType,p.recurringDepositsAccountProductTemplate.interestCompoundingPeriodTypeOptions,"id","value"),"catalogs")),n(5),u("",c(63,98,"labels.inputs.Interest Posting Period"),":"),n(3),m(B(67,105,U(66,100,p.recurringDepositAccountData.interestPostingPeriodType,p.recurringDepositsAccountProductTemplate.interestPostingPeriodTypeOptions,"id","value"),"catalogs")),n(5),u("",c(71,108,"labels.inputs.Interest Calculated using"),":"),n(3),m(B(75,115,U(74,110,p.recurringDepositAccountData.interestCalculationType,p.recurringDepositsAccountProductTemplate.interestCalculationTypeOptions,"id","value"),"catalogs")),n(5),u("",c(79,118,"labels.inputs.Days in Year"),":"),n(3),m(B(83,125,U(82,120,p.recurringDepositAccountData.interestCalculationDaysInYearType,p.recurringDepositsAccountProductTemplate.interestCalculationDaysInYearTypeOptions,"id","value"),"catalogs")),n(4),m(c(86,128,"labels.heading.Settings")),n(3),d("ngIf",p.recurringDepositAccountData.lockinPeriodFrequency),n(),d("ngIf",p.recurringDepositAccountData.mandatoryRecommendedDepositAmount),n(3),u("",c(93,130,"labels.inputs.Deposit Period"),":"),n(3),A("",p.recurringDepositAccountData.depositPeriod," ",B(97,137,U(96,132,p.recurringDepositAccountData.depositPeriodFrequencyId,p.recurringDepositsAccountProductTemplate.periodFrequencyTypeOptions,"id","value"),"catalogs")),n(5),u("",c(101,140,"labels.inputs.Deposit Frequency Same as Group/Center meeting"),":"),n(3),m(c(104,142,p.recurringDepositsAccountProductTemplate.isCalendarInherited)),n(2),d("ngIf",!p.recurringDepositsAccountProductTemplate.isCalendarInherited),n(3),u("",c(109,144,"labels.inputs.Minimum Deposit Term"),":"),n(3),A("",p.recurringDepositsAccountProductTemplate.minDepositTerm?p.recurringDepositsAccountProductTemplate.minDepositTerm:""," ",B(112,146,p.recurringDepositsAccountProductTemplate.minDepositTermType?p.recurringDepositsAccountProductTemplate.minDepositTermType.value:"","catalogs")),n(4),u("",c(116,149,"labels.inputs.In Multiples Of"),":"),n(3),A("",p.recurringDepositsAccountProductTemplate.inMultiplesOfDepositTerm?p.recurringDepositsAccountProductTemplate.inMultiplesOfDepositTerm:""," ",B(119,151,p.recurringDepositsAccountProductTemplate.inMultiplesOfDepositTermType?p.recurringDepositsAccountProductTemplate.inMultiplesOfDepositTermType.value:"","catalogs")),n(4),m(c(123,154,"labels.inputs.Maximum Deposit Term")),n(3),A("",p.recurringDepositsAccountProductTemplate.maxDepositTerm?p.recurringDepositsAccountProductTemplate.maxDepositTerm:""," ",B(126,156,p.recurringDepositsAccountProductTemplate.maxDepositTermType?p.recurringDepositsAccountProductTemplate.maxDepositTermType.value:"","catalogs")),n(3),m(c(129,159,"labels.inputs.Interest Rate Chart")),n(3),d("ngIf",p.recurringDepositsAccountProductTemplate==null?null:p.recurringDepositsAccountProductTemplate.accountChart.name),n(3),u("",c(135,161,"labels.inputs.Valid from Date"),":"),n(3),m(c(138,163,p.recurringDepositsAccountProductTemplate==null?null:p.recurringDepositsAccountProductTemplate.accountChart.fromDate)),n(2),d("ngIf",p.recurringDepositsAccountProductTemplate==null?null:p.recurringDepositsAccountProductTemplate.accountChart.endDate),n(),d("ngIf",p.recurringDepositsAccountProductTemplate==null?null:p.recurringDepositsAccountProductTemplate.accountChart.description),n(3),u("",c(144,165,"labels.inputs.Primary Grouping by Amount"),":"),n(3),m(c(147,167,p.recurringDepositsAccountProductTemplate==null?null:p.recurringDepositsAccountProductTemplate.accountChart.isPrimaryGroupingByAmount)),n(2),d("dataSource",p.interestRateChartData),n(18),d("matHeaderRowDef",p.chartSlabsDisplayedColumns),n(),d("matRowDefColumns",p.chartSlabsDisplayedColumns),n(),d("matRowDefColumns",p.chartSlabsIncentivesDisplayedColumns),n(),d("ngIf",p.recurringDepositAccountData.charges.length),n(4),u(" ",c(174,169,"labels.buttons.Previous")," "),n(2),d("routerLink",K(175,ec)),n(),u(" ",c(177,171,"labels.buttons.Cancel")," "),n(3),u(" ",c(180,173,"labels.buttons.Submit")," "))},dependencies:[I,ve,Pe,R,Q,Y,V,Ue,wt,Ft,Bt,kt,Et,Nt,_t,Vt,Gt,qt,Ht,jt,Te,It,w,Rt,ei,Wt,Xe],styles:["table[_ngcontent-%COMP%]{width:100%}.mat-elevation-z1[_ngcontent-%COMP%]{margin:1em 0 1.5em}h2[_ngcontent-%COMP%], h3[_ngcontent-%COMP%], h4[_ngcontent-%COMP%]{margin:0;font-weight:500}span[_ngcontent-%COMP%]{margin:.5em 0}mat-divider[_ngcontent-%COMP%]{margin:0 0 .5em}.margin-t[_ngcontent-%COMP%]{margin-top:1em}.margin-b[_ngcontent-%COMP%]{margin-bottom:.25em}.irc-table[_ngcontent-%COMP%]{width:100%}.irc-table[_ngcontent-%COMP%] tr.incentives-row[_ngcontent-%COMP%]{height:0}.irc-table[_ngcontent-%COMP%] tr.incentives-row[_ngcontent-%COMP%] > td[_ngcontent-%COMP%]{padding:0}.irc-table[_ngcontent-%COMP%] tr.incentives-row[_ngcontent-%COMP%] .incentives[_ngcontent-%COMP%]{overflow:hidden}.irc-table[_ngcontent-%COMP%] tr.incentives-row[_ngcontent-%COMP%] .mat-card[_ngcontent-%COMP%]{border-radius:0}"],data:{animation:[Me("expandChartSlab",[ne("collapsed",ee({height:"0px",minHeight:"0"})),ne("expanded",ee({height:"*"})),ye("expanded <=> collapsed",Ae("225ms cubic-bezier(0.4, 0.0, 0.2, 1)"))])]}})}}return t})();function ap(t,s){t&1&&C(0,"fa-icon",14)}function op(t,s){t&1&&C(0,"fa-icon",14)}function rp(t,s){t&1&&C(0,"fa-icon",15)}function cp(t,s){t&1&&C(0,"fa-icon",16)}function pp(t,s){t&1&&C(0,"fa-icon",17)}function sp(t,s){t&1&&(o(0),r(1,"translate")),t&2&&m(c(1,1,"labels.inputs.DETAILS"))}function lp(t,s){t&1&&(o(0),r(1,"translate")),t&2&&m(c(1,1,"labels.inputs.TERMS"))}function mp(t,s){t&1&&(o(0),r(1,"translate")),t&2&&m(c(1,1,"labels.inputs.SETTINGS"))}function dp(t,s){t&1&&(o(0),r(1,"translate")),t&2&&m(c(1,1,"labels.inputs.INTEREST RATE CHART"))}function up(t,s){t&1&&(o(0),r(1,"translate")),t&2&&m(c(1,1,"labels.inputs.CHARGES"))}function gp(t,s){t&1&&(o(0),r(1,"translate")),t&2&&m(c(1,1,"labels.inputs.PREVIEW"))}function Cp(t,s){if(t&1){let e=y();a(0,"mat-step",13),h(1,gp,2,3,"ng-template",9),a(2,"mifosx-recurring-deposits-account-preview-step",18),T("submitEvent",function(){S(e);let p=f();return M(p.submit())}),i()()}if(t&2){let e=f();n(2),d("recurringDepositsAccountTemplate",e.recurringDepositsAccountTemplate)("recurringDepositsAccountProductTemplate",e.recurringDepositsAccountProductTemplate)("recurringDepositAccountData",e.recurringDepositAccountData)}}var pn=(()=>{class t{constructor(){this.route=_(N),this.router=_(W),this.dateUtils=_(X),this.recurringDepositsService=_(k),this.settingsService=_($),this.route.data.subscribe(e=>{this.recurringDepositsAccountTemplate=e.recurringDepositsAccountTemplate})}setTemplate(e){this.recurringDepositsAccountProductTemplate=e}get recurringDepositAccountDetailsForm(){return this.recurringDepositsAccountDetailsStep.recurringDepositAccountDetailsForm}get recurringDepositAccountTermsForm(){return this.recurringDepositAccountTermsStep.recurringDepositAccountTermsForm}get recurringDepositAccountSettingsForm(){return this.recurringDepositAccountSettingsStep.recurringDepositAccountSettingsForm}get recurringDepositAccountFormValid(){return this.recurringDepositAccountDetailsForm.valid&&this.recurringDepositAccountTermsForm.valid&&this.recurringDepositAccountSettingsForm.valid}get recurringDepositAccountData(){return F(F(F(F({},this.recurringDepositsAccountDetailsStep.recurringDepositAccountDetails),this.recurringDepositAccountTermsStep.recurringDepositAccountTerms),this.recurringDepositAccountSettingsStep.recurringDepositAccountSettings),this.recurringDepositAccountChargesStep.recurringDepositAccountCharges)}get recurringDepositAccount(){return F(F(F(F({},this.recurringDepositsAccountDetailsStep.recurringDepositAccountDetails),this.recurringDepositAccountTermsStep.recurringDepositAccountTerms),this.recurringDepositAccountSettingsStep.recurringDepositAccountSettings),this.recurringDepositAccountChargesStep.recurringDepositAccountCharges)}submit(){let e=this.settingsService.language.code,l=this.settingsService.dateFormat,g=J(F({},this.recurringDepositAccount),{clientId:this.recurringDepositsAccountTemplate.clientId,charges:this.recurringDepositAccount.charges.map(b=>({chargeId:b.id,amount:b.amount,dueDate:b.dueDate&&this.dateUtils.formatDate(b.dueDate,l),feeOnMonthDay:b.feeOnMonthDay,feeInterval:b.feeInterval})),isCalendarInherited:this.recurringDepositAccount.recurringDepositAccount?this.recurringDepositAccount.recurringDepositAccount:!1,submittedOnDate:this.dateUtils.formatDate(this.recurringDepositAccount.submittedOnDate,l),expectedFirstDepositOnDate:this.dateUtils.formatDate(this.recurringDepositAccount.expectedFirstDepositOnDate,l),dateFormat:l,monthDayFormat:"dd MMMM",locale:e});this.recurringDepositsService.createRecurringDepositAccount(g).subscribe(b=>{this.router.navigate(["../",b.resourceId],{relativeTo:this.route})})}static{this.\u0275fac=function(l){return new(l||t)}}static{this.\u0275cmp=O({type:t,selectors:[["mifosx-create-recurring-deposits-account"]],viewQuery:function(l,p){if(l&1&&(Pt(se,7),Pt(le,7),Pt(me,7),Pt(de,7)),l&2){let g;Tt(g=St())&&(p.recurringDepositsAccountDetailsStep=g.first),Tt(g=St())&&(p.recurringDepositAccountTermsStep=g.first),Tt(g=St())&&(p.recurringDepositAccountSettingsStep=g.first),Tt(g=St())&&(p.recurringDepositAccountChargesStep=g.first)}},decls:24,vars:15,consts:[["recurringDepositAccountStepper",""],[1,"container"],["orientation","vertical","labelPosition","bottom",1,"mat-elevation-z8",3,"linear"],["matStepperIcon","number"],["matStepperIcon","edit"],["matStepperIcon","done"],["matStepperIcon","error"],["matStepperIcon","preview"],[3,"stepControl"],["matStepLabel",""],[3,"recurringDepositsAccountProductTemplate","recurringDepositsAccountTemplate"],[3,"recurringDepositsAccountTemplate","recurringDepositsAccountProductTemplate"],[3,"recurringDepositsAccountTemplate","recurringDepositsAccountProductTemplate","recurringDepositAccountFormValid"],["state","preview","completed",""],["icon","pencil-alt","size","sm"],["icon","check","size","sm"],["icon","exclamation-triangle","size","lg"],["icon","eye","size","sm"],[3,"submitEvent","recurringDepositsAccountTemplate","recurringDepositsAccountProductTemplate","recurringDepositAccountData"]],template:function(l,p){if(l&1){let g=y();a(0,"div",1)(1,"mat-stepper",2,0),h(3,ap,1,0,"ng-template",3)(4,op,1,0,"ng-template",4)(5,rp,1,0,"ng-template",5)(6,cp,1,0,"ng-template",6)(7,pp,1,0,"ng-template",7),a(8,"mat-step",8),h(9,sp,2,3,"ng-template",9),a(10,"mifosx-recurring-deposits-account-details-step",10),T("recurringDepositsAccountProductTemplate",function(G){return S(g),M(p.setTemplate(G))}),i()(),a(11,"mat-step",8),h(12,lp,2,3,"ng-template",9),C(13,"mifosx-recurring-deposits-account-terms-step",11),i(),a(14,"mat-step",8),h(15,mp,2,3,"ng-template",9),C(16,"mifosx-recurring-deposits-account-settings-step",11),i(),a(17,"mat-step"),h(18,dp,2,3,"ng-template",9),C(19,"mifosx-recurring-deposits-account-interest-rate-chart-step",11),i(),a(20,"mat-step"),h(21,up,2,3,"ng-template",9),C(22,"mifosx-recurring-deposits-account-charges-step",12),i(),x(23,Cp,3,3,"mat-step",13),i()()}l&2&&(n(),d("linear",!1),n(7),d("stepControl",p.recurringDepositAccountDetailsForm),n(2),d("recurringDepositsAccountTemplate",p.recurringDepositsAccountTemplate),n(),d("stepControl",p.recurringDepositAccountTermsForm),n(2),d("recurringDepositsAccountTemplate",p.recurringDepositsAccountTemplate)("recurringDepositsAccountProductTemplate",p.recurringDepositsAccountProductTemplate),n(),d("stepControl",p.recurringDepositAccountSettingsForm),n(2),d("recurringDepositsAccountTemplate",p.recurringDepositsAccountTemplate)("recurringDepositsAccountProductTemplate",p.recurringDepositsAccountProductTemplate),n(3),d("recurringDepositsAccountTemplate",p.recurringDepositsAccountTemplate)("recurringDepositsAccountProductTemplate",p.recurringDepositsAccountProductTemplate),n(3),d("recurringDepositsAccountTemplate",p.recurringDepositsAccountTemplate)("recurringDepositsAccountProductTemplate",p.recurringDepositsAccountProductTemplate)("recurringDepositAccountFormValid",p.recurringDepositAccountFormValid),n(),D(p.recurringDepositAccountFormValid?23:-1))},dependencies:[I,R,Je,Qe,_t,Ye,Ke,se,le,me,Fe,de,ke,w],encapsulation:2})}}return t})();var _p=()=>["../../"];function fp(t,s){t&1&&(a(0,"mat-error"),o(1),r(2,"translate"),r(3,"translate"),a(4,"strong"),o(5),r(6,"translate"),i()()),t&2&&(n(),A(" ",c(2,3,"labels.inputs.Activated On Date")," ",c(3,5,"labels.commons.is")," "),n(4),m(c(6,7,"labels.commons.required")))}var sn=(()=>{class t{constructor(){this.formBuilder=_(st),this.recurringDepositsService=_(k),this.dateUtils=_(X),this.route=_(N),this.router=_(W),this.settingsService=_($),this.minDate=new Date(2e3,0,1),this.maxDate=new Date,this.accountId=this.route.parent.snapshot.params.recurringDepositAccountId}ngOnInit(){this.maxDate=this.settingsService.businessDate,this.createActivateRecurringDepositsAccountForm()}createActivateRecurringDepositsAccountForm(){this.activateRecurringDepositsAccountForm=this.formBuilder.group({activatedOnDate:["",q.required]})}submit(){let e=this.activateRecurringDepositsAccountForm.value,l=this.settingsService.language.code,p=this.settingsService.dateFormat,g=this.activateRecurringDepositsAccountForm.value.activatedOnDate;e.activatedOnDate instanceof Date&&(e.activatedOnDate=this.dateUtils.formatDate(g,p));let b=J(F({},e),{dateFormat:p,locale:l});this.recurringDepositsService.executeRecurringDepositsAccountCommand(this.accountId,"activate",b).subscribe(()=>{this.router.navigate(["../../"],{relativeTo:this.route})})}static{this.\u0275fac=function(l){return new(l||t)}}static{this.\u0275cmp=O({type:t,selectors:[["mifosx-activate-recurring-deposits-account"]],decls:20,vars:18,consts:[["activatedOnDatePicker",""],[1,"container"],[3,"ngSubmit","formGroup"],[1,"flex-100",3,"click"],["matInput","","required","","formControlName","activatedOnDate",3,"min","max","matDatepicker"],["matSuffix","",3,"for"],[1,"layout-row","align-center","gap-5px","responsive-column"],["type","button","mat-raised-button","",3,"routerLink"],["mat-raised-button","","color","primary",3,"disabled"]],template:function(l,p){if(l&1){let g=y();a(0,"div",1)(1,"mat-card")(2,"form",2),T("ngSubmit",function(){return S(g),M(p.submit())}),a(3,"mat-card-content")(4,"mat-form-field",3),T("click",function(){S(g);let G=E(11);return M(G.open())}),a(5,"mat-label"),o(6),r(7,"translate"),i(),C(8,"input",4)(9,"mat-datepicker-toggle",5)(10,"mat-datepicker",null,0),x(12,fp,7,9,"mat-error"),i()(),a(13,"mat-card-actions",6)(14,"button",7),o(15),r(16,"translate"),i(),a(17,"button",8),o(18),r(19,"translate"),i()()()()()}if(l&2){let g=E(11);n(2),d("formGroup",p.activateRecurringDepositsAccountForm),n(4),m(c(7,11,"labels.inputs.Activated On Date")),n(2),d("min",p.minDate)("max",p.maxDate)("matDatepicker",g),n(),d("for",g),n(3),D(p.activateRecurringDepositsAccountForm.controls.activatedOnDate.hasError("required")?12:-1),n(2),d("routerLink",K(17,_p)),n(),u(" ",c(16,13,"labels.buttons.Cancel")," "),n(2),d("disabled",!p.activateRecurringDepositsAccountForm.valid),n(),u(" ",c(19,15,"labels.buttons.Confirm")," ")}},dependencies:[I,R,rt,mt,Z,ot,dt,ct,pt,Q,Y,ut,ft,nt,et,gt,ht,Ct,Dt,bt,xt,V,w],styles:[".container[_ngcontent-%COMP%]{max-width:37rem}"]})}}return t})();var hp=()=>["../../"],ln=(()=>{class t{constructor(){this.formBuilder=_(st),this.recurringDepositsService=_(k),this.route=_(N),this.router=_(W),this.undoCommand="undoapproval",this.undoAction=this.route.snapshot.params.name,this.undoAction==="Undo Activation"&&(this.undoCommand="undoactivate"),this.accountId=this.route.parent.snapshot.params.recurringDepositAccountId}ngOnInit(){this.createUndoApprovalRecurringDepositsAccountForm()}createUndoApprovalRecurringDepositsAccountForm(){this.undoApprovalRecurringDepositsAccountForm=this.formBuilder.group({note:[""]})}submit(){let e=F({},this.undoApprovalRecurringDepositsAccountForm.value);this.undoAction==="Undo Activation"?this.recurringDepositsService.executeRecurringDepositsAccountCommand(this.accountId,this.undoCommand,e).subscribe(()=>{this.router.navigate(["../../"],{relativeTo:this.route})}):this.recurringDepositsService.executeRecurringDepositsAccountCommand(this.accountId,"undoapproval",e).subscribe(()=>{this.router.navigate(["../../"],{relativeTo:this.route})})}static{this.\u0275fac=function(l){return new(l||t)}}static{this.\u0275cmp=O({type:t,selectors:[["mifosx-undo-approval-recurring-deposits-account"]],decls:16,vars:13,consts:[[1,"container"],[3,"ngSubmit","formGroup"],[1,"flex-100"],["matInput","","formControlName","note","cdkTextareaAutosize","","cdkAutosizeMinRows","2"],[1,"layout-row","align-center","gap-5px","responsive-column"],["type","button","mat-raised-button","",3,"routerLink"],["mat-raised-button","","color","warn",3,"disabled"]],template:function(l,p){l&1&&(a(0,"div",0)(1,"mat-card")(2,"form",1),T("ngSubmit",function(){return p.submit()}),a(3,"mat-card-content")(4,"mat-form-field",2)(5,"mat-label"),o(6),r(7,"translate"),i(),C(8,"textarea",3),i()(),a(9,"mat-card-actions",4)(10,"button",5),o(11),r(12,"translate"),i(),a(13,"button",6),o(14),r(15,"translate"),i()()()()()),l&2&&(n(2),d("formGroup",p.undoApprovalRecurringDepositsAccountForm),n(4),m(c(7,6,"labels.inputs.Note")),n(4),d("routerLink",K(12,hp)),n(),u(" ",c(12,8,"labels.buttons.Cancel")," "),n(2),d("disabled",!p.undoApprovalRecurringDepositsAccountForm.valid),n(),u(" ",c(15,10,"labels.buttons.Confirm")," "))},dependencies:[I,R,rt,mt,Z,ot,ct,pt,Q,Y,ut,ft,nt,et,Ct,V,Lt,w],styles:[".container[_ngcontent-%COMP%]{max-width:37rem}"]})}}return t})();var xp=()=>["../../"];function Dp(t,s){t&1&&(a(0,"mat-error"),o(1),r(2,"translate"),r(3,"translate"),a(4,"strong"),o(5),r(6,"translate"),i()()),t&2&&(n(),A(" ",c(2,3,"labels.inputs.Approved On Date")," ",c(3,5,"labels.commons.is")," "),n(4),m(c(6,7,"labels.commons.required")))}var mn=(()=>{class t{constructor(){this.formBuilder=_(st),this.recurringDepositsService=_(k),this.dateUtils=_(X),this.route=_(N),this.router=_(W),this.settingsService=_($),this.minDate=new Date(2e3,0,1),this.maxDate=new Date,this.accountId=this.route.parent.snapshot.params.recurringDepositAccountId}ngOnInit(){this.maxDate=this.settingsService.businessDate,this.createApproveRecurringDepositsAccountForm()}createApproveRecurringDepositsAccountForm(){this.approveRecurringDepositsAccountForm=this.formBuilder.group({approvedOnDate:["",q.required],note:[""]})}submit(){let e=this.approveRecurringDepositsAccountForm.value,l=this.settingsService.language.code,p=this.settingsService.dateFormat,g=this.approveRecurringDepositsAccountForm.value.approvedOnDate;e.approvedOnDate instanceof Date&&(e.approvedOnDate=this.dateUtils.formatDate(g,p));let b=J(F({},e),{dateFormat:p,locale:l});this.recurringDepositsService.executeRecurringDepositsAccountCommand(this.accountId,"approve",b).subscribe(()=>{this.router.navigate(["../../"],{relativeTo:this.route})})}static{this.\u0275fac=function(l){return new(l||t)}}static{this.\u0275cmp=O({type:t,selectors:[["mifosx-approve-recurring-deposits-account"]],decls:26,vars:21,consts:[["approvedOnDatePicker",""],[1,"container"],[3,"ngSubmit","formGroup"],[1,"layout-column"],[3,"click"],["matInput","","required","","formControlName","approvedOnDate",3,"min","max","matDatepicker"],["matSuffix","",3,"for"],["matInput","","formControlName","note","cdkTextareaAutosize","","cdkAutosizeMinRows","2"],[1,"layout-row","align-center","gap-5px","responsive-column"],["type","button","mat-raised-button","",3,"routerLink"],["mat-raised-button","","color","primary",3,"disabled"]],template:function(l,p){if(l&1){let g=y();a(0,"div",1)(1,"mat-card")(2,"form",2),T("ngSubmit",function(){return S(g),M(p.submit())}),a(3,"mat-card-content")(4,"div",3)(5,"mat-form-field",4),T("click",function(){S(g);let G=E(12);return M(G.open())}),a(6,"mat-label"),o(7),r(8,"translate"),i(),C(9,"input",5)(10,"mat-datepicker-toggle",6)(11,"mat-datepicker",null,0),x(13,Dp,7,9,"mat-error"),i(),a(14,"mat-form-field")(15,"mat-label"),o(16),r(17,"translate"),i(),C(18,"textarea",7),i()()(),a(19,"mat-card-actions",8)(20,"button",9),o(21),r(22,"translate"),i(),a(23,"button",10),o(24),r(25,"translate"),i()()()()()}if(l&2){let g=E(12);n(2),d("formGroup",p.approveRecurringDepositsAccountForm),n(5),m(c(8,12,"labels.inputs.Approved On Date")),n(2),d("min",p.minDate)("max",p.maxDate)("matDatepicker",g),n(),d("for",g),n(3),D(p.approveRecurringDepositsAccountForm.controls.approvedOnDate.hasError("required")?13:-1),n(3),m(c(17,14,"labels.inputs.Note")),n(4),d("routerLink",K(20,xp)),n(),u(" ",c(22,16,"labels.buttons.Cancel")," "),n(2),d("disabled",!p.approveRecurringDepositsAccountForm),n(),u(" ",c(25,18,"labels.buttons.Confirm")," ")}},dependencies:[I,R,rt,mt,Z,ot,dt,ct,pt,Q,Y,ut,ft,nt,et,gt,ht,Ct,Dt,bt,xt,V,Lt,w],styles:[".container[_ngcontent-%COMP%]{max-width:37rem}"]})}}return t})();var bp=()=>["../../"];function vp(t,s){t&1&&(a(0,"mat-error"),o(1),r(2,"translate"),r(3,"translate"),a(4,"strong"),o(5),r(6,"translate"),i()()),t&2&&(n(),A(" ",c(2,3,"labels.inputs.Rejected On Date")," ",c(3,5,"labels.commons.is")," "),n(4),m(c(6,7,"labels.commons.required")))}var dn=(()=>{class t{constructor(){this.formBuilder=_(st),this.recurringDepositsService=_(k),this.dateUtils=_(X),this.route=_(N),this.router=_(W),this.settingsService=_($),this.minDate=new Date(2e3,0,1),this.maxDate=new Date,this.accountId=this.route.parent.snapshot.params.recurringDepositAccountId}ngOnInit(){this.maxDate=this.settingsService.businessDate,this.createRejectRecurringDepositsAccountForm()}createRejectRecurringDepositsAccountForm(){this.rejectRecurringDepositsAccountForm=this.formBuilder.group({rejectedOnDate:["",q.required],note:[""]})}submit(){let e=this.rejectRecurringDepositsAccountForm.value,l=this.settingsService.language.code,p=this.settingsService.dateFormat,g=this.rejectRecurringDepositsAccountForm.value.rejectedOnDate;e.rejectedOnDate instanceof Date&&(e.rejectedOnDate=this.dateUtils.formatDate(g,p));let b=J(F({},e),{dateFormat:p,locale:l});this.recurringDepositsService.executeRecurringDepositsAccountCommand(this.accountId,"reject",b).subscribe(()=>{this.router.navigate(["../../"],{relativeTo:this.route})})}static{this.\u0275fac=function(l){return new(l||t)}}static{this.\u0275cmp=O({type:t,selectors:[["mifosx-reject-recurring-deposits-account"]],decls:26,vars:21,consts:[["rejectedOnDatePicker",""],[1,"container"],[3,"ngSubmit","formGroup"],[1,"layout-column"],[3,"click"],["matInput","","required","","formControlName","rejectedOnDate",3,"min","max","matDatepicker"],["matSuffix","",3,"for"],["matInput","","formControlName","note","cdkTextareaAutosize","","cdkAutosizeMinRows","2"],[1,"layout-row","align-center","gap-5px","responsive-column"],["type","button","mat-raised-button","",3,"routerLink"],["mat-raised-button","","color","primary",3,"disabled"]],template:function(l,p){if(l&1){let g=y();a(0,"div",1)(1,"mat-card")(2,"form",2),T("ngSubmit",function(){return S(g),M(p.submit())}),a(3,"mat-card-content")(4,"div",3)(5,"mat-form-field",4),T("click",function(){S(g);let G=E(12);return M(G.open())}),a(6,"mat-label"),o(7),r(8,"translate"),i(),C(9,"input",5)(10,"mat-datepicker-toggle",6)(11,"mat-datepicker",null,0),x(13,vp,7,9,"mat-error"),i(),a(14,"mat-form-field")(15,"mat-label"),o(16),r(17,"translate"),i(),C(18,"textarea",7),i()()(),a(19,"mat-card-actions",8)(20,"button",9),o(21),r(22,"translate"),i(),a(23,"button",10),o(24),r(25,"translate"),i()()()()()}if(l&2){let g=E(12);n(2),d("formGroup",p.rejectRecurringDepositsAccountForm),n(5),m(c(8,12,"labels.inputs.Rejected On Date")),n(2),d("min",p.minDate)("max",p.maxDate)("matDatepicker",g),n(),d("for",g),n(3),D(p.rejectRecurringDepositsAccountForm.controls.rejectedOnDate.hasError("required")?13:-1),n(3),m(c(17,14,"labels.inputs.Note")),n(4),d("routerLink",K(20,bp)),n(),u(" ",c(22,16,"labels.buttons.Cancel")," "),n(2),d("disabled",!p.rejectRecurringDepositsAccountForm),n(),u(" ",c(25,18,"labels.buttons.Confirm")," ")}},dependencies:[I,R,rt,mt,Z,ot,dt,ct,pt,Q,Y,ut,ft,nt,et,gt,ht,Ct,Dt,bt,xt,V,Lt,w],styles:[".container[_ngcontent-%COMP%]{max-width:37rem}"]})}}return t})();var Pp=()=>["../../"];function Tp(t,s){t&1&&(a(0,"mat-error"),o(1),r(2,"translate"),r(3,"translate"),a(4,"strong"),o(5),r(6,"translate"),i()()),t&2&&(n(),A(" ",c(2,3,"labels.inputs.Withdrawn On Date")," ",c(3,5,"labels.commons.is")," "),n(4),m(c(6,7,"labels.commons.required")))}var un=(()=>{class t{constructor(){this.formBuilder=_(st),this.recurringDepositsService=_(k),this.dateUtils=_(X),this.route=_(N),this.router=_(W),this.settingsService=_($),this.minDate=new Date(2e3,0,1),this.maxDate=new Date,this.accountId=this.route.parent.snapshot.params.recurringDepositAccountId}ngOnInit(){this.maxDate=this.settingsService.businessDate,this.createWithdrawRecurringDepositsAccountForm()}createWithdrawRecurringDepositsAccountForm(){this.withdrawRecurringDepositsAccountForm=this.formBuilder.group({withdrawnOnDate:["",q.required],note:[""]})}submit(){let e=this.withdrawRecurringDepositsAccountForm.value,l=this.settingsService.language.code,p=this.settingsService.dateFormat,g=this.withdrawRecurringDepositsAccountForm.value.withdrawnOnDate;e.withdrawnOnDate instanceof Date&&(e.withdrawnOnDate=this.dateUtils.formatDate(g,p));let b=J(F({},e),{dateFormat:p,locale:l});this.recurringDepositsService.executeRecurringDepositsAccountCommand(this.accountId,"withdrawnByApplicant",b).subscribe(()=>{this.router.navigate(["../../"],{relativeTo:this.route})})}static{this.\u0275fac=function(l){return new(l||t)}}static{this.\u0275cmp=O({type:t,selectors:[["mifosx-withdraw-by-client-recurring-deposits-account"]],decls:26,vars:21,consts:[["withdrawnOnDatePicker",""],[1,"container"],[3,"ngSubmit","formGroup"],[1,"layout-column"],[3,"click"],["matInput","","required","","formControlName","withdrawnOnDate",3,"min","max","matDatepicker"],["matSuffix","",3,"for"],["matInput","","formControlName","note","cdkTextareaAutosize","","cdkAutosizeMinRows","2"],[1,"layout-row","align-center","gap-5px","responsive-column"],["type","button","mat-raised-button","",3,"routerLink"],["mat-raised-button","","color","primary",3,"disabled"]],template:function(l,p){if(l&1){let g=y();a(0,"div",1)(1,"mat-card")(2,"form",2),T("ngSubmit",function(){return S(g),M(p.submit())}),a(3,"mat-card-content")(4,"div",3)(5,"mat-form-field",4),T("click",function(){S(g);let G=E(12);return M(G.open())}),a(6,"mat-label"),o(7),r(8,"translate"),i(),C(9,"input",5)(10,"mat-datepicker-toggle",6)(11,"mat-datepicker",null,0),x(13,Tp,7,9,"mat-error"),i(),a(14,"mat-form-field")(15,"mat-label"),o(16),r(17,"translate"),i(),C(18,"textarea",7),i()()(),a(19,"mat-card-actions",8)(20,"button",9),o(21),r(22,"translate"),i(),a(23,"button",10),o(24),r(25,"translate"),i()()()()()}if(l&2){let g=E(12);n(2),d("formGroup",p.withdrawRecurringDepositsAccountForm),n(5),m(c(8,12,"labels.inputs.Withdrawn On Date")),n(2),d("min",p.minDate)("max",p.maxDate)("matDatepicker",g),n(),d("for",g),n(3),D(p.withdrawRecurringDepositsAccountForm.controls.withdrawnOnDate.hasError("required")?13:-1),n(3),m(c(17,14,"labels.inputs.Note")),n(4),d("routerLink",K(20,Pp)),n(),u(" ",c(22,16,"labels.buttons.Cancel")," "),n(2),d("disabled",!p.withdrawRecurringDepositsAccountForm.valid),n(),u(" ",c(25,18,"labels.buttons.Confirm")," ")}},dependencies:[I,R,rt,mt,Z,ot,dt,ct,pt,Q,Y,ut,ft,nt,et,gt,ht,Ct,Dt,bt,xt,V,Lt,w],styles:[".container[_ngcontent-%COMP%]{max-width:37rem}"]})}}return t})();var Sp=()=>["../../"];function Mp(t,s){if(t&1&&(a(0,"mat-option",6),o(1),i()),t&2){let e=s.$implicit;d("value",e.id),n(),u(" ",e.name+" ("+e.currency.name+")"," ")}}function Ap(t,s){t&1&&(a(0,"mat-error"),o(1),r(2,"translate"),r(3,"translate"),a(4,"strong"),o(5),r(6,"translate"),i()()),t&2&&(n(),A(" ",c(2,3,"labels.inputs.Charge")," ",c(3,5,"labels.commons.is")," "),n(4),m(c(6,7,"labels.commons.required")))}function yp(t,s){t&1&&(a(0,"mat-error"),o(1),r(2,"translate"),r(3,"translate"),a(4,"strong"),o(5),r(6,"translate"),i()()),t&2&&(n(),A(" ",c(2,3,"labels.inputs.Amount")," ",c(3,5,"labels.commons.is")," "),n(4),m(c(6,7,"labels.commons.required")))}function Op(t,s){if(t&1&&(a(0,"mat-option",6),o(1),i()),t&2){let e=s.$implicit;d("value",e.id),n(),u(" ",e.value," ")}}function Ip(t,s){if(t&1&&(a(0,"mat-option",6),o(1),i()),t&2){let e=s.$implicit;d("value",e.id),n(),u(" ",e.value," ")}}function Rp(t,s){t&1&&(a(0,"mat-error"),o(1),r(2,"translate"),r(3,"translate"),a(4,"strong"),o(5),r(6,"translate"),i()()),t&2&&(n(),A(" ",c(2,3,"labels.inputs.Due for collection on")," ",c(3,5,"labels.commons.is")," "),n(4),m(c(6,7,"labels.commons.required")))}function wp(t,s){if(t&1){let e=y();a(0,"mat-form-field",13),T("click",function(){S(e);let p=E(7);return M(p.open())}),a(1,"mat-label"),o(2),r(3,"translate"),i(),C(4,"input",14)(5,"mat-datepicker-toggle",15)(6,"mat-datepicker",null,0),x(8,Rp,7,9,"mat-error"),i()}if(t&2){let e=E(7),l=f(2);n(2),m(c(3,6,"labels.inputs.Due for collection on")),n(2),d("min",l.minDate)("max",l.maxDate)("matDatepicker",e),n(),d("for",e),n(3),D(l.recurringDepositsChargeForm.controls.dueDate.hasError("required")?8:-1)}}function Ep(t,s){t&1&&(a(0,"mat-error"),o(1),r(2,"translate"),r(3,"translate"),a(4,"strong"),o(5),r(6,"translate"),i()()),t&2&&(n(),A(" ",c(2,3,"labels.inputs.Due Date")," ",c(3,5,"labels.commons.is")," "),n(4),m(c(6,7,"labels.commons.required")))}function Bp(t,s){if(t&1){let e=y();a(0,"mat-form-field",13),T("click",function(){S(e);let p=E(7);return M(p.open())}),a(1,"mat-label"),o(2),r(3,"translate"),i(),C(4,"input",16)(5,"mat-datepicker-toggle",15)(6,"mat-datepicker",null,1),x(8,Ep,7,9,"mat-error"),i()}if(t&2){let e=E(7),l=f(2);n(2),m(c(3,6,"labels.inputs.Due On")),n(2),d("min",l.minDate)("max",l.maxDate)("matDatepicker",e),n(),d("for",e),n(3),D(l.recurringDepositsChargeForm.controls.feeOnMonthDay.hasError("required")?8:-1)}}function Fp(t,s){t&1&&(a(0,"mat-form-field")(1,"mat-label"),o(2),r(3,"translate"),i(),C(4,"input",17),i()),t&2&&(n(2),m(c(3,1,"labels.inputs.Repeats Every")))}function kp(t,s){if(t&1&&(a(0,"div",4)(1,"mat-form-field")(2,"mat-label"),o(3),r(4,"translate"),i(),C(5,"input",10),x(6,yp,7,9,"mat-error"),i(),a(7,"mat-form-field")(8,"mat-label"),o(9),r(10,"translate"),i(),a(11,"mat-select",11),L(12,Op,2,2,"mat-option",6,z),i()(),a(14,"mat-form-field")(15,"mat-label"),o(16),r(17,"translate"),i(),a(18,"mat-select",12),L(19,Ip,2,2,"mat-option",6,z),i()(),x(21,wp,9,8,"mat-form-field"),x(22,Bp,9,8,"mat-form-field"),x(23,Fp,5,3,"mat-form-field"),i()),t&2){let e=f();n(3),m(c(4,7,"labels.inputs.Amount")),n(3),D(e.recurringDepositsChargeForm.controls.amount.hasError("required")?6:-1),n(3),m(c(10,9,"labels.inputs.Charge Calculation")),n(3),j(e.chargeDetails.chargeCalculationTypeOptions),n(4),m(c(17,11,"labels.inputs.Charge time type")),n(3),j(e.chargeDetails.chargeTimeTypeOptions),n(2),D(e.recurringDepositsChargeForm.contains("dueDate")?21:-1),n(),D(e.recurringDepositsChargeForm.contains("feeOnMonthDay")?22:-1),n(),D(e.recurringDepositsChargeForm.contains("feeInterval")?23:-1)}}var gn=(()=>{class t{constructor(){this.formBuilder=_(st),this.route=_(N),this.router=_(W),this.dateUtils=_(X),this.savingsService=_(pe),this.settingsService=_($),this.minDate=new Date(2e3,0,1),this.maxDate=new Date,this.route.data.subscribe(e=>{this.savingsChargeOptions=e.recurringDepositsAccountActionData.chargeOptions}),this.recurringDepositAccountId=this.route.parent.snapshot.params.recurringDepositAccountId}ngOnInit(){this.maxDate=this.settingsService.businessDate,this.createRecurringDepositsChargeForm(),this.buildDependencies()}buildDependencies(){this.recurringDepositsChargeForm.controls.chargeId.valueChanges.subscribe(e=>{this.savingsService.getChargeTemplate(e).subscribe(l=>{this.chargeDetails=l;let p=l.chargeTimeType.id;(l.chargeTimeType.value==="Withdrawal Fee"||l.chargeTimeType.value==="Saving No Activity Fee")&&(this.chargeDetails.dueDateNotRequired=!0),(l.chargeTimeType.value==="Annual Fee"||l.chargeTimeType.value==="Monthly Fee")&&(this.chargeDetails.chargeTimeTypeAnnualOrMonth=!0),!this.chargeDetails.dueDateNotRequired&&!this.chargeDetails.chargeTimeTypeAnnualOrMonth?this.recurringDepositsChargeForm.addControl("dueDate",new tt("",q.required)):this.recurringDepositsChargeForm.removeControl("dueDate"),!this.chargeDetails.dueDateNotRequired&&this.chargeDetails.chargeTimeTypeAnnualOrMonth?this.recurringDepositsChargeForm.addControl("feeOnMonthDay",new tt("",q.required)):this.recurringDepositsChargeForm.removeControl("feeOnMonthDay"),p.value==="Monthly Fee"?this.recurringDepositsChargeForm.addControl("feeInterval",new tt(l.feeInterval,q.required)):this.recurringDepositsChargeForm.removeControl("feeInterval"),this.recurringDepositsChargeForm.patchValue({amount:l.amount,chargeCalculationType:l.chargeCalculationType.id,chargeTimeType:l.chargeTimeType.id})})})}createRecurringDepositsChargeForm(){this.recurringDepositsChargeForm=this.formBuilder.group({chargeId:["",q.required],amount:["",q.required],chargeCalculationType:[{value:"",disabled:!0}],chargeTimeType:[{value:"",disabled:!0}]})}submit(){let e=this.recurringDepositsChargeForm.value;if(e.locale=this.settingsService.language.code,e.feeInterval||(e.feeInterval=this.chargeDetails.feeInterval),this.chargeDetails.dueDateNotRequired!==!0)if(this.chargeDetails.chargeTimeTypeAnnualOrMonth===!0){let l="MMMM-dd";if(e.monthDayFormat=l,e.feeOnMonthDay){let p=this.recurringDepositsChargeForm.value.feeOnMonthDay;e.feeOnMonthDay=this.dateUtils.formatDate(p,l)}}else{let l=this.settingsService.dateFormat;if(e.dateFormat=l,e.dueDate){let p=this.recurringDepositsChargeForm.value.dueDate;e.dueDate=this.dateUtils.formatDate(p,l)}}this.savingsService.createSavingsCharge(this.recurringDepositAccountId,"charges",e).subscribe(()=>{this.router.navigate(["../../"],{relativeTo:this.route})})}static{this.\u0275fac=function(l){return new(l||t)}}static{this.\u0275cmp=O({type:t,selectors:[["mifosx-add-charge-recurring-deposits-account"]],decls:21,vars:15,consts:[["dueDatePicker",""],["feeOnMonthDayPicker",""],[1,"container"],[3,"ngSubmit","formGroup"],[1,"layout-column"],["required","","formControlName","chargeId"],[3,"value"],[1,"layout-row","layout-xs-column","layout-align-center","gap-5px"],["type","button","mat-raised-button","",3,"routerLink"],["mat-raised-button","","color","primary",3,"disabled"],["type","number","required","","matInput","","formControlName","amount"],["formControlName","chargeCalculationType"],["formControlName","chargeTimeType"],[3,"click"],["matInput","","required","","formControlName","dueDate",3,"min","max","matDatepicker"],["matSuffix","",3,"for"],["matInput","","required","","formControlName","feeOnMonthDay",3,"min","max","matDatepicker"],["matInput","","formControlName","feeInterval"]],template:function(l,p){l&1&&(a(0,"div",2)(1,"mat-card")(2,"form",3),T("ngSubmit",function(){return p.submit()}),a(3,"mat-card-content")(4,"div",4)(5,"mat-form-field")(6,"mat-label"),o(7),r(8,"translate"),i(),a(9,"mat-select",5),L(10,Mp,2,2,"mat-option",6,z),i(),x(12,Ap,7,9,"mat-error"),i(),x(13,kp,24,13,"div",4),i(),a(14,"mat-card-actions",7)(15,"button",8),o(16),r(17,"translate"),i(),a(18,"button",9),o(19),r(20,"translate"),i()()()()()()),l&2&&(n(2),d("formGroup",p.recurringDepositsChargeForm),n(5),m(c(8,8,"labels.inputs.Charge")),n(3),j(p.savingsChargeOptions),n(2),D(p.recurringDepositsChargeForm.controls.chargeId.hasError("required")?12:-1),n(),D(p.chargeDetails?13:-1),n(2),d("routerLink",K(14,Sp)),n(),u(" ",c(17,10,"labels.buttons.Cancel")," "),n(2),d("disabled",!p.recurringDepositsChargeForm.valid),n(),u(" ",c(20,12,"labels.buttons.Submit")," "))},dependencies:[I,R,rt,mt,Re,Z,ot,dt,ct,pt,Q,Y,ut,ft,nt,et,gt,ht,Ct,Ot,yt,Dt,bt,xt,V,w],styles:[".container[_ngcontent-%COMP%]{width:37rem}"]})}}return t})();var Np=()=>["../../"];function Vp(t,s){t&1&&(a(0,"mat-error"),o(1),r(2,"translate"),r(3,"translate"),a(4,"strong"),o(5),r(6,"translate"),i()()),t&2&&(n(),A(" ",c(2,3,"labels.inputs.Closed On Date")," ",c(3,5,"labels.commons.is")," "),n(4),m(c(6,7,"labels.commons.required")))}var Cn=(()=>{class t{constructor(){this.formBuilder=_(st),this.recurringDepositsService=_(k),this.dateUtils=_(X),this.route=_(N),this.router=_(W),this.settingsService=_($),this.minDate=new Date(2e3,0,1),this.maxDate=new Date,this.accountId=this.route.parent.snapshot.params.recurringDepositAccountId}ngOnInit(){this.maxDate=this.settingsService.businessDate,this.createprematureCloseRecurringDepositsAccountForm()}createprematureCloseRecurringDepositsAccountForm(){this.prematureCloseRecurringDepositsAccountForm=this.formBuilder.group({closedOnDate:["",q.required]})}submit(){let e=this.prematureCloseRecurringDepositsAccountForm.value,l=this.settingsService.language.code,p=this.settingsService.dateFormat,g=this.prematureCloseRecurringDepositsAccountForm.value.closedOnDate;e.closedOnDate instanceof Date&&(e.closedOnDate=this.dateUtils.formatDate(g,p));let b=J(F({},e),{dateFormat:p,locale:l});this.recurringDepositsService.executeRecurringDepositsAccountCommand(this.accountId,"prematureClose",b).subscribe(()=>{this.router.navigate(["../../"],{relativeTo:this.route})})}static{this.\u0275fac=function(l){return new(l||t)}}static{this.\u0275cmp=O({type:t,selectors:[["mifosx-premature-close-recurring-deposit-account"]],decls:21,vars:18,consts:[["closedOnDatePicker",""],[1,"container"],[3,"ngSubmit","formGroup"],[1,"layout-column"],[3,"click"],["matInput","","required","","formControlName","closedOnDate",3,"min","max","matDatepicker"],["matSuffix","",3,"for"],[1,"layout-row","align-center","gap-5px","responsive-column"],["type","button","mat-raised-button","",3,"routerLink"],["mat-raised-button","","color","primary",3,"disabled"]],template:function(l,p){if(l&1){let g=y();a(0,"div",1)(1,"mat-card")(2,"form",2),T("ngSubmit",function(){return S(g),M(p.submit())}),a(3,"mat-card-content")(4,"div",3)(5,"mat-form-field",4),T("click",function(){S(g);let G=E(12);return M(G.open())}),a(6,"mat-label"),o(7),r(8,"translate"),i(),C(9,"input",5)(10,"mat-datepicker-toggle",6)(11,"mat-datepicker",null,0),x(13,Vp,7,9,"mat-error"),i()()(),a(14,"mat-card-actions",7)(15,"button",8),o(16),r(17,"translate"),i(),a(18,"button",9),o(19),r(20,"translate"),i()()()()()}if(l&2){let g=E(12);n(2),d("formGroup",p.prematureCloseRecurringDepositsAccountForm),n(5),m(c(8,11,"labels.inputs.Closed On")),n(2),d("min",p.minDate)("max",p.maxDate)("matDatepicker",g),n(),d("for",g),n(3),D(p.prematureCloseRecurringDepositsAccountForm.controls.closedOnDate.hasError("required")?13:-1),n(2),d("routerLink",K(17,Np)),n(),u(" ",c(17,13,"labels.buttons.Cancel")," "),n(2),d("disabled",!p.prematureCloseRecurringDepositsAccountForm),n(),u(" ",c(20,15,"labels.buttons.Confirm")," ")}},dependencies:[I,R,rt,mt,Z,ot,dt,ct,pt,Q,Y,ut,ft,nt,et,gt,ht,Ct,Dt,bt,xt,V,w],styles:[".container[_ngcontent-%COMP%]{max-width:37rem}"]})}}return t})();var qp=()=>["../general"];function Gp(t,s){t&1&&(a(0,"mat-error"),o(1),r(2,"translate"),r(3,"translate"),a(4,"strong"),o(5),r(6,"translate"),i()()),t&2&&(n(),A(" ",c(2,3,"labels.inputs.Closed On")," ",c(3,5,"labels.commons.is")," "),n(4),m(c(6,7,"labels.commons.required")))}function Hp(t,s){t&1&&(a(0,"mat-error"),o(1),r(2,"translate"),r(3,"translate"),a(4,"strong"),o(5),r(6,"translate"),i()()),t&2&&(n(),A(" ",c(2,3,"labels.inputs.Maturity Amount")," ",c(3,5,"labels.commons.is")," "),n(4),m(c(6,7,"labels.commons.required")))}function Up(t,s){if(t&1&&(a(0,"mat-option",10),o(1),i()),t&2){let e=s.$implicit;d("value",e.id),n(),u(" ",e.value," ")}}function $p(t,s){t&1&&(a(0,"mat-error"),o(1),r(2,"translate"),r(3,"translate"),a(4,"strong"),o(5),r(6,"translate"),i()()),t&2&&(n(),A(" ",c(2,3,"labels.inputs.Action")," ",c(3,5,"labels.commons.is")," "),n(4),m(c(6,7,"labels.commons.required")))}function zp(t,s){if(t&1&&(a(0,"mat-option",10),o(1),i()),t&2){let e=s.$implicit;d("value",e.id),n(),u(" ",e.accountNo," ")}}function Lp(t,s){t&1&&(a(0,"mat-error"),o(1),r(2,"translate"),r(3,"translate"),a(4,"strong"),o(5),r(6,"translate"),i()()),t&2&&(n(),A(" ",c(2,3,"labels.inputs.Transfer to savings account")," ",c(3,5,"labels.commons.is")," "),n(4),m(c(6,7,"labels.commons.required")))}function jp(t,s){if(t&1&&(a(0,"mat-form-field")(1,"mat-label"),o(2),r(3,"translate"),i(),a(4,"mat-select",20),L(5,zp,2,2,"mat-option",10,z),i(),x(7,Lp,7,9,"mat-error"),i()),t&2){let e=f();n(2),m(c(3,2,"labels.inputs.Transfer to Savings")),n(3),j(e.savingsAccountsData),n(2),D(e.closeRecurringDepositForm.controls.toSavingsAccountId.hasError("required")?7:-1)}}function Wp(t,s){t&1&&(a(0,"mat-form-field")(1,"mat-label"),o(2),r(3,"translate"),i(),C(4,"input",21),i()),t&2&&(n(2),m(c(3,1,"labels.inputs.Transfer Description")))}function Kp(t,s){if(t&1&&(a(0,"mat-option",10),o(1),i()),t&2){let e=s.$implicit;d("value",e.id),n(),u(" ",e.name," ")}}function Qp(t,s){t&1&&(a(0,"mat-error"),o(1),r(2,"translate"),r(3,"translate"),a(4,"strong"),o(5),r(6,"translate"),i()()),t&2&&(n(),A(" ",c(2,3,"labels.inputs.Payment Type")," ",c(3,5,"labels.commons.is")," "),n(4),m(c(6,7,"labels.commons.required")))}function Yp(t,s){t&1&&(a(0,"button",15),C(1,"i",22),i())}function Jp(t,s){t&1&&(a(0,"button",15),C(1,"i",23),i())}function Xp(t,s){t&1&&(a(0,"mat-form-field")(1,"mat-label"),o(2),r(3,"translate"),i(),C(4,"input",24),i(),a(5,"mat-form-field")(6,"mat-label"),o(7),r(8,"translate"),i(),C(9,"input",25),i(),a(10,"mat-form-field")(11,"mat-label"),o(12),r(13,"translate"),i(),C(14,"input",26),i(),a(15,"mat-form-field")(16,"mat-label"),o(17),r(18,"translate"),i(),C(19,"input",27),i(),a(20,"mat-form-field")(21,"mat-label"),o(22),r(23,"translate"),i(),C(24,"input",28),i()),t&2&&(n(2),u(" ",c(3,5,"labels.inputs.Account")," #"),n(5),u("",c(8,7,"labels.inputs.Cheque")," #"),n(5),m(c(13,9,"labels.inputs.Routing Code")),n(5),u("",c(18,11,"labels.inputs.Reciept")," #"),n(5),u("",c(23,13,"labels.inputs.Bank")," #"))}var _n=(()=>{class t{constructor(){this.formBuilder=_(st),this.route=_(N),this.router=_(W),this.dateUtils=_(X),this.recurringDepositsService=_(k),this.settingsService=_($),this.showPaymentDetails=!1,this.minDate=new Date(2e3,0,1),this.maxDate=new Date,this.route.data.subscribe(e=>{this.savingsAccountsData=e.recurringDepositsAccountActionData.savingsAccounts,this.maturityAmount=e.recurringDepositsAccountActionData.maturityAmount,this.onAccountClosureOptions=e.recurringDepositsAccountActionData.onAccountClosureOptions,this.paymentTypes=e.recurringDepositsAccountActionData.paymentTypeOptions,e.recurringDepositsAccountActionData.maturityAmount?this.title="Recurring Deposit Closure on Maturity":this.title="Recurring Deposit Closure"}),this.accountId=this.route.parent.snapshot.params.recurringDepositAccountId}ngOnInit(){this.maxDate=this.settingsService.businessDate,this.createcloseRecurringDepositForm(),this.addTransferDetails()}createcloseRecurringDepositForm(){this.closeRecurringDepositForm=this.formBuilder.group({closedOnDate:[new Date,q.required],maturityAmount:[{value:this.maturityAmount,disabled:!0}],onAccountClosureId:["",q.required],paymentTypeId:["",q.required],accountNumber:"",checkNumber:"",routingCode:"",receiptNumber:"",bankNumber:"",note:""})}toggleDisplay(){this.showPaymentDetails=!this.showPaymentDetails}addTransferDetails(){this.closeRecurringDepositForm.get("onAccountClosureId").valueChanges.subscribe(e=>{e===200?(this.closeRecurringDepositForm.addControl("toSavingsAccountId",new tt("",q.required)),this.closeRecurringDepositForm.addControl("transferDescription",new tt(""))):(this.closeRecurringDepositForm.removeControl("toSavingsAccountId"),this.closeRecurringDepositForm.removeControl("transferDescription"))})}submit(){let e=this.closeRecurringDepositForm.value,l=this.closeRecurringDepositForm.value.closedOnDate,p=this.settingsService.dateFormat,g=this.settingsService.language.code;e.closedOnDate instanceof Date&&(e.closedOnDate=this.dateUtils.formatDate(l,p));let b=J(F({},e),{dateFormat:p,locale:g});this.recurringDepositsService.executeRecurringDepositsAccountCommand(this.accountId,"close",b).subscribe(()=>{this.router.navigate(["../../"],{relativeTo:this.route})})}static{this.\u0275fac=function(l){return new(l||t)}}static{this.\u0275cmp=O({type:t,selectors:[["mifosx-close-recurring-deposits-account"]],decls:60,vars:42,consts:[["closedOnDatePicker",""],[1,"container"],[3,"ngSubmit","formGroup"],[1,"layout-column"],[1,"mat-h3","flex-fill"],[3,"click"],["matInput","","required","","formControlName","closedOnDate",3,"min","max","matDatepicker"],["matSuffix","",3,"for"],["matInput","","required","","formControlName","maturityAmount"],["formControlName","onAccountClosureId","required",""],[3,"value"],["formControlName","paymentTypeId","required",""],[1,"flex-fill"],[1,"flex-25"],[1,"expandcollapsebutton","flex-75",3,"click"],["mat-raised-button","","color","primary"],["matInput","","formControlName","note","cdkTextareaAutosize","","cdkAutosizeMinRows","2"],[1,"layout-row","align-center","gap-5px","responsive-column"],["type","button","mat-raised-button","",3,"routerLink"],["mat-raised-button","","color","primary",3,"disabled"],["required","","formControlName","toSavingsAccountId"],["matInput","","formControlName","transferDescription"],[1,"fa","fa-minus"],[1,"fa","fa-plus"],["matInput","","formControlName","accountNumber"],["matInput","","formControlName","chequeNumber"],["matInput","","formControlName","routingCode"],["matInput","","formControlName","receiptNumber"],["matInput","","formControlName","bankNumber"]],template:function(l,p){if(l&1){let g=y();a(0,"div",1)(1,"mat-card")(2,"form",2),T("ngSubmit",function(){return S(g),M(p.submit())}),a(3,"mat-card-content")(4,"div",3)(5,"h3",4),o(6),i(),a(7,"mat-form-field",5),T("click",function(){S(g);let G=E(14);return M(G.open())}),a(8,"mat-label"),o(9),r(10,"translate"),i(),C(11,"input",6)(12,"mat-datepicker-toggle",7)(13,"mat-datepicker",null,0),x(15,Gp,7,9,"mat-error"),i(),a(16,"mat-form-field")(17,"mat-label"),o(18),r(19,"translate"),i(),C(20,"input",8),x(21,Hp,7,9,"mat-error"),i(),a(22,"mat-form-field")(23,"mat-label"),o(24),r(25,"translate"),i(),a(26,"mat-select",9),L(27,Up,2,2,"mat-option",10,z),i(),x(29,$p,7,9,"mat-error"),i(),x(30,jp,8,4,"mat-form-field"),x(31,Wp,5,3,"mat-form-field"),a(32,"mat-form-field")(33,"mat-label"),o(34),r(35,"translate"),i(),a(36,"mat-select",11),L(37,Kp,2,2,"mat-option",10,z),i(),x(39,Qp,7,9,"mat-error"),i(),a(40,"div",12)(41,"span",13),o(42),r(43,"translate"),i(),a(44,"span",14),T("click",function(){return S(g),M(p.toggleDisplay())}),x(45,Yp,2,0,"button",15),x(46,Jp,2,0,"button",15),i()(),x(47,Xp,25,15),a(48,"mat-form-field")(49,"mat-label"),o(50),r(51,"translate"),i(),C(52,"textarea",16),i()()(),a(53,"mat-card-actions",17)(54,"button",18),o(55),r(56,"translate"),i(),a(57,"button",19),o(58),r(59,"translate"),i()()()()()}if(l&2){let g=E(14);n(2),d("formGroup",p.closeRecurringDepositForm),n(4),m(p.title),n(3),m(c(10,25,"labels.inputs.Closed On")),n(2),d("min",p.minDate)("max",p.maxDate)("matDatepicker",g),n(),d("for",g),n(3),D(p.closeRecurringDepositForm.controls.closedOnDate.hasError("required")?15:-1),n(3),m(c(19,27,"labels.inputs.Maturity Amount")),n(3),D(p.closeRecurringDepositForm.controls.maturityAmount.hasError("required")?21:-1),n(3),m(c(25,29,"labels.inputs.Action")),n(3),j(p.onAccountClosureOptions),n(2),D(p.closeRecurringDepositForm.controls.onAccountClosureId.hasError("required")?29:-1),n(),D(p.closeRecurringDepositForm.contains("toSavingsAccountId")?30:-1),n(),D(p.closeRecurringDepositForm.contains("transferDescription")?31:-1),n(3),m(c(35,31,"labels.inputs.Payment Type Id")),n(3),j(p.paymentTypes),n(2),D(p.closeRecurringDepositForm.controls.paymentTypeId.hasError("required")?39:-1),n(3),u(" ",c(43,33,"labels.inputs.Show Payment Details")),n(3),D(p.showPaymentDetails?45:-1),n(),D(p.showPaymentDetails?-1:46),n(),D(p.showPaymentDetails?47:-1),n(3),m(c(51,35,"labels.inputs.Note")),n(4),d("routerLink",K(41,qp)),n(),u(" ",c(56,37,"labels.buttons.Cancel")," "),n(2),d("disabled",!p.closeRecurringDepositForm.valid),n(),u(" ",c(59,39,"labels.buttons.Submit")," ")}},dependencies:[I,R,rt,mt,Z,ot,dt,ct,pt,Q,Y,ut,ft,nt,et,gt,ht,Ct,Ot,yt,Dt,bt,xt,V,Lt,w],styles:[".container[_ngcontent-%COMP%]{max-width:37rem}.expandcollapsebutton[_ngcontent-%COMP%]{margin-top:-7px;margin-left:2%}"]})}}return t})();var Zp=()=>["../../general"];function ts(t,s){if(t&1&&(a(0,"h2",2),o(1),r(2,"translate"),r(3,"translate"),i()),t&2){let e=f();n(),A(" ",c(2,2,"labels.menus."+e.actionName)," ",c(3,4,"labels.heading.Recurring Deposit Transactions")," ")}}function es(t,s){t&1&&(a(0,"mat-error"),o(1),r(2,"translate"),r(3,"translate"),a(4,"strong"),o(5),r(6,"translate"),i()()),t&2&&(n(),A(" ",c(2,3,"labels.inputs.Transaction Date")," ",c(3,5,"labels.commons.is")," "),n(4),m(c(6,7,"labels.commons.required")))}function ns(t,s){if(t&1&&(a(0,"mat-option",10),o(1),i()),t&2){let e=s.$implicit;d("value",e.id),n(),u(" ",e.name," ")}}function is(t,s){t&1&&(a(0,"mat-error"),o(1),r(2,"translate"),r(3,"translate"),a(4,"strong"),o(5),r(6,"translate"),i()()),t&2&&(n(),A(" ",c(2,3,"labels.inputs.Payment Type")," ",c(3,5,"labels.commons.is")," "),n(4),m(c(6,7,"labels.commons.required")))}function as(t,s){t&1&&(a(0,"mat-form-field")(1,"mat-label"),o(2),r(3,"translate"),i(),C(4,"input",19),i(),a(5,"mat-form-field")(6,"mat-label"),o(7),r(8,"translate"),i(),C(9,"input",20),i(),a(10,"mat-form-field")(11,"mat-label"),o(12),r(13,"translate"),i(),C(14,"input",21),i(),a(15,"mat-form-field")(16,"mat-label"),o(17),r(18,"translate"),i(),C(19,"input",22),i(),a(20,"mat-form-field")(21,"mat-label"),o(22),r(23,"translate"),i(),C(24,"input",23),i()),t&2&&(n(2),u(" ",c(3,5,"labels.inputs.Account")," #"),n(5),u("",c(8,7,"labels.inputs.Cheque")," #"),n(5),m(c(13,9,"labels.inputs.Routing Code")),n(5),u("",c(18,11,"labels.inputs.Reciept")," #"),n(5),u("",c(23,13,"labels.inputs.Bank")," #"))}var fn=(()=>{class t{constructor(){if(this.formBuilder=_(st),this.route=_(N),this.router=_(W),this.dateUtils=_(X),this.recurringDepositsService=_(k),this.settingsService=_($),this.showPaymentDetails=!1,this.minDate=new Date(2e3,0,1),this.maxDate=new Date,this.transactionType={deposit:!1,withdrawal:!1},this.route.data.subscribe(e=>{this.transactionAmount=e.recurringDepositsAccountActionData.amount,this.paymentTypes=e.recurringDepositsAccountActionData.paymentTypeOptions,e.recurringDepositsAccountActionData.outstandingChargeAmount&&e.recurringDepositsAccountActionData.outstandingChargeAmount>0&&(this.outstandingChargeAmount=e.recurringDepositsAccountActionData.outstandingChargeAmount,this.transactionAmount+=this.outstandingChargeAmount)}),this.actionName=this.route.snapshot.params.name,this.action=this.actionName.toLowerCase(),this.action==="deposit"||this.action==="withdrawal")this.transactionCommand=this.action,this.transactionType[this.transactionCommand]=!0;else throw new Error(`Invalid transaction action: ${this.actionName}`);this.accountId=this.route.parent.snapshot.params.recurringDepositAccountId}ngOnInit(){this.maxDate=this.settingsService.businessDate,this.createdepositRecurringDepositForm()}createdepositRecurringDepositForm(){this.depositRecurringDepositForm=this.formBuilder.group({transactionDate:[new Date,q.required],transactionAmount:[0,q.required],paymentTypeId:["",q.required],note:""})}addPaymentDetails(){this.showPaymentDetails=!this.showPaymentDetails,this.showPaymentDetails?(this.depositRecurringDepositForm.addControl("accountNumber",new tt("")),this.depositRecurringDepositForm.addControl("checkNumber",new tt("")),this.depositRecurringDepositForm.addControl("routingCode",new tt("")),this.depositRecurringDepositForm.addControl("receiptNumber",new tt("")),this.depositRecurringDepositForm.addControl("bankNumber",new tt(""))):(this.depositRecurringDepositForm.removeControl("accountNumber"),this.depositRecurringDepositForm.removeControl("checkNumber"),this.depositRecurringDepositForm.removeControl("routingCode"),this.depositRecurringDepositForm.removeControl("receiptNumber"),this.depositRecurringDepositForm.removeControl("bankNumber"))}toggleDisplay(){this.showPaymentDetails=!this.showPaymentDetails}submit(){let e=this.depositRecurringDepositForm.value,l=this.settingsService.dateFormat,p=this.settingsService.language.code,g=this.depositRecurringDepositForm.value.transactionDate;e.transactionDate instanceof Date&&(e.transactionDate=this.dateUtils.formatDate(g,l));let b=J(F({},e),{dateFormat:l,locale:p});delete b.note,b.transactionAmount=b.transactionAmount*1,this.recurringDepositsService.executeRecurringDepositsAccountCommand(this.accountId,this.action,b).subscribe(()=>{this.router.navigate(["../../"],{relativeTo:this.route})})}static{this.\u0275fac=function(l){return new(l||t)}}static{this.\u0275cmp=O({type:t,selectors:[["mifosx-deposit-recurring-deposits-account"]],inputs:{currency:"currency"},decls:44,vars:35,consts:[["transactionDatePicker",""],[1,"container"],["mat-title",""],[3,"ngSubmit","formGroup"],[1,"layout-column"],[3,"click"],["matInput","","required","","formControlName","transactionDate",3,"min","max","matDatepicker"],["matSuffix","",3,"for"],[3,"currency","isRequired","inputFormControl","inputLabel"],["formControlName","paymentTypeId","required",""],[3,"value"],[1,"flex-fill"],[1,"expandcollapsebutton","m-l-10","m-t-40","flex-75",3,"click"],[3,"className"],[1,"m-l-10"],["matInput","","formControlName","note","cdkTextareaAutosize","","cdkAutosizeMinRows","2"],[1,"layout-row","align-center","gap-5px","responsive-column"],["type","button","mat-raised-button","",3,"routerLink"],["mat-raised-button","","color","primary",3,"disabled"],["matInput","","formControlName","accountNumber"],["matInput","","formControlName","checkNumber"],["matInput","","formControlName","routingCode"],["matInput","","formControlName","receiptNumber"],["matInput","","formControlName","bankNumber"]],template:function(l,p){if(l&1){let g=y();a(0,"div",1)(1,"mat-card"),x(2,ts,4,6,"h2",2),a(3,"form",3),T("ngSubmit",function(){return S(g),M(p.submit())}),a(4,"mat-card-content")(5,"div",4)(6,"mat-form-field",5),T("click",function(){S(g);let G=E(13);return M(G.open())}),a(7,"mat-label"),o(8),r(9,"translate"),i(),C(10,"input",6)(11,"mat-datepicker-toggle",7)(12,"mat-datepicker",null,0),x(14,es,7,9,"mat-error"),i(),C(15,"mifosx-input-amount",8),a(16,"mat-form-field")(17,"mat-label"),o(18),r(19,"translate"),i(),a(20,"mat-select",9),L(21,ns,2,2,"mat-option",10,z),i(),x(23,is,7,9,"mat-error"),i(),a(24,"div",11)(25,"span",12),T("click",function(){return S(g),M(p.addPaymentDetails())}),a(26,"mat-slide-toggle")(27,"div",13)(28,"span",14),o(29),r(30,"translate"),i()()()()(),x(31,as,25,15),a(32,"mat-form-field")(33,"mat-label"),o(34),r(35,"translate"),i(),C(36,"textarea",15),i()()(),a(37,"mat-card-actions",16)(38,"button",17),o(39),r(40,"translate"),i(),a(41,"button",18),o(42),r(43,"translate"),i()()()()()}if(l&2){let g=E(13);n(2),D(p.transactionType.withdrawal?2:-1),n(),d("formGroup",p.depositRecurringDepositForm),n(5),m(c(9,22,"labels.inputs.Transaction Date")),n(2),d("min",p.minDate)("max",p.maxDate)("matDatepicker",g),n(),d("for",g),n(3),D(p.depositRecurringDepositForm.controls.transactionDate.hasError("required")?14:-1),n(),d("currency",p.currency)("isRequired",!0)("inputFormControl",p.depositRecurringDepositForm.controls.transactionAmount)("inputLabel","Transaction Amount"),n(3),m(c(19,24,"labels.inputs.Payment Type Id")),n(3),j(p.paymentTypes),n(2),D(p.depositRecurringDepositForm.controls.paymentTypeId.hasError("required")?23:-1),n(4),d("className",p.showPaymentDetails?"enabled":"disabled"),n(2),m(c(30,26,"labels.inputs.Show Payment Details")),n(2),D(p.showPaymentDetails?31:-1),n(3),m(c(35,28,"labels.inputs.Note")),n(4),d("routerLink",K(34,Zp)),n(),u(" ",c(40,30,"labels.buttons.Cancel")," "),n(2),d("disabled",!p.depositRecurringDepositForm.valid),n(),u(" ",c(43,32,"labels.buttons.Submit")," ")}},dependencies:[I,R,rt,mt,Z,ot,dt,ct,pt,Q,Y,ut,ft,nt,et,gt,ht,Ct,Ot,yt,Dt,bt,xt,V,Ee,We,Lt,w],styles:[".container[_ngcontent-%COMP%]{max-width:37rem}.expandcollapsebutton[_ngcontent-%COMP%]{margin-top:-7px;margin-left:2%}.right-input[_ngcontent-%COMP%]{text-align:right}.right-label[_ngcontent-%COMP%]{padding-right:25px!important}"]})}}return t})();function os(t,s){t&1&&C(0,"mifosx-activate-recurring-deposits-account")}function rs(t,s){t&1&&C(0,"mifosx-undo-approval-recurring-deposits-account")}function cs(t,s){t&1&&C(0,"mifosx-approve-recurring-deposits-account")}function ps(t,s){t&1&&C(0,"mifosx-reject-recurring-deposits-account")}function ss(t,s){t&1&&C(0,"mifosx-withdraw-by-client-recurring-deposits-account")}function ls(t,s){t&1&&C(0,"mifosx-add-charge-recurring-deposits-account")}function ms(t,s){t&1&&C(0,"mifosx-premature-close-recurring-deposit-account")}function ds(t,s){t&1&&C(0,"mifosx-close-recurring-deposits-account")}function us(t,s){if(t&1&&C(0,"mifosx-deposit-recurring-deposits-account",0),t&2){let e=f();d("currency",e.currency)}}var hn=(()=>{class t{constructor(){this.route=_(N),this.actions={Activate:!1,"Undo Activation":!1,"Undo Approval":!1,Approve:!1,Reject:!1,"Withdrawn by Client":!1,"Add Charge":!1,"Premature Close":!1,Close:!1,Deposit:!1,Withdrawal:!1},this.route.data.subscribe(l=>{l.recurringDepositsAccountActionData&&(this.currency=l.recurringDepositsAccountActionData.currency)});let e=this.route.snapshot.params.name;e&&e in this.actions&&(this.actions[e]=!0)}static{this.\u0275fac=function(l){return new(l||t)}}static{this.\u0275cmp=O({type:t,selectors:[["mifosx-recurring-deposits-account-actions"]],decls:9,vars:9,consts:[[3,"currency"]],template:function(l,p){l&1&&(x(0,os,1,0,"mifosx-activate-recurring-deposits-account"),x(1,rs,1,0,"mifosx-undo-approval-recurring-deposits-account"),x(2,cs,1,0,"mifosx-approve-recurring-deposits-account"),x(3,ps,1,0,"mifosx-reject-recurring-deposits-account"),x(4,ss,1,0,"mifosx-withdraw-by-client-recurring-deposits-account"),x(5,ls,1,0,"mifosx-add-charge-recurring-deposits-account"),x(6,ms,1,0,"mifosx-premature-close-recurring-deposit-account"),x(7,ds,1,0,"mifosx-close-recurring-deposits-account"),x(8,us,1,1,"mifosx-deposit-recurring-deposits-account",0)),l&2&&(D(p.actions.Activate?0:-1),n(),D(p.actions["Undo Approval"]||p.actions["Undo Activation"]?1:-1),n(),D(p.actions.Approve?2:-1),n(),D(p.actions.Reject?3:-1),n(),D(p.actions["Withdrawn by Client"]?4:-1),n(),D(p.actions["Add Charge"]?5:-1),n(),D(p.actions["Premature Close"]?6:-1),n(),D(p.actions.Close?7:-1),n(),D(p.actions.Deposit||p.actions.Withdrawal?8:-1))},dependencies:[I,R,sn,ln,mn,dn,un,gn,Cn,_n,fn],encapsulation:2})}}return t})();function gs(t,s){t&1&&(a(0,"button",11),C(1,"fa-icon",12),o(2),r(3,"translate"),i()),t&2&&(d("routerLink","edit"),n(2),u("",c(3,2,"labels.buttons.Edit")," "))}function Cs(t,s){if(t&1&&(a(0,"span"),x(1,gs,4,4,"button",11),i()),t&2){let e=f(2);n(),D(e.transactionData.transactionType.value==="Transfer"||e.transactionData.reversed==="true"?-1:1)}}function _s(t,s){if(t&1){let e=y();a(0,"button",13),T("click",function(){S(e);let p=f(2);return M(p.undoTransaction())}),C(1,"fa-icon",14),o(2),r(3,"translate"),i()}t&2&&(n(2),u("",c(3,1,"labels.buttons.Undo")," "))}function fs(t,s){t&1&&(a(0,"div",0),h(1,Cs,2,1,"span",9)(2,_s,4,3,"button",10),i()),t&2&&(n(),d("mifosxHasPermission","ADJUSTTRANSACTION_SAVINGSACCOUNT"),n(),d("mifosxHasPermission","UNDOTRANSACTION_SAVINGSACCOUNT"))}function hs(t,s){t&1&&(a(0,"div",4),o(1),r(2,"translate"),i()),t&2&&(n(),u(" ",c(2,1,"labels.inputs.Note")," "))}function xs(t,s){if(t&1&&(a(0,"div",5),o(1),i()),t&2){let e=f();n(),u(" ",e.transactionData.note," ")}}function Ds(t,s){if(t&1&&C(0,"mifosx-transaction-payment-detail",6),t&2){let e=f();d("paymentDetailData",e.transactionData.paymentDetailData)}}var xn=(()=>{class t{constructor(){this.recurringDepositsService=_(k),this.route=_(N),this.location=_(Bn),this.dateUtils=_(X),this.router=_(W),this.dialog=_(Xt),this.translateService=_(Ie),this.settingsService=_($),this.route.data.subscribe(e=>{this.transactionData=e.recurringDepositsAccountTransaction})}undoTransaction(){let e=this.route.parent.snapshot.params.recurringDepositAccountId;this.dialog.open(Kt,{data:{heading:this.translateService.instant("labels.heading.Undo Transaction"),dialogContext:this.translateService.instant("labels.dialogContext.Are you sure you want to undo this transaction ?")}}).afterClosed().subscribe(p=>{if(p.confirm){let g=this.settingsService.language.code,b=this.settingsService.dateFormat,G={transactionDate:this.dateUtils.formatDate(this.transactionData.date&&new Date(this.transactionData.date),b),transactionAmount:0,dateFormat:b,locale:g};this.recurringDepositsService.executeRecurringDepositsAccountTransactionsCommand(e,"undo",G,this.transactionData.id).subscribe(()=>{this.router.navigate(["../"],{relativeTo:this.route})})}})}transactionColor(){return this.transactionData.reversed?"undo":"active"}goBack(){this.location.back()}static{this.\u0275fac=function(l){return new(l||t)}}static{this.\u0275cmp=O({type:t,selectors:[["mifosx-view-transaction"]],decls:40,vars:35,consts:[[1,"container","m-b-20","align-end","gap-2percent"],[1,"container"],[1,"layout-row-wrap"],[1,"flex-100",3,"ngClass"],[1,"flex-50","mat-body-strong"],[1,"flex-50"],[3,"paymentDetailData"],[1,"layout-row","layout-xs-column","layout-align-center","gap-5px","m-b-20"],["type","button","color","primary","mat-raised-button","",3,"click"],[4,"mifosxHasPermission"],["mat-raised-button","","color","warn",3,"click",4,"mifosxHasPermission"],["mat-raised-button","","color","primary",3,"routerLink"],["icon","edit",1,"m-r-10"],["mat-raised-button","","color","warn",3,"click"],["icon","undo",1,"m-r-10"]],template:function(l,p){l&1&&(x(0,fs,3,2,"div",0),a(1,"div",1)(2,"mat-card")(3,"mat-card-content")(4,"div",2),C(5,"div",3),a(6,"div",4),o(7),r(8,"translate"),i(),a(9,"div",5),o(10),i(),a(11,"div",4),o(12),r(13,"translate"),i(),a(14,"div",5),o(15),i(),a(16,"div",4),o(17),r(18,"translate"),i(),a(19,"div",5),o(20),r(21,"dateFormat"),i(),a(22,"div",4),o(23),r(24,"translate"),i(),a(25,"div",5),o(26),i(),a(27,"div",4),o(28),r(29,"translate"),i(),a(30,"div",5),o(31),r(32,"currency"),i(),x(33,hs,3,3,"div",4),x(34,xs,2,1,"div",5),x(35,Ds,1,1,"mifosx-transaction-payment-detail",6),i()(),a(36,"mat-card-actions",7)(37,"button",8),T("click",function(){return p.goBack()}),o(38),r(39,"translate"),i()()()()),l&2&&(D(p.transactionData.reversed?-1:0),n(5),d("ngClass",p.transactionColor()),n(2),u(" ",c(8,16,"labels.inputs.Transaction Id")," "),n(3),u(" ",p.transactionData.id," "),n(2),u(" ",c(13,18,"labels.inputs.Type")," "),n(3),u(" ",p.transactionData.transactionType.value," "),n(2),u(" ",c(18,20,"labels.inputs.Transaction Date")," "),n(3),u(" ",c(21,22,p.transactionData.date)," "),n(3),u(" ",c(24,24,"labels.inputs.Currency")," "),n(3),u(" ",p.transactionData.currency.displayLabel," "),n(2),u(" ",c(29,26,"labels.inputs.Amount")," "),n(3),u(" ",U(32,28,p.transactionData.amount,p.transactionData.currency.code,"symbol-narrow","1.2-2")," "),n(2),D(p.transactionData.note?33:-1),n(),D(p.transactionData.note?34:-1),n(),D(p.transactionData.paymentDetailData?35:-1),n(3),u(" ",c(39,33,"labels.buttons.Back")," "))},dependencies:[I,be,R,Q,Y,ut,ft,V,re,_t,ci,Se,It,w],styles:["body[_ngcontent-%COMP%] table[_ngcontent-%COMP%] tbody[_ngcontent-%COMP%] tr[_ngcontent-%COMP%]:nth-child(2n){background-color:#f2f2f2}.bg-black[_ngcontent-%COMP%]{background-color:#000}.bg-light-grey[_ngcontent-%COMP%]{background-color:#e5e5e5}.bg-medium-grey[_ngcontent-%COMP%]{background-color:#ccc}.bg-grey[_ngcontent-%COMP%]{background-color:#999}.bg-dark-grey[_ngcontent-%COMP%]{background-color:#222}.bg-white[_ngcontent-%COMP%], .bg-fff[_ngcontent-%COMP%]{background-color:#fff}.bg-none[_ngcontent-%COMP%], .no-bg[_ngcontent-%COMP%]{background:none;background-image:none;background-color:transparent}.bg-facebook[_ngcontent-%COMP%]{background-color:#47639e}.bg-twitter[_ngcontent-%COMP%]{background-color:#02a8f3}body[_ngcontent-%COMP%] table[_ngcontent-%COMP%]{border:1px solid rgba(0,0,0,.12)}.no-border[_ngcontent-%COMP%]{border:none}.no-border-t[_ngcontent-%COMP%]{border-top:none}.no-border-r[_ngcontent-%COMP%]{border-right:none}.no-border-b[_ngcontent-%COMP%]{border-bottom:none}.no-border-l[_ngcontent-%COMP%]{border-left:none}.no-border-lr[_ngcontent-%COMP%], .no-border-rl[_ngcontent-%COMP%]{border-left:none;border-right:none}.no-border-tb[_ngcontent-%COMP%], .no-border-bt[_ngcontent-%COMP%]{border-top:none;border-bottom:none}.no-border-tl[_ngcontent-%COMP%], .no-border-lt[_ngcontent-%COMP%]{border-top:none;border-left:none}.no-border-tr[_ngcontent-%COMP%], .no-border-rt[_ngcontent-%COMP%]{border-top:none;border-right:none}.no-border-bl[_ngcontent-%COMP%], .no-border-lb[_ngcontent-%COMP%]{border-bottom:none;border-left:none}.no-border-br[_ngcontent-%COMP%], .no-border-rb[_ngcontent-%COMP%]{border-bottom:none;border-right:none}.border-dashed[_ngcontent-%COMP%], .border-dotted[_ngcontent-%COMP%]{border-style:dashed}.border-black[_ngcontent-%COMP%]{border-color:#000}.border-light-grey[_ngcontent-%COMP%]{border-color:#e5e5e5}.border-medium-grey[_ngcontent-%COMP%]{border-color:#ccc}.border-grey[_ngcontent-%COMP%]{border-color:#999}.border-dark-grey[_ngcontent-%COMP%]{border-color:#2222}.border-white[_ngcontent-%COMP%], .border-fff[_ngcontent-%COMP%]{border-color:#fff}.no-border-radius[_ngcontent-%COMP%]{border-radius:0}.radius3[_ngcontent-%COMP%]{border-radius:3px}.radius5[_ngcontent-%COMP%]{border-radius:5px}.radius10[_ngcontent-%COMP%]{border-radius:10px}.column-mandatory[_ngcontent-%COMP%]{color:#5cb85c;text-align:center}.not-column-mandatory[_ngcontent-%COMP%]{color:#666f73;text-align:center}.cdk-drag-placeholder[_ngcontent-%COMP%]{background:#3498db}.yes[_ngcontent-%COMP%]{color:#5cb85c!important;background-color:#5cb85c;height:4px;cursor:none}.no[_ngcontent-%COMP%]{color:red;background-color:red;height:4px;cursor:none}.strike[_ngcontent-%COMP%]{text-decoration:line-through;color:red}.transfer[_ngcontent-%COMP%]{color:#16a085}.linked[_ngcontent-%COMP%]{color:#4461e2}.accrual[_ngcontent-%COMP%]{color:#999}.fa-question[_ngcontent-%COMP%]{color:#4461e2}.enabled[_ngcontent-%COMP%]{color:#32cd32}.disabled[_ngcontent-%COMP%]{color:#f44366}.v-mid[_ngcontent-%COMP%], .v-m[_ngcontent-%COMP%]{vertical-align:middle}.v-top[_ngcontent-%COMP%], .v-t[_ngcontent-%COMP%]{vertical-align:top}.v-bottom[_ngcontent-%COMP%], .v-b[_ngcontent-%COMP%]{vertical-align:bottom}.v-super[_ngcontent-%COMP%]{vertical-align:super}.r-amount[_ngcontent-%COMP%]{text-align:right!important;padding-right:5px!important}.left[_ngcontent-%COMP%]{text-align:left!important}.right[_ngcontent-%COMP%]{text-align:right!important}.center[_ngcontent-%COMP%]{text-align:center!important}.amount-plus[_ngcontent-%COMP%]{color:#000}.amount-minus[_ngcontent-%COMP%]{color:#4461e2}.block[_ngcontent-%COMP%]{display:block}.inline[_ngcontent-%COMP%]{display:inline}.in-block[_ngcontent-%COMP%]{display:inline-block;zoom:1}.d-none[_ngcontent-%COMP%], .hide[_ngcontent-%COMP%], .hidden[_ngcontent-%COMP%]{display:none}.t-0[_ngcontent-%COMP%]{top:0}.b-0[_ngcontent-%COMP%]{bottom:0}.l-0[_ngcontent-%COMP%]{left:0}.r-0[_ngcontent-%COMP%]{right:0}.tb-0[_ngcontent-%COMP%]{top:0;bottom:0}.lr-0[_ngcontent-%COMP%]{left:0;right:0}.f-left[_ngcontent-%COMP%]{float:left}.f-right[_ngcontent-%COMP%]{float:right}.f-none[_ngcontent-%COMP%]{float:none}textarea[_ngcontent-%COMP%]{resize:both}textarea.vertical[_ngcontent-%COMP%], textarea.horizontal[_ngcontent-%COMP%]{resize:vertical}textarea.noresize[_ngcontent-%COMP%]{resize:none}.full-input[_ngcontent-%COMP%] input[_ngcontent-%COMP%], .full-input[_ngcontent-%COMP%] select[_ngcontent-%COMP%], .full-input[_ngcontent-%COMP%] textarea[_ngcontent-%COMP%]{width:100%}.normal[_ngcontent-%COMP%] input[_ngcontent-%COMP%], .normal[_ngcontent-%COMP%] select[_ngcontent-%COMP%], .normal[_ngcontent-%COMP%] textarea[_ngcontent-%COMP%], .full-input[_ngcontent-%COMP%] [type=checkbox][_ngcontent-%COMP%], .full-input[_ngcontent-%COMP%] [type=radio][_ngcontent-%COMP%]{width:auto}.mat-tab-body-content[_ngcontent-%COMP%]{margin-bottom:20px}.mat-datepicker-input[_ngcontent-%COMP%]{margin-top:5px;margin-bottom:5px}.loader-wrapper[_ngcontent-%COMP%]{height:100vh;width:100vw}.loader-wrapper[_ngcontent-%COMP%] .triangle[_ngcontent-%COMP%]{width:0;height:0;border-style:solid;position:absolute;animation:_ngcontent-%COMP%_rotate .8s infinite .2s}.loader-wrapper[_ngcontent-%COMP%] .bottom[_ngcontent-%COMP%]{border-width:0 90px 90px;border-color:transparent transparent #1fb050;bottom:calc(50% - 100px);left:calc(50% - 90px)}.loader-wrapper[_ngcontent-%COMP%] .top[_ngcontent-%COMP%]{border-width:90px 90px 0;border-color:#b4d575 transparent transparent;top:calc(50% - 100px);left:calc(50% - 90px)}.loader-wrapper[_ngcontent-%COMP%] .left[_ngcontent-%COMP%]{border-width:90px 0 90px 90px;border-color:transparent transparent transparent #1074b9;top:calc(50% - 90px);left:calc(50% - 100px)}.loader-wrapper[_ngcontent-%COMP%] .right[_ngcontent-%COMP%]{border-width:90px 90px 90px 0;border-color:transparent #1daeec transparent transparent;top:calc(50% - 90px);right:calc(50% - 100px)}@keyframes _ngcontent-%COMP%_rotate{0%{transform:rotate(0)}to{transform:rotate(360deg)}}body[_ngcontent-%COMP%]{margin:0}.container[_ngcontent-%COMP%]{margin:0 auto}.mb-05[_ngcontent-%COMP%]{margin-bottom:.5rem}.mr-05[_ngcontent-%COMP%]{margin-right:.5rem}.mb-1[_ngcontent-%COMP%]{margin-bottom:1rem}.mt-1[_ngcontent-%COMP%]{margin-top:1rem}.m-5[_ngcontent-%COMP%]{margin:5px}.m-t-5[_ngcontent-%COMP%]{margin-top:5px}.m-r-5[_ngcontent-%COMP%]{margin-right:5px}.m-b-5[_ngcontent-%COMP%]{margin-bottom:5px}.m-l-5[_ngcontent-%COMP%]{margin-left:5px}.m-v-5[_ngcontent-%COMP%]{margin:5px 0}.m-h-5[_ngcontent-%COMP%]{margin:0 5px}.m-10[_ngcontent-%COMP%]{margin:10px}.m-t-10[_ngcontent-%COMP%]{margin-top:10px}.m-r-10[_ngcontent-%COMP%]{margin-right:10px}.m-b-10[_ngcontent-%COMP%]{margin-bottom:10px}.m-l-10[_ngcontent-%COMP%]{margin-left:10px}.m-v-10[_ngcontent-%COMP%]{margin:10px 0}.m-h-10[_ngcontent-%COMP%]{margin:0 10px}.m-15[_ngcontent-%COMP%]{margin:15px}.m-t-15[_ngcontent-%COMP%]{margin-top:15px}.m-r-15[_ngcontent-%COMP%]{margin-right:15px}.m-b-15[_ngcontent-%COMP%]{margin-bottom:15px}.m-l-15[_ngcontent-%COMP%]{margin-left:15px}.m-v-15[_ngcontent-%COMP%]{margin:15px 0}.m-h-15[_ngcontent-%COMP%]{margin:0 15px}.m-20[_ngcontent-%COMP%]{margin:20px}.m-t-20[_ngcontent-%COMP%]{margin-top:20px}.m-r-20[_ngcontent-%COMP%]{margin-right:20px}.m-b-20[_ngcontent-%COMP%]{margin-bottom:20px}.m-l-20[_ngcontent-%COMP%]{margin-left:20px}.m-v-20[_ngcontent-%COMP%]{margin:20px 0}.m-h-20[_ngcontent-%COMP%]{margin:0 20px}.m-25[_ngcontent-%COMP%]{margin:25px}.m-t-25[_ngcontent-%COMP%]{margin-top:25px}.m-r-25[_ngcontent-%COMP%]{margin-right:25px}.m-b-25[_ngcontent-%COMP%]{margin-bottom:25px}.m-l-25[_ngcontent-%COMP%]{margin-left:25px}.m-v-25[_ngcontent-%COMP%]{margin:25px 0}.m-h-25[_ngcontent-%COMP%]{margin:0 25px}.m-30[_ngcontent-%COMP%]{margin:30px}.m-t-30[_ngcontent-%COMP%]{margin-top:30px}.m-r-30[_ngcontent-%COMP%]{margin-right:30px}.m-b-30[_ngcontent-%COMP%]{margin-bottom:30px}.m-l-30[_ngcontent-%COMP%]{margin-left:30px}.m-v-30[_ngcontent-%COMP%]{margin:30px 0}.m-h-30[_ngcontent-%COMP%]{margin:0 30px}.m-35[_ngcontent-%COMP%]{margin:35px}.m-t-35[_ngcontent-%COMP%]{margin-top:35px}.m-r-35[_ngcontent-%COMP%]{margin-right:35px}.m-b-35[_ngcontent-%COMP%]{margin-bottom:35px}.m-l-35[_ngcontent-%COMP%]{margin-left:35px}.m-v-35[_ngcontent-%COMP%]{margin:35px 0}.m-h-35[_ngcontent-%COMP%]{margin:0 35px}.m-40[_ngcontent-%COMP%]{margin:40px}.m-t-40[_ngcontent-%COMP%]{margin-top:40px}.m-r-40[_ngcontent-%COMP%]{margin-right:40px}.m-b-40[_ngcontent-%COMP%]{margin-bottom:40px}.m-l-40[_ngcontent-%COMP%]{margin-left:40px}.m-v-40[_ngcontent-%COMP%]{margin:40px 0}.m-h-40[_ngcontent-%COMP%]{margin:0 40px}.m-45[_ngcontent-%COMP%]{margin:45px}.m-t-45[_ngcontent-%COMP%]{margin-top:45px}.m-r-45[_ngcontent-%COMP%]{margin-right:45px}.m-b-45[_ngcontent-%COMP%]{margin-bottom:45px}.m-l-45[_ngcontent-%COMP%]{margin-left:45px}.m-v-45[_ngcontent-%COMP%]{margin:45px 0}.m-h-45[_ngcontent-%COMP%]{margin:0 45px}.m-50[_ngcontent-%COMP%]{margin:50px}.m-t-50[_ngcontent-%COMP%]{margin-top:50px}.m-r-50[_ngcontent-%COMP%]{margin-right:50px}.m-b-50[_ngcontent-%COMP%]{margin-bottom:50px}.m-l-50[_ngcontent-%COMP%]{margin-left:50px}.m-v-50[_ngcontent-%COMP%]{margin:50px 0}.m-h-50[_ngcontent-%COMP%]{margin:0 50px}.m-55[_ngcontent-%COMP%]{margin:55px}.m-t-55[_ngcontent-%COMP%]{margin-top:55px}.m-r-55[_ngcontent-%COMP%]{margin-right:55px}.m-b-55[_ngcontent-%COMP%]{margin-bottom:55px}.m-l-55[_ngcontent-%COMP%]{margin-left:55px}.m-v-55[_ngcontent-%COMP%]{margin:55px 0}.m-h-55[_ngcontent-%COMP%]{margin:0 55px}.m-60[_ngcontent-%COMP%]{margin:60px}.m-t-60[_ngcontent-%COMP%]{margin-top:60px}.m-r-60[_ngcontent-%COMP%]{margin-right:60px}.m-b-60[_ngcontent-%COMP%]{margin-bottom:60px}.m-l-60[_ngcontent-%COMP%]{margin-left:60px}.m-v-60[_ngcontent-%COMP%]{margin:60px 0}.m-h-60[_ngcontent-%COMP%]{margin:0 60px}.m-65[_ngcontent-%COMP%]{margin:65px}.m-t-65[_ngcontent-%COMP%]{margin-top:65px}.m-r-65[_ngcontent-%COMP%]{margin-right:65px}.m-b-65[_ngcontent-%COMP%]{margin-bottom:65px}.m-l-65[_ngcontent-%COMP%]{margin-left:65px}.m-v-65[_ngcontent-%COMP%]{margin:65px 0}.m-h-65[_ngcontent-%COMP%]{margin:0 65px}.m-70[_ngcontent-%COMP%]{margin:70px}.m-t-70[_ngcontent-%COMP%]{margin-top:70px}.m-r-70[_ngcontent-%COMP%]{margin-right:70px}.m-b-70[_ngcontent-%COMP%]{margin-bottom:70px}.m-l-70[_ngcontent-%COMP%]{margin-left:70px}.m-v-70[_ngcontent-%COMP%]{margin:70px 0}.m-h-70[_ngcontent-%COMP%]{margin:0 70px}.m-75[_ngcontent-%COMP%]{margin:75px}.m-t-75[_ngcontent-%COMP%]{margin-top:75px}.m-r-75[_ngcontent-%COMP%]{margin-right:75px}.m-b-75[_ngcontent-%COMP%]{margin-bottom:75px}.m-l-75[_ngcontent-%COMP%]{margin-left:75px}.m-v-75[_ngcontent-%COMP%]{margin:75px 0}.m-h-75[_ngcontent-%COMP%]{margin:0 75px}.m-80[_ngcontent-%COMP%]{margin:80px}.m-t-80[_ngcontent-%COMP%]{margin-top:80px}.m-r-80[_ngcontent-%COMP%]{margin-right:80px}.m-b-80[_ngcontent-%COMP%]{margin-bottom:80px}.m-l-80[_ngcontent-%COMP%]{margin-left:80px}.m-v-80[_ngcontent-%COMP%]{margin:80px 0}.m-h-80[_ngcontent-%COMP%]{margin:0 80px}.no-m[_ngcontent-%COMP%]{margin:0}.no-m-t[_ngcontent-%COMP%]{margin-top:0}.no-m-r[_ngcontent-%COMP%]{margin-right:0}.no-m-b[_ngcontent-%COMP%]{margin-bottom:0}.no-m-l[_ngcontent-%COMP%]{margin-left:0}.no-m-v[_ngcontent-%COMP%], .no-m-h[_ngcontent-%COMP%], .no-margin[_ngcontent-%COMP%]{margin:0}.no-m-lr[_ngcontent-%COMP%], .no-m-rl[_ngcontent-%COMP%]{margin-left:0;margin-right:0}.no-m-tb[_ngcontent-%COMP%], .no-m-bt[_ngcontent-%COMP%]{margin-top:0;margin-bottom:0}.m-t-only[_ngcontent-%COMP%]{margin-left:0;margin-right:0;margin-bottom:0}.m-b-only[_ngcontent-%COMP%]{margin-left:0;margin-right:0;margin-top:0}.m-l-only[_ngcontent-%COMP%]{margin-right:0;margin-top:0;margin-bottom:0}.m-r-only[_ngcontent-%COMP%]{margin-left:0;margin-top:0;margin-bottom:0}.m-auto[_ngcontent-%COMP%]{margin-left:auto;margin-right:auto}.ls-0[_ngcontent-%COMP%]{margin-left:10px;margin-right:10px}html[_ngcontent-%COMP%], body[_ngcontent-%COMP%]{-webkit-tap-highlight-color:transparent}div[_ngcontent-%COMP%]{box-sizing:border-box}.color-inherit[_ngcontent-%COMP%]{color:inherit}.no-shadow[_ngcontent-%COMP%]{box-shadow:none}.pointer[_ngcontent-%COMP%]{cursor:pointer}.nolist[_ngcontent-%COMP%]{list-style:none}.actions-menu[_ngcontent-%COMP%]{color:#fff}.alert[_ngcontent-%COMP%]{background-color:#e8f4fd;padding:6px 16px;font-size:.875rem;font-family:Roboto,Helvetica Neue,sans-serif;font-weight:400;line-height:1.43;border-radius:4px;letter-spacing:normal;margin:10px}.alert[_ngcontent-%COMP%] .message[_ngcontent-%COMP%]{padding:8px 0;font-size:18px}.alert[_ngcontent-%COMP%] .alert-check[_ngcontent-%COMP%]{color:#359ff4;margin-right:2px;font-size:1.4rem} .mat-tooltip{font-size:15px;color:#fff!important;background-color:#4461e2b3;border:1px solid rgb(25.7777777778,51.5555555556,166.2222222222);max-width:400px!important;white-space:pre-line!important}.loading[_ngcontent-%COMP%]{position:absolute;min-width:100%;width:100px;height:12px;background:linear-gradient(125deg,#fff,#4461e2,#fff);animation:grow 4s linear infinite,move 4s linear infinite}mat-card-title[_ngcontent-%COMP%]{font-weight:600;font-size:x-large;padding-left:20px;padding-top:20px}html[_ngcontent-%COMP%], body[_ngcontent-%COMP%]{overflow:hidden}.overflow-x-scroll[_ngcontent-%COMP%]{max-width:100%;overflow-x:auto}.overflow-no[_ngcontent-%COMP%]{overflow:hidden}.overflow-auto[_ngcontent-%COMP%]{overflow:auto}.overflow-scroll[_ngcontent-%COMP%]{overflow:scroll}.table-container[_ngcontent-%COMP%]{overflow-x:auto;max-width:100%}body[_ngcontent-%COMP%], .no-p[_ngcontent-%COMP%]{padding:0}.no-p-t[_ngcontent-%COMP%]{padding-top:0}.no-p-r[_ngcontent-%COMP%]{padding-right:0}.no-p-b[_ngcontent-%COMP%]{padding-bottom:0}.no-p-l[_ngcontent-%COMP%]{padding-left:0}.no-p-v[_ngcontent-%COMP%], .no-p-h[_ngcontent-%COMP%]{padding:0}.p-5[_ngcontent-%COMP%]{padding:5px}.p-t-5[_ngcontent-%COMP%]{padding-top:5px}.p-r-5[_ngcontent-%COMP%]{padding-right:5px}.p-b-5[_ngcontent-%COMP%]{padding-bottom:5px}.p-l-5[_ngcontent-%COMP%]{padding-left:5px}.p-v-5[_ngcontent-%COMP%]{padding:5px 0}.p-h-5[_ngcontent-%COMP%]{padding:0 5px}.p-10[_ngcontent-%COMP%]{padding:10px}.p-t-10[_ngcontent-%COMP%]{padding-top:10px}.p-b-10[_ngcontent-%COMP%]{padding-bottom:10px}.p-v-10[_ngcontent-%COMP%]{padding:10px 0}.p-h-10[_ngcontent-%COMP%]{padding:0 10px}.p-15[_ngcontent-%COMP%]{padding:15px}.p-t-15[_ngcontent-%COMP%]{padding-top:15px}.p-r-15[_ngcontent-%COMP%]{padding-right:15px}.p-b-15[_ngcontent-%COMP%]{padding-bottom:15px}.p-l-15[_ngcontent-%COMP%]{padding-left:15px}.p-v-15[_ngcontent-%COMP%]{padding:15px 0}.p-h-15[_ngcontent-%COMP%]{padding:0 15px}.p-20[_ngcontent-%COMP%]{padding:20px}.p-t-20[_ngcontent-%COMP%]{padding-top:20px}.p-r-20[_ngcontent-%COMP%]{padding-right:20px}.p-b-20[_ngcontent-%COMP%]{padding-bottom:20px}.p-l-20[_ngcontent-%COMP%]{padding-left:20px}.p-v-20[_ngcontent-%COMP%]{padding:20px 0}.p-h-20[_ngcontent-%COMP%]{padding:0 20px}.p-25[_ngcontent-%COMP%]{padding:25px}.p-t-25[_ngcontent-%COMP%]{padding-top:25px}.p-r-25[_ngcontent-%COMP%]{padding-right:25px}.p-b-25[_ngcontent-%COMP%]{padding-bottom:25px}.p-l-25[_ngcontent-%COMP%]{padding-left:25px}.p-v-25[_ngcontent-%COMP%]{padding:25px 0}.p-h-25[_ngcontent-%COMP%]{padding:0 25px}.p-30[_ngcontent-%COMP%]{padding:30px}.p-t-30[_ngcontent-%COMP%]{padding-top:30px}.p-r-30[_ngcontent-%COMP%]{padding-right:30px}.p-b-30[_ngcontent-%COMP%]{padding-bottom:30px}.p-l-30[_ngcontent-%COMP%]{padding-left:30px}.p-v-30[_ngcontent-%COMP%]{padding:30px 0}.p-h-30[_ngcontent-%COMP%]{padding:0 30px}.p-35[_ngcontent-%COMP%]{padding:35px}.p-t-35[_ngcontent-%COMP%]{padding-top:35px}.p-r-35[_ngcontent-%COMP%]{padding-right:35px}.p-b-35[_ngcontent-%COMP%]{padding-bottom:35px}.p-l-35[_ngcontent-%COMP%]{padding-left:35px}.p-v-35[_ngcontent-%COMP%]{padding:35px 0}.p-h-35[_ngcontent-%COMP%]{padding:0 35px}.p-40[_ngcontent-%COMP%]{padding:40px}.p-t-40[_ngcontent-%COMP%]{padding-top:40px}.p-r-40[_ngcontent-%COMP%]{padding-right:40px}.p-b-40[_ngcontent-%COMP%]{padding-bottom:40px}.p-l-40[_ngcontent-%COMP%]{padding-left:40px}.p-v-40[_ngcontent-%COMP%]{padding-top:40px;padding-bottom:40px}.p-h-40[_ngcontent-%COMP%]{padding:0 40px}.p-45[_ngcontent-%COMP%]{padding:45px}.p-t-45[_ngcontent-%COMP%]{padding-top:45px}.p-r-45[_ngcontent-%COMP%]{padding-right:45px}.p-b-45[_ngcontent-%COMP%]{padding-bottom:45px}.p-l-45[_ngcontent-%COMP%]{padding-left:45px}.p-v-45[_ngcontent-%COMP%]{padding:45px 0}.p-h-45[_ngcontent-%COMP%]{padding:0 45px}.p-50[_ngcontent-%COMP%]{padding:50px}.p-t-50[_ngcontent-%COMP%]{padding-top:50px}.p-r-50[_ngcontent-%COMP%]{padding-right:50px}.p-b-50[_ngcontent-%COMP%]{padding-bottom:50px}.p-l-50[_ngcontent-%COMP%]{padding-left:50px}.p-v-50[_ngcontent-%COMP%]{padding:50px 0}.p-h-50[_ngcontent-%COMP%]{padding:0 50px}.p-55[_ngcontent-%COMP%]{padding:55px}.p-t-55[_ngcontent-%COMP%]{padding-top:55px}.p-r-55[_ngcontent-%COMP%]{padding-right:55px}.p-b-55[_ngcontent-%COMP%]{padding-bottom:55px}.p-l-55[_ngcontent-%COMP%]{padding-left:55px}.p-v-55[_ngcontent-%COMP%]{padding:55px 0}.p-h-55[_ngcontent-%COMP%]{padding:0 55px}.p-60[_ngcontent-%COMP%]{padding:60px}.p-t-60[_ngcontent-%COMP%]{padding-top:60px}.p-r-60[_ngcontent-%COMP%]{padding-right:60px}.p-b-60[_ngcontent-%COMP%]{padding-bottom:60px}.p-l-60[_ngcontent-%COMP%]{padding-left:60px}.p-v-60[_ngcontent-%COMP%]{padding:60px 0}.p-h-60[_ngcontent-%COMP%]{padding:0 60px}.p-65[_ngcontent-%COMP%]{padding:65px}.p-t-65[_ngcontent-%COMP%]{padding-top:65px}.p-r-65[_ngcontent-%COMP%]{padding-right:65px}.p-b-65[_ngcontent-%COMP%]{padding-bottom:65px}.p-l-65[_ngcontent-%COMP%]{padding-left:65px}.p-v-65[_ngcontent-%COMP%]{padding:65px 0}.p-h-65[_ngcontent-%COMP%]{padding:0 65px}.p-70[_ngcontent-%COMP%]{padding:70px}.p-t-70[_ngcontent-%COMP%]{padding-top:70px}.p-r-70[_ngcontent-%COMP%]{padding-right:70px}.p-b-70[_ngcontent-%COMP%]{padding-bottom:70px}.p-l-70[_ngcontent-%COMP%]{padding-left:70px}.p-v-70[_ngcontent-%COMP%]{padding:70px 0}.p-h-70[_ngcontent-%COMP%]{padding:0 70px}.p-75[_ngcontent-%COMP%]{padding:75px}.p-t-75[_ngcontent-%COMP%]{padding-top:75px}.p-r-75[_ngcontent-%COMP%]{padding-right:75px}.p-b-75[_ngcontent-%COMP%]{padding-bottom:75px}.p-l-75[_ngcontent-%COMP%]{padding-left:75px}.p-v-75[_ngcontent-%COMP%]{padding:75px 0}.p-h-75[_ngcontent-%COMP%]{padding:0 75px}.p-80[_ngcontent-%COMP%]{padding:80px}.p-t-80[_ngcontent-%COMP%]{padding-top:80px}.p-r-80[_ngcontent-%COMP%]{padding-right:80px}.p-b-80[_ngcontent-%COMP%]{padding-bottom:80px}.p-l-80[_ngcontent-%COMP%]{padding-left:80px}.p-v-80[_ngcontent-%COMP%]{padding:80px 0}.p-h-80[_ngcontent-%COMP%]{padding:0 80px}.no-padding[_ngcontent-%COMP%]{padding:0!important}.no-pad-lr[_ngcontent-%COMP%], .no-pad-rl[_ngcontent-%COMP%]{padding-left:0;padding-right:0}.no-pad-tb[_ngcontent-%COMP%], .no-pad-bt[_ngcontent-%COMP%]{padding-top:0;padding-bottom:0}.pad-t-only[_ngcontent-%COMP%]{padding-left:0;padding-right:0;padding-bottom:0}.pad-b-only[_ngcontent-%COMP%]{padding-left:0;padding-right:0;padding-top:0}.pad-l-only[_ngcontent-%COMP%]{padding-right:0;padding-top:0;padding-bottom:0}.pad-r-only[_ngcontent-%COMP%]{padding-left:0;padding-top:0;padding-bottom:0}html[_ngcontent-%COMP%], body[_ngcontent-%COMP%], .rel[_ngcontent-%COMP%], .relative[_ngcontent-%COMP%]{position:relative}.abs[_ngcontent-%COMP%], .absolute[_ngcontent-%COMP%]{position:absolute}.fixed[_ngcontent-%COMP%]{position:fixed}.status-active[_ngcontent-%COMP%]{color:#5cb85c}.status-inactive[_ngcontent-%COMP%]{color:#666f73}.status-deleted[_ngcontent-%COMP%]{color:#000}.status-pending[_ngcontent-%COMP%]{color:orange}.status-approved[_ngcontent-%COMP%]{color:#4461e2}.status-overpaid[_ngcontent-%COMP%]{color:purple}.status-chargeoff[_ngcontent-%COMP%]{color:#f39c12}.status-active-overdue[_ngcontent-%COMP%], .status-block[_ngcontent-%COMP%]{color:red}.status-matured[_ngcontent-%COMP%]{color:#ff4000}.subStatus-contract-termination[_ngcontent-%COMP%]{color:#b3b3b3}.mat-step-header[_ngcontent-%COMP%] .mat-step-icon-state-done[_ngcontent-%COMP%]{background-color:#2af72a}.mat-step-header[_ngcontent-%COMP%] .mat-step-icon-state-done[_ngcontent-%COMP%] .status-transfer-progress[_ngcontent-%COMP%]{color:#ff4000}.mat-step-header[_ngcontent-%COMP%] .mat-step-icon-state-done[_ngcontent-%COMP%] .status-transfer-hold[_ngcontent-%COMP%]{color:#df0101}html[_ngcontent-%COMP%], body[_ngcontent-%COMP%]{-webkit-font-smoothing:antialiased}html[_ngcontent-%COMP%]{font-size:16px}body[_ngcontent-%COMP%]{font-family:Roboto,Helvetica Neue,sans-serif;font-weight:400;font-size:14px;color:#000000de;line-height:1.5;letter-spacing:normal}.mat-h1[_ngcontent-%COMP%], .mat-headline[_ngcontent-%COMP%], .mat-typography[_ngcontent-%COMP%] .mat-h1[_ngcontent-%COMP%], .mat-typography[_ngcontent-%COMP%] .mat-headline[_ngcontent-%COMP%], .mat-typography[_ngcontent-%COMP%] h1[_ngcontent-%COMP%]{font:400 24px/32px Roboto,Helvetica Neue,sans-serif;letter-spacing:normal;margin:0 0 16px}.lh-1[_ngcontent-%COMP%]{line-height:1}.lh-13[_ngcontent-%COMP%]{line-height:1.3}.lh-15[_ngcontent-%COMP%]{line-height:1.5}.bold[_ngcontent-%COMP%], .strong[_ngcontent-%COMP%]{font-weight:700}.no-bold[_ngcontent-%COMP%]{font-weight:400}.italic[_ngcontent-%COMP%], .em[_ngcontent-%COMP%]{font-style:italic}.strike[_ngcontent-%COMP%]{text-decoration:line-through}.normal[_ngcontent-%COMP%]{font-weight:400;font-style:normal}.uppercase[_ngcontent-%COMP%]{text-transform:uppercase}.text-left[_ngcontent-%COMP%]{text-align:left}.text-center[_ngcontent-%COMP%]{text-align:center}.text-right[_ngcontent-%COMP%]{text-align:right}.w100[_ngcontent-%COMP%]{font-weight:100}.w200[_ngcontent-%COMP%]{font-weight:200}.w300[_ngcontent-%COMP%]{font-weight:300}.w400[_ngcontent-%COMP%]{font-weight:400}.w500[_ngcontent-%COMP%]{font-weight:500}.w600[_ngcontent-%COMP%]{font-weight:600}.w700[_ngcontent-%COMP%]{font-weight:700}.w800[_ngcontent-%COMP%]{font-weight:800}.w900[_ngcontent-%COMP%]{font-weight:900}.f9[_ngcontent-%COMP%]{font-size:9px}.f10[_ngcontent-%COMP%]{font-size:10px}.f11[_ngcontent-%COMP%]{font-size:11px}.f12[_ngcontent-%COMP%]{font-size:12px}.f13[_ngcontent-%COMP%]{font-size:13px}.f14[_ngcontent-%COMP%]{font-size:14px}.f15[_ngcontent-%COMP%]{font-size:15px}.f16[_ngcontent-%COMP%]{font-size:16px}.f17[_ngcontent-%COMP%]{font-size:17px}.f18[_ngcontent-%COMP%]{font-size:18px;line-height:30px}.f19[_ngcontent-%COMP%]{font-size:19px}.f20[_ngcontent-%COMP%]{font-size:20px}.f30[_ngcontent-%COMP%]{font-size:30px}.f40[_ngcontent-%COMP%]{font-size:40px}.f50[_ngcontent-%COMP%]{font-size:50px}.f60[_ngcontent-%COMP%]{font-size:60px}.size-small[_ngcontent-%COMP%]{font-size:75%}.size-normal[_ngcontent-%COMP%]{font-size:100%}.size-medium[_ngcontent-%COMP%]{font-size:125%}.size-big[_ngcontent-%COMP%], .size-large[_ngcontent-%COMP%]{font-size:150%}.size-huge[_ngcontent-%COMP%]{font-size:200%}.inherit[_ngcontent-%COMP%]{font:inherit}.text-shadow[_ngcontent-%COMP%]{text-shadow:1px 1px 1px rgba(0,0,0,.4)}.text-rgb-2[_ngcontent-%COMP%]{color:#0003}.text-rgb-3[_ngcontent-%COMP%]{color:#0000004d}.text-rgb-4[_ngcontent-%COMP%]{color:#0006}.text-rgb-5[_ngcontent-%COMP%]{color:#00000080}.no-ul[_ngcontent-%COMP%], .no-ul[_ngcontent-%COMP%]:hover, .no-ul[_ngcontent-%COMP%] a[_ngcontent-%COMP%], .no-ul[_ngcontent-%COMP%] a[_ngcontent-%COMP%]:hover{text-decoration:none}.no-wrap[_ngcontent-%COMP%]{white-space:nowrap}.auto-cell-size[_ngcontent-%COMP%]{white-space:nowrap;width:1%}.ls-0[_ngcontent-%COMP%]{letter-spacing:-3px;white-space:nowrap}.label-field[_ngcontent-%COMP%]{margin-top:32px}.wrap-content[_ngcontent-%COMP%]{overflow-wrap:break-word;word-wrap:break-word}.no-break-content[_ngcontent-%COMP%]{overflow-wrap:anywhere!important}.fit[_ngcontent-%COMP%]{max-width:100%}.half-width[_ngcontent-%COMP%]{width:50%}.full-width[_ngcontent-%COMP%]{width:100%}.full-height[_ngcontent-%COMP%]{height:100%}html[_ngcontent-%COMP%], body[_ngcontent-%COMP%]{width:100%;height:100%;min-height:100%}body[_ngcontent-%COMP%] table[_ngcontent-%COMP%]{width:100%}.container[_ngcontent-%COMP%]{max-width:74rem;width:90%}.mw300[_ngcontent-%COMP%]{max-width:300px}.mw400[_ngcontent-%COMP%]{max-width:400px}.mw500[_ngcontent-%COMP%]{max-width:500px}.mw600[_ngcontent-%COMP%]{max-width:600px}.fullwidth[_ngcontent-%COMP%]{width:100%}.zindex-1[_ngcontent-%COMP%]{z-index:1}.zindex-2[_ngcontent-%COMP%]{z-index:2}.zindex-3[_ngcontent-%COMP%]{z-index:3}.zindex-4[_ngcontent-%COMP%]{z-index:4}.container[_ngcontent-%COMP%]{max-width:37rem}.container[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] div[_ngcontent-%COMP%]{margin:1rem 0;word-wrap:break-word}.container[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] mifosx-transaction-payment-detail[_ngcontent-%COMP%]{width:100%;margin-bottom:20px}.active[_ngcontent-%COMP%]{background-color:#5cb85c;height:4px}.linked[_ngcontent-%COMP%]{background-color:#4461e2;height:4px}.undo[_ngcontent-%COMP%]{background-color:red;height:4px}"]})}}return t})();var bs=()=>["../"];function vs(t,s){t&1&&(a(0,"mat-error"),o(1),r(2,"translate"),r(3,"translate"),a(4,"strong"),o(5),r(6,"translate"),i()()),t&2&&(n(),A(" ",c(2,3,"labels.inputs.Transaction Date")," ",c(3,5,"labels.commons.is")," "),n(4),m(c(6,7,"labels.commons.required")))}function Ps(t,s){if(t&1&&(a(0,"mat-option",9),o(1),i()),t&2){let e=s.$implicit;d("value",e.id),n(),u(" ",e.name," ")}}function Ts(t,s){t&1&&(a(0,"mat-form-field")(1,"mat-label"),o(2),r(3,"translate"),i(),C(4,"input",17),i()),t&2&&(n(2),m(c(3,1,"labels.inputs.Account Number")))}function Ss(t,s){t&1&&(a(0,"mat-form-field")(1,"mat-label"),o(2),r(3,"translate"),i(),C(4,"input",18),i()),t&2&&(n(2),m(c(3,1,"labels.inputs.Cheque")))}function Ms(t,s){t&1&&(a(0,"mat-form-field")(1,"mat-label"),o(2),r(3,"translate"),i(),C(4,"input",19),i()),t&2&&(n(2),m(c(3,1,"labels.inputs.Routing Code")))}function As(t,s){t&1&&(a(0,"mat-form-field")(1,"mat-label"),o(2),r(3,"translate"),i(),C(4,"input",20),i()),t&2&&(n(2),m(c(3,1,"labels.inputs.Receipt Number")))}function ys(t,s){t&1&&(a(0,"mat-form-field")(1,"mat-label"),o(2),r(3,"translate"),i(),C(4,"input",21),i()),t&2&&(n(2),m(c(3,1,"labels.inputs.Bank")))}var Dn=(()=>{class t{constructor(){this.formBuilder=_(st),this.route=_(N),this.router=_(W),this.dateUtils=_(X),this.recurringDepositsService=_(k),this.settingsService=_($),this.minDate=new Date(2e3,0,1),this.maxDate=new Date,this.addPaymentDetailsFlag=!1,this.currency=null,this.route.data.subscribe(e=>{this.transactionTemplateData=e.recurringDepositsAccountTransactionTemplate,this.transactionTemplateData.currency&&(this.currency=this.transactionTemplateData.currency),this.paymentTypeOptions=this.transactionTemplateData.paymentTypeOptions}),this.recurringDepositAccountId=this.route.parent.parent.snapshot.params.recurringDepositAccountId}ngOnInit(){this.maxDate=this.settingsService.businessDate,this.createEditTransactionForm(),this.editTransactionForm.patchValue({transactionDate:this.transactionTemplateData.date&&new Date(this.transactionTemplateData.date),transactionAmount:this.transactionTemplateData.amount,paymentTypeId:this.transactionTemplateData.paymentTypeId})}createEditTransactionForm(){this.editTransactionForm=this.formBuilder.group({transactionDate:["",q.required],transactionAmount:["",q.required],paymentTypeId:[""]})}addPaymentDetails(){this.addPaymentDetailsFlag=!this.addPaymentDetailsFlag,this.addPaymentDetailsFlag?(this.editTransactionForm.addControl("accountNumber",new tt("")),this.editTransactionForm.addControl("checkNumber",new tt("")),this.editTransactionForm.addControl("routingCode",new tt("")),this.editTransactionForm.addControl("receiptNumber",new tt("")),this.editTransactionForm.addControl("bankNumber",new tt(""))):(this.editTransactionForm.removeControl("accountNumber"),this.editTransactionForm.removeControl("checkNumber"),this.editTransactionForm.removeControl("routingCode"),this.editTransactionForm.removeControl("receiptNumber"),this.editTransactionForm.removeControl("bankNumber"))}submit(){let e=this.editTransactionForm.value,l=this.settingsService.language.code,p=this.settingsService.dateFormat,g=this.editTransactionForm.value.transactionDate;e.transactionDate instanceof Date&&(e.transactionDate=this.dateUtils.formatDate(g,p));let b=J(F({},e),{dateFormat:p,locale:l});b.transactionAmount=b.transactionAmount*1,this.recurringDepositsService.executeRecurringDepositsAccountTransactionsCommand(this.recurringDepositAccountId,"modify",b,this.transactionTemplateData.id).subscribe(G=>{this.router.navigate(["../"],{relativeTo:this.route})})}static{this.\u0275fac=function(l){return new(l||t)}}static{this.\u0275cmp=O({type:t,selectors:[["mifosx-edit-transaction"]],decls:40,vars:34,consts:[["dueDatePicker",""],[1,"container"],[3,"ngSubmit","formGroup"],[1,"layout-column"],[3,"click"],["matInput","","formControlName","transactionDate","required","",3,"min","max","matDatepicker"],["matSuffix","",3,"for"],[3,"currency","isRequired","inputFormControl","inputLabel"],["formControlName","paymentTypeId"],[3,"value"],[1,"flex-fill"],[1,"expandcollapsebutton","m-l-10","m-t-40","flex-75",3,"click"],[3,"className"],[1,"m-l-10"],[1,"layout-row","layout-xs-column","layout-align-center","gap-5px"],["type","button","mat-raised-button","",3,"routerLink"],["mat-raised-button","","color","primary",3,"disabled"],["type","number","formControlName","accountNumber","matInput",""],["type","number","formControlName","checkNumber","matInput",""],["formControlName","routingCode","matInput",""],["formControlName","receiptNumber","matInput",""],["formControlName","bankNumber","matInput",""]],template:function(l,p){if(l&1){let g=y();a(0,"div",1)(1,"mat-card")(2,"form",2),T("ngSubmit",function(){return S(g),M(p.submit())}),a(3,"mat-card-content",3)(4,"mat-form-field",4),T("click",function(){S(g);let G=E(11);return M(G.open())}),a(5,"mat-label"),o(6),r(7,"translate"),i(),C(8,"input",5)(9,"mat-datepicker-toggle",6)(10,"mat-datepicker",null,0),x(12,vs,7,9,"mat-error"),i(),C(13,"mifosx-input-amount",7),a(14,"mat-form-field")(15,"mat-label"),o(16),r(17,"translate"),i(),a(18,"mat-select",8),L(19,Ps,2,2,"mat-option",9,z),i()(),a(21,"div",10)(22,"span",11),T("click",function(){return S(g),M(p.addPaymentDetails())}),a(23,"mat-slide-toggle")(24,"div",12)(25,"span",13),o(26),r(27,"translate"),i()()()()(),x(28,Ts,5,3,"mat-form-field"),x(29,Ss,5,3,"mat-form-field"),x(30,Ms,5,3,"mat-form-field"),x(31,As,5,3,"mat-form-field"),x(32,ys,5,3,"mat-form-field"),a(33,"mat-card-actions",14)(34,"button",15),o(35),r(36,"translate"),i(),a(37,"button",16),o(38),r(39,"translate"),i()()()()()()}if(l&2){let g=E(11);n(2),d("formGroup",p.editTransactionForm),n(4),m(c(7,23,"labels.inputs.Transaction Date")),n(2),d("min",p.minDate)("max",p.maxDate)("matDatepicker",g),n(),d("for",g),n(3),D(p.editTransactionForm.controls.transactionDate.hasError("required")?12:-1),n(),d("currency",p.currency)("isRequired",!0)("inputFormControl",p.editTransactionForm.controls.transactionAmount)("inputLabel","Transaction Amount"),n(3),m(c(17,25,"labels.inputs.Payment Type")),n(3),j(p.paymentTypeOptions),n(5),d("className",p.addPaymentDetailsFlag?"enabled":"disabled"),n(2),m(c(27,27,"labels.inputs.Show Payment Details")),n(2),D(p.editTransactionForm.controls.accountNumber?28:-1),n(),D(p.editTransactionForm.controls.checkNumber?29:-1),n(),D(p.editTransactionForm.controls.routingCode?30:-1),n(),D(p.editTransactionForm.controls.receiptNumber?31:-1),n(),D(p.editTransactionForm.controls.bankNumber?32:-1),n(2),d("routerLink",K(33,bs)),n(),u(" ",c(36,29,"labels.buttons.Cancel")," "),n(2),d("disabled",!p.editTransactionForm.valid),n(),u(" ",c(39,31,"labels.buttons.Submit")," ")}},dependencies:[I,R,rt,mt,Re,Z,ot,dt,ct,pt,Q,Y,ut,ft,nt,et,gt,ht,Ct,Ot,yt,Dt,bt,xt,V,Ee,We,w],styles:[".container[_ngcontent-%COMP%]{width:37rem}"]})}}return t})();var li=(()=>{class t{constructor(){this.recurringDepositsService=_(k)}resolve(e){let l=e.paramMap.get("recurringDepositAccountId");return this.recurringDepositsService.getRecurringDepositsAccountData(l)}static{this.\u0275fac=function(l){return new(l||t)}}static{this.\u0275prov=At({token:t,factory:t.\u0275fac})}}return t})();var An=(()=>{class t{constructor(){this.recurringDepositsService=_(k)}resolve(e){let l=e.parent.paramMap.get("recurringDepositAccountId");return this.recurringDepositsService.getRecurringDepositsAccountData(l)}static{this.\u0275fac=function(l){return new(l||t)}}static{this.\u0275prov=At({token:t,factory:t.\u0275fac})}}return t})();var yn=(()=>{class t{constructor(){this.recurringDepositsService=_(k)}resolve(e){let l=e.parent.parent.paramMap.get("clientId");return this.recurringDepositsService.getRecurringDepositsAccountTemplate(l)}static{this.\u0275fac=function(l){return new(l||t)}}static{this.\u0275prov=At({token:t,factory:t.\u0275fac})}}return t})();var On=(()=>{class t{constructor(){this.savingsService=_(pe),this.recurringDepositsService=_(k)}resolve(e){let l=e.paramMap.get("name"),p=e.paramMap.get("recurringDepositAccountId")||e.parent.parent.paramMap.get("recurringDepositAccountId");switch(l){case"Add Charge":return this.savingsService.getSavingsChargeTemplateResource(p);case"Close":return this.recurringDepositsService.getRecurringDepositAccountActionResource(p,"close");case"Deposit":case"Withdrawal":return this.recurringDepositsService.getRecurringDepositAccountTransactionTemplateResource(p,l.toLocaleLowerCase());default:return}}static{this.\u0275fac=function(l){return new(l||t)}}static{this.\u0275prov=At({token:t,factory:t.\u0275fac})}}return t})();function Os(t,s){t&1&&C(0,"fa-icon",15)}function Is(t,s){t&1&&C(0,"fa-icon",15)}function Rs(t,s){t&1&&C(0,"fa-icon",16)}function ws(t,s){t&1&&C(0,"fa-icon",17)}function Es(t,s){t&1&&C(0,"fa-icon",18)}function Bs(t,s){t&1&&(o(0),r(1,"translate")),t&2&&m(c(1,1,"labels.inputs.DETAILS"))}function Fs(t,s){t&1&&(o(0),r(1,"translate")),t&2&&m(c(1,1,"labels.inputs.TERMS"))}function ks(t,s){t&1&&(o(0),r(1,"translate")),t&2&&m(c(1,1,"labels.inputs.SETTINGS"))}function Ns(t,s){t&1&&(o(0),r(1,"translate")),t&2&&m(c(1,1,"labels.inputs.INTEREST RATE CHART"))}function Vs(t,s){t&1&&(o(0),r(1,"translate")),t&2&&m(c(1,1,"labels.inputs.CHARGES"))}function qs(t,s){t&1&&(o(0),r(1,"translate")),t&2&&m(c(1,1,"labels.inputs.PREVIEW"))}function Gs(t,s){if(t&1){let e=y();a(0,"mat-step",14),h(1,qs,2,3,"ng-template",9),a(2,"mifosx-recurring-deposits-account-preview-step",19),T("submitEvent",function(){S(e);let p=f();return M(p.submit())}),i()()}if(t&2){let e=f();n(2),d("recurringDepositsAccountTemplate",e.recurringDepositsAccountAndTemplate)("recurringDepositsAccountProductTemplate",e.recurringDepositsAccountProductTemplate)("recurringDepositAccountData",e.recurringDepositAccountData)}}var bn=(()=>{class t{constructor(){this.route=_(N),this.router=_(W),this.dateUtils=_(X),this.recurringDepositsService=_(k),this.settingsService=_($),this.route.data.subscribe(e=>{this.recurringDepositsAccountAndTemplate=e.recurringDepositsAccountAndTemplate})}setTemplate(e){this.recurringDepositsAccountProductTemplate=e}get recurringDepositAccountDetailsForm(){return this.recurringDepositsAccountDetailsStep.recurringDepositAccountDetailsForm}get recurringDepositAccountTermsForm(){return this.recurringDepositAccountTermsStep.recurringDepositAccountTermsForm}get recurringDepositAccountSettingsForm(){return this.recurringDepositAccountSettingsStep.recurringDepositAccountSettingsForm}get recurringDepositAccountFormValidAndNotPristine(){return this.recurringDepositAccountDetailsForm.valid&&this.recurringDepositAccountTermsForm.valid&&this.recurringDepositAccountSettingsForm.valid&&(!this.recurringDepositAccountDetailsForm.pristine||!this.recurringDepositAccountTermsForm.pristine||!this.recurringDepositAccountSettingsForm.pristine||!this.recurringDepositAccountChargesStep.pristine)}get recurringDepositAccountData(){return F(F(F(F({},this.recurringDepositsAccountDetailsStep.recurringDepositAccountDetails),this.recurringDepositAccountTermsStep.recurringDepositAccountTerms),this.recurringDepositAccountSettingsStep.recurringDepositAccountSettings),this.recurringDepositAccountChargesStep.recurringDepositAccountCharges)}get recurringDepositAccount(){return F(F(F(F({},this.recurringDepositsAccountDetailsStep.recurringDepositAccountDetails),this.recurringDepositAccountTermsStep.recurringDepositAccountTerms),this.recurringDepositAccountSettingsStep.recurringDepositAccountSettings),this.recurringDepositAccountChargesStep.recurringDepositAccountCharges)}submit(){let e=this.settingsService.language.code,l=this.settingsService.dateFormat,g=J(F({},this.recurringDepositAccount),{clientId:this.recurringDepositsAccountAndTemplate.clientId,charges:this.recurringDepositAccount.charges.map(b=>({chargeId:b.id,amount:b.amount,dueDate:b.dueDate&&this.dateUtils.formatDate(b.dueDate,l),feeOnMonthDay:b.feeOnMonthDay,feeInterval:b.feeInterval})),isCalendarInherited:this.recurringDepositAccount.recurringDepositAccount?this.recurringDepositAccount.recurringDepositAccount:!1,submittedOnDate:this.dateUtils.formatDate(this.recurringDepositAccount.submittedOnDate,l),expectedFirstDepositOnDate:this.dateUtils.formatDate(this.recurringDepositAccount.expectedFirstDepositOnDate,l),dateFormat:l,monthDayFormat:"dd MMMM",locale:e});this.recurringDepositsService.updateRecurringDepositAccount(this.recurringDepositsAccountAndTemplate.id,g).subscribe(b=>{this.router.navigate(["../"],{relativeTo:this.route})})}static{this.\u0275fac=function(l){return new(l||t)}}static{this.\u0275cmp=O({type:t,selectors:[["mifosx-edit-recurring-deposit-account"]],viewQuery:function(l,p){if(l&1&&(Pt(se,7),Pt(le,7),Pt(me,7),Pt(de,7)),l&2){let g;Tt(g=St())&&(p.recurringDepositsAccountDetailsStep=g.first),Tt(g=St())&&(p.recurringDepositAccountTermsStep=g.first),Tt(g=St())&&(p.recurringDepositAccountSettingsStep=g.first),Tt(g=St())&&(p.recurringDepositAccountChargesStep=g.first)}},decls:24,vars:16,consts:[["recurringDepositAccountStepper",""],[1,"container"],["orientation","vertical","labelPosition","bottom",1,"mat-elevation-z8",3,"linear"],["matStepperIcon","number"],["matStepperIcon","edit"],["matStepperIcon","done"],["matStepperIcon","error"],["matStepperIcon","preview"],[3,"stepControl"],["matStepLabel",""],[3,"recurringDepositsAccountProductTemplate","recurringDepositsAccountTemplate"],[3,"recurringDepositsAccountTemplate","recurringDepositsAccountProductTemplate"],[3,"isNew","recurringDepositsAccountTemplate","recurringDepositsAccountProductTemplate"],[3,"recurringDepositsAccountTemplate","recurringDepositsAccountProductTemplate","recurringDepositAccountFormValid"],["state","preview","completed",""],["icon","pencil-alt","size","sm"],["icon","check","size","sm"],["icon","exclamation-triangle","size","lg"],["icon","eye","size","sm"],[3,"submitEvent","recurringDepositsAccountTemplate","recurringDepositsAccountProductTemplate","recurringDepositAccountData"]],template:function(l,p){if(l&1){let g=y();a(0,"div",1)(1,"mat-stepper",2,0),h(3,Os,1,0,"ng-template",3)(4,Is,1,0,"ng-template",4)(5,Rs,1,0,"ng-template",5)(6,ws,1,0,"ng-template",6)(7,Es,1,0,"ng-template",7),a(8,"mat-step",8),h(9,Bs,2,3,"ng-template",9),a(10,"mifosx-recurring-deposits-account-details-step",10),T("recurringDepositsAccountProductTemplate",function(G){return S(g),M(p.setTemplate(G))}),i()(),a(11,"mat-step",8),h(12,Fs,2,3,"ng-template",9),C(13,"mifosx-recurring-deposits-account-terms-step",11),i(),a(14,"mat-step",8),h(15,ks,2,3,"ng-template",9),C(16,"mifosx-recurring-deposits-account-settings-step",12),i(),a(17,"mat-step"),h(18,Ns,2,3,"ng-template",9),C(19,"mifosx-recurring-deposits-account-interest-rate-chart-step",11),i(),a(20,"mat-step"),h(21,Vs,2,3,"ng-template",9),C(22,"mifosx-recurring-deposits-account-charges-step",13),i(),x(23,Gs,3,3,"mat-step",14),i()()}l&2&&(n(),d("linear",!1),n(7),d("stepControl",p.recurringDepositAccountDetailsForm),n(2),d("recurringDepositsAccountTemplate",p.recurringDepositsAccountAndTemplate),n(),d("stepControl",p.recurringDepositAccountTermsForm),n(2),d("recurringDepositsAccountTemplate",p.recurringDepositsAccountAndTemplate)("recurringDepositsAccountProductTemplate",p.recurringDepositsAccountProductTemplate),n(),d("stepControl",p.recurringDepositAccountSettingsForm),n(2),d("isNew",!1)("recurringDepositsAccountTemplate",p.recurringDepositsAccountAndTemplate)("recurringDepositsAccountProductTemplate",p.recurringDepositsAccountProductTemplate),n(3),d("recurringDepositsAccountTemplate",p.recurringDepositsAccountAndTemplate)("recurringDepositsAccountProductTemplate",p.recurringDepositsAccountProductTemplate),n(3),d("recurringDepositsAccountTemplate",p.recurringDepositsAccountAndTemplate)("recurringDepositsAccountProductTemplate",p.recurringDepositsAccountProductTemplate)("recurringDepositAccountFormValid",p.recurringDepositAccountFormValidAndNotPristine),n(),D(p.recurringDepositAccountFormValidAndNotPristine?23:-1))},dependencies:[I,R,Je,Qe,_t,Ye,Ke,se,le,me,Fe,de,ke,w],encapsulation:2})}}return t})();var In=(()=>{class t{constructor(){this.recurringDepositsService=_(k)}resolve(e){let l=e.paramMap.get("recurringDepositAccountId");return this.recurringDepositsService.getRecurringDepositsAccountAndTemplate(l)}static{this.\u0275fac=function(l){return new(l||t)}}static{this.\u0275prov=At({token:t,factory:t.\u0275fac})}}return t})();var Rn=(()=>{class t{constructor(){this.recurringDepositsService=_(k)}resolve(e){let l=e.parent.paramMap.get("recurringDepositAccountId"),p=e.paramMap.get("id");return this.recurringDepositsService.getRecurringDepositsAccountTransaction(l,p)}static{this.\u0275fac=function(l){return new(l||t)}}static{this.\u0275prov=At({token:t,factory:t.\u0275fac})}}return t})();var wn=(()=>{class t{constructor(){this.recurringDepositsService=_(k)}resolve(e){let l=e.parent.paramMap.get("recurringDepositAccountId"),p=e.paramMap.get("id");return this.recurringDepositsService.getRecurringDepositsAccountTransactionTemplate(l,p)}static{this.\u0275fac=function(l){return new(l||t)}}static{this.\u0275prov=At({token:t,factory:t.\u0275fac})}}return t})();function Hs(t,s){if(t&1&&(a(0,"span"),C(1,"mifosx-external-identifier",4),i()),t&2){let e=f(2);n(),d("externalId",Mt(e.recurringDepositsAccountData.externalId))}}function Us(t,s){t&1&&(a(0,"span"),o(1),r(2,"translate"),i()),t&2&&(n(),u(" ",c(2,1,"labels.inputs.Not Available")," "))}function $s(t,s){t&1&&(a(0,"span"),o(1),r(2,"translate"),i()),t&2&&(n(),m(c(2,1,"labels.inputs.Unassigned")))}function zs(t,s){t&1&&(a(0,"td"),o(1),r(2,"translate"),i()),t&2&&(n(),u(" ",c(2,1,"labels.inputs.Closed on Date")," "))}function Ls(t,s){if(t&1&&(a(0,"tr"),x(1,zs,3,3,"td"),a(2,"td")(3,"span"),o(4),r(5,"dateFormat"),i()()()),t&2){let e=f(2);n(),D(e.recurringDepositsAccountData.timeline.closedOnDate?1:-1),n(3),m(c(5,2,e.recurringDepositsAccountData.timeline.closedOnDate))}}function js(t,s){if(t&1&&(a(0,"tr")(1,"td"),o(2),r(3,"translate"),i(),a(4,"td")(5,"span"),o(6),i()()()),t&2){let e=f(2);n(2),m(c(3,2,"labels.inputs.Balance Required for Interest Calculation")),n(4),m(e.recurringDepositsAccountData.minBalanceForInterestCalculation)}}function Ws(t,s){if(t&1&&(a(0,"tr")(1,"td"),o(2),r(3,"translate"),i(),a(4,"td")(5,"span"),o(6),i()()()),t&2){let e=f(2);n(2),m(c(3,2,"labels.inputs.Witdhold Tax Group")),n(4),m(e.recurringDepositsAccountData.taxGroup.name)}}function Ks(t,s){if(t&1&&(a(0,"div",1)(1,"h4",2),o(2),r(3,"translate"),i(),a(4,"table")(5,"tbody")(6,"tr")(7,"td"),o(8),r(9,"translate"),i(),a(10,"td"),x(11,Hs,2,2,"span"),x(12,Us,3,3,"span"),i()(),a(13,"tr")(14,"td"),o(15),r(16,"translate"),i(),a(17,"td"),o(18),x(19,$s,3,3,"span"),i()(),a(20,"tr")(21,"td"),o(22),r(23,"translate"),i(),a(24,"td"),o(25),r(26,"dateFormat"),i()(),a(27,"tr")(28,"td"),o(29),r(30,"translate"),i(),a(31,"td")(32,"span"),o(33),r(34,"dateFormat"),i()()(),x(35,Ls,6,4,"tr"),C(36,"tr"),a(37,"tr")(38,"td"),o(39),r(40,"translate"),i(),a(41,"td")(42,"span",3),o(43),i(),o(44),r(45,"translateKey"),i()(),x(46,js,7,4,"tr"),x(47,Ws,7,4,"tr"),i()()()),t&2){let e=f();n(2),m(c(3,17,"labels.inputs.Account Details")),n(6),m(c(9,19,"labels.inputs.External Id")),n(3),D(e.recurringDepositsAccountData.externalId?11:-1),n(),D(e.recurringDepositsAccountData.externalId?-1:12),n(3),m(c(16,21,"labels.inputs.Field Officer")),n(3),u(" ",e.recurringDepositsAccountData.fieldOfficerName," "),n(),D(e.recurringDepositsAccountData.fieldOfficerName?-1:19),n(3),m(c(23,23,"labels.inputs.Activation date")),n(3),m(c(26,25,e.recurringDepositsAccountData.timeline.activatedOnDate)),n(4),m(c(30,27,"labels.inputs.Maturity Date")),n(4),m(c(34,29,e.recurringDepositsAccountData.maturityDate)),n(2),D(e.recurringDepositsAccountData.timeline.closedOnDate||e.recurringDepositsAccountData.summary.totalWitddrawals?35:-1),n(4),m(c(40,31,"labels.inputs.Deposit Frequency")),n(4),m(e.recurringDepositsAccountData.recurringFrequency),n(),u(" ",B(45,33,e.recurringDepositsAccountData.recurringFrequencyType.value,"catalogs")," "),n(2),D(e.recurringDepositsAccountData.minBalanceForInterestCalculation?46:-1),n(),D(e.recurringDepositsAccountData.witdHoldTax?47:-1)}}function Qs(t,s){if(t&1&&(a(0,"span"),o(1),r(2,"currency"),i()),t&2){let e=f(2);n(),m(U(2,1,e.recurringDepositsAccountData.summary.totalDeposits,e.currency.code,"symbol-narrow","1.2-2"))}}function Ys(t,s){if(t&1&&(a(0,"span"),o(1),r(2,"currency"),i()),t&2){let e=f(2);n(),m(U(2,1,0,e.currency.code,"symbol-narrow","1.2-2"))}}function Js(t,s){if(t&1&&(a(0,"span"),o(1),r(2,"currency"),i()),t&2){let e=f(2);n(),m(U(2,1,e.recurringDepositsAccountData.summary.totalWithdrawals,e.currency.code,"symbol-narrow","1.2-2"))}}function Xs(t,s){if(t&1&&(a(0,"span"),o(1),r(2,"currency"),i()),t&2){let e=f(2);n(),m(U(2,1,0,e.currency.code,"symbol-narrow","1.2-2"))}}function Zs(t,s){if(t&1&&(a(0,"tr")(1,"td"),o(2),r(3,"translate"),i(),a(4,"td",5)(5,"span"),o(6),r(7,"currency"),i()()()),t&2){let e=f(2);n(2),m(c(3,2,"labels.inputs.Interest Earned")),n(4),m(U(7,4,e.recurringDepositsAccountData.summary.totalInterestEarned,e.currency.code,"symbol-narrow","1.2-2"))}}function tl(t,s){if(t&1&&(a(0,"div",1)(1,"h4",2),o(2),r(3,"translate"),i(),a(4,"table")(5,"tbody")(6,"tr")(7,"td"),o(8),r(9,"translate"),i(),a(10,"td",5)(11,"span"),o(12),r(13,"currency"),i()()(),a(14,"tr")(15,"td"),o(16),r(17,"translate"),i(),a(18,"td",5)(19,"span"),o(20),r(21,"currency"),i()()(),a(22,"tr")(23,"td"),o(24),r(25,"translate"),i(),a(26,"td",5)(27,"span"),o(28),r(29,"currency"),i()()(),a(30,"tr")(31,"td"),o(32),r(33,"translate"),i(),a(34,"td",5),x(35,Qs,3,6,"span"),x(36,Ys,3,6,"span"),i()(),a(37,"tr")(38,"td"),o(39),r(40,"translate"),i(),a(41,"td",5),x(42,Js,3,6,"span"),x(43,Xs,3,6,"span"),i()(),x(44,Zs,8,9,"tr"),i()()()),t&2){let e=f();n(2),m(c(3,14,"labels.heading.Performance History")),n(6),m(c(9,16,"labels.inputs.Principal Amount")),n(4),m(U(13,18,e.recurringDepositsAccountData.depositAmount,e.currency.code,"symbol-narrow","1.2-2")),n(4),m(c(17,23,"labels.inputs.Maturity Amount")),n(4),m(U(21,25,e.recurringDepositsAccountData.maturityAmount,e.currency.code,"symbol-narrow","1.2-2")),n(4),m(c(25,30,"labels.inputs.Recurring Deposit Amount")),n(4),m(U(29,32,e.recurringDepositsAccountData==null?null:e.recurringDepositsAccountData.mandatoryRecommendedDepositAmount,e.currency.code,"symbol-narrow","1.2-2")),n(4),m(c(33,37,"labels.inputs.Deposits till Date")),n(3),D(e.recurringDepositsAccountData.summary.totalDeposits?35:-1),n(),D(e.recurringDepositsAccountData.summary.totalDeposits?-1:36),n(3),m(c(40,39,"labels.inputs.Withdrwals till Date")),n(3),D(e.recurringDepositsAccountData.summary.totalWithdrawals?42:-1),n(),D(e.recurringDepositsAccountData.summary.totalWithdrawals?-1:43),n(),D(e.recurringDepositsAccountData.summary.totalInterestEarned>=0?44:-1)}}function el(t,s){if(t&1&&(a(0,"span"),C(1,"mifosx-external-identifier",4),i()),t&2){let e=f(2);n(),d("externalId",Mt(e.recurringDepositsAccountData.externalId))}}function nl(t,s){t&1&&(a(0,"span"),o(1),r(2,"translate"),i()),t&2&&(n(),u(" ",c(2,1,"labels.inputs.Not Available")," "))}function il(t,s){t&1&&(a(0,"span"),o(1),r(2,"translate"),i()),t&2&&(n(),m(c(2,1,"labels.inputs.Not Activated")))}function al(t,s){if(t&1&&(a(0,"span"),o(1),r(2,"dateFormat"),x(3,il,3,3,"span"),i()),t&2){let e=f(2);n(),u("",c(2,2,e.recurringDepositsAccountData.timeline.activatedOnDate)," "),n(2),D(e.recurringDepositsAccountData.timeline.activatedOnDate?-1:3)}}function ol(t,s){t&1&&(a(0,"span"),o(1),r(2,"translate"),i()),t&2&&(n(),m(c(2,1,"labels.inputs.Not Activated")))}function rl(t,s){if(t&1&&(a(0,"span"),o(1),r(2,"dateFormat"),x(3,ol,3,3,"span"),i()),t&2){let e=f(2);n(),u("",c(2,2,e.recurringDepositsAccountData.expectedFirstDepositOnDate)," "),n(2),D(e.recurringDepositsAccountData.expectedFirstDepositOnDate?-1:3)}}function cl(t,s){if(t&1&&(a(0,"tr")(1,"td"),o(2),r(3,"translate"),i(),a(4,"td")(5,"span"),o(6),r(7,"dateFormat"),i()()()),t&2){let e=f(2);n(2),m(c(3,2,"labels.inputs.Maturity Date")),n(4),m(c(7,4,e.recurringDepositsAccountData.maturityDate))}}function pl(t,s){if(t&1&&(a(0,"span"),o(1),r(2,"currency"),i()),t&2){let e=f(2);n(),m(U(2,1,e.recurringDepositsAccountData.summary.totalDeposits,e.currency.code,"symbol-narrow","1.2-2"))}}function sl(t,s){if(t&1&&(a(0,"span"),o(1),r(2,"currency"),i()),t&2){let e=f(2);n(),m(U(2,1,0,e.currency.code,"symbol-narrow","1.2-2"))}}function ll(t,s){if(t&1&&(a(0,"tr")(1,"td"),o(2),r(3,"translate"),i(),a(4,"td")(5,"span"),o(6),i()()()),t&2){let e=f(2);n(2),m(c(3,3,"labels.inputs.Interests Earned")),n(4),A("",e.recurringDepositsAccountData.currency.displaySymbol,"\xA0",e.recurringDepositsAccountData.summary.totalInterestEarned)}}function ml(t,s){if(t&1&&(a(0,"tr")(1,"td"),o(2),r(3,"translate"),i(),a(4,"td",5)(5,"span"),o(6),r(7,"currency"),i()()()),t&2){let e=f(2);n(2),m(c(3,2,"labels.inputs.Total Withdrawls")),n(4),m(U(7,4,e.recurringDepositsAccountData.summary.totalWithdrawals,e.currency.code,"symbol-narrow","1.2-2"))}}function dl(t,s){if(t&1&&(a(0,"tr")(1,"td"),o(2),r(3,"translate"),i(),a(4,"td",5)(5,"span"),o(6),r(7,"number"),i()()()),t&2){let e=f(2);n(2),m(c(3,2,"labels.inputs.Balance Required for Interest Calculation")),n(4),m(c(7,4,e.recurringDepositsAccountData.minBalanceForInterestCalculation))}}function ul(t,s){if(t&1&&(a(0,"div",1)(1,"table")(2,"tbody")(3,"tr")(4,"td"),o(5),r(6,"translate"),i(),a(7,"td"),x(8,el,2,2,"span"),x(9,nl,3,3,"span"),i()(),a(10,"tr")(11,"td"),o(12),r(13,"translate"),i(),a(14,"td"),x(15,al,4,4,"span"),x(16,rl,4,4,"span"),i()(),a(17,"tr")(18,"td"),o(19),r(20,"translate"),i(),a(21,"td")(22,"span"),o(23),i()()(),x(24,cl,8,6,"tr"),a(25,"tr")(26,"td"),o(27),r(28,"translate"),i(),a(29,"td",5),x(30,pl,3,6,"span"),x(31,sl,3,6,"span"),i()(),a(32,"tr")(33,"td"),o(34),r(35,"translate"),i(),a(36,"td",5),o(37),r(38,"currency"),i()(),a(39,"tr")(40,"td"),o(41),r(42,"translate"),i(),a(43,"td",5),o(44),r(45,"currency"),i()(),x(46,ll,7,5,"tr"),x(47,ml,8,9,"tr"),x(48,dl,8,6,"tr"),i()()()),t&2){let e=f();n(5),m(c(6,20,"labels.inputs.External Id")),n(3),D(e.recurringDepositsAccountData.externalId?8:-1),n(),D(e.recurringDepositsAccountData.externalId?-1:9),n(3),m(c(13,22,"labels.inputs.Date of Deposit")),n(3),D(e.recurringDepositsAccountData.expectedFirstDepositOnDate?-1:15),n(),D(e.recurringDepositsAccountData.expectedFirstDepositOnDate?16:-1),n(3),m(c(20,24,"labels.inputs.Period")),n(4),A("",e.recurringDepositsAccountData.depositPeriod,"\xA0",e.recurringDepositsAccountData.depositPeriodFrequency.value),n(),D(e.recurringDepositsAccountData.maturityDate?24:-1),n(3),m(c(28,26,"labels.inputs.Total Deposits")),n(3),D(e.recurringDepositsAccountData.summary.totalDeposits?30:-1),n(),D(e.recurringDepositsAccountData.summary.totalDeposits?-1:31),n(3),m(c(35,28,"labels.inputs.Actual Available Balance")),n(3),u(" ",U(38,30,e.recurringDepositsAccountData.summary.accountBalance,e.currency.code,"symbol-narrow","1.2-2")," "),n(4),m(c(42,35,"labels.inputs.Recurring Deposit Amount")),n(3),u(" ",U(45,37,e.recurringDepositsAccountData.mandatoryRecommendedDepositAmount,e.currency.code,"symbol-narrow","1.2-2")," "),n(2),D(e.recurringDepositsAccountData.summary.totalInterestEarned?46:-1),n(),D(e.recurringDepositsAccountData.summary.totalWithdrawals?47:-1),n(),D(e.recurringDepositsAccountData.minBalanceForInterestCalculation?48:-1)}}function gl(t,s){if(t&1&&(a(0,"span"),o(1),r(2,"currency"),i()),t&2){let e=f(2);n(),m(U(2,1,e.recurringDepositsAccountData.depositAmount,e.currency.code,"symbol-narrow","1.2-2"))}}function Cl(t,s){if(t&1&&(a(0,"span"),o(1),r(2,"currency"),i()),t&2){let e=f(2);n(),m(U(2,1,0,e.currency.code,"symbol-narrow","1.2-2"))}}function _l(t,s){if(t&1&&(a(0,"tr")(1,"td"),o(2),r(3,"translate"),i(),a(4,"td",5)(5,"span"),o(6),r(7,"currency"),i()()()),t&2){let e=f(2);n(2),m(c(3,2,"labels.inputs.Maturity Amount")),n(4),m(U(7,4,e.recurringDepositsAccountData.maturityAmount,e.currency.code,"symbol-narrow","1.2-2"))}}function fl(t,s){if(t&1&&(a(0,"span"),o(1),r(2,"currency"),i()),t&2){let e=f(2);n(),m(U(2,1,e.recurringDepositsAccountData.summary.totalWithdrawals,e.currency.code,"symbol-narrow","1.2-2"))}}function hl(t,s){if(t&1&&(a(0,"span"),o(1),r(2,"currency"),i()),t&2){let e=f(2);n(),m(U(2,1,0,e.currency.code,"symbol-narrow","1.2-2"))}}function xl(t,s){if(t&1&&(a(0,"tr")(1,"td"),o(2),r(3,"translate"),i(),a(4,"td"),o(5),r(6,"dateFormat"),i()()),t&2){let e=f(2);n(2),m(c(3,2,"labels.inputs.Closed on Date")),n(3),u(" ",c(6,4,e.recurringDepositsAccountData.timeline.closedOnDate)," ")}}function Dl(t,s){if(t&1&&(a(0,"span"),o(1),r(2,"currency"),i()),t&2){let e=f(3);n(),m(U(2,1,e.recurringDepositsAccountData.summary.totalInterestPosted,e.currency.code,"symbol-narrow","1.2-2"))}}function bl(t,s){if(t&1&&(a(0,"span"),o(1),r(2,"currency"),i()),t&2){let e=f(3);n(),m(U(2,1,0,e.currency.code,"symbol-narrow","1.2-2"))}}function vl(t,s){if(t&1&&(a(0,"tr")(1,"td"),o(2),r(3,"translate"),i(),a(4,"td",5),x(5,Dl,3,6,"span"),x(6,bl,3,6,"span"),i()()),t&2){let e=f(2);n(2),m(c(3,3,"labels.inputs.Interests Posted")),n(3),D(e.recurringDepositsAccountData.summary.totalInterestPosted?5:-1),n(),D(e.recurringDepositsAccountData.summary.totalInterestPosted?-1:6)}}function Pl(t,s){if(t&1&&(a(0,"div",1)(1,"table")(2,"tbody")(3,"tr")(4,"td"),o(5),r(6,"translate"),i(),a(7,"td",5),x(8,gl,3,6,"span"),x(9,Cl,3,6,"span"),i()(),a(10,"tr")(11,"td"),o(12),r(13,"translate"),i(),a(14,"td",5)(15,"span"),o(16),r(17,"formatNumber"),i()()(),x(18,_l,8,9,"tr"),a(19,"tr")(20,"td"),o(21),r(22,"translate"),i(),a(23,"td",5),x(24,fl,3,6,"span"),x(25,hl,3,6,"span"),i()(),x(26,xl,7,6,"tr"),a(27,"tr")(28,"td"),o(29),r(30,"translate"),i(),a(31,"td"),o(32),r(33,"translateKey"),i()(),x(34,vl,7,5,"tr"),i()()()),t&2){let e=f();n(5),m(c(6,14,"labels.inputs.Principal Amount")),n(3),D(e.recurringDepositsAccountData.depositAmount?8:-1),n(),D(e.recurringDepositsAccountData.depositAmount?-1:9),n(3),m(c(13,16,"labels.inputs.Rate of Interest")),n(4),u("",c(17,18,e.recurringDepositsAccountData.nominalAnnualInterestRate)," %"),n(2),D(e.recurringDepositsAccountData.maturityDate?18:-1),n(3),m(c(22,20,"labels.inputs.Total Withdrawls")),n(3),D(e.recurringDepositsAccountData.summary.totalWithdrawals?24:-1),n(),D(e.recurringDepositsAccountData.summary.totalWithdrawals?-1:25),n(),D(e.recurringDepositsAccountData.timeline.closedOnDate?26:-1),n(3),m(c(30,22,"labels.inputs.Deposits Frequency")),n(3),A(" ",e.recurringDepositsAccountData.recurringFrequency,"\xA0",B(33,24,e.recurringDepositsAccountData.recurringFrequencyType.value,"catalogs")," "),n(2),D(e.recurringDepositsAccountData.summary.totalInterestEarned?34:-1)}}function Tl(t,s){if(t&1&&(a(0,"tr")(1,"td"),o(2),r(3,"translate"),i(),a(4,"td")(5,"span"),o(6),r(7,"translateKey"),i()()()),t&2){let e=f(2);n(2),m(c(3,3,"labels.inputs.Pre-closure penal Interest (less)")),n(4),A("",e.recurringDepositsAccountData.preClosurePenalInterest," % on ",B(7,5,e.recurringDepositsAccountData.preClosurePenalInterestOnType.value,"catalogs"))}}function Sl(t,s){if(t&1&&(a(0,"div",1)(1,"h4",2),o(2),r(3,"translate"),i(),a(4,"table")(5,"tbody")(6,"tr")(7,"td"),o(8),r(9,"translate"),i(),a(10,"td",5),o(11),r(12,"formatNumber"),i()(),a(13,"tr")(14,"td"),o(15),r(16,"translate"),i(),a(17,"td")(18,"span"),o(19),r(20,"translateKey"),i()()(),a(21,"tr")(22,"td"),o(23),r(24,"translate"),i(),a(25,"td")(26,"span"),o(27),r(28,"translateKey"),i()()(),a(29,"tr")(30,"td"),o(31),r(32,"translate"),i(),a(33,"td")(34,"span"),o(35),r(36,"translateKey"),i()()(),a(37,"tr")(38,"td"),o(39),r(40,"translate"),i(),a(41,"td")(42,"span"),o(43),r(44,"translateKey"),i()()(),x(45,Tl,8,8,"tr"),i()()()),t&2){let e=f();n(2),m(c(3,12,"labels.heading.Interest Details")),n(6),m(c(9,14,"labels.inputs.Interest Rate")),n(3),u("",c(12,16,e.recurringDepositsAccountData.nominalAnnualInterestRate)," %"),n(4),m(c(16,18,"labels.inputs.Interest Compounding Period")),n(4),m(B(20,20,e.recurringDepositsAccountData.interestCompoundingPeriodType.value,"catalogs")),n(4),m(c(24,23,"labels.inputs.Interest Posting Period")),n(4),m(B(28,25,e.recurringDepositsAccountData.interestPostingPeriodType.value,"catalogs")),n(4),m(c(32,28,"labels.inputs.Interest calculated using")),n(4),m(B(36,30,e.recurringDepositsAccountData.interestCalculationType.value,"catalogs")),n(4),m(c(40,33,"labels.inputs.Days in Year")),n(4),m(B(44,35,e.recurringDepositsAccountData.interestCalculationDaysInYearType.value,"catalogs")),n(2),D(e.recurringDepositsAccountData.preClosurePenalApplicable?45:-1)}}function Ml(t,s){if(t&1&&(a(0,"tr")(1,"td"),o(2),r(3,"translate"),i(),a(4,"td")(5,"span"),o(6),r(7,"translateKey"),i()()()),t&2){let e=f(2);n(2),m(c(3,3,"labels.inputs.Pre-closure penal Interest (less)")),n(4),A("",e.recurringDepositsAccountData.preClosurePenalInterest," % on ",B(7,5,e.recurringDepositsAccountData.preClosurePenalInterestOnType.value,"catalogs"))}}function Al(t,s){if(t&1&&(a(0,"tr")(1,"td"),o(2),r(3,"translate"),i(),a(4,"td")(5,"span"),o(6),i()()()),t&2){let e=f(2);n(2),m(c(3,2,"labels.inputs.Witdhold Tax Group")),n(4),m(e.recurringDepositsAccountData.taxGroup.name)}}function yl(t,s){if(t&1&&(a(0,"div",1)(1,"table")(2,"tbody")(3,"tr")(4,"td"),o(5),r(6,"translate"),i(),a(7,"td")(8,"span"),o(9),r(10,"translateKey"),i()()(),a(11,"tr")(12,"td"),o(13),r(14,"translate"),i(),a(15,"td")(16,"span"),o(17),r(18,"translateKey"),i()()(),a(19,"tr")(20,"td"),o(21),r(22,"translate"),i(),a(23,"td")(24,"span"),o(25),r(26,"translateKey"),i()()(),a(27,"tr")(28,"td"),o(29),r(30,"translate"),i(),a(31,"td")(32,"span"),o(33),r(34,"translateKey"),i()()(),x(35,Ml,8,8,"tr"),x(36,Al,7,4,"tr"),i()()()),t&2){let e=f();n(5),m(c(6,10,"labels.inputs.Interest Compounding Period")),n(4),m(B(10,12,e.recurringDepositsAccountData.interestCompoundingPeriodType.value,"catalogs")),n(4),m(c(14,15,"labels.inputs.Interest Posting Period")),n(4),m(B(18,17,e.recurringDepositsAccountData.interestPostingPeriodType.value,"catalogs")),n(4),m(c(22,20,"labels.inputs.Interest calculated using")),n(4),m(B(26,22,e.recurringDepositsAccountData.interestCalculationType.value,"catalogs")),n(4),m(c(30,25,"labels.inputs.Days in Year")),n(4),m(B(34,27,e.recurringDepositsAccountData.interestCalculationDaysInYearType.value,"catalogs")),n(2),D(e.recurringDepositsAccountData.preClosurePenalApplicable?35:-1),n(),D(e.recurringDepositsAccountData.witdHoldTax?36:-1)}}var vn=(()=>{class t{constructor(){this.route=_(N),this.router=_(W),this.isprematureAllowed=!1,this.route.parent.data.subscribe(e=>{this.recurringDepositsAccountData=e.recurringDepositsAccountData,this.currency=this.recurringDepositsAccountData.currency,this.isprematureAllowed=e.recurringDepositsAccountData.maturityDate!=null,this.router.url.includes("clients")?this.entityType="Client":this.router.url.includes("groups")?this.entityType="Group":this.router.url.includes("centers")&&(this.entityType="Center")})}static{this.\u0275fac=function(l){return new(l||t)}}static{this.\u0275cmp=O({type:t,selectors:[["mifosx-general-tab"]],decls:8,vars:6,consts:[[1,"recurring-deposits-account-tables","layout-row","gap-2percent"],[1,"flex-49"],[1,"table-headers"],[1,"m-r-5"],["completed","true",3,"externalId"],[1,"r-amount"]],template:function(l,p){l&1&&(a(0,"div",0),x(1,Ks,48,36,"div",1),x(2,tl,45,41,"div",1),x(3,ul,49,42,"div",1),x(4,Pl,35,27,"div",1),i(),a(5,"div",0),x(6,Sl,46,38,"div",1),x(7,yl,37,30,"div",1),i()),l&2&&(n(),D(!p.recurringDepositsAccountData.status.rejected&&!p.recurringDepositsAccountData.status.submittedAndPendingApproval?1:-1),n(),D(!p.recurringDepositsAccountData.status.rejected&&!p.recurringDepositsAccountData.status.submittedAndPendingApproval?2:-1),n(),D(p.recurringDepositsAccountData.status.rejected||p.recurringDepositsAccountData.status.submittedAndPendingApproval?3:-1),n(),D(p.recurringDepositsAccountData.status.rejected||p.recurringDepositsAccountData.status.submittedAndPendingApproval?4:-1),n(2),D(!p.recurringDepositsAccountData.status.rejected&&!p.recurringDepositsAccountData.status.submittedAndPendingApproval?6:-1),n(),D(p.recurringDepositsAccountData.status.rejected||p.recurringDepositsAccountData.status.submittedAndPendingApproval?7:-1))},dependencies:[I,R,ti,Ge,Se,It,w,Rt,Wt],styles:[".recurring-deposits-account-tables[_ngcontent-%COMP%]{padding:1%}"]})}}return t})();var Ol=[{path:"",data:{title:"Recurring Deposits",breadcrumb:"Recurring Deposits",routeParamBreadcrumb:!1},children:[{path:"create-recurring-deposits-account",data:{title:"Create Recurring Deposits Account",breadcrumb:"Create Recurring Deposits Account"},component:pn,resolve:{recurringDepositsAccountTemplate:yn}},{path:":recurringDepositAccountId",data:{title:"RecurringDeposit Account View",routeParamBreadcrumb:"recurringDepositAccountId"},children:[{path:"",component:en,resolve:{recurringDepositsAccountData:An,savingsDatatables:Sn},children:[{path:"",redirectTo:"general",pathMatch:"full"},{path:"general",component:vn,data:{title:"Recurring Deposit Account Details",breadcrumb:"General",routeParamBreadcrumb:!1}},{path:"interest-rate-chart",component:nn,data:{title:"Recurring Deposit Account Interest Rate Chart",breadcrumb:"Interest Rate Chart",routeParamBreadcrumb:!1}},{path:"transactions",component:an,data:{title:"Recurring Deposit Account Transactions",breadcrumb:"Transactions",routeParamBreadcrumb:!1}},{path:"charges",component:rn,data:{title:"Recurring Deposit Account Charges",breadcrumb:"Charges",routeParamBreadcrumb:!1}},{path:"standing-instructions-tab",component:on,data:{title:"Recurring Deposit Account Standing Instructions",breadcrumb:"Standing Instructions",routeParamBreadcrumb:!1}},{path:"datatables",children:[{path:":datatableName",component:cn,data:{title:"View Data Table",routeParamBreadcrumb:"datatableName"},resolve:{savingsDatatable:Tn}}]}]},{path:"edit-recurring-deposit-account",data:{title:"Edit Recurring Deposit Account",breadcrumb:"Edit",routeParamBreadcrumb:!1},component:bn,resolve:{recurringDepositsAccountAndTemplate:In}},{path:"transactions",data:{title:"Recurring Deposits Account Transactions",breadcrumb:"Transactions",routeParamBreadcrumb:!1},children:[{path:"",redirectTo:"../transactions",pathMatch:"prefix"},{path:":id",data:{routeParamBreadcrumb:"id"},children:[{path:"",component:xn,resolve:{recurringDepositsAccountTransaction:Rn}},{path:"edit",component:Dn,resolve:{recurringDepositsAccountTransactionTemplate:wn}}]}]},{path:"actions/:name",data:{title:"Recurring Deposits Account Actions",routeParamBreadcrumb:"name"},component:hn,resolve:{recurringDepositsAccountActionData:On}}]},{path:":recurringDepositAccountId/transfer-funds",loadChildren:()=>import("./account-transfers.module-EE4IYF6L.js").then(t=>t.AccountTransfersModule)}]},{path:"",data:{title:"All Recurring Deposits",breadcrumb:"Recurring Deposits",routeParamBreadcrumb:!1},children:[{path:":recurringDepositAccountId",data:{title:"RecurringDeposit Account View",routeParamBreadcrumb:"recurringDepositAccountId"},children:[{path:"standing-instructions",loadChildren:()=>import("./account-transfers.module-EE4IYF6L.js").then(t=>t.AccountTransfersModule)}]}]}],mi=(()=>{class t{static{this.\u0275fac=function(l){return new(l||t)}}static{this.\u0275mod=qe({type:t})}static{this.\u0275inj=Ne({providers:[li,An,Tn,Sn,yn,On,In,Rn,wn],imports:[Pn.forChild(Ol),Pn]})}}return t})();var xf=(()=>{class t{static{this.\u0275fac=function(l){return new(l||t)}}static{this.\u0275mod=qe({type:t})}static{this.\u0275inj=Ne({imports:[pi,ii,ai,mi,en,nn,an,on,rn,cn,pn,se,le,me,Fe,de,ke,hn,sn,ln,mn,dn,un,gn,Kt,bn,Cn,_n,fn,xn,Dn,vn]})}}return t})();export{xf as RecurringDepositsModule}; +import{a as Tn,b as Sn}from"./chunk-EH6HBK56.js";import{a as si}from"./chunk-JZVD6ANS.js";import{$d as ce,$f as ni,Ad as Kn,Bc as Vn,Bd as et,Bg as ci,Cc as qn,Cd as gt,Cf as Jn,Da as v,Db as Ge,Dc as Xt,Df as Xn,Ea as P,Eb as Se,Ec as Gn,Ef as Zn,Fb as I,Fc as Hn,Fd as ht,G as At,Ga as y,Gc as Un,Gd as nt,H as Ne,Hc as $n,Hd as Lt,Ia as T,Id as Ct,Ja as f,Jd as yt,Jg as Ee,K as _,Kg as pi,L as S,Lc as Ie,Ld as Ot,M,Mc as w,Na as Pt,Nd as oe,Oa as Tt,Ob as Jt,Od as xt,Pa as St,Pd as Dt,Qa as E,Qd as bt,Qe as Qn,Rb as Fn,Rc as X,Rd as He,Sc as $,Sd as It,T as Yt,Td as Rt,Ua as o,Ud as re,Uf as ti,Va as m,Wa as u,Wc as mt,Xa as A,Xc as q,Xd as _t,Ya as ae,Yc as Z,Zb as Me,Zc as ot,Ze as We,Zf as ei,_ as En,_b as Ae,_d as Ce,_e as Yn,_f as Wt,ac as ee,ad as tt,ag as Xe,bb as Mt,bc as ne,bf as Ke,bg as ii,ca as n,cc as ye,cd as rt,cf as Qe,da as Ve,dd as Re,de as Ue,df as Ye,eb as K,ed as zn,ef as Je,fb as ge,fd as ct,ff as Zt,fg as pe,ge as $e,gf as jt,hb as r,hc as N,he as ze,hf as wt,ib as c,ic as kn,id as pt,ie as Le,if as Et,ja as O,jb as B,jf as Bt,ka as qe,kc as W,lb as U,lc as Q,ld as dt,lf as Ft,mc as Nn,mf as kt,na as h,nc as Pn,ne as je,of as Nt,pa as De,pb as Bn,pd as st,pf as Vt,pg as ai,qb as be,qc as Oe,qg as Ze,ra as x,rc as V,rd as R,rf as qt,rg as we,sa as D,sb as ve,sd as Y,sf as Gt,ta as z,tb as Pe,td as Ln,ua as L,ud as jn,uf as Ht,ug as oi,va as j,vd as ut,wa as d,xa as a,xd as ft,xf as _e,ya as i,yd as Wn,za as C,zb as Te,zg as ri}from"./chunk-BQBWZIWL.js";import{a as F,b as J}from"./chunk-PHUH23IY.js";var k=(()=>{class t{constructor(){this.http=_(Fn)}getRecurringDepositsAccountData(e){let l=new Jt().set("associations","all");return this.http.get(`/recurringdepositaccounts/${e}`,{params:l})}getStandingInstructions(e,l,p,g,b){let G=new Jt().set("clientId",e).set("clientName",l).set("fromAccountId",p).set("fromAccountType","2").set("locale",g).set("dateFormat",b);return this.http.get("/standinginstructions",{params:G})}getRecurringDepositsAccountTemplate(e,l){let p=new Jt().set("clientId",e);return p=l?p.set("productId",l):p,this.http.get("/recurringdepositaccounts/template",{params:p})}createRecurringDepositAccount(e){return this.http.post("/recurringdepositaccounts",e)}executeRecurringDepositsAccountCommand(e,l,p){let g=new Jt().set("command",l);return l==="deposit"||l==="withdrawal"?this.http.post(`/recurringdepositaccounts/${e}/transactions`,p,{params:g}):this.http.post(`/recurringdepositaccounts/${e}`,p,{params:g})}deleteRecurringDepositsAccount(e){return this.http.delete(`/recurringdepositaccounts/${e}`)}getRecurringDepositsAccountAndTemplate(e){let l=new Jt().set("associations","charges").set("template","true");return this.http.get(`/recurringdepositaccounts/${e}`,{params:l})}updateRecurringDepositAccount(e,l){return this.http.put(`/recurringdepositaccounts/${e}`,l)}getRecurringDepositAccountActionResource(e,l){let p=new Jt().set("command",l);return this.http.get(`/recurringdepositaccounts/${e}/template`,{params:p})}getRecurringDepositAccountTransactionTemplateResource(e,l){let p=new Jt().set("command",l);return this.http.get(`/recurringdepositaccounts/${e}/transactions/template`,{params:p})}getRecurringDepositsAccountTransaction(e,l){return this.http.get(`/recurringdepositaccounts/${e}/transactions/${l}`)}getRecurringDepositsAccountTransactionTemplate(e,l){let p=new Jt().set("template","true");return this.http.get(`/recurringdepositaccounts/${e}/transactions/${l}`,{params:p})}executeRecurringDepositsAccountTransactionsCommand(e,l,p,g){let b=new Jt().set("command",l);return this.http.post(`/recurringdepositaccounts/${e}/transactions/${g}`,p,{params:b})}static{this.\u0275fac=function(l){return new(l||t)}}static{this.\u0275prov=At({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();var tn=class{constructor(s){this.setOptions(s),this.setButtons(s)}get singleButtons(){return this.buttonsArray}get options(){return this.optionArray}setButtons(s){switch(s){case"Active":this.buttonsArray=[{name:"Deposit",icon:"fa fa-arrow-up",taskPermissionName:"DEPOSIT_RECURRINGDEPOSITACCOUNT"},{name:"Withdrawal",icon:"fa fa-arrow-down",taskPermissionName:"WITHDRAWAL_RECURRINGDEPOSITACCOUNT"},{name:"Premature Close",icon:"fa fa-arrow-left",taskPermissionName:"PREMATURECLOSE_RECURRINGDEPOSITACCOUNT"},{name:"Calculate Interest",icon:"fa fa-calculator",taskPermissionName:"CALCULATEINTEREST_RECURRINGDEPOSITACCOUNT"},{name:"Undo Activation",icon:"fa fa-undo",taskPermissionName:"UNDO_ACTIVATE_RECURRINGDEPOSITACCOUNT"}];break;case"Submitted and pending approval":this.buttonsArray=[{name:"Modify Application",icon:"fa fa-edit",taskPermissionName:"UPDATE_RECURRINGDEPOSITACCOUNT"},{name:"Approve",icon:"fa fa-check",taskPermissionName:"APPROVE_RECURRINGDEPOSITACCOUNT"}];break;case"Approved":this.buttonsArray=[{name:"Undo Approval",icon:"fa fa-undo",taskPermissionName:"APPROVALUNDO_RECURRINGDEPOSITACCOUNT"},{name:"Activate",icon:"fa fa-check",taskPermissionName:"ACTIVATE_RECURRINGDEPOSITACCOUNT"}];break;case"Matured":this.buttonsArray=[{name:"Close",icon:"fa fa-arrow-right",taskPermissionName:"CLOSE_RECURRINGDEPOSITACCOUNT"},{name:"Calculate Interest",icon:"fa fa-calculator",taskPermissionName:"CALCULATEINTEREST_RECURRINGDEPOSITACCOUNT"},{name:"Post Interest",icon:"fa fa-money",taskPermissionName:"POSTINTEREST_RECURRINGDEPOSITACCOUNT"}];break;default:this.buttonsArray=[]}}setOptions(s){switch(s){case"Active":this.optionArray=[{name:"Post Interest",icon:"table",taskPermissionName:"POSTINTEREST_RECURRINGDEPOSITACCOUNT"},{name:"Add Charge",icon:"plus",taskPermissionName:"POSTINTEREST_RECURRINGDEPOSITACCOUNT"}];break;case"Submitted and pending approval":this.optionArray=[{name:"Reject",icon:"ban",taskPermissionName:"REJECT_RECURRINGDEPOSITACCOUNT"},{name:"Withdrawn by Client",icon:"arrow-down",taskPermissionName:"WITHDRAW_RECURRINGDEPOSITACCOUNT"},{name:"Add Charge",icon:"plus",taskPermissionName:"ADDCHARGE_RECURRINGDEPOSITACCOUNT"},{name:"Delete",icon:"trash",taskPermissionName:"DELETE_RECURRINGDEPOSITACCOUNT"}];break;case"Matured":this.optionArray=[{name:"Add Charge",icon:"plus",taskPermissionName:"ADDCHARGE_RECURRINGDEPOSITACCOUNT"}];break;case"Approved":default:this.optionArray=[]}}addOption(s){this.optionArray.push(s)}addButton(s){this.buttonsArray.push(s)}};var di=()=>({confirm:!0}),Kt=(()=>{class t{constructor(){this.dialogRef=_(Vn),this.data=_(qn)}static{this.\u0275fac=function(l){return new(l||t)}}static{this.\u0275cmp=O({type:t,selectors:[["mifosx-recurring-deposit-confirmation-action"]],decls:12,vars:10,consts:[["mat-dialog-title",""],["mat-dialog-content",""],["align","end"],["mat-raised-button","","mat-dialog-close",""],["mat-raised-button","","color","warn",3,"mat-dialog-close"]],template:function(l,p){l&1&&(a(0,"h1",0),o(1),i(),a(2,"div",1)(3,"p"),o(4),i()(),a(5,"mat-dialog-actions",2)(6,"button",3),o(7),r(8,"translate"),i(),a(9,"button",4),o(10),r(11,"translate"),i()()),l&2&&(n(),m(p.data.heading),n(3),m(p.data.dialogContext),n(3),m(c(8,5,"labels.buttons.Cancel")),n(2),d("mat-dialog-close",K(9,di)),n(),u(" ",c(11,7,"labels.buttons.Confirm")," "))},dependencies:[I,R,V,Hn,Un,$n,Gn,w],encapsulation:2})}}return t})();var ui=()=>["./general"],gi=()=>["./interest-rate-chart"],Ci=()=>["./charges"],_i=()=>["./transactions"],fi=()=>["./standing-instructions-tab"],hi=t=>["./datatables",t];function xi(t,s){if(t&1&&(a(0,"span",20),C(1,"mifosx-account-number",18),i()),t&2){let e=f();n(),d("accountNo",Mt(e.recurringDepositsAccountData.clientAccountNo))}}function Di(t,s){if(t&1&&(a(0,"div",21)(1,"h3"),o(2),r(3,"translate"),i(),a(4,"table",19)(5,"tbody")(6,"tr")(7,"td"),o(8),r(9,"translate"),i(),a(10,"td",30),o(11),r(12,"currency"),i()(),a(13,"tr")(14,"td"),o(15),r(16,"translate"),i(),a(17,"td",30),o(18),r(19,"currency"),i()(),a(20,"tr")(21,"td"),o(22),r(23,"translate"),i(),a(24,"td",30),o(25),r(26,"number"),i()()()()()),t&2){let e=f();n(2),m(c(3,7,"labels.heading.Account Overview")),n(6),m(c(9,9,"labels.inputs.Current Balance")),n(3),u(" ",U(12,11,e.recurringDepositsAccountData.summary.accountBalance,e.currency.code,"symbol-narrow","1.2-2")," "),n(4),m(c(16,16,"labels.inputs.Deposit Amount")),n(3),u(" ",U(19,18,e.recurringDepositsAccountData.depositAmount,e.currency.code,"symbol-narrow","1.2-2")," "),n(4),m(c(23,23,"labels.inputs.Deposit Period")),n(3),m(c(26,25,e.recurringDepositsAccountData.depositPeriod))}}function bi(t,s){if(t&1){let e=y();a(0,"button",32),T("click",function(){S(e);let p=f().$implicit,g=f();return M(g.doAction(p.name))}),C(1,"i",33),o(2),r(3,"translate"),i()}if(t&2){let e=f().$implicit;n(),d("ngClass",Mt(e.icon)),n(),u(" ",c(3,3,"labels.menus."+e.name)," ")}}function vi(t,s){if(t&1&&h(0,bi,4,5,"button",31),t&2){let e=s.$implicit;d("mifosxHasPermission",e.taskPermissionName)}}function Pi(t,s){if(t&1){let e=y();a(0,"button",32),T("click",function(){S(e);let p=f().$implicit,g=f(2);return M(g.doAction(p.name))}),o(1),r(2,"translate"),i()}if(t&2){let e=f().$implicit;n(),u(" ",c(2,1,"labels.menus."+e.name)," ")}}function Ti(t,s){if(t&1&&(a(0,"span"),h(1,Pi,3,3,"button",31),i()),t&2){let e=s.$implicit;n(),d("mifosxHasPermission",e.taskPermissionName)}}function Si(t,s){if(t&1&&(a(0,"button",34),o(1),r(2,"translate"),i(),a(3,"mat-menu",null,5),L(5,Ti,2,1,"span",null,z),i()),t&2){let e=E(4),l=f();d("matMenuTriggerFor",e),n(),m(c(2,2,"labels.menus.More")),n(4),j(l.buttonConfig.options)}}function Mi(t,s){if(t&1&&(a(0,"a",29,6),o(2),r(3,"translate"),i()),t&2){let e=E(1);d("routerLink",K(5,_i))("active",e.isActive),n(2),u(" ",c(3,3,"labels.inputs.Transactions")," ")}}function Ai(t,s){if(t&1&&(a(0,"a",29,7),o(2),r(3,"translate"),i()),t&2){let e=E(1);d("routerLink",K(5,fi))("active",e.isActive),n(2),u(" ",c(3,3,"labels.inputs.Standing Instructions")," ")}}function yi(t,s){if(t&1&&(a(0,"a",29,8),o(2),i()),t&2){let e=E(1),l=f().$implicit;d("routerLink",ge(3,hi,l.registeredTableName))("active",e.isActive),n(2),u(" ",l.registeredTableName," ")}}function Oi(t,s){if(t&1&&h(0,yi,3,5,"a",35),t&2){let e=s.$implicit;d("mifosxHasPermission","READ_"+e.registeredTableName)}}var en=(()=>{class t{constructor(){this.route=_(N),this.router=_(W),this.recurringDepositsService=_(k),this.savingsService=_(pe),this.dialog=_(Xt),this.translateService=_(Ie),this.showTransactions=!1,this.route.data.subscribe(e=>{this.recurringDepositsAccountData=e.recurringDepositsAccountData,this.charges=this.recurringDepositsAccountData.charges,this.savingsDatatables=e.savingsDatatables,this.currency=this.recurringDepositsAccountData.currency,this.isprematureAllowed=e.recurringDepositsAccountData.maturityDate!=null,this.router.url.includes("clients")?this.entityType="Client":this.router.url.includes("groups")?this.entityType="Group":this.router.url.includes("centers")&&(this.entityType="Center");let l=e.recurringDepositsAccountData.status;this.showTransactions=l.id>=300})}ngOnInit(){this.setConditionalButtons()}setConditionalButtons(){let e=this.recurringDepositsAccountData.status.value;this.buttonConfig=new tn(e),this.recurringDepositsAccountData.clientId&&this.recurringDepositsAccountData.status.value==="Matured"&&this.buttonConfig.addOption({name:"Transfer Funds",taskPermissionName:"CREATE_ACCOUNTTRANSFER"}),this.recurringDepositsAccountData.charges&&this.recurringDepositsAccountData.status.value==="Matured"&&this.charges.forEach(l=>{l.name==="Annual fee - INR"&&this.buttonConfig.addOption({name:"Apply Annual Fees",taskPermissionName:"APPLYANNUALFEE_SAVINGSACCOUNT"})}),this.recurringDepositsAccountData.clientId&&this.recurringDepositsAccountData.status.value==="Active"&&(this.recurringDepositsAccountData.allowWithdrawal===!0&&this.buttonConfig.addOption({name:"Withdrawal",taskPermissionName:"WITHDRAW_RECURRINGDEPOSITACCOUNT"}),this.recurringDepositsAccountData.charges&&this.charges.forEach(l=>{l.name==="Annual fee - INR"&&this.buttonConfig.addOption({name:"Apply Annual Fees",taskPermissionName:"APPLYANNUALFEE_SAVINGSACCOUNT"})}),this.isprematureAllowed||this.buttonConfig.addButton({name:"Close",icon:"arrow-right",taskPermissionName:"CLOSE_RECURRINGDEPOSITACCOUNT"}),this.recurringDepositsAccountData.taxGroup&&(this.recurringDepositsAccountData.withHoldTax?this.buttonConfig.addOption({name:"Disable Withhold Tax",taskPermissionName:"UPDATEWITHHOLDTAX_SAVINGSACCOUNT"}):this.buttonConfig.addOption({name:"Enable Withhold Tax",taskPermissionName:"UPDATEWITHHOLDTAX_SAVINGSACCOUNT"})))}reload(){let e=this.recurringDepositsAccountData.clientId,l=this.router.url;this.router.navigateByUrl(`/clients/${e}/recurring-deposits-accounts`,{skipLocationChange:!0}).then(()=>this.router.navigate([l]))}doAction(e){switch(e){case"Activate":case"Undo Activation":case"Approve":case"Reject":case"Undo Approval":case"Add Charge":case"Withdrawn by Client":case"Premature Close":case"Close":case"Deposit":case"Withdrawal":this.router.navigate([`actions/${e}`],{relativeTo:this.route});break;case"Modify Application":this.router.navigate(["edit-recurring-deposit-account"],{relativeTo:this.route});break;case"Delete":this.deleteRecurringDepositsAccount();break;case"Calculate Interest":this.calculateInterest();break;case"Post Interest":this.postInterest();break;case"Enable Withhold Tax":this.enableWithHoldTax();break;case"Disable Withhold Tax":this.disableWithHoldTax();break}}deleteRecurringDepositsAccount(){this.dialog.open(ce,{data:{deleteContext:`Recurring deposit account with id: ${this.recurringDepositsAccountData.id}`}}).afterClosed().subscribe(l=>{l.delete&&this.recurringDepositsService.deleteRecurringDepositsAccount(this.recurringDepositsAccountData.id).subscribe(()=>{this.router.navigate(["../../"],{relativeTo:this.route})})})}calculateInterest(){this.dialog.open(Kt,{data:{heading:this.translateService.instant("labels.heading.Calculate Interest"),dialogContext:this.translateService.instant("labels.dialogContext.Are you sure you want to calculate interest ?")}}).afterClosed().subscribe(l=>{l.confirm&&this.recurringDepositsService.executeRecurringDepositsAccountCommand(this.recurringDepositsAccountData.id,"calculateInterest",{}).subscribe(()=>{this.reload()})})}postInterest(){this.dialog.open(Kt,{data:{heading:this.translateService.instant("labels.heading.Post Interest"),dialogContext:this.translateService.instant("labels.text.Are you sure you want to post interest")+" ?"}}).afterClosed().subscribe(l=>{l.confirm&&this.recurringDepositsService.executeRecurringDepositsAccountCommand(this.recurringDepositsAccountData.id,"postInterest",{}).subscribe(()=>{this.reload()})})}enableWithHoldTax(){this.dialog.open(Kt,{data:{heading:this.translateService.instant("labels.heading.Enable Withhold Tax"),dialogContext:this.translateService.instant("labels.dialogContext.Enable withhold tax for this account ?")}}).afterClosed().subscribe(l=>{l.confirm&&this.savingsService.executeSavingsAccountUpdateCommand(this.recurringDepositsAccountData.id,"updateWithHoldTax",{withHoldTax:!0}).subscribe(()=>{this.reload()})})}disableWithHoldTax(){this.dialog.open(Kt,{data:{heading:this.translateService.instant("labels.heading.Disable Withhold Tax"),dialogContext:this.translateService.instant("labels.dialogContext.Disable withhold tax for this account ?")}}).afterClosed().subscribe(l=>{l.confirm&&this.savingsService.executeSavingsAccountUpdateCommand(this.recurringDepositsAccountData.id,"updateWithHoldTax",{withHoldTax:!1}).subscribe(()=>{this.reload()})})}static{this.\u0275fac=function(l){return new(l||t)}}static{this.\u0275cmp=O({type:t,selectors:[["mifosx-recurring-deposits-account-view"]],decls:53,vars:47,consts:[["accountMenu","matMenu"],["general","routerLinkActive"],["IRC","routerLinkActive"],["charges","routerLinkActive"],["tabPanel",""],["More","matMenu"],["transactions","routerLinkActive"],["standingInstructions","routerLinkActive"],["datatable","routerLinkActive"],[1,"account-card"],[1,"header","layout-column"],[1,"header-title-group"],[1,"profile-image-container"],["mat-card-md-image","",1,"profile-image",3,"matTooltip","src"],[1,"mat-typography","account-card-title"],[1,"layout-row","responsive-column"],[1,"flex-60"],[1,"fa","fa-stop",3,"ngClass","matTooltip"],[3,"accountNo"],[1,"account-overview"],[1,"m-l-10"],[1,"flex-30"],[1,"flex-5"],["mat-icon-button","","aria-label","Loan account actions","yPosition","below",3,"matMenuTriggerFor"],["matListIcon","",1,"actions-menu"],["icon","bars","size","sm"],["mat-menu-item",""],[1,"content"],["mat-tab-nav-bar","",1,"navigation-tabs",3,"tabPanel"],["mat-tab-link","","routerLinkActive","",3,"routerLink","active"],[1,"r-amount"],["mat-menu-item","",3,"click",4,"mifosxHasPermission"],["mat-menu-item","",3,"click"],[3,"ngClass"],["mat-menu-item","",3,"matMenuTriggerFor"],["mat-tab-link","","routerLinkActive","",3,"routerLink","active",4,"mifosxHasPermission"]],template:function(l,p){if(l&1&&(a(0,"mat-card",9)(1,"mat-card-header",10)(2,"mat-card-title-group",11)(3,"div",12)(4,"div"),C(5,"img",13),r(6,"translate"),i()(),a(7,"div",14)(8,"mat-card-title")(9,"div",15)(10,"div",16)(11,"h3"),C(12,"i",17),r(13,"statusLookup"),o(14),r(15,"translate"),C(16,"mifosx-account-number",18),i(),a(17,"span",19),o(18),r(19,"translate"),r(20,"translate"),x(21,xi,2,2,"span",20),i()(),x(22,Di,27,27,"div",21),a(23,"div",22)(24,"button",23)(25,"mat-icon",24),C(26,"fa-icon",25),i()()()()()(),a(27,"mat-menu",null,0),L(29,vi,1,1,"button",26,z),x(31,Si,7,4),i()()(),a(32,"mat-card-content",27)(33,"nav",28)(34,"a",29,1),o(36),r(37,"translate"),i(),a(38,"a",29,2),o(40),r(41,"translate"),i(),x(42,Mi,4,6,"a",29),a(43,"a",29,3),o(45),r(46,"translate"),i(),x(47,Ai,4,6,"a",29),L(48,Oi,1,1,"a",29,z),i(),a(50,"mat-tab-nav-panel",null,4),C(52,"router-outlet"),i()()()),l&2){let g=E(28),b=E(35),G=E(39),ue=E(44),ie=E(51);n(5),d("matTooltip",Mt(c(6,28,"tooltips.Recurring Deposits Account")))("src","assets/images/recurring-deposits_account_placeholder.png",En),n(7),d("ngClass",c(13,30,p.recurringDepositsAccountData.status.code))("matTooltip",p.recurringDepositsAccountData.status.value),n(2),A(" ",c(15,32,"labels.inputs.Recurring Deposit")," : ",p.recurringDepositsAccountData.depositProductName," "),n(2),d("accountNo",Mt(p.recurringDepositsAccountData.accountNo)),n(2),ae(" ",c(19,34,"labels.text."+p.entityType)," ",c(20,36,"labels.inputs.name"),": ",p.recurringDepositsAccountData.clientName||p.recurringDepositsAccountData.groupName," "),n(3),D(p.recurringDepositsAccountData.clientAccountNo?21:-1),n(),D(!p.recurringDepositsAccountData.status.rejected&&!p.recurringDepositsAccountData.status.submittedAndPendingApproval?22:-1),n(2),d("matMenuTriggerFor",g),n(5),j(p.buttonConfig.singleButtons),n(2),D(p.buttonConfig.options.length?31:-1),n(2),d("tabPanel",ie),n(),d("routerLink",K(44,ui))("active",b.isActive),n(2),u(" ",c(37,38,"labels.inputs.General")," "),n(2),d("routerLink",K(45,gi))("active",G.isActive),n(2),u(" ",c(41,40,"labels.inputs.Interest Rate Chart")," "),n(2),D(p.showTransactions?42:-1),n(),d("routerLink",K(46,Ci))("active",ue.isActive),n(2),u(" ",c(46,42,"labels.inputs.Charges")," "),n(2),D(p.recurringDepositsAccountData.clientId?47:-1),n(),j(p.savingsDatatables)}},dependencies:[I,be,R,Q,Y,ut,re,Wn,jn,Kn,oe,Ln,ri,Oe,Le,je,_t,ze,$e,Jn,Xn,Nn,Zn,kn,Ge,Se,w,ni],encapsulation:2})}}return t})();function Ii(t,s){t&1&&(a(0,"th",17),o(1),r(2,"translate"),i()),t&2&&(n(),m(c(2,1,"labels.inputs.Period")))}function Ri(t,s){if(t&1&&(a(0,"td",18),o(1),r(2,"translateKey"),i()),t&2){let e=s.$implicit;n(),ae(" ",e.fromPeriod," - ",e.toPeriod,"\xA0",B(2,3,e.periodType.value,"catalogs")," ")}}function wi(t,s){t&1&&(a(0,"th",17),o(1),r(2,"translate"),i()),t&2&&(n(),m(c(2,1,"labels.inputs.Amount Range")))}function Ei(t,s){if(t&1&&(a(0,"td",18),o(1),r(2,"formatNumber"),r(3,"formatNumber"),i()),t&2){let e=s.$implicit;n(),A(" ",c(2,2,e.amountRangeFrom)," - ",c(3,4,e.amountRangeTo)," ")}}function Bi(t,s){t&1&&(a(0,"th",17),o(1),r(2,"translate"),i()),t&2&&(n(),m(c(2,1,"labels.inputs.Interest")))}function Fi(t,s){if(t&1&&(a(0,"td",18),o(1),r(2,"formatNumber"),i()),t&2){let e=s.$implicit;n(),u("",c(2,1,e.annualInterestRate)," %")}}function ki(t,s){t&1&&(a(0,"th",17),o(1),r(2,"translate"),i()),t&2&&(n(),m(c(2,1,"labels.inputs.Description")))}function Ni(t,s){if(t&1&&(a(0,"td",18),o(1),i()),t&2){let e=s.$implicit;n(),m(e.description)}}function Vi(t,s){t&1&&(a(0,"th",17),o(1),r(2,"translate"),i()),t&2&&(n(),m(c(2,1,"labels.inputs.Actions")))}function qi(t,s){t&1&&(a(0,"span"),C(1,"fa-icon",21),o(2),r(3,"translate"),i()),t&2&&(n(2),u(" ",c(3,1,"labels.buttons.View Incentives")," "))}function Gi(t,s){t&1&&(a(0,"span"),C(1,"fa-icon",22),o(2),r(3,"translate"),i()),t&2&&(n(2),u(" ",c(3,1,"labels.buttons.Hide Incentives")," "))}function Hi(t,s){if(t&1){let e=y();a(0,"td",18)(1,"button",19),T("click",function(){let p=S(e).dataIndex,g=f();return M(g.expandChartSlabIndex=g.expandChartSlabIndex===p?null:p)}),h(2,qi,4,3,"span",20)(3,Gi,4,3,"span",20),i()()}if(t&2){let e=s.dataIndex,l=f();n(2),d("ngIf",l.expandChartSlabIndex!==e),n(),d("ngIf",l.expandChartSlabIndex===e)}}function Ui(t,s){t&1&&(a(0,"th",17),o(1),r(2,"translate"),i()),t&2&&(n(),m(c(2,1,"labels.inputs.Entity Type")))}function $i(t,s){if(t&1&&(a(0,"td",18),o(1),i()),t&2){let e=s.$implicit;n(),u(" ",e.entityType.value," ")}}function zi(t,s){t&1&&(a(0,"th",17),o(1),r(2,"translate"),i()),t&2&&(n(),m(c(2,1,"labels.inputs.Attribute Name")))}function Li(t,s){if(t&1&&(a(0,"td",18),o(1),i()),t&2){let e=s.$implicit;n(),u(" ",e.attributeName.value," ")}}function ji(t,s){t&1&&(a(0,"th",17),o(1),r(2,"translate"),i()),t&2&&(n(),m(c(2,1,"labels.inputs.Condition Type")))}function Wi(t,s){if(t&1&&(a(0,"td",18),o(1),r(2,"titlecase"),i()),t&2){let e=s.$implicit;n(),u(" ",c(2,1,e.conditionType.value)," ")}}function Ki(t,s){t&1&&(a(0,"th",17),o(1),r(2,"translate"),i()),t&2&&(n(),m(c(2,1,"labels.inputs.Attribute Value")))}function Qi(t,s){if(t&1&&(a(0,"td",35),o(1),i()),t&2){let e=s.$implicit;d("ngSwitch",e.attributeName),n(),u(" ",e.attributeValueDesc," ")}}function Yi(t,s){t&1&&(a(0,"th",17),o(1),r(2,"translate"),i()),t&2&&(n(),m(c(2,1,"labels.inputs.Incentive Type")))}function Ji(t,s){if(t&1&&(a(0,"td",18),o(1),i()),t&2){let e=s.$implicit;n(),u(" ",e.incentiveType.value," ")}}function Xi(t,s){t&1&&(a(0,"th",17),o(1),r(2,"translate"),i()),t&2&&(n(),m(c(2,1,"labels.inputs.Interest")))}function Zi(t,s){if(t&1&&(a(0,"td",18),o(1),r(2,"formatNumber"),i()),t&2){let e=s.$implicit;n(),u(" ",c(2,1,e.amount)," ")}}function ta(t,s){t&1&&C(0,"tr",36)}function ea(t,s){t&1&&C(0,"tr",37)}function na(t,s){if(t&1&&(a(0,"table",27),v(1,28),h(2,Ui,3,3,"th",7)(3,$i,2,1,"td",8),P(),v(4,29),h(5,zi,3,3,"th",7)(6,Li,2,1,"td",8),P(),v(7,30),h(8,ji,3,3,"th",7)(9,Wi,3,3,"td",8),P(),v(10,31),h(11,Ki,3,3,"th",7)(12,Qi,2,2,"td",32),P(),v(13,33),h(14,Yi,3,3,"th",7)(15,Ji,2,1,"td",8),P(),v(16,34),h(17,Xi,3,3,"th",7)(18,Zi,3,3,"td",8),P(),h(19,ta,1,0,"tr",14)(20,ea,1,0,"tr",15),i()),t&2){let e=f().$implicit,l=f();d("dataSource",e.incentives),n(19),d("matHeaderRowDef",l.incentivesDisplayedColumns),n(),d("matRowDefColumns",l.incentivesDisplayedColumns)}}function ia(t,s){if(t&1&&(a(0,"td",18)(1,"div",23)(2,"mat-card",24)(3,"h4",25),o(4),r(5,"translate"),i(),h(6,na,21,3,"table",26),i()()()),t&2){let e=s.$implicit,l=s.dataIndex,p=f();De("colspan",p.chartSlabsDisplayedColumns.length),n(),d("@expandChartSlab",l===p.expandChartSlabIndex?"expanded":"collapsed"),n(3),u(" ",c(5,4,"labels.heading.Incentives")," "),n(2),d("ngIf",e.incentives==null?null:e.incentives.length)}}function aa(t,s){t&1&&C(0,"tr",36)}function oa(t,s){t&1&&C(0,"tr",37)}function ra(t,s){t&1&&C(0,"tr",38)}var nn=(()=>{class t{constructor(){this.route=_(N),this.interestRateChartData=[],this.chartSlabsDisplayedColumns=["period","amountRange","interest","description","actions"],this.incentivesDisplayedColumns=["entityType","attributeName","conditionType","attributeValue","incentiveType","amount"],this.chartSlabsIncentivesDisplayedColumns=["incentives"],this.route.parent.data.subscribe(e=>{this.interestRateChartData=e.recurringDepositsAccountData.accountChart.chartSlabs})}static{this.\u0275fac=function(l){return new(l||t)}}static{this.\u0275cmp=O({type:t,selectors:[["mifosx-interest-rate-chart-tab"]],decls:29,vars:7,consts:[["chartsTable",""],[1,"tab-container","mat-typography"],[1,"align-start"],[1,"m-b-20"],[1,"mat-elevation-z1","m-b-25"],["mat-table","","multiTemplateDataRows","",3,"dataSource"],["matColumnDef","period"],["mat-header-cell","",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","amountRange"],["matColumnDef","interest"],["matColumnDef","description"],["matColumnDef","actions"],["matColumnDef","incentives"],["mat-header-row","",4,"matHeaderRowDef"],["mat-row","",4,"matRowDef","matRowDefColumns"],["mat-row","","class","incentives-row",4,"matRowDef","matRowDefColumns"],["mat-header-cell",""],["mat-cell",""],["mat-button","","color","primary",3,"click"],[4,"ngIf"],["icon","eye",1,"m-r-10"],["icon","eye-slash",1,"m-r-10"],[1,"layout-row-wrap","flex-fill","incentives"],[1,"layout-row-wrap","flex-fill"],[1,"m-b-10","flex-13"],["class","flex-fill mat-elevation-z1","mat-table","",3,"dataSource",4,"ngIf"],["mat-table","",1,"flex-fill","mat-elevation-z1",3,"dataSource"],["matColumnDef","entityType"],["matColumnDef","attributeName"],["matColumnDef","conditionType"],["matColumnDef","attributeValue"],["mat-cell","",3,"ngSwitch",4,"matCellDef"],["matColumnDef","incentiveType"],["matColumnDef","amount"],["mat-cell","",3,"ngSwitch"],["mat-header-row",""],["mat-row",""],["mat-row","",1,"incentives-row"]],template:function(l,p){l&1&&(a(0,"div",1)(1,"div",2)(2,"div",3)(3,"h3"),o(4),r(5,"translate"),i()()(),a(6,"div",4)(7,"table",5,0),v(9,6),h(10,Ii,3,3,"th",7)(11,Ri,3,6,"td",8),P(),v(12,9),h(13,wi,3,3,"th",7)(14,Ei,4,6,"td",8),P(),v(15,10),h(16,Bi,3,3,"th",7)(17,Fi,3,3,"td",8),P(),v(18,11),h(19,ki,3,3,"th",7)(20,Ni,2,1,"td",8),P(),v(21,12),h(22,Vi,3,3,"th",7)(23,Hi,4,2,"td",8),P(),v(24,13),h(25,ia,7,6,"td",8),P(),h(26,aa,1,0,"tr",14)(27,oa,1,0,"tr",15)(28,ra,1,0,"tr",16),i()()()),l&2&&(n(4),m(c(5,5,"labels.heading.All Interest Rates")),n(3),d("dataSource",p.interestRateChartData),n(19),d("matHeaderRowDef",p.chartSlabsDisplayedColumns),n(),d("matRowDefColumns",p.chartSlabsDisplayedColumns),n(),d("matRowDefColumns",p.chartSlabsIncentivesDisplayedColumns))},dependencies:[I,ve,Pe,R,Y,V,wt,Ft,Bt,kt,Et,Nt,_t,Vt,Gt,qt,Ht,Te,w,Rt,Wt],styles:[".tab-container[_ngcontent-%COMP%]{padding:1%;margin:1%}.tab-container[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{margin:1% auto}.tab-container[_ngcontent-%COMP%] table[_ngcontent-%COMP%]{width:100%}.tab-container[_ngcontent-%COMP%] table[_ngcontent-%COMP%] tr.incentives-row[_ngcontent-%COMP%]{height:0}.tab-container[_ngcontent-%COMP%] table[_ngcontent-%COMP%] tr.incentives-row[_ngcontent-%COMP%] > td[_ngcontent-%COMP%]{padding:0}.tab-container[_ngcontent-%COMP%] table[_ngcontent-%COMP%] tr.incentives-row[_ngcontent-%COMP%] .incentives[_ngcontent-%COMP%]{overflow:hidden}.tab-container[_ngcontent-%COMP%] table[_ngcontent-%COMP%] tr.incentives-row[_ngcontent-%COMP%] .mat-card[_ngcontent-%COMP%]{border-radius:0}"],data:{animation:[Me("expandChartSlab",[ne("collapsed",ee({height:"0px",minHeight:"0"})),ne("expanded",ee({height:"*"})),ye("expanded <=> collapsed",Ae("225ms cubic-bezier(0.4, 0.0, 0.2, 1)"))])]}})}}return t})();var pa=t=>["/","journal-entry","view",t];function sa(t,s){if(t&1){let e=y();a(0,"div",5)(1,"mat-checkbox",23),T("click",function(){S(e);let p=f();return M(p.hideReversed())}),o(2),r(3,"translate"),i(),a(4,"mat-checkbox",23),T("click",function(){S(e);let p=f();return M(p.hideAccruals())}),o(5),r(6,"translate"),i()()}if(t&2){let e=f();n(),d("formControl",e.hideReversedParam),n(),u(" ",c(3,4,"labels.inputs.Hide Reversed")),n(2),d("formControl",e.hideAccrualsParam),n(),u(" ",c(6,6,"labels.inputs.Hide Accruals"))}}function la(t,s){t&1&&(a(0,"th",24),o(1,"#"),i())}function ma(t,s){if(t&1){let e=y();a(0,"td",25),T("click",function(){let p=S(e).$implicit,g=f();return M(g.showTransactions(p))}),o(1),i()}if(t&2){let e=s.index;n(),u(" ",e+1," ")}}function da(t,s){t&1&&(a(0,"th",24),o(1),r(2,"translate"),i()),t&2&&(n(),m(c(2,1,"labels.inputs.ID")))}function ua(t,s){if(t&1){let e=y();a(0,"td",26),T("click",function(){let p=S(e).$implicit,g=f();return M(g.showTransactions(p))}),o(1),i()}if(t&2){let e=s.$implicit,l=f();d("ngClass",l.savingsTransactionColor(e)),n(),u(" ",e.id," ")}}function ga(t,s){t&1&&(a(0,"th",24),o(1),r(2,"translate"),i()),t&2&&(n(),m(c(2,1,"labels.inputs.Transaction Date")))}function Ca(t,s){if(t&1){let e=y();a(0,"td",26),T("click",function(){let p=S(e).$implicit,g=f();return M(g.showTransactions(p))}),o(1),r(2,"dateFormat"),i()}if(t&2){let e=s.$implicit,l=f();d("ngClass",l.savingsTransactionColor(e)),n(),u(" ",c(2,2,e.date)," ")}}function _a(t,s){t&1&&(a(0,"th",24),o(1),r(2,"translate"),i()),t&2&&(n(),m(c(2,1,"labels.inputs.Transaction Type")))}function fa(t,s){if(t&1){let e=y();a(0,"td",26),T("click",function(){let p=S(e).$implicit,g=f();return M(g.showTransactions(p))}),o(1),i()}if(t&2){let e=s.$implicit,l=f();d("ngClass",l.savingsTransactionColor(e)),n(),u(" ",e.transactionType.value," ")}}function ha(t,s){t&1&&(a(0,"th",27),o(1),r(2,"translate"),i()),t&2&&(n(),m(c(2,1,"labels.inputs.Debit")))}function xa(t,s){if(t&1){let e=y();a(0,"td",28),T("click",function(){let p=S(e).$implicit,g=f();return M(g.showTransactions(p))}),o(1),i()}if(t&2){let e=s.$implicit,l=f();d("ngClass",l.savingsTransactionColor(e)),n(),u(" ",l.isDebit(e.transactionType)?e.amount:"N/A"," ")}}function Da(t,s){t&1&&(a(0,"th",27),o(1),r(2,"translate"),i()),t&2&&(n(),m(c(2,1,"labels.inputs.Credit")))}function ba(t,s){if(t&1){let e=y();a(0,"td",28),T("click",function(){let p=S(e).$implicit,g=f();return M(g.showTransactions(p))}),o(1),i()}if(t&2){let e=s.$implicit,l=f();d("ngClass",l.savingsTransactionColor(e)),n(),u(" ",l.isDebit(e.transactionType)?"N/A":e.amount," ")}}function va(t,s){t&1&&(a(0,"th",27),o(1),r(2,"translate"),i()),t&2&&(n(),m(c(2,1,"labels.inputs.Balance")))}function Pa(t,s){if(t&1){let e=y();a(0,"td",28),T("click",function(){let p=S(e).$implicit,g=f();return M(g.showTransactions(p))}),o(1),r(2,"formatNumber"),i()}if(t&2){let e=s.$implicit,l=f();d("ngClass",l.savingsTransactionColor(e)),n(),u(" ",c(2,2,e.runningBalance)," ")}}function Ta(t,s){t&1&&(a(0,"th",24),o(1),r(2,"translate"),i()),t&2&&(n(),m(c(2,1,"labels.inputs.Actions")))}function Sa(t,s){if(t&1){let e=y();a(0,"td",29)(1,"button",30)(2,"mat-icon"),o(3,"more_vert"),i()(),a(4,"mat-menu",null,0)(6,"button",31),T("click",function(){let p=S(e).$implicit,g=f();return M(g.showTransactions(p))}),a(7,"mat-icon"),C(8,"fa-icon",32),i(),a(9,"span"),o(10),r(11,"translate"),i()(),a(12,"button",33),T("click",function(p){S(e);let g=f();return M(g.routeEdit(p))}),a(13,"mat-icon"),C(14,"fa-icon",34),i(),a(15,"span"),o(16),r(17,"translate"),i()()()()}if(t&2){let e=s.$implicit,l=E(5);n(),d("matMenuTriggerFor",l),n(9),m(c(11,4,"labels.text.View Transaction")),n(2),d("routerLink",ge(8,pa,"S"+e.id)),n(4),m(c(17,6,"tooltips.View Journal Entries"))}}function Ma(t,s){t&1&&C(0,"tr",35)}function Aa(t,s){t&1&&C(0,"tr",36)}var an=(()=>{class t{constructor(){this.route=_(N),this.router=_(W),this.displayedColumns=["row","id","transactionDate","transactionType","debit","credit","balance","actions"],this.route.parent.data.subscribe(e=>{this.transactionsData=e.recurringDepositsAccountData.transactions,this.status=e.recurringDepositsAccountData.status.value})}ngOnInit(){this.dataSource=new _e(this.transactionsData),this.hideAccrualsParam=new tt(!1),this.hideReversedParam=new tt(!1)}isDebit(e){return e.withdrawal===!0||e.feeDeduction===!0||e.overdraftInterest===!0||e.withholdTax===!0}hideAccruals(){this.filterTransactions(this.hideReversedParam.value,!this.hideAccrualsParam.value)}hideReversed(){this.filterTransactions(!this.hideReversedParam.value,this.hideAccrualsParam.value)}filterTransactions(e,l){let p=this.transactionsData;(l||e)&&(p=this.transactionsData.filter(g=>!(e&&g.reversed)&&!(l&&g.transactionType.accrual))),this.dataSource=new _e(p),this.dataSource.paginator=this.paginator,this.dataSource.sort=this.sort}savingsTransactionColor(e){return e.reversed?"strike":e.transfer?"transfer":e.transactionType.accrual?"accrual":""}checkStatus(){return this.status==="Active"||this.status==="Closed"||this.status==="Transfer in progress"||this.status==="Transfer on hold"||this.status==="Premature Closed"||this.status==="Matured"}showTransactions(e){e.transfer?this.router.navigate([`../transfer-funds/account-transfers/${e.transfer.id}`],{relativeTo:this.route}):this.router.navigate([e.id],{relativeTo:this.route})}static{this.\u0275fac=function(l){return new(l||t)}}static{this.\u0275cmp=O({type:t,selectors:[["mifosx-transactions-tab"]],viewQuery:function(l,p){if(l&1&&(Pt(Qn,7),Pt(Yn,7)),l&2){let g;Tt(g=St())&&(p.paginator=g.first),Tt(g=St())&&(p.sort=g.first)}},decls:35,vars:7,consts:[["transactionMenu","matMenu"],[1,"tab-container","mat-typography"],[1,"mat-elevation-z1","m-b-25"],[1,"layout-row","align-start"],[1,"m-b-20"],[1,"action-button","m-b-20","layout-row","gap-20px"],["mat-table","",3,"dataSource"],["matColumnDef","row"],["mat-header-cell","",4,"matHeaderCellDef"],["mat-cell","",3,"click",4,"matCellDef"],["matColumnDef","id"],["mat-cell","",3,"ngClass","click",4,"matCellDef"],["matColumnDef","transactionDate"],["matColumnDef","transactionType"],["matColumnDef","debit"],["mat-header-cell","","class","center",4,"matHeaderCellDef"],["mat-cell","","class","r-amount",3,"ngClass","click",4,"matCellDef"],["matColumnDef","credit"],["matColumnDef","balance"],["matColumnDef","actions"],["mat-cell","","class","center",4,"matCellDef"],["mat-header-row","",4,"matHeaderRowDef"],["mat-row","","class","select-row",4,"matRowDef","matRowDefColumns"],[1,"accruals",3,"click","formControl"],["mat-header-cell",""],["mat-cell","",3,"click"],["mat-cell","",3,"click","ngClass"],["mat-header-cell","",1,"center"],["mat-cell","",1,"r-amount",3,"click","ngClass"],["mat-cell","",1,"center"],["mat-icon-button","","aria-label","",1,"action-button",3,"matMenuTriggerFor"],["mat-menu-item","",3,"click"],["icon","eye","size","sm"],["mat-menu-item","",3,"click","routerLink"],["icon","table-cells","size","sm"],["mat-header-row",""],["mat-row","",1,"select-row"]],template:function(l,p){l&1&&(a(0,"div",1)(1,"div",2)(2,"div",3)(3,"div",4)(4,"h3"),o(5),r(6,"translate"),i()(),x(7,sa,7,8,"div",5),i(),a(8,"table",6),v(9,7),h(10,la,2,0,"th",8)(11,ma,2,1,"td",9),P(),v(12,10),h(13,da,3,3,"th",8)(14,ua,2,2,"td",11),P(),v(15,12),h(16,ga,3,3,"th",8)(17,Ca,3,4,"td",11),P(),v(18,13),h(19,_a,3,3,"th",8)(20,fa,2,2,"td",11),P(),v(21,14),h(22,ha,3,3,"th",15)(23,xa,2,2,"td",16),P(),v(24,17),h(25,Da,3,3,"th",15)(26,ba,2,2,"td",16),P(),v(27,18),h(28,va,3,3,"th",15)(29,Pa,3,4,"td",16),P(),v(30,19),h(31,Ta,3,3,"th",8)(32,Sa,18,10,"td",20),P(),h(33,Ma,1,0,"tr",21)(34,Aa,1,0,"tr",22),i()()()),l&2&&(n(5),m(c(6,5,"labels.heading.All Transactions")),n(2),D(p.checkStatus()?7:-1),n(),d("dataSource",p.dataSource),n(25),d("matHeaderRowDef",p.displayedColumns),n(),d("matRowDefColumns",p.displayedColumns))},dependencies:[I,be,R,Z,zn,Q,He,wt,Ft,Bt,kt,Et,Nt,Oe,Le,je,ze,$e,_t,Vt,Gt,qt,Ht,It,w,Wt],styles:["body[_ngcontent-%COMP%] table[_ngcontent-%COMP%] tbody[_ngcontent-%COMP%] tr[_ngcontent-%COMP%]:nth-child(2n){background-color:#f2f2f2}.bg-black[_ngcontent-%COMP%]{background-color:#000}.bg-light-grey[_ngcontent-%COMP%]{background-color:#e5e5e5}.bg-medium-grey[_ngcontent-%COMP%]{background-color:#ccc}.bg-grey[_ngcontent-%COMP%]{background-color:#999}.bg-dark-grey[_ngcontent-%COMP%]{background-color:#222}.bg-white[_ngcontent-%COMP%], .bg-fff[_ngcontent-%COMP%]{background-color:#fff}.bg-none[_ngcontent-%COMP%], .no-bg[_ngcontent-%COMP%]{background:none;background-image:none;background-color:transparent}.bg-facebook[_ngcontent-%COMP%]{background-color:#47639e}.bg-twitter[_ngcontent-%COMP%]{background-color:#02a8f3}body[_ngcontent-%COMP%] table[_ngcontent-%COMP%]{border:1px solid rgba(0,0,0,.12)}.no-border[_ngcontent-%COMP%]{border:none}.no-border-t[_ngcontent-%COMP%]{border-top:none}.no-border-r[_ngcontent-%COMP%]{border-right:none}.no-border-b[_ngcontent-%COMP%]{border-bottom:none}.no-border-l[_ngcontent-%COMP%]{border-left:none}.no-border-lr[_ngcontent-%COMP%], .no-border-rl[_ngcontent-%COMP%]{border-left:none;border-right:none}.no-border-tb[_ngcontent-%COMP%], .no-border-bt[_ngcontent-%COMP%]{border-top:none;border-bottom:none}.no-border-tl[_ngcontent-%COMP%], .no-border-lt[_ngcontent-%COMP%]{border-top:none;border-left:none}.no-border-tr[_ngcontent-%COMP%], .no-border-rt[_ngcontent-%COMP%]{border-top:none;border-right:none}.no-border-bl[_ngcontent-%COMP%], .no-border-lb[_ngcontent-%COMP%]{border-bottom:none;border-left:none}.no-border-br[_ngcontent-%COMP%], .no-border-rb[_ngcontent-%COMP%]{border-bottom:none;border-right:none}.border-dashed[_ngcontent-%COMP%], .border-dotted[_ngcontent-%COMP%]{border-style:dashed}.border-black[_ngcontent-%COMP%]{border-color:#000}.border-light-grey[_ngcontent-%COMP%]{border-color:#e5e5e5}.border-medium-grey[_ngcontent-%COMP%]{border-color:#ccc}.border-grey[_ngcontent-%COMP%]{border-color:#999}.border-dark-grey[_ngcontent-%COMP%]{border-color:#2222}.border-white[_ngcontent-%COMP%], .border-fff[_ngcontent-%COMP%]{border-color:#fff}.no-border-radius[_ngcontent-%COMP%]{border-radius:0}.radius3[_ngcontent-%COMP%]{border-radius:3px}.radius5[_ngcontent-%COMP%]{border-radius:5px}.radius10[_ngcontent-%COMP%]{border-radius:10px}.column-mandatory[_ngcontent-%COMP%]{color:#5cb85c;text-align:center}.not-column-mandatory[_ngcontent-%COMP%]{color:#666f73;text-align:center}.cdk-drag-placeholder[_ngcontent-%COMP%]{background:#3498db}.yes[_ngcontent-%COMP%]{color:#5cb85c!important;background-color:#5cb85c;height:4px;cursor:none}.no[_ngcontent-%COMP%]{color:red;background-color:red;height:4px;cursor:none}.strike[_ngcontent-%COMP%]{text-decoration:line-through;color:red}.transfer[_ngcontent-%COMP%]{color:#16a085}.linked[_ngcontent-%COMP%]{color:#4461e2}.accrual[_ngcontent-%COMP%]{color:#999}.fa-question[_ngcontent-%COMP%]{color:#4461e2}.enabled[_ngcontent-%COMP%]{color:#32cd32}.disabled[_ngcontent-%COMP%]{color:#f44366}.v-mid[_ngcontent-%COMP%], .v-m[_ngcontent-%COMP%]{vertical-align:middle}.v-top[_ngcontent-%COMP%], .v-t[_ngcontent-%COMP%]{vertical-align:top}.v-bottom[_ngcontent-%COMP%], .v-b[_ngcontent-%COMP%]{vertical-align:bottom}.v-super[_ngcontent-%COMP%]{vertical-align:super}.r-amount[_ngcontent-%COMP%]{text-align:right!important;padding-right:5px!important}.left[_ngcontent-%COMP%]{text-align:left!important}.right[_ngcontent-%COMP%]{text-align:right!important}.center[_ngcontent-%COMP%]{text-align:center!important}.amount-plus[_ngcontent-%COMP%]{color:#000}.amount-minus[_ngcontent-%COMP%]{color:#4461e2}.block[_ngcontent-%COMP%]{display:block}.inline[_ngcontent-%COMP%]{display:inline}.in-block[_ngcontent-%COMP%]{display:inline-block;zoom:1}.d-none[_ngcontent-%COMP%], .hide[_ngcontent-%COMP%], .hidden[_ngcontent-%COMP%]{display:none}.t-0[_ngcontent-%COMP%]{top:0}.b-0[_ngcontent-%COMP%]{bottom:0}.l-0[_ngcontent-%COMP%]{left:0}.r-0[_ngcontent-%COMP%]{right:0}.tb-0[_ngcontent-%COMP%]{top:0;bottom:0}.lr-0[_ngcontent-%COMP%]{left:0;right:0}.f-left[_ngcontent-%COMP%]{float:left}.f-right[_ngcontent-%COMP%]{float:right}.f-none[_ngcontent-%COMP%]{float:none}textarea[_ngcontent-%COMP%]{resize:both}textarea.vertical[_ngcontent-%COMP%], textarea.horizontal[_ngcontent-%COMP%]{resize:vertical}textarea.noresize[_ngcontent-%COMP%]{resize:none}.full-input[_ngcontent-%COMP%] input[_ngcontent-%COMP%], .full-input[_ngcontent-%COMP%] select[_ngcontent-%COMP%], .full-input[_ngcontent-%COMP%] textarea[_ngcontent-%COMP%]{width:100%}.normal[_ngcontent-%COMP%] input[_ngcontent-%COMP%], .normal[_ngcontent-%COMP%] select[_ngcontent-%COMP%], .normal[_ngcontent-%COMP%] textarea[_ngcontent-%COMP%], .full-input[_ngcontent-%COMP%] [type=checkbox][_ngcontent-%COMP%], .full-input[_ngcontent-%COMP%] [type=radio][_ngcontent-%COMP%]{width:auto}.mat-tab-body-content[_ngcontent-%COMP%]{margin-bottom:20px}.mat-datepicker-input[_ngcontent-%COMP%]{margin-top:5px;margin-bottom:5px}.loader-wrapper[_ngcontent-%COMP%]{height:100vh;width:100vw}.loader-wrapper[_ngcontent-%COMP%] .triangle[_ngcontent-%COMP%]{width:0;height:0;border-style:solid;position:absolute;animation:_ngcontent-%COMP%_rotate .8s infinite .2s}.loader-wrapper[_ngcontent-%COMP%] .bottom[_ngcontent-%COMP%]{border-width:0 90px 90px;border-color:transparent transparent #1fb050;bottom:calc(50% - 100px);left:calc(50% - 90px)}.loader-wrapper[_ngcontent-%COMP%] .top[_ngcontent-%COMP%]{border-width:90px 90px 0;border-color:#b4d575 transparent transparent;top:calc(50% - 100px);left:calc(50% - 90px)}.loader-wrapper[_ngcontent-%COMP%] .left[_ngcontent-%COMP%]{border-width:90px 0 90px 90px;border-color:transparent transparent transparent #1074b9;top:calc(50% - 90px);left:calc(50% - 100px)}.loader-wrapper[_ngcontent-%COMP%] .right[_ngcontent-%COMP%]{border-width:90px 90px 90px 0;border-color:transparent #1daeec transparent transparent;top:calc(50% - 90px);right:calc(50% - 100px)}@keyframes _ngcontent-%COMP%_rotate{0%{transform:rotate(0)}to{transform:rotate(360deg)}}body[_ngcontent-%COMP%]{margin:0}.container[_ngcontent-%COMP%]{margin:0 auto}.mb-05[_ngcontent-%COMP%]{margin-bottom:.5rem}.mr-05[_ngcontent-%COMP%]{margin-right:.5rem}.mb-1[_ngcontent-%COMP%]{margin-bottom:1rem}.mt-1[_ngcontent-%COMP%]{margin-top:1rem}.m-5[_ngcontent-%COMP%]{margin:5px}.m-t-5[_ngcontent-%COMP%]{margin-top:5px}.m-r-5[_ngcontent-%COMP%]{margin-right:5px}.m-b-5[_ngcontent-%COMP%]{margin-bottom:5px}.m-l-5[_ngcontent-%COMP%]{margin-left:5px}.m-v-5[_ngcontent-%COMP%]{margin:5px 0}.m-h-5[_ngcontent-%COMP%]{margin:0 5px}.m-10[_ngcontent-%COMP%]{margin:10px}.m-t-10[_ngcontent-%COMP%]{margin-top:10px}.m-r-10[_ngcontent-%COMP%]{margin-right:10px}.m-b-10[_ngcontent-%COMP%]{margin-bottom:10px}.m-l-10[_ngcontent-%COMP%]{margin-left:10px}.m-v-10[_ngcontent-%COMP%]{margin:10px 0}.m-h-10[_ngcontent-%COMP%]{margin:0 10px}.m-15[_ngcontent-%COMP%]{margin:15px}.m-t-15[_ngcontent-%COMP%]{margin-top:15px}.m-r-15[_ngcontent-%COMP%]{margin-right:15px}.m-b-15[_ngcontent-%COMP%]{margin-bottom:15px}.m-l-15[_ngcontent-%COMP%]{margin-left:15px}.m-v-15[_ngcontent-%COMP%]{margin:15px 0}.m-h-15[_ngcontent-%COMP%]{margin:0 15px}.m-20[_ngcontent-%COMP%]{margin:20px}.m-t-20[_ngcontent-%COMP%]{margin-top:20px}.m-r-20[_ngcontent-%COMP%]{margin-right:20px}.m-b-20[_ngcontent-%COMP%]{margin-bottom:20px}.m-l-20[_ngcontent-%COMP%]{margin-left:20px}.m-v-20[_ngcontent-%COMP%]{margin:20px 0}.m-h-20[_ngcontent-%COMP%]{margin:0 20px}.m-25[_ngcontent-%COMP%]{margin:25px}.m-t-25[_ngcontent-%COMP%]{margin-top:25px}.m-r-25[_ngcontent-%COMP%]{margin-right:25px}.m-b-25[_ngcontent-%COMP%]{margin-bottom:25px}.m-l-25[_ngcontent-%COMP%]{margin-left:25px}.m-v-25[_ngcontent-%COMP%]{margin:25px 0}.m-h-25[_ngcontent-%COMP%]{margin:0 25px}.m-30[_ngcontent-%COMP%]{margin:30px}.m-t-30[_ngcontent-%COMP%]{margin-top:30px}.m-r-30[_ngcontent-%COMP%]{margin-right:30px}.m-b-30[_ngcontent-%COMP%]{margin-bottom:30px}.m-l-30[_ngcontent-%COMP%]{margin-left:30px}.m-v-30[_ngcontent-%COMP%]{margin:30px 0}.m-h-30[_ngcontent-%COMP%]{margin:0 30px}.m-35[_ngcontent-%COMP%]{margin:35px}.m-t-35[_ngcontent-%COMP%]{margin-top:35px}.m-r-35[_ngcontent-%COMP%]{margin-right:35px}.m-b-35[_ngcontent-%COMP%]{margin-bottom:35px}.m-l-35[_ngcontent-%COMP%]{margin-left:35px}.m-v-35[_ngcontent-%COMP%]{margin:35px 0}.m-h-35[_ngcontent-%COMP%]{margin:0 35px}.m-40[_ngcontent-%COMP%]{margin:40px}.m-t-40[_ngcontent-%COMP%]{margin-top:40px}.m-r-40[_ngcontent-%COMP%]{margin-right:40px}.m-b-40[_ngcontent-%COMP%]{margin-bottom:40px}.m-l-40[_ngcontent-%COMP%]{margin-left:40px}.m-v-40[_ngcontent-%COMP%]{margin:40px 0}.m-h-40[_ngcontent-%COMP%]{margin:0 40px}.m-45[_ngcontent-%COMP%]{margin:45px}.m-t-45[_ngcontent-%COMP%]{margin-top:45px}.m-r-45[_ngcontent-%COMP%]{margin-right:45px}.m-b-45[_ngcontent-%COMP%]{margin-bottom:45px}.m-l-45[_ngcontent-%COMP%]{margin-left:45px}.m-v-45[_ngcontent-%COMP%]{margin:45px 0}.m-h-45[_ngcontent-%COMP%]{margin:0 45px}.m-50[_ngcontent-%COMP%]{margin:50px}.m-t-50[_ngcontent-%COMP%]{margin-top:50px}.m-r-50[_ngcontent-%COMP%]{margin-right:50px}.m-b-50[_ngcontent-%COMP%]{margin-bottom:50px}.m-l-50[_ngcontent-%COMP%]{margin-left:50px}.m-v-50[_ngcontent-%COMP%]{margin:50px 0}.m-h-50[_ngcontent-%COMP%]{margin:0 50px}.m-55[_ngcontent-%COMP%]{margin:55px}.m-t-55[_ngcontent-%COMP%]{margin-top:55px}.m-r-55[_ngcontent-%COMP%]{margin-right:55px}.m-b-55[_ngcontent-%COMP%]{margin-bottom:55px}.m-l-55[_ngcontent-%COMP%]{margin-left:55px}.m-v-55[_ngcontent-%COMP%]{margin:55px 0}.m-h-55[_ngcontent-%COMP%]{margin:0 55px}.m-60[_ngcontent-%COMP%]{margin:60px}.m-t-60[_ngcontent-%COMP%]{margin-top:60px}.m-r-60[_ngcontent-%COMP%]{margin-right:60px}.m-b-60[_ngcontent-%COMP%]{margin-bottom:60px}.m-l-60[_ngcontent-%COMP%]{margin-left:60px}.m-v-60[_ngcontent-%COMP%]{margin:60px 0}.m-h-60[_ngcontent-%COMP%]{margin:0 60px}.m-65[_ngcontent-%COMP%]{margin:65px}.m-t-65[_ngcontent-%COMP%]{margin-top:65px}.m-r-65[_ngcontent-%COMP%]{margin-right:65px}.m-b-65[_ngcontent-%COMP%]{margin-bottom:65px}.m-l-65[_ngcontent-%COMP%]{margin-left:65px}.m-v-65[_ngcontent-%COMP%]{margin:65px 0}.m-h-65[_ngcontent-%COMP%]{margin:0 65px}.m-70[_ngcontent-%COMP%]{margin:70px}.m-t-70[_ngcontent-%COMP%]{margin-top:70px}.m-r-70[_ngcontent-%COMP%]{margin-right:70px}.m-b-70[_ngcontent-%COMP%]{margin-bottom:70px}.m-l-70[_ngcontent-%COMP%]{margin-left:70px}.m-v-70[_ngcontent-%COMP%]{margin:70px 0}.m-h-70[_ngcontent-%COMP%]{margin:0 70px}.m-75[_ngcontent-%COMP%]{margin:75px}.m-t-75[_ngcontent-%COMP%]{margin-top:75px}.m-r-75[_ngcontent-%COMP%]{margin-right:75px}.m-b-75[_ngcontent-%COMP%]{margin-bottom:75px}.m-l-75[_ngcontent-%COMP%]{margin-left:75px}.m-v-75[_ngcontent-%COMP%]{margin:75px 0}.m-h-75[_ngcontent-%COMP%]{margin:0 75px}.m-80[_ngcontent-%COMP%]{margin:80px}.m-t-80[_ngcontent-%COMP%]{margin-top:80px}.m-r-80[_ngcontent-%COMP%]{margin-right:80px}.m-b-80[_ngcontent-%COMP%]{margin-bottom:80px}.m-l-80[_ngcontent-%COMP%]{margin-left:80px}.m-v-80[_ngcontent-%COMP%]{margin:80px 0}.m-h-80[_ngcontent-%COMP%]{margin:0 80px}.no-m[_ngcontent-%COMP%]{margin:0}.no-m-t[_ngcontent-%COMP%]{margin-top:0}.no-m-r[_ngcontent-%COMP%]{margin-right:0}.no-m-b[_ngcontent-%COMP%]{margin-bottom:0}.no-m-l[_ngcontent-%COMP%]{margin-left:0}.no-m-v[_ngcontent-%COMP%], .no-m-h[_ngcontent-%COMP%], .no-margin[_ngcontent-%COMP%]{margin:0}.no-m-lr[_ngcontent-%COMP%], .no-m-rl[_ngcontent-%COMP%]{margin-left:0;margin-right:0}.no-m-tb[_ngcontent-%COMP%], .no-m-bt[_ngcontent-%COMP%]{margin-top:0;margin-bottom:0}.m-t-only[_ngcontent-%COMP%]{margin-left:0;margin-right:0;margin-bottom:0}.m-b-only[_ngcontent-%COMP%]{margin-left:0;margin-right:0;margin-top:0}.m-l-only[_ngcontent-%COMP%]{margin-right:0;margin-top:0;margin-bottom:0}.m-r-only[_ngcontent-%COMP%]{margin-left:0;margin-top:0;margin-bottom:0}.m-auto[_ngcontent-%COMP%]{margin-left:auto;margin-right:auto}.ls-0[_ngcontent-%COMP%]{margin-left:10px;margin-right:10px}html[_ngcontent-%COMP%], body[_ngcontent-%COMP%]{-webkit-tap-highlight-color:transparent}div[_ngcontent-%COMP%]{box-sizing:border-box}.color-inherit[_ngcontent-%COMP%]{color:inherit}.no-shadow[_ngcontent-%COMP%]{box-shadow:none}.pointer[_ngcontent-%COMP%]{cursor:pointer}.nolist[_ngcontent-%COMP%]{list-style:none}.actions-menu[_ngcontent-%COMP%]{color:#fff}.alert[_ngcontent-%COMP%]{background-color:#e8f4fd;padding:6px 16px;font-size:.875rem;font-family:Roboto,Helvetica Neue,sans-serif;font-weight:400;line-height:1.43;border-radius:4px;letter-spacing:normal;margin:10px}.alert[_ngcontent-%COMP%] .message[_ngcontent-%COMP%]{padding:8px 0;font-size:18px}.alert[_ngcontent-%COMP%] .alert-check[_ngcontent-%COMP%]{color:#359ff4;margin-right:2px;font-size:1.4rem} .mat-tooltip{font-size:15px;color:#fff!important;background-color:#4461e2b3;border:1px solid rgb(25.7777777778,51.5555555556,166.2222222222);max-width:400px!important;white-space:pre-line!important}.loading[_ngcontent-%COMP%]{position:absolute;min-width:100%;width:100px;height:12px;background:linear-gradient(125deg,#fff,#4461e2,#fff);animation:grow 4s linear infinite,move 4s linear infinite}mat-card-title[_ngcontent-%COMP%]{font-weight:600;font-size:x-large;padding-left:20px;padding-top:20px}html[_ngcontent-%COMP%], body[_ngcontent-%COMP%]{overflow:hidden}.overflow-x-scroll[_ngcontent-%COMP%]{max-width:100%;overflow-x:auto}.overflow-no[_ngcontent-%COMP%]{overflow:hidden}.overflow-auto[_ngcontent-%COMP%]{overflow:auto}.overflow-scroll[_ngcontent-%COMP%]{overflow:scroll}.table-container[_ngcontent-%COMP%]{overflow-x:auto;max-width:100%}body[_ngcontent-%COMP%], .no-p[_ngcontent-%COMP%]{padding:0}.no-p-t[_ngcontent-%COMP%]{padding-top:0}.no-p-r[_ngcontent-%COMP%]{padding-right:0}.no-p-b[_ngcontent-%COMP%]{padding-bottom:0}.no-p-l[_ngcontent-%COMP%]{padding-left:0}.no-p-v[_ngcontent-%COMP%], .no-p-h[_ngcontent-%COMP%]{padding:0}.p-5[_ngcontent-%COMP%]{padding:5px}.p-t-5[_ngcontent-%COMP%]{padding-top:5px}.p-r-5[_ngcontent-%COMP%]{padding-right:5px}.p-b-5[_ngcontent-%COMP%]{padding-bottom:5px}.p-l-5[_ngcontent-%COMP%]{padding-left:5px}.p-v-5[_ngcontent-%COMP%]{padding:5px 0}.p-h-5[_ngcontent-%COMP%]{padding:0 5px}.p-10[_ngcontent-%COMP%]{padding:10px}.p-t-10[_ngcontent-%COMP%]{padding-top:10px}.p-b-10[_ngcontent-%COMP%]{padding-bottom:10px}.p-v-10[_ngcontent-%COMP%]{padding:10px 0}.p-h-10[_ngcontent-%COMP%]{padding:0 10px}.p-15[_ngcontent-%COMP%]{padding:15px}.p-t-15[_ngcontent-%COMP%]{padding-top:15px}.p-r-15[_ngcontent-%COMP%]{padding-right:15px}.p-b-15[_ngcontent-%COMP%]{padding-bottom:15px}.p-l-15[_ngcontent-%COMP%]{padding-left:15px}.p-v-15[_ngcontent-%COMP%]{padding:15px 0}.p-h-15[_ngcontent-%COMP%]{padding:0 15px}.p-20[_ngcontent-%COMP%]{padding:20px}.p-t-20[_ngcontent-%COMP%]{padding-top:20px}.p-r-20[_ngcontent-%COMP%]{padding-right:20px}.p-b-20[_ngcontent-%COMP%]{padding-bottom:20px}.p-l-20[_ngcontent-%COMP%]{padding-left:20px}.p-v-20[_ngcontent-%COMP%]{padding:20px 0}.p-h-20[_ngcontent-%COMP%]{padding:0 20px}.p-25[_ngcontent-%COMP%]{padding:25px}.p-t-25[_ngcontent-%COMP%]{padding-top:25px}.p-r-25[_ngcontent-%COMP%]{padding-right:25px}.p-b-25[_ngcontent-%COMP%]{padding-bottom:25px}.p-l-25[_ngcontent-%COMP%]{padding-left:25px}.p-v-25[_ngcontent-%COMP%]{padding:25px 0}.p-h-25[_ngcontent-%COMP%]{padding:0 25px}.p-30[_ngcontent-%COMP%]{padding:30px}.p-t-30[_ngcontent-%COMP%]{padding-top:30px}.p-r-30[_ngcontent-%COMP%]{padding-right:30px}.p-b-30[_ngcontent-%COMP%]{padding-bottom:30px}.p-l-30[_ngcontent-%COMP%]{padding-left:30px}.p-v-30[_ngcontent-%COMP%]{padding:30px 0}.p-h-30[_ngcontent-%COMP%]{padding:0 30px}.p-35[_ngcontent-%COMP%]{padding:35px}.p-t-35[_ngcontent-%COMP%]{padding-top:35px}.p-r-35[_ngcontent-%COMP%]{padding-right:35px}.p-b-35[_ngcontent-%COMP%]{padding-bottom:35px}.p-l-35[_ngcontent-%COMP%]{padding-left:35px}.p-v-35[_ngcontent-%COMP%]{padding:35px 0}.p-h-35[_ngcontent-%COMP%]{padding:0 35px}.p-40[_ngcontent-%COMP%]{padding:40px}.p-t-40[_ngcontent-%COMP%]{padding-top:40px}.p-r-40[_ngcontent-%COMP%]{padding-right:40px}.p-b-40[_ngcontent-%COMP%]{padding-bottom:40px}.p-l-40[_ngcontent-%COMP%]{padding-left:40px}.p-v-40[_ngcontent-%COMP%]{padding-top:40px;padding-bottom:40px}.p-h-40[_ngcontent-%COMP%]{padding:0 40px}.p-45[_ngcontent-%COMP%]{padding:45px}.p-t-45[_ngcontent-%COMP%]{padding-top:45px}.p-r-45[_ngcontent-%COMP%]{padding-right:45px}.p-b-45[_ngcontent-%COMP%]{padding-bottom:45px}.p-l-45[_ngcontent-%COMP%]{padding-left:45px}.p-v-45[_ngcontent-%COMP%]{padding:45px 0}.p-h-45[_ngcontent-%COMP%]{padding:0 45px}.p-50[_ngcontent-%COMP%]{padding:50px}.p-t-50[_ngcontent-%COMP%]{padding-top:50px}.p-r-50[_ngcontent-%COMP%]{padding-right:50px}.p-b-50[_ngcontent-%COMP%]{padding-bottom:50px}.p-l-50[_ngcontent-%COMP%]{padding-left:50px}.p-v-50[_ngcontent-%COMP%]{padding:50px 0}.p-h-50[_ngcontent-%COMP%]{padding:0 50px}.p-55[_ngcontent-%COMP%]{padding:55px}.p-t-55[_ngcontent-%COMP%]{padding-top:55px}.p-r-55[_ngcontent-%COMP%]{padding-right:55px}.p-b-55[_ngcontent-%COMP%]{padding-bottom:55px}.p-l-55[_ngcontent-%COMP%]{padding-left:55px}.p-v-55[_ngcontent-%COMP%]{padding:55px 0}.p-h-55[_ngcontent-%COMP%]{padding:0 55px}.p-60[_ngcontent-%COMP%]{padding:60px}.p-t-60[_ngcontent-%COMP%]{padding-top:60px}.p-r-60[_ngcontent-%COMP%]{padding-right:60px}.p-b-60[_ngcontent-%COMP%]{padding-bottom:60px}.p-l-60[_ngcontent-%COMP%]{padding-left:60px}.p-v-60[_ngcontent-%COMP%]{padding:60px 0}.p-h-60[_ngcontent-%COMP%]{padding:0 60px}.p-65[_ngcontent-%COMP%]{padding:65px}.p-t-65[_ngcontent-%COMP%]{padding-top:65px}.p-r-65[_ngcontent-%COMP%]{padding-right:65px}.p-b-65[_ngcontent-%COMP%]{padding-bottom:65px}.p-l-65[_ngcontent-%COMP%]{padding-left:65px}.p-v-65[_ngcontent-%COMP%]{padding:65px 0}.p-h-65[_ngcontent-%COMP%]{padding:0 65px}.p-70[_ngcontent-%COMP%]{padding:70px}.p-t-70[_ngcontent-%COMP%]{padding-top:70px}.p-r-70[_ngcontent-%COMP%]{padding-right:70px}.p-b-70[_ngcontent-%COMP%]{padding-bottom:70px}.p-l-70[_ngcontent-%COMP%]{padding-left:70px}.p-v-70[_ngcontent-%COMP%]{padding:70px 0}.p-h-70[_ngcontent-%COMP%]{padding:0 70px}.p-75[_ngcontent-%COMP%]{padding:75px}.p-t-75[_ngcontent-%COMP%]{padding-top:75px}.p-r-75[_ngcontent-%COMP%]{padding-right:75px}.p-b-75[_ngcontent-%COMP%]{padding-bottom:75px}.p-l-75[_ngcontent-%COMP%]{padding-left:75px}.p-v-75[_ngcontent-%COMP%]{padding:75px 0}.p-h-75[_ngcontent-%COMP%]{padding:0 75px}.p-80[_ngcontent-%COMP%]{padding:80px}.p-t-80[_ngcontent-%COMP%]{padding-top:80px}.p-r-80[_ngcontent-%COMP%]{padding-right:80px}.p-b-80[_ngcontent-%COMP%]{padding-bottom:80px}.p-l-80[_ngcontent-%COMP%]{padding-left:80px}.p-v-80[_ngcontent-%COMP%]{padding:80px 0}.p-h-80[_ngcontent-%COMP%]{padding:0 80px}.no-padding[_ngcontent-%COMP%]{padding:0!important}.no-pad-lr[_ngcontent-%COMP%], .no-pad-rl[_ngcontent-%COMP%]{padding-left:0;padding-right:0}.no-pad-tb[_ngcontent-%COMP%], .no-pad-bt[_ngcontent-%COMP%]{padding-top:0;padding-bottom:0}.pad-t-only[_ngcontent-%COMP%]{padding-left:0;padding-right:0;padding-bottom:0}.pad-b-only[_ngcontent-%COMP%]{padding-left:0;padding-right:0;padding-top:0}.pad-l-only[_ngcontent-%COMP%]{padding-right:0;padding-top:0;padding-bottom:0}.pad-r-only[_ngcontent-%COMP%]{padding-left:0;padding-top:0;padding-bottom:0}html[_ngcontent-%COMP%], body[_ngcontent-%COMP%], .rel[_ngcontent-%COMP%], .relative[_ngcontent-%COMP%]{position:relative}.abs[_ngcontent-%COMP%], .absolute[_ngcontent-%COMP%]{position:absolute}.fixed[_ngcontent-%COMP%]{position:fixed}.status-active[_ngcontent-%COMP%]{color:#5cb85c}.status-inactive[_ngcontent-%COMP%]{color:#666f73}.status-deleted[_ngcontent-%COMP%]{color:#000}.status-pending[_ngcontent-%COMP%]{color:orange}.status-approved[_ngcontent-%COMP%]{color:#4461e2}.status-overpaid[_ngcontent-%COMP%]{color:purple}.status-chargeoff[_ngcontent-%COMP%]{color:#f39c12}.status-active-overdue[_ngcontent-%COMP%], .status-block[_ngcontent-%COMP%]{color:red}.status-matured[_ngcontent-%COMP%]{color:#ff4000}.subStatus-contract-termination[_ngcontent-%COMP%]{color:#b3b3b3}.mat-step-header[_ngcontent-%COMP%] .mat-step-icon-state-done[_ngcontent-%COMP%]{background-color:#2af72a}.mat-step-header[_ngcontent-%COMP%] .mat-step-icon-state-done[_ngcontent-%COMP%] .status-transfer-progress[_ngcontent-%COMP%]{color:#ff4000}.mat-step-header[_ngcontent-%COMP%] .mat-step-icon-state-done[_ngcontent-%COMP%] .status-transfer-hold[_ngcontent-%COMP%]{color:#df0101}html[_ngcontent-%COMP%], body[_ngcontent-%COMP%]{-webkit-font-smoothing:antialiased}html[_ngcontent-%COMP%]{font-size:16px}body[_ngcontent-%COMP%]{font-family:Roboto,Helvetica Neue,sans-serif;font-weight:400;font-size:14px;color:#000000de;line-height:1.5;letter-spacing:normal}.mat-h1[_ngcontent-%COMP%], .mat-headline[_ngcontent-%COMP%], .mat-typography[_ngcontent-%COMP%] .mat-h1[_ngcontent-%COMP%], .mat-typography[_ngcontent-%COMP%] .mat-headline[_ngcontent-%COMP%], .mat-typography[_ngcontent-%COMP%] h1[_ngcontent-%COMP%]{font:400 24px/32px Roboto,Helvetica Neue,sans-serif;letter-spacing:normal;margin:0 0 16px}.lh-1[_ngcontent-%COMP%]{line-height:1}.lh-13[_ngcontent-%COMP%]{line-height:1.3}.lh-15[_ngcontent-%COMP%]{line-height:1.5}.bold[_ngcontent-%COMP%], .strong[_ngcontent-%COMP%]{font-weight:700}.no-bold[_ngcontent-%COMP%]{font-weight:400}.italic[_ngcontent-%COMP%], .em[_ngcontent-%COMP%]{font-style:italic}.strike[_ngcontent-%COMP%]{text-decoration:line-through}.normal[_ngcontent-%COMP%]{font-weight:400;font-style:normal}.uppercase[_ngcontent-%COMP%]{text-transform:uppercase}.text-left[_ngcontent-%COMP%]{text-align:left}.text-center[_ngcontent-%COMP%]{text-align:center}.text-right[_ngcontent-%COMP%]{text-align:right}.w100[_ngcontent-%COMP%]{font-weight:100}.w200[_ngcontent-%COMP%]{font-weight:200}.w300[_ngcontent-%COMP%]{font-weight:300}.w400[_ngcontent-%COMP%]{font-weight:400}.w500[_ngcontent-%COMP%]{font-weight:500}.w600[_ngcontent-%COMP%]{font-weight:600}.w700[_ngcontent-%COMP%]{font-weight:700}.w800[_ngcontent-%COMP%]{font-weight:800}.w900[_ngcontent-%COMP%]{font-weight:900}.f9[_ngcontent-%COMP%]{font-size:9px}.f10[_ngcontent-%COMP%]{font-size:10px}.f11[_ngcontent-%COMP%]{font-size:11px}.f12[_ngcontent-%COMP%]{font-size:12px}.f13[_ngcontent-%COMP%]{font-size:13px}.f14[_ngcontent-%COMP%]{font-size:14px}.f15[_ngcontent-%COMP%]{font-size:15px}.f16[_ngcontent-%COMP%]{font-size:16px}.f17[_ngcontent-%COMP%]{font-size:17px}.f18[_ngcontent-%COMP%]{font-size:18px;line-height:30px}.f19[_ngcontent-%COMP%]{font-size:19px}.f20[_ngcontent-%COMP%]{font-size:20px}.f30[_ngcontent-%COMP%]{font-size:30px}.f40[_ngcontent-%COMP%]{font-size:40px}.f50[_ngcontent-%COMP%]{font-size:50px}.f60[_ngcontent-%COMP%]{font-size:60px}.size-small[_ngcontent-%COMP%]{font-size:75%}.size-normal[_ngcontent-%COMP%]{font-size:100%}.size-medium[_ngcontent-%COMP%]{font-size:125%}.size-big[_ngcontent-%COMP%], .size-large[_ngcontent-%COMP%]{font-size:150%}.size-huge[_ngcontent-%COMP%]{font-size:200%}.inherit[_ngcontent-%COMP%]{font:inherit}.text-shadow[_ngcontent-%COMP%]{text-shadow:1px 1px 1px rgba(0,0,0,.4)}.text-rgb-2[_ngcontent-%COMP%]{color:#0003}.text-rgb-3[_ngcontent-%COMP%]{color:#0000004d}.text-rgb-4[_ngcontent-%COMP%]{color:#0006}.text-rgb-5[_ngcontent-%COMP%]{color:#00000080}.no-ul[_ngcontent-%COMP%], .no-ul[_ngcontent-%COMP%]:hover, .no-ul[_ngcontent-%COMP%] a[_ngcontent-%COMP%], .no-ul[_ngcontent-%COMP%] a[_ngcontent-%COMP%]:hover{text-decoration:none}.no-wrap[_ngcontent-%COMP%]{white-space:nowrap}.auto-cell-size[_ngcontent-%COMP%]{white-space:nowrap;width:1%}.ls-0[_ngcontent-%COMP%]{letter-spacing:-3px;white-space:nowrap}.label-field[_ngcontent-%COMP%]{margin-top:32px}.wrap-content[_ngcontent-%COMP%]{overflow-wrap:break-word;word-wrap:break-word}.no-break-content[_ngcontent-%COMP%]{overflow-wrap:anywhere!important}.fit[_ngcontent-%COMP%]{max-width:100%}.half-width[_ngcontent-%COMP%]{width:50%}.full-width[_ngcontent-%COMP%]{width:100%}.full-height[_ngcontent-%COMP%]{height:100%}html[_ngcontent-%COMP%], body[_ngcontent-%COMP%]{width:100%;height:100%;min-height:100%}body[_ngcontent-%COMP%] table[_ngcontent-%COMP%]{width:100%}.container[_ngcontent-%COMP%]{max-width:74rem;width:90%}.mw300[_ngcontent-%COMP%]{max-width:300px}.mw400[_ngcontent-%COMP%]{max-width:400px}.mw500[_ngcontent-%COMP%]{max-width:500px}.mw600[_ngcontent-%COMP%]{max-width:600px}.fullwidth[_ngcontent-%COMP%]{width:100%}.zindex-1[_ngcontent-%COMP%]{z-index:1}.zindex-2[_ngcontent-%COMP%]{z-index:2}.zindex-3[_ngcontent-%COMP%]{z-index:3}.zindex-4[_ngcontent-%COMP%]{z-index:4}.tab-container[_ngcontent-%COMP%]{padding:1%;margin:1%}.tab-container[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{margin:1% auto}.tab-container[_ngcontent-%COMP%] .action-button[_ngcontent-%COMP%]{margin-left:auto}.tab-container[_ngcontent-%COMP%] table[_ngcontent-%COMP%]{width:100%}.tab-container[_ngcontent-%COMP%] table[_ngcontent-%COMP%] .account-action-button[_ngcontent-%COMP%]{min-width:26px;padding:0 0 3px;margin:0 10%;line-height:25px}.tab-container[_ngcontent-%COMP%] table[_ngcontent-%COMP%] .account-action-button[_ngcontent-%COMP%] .accruals[_ngcontent-%COMP%]{padding-top:1%}.select-row[_ngcontent-%COMP%]:hover{cursor:pointer;font-weight:800}"]})}}return t})();var ya=["instructionsTable"],Oa=t=>["../","standing-instructions",t,"edit"],Ia=t=>["../","standing-instructions",t,"view"];function Ra(t,s){t&1&&(a(0,"th",16),o(1),r(2,"translate"),i()),t&2&&(n(),m(c(2,1,"labels.inputs.Client")))}function wa(t,s){if(t&1&&(a(0,"td",17),o(1),i()),t&2){let e=s.$implicit;n(),A(" ",e.fromClient.displayName,"-",e.fromClient.id," ")}}function Ea(t,s){t&1&&(a(0,"th",16),o(1),r(2,"translate"),i()),t&2&&(n(),m(c(2,1,"labels.inputs.From Account")))}function Ba(t,s){if(t&1&&(a(0,"td",17),o(1),i()),t&2){let e=s.$implicit;n(),A(" ",e.fromAccount.accountNo," (",e.fromAccountType.value,") ")}}function Fa(t,s){t&1&&(a(0,"th",16),o(1),r(2,"translate"),i()),t&2&&(n(),m(c(2,1,"labels.inputs.Beneficiary")))}function ka(t,s){if(t&1&&(a(0,"td",17),o(1),i()),t&2){let e=s.$implicit;n(),m(e.toClient.displayName)}}function Na(t,s){t&1&&(a(0,"th",16),o(1),r(2,"translate"),i()),t&2&&(n(),m(c(2,1,"labels.inputs.To Account")))}function Va(t,s){if(t&1&&(a(0,"td",17),o(1),i()),t&2){let e=s.$implicit;n(),A(" ",e.toAccount.accountNo," (",e.toAccountType.value,") ")}}function qa(t,s){t&1&&(a(0,"th",16),o(1),r(2,"translate"),i()),t&2&&(n(),m(c(2,1,"labels.inputs.Amount")))}function Ga(t,s){if(t&1&&(a(0,"td",17),o(1),i()),t&2){let e=s.$implicit;n(),A("",e.instructionType.value,"/",e.amount)}}function Ha(t,s){t&1&&(a(0,"th",16),o(1),r(2,"translate"),i()),t&2&&(n(),m(c(2,1,"labels.inputs.Validity")))}function Ua(t,s){if(t&1&&(a(0,"td",17),o(1),r(2,"dateFormat"),r(3,"dateFormat"),i()),t&2){let e=s.$implicit;n(),A(" ",c(2,2,e.validFrom)," to ",c(3,4,e.validTill)," ")}}function $a(t,s){t&1&&(a(0,"th",16),o(1),r(2,"translate"),i()),t&2&&(n(),m(c(2,1,"labels.inputs.Actions")))}function za(t,s){if(t&1&&(a(0,"button",19),r(1,"translate"),C(2,"i",20),i()),t&2){let e=f(2).$implicit;d("matTooltip",Mt(c(1,3,"tooltips.Edit Standing Instruction")))("routerLink",ge(5,Oa,e.id))}}function La(t,s){t&1&&(a(0,"span"),h(1,za,3,7,"button",18),i()),t&2&&(n(),d("mifosxHasPermission","UPDATE_STANDINGINSTRUCTION"))}function ja(t,s){if(t&1){let e=y();a(0,"button",22),r(1,"translate"),T("click",function(){S(e);let p=f(2).$implicit,g=f();return M(g.deleteStandingInstruction(p.id))}),C(2,"i",23),i()}t&2&&d("matTooltip",Mt(c(1,2,"tooltips.Delete Standing Instruction")))}function Wa(t,s){t&1&&(a(0,"span"),h(1,ja,3,4,"button",21),i()),t&2&&(n(),d("mifosxHasPermission","DELETE_STANDINGINSTRUCTION"))}function Ka(t,s){if(t&1&&(a(0,"button",19),r(1,"translate"),C(2,"i",24),i()),t&2){let e=f().$implicit;d("matTooltip",Mt(c(1,3,"tooltips.View Standing Instruction")))("routerLink",ge(5,Ia,e.id))}}function Qa(t,s){if(t&1&&(a(0,"td",17),x(1,La,2,1,"span"),x(2,Wa,2,1,"span"),h(3,Ka,3,7,"button",18),i()),t&2){let e=s.$implicit;n(),D(e.status.value!=="Deleted"?1:-1),n(),D(e.status.value!=="Deleted"?2:-1),n(),d("mifosxHasPermission","READ_STANDINGINSTRUCTION")}}function Ya(t,s){t&1&&C(0,"tr",25)}function Ja(t,s){t&1&&C(0,"tr",26)}var on=(()=>{class t{constructor(){this.route=_(N),this.recurringDepositsService=_(k),this.dialog=_(Xt),this.accountTransfersService=_(si),this.settingsService=_($),this.dataSource=new _e,this.displayedColumns=["client","fromAccount","beneficiary","toAccount","amount","validity","actions"],this.route.parent.data.subscribe(e=>{this.recurringDepositsData=e.recurringDepositsAccountData})}ngOnInit(){this.getStandingInstructions()}getStandingInstructions(){let e=this.recurringDepositsData.clientId,l=this.recurringDepositsData.clientName,p=this.recurringDepositsData.id,g=this.settingsService.language.code,b=this.settingsService.dateFormat;this.recurringDepositsService.getStandingInstructions(e,l,p,g,b).subscribe(G=>{this.instructionsData=G.pageItems,this.dataSource.data=this.instructionsData,this.instructionTableRef.renderRows()})}deleteStandingInstruction(e){this.dialog.open(ce,{data:{deleteContext:`standing instruction id: ${e}`}}).afterClosed().subscribe(p=>{p.delete&&this.accountTransfersService.deleteStandingInstrucions(e).subscribe(()=>{})})}static{this.\u0275fac=function(l){return new(l||t)}}static{this.\u0275cmp=O({type:t,selectors:[["mifosx-standing-instructions-tab"]],viewQuery:function(l,p){if(l&1&&Pt(ya,7),l&2){let g;Tt(g=St())&&(p.instructionTableRef=g.first)}},decls:31,vars:6,consts:[["instructionsTable",""],[1,"tab-container","mat-typography"],[1,"m-b-10"],[1,"mat-elevation-z1","m-b-25"],["mat-table","",3,"dataSource"],["matColumnDef","client"],["mat-header-cell","",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","fromAccount"],["matColumnDef","beneficiary"],["matColumnDef","toAccount"],["matColumnDef","amount"],["matColumnDef","validity"],["matColumnDef","actions"],["mat-header-row","",4,"matHeaderRowDef"],["mat-row","",4,"matRowDef","matRowDefColumns"],["mat-header-cell",""],["mat-cell",""],["class","account-action-button","mat-raised-button","","color","primary",3,"matTooltip","routerLink",4,"mifosxHasPermission"],["mat-raised-button","","color","primary",1,"account-action-button",3,"matTooltip","routerLink"],[1,"fa","fa-edit"],["class","account-action-button","mat-raised-button","","color","warn",3,"matTooltip","click",4,"mifosxHasPermission"],["mat-raised-button","","color","warn",1,"account-action-button",3,"click","matTooltip"],[1,"fa","fa-times"],[1,"fa","fa-eye"],["mat-header-row",""],["mat-row",""]],template:function(l,p){l&1&&(a(0,"div",1)(1,"div",2)(2,"h3"),o(3),r(4,"translate"),i()(),a(5,"div",3)(6,"table",4,0),v(8,5),h(9,Ra,3,3,"th",6)(10,wa,2,2,"td",7),P(),v(11,8),h(12,Ea,3,3,"th",6)(13,Ba,2,2,"td",7),P(),v(14,9),h(15,Fa,3,3,"th",6)(16,ka,2,1,"td",7),P(),v(17,10),h(18,Na,3,3,"th",6)(19,Va,2,2,"td",7),P(),v(20,11),h(21,qa,3,3,"th",6)(22,Ga,2,2,"td",7),P(),v(23,12),h(24,Ha,3,3,"th",6)(25,Ua,4,6,"td",7),P(),v(26,13),h(27,$a,3,3,"th",6)(28,Qa,4,3,"td",7),P(),h(29,Ya,1,0,"tr",14)(30,Ja,1,0,"tr",15),i()()()),l&2&&(n(3),m(c(4,4,"labels.heading.All Standing Instructions")),n(3),d("dataSource",p.dataSource),n(23),d("matHeaderRowDef",p.displayedColumns),n(),d("matRowDefColumns",p.displayedColumns))},dependencies:[I,R,Q,V,re,wt,Ft,Bt,kt,Et,Nt,oe,Vt,Gt,qt,Ht,It,w],styles:[".tab-container[_ngcontent-%COMP%]{padding:1%;margin:1%}.tab-container[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{margin:1% auto}.tab-container[_ngcontent-%COMP%] .action-button[_ngcontent-%COMP%]{margin-left:auto}.tab-container[_ngcontent-%COMP%] table[_ngcontent-%COMP%]{width:100%}.tab-container[_ngcontent-%COMP%] table[_ngcontent-%COMP%] .account-action-button[_ngcontent-%COMP%]{min-width:26px;padding:0 6px;margin:4px;line-height:25px}"]})}}return t})();var Xa=["chargesTable"],Za=()=>[2e3];function to(t,s){t&1&&(a(0,"th",21),o(1),r(2,"translate"),i()),t&2&&(n(),m(c(2,1,"labels.inputs.name")))}function eo(t,s){if(t&1&&(a(0,"td",22),o(1),i()),t&2){let e=s.$implicit;n(),m(e.name)}}function no(t,s){t&1&&(a(0,"th",21),o(1),r(2,"translate"),i()),t&2&&(n(),m(c(2,1,"labels.inputs.Fee/Penalty")))}function io(t,s){if(t&1&&(a(0,"td",22),o(1),i()),t&2){let e=s.$implicit;n(),m(e.penalty===!0?"Penalty":"Fee")}}function ao(t,s){t&1&&(a(0,"th",21),o(1),r(2,"translate"),i()),t&2&&(n(),m(c(2,1,"labels.inputs.Payment Due At")))}function oo(t,s){if(t&1&&(a(0,"td",22),o(1),i()),t&2){let e=s.$implicit;n(),m(e.chargeTimeType.value)}}function ro(t,s){t&1&&(a(0,"th",21),o(1),r(2,"translate"),i()),t&2&&(n(),m(c(2,1,"labels.inputs.Due As Of")))}function co(t,s){if(t&1&&(a(0,"td",22),o(1),r(2,"dateFormat"),i()),t&2){let e=s.$implicit;n(),m(c(2,1,e.dueDate))}}function po(t,s){t&1&&(a(0,"th",21),o(1),r(2,"translate"),i()),t&2&&(n(),m(c(2,1,"labels.inputs.Repeats On")))}function so(t,s){if(t&1&&(a(0,"td",22),o(1),r(2,"dateFormat"),i()),t&2){let e=s.$implicit;n(),u(" ",e.feeOnMonthDay?B(2,1,K(4,Za).concat(e.feeOnMonthDay),"dd MMMM"):"Unassigned"," ")}}function lo(t,s){t&1&&(a(0,"th",21),o(1),r(2,"translate"),i()),t&2&&(n(),m(c(2,1,"labels.inputs.Calculation Type")))}function mo(t,s){if(t&1&&(a(0,"td",22),o(1),i()),t&2){let e=s.$implicit;n(),m(e.chargeCalculationType.value)}}function uo(t,s){t&1&&(a(0,"th",21),o(1),r(2,"translate"),i()),t&2&&(n(),m(c(2,1,"labels.inputs.Due")))}function go(t,s){if(t&1&&(a(0,"td",22),o(1),i()),t&2){let e=s.$implicit;n(),A("",e.currency.displaySymbol,"\xA0",e.amount)}}function Co(t,s){t&1&&(a(0,"th",21),o(1),r(2,"translate"),i()),t&2&&(n(),m(c(2,1,"labels.inputs.Paid")))}function _o(t,s){if(t&1&&(a(0,"td",22),o(1),i()),t&2){let e=s.$implicit;n(),A("",e.currency.displaySymbol,"\xA0",e.amountPaid)}}function fo(t,s){t&1&&(a(0,"th",21),o(1),r(2,"translate"),i()),t&2&&(n(),m(c(2,1,"labels.inputs.Waived")))}function ho(t,s){if(t&1&&(a(0,"td",22),o(1),i()),t&2){let e=s.$implicit;n(),A("",e.currency.displaySymbol,"\xA0",e.amountWaived)}}function xo(t,s){t&1&&(a(0,"th",21),o(1),r(2,"translate"),i()),t&2&&(n(),m(c(2,1,"labels.inputs.Outstanding")))}function Do(t,s){if(t&1&&(a(0,"td",22),o(1),i()),t&2){let e=s.$implicit;n(),A(" ",e.currency.displaySymbol,"\xA0",e.amountOutstanding," ")}}function bo(t,s){t&1&&(a(0,"th",21),o(1),r(2,"translate"),i()),t&2&&(n(),m(c(2,1,"labels.inputs.Actions")))}function vo(t,s){if(t&1){let e=y();a(0,"button",25),r(1,"translate"),T("click",function(p){S(e);let g=f(2).$implicit,b=f();return b.routeEdit(p),M(b.editCharge(g))}),C(2,"i",26),i()}t&2&&d("matTooltip",Mt(c(1,2,"tooltips.Edit Charge")))}function Po(t,s){if(t&1){let e=y();a(0,"button",27),r(1,"translate"),T("click",function(p){S(e);let g=f(2).$implicit,b=f();return b.routeEdit(p),M(b.deleteCharge(g.id))}),C(2,"i",28),i()}t&2&&d("matTooltip",Mt(c(1,2,"tooltips.Delete Charge")))}function To(t,s){t&1&&(a(0,"span"),h(1,vo,3,4,"button",23)(2,Po,3,4,"button",24),i()),t&2&&(n(),d("mifosxHasPermission","UPDATE_SAVINGSACCOUNTCHARGE"),n(),d("mifosxHasPermission","DELETE_SAVINGSACCOUNTCHARGE"))}function So(t,s){if(t&1){let e=y();a(0,"button",25),r(1,"translate"),T("click",function(p){S(e);let g=f(3).$implicit,b=f();return b.routeEdit(p),M(b.payCharge(g.id))}),C(2,"i",29),i()}t&2&&d("matTooltip",Mt(c(1,2,"tooltips.Pay Charge")))}function Mo(t,s){if(t&1){let e=y();a(0,"button",25),r(1,"translate"),T("click",function(p){S(e);let g=f(3).$implicit,b=f();return b.routeEdit(p),M(b.waiveCharge(g.id))}),C(2,"i",30),i()}t&2&&d("matTooltip",Mt(c(1,2,"tooltips.Waive Charge")))}function Ao(t,s){t&1&&(a(0,"span"),h(1,So,3,4,"button",23)(2,Mo,3,4,"button",23),i()),t&2&&(n(),d("mifosxHasPermission","PAY_SAVINGSACCOUNTCHARGE"),n(),d("mifosxHasPermission","WAIVE_SAVINGSACCOUNTCHARGE"))}function yo(t,s){if(t&1&&(a(0,"span"),x(1,Ao,3,2,"span"),i()),t&2){let e=f().$implicit;n(),D(e.chargeTimeType.value==="Monthly Fee"||e.chargeTimeType.value==="Annual Fee"||e.chargeTimeType.value==="Specified due date"?1:-1)}}function Oo(t,s){if(t&1&&(a(0,"td",22),x(1,To,3,2,"span"),x(2,yo,2,1,"span"),i()),t&2){let e=s.$implicit,l=f();n(),D(l.recurringDepositsAccountData.status.value==="Submitted and pending approval"?1:-1),n(),D(l.recurringDepositsAccountData.status.value!=="Submitted and pending approval"&&e.amountOutstanding!==0?2:-1)}}function Io(t,s){t&1&&C(0,"tr",31)}function Ro(t,s){t&1&&C(0,"tr",32)}var rn=(()=>{class t{constructor(){this.route=_(N),this.savingsService=_(pe),this.dateUtils=_(X),this.router=_(W),this.dialog=_(Xt),this.translateService=_(Ie),this.settingsService=_($),this.showInactiveCharges=!1,this.displayedColumns=["name","feeOrPenalty","paymentDueAt","dueAsOf","repeatsOn","calculationType","due","paid","waived","outstanding","actions"],this.route.parent.data.subscribe(e=>{this.recurringDepositsAccountData=e.recurringDepositsAccountData,this.chargesData=this.recurringDepositsAccountData.charges})}ngOnInit(){let e=this.chargesData?this.chargesData.filter(l=>l.isActive):[];this.dataSource=new _e(e)}payCharge(e){let l=[new we({controlName:"amount",label:"Amount",value:"",type:"number",required:!0}),new Ze({controlName:"dueDate",label:"Payment Date",value:"",type:"date",required:!0})],p={title:`Pay Charge ${e}`,layout:{addButtonText:"Confirm"},formfields:l};this.dialog.open(Ce,{data:p}).afterClosed().subscribe(b=>{if(b.data){let G=this.settingsService.language.code,ue=this.settingsService.dateFormat,ie=J(F({},b.data.value),{dueDate:this.dateUtils.formatDate(b.data.value.dueDate,ue),dateFormat:ue,locale:G});this.savingsService.executeSavingsAccountChargesCommand(this.recurringDepositsAccountData.id,"paycharge",ie,e).subscribe(()=>{this.reload()})}})}waiveCharge(e){this.dialog.open(Kt,{data:{heading:this.translateService.instant("labels.heading.Waive Charge"),dialogContext:this.translateService.instant("labels.dialogContext.Are you sure you want to waive charge with id: ")+`${e} ?`}}).afterClosed().subscribe(p=>{p.confirm&&this.savingsService.executeSavingsAccountChargesCommand(this.recurringDepositsAccountData.id,"waive",{},e).subscribe(()=>{this.reload()})})}editCharge(e){let l=[new we({controlName:"amount",label:"Amount",value:e.amount||e.amountOrPercentage,type:"number",required:!0})],p={title:`Edit Charge ${e.id}`,layout:{addButtonText:"Confirm"},formfields:l};this.dialog.open(Ce,{data:p}).afterClosed().subscribe(b=>{if(b.data){let ie=J(F({},b.data.value),{dateFormat:"dd MMMM yyyy",locale:"en"});this.savingsService.editSavingsAccountCharge(this.recurringDepositsAccountData.id,ie,e.id).subscribe(()=>{this.reload()})}})}deleteCharge(e){this.dialog.open(ce,{data:{deleteContext:`charge id:${e}`}}).afterClosed().subscribe(p=>{p.delete&&this.savingsService.deleteSavingsAccountCharge(this.recurringDepositsAccountData.id,e).subscribe(()=>{this.reload()})})}routeEdit(e){e.stopPropagation()}reload(){let e=this.recurringDepositsAccountData.clientId,l=this.router.url;this.router.navigateByUrl(`/clients/${e}/recurring-deposits-accounts`,{skipLocationChange:!0}).then(()=>this.router.navigate([l]))}static{this.\u0275fac=function(l){return new(l||t)}}static{this.\u0275cmp=O({type:t,selectors:[["mifosx-charges-tab"]],viewQuery:function(l,p){if(l&1&&Pt(Xa,7),l&2){let g;Tt(g=St())&&(p.chargesTableRef=g.first)}},decls:44,vars:6,consts:[["chargesTable",""],[1,"tab-container","mat-typography"],[1,"layout-row","align-start"],[1,"m-b-10"],[1,"mat-elevation-z1","m-b-25"],["mat-table","",3,"dataSource"],["matColumnDef","name"],["mat-header-cell","",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","feeOrPenalty"],["matColumnDef","paymentDueAt"],["matColumnDef","dueAsOf"],["matColumnDef","repeatsOn"],["matColumnDef","calculationType"],["matColumnDef","due"],["matColumnDef","paid"],["matColumnDef","waived"],["matColumnDef","outstanding"],["matColumnDef","actions"],["mat-header-row","",4,"matHeaderRowDef"],["mat-row","",4,"matRowDef","matRowDefColumns"],["mat-header-cell",""],["mat-cell",""],["class","account-action-button","mat-raised-button","","color","primary",3,"matTooltip","click",4,"mifosxHasPermission"],["class","account-action-button","mat-raised-button","","color","warn",3,"matTooltip","click",4,"mifosxHasPermission"],["mat-raised-button","","color","primary",1,"account-action-button",3,"click","matTooltip"],[1,"fa","fa-pencil"],["mat-raised-button","","color","warn",1,"account-action-button",3,"click","matTooltip"],[1,"fa","fa-trash"],[1,"fa","fa-dollar"],[1,"fa","fa-flag"],["mat-header-row",""],["mat-row",""]],template:function(l,p){l&1&&(a(0,"div",1)(1,"div",2)(2,"div",3)(3,"h3"),o(4),r(5,"translate"),i()()(),a(6,"div",4)(7,"table",5,0),v(9,6),h(10,to,3,3,"th",7)(11,eo,2,1,"td",8),P(),v(12,9),h(13,no,3,3,"th",7)(14,io,2,1,"td",8),P(),v(15,10),h(16,ao,3,3,"th",7)(17,oo,2,1,"td",8),P(),v(18,11),h(19,ro,3,3,"th",7)(20,co,3,3,"td",8),P(),v(21,12),h(22,po,3,3,"th",7)(23,so,3,5,"td",8),P(),v(24,13),h(25,lo,3,3,"th",7)(26,mo,2,1,"td",8),P(),v(27,14),h(28,uo,3,3,"th",7)(29,go,2,2,"td",8),P(),v(30,15),h(31,Co,3,3,"th",7)(32,_o,2,2,"td",8),P(),v(33,16),h(34,fo,3,3,"th",7)(35,ho,2,2,"td",8),P(),v(36,17),h(37,xo,3,3,"th",7)(38,Do,2,2,"td",8),P(),v(39,18),h(40,bo,3,3,"th",7)(41,Oo,3,2,"td",8),P(),h(42,Io,1,0,"tr",19)(43,Ro,1,0,"tr",20),i()()()),l&2&&(n(4),m(c(5,4,"labels.heading.All Charges")),n(3),d("dataSource",p.dataSource),n(35),d("matHeaderRowDef",p.displayedColumns),n(),d("matRowDefColumns",p.displayedColumns))},dependencies:[I,R,V,re,wt,Ft,Bt,kt,Et,Nt,oe,Vt,Gt,qt,Ht,It,w],styles:[".tab-container[_ngcontent-%COMP%]{padding:1%;margin:1%}.tab-container[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{margin:1% auto}.tab-container[_ngcontent-%COMP%] .action-button[_ngcontent-%COMP%]{margin-left:auto}.tab-container[_ngcontent-%COMP%] table[_ngcontent-%COMP%]{width:100%}.tab-container[_ngcontent-%COMP%] table[_ngcontent-%COMP%] .account-action-button[_ngcontent-%COMP%]{min-width:26px;padding:0 6px;margin:4px;line-height:25px}"]})}}return t})();var cn=(()=>{class t{constructor(){this.route=_(N),this.entityId=this.route.parent.parent.snapshot.paramMap.get("recurringDepositAccountId"),this.route.data.subscribe(e=>{this.entityDatatable=e.savingsDatatable,this.multiRowDatatableFlag=this.entityDatatable.columnHeaders[0].columnName==="id"})}static{this.\u0275fac=function(l){return new(l||t)}}static{this.\u0275cmp=O({type:t,selectors:[["mifosx-datatable-tabs"]],decls:2,vars:3,consts:[[1,"tab-container","mat-typography"],["entityType","Recurring Deposit",3,"entityId","multiRowDatatableFlag","entityDatatable"]],template:function(l,p){l&1&&(a(0,"div",0),C(1,"mifosx-entity-datatable-tab",1),i()),l&2&&(n(),d("entityId",p.entityId)("multiRowDatatableFlag",p.multiRowDatatableFlag)("entityDatatable",p.entityDatatable))},dependencies:[I,R,oi],encapsulation:2})}}return t})();function wo(t,s){if(t&1&&(a(0,"mat-option",5),o(1),i()),t&2){let e=s.$implicit;d("value",e.id),n(),u(" ",e.name," ")}}function Eo(t,s){if(t&1){let e=y();a(0,"mat-form-field",11),T("click",function(){S(e);let p=E(7);return M(p.open())}),a(1,"mat-label"),o(2),r(3,"translate"),i(),C(4,"input",12)(5,"mat-datepicker-toggle",13)(6,"mat-datepicker",null,0),a(8,"mat-error"),o(9),r(10,"translate"),r(11,"translate"),a(12,"strong"),o(13),r(14,"translate"),i()()()}if(t&2){let e=E(7),l=f();n(2),m(c(3,8,"labels.inputs.Submitted On")),n(2),d("min",l.minDate)("max",l.maxDate)("matDatepicker",e),n(),d("for",e),n(4),A(" ",c(10,10,"labels.inputs.Submission Date")," ",c(11,12,"labels.commons.is")," "),n(4),m(c(14,14,"labels.commons.required"))}}function Bo(t,s){if(t&1&&(a(0,"mat-option",5),o(1),i()),t&2){let e=s.$implicit;d("value",e.id),n(),u(" ",e.displayName," ")}}function Fo(t,s){if(t&1&&(a(0,"mat-form-field",3)(1,"mat-label"),o(2),r(3,"translate"),i(),a(4,"mat-select",14),L(5,Bo,2,2,"mat-option",5,z),i()()),t&2){let e=f();n(2),m(c(3,1,"labels.inputs.Field Officer")),n(3),j(e.fieldOfficerData)}}function ko(t,s){t&1&&(a(0,"mat-form-field",3)(1,"mat-label"),o(2),r(3,"translate"),i(),C(4,"input",15),r(5,"translate"),i()),t&2&&(n(2),m(c(3,3,"labels.inputs.External id")),n(2),d("matTooltip",Mt(c(5,5,"tooltips.Provides an external id"))))}var se=(()=>{class t{constructor(){this.formBuilder=_(st),this.recurringDepositsService=_(k),this.settingsService=_($),this.minDate=new Date(2e3,0,1),this.maxDate=new Date,this.isFieldOfficerPatched=!1,this.isProductSelected=!1,this.recurringDepositsAccountProductTemplate=new Ve,this.createRecurringDepositsAccountDetailsForm()}ngOnInit(){this.maxDate=this.settingsService.businessDate,this.buildDependencies(),this.recurringDepositsAccountTemplate&&(this.productData=this.recurringDepositsAccountTemplate.productOptions,this.recurringDepositsAccountTemplate.depositProductId&&this.recurringDepositAccountDetailsForm.patchValue({productId:this.recurringDepositsAccountTemplate.depositProductId,submittedOnDate:this.recurringDepositsAccountTemplate.timeline.submittedOnDate&&new Date(this.recurringDepositsAccountTemplate.timeline.submittedOnDate),externalId:this.recurringDepositsAccountTemplate.externalId}))}createRecurringDepositsAccountDetailsForm(){this.recurringDepositAccountDetailsForm=this.formBuilder.group({productId:["",q.required],submittedOnDate:["",q.required],fieldOfficerId:[""],externalId:[""]})}buildDependencies(){let e=this.recurringDepositsAccountTemplate.clientId;this.recurringDepositAccountDetailsForm.get("productId").valueChanges.subscribe(l=>{this.recurringDepositsService.getRecurringDepositsAccountTemplate(e,l).subscribe(p=>{this.recurringDepositsAccountProductTemplate.emit(p),this.fieldOfficerData=p.fieldOfficerOptions,this.isProductSelected=!0,!this.isFieldOfficerPatched&&this.recurringDepositsAccountTemplate.fieldOfficerId?(this.recurringDepositAccountDetailsForm.get("fieldOfficerId").patchValue(this.recurringDepositsAccountTemplate.fieldOfficerId),this.isFieldOfficerPatched=!0):this.recurringDepositAccountDetailsForm.get("fieldOfficerId").patchValue("")})})}get recurringDepositAccountDetails(){return this.recurringDepositAccountDetailsForm.value}static{this.\u0275fac=function(l){return new(l||t)}}static{this.\u0275cmp=O({type:t,selectors:[["mifosx-recurring-deposits-account-details-step"]],inputs:{recurringDepositsAccountTemplate:"recurringDepositsAccountTemplate"},outputs:{recurringDepositsAccountProductTemplate:"recurringDepositsAccountProductTemplate"},decls:28,vars:23,consts:[["submittedOnDatePicker",""],[3,"formGroup"],[1,"layout-row-wrap","gap-2px","responsive-column"],[1,"flex-48"],["formControlName","productId","required",""],[3,"value"],[1,"layout-row","align-center","gap-2percent","margin-t","responsive-column"],["mat-raised-button","","matStepperPrevious","","disabled",""],["icon","arrow-left",1,"m-r-10"],["mat-raised-button","","matStepperNext","",3,"disabled"],["icon","arrow-right",1,"m-l-10"],[1,"flex-48",3,"click"],["matInput","","formControlName","submittedOnDate","required","",3,"min","max","matDatepicker"],["matSuffix","",3,"for"],["formControlName","fieldOfficerId"],["matInput","","formControlName","externalId",3,"matTooltip"]],template:function(l,p){if(l&1&&(a(0,"form",1)(1,"div",2)(2,"mat-form-field",3)(3,"mat-label"),o(4),r(5,"translate"),i(),a(6,"mat-select",4),L(7,wo,2,2,"mat-option",5,z),i(),a(9,"mat-error"),o(10),r(11,"translate"),r(12,"translate"),a(13,"strong"),o(14),r(15,"translate"),i()()(),x(16,Eo,15,16,"mat-form-field",3),x(17,Fo,7,3,"mat-form-field",3),x(18,ko,6,7,"mat-form-field",3),i(),a(19,"div",6)(20,"button",7),C(21,"fa-icon",8),o(22),r(23,"translate"),i(),a(24,"button",9),o(25),r(26,"translate"),C(27,"fa-icon",10),i()()()),l&2){let g;d("formGroup",p.recurringDepositAccountDetailsForm),n(4),m(c(5,11,"labels.inputs.Product Name")),n(3),j(p.productData),n(3),A(" ",c(11,13,"labels.inputs.Product Name")," ",c(12,15,"labels.commons.is")," "),n(4),m(c(15,17,"labels.commons.required")),n(2),D(p.isProductSelected?16:-1),n(),D(p.isProductSelected?17:-1),n(),D(p.isProductSelected?18:-1),n(4),u(" ",c(23,19,"labels.buttons.Previous")," "),n(2),d("disabled",!((g=p.recurringDepositAccountDetailsForm.get("productId"))!=null&&g.value)||!((g=p.recurringDepositAccountDetailsForm.get("submittedOnDate"))!=null&&g.value)),n(),u(" ",c(26,21,"labels.buttons.Next")," ")}},dependencies:[I,R,rt,mt,Z,ot,dt,ct,pt,nt,et,gt,ht,Ct,Ot,yt,Dt,bt,xt,V,oe,jt,_t,Zt,w],styles:[".margin-t[_ngcontent-%COMP%]{margin-top:1em}"]})}}return t})();function No(t,s){if(t&1&&(a(0,"mat-option",4),o(1),r(2,"translateKey"),i()),t&2){let e=s.$implicit;d("value",e.id),n(),u(" ",B(2,2,e.value,"catalogs")," ")}}function Vo(t,s){if(t&1&&(a(0,"mat-option",4),o(1),r(2,"translateKey"),i()),t&2){let e=s.$implicit;d("value",e.id),n(),u(" ",B(2,2,e.value,"catalogs")," ")}}function qo(t,s){if(t&1&&(a(0,"mat-option",4),o(1),r(2,"translateKey"),i()),t&2){let e=s.$implicit;d("value",e.id),n(),u(" ",B(2,2,e.value,"catalogs")," ")}}function Go(t,s){if(t&1&&(a(0,"mat-option",4),o(1),r(2,"translateKey"),i()),t&2){let e=s.$implicit;d("value",e.id),n(),u(" ",B(2,2,e.value,"catalogs")," ")}}var le=(()=>{class t{constructor(){this.formBuilder=_(st),this.settingsService=_($),this.minDate=new Date(2e3,0,1),this.maxDate=new Date,this.createRecurringDepositsAccountTermsForm()}ngOnChanges(){this.recurringDepositsAccountProductTemplate&&this.setOptions()}ngOnInit(){this.maxDate=this.settingsService.businessDate,this.recurringDepositsAccountTemplate.id&&this.recurringDepositAccountTermsForm.patchValue({interestCompoundingPeriodType:this.recurringDepositsAccountTemplate.interestCompoundingPeriodType.id,interestPostingPeriodType:this.recurringDepositsAccountTemplate.interestPostingPeriodType.id,interestCalculationType:this.recurringDepositsAccountTemplate.interestCalculationType.id,interestCalculationDaysInYearType:this.recurringDepositsAccountTemplate.interestCalculationDaysInYearType.id})}createRecurringDepositsAccountTermsForm(){this.recurringDepositAccountTermsForm=this.formBuilder.group({interestCompoundingPeriodType:["",q.required],interestPostingPeriodType:["",q.required],interestCalculationType:["",q.required],interestCalculationDaysInYearType:["",q.required]})}setOptions(){this.interestCompoundingPeriodTypeData=this.recurringDepositsAccountProductTemplate.interestCompoundingPeriodTypeOptions,this.interestPostingPeriodTypeData=this.recurringDepositsAccountProductTemplate.interestPostingPeriodTypeOptions,this.interestCalculationTypeData=this.recurringDepositsAccountProductTemplate.interestCalculationTypeOptions,this.interestCalculationDaysInYearTypeData=this.recurringDepositsAccountProductTemplate.interestCalculationDaysInYearTypeOptions,this.recurringDepositsAccountTemplate.id||this.recurringDepositAccountTermsForm.patchValue({interestCompoundingPeriodType:this.recurringDepositsAccountProductTemplate.interestCompoundingPeriodType.id,interestPostingPeriodType:this.recurringDepositsAccountProductTemplate.interestPostingPeriodType.id,interestCalculationType:this.recurringDepositsAccountProductTemplate.interestCalculationType.id,interestCalculationDaysInYearType:this.recurringDepositsAccountProductTemplate.interestCalculationDaysInYearType.id})}get recurringDepositAccountTerms(){return this.recurringDepositAccountTermsForm.value}static{this.\u0275fac=function(l){return new(l||t)}}static{this.\u0275cmp=O({type:t,selectors:[["mifosx-recurring-deposits-account-terms-step"]],inputs:{recurringDepositsAccountTemplate:"recurringDepositsAccountTemplate",recurringDepositsAccountProductTemplate:"recurringDepositsAccountProductTemplate"},features:[Yt],decls:67,vars:55,consts:[[3,"formGroup"],[1,"layout-row-wrap","gap-2px","responsive-column"],[1,"flex-48"],["formControlName","interestCompoundingPeriodType","required",""],[3,"value"],["formControlName","interestPostingPeriodType","required",""],["formControlName","interestCalculationType","required",""],["formControlName","interestCalculationDaysInYearType","required",""],[1,"layout-row","align-center","gap-2percent","margin-t","responsive-column"],["mat-raised-button","","matStepperPrevious",""],["icon","arrow-left",1,"m-r-10"],["mat-raised-button","","matStepperNext",""],["icon","arrow-right",1,"m-l-10"]],template:function(l,p){l&1&&(a(0,"form",0)(1,"div",1)(2,"mat-form-field",2)(3,"mat-label"),o(4),r(5,"translate"),i(),a(6,"mat-select",3),L(7,No,3,5,"mat-option",4,z),i(),a(9,"mat-error"),o(10),r(11,"translate"),r(12,"translate"),a(13,"strong"),o(14),r(15,"translate"),i()()(),a(16,"mat-form-field",2)(17,"mat-label"),o(18),r(19,"translate"),i(),a(20,"mat-select",5),L(21,Vo,3,5,"mat-option",4,z),i(),a(23,"mat-error"),o(24),r(25,"translate"),r(26,"translate"),a(27,"strong"),o(28),r(29,"translate"),i()()(),a(30,"mat-form-field",2)(31,"mat-label"),o(32),r(33,"translate"),i(),a(34,"mat-select",6),L(35,qo,3,5,"mat-option",4,z),i(),a(37,"mat-error"),o(38),r(39,"translate"),r(40,"translate"),a(41,"strong"),o(42),r(43,"translate"),i()()(),a(44,"mat-form-field",2)(45,"mat-label"),o(46),r(47,"translate"),i(),a(48,"mat-select",7),L(49,Go,3,5,"mat-option",4,z),i(),a(51,"mat-error"),o(52),r(53,"translate"),r(54,"translate"),a(55,"strong"),o(56),r(57,"translate"),i()()()(),a(58,"div",8)(59,"button",9),C(60,"fa-icon",10),o(61),r(62,"translate"),i(),a(63,"button",11),o(64),r(65,"translate"),C(66,"fa-icon",12),i()()()),l&2&&(d("formGroup",p.recurringDepositAccountTermsForm),n(4),m(c(5,19,"labels.inputs.Interest Compounding Period")),n(3),j(p.interestCompoundingPeriodTypeData),n(3),A(" ",c(11,21,"labels.inputs.Interest Compounding Period")," ",c(12,23,"labels.commons.is")," "),n(4),m(c(15,25,"labels.commons.required")),n(4),m(c(19,27,"labels.inputs.Interest Posting Period")),n(3),j(p.interestPostingPeriodTypeData),n(3),A(" ",c(25,29,"labels.inputs.Interest Posting Period")," ",c(26,31,"labels.commons.is")," "),n(4),m(c(29,33,"labels.commons.required")),n(4),m(c(33,35,"labels.inputs.Interest Calculated using")),n(3),j(p.interestCalculationTypeData),n(3),A(" ",c(39,37,"labels.inputs.Interest Calculated using")," ",c(40,39,"labels.commons.is")," "),n(4),m(c(43,41,"labels.commons.required")),n(4),m(c(47,43,"labels.inputs.Days in Year")),n(3),j(p.interestCalculationDaysInYearTypeData),n(3),A(" ",c(53,45,"labels.inputs.Days in Year")," ",c(54,47,"labels.commons.is")," "),n(4),m(c(57,49,"labels.commons.required")),n(5),u(" ",c(62,51,"labels.buttons.Previous")," "),n(3),u(" ",c(65,53,"labels.buttons.Next")," "))},dependencies:[I,R,rt,Z,ot,dt,ct,pt,nt,et,gt,Ot,yt,V,jt,_t,Zt,w,Rt],encapsulation:2})}}return t})();function Ho(t,s){if(t&1&&(a(0,"mat-option",10),o(1),r(2,"translateKey"),i()),t&2){let e=s.$implicit;d("value",e.id),n(),u(" ",B(2,2,e.value,"catalogs")," ")}}function Uo(t,s){if(t&1&&C(0,"mifosx-input-amount",11),t&2){let e=f();d("currency",e.currency)("isRequired",!0)("inputFormControl",e.recurringDepositAccountSettingsForm.controls.mandatoryRecommendedDepositAmount)("inputLabel","Recurring Deposit Amount")}}function $o(t,s){if(t&1&&(a(0,"mat-option",10),o(1),r(2,"translateKey"),i()),t&2){let e=s.$implicit;d("value",e.id),n(),u(" ",B(2,2,e.value,"catalogs")," ")}}function zo(t,s){if(t&1&&(a(0,"mat-option",10),o(1),r(2,"translateKey"),i()),t&2){let e=s.$implicit;d("value",e.id),n(),u(" ",B(2,2,e.value,"catalogs")," ")}}function Lo(t,s){if(t&1){let e=y();a(0,"mat-form-field",31),T("click",function(){S(e);let p=E(7);return M(p.open())}),a(1,"mat-label"),o(2),r(3,"translate"),i(),C(4,"input",32)(5,"mat-datepicker-toggle",33)(6,"mat-datepicker",null,0),i(),a(8,"h4",6),o(9),r(10,"translate"),i(),a(11,"mat-form-field",7)(12,"mat-label"),o(13),r(14,"translate"),i(),C(15,"input",34),a(16,"mat-error"),o(17),r(18,"translate"),r(19,"translate"),a(20,"strong"),o(21),r(22,"translate"),i()()(),a(23,"mat-form-field",7)(24,"mat-label"),o(25),r(26,"translate"),i(),a(27,"mat-select",35),L(28,zo,3,5,"mat-option",10,z),i(),a(30,"mat-error"),o(31),r(32,"translate"),r(33,"translate"),a(34,"strong"),o(35),r(36,"translate"),i()()()}if(t&2){let e=E(7),l=f();n(2),m(c(3,14,"labels.inputs.Deposit Start Date")),n(2),d("min",l.minDate)("max",l.maxDate)("matDatepicker",e),n(),d("for",e),n(4),m(c(10,16,"labels.heading.Deposit Frequency")),n(4),m(c(14,18,"labels.inputs.Deposit Frequency")),n(4),A(" ",c(18,20,"labels.inputs.Deposit Frequency")," ",c(19,22,"labels.commons.is")," "),n(4),m(c(22,24,"labels.commons.required")),n(4),m(c(26,26,"labels.inputs.Type")),n(3),j(l.periodFrequencyTypeData),n(3),A(" ",c(32,28,"labels.inputs.Deposit Frequency Type")," ",c(33,30,"labels.commons.is")," "),n(4),m(c(36,32,"labels.commons.required"))}}function jo(t,s){if(t&1&&(a(0,"mat-option",10),o(1),r(2,"translateKey"),i()),t&2){let e=s.$implicit;d("value",e.id),n(),u(" ",B(2,2,e.value,"catalogs")," ")}}function Wo(t,s){if(t&1&&(a(0,"mat-option",10),o(1),r(2,"translateKey"),i()),t&2){let e=s.$implicit;d("value",e.id),n(),u(" ",B(2,2,e.value,"catalogs")," ")}}function Ko(t,s){if(t&1&&(a(0,"mat-option",10),o(1),r(2,"translateKey"),i()),t&2){let e=s.$implicit;d("value",e.id),n(),u(" ",B(2,2,e.value,"catalogs")," ")}}function Qo(t,s){if(t&1&&(a(0,"mat-option",10),o(1),r(2,"translateKey"),i()),t&2){let e=s.$implicit;d("value",e.id),n(),u(" ",B(2,2,e.value,"catalogs")," ")}}function Yo(t,s){t&1&&(a(0,"mat-form-field",7)(1,"mat-label"),o(2),r(3,"translate"),i(),C(4,"input",37),i()),t&2&&(n(2),m(c(3,1,"labels.inputs.Tax Group")))}function Jo(t,s){if(t&1&&(a(0,"h4",6),o(1),r(2,"translate"),i(),a(3,"mat-checkbox",36),o(4),r(5,"translate"),i(),x(6,Yo,5,3,"mat-form-field",7)),t&2){let e=f();n(),m(c(2,3,"labels.heading.Tax Group")),n(3),u(" ",c(5,5,"labels.inputs.Is Withhold Tax Applicable"),"? "),n(2),D(e.recurringDepositAccountSettingsForm.controls.taxGroupId?6:-1)}}var me=(()=>{class t{constructor(){this.formBuilder=_(st),this.settingsService=_($),this.isNew=!0,this.minDate=new Date(2e3,0,1),this.maxDate=new Date,this.currency=null,this.createRecurringDepositAccountSettingsForm(),this.buildDependencies()}ngOnChanges(){let e=this.isNew?this.recurringDepositsAccountProductTemplate:this.recurringDepositsAccountTemplate;e&&(this.currency=e.currency,this.recurringDepositAccountSettingsForm.patchValue({isMandatoryDeposit:e.isMandatoryDeposit,adjustAdvanceTowardsFuturePayments:e.adjustAdvanceTowardsFuturePayments,allowWithdrawal:e.allowWithdrawal,lockinPeriodFrequency:e.lockinPeriodFrequency,lockinPeriodFrequencyType:e.lockinPeriodFrequencyType?e.lockinPeriodFrequencyType.id:"",minDepositTerm:e.minDepositTerm,minDepositTermTypeId:e.minDepositTermType?e.minDepositTermType.id:"",inMultiplesOfDepositTerm:e.inMultiplesOfDepositTerm,inMultiplesOfDepositTermTypeId:e.inMultiplesOfDepositTermType?e.inMultiplesOfDepositTermType.id:"",maxDepositTerm:e.maxDepositTerm,maxDepositTermTypeId:e.maxDepositTermType?e.maxDepositTermType.id:"",preClosurePenalApplicable:e.preClosurePenalApplicable,preClosurePenalInterest:e.preClosurePenalInterest,preClosurePenalInterestOnTypeId:e.preClosurePenalInterestOnType?e.preClosurePenalInterestOnType.id:"",minBalanceForInterestCalculation:e.minBalanceForInterestCalculation,depositPeriod:e.minDepositTerm,depositPeriodFrequencyId:e.minDepositTermType.id,expectedFirstDepositOnDate:e.expectedFirstDepositOnDate&&new Date(e.expectedFirstDepositOnDate),recurringFrequency:e.recurringFrequency,recurringFrequencyType:e.recurringFrequencyType?e.recurringFrequencyType.id:""}),e.withHoldTax?(this.recurringDepositAccountSettingsForm.addControl("withHoldTax",new tt(!1)),this.recurringDepositAccountSettingsForm.get("withHoldTax").valueChanges.subscribe(l=>{l?(this.recurringDepositAccountSettingsForm.addControl("taxGroupId",new tt({value:"",disabled:!0})),this.recurringDepositAccountSettingsForm.get("taxGroupId").patchValue(e.taxGroup&&e.taxGroup.name)):this.recurringDepositAccountSettingsForm.removeControl("taxGroupId")}),this.recurringDepositAccountSettingsForm.get("withHoldTax").patchValue(this.recurringDepositsAccountTemplate.withHoldTax)):this.recurringDepositAccountSettingsForm.removeControl("withHoldTax"),this.taxGroup=e.taxGroup,this.setOptions(e))}ngOnInit(){this.maxDate=this.settingsService.businessDate,this.recurringDepositsAccountTemplate&&this.recurringDepositAccountSettingsForm.patchValue({lockinPeriodFrequency:this.recurringDepositsAccountTemplate.lockinPeriodFrequency,lockinPeriodFrequencyType:this.recurringDepositsAccountTemplate.lockinPeriodFrequencyType&&this.recurringDepositsAccountTemplate.lockinPeriodFrequencyType.id,mandatoryRecommendedDepositAmount:this.recurringDepositsAccountTemplate.mandatoryRecommendedDepositAmount})}createRecurringDepositAccountSettingsForm(){this.recurringDepositAccountSettingsForm=this.formBuilder.group({isMandatoryDeposit:[""],adjustAdvanceTowardsFuturePayments:[""],allowWithdrawal:[""],lockinPeriodFrequency:[""],lockinPeriodFrequencyType:[""],mandatoryRecommendedDepositAmount:["",q.required],depositPeriod:["",q.required],depositPeriodFrequencyId:["",q.required],isCalendarInherited:[""],expectedFirstDepositOnDate:[""],recurringFrequency:["",q.required],recurringFrequencyType:["",q.required],minDepositTerm:[{value:"",disabled:!0}],minDepositTermTypeId:[{value:"",disabled:!0}],inMultiplesOfDepositTerm:[{value:"",disabled:!0}],inMultiplesOfDepositTermTypeId:[{value:"",disabled:!0}],maxDepositTerm:[{value:"",disabled:!0}],maxDepositTermTypeId:[{value:"",disabled:!0}],preClosurePenalApplicable:[{value:"",disabled:!0}],preClosurePenalInterest:[{value:"",disabled:!0}],preClosurePenalInterestOnTypeId:[{value:"",disabled:!0}],minBalanceForInterestCalculation:[{value:"",disabled:!0}]})}setOptions(e){this.lockinPeriodFrequencyTypeData=e.lockinPeriodFrequencyTypeOptions,this.periodFrequencyTypeData=e.periodFrequencyTypeOptions,this.preClosurePenalInterestOnTypeData=e.preClosurePenalInterestOnTypeOptions}buildDependencies(){this.recurringDepositAccountSettingsForm.get("isCalendarInherited").valueChanges.subscribe(e=>{e?(this.recurringDepositAccountSettingsForm.removeControl("expectedFirstDepositOnDate"),this.recurringDepositAccountSettingsForm.removeControl("recurringFrequency"),this.recurringDepositAccountSettingsForm.removeControl("recurringFrequencyType")):(this.recurringDepositAccountSettingsForm.addControl("expectedFirstDepositOnDate",new tt),this.recurringDepositAccountSettingsForm.addControl("recurringFrequency",new tt("")),this.recurringDepositAccountSettingsForm.addControl("recurringFrequencyType",new tt("")))})}get recurringDepositAccountSettings(){return this.recurringDepositAccountSettingsForm.value}static{this.\u0275fac=function(l){return new(l||t)}}static{this.\u0275cmp=O({type:t,selectors:[["mifosx-recurring-deposits-account-settings-step"]],inputs:{isNew:"isNew",recurringDepositsAccountTemplate:"recurringDepositsAccountTemplate",recurringDepositsAccountProductTemplate:"recurringDepositsAccountProductTemplate"},features:[Yt],decls:143,vars:103,consts:[["expectedFirstDepositOnDatePicker",""],[3,"formGroup"],[1,"layout-row-wrap","gap-2px","responsive-column"],["labelPosition","before","formControlName","isMandatoryDeposit",1,"margin-v","flex-48"],["labelPosition","before","formControlName","adjustAdvanceTowardsFuturePayments",1,"flex-48","margin-v"],["labelPosition","before","formControlName","allowWithdrawal",1,"margin-v","flex-48"],[1,"mat-h4","flex-98"],[1,"flex-48"],["type","number","matInput","","formControlName","lockinPeriodFrequency"],["formControlName","lockinPeriodFrequencyType"],[3,"value"],[1,"flex-48",3,"currency","isRequired","inputFormControl","inputLabel"],["type","number","matInput","","formControlName","depositPeriod","required",""],["formControlName","depositPeriodFrequencyId","required",""],["labelPosition","before","formControlName","isCalendarInherited",1,"margin-v","flex-48"],[1,"flex-98"],["type","number","matInput","","formControlName","minDepositTerm","required",""],["formControlName","minDepositTermTypeId","required",""],["type","number","matInput","","formControlName","inMultiplesOfDepositTerm"],["formControlName","inMultiplesOfDepositTermTypeId"],["type","number","matInput","","formControlName","maxDepositTerm"],["formControlName","maxDepositTermTypeId"],["labelPosition","before","formControlName","preClosurePenalApplicable",1,"flex-73","margin-v"],["type","number","matInput","","formControlName","preClosurePenalInterest"],["formControlName","preClosurePenalInterestOnTypeId"],["type","number","matInput","","formControlName","minBalanceForInterestCalculation"],[1,"layout-row","align-center","gap-2percent","margin-t","responsive-column"],["mat-raised-button","","matStepperPrevious",""],["icon","arrow-left",1,"m-r-10"],["mat-raised-button","","matStepperNext",""],["icon","arrow-right",1,"m-l-10"],[1,"flex-48",3,"click"],["matInput","","formControlName","expectedFirstDepositOnDate","required","",3,"min","max","matDatepicker"],["matSuffix","",3,"for"],["type","number","matInput","","formControlName","recurringFrequency","required",""],["formControlName","recurringFrequencyType","required",""],["labelPosition","before","formControlName","withHoldTax",1,"margin-v","flex-48"],["type","text","matInput","","formControlName","taxGroupId"]],template:function(l,p){l&1&&(a(0,"form",1)(1,"div",2)(2,"mat-checkbox",3),o(3),r(4,"translate"),i(),a(5,"mat-checkbox",4),o(6),r(7,"translate"),i(),a(8,"mat-checkbox",5),o(9),r(10,"translate"),i(),a(11,"h4",6),o(12),r(13,"translate"),i(),a(14,"mat-form-field",7)(15,"mat-label"),o(16),r(17,"translate"),i(),C(18,"input",8),i(),a(19,"mat-form-field",7)(20,"mat-label"),o(21),r(22,"translate"),i(),a(23,"mat-select",9),L(24,Ho,3,5,"mat-option",10,z),i()(),a(26,"h4",6),o(27),r(28,"translate"),i(),x(29,Uo,1,4,"mifosx-input-amount",11),a(30,"h4",6),o(31),r(32,"translate"),i(),a(33,"mat-form-field",7)(34,"mat-label"),o(35),r(36,"translate"),i(),C(37,"input",12),i(),a(38,"mat-form-field",7)(39,"mat-label"),o(40),r(41,"translate"),i(),a(42,"mat-select",13),L(43,$o,3,5,"mat-option",10,z),i()(),a(45,"mat-checkbox",14),o(46),r(47,"translate"),i(),x(48,Lo,37,34),C(49,"mat-divider",15),a(50,"h4",6),o(51),r(52,"translate"),i(),a(53,"mat-form-field",7)(54,"mat-label"),o(55),r(56,"translate"),i(),C(57,"input",16),a(58,"mat-error"),o(59),r(60,"translate"),r(61,"translate"),a(62,"strong"),o(63),r(64,"translate"),i()()(),a(65,"mat-form-field",7)(66,"mat-label"),o(67),r(68,"translate"),i(),a(69,"mat-select",17),L(70,jo,3,5,"mat-option",10,z),i(),a(72,"mat-error"),o(73),r(74,"translate"),r(75,"translate"),a(76,"strong"),o(77),r(78,"translate"),i()()(),a(79,"h4",6),o(80),r(81,"translate"),i(),a(82,"mat-form-field",7)(83,"mat-label"),o(84),r(85,"translate"),i(),C(86,"input",18),i(),a(87,"mat-form-field",7)(88,"mat-label"),o(89),r(90,"translate"),i(),a(91,"mat-select",19),L(92,Wo,3,5,"mat-option",10,z),i()(),a(94,"h4",6),o(95),r(96,"translate"),i(),a(97,"mat-form-field",7)(98,"mat-label"),o(99),r(100,"translate"),i(),C(101,"input",20),i(),a(102,"mat-form-field",7)(103,"mat-label"),o(104),r(105,"translate"),i(),a(106,"mat-select",21),L(107,Ko,3,5,"mat-option",10,z),i()(),C(109,"mat-divider",15),a(110,"h4",6),o(111),r(112,"translate"),i(),a(113,"mat-checkbox",22),o(114),r(115,"translate"),i(),a(116,"mat-form-field",7)(117,"mat-label"),o(118),r(119,"translate"),i(),C(120,"input",23),i(),a(121,"mat-form-field",7)(122,"mat-label"),o(123),r(124,"translate"),i(),a(125,"mat-select",24),L(126,Qo,3,5,"mat-option",10,z),i()(),a(128,"mat-form-field",7)(129,"mat-label"),o(130),r(131,"translate"),i(),C(132,"input",25),i(),x(133,Jo,7,7),i(),a(134,"div",26)(135,"button",27),C(136,"fa-icon",28),o(137),r(138,"translate"),i(),a(139,"button",29),o(140),r(141,"translate"),C(142,"fa-icon",30),i()()()),l&2&&(d("formGroup",p.recurringDepositAccountSettingsForm),n(3),u(" ",c(4,37,"labels.inputs.Is Mandatory Deposit"),"? "),n(3),u(" ",c(7,39,"labels.inputs.Adjust advance payments toward future installments"),"? "),n(3),u(" ",c(10,41,"labels.inputs.Allow Withdrawals"),"? "),n(3),m(c(13,43,"labels.heading.Lock-in Period")),n(4),m(c(17,45,"labels.inputs.Frequency")),n(5),m(c(22,47,"labels.inputs.Type")),n(3),j(p.lockinPeriodFrequencyTypeData),n(3),m(c(28,49,"labels.heading.Recurring Deposit Details")),n(2),D(p.currency?29:-1),n(2),m(c(32,51,"labels.heading.Deposit Period")),n(4),m(c(36,53,"labels.inputs.Deposit Period")),n(5),m(c(41,55,"labels.inputs.Type")),n(3),j(p.periodFrequencyTypeData),n(3),u(" ",c(47,57,"labels.inputs.Deposit Frequency Same as Group/Center meeting")," "),n(2),D(p.recurringDepositAccountSettingsForm.value.isCalendarInherited?-1:48),n(3),m(c(52,59,"labels.heading.Minimum Deposit Term")),n(4),m(c(56,61,"labels.inputs.Frequency")),n(4),A(" ",c(60,63,"labels.inputs.Minimum Deposit Term Frequency")," ",c(61,65,"labels.commons.is")," "),n(4),m(c(64,67,"labels.commons.required")),n(4),m(c(68,69,"labels.inputs.Frequency Type")),n(3),j(p.periodFrequencyTypeData),n(3),A(" ",c(74,71,"labels.inputs.Minimum Deposit Term Frequency Type")," ",c(75,73,"labels.commons.is")," "),n(4),m(c(78,75,"labels.commons.required")),n(3),m(c(81,77,"labels.heading.And thereafter, in Multiples of")),n(4),m(c(85,79,"labels.inputs.Frequency")),n(5),m(c(90,81,"labels.inputs.Type")),n(3),j(p.periodFrequencyTypeData),n(3),m(c(96,83,"labels.heading.Maximum Deposit Term")),n(4),m(c(100,85,"labels.inputs.Frequency")),n(5),m(c(105,87,"labels.inputs.Type")),n(3),j(p.periodFrequencyTypeData),n(4),m(c(112,89,"labels.heading.For Pre-mature closure")),n(3),u(" ",c(115,91,"labels.inputs.Apply Penal Interest (less)")," "),n(4),u("",c(119,93,"labels.inputs.Penal Interest")," (%)"),n(5),m(c(124,95,"labels.inputs.Period")),n(3),j(p.preClosurePenalInterestOnTypeData),n(4),m(c(131,97,"labels.inputs.Minimum Balance For Interest Calculation")),n(3),D(p.taxGroup?133:-1),n(4),u(" ",c(138,99,"labels.buttons.Previous")," "),n(3),u(" ",c(141,101,"labels.buttons.Next")," "))},dependencies:[I,R,rt,mt,Re,Z,ot,dt,ct,pt,nt,et,gt,ht,Ct,Ot,yt,Dt,bt,xt,V,He,Ee,Ue,jt,_t,Zt,w,Rt],styles:["h4[_ngcontent-%COMP%]{font-weight:500;margin:1em 0}h3[_ngcontent-%COMP%]{font-weight:500}mat-divider[_ngcontent-%COMP%]{margin:1em 0 2em}.margin-v[_ngcontent-%COMP%]{margin:1em 0}.margin-b[_ngcontent-%COMP%]{margin:0 0 1em}.margin-t[_ngcontent-%COMP%]{margin-top:1em}"]})}}return t})();function Xo(t,s){if(t&1&&(a(0,"mat-option",3),o(1),i()),t&2){let e=s.$implicit;d("value",e),n(),u(" ",e.name," ")}}function Zo(t,s){t&1&&(a(0,"th",24),o(1),r(2,"translate"),i()),t&2&&(n(),m(c(2,1,"labels.inputs.name")))}function tr(t,s){if(t&1&&(a(0,"td",25),o(1),i()),t&2){let e=s.$implicit;n(),u(" ",e.name+", "+e.currency.displaySymbol," ")}}function er(t,s){t&1&&(a(0,"th",24),o(1),r(2,"translate"),i()),t&2&&(n(),m(c(2,1,"labels.inputs.Type")))}function nr(t,s){if(t&1&&(a(0,"td",25),o(1),r(2,"translateKey"),i()),t&2){let e=s.$implicit;n(),u(" ",B(2,1,e.chargeCalculationType.value,"catalogs")," ")}}function ir(t,s){t&1&&(a(0,"th",24),o(1),r(2,"translate"),i()),t&2&&(n(),m(c(2,1,"labels.inputs.Amount")))}function ar(t,s){if(t&1){let e=y();a(0,"td",25),o(1),r(2,"formatNumber"),a(3,"button",26),T("click",function(){let p=S(e).$implicit,g=f();return M(g.editChargeAmount(p))}),C(4,"fa-icon",27),i()()}if(t&2){let e=s.$implicit;n(),u(" ",c(2,1,e.amount)," ")}}function or(t,s){t&1&&(a(0,"th",24),o(1),r(2,"translate"),i()),t&2&&(n(),m(c(2,1,"labels.inputs.Collected On")))}function rr(t,s){if(t&1&&(a(0,"td",25),o(1),r(2,"translateKey"),i()),t&2){let e=s.$implicit;n(),u(" ",B(2,1,e.chargeTimeType.value,"catalogs")," ")}}function cr(t,s){t&1&&(a(0,"th",24),o(1),r(2,"translate"),i()),t&2&&(n(),m(c(2,1,"labels.inputs.Date")))}function pr(t,s){if(t&1&&(a(0,"span"),o(1),r(2,"dateFormat"),i()),t&2){let e=f().$implicit;n(),u(" ",c(2,1,e.dueDate)||"Unassigned"," ")}}function sr(t,s){if(t&1&&(a(0,"span"),o(1),r(2,"dateFormat"),i()),t&2){let e=f().$implicit;n(),u(" ",c(2,1,e.feeOnMonthDay)||"Unassigned"," ")}}function lr(t,s){t&1&&(a(0,"span"),o(1),r(2,"translate"),i()),t&2&&(n(),u(" ",c(2,1,"labels.inputs.N/A")," "))}function mr(t,s){if(t&1){let e=y();a(0,"button",26),T("click",function(){S(e);let p=f().$implicit,g=f();return M(g.editChargeDate(p))}),C(1,"fa-icon",27),i()}}function dr(t,s){if(t&1&&(a(0,"td",25),x(1,pr,3,3,"span"),x(2,sr,3,3,"span"),x(3,lr,3,3,"span"),x(4,mr,2,0,"button",28),i()),t&2){let e=s.$implicit;n(),D(e.chargeTimeType.value==="Specified due date"||e.chargeTimeType.value==="Weekly Fee"?1:-1),n(),D(e.chargeTimeType.value==="Monthly Fee"||e.chargeTimeType.value==="Annual Fee"?2:-1),n(),D(e.chargeTimeType.value==="Monthly Fee"||e.chargeTimeType.value==="Annual Fee"||e.chargeTimeType.value==="Specified due date"||e.chargeTimeType.value==="Weekly Fee"?-1:3),n(),D(e.chargeTimeType.value==="Weekly Fee"||e.chargeTimeType.value==="Annual Fee"||e.chargeTimeType.value==="Specified due date"?4:-1)}}function ur(t,s){t&1&&(a(0,"th",24),o(1),r(2,"translate"),i()),t&2&&(n(),m(c(2,1,"labels.inputs.Repayments Every")))}function gr(t,s){if(t&1){let e=y();a(0,"button",26),T("click",function(){S(e);let p=f().$implicit,g=f();return M(g.editChargeFeeInterval(p))}),C(1,"fa-icon",27),i()}}function Cr(t,s){if(t&1&&(a(0,"td",25),o(1),x(2,gr,2,0,"button",28),i()),t&2){let e=s.$implicit;n(),u(" ",e.feeInterval||"Not Provided"," "),n(),D(e.chargeTimeType.value==="Weekly Fee"||e.chargeTimeType.value==="Monthly Fee"?2:-1)}}function _r(t,s){t&1&&(a(0,"th",24),o(1),r(2,"translate"),i()),t&2&&(n(),m(c(2,1,"labels.inputs.Actions")))}function fr(t,s){if(t&1){let e=y();a(0,"td",25)(1,"button",29),T("click",function(){let p=S(e).$implicit,g=f();return M(g.deleteCharge(p))}),C(2,"fa-icon",30),i()()}}function hr(t,s){t&1&&C(0,"tr",31)}function xr(t,s){t&1&&C(0,"tr",32)}var de=(()=>{class t{constructor(){this.dialog=_(Xt),this.dateUtils=_(X),this.settingsService=_($),this.chargesDataSource=[],this.displayedColumns=["name","chargeCalculationType","amount","chargeTimeType","date","repaymentsEvery","action"],this.pristine=!0,this.isChargesPatched=!1,this.currency=null}ngOnInit(){this.chargesDataSource=[],this.recurringDepositsAccountTemplate.id&&this.recurringDepositsAccountTemplate.charges&&(this.chargesDataSource=this.recurringDepositsAccountTemplate.charges.map(e=>J(F({},e),{id:e.chargeId}))||[])}ngOnChanges(){this.currency==null&&(this.recurringDepositsAccountTemplate.currency?this.currency=this.recurringDepositsAccountTemplate.currency:this.recurringDepositsAccountProductTemplate&&this.recurringDepositsAccountProductTemplate.currency&&(this.currency=this.recurringDepositsAccountProductTemplate.currency)),this.recurringDepositsAccountProductTemplate&&(this.chargeData=this.recurringDepositsAccountProductTemplate.chargeOptions.filter(e=>e.currency.code===this.currency.code))}addCharge(e){this.chargesDataSource=this.chargesDataSource.concat([e.value]),e.value="",this.pristine=!1}editChargeAmount(e){let l=[new we({controlName:"amount",label:"Amount",value:e.amount,type:"number",required:!1})],p={title:"Edit Charge Amount",layout:{addButtonText:"Confirm"},formfields:l};this.dialog.open(Ce,{data:p}).afterClosed().subscribe(b=>{if(b.data){let G=J(F({},e),{amount:b.data.value.amount});this.chargesDataSource.splice(this.chargesDataSource.indexOf(e),1,G),this.chargesDataSource=this.chargesDataSource.concat([])}}),this.pristine=!1}editChargeDate(e){let l=[new Ze({controlName:"date",label:"Date",value:e.dueDate||e.feeOnMonthDay||"",type:"datetime-local",required:!1})],p={title:"Edit Charge Date",layout:{addButtonText:"Confirm"},formfields:l};this.dialog.open(Ce,{data:p}).afterClosed().subscribe(b=>{if(b.data){let G,ue=this.settingsService.dateFormat,ie=this.dateUtils.formatDate(b.data.value.date,ue);switch(e.chargeTimeType.value){case"Specified due date":case"Weekly Fee":G=J(F({},e),{dueDate:ie});break;case"Annual Fee":G=J(F({},e),{feeOnMonthDay:ie});break}this.chargesDataSource.splice(this.chargesDataSource.indexOf(e),1,G),this.chargesDataSource=this.chargesDataSource.concat([])}}),this.pristine=!1}editChargeFeeInterval(e){let l=[new we({controlName:"feeInterval",label:"Fee Interval",value:e.feeInterval,type:"text",required:!1})],p={title:"Edit Charge Fee Interval",layout:{addButtonText:"Confirm"},formfields:l};this.dialog.open(Ce,{data:p}).afterClosed().subscribe(b=>{if(b.data){let G=J(F({},e),{feeInterval:b.data.value.feeInterval});this.chargesDataSource.splice(this.chargesDataSource.indexOf(e),1,G),this.chargesDataSource=this.chargesDataSource.concat([])}}),this.pristine=!1}deleteCharge(e){this.dialog.open(ce,{data:{deleteContext:`charge ${e.name}`}}).afterClosed().subscribe(p=>{p.delete&&(this.chargesDataSource.splice(this.chargesDataSource.indexOf(e),1),this.chargesDataSource=this.chargesDataSource.concat([]),this.pristine=!1)})}get recurringDepositAccountCharges(){return{charges:this.chargesDataSource}}static{this.\u0275fac=function(l){return new(l||t)}}static{this.\u0275cmp=O({type:t,selectors:[["mifosx-recurring-deposits-account-charges-step"]],inputs:{recurringDepositsAccountTemplate:"recurringDepositsAccountTemplate",recurringDepositsAccountProductTemplate:"recurringDepositsAccountProductTemplate",currencyCode:"currencyCode",recurringDepositAccountFormValid:"recurringDepositAccountFormValid"},features:[Yt],decls:47,vars:18,consts:[["charge",""],[1,"layout-row-wrap","gap-2px","responsive-column"],[1,"flex-48"],[3,"value"],[1,"flex-48","align-center"],["type","button","mat-raised-button","","color","primary",3,"click","disabled"],["icon","plus",1,"m-r-10"],["mat-table","",1,"flex-98","mat-elevation-z1",3,"dataSource","hidden"],["matColumnDef","name"],["mat-header-cell","",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","chargeCalculationType"],["matColumnDef","amount"],["matColumnDef","chargeTimeType"],["matColumnDef","date"],["matColumnDef","repaymentsEvery"],["matColumnDef","action"],["mat-header-row","",4,"matHeaderRowDef"],["mat-row","",4,"matRowDef","matRowDefColumns"],[1,"layout-row","responsive-column","align-center","gap-2px","margin-t"],["mat-raised-button","","matStepperPrevious",""],["icon","arrow-left",1,"m-r-10"],["mat-raised-button","","matStepperNext","",3,"disabled"],["icon","arrow-right",1,"m-l-10"],["mat-header-cell",""],["mat-cell",""],["mat-icon-button","","color","primary",3,"click"],["icon","pen"],["mat-icon-button","","color","primary"],["mat-icon-button","","color","warn",3,"click"],["icon","trash"],["mat-header-row",""],["mat-row",""]],template:function(l,p){if(l&1){let g=y();a(0,"div",1)(1,"mat-form-field",2)(2,"mat-label"),o(3),r(4,"translate"),i(),a(5,"mat-select",null,0),L(7,Xo,2,2,"mat-option",3,z),i()(),a(9,"div",4)(10,"button",5),T("click",function(){S(g);let G=E(6);return M(p.addCharge(G))}),C(11,"fa-icon",6),o(12),r(13,"translate"),i()(),a(14,"table",7),v(15,8),h(16,Zo,3,3,"th",9)(17,tr,2,1,"td",10),P(),v(18,11),h(19,er,3,3,"th",9)(20,nr,3,4,"td",10),P(),v(21,12),h(22,ir,3,3,"th",9)(23,ar,5,3,"td",10),P(),v(24,13),h(25,or,3,3,"th",9)(26,rr,3,4,"td",10),P(),v(27,14),h(28,cr,3,3,"th",9)(29,dr,5,4,"td",10),P(),v(30,15),h(31,ur,3,3,"th",9)(32,Cr,3,2,"td",10),P(),v(33,16),h(34,_r,3,3,"th",9)(35,fr,3,0,"td",10),P(),h(36,hr,1,0,"tr",17)(37,xr,1,0,"tr",18),i()(),a(38,"div",19)(39,"button",20),C(40,"fa-icon",21),o(41),r(42,"translate"),i(),a(43,"button",22),o(44),r(45,"translate"),C(46,"fa-icon",23),i()()}if(l&2){let g=E(6);n(3),m(c(4,10,"labels.inputs.Charge")),n(4),j(p.chargeData),n(3),d("disabled",!g.value),n(2),u(" ",c(13,12,"labels.buttons.Add")," "),n(2),d("dataSource",p.chargesDataSource)("hidden",p.chargesDataSource.length===0),n(22),d("matHeaderRowDef",p.displayedColumns),n(),d("matRowDefColumns",p.displayedColumns),n(4),u(" ",c(42,14,"labels.buttons.Previous")," "),n(2),d("disabled",!p.recurringDepositAccountFormValid),n(),u(" ",c(45,16,"labels.buttons.Next")," ")}},dependencies:[I,R,nt,et,Ot,yt,V,_t,wt,Ft,Bt,kt,Et,Nt,Oe,Vt,Gt,qt,Ht,jt,Zt,It,w,Rt,Wt],styles:["table[_ngcontent-%COMP%]{width:100%}.mat-elevation-z1[_ngcontent-%COMP%]{margin:1em 0 1.5em}.margin-t[_ngcontent-%COMP%]{margin-top:1em}"]})}}return t})();var Dr=["chartsTable"];function br(t,s){if(t&1&&(a(0,"div",3)(1,"span",4),o(2),r(3,"translate"),i(),a(4,"span",5),o(5),i()()),t&2){let e=f();n(2),u("",c(3,2,"labels.inputs.name"),":"),n(3),m(e.recurringDepositsAccountProductTemplate.accountChart.name)}}function vr(t,s){if(t&1&&(a(0,"div",3)(1,"span",4),o(2),r(3,"translate"),i(),a(4,"span",5),o(5),r(6,"dateFormat"),i()()),t&2){let e=f();n(2),u("",c(3,2,"labels.inputs.End Date"),":"),n(3),m(c(6,4,e.recurringDepositsAccountProductTemplate==null?null:e.recurringDepositsAccountProductTemplate.accountChart.endDate))}}function Pr(t,s){if(t&1&&(a(0,"div",3)(1,"span",4),o(2),r(3,"translate"),i(),a(4,"span",5),o(5),i()()),t&2){let e=f();n(2),u("",c(3,2,"labels.inputs.Description"),":"),n(3),m(e.recurringDepositsAccountProductTemplate==null?null:e.recurringDepositsAccountProductTemplate.accountChart.description)}}function Tr(t,s){t&1&&(a(0,"th",23),o(1),r(2,"translate"),i()),t&2&&(n(),m(c(2,1,"labels.inputs.Period")))}function Sr(t,s){if(t&1&&(a(0,"td",24),o(1),r(2,"translateKey"),i()),t&2){let e=s.$implicit;n(),ae(" ",e.fromPeriod," - ",e.toPeriod,"\xA0",B(2,3,e.periodType.value,"catalogs")," ")}}function Mr(t,s){t&1&&(a(0,"th",23),o(1),r(2,"translate"),i()),t&2&&(n(),m(c(2,1,"labels.inputs.Amount Range")))}function Ar(t,s){if(t&1&&(a(0,"td",24),o(1),r(2,"formatNumber"),r(3,"formatNumber"),i()),t&2){let e=s.$implicit;n(),A(" ",c(2,2,e.amountRangeFrom)," - ",c(3,4,e.amountRangeTo)," ")}}function yr(t,s){t&1&&(a(0,"th",23),o(1),r(2,"translate"),i()),t&2&&(n(),m(c(2,1,"labels.inputs.Interest")))}function Or(t,s){if(t&1&&(a(0,"td",24),o(1),r(2,"formatNumber"),i()),t&2){let e=s.$implicit;n(),u("",c(2,1,e.annualInterestRate)," %")}}function Ir(t,s){t&1&&(a(0,"th",23),o(1),r(2,"translate"),i()),t&2&&(n(),m(c(2,1,"labels.inputs.Description")))}function Rr(t,s){if(t&1&&(a(0,"td",24),o(1),i()),t&2){let e=s.$implicit;n(),m(e.description)}}function wr(t,s){t&1&&(a(0,"th",23),o(1),r(2,"translate"),i()),t&2&&(n(),m(c(2,1,"labels.inputs.Actions")))}function Er(t,s){t&1&&(a(0,"span"),C(1,"fa-icon",27),o(2),r(3,"translate"),i()),t&2&&(n(2),u(" ",c(3,1,"labels.buttons.View Incentives")," "))}function Br(t,s){t&1&&(a(0,"span"),C(1,"fa-icon",28),o(2),r(3,"translate"),i()),t&2&&(n(2),u(" ",c(3,1,"labels.buttons.Hide Incentives")," "))}function Fr(t,s){if(t&1){let e=y();a(0,"td",24)(1,"button",25),T("click",function(){let p=S(e).dataIndex,g=f();return M(g.expandChartSlabIndex=g.expandChartSlabIndex===p?null:p)}),h(2,Er,4,3,"span",26)(3,Br,4,3,"span",26),i()()}if(t&2){let e=s.dataIndex,l=f();n(2),d("ngIf",l.expandChartSlabIndex!==e),n(),d("ngIf",l.expandChartSlabIndex===e)}}function kr(t,s){t&1&&(a(0,"th",23),o(1),r(2,"translate"),i()),t&2&&(n(),m(c(2,1,"labels.inputs.Entity Type")))}function Nr(t,s){if(t&1&&(a(0,"td",24),o(1),i()),t&2){let e=s.$implicit;n(),u(" ",e.entityType.value," ")}}function Vr(t,s){t&1&&(a(0,"th",23),o(1),r(2,"translate"),i()),t&2&&(n(),m(c(2,1,"labels.inputs.Attribute Name")))}function qr(t,s){if(t&1&&(a(0,"td",24),o(1),i()),t&2){let e=s.$implicit;n(),u(" ",e.attributeName.value," ")}}function Gr(t,s){t&1&&(a(0,"th",23),o(1),r(2,"translate"),i()),t&2&&(n(),m(c(2,1,"labels.inputs.Condition Type")))}function Hr(t,s){if(t&1&&(a(0,"td",24),o(1),r(2,"titlecase"),i()),t&2){let e=s.$implicit;n(),u(" ",c(2,1,e.conditionType.value)," ")}}function Ur(t,s){t&1&&(a(0,"th",23),o(1),r(2,"translate"),i()),t&2&&(n(),m(c(2,1,"labels.inputs.Attribute Value")))}function $r(t,s){if(t&1&&(a(0,"td",41),o(1),i()),t&2){let e=s.$implicit;d("ngSwitch",e.attributeName),n(),u(" ",e.attributeValueDesc," ")}}function zr(t,s){t&1&&(a(0,"th",23),o(1),r(2,"translate"),i()),t&2&&(n(),m(c(2,1,"labels.inputs.Incentive Type")))}function Lr(t,s){if(t&1&&(a(0,"td",24),o(1),i()),t&2){let e=s.$implicit;n(),u(" ",e.incentiveType.value," ")}}function jr(t,s){t&1&&(a(0,"th",23),o(1),r(2,"translate"),i()),t&2&&(n(),m(c(2,1,"labels.inputs.Interest")))}function Wr(t,s){if(t&1&&(a(0,"td",24),o(1),r(2,"formatNumber"),i()),t&2){let e=s.$implicit;n(),u(" ",c(2,1,e.amount)," ")}}function Kr(t,s){t&1&&C(0,"tr",42)}function Qr(t,s){t&1&&C(0,"tr",43)}function Yr(t,s){if(t&1&&(a(0,"table",33),v(1,34),h(2,kr,3,3,"th",8)(3,Nr,2,1,"td",9),P(),v(4,35),h(5,Vr,3,3,"th",8)(6,qr,2,1,"td",9),P(),v(7,36),h(8,Gr,3,3,"th",8)(9,Hr,3,3,"td",9),P(),v(10,37),h(11,Ur,3,3,"th",8)(12,$r,2,2,"td",38),P(),v(13,39),h(14,zr,3,3,"th",8)(15,Lr,2,1,"td",9),P(),v(16,40),h(17,jr,3,3,"th",8)(18,Wr,3,3,"td",9),P(),h(19,Kr,1,0,"tr",15)(20,Qr,1,0,"tr",16),i()),t&2){let e=f().$implicit,l=f();d("dataSource",e.incentives),n(19),d("matHeaderRowDef",l.incentivesDisplayedColumns),n(),d("matRowDefColumns",l.incentivesDisplayedColumns)}}function Jr(t,s){if(t&1&&(a(0,"td",24)(1,"div",29)(2,"mat-card",30)(3,"h4",31),o(4),r(5,"translate"),i(),h(6,Yr,21,3,"table",32),i()()()),t&2){let e=s.$implicit,l=s.dataIndex,p=f();De("colspan",p.chartSlabsDisplayedColumns.length),n(),d("@expandChartSlab",l===p.expandChartSlabIndex?"expanded":"collapsed"),n(3),u(" ",c(5,4,"labels.heading.Incentives")," "),n(2),d("ngIf",e.incentives.length)}}function Xr(t,s){t&1&&C(0,"tr",42)}function Zr(t,s){t&1&&C(0,"tr",43)}function tc(t,s){t&1&&C(0,"tr",44)}var Fe=(()=>{class t{constructor(){this.interestRateChartData=[],this.chartSlabsDisplayedColumns=["period","amountRange","interest","description","actions"],this.incentivesDisplayedColumns=["entityType","attributeName","conditionType","attributeValue","incentiveType","amount"],this.chartSlabsIncentivesDisplayedColumns=["incentives"]}ngOnChanges(){this.recurringDepositsAccountProductTemplate&&(this.interestRateChartData=this.recurringDepositsAccountProductTemplate.accountChart.chartSlabs)}ngOnInit(){this.interestRateChartData=[]}static{this.\u0275fac=function(l){return new(l||t)}}static{this.\u0275cmp=O({type:t,selectors:[["mifosx-recurring-deposits-account-interest-rate-chart-step"]],viewQuery:function(l,p){if(l&1&&Pt(Dr,7),l&2){let g;Tt(g=St())&&(p.chartsTableRef=g.first)}},inputs:{recurringDepositsAccountTemplate:"recurringDepositsAccountTemplate",recurringDepositsAccountProductTemplate:"recurringDepositsAccountProductTemplate"},features:[Yt],decls:49,vars:25,consts:[["chartsTable",""],[1,"layout-column","gap-2px"],["class","flex-fill",4,"ngIf"],[1,"flex-fill"],[1,"flex-40"],[1,"flex-60"],["mat-table","","multiTemplateDataRows","",1,"mat-elevation-z1",3,"dataSource"],["matColumnDef","period"],["mat-header-cell","",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","amountRange"],["matColumnDef","interest"],["matColumnDef","description"],["matColumnDef","actions"],["matColumnDef","incentives"],["mat-header-row","",4,"matHeaderRowDef"],["mat-row","",4,"matRowDef","matRowDefColumns"],["mat-row","","class","incentives-row",4,"matRowDef","matRowDefColumns"],[1,"layout-row","responsive-column","align-center","gap-2px","margin-t"],["mat-raised-button","","matStepperPrevious",""],["icon","arrow-left",1,"m-r-10"],["mat-raised-button","","matStepperNext",""],["icon","arrow-right",1,"m-l-10"],["mat-header-cell",""],["mat-cell",""],["mat-button","","color","primary",3,"click"],[4,"ngIf"],["icon","eye",1,"m-r-10"],["icon","eye-slash",1,"m-r-10"],[1,"incentives","flex-fill","layout-row","flex-wrap"],[1,"layout-row-wrap","flex-fill"],[1,"m-b-10","flex-13"],["class","mat-elevation-z1 flex-fill","mat-table","",3,"dataSource",4,"ngIf"],["mat-table","",1,"mat-elevation-z1","flex-fill",3,"dataSource"],["matColumnDef","entityType"],["matColumnDef","attributeName"],["matColumnDef","conditionType"],["matColumnDef","attributeValue"],["mat-cell","",3,"ngSwitch",4,"matCellDef"],["matColumnDef","incentiveType"],["matColumnDef","amount"],["mat-cell","",3,"ngSwitch"],["mat-header-row",""],["mat-row",""],["mat-row","",1,"incentives-row"]],template:function(l,p){l&1&&(a(0,"div",1),h(1,br,6,4,"div",2),a(2,"div",3)(3,"span",4),o(4),r(5,"translate"),i(),a(6,"span",5),o(7),r(8,"dateFormat"),i()(),h(9,vr,7,6,"div",2)(10,Pr,6,4,"div",2),a(11,"div",3)(12,"span",4),o(13),r(14,"translate"),i(),a(15,"span",5),o(16),r(17,"yesNo"),i()(),a(18,"table",6,0),v(20,7),h(21,Tr,3,3,"th",8)(22,Sr,3,6,"td",9),P(),v(23,10),h(24,Mr,3,3,"th",8)(25,Ar,4,6,"td",9),P(),v(26,11),h(27,yr,3,3,"th",8)(28,Or,3,3,"td",9),P(),v(29,12),h(30,Ir,3,3,"th",8)(31,Rr,2,1,"td",9),P(),v(32,13),h(33,wr,3,3,"th",8)(34,Fr,4,2,"td",9),P(),v(35,14),h(36,Jr,7,6,"td",9),P(),h(37,Xr,1,0,"tr",15)(38,Zr,1,0,"tr",16)(39,tc,1,0,"tr",17),i()(),a(40,"div",18)(41,"button",19),C(42,"fa-icon",20),o(43),r(44,"translate"),i(),a(45,"button",21),o(46),r(47,"translate"),C(48,"fa-icon",22),i()()),l&2&&(n(),d("ngIf",p.recurringDepositsAccountProductTemplate==null?null:p.recurringDepositsAccountProductTemplate.accountChart.name),n(3),u("",c(5,13,"labels.inputs.Valid from Date"),":"),n(3),m(c(8,15,p.recurringDepositsAccountProductTemplate==null?null:p.recurringDepositsAccountProductTemplate.accountChart.fromDate)),n(2),d("ngIf",p.recurringDepositsAccountProductTemplate==null?null:p.recurringDepositsAccountProductTemplate.accountChart.endDate),n(),d("ngIf",p.recurringDepositsAccountProductTemplate==null?null:p.recurringDepositsAccountProductTemplate.accountChart.description),n(3),u("",c(14,17,"labels.inputs.Primary Grouping by Amount"),":"),n(3),m(c(17,19,p.recurringDepositsAccountProductTemplate==null?null:p.recurringDepositsAccountProductTemplate.accountChart.isPrimaryGroupingByAmount)),n(2),d("dataSource",p.interestRateChartData),n(19),d("matHeaderRowDef",p.chartSlabsDisplayedColumns),n(),d("matRowDefColumns",p.chartSlabsDisplayedColumns),n(),d("matRowDefColumns",p.chartSlabsIncentivesDisplayedColumns),n(4),u(" ",c(44,21,"labels.buttons.Previous")," "),n(3),u(" ",c(47,23,"labels.buttons.Next")," "))},dependencies:[I,ve,Pe,R,Y,V,wt,Ft,Bt,kt,Et,Nt,_t,Vt,Gt,qt,Ht,jt,Zt,Te,It,w,Rt,Wt,Xe],styles:[".margin-t[_ngcontent-%COMP%]{margin-top:2em}table[_ngcontent-%COMP%]{width:100%}table[_ngcontent-%COMP%] tr.incentives-row[_ngcontent-%COMP%]{height:0}table[_ngcontent-%COMP%] tr.incentives-row[_ngcontent-%COMP%] > td[_ngcontent-%COMP%]{padding:0}table[_ngcontent-%COMP%] tr.incentives-row[_ngcontent-%COMP%] .incentives[_ngcontent-%COMP%]{overflow:hidden}table[_ngcontent-%COMP%] tr.incentives-row[_ngcontent-%COMP%] .mat-card[_ngcontent-%COMP%]{border-radius:0}"],data:{animation:[Me("expandChartSlab",[ne("collapsed",ee({height:"0px",minHeight:"0"})),ne("expanded",ee({height:"*"})),ye("expanded <=> collapsed",Ae("225ms cubic-bezier(0.4, 0.0, 0.2, 1)"))])]}})}}return t})();var ec=()=>["../.."];function nc(t,s){if(t&1&&(a(0,"div",3)(1,"span",4),o(2),r(3,"translate"),i(),a(4,"span",5),o(5),r(6,"find"),r(7,"translateKey"),i()()),t&2){let e=f();n(2),u("",c(3,3,"labels.inputs.Lock-in Period"),":"),n(3),A("",e.recurringDepositAccountData.lockinPeriodFrequency," ",B(7,10,U(6,5,e.recurringDepositAccountData.lockinPeriodFrequencyType,e.recurringDepositsAccountProductTemplate.lockinPeriodFrequencyTypeOptions,"id","value"),"catalogs"))}}function ic(t,s){if(t&1&&(a(0,"div",3)(1,"span",4),o(2),r(3,"translate"),i(),a(4,"span",5),o(5),r(6,"formatNumber"),i()()),t&2){let e=f();n(2),u("",c(3,2,"labels.inputs.Recurring Deposit Amount"),":"),n(3),m(c(6,4,e.recurringDepositAccountData.mandatoryRecommendedDepositAmount))}}function ac(t,s){if(t&1&&(a(0,"span",5),o(1),r(2,"find"),r(3,"translateKey"),i()),t&2){let e=f(2);n(),A("",e.recurringDepositAccountData.recurringFrequency," ",B(3,7,U(2,2,e.recurringDepositAccountData.recurringFrequencyType,e.recurringDepositsAccountProductTemplate.periodFrequencyTypeOptions,"id","value"),"catalogs"))}}function oc(t,s){if(t&1&&(v(0),a(1,"div",3)(2,"span",4),o(3),r(4,"translate"),i(),a(5,"span",5),o(6),r(7,"dateFormat"),i()(),a(8,"div",3)(9,"span",4),o(10),r(11,"translate"),i(),h(12,ac,4,10,"span",26),i(),P()),t&2){let e=f();n(3),u("",c(4,4,"labels.inputs.Deposit Start Date"),":"),n(3),m(c(7,6,e.recurringDepositAccountData.expectedFirstDepositOnDate)),n(4),u("",c(11,8,"labels.inputs.Deposit Frequency"),":"),n(2),d("ngIf",e.recurringDepositAccountData.recurringFrequency)}}function rc(t,s){if(t&1&&(a(0,"div",3)(1,"span",4),o(2),r(3,"translate"),i(),a(4,"span",5),o(5),i()()),t&2){let e=f();n(2),u("",c(3,2,"labels.inputs.name"),":"),n(3),m(e.recurringDepositsAccountProductTemplate==null?null:e.recurringDepositsAccountProductTemplate.accountChart.name)}}function cc(t,s){if(t&1&&(a(0,"div",3)(1,"span",4),o(2),r(3,"translate"),i(),a(4,"span",5),o(5),r(6,"dateFormat"),i()()),t&2){let e=f();n(2),u("",c(3,2,"labels.inputs.End Date"),":"),n(3),m(c(6,4,e.recurringDepositsAccountProductTemplate==null?null:e.recurringDepositsAccountProductTemplate.accountChart.endDate))}}function pc(t,s){if(t&1&&(a(0,"div",3)(1,"span",4),o(2),r(3,"translate"),i(),a(4,"span",5),o(5),i()()),t&2){let e=f();n(2),u("",c(3,2,"labels.inputs.Description"),":"),n(3),m(e.recurringDepositsAccountProductTemplate==null?null:e.recurringDepositsAccountProductTemplate.accountChart.description)}}function sc(t,s){t&1&&(a(0,"th",27),o(1),r(2,"translate"),i()),t&2&&(n(),m(c(2,1,"labels.inputs.Period")))}function lc(t,s){if(t&1&&(a(0,"td",28),o(1),r(2,"translateKey"),i()),t&2){let e=s.$implicit;n(),ae(" ",e.fromPeriod," - ",e.toPeriod,"\xA0",B(2,3,e.periodType.value,"catalogs")," ")}}function mc(t,s){t&1&&(a(0,"th",27),o(1),r(2,"translate"),i()),t&2&&(n(),m(c(2,1,"labels.inputs.Amount Range")))}function dc(t,s){if(t&1&&(a(0,"td",28),o(1),r(2,"formatNumber"),r(3,"formatNumber"),i()),t&2){let e=s.$implicit;n(),A(" ",c(2,2,e.amountRangeFrom)," - ",c(3,4,e.amountRangeTo)," ")}}function uc(t,s){t&1&&(a(0,"th",27),o(1),r(2,"translate"),i()),t&2&&(n(),m(c(2,1,"labels.inputs.Interest")))}function gc(t,s){if(t&1&&(a(0,"td",28),o(1),r(2,"formatNumber"),i()),t&2){let e=s.$implicit;n(),u("",c(2,1,e.annualInterestRate)," %")}}function Cc(t,s){t&1&&(a(0,"th",27),o(1),r(2,"translate"),i()),t&2&&(n(),m(c(2,1,"labels.inputs.Description")))}function _c(t,s){if(t&1&&(a(0,"td",28),o(1),i()),t&2){let e=s.$implicit;n(),m(e.description)}}function fc(t,s){t&1&&(a(0,"th",27),o(1),r(2,"translate"),i()),t&2&&(n(),m(c(2,1,"labels.inputs.Actions")))}function hc(t,s){t&1&&(a(0,"span"),C(1,"fa-icon",30),o(2),r(3,"translate"),i()),t&2&&(n(2),u(" ",c(3,1,"labels.buttons.View Incentives")," "))}function xc(t,s){t&1&&(a(0,"span"),C(1,"fa-icon",31),o(2),r(3,"translate"),i()),t&2&&(n(2),u(" ",c(3,1,"labels.buttons.Hide Incentives")," "))}function Dc(t,s){if(t&1){let e=y();a(0,"td",28)(1,"button",29),T("click",function(){let p=S(e).dataIndex,g=f();return M(g.expandChartSlabIndex=g.expandChartSlabIndex===p?null:p)}),h(2,hc,4,3,"span",7)(3,xc,4,3,"span",7),i()()}if(t&2){let e=s.dataIndex,l=f();n(2),d("ngIf",l.expandChartSlabIndex!==e),n(),d("ngIf",l.expandChartSlabIndex===e)}}function bc(t,s){t&1&&(a(0,"th",27),o(1),r(2,"translate"),i()),t&2&&(n(),m(c(2,1,"labels.inputs.Entity Type")))}function vc(t,s){if(t&1&&(a(0,"td",28),o(1),i()),t&2){let e=s.$implicit;n(),u(" ",e.entityType.value," ")}}function Pc(t,s){t&1&&(a(0,"th",27),o(1),r(2,"translate"),i()),t&2&&(n(),m(c(2,1,"labels.inputs.Attribute Name")))}function Tc(t,s){if(t&1&&(a(0,"td",28),o(1),i()),t&2){let e=s.$implicit;n(),u(" ",e.attributeName.value," ")}}function Sc(t,s){t&1&&(a(0,"th",27),o(1),r(2,"translate"),i()),t&2&&(n(),m(c(2,1,"labels.inputs.Condition Type")))}function Mc(t,s){if(t&1&&(a(0,"td",28),o(1),r(2,"titlecase"),i()),t&2){let e=s.$implicit;n(),u(" ",c(2,1,e.conditionType.value)," ")}}function Ac(t,s){t&1&&(a(0,"th",27),o(1),r(2,"translate"),i()),t&2&&(n(),m(c(2,1,"labels.inputs.Attribute Value")))}function yc(t,s){if(t&1&&(a(0,"td",44),o(1),i()),t&2){let e=s.$implicit;d("ngSwitch",e.attributeName),n(),u(" ",e.attributeValueDesc," ")}}function Oc(t,s){t&1&&(a(0,"th",27),o(1),r(2,"translate"),i()),t&2&&(n(),m(c(2,1,"labels.inputs.Incentive Type")))}function Ic(t,s){if(t&1&&(a(0,"td",28),o(1),i()),t&2){let e=s.$implicit;n(),u(" ",e.incentiveType.value," ")}}function Rc(t,s){t&1&&(a(0,"th",27),o(1),r(2,"translate"),i()),t&2&&(n(),m(c(2,1,"labels.inputs.Interest")))}function wc(t,s){if(t&1&&(a(0,"td",28),o(1),i()),t&2){let e=s.$implicit;n(),u(" ",e.amount," ")}}function Ec(t,s){t&1&&C(0,"tr",45)}function Bc(t,s){t&1&&C(0,"tr",46)}function Fc(t,s){if(t&1&&(a(0,"table",36),v(1,37),h(2,bc,3,3,"th",10)(3,vc,2,1,"td",11),P(),v(4,38),h(5,Pc,3,3,"th",10)(6,Tc,2,1,"td",11),P(),v(7,39),h(8,Sc,3,3,"th",10)(9,Mc,3,3,"td",11),P(),v(10,40),h(11,Ac,3,3,"th",10)(12,yc,2,2,"td",41),P(),v(13,42),h(14,Oc,3,3,"th",10)(15,Ic,2,1,"td",11),P(),v(16,43),h(17,Rc,3,3,"th",10)(18,wc,2,1,"td",11),P(),h(19,Ec,1,0,"tr",17)(20,Bc,1,0,"tr",18),i()),t&2){let e=f().$implicit,l=f();d("dataSource",e.incentives),n(19),d("matHeaderRowDef",l.incentivesDisplayedColumns),n(),d("matRowDefColumns",l.incentivesDisplayedColumns)}}function kc(t,s){if(t&1&&(a(0,"td",28)(1,"div",32)(2,"mat-card",33)(3,"h4",34),o(4),r(5,"translate"),i(),h(6,Fc,21,3,"table",35),i()()()),t&2){let e=s.$implicit,l=s.dataIndex,p=f();De("colspan",p.chartSlabsDisplayedColumns.length),n(),d("@expandChartSlab",l===p.expandChartSlabIndex?"expanded":"collapsed"),n(3),u(" ",c(5,4,"labels.heading.Incentives")," "),n(2),d("ngIf",e.incentives.length)}}function Nc(t,s){t&1&&C(0,"tr",45)}function Vc(t,s){t&1&&C(0,"tr",46)}function qc(t,s){t&1&&C(0,"tr",47)}function Gc(t,s){t&1&&(a(0,"th",27),o(1),r(2,"translate"),i()),t&2&&(n(),m(c(2,1,"labels.inputs.name")))}function Hc(t,s){if(t&1&&(a(0,"td",28),o(1),i()),t&2){let e=s.$implicit;n(),u(" ",e.name+", "+e.currency.displaySymbol," ")}}function Uc(t,s){t&1&&(a(0,"th",27),o(1),r(2,"translate"),i()),t&2&&(n(),m(c(2,1,"labels.inputs.Type")))}function $c(t,s){if(t&1&&(a(0,"td",28),o(1),r(2,"translateKey"),i()),t&2){let e=s.$implicit;n(),u(" ",B(2,1,e.chargeCalculationType.value,"catalogs")," ")}}function zc(t,s){t&1&&(a(0,"th",27),o(1),r(2,"translate"),i()),t&2&&(n(),m(c(2,1,"labels.inputs.Amount")))}function Lc(t,s){if(t&1&&(a(0,"td",28),o(1),r(2,"formatNumber"),i()),t&2){let e=s.$implicit;n(),u(" ",c(2,1,e.amount)," ")}}function jc(t,s){t&1&&(a(0,"th",27),o(1),r(2,"translate"),i()),t&2&&(n(),m(c(2,1,"labels.inputs.Date")))}function Wc(t,s){if(t&1&&(a(0,"span"),o(1),r(2,"dateFormat"),i()),t&2){let e=f().$implicit;n(),u(" ",c(2,1,e.dueDate)||"Unassigned"," ")}}function Kc(t,s){if(t&1&&(a(0,"span"),o(1),r(2,"dateFormat"),i()),t&2){let e=f().$implicit;n(),u(" ",c(2,1,e.feeOnMonthDay)||"Unassigned"," ")}}function Qc(t,s){t&1&&(a(0,"span"),o(1),r(2,"translate"),i()),t&2&&(n(),u(" ",c(2,1,"labels.inputs.N/A")," "))}function Yc(t,s){if(t&1&&(a(0,"td",28),h(1,Wc,3,3,"span",7)(2,Kc,3,3,"span",7)(3,Qc,3,3,"span",7),i()),t&2){let e=s.$implicit;n(),d("ngIf",e.chargeTimeType.value==="Specified due date"||e.chargeTimeType.value==="Weekly Fee"),n(),d("ngIf",e.chargeTimeType.value==="Monthly Fee"||e.chargeTimeType.value==="Annual Fee"),n(),d("ngIf",!(e.chargeTimeType.value==="Monthly Fee"||e.chargeTimeType.value==="Annual Fee"||e.chargeTimeType.value==="Specified due date"||e.chargeTimeType.value==="Weekly Fee"))}}function Jc(t,s){t&1&&(a(0,"th",27),o(1),r(2,"translate"),i()),t&2&&(n(),m(c(2,1,"labels.inputs.Repayments Every")))}function Xc(t,s){if(t&1&&(a(0,"td",28),o(1),i()),t&2){let e=s.$implicit;n(),u(" ",e.feeInterval||"Not Provided"," ")}}function Zc(t,s){t&1&&(a(0,"th",27),o(1),r(2,"translate"),i()),t&2&&(n(),m(c(2,1,"labels.inputs.Collected On")))}function tp(t,s){if(t&1&&(a(0,"td",28),o(1),i()),t&2){let e=s.$implicit;n(),u(" ",e.chargeTimeType.value," ")}}function ep(t,s){t&1&&C(0,"tr",45)}function np(t,s){t&1&&C(0,"tr",46)}function ip(t,s){if(t&1&&(a(0,"div",48)(1,"h3",1),o(2),r(3,"translate"),i(),C(4,"mat-divider",2),a(5,"table",36),v(6,49),h(7,Gc,3,3,"th",10)(8,Hc,2,1,"td",11),P(),v(9,50),h(10,Uc,3,3,"th",10)(11,$c,3,4,"td",11),P(),v(12,43),h(13,zc,3,3,"th",10)(14,Lc,3,3,"td",11),P(),v(15,51),h(16,jc,3,3,"th",10)(17,Yc,4,3,"td",11),P(),v(18,52),h(19,Jc,3,3,"th",10)(20,Xc,2,1,"td",11),P(),v(21,53),h(22,Zc,3,3,"th",10)(23,tp,2,1,"td",11),P(),h(24,ep,1,0,"tr",17)(25,np,1,0,"tr",18),i()()),t&2){let e=f();n(2),m(c(3,4,"labels.heading.Charges")),n(3),d("dataSource",e.recurringDepositAccountData.charges),n(19),d("matHeaderRowDef",e.chargesDisplayedColumns),n(),d("matRowDefColumns",e.chargesDisplayedColumns)}}var ke=(()=>{class t{constructor(){this.submitEvent=new Ve,this.chargesDisplayedColumns=["name","chargeCalculationType","amount","chargeTimeType","date","repaymentsEvery"],this.interestRateChartData=[],this.chartSlabsDisplayedColumns=["period","amountRange","interest","description","actions"],this.incentivesDisplayedColumns=["entityType","attributeName","conditionType","attributeValue","incentiveType","amount"],this.chartSlabsIncentivesDisplayedColumns=["incentives"]}ngOnChanges(){this.recurringDepositsAccountProductTemplate&&(this.interestRateChartData=this.recurringDepositsAccountProductTemplate.accountChart.chartSlabs)}static{this.\u0275fac=function(l){return new(l||t)}}static{this.\u0275cmp=O({type:t,selectors:[["mifosx-recurring-deposits-account-preview-step"]],inputs:{recurringDepositsAccountTemplate:"recurringDepositsAccountTemplate",recurringDepositsAccountProductTemplate:"recurringDepositsAccountProductTemplate",recurringDepositAccountData:"recurringDepositAccountData"},outputs:{submitEvent:"submitEvent"},features:[Yt],decls:181,vars:176,consts:[[1,"layout-row-wrap","responsive-column"],[1,"mat-h3","flex-100"],[1,"flex-100"],[1,"layout-row","flex-100"],[1,"flex-40"],[1,"flex-60"],["class","layout-row flex-100",4,"ngIf"],[4,"ngIf"],["mat-table","","multiTemplateDataRows","",1,"mat-elevation-z1","irc-table",3,"dataSource"],["matColumnDef","period"],["mat-header-cell","",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","amountRange"],["matColumnDef","interest"],["matColumnDef","description"],["matColumnDef","actions"],["matColumnDef","incentives"],["mat-header-row","",4,"matHeaderRowDef"],["mat-row","",4,"matRowDef","matRowDefColumns"],["mat-row","","class","incentives-row",4,"matRowDef","matRowDefColumns"],["class","layout-row-wrap responsive-column flex-100",4,"ngIf"],[1,"layout-row","responsive-column","align-center","gap-2px","margin-t"],["mat-raised-button","","matStepperPrevious",""],["icon","arrow-left",1,"m-r-10"],["mat-raised-button","",3,"routerLink"],["mat-raised-button","","color","primary",3,"click"],["class","flex-60",4,"ngIf"],["mat-header-cell",""],["mat-cell",""],["mat-button","","color","primary",3,"click"],["icon","eye",1,"m-r-10"],["icon","eye-slash",1,"m-r-10"],[1,"layout-row-wrap","flex-100","incentives"],[1,"layout-row-wrap","flex-100"],[1,"m-b-10","flex-13"],["class","flex-100 mat-elevation-z1","mat-table","",3,"dataSource",4,"ngIf"],["mat-table","",1,"flex-100","mat-elevation-z1",3,"dataSource"],["matColumnDef","entityType"],["matColumnDef","attributeName"],["matColumnDef","conditionType"],["matColumnDef","attributeValue"],["mat-cell","",3,"ngSwitch",4,"matCellDef"],["matColumnDef","incentiveType"],["matColumnDef","amount"],["mat-cell","",3,"ngSwitch"],["mat-header-row",""],["mat-row",""],["mat-row","",1,"incentives-row"],[1,"layout-row-wrap","responsive-column","flex-100"],["matColumnDef","name"],["matColumnDef","chargeCalculationType"],["matColumnDef","date"],["matColumnDef","repaymentsEvery"],["matColumnDef","chargeTimeType"]],template:function(l,p){l&1&&(a(0,"div",0)(1,"h3",1),o(2),r(3,"translate"),i(),C(4,"mat-divider",2),a(5,"div",3)(6,"span",4),o(7),r(8,"translate"),i(),a(9,"span",5),o(10),r(11,"find"),i()(),a(12,"div",3)(13,"span",4),o(14),r(15,"translate"),i(),a(16,"span",5),o(17),r(18,"dateFormat"),i()(),a(19,"div",3)(20,"span",4),o(21),r(22,"translate"),i(),a(23,"span",5),o(24),r(25,"find"),i()(),a(26,"h3",1),o(27),r(28,"translate"),i(),C(29,"mat-divider",2),a(30,"div",3)(31,"span",4),o(32),r(33,"translate"),i(),a(34,"span",5),o(35),i()(),a(36,"div",3)(37,"span",4),o(38),r(39,"translate"),i(),a(40,"span",5),o(41),i()(),a(42,"div",3)(43,"span",4),o(44),r(45,"translate"),i(),a(46,"span",5),o(47),i()(),a(48,"h3",1),o(49),r(50,"translate"),i(),C(51,"mat-divider",2),a(52,"div",3)(53,"span",4),o(54),r(55,"translate"),i(),a(56,"span",5),o(57),r(58,"find"),r(59,"translateKey"),i()(),a(60,"div",3)(61,"span",4),o(62),r(63,"translate"),i(),a(64,"span",5),o(65),r(66,"find"),r(67,"translateKey"),i()(),a(68,"div",3)(69,"span",4),o(70),r(71,"translate"),i(),a(72,"span",5),o(73),r(74,"find"),r(75,"translateKey"),i()(),a(76,"div",3)(77,"span",4),o(78),r(79,"translate"),i(),a(80,"span",5),o(81),r(82,"find"),r(83,"translateKey"),i()(),a(84,"h3",1),o(85),r(86,"translate"),i(),C(87,"mat-divider",2),h(88,nc,8,13,"div",6)(89,ic,7,6,"div",6),a(90,"div",3)(91,"span",4),o(92),r(93,"translate"),i(),a(94,"span",5),o(95),r(96,"find"),r(97,"translateKey"),i()(),a(98,"div",3)(99,"span",4),o(100),r(101,"translate"),i(),a(102,"span",5),o(103),r(104,"yesNo"),i()(),h(105,oc,13,10,"ng-container",7),a(106,"div",3)(107,"span",4),o(108),r(109,"translate"),i(),a(110,"span",5),o(111),r(112,"translateKey"),i()(),a(113,"div",3)(114,"span",4),o(115),r(116,"translate"),i(),a(117,"span",5),o(118),r(119,"translateKey"),i()(),a(120,"div",3)(121,"span",4),o(122),r(123,"translate"),i(),a(124,"span",5),o(125),r(126,"translateKey"),i()(),a(127,"h3",1),o(128),r(129,"translate"),i(),C(130,"mat-divider",2),h(131,rc,6,4,"div",6),a(132,"div",3)(133,"span",4),o(134),r(135,"translate"),i(),a(136,"span",5),o(137),r(138,"dateFormat"),i()(),h(139,cc,7,6,"div",6)(140,pc,6,4,"div",6),a(141,"div",3)(142,"span",4),o(143),r(144,"translate"),i(),a(145,"span",5),o(146),r(147,"yesNo"),i()(),a(148,"table",8),v(149,9),h(150,sc,3,3,"th",10)(151,lc,3,6,"td",11),P(),v(152,12),h(153,mc,3,3,"th",10)(154,dc,4,6,"td",11),P(),v(155,13),h(156,uc,3,3,"th",10)(157,gc,3,3,"td",11),P(),v(158,14),h(159,Cc,3,3,"th",10)(160,_c,2,1,"td",11),P(),v(161,15),h(162,fc,3,3,"th",10)(163,Dc,4,2,"td",11),P(),v(164,16),h(165,kc,7,6,"td",11),P(),h(166,Nc,1,0,"tr",17)(167,Vc,1,0,"tr",18)(168,qc,1,0,"tr",19),i(),h(169,ip,26,6,"div",20),i(),a(170,"div",21)(171,"button",22),C(172,"fa-icon",23),o(173),r(174,"translate"),i(),a(175,"button",24),o(176),r(177,"translate"),i(),a(178,"button",25),T("click",function(){return p.submitEvent.emit()}),o(179),r(180,"translate"),i()()),l&2&&(n(2),m(c(3,58,"labels.heading.Details")),n(5),m(c(8,60,"labels.inputs.Product")),n(3),m(U(11,62,p.recurringDepositAccountData.productId,p.recurringDepositsAccountTemplate.productOptions,"id","name")),n(4),m(c(15,67,"labels.inputs.Submitted On")),n(3),m(c(18,69,p.recurringDepositAccountData.submittedOnDate)),n(4),m(c(22,71,"labels.inputs.Field Officer")),n(3),m(U(25,73,p.recurringDepositAccountData.fieldOfficerId,p.recurringDepositsAccountProductTemplate.fieldOfficerOptions,"id","displayName")),n(3),m(c(28,78,"labels.heading.Currency")),n(5),m(c(33,80,"labels.inputs.Currency")),n(3),m(p.recurringDepositsAccountProductTemplate.currency.code),n(3),m(c(39,82,"labels.inputs.Decimal Places")),n(3),m(p.recurringDepositsAccountProductTemplate.currency.decimalPlaces),n(3),m(c(45,84,"labels.inputs.Currency In Multiples Of")),n(3),m(p.recurringDepositsAccountProductTemplate.currency.inMultiplesOf),n(2),m(c(50,86,"labels.heading.Terms")),n(5),u("",c(55,88,"labels.inputs.Interest Compounding Period"),":"),n(3),m(B(59,95,U(58,90,p.recurringDepositAccountData.interestCompoundingPeriodType,p.recurringDepositsAccountProductTemplate.interestCompoundingPeriodTypeOptions,"id","value"),"catalogs")),n(5),u("",c(63,98,"labels.inputs.Interest Posting Period"),":"),n(3),m(B(67,105,U(66,100,p.recurringDepositAccountData.interestPostingPeriodType,p.recurringDepositsAccountProductTemplate.interestPostingPeriodTypeOptions,"id","value"),"catalogs")),n(5),u("",c(71,108,"labels.inputs.Interest Calculated using"),":"),n(3),m(B(75,115,U(74,110,p.recurringDepositAccountData.interestCalculationType,p.recurringDepositsAccountProductTemplate.interestCalculationTypeOptions,"id","value"),"catalogs")),n(5),u("",c(79,118,"labels.inputs.Days in Year"),":"),n(3),m(B(83,125,U(82,120,p.recurringDepositAccountData.interestCalculationDaysInYearType,p.recurringDepositsAccountProductTemplate.interestCalculationDaysInYearTypeOptions,"id","value"),"catalogs")),n(4),m(c(86,128,"labels.heading.Settings")),n(3),d("ngIf",p.recurringDepositAccountData.lockinPeriodFrequency),n(),d("ngIf",p.recurringDepositAccountData.mandatoryRecommendedDepositAmount),n(3),u("",c(93,130,"labels.inputs.Deposit Period"),":"),n(3),A("",p.recurringDepositAccountData.depositPeriod," ",B(97,137,U(96,132,p.recurringDepositAccountData.depositPeriodFrequencyId,p.recurringDepositsAccountProductTemplate.periodFrequencyTypeOptions,"id","value"),"catalogs")),n(5),u("",c(101,140,"labels.inputs.Deposit Frequency Same as Group/Center meeting"),":"),n(3),m(c(104,142,p.recurringDepositsAccountProductTemplate.isCalendarInherited)),n(2),d("ngIf",!p.recurringDepositsAccountProductTemplate.isCalendarInherited),n(3),u("",c(109,144,"labels.inputs.Minimum Deposit Term"),":"),n(3),A("",p.recurringDepositsAccountProductTemplate.minDepositTerm?p.recurringDepositsAccountProductTemplate.minDepositTerm:""," ",B(112,146,p.recurringDepositsAccountProductTemplate.minDepositTermType?p.recurringDepositsAccountProductTemplate.minDepositTermType.value:"","catalogs")),n(4),u("",c(116,149,"labels.inputs.In Multiples Of"),":"),n(3),A("",p.recurringDepositsAccountProductTemplate.inMultiplesOfDepositTerm?p.recurringDepositsAccountProductTemplate.inMultiplesOfDepositTerm:""," ",B(119,151,p.recurringDepositsAccountProductTemplate.inMultiplesOfDepositTermType?p.recurringDepositsAccountProductTemplate.inMultiplesOfDepositTermType.value:"","catalogs")),n(4),m(c(123,154,"labels.inputs.Maximum Deposit Term")),n(3),A("",p.recurringDepositsAccountProductTemplate.maxDepositTerm?p.recurringDepositsAccountProductTemplate.maxDepositTerm:""," ",B(126,156,p.recurringDepositsAccountProductTemplate.maxDepositTermType?p.recurringDepositsAccountProductTemplate.maxDepositTermType.value:"","catalogs")),n(3),m(c(129,159,"labels.inputs.Interest Rate Chart")),n(3),d("ngIf",p.recurringDepositsAccountProductTemplate==null?null:p.recurringDepositsAccountProductTemplate.accountChart.name),n(3),u("",c(135,161,"labels.inputs.Valid from Date"),":"),n(3),m(c(138,163,p.recurringDepositsAccountProductTemplate==null?null:p.recurringDepositsAccountProductTemplate.accountChart.fromDate)),n(2),d("ngIf",p.recurringDepositsAccountProductTemplate==null?null:p.recurringDepositsAccountProductTemplate.accountChart.endDate),n(),d("ngIf",p.recurringDepositsAccountProductTemplate==null?null:p.recurringDepositsAccountProductTemplate.accountChart.description),n(3),u("",c(144,165,"labels.inputs.Primary Grouping by Amount"),":"),n(3),m(c(147,167,p.recurringDepositsAccountProductTemplate==null?null:p.recurringDepositsAccountProductTemplate.accountChart.isPrimaryGroupingByAmount)),n(2),d("dataSource",p.interestRateChartData),n(18),d("matHeaderRowDef",p.chartSlabsDisplayedColumns),n(),d("matRowDefColumns",p.chartSlabsDisplayedColumns),n(),d("matRowDefColumns",p.chartSlabsIncentivesDisplayedColumns),n(),d("ngIf",p.recurringDepositAccountData.charges.length),n(4),u(" ",c(174,169,"labels.buttons.Previous")," "),n(2),d("routerLink",K(175,ec)),n(),u(" ",c(177,171,"labels.buttons.Cancel")," "),n(3),u(" ",c(180,173,"labels.buttons.Submit")," "))},dependencies:[I,ve,Pe,R,Q,Y,V,Ue,wt,Ft,Bt,kt,Et,Nt,_t,Vt,Gt,qt,Ht,jt,Te,It,w,Rt,ei,Wt,Xe],styles:["table[_ngcontent-%COMP%]{width:100%}.mat-elevation-z1[_ngcontent-%COMP%]{margin:1em 0 1.5em}h2[_ngcontent-%COMP%], h3[_ngcontent-%COMP%], h4[_ngcontent-%COMP%]{margin:0;font-weight:500}span[_ngcontent-%COMP%]{margin:.5em 0}mat-divider[_ngcontent-%COMP%]{margin:0 0 .5em}.margin-t[_ngcontent-%COMP%]{margin-top:1em}.margin-b[_ngcontent-%COMP%]{margin-bottom:.25em}.irc-table[_ngcontent-%COMP%]{width:100%}.irc-table[_ngcontent-%COMP%] tr.incentives-row[_ngcontent-%COMP%]{height:0}.irc-table[_ngcontent-%COMP%] tr.incentives-row[_ngcontent-%COMP%] > td[_ngcontent-%COMP%]{padding:0}.irc-table[_ngcontent-%COMP%] tr.incentives-row[_ngcontent-%COMP%] .incentives[_ngcontent-%COMP%]{overflow:hidden}.irc-table[_ngcontent-%COMP%] tr.incentives-row[_ngcontent-%COMP%] .mat-card[_ngcontent-%COMP%]{border-radius:0}"],data:{animation:[Me("expandChartSlab",[ne("collapsed",ee({height:"0px",minHeight:"0"})),ne("expanded",ee({height:"*"})),ye("expanded <=> collapsed",Ae("225ms cubic-bezier(0.4, 0.0, 0.2, 1)"))])]}})}}return t})();function ap(t,s){t&1&&C(0,"fa-icon",14)}function op(t,s){t&1&&C(0,"fa-icon",14)}function rp(t,s){t&1&&C(0,"fa-icon",15)}function cp(t,s){t&1&&C(0,"fa-icon",16)}function pp(t,s){t&1&&C(0,"fa-icon",17)}function sp(t,s){t&1&&(o(0),r(1,"translate")),t&2&&m(c(1,1,"labels.inputs.DETAILS"))}function lp(t,s){t&1&&(o(0),r(1,"translate")),t&2&&m(c(1,1,"labels.inputs.TERMS"))}function mp(t,s){t&1&&(o(0),r(1,"translate")),t&2&&m(c(1,1,"labels.inputs.SETTINGS"))}function dp(t,s){t&1&&(o(0),r(1,"translate")),t&2&&m(c(1,1,"labels.inputs.INTEREST RATE CHART"))}function up(t,s){t&1&&(o(0),r(1,"translate")),t&2&&m(c(1,1,"labels.inputs.CHARGES"))}function gp(t,s){t&1&&(o(0),r(1,"translate")),t&2&&m(c(1,1,"labels.inputs.PREVIEW"))}function Cp(t,s){if(t&1){let e=y();a(0,"mat-step",13),h(1,gp,2,3,"ng-template",9),a(2,"mifosx-recurring-deposits-account-preview-step",18),T("submitEvent",function(){S(e);let p=f();return M(p.submit())}),i()()}if(t&2){let e=f();n(2),d("recurringDepositsAccountTemplate",e.recurringDepositsAccountTemplate)("recurringDepositsAccountProductTemplate",e.recurringDepositsAccountProductTemplate)("recurringDepositAccountData",e.recurringDepositAccountData)}}var pn=(()=>{class t{constructor(){this.route=_(N),this.router=_(W),this.dateUtils=_(X),this.recurringDepositsService=_(k),this.settingsService=_($),this.route.data.subscribe(e=>{this.recurringDepositsAccountTemplate=e.recurringDepositsAccountTemplate})}setTemplate(e){this.recurringDepositsAccountProductTemplate=e}get recurringDepositAccountDetailsForm(){return this.recurringDepositsAccountDetailsStep.recurringDepositAccountDetailsForm}get recurringDepositAccountTermsForm(){return this.recurringDepositAccountTermsStep.recurringDepositAccountTermsForm}get recurringDepositAccountSettingsForm(){return this.recurringDepositAccountSettingsStep.recurringDepositAccountSettingsForm}get recurringDepositAccountFormValid(){return this.recurringDepositAccountDetailsForm.valid&&this.recurringDepositAccountTermsForm.valid&&this.recurringDepositAccountSettingsForm.valid}get recurringDepositAccountData(){return F(F(F(F({},this.recurringDepositsAccountDetailsStep.recurringDepositAccountDetails),this.recurringDepositAccountTermsStep.recurringDepositAccountTerms),this.recurringDepositAccountSettingsStep.recurringDepositAccountSettings),this.recurringDepositAccountChargesStep.recurringDepositAccountCharges)}get recurringDepositAccount(){return F(F(F(F({},this.recurringDepositsAccountDetailsStep.recurringDepositAccountDetails),this.recurringDepositAccountTermsStep.recurringDepositAccountTerms),this.recurringDepositAccountSettingsStep.recurringDepositAccountSettings),this.recurringDepositAccountChargesStep.recurringDepositAccountCharges)}submit(){let e=this.settingsService.language.code,l=this.settingsService.dateFormat,g=J(F({},this.recurringDepositAccount),{clientId:this.recurringDepositsAccountTemplate.clientId,charges:this.recurringDepositAccount.charges.map(b=>({chargeId:b.id,amount:b.amount,dueDate:b.dueDate&&this.dateUtils.formatDate(b.dueDate,l),feeOnMonthDay:b.feeOnMonthDay,feeInterval:b.feeInterval})),isCalendarInherited:this.recurringDepositAccount.recurringDepositAccount?this.recurringDepositAccount.recurringDepositAccount:!1,submittedOnDate:this.dateUtils.formatDate(this.recurringDepositAccount.submittedOnDate,l),expectedFirstDepositOnDate:this.dateUtils.formatDate(this.recurringDepositAccount.expectedFirstDepositOnDate,l),dateFormat:l,monthDayFormat:"dd MMMM",locale:e});this.recurringDepositsService.createRecurringDepositAccount(g).subscribe(b=>{this.router.navigate(["../",b.resourceId],{relativeTo:this.route})})}static{this.\u0275fac=function(l){return new(l||t)}}static{this.\u0275cmp=O({type:t,selectors:[["mifosx-create-recurring-deposits-account"]],viewQuery:function(l,p){if(l&1&&(Pt(se,7),Pt(le,7),Pt(me,7),Pt(de,7)),l&2){let g;Tt(g=St())&&(p.recurringDepositsAccountDetailsStep=g.first),Tt(g=St())&&(p.recurringDepositAccountTermsStep=g.first),Tt(g=St())&&(p.recurringDepositAccountSettingsStep=g.first),Tt(g=St())&&(p.recurringDepositAccountChargesStep=g.first)}},decls:24,vars:15,consts:[["recurringDepositAccountStepper",""],[1,"container"],["orientation","vertical","labelPosition","bottom",1,"mat-elevation-z8",3,"linear"],["matStepperIcon","number"],["matStepperIcon","edit"],["matStepperIcon","done"],["matStepperIcon","error"],["matStepperIcon","preview"],[3,"stepControl"],["matStepLabel",""],[3,"recurringDepositsAccountProductTemplate","recurringDepositsAccountTemplate"],[3,"recurringDepositsAccountTemplate","recurringDepositsAccountProductTemplate"],[3,"recurringDepositsAccountTemplate","recurringDepositsAccountProductTemplate","recurringDepositAccountFormValid"],["state","preview","completed",""],["icon","pencil-alt","size","sm"],["icon","check","size","sm"],["icon","exclamation-triangle","size","lg"],["icon","eye","size","sm"],[3,"submitEvent","recurringDepositsAccountTemplate","recurringDepositsAccountProductTemplate","recurringDepositAccountData"]],template:function(l,p){if(l&1){let g=y();a(0,"div",1)(1,"mat-stepper",2,0),h(3,ap,1,0,"ng-template",3)(4,op,1,0,"ng-template",4)(5,rp,1,0,"ng-template",5)(6,cp,1,0,"ng-template",6)(7,pp,1,0,"ng-template",7),a(8,"mat-step",8),h(9,sp,2,3,"ng-template",9),a(10,"mifosx-recurring-deposits-account-details-step",10),T("recurringDepositsAccountProductTemplate",function(G){return S(g),M(p.setTemplate(G))}),i()(),a(11,"mat-step",8),h(12,lp,2,3,"ng-template",9),C(13,"mifosx-recurring-deposits-account-terms-step",11),i(),a(14,"mat-step",8),h(15,mp,2,3,"ng-template",9),C(16,"mifosx-recurring-deposits-account-settings-step",11),i(),a(17,"mat-step"),h(18,dp,2,3,"ng-template",9),C(19,"mifosx-recurring-deposits-account-interest-rate-chart-step",11),i(),a(20,"mat-step"),h(21,up,2,3,"ng-template",9),C(22,"mifosx-recurring-deposits-account-charges-step",12),i(),x(23,Cp,3,3,"mat-step",13),i()()}l&2&&(n(),d("linear",!1),n(7),d("stepControl",p.recurringDepositAccountDetailsForm),n(2),d("recurringDepositsAccountTemplate",p.recurringDepositsAccountTemplate),n(),d("stepControl",p.recurringDepositAccountTermsForm),n(2),d("recurringDepositsAccountTemplate",p.recurringDepositsAccountTemplate)("recurringDepositsAccountProductTemplate",p.recurringDepositsAccountProductTemplate),n(),d("stepControl",p.recurringDepositAccountSettingsForm),n(2),d("recurringDepositsAccountTemplate",p.recurringDepositsAccountTemplate)("recurringDepositsAccountProductTemplate",p.recurringDepositsAccountProductTemplate),n(3),d("recurringDepositsAccountTemplate",p.recurringDepositsAccountTemplate)("recurringDepositsAccountProductTemplate",p.recurringDepositsAccountProductTemplate),n(3),d("recurringDepositsAccountTemplate",p.recurringDepositsAccountTemplate)("recurringDepositsAccountProductTemplate",p.recurringDepositsAccountProductTemplate)("recurringDepositAccountFormValid",p.recurringDepositAccountFormValid),n(),D(p.recurringDepositAccountFormValid?23:-1))},dependencies:[I,R,Je,Qe,_t,Ye,Ke,se,le,me,Fe,de,ke,w],encapsulation:2})}}return t})();var _p=()=>["../../"];function fp(t,s){t&1&&(a(0,"mat-error"),o(1),r(2,"translate"),r(3,"translate"),a(4,"strong"),o(5),r(6,"translate"),i()()),t&2&&(n(),A(" ",c(2,3,"labels.inputs.Activated On Date")," ",c(3,5,"labels.commons.is")," "),n(4),m(c(6,7,"labels.commons.required")))}var sn=(()=>{class t{constructor(){this.formBuilder=_(st),this.recurringDepositsService=_(k),this.dateUtils=_(X),this.route=_(N),this.router=_(W),this.settingsService=_($),this.minDate=new Date(2e3,0,1),this.maxDate=new Date,this.accountId=this.route.parent.snapshot.params.recurringDepositAccountId}ngOnInit(){this.maxDate=this.settingsService.businessDate,this.createActivateRecurringDepositsAccountForm()}createActivateRecurringDepositsAccountForm(){this.activateRecurringDepositsAccountForm=this.formBuilder.group({activatedOnDate:["",q.required]})}submit(){let e=this.activateRecurringDepositsAccountForm.value,l=this.settingsService.language.code,p=this.settingsService.dateFormat,g=this.activateRecurringDepositsAccountForm.value.activatedOnDate;e.activatedOnDate instanceof Date&&(e.activatedOnDate=this.dateUtils.formatDate(g,p));let b=J(F({},e),{dateFormat:p,locale:l});this.recurringDepositsService.executeRecurringDepositsAccountCommand(this.accountId,"activate",b).subscribe(()=>{this.router.navigate(["../../"],{relativeTo:this.route})})}static{this.\u0275fac=function(l){return new(l||t)}}static{this.\u0275cmp=O({type:t,selectors:[["mifosx-activate-recurring-deposits-account"]],decls:20,vars:18,consts:[["activatedOnDatePicker",""],[1,"container"],[3,"ngSubmit","formGroup"],[1,"flex-100",3,"click"],["matInput","","required","","formControlName","activatedOnDate",3,"min","max","matDatepicker"],["matSuffix","",3,"for"],[1,"layout-row","align-center","gap-5px","responsive-column"],["type","button","mat-raised-button","",3,"routerLink"],["mat-raised-button","","color","primary",3,"disabled"]],template:function(l,p){if(l&1){let g=y();a(0,"div",1)(1,"mat-card")(2,"form",2),T("ngSubmit",function(){return S(g),M(p.submit())}),a(3,"mat-card-content")(4,"mat-form-field",3),T("click",function(){S(g);let G=E(11);return M(G.open())}),a(5,"mat-label"),o(6),r(7,"translate"),i(),C(8,"input",4)(9,"mat-datepicker-toggle",5)(10,"mat-datepicker",null,0),x(12,fp,7,9,"mat-error"),i()(),a(13,"mat-card-actions",6)(14,"button",7),o(15),r(16,"translate"),i(),a(17,"button",8),o(18),r(19,"translate"),i()()()()()}if(l&2){let g=E(11);n(2),d("formGroup",p.activateRecurringDepositsAccountForm),n(4),m(c(7,11,"labels.inputs.Activated On Date")),n(2),d("min",p.minDate)("max",p.maxDate)("matDatepicker",g),n(),d("for",g),n(3),D(p.activateRecurringDepositsAccountForm.controls.activatedOnDate.hasError("required")?12:-1),n(2),d("routerLink",K(17,_p)),n(),u(" ",c(16,13,"labels.buttons.Cancel")," "),n(2),d("disabled",!p.activateRecurringDepositsAccountForm.valid),n(),u(" ",c(19,15,"labels.buttons.Confirm")," ")}},dependencies:[I,R,rt,mt,Z,ot,dt,ct,pt,Q,Y,ut,ft,nt,et,gt,ht,Ct,Dt,bt,xt,V,w],styles:[".container[_ngcontent-%COMP%]{max-width:37rem}"]})}}return t})();var hp=()=>["../../"],ln=(()=>{class t{constructor(){this.formBuilder=_(st),this.recurringDepositsService=_(k),this.route=_(N),this.router=_(W),this.undoCommand="undoapproval",this.undoAction=this.route.snapshot.params.name,this.undoAction==="Undo Activation"&&(this.undoCommand="undoactivate"),this.accountId=this.route.parent.snapshot.params.recurringDepositAccountId}ngOnInit(){this.createUndoApprovalRecurringDepositsAccountForm()}createUndoApprovalRecurringDepositsAccountForm(){this.undoApprovalRecurringDepositsAccountForm=this.formBuilder.group({note:[""]})}submit(){let e=F({},this.undoApprovalRecurringDepositsAccountForm.value);this.undoAction==="Undo Activation"?this.recurringDepositsService.executeRecurringDepositsAccountCommand(this.accountId,this.undoCommand,e).subscribe(()=>{this.router.navigate(["../../"],{relativeTo:this.route})}):this.recurringDepositsService.executeRecurringDepositsAccountCommand(this.accountId,"undoapproval",e).subscribe(()=>{this.router.navigate(["../../"],{relativeTo:this.route})})}static{this.\u0275fac=function(l){return new(l||t)}}static{this.\u0275cmp=O({type:t,selectors:[["mifosx-undo-approval-recurring-deposits-account"]],decls:16,vars:13,consts:[[1,"container"],[3,"ngSubmit","formGroup"],[1,"flex-100"],["matInput","","formControlName","note","cdkTextareaAutosize","","cdkAutosizeMinRows","2"],[1,"layout-row","align-center","gap-5px","responsive-column"],["type","button","mat-raised-button","",3,"routerLink"],["mat-raised-button","","color","warn",3,"disabled"]],template:function(l,p){l&1&&(a(0,"div",0)(1,"mat-card")(2,"form",1),T("ngSubmit",function(){return p.submit()}),a(3,"mat-card-content")(4,"mat-form-field",2)(5,"mat-label"),o(6),r(7,"translate"),i(),C(8,"textarea",3),i()(),a(9,"mat-card-actions",4)(10,"button",5),o(11),r(12,"translate"),i(),a(13,"button",6),o(14),r(15,"translate"),i()()()()()),l&2&&(n(2),d("formGroup",p.undoApprovalRecurringDepositsAccountForm),n(4),m(c(7,6,"labels.inputs.Note")),n(4),d("routerLink",K(12,hp)),n(),u(" ",c(12,8,"labels.buttons.Cancel")," "),n(2),d("disabled",!p.undoApprovalRecurringDepositsAccountForm.valid),n(),u(" ",c(15,10,"labels.buttons.Confirm")," "))},dependencies:[I,R,rt,mt,Z,ot,ct,pt,Q,Y,ut,ft,nt,et,Ct,V,Lt,w],styles:[".container[_ngcontent-%COMP%]{max-width:37rem}"]})}}return t})();var xp=()=>["../../"];function Dp(t,s){t&1&&(a(0,"mat-error"),o(1),r(2,"translate"),r(3,"translate"),a(4,"strong"),o(5),r(6,"translate"),i()()),t&2&&(n(),A(" ",c(2,3,"labels.inputs.Approved On Date")," ",c(3,5,"labels.commons.is")," "),n(4),m(c(6,7,"labels.commons.required")))}var mn=(()=>{class t{constructor(){this.formBuilder=_(st),this.recurringDepositsService=_(k),this.dateUtils=_(X),this.route=_(N),this.router=_(W),this.settingsService=_($),this.minDate=new Date(2e3,0,1),this.maxDate=new Date,this.accountId=this.route.parent.snapshot.params.recurringDepositAccountId}ngOnInit(){this.maxDate=this.settingsService.businessDate,this.createApproveRecurringDepositsAccountForm()}createApproveRecurringDepositsAccountForm(){this.approveRecurringDepositsAccountForm=this.formBuilder.group({approvedOnDate:["",q.required],note:[""]})}submit(){let e=this.approveRecurringDepositsAccountForm.value,l=this.settingsService.language.code,p=this.settingsService.dateFormat,g=this.approveRecurringDepositsAccountForm.value.approvedOnDate;e.approvedOnDate instanceof Date&&(e.approvedOnDate=this.dateUtils.formatDate(g,p));let b=J(F({},e),{dateFormat:p,locale:l});this.recurringDepositsService.executeRecurringDepositsAccountCommand(this.accountId,"approve",b).subscribe(()=>{this.router.navigate(["../../"],{relativeTo:this.route})})}static{this.\u0275fac=function(l){return new(l||t)}}static{this.\u0275cmp=O({type:t,selectors:[["mifosx-approve-recurring-deposits-account"]],decls:26,vars:21,consts:[["approvedOnDatePicker",""],[1,"container"],[3,"ngSubmit","formGroup"],[1,"layout-column"],[3,"click"],["matInput","","required","","formControlName","approvedOnDate",3,"min","max","matDatepicker"],["matSuffix","",3,"for"],["matInput","","formControlName","note","cdkTextareaAutosize","","cdkAutosizeMinRows","2"],[1,"layout-row","align-center","gap-5px","responsive-column"],["type","button","mat-raised-button","",3,"routerLink"],["mat-raised-button","","color","primary",3,"disabled"]],template:function(l,p){if(l&1){let g=y();a(0,"div",1)(1,"mat-card")(2,"form",2),T("ngSubmit",function(){return S(g),M(p.submit())}),a(3,"mat-card-content")(4,"div",3)(5,"mat-form-field",4),T("click",function(){S(g);let G=E(12);return M(G.open())}),a(6,"mat-label"),o(7),r(8,"translate"),i(),C(9,"input",5)(10,"mat-datepicker-toggle",6)(11,"mat-datepicker",null,0),x(13,Dp,7,9,"mat-error"),i(),a(14,"mat-form-field")(15,"mat-label"),o(16),r(17,"translate"),i(),C(18,"textarea",7),i()()(),a(19,"mat-card-actions",8)(20,"button",9),o(21),r(22,"translate"),i(),a(23,"button",10),o(24),r(25,"translate"),i()()()()()}if(l&2){let g=E(12);n(2),d("formGroup",p.approveRecurringDepositsAccountForm),n(5),m(c(8,12,"labels.inputs.Approved On Date")),n(2),d("min",p.minDate)("max",p.maxDate)("matDatepicker",g),n(),d("for",g),n(3),D(p.approveRecurringDepositsAccountForm.controls.approvedOnDate.hasError("required")?13:-1),n(3),m(c(17,14,"labels.inputs.Note")),n(4),d("routerLink",K(20,xp)),n(),u(" ",c(22,16,"labels.buttons.Cancel")," "),n(2),d("disabled",!p.approveRecurringDepositsAccountForm),n(),u(" ",c(25,18,"labels.buttons.Confirm")," ")}},dependencies:[I,R,rt,mt,Z,ot,dt,ct,pt,Q,Y,ut,ft,nt,et,gt,ht,Ct,Dt,bt,xt,V,Lt,w],styles:[".container[_ngcontent-%COMP%]{max-width:37rem}"]})}}return t})();var bp=()=>["../../"];function vp(t,s){t&1&&(a(0,"mat-error"),o(1),r(2,"translate"),r(3,"translate"),a(4,"strong"),o(5),r(6,"translate"),i()()),t&2&&(n(),A(" ",c(2,3,"labels.inputs.Rejected On Date")," ",c(3,5,"labels.commons.is")," "),n(4),m(c(6,7,"labels.commons.required")))}var dn=(()=>{class t{constructor(){this.formBuilder=_(st),this.recurringDepositsService=_(k),this.dateUtils=_(X),this.route=_(N),this.router=_(W),this.settingsService=_($),this.minDate=new Date(2e3,0,1),this.maxDate=new Date,this.accountId=this.route.parent.snapshot.params.recurringDepositAccountId}ngOnInit(){this.maxDate=this.settingsService.businessDate,this.createRejectRecurringDepositsAccountForm()}createRejectRecurringDepositsAccountForm(){this.rejectRecurringDepositsAccountForm=this.formBuilder.group({rejectedOnDate:["",q.required],note:[""]})}submit(){let e=this.rejectRecurringDepositsAccountForm.value,l=this.settingsService.language.code,p=this.settingsService.dateFormat,g=this.rejectRecurringDepositsAccountForm.value.rejectedOnDate;e.rejectedOnDate instanceof Date&&(e.rejectedOnDate=this.dateUtils.formatDate(g,p));let b=J(F({},e),{dateFormat:p,locale:l});this.recurringDepositsService.executeRecurringDepositsAccountCommand(this.accountId,"reject",b).subscribe(()=>{this.router.navigate(["../../"],{relativeTo:this.route})})}static{this.\u0275fac=function(l){return new(l||t)}}static{this.\u0275cmp=O({type:t,selectors:[["mifosx-reject-recurring-deposits-account"]],decls:26,vars:21,consts:[["rejectedOnDatePicker",""],[1,"container"],[3,"ngSubmit","formGroup"],[1,"layout-column"],[3,"click"],["matInput","","required","","formControlName","rejectedOnDate",3,"min","max","matDatepicker"],["matSuffix","",3,"for"],["matInput","","formControlName","note","cdkTextareaAutosize","","cdkAutosizeMinRows","2"],[1,"layout-row","align-center","gap-5px","responsive-column"],["type","button","mat-raised-button","",3,"routerLink"],["mat-raised-button","","color","primary",3,"disabled"]],template:function(l,p){if(l&1){let g=y();a(0,"div",1)(1,"mat-card")(2,"form",2),T("ngSubmit",function(){return S(g),M(p.submit())}),a(3,"mat-card-content")(4,"div",3)(5,"mat-form-field",4),T("click",function(){S(g);let G=E(12);return M(G.open())}),a(6,"mat-label"),o(7),r(8,"translate"),i(),C(9,"input",5)(10,"mat-datepicker-toggle",6)(11,"mat-datepicker",null,0),x(13,vp,7,9,"mat-error"),i(),a(14,"mat-form-field")(15,"mat-label"),o(16),r(17,"translate"),i(),C(18,"textarea",7),i()()(),a(19,"mat-card-actions",8)(20,"button",9),o(21),r(22,"translate"),i(),a(23,"button",10),o(24),r(25,"translate"),i()()()()()}if(l&2){let g=E(12);n(2),d("formGroup",p.rejectRecurringDepositsAccountForm),n(5),m(c(8,12,"labels.inputs.Rejected On Date")),n(2),d("min",p.minDate)("max",p.maxDate)("matDatepicker",g),n(),d("for",g),n(3),D(p.rejectRecurringDepositsAccountForm.controls.rejectedOnDate.hasError("required")?13:-1),n(3),m(c(17,14,"labels.inputs.Note")),n(4),d("routerLink",K(20,bp)),n(),u(" ",c(22,16,"labels.buttons.Cancel")," "),n(2),d("disabled",!p.rejectRecurringDepositsAccountForm),n(),u(" ",c(25,18,"labels.buttons.Confirm")," ")}},dependencies:[I,R,rt,mt,Z,ot,dt,ct,pt,Q,Y,ut,ft,nt,et,gt,ht,Ct,Dt,bt,xt,V,Lt,w],styles:[".container[_ngcontent-%COMP%]{max-width:37rem}"]})}}return t})();var Pp=()=>["../../"];function Tp(t,s){t&1&&(a(0,"mat-error"),o(1),r(2,"translate"),r(3,"translate"),a(4,"strong"),o(5),r(6,"translate"),i()()),t&2&&(n(),A(" ",c(2,3,"labels.inputs.Withdrawn On Date")," ",c(3,5,"labels.commons.is")," "),n(4),m(c(6,7,"labels.commons.required")))}var un=(()=>{class t{constructor(){this.formBuilder=_(st),this.recurringDepositsService=_(k),this.dateUtils=_(X),this.route=_(N),this.router=_(W),this.settingsService=_($),this.minDate=new Date(2e3,0,1),this.maxDate=new Date,this.accountId=this.route.parent.snapshot.params.recurringDepositAccountId}ngOnInit(){this.maxDate=this.settingsService.businessDate,this.createWithdrawRecurringDepositsAccountForm()}createWithdrawRecurringDepositsAccountForm(){this.withdrawRecurringDepositsAccountForm=this.formBuilder.group({withdrawnOnDate:["",q.required],note:[""]})}submit(){let e=this.withdrawRecurringDepositsAccountForm.value,l=this.settingsService.language.code,p=this.settingsService.dateFormat,g=this.withdrawRecurringDepositsAccountForm.value.withdrawnOnDate;e.withdrawnOnDate instanceof Date&&(e.withdrawnOnDate=this.dateUtils.formatDate(g,p));let b=J(F({},e),{dateFormat:p,locale:l});this.recurringDepositsService.executeRecurringDepositsAccountCommand(this.accountId,"withdrawnByApplicant",b).subscribe(()=>{this.router.navigate(["../../"],{relativeTo:this.route})})}static{this.\u0275fac=function(l){return new(l||t)}}static{this.\u0275cmp=O({type:t,selectors:[["mifosx-withdraw-by-client-recurring-deposits-account"]],decls:26,vars:21,consts:[["withdrawnOnDatePicker",""],[1,"container"],[3,"ngSubmit","formGroup"],[1,"layout-column"],[3,"click"],["matInput","","required","","formControlName","withdrawnOnDate",3,"min","max","matDatepicker"],["matSuffix","",3,"for"],["matInput","","formControlName","note","cdkTextareaAutosize","","cdkAutosizeMinRows","2"],[1,"layout-row","align-center","gap-5px","responsive-column"],["type","button","mat-raised-button","",3,"routerLink"],["mat-raised-button","","color","primary",3,"disabled"]],template:function(l,p){if(l&1){let g=y();a(0,"div",1)(1,"mat-card")(2,"form",2),T("ngSubmit",function(){return S(g),M(p.submit())}),a(3,"mat-card-content")(4,"div",3)(5,"mat-form-field",4),T("click",function(){S(g);let G=E(12);return M(G.open())}),a(6,"mat-label"),o(7),r(8,"translate"),i(),C(9,"input",5)(10,"mat-datepicker-toggle",6)(11,"mat-datepicker",null,0),x(13,Tp,7,9,"mat-error"),i(),a(14,"mat-form-field")(15,"mat-label"),o(16),r(17,"translate"),i(),C(18,"textarea",7),i()()(),a(19,"mat-card-actions",8)(20,"button",9),o(21),r(22,"translate"),i(),a(23,"button",10),o(24),r(25,"translate"),i()()()()()}if(l&2){let g=E(12);n(2),d("formGroup",p.withdrawRecurringDepositsAccountForm),n(5),m(c(8,12,"labels.inputs.Withdrawn On Date")),n(2),d("min",p.minDate)("max",p.maxDate)("matDatepicker",g),n(),d("for",g),n(3),D(p.withdrawRecurringDepositsAccountForm.controls.withdrawnOnDate.hasError("required")?13:-1),n(3),m(c(17,14,"labels.inputs.Note")),n(4),d("routerLink",K(20,Pp)),n(),u(" ",c(22,16,"labels.buttons.Cancel")," "),n(2),d("disabled",!p.withdrawRecurringDepositsAccountForm.valid),n(),u(" ",c(25,18,"labels.buttons.Confirm")," ")}},dependencies:[I,R,rt,mt,Z,ot,dt,ct,pt,Q,Y,ut,ft,nt,et,gt,ht,Ct,Dt,bt,xt,V,Lt,w],styles:[".container[_ngcontent-%COMP%]{max-width:37rem}"]})}}return t})();var Sp=()=>["../../"];function Mp(t,s){if(t&1&&(a(0,"mat-option",6),o(1),i()),t&2){let e=s.$implicit;d("value",e.id),n(),u(" ",e.name+" ("+e.currency.name+")"," ")}}function Ap(t,s){t&1&&(a(0,"mat-error"),o(1),r(2,"translate"),r(3,"translate"),a(4,"strong"),o(5),r(6,"translate"),i()()),t&2&&(n(),A(" ",c(2,3,"labels.inputs.Charge")," ",c(3,5,"labels.commons.is")," "),n(4),m(c(6,7,"labels.commons.required")))}function yp(t,s){t&1&&(a(0,"mat-error"),o(1),r(2,"translate"),r(3,"translate"),a(4,"strong"),o(5),r(6,"translate"),i()()),t&2&&(n(),A(" ",c(2,3,"labels.inputs.Amount")," ",c(3,5,"labels.commons.is")," "),n(4),m(c(6,7,"labels.commons.required")))}function Op(t,s){if(t&1&&(a(0,"mat-option",6),o(1),i()),t&2){let e=s.$implicit;d("value",e.id),n(),u(" ",e.value," ")}}function Ip(t,s){if(t&1&&(a(0,"mat-option",6),o(1),i()),t&2){let e=s.$implicit;d("value",e.id),n(),u(" ",e.value," ")}}function Rp(t,s){t&1&&(a(0,"mat-error"),o(1),r(2,"translate"),r(3,"translate"),a(4,"strong"),o(5),r(6,"translate"),i()()),t&2&&(n(),A(" ",c(2,3,"labels.inputs.Due for collection on")," ",c(3,5,"labels.commons.is")," "),n(4),m(c(6,7,"labels.commons.required")))}function wp(t,s){if(t&1){let e=y();a(0,"mat-form-field",13),T("click",function(){S(e);let p=E(7);return M(p.open())}),a(1,"mat-label"),o(2),r(3,"translate"),i(),C(4,"input",14)(5,"mat-datepicker-toggle",15)(6,"mat-datepicker",null,0),x(8,Rp,7,9,"mat-error"),i()}if(t&2){let e=E(7),l=f(2);n(2),m(c(3,6,"labels.inputs.Due for collection on")),n(2),d("min",l.minDate)("max",l.maxDate)("matDatepicker",e),n(),d("for",e),n(3),D(l.recurringDepositsChargeForm.controls.dueDate.hasError("required")?8:-1)}}function Ep(t,s){t&1&&(a(0,"mat-error"),o(1),r(2,"translate"),r(3,"translate"),a(4,"strong"),o(5),r(6,"translate"),i()()),t&2&&(n(),A(" ",c(2,3,"labels.inputs.Due Date")," ",c(3,5,"labels.commons.is")," "),n(4),m(c(6,7,"labels.commons.required")))}function Bp(t,s){if(t&1){let e=y();a(0,"mat-form-field",13),T("click",function(){S(e);let p=E(7);return M(p.open())}),a(1,"mat-label"),o(2),r(3,"translate"),i(),C(4,"input",16)(5,"mat-datepicker-toggle",15)(6,"mat-datepicker",null,1),x(8,Ep,7,9,"mat-error"),i()}if(t&2){let e=E(7),l=f(2);n(2),m(c(3,6,"labels.inputs.Due On")),n(2),d("min",l.minDate)("max",l.maxDate)("matDatepicker",e),n(),d("for",e),n(3),D(l.recurringDepositsChargeForm.controls.feeOnMonthDay.hasError("required")?8:-1)}}function Fp(t,s){t&1&&(a(0,"mat-form-field")(1,"mat-label"),o(2),r(3,"translate"),i(),C(4,"input",17),i()),t&2&&(n(2),m(c(3,1,"labels.inputs.Repeats Every")))}function kp(t,s){if(t&1&&(a(0,"div",4)(1,"mat-form-field")(2,"mat-label"),o(3),r(4,"translate"),i(),C(5,"input",10),x(6,yp,7,9,"mat-error"),i(),a(7,"mat-form-field")(8,"mat-label"),o(9),r(10,"translate"),i(),a(11,"mat-select",11),L(12,Op,2,2,"mat-option",6,z),i()(),a(14,"mat-form-field")(15,"mat-label"),o(16),r(17,"translate"),i(),a(18,"mat-select",12),L(19,Ip,2,2,"mat-option",6,z),i()(),x(21,wp,9,8,"mat-form-field"),x(22,Bp,9,8,"mat-form-field"),x(23,Fp,5,3,"mat-form-field"),i()),t&2){let e=f();n(3),m(c(4,7,"labels.inputs.Amount")),n(3),D(e.recurringDepositsChargeForm.controls.amount.hasError("required")?6:-1),n(3),m(c(10,9,"labels.inputs.Charge Calculation")),n(3),j(e.chargeDetails.chargeCalculationTypeOptions),n(4),m(c(17,11,"labels.inputs.Charge time type")),n(3),j(e.chargeDetails.chargeTimeTypeOptions),n(2),D(e.recurringDepositsChargeForm.contains("dueDate")?21:-1),n(),D(e.recurringDepositsChargeForm.contains("feeOnMonthDay")?22:-1),n(),D(e.recurringDepositsChargeForm.contains("feeInterval")?23:-1)}}var gn=(()=>{class t{constructor(){this.formBuilder=_(st),this.route=_(N),this.router=_(W),this.dateUtils=_(X),this.savingsService=_(pe),this.settingsService=_($),this.minDate=new Date(2e3,0,1),this.maxDate=new Date,this.route.data.subscribe(e=>{this.savingsChargeOptions=e.recurringDepositsAccountActionData.chargeOptions}),this.recurringDepositAccountId=this.route.parent.snapshot.params.recurringDepositAccountId}ngOnInit(){this.maxDate=this.settingsService.businessDate,this.createRecurringDepositsChargeForm(),this.buildDependencies()}buildDependencies(){this.recurringDepositsChargeForm.controls.chargeId.valueChanges.subscribe(e=>{this.savingsService.getChargeTemplate(e).subscribe(l=>{this.chargeDetails=l;let p=l.chargeTimeType.id;(l.chargeTimeType.value==="Withdrawal Fee"||l.chargeTimeType.value==="Saving No Activity Fee")&&(this.chargeDetails.dueDateNotRequired=!0),(l.chargeTimeType.value==="Annual Fee"||l.chargeTimeType.value==="Monthly Fee")&&(this.chargeDetails.chargeTimeTypeAnnualOrMonth=!0),!this.chargeDetails.dueDateNotRequired&&!this.chargeDetails.chargeTimeTypeAnnualOrMonth?this.recurringDepositsChargeForm.addControl("dueDate",new tt("",q.required)):this.recurringDepositsChargeForm.removeControl("dueDate"),!this.chargeDetails.dueDateNotRequired&&this.chargeDetails.chargeTimeTypeAnnualOrMonth?this.recurringDepositsChargeForm.addControl("feeOnMonthDay",new tt("",q.required)):this.recurringDepositsChargeForm.removeControl("feeOnMonthDay"),p.value==="Monthly Fee"?this.recurringDepositsChargeForm.addControl("feeInterval",new tt(l.feeInterval,q.required)):this.recurringDepositsChargeForm.removeControl("feeInterval"),this.recurringDepositsChargeForm.patchValue({amount:l.amount,chargeCalculationType:l.chargeCalculationType.id,chargeTimeType:l.chargeTimeType.id})})})}createRecurringDepositsChargeForm(){this.recurringDepositsChargeForm=this.formBuilder.group({chargeId:["",q.required],amount:["",q.required],chargeCalculationType:[{value:"",disabled:!0}],chargeTimeType:[{value:"",disabled:!0}]})}submit(){let e=this.recurringDepositsChargeForm.value;if(e.locale=this.settingsService.language.code,e.feeInterval||(e.feeInterval=this.chargeDetails.feeInterval),this.chargeDetails.dueDateNotRequired!==!0)if(this.chargeDetails.chargeTimeTypeAnnualOrMonth===!0){let l="MMMM-dd";if(e.monthDayFormat=l,e.feeOnMonthDay){let p=this.recurringDepositsChargeForm.value.feeOnMonthDay;e.feeOnMonthDay=this.dateUtils.formatDate(p,l)}}else{let l=this.settingsService.dateFormat;if(e.dateFormat=l,e.dueDate){let p=this.recurringDepositsChargeForm.value.dueDate;e.dueDate=this.dateUtils.formatDate(p,l)}}this.savingsService.createSavingsCharge(this.recurringDepositAccountId,"charges",e).subscribe(()=>{this.router.navigate(["../../"],{relativeTo:this.route})})}static{this.\u0275fac=function(l){return new(l||t)}}static{this.\u0275cmp=O({type:t,selectors:[["mifosx-add-charge-recurring-deposits-account"]],decls:21,vars:15,consts:[["dueDatePicker",""],["feeOnMonthDayPicker",""],[1,"container"],[3,"ngSubmit","formGroup"],[1,"layout-column"],["required","","formControlName","chargeId"],[3,"value"],[1,"layout-row","layout-xs-column","layout-align-center","gap-5px"],["type","button","mat-raised-button","",3,"routerLink"],["mat-raised-button","","color","primary",3,"disabled"],["type","number","required","","matInput","","formControlName","amount"],["formControlName","chargeCalculationType"],["formControlName","chargeTimeType"],[3,"click"],["matInput","","required","","formControlName","dueDate",3,"min","max","matDatepicker"],["matSuffix","",3,"for"],["matInput","","required","","formControlName","feeOnMonthDay",3,"min","max","matDatepicker"],["matInput","","formControlName","feeInterval"]],template:function(l,p){l&1&&(a(0,"div",2)(1,"mat-card")(2,"form",3),T("ngSubmit",function(){return p.submit()}),a(3,"mat-card-content")(4,"div",4)(5,"mat-form-field")(6,"mat-label"),o(7),r(8,"translate"),i(),a(9,"mat-select",5),L(10,Mp,2,2,"mat-option",6,z),i(),x(12,Ap,7,9,"mat-error"),i(),x(13,kp,24,13,"div",4),i(),a(14,"mat-card-actions",7)(15,"button",8),o(16),r(17,"translate"),i(),a(18,"button",9),o(19),r(20,"translate"),i()()()()()()),l&2&&(n(2),d("formGroup",p.recurringDepositsChargeForm),n(5),m(c(8,8,"labels.inputs.Charge")),n(3),j(p.savingsChargeOptions),n(2),D(p.recurringDepositsChargeForm.controls.chargeId.hasError("required")?12:-1),n(),D(p.chargeDetails?13:-1),n(2),d("routerLink",K(14,Sp)),n(),u(" ",c(17,10,"labels.buttons.Cancel")," "),n(2),d("disabled",!p.recurringDepositsChargeForm.valid),n(),u(" ",c(20,12,"labels.buttons.Submit")," "))},dependencies:[I,R,rt,mt,Re,Z,ot,dt,ct,pt,Q,Y,ut,ft,nt,et,gt,ht,Ct,Ot,yt,Dt,bt,xt,V,w],styles:[".container[_ngcontent-%COMP%]{width:37rem}"]})}}return t})();var Np=()=>["../../"];function Vp(t,s){t&1&&(a(0,"mat-error"),o(1),r(2,"translate"),r(3,"translate"),a(4,"strong"),o(5),r(6,"translate"),i()()),t&2&&(n(),A(" ",c(2,3,"labels.inputs.Closed On Date")," ",c(3,5,"labels.commons.is")," "),n(4),m(c(6,7,"labels.commons.required")))}var Cn=(()=>{class t{constructor(){this.formBuilder=_(st),this.recurringDepositsService=_(k),this.dateUtils=_(X),this.route=_(N),this.router=_(W),this.settingsService=_($),this.minDate=new Date(2e3,0,1),this.maxDate=new Date,this.accountId=this.route.parent.snapshot.params.recurringDepositAccountId}ngOnInit(){this.maxDate=this.settingsService.businessDate,this.createprematureCloseRecurringDepositsAccountForm()}createprematureCloseRecurringDepositsAccountForm(){this.prematureCloseRecurringDepositsAccountForm=this.formBuilder.group({closedOnDate:["",q.required]})}submit(){let e=this.prematureCloseRecurringDepositsAccountForm.value,l=this.settingsService.language.code,p=this.settingsService.dateFormat,g=this.prematureCloseRecurringDepositsAccountForm.value.closedOnDate;e.closedOnDate instanceof Date&&(e.closedOnDate=this.dateUtils.formatDate(g,p));let b=J(F({},e),{dateFormat:p,locale:l});this.recurringDepositsService.executeRecurringDepositsAccountCommand(this.accountId,"prematureClose",b).subscribe(()=>{this.router.navigate(["../../"],{relativeTo:this.route})})}static{this.\u0275fac=function(l){return new(l||t)}}static{this.\u0275cmp=O({type:t,selectors:[["mifosx-premature-close-recurring-deposit-account"]],decls:21,vars:18,consts:[["closedOnDatePicker",""],[1,"container"],[3,"ngSubmit","formGroup"],[1,"layout-column"],[3,"click"],["matInput","","required","","formControlName","closedOnDate",3,"min","max","matDatepicker"],["matSuffix","",3,"for"],[1,"layout-row","align-center","gap-5px","responsive-column"],["type","button","mat-raised-button","",3,"routerLink"],["mat-raised-button","","color","primary",3,"disabled"]],template:function(l,p){if(l&1){let g=y();a(0,"div",1)(1,"mat-card")(2,"form",2),T("ngSubmit",function(){return S(g),M(p.submit())}),a(3,"mat-card-content")(4,"div",3)(5,"mat-form-field",4),T("click",function(){S(g);let G=E(12);return M(G.open())}),a(6,"mat-label"),o(7),r(8,"translate"),i(),C(9,"input",5)(10,"mat-datepicker-toggle",6)(11,"mat-datepicker",null,0),x(13,Vp,7,9,"mat-error"),i()()(),a(14,"mat-card-actions",7)(15,"button",8),o(16),r(17,"translate"),i(),a(18,"button",9),o(19),r(20,"translate"),i()()()()()}if(l&2){let g=E(12);n(2),d("formGroup",p.prematureCloseRecurringDepositsAccountForm),n(5),m(c(8,11,"labels.inputs.Closed On")),n(2),d("min",p.minDate)("max",p.maxDate)("matDatepicker",g),n(),d("for",g),n(3),D(p.prematureCloseRecurringDepositsAccountForm.controls.closedOnDate.hasError("required")?13:-1),n(2),d("routerLink",K(17,Np)),n(),u(" ",c(17,13,"labels.buttons.Cancel")," "),n(2),d("disabled",!p.prematureCloseRecurringDepositsAccountForm),n(),u(" ",c(20,15,"labels.buttons.Confirm")," ")}},dependencies:[I,R,rt,mt,Z,ot,dt,ct,pt,Q,Y,ut,ft,nt,et,gt,ht,Ct,Dt,bt,xt,V,w],styles:[".container[_ngcontent-%COMP%]{max-width:37rem}"]})}}return t})();var qp=()=>["../general"];function Gp(t,s){t&1&&(a(0,"mat-error"),o(1),r(2,"translate"),r(3,"translate"),a(4,"strong"),o(5),r(6,"translate"),i()()),t&2&&(n(),A(" ",c(2,3,"labels.inputs.Closed On")," ",c(3,5,"labels.commons.is")," "),n(4),m(c(6,7,"labels.commons.required")))}function Hp(t,s){t&1&&(a(0,"mat-error"),o(1),r(2,"translate"),r(3,"translate"),a(4,"strong"),o(5),r(6,"translate"),i()()),t&2&&(n(),A(" ",c(2,3,"labels.inputs.Maturity Amount")," ",c(3,5,"labels.commons.is")," "),n(4),m(c(6,7,"labels.commons.required")))}function Up(t,s){if(t&1&&(a(0,"mat-option",10),o(1),i()),t&2){let e=s.$implicit;d("value",e.id),n(),u(" ",e.value," ")}}function $p(t,s){t&1&&(a(0,"mat-error"),o(1),r(2,"translate"),r(3,"translate"),a(4,"strong"),o(5),r(6,"translate"),i()()),t&2&&(n(),A(" ",c(2,3,"labels.inputs.Action")," ",c(3,5,"labels.commons.is")," "),n(4),m(c(6,7,"labels.commons.required")))}function zp(t,s){if(t&1&&(a(0,"mat-option",10),o(1),i()),t&2){let e=s.$implicit;d("value",e.id),n(),u(" ",e.accountNo," ")}}function Lp(t,s){t&1&&(a(0,"mat-error"),o(1),r(2,"translate"),r(3,"translate"),a(4,"strong"),o(5),r(6,"translate"),i()()),t&2&&(n(),A(" ",c(2,3,"labels.inputs.Transfer to savings account")," ",c(3,5,"labels.commons.is")," "),n(4),m(c(6,7,"labels.commons.required")))}function jp(t,s){if(t&1&&(a(0,"mat-form-field")(1,"mat-label"),o(2),r(3,"translate"),i(),a(4,"mat-select",20),L(5,zp,2,2,"mat-option",10,z),i(),x(7,Lp,7,9,"mat-error"),i()),t&2){let e=f();n(2),m(c(3,2,"labels.inputs.Transfer to Savings")),n(3),j(e.savingsAccountsData),n(2),D(e.closeRecurringDepositForm.controls.toSavingsAccountId.hasError("required")?7:-1)}}function Wp(t,s){t&1&&(a(0,"mat-form-field")(1,"mat-label"),o(2),r(3,"translate"),i(),C(4,"input",21),i()),t&2&&(n(2),m(c(3,1,"labels.inputs.Transfer Description")))}function Kp(t,s){if(t&1&&(a(0,"mat-option",10),o(1),i()),t&2){let e=s.$implicit;d("value",e.id),n(),u(" ",e.name," ")}}function Qp(t,s){t&1&&(a(0,"mat-error"),o(1),r(2,"translate"),r(3,"translate"),a(4,"strong"),o(5),r(6,"translate"),i()()),t&2&&(n(),A(" ",c(2,3,"labels.inputs.Payment Type")," ",c(3,5,"labels.commons.is")," "),n(4),m(c(6,7,"labels.commons.required")))}function Yp(t,s){t&1&&(a(0,"button",15),C(1,"i",22),i())}function Jp(t,s){t&1&&(a(0,"button",15),C(1,"i",23),i())}function Xp(t,s){t&1&&(a(0,"mat-form-field")(1,"mat-label"),o(2),r(3,"translate"),i(),C(4,"input",24),i(),a(5,"mat-form-field")(6,"mat-label"),o(7),r(8,"translate"),i(),C(9,"input",25),i(),a(10,"mat-form-field")(11,"mat-label"),o(12),r(13,"translate"),i(),C(14,"input",26),i(),a(15,"mat-form-field")(16,"mat-label"),o(17),r(18,"translate"),i(),C(19,"input",27),i(),a(20,"mat-form-field")(21,"mat-label"),o(22),r(23,"translate"),i(),C(24,"input",28),i()),t&2&&(n(2),u(" ",c(3,5,"labels.inputs.Account")," #"),n(5),u("",c(8,7,"labels.inputs.Cheque")," #"),n(5),m(c(13,9,"labels.inputs.Routing Code")),n(5),u("",c(18,11,"labels.inputs.Reciept")," #"),n(5),u("",c(23,13,"labels.inputs.Bank")," #"))}var _n=(()=>{class t{constructor(){this.formBuilder=_(st),this.route=_(N),this.router=_(W),this.dateUtils=_(X),this.recurringDepositsService=_(k),this.settingsService=_($),this.showPaymentDetails=!1,this.minDate=new Date(2e3,0,1),this.maxDate=new Date,this.route.data.subscribe(e=>{this.savingsAccountsData=e.recurringDepositsAccountActionData.savingsAccounts,this.maturityAmount=e.recurringDepositsAccountActionData.maturityAmount,this.onAccountClosureOptions=e.recurringDepositsAccountActionData.onAccountClosureOptions,this.paymentTypes=e.recurringDepositsAccountActionData.paymentTypeOptions,e.recurringDepositsAccountActionData.maturityAmount?this.title="Recurring Deposit Closure on Maturity":this.title="Recurring Deposit Closure"}),this.accountId=this.route.parent.snapshot.params.recurringDepositAccountId}ngOnInit(){this.maxDate=this.settingsService.businessDate,this.createcloseRecurringDepositForm(),this.addTransferDetails()}createcloseRecurringDepositForm(){this.closeRecurringDepositForm=this.formBuilder.group({closedOnDate:[new Date,q.required],maturityAmount:[{value:this.maturityAmount,disabled:!0}],onAccountClosureId:["",q.required],paymentTypeId:["",q.required],accountNumber:"",checkNumber:"",routingCode:"",receiptNumber:"",bankNumber:"",note:""})}toggleDisplay(){this.showPaymentDetails=!this.showPaymentDetails}addTransferDetails(){this.closeRecurringDepositForm.get("onAccountClosureId").valueChanges.subscribe(e=>{e===200?(this.closeRecurringDepositForm.addControl("toSavingsAccountId",new tt("",q.required)),this.closeRecurringDepositForm.addControl("transferDescription",new tt(""))):(this.closeRecurringDepositForm.removeControl("toSavingsAccountId"),this.closeRecurringDepositForm.removeControl("transferDescription"))})}submit(){let e=this.closeRecurringDepositForm.value,l=this.closeRecurringDepositForm.value.closedOnDate,p=this.settingsService.dateFormat,g=this.settingsService.language.code;e.closedOnDate instanceof Date&&(e.closedOnDate=this.dateUtils.formatDate(l,p));let b=J(F({},e),{dateFormat:p,locale:g});this.recurringDepositsService.executeRecurringDepositsAccountCommand(this.accountId,"close",b).subscribe(()=>{this.router.navigate(["../../"],{relativeTo:this.route})})}static{this.\u0275fac=function(l){return new(l||t)}}static{this.\u0275cmp=O({type:t,selectors:[["mifosx-close-recurring-deposits-account"]],decls:60,vars:42,consts:[["closedOnDatePicker",""],[1,"container"],[3,"ngSubmit","formGroup"],[1,"layout-column"],[1,"mat-h3","flex-fill"],[3,"click"],["matInput","","required","","formControlName","closedOnDate",3,"min","max","matDatepicker"],["matSuffix","",3,"for"],["matInput","","required","","formControlName","maturityAmount"],["formControlName","onAccountClosureId","required",""],[3,"value"],["formControlName","paymentTypeId","required",""],[1,"flex-fill"],[1,"flex-25"],[1,"expandcollapsebutton","flex-75",3,"click"],["mat-raised-button","","color","primary"],["matInput","","formControlName","note","cdkTextareaAutosize","","cdkAutosizeMinRows","2"],[1,"layout-row","align-center","gap-5px","responsive-column"],["type","button","mat-raised-button","",3,"routerLink"],["mat-raised-button","","color","primary",3,"disabled"],["required","","formControlName","toSavingsAccountId"],["matInput","","formControlName","transferDescription"],[1,"fa","fa-minus"],[1,"fa","fa-plus"],["matInput","","formControlName","accountNumber"],["matInput","","formControlName","chequeNumber"],["matInput","","formControlName","routingCode"],["matInput","","formControlName","receiptNumber"],["matInput","","formControlName","bankNumber"]],template:function(l,p){if(l&1){let g=y();a(0,"div",1)(1,"mat-card")(2,"form",2),T("ngSubmit",function(){return S(g),M(p.submit())}),a(3,"mat-card-content")(4,"div",3)(5,"h3",4),o(6),i(),a(7,"mat-form-field",5),T("click",function(){S(g);let G=E(14);return M(G.open())}),a(8,"mat-label"),o(9),r(10,"translate"),i(),C(11,"input",6)(12,"mat-datepicker-toggle",7)(13,"mat-datepicker",null,0),x(15,Gp,7,9,"mat-error"),i(),a(16,"mat-form-field")(17,"mat-label"),o(18),r(19,"translate"),i(),C(20,"input",8),x(21,Hp,7,9,"mat-error"),i(),a(22,"mat-form-field")(23,"mat-label"),o(24),r(25,"translate"),i(),a(26,"mat-select",9),L(27,Up,2,2,"mat-option",10,z),i(),x(29,$p,7,9,"mat-error"),i(),x(30,jp,8,4,"mat-form-field"),x(31,Wp,5,3,"mat-form-field"),a(32,"mat-form-field")(33,"mat-label"),o(34),r(35,"translate"),i(),a(36,"mat-select",11),L(37,Kp,2,2,"mat-option",10,z),i(),x(39,Qp,7,9,"mat-error"),i(),a(40,"div",12)(41,"span",13),o(42),r(43,"translate"),i(),a(44,"span",14),T("click",function(){return S(g),M(p.toggleDisplay())}),x(45,Yp,2,0,"button",15),x(46,Jp,2,0,"button",15),i()(),x(47,Xp,25,15),a(48,"mat-form-field")(49,"mat-label"),o(50),r(51,"translate"),i(),C(52,"textarea",16),i()()(),a(53,"mat-card-actions",17)(54,"button",18),o(55),r(56,"translate"),i(),a(57,"button",19),o(58),r(59,"translate"),i()()()()()}if(l&2){let g=E(14);n(2),d("formGroup",p.closeRecurringDepositForm),n(4),m(p.title),n(3),m(c(10,25,"labels.inputs.Closed On")),n(2),d("min",p.minDate)("max",p.maxDate)("matDatepicker",g),n(),d("for",g),n(3),D(p.closeRecurringDepositForm.controls.closedOnDate.hasError("required")?15:-1),n(3),m(c(19,27,"labels.inputs.Maturity Amount")),n(3),D(p.closeRecurringDepositForm.controls.maturityAmount.hasError("required")?21:-1),n(3),m(c(25,29,"labels.inputs.Action")),n(3),j(p.onAccountClosureOptions),n(2),D(p.closeRecurringDepositForm.controls.onAccountClosureId.hasError("required")?29:-1),n(),D(p.closeRecurringDepositForm.contains("toSavingsAccountId")?30:-1),n(),D(p.closeRecurringDepositForm.contains("transferDescription")?31:-1),n(3),m(c(35,31,"labels.inputs.Payment Type Id")),n(3),j(p.paymentTypes),n(2),D(p.closeRecurringDepositForm.controls.paymentTypeId.hasError("required")?39:-1),n(3),u(" ",c(43,33,"labels.inputs.Show Payment Details")),n(3),D(p.showPaymentDetails?45:-1),n(),D(p.showPaymentDetails?-1:46),n(),D(p.showPaymentDetails?47:-1),n(3),m(c(51,35,"labels.inputs.Note")),n(4),d("routerLink",K(41,qp)),n(),u(" ",c(56,37,"labels.buttons.Cancel")," "),n(2),d("disabled",!p.closeRecurringDepositForm.valid),n(),u(" ",c(59,39,"labels.buttons.Submit")," ")}},dependencies:[I,R,rt,mt,Z,ot,dt,ct,pt,Q,Y,ut,ft,nt,et,gt,ht,Ct,Ot,yt,Dt,bt,xt,V,Lt,w],styles:[".container[_ngcontent-%COMP%]{max-width:37rem}.expandcollapsebutton[_ngcontent-%COMP%]{margin-top:-7px;margin-left:2%}"]})}}return t})();var Zp=()=>["../../general"];function ts(t,s){if(t&1&&(a(0,"h2",2),o(1),r(2,"translate"),r(3,"translate"),i()),t&2){let e=f();n(),A(" ",c(2,2,"labels.menus."+e.actionName)," ",c(3,4,"labels.heading.Recurring Deposit Transactions")," ")}}function es(t,s){t&1&&(a(0,"mat-error"),o(1),r(2,"translate"),r(3,"translate"),a(4,"strong"),o(5),r(6,"translate"),i()()),t&2&&(n(),A(" ",c(2,3,"labels.inputs.Transaction Date")," ",c(3,5,"labels.commons.is")," "),n(4),m(c(6,7,"labels.commons.required")))}function ns(t,s){if(t&1&&(a(0,"mat-option",10),o(1),i()),t&2){let e=s.$implicit;d("value",e.id),n(),u(" ",e.name," ")}}function is(t,s){t&1&&(a(0,"mat-error"),o(1),r(2,"translate"),r(3,"translate"),a(4,"strong"),o(5),r(6,"translate"),i()()),t&2&&(n(),A(" ",c(2,3,"labels.inputs.Payment Type")," ",c(3,5,"labels.commons.is")," "),n(4),m(c(6,7,"labels.commons.required")))}function as(t,s){t&1&&(a(0,"mat-form-field")(1,"mat-label"),o(2),r(3,"translate"),i(),C(4,"input",19),i(),a(5,"mat-form-field")(6,"mat-label"),o(7),r(8,"translate"),i(),C(9,"input",20),i(),a(10,"mat-form-field")(11,"mat-label"),o(12),r(13,"translate"),i(),C(14,"input",21),i(),a(15,"mat-form-field")(16,"mat-label"),o(17),r(18,"translate"),i(),C(19,"input",22),i(),a(20,"mat-form-field")(21,"mat-label"),o(22),r(23,"translate"),i(),C(24,"input",23),i()),t&2&&(n(2),u(" ",c(3,5,"labels.inputs.Account")," #"),n(5),u("",c(8,7,"labels.inputs.Cheque")," #"),n(5),m(c(13,9,"labels.inputs.Routing Code")),n(5),u("",c(18,11,"labels.inputs.Reciept")," #"),n(5),u("",c(23,13,"labels.inputs.Bank")," #"))}var fn=(()=>{class t{constructor(){if(this.formBuilder=_(st),this.route=_(N),this.router=_(W),this.dateUtils=_(X),this.recurringDepositsService=_(k),this.settingsService=_($),this.showPaymentDetails=!1,this.minDate=new Date(2e3,0,1),this.maxDate=new Date,this.transactionType={deposit:!1,withdrawal:!1},this.route.data.subscribe(e=>{this.transactionAmount=e.recurringDepositsAccountActionData.amount,this.paymentTypes=e.recurringDepositsAccountActionData.paymentTypeOptions,e.recurringDepositsAccountActionData.outstandingChargeAmount&&e.recurringDepositsAccountActionData.outstandingChargeAmount>0&&(this.outstandingChargeAmount=e.recurringDepositsAccountActionData.outstandingChargeAmount,this.transactionAmount+=this.outstandingChargeAmount)}),this.actionName=this.route.snapshot.params.name,this.action=this.actionName.toLowerCase(),this.action==="deposit"||this.action==="withdrawal")this.transactionCommand=this.action,this.transactionType[this.transactionCommand]=!0;else throw new Error(`Invalid transaction action: ${this.actionName}`);this.accountId=this.route.parent.snapshot.params.recurringDepositAccountId}ngOnInit(){this.maxDate=this.settingsService.businessDate,this.createdepositRecurringDepositForm()}createdepositRecurringDepositForm(){this.depositRecurringDepositForm=this.formBuilder.group({transactionDate:[new Date,q.required],transactionAmount:[0,q.required],paymentTypeId:["",q.required],note:""})}addPaymentDetails(){this.showPaymentDetails=!this.showPaymentDetails,this.showPaymentDetails?(this.depositRecurringDepositForm.addControl("accountNumber",new tt("")),this.depositRecurringDepositForm.addControl("checkNumber",new tt("")),this.depositRecurringDepositForm.addControl("routingCode",new tt("")),this.depositRecurringDepositForm.addControl("receiptNumber",new tt("")),this.depositRecurringDepositForm.addControl("bankNumber",new tt(""))):(this.depositRecurringDepositForm.removeControl("accountNumber"),this.depositRecurringDepositForm.removeControl("checkNumber"),this.depositRecurringDepositForm.removeControl("routingCode"),this.depositRecurringDepositForm.removeControl("receiptNumber"),this.depositRecurringDepositForm.removeControl("bankNumber"))}toggleDisplay(){this.showPaymentDetails=!this.showPaymentDetails}submit(){let e=this.depositRecurringDepositForm.value,l=this.settingsService.dateFormat,p=this.settingsService.language.code,g=this.depositRecurringDepositForm.value.transactionDate;e.transactionDate instanceof Date&&(e.transactionDate=this.dateUtils.formatDate(g,l));let b=J(F({},e),{dateFormat:l,locale:p});delete b.note,b.transactionAmount=b.transactionAmount*1,this.recurringDepositsService.executeRecurringDepositsAccountCommand(this.accountId,this.action,b).subscribe(()=>{this.router.navigate(["../../"],{relativeTo:this.route})})}static{this.\u0275fac=function(l){return new(l||t)}}static{this.\u0275cmp=O({type:t,selectors:[["mifosx-deposit-recurring-deposits-account"]],inputs:{currency:"currency"},decls:44,vars:35,consts:[["transactionDatePicker",""],[1,"container"],["mat-title",""],[3,"ngSubmit","formGroup"],[1,"layout-column"],[3,"click"],["matInput","","required","","formControlName","transactionDate",3,"min","max","matDatepicker"],["matSuffix","",3,"for"],[3,"currency","isRequired","inputFormControl","inputLabel"],["formControlName","paymentTypeId","required",""],[3,"value"],[1,"flex-fill"],[1,"expandcollapsebutton","m-l-10","m-t-40","flex-75",3,"click"],[3,"className"],[1,"m-l-10"],["matInput","","formControlName","note","cdkTextareaAutosize","","cdkAutosizeMinRows","2"],[1,"layout-row","align-center","gap-5px","responsive-column"],["type","button","mat-raised-button","",3,"routerLink"],["mat-raised-button","","color","primary",3,"disabled"],["matInput","","formControlName","accountNumber"],["matInput","","formControlName","checkNumber"],["matInput","","formControlName","routingCode"],["matInput","","formControlName","receiptNumber"],["matInput","","formControlName","bankNumber"]],template:function(l,p){if(l&1){let g=y();a(0,"div",1)(1,"mat-card"),x(2,ts,4,6,"h2",2),a(3,"form",3),T("ngSubmit",function(){return S(g),M(p.submit())}),a(4,"mat-card-content")(5,"div",4)(6,"mat-form-field",5),T("click",function(){S(g);let G=E(13);return M(G.open())}),a(7,"mat-label"),o(8),r(9,"translate"),i(),C(10,"input",6)(11,"mat-datepicker-toggle",7)(12,"mat-datepicker",null,0),x(14,es,7,9,"mat-error"),i(),C(15,"mifosx-input-amount",8),a(16,"mat-form-field")(17,"mat-label"),o(18),r(19,"translate"),i(),a(20,"mat-select",9),L(21,ns,2,2,"mat-option",10,z),i(),x(23,is,7,9,"mat-error"),i(),a(24,"div",11)(25,"span",12),T("click",function(){return S(g),M(p.addPaymentDetails())}),a(26,"mat-slide-toggle")(27,"div",13)(28,"span",14),o(29),r(30,"translate"),i()()()()(),x(31,as,25,15),a(32,"mat-form-field")(33,"mat-label"),o(34),r(35,"translate"),i(),C(36,"textarea",15),i()()(),a(37,"mat-card-actions",16)(38,"button",17),o(39),r(40,"translate"),i(),a(41,"button",18),o(42),r(43,"translate"),i()()()()()}if(l&2){let g=E(13);n(2),D(p.transactionType.withdrawal?2:-1),n(),d("formGroup",p.depositRecurringDepositForm),n(5),m(c(9,22,"labels.inputs.Transaction Date")),n(2),d("min",p.minDate)("max",p.maxDate)("matDatepicker",g),n(),d("for",g),n(3),D(p.depositRecurringDepositForm.controls.transactionDate.hasError("required")?14:-1),n(),d("currency",p.currency)("isRequired",!0)("inputFormControl",p.depositRecurringDepositForm.controls.transactionAmount)("inputLabel","Transaction Amount"),n(3),m(c(19,24,"labels.inputs.Payment Type Id")),n(3),j(p.paymentTypes),n(2),D(p.depositRecurringDepositForm.controls.paymentTypeId.hasError("required")?23:-1),n(4),d("className",p.showPaymentDetails?"enabled":"disabled"),n(2),m(c(30,26,"labels.inputs.Show Payment Details")),n(2),D(p.showPaymentDetails?31:-1),n(3),m(c(35,28,"labels.inputs.Note")),n(4),d("routerLink",K(34,Zp)),n(),u(" ",c(40,30,"labels.buttons.Cancel")," "),n(2),d("disabled",!p.depositRecurringDepositForm.valid),n(),u(" ",c(43,32,"labels.buttons.Submit")," ")}},dependencies:[I,R,rt,mt,Z,ot,dt,ct,pt,Q,Y,ut,ft,nt,et,gt,ht,Ct,Ot,yt,Dt,bt,xt,V,Ee,We,Lt,w],styles:[".container[_ngcontent-%COMP%]{max-width:37rem}.expandcollapsebutton[_ngcontent-%COMP%]{margin-top:-7px;margin-left:2%}.right-input[_ngcontent-%COMP%]{text-align:right}.right-label[_ngcontent-%COMP%]{padding-right:25px!important}"]})}}return t})();function os(t,s){t&1&&C(0,"mifosx-activate-recurring-deposits-account")}function rs(t,s){t&1&&C(0,"mifosx-undo-approval-recurring-deposits-account")}function cs(t,s){t&1&&C(0,"mifosx-approve-recurring-deposits-account")}function ps(t,s){t&1&&C(0,"mifosx-reject-recurring-deposits-account")}function ss(t,s){t&1&&C(0,"mifosx-withdraw-by-client-recurring-deposits-account")}function ls(t,s){t&1&&C(0,"mifosx-add-charge-recurring-deposits-account")}function ms(t,s){t&1&&C(0,"mifosx-premature-close-recurring-deposit-account")}function ds(t,s){t&1&&C(0,"mifosx-close-recurring-deposits-account")}function us(t,s){if(t&1&&C(0,"mifosx-deposit-recurring-deposits-account",0),t&2){let e=f();d("currency",e.currency)}}var hn=(()=>{class t{constructor(){this.route=_(N),this.actions={Activate:!1,"Undo Activation":!1,"Undo Approval":!1,Approve:!1,Reject:!1,"Withdrawn by Client":!1,"Add Charge":!1,"Premature Close":!1,Close:!1,Deposit:!1,Withdrawal:!1},this.route.data.subscribe(l=>{l.recurringDepositsAccountActionData&&(this.currency=l.recurringDepositsAccountActionData.currency)});let e=this.route.snapshot.params.name;e&&e in this.actions&&(this.actions[e]=!0)}static{this.\u0275fac=function(l){return new(l||t)}}static{this.\u0275cmp=O({type:t,selectors:[["mifosx-recurring-deposits-account-actions"]],decls:9,vars:9,consts:[[3,"currency"]],template:function(l,p){l&1&&(x(0,os,1,0,"mifosx-activate-recurring-deposits-account"),x(1,rs,1,0,"mifosx-undo-approval-recurring-deposits-account"),x(2,cs,1,0,"mifosx-approve-recurring-deposits-account"),x(3,ps,1,0,"mifosx-reject-recurring-deposits-account"),x(4,ss,1,0,"mifosx-withdraw-by-client-recurring-deposits-account"),x(5,ls,1,0,"mifosx-add-charge-recurring-deposits-account"),x(6,ms,1,0,"mifosx-premature-close-recurring-deposit-account"),x(7,ds,1,0,"mifosx-close-recurring-deposits-account"),x(8,us,1,1,"mifosx-deposit-recurring-deposits-account",0)),l&2&&(D(p.actions.Activate?0:-1),n(),D(p.actions["Undo Approval"]||p.actions["Undo Activation"]?1:-1),n(),D(p.actions.Approve?2:-1),n(),D(p.actions.Reject?3:-1),n(),D(p.actions["Withdrawn by Client"]?4:-1),n(),D(p.actions["Add Charge"]?5:-1),n(),D(p.actions["Premature Close"]?6:-1),n(),D(p.actions.Close?7:-1),n(),D(p.actions.Deposit||p.actions.Withdrawal?8:-1))},dependencies:[I,R,sn,ln,mn,dn,un,gn,Cn,_n,fn],encapsulation:2})}}return t})();function gs(t,s){t&1&&(a(0,"button",11),C(1,"fa-icon",12),o(2),r(3,"translate"),i()),t&2&&(d("routerLink","edit"),n(2),u("",c(3,2,"labels.buttons.Edit")," "))}function Cs(t,s){if(t&1&&(a(0,"span"),x(1,gs,4,4,"button",11),i()),t&2){let e=f(2);n(),D(e.transactionData.transactionType.value==="Transfer"||e.transactionData.reversed==="true"?-1:1)}}function _s(t,s){if(t&1){let e=y();a(0,"button",13),T("click",function(){S(e);let p=f(2);return M(p.undoTransaction())}),C(1,"fa-icon",14),o(2),r(3,"translate"),i()}t&2&&(n(2),u("",c(3,1,"labels.buttons.Undo")," "))}function fs(t,s){t&1&&(a(0,"div",0),h(1,Cs,2,1,"span",9)(2,_s,4,3,"button",10),i()),t&2&&(n(),d("mifosxHasPermission","ADJUSTTRANSACTION_SAVINGSACCOUNT"),n(),d("mifosxHasPermission","UNDOTRANSACTION_SAVINGSACCOUNT"))}function hs(t,s){t&1&&(a(0,"div",4),o(1),r(2,"translate"),i()),t&2&&(n(),u(" ",c(2,1,"labels.inputs.Note")," "))}function xs(t,s){if(t&1&&(a(0,"div",5),o(1),i()),t&2){let e=f();n(),u(" ",e.transactionData.note," ")}}function Ds(t,s){if(t&1&&C(0,"mifosx-transaction-payment-detail",6),t&2){let e=f();d("paymentDetailData",e.transactionData.paymentDetailData)}}var xn=(()=>{class t{constructor(){this.recurringDepositsService=_(k),this.route=_(N),this.location=_(Bn),this.dateUtils=_(X),this.router=_(W),this.dialog=_(Xt),this.translateService=_(Ie),this.settingsService=_($),this.route.data.subscribe(e=>{this.transactionData=e.recurringDepositsAccountTransaction})}undoTransaction(){let e=this.route.parent.snapshot.params.recurringDepositAccountId;this.dialog.open(Kt,{data:{heading:this.translateService.instant("labels.heading.Undo Transaction"),dialogContext:this.translateService.instant("labels.dialogContext.Are you sure you want to undo this transaction ?")}}).afterClosed().subscribe(p=>{if(p.confirm){let g=this.settingsService.language.code,b=this.settingsService.dateFormat,G={transactionDate:this.dateUtils.formatDate(this.transactionData.date&&new Date(this.transactionData.date),b),transactionAmount:0,dateFormat:b,locale:g};this.recurringDepositsService.executeRecurringDepositsAccountTransactionsCommand(e,"undo",G,this.transactionData.id).subscribe(()=>{this.router.navigate(["../"],{relativeTo:this.route})})}})}transactionColor(){return this.transactionData.reversed?"undo":"active"}goBack(){this.location.back()}static{this.\u0275fac=function(l){return new(l||t)}}static{this.\u0275cmp=O({type:t,selectors:[["mifosx-view-transaction"]],decls:40,vars:35,consts:[[1,"container","m-b-20","align-end","gap-2percent"],[1,"container"],[1,"layout-row-wrap"],[1,"flex-100",3,"ngClass"],[1,"flex-50","mat-body-strong"],[1,"flex-50"],[3,"paymentDetailData"],[1,"layout-row","layout-xs-column","layout-align-center","gap-5px","m-b-20"],["type","button","color","primary","mat-raised-button","",3,"click"],[4,"mifosxHasPermission"],["mat-raised-button","","color","warn",3,"click",4,"mifosxHasPermission"],["mat-raised-button","","color","primary",3,"routerLink"],["icon","edit",1,"m-r-10"],["mat-raised-button","","color","warn",3,"click"],["icon","undo",1,"m-r-10"]],template:function(l,p){l&1&&(x(0,fs,3,2,"div",0),a(1,"div",1)(2,"mat-card")(3,"mat-card-content")(4,"div",2),C(5,"div",3),a(6,"div",4),o(7),r(8,"translate"),i(),a(9,"div",5),o(10),i(),a(11,"div",4),o(12),r(13,"translate"),i(),a(14,"div",5),o(15),i(),a(16,"div",4),o(17),r(18,"translate"),i(),a(19,"div",5),o(20),r(21,"dateFormat"),i(),a(22,"div",4),o(23),r(24,"translate"),i(),a(25,"div",5),o(26),i(),a(27,"div",4),o(28),r(29,"translate"),i(),a(30,"div",5),o(31),r(32,"currency"),i(),x(33,hs,3,3,"div",4),x(34,xs,2,1,"div",5),x(35,Ds,1,1,"mifosx-transaction-payment-detail",6),i()(),a(36,"mat-card-actions",7)(37,"button",8),T("click",function(){return p.goBack()}),o(38),r(39,"translate"),i()()()()),l&2&&(D(p.transactionData.reversed?-1:0),n(5),d("ngClass",p.transactionColor()),n(2),u(" ",c(8,16,"labels.inputs.Transaction Id")," "),n(3),u(" ",p.transactionData.id," "),n(2),u(" ",c(13,18,"labels.inputs.Type")," "),n(3),u(" ",p.transactionData.transactionType.value," "),n(2),u(" ",c(18,20,"labels.inputs.Transaction Date")," "),n(3),u(" ",c(21,22,p.transactionData.date)," "),n(3),u(" ",c(24,24,"labels.inputs.Currency")," "),n(3),u(" ",p.transactionData.currency.displayLabel," "),n(2),u(" ",c(29,26,"labels.inputs.Amount")," "),n(3),u(" ",U(32,28,p.transactionData.amount,p.transactionData.currency.code,"symbol-narrow","1.2-2")," "),n(2),D(p.transactionData.note?33:-1),n(),D(p.transactionData.note?34:-1),n(),D(p.transactionData.paymentDetailData?35:-1),n(3),u(" ",c(39,33,"labels.buttons.Back")," "))},dependencies:[I,be,R,Q,Y,ut,ft,V,re,_t,ci,Se,It,w],styles:["body[_ngcontent-%COMP%] table[_ngcontent-%COMP%] tbody[_ngcontent-%COMP%] tr[_ngcontent-%COMP%]:nth-child(2n){background-color:#f2f2f2}.bg-black[_ngcontent-%COMP%]{background-color:#000}.bg-light-grey[_ngcontent-%COMP%]{background-color:#e5e5e5}.bg-medium-grey[_ngcontent-%COMP%]{background-color:#ccc}.bg-grey[_ngcontent-%COMP%]{background-color:#999}.bg-dark-grey[_ngcontent-%COMP%]{background-color:#222}.bg-white[_ngcontent-%COMP%], .bg-fff[_ngcontent-%COMP%]{background-color:#fff}.bg-none[_ngcontent-%COMP%], .no-bg[_ngcontent-%COMP%]{background:none;background-image:none;background-color:transparent}.bg-facebook[_ngcontent-%COMP%]{background-color:#47639e}.bg-twitter[_ngcontent-%COMP%]{background-color:#02a8f3}body[_ngcontent-%COMP%] table[_ngcontent-%COMP%]{border:1px solid rgba(0,0,0,.12)}.no-border[_ngcontent-%COMP%]{border:none}.no-border-t[_ngcontent-%COMP%]{border-top:none}.no-border-r[_ngcontent-%COMP%]{border-right:none}.no-border-b[_ngcontent-%COMP%]{border-bottom:none}.no-border-l[_ngcontent-%COMP%]{border-left:none}.no-border-lr[_ngcontent-%COMP%], .no-border-rl[_ngcontent-%COMP%]{border-left:none;border-right:none}.no-border-tb[_ngcontent-%COMP%], .no-border-bt[_ngcontent-%COMP%]{border-top:none;border-bottom:none}.no-border-tl[_ngcontent-%COMP%], .no-border-lt[_ngcontent-%COMP%]{border-top:none;border-left:none}.no-border-tr[_ngcontent-%COMP%], .no-border-rt[_ngcontent-%COMP%]{border-top:none;border-right:none}.no-border-bl[_ngcontent-%COMP%], .no-border-lb[_ngcontent-%COMP%]{border-bottom:none;border-left:none}.no-border-br[_ngcontent-%COMP%], .no-border-rb[_ngcontent-%COMP%]{border-bottom:none;border-right:none}.border-dashed[_ngcontent-%COMP%], .border-dotted[_ngcontent-%COMP%]{border-style:dashed}.border-black[_ngcontent-%COMP%]{border-color:#000}.border-light-grey[_ngcontent-%COMP%]{border-color:#e5e5e5}.border-medium-grey[_ngcontent-%COMP%]{border-color:#ccc}.border-grey[_ngcontent-%COMP%]{border-color:#999}.border-dark-grey[_ngcontent-%COMP%]{border-color:#2222}.border-white[_ngcontent-%COMP%], .border-fff[_ngcontent-%COMP%]{border-color:#fff}.no-border-radius[_ngcontent-%COMP%]{border-radius:0}.radius3[_ngcontent-%COMP%]{border-radius:3px}.radius5[_ngcontent-%COMP%]{border-radius:5px}.radius10[_ngcontent-%COMP%]{border-radius:10px}.column-mandatory[_ngcontent-%COMP%]{color:#5cb85c;text-align:center}.not-column-mandatory[_ngcontent-%COMP%]{color:#666f73;text-align:center}.cdk-drag-placeholder[_ngcontent-%COMP%]{background:#3498db}.yes[_ngcontent-%COMP%]{color:#5cb85c!important;background-color:#5cb85c;height:4px;cursor:none}.no[_ngcontent-%COMP%]{color:red;background-color:red;height:4px;cursor:none}.strike[_ngcontent-%COMP%]{text-decoration:line-through;color:red}.transfer[_ngcontent-%COMP%]{color:#16a085}.linked[_ngcontent-%COMP%]{color:#4461e2}.accrual[_ngcontent-%COMP%]{color:#999}.fa-question[_ngcontent-%COMP%]{color:#4461e2}.enabled[_ngcontent-%COMP%]{color:#32cd32}.disabled[_ngcontent-%COMP%]{color:#f44366}.v-mid[_ngcontent-%COMP%], .v-m[_ngcontent-%COMP%]{vertical-align:middle}.v-top[_ngcontent-%COMP%], .v-t[_ngcontent-%COMP%]{vertical-align:top}.v-bottom[_ngcontent-%COMP%], .v-b[_ngcontent-%COMP%]{vertical-align:bottom}.v-super[_ngcontent-%COMP%]{vertical-align:super}.r-amount[_ngcontent-%COMP%]{text-align:right!important;padding-right:5px!important}.left[_ngcontent-%COMP%]{text-align:left!important}.right[_ngcontent-%COMP%]{text-align:right!important}.center[_ngcontent-%COMP%]{text-align:center!important}.amount-plus[_ngcontent-%COMP%]{color:#000}.amount-minus[_ngcontent-%COMP%]{color:#4461e2}.block[_ngcontent-%COMP%]{display:block}.inline[_ngcontent-%COMP%]{display:inline}.in-block[_ngcontent-%COMP%]{display:inline-block;zoom:1}.d-none[_ngcontent-%COMP%], .hide[_ngcontent-%COMP%], .hidden[_ngcontent-%COMP%]{display:none}.t-0[_ngcontent-%COMP%]{top:0}.b-0[_ngcontent-%COMP%]{bottom:0}.l-0[_ngcontent-%COMP%]{left:0}.r-0[_ngcontent-%COMP%]{right:0}.tb-0[_ngcontent-%COMP%]{top:0;bottom:0}.lr-0[_ngcontent-%COMP%]{left:0;right:0}.f-left[_ngcontent-%COMP%]{float:left}.f-right[_ngcontent-%COMP%]{float:right}.f-none[_ngcontent-%COMP%]{float:none}textarea[_ngcontent-%COMP%]{resize:both}textarea.vertical[_ngcontent-%COMP%], textarea.horizontal[_ngcontent-%COMP%]{resize:vertical}textarea.noresize[_ngcontent-%COMP%]{resize:none}.full-input[_ngcontent-%COMP%] input[_ngcontent-%COMP%], .full-input[_ngcontent-%COMP%] select[_ngcontent-%COMP%], .full-input[_ngcontent-%COMP%] textarea[_ngcontent-%COMP%]{width:100%}.normal[_ngcontent-%COMP%] input[_ngcontent-%COMP%], .normal[_ngcontent-%COMP%] select[_ngcontent-%COMP%], .normal[_ngcontent-%COMP%] textarea[_ngcontent-%COMP%], .full-input[_ngcontent-%COMP%] [type=checkbox][_ngcontent-%COMP%], .full-input[_ngcontent-%COMP%] [type=radio][_ngcontent-%COMP%]{width:auto}.mat-tab-body-content[_ngcontent-%COMP%]{margin-bottom:20px}.mat-datepicker-input[_ngcontent-%COMP%]{margin-top:5px;margin-bottom:5px}.loader-wrapper[_ngcontent-%COMP%]{height:100vh;width:100vw}.loader-wrapper[_ngcontent-%COMP%] .triangle[_ngcontent-%COMP%]{width:0;height:0;border-style:solid;position:absolute;animation:_ngcontent-%COMP%_rotate .8s infinite .2s}.loader-wrapper[_ngcontent-%COMP%] .bottom[_ngcontent-%COMP%]{border-width:0 90px 90px;border-color:transparent transparent #1fb050;bottom:calc(50% - 100px);left:calc(50% - 90px)}.loader-wrapper[_ngcontent-%COMP%] .top[_ngcontent-%COMP%]{border-width:90px 90px 0;border-color:#b4d575 transparent transparent;top:calc(50% - 100px);left:calc(50% - 90px)}.loader-wrapper[_ngcontent-%COMP%] .left[_ngcontent-%COMP%]{border-width:90px 0 90px 90px;border-color:transparent transparent transparent #1074b9;top:calc(50% - 90px);left:calc(50% - 100px)}.loader-wrapper[_ngcontent-%COMP%] .right[_ngcontent-%COMP%]{border-width:90px 90px 90px 0;border-color:transparent #1daeec transparent transparent;top:calc(50% - 90px);right:calc(50% - 100px)}@keyframes _ngcontent-%COMP%_rotate{0%{transform:rotate(0)}to{transform:rotate(360deg)}}body[_ngcontent-%COMP%]{margin:0}.container[_ngcontent-%COMP%]{margin:0 auto}.mb-05[_ngcontent-%COMP%]{margin-bottom:.5rem}.mr-05[_ngcontent-%COMP%]{margin-right:.5rem}.mb-1[_ngcontent-%COMP%]{margin-bottom:1rem}.mt-1[_ngcontent-%COMP%]{margin-top:1rem}.m-5[_ngcontent-%COMP%]{margin:5px}.m-t-5[_ngcontent-%COMP%]{margin-top:5px}.m-r-5[_ngcontent-%COMP%]{margin-right:5px}.m-b-5[_ngcontent-%COMP%]{margin-bottom:5px}.m-l-5[_ngcontent-%COMP%]{margin-left:5px}.m-v-5[_ngcontent-%COMP%]{margin:5px 0}.m-h-5[_ngcontent-%COMP%]{margin:0 5px}.m-10[_ngcontent-%COMP%]{margin:10px}.m-t-10[_ngcontent-%COMP%]{margin-top:10px}.m-r-10[_ngcontent-%COMP%]{margin-right:10px}.m-b-10[_ngcontent-%COMP%]{margin-bottom:10px}.m-l-10[_ngcontent-%COMP%]{margin-left:10px}.m-v-10[_ngcontent-%COMP%]{margin:10px 0}.m-h-10[_ngcontent-%COMP%]{margin:0 10px}.m-15[_ngcontent-%COMP%]{margin:15px}.m-t-15[_ngcontent-%COMP%]{margin-top:15px}.m-r-15[_ngcontent-%COMP%]{margin-right:15px}.m-b-15[_ngcontent-%COMP%]{margin-bottom:15px}.m-l-15[_ngcontent-%COMP%]{margin-left:15px}.m-v-15[_ngcontent-%COMP%]{margin:15px 0}.m-h-15[_ngcontent-%COMP%]{margin:0 15px}.m-20[_ngcontent-%COMP%]{margin:20px}.m-t-20[_ngcontent-%COMP%]{margin-top:20px}.m-r-20[_ngcontent-%COMP%]{margin-right:20px}.m-b-20[_ngcontent-%COMP%]{margin-bottom:20px}.m-l-20[_ngcontent-%COMP%]{margin-left:20px}.m-v-20[_ngcontent-%COMP%]{margin:20px 0}.m-h-20[_ngcontent-%COMP%]{margin:0 20px}.m-25[_ngcontent-%COMP%]{margin:25px}.m-t-25[_ngcontent-%COMP%]{margin-top:25px}.m-r-25[_ngcontent-%COMP%]{margin-right:25px}.m-b-25[_ngcontent-%COMP%]{margin-bottom:25px}.m-l-25[_ngcontent-%COMP%]{margin-left:25px}.m-v-25[_ngcontent-%COMP%]{margin:25px 0}.m-h-25[_ngcontent-%COMP%]{margin:0 25px}.m-30[_ngcontent-%COMP%]{margin:30px}.m-t-30[_ngcontent-%COMP%]{margin-top:30px}.m-r-30[_ngcontent-%COMP%]{margin-right:30px}.m-b-30[_ngcontent-%COMP%]{margin-bottom:30px}.m-l-30[_ngcontent-%COMP%]{margin-left:30px}.m-v-30[_ngcontent-%COMP%]{margin:30px 0}.m-h-30[_ngcontent-%COMP%]{margin:0 30px}.m-35[_ngcontent-%COMP%]{margin:35px}.m-t-35[_ngcontent-%COMP%]{margin-top:35px}.m-r-35[_ngcontent-%COMP%]{margin-right:35px}.m-b-35[_ngcontent-%COMP%]{margin-bottom:35px}.m-l-35[_ngcontent-%COMP%]{margin-left:35px}.m-v-35[_ngcontent-%COMP%]{margin:35px 0}.m-h-35[_ngcontent-%COMP%]{margin:0 35px}.m-40[_ngcontent-%COMP%]{margin:40px}.m-t-40[_ngcontent-%COMP%]{margin-top:40px}.m-r-40[_ngcontent-%COMP%]{margin-right:40px}.m-b-40[_ngcontent-%COMP%]{margin-bottom:40px}.m-l-40[_ngcontent-%COMP%]{margin-left:40px}.m-v-40[_ngcontent-%COMP%]{margin:40px 0}.m-h-40[_ngcontent-%COMP%]{margin:0 40px}.m-45[_ngcontent-%COMP%]{margin:45px}.m-t-45[_ngcontent-%COMP%]{margin-top:45px}.m-r-45[_ngcontent-%COMP%]{margin-right:45px}.m-b-45[_ngcontent-%COMP%]{margin-bottom:45px}.m-l-45[_ngcontent-%COMP%]{margin-left:45px}.m-v-45[_ngcontent-%COMP%]{margin:45px 0}.m-h-45[_ngcontent-%COMP%]{margin:0 45px}.m-50[_ngcontent-%COMP%]{margin:50px}.m-t-50[_ngcontent-%COMP%]{margin-top:50px}.m-r-50[_ngcontent-%COMP%]{margin-right:50px}.m-b-50[_ngcontent-%COMP%]{margin-bottom:50px}.m-l-50[_ngcontent-%COMP%]{margin-left:50px}.m-v-50[_ngcontent-%COMP%]{margin:50px 0}.m-h-50[_ngcontent-%COMP%]{margin:0 50px}.m-55[_ngcontent-%COMP%]{margin:55px}.m-t-55[_ngcontent-%COMP%]{margin-top:55px}.m-r-55[_ngcontent-%COMP%]{margin-right:55px}.m-b-55[_ngcontent-%COMP%]{margin-bottom:55px}.m-l-55[_ngcontent-%COMP%]{margin-left:55px}.m-v-55[_ngcontent-%COMP%]{margin:55px 0}.m-h-55[_ngcontent-%COMP%]{margin:0 55px}.m-60[_ngcontent-%COMP%]{margin:60px}.m-t-60[_ngcontent-%COMP%]{margin-top:60px}.m-r-60[_ngcontent-%COMP%]{margin-right:60px}.m-b-60[_ngcontent-%COMP%]{margin-bottom:60px}.m-l-60[_ngcontent-%COMP%]{margin-left:60px}.m-v-60[_ngcontent-%COMP%]{margin:60px 0}.m-h-60[_ngcontent-%COMP%]{margin:0 60px}.m-65[_ngcontent-%COMP%]{margin:65px}.m-t-65[_ngcontent-%COMP%]{margin-top:65px}.m-r-65[_ngcontent-%COMP%]{margin-right:65px}.m-b-65[_ngcontent-%COMP%]{margin-bottom:65px}.m-l-65[_ngcontent-%COMP%]{margin-left:65px}.m-v-65[_ngcontent-%COMP%]{margin:65px 0}.m-h-65[_ngcontent-%COMP%]{margin:0 65px}.m-70[_ngcontent-%COMP%]{margin:70px}.m-t-70[_ngcontent-%COMP%]{margin-top:70px}.m-r-70[_ngcontent-%COMP%]{margin-right:70px}.m-b-70[_ngcontent-%COMP%]{margin-bottom:70px}.m-l-70[_ngcontent-%COMP%]{margin-left:70px}.m-v-70[_ngcontent-%COMP%]{margin:70px 0}.m-h-70[_ngcontent-%COMP%]{margin:0 70px}.m-75[_ngcontent-%COMP%]{margin:75px}.m-t-75[_ngcontent-%COMP%]{margin-top:75px}.m-r-75[_ngcontent-%COMP%]{margin-right:75px}.m-b-75[_ngcontent-%COMP%]{margin-bottom:75px}.m-l-75[_ngcontent-%COMP%]{margin-left:75px}.m-v-75[_ngcontent-%COMP%]{margin:75px 0}.m-h-75[_ngcontent-%COMP%]{margin:0 75px}.m-80[_ngcontent-%COMP%]{margin:80px}.m-t-80[_ngcontent-%COMP%]{margin-top:80px}.m-r-80[_ngcontent-%COMP%]{margin-right:80px}.m-b-80[_ngcontent-%COMP%]{margin-bottom:80px}.m-l-80[_ngcontent-%COMP%]{margin-left:80px}.m-v-80[_ngcontent-%COMP%]{margin:80px 0}.m-h-80[_ngcontent-%COMP%]{margin:0 80px}.no-m[_ngcontent-%COMP%]{margin:0}.no-m-t[_ngcontent-%COMP%]{margin-top:0}.no-m-r[_ngcontent-%COMP%]{margin-right:0}.no-m-b[_ngcontent-%COMP%]{margin-bottom:0}.no-m-l[_ngcontent-%COMP%]{margin-left:0}.no-m-v[_ngcontent-%COMP%], .no-m-h[_ngcontent-%COMP%], .no-margin[_ngcontent-%COMP%]{margin:0}.no-m-lr[_ngcontent-%COMP%], .no-m-rl[_ngcontent-%COMP%]{margin-left:0;margin-right:0}.no-m-tb[_ngcontent-%COMP%], .no-m-bt[_ngcontent-%COMP%]{margin-top:0;margin-bottom:0}.m-t-only[_ngcontent-%COMP%]{margin-left:0;margin-right:0;margin-bottom:0}.m-b-only[_ngcontent-%COMP%]{margin-left:0;margin-right:0;margin-top:0}.m-l-only[_ngcontent-%COMP%]{margin-right:0;margin-top:0;margin-bottom:0}.m-r-only[_ngcontent-%COMP%]{margin-left:0;margin-top:0;margin-bottom:0}.m-auto[_ngcontent-%COMP%]{margin-left:auto;margin-right:auto}.ls-0[_ngcontent-%COMP%]{margin-left:10px;margin-right:10px}html[_ngcontent-%COMP%], body[_ngcontent-%COMP%]{-webkit-tap-highlight-color:transparent}div[_ngcontent-%COMP%]{box-sizing:border-box}.color-inherit[_ngcontent-%COMP%]{color:inherit}.no-shadow[_ngcontent-%COMP%]{box-shadow:none}.pointer[_ngcontent-%COMP%]{cursor:pointer}.nolist[_ngcontent-%COMP%]{list-style:none}.actions-menu[_ngcontent-%COMP%]{color:#fff}.alert[_ngcontent-%COMP%]{background-color:#e8f4fd;padding:6px 16px;font-size:.875rem;font-family:Roboto,Helvetica Neue,sans-serif;font-weight:400;line-height:1.43;border-radius:4px;letter-spacing:normal;margin:10px}.alert[_ngcontent-%COMP%] .message[_ngcontent-%COMP%]{padding:8px 0;font-size:18px}.alert[_ngcontent-%COMP%] .alert-check[_ngcontent-%COMP%]{color:#359ff4;margin-right:2px;font-size:1.4rem} .mat-tooltip{font-size:15px;color:#fff!important;background-color:#4461e2b3;border:1px solid rgb(25.7777777778,51.5555555556,166.2222222222);max-width:400px!important;white-space:pre-line!important}.loading[_ngcontent-%COMP%]{position:absolute;min-width:100%;width:100px;height:12px;background:linear-gradient(125deg,#fff,#4461e2,#fff);animation:grow 4s linear infinite,move 4s linear infinite}mat-card-title[_ngcontent-%COMP%]{font-weight:600;font-size:x-large;padding-left:20px;padding-top:20px}html[_ngcontent-%COMP%], body[_ngcontent-%COMP%]{overflow:hidden}.overflow-x-scroll[_ngcontent-%COMP%]{max-width:100%;overflow-x:auto}.overflow-no[_ngcontent-%COMP%]{overflow:hidden}.overflow-auto[_ngcontent-%COMP%]{overflow:auto}.overflow-scroll[_ngcontent-%COMP%]{overflow:scroll}.table-container[_ngcontent-%COMP%]{overflow-x:auto;max-width:100%}body[_ngcontent-%COMP%], .no-p[_ngcontent-%COMP%]{padding:0}.no-p-t[_ngcontent-%COMP%]{padding-top:0}.no-p-r[_ngcontent-%COMP%]{padding-right:0}.no-p-b[_ngcontent-%COMP%]{padding-bottom:0}.no-p-l[_ngcontent-%COMP%]{padding-left:0}.no-p-v[_ngcontent-%COMP%], .no-p-h[_ngcontent-%COMP%]{padding:0}.p-5[_ngcontent-%COMP%]{padding:5px}.p-t-5[_ngcontent-%COMP%]{padding-top:5px}.p-r-5[_ngcontent-%COMP%]{padding-right:5px}.p-b-5[_ngcontent-%COMP%]{padding-bottom:5px}.p-l-5[_ngcontent-%COMP%]{padding-left:5px}.p-v-5[_ngcontent-%COMP%]{padding:5px 0}.p-h-5[_ngcontent-%COMP%]{padding:0 5px}.p-10[_ngcontent-%COMP%]{padding:10px}.p-t-10[_ngcontent-%COMP%]{padding-top:10px}.p-b-10[_ngcontent-%COMP%]{padding-bottom:10px}.p-v-10[_ngcontent-%COMP%]{padding:10px 0}.p-h-10[_ngcontent-%COMP%]{padding:0 10px}.p-15[_ngcontent-%COMP%]{padding:15px}.p-t-15[_ngcontent-%COMP%]{padding-top:15px}.p-r-15[_ngcontent-%COMP%]{padding-right:15px}.p-b-15[_ngcontent-%COMP%]{padding-bottom:15px}.p-l-15[_ngcontent-%COMP%]{padding-left:15px}.p-v-15[_ngcontent-%COMP%]{padding:15px 0}.p-h-15[_ngcontent-%COMP%]{padding:0 15px}.p-20[_ngcontent-%COMP%]{padding:20px}.p-t-20[_ngcontent-%COMP%]{padding-top:20px}.p-r-20[_ngcontent-%COMP%]{padding-right:20px}.p-b-20[_ngcontent-%COMP%]{padding-bottom:20px}.p-l-20[_ngcontent-%COMP%]{padding-left:20px}.p-v-20[_ngcontent-%COMP%]{padding:20px 0}.p-h-20[_ngcontent-%COMP%]{padding:0 20px}.p-25[_ngcontent-%COMP%]{padding:25px}.p-t-25[_ngcontent-%COMP%]{padding-top:25px}.p-r-25[_ngcontent-%COMP%]{padding-right:25px}.p-b-25[_ngcontent-%COMP%]{padding-bottom:25px}.p-l-25[_ngcontent-%COMP%]{padding-left:25px}.p-v-25[_ngcontent-%COMP%]{padding:25px 0}.p-h-25[_ngcontent-%COMP%]{padding:0 25px}.p-30[_ngcontent-%COMP%]{padding:30px}.p-t-30[_ngcontent-%COMP%]{padding-top:30px}.p-r-30[_ngcontent-%COMP%]{padding-right:30px}.p-b-30[_ngcontent-%COMP%]{padding-bottom:30px}.p-l-30[_ngcontent-%COMP%]{padding-left:30px}.p-v-30[_ngcontent-%COMP%]{padding:30px 0}.p-h-30[_ngcontent-%COMP%]{padding:0 30px}.p-35[_ngcontent-%COMP%]{padding:35px}.p-t-35[_ngcontent-%COMP%]{padding-top:35px}.p-r-35[_ngcontent-%COMP%]{padding-right:35px}.p-b-35[_ngcontent-%COMP%]{padding-bottom:35px}.p-l-35[_ngcontent-%COMP%]{padding-left:35px}.p-v-35[_ngcontent-%COMP%]{padding:35px 0}.p-h-35[_ngcontent-%COMP%]{padding:0 35px}.p-40[_ngcontent-%COMP%]{padding:40px}.p-t-40[_ngcontent-%COMP%]{padding-top:40px}.p-r-40[_ngcontent-%COMP%]{padding-right:40px}.p-b-40[_ngcontent-%COMP%]{padding-bottom:40px}.p-l-40[_ngcontent-%COMP%]{padding-left:40px}.p-v-40[_ngcontent-%COMP%]{padding-top:40px;padding-bottom:40px}.p-h-40[_ngcontent-%COMP%]{padding:0 40px}.p-45[_ngcontent-%COMP%]{padding:45px}.p-t-45[_ngcontent-%COMP%]{padding-top:45px}.p-r-45[_ngcontent-%COMP%]{padding-right:45px}.p-b-45[_ngcontent-%COMP%]{padding-bottom:45px}.p-l-45[_ngcontent-%COMP%]{padding-left:45px}.p-v-45[_ngcontent-%COMP%]{padding:45px 0}.p-h-45[_ngcontent-%COMP%]{padding:0 45px}.p-50[_ngcontent-%COMP%]{padding:50px}.p-t-50[_ngcontent-%COMP%]{padding-top:50px}.p-r-50[_ngcontent-%COMP%]{padding-right:50px}.p-b-50[_ngcontent-%COMP%]{padding-bottom:50px}.p-l-50[_ngcontent-%COMP%]{padding-left:50px}.p-v-50[_ngcontent-%COMP%]{padding:50px 0}.p-h-50[_ngcontent-%COMP%]{padding:0 50px}.p-55[_ngcontent-%COMP%]{padding:55px}.p-t-55[_ngcontent-%COMP%]{padding-top:55px}.p-r-55[_ngcontent-%COMP%]{padding-right:55px}.p-b-55[_ngcontent-%COMP%]{padding-bottom:55px}.p-l-55[_ngcontent-%COMP%]{padding-left:55px}.p-v-55[_ngcontent-%COMP%]{padding:55px 0}.p-h-55[_ngcontent-%COMP%]{padding:0 55px}.p-60[_ngcontent-%COMP%]{padding:60px}.p-t-60[_ngcontent-%COMP%]{padding-top:60px}.p-r-60[_ngcontent-%COMP%]{padding-right:60px}.p-b-60[_ngcontent-%COMP%]{padding-bottom:60px}.p-l-60[_ngcontent-%COMP%]{padding-left:60px}.p-v-60[_ngcontent-%COMP%]{padding:60px 0}.p-h-60[_ngcontent-%COMP%]{padding:0 60px}.p-65[_ngcontent-%COMP%]{padding:65px}.p-t-65[_ngcontent-%COMP%]{padding-top:65px}.p-r-65[_ngcontent-%COMP%]{padding-right:65px}.p-b-65[_ngcontent-%COMP%]{padding-bottom:65px}.p-l-65[_ngcontent-%COMP%]{padding-left:65px}.p-v-65[_ngcontent-%COMP%]{padding:65px 0}.p-h-65[_ngcontent-%COMP%]{padding:0 65px}.p-70[_ngcontent-%COMP%]{padding:70px}.p-t-70[_ngcontent-%COMP%]{padding-top:70px}.p-r-70[_ngcontent-%COMP%]{padding-right:70px}.p-b-70[_ngcontent-%COMP%]{padding-bottom:70px}.p-l-70[_ngcontent-%COMP%]{padding-left:70px}.p-v-70[_ngcontent-%COMP%]{padding:70px 0}.p-h-70[_ngcontent-%COMP%]{padding:0 70px}.p-75[_ngcontent-%COMP%]{padding:75px}.p-t-75[_ngcontent-%COMP%]{padding-top:75px}.p-r-75[_ngcontent-%COMP%]{padding-right:75px}.p-b-75[_ngcontent-%COMP%]{padding-bottom:75px}.p-l-75[_ngcontent-%COMP%]{padding-left:75px}.p-v-75[_ngcontent-%COMP%]{padding:75px 0}.p-h-75[_ngcontent-%COMP%]{padding:0 75px}.p-80[_ngcontent-%COMP%]{padding:80px}.p-t-80[_ngcontent-%COMP%]{padding-top:80px}.p-r-80[_ngcontent-%COMP%]{padding-right:80px}.p-b-80[_ngcontent-%COMP%]{padding-bottom:80px}.p-l-80[_ngcontent-%COMP%]{padding-left:80px}.p-v-80[_ngcontent-%COMP%]{padding:80px 0}.p-h-80[_ngcontent-%COMP%]{padding:0 80px}.no-padding[_ngcontent-%COMP%]{padding:0!important}.no-pad-lr[_ngcontent-%COMP%], .no-pad-rl[_ngcontent-%COMP%]{padding-left:0;padding-right:0}.no-pad-tb[_ngcontent-%COMP%], .no-pad-bt[_ngcontent-%COMP%]{padding-top:0;padding-bottom:0}.pad-t-only[_ngcontent-%COMP%]{padding-left:0;padding-right:0;padding-bottom:0}.pad-b-only[_ngcontent-%COMP%]{padding-left:0;padding-right:0;padding-top:0}.pad-l-only[_ngcontent-%COMP%]{padding-right:0;padding-top:0;padding-bottom:0}.pad-r-only[_ngcontent-%COMP%]{padding-left:0;padding-top:0;padding-bottom:0}html[_ngcontent-%COMP%], body[_ngcontent-%COMP%], .rel[_ngcontent-%COMP%], .relative[_ngcontent-%COMP%]{position:relative}.abs[_ngcontent-%COMP%], .absolute[_ngcontent-%COMP%]{position:absolute}.fixed[_ngcontent-%COMP%]{position:fixed}.status-active[_ngcontent-%COMP%]{color:#5cb85c}.status-inactive[_ngcontent-%COMP%]{color:#666f73}.status-deleted[_ngcontent-%COMP%]{color:#000}.status-pending[_ngcontent-%COMP%]{color:orange}.status-approved[_ngcontent-%COMP%]{color:#4461e2}.status-overpaid[_ngcontent-%COMP%]{color:purple}.status-chargeoff[_ngcontent-%COMP%]{color:#f39c12}.status-active-overdue[_ngcontent-%COMP%], .status-block[_ngcontent-%COMP%]{color:red}.status-matured[_ngcontent-%COMP%]{color:#ff4000}.subStatus-contract-termination[_ngcontent-%COMP%]{color:#b3b3b3}.mat-step-header[_ngcontent-%COMP%] .mat-step-icon-state-done[_ngcontent-%COMP%]{background-color:#2af72a}.mat-step-header[_ngcontent-%COMP%] .mat-step-icon-state-done[_ngcontent-%COMP%] .status-transfer-progress[_ngcontent-%COMP%]{color:#ff4000}.mat-step-header[_ngcontent-%COMP%] .mat-step-icon-state-done[_ngcontent-%COMP%] .status-transfer-hold[_ngcontent-%COMP%]{color:#df0101}html[_ngcontent-%COMP%], body[_ngcontent-%COMP%]{-webkit-font-smoothing:antialiased}html[_ngcontent-%COMP%]{font-size:16px}body[_ngcontent-%COMP%]{font-family:Roboto,Helvetica Neue,sans-serif;font-weight:400;font-size:14px;color:#000000de;line-height:1.5;letter-spacing:normal}.mat-h1[_ngcontent-%COMP%], .mat-headline[_ngcontent-%COMP%], .mat-typography[_ngcontent-%COMP%] .mat-h1[_ngcontent-%COMP%], .mat-typography[_ngcontent-%COMP%] .mat-headline[_ngcontent-%COMP%], .mat-typography[_ngcontent-%COMP%] h1[_ngcontent-%COMP%]{font:400 24px/32px Roboto,Helvetica Neue,sans-serif;letter-spacing:normal;margin:0 0 16px}.lh-1[_ngcontent-%COMP%]{line-height:1}.lh-13[_ngcontent-%COMP%]{line-height:1.3}.lh-15[_ngcontent-%COMP%]{line-height:1.5}.bold[_ngcontent-%COMP%], .strong[_ngcontent-%COMP%]{font-weight:700}.no-bold[_ngcontent-%COMP%]{font-weight:400}.italic[_ngcontent-%COMP%], .em[_ngcontent-%COMP%]{font-style:italic}.strike[_ngcontent-%COMP%]{text-decoration:line-through}.normal[_ngcontent-%COMP%]{font-weight:400;font-style:normal}.uppercase[_ngcontent-%COMP%]{text-transform:uppercase}.text-left[_ngcontent-%COMP%]{text-align:left}.text-center[_ngcontent-%COMP%]{text-align:center}.text-right[_ngcontent-%COMP%]{text-align:right}.w100[_ngcontent-%COMP%]{font-weight:100}.w200[_ngcontent-%COMP%]{font-weight:200}.w300[_ngcontent-%COMP%]{font-weight:300}.w400[_ngcontent-%COMP%]{font-weight:400}.w500[_ngcontent-%COMP%]{font-weight:500}.w600[_ngcontent-%COMP%]{font-weight:600}.w700[_ngcontent-%COMP%]{font-weight:700}.w800[_ngcontent-%COMP%]{font-weight:800}.w900[_ngcontent-%COMP%]{font-weight:900}.f9[_ngcontent-%COMP%]{font-size:9px}.f10[_ngcontent-%COMP%]{font-size:10px}.f11[_ngcontent-%COMP%]{font-size:11px}.f12[_ngcontent-%COMP%]{font-size:12px}.f13[_ngcontent-%COMP%]{font-size:13px}.f14[_ngcontent-%COMP%]{font-size:14px}.f15[_ngcontent-%COMP%]{font-size:15px}.f16[_ngcontent-%COMP%]{font-size:16px}.f17[_ngcontent-%COMP%]{font-size:17px}.f18[_ngcontent-%COMP%]{font-size:18px;line-height:30px}.f19[_ngcontent-%COMP%]{font-size:19px}.f20[_ngcontent-%COMP%]{font-size:20px}.f30[_ngcontent-%COMP%]{font-size:30px}.f40[_ngcontent-%COMP%]{font-size:40px}.f50[_ngcontent-%COMP%]{font-size:50px}.f60[_ngcontent-%COMP%]{font-size:60px}.size-small[_ngcontent-%COMP%]{font-size:75%}.size-normal[_ngcontent-%COMP%]{font-size:100%}.size-medium[_ngcontent-%COMP%]{font-size:125%}.size-big[_ngcontent-%COMP%], .size-large[_ngcontent-%COMP%]{font-size:150%}.size-huge[_ngcontent-%COMP%]{font-size:200%}.inherit[_ngcontent-%COMP%]{font:inherit}.text-shadow[_ngcontent-%COMP%]{text-shadow:1px 1px 1px rgba(0,0,0,.4)}.text-rgb-2[_ngcontent-%COMP%]{color:#0003}.text-rgb-3[_ngcontent-%COMP%]{color:#0000004d}.text-rgb-4[_ngcontent-%COMP%]{color:#0006}.text-rgb-5[_ngcontent-%COMP%]{color:#00000080}.no-ul[_ngcontent-%COMP%], .no-ul[_ngcontent-%COMP%]:hover, .no-ul[_ngcontent-%COMP%] a[_ngcontent-%COMP%], .no-ul[_ngcontent-%COMP%] a[_ngcontent-%COMP%]:hover{text-decoration:none}.no-wrap[_ngcontent-%COMP%]{white-space:nowrap}.auto-cell-size[_ngcontent-%COMP%]{white-space:nowrap;width:1%}.ls-0[_ngcontent-%COMP%]{letter-spacing:-3px;white-space:nowrap}.label-field[_ngcontent-%COMP%]{margin-top:32px}.wrap-content[_ngcontent-%COMP%]{overflow-wrap:break-word;word-wrap:break-word}.no-break-content[_ngcontent-%COMP%]{overflow-wrap:anywhere!important}.fit[_ngcontent-%COMP%]{max-width:100%}.half-width[_ngcontent-%COMP%]{width:50%}.full-width[_ngcontent-%COMP%]{width:100%}.full-height[_ngcontent-%COMP%]{height:100%}html[_ngcontent-%COMP%], body[_ngcontent-%COMP%]{width:100%;height:100%;min-height:100%}body[_ngcontent-%COMP%] table[_ngcontent-%COMP%]{width:100%}.container[_ngcontent-%COMP%]{max-width:74rem;width:90%}.mw300[_ngcontent-%COMP%]{max-width:300px}.mw400[_ngcontent-%COMP%]{max-width:400px}.mw500[_ngcontent-%COMP%]{max-width:500px}.mw600[_ngcontent-%COMP%]{max-width:600px}.fullwidth[_ngcontent-%COMP%]{width:100%}.zindex-1[_ngcontent-%COMP%]{z-index:1}.zindex-2[_ngcontent-%COMP%]{z-index:2}.zindex-3[_ngcontent-%COMP%]{z-index:3}.zindex-4[_ngcontent-%COMP%]{z-index:4}.container[_ngcontent-%COMP%]{max-width:37rem}.container[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] div[_ngcontent-%COMP%]{margin:1rem 0;word-wrap:break-word}.container[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] mifosx-transaction-payment-detail[_ngcontent-%COMP%]{width:100%;margin-bottom:20px}.active[_ngcontent-%COMP%]{background-color:#5cb85c;height:4px}.linked[_ngcontent-%COMP%]{background-color:#4461e2;height:4px}.undo[_ngcontent-%COMP%]{background-color:red;height:4px}"]})}}return t})();var bs=()=>["../"];function vs(t,s){t&1&&(a(0,"mat-error"),o(1),r(2,"translate"),r(3,"translate"),a(4,"strong"),o(5),r(6,"translate"),i()()),t&2&&(n(),A(" ",c(2,3,"labels.inputs.Transaction Date")," ",c(3,5,"labels.commons.is")," "),n(4),m(c(6,7,"labels.commons.required")))}function Ps(t,s){if(t&1&&(a(0,"mat-option",9),o(1),i()),t&2){let e=s.$implicit;d("value",e.id),n(),u(" ",e.name," ")}}function Ts(t,s){t&1&&(a(0,"mat-form-field")(1,"mat-label"),o(2),r(3,"translate"),i(),C(4,"input",17),i()),t&2&&(n(2),m(c(3,1,"labels.inputs.Account Number")))}function Ss(t,s){t&1&&(a(0,"mat-form-field")(1,"mat-label"),o(2),r(3,"translate"),i(),C(4,"input",18),i()),t&2&&(n(2),m(c(3,1,"labels.inputs.Cheque")))}function Ms(t,s){t&1&&(a(0,"mat-form-field")(1,"mat-label"),o(2),r(3,"translate"),i(),C(4,"input",19),i()),t&2&&(n(2),m(c(3,1,"labels.inputs.Routing Code")))}function As(t,s){t&1&&(a(0,"mat-form-field")(1,"mat-label"),o(2),r(3,"translate"),i(),C(4,"input",20),i()),t&2&&(n(2),m(c(3,1,"labels.inputs.Receipt Number")))}function ys(t,s){t&1&&(a(0,"mat-form-field")(1,"mat-label"),o(2),r(3,"translate"),i(),C(4,"input",21),i()),t&2&&(n(2),m(c(3,1,"labels.inputs.Bank")))}var Dn=(()=>{class t{constructor(){this.formBuilder=_(st),this.route=_(N),this.router=_(W),this.dateUtils=_(X),this.recurringDepositsService=_(k),this.settingsService=_($),this.minDate=new Date(2e3,0,1),this.maxDate=new Date,this.addPaymentDetailsFlag=!1,this.currency=null,this.route.data.subscribe(e=>{this.transactionTemplateData=e.recurringDepositsAccountTransactionTemplate,this.transactionTemplateData.currency&&(this.currency=this.transactionTemplateData.currency),this.paymentTypeOptions=this.transactionTemplateData.paymentTypeOptions}),this.recurringDepositAccountId=this.route.parent.parent.snapshot.params.recurringDepositAccountId}ngOnInit(){this.maxDate=this.settingsService.businessDate,this.createEditTransactionForm(),this.editTransactionForm.patchValue({transactionDate:this.transactionTemplateData.date&&new Date(this.transactionTemplateData.date),transactionAmount:this.transactionTemplateData.amount,paymentTypeId:this.transactionTemplateData.paymentTypeId})}createEditTransactionForm(){this.editTransactionForm=this.formBuilder.group({transactionDate:["",q.required],transactionAmount:["",q.required],paymentTypeId:[""]})}addPaymentDetails(){this.addPaymentDetailsFlag=!this.addPaymentDetailsFlag,this.addPaymentDetailsFlag?(this.editTransactionForm.addControl("accountNumber",new tt("")),this.editTransactionForm.addControl("checkNumber",new tt("")),this.editTransactionForm.addControl("routingCode",new tt("")),this.editTransactionForm.addControl("receiptNumber",new tt("")),this.editTransactionForm.addControl("bankNumber",new tt(""))):(this.editTransactionForm.removeControl("accountNumber"),this.editTransactionForm.removeControl("checkNumber"),this.editTransactionForm.removeControl("routingCode"),this.editTransactionForm.removeControl("receiptNumber"),this.editTransactionForm.removeControl("bankNumber"))}submit(){let e=this.editTransactionForm.value,l=this.settingsService.language.code,p=this.settingsService.dateFormat,g=this.editTransactionForm.value.transactionDate;e.transactionDate instanceof Date&&(e.transactionDate=this.dateUtils.formatDate(g,p));let b=J(F({},e),{dateFormat:p,locale:l});b.transactionAmount=b.transactionAmount*1,this.recurringDepositsService.executeRecurringDepositsAccountTransactionsCommand(this.recurringDepositAccountId,"modify",b,this.transactionTemplateData.id).subscribe(G=>{this.router.navigate(["../"],{relativeTo:this.route})})}static{this.\u0275fac=function(l){return new(l||t)}}static{this.\u0275cmp=O({type:t,selectors:[["mifosx-edit-transaction"]],decls:40,vars:34,consts:[["dueDatePicker",""],[1,"container"],[3,"ngSubmit","formGroup"],[1,"layout-column"],[3,"click"],["matInput","","formControlName","transactionDate","required","",3,"min","max","matDatepicker"],["matSuffix","",3,"for"],[3,"currency","isRequired","inputFormControl","inputLabel"],["formControlName","paymentTypeId"],[3,"value"],[1,"flex-fill"],[1,"expandcollapsebutton","m-l-10","m-t-40","flex-75",3,"click"],[3,"className"],[1,"m-l-10"],[1,"layout-row","layout-xs-column","layout-align-center","gap-5px"],["type","button","mat-raised-button","",3,"routerLink"],["mat-raised-button","","color","primary",3,"disabled"],["type","number","formControlName","accountNumber","matInput",""],["type","number","formControlName","checkNumber","matInput",""],["formControlName","routingCode","matInput",""],["formControlName","receiptNumber","matInput",""],["formControlName","bankNumber","matInput",""]],template:function(l,p){if(l&1){let g=y();a(0,"div",1)(1,"mat-card")(2,"form",2),T("ngSubmit",function(){return S(g),M(p.submit())}),a(3,"mat-card-content",3)(4,"mat-form-field",4),T("click",function(){S(g);let G=E(11);return M(G.open())}),a(5,"mat-label"),o(6),r(7,"translate"),i(),C(8,"input",5)(9,"mat-datepicker-toggle",6)(10,"mat-datepicker",null,0),x(12,vs,7,9,"mat-error"),i(),C(13,"mifosx-input-amount",7),a(14,"mat-form-field")(15,"mat-label"),o(16),r(17,"translate"),i(),a(18,"mat-select",8),L(19,Ps,2,2,"mat-option",9,z),i()(),a(21,"div",10)(22,"span",11),T("click",function(){return S(g),M(p.addPaymentDetails())}),a(23,"mat-slide-toggle")(24,"div",12)(25,"span",13),o(26),r(27,"translate"),i()()()()(),x(28,Ts,5,3,"mat-form-field"),x(29,Ss,5,3,"mat-form-field"),x(30,Ms,5,3,"mat-form-field"),x(31,As,5,3,"mat-form-field"),x(32,ys,5,3,"mat-form-field"),a(33,"mat-card-actions",14)(34,"button",15),o(35),r(36,"translate"),i(),a(37,"button",16),o(38),r(39,"translate"),i()()()()()()}if(l&2){let g=E(11);n(2),d("formGroup",p.editTransactionForm),n(4),m(c(7,23,"labels.inputs.Transaction Date")),n(2),d("min",p.minDate)("max",p.maxDate)("matDatepicker",g),n(),d("for",g),n(3),D(p.editTransactionForm.controls.transactionDate.hasError("required")?12:-1),n(),d("currency",p.currency)("isRequired",!0)("inputFormControl",p.editTransactionForm.controls.transactionAmount)("inputLabel","Transaction Amount"),n(3),m(c(17,25,"labels.inputs.Payment Type")),n(3),j(p.paymentTypeOptions),n(5),d("className",p.addPaymentDetailsFlag?"enabled":"disabled"),n(2),m(c(27,27,"labels.inputs.Show Payment Details")),n(2),D(p.editTransactionForm.controls.accountNumber?28:-1),n(),D(p.editTransactionForm.controls.checkNumber?29:-1),n(),D(p.editTransactionForm.controls.routingCode?30:-1),n(),D(p.editTransactionForm.controls.receiptNumber?31:-1),n(),D(p.editTransactionForm.controls.bankNumber?32:-1),n(2),d("routerLink",K(33,bs)),n(),u(" ",c(36,29,"labels.buttons.Cancel")," "),n(2),d("disabled",!p.editTransactionForm.valid),n(),u(" ",c(39,31,"labels.buttons.Submit")," ")}},dependencies:[I,R,rt,mt,Re,Z,ot,dt,ct,pt,Q,Y,ut,ft,nt,et,gt,ht,Ct,Ot,yt,Dt,bt,xt,V,Ee,We,w],styles:[".container[_ngcontent-%COMP%]{width:37rem}"]})}}return t})();var li=(()=>{class t{constructor(){this.recurringDepositsService=_(k)}resolve(e){let l=e.paramMap.get("recurringDepositAccountId");return this.recurringDepositsService.getRecurringDepositsAccountData(l)}static{this.\u0275fac=function(l){return new(l||t)}}static{this.\u0275prov=At({token:t,factory:t.\u0275fac})}}return t})();var An=(()=>{class t{constructor(){this.recurringDepositsService=_(k)}resolve(e){let l=e.parent.paramMap.get("recurringDepositAccountId");return this.recurringDepositsService.getRecurringDepositsAccountData(l)}static{this.\u0275fac=function(l){return new(l||t)}}static{this.\u0275prov=At({token:t,factory:t.\u0275fac})}}return t})();var yn=(()=>{class t{constructor(){this.recurringDepositsService=_(k)}resolve(e){let l=e.parent.parent.paramMap.get("clientId");return this.recurringDepositsService.getRecurringDepositsAccountTemplate(l)}static{this.\u0275fac=function(l){return new(l||t)}}static{this.\u0275prov=At({token:t,factory:t.\u0275fac})}}return t})();var On=(()=>{class t{constructor(){this.savingsService=_(pe),this.recurringDepositsService=_(k)}resolve(e){let l=e.paramMap.get("name"),p=e.paramMap.get("recurringDepositAccountId")||e.parent.parent.paramMap.get("recurringDepositAccountId");switch(l){case"Add Charge":return this.savingsService.getSavingsChargeTemplateResource(p);case"Close":return this.recurringDepositsService.getRecurringDepositAccountActionResource(p,"close");case"Deposit":case"Withdrawal":return this.recurringDepositsService.getRecurringDepositAccountTransactionTemplateResource(p,l.toLocaleLowerCase());default:return}}static{this.\u0275fac=function(l){return new(l||t)}}static{this.\u0275prov=At({token:t,factory:t.\u0275fac})}}return t})();function Os(t,s){t&1&&C(0,"fa-icon",15)}function Is(t,s){t&1&&C(0,"fa-icon",15)}function Rs(t,s){t&1&&C(0,"fa-icon",16)}function ws(t,s){t&1&&C(0,"fa-icon",17)}function Es(t,s){t&1&&C(0,"fa-icon",18)}function Bs(t,s){t&1&&(o(0),r(1,"translate")),t&2&&m(c(1,1,"labels.inputs.DETAILS"))}function Fs(t,s){t&1&&(o(0),r(1,"translate")),t&2&&m(c(1,1,"labels.inputs.TERMS"))}function ks(t,s){t&1&&(o(0),r(1,"translate")),t&2&&m(c(1,1,"labels.inputs.SETTINGS"))}function Ns(t,s){t&1&&(o(0),r(1,"translate")),t&2&&m(c(1,1,"labels.inputs.INTEREST RATE CHART"))}function Vs(t,s){t&1&&(o(0),r(1,"translate")),t&2&&m(c(1,1,"labels.inputs.CHARGES"))}function qs(t,s){t&1&&(o(0),r(1,"translate")),t&2&&m(c(1,1,"labels.inputs.PREVIEW"))}function Gs(t,s){if(t&1){let e=y();a(0,"mat-step",14),h(1,qs,2,3,"ng-template",9),a(2,"mifosx-recurring-deposits-account-preview-step",19),T("submitEvent",function(){S(e);let p=f();return M(p.submit())}),i()()}if(t&2){let e=f();n(2),d("recurringDepositsAccountTemplate",e.recurringDepositsAccountAndTemplate)("recurringDepositsAccountProductTemplate",e.recurringDepositsAccountProductTemplate)("recurringDepositAccountData",e.recurringDepositAccountData)}}var bn=(()=>{class t{constructor(){this.route=_(N),this.router=_(W),this.dateUtils=_(X),this.recurringDepositsService=_(k),this.settingsService=_($),this.route.data.subscribe(e=>{this.recurringDepositsAccountAndTemplate=e.recurringDepositsAccountAndTemplate})}setTemplate(e){this.recurringDepositsAccountProductTemplate=e}get recurringDepositAccountDetailsForm(){return this.recurringDepositsAccountDetailsStep.recurringDepositAccountDetailsForm}get recurringDepositAccountTermsForm(){return this.recurringDepositAccountTermsStep.recurringDepositAccountTermsForm}get recurringDepositAccountSettingsForm(){return this.recurringDepositAccountSettingsStep.recurringDepositAccountSettingsForm}get recurringDepositAccountFormValidAndNotPristine(){return this.recurringDepositAccountDetailsForm.valid&&this.recurringDepositAccountTermsForm.valid&&this.recurringDepositAccountSettingsForm.valid&&(!this.recurringDepositAccountDetailsForm.pristine||!this.recurringDepositAccountTermsForm.pristine||!this.recurringDepositAccountSettingsForm.pristine||!this.recurringDepositAccountChargesStep.pristine)}get recurringDepositAccountData(){return F(F(F(F({},this.recurringDepositsAccountDetailsStep.recurringDepositAccountDetails),this.recurringDepositAccountTermsStep.recurringDepositAccountTerms),this.recurringDepositAccountSettingsStep.recurringDepositAccountSettings),this.recurringDepositAccountChargesStep.recurringDepositAccountCharges)}get recurringDepositAccount(){return F(F(F(F({},this.recurringDepositsAccountDetailsStep.recurringDepositAccountDetails),this.recurringDepositAccountTermsStep.recurringDepositAccountTerms),this.recurringDepositAccountSettingsStep.recurringDepositAccountSettings),this.recurringDepositAccountChargesStep.recurringDepositAccountCharges)}submit(){let e=this.settingsService.language.code,l=this.settingsService.dateFormat,g=J(F({},this.recurringDepositAccount),{clientId:this.recurringDepositsAccountAndTemplate.clientId,charges:this.recurringDepositAccount.charges.map(b=>({chargeId:b.id,amount:b.amount,dueDate:b.dueDate&&this.dateUtils.formatDate(b.dueDate,l),feeOnMonthDay:b.feeOnMonthDay,feeInterval:b.feeInterval})),isCalendarInherited:this.recurringDepositAccount.recurringDepositAccount?this.recurringDepositAccount.recurringDepositAccount:!1,submittedOnDate:this.dateUtils.formatDate(this.recurringDepositAccount.submittedOnDate,l),expectedFirstDepositOnDate:this.dateUtils.formatDate(this.recurringDepositAccount.expectedFirstDepositOnDate,l),dateFormat:l,monthDayFormat:"dd MMMM",locale:e});this.recurringDepositsService.updateRecurringDepositAccount(this.recurringDepositsAccountAndTemplate.id,g).subscribe(b=>{this.router.navigate(["../"],{relativeTo:this.route})})}static{this.\u0275fac=function(l){return new(l||t)}}static{this.\u0275cmp=O({type:t,selectors:[["mifosx-edit-recurring-deposit-account"]],viewQuery:function(l,p){if(l&1&&(Pt(se,7),Pt(le,7),Pt(me,7),Pt(de,7)),l&2){let g;Tt(g=St())&&(p.recurringDepositsAccountDetailsStep=g.first),Tt(g=St())&&(p.recurringDepositAccountTermsStep=g.first),Tt(g=St())&&(p.recurringDepositAccountSettingsStep=g.first),Tt(g=St())&&(p.recurringDepositAccountChargesStep=g.first)}},decls:24,vars:16,consts:[["recurringDepositAccountStepper",""],[1,"container"],["orientation","vertical","labelPosition","bottom",1,"mat-elevation-z8",3,"linear"],["matStepperIcon","number"],["matStepperIcon","edit"],["matStepperIcon","done"],["matStepperIcon","error"],["matStepperIcon","preview"],[3,"stepControl"],["matStepLabel",""],[3,"recurringDepositsAccountProductTemplate","recurringDepositsAccountTemplate"],[3,"recurringDepositsAccountTemplate","recurringDepositsAccountProductTemplate"],[3,"isNew","recurringDepositsAccountTemplate","recurringDepositsAccountProductTemplate"],[3,"recurringDepositsAccountTemplate","recurringDepositsAccountProductTemplate","recurringDepositAccountFormValid"],["state","preview","completed",""],["icon","pencil-alt","size","sm"],["icon","check","size","sm"],["icon","exclamation-triangle","size","lg"],["icon","eye","size","sm"],[3,"submitEvent","recurringDepositsAccountTemplate","recurringDepositsAccountProductTemplate","recurringDepositAccountData"]],template:function(l,p){if(l&1){let g=y();a(0,"div",1)(1,"mat-stepper",2,0),h(3,Os,1,0,"ng-template",3)(4,Is,1,0,"ng-template",4)(5,Rs,1,0,"ng-template",5)(6,ws,1,0,"ng-template",6)(7,Es,1,0,"ng-template",7),a(8,"mat-step",8),h(9,Bs,2,3,"ng-template",9),a(10,"mifosx-recurring-deposits-account-details-step",10),T("recurringDepositsAccountProductTemplate",function(G){return S(g),M(p.setTemplate(G))}),i()(),a(11,"mat-step",8),h(12,Fs,2,3,"ng-template",9),C(13,"mifosx-recurring-deposits-account-terms-step",11),i(),a(14,"mat-step",8),h(15,ks,2,3,"ng-template",9),C(16,"mifosx-recurring-deposits-account-settings-step",12),i(),a(17,"mat-step"),h(18,Ns,2,3,"ng-template",9),C(19,"mifosx-recurring-deposits-account-interest-rate-chart-step",11),i(),a(20,"mat-step"),h(21,Vs,2,3,"ng-template",9),C(22,"mifosx-recurring-deposits-account-charges-step",13),i(),x(23,Gs,3,3,"mat-step",14),i()()}l&2&&(n(),d("linear",!1),n(7),d("stepControl",p.recurringDepositAccountDetailsForm),n(2),d("recurringDepositsAccountTemplate",p.recurringDepositsAccountAndTemplate),n(),d("stepControl",p.recurringDepositAccountTermsForm),n(2),d("recurringDepositsAccountTemplate",p.recurringDepositsAccountAndTemplate)("recurringDepositsAccountProductTemplate",p.recurringDepositsAccountProductTemplate),n(),d("stepControl",p.recurringDepositAccountSettingsForm),n(2),d("isNew",!1)("recurringDepositsAccountTemplate",p.recurringDepositsAccountAndTemplate)("recurringDepositsAccountProductTemplate",p.recurringDepositsAccountProductTemplate),n(3),d("recurringDepositsAccountTemplate",p.recurringDepositsAccountAndTemplate)("recurringDepositsAccountProductTemplate",p.recurringDepositsAccountProductTemplate),n(3),d("recurringDepositsAccountTemplate",p.recurringDepositsAccountAndTemplate)("recurringDepositsAccountProductTemplate",p.recurringDepositsAccountProductTemplate)("recurringDepositAccountFormValid",p.recurringDepositAccountFormValidAndNotPristine),n(),D(p.recurringDepositAccountFormValidAndNotPristine?23:-1))},dependencies:[I,R,Je,Qe,_t,Ye,Ke,se,le,me,Fe,de,ke,w],encapsulation:2})}}return t})();var In=(()=>{class t{constructor(){this.recurringDepositsService=_(k)}resolve(e){let l=e.paramMap.get("recurringDepositAccountId");return this.recurringDepositsService.getRecurringDepositsAccountAndTemplate(l)}static{this.\u0275fac=function(l){return new(l||t)}}static{this.\u0275prov=At({token:t,factory:t.\u0275fac})}}return t})();var Rn=(()=>{class t{constructor(){this.recurringDepositsService=_(k)}resolve(e){let l=e.parent.paramMap.get("recurringDepositAccountId"),p=e.paramMap.get("id");return this.recurringDepositsService.getRecurringDepositsAccountTransaction(l,p)}static{this.\u0275fac=function(l){return new(l||t)}}static{this.\u0275prov=At({token:t,factory:t.\u0275fac})}}return t})();var wn=(()=>{class t{constructor(){this.recurringDepositsService=_(k)}resolve(e){let l=e.parent.paramMap.get("recurringDepositAccountId"),p=e.paramMap.get("id");return this.recurringDepositsService.getRecurringDepositsAccountTransactionTemplate(l,p)}static{this.\u0275fac=function(l){return new(l||t)}}static{this.\u0275prov=At({token:t,factory:t.\u0275fac})}}return t})();function Hs(t,s){if(t&1&&(a(0,"span"),C(1,"mifosx-external-identifier",4),i()),t&2){let e=f(2);n(),d("externalId",Mt(e.recurringDepositsAccountData.externalId))}}function Us(t,s){t&1&&(a(0,"span"),o(1),r(2,"translate"),i()),t&2&&(n(),u(" ",c(2,1,"labels.inputs.Not Available")," "))}function $s(t,s){t&1&&(a(0,"span"),o(1),r(2,"translate"),i()),t&2&&(n(),m(c(2,1,"labels.inputs.Unassigned")))}function zs(t,s){t&1&&(a(0,"td"),o(1),r(2,"translate"),i()),t&2&&(n(),u(" ",c(2,1,"labels.inputs.Closed on Date")," "))}function Ls(t,s){if(t&1&&(a(0,"tr"),x(1,zs,3,3,"td"),a(2,"td")(3,"span"),o(4),r(5,"dateFormat"),i()()()),t&2){let e=f(2);n(),D(e.recurringDepositsAccountData.timeline.closedOnDate?1:-1),n(3),m(c(5,2,e.recurringDepositsAccountData.timeline.closedOnDate))}}function js(t,s){if(t&1&&(a(0,"tr")(1,"td"),o(2),r(3,"translate"),i(),a(4,"td")(5,"span"),o(6),i()()()),t&2){let e=f(2);n(2),m(c(3,2,"labels.inputs.Balance Required for Interest Calculation")),n(4),m(e.recurringDepositsAccountData.minBalanceForInterestCalculation)}}function Ws(t,s){if(t&1&&(a(0,"tr")(1,"td"),o(2),r(3,"translate"),i(),a(4,"td")(5,"span"),o(6),i()()()),t&2){let e=f(2);n(2),m(c(3,2,"labels.inputs.Witdhold Tax Group")),n(4),m(e.recurringDepositsAccountData.taxGroup.name)}}function Ks(t,s){if(t&1&&(a(0,"div",1)(1,"h4",2),o(2),r(3,"translate"),i(),a(4,"table")(5,"tbody")(6,"tr")(7,"td"),o(8),r(9,"translate"),i(),a(10,"td"),x(11,Hs,2,2,"span"),x(12,Us,3,3,"span"),i()(),a(13,"tr")(14,"td"),o(15),r(16,"translate"),i(),a(17,"td"),o(18),x(19,$s,3,3,"span"),i()(),a(20,"tr")(21,"td"),o(22),r(23,"translate"),i(),a(24,"td"),o(25),r(26,"dateFormat"),i()(),a(27,"tr")(28,"td"),o(29),r(30,"translate"),i(),a(31,"td")(32,"span"),o(33),r(34,"dateFormat"),i()()(),x(35,Ls,6,4,"tr"),C(36,"tr"),a(37,"tr")(38,"td"),o(39),r(40,"translate"),i(),a(41,"td")(42,"span",3),o(43),i(),o(44),r(45,"translateKey"),i()(),x(46,js,7,4,"tr"),x(47,Ws,7,4,"tr"),i()()()),t&2){let e=f();n(2),m(c(3,17,"labels.inputs.Account Details")),n(6),m(c(9,19,"labels.inputs.External Id")),n(3),D(e.recurringDepositsAccountData.externalId?11:-1),n(),D(e.recurringDepositsAccountData.externalId?-1:12),n(3),m(c(16,21,"labels.inputs.Field Officer")),n(3),u(" ",e.recurringDepositsAccountData.fieldOfficerName," "),n(),D(e.recurringDepositsAccountData.fieldOfficerName?-1:19),n(3),m(c(23,23,"labels.inputs.Activation date")),n(3),m(c(26,25,e.recurringDepositsAccountData.timeline.activatedOnDate)),n(4),m(c(30,27,"labels.inputs.Maturity Date")),n(4),m(c(34,29,e.recurringDepositsAccountData.maturityDate)),n(2),D(e.recurringDepositsAccountData.timeline.closedOnDate||e.recurringDepositsAccountData.summary.totalWitddrawals?35:-1),n(4),m(c(40,31,"labels.inputs.Deposit Frequency")),n(4),m(e.recurringDepositsAccountData.recurringFrequency),n(),u(" ",B(45,33,e.recurringDepositsAccountData.recurringFrequencyType.value,"catalogs")," "),n(2),D(e.recurringDepositsAccountData.minBalanceForInterestCalculation?46:-1),n(),D(e.recurringDepositsAccountData.witdHoldTax?47:-1)}}function Qs(t,s){if(t&1&&(a(0,"span"),o(1),r(2,"currency"),i()),t&2){let e=f(2);n(),m(U(2,1,e.recurringDepositsAccountData.summary.totalDeposits,e.currency.code,"symbol-narrow","1.2-2"))}}function Ys(t,s){if(t&1&&(a(0,"span"),o(1),r(2,"currency"),i()),t&2){let e=f(2);n(),m(U(2,1,0,e.currency.code,"symbol-narrow","1.2-2"))}}function Js(t,s){if(t&1&&(a(0,"span"),o(1),r(2,"currency"),i()),t&2){let e=f(2);n(),m(U(2,1,e.recurringDepositsAccountData.summary.totalWithdrawals,e.currency.code,"symbol-narrow","1.2-2"))}}function Xs(t,s){if(t&1&&(a(0,"span"),o(1),r(2,"currency"),i()),t&2){let e=f(2);n(),m(U(2,1,0,e.currency.code,"symbol-narrow","1.2-2"))}}function Zs(t,s){if(t&1&&(a(0,"tr")(1,"td"),o(2),r(3,"translate"),i(),a(4,"td",5)(5,"span"),o(6),r(7,"currency"),i()()()),t&2){let e=f(2);n(2),m(c(3,2,"labels.inputs.Interest Earned")),n(4),m(U(7,4,e.recurringDepositsAccountData.summary.totalInterestEarned,e.currency.code,"symbol-narrow","1.2-2"))}}function tl(t,s){if(t&1&&(a(0,"div",1)(1,"h4",2),o(2),r(3,"translate"),i(),a(4,"table")(5,"tbody")(6,"tr")(7,"td"),o(8),r(9,"translate"),i(),a(10,"td",5)(11,"span"),o(12),r(13,"currency"),i()()(),a(14,"tr")(15,"td"),o(16),r(17,"translate"),i(),a(18,"td",5)(19,"span"),o(20),r(21,"currency"),i()()(),a(22,"tr")(23,"td"),o(24),r(25,"translate"),i(),a(26,"td",5)(27,"span"),o(28),r(29,"currency"),i()()(),a(30,"tr")(31,"td"),o(32),r(33,"translate"),i(),a(34,"td",5),x(35,Qs,3,6,"span"),x(36,Ys,3,6,"span"),i()(),a(37,"tr")(38,"td"),o(39),r(40,"translate"),i(),a(41,"td",5),x(42,Js,3,6,"span"),x(43,Xs,3,6,"span"),i()(),x(44,Zs,8,9,"tr"),i()()()),t&2){let e=f();n(2),m(c(3,14,"labels.heading.Performance History")),n(6),m(c(9,16,"labels.inputs.Principal Amount")),n(4),m(U(13,18,e.recurringDepositsAccountData.depositAmount,e.currency.code,"symbol-narrow","1.2-2")),n(4),m(c(17,23,"labels.inputs.Maturity Amount")),n(4),m(U(21,25,e.recurringDepositsAccountData.maturityAmount,e.currency.code,"symbol-narrow","1.2-2")),n(4),m(c(25,30,"labels.inputs.Recurring Deposit Amount")),n(4),m(U(29,32,e.recurringDepositsAccountData==null?null:e.recurringDepositsAccountData.mandatoryRecommendedDepositAmount,e.currency.code,"symbol-narrow","1.2-2")),n(4),m(c(33,37,"labels.inputs.Deposits till Date")),n(3),D(e.recurringDepositsAccountData.summary.totalDeposits?35:-1),n(),D(e.recurringDepositsAccountData.summary.totalDeposits?-1:36),n(3),m(c(40,39,"labels.inputs.Withdrwals till Date")),n(3),D(e.recurringDepositsAccountData.summary.totalWithdrawals?42:-1),n(),D(e.recurringDepositsAccountData.summary.totalWithdrawals?-1:43),n(),D(e.recurringDepositsAccountData.summary.totalInterestEarned>=0?44:-1)}}function el(t,s){if(t&1&&(a(0,"span"),C(1,"mifosx-external-identifier",4),i()),t&2){let e=f(2);n(),d("externalId",Mt(e.recurringDepositsAccountData.externalId))}}function nl(t,s){t&1&&(a(0,"span"),o(1),r(2,"translate"),i()),t&2&&(n(),u(" ",c(2,1,"labels.inputs.Not Available")," "))}function il(t,s){t&1&&(a(0,"span"),o(1),r(2,"translate"),i()),t&2&&(n(),m(c(2,1,"labels.inputs.Not Activated")))}function al(t,s){if(t&1&&(a(0,"span"),o(1),r(2,"dateFormat"),x(3,il,3,3,"span"),i()),t&2){let e=f(2);n(),u("",c(2,2,e.recurringDepositsAccountData.timeline.activatedOnDate)," "),n(2),D(e.recurringDepositsAccountData.timeline.activatedOnDate?-1:3)}}function ol(t,s){t&1&&(a(0,"span"),o(1),r(2,"translate"),i()),t&2&&(n(),m(c(2,1,"labels.inputs.Not Activated")))}function rl(t,s){if(t&1&&(a(0,"span"),o(1),r(2,"dateFormat"),x(3,ol,3,3,"span"),i()),t&2){let e=f(2);n(),u("",c(2,2,e.recurringDepositsAccountData.expectedFirstDepositOnDate)," "),n(2),D(e.recurringDepositsAccountData.expectedFirstDepositOnDate?-1:3)}}function cl(t,s){if(t&1&&(a(0,"tr")(1,"td"),o(2),r(3,"translate"),i(),a(4,"td")(5,"span"),o(6),r(7,"dateFormat"),i()()()),t&2){let e=f(2);n(2),m(c(3,2,"labels.inputs.Maturity Date")),n(4),m(c(7,4,e.recurringDepositsAccountData.maturityDate))}}function pl(t,s){if(t&1&&(a(0,"span"),o(1),r(2,"currency"),i()),t&2){let e=f(2);n(),m(U(2,1,e.recurringDepositsAccountData.summary.totalDeposits,e.currency.code,"symbol-narrow","1.2-2"))}}function sl(t,s){if(t&1&&(a(0,"span"),o(1),r(2,"currency"),i()),t&2){let e=f(2);n(),m(U(2,1,0,e.currency.code,"symbol-narrow","1.2-2"))}}function ll(t,s){if(t&1&&(a(0,"tr")(1,"td"),o(2),r(3,"translate"),i(),a(4,"td")(5,"span"),o(6),i()()()),t&2){let e=f(2);n(2),m(c(3,3,"labels.inputs.Interests Earned")),n(4),A("",e.recurringDepositsAccountData.currency.displaySymbol,"\xA0",e.recurringDepositsAccountData.summary.totalInterestEarned)}}function ml(t,s){if(t&1&&(a(0,"tr")(1,"td"),o(2),r(3,"translate"),i(),a(4,"td",5)(5,"span"),o(6),r(7,"currency"),i()()()),t&2){let e=f(2);n(2),m(c(3,2,"labels.inputs.Total Withdrawls")),n(4),m(U(7,4,e.recurringDepositsAccountData.summary.totalWithdrawals,e.currency.code,"symbol-narrow","1.2-2"))}}function dl(t,s){if(t&1&&(a(0,"tr")(1,"td"),o(2),r(3,"translate"),i(),a(4,"td",5)(5,"span"),o(6),r(7,"number"),i()()()),t&2){let e=f(2);n(2),m(c(3,2,"labels.inputs.Balance Required for Interest Calculation")),n(4),m(c(7,4,e.recurringDepositsAccountData.minBalanceForInterestCalculation))}}function ul(t,s){if(t&1&&(a(0,"div",1)(1,"table")(2,"tbody")(3,"tr")(4,"td"),o(5),r(6,"translate"),i(),a(7,"td"),x(8,el,2,2,"span"),x(9,nl,3,3,"span"),i()(),a(10,"tr")(11,"td"),o(12),r(13,"translate"),i(),a(14,"td"),x(15,al,4,4,"span"),x(16,rl,4,4,"span"),i()(),a(17,"tr")(18,"td"),o(19),r(20,"translate"),i(),a(21,"td")(22,"span"),o(23),i()()(),x(24,cl,8,6,"tr"),a(25,"tr")(26,"td"),o(27),r(28,"translate"),i(),a(29,"td",5),x(30,pl,3,6,"span"),x(31,sl,3,6,"span"),i()(),a(32,"tr")(33,"td"),o(34),r(35,"translate"),i(),a(36,"td",5),o(37),r(38,"currency"),i()(),a(39,"tr")(40,"td"),o(41),r(42,"translate"),i(),a(43,"td",5),o(44),r(45,"currency"),i()(),x(46,ll,7,5,"tr"),x(47,ml,8,9,"tr"),x(48,dl,8,6,"tr"),i()()()),t&2){let e=f();n(5),m(c(6,20,"labels.inputs.External Id")),n(3),D(e.recurringDepositsAccountData.externalId?8:-1),n(),D(e.recurringDepositsAccountData.externalId?-1:9),n(3),m(c(13,22,"labels.inputs.Date of Deposit")),n(3),D(e.recurringDepositsAccountData.expectedFirstDepositOnDate?-1:15),n(),D(e.recurringDepositsAccountData.expectedFirstDepositOnDate?16:-1),n(3),m(c(20,24,"labels.inputs.Period")),n(4),A("",e.recurringDepositsAccountData.depositPeriod,"\xA0",e.recurringDepositsAccountData.depositPeriodFrequency.value),n(),D(e.recurringDepositsAccountData.maturityDate?24:-1),n(3),m(c(28,26,"labels.inputs.Total Deposits")),n(3),D(e.recurringDepositsAccountData.summary.totalDeposits?30:-1),n(),D(e.recurringDepositsAccountData.summary.totalDeposits?-1:31),n(3),m(c(35,28,"labels.inputs.Actual Available Balance")),n(3),u(" ",U(38,30,e.recurringDepositsAccountData.summary.accountBalance,e.currency.code,"symbol-narrow","1.2-2")," "),n(4),m(c(42,35,"labels.inputs.Recurring Deposit Amount")),n(3),u(" ",U(45,37,e.recurringDepositsAccountData.mandatoryRecommendedDepositAmount,e.currency.code,"symbol-narrow","1.2-2")," "),n(2),D(e.recurringDepositsAccountData.summary.totalInterestEarned?46:-1),n(),D(e.recurringDepositsAccountData.summary.totalWithdrawals?47:-1),n(),D(e.recurringDepositsAccountData.minBalanceForInterestCalculation?48:-1)}}function gl(t,s){if(t&1&&(a(0,"span"),o(1),r(2,"currency"),i()),t&2){let e=f(2);n(),m(U(2,1,e.recurringDepositsAccountData.depositAmount,e.currency.code,"symbol-narrow","1.2-2"))}}function Cl(t,s){if(t&1&&(a(0,"span"),o(1),r(2,"currency"),i()),t&2){let e=f(2);n(),m(U(2,1,0,e.currency.code,"symbol-narrow","1.2-2"))}}function _l(t,s){if(t&1&&(a(0,"tr")(1,"td"),o(2),r(3,"translate"),i(),a(4,"td",5)(5,"span"),o(6),r(7,"currency"),i()()()),t&2){let e=f(2);n(2),m(c(3,2,"labels.inputs.Maturity Amount")),n(4),m(U(7,4,e.recurringDepositsAccountData.maturityAmount,e.currency.code,"symbol-narrow","1.2-2"))}}function fl(t,s){if(t&1&&(a(0,"span"),o(1),r(2,"currency"),i()),t&2){let e=f(2);n(),m(U(2,1,e.recurringDepositsAccountData.summary.totalWithdrawals,e.currency.code,"symbol-narrow","1.2-2"))}}function hl(t,s){if(t&1&&(a(0,"span"),o(1),r(2,"currency"),i()),t&2){let e=f(2);n(),m(U(2,1,0,e.currency.code,"symbol-narrow","1.2-2"))}}function xl(t,s){if(t&1&&(a(0,"tr")(1,"td"),o(2),r(3,"translate"),i(),a(4,"td"),o(5),r(6,"dateFormat"),i()()),t&2){let e=f(2);n(2),m(c(3,2,"labels.inputs.Closed on Date")),n(3),u(" ",c(6,4,e.recurringDepositsAccountData.timeline.closedOnDate)," ")}}function Dl(t,s){if(t&1&&(a(0,"span"),o(1),r(2,"currency"),i()),t&2){let e=f(3);n(),m(U(2,1,e.recurringDepositsAccountData.summary.totalInterestPosted,e.currency.code,"symbol-narrow","1.2-2"))}}function bl(t,s){if(t&1&&(a(0,"span"),o(1),r(2,"currency"),i()),t&2){let e=f(3);n(),m(U(2,1,0,e.currency.code,"symbol-narrow","1.2-2"))}}function vl(t,s){if(t&1&&(a(0,"tr")(1,"td"),o(2),r(3,"translate"),i(),a(4,"td",5),x(5,Dl,3,6,"span"),x(6,bl,3,6,"span"),i()()),t&2){let e=f(2);n(2),m(c(3,3,"labels.inputs.Interests Posted")),n(3),D(e.recurringDepositsAccountData.summary.totalInterestPosted?5:-1),n(),D(e.recurringDepositsAccountData.summary.totalInterestPosted?-1:6)}}function Pl(t,s){if(t&1&&(a(0,"div",1)(1,"table")(2,"tbody")(3,"tr")(4,"td"),o(5),r(6,"translate"),i(),a(7,"td",5),x(8,gl,3,6,"span"),x(9,Cl,3,6,"span"),i()(),a(10,"tr")(11,"td"),o(12),r(13,"translate"),i(),a(14,"td",5)(15,"span"),o(16),r(17,"formatNumber"),i()()(),x(18,_l,8,9,"tr"),a(19,"tr")(20,"td"),o(21),r(22,"translate"),i(),a(23,"td",5),x(24,fl,3,6,"span"),x(25,hl,3,6,"span"),i()(),x(26,xl,7,6,"tr"),a(27,"tr")(28,"td"),o(29),r(30,"translate"),i(),a(31,"td"),o(32),r(33,"translateKey"),i()(),x(34,vl,7,5,"tr"),i()()()),t&2){let e=f();n(5),m(c(6,14,"labels.inputs.Principal Amount")),n(3),D(e.recurringDepositsAccountData.depositAmount?8:-1),n(),D(e.recurringDepositsAccountData.depositAmount?-1:9),n(3),m(c(13,16,"labels.inputs.Rate of Interest")),n(4),u("",c(17,18,e.recurringDepositsAccountData.nominalAnnualInterestRate)," %"),n(2),D(e.recurringDepositsAccountData.maturityDate?18:-1),n(3),m(c(22,20,"labels.inputs.Total Withdrawls")),n(3),D(e.recurringDepositsAccountData.summary.totalWithdrawals?24:-1),n(),D(e.recurringDepositsAccountData.summary.totalWithdrawals?-1:25),n(),D(e.recurringDepositsAccountData.timeline.closedOnDate?26:-1),n(3),m(c(30,22,"labels.inputs.Deposits Frequency")),n(3),A(" ",e.recurringDepositsAccountData.recurringFrequency,"\xA0",B(33,24,e.recurringDepositsAccountData.recurringFrequencyType.value,"catalogs")," "),n(2),D(e.recurringDepositsAccountData.summary.totalInterestEarned?34:-1)}}function Tl(t,s){if(t&1&&(a(0,"tr")(1,"td"),o(2),r(3,"translate"),i(),a(4,"td")(5,"span"),o(6),r(7,"translateKey"),i()()()),t&2){let e=f(2);n(2),m(c(3,3,"labels.inputs.Pre-closure penal Interest (less)")),n(4),A("",e.recurringDepositsAccountData.preClosurePenalInterest," % on ",B(7,5,e.recurringDepositsAccountData.preClosurePenalInterestOnType.value,"catalogs"))}}function Sl(t,s){if(t&1&&(a(0,"div",1)(1,"h4",2),o(2),r(3,"translate"),i(),a(4,"table")(5,"tbody")(6,"tr")(7,"td"),o(8),r(9,"translate"),i(),a(10,"td",5),o(11),r(12,"formatNumber"),i()(),a(13,"tr")(14,"td"),o(15),r(16,"translate"),i(),a(17,"td")(18,"span"),o(19),r(20,"translateKey"),i()()(),a(21,"tr")(22,"td"),o(23),r(24,"translate"),i(),a(25,"td")(26,"span"),o(27),r(28,"translateKey"),i()()(),a(29,"tr")(30,"td"),o(31),r(32,"translate"),i(),a(33,"td")(34,"span"),o(35),r(36,"translateKey"),i()()(),a(37,"tr")(38,"td"),o(39),r(40,"translate"),i(),a(41,"td")(42,"span"),o(43),r(44,"translateKey"),i()()(),x(45,Tl,8,8,"tr"),i()()()),t&2){let e=f();n(2),m(c(3,12,"labels.heading.Interest Details")),n(6),m(c(9,14,"labels.inputs.Interest Rate")),n(3),u("",c(12,16,e.recurringDepositsAccountData.nominalAnnualInterestRate)," %"),n(4),m(c(16,18,"labels.inputs.Interest Compounding Period")),n(4),m(B(20,20,e.recurringDepositsAccountData.interestCompoundingPeriodType.value,"catalogs")),n(4),m(c(24,23,"labels.inputs.Interest Posting Period")),n(4),m(B(28,25,e.recurringDepositsAccountData.interestPostingPeriodType.value,"catalogs")),n(4),m(c(32,28,"labels.inputs.Interest calculated using")),n(4),m(B(36,30,e.recurringDepositsAccountData.interestCalculationType.value,"catalogs")),n(4),m(c(40,33,"labels.inputs.Days in Year")),n(4),m(B(44,35,e.recurringDepositsAccountData.interestCalculationDaysInYearType.value,"catalogs")),n(2),D(e.recurringDepositsAccountData.preClosurePenalApplicable?45:-1)}}function Ml(t,s){if(t&1&&(a(0,"tr")(1,"td"),o(2),r(3,"translate"),i(),a(4,"td")(5,"span"),o(6),r(7,"translateKey"),i()()()),t&2){let e=f(2);n(2),m(c(3,3,"labels.inputs.Pre-closure penal Interest (less)")),n(4),A("",e.recurringDepositsAccountData.preClosurePenalInterest," % on ",B(7,5,e.recurringDepositsAccountData.preClosurePenalInterestOnType.value,"catalogs"))}}function Al(t,s){if(t&1&&(a(0,"tr")(1,"td"),o(2),r(3,"translate"),i(),a(4,"td")(5,"span"),o(6),i()()()),t&2){let e=f(2);n(2),m(c(3,2,"labels.inputs.Witdhold Tax Group")),n(4),m(e.recurringDepositsAccountData.taxGroup.name)}}function yl(t,s){if(t&1&&(a(0,"div",1)(1,"table")(2,"tbody")(3,"tr")(4,"td"),o(5),r(6,"translate"),i(),a(7,"td")(8,"span"),o(9),r(10,"translateKey"),i()()(),a(11,"tr")(12,"td"),o(13),r(14,"translate"),i(),a(15,"td")(16,"span"),o(17),r(18,"translateKey"),i()()(),a(19,"tr")(20,"td"),o(21),r(22,"translate"),i(),a(23,"td")(24,"span"),o(25),r(26,"translateKey"),i()()(),a(27,"tr")(28,"td"),o(29),r(30,"translate"),i(),a(31,"td")(32,"span"),o(33),r(34,"translateKey"),i()()(),x(35,Ml,8,8,"tr"),x(36,Al,7,4,"tr"),i()()()),t&2){let e=f();n(5),m(c(6,10,"labels.inputs.Interest Compounding Period")),n(4),m(B(10,12,e.recurringDepositsAccountData.interestCompoundingPeriodType.value,"catalogs")),n(4),m(c(14,15,"labels.inputs.Interest Posting Period")),n(4),m(B(18,17,e.recurringDepositsAccountData.interestPostingPeriodType.value,"catalogs")),n(4),m(c(22,20,"labels.inputs.Interest calculated using")),n(4),m(B(26,22,e.recurringDepositsAccountData.interestCalculationType.value,"catalogs")),n(4),m(c(30,25,"labels.inputs.Days in Year")),n(4),m(B(34,27,e.recurringDepositsAccountData.interestCalculationDaysInYearType.value,"catalogs")),n(2),D(e.recurringDepositsAccountData.preClosurePenalApplicable?35:-1),n(),D(e.recurringDepositsAccountData.witdHoldTax?36:-1)}}var vn=(()=>{class t{constructor(){this.route=_(N),this.router=_(W),this.isprematureAllowed=!1,this.route.parent.data.subscribe(e=>{this.recurringDepositsAccountData=e.recurringDepositsAccountData,this.currency=this.recurringDepositsAccountData.currency,this.isprematureAllowed=e.recurringDepositsAccountData.maturityDate!=null,this.router.url.includes("clients")?this.entityType="Client":this.router.url.includes("groups")?this.entityType="Group":this.router.url.includes("centers")&&(this.entityType="Center")})}static{this.\u0275fac=function(l){return new(l||t)}}static{this.\u0275cmp=O({type:t,selectors:[["mifosx-general-tab"]],decls:8,vars:6,consts:[[1,"recurring-deposits-account-tables","layout-row","gap-2percent"],[1,"flex-49"],[1,"table-headers"],[1,"m-r-5"],["completed","true",3,"externalId"],[1,"r-amount"]],template:function(l,p){l&1&&(a(0,"div",0),x(1,Ks,48,36,"div",1),x(2,tl,45,41,"div",1),x(3,ul,49,42,"div",1),x(4,Pl,35,27,"div",1),i(),a(5,"div",0),x(6,Sl,46,38,"div",1),x(7,yl,37,30,"div",1),i()),l&2&&(n(),D(!p.recurringDepositsAccountData.status.rejected&&!p.recurringDepositsAccountData.status.submittedAndPendingApproval?1:-1),n(),D(!p.recurringDepositsAccountData.status.rejected&&!p.recurringDepositsAccountData.status.submittedAndPendingApproval?2:-1),n(),D(p.recurringDepositsAccountData.status.rejected||p.recurringDepositsAccountData.status.submittedAndPendingApproval?3:-1),n(),D(p.recurringDepositsAccountData.status.rejected||p.recurringDepositsAccountData.status.submittedAndPendingApproval?4:-1),n(2),D(!p.recurringDepositsAccountData.status.rejected&&!p.recurringDepositsAccountData.status.submittedAndPendingApproval?6:-1),n(),D(p.recurringDepositsAccountData.status.rejected||p.recurringDepositsAccountData.status.submittedAndPendingApproval?7:-1))},dependencies:[I,R,ti,Ge,Se,It,w,Rt,Wt],styles:[".recurring-deposits-account-tables[_ngcontent-%COMP%]{padding:1%}"]})}}return t})();var Ol=[{path:"",data:{title:"Recurring Deposits",breadcrumb:"Recurring Deposits",routeParamBreadcrumb:!1},children:[{path:"create-recurring-deposits-account",data:{title:"Create Recurring Deposits Account",breadcrumb:"Create Recurring Deposits Account"},component:pn,resolve:{recurringDepositsAccountTemplate:yn}},{path:":recurringDepositAccountId",data:{title:"RecurringDeposit Account View",routeParamBreadcrumb:"recurringDepositAccountId"},children:[{path:"",component:en,resolve:{recurringDepositsAccountData:An,savingsDatatables:Sn},children:[{path:"",redirectTo:"general",pathMatch:"full"},{path:"general",component:vn,data:{title:"Recurring Deposit Account Details",breadcrumb:"General",routeParamBreadcrumb:!1}},{path:"interest-rate-chart",component:nn,data:{title:"Recurring Deposit Account Interest Rate Chart",breadcrumb:"Interest Rate Chart",routeParamBreadcrumb:!1}},{path:"transactions",component:an,data:{title:"Recurring Deposit Account Transactions",breadcrumb:"Transactions",routeParamBreadcrumb:!1}},{path:"charges",component:rn,data:{title:"Recurring Deposit Account Charges",breadcrumb:"Charges",routeParamBreadcrumb:!1}},{path:"standing-instructions-tab",component:on,data:{title:"Recurring Deposit Account Standing Instructions",breadcrumb:"Standing Instructions",routeParamBreadcrumb:!1}},{path:"datatables",children:[{path:":datatableName",component:cn,data:{title:"View Data Table",routeParamBreadcrumb:"datatableName"},resolve:{savingsDatatable:Tn}}]}]},{path:"edit-recurring-deposit-account",data:{title:"Edit Recurring Deposit Account",breadcrumb:"Edit",routeParamBreadcrumb:!1},component:bn,resolve:{recurringDepositsAccountAndTemplate:In}},{path:"transactions",data:{title:"Recurring Deposits Account Transactions",breadcrumb:"Transactions",routeParamBreadcrumb:!1},children:[{path:"",redirectTo:"../transactions",pathMatch:"prefix"},{path:":id",data:{routeParamBreadcrumb:"id"},children:[{path:"",component:xn,resolve:{recurringDepositsAccountTransaction:Rn}},{path:"edit",component:Dn,resolve:{recurringDepositsAccountTransactionTemplate:wn}}]}]},{path:"actions/:name",data:{title:"Recurring Deposits Account Actions",routeParamBreadcrumb:"name"},component:hn,resolve:{recurringDepositsAccountActionData:On}}]},{path:":recurringDepositAccountId/transfer-funds",loadChildren:()=>import("./account-transfers.module-IS46QWMU.js").then(t=>t.AccountTransfersModule)}]},{path:"",data:{title:"All Recurring Deposits",breadcrumb:"Recurring Deposits",routeParamBreadcrumb:!1},children:[{path:":recurringDepositAccountId",data:{title:"RecurringDeposit Account View",routeParamBreadcrumb:"recurringDepositAccountId"},children:[{path:"standing-instructions",loadChildren:()=>import("./account-transfers.module-IS46QWMU.js").then(t=>t.AccountTransfersModule)}]}]}],mi=(()=>{class t{static{this.\u0275fac=function(l){return new(l||t)}}static{this.\u0275mod=qe({type:t})}static{this.\u0275inj=Ne({providers:[li,An,Tn,Sn,yn,On,In,Rn,wn],imports:[Pn.forChild(Ol),Pn]})}}return t})();var xf=(()=>{class t{static{this.\u0275fac=function(l){return new(l||t)}}static{this.\u0275mod=qe({type:t})}static{this.\u0275inj=Ne({imports:[pi,ii,ai,mi,en,nn,an,on,rn,cn,pn,se,le,me,Fe,de,ke,hn,sn,ln,mn,dn,un,gn,Kt,bn,Cn,_n,fn,xn,Dn,vn]})}}return t})();export{xf as RecurringDepositsModule}; diff --git a/browser/savings.module-2NQ5HRVF.js b/browser/savings.module-XEA55LW5.js similarity index 99% rename from browser/savings.module-2NQ5HRVF.js rename to browser/savings.module-XEA55LW5.js index dd2eb39cc..d8d645e33 100644 --- a/browser/savings.module-2NQ5HRVF.js +++ b/browser/savings.module-XEA55LW5.js @@ -1,2 +1,2 @@ -import{a as qe}from"./chunk-QZJSWYAX.js";import{a as dn,b as ni,c as Ui,d as qi}from"./chunk-JJ2I2MEQ.js";import{a as Ve}from"./chunk-72WDWMOP.js";import{a as ii,b as ai}from"./chunk-YJQVOBFM.js";import{a as Gi}from"./chunk-SJ6K46JC.js";import{$ as $e,$a as Xn,$d as ve,$e as yi,$f as ln,Aa as vi,Ad as Pi,Ba as _i,Bc as Xt,Bd as X,Bg as Ri,Cc as De,Cd as mt,Cf as rn,Da as N,Dc as yt,Df as cn,Ea as R,Eb as ue,Ec as Zt,Ef as sn,Fb as P,Fc as te,Fd as vt,G as At,Ga as D,Gc as ee,Gd as Z,H as je,Hc as ne,Hd as ae,Ia as b,Id as st,Ig as Vi,Ja as h,Jd as It,Jg as Re,K as g,Kg as Li,L as S,Lc as ge,Ld as wt,M,Mc as y,Na as Pt,Nd as fe,Oa as Ot,Oc as Xe,Od as _t,Pa as Dt,Pd as ht,Qa as w,Qd as xt,Qe as ye,Rc as j,Rd as Ce,Sc as U,Sd as Bt,T as Te,Td as Nt,Ua as r,Uc as xi,Ud as Rt,Uf as Be,Va as p,Wa as f,Wb as Ke,Wc as et,Wf as Ii,Xa as V,Xc as H,Xd as St,Ya as Pe,Yc as K,Zc as nt,Ze as Ie,Zf as wi,_ as Ci,_a as Jn,_d as se,_e as ei,_f as me,ab as Zn,ad as Ct,ag as mn,bb as ft,bd as bi,bf as we,bg as Ei,ca as n,cd as it,ce as Oi,cf as Ee,da as We,dd as ie,de as tn,df as Fe,eb as k,ed as Si,ef as ke,fb as kt,fd as at,ff as _e,fg as I,ge as en,gf as le,gg as Fi,hb as c,hc as E,he as nn,hf as Lt,ib as l,ic as Ye,id as ot,ie as an,if as Gt,ja as T,jb as Mt,jf as Ut,ka as Qe,kb as hi,kc as z,lb as tt,lc as q,ld as lt,lf as qt,mc as Je,mf as Ht,n as fi,na as A,nc as ti,ne as on,ng as ki,of as zt,pd as rt,pf as jt,pg as Bi,qb as de,qc as Oe,qd as Mi,qg as Ne,ra as v,rc as F,rd as O,re as Di,rf as $t,rg as pe,sa as _,sd as J,sf as Wt,ta as dt,td as Ze,ua as ut,ud as Ai,uf as Qt,ug as pn,va as gt,vd as ct,wa as d,xa as i,xd as bt,xf as Jt,ya as a,yd as Ti,za as C,zg as Ni}from"./chunk-OX7PN44D.js";import{a as G,b as Q}from"./chunk-PHUH23IY.js";var Qi=()=>({confirm:!0}),un=(()=>{class t{constructor(){this.dialogRef=g(Xt)}static{this.\u0275fac=function(s){return new(s||t)}}static{this.\u0275cmp=T({type:t,selectors:[["mifosx-calculate-interest-dialog"]],decls:14,vars:14,consts:[["mat-dialog-title",""],["mat-dialog-content",""],["align","end"],["mat-raised-button","","mat-dialog-close",""],["mat-raised-button","","color","primary",3,"mat-dialog-close"]],template:function(s,o){s&1&&(i(0,"h1",0),r(1),c(2,"translate"),a(),i(3,"div",1)(4,"p"),r(5),c(6,"translate"),a()(),i(7,"mat-dialog-actions",2)(8,"button",3),r(9),c(10,"translate"),a(),i(11,"button",4),r(12),c(13,"translate"),a()()),s&2&&(n(),p(l(2,5,"labels.heading.Calculate Interest")),n(4),f("",l(6,7,"labels.text.Are you sure you want to calculate interest")," ?"),n(4),p(l(10,9,"labels.buttons.Cancel")),n(2),d("mat-dialog-close",k(13,Qi)),n(),f(" ",l(13,11,"labels.buttons.Confirm")," "))},dependencies:[P,O,F,te,ee,ne,Zt,y],encapsulation:2})}}return t})();var Ki=()=>({confirm:!0}),gn=(()=>{class t{constructor(){this.dialogRef=g(Xt)}static{this.\u0275fac=function(s){return new(s||t)}}static{this.\u0275cmp=T({type:t,selectors:[["mifosx-post-interest-dialog"]],decls:14,vars:14,consts:[["mat-dialog-title",""],["mat-dialog-content",""],["align","end"],["mat-raised-button","","mat-dialog-close",""],["mat-raised-button","","color","primary",3,"mat-dialog-close"]],template:function(s,o){s&1&&(i(0,"h1",0),r(1),c(2,"translate"),a(),i(3,"div",1)(4,"p"),r(5),c(6,"translate"),a()(),i(7,"mat-dialog-actions",2)(8,"button",3),r(9),c(10,"translate"),a(),i(11,"button",4),r(12),c(13,"translate"),a()()),s&2&&(n(),p(l(2,5,"labels.heading.Post Interest")),n(4),f("",l(6,7,"labels.text.Are you sure you want to post interest")," ?"),n(4),p(l(10,9,"labels.buttons.Cancel")),n(2),d("mat-dialog-close",k(13,Ki)),n(),f(" ",l(13,11,"labels.buttons.Confirm")," "))},dependencies:[P,O,F,te,ee,ne,Zt,y],encapsulation:2})}}return t})();var Yi=()=>({confirm:!0}),He=(()=>{class t{constructor(){this.dialogRef=g(Xt),this.data=g(De)}static{this.\u0275fac=function(s){return new(s||t)}}static{this.\u0275cmp=T({type:t,selectors:[["mifosx-toggle-withhold-tax-dialog"]],decls:17,vars:25,consts:[["mat-dialog-title",""],["mat-dialog-content",""],["align","end"],["mat-raised-button","","mat-dialog-close",""],["mat-raised-button","",3,"color","mat-dialog-close"]],template:function(s,o){s&1&&(i(0,"h1",0),r(1),c(2,"translate"),c(3,"translate"),a(),i(4,"div",1)(5,"p"),r(6),c(7,"translate"),c(8,"translate"),c(9,"translate"),a()(),i(10,"mat-dialog-actions",2)(11,"button",3),r(12),c(13,"translate"),a(),i(14,"button",4),r(15),c(16,"translate"),a()()),s&2&&(n(),V(" ",l(2,10,o.data.isEnable?"labels.heading.Enable":"labels.heading.Disable")," ",l(3,12,"labels.heading.Withhold Tax"),` -`),n(5),Pe(" ",l(7,14,"labels.text.Are you sure you want to")," ",l(8,16,o.data.isEnable?"labels.heading.Enable":"labels.heading.Disable")," ",l(9,18,"labels.text.withhold tax for this account")," ? "),n(6),p(l(13,20,"labels.buttons.Cancel")),n(2),d("color",ft(o.data.isEnable?"accent":"warn"))("mat-dialog-close",k(24,Yi)),n(),f(" ",l(16,22,"labels.buttons.Confirm")," "))},dependencies:[P,O,F,te,ee,ne,Zt,y],encapsulation:2})}}return t})();var fn=class{constructor(m,e){this.setOptions(m),this.setButtons(m,e)}get singleButtons(){return this.buttonsArray}get options(){return this.optionArray}setButtons(m,e){switch(m){case"Active":this.buttonsArray=[],e.block?this.buttonsArray=[{name:"Unblock Account",icon:"lock-open",taskPermissionName:"UNBLOCK_SAVINGSACCOUNT"}]:(e.blockCredit?this.buttonsArray.push({name:"Unblock Deposit",icon:"lock-open",taskPermissionName:"UNBLOCKDEPOSIT_SAVINGSACCOUNT"}):this.buttonsArray.push({name:"Deposit",icon:"arrow-up",taskPermissionName:"DEPOSIT_SAVINGSACCOUNT"},{name:"Block Deposit",icon:"lock",taskPermissionName:"BLOCKDEPOSIT_SAVINGSACCOUNT"}),e.blockDebit?this.buttonsArray.push({name:"Unblock Withdrawal",icon:"lock-open",taskPermissionName:"UNBLOCKWITHDRAWAL_SAVINGSACCOUNT"}):this.buttonsArray.push({name:"Withdrawal",icon:"arrow-down",taskPermissionName:"WITHDRAWAL_SAVINGSACCOUNT"},{name:"Block Withdrawal",icon:"lock",taskPermissionName:"BLOCKWITHDRAWAL_SAVINGSACCOUNT"}),this.buttonsArray=this.buttonsArray.concat([{name:"Block Account",icon:"lock",taskPermissionName:"BLOCK_SAVINGSACCOUNT"},{name:"Hold Amount",icon:"lock",taskPermissionName:"HOLDAMOUNT_SAVINGSACCOUNT"},{name:"Calculate Interest",icon:"table",taskPermissionName:"CALCULATEINTEREST_SAVINGSACCOUNT"},{name:"Post Interest As On",icon:"arrow-right",taskPermissionName:"POSTINTEREST_SAVINGSACCOUNT"}]));break;case"Submitted and pending approval":this.buttonsArray=[{name:"Modify Application",icon:"pen",taskPermissionName:"UPDATE_SAVINGSACCOUNT"},{name:"Approve",icon:"check",taskPermissionName:"APPROVE_SAVINGSACCOUNT"}];break;case"Approved":this.buttonsArray=[{name:"Undo Approval",icon:"undo",taskPermissionName:"APPROVALUNDO_SAVINGSACCOUNT"},{name:"Activate",icon:"check",taskPermissionName:"ACTIVATE_SAVINGSACCOUNT"},{name:"Add Charge",icon:"plus",taskPermissionName:"CREATE_SAVINGSACCOUNTCHARGE"}];break;default:this.buttonsArray=[]}}setOptions(m){switch(m){case"Active":this.optionArray=[{name:"Post Interest",taskPermissionName:"POSTINTEREST_SAVINGSACCOUNT"},{name:"Add Charge",taskPermissionName:"CREATE_SAVINGSACCOUNTCHARGE"},{name:"Close",taskPermissionName:"CLOSE_SAVINGSACCOUNT"}];break;case"Submitted and pending approval":this.optionArray=[{name:"Reject",taskPermissionName:"REJECT_SAVINGSACCOUNT"},{name:"Withdrawn by Client",taskPermissionName:"WITHDRAW_SAVINGSACCOUNT"},{name:"Add Charge",taskPermissionName:"CREATE_SAVINGSACCOUNTCHARGE"},{name:"Delete",taskPermissionName:"DELETE_SAVINGSACCOUNT"}];break;case"Approved":default:this.optionArray=[]}}addOption(m){this.optionArray.push(m)}};var Ji=()=>["./general"],Xi=()=>["./transactions"],Zi=()=>["./charges"],ta=()=>["./documents"],ea=()=>["./notes"],na=()=>["./standing-instructions"],ia=t=>["./datatables",t];function aa(t,m){if(t&1&&(C(0,"i",18),c(1,"statusLookup")),t&2){let e=h();d("ngClass",l(1,2,e.savingsAccountData.status.code))("matTooltip",e.savingsAccountData.status.value)}}function oa(t,m){if(t&1&&(C(0,"i",18),c(1,"statusLookup")),t&2){let e=h();d("ngClass",l(1,2,e.savingsAccountData.subStatus.value))("matTooltip",e.savingsAccountData.subStatus.value)}}function ra(t,m){if(t&1&&(i(0,"span",23),C(1,"mifosx-account-number",32),a()),t&2){let e=h();n(),d("accountNo",ft(e.savingsAccountData.clientAccountNo))}}function ca(t,m){if(t&1&&(i(0,"div",24)(1,"h3"),r(2),c(3,"translate"),a(),i(4,"table",22)(5,"tbody")(6,"tr")(7,"td"),r(8),c(9,"translate"),a(),i(10,"td",33),r(11),c(12,"currency"),a()(),i(13,"tr")(14,"td"),r(15),c(16,"translate"),a(),i(17,"td",33),r(18),c(19,"currency"),a()()()()()),t&2){let e=h();n(2),p(l(3,5,"labels.heading.Account Overview")),n(6),p(l(9,7,"labels.inputs.Current Balance")),n(3),f(" ",tt(12,9,e.savingsAccountData.summary.accountBalance,e.currency.code,"symbol-narrow","1.2-2")," "),n(4),p(l(16,14,"labels.inputs.Available Balance")),n(3),f(" ",tt(19,16,e.savingsAccountData.summary.availableBalance,e.currency.code,"symbol-narrow","1.2-2")," ")}}function sa(t,m){if(t&1){let e=D();i(0,"button",35),b("click",function(){S(e);let o=h().$implicit,u=h();return M(u.doAction(o.name))}),i(1,"mat-icon",36),C(2,"fa-icon",37),a(),i(3,"span"),r(4),c(5,"translate"),a()()}if(t&2){let e=h().$implicit;n(2),d("icon",ft(e.icon)),n(2),f(" ",l(5,3,"labels.menus."+e.name)," ")}}function la(t,m){if(t&1&&A(0,sa,6,5,"button",34),t&2){let e=m.$implicit;d("mifosxHasPermission",e.taskPermissionName)}}function ma(t,m){if(t&1){let e=D();i(0,"button",35),b("click",function(){S(e);let o=h().$implicit,u=h(2);return M(u.doAction(o.name))}),r(1),c(2,"translate"),a()}if(t&2){let e=h().$implicit;n(),f(" ",l(2,1,"labels.menus."+e.name)," ")}}function pa(t,m){if(t&1&&(i(0,"span"),A(1,ma,3,3,"button",34),a()),t&2){let e=m.$implicit;n(),d("mifosxHasPermission",e.taskPermissionName)}}function da(t,m){if(t&1&&(i(0,"button",38),r(1),c(2,"translate"),a(),i(3,"mat-menu",null,2),ut(5,pa,2,1,"span",null,dt),a()),t&2){let e=w(4),s=h();d("matMenuTriggerFor",e),n(),p(l(2,2,"labels.menus.More")),n(4),gt(s.buttonConfig.options)}}function ua(t,m){if(t&1&&(i(0,"a",39,7),r(2),c(3,"translate"),a()),t&2){let e=w(1);d("routerLink",k(5,ea))("active",e.isActive),n(2),f(" ",l(3,3,"labels.inputs.Notes")," ")}}function ga(t,m){if(t&1&&(i(0,"a",39,8),r(2),c(3,"translate"),a()),t&2){let e=w(1);d("routerLink",k(5,na))("active",e.isActive),n(2),f(" ",l(3,3,"labels.inputs.Standing Instructions")," ")}}function fa(t,m){if(t&1&&(N(0),v(1,ga,4,6,"a",39),R()),t&2){let e=h(2);n(),_(e.savingsAccountData.clientId?1:-1)}}function Ca(t,m){if(t&1&&(i(0,"a",39,9),r(2),a()),t&2){let e=w(1),s=h().$implicit;d("routerLink",kt(3,ia,s.registeredTableName))("active",e.isActive),n(2),f(" ",s.registeredTableName," ")}}function va(t,m){if(t&1&&A(0,Ca,3,5,"a",40),t&2){let e=m.$implicit;d("mifosxHasPermission","READ_"+e.registeredTableName)}}function _a(t,m){if(t&1&&(i(0,"nav",31)(1,"a",39,3),r(3),c(4,"translate"),a(),i(5,"a",39,4),r(7),c(8,"translate"),a(),i(9,"a",39,5),r(11),c(12,"translate"),a(),i(13,"a",39,6),r(15),c(16,"translate"),a(),A(17,ua,4,6,"a",40)(18,fa,2,1,"ng-container",41),ut(19,va,1,1,"a",39,dt),a()),t&2){let e=w(2),s=w(6),o=w(10),u=w(14),x=h(),B=w(37);d("tabPanel",B),n(),d("routerLink",k(23,Ji))("active",e.isActive),n(2),f(" ",l(4,15,"labels.inputs.General")," "),n(2),d("routerLink",k(24,Xi))("active",s.isActive),n(2),f(" ",l(8,17,"labels.inputs.Transactions")," "),n(2),d("routerLink",k(25,Zi))("active",o.isActive),n(2),f(" ",l(12,19,"labels.inputs.Charges")," "),n(2),d("routerLink",k(26,ta))("active",u.isActive),n(2),f(" ",l(16,21,"labels.inputs.Documents")," "),n(2),d("mifosxHasPermission","READ_SAVINGSNOTE"),n(),d("mifosxHasPermission","READ_SAVINGSACCOUNTCHARGE"),n(),gt(x.savingsDatatables)}}var Cn=(()=>{class t{constructor(){this.route=g(E),this.router=g(z),this.savingsService=g(I),this.translateService=g(ge),this.dialog=g(yt),this.isActive=!1,this.route.data.subscribe(e=>{this.savingsAccountData=e.savingsAccountData,this.currency=this.savingsAccountData.currency,this.savingsDatatables=e.savingsDatatables}),this.router.url.includes("clients")?this.entityType="Client":this.router.url.includes("groups")?this.entityType="Group":this.router.url.includes("centers")&&(this.entityType="Center")}ngOnInit(){this.setConditionalButtons()}setConditionalButtons(){let e=this.savingsAccountData.status.value;this.isActive=e==="Active";let s=this.savingsAccountData.subStatus;this.buttonConfig=new fn(e,s),this.savingsAccountData.clientId&&this.buttonConfig.addOption({name:"Transfer Funds",taskPermissionName:"CREATE_ACCOUNTTRANSFER"}),this.savingsAccountData.externalId&&Xe.interbankTransfers&&this.buttonConfig.addOption({name:"Interbank Transfer",taskPermissionName:"CREATE_ACCOUNTTRANSFER"}),this.savingsAccountData.fieldOfficerId?this.buttonConfig.addOption({name:"Unassign Staff",taskPermissionName:"REMOVESAVINGSOFFICER_SAVINGSACCOUNT"}):this.buttonConfig.addOption({name:"Assign Staff",taskPermissionName:"UPDATESAVINGSOFFICER_SAVINGSACCOUNT"}),this.savingsAccountData.charges&&this.savingsAccountData.charges.forEach(u=>{u.name==="Annual fee - INR"&&this.buttonConfig.addOption({name:"Apply Annual Fees",taskPermissionName:"APPLYANNUALFEE_SAVINGSACCOUNT"})}),this.savingsAccountData.taxGroup&&(this.savingsAccountData.withHoldTax?this.buttonConfig.addOption({name:"Disable Withhold Tax",taskPermissionName:"UPDATEWITHHOLDTAX_SAVINGSACCOUNT"}):this.buttonConfig.addOption({name:"Enable Withhold Tax",taskPermissionName:"UPDATEWITHHOLDTAX_SAVINGSACCOUNT"}))}reload(){let e=this.router.url,s=this.router.url.slice(0,this.router.url.indexOf("savings-accounts")+16);this.router.navigateByUrl(s,{skipLocationChange:!0}).then(()=>this.router.navigate([e]))}doAction(e){switch(e){case"Approve":case"Reject":case"Deposit":case"Activate":case"Close":case"Undo Approval":case"Post Interest As On":case"Assign Staff":case"Add Charge":case"Hold Amount":case"Block Account":case"Block Deposit":case"Block Withdrawal":case"Unassign Staff":case"Withdrawn by Client":case"Apply Annual Fees":this.router.navigate([`actions/${e}`],{relativeTo:this.route});break;case"Withdrawal":this.router.navigate(["actions/Withdrawal"],{relativeTo:this.route});break;case"Modify Application":this.router.navigate(["edit"],{relativeTo:this.route});break;case"Delete":this.deleteSavingsAccount();break;case"Calculate Interest":this.calculateInterest();break;case"Post Interest":this.postInterest();break;case"Enable Withhold Tax":this.enableWithHoldTax();break;case"Disable Withhold Tax":this.disableWithHoldTax();break;case"Transfer Funds":let s={interbank:!1,savingsId:this.savingsAccountData.id,accountType:"fromsavings"};this.router.navigate(["transfer-funds/make-account-transfer"],{relativeTo:this.route,queryParams:s,state:{balance:this.savingsAccountData.summary.availableBalance}});break;case"Interbank Transfer":{let o={interbank:!0,savingsId:this.savingsAccountData.id,accountType:"interbank"};this.router.navigate(["transfer-funds/make-account-transfer"],{relativeTo:this.route,queryParams:o,state:{balance:this.savingsAccountData.summary.availableBalance}});break}case"Unblock Account":case"Unblock Deposit":case"Unblock Withdrawal":this.unblockSavingsAccount(e);break}}deleteSavingsAccount(){this.dialog.open(ve,{data:{deleteContext:`savings account with id: ${this.savingsAccountData.id}`}}).afterClosed().subscribe(s=>{s.delete&&this.savingsService.deleteSavingsAccount(this.savingsAccountData.id).subscribe(()=>{this.router.navigate(["../../"],{relativeTo:this.route})})})}calculateInterest(){this.dialog.open(un).afterClosed().subscribe(s=>{s.confirm&&this.savingsService.executeSavingsAccountCommand(this.savingsAccountData.id,"calculateInterest",{}).subscribe(()=>{this.reload()})})}postInterest(){this.dialog.open(gn).afterClosed().subscribe(s=>{s.confirm&&this.savingsService.executeSavingsAccountCommand(this.savingsAccountData.id,"postInterest",{}).subscribe(()=>{this.reload()})})}enableWithHoldTax(){this.dialog.open(He,{data:{isEnable:!0}}).afterClosed().subscribe(s=>{s.confirm&&this.savingsService.executeSavingsAccountUpdateCommand(this.savingsAccountData.id,"updateWithHoldTax",{withHoldTax:!0}).subscribe(()=>{this.reload()})})}disableWithHoldTax(){this.dialog.open(He,{data:{isEnable:!1}}).afterClosed().subscribe(s=>{s.confirm&&this.savingsService.executeSavingsAccountUpdateCommand(this.savingsAccountData.id,"updateWithHoldTax",{withHoldTax:!1}).subscribe(()=>{this.reload()})})}unblockSavingsAccount(e){let s=this.dialog.open(Di,{data:{heading:this.translateService.instant("labels.heading.Savings Account"),dialogContext:this.translateService.instant("labels.dialogContext.Are you sure you want")+e+this.translateService.instant("this Savings Account")}}),o="unblock";e==="Unblock Deposit"&&(o="unblockCredit"),e==="Unblock Withdrawal"&&(o="unblockDebit"),s.afterClosed().subscribe(u=>{u.confirm&&this.savingsService.executeSavingsAccountCommand(this.savingsAccountData.id,o,{}).subscribe(()=>{this.reload()})})}static{this.\u0275fac=function(s){return new(s||t)}}static{this.\u0275cmp=T({type:t,selectors:[["mifosx-savings-account-view"]],decls:39,vars:26,consts:[["accountMenu","matMenu"],["tabPanel",""],["More","matMenu"],["general","routerLinkActive"],["transactions","routerLinkActive"],["charges","routerLinkActive"],["savingsDocuments","routerLinkActive"],["notes","routerLinkActive"],["standingInstructions","routerLinkActive"],["datatable","routerLinkActive"],[1,"account-card"],[1,"header","layout-column"],[1,"header-title-group"],[1,"profile-image-container"],["mat-card-md-image","",1,"profile-image",3,"matTooltip","src"],[1,"mat-typography","account-card-title"],[1,"layout-row","layout-lt-md-column"],[1,"flex-60"],[1,"fa","fa-stop",3,"ngClass","matTooltip"],[1,"m-r-5"],[3,"textValue"],["display","left",3,"accountNo"],[1,"account-overview"],[1,"m-l-10"],[1,"flex-30"],[1,"flex-5"],["mat-icon-button","","aria-label","Loan account actions","yPosition","below",3,"matMenuTriggerFor"],["matListIcon","",1,"actions-menu"],["icon","bars","size","sm"],["mat-menu-item",""],[1,"content"],["mat-tab-nav-bar","",1,"navigation-tabs",3,"tabPanel"],[3,"accountNo"],[1,"r-amount"],["mat-menu-item","",3,"click",4,"mifosxHasPermission"],["mat-menu-item","",3,"click"],["matListIcon",""],["size","sm",3,"icon"],["mat-menu-item","",3,"matMenuTriggerFor"],["mat-tab-link","","routerLinkActive","",3,"routerLink","active"],["mat-tab-link","","routerLinkActive","",3,"routerLink","active",4,"mifosxHasPermission"],[4,"mifosxHasPermission"]],template:function(s,o){if(s&1&&(i(0,"mat-card",10)(1,"mat-card-header",11)(2,"mat-card-title-group",12)(3,"div",13)(4,"div"),C(5,"img",14),c(6,"translate"),a()(),i(7,"div",15)(8,"mat-card-title",16)(9,"div",17)(10,"h3"),v(11,aa,2,4,"i",18),v(12,oa,2,4,"i",18),i(13,"span",19),r(14),c(15,"translate"),a(),i(16,"span",19),C(17,"mifosx-long-text",20),a(),C(18,"mifosx-account-number",21),a(),i(19,"span",22),r(20),c(21,"translate"),c(22,"translate"),v(23,ra,2,2,"span",23),a()(),v(24,ca,20,21,"div",24),i(25,"div",25)(26,"button",26)(27,"mat-icon",27),C(28,"fa-icon",28),a()()()()(),i(29,"mat-menu",null,0),ut(31,la,1,1,"button",29,dt),v(33,da,7,4),a()()(),i(34,"mat-card-content",30),v(35,_a,21,27,"nav",31),i(36,"mat-tab-nav-panel",null,1),C(38,"router-outlet"),a()()()),s&2){let u=w(30);n(5),d("matTooltip",ft(l(6,18,"tooltips.Savings Account")))("src","assets/images/savings_account_placeholder.png",Ci),n(6),_(o.savingsAccountData.subStatus.block?-1:11),n(),_(o.savingsAccountData.subStatus.block?12:-1),n(2),f("",l(15,20,"labels.inputs.Savings Product")," :"),n(3),d("textValue",ft(o.savingsAccountData.savingsProductName)),n(),d("accountNo",ft(o.savingsAccountData.accountNo)),n(2),Pe(" ",l(21,22,"labels.text."+o.entityType)," ",l(22,24,"labels.inputs.name"),": ",o.savingsAccountData.clientName||o.savingsAccountData.groupName," "),n(3),_(o.savingsAccountData.clientAccountNo?23:-1),n(),_(!o.savingsAccountData.status.rejected&&!o.savingsAccountData.status.submittedAndPendingApproval?24:-1),n(2),d("matMenuTriggerFor",u),n(5),gt(o.buttonConfig.singleButtons),n(2),_(o.buttonConfig.options&&!o.savingsAccountData.subStatus.block?33:-1),n(2),_(o.isActive?35:-1)}},dependencies:[P,de,O,q,J,ct,Rt,Ti,Ai,Pi,fe,Ze,Vi,Ni,Oe,an,on,St,nn,en,rn,cn,Je,sn,Ye,ue,y,ln],styles:["mat-card-title[_ngcontent-%COMP%]{display:flex}"]})}}return t})();var ha=()=>[50,100,200],xa=()=>["export"],ba=t=>[t,"reciept"],Sa=t=>["/","journal-entry","view",t];function Ma(t,m){if(t&1){let e=D();i(0,"div",4)(1,"mat-checkbox",31),b("click",function(){S(e);let o=h();return M(o.hideReversed())}),r(2),c(3,"translate"),a(),i(4,"mat-checkbox",31),b("click",function(){S(e);let o=h();return M(o.hideAccruals())}),r(5),c(6,"translate"),a(),i(7,"button",32),r(8),c(9,"translate"),a()()}if(t&2){let e=h();n(),d("formControl",e.hideReversedParam),n(),f(" ",l(3,6,"labels.inputs.Hide Reversed")),n(2),d("formControl",e.hideAccrualsParam),n(),f(" ",l(6,8,"labels.inputs.Hide Accruals")),n(2),d("routerLink",k(12,xa)),n(),f(" ",l(9,10,"labels.buttons.Export")," ")}}function Aa(t,m){t&1&&(i(0,"th",33),r(1,"#"),a())}function Ta(t,m){if(t&1){let e=D();i(0,"td",34),b("click",function(){let o=S(e).$implicit,u=h();return M(u.showTransactions(o))}),r(1),a()}if(t&2){let e=m.index;n(),f(" ",e+1," ")}}function Pa(t,m){t&1&&(i(0,"th",33),r(1),c(2,"translate"),a()),t&2&&(n(),p(l(2,1,"labels.inputs.Id")))}function Oa(t,m){if(t&1){let e=D();i(0,"td",35),b("click",function(){let o=S(e).$implicit,u=h();return M(u.showTransactions(o))}),r(1),a()}if(t&2){let e=m.$implicit,s=h();d("ngClass",s.savingsTransactionColor(e)),n(),f(" ",e.id," ")}}function Da(t,m){t&1&&(i(0,"th",36),r(1),c(2,"translate"),a()),t&2&&(n(),f(" ",l(2,1,"labels.inputs.Transaction Date")," "))}function ya(t,m){if(t&1){let e=D();i(0,"td",37),b("click",function(){let o=S(e).$implicit,u=h();return M(u.showTransactions(o))}),r(1),c(2,"dateFormat"),a()}if(t&2){let e=m.$implicit,s=h();d("ngClass",s.savingsTransactionColor(e)),n(),f(" ",l(2,2,e.date)," ")}}function Ia(t,m){t&1&&(i(0,"th",33),r(1),c(2,"translate"),a()),t&2&&(n(),p(l(2,1,"labels.inputs.External Id")))}function wa(t,m){if(t&1&&(i(0,"td",38),C(1,"mifosx-external-identifier",39),a()),t&2){let e=m.$implicit,s=h();d("ngClass",s.savingsTransactionColor(e)),n(),d("externalId",ft(e.externalId))}}function Ea(t,m){t&1&&(i(0,"th",40),r(1),c(2,"translate"),a()),t&2&&(n(),p(l(2,1,"labels.inputs.Transaction Type")))}function Fa(t,m){if(t&1){let e=D();i(0,"td",37),b("click",function(){let o=S(e).$implicit,u=h();return M(u.showTransactions(o))}),r(1),c(2,"translateKey"),a()}if(t&2){let e=m.$implicit,s=h();d("ngClass",s.savingsTransactionColor(e)),n(),f(" ",Mt(2,2,e.transactionType.value,"catalogs")," ")}}function ka(t,m){t&1&&(i(0,"th",41),r(1),c(2,"translate"),a()),t&2&&(n(),p(l(2,1,"labels.inputs.Debit")))}function Ba(t,m){if(t&1){let e=D();i(0,"td",42),b("click",function(){let o=S(e).$implicit,u=h();return M(u.showTransactions(o))}),r(1),c(2,"formatNumber"),a()}if(t&2){let e=m.$implicit,s=h();d("ngClass",s.savingsTransactionColor(e)),n(),f(" ",s.isDebit(e.transactionType)?l(2,2,e.amount):"N/A"," ")}}function Na(t,m){t&1&&(i(0,"th",41),r(1),c(2,"translate"),a()),t&2&&(n(),p(l(2,1,"labels.inputs.Credit")))}function Ra(t,m){if(t&1){let e=D();i(0,"td",42),b("click",function(){let o=S(e).$implicit,u=h();return M(u.showTransactions(o))}),r(1),c(2,"formatNumber"),a()}if(t&2){let e=m.$implicit,s=h();d("ngClass",s.savingsTransactionColor(e)),n(),f(" ",s.isDebit(e.transactionType)?"N/A":l(2,2,e.amount)," ")}}function Va(t,m){t&1&&(i(0,"th",41),r(1),c(2,"translate"),a()),t&2&&(n(),p(l(2,1,"labels.inputs.Balance")))}function La(t,m){if(t&1){let e=D();i(0,"td",42),b("click",function(){let o=S(e).$implicit,u=h();return M(u.showTransactions(o))}),r(1),c(2,"formatNumber"),a()}if(t&2){let e=m.$implicit,s=h();d("ngClass",s.savingsTransactionColor(e)),n(),f(" ",l(2,2,e.runningBalance)," ")}}function Ga(t,m){t&1&&(i(0,"th",40),r(1),c(2,"translate"),a()),t&2&&(n(),p(l(2,1,"labels.inputs.Actions")))}function Ua(t,m){if(t&1){let e=D();i(0,"button",45),b("click",function(o){S(e);let u=h(2).$implicit,x=h();return M(x.undoTransaction(u,o))}),i(1,"mat-icon"),C(2,"fa-icon",52),a(),i(3,"span"),r(4),c(5,"translate"),a()()}t&2&&(n(4),p(l(5,1,"tooltips.Undo Transaction")))}function qa(t,m){t&1&&(i(0,"span"),A(1,Ua,6,3,"button",51),a()),t&2&&(n(),d("mifosxHasPermission","ADJUSTTRANSACTION_SAVINGSACCOUNT"))}function Ha(t,m){if(t&1){let e=D();i(0,"td",43)(1,"button",44)(2,"mat-icon"),r(3),c(4,"translate"),a()(),i(5,"mat-menu",null,0)(7,"button",45),b("click",function(){let o=S(e).$implicit,u=h();return M(u.showTransactions(o))}),i(8,"mat-icon"),C(9,"fa-icon",46),a(),i(10,"span"),r(11),c(12,"translate"),a()(),v(13,qa,2,1,"span"),i(14,"button",47),b("click",function(o){S(e);let u=h();return M(u.routeEdit(o))}),i(15,"mat-icon"),C(16,"fa-icon",48),a(),i(17,"span"),r(18),c(19,"translate"),a()(),i(20,"button",49),b("click",function(o){S(e);let u=h();return M(u.routeEdit(o))}),i(21,"mat-icon"),C(22,"fa-icon",50),a(),i(23,"span"),r(24),c(25,"translate"),a()()()()}if(t&2){let e=m.$implicit,s=w(6);n(),d("matMenuTriggerFor",s),n(2),p(l(4,8,"labels.text.more_vert")),n(8),p(l(12,10,"labels.text.View Transaction")),n(2),_(e.reversed?-1:13),n(),d("routerLink",kt(16,ba,e.id)),n(4),p(l(19,12,"tooltips.View Receipts")),n(2),d("routerLink",kt(18,Sa,"S"+e.id)),n(4),p(l(25,14,"tooltips.View Journal Entries"))}}function za(t,m){t&1&&C(0,"tr",53)}function ja(t,m){t&1&&C(0,"tr",54)}var vn=(()=>{class t{constructor(){this.route=g(E),this.router=g(z),this.savingsService=g(I),this.settingsService=g(U),this.dialog=g(yt),this.dateUtils=g(j),this.transactionsData=[],this.displayedColumns=["row","id","date","externalId","transactionType","debit","credit","balance","actions"],this.accountWithTransactions=!1,this.route.parent.parent.data.subscribe(e=>{this.transactionsData=e.savingsAccountData.transactions,this.status=e.savingsAccountData.status.value}),this.accountId=this.route.parent.parent.snapshot.params.savingAccountId}ngOnInit(){this.hideAccrualsParam=new Ct(!1),this.hideReversedParam=new Ct(!1),this.setTransactions()}setTransactions(){this.dataSource=new Jt(this.transactionsData),this.accountWithTransactions=this.transactionsData&&this.transactionsData.length>0,this.dataSource.paginator=this.paginator,this.dataSource.sort=this.sort}isDebit(e){return e.withdrawal===!0||e.feeDeduction===!0||e.overdraftInterest===!0||e.withholdTax===!0}isAccrual(e){return e.accrual||e.code==="savingsAccountTransactionType.accrual"}checkStatus(){return this.status==="Active"||this.status==="Closed"||this.status==="Transfer in progress"||this.status==="Transfer on hold"||this.status==="Premature Closed"||this.status==="Matured"}showTransactions(e){e.transfer?this.router.navigate([`../transfer-funds/account-transfers/${e.transfer.id}`],{relativeTo:this.route}):this.router.navigate([e.id,"general"],{relativeTo:this.route})}routeEdit(e){e.stopPropagation()}hideAccruals(){this.filterTransactions(this.hideReversedParam.value,this.hideAccrualsParam.value)}hideReversed(){this.filterTransactions(this.hideReversedParam.value,this.hideAccrualsParam.value)}filterTransactions(e,s){let o=this.transactionsData;(s||e)&&(o=this.transactionsData.filter(u=>!(e&&u.reversed)&&!(s&&u.transactionType.accrual))),this.dataSource=new Jt(o),this.dataSource.paginator=this.paginator,this.dataSource.sort=this.sort}savingsTransactionColor(e){return e.reversed?"strike":e.transfer?"transfer":e.transactionType.accrual?"accrual":""}undoTransaction(e){this.dialog.open(Ve).afterClosed().subscribe(o=>{if(o.confirm){let u=this.settingsService.language.code,x=this.settingsService.dateFormat,B={transactionDate:this.dateUtils.parseDate(e.date),transactionAmount:0,dateFormat:x,locale:u};this.savingsService.executeSavingsAccountTransactionsCommand(this.accountId,"undo",B,e.id).subscribe(()=>{this.reload()})}})}reload(){let e=this.route.parent.parent.snapshot.params.clientId,s=this.router.url;this.router.navigateByUrl(`/clients/${e}/savings-accounts`,{skipLocationChange:!0}).then(()=>this.router.navigate([s]))}static{this.\u0275fac=function(s){return new(s||t)}}static{this.\u0275cmp=T({type:t,selectors:[["mifosx-transactions-tab"]],viewQuery:function(s,o){if(s&1&&(Pt(ye,7),Pt(ei,7)),s&2){let u;Ot(u=Dt())&&(o.paginator=u.first),Ot(u=Dt())&&(o.sort=u.first)}},decls:40,vars:12,consts:[["transactionMenu","matMenu"],[1,"container"],[1,"mat-elevation-z1","m-b-25",3,"hidden"],[1,"layout-row","align-end"],[1,"action-button","m-b-20","layout-row","gap-20px"],["mat-table","","matSort","",3,"dataSource"],["matColumnDef","row"],["mat-header-cell","","mat-sort-header","",4,"matHeaderCellDef"],["mat-cell","",3,"click",4,"matCellDef"],["matColumnDef","id"],["mat-cell","","class","td-select",3,"ngClass","click",4,"matCellDef"],["matColumnDef","date"],["mat-header-cell","","class","center","mat-sort-header","",4,"matHeaderCellDef"],["mat-cell","",3,"ngClass","click",4,"matCellDef"],["matColumnDef","externalId"],["mat-cell","",3,"ngClass",4,"matCellDef"],["matColumnDef","transactionType"],["mat-header-cell","","class","center",4,"matHeaderCellDef"],["matColumnDef","debit"],["mat-header-cell","","class","r-amount",4,"matHeaderCellDef"],["mat-cell","","class","r-amount",3,"ngClass","click",4,"matCellDef"],["matColumnDef","credit"],["matColumnDef","balance"],["matColumnDef","actions"],["mat-cell","","class","center",4,"matCellDef"],["mat-header-row","",4,"matHeaderRowDef"],["mat-row","","class","select-row",4,"matRowDef","matRowDefColumns"],["showFirstLastButtons","",3,"pageSize","pageSizeOptions"],[1,"alert",3,"hidden"],[1,"message"],[1,"fa","fa-exclamation-circle","alert-check"],[1,"accruals",3,"click","formControl"],["mat-raised-button","","color","primary",3,"routerLink"],["mat-header-cell","","mat-sort-header",""],["mat-cell","",3,"click"],["mat-cell","",1,"td-select",3,"click","ngClass"],["mat-header-cell","","mat-sort-header","",1,"center"],["mat-cell","",3,"click","ngClass"],["mat-cell","",3,"ngClass"],[3,"externalId"],["mat-header-cell","",1,"center"],["mat-header-cell","",1,"r-amount"],["mat-cell","",1,"r-amount",3,"click","ngClass"],["mat-cell","",1,"center"],["mat-icon-button","","aria-label","",1,"action-button",3,"matMenuTriggerFor"],["mat-menu-item","",3,"click"],["icon","eye","size","sm"],["mat-menu-item","",1,"account-action-button",3,"click","routerLink"],["icon","receipt","size","sm"],["mat-menu-item","",3,"click","routerLink"],["icon","table-cells","size","sm"],["mat-menu-item","",3,"click",4,"mifosxHasPermission"],["icon","undo","size","sm"],["mat-header-row",""],["mat-row","",1,"select-row"]],template:function(s,o){s&1&&(i(0,"div",1)(1,"div",2)(2,"div",3),v(3,Ma,10,13,"div",4),a(),i(4,"table",5),N(5,6),A(6,Aa,2,0,"th",7)(7,Ta,2,1,"td",8),R(),N(8,9),A(9,Pa,3,3,"th",7)(10,Oa,2,2,"td",10),R(),N(11,11),A(12,Da,3,3,"th",12)(13,ya,3,4,"td",13),R(),N(14,14),A(15,Ia,3,3,"th",7)(16,wa,2,3,"td",15),R(),N(17,16),A(18,Ea,3,3,"th",17)(19,Fa,3,5,"td",13),R(),N(20,18),A(21,ka,3,3,"th",19)(22,Ba,3,4,"td",20),R(),N(23,21),A(24,Na,3,3,"th",19)(25,Ra,3,4,"td",20),R(),N(26,22),A(27,Va,3,3,"th",19)(28,La,3,4,"td",20),R(),N(29,23),A(30,Ga,3,3,"th",17)(31,Ha,26,20,"td",24),R(),A(32,za,1,0,"tr",25)(33,ja,1,0,"tr",26),a(),C(34,"mat-paginator",27),a(),i(35,"div",28)(36,"div",29),C(37,"i",30),r(38),c(39,"translate"),a()()()),s&2&&(n(),d("hidden",!o.accountWithTransactions),n(2),_(o.checkStatus()?3:-1),n(),d("dataSource",o.dataSource),n(28),d("matHeaderRowDef",o.displayedColumns),n(),d("matRowDefColumns",o.displayedColumns),n(),d("pageSize",50)("pageSizeOptions",k(11,ha)),n(),d("hidden",o.accountWithTransactions),n(3),f(" ",l(39,9,"labels.text.No transaction was found")," "))},dependencies:[P,de,O,K,Si,q,F,Ce,Rt,Lt,ei,qt,Ut,Ht,yi,Gt,zt,Be,Oe,an,on,nn,en,St,jt,Wt,$t,Qt,ye,Bt,y,Nt,me],styles:["body[_ngcontent-%COMP%] table[_ngcontent-%COMP%] tbody[_ngcontent-%COMP%] tr[_ngcontent-%COMP%]:nth-child(2n){background-color:#f2f2f2}.bg-black[_ngcontent-%COMP%]{background-color:#000}.bg-light-grey[_ngcontent-%COMP%]{background-color:#e5e5e5}.bg-medium-grey[_ngcontent-%COMP%]{background-color:#ccc}.bg-grey[_ngcontent-%COMP%]{background-color:#999}.bg-dark-grey[_ngcontent-%COMP%]{background-color:#222}.bg-white[_ngcontent-%COMP%], .bg-fff[_ngcontent-%COMP%]{background-color:#fff}.bg-none[_ngcontent-%COMP%], .no-bg[_ngcontent-%COMP%]{background:none;background-image:none;background-color:transparent}.bg-facebook[_ngcontent-%COMP%]{background-color:#47639e}.bg-twitter[_ngcontent-%COMP%]{background-color:#02a8f3}body[_ngcontent-%COMP%] table[_ngcontent-%COMP%]{border:1px solid rgba(0,0,0,.12)}.no-border[_ngcontent-%COMP%]{border:none}.no-border-t[_ngcontent-%COMP%]{border-top:none}.no-border-r[_ngcontent-%COMP%]{border-right:none}.no-border-b[_ngcontent-%COMP%]{border-bottom:none}.no-border-l[_ngcontent-%COMP%]{border-left:none}.no-border-lr[_ngcontent-%COMP%], .no-border-rl[_ngcontent-%COMP%]{border-left:none;border-right:none}.no-border-tb[_ngcontent-%COMP%], .no-border-bt[_ngcontent-%COMP%]{border-top:none;border-bottom:none}.no-border-tl[_ngcontent-%COMP%], .no-border-lt[_ngcontent-%COMP%]{border-top:none;border-left:none}.no-border-tr[_ngcontent-%COMP%], .no-border-rt[_ngcontent-%COMP%]{border-top:none;border-right:none}.no-border-bl[_ngcontent-%COMP%], .no-border-lb[_ngcontent-%COMP%]{border-bottom:none;border-left:none}.no-border-br[_ngcontent-%COMP%], .no-border-rb[_ngcontent-%COMP%]{border-bottom:none;border-right:none}.border-dashed[_ngcontent-%COMP%], .border-dotted[_ngcontent-%COMP%]{border-style:dashed}.border-black[_ngcontent-%COMP%]{border-color:#000}.border-light-grey[_ngcontent-%COMP%]{border-color:#e5e5e5}.border-medium-grey[_ngcontent-%COMP%]{border-color:#ccc}.border-grey[_ngcontent-%COMP%]{border-color:#999}.border-dark-grey[_ngcontent-%COMP%]{border-color:#2222}.border-white[_ngcontent-%COMP%], .border-fff[_ngcontent-%COMP%]{border-color:#fff}.no-border-radius[_ngcontent-%COMP%]{border-radius:0}.radius3[_ngcontent-%COMP%]{border-radius:3px}.radius5[_ngcontent-%COMP%]{border-radius:5px}.radius10[_ngcontent-%COMP%]{border-radius:10px}.column-mandatory[_ngcontent-%COMP%]{color:#5cb85c;text-align:center}.not-column-mandatory[_ngcontent-%COMP%]{color:#666f73;text-align:center}.cdk-drag-placeholder[_ngcontent-%COMP%]{background:#3498db}.yes[_ngcontent-%COMP%]{color:#5cb85c!important;background-color:#5cb85c;height:4px;cursor:none}.no[_ngcontent-%COMP%]{color:red;background-color:red;height:4px;cursor:none}.strike[_ngcontent-%COMP%]{text-decoration:line-through;color:red}.transfer[_ngcontent-%COMP%]{color:#16a085}.linked[_ngcontent-%COMP%]{color:#4461e2}.accrual[_ngcontent-%COMP%]{color:#999}.fa-question[_ngcontent-%COMP%]{color:#4461e2}.enabled[_ngcontent-%COMP%]{color:#32cd32}.disabled[_ngcontent-%COMP%]{color:#f44366}.v-mid[_ngcontent-%COMP%], .v-m[_ngcontent-%COMP%]{vertical-align:middle}.v-top[_ngcontent-%COMP%], .v-t[_ngcontent-%COMP%]{vertical-align:top}.v-bottom[_ngcontent-%COMP%], .v-b[_ngcontent-%COMP%]{vertical-align:bottom}.v-super[_ngcontent-%COMP%]{vertical-align:super}.r-amount[_ngcontent-%COMP%]{text-align:right!important;padding-right:5px!important}.left[_ngcontent-%COMP%]{text-align:left!important}.right[_ngcontent-%COMP%]{text-align:right!important}.center[_ngcontent-%COMP%]{text-align:center!important}.amount-plus[_ngcontent-%COMP%]{color:#000}.amount-minus[_ngcontent-%COMP%]{color:#4461e2}.block[_ngcontent-%COMP%]{display:block}.inline[_ngcontent-%COMP%]{display:inline}.in-block[_ngcontent-%COMP%]{display:inline-block;zoom:1}.d-none[_ngcontent-%COMP%], .hide[_ngcontent-%COMP%], .hidden[_ngcontent-%COMP%]{display:none}.t-0[_ngcontent-%COMP%]{top:0}.b-0[_ngcontent-%COMP%]{bottom:0}.l-0[_ngcontent-%COMP%]{left:0}.r-0[_ngcontent-%COMP%]{right:0}.tb-0[_ngcontent-%COMP%]{top:0;bottom:0}.lr-0[_ngcontent-%COMP%]{left:0;right:0}.f-left[_ngcontent-%COMP%]{float:left}.f-right[_ngcontent-%COMP%]{float:right}.f-none[_ngcontent-%COMP%]{float:none}textarea[_ngcontent-%COMP%]{resize:both}textarea.vertical[_ngcontent-%COMP%], textarea.horizontal[_ngcontent-%COMP%]{resize:vertical}textarea.noresize[_ngcontent-%COMP%]{resize:none}.full-input[_ngcontent-%COMP%] input[_ngcontent-%COMP%], .full-input[_ngcontent-%COMP%] select[_ngcontent-%COMP%], .full-input[_ngcontent-%COMP%] textarea[_ngcontent-%COMP%]{width:100%}.normal[_ngcontent-%COMP%] input[_ngcontent-%COMP%], .normal[_ngcontent-%COMP%] select[_ngcontent-%COMP%], .normal[_ngcontent-%COMP%] textarea[_ngcontent-%COMP%], .full-input[_ngcontent-%COMP%] [type=checkbox][_ngcontent-%COMP%], .full-input[_ngcontent-%COMP%] [type=radio][_ngcontent-%COMP%]{width:auto}.mat-tab-body-content[_ngcontent-%COMP%]{margin-bottom:20px}.mat-datepicker-input[_ngcontent-%COMP%]{margin-top:5px;margin-bottom:5px}.loader-wrapper[_ngcontent-%COMP%]{height:100vh;width:100vw}.loader-wrapper[_ngcontent-%COMP%] .triangle[_ngcontent-%COMP%]{width:0;height:0;border-style:solid;position:absolute;animation:_ngcontent-%COMP%_rotate .8s infinite .2s}.loader-wrapper[_ngcontent-%COMP%] .bottom[_ngcontent-%COMP%]{border-width:0 90px 90px;border-color:transparent transparent #1fb050;bottom:calc(50% - 100px);left:calc(50% - 90px)}.loader-wrapper[_ngcontent-%COMP%] .top[_ngcontent-%COMP%]{border-width:90px 90px 0;border-color:#b4d575 transparent transparent;top:calc(50% - 100px);left:calc(50% - 90px)}.loader-wrapper[_ngcontent-%COMP%] .left[_ngcontent-%COMP%]{border-width:90px 0 90px 90px;border-color:transparent transparent transparent #1074b9;top:calc(50% - 90px);left:calc(50% - 100px)}.loader-wrapper[_ngcontent-%COMP%] .right[_ngcontent-%COMP%]{border-width:90px 90px 90px 0;border-color:transparent #1daeec transparent transparent;top:calc(50% - 90px);right:calc(50% - 100px)}@keyframes _ngcontent-%COMP%_rotate{0%{transform:rotate(0)}to{transform:rotate(360deg)}}body[_ngcontent-%COMP%]{margin:0}.container[_ngcontent-%COMP%]{margin:0 auto}.mb-05[_ngcontent-%COMP%]{margin-bottom:.5rem}.mr-05[_ngcontent-%COMP%]{margin-right:.5rem}.mb-1[_ngcontent-%COMP%]{margin-bottom:1rem}.mt-1[_ngcontent-%COMP%]{margin-top:1rem}.m-5[_ngcontent-%COMP%]{margin:5px}.m-t-5[_ngcontent-%COMP%]{margin-top:5px}.m-r-5[_ngcontent-%COMP%]{margin-right:5px}.m-b-5[_ngcontent-%COMP%]{margin-bottom:5px}.m-l-5[_ngcontent-%COMP%]{margin-left:5px}.m-v-5[_ngcontent-%COMP%]{margin:5px 0}.m-h-5[_ngcontent-%COMP%]{margin:0 5px}.m-10[_ngcontent-%COMP%]{margin:10px}.m-t-10[_ngcontent-%COMP%]{margin-top:10px}.m-r-10[_ngcontent-%COMP%]{margin-right:10px}.m-b-10[_ngcontent-%COMP%]{margin-bottom:10px}.m-l-10[_ngcontent-%COMP%]{margin-left:10px}.m-v-10[_ngcontent-%COMP%]{margin:10px 0}.m-h-10[_ngcontent-%COMP%]{margin:0 10px}.m-15[_ngcontent-%COMP%]{margin:15px}.m-t-15[_ngcontent-%COMP%]{margin-top:15px}.m-r-15[_ngcontent-%COMP%]{margin-right:15px}.m-b-15[_ngcontent-%COMP%]{margin-bottom:15px}.m-l-15[_ngcontent-%COMP%]{margin-left:15px}.m-v-15[_ngcontent-%COMP%]{margin:15px 0}.m-h-15[_ngcontent-%COMP%]{margin:0 15px}.m-20[_ngcontent-%COMP%]{margin:20px}.m-t-20[_ngcontent-%COMP%]{margin-top:20px}.m-r-20[_ngcontent-%COMP%]{margin-right:20px}.m-b-20[_ngcontent-%COMP%]{margin-bottom:20px}.m-l-20[_ngcontent-%COMP%]{margin-left:20px}.m-v-20[_ngcontent-%COMP%]{margin:20px 0}.m-h-20[_ngcontent-%COMP%]{margin:0 20px}.m-25[_ngcontent-%COMP%]{margin:25px}.m-t-25[_ngcontent-%COMP%]{margin-top:25px}.m-r-25[_ngcontent-%COMP%]{margin-right:25px}.m-b-25[_ngcontent-%COMP%]{margin-bottom:25px}.m-l-25[_ngcontent-%COMP%]{margin-left:25px}.m-v-25[_ngcontent-%COMP%]{margin:25px 0}.m-h-25[_ngcontent-%COMP%]{margin:0 25px}.m-30[_ngcontent-%COMP%]{margin:30px}.m-t-30[_ngcontent-%COMP%]{margin-top:30px}.m-r-30[_ngcontent-%COMP%]{margin-right:30px}.m-b-30[_ngcontent-%COMP%]{margin-bottom:30px}.m-l-30[_ngcontent-%COMP%]{margin-left:30px}.m-v-30[_ngcontent-%COMP%]{margin:30px 0}.m-h-30[_ngcontent-%COMP%]{margin:0 30px}.m-35[_ngcontent-%COMP%]{margin:35px}.m-t-35[_ngcontent-%COMP%]{margin-top:35px}.m-r-35[_ngcontent-%COMP%]{margin-right:35px}.m-b-35[_ngcontent-%COMP%]{margin-bottom:35px}.m-l-35[_ngcontent-%COMP%]{margin-left:35px}.m-v-35[_ngcontent-%COMP%]{margin:35px 0}.m-h-35[_ngcontent-%COMP%]{margin:0 35px}.m-40[_ngcontent-%COMP%]{margin:40px}.m-t-40[_ngcontent-%COMP%]{margin-top:40px}.m-r-40[_ngcontent-%COMP%]{margin-right:40px}.m-b-40[_ngcontent-%COMP%]{margin-bottom:40px}.m-l-40[_ngcontent-%COMP%]{margin-left:40px}.m-v-40[_ngcontent-%COMP%]{margin:40px 0}.m-h-40[_ngcontent-%COMP%]{margin:0 40px}.m-45[_ngcontent-%COMP%]{margin:45px}.m-t-45[_ngcontent-%COMP%]{margin-top:45px}.m-r-45[_ngcontent-%COMP%]{margin-right:45px}.m-b-45[_ngcontent-%COMP%]{margin-bottom:45px}.m-l-45[_ngcontent-%COMP%]{margin-left:45px}.m-v-45[_ngcontent-%COMP%]{margin:45px 0}.m-h-45[_ngcontent-%COMP%]{margin:0 45px}.m-50[_ngcontent-%COMP%]{margin:50px}.m-t-50[_ngcontent-%COMP%]{margin-top:50px}.m-r-50[_ngcontent-%COMP%]{margin-right:50px}.m-b-50[_ngcontent-%COMP%]{margin-bottom:50px}.m-l-50[_ngcontent-%COMP%]{margin-left:50px}.m-v-50[_ngcontent-%COMP%]{margin:50px 0}.m-h-50[_ngcontent-%COMP%]{margin:0 50px}.m-55[_ngcontent-%COMP%]{margin:55px}.m-t-55[_ngcontent-%COMP%]{margin-top:55px}.m-r-55[_ngcontent-%COMP%]{margin-right:55px}.m-b-55[_ngcontent-%COMP%]{margin-bottom:55px}.m-l-55[_ngcontent-%COMP%]{margin-left:55px}.m-v-55[_ngcontent-%COMP%]{margin:55px 0}.m-h-55[_ngcontent-%COMP%]{margin:0 55px}.m-60[_ngcontent-%COMP%]{margin:60px}.m-t-60[_ngcontent-%COMP%]{margin-top:60px}.m-r-60[_ngcontent-%COMP%]{margin-right:60px}.m-b-60[_ngcontent-%COMP%]{margin-bottom:60px}.m-l-60[_ngcontent-%COMP%]{margin-left:60px}.m-v-60[_ngcontent-%COMP%]{margin:60px 0}.m-h-60[_ngcontent-%COMP%]{margin:0 60px}.m-65[_ngcontent-%COMP%]{margin:65px}.m-t-65[_ngcontent-%COMP%]{margin-top:65px}.m-r-65[_ngcontent-%COMP%]{margin-right:65px}.m-b-65[_ngcontent-%COMP%]{margin-bottom:65px}.m-l-65[_ngcontent-%COMP%]{margin-left:65px}.m-v-65[_ngcontent-%COMP%]{margin:65px 0}.m-h-65[_ngcontent-%COMP%]{margin:0 65px}.m-70[_ngcontent-%COMP%]{margin:70px}.m-t-70[_ngcontent-%COMP%]{margin-top:70px}.m-r-70[_ngcontent-%COMP%]{margin-right:70px}.m-b-70[_ngcontent-%COMP%]{margin-bottom:70px}.m-l-70[_ngcontent-%COMP%]{margin-left:70px}.m-v-70[_ngcontent-%COMP%]{margin:70px 0}.m-h-70[_ngcontent-%COMP%]{margin:0 70px}.m-75[_ngcontent-%COMP%]{margin:75px}.m-t-75[_ngcontent-%COMP%]{margin-top:75px}.m-r-75[_ngcontent-%COMP%]{margin-right:75px}.m-b-75[_ngcontent-%COMP%]{margin-bottom:75px}.m-l-75[_ngcontent-%COMP%]{margin-left:75px}.m-v-75[_ngcontent-%COMP%]{margin:75px 0}.m-h-75[_ngcontent-%COMP%]{margin:0 75px}.m-80[_ngcontent-%COMP%]{margin:80px}.m-t-80[_ngcontent-%COMP%]{margin-top:80px}.m-r-80[_ngcontent-%COMP%]{margin-right:80px}.m-b-80[_ngcontent-%COMP%]{margin-bottom:80px}.m-l-80[_ngcontent-%COMP%]{margin-left:80px}.m-v-80[_ngcontent-%COMP%]{margin:80px 0}.m-h-80[_ngcontent-%COMP%]{margin:0 80px}.no-m[_ngcontent-%COMP%]{margin:0}.no-m-t[_ngcontent-%COMP%]{margin-top:0}.no-m-r[_ngcontent-%COMP%]{margin-right:0}.no-m-b[_ngcontent-%COMP%]{margin-bottom:0}.no-m-l[_ngcontent-%COMP%]{margin-left:0}.no-m-v[_ngcontent-%COMP%], .no-m-h[_ngcontent-%COMP%], .no-margin[_ngcontent-%COMP%]{margin:0}.no-m-lr[_ngcontent-%COMP%], .no-m-rl[_ngcontent-%COMP%]{margin-left:0;margin-right:0}.no-m-tb[_ngcontent-%COMP%], .no-m-bt[_ngcontent-%COMP%]{margin-top:0;margin-bottom:0}.m-t-only[_ngcontent-%COMP%]{margin-left:0;margin-right:0;margin-bottom:0}.m-b-only[_ngcontent-%COMP%]{margin-left:0;margin-right:0;margin-top:0}.m-l-only[_ngcontent-%COMP%]{margin-right:0;margin-top:0;margin-bottom:0}.m-r-only[_ngcontent-%COMP%]{margin-left:0;margin-top:0;margin-bottom:0}.m-auto[_ngcontent-%COMP%]{margin-left:auto;margin-right:auto}.ls-0[_ngcontent-%COMP%]{margin-left:10px;margin-right:10px}html[_ngcontent-%COMP%], body[_ngcontent-%COMP%]{-webkit-tap-highlight-color:transparent}div[_ngcontent-%COMP%]{box-sizing:border-box}.color-inherit[_ngcontent-%COMP%]{color:inherit}.no-shadow[_ngcontent-%COMP%]{box-shadow:none}.pointer[_ngcontent-%COMP%]{cursor:pointer}.nolist[_ngcontent-%COMP%]{list-style:none}.actions-menu[_ngcontent-%COMP%]{color:#fff}.alert[_ngcontent-%COMP%]{background-color:#e8f4fd;padding:6px 16px;font-size:.875rem;font-family:Roboto,Helvetica Neue,sans-serif;font-weight:400;line-height:1.43;border-radius:4px;letter-spacing:normal;margin:10px}.alert[_ngcontent-%COMP%] .message[_ngcontent-%COMP%]{padding:8px 0;font-size:18px}.alert[_ngcontent-%COMP%] .alert-check[_ngcontent-%COMP%]{color:#359ff4;margin-right:2px;font-size:1.4rem} .mat-tooltip{font-size:15px;color:#fff!important;background-color:#4461e2b3;border:1px solid rgb(25.7777777778,51.5555555556,166.2222222222);max-width:400px!important;white-space:pre-line!important}.loading[_ngcontent-%COMP%]{position:absolute;min-width:100%;width:100px;height:12px;background:linear-gradient(125deg,#fff,#4461e2,#fff);animation:grow 4s linear infinite,move 4s linear infinite}mat-card-title[_ngcontent-%COMP%]{font-weight:600;font-size:x-large;padding-left:20px;padding-top:20px}html[_ngcontent-%COMP%], body[_ngcontent-%COMP%]{overflow:hidden}.overflow-x-scroll[_ngcontent-%COMP%]{max-width:100%;overflow-x:auto}.overflow-no[_ngcontent-%COMP%]{overflow:hidden}.overflow-auto[_ngcontent-%COMP%]{overflow:auto}.overflow-scroll[_ngcontent-%COMP%]{overflow:scroll}.table-container[_ngcontent-%COMP%]{overflow-x:auto;max-width:100%}body[_ngcontent-%COMP%], .no-p[_ngcontent-%COMP%]{padding:0}.no-p-t[_ngcontent-%COMP%]{padding-top:0}.no-p-r[_ngcontent-%COMP%]{padding-right:0}.no-p-b[_ngcontent-%COMP%]{padding-bottom:0}.no-p-l[_ngcontent-%COMP%]{padding-left:0}.no-p-v[_ngcontent-%COMP%], .no-p-h[_ngcontent-%COMP%]{padding:0}.p-5[_ngcontent-%COMP%]{padding:5px}.p-t-5[_ngcontent-%COMP%]{padding-top:5px}.p-r-5[_ngcontent-%COMP%]{padding-right:5px}.p-b-5[_ngcontent-%COMP%]{padding-bottom:5px}.p-l-5[_ngcontent-%COMP%]{padding-left:5px}.p-v-5[_ngcontent-%COMP%]{padding:5px 0}.p-h-5[_ngcontent-%COMP%]{padding:0 5px}.p-10[_ngcontent-%COMP%]{padding:10px}.p-t-10[_ngcontent-%COMP%]{padding-top:10px}.p-b-10[_ngcontent-%COMP%]{padding-bottom:10px}.p-v-10[_ngcontent-%COMP%]{padding:10px 0}.p-h-10[_ngcontent-%COMP%]{padding:0 10px}.p-15[_ngcontent-%COMP%]{padding:15px}.p-t-15[_ngcontent-%COMP%]{padding-top:15px}.p-r-15[_ngcontent-%COMP%]{padding-right:15px}.p-b-15[_ngcontent-%COMP%]{padding-bottom:15px}.p-l-15[_ngcontent-%COMP%]{padding-left:15px}.p-v-15[_ngcontent-%COMP%]{padding:15px 0}.p-h-15[_ngcontent-%COMP%]{padding:0 15px}.p-20[_ngcontent-%COMP%]{padding:20px}.p-t-20[_ngcontent-%COMP%]{padding-top:20px}.p-r-20[_ngcontent-%COMP%]{padding-right:20px}.p-b-20[_ngcontent-%COMP%]{padding-bottom:20px}.p-l-20[_ngcontent-%COMP%]{padding-left:20px}.p-v-20[_ngcontent-%COMP%]{padding:20px 0}.p-h-20[_ngcontent-%COMP%]{padding:0 20px}.p-25[_ngcontent-%COMP%]{padding:25px}.p-t-25[_ngcontent-%COMP%]{padding-top:25px}.p-r-25[_ngcontent-%COMP%]{padding-right:25px}.p-b-25[_ngcontent-%COMP%]{padding-bottom:25px}.p-l-25[_ngcontent-%COMP%]{padding-left:25px}.p-v-25[_ngcontent-%COMP%]{padding:25px 0}.p-h-25[_ngcontent-%COMP%]{padding:0 25px}.p-30[_ngcontent-%COMP%]{padding:30px}.p-t-30[_ngcontent-%COMP%]{padding-top:30px}.p-r-30[_ngcontent-%COMP%]{padding-right:30px}.p-b-30[_ngcontent-%COMP%]{padding-bottom:30px}.p-l-30[_ngcontent-%COMP%]{padding-left:30px}.p-v-30[_ngcontent-%COMP%]{padding:30px 0}.p-h-30[_ngcontent-%COMP%]{padding:0 30px}.p-35[_ngcontent-%COMP%]{padding:35px}.p-t-35[_ngcontent-%COMP%]{padding-top:35px}.p-r-35[_ngcontent-%COMP%]{padding-right:35px}.p-b-35[_ngcontent-%COMP%]{padding-bottom:35px}.p-l-35[_ngcontent-%COMP%]{padding-left:35px}.p-v-35[_ngcontent-%COMP%]{padding:35px 0}.p-h-35[_ngcontent-%COMP%]{padding:0 35px}.p-40[_ngcontent-%COMP%]{padding:40px}.p-t-40[_ngcontent-%COMP%]{padding-top:40px}.p-r-40[_ngcontent-%COMP%]{padding-right:40px}.p-b-40[_ngcontent-%COMP%]{padding-bottom:40px}.p-l-40[_ngcontent-%COMP%]{padding-left:40px}.p-v-40[_ngcontent-%COMP%]{padding-top:40px;padding-bottom:40px}.p-h-40[_ngcontent-%COMP%]{padding:0 40px}.p-45[_ngcontent-%COMP%]{padding:45px}.p-t-45[_ngcontent-%COMP%]{padding-top:45px}.p-r-45[_ngcontent-%COMP%]{padding-right:45px}.p-b-45[_ngcontent-%COMP%]{padding-bottom:45px}.p-l-45[_ngcontent-%COMP%]{padding-left:45px}.p-v-45[_ngcontent-%COMP%]{padding:45px 0}.p-h-45[_ngcontent-%COMP%]{padding:0 45px}.p-50[_ngcontent-%COMP%]{padding:50px}.p-t-50[_ngcontent-%COMP%]{padding-top:50px}.p-r-50[_ngcontent-%COMP%]{padding-right:50px}.p-b-50[_ngcontent-%COMP%]{padding-bottom:50px}.p-l-50[_ngcontent-%COMP%]{padding-left:50px}.p-v-50[_ngcontent-%COMP%]{padding:50px 0}.p-h-50[_ngcontent-%COMP%]{padding:0 50px}.p-55[_ngcontent-%COMP%]{padding:55px}.p-t-55[_ngcontent-%COMP%]{padding-top:55px}.p-r-55[_ngcontent-%COMP%]{padding-right:55px}.p-b-55[_ngcontent-%COMP%]{padding-bottom:55px}.p-l-55[_ngcontent-%COMP%]{padding-left:55px}.p-v-55[_ngcontent-%COMP%]{padding:55px 0}.p-h-55[_ngcontent-%COMP%]{padding:0 55px}.p-60[_ngcontent-%COMP%]{padding:60px}.p-t-60[_ngcontent-%COMP%]{padding-top:60px}.p-r-60[_ngcontent-%COMP%]{padding-right:60px}.p-b-60[_ngcontent-%COMP%]{padding-bottom:60px}.p-l-60[_ngcontent-%COMP%]{padding-left:60px}.p-v-60[_ngcontent-%COMP%]{padding:60px 0}.p-h-60[_ngcontent-%COMP%]{padding:0 60px}.p-65[_ngcontent-%COMP%]{padding:65px}.p-t-65[_ngcontent-%COMP%]{padding-top:65px}.p-r-65[_ngcontent-%COMP%]{padding-right:65px}.p-b-65[_ngcontent-%COMP%]{padding-bottom:65px}.p-l-65[_ngcontent-%COMP%]{padding-left:65px}.p-v-65[_ngcontent-%COMP%]{padding:65px 0}.p-h-65[_ngcontent-%COMP%]{padding:0 65px}.p-70[_ngcontent-%COMP%]{padding:70px}.p-t-70[_ngcontent-%COMP%]{padding-top:70px}.p-r-70[_ngcontent-%COMP%]{padding-right:70px}.p-b-70[_ngcontent-%COMP%]{padding-bottom:70px}.p-l-70[_ngcontent-%COMP%]{padding-left:70px}.p-v-70[_ngcontent-%COMP%]{padding:70px 0}.p-h-70[_ngcontent-%COMP%]{padding:0 70px}.p-75[_ngcontent-%COMP%]{padding:75px}.p-t-75[_ngcontent-%COMP%]{padding-top:75px}.p-r-75[_ngcontent-%COMP%]{padding-right:75px}.p-b-75[_ngcontent-%COMP%]{padding-bottom:75px}.p-l-75[_ngcontent-%COMP%]{padding-left:75px}.p-v-75[_ngcontent-%COMP%]{padding:75px 0}.p-h-75[_ngcontent-%COMP%]{padding:0 75px}.p-80[_ngcontent-%COMP%]{padding:80px}.p-t-80[_ngcontent-%COMP%]{padding-top:80px}.p-r-80[_ngcontent-%COMP%]{padding-right:80px}.p-b-80[_ngcontent-%COMP%]{padding-bottom:80px}.p-l-80[_ngcontent-%COMP%]{padding-left:80px}.p-v-80[_ngcontent-%COMP%]{padding:80px 0}.p-h-80[_ngcontent-%COMP%]{padding:0 80px}.no-padding[_ngcontent-%COMP%]{padding:0!important}.no-pad-lr[_ngcontent-%COMP%], .no-pad-rl[_ngcontent-%COMP%]{padding-left:0;padding-right:0}.no-pad-tb[_ngcontent-%COMP%], .no-pad-bt[_ngcontent-%COMP%]{padding-top:0;padding-bottom:0}.pad-t-only[_ngcontent-%COMP%]{padding-left:0;padding-right:0;padding-bottom:0}.pad-b-only[_ngcontent-%COMP%]{padding-left:0;padding-right:0;padding-top:0}.pad-l-only[_ngcontent-%COMP%]{padding-right:0;padding-top:0;padding-bottom:0}.pad-r-only[_ngcontent-%COMP%]{padding-left:0;padding-top:0;padding-bottom:0}html[_ngcontent-%COMP%], body[_ngcontent-%COMP%], .rel[_ngcontent-%COMP%], .relative[_ngcontent-%COMP%]{position:relative}.abs[_ngcontent-%COMP%], .absolute[_ngcontent-%COMP%]{position:absolute}.fixed[_ngcontent-%COMP%]{position:fixed}.status-active[_ngcontent-%COMP%]{color:#5cb85c}.status-inactive[_ngcontent-%COMP%]{color:#666f73}.status-deleted[_ngcontent-%COMP%]{color:#000}.status-pending[_ngcontent-%COMP%]{color:orange}.status-approved[_ngcontent-%COMP%]{color:#4461e2}.status-overpaid[_ngcontent-%COMP%]{color:purple}.status-chargeoff[_ngcontent-%COMP%]{color:#f39c12}.status-active-overdue[_ngcontent-%COMP%], .status-block[_ngcontent-%COMP%]{color:red}.status-matured[_ngcontent-%COMP%]{color:#ff4000}.subStatus-contract-termination[_ngcontent-%COMP%]{color:#b3b3b3}.mat-step-header[_ngcontent-%COMP%] .mat-step-icon-state-done[_ngcontent-%COMP%]{background-color:#2af72a}.mat-step-header[_ngcontent-%COMP%] .mat-step-icon-state-done[_ngcontent-%COMP%] .status-transfer-progress[_ngcontent-%COMP%]{color:#ff4000}.mat-step-header[_ngcontent-%COMP%] .mat-step-icon-state-done[_ngcontent-%COMP%] .status-transfer-hold[_ngcontent-%COMP%]{color:#df0101}html[_ngcontent-%COMP%], body[_ngcontent-%COMP%]{-webkit-font-smoothing:antialiased}html[_ngcontent-%COMP%]{font-size:16px}body[_ngcontent-%COMP%]{font-family:Roboto,Helvetica Neue,sans-serif;font-weight:400;font-size:14px;color:#000000de;line-height:1.5;letter-spacing:normal}.mat-h1[_ngcontent-%COMP%], .mat-headline[_ngcontent-%COMP%], .mat-typography[_ngcontent-%COMP%] .mat-h1[_ngcontent-%COMP%], .mat-typography[_ngcontent-%COMP%] .mat-headline[_ngcontent-%COMP%], .mat-typography[_ngcontent-%COMP%] h1[_ngcontent-%COMP%]{font:400 24px/32px Roboto,Helvetica Neue,sans-serif;letter-spacing:normal;margin:0 0 16px}.lh-1[_ngcontent-%COMP%]{line-height:1}.lh-13[_ngcontent-%COMP%]{line-height:1.3}.lh-15[_ngcontent-%COMP%]{line-height:1.5}.bold[_ngcontent-%COMP%], .strong[_ngcontent-%COMP%]{font-weight:700}.no-bold[_ngcontent-%COMP%]{font-weight:400}.italic[_ngcontent-%COMP%], .em[_ngcontent-%COMP%]{font-style:italic}.strike[_ngcontent-%COMP%]{text-decoration:line-through}.normal[_ngcontent-%COMP%]{font-weight:400;font-style:normal}.uppercase[_ngcontent-%COMP%]{text-transform:uppercase}.text-left[_ngcontent-%COMP%]{text-align:left}.text-center[_ngcontent-%COMP%]{text-align:center}.text-right[_ngcontent-%COMP%]{text-align:right}.w100[_ngcontent-%COMP%]{font-weight:100}.w200[_ngcontent-%COMP%]{font-weight:200}.w300[_ngcontent-%COMP%]{font-weight:300}.w400[_ngcontent-%COMP%]{font-weight:400}.w500[_ngcontent-%COMP%]{font-weight:500}.w600[_ngcontent-%COMP%]{font-weight:600}.w700[_ngcontent-%COMP%]{font-weight:700}.w800[_ngcontent-%COMP%]{font-weight:800}.w900[_ngcontent-%COMP%]{font-weight:900}.f9[_ngcontent-%COMP%]{font-size:9px}.f10[_ngcontent-%COMP%]{font-size:10px}.f11[_ngcontent-%COMP%]{font-size:11px}.f12[_ngcontent-%COMP%]{font-size:12px}.f13[_ngcontent-%COMP%]{font-size:13px}.f14[_ngcontent-%COMP%]{font-size:14px}.f15[_ngcontent-%COMP%]{font-size:15px}.f16[_ngcontent-%COMP%]{font-size:16px}.f17[_ngcontent-%COMP%]{font-size:17px}.f18[_ngcontent-%COMP%]{font-size:18px;line-height:30px}.f19[_ngcontent-%COMP%]{font-size:19px}.f20[_ngcontent-%COMP%]{font-size:20px}.f30[_ngcontent-%COMP%]{font-size:30px}.f40[_ngcontent-%COMP%]{font-size:40px}.f50[_ngcontent-%COMP%]{font-size:50px}.f60[_ngcontent-%COMP%]{font-size:60px}.size-small[_ngcontent-%COMP%]{font-size:75%}.size-normal[_ngcontent-%COMP%]{font-size:100%}.size-medium[_ngcontent-%COMP%]{font-size:125%}.size-big[_ngcontent-%COMP%], .size-large[_ngcontent-%COMP%]{font-size:150%}.size-huge[_ngcontent-%COMP%]{font-size:200%}.inherit[_ngcontent-%COMP%]{font:inherit}.text-shadow[_ngcontent-%COMP%]{text-shadow:1px 1px 1px rgba(0,0,0,.4)}.text-rgb-2[_ngcontent-%COMP%]{color:#0003}.text-rgb-3[_ngcontent-%COMP%]{color:#0000004d}.text-rgb-4[_ngcontent-%COMP%]{color:#0006}.text-rgb-5[_ngcontent-%COMP%]{color:#00000080}.no-ul[_ngcontent-%COMP%], .no-ul[_ngcontent-%COMP%]:hover, .no-ul[_ngcontent-%COMP%] a[_ngcontent-%COMP%], .no-ul[_ngcontent-%COMP%] a[_ngcontent-%COMP%]:hover{text-decoration:none}.no-wrap[_ngcontent-%COMP%]{white-space:nowrap}.auto-cell-size[_ngcontent-%COMP%]{white-space:nowrap;width:1%}.ls-0[_ngcontent-%COMP%]{letter-spacing:-3px;white-space:nowrap}.label-field[_ngcontent-%COMP%]{margin-top:32px}.wrap-content[_ngcontent-%COMP%]{overflow-wrap:break-word;word-wrap:break-word}.no-break-content[_ngcontent-%COMP%]{overflow-wrap:anywhere!important}.fit[_ngcontent-%COMP%]{max-width:100%}.half-width[_ngcontent-%COMP%]{width:50%}.full-width[_ngcontent-%COMP%]{width:100%}.full-height[_ngcontent-%COMP%]{height:100%}html[_ngcontent-%COMP%], body[_ngcontent-%COMP%]{width:100%;height:100%;min-height:100%}body[_ngcontent-%COMP%] table[_ngcontent-%COMP%]{width:100%}.container[_ngcontent-%COMP%]{max-width:74rem;width:90%}.mw300[_ngcontent-%COMP%]{max-width:300px}.mw400[_ngcontent-%COMP%]{max-width:400px}.mw500[_ngcontent-%COMP%]{max-width:500px}.mw600[_ngcontent-%COMP%]{max-width:600px}.fullwidth[_ngcontent-%COMP%]{width:100%}.zindex-1[_ngcontent-%COMP%]{z-index:1}.zindex-2[_ngcontent-%COMP%]{z-index:2}.zindex-3[_ngcontent-%COMP%]{z-index:3}.zindex-4[_ngcontent-%COMP%]{z-index:4}.tab-container[_ngcontent-%COMP%]{padding:1%;margin:1%}.tab-container[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{margin:1% auto}.tab-container[_ngcontent-%COMP%] .action-button[_ngcontent-%COMP%]{margin-left:auto}.tab-container[_ngcontent-%COMP%] table[_ngcontent-%COMP%]{width:100%}.tab-container[_ngcontent-%COMP%] table[_ngcontent-%COMP%] .account-action-button[_ngcontent-%COMP%]{min-width:26px;padding:0 0 3px;margin:0 10%;line-height:25px}.tab-container[_ngcontent-%COMP%] table[_ngcontent-%COMP%] .account-action-button[_ngcontent-%COMP%] .accruals[_ngcontent-%COMP%]{padding-top:1%}.select-row[_ngcontent-%COMP%]:hover{cursor:pointer;font-weight:800}"]})}}return t})();var _n=(()=>{class t{constructor(){this.route=g(E),this.entityId=this.route.parent.parent.snapshot.paramMap.get("id"),this.route.data.subscribe(e=>{this.entityDatatable=e.transactionDatatable,this.multiRowDatatableFlag=this.entityDatatable.columnHeaders[0].columnName==="id"})}static{this.\u0275fac=function(s){return new(s||t)}}static{this.\u0275cmp=T({type:t,selectors:[["mifosx-datatable-transaction-tab"]],decls:2,vars:3,consts:[[1,"tab-container","mat-typography"],["entityType","Saving Account Transaction",3,"entityId","multiRowDatatableFlag","entityDatatable"]],template:function(s,o){s&1&&(i(0,"div",0),C(1,"mifosx-entity-datatable-tab",1),a()),s&2&&(n(),d("entityId",o.entityId)("multiRowDatatableFlag",o.multiRowDatatableFlag)("entityDatatable",o.entityDatatable))},dependencies:[P,O,pn],encapsulation:2})}}return t})();var $a=()=>["../../"];function Wa(t,m){t&1&&(i(0,"mat-error"),r(1),c(2,"translate"),c(3,"translate"),i(4,"strong"),r(5),c(6,"translate"),a()()),t&2&&(n(),V(" ",l(2,3,"labels.inputs.Approved On Date")," ",l(3,5,"labels.commons.is")," "),n(4),p(l(6,7,"labels.commons.required")))}var hn=(()=>{class t{constructor(){this.formBuilder=g(rt),this.savingsService=g(I),this.dateUtils=g(j),this.route=g(E),this.router=g(z),this.settingsService=g(U),this.minDate=new Date(2e3,0,1),this.maxDate=new Date,this.accountId=this.route.snapshot.params.savingAccountId}ngOnInit(){this.maxDate=this.settingsService.businessDate,this.createApproveSavingsAccountForm()}createApproveSavingsAccountForm(){this.approveSavingsAccountForm=this.formBuilder.group({approvedOnDate:["",H.required],note:[""]})}submit(){let e=this.approveSavingsAccountForm.value,s=this.settingsService.language.code,o=this.settingsService.dateFormat,u=this.approveSavingsAccountForm.value.approvedOnDate;e.approvedOnDate instanceof Date&&(e.approvedOnDate=this.dateUtils.formatDate(u,o));let x=Q(G({},e),{dateFormat:o,locale:s});this.savingsService.executeSavingsAccountCommand(this.accountId,"approve",x).subscribe(()=>{this.router.navigate(["../../transactions"],{relativeTo:this.route})})}static{this.\u0275fac=function(s){return new(s||t)}}static{this.\u0275cmp=T({type:t,selectors:[["mifosx-approve-savings-account"]],decls:26,vars:21,consts:[["approvedOnDatePicker",""],[1,"container","mat-elevation-z8"],[3,"ngSubmit","formGroup"],[1,"layout-column"],[3,"click"],["matInput","","required","","formControlName","approvedOnDate",3,"min","max","matDatepicker"],["matSuffix","",3,"for"],["matInput","","formControlName","note","cdkTextareaAutosize","","cdkAutosizeMinRows","2"],[1,"layout-row","align-center","gap-5px","responsive-column"],["type","button","mat-raised-button","",3,"routerLink"],["mat-raised-button","","color","primary",3,"disabled"]],template:function(s,o){if(s&1){let u=D();i(0,"div",1)(1,"mat-card")(2,"form",2),b("ngSubmit",function(){return S(u),M(o.submit())}),i(3,"mat-card-content")(4,"div",3)(5,"mat-form-field",4),b("click",function(){S(u);let B=w(12);return M(B.open())}),i(6,"mat-label"),r(7),c(8,"translate"),a(),C(9,"input",5)(10,"mat-datepicker-toggle",6)(11,"mat-datepicker",null,0),v(13,Wa,7,9,"mat-error"),a(),i(14,"mat-form-field")(15,"mat-label"),r(16),c(17,"translate"),a(),C(18,"textarea",7),a()()(),i(19,"mat-card-actions",8)(20,"button",9),r(21),c(22,"translate"),a(),i(23,"button",10),r(24),c(25,"translate"),a()()()()()}if(s&2){let u=w(12);n(2),d("formGroup",o.approveSavingsAccountForm),n(5),p(l(8,12,"labels.inputs.Approved On Date")),n(2),d("min",o.minDate)("max",o.maxDate)("matDatepicker",u),n(),d("for",u),n(3),_(o.approveSavingsAccountForm.controls.approvedOnDate.hasError("required")?13:-1),n(3),p(l(17,14,"labels.inputs.Note")),n(4),d("routerLink",k(20,$a)),n(),f(" ",l(22,16,"labels.buttons.Cancel")," "),n(2),d("disabled",!o.approveSavingsAccountForm.valid),n(),f(" ",l(25,18,"labels.buttons.Confirm")," ")}},dependencies:[P,O,it,et,K,nt,lt,at,ot,q,J,ct,bt,Z,X,mt,vt,st,ht,xt,_t,F,ae,y],styles:[".container[_ngcontent-%COMP%]{max-width:37rem}"]})}}return t})();var Qa=()=>["../../"];function Ka(t,m){t&1&&(i(0,"mat-error"),r(1),c(2,"translate"),c(3,"translate"),i(4,"strong"),r(5),c(6,"translate"),a()()),t&2&&(n(),V(" ",l(2,3,"labels.inputs.Rejected On Date")," ",l(3,5,"labels.commons.is")," "),n(4),p(l(6,7,"labels.commons.required")))}var xn=(()=>{class t{constructor(){this.formBuilder=g(rt),this.savingsService=g(I),this.dateUtils=g(j),this.route=g(E),this.router=g(z),this.settingsService=g(U),this.minDate=new Date(2e3,0,1),this.maxDate=new Date,this.accountId=this.route.snapshot.params.savingAccountId}ngOnInit(){this.maxDate=this.settingsService.businessDate,this.createRejectSavingsAccountForm()}createRejectSavingsAccountForm(){this.rejectSavingsAccountForm=this.formBuilder.group({rejectedOnDate:["",H.required],note:[""]})}submit(){let e=this.rejectSavingsAccountForm.value,s=this.settingsService.language.code,o=this.settingsService.dateFormat,u=this.rejectSavingsAccountForm.value.rejectedOnDate;e.rejectedOnDate instanceof Date&&(e.rejectedOnDate=this.dateUtils.formatDate(u,o));let x=Q(G({},e),{dateFormat:o,locale:s});this.savingsService.executeSavingsAccountCommand(this.accountId,"reject",x).subscribe(()=>{this.router.navigate(["../../"],{relativeTo:this.route})})}static{this.\u0275fac=function(s){return new(s||t)}}static{this.\u0275cmp=T({type:t,selectors:[["mifosx-reject-savings-account"]],decls:26,vars:21,consts:[["rejectedOnDatePicker",""],[1,"container","mat-elevation-z8"],[3,"ngSubmit","formGroup"],[1,"layout-column"],[3,"click"],["matInput","","required","","formControlName","rejectedOnDate",3,"min","max","matDatepicker"],["matSuffix","",3,"for"],["matInput","","formControlName","note","cdkTextareaAutosize","","cdkAutosizeMinRows","2"],[1,"layout-row","align-center","gap-5px","responsive-column"],["type","button","mat-raised-button","",3,"routerLink"],["mat-raised-button","","color","warn",3,"disabled"]],template:function(s,o){if(s&1){let u=D();i(0,"div",1)(1,"mat-card")(2,"form",2),b("ngSubmit",function(){return S(u),M(o.submit())}),i(3,"mat-card-content")(4,"div",3)(5,"mat-form-field",4),b("click",function(){S(u);let B=w(12);return M(B.open())}),i(6,"mat-label"),r(7),c(8,"translate"),a(),C(9,"input",5)(10,"mat-datepicker-toggle",6)(11,"mat-datepicker",null,0),v(13,Ka,7,9,"mat-error"),a(),i(14,"mat-form-field")(15,"mat-label"),r(16),c(17,"translate"),a(),C(18,"textarea",7),a()()(),i(19,"mat-card-actions",8)(20,"button",9),r(21),c(22,"translate"),a(),i(23,"button",10),r(24),c(25,"translate"),a()()()()()}if(s&2){let u=w(12);n(2),d("formGroup",o.rejectSavingsAccountForm),n(5),p(l(8,12,"labels.inputs.Rejected On Date")),n(2),d("min",o.minDate)("max",o.maxDate)("matDatepicker",u),n(),d("for",u),n(3),_(o.rejectSavingsAccountForm.controls.rejectedOnDate.hasError("required")?13:-1),n(3),p(l(17,14,"labels.inputs.Note")),n(4),d("routerLink",k(20,Qa)),n(),f(" ",l(22,16,"labels.buttons.Cancel")," "),n(2),d("disabled",!o.rejectSavingsAccountForm.valid),n(),f(" ",l(25,18,"labels.buttons.Confirm")," ")}},dependencies:[P,O,it,et,K,nt,lt,at,ot,q,J,ct,bt,Z,X,mt,vt,st,ht,xt,_t,F,ae,y],styles:[".container[_ngcontent-%COMP%]{max-width:37rem}"]})}}return t})();var Ya=()=>["../../transactions"];function Ja(t,m){t&1&&(i(0,"mat-error"),r(1),c(2,"translate"),c(3,"translate"),i(4,"strong"),r(5),c(6,"translate"),a()()),t&2&&(n(),V(" ",l(2,3,"labels.inputs.Activated On Date")," ",l(3,5,"labels.commons.is")," "),n(4),p(l(6,7,"labels.commons.required")))}var bn=(()=>{class t{constructor(){this.formBuilder=g(rt),this.savingsService=g(I),this.dateUtils=g(j),this.route=g(E),this.router=g(z),this.settingsService=g(U),this.minDate=new Date(2e3,0,1),this.maxDate=new Date,this.accountId=this.route.snapshot.params.savingAccountId}ngOnInit(){this.maxDate=this.settingsService.businessDate,this.createActivateSavingsAccountForm()}createActivateSavingsAccountForm(){this.activateSavingsAccountForm=this.formBuilder.group({activatedOnDate:["",H.required]})}submit(){let e=this.activateSavingsAccountForm.value,s=this.settingsService.language.code,o=this.settingsService.dateFormat,u=this.activateSavingsAccountForm.value.activatedOnDate;e.activatedOnDate instanceof Date&&(e.activatedOnDate=this.dateUtils.formatDate(u,o));let x=Q(G({},e),{dateFormat:o,locale:s});this.savingsService.executeSavingsAccountCommand(this.accountId,"activate",x).subscribe(()=>{this.router.navigate(["../../transactions"],{relativeTo:this.route})})}static{this.\u0275fac=function(s){return new(s||t)}}static{this.\u0275cmp=T({type:t,selectors:[["mifosx-activate-savings-account"]],decls:21,vars:18,consts:[["activatedOnDatePicker",""],[1,"container","mat-elevation-z8"],[3,"ngSubmit","formGroup"],[1,"layout-column"],[1,"flex-fill",3,"click"],["matInput","","required","","formControlName","activatedOnDate",3,"min","max","matDatepicker"],["matSuffix","",3,"for"],[1,"layout-row","align-center","gap-5px","responsive-column"],["type","button","mat-raised-button","",3,"routerLink"],["mat-raised-button","","color","primary",3,"disabled"]],template:function(s,o){if(s&1){let u=D();i(0,"div",1)(1,"mat-card")(2,"form",2),b("ngSubmit",function(){return S(u),M(o.submit())}),i(3,"mat-card-content")(4,"div",3)(5,"mat-form-field",4),b("click",function(){S(u);let B=w(12);return M(B.open())}),i(6,"mat-label"),r(7),c(8,"translate"),a(),C(9,"input",5)(10,"mat-datepicker-toggle",6)(11,"mat-datepicker",null,0),v(13,Ja,7,9,"mat-error"),a()()(),i(14,"mat-card-actions",7)(15,"button",8),r(16),c(17,"translate"),a(),i(18,"button",9),r(19),c(20,"translate"),a()()()()()}if(s&2){let u=w(12);n(2),d("formGroup",o.activateSavingsAccountForm),n(5),p(l(8,11,"labels.inputs.Activated On Date")),n(2),d("min",o.minDate)("max",o.maxDate)("matDatepicker",u),n(),d("for",u),n(3),_(o.activateSavingsAccountForm.controls.activatedOnDate.hasError("required")?13:-1),n(2),d("routerLink",k(17,Ya)),n(),f(" ",l(17,13,"labels.buttons.Cancel")," "),n(2),d("disabled",!o.activateSavingsAccountForm.valid),n(),f(" ",l(20,15,"labels.buttons.Confirm")," ")}},dependencies:[P,O,it,et,K,nt,lt,at,ot,q,J,ct,bt,Z,X,mt,vt,st,ht,xt,_t,F,y],styles:[".container[_ngcontent-%COMP%]{max-width:37rem}"]})}}return t})();var Xa=()=>["../../"],Sn=(()=>{class t{constructor(){this.formBuilder=g(rt),this.savingsService=g(I),this.route=g(E),this.router=g(z),this.accountId=this.route.snapshot.params.savingAccountId}ngOnInit(){this.createUndoApprovalSavingsAccountForm()}createUndoApprovalSavingsAccountForm(){this.undoApprovalSavingsAccountForm=this.formBuilder.group({note:[""]})}submit(){let e=G({},this.undoApprovalSavingsAccountForm.value);this.savingsService.executeSavingsAccountCommand(this.accountId,"undoapproval",e).subscribe(()=>{this.router.navigate(["../../transactions"],{relativeTo:this.route})})}static{this.\u0275fac=function(s){return new(s||t)}}static{this.\u0275cmp=T({type:t,selectors:[["mifosx-undo-approval-savings-account"]],decls:16,vars:13,consts:[[1,"container","mat-elevation-z8"],[3,"ngSubmit","formGroup"],[1,"flex-fill"],["matInput","","formControlName","note","cdkTextareaAutosize","","cdkAutosizeMinRows","2"],[1,"layout-row","align-center","gap-5px","responsive-column"],["type","button","mat-raised-button","",3,"routerLink"],["mat-raised-button","","color","warn",3,"disabled"]],template:function(s,o){s&1&&(i(0,"div",0)(1,"mat-card")(2,"form",1),b("ngSubmit",function(){return o.submit()}),i(3,"mat-card-content")(4,"mat-form-field",2)(5,"mat-label"),r(6),c(7,"translate"),a(),C(8,"textarea",3),a()(),i(9,"mat-card-actions",4)(10,"button",5),r(11),c(12,"translate"),a(),i(13,"button",6),r(14),c(15,"translate"),a()()()()()),s&2&&(n(2),d("formGroup",o.undoApprovalSavingsAccountForm),n(4),p(l(7,6,"labels.inputs.Note")),n(4),d("routerLink",k(12,Xa)),n(),f(" ",l(12,8,"labels.buttons.Cancel")," "),n(2),d("disabled",!o.undoApprovalSavingsAccountForm.valid),n(),f(" ",l(15,10,"labels.buttons.Confirm")," "))},dependencies:[P,O,it,et,K,nt,at,ot,q,J,ct,bt,Z,X,st,F,ae,y],styles:[".container[_ngcontent-%COMP%]{max-width:37rem}"]})}}return t})();var Za=()=>["../../"];function to(t,m){t&1&&(i(0,"mat-error"),r(1),c(2,"translate"),c(3,"translate"),i(4,"strong"),r(5),c(6,"translate"),a()()),t&2&&(n(),V(" ",l(2,3,"labels.inputs.Transaction Date")," ",l(3,5,"labels.commons.is")," "),n(4),p(l(6,7,"labels.commons.required")))}var Mn=(()=>{class t{constructor(){this.formBuilder=g(rt),this.savingsService=g(I),this.dateUtils=g(j),this.route=g(E),this.router=g(z),this.settingsService=g(U),this.minDate=new Date(2e3,0,1),this.maxDate=new Date,this.accountId=this.route.snapshot.params.savingAccountId}ngOnInit(){this.maxDate=this.settingsService.businessDate,this.createPostInterestSavingsAccountForm()}createPostInterestSavingsAccountForm(){this.postInterestSavingsAccountForm=this.formBuilder.group({transactionDate:["",H.required]})}submit(){let e=this.postInterestSavingsAccountForm.value,s=this.settingsService.language.code,o=this.settingsService.dateFormat,u=this.postInterestSavingsAccountForm.value.transactionDate;e.transactionDate instanceof Date&&(e.transactionDate=this.dateUtils.formatDate(u,o));let x=Q(G({},e),{IsPostInterestAsOn:!0,dateFormat:o,locale:s});this.savingsService.executeSavingsAccountTransactionsCommand(this.accountId,"postInterestAsOn",x).subscribe(()=>{this.router.navigate(["../../transactions"],{relativeTo:this.route})})}static{this.\u0275fac=function(s){return new(s||t)}}static{this.\u0275cmp=T({type:t,selectors:[["mifosx-post-interest-as-on-savings-account"]],decls:20,vars:18,consts:[["transactionDatePicker",""],[1,"container","mat-elevation-z8"],[3,"ngSubmit","formGroup"],[1,"flex-100",3,"click"],["matInput","","required","","formControlName","transactionDate",3,"min","max","matDatepicker"],["matSuffix","",3,"for"],[1,"layout-row","align-center","gap-5px","responsive-column"],["type","button","mat-raised-button","",3,"routerLink"],["mat-raised-button","","color","primary",3,"disabled"]],template:function(s,o){if(s&1){let u=D();i(0,"div",1)(1,"mat-card")(2,"form",2),b("ngSubmit",function(){return S(u),M(o.submit())}),i(3,"mat-card-content")(4,"mat-form-field",3),b("click",function(){S(u);let B=w(11);return M(B.open())}),i(5,"mat-label"),r(6),c(7,"translate"),a(),C(8,"input",4)(9,"mat-datepicker-toggle",5)(10,"mat-datepicker",null,0),v(12,to,7,9,"mat-error"),a()(),i(13,"mat-card-actions",6)(14,"button",7),r(15),c(16,"translate"),a(),i(17,"button",8),r(18),c(19,"translate"),a()()()()()}if(s&2){let u=w(11);n(2),d("formGroup",o.postInterestSavingsAccountForm),n(4),p(l(7,11,"labels.inputs.Transaction Date")),n(2),d("min",o.minDate)("max",o.maxDate)("matDatepicker",u),n(),d("for",u),n(3),_(o.postInterestSavingsAccountForm.controls.transactionDate.hasError("required")?12:-1),n(2),d("routerLink",k(17,Za)),n(),f(" ",l(16,13,"labels.buttons.Cancel")," "),n(2),d("disabled",!o.postInterestSavingsAccountForm.valid),n(),f(" ",l(19,15,"labels.buttons.Confirm")," ")}},dependencies:[P,O,it,et,K,nt,lt,at,ot,q,J,ct,bt,Z,X,mt,vt,st,ht,xt,_t,F,y],styles:[".container[_ngcontent-%COMP%]{max-width:37rem}"]})}}return t})();var eo=()=>["../../"];function no(t,m){if(t&1&&(i(0,"mat-option",6),r(1),a()),t&2){let e=m.$implicit;d("value",e.id),n(),f(" ",e.displayName," ")}}function io(t,m){t&1&&(i(0,"mat-error"),r(1),c(2,"translate"),c(3,"translate"),i(4,"strong"),r(5),c(6,"translate"),a()()),t&2&&(n(),V(" ",l(2,3,"labels.inputs.Assignment Date")," ",l(3,5,"labels.commons.is")," "),n(4),p(l(6,7,"labels.commons.required")))}var An=(()=>{class t{constructor(){this.formBuilder=g(rt),this.savingsService=g(I),this.dateUtils=g(j),this.route=g(E),this.router=g(z),this.settingsService=g(U),this.minDate=new Date(2e3,0,1),this.maxDate=new Date,this.accountId=this.route.snapshot.params.savingAccountId,this.route.data.subscribe(e=>{this.savingsAccountData=e.savingsAccountActionData})}ngOnInit(){this.maxDate=this.settingsService.businessDate,this.fieldOfficerData=this.savingsAccountData.fieldOfficerOptions,this.createSavingsAssignStaffForm()}createSavingsAssignStaffForm(){this.savingsAssignStaffForm=this.formBuilder.group({toSavingsOfficerId:[""],assignmentDate:["",H.required]})}submit(){let e=this.savingsAssignStaffForm.value,s=this.settingsService.language.code,o=this.settingsService.dateFormat,u=this.savingsAssignStaffForm.value.assignmentDate;e.assignmentDate instanceof Date&&(e.assignmentDate=this.dateUtils.formatDate(u,o));let x=Q(G({},e),{fromSavingsOfficerId:"",dateFormat:o,locale:s});this.savingsService.executeSavingsAccountCommand(this.accountId,"assignSavingsOfficer",x).subscribe(()=>{this.router.navigate(["../../transactions"],{relativeTo:this.route})})}static{this.\u0275fac=function(s){return new(s||t)}}static{this.\u0275cmp=T({type:t,selectors:[["mifosx-savings-account-assign-staff"]],decls:28,vars:21,consts:[["assignmentDatePicker",""],[1,"container","mat-elevation-z8"],[3,"ngSubmit","formGroup"],[1,"layout-column"],[1,"flex-48"],["formControlName","toSavingsOfficerId"],[3,"value"],[3,"click"],["matInput","","required","","formControlName","assignmentDate",3,"min","max","matDatepicker"],["matSuffix","",3,"for"],[1,"layout-row","align-center","gap-5px","responsive-column"],["type","button","mat-raised-button","",3,"routerLink"],["mat-raised-button","","color","primary",3,"disabled"]],template:function(s,o){if(s&1){let u=D();i(0,"div",1)(1,"mat-card")(2,"form",2),b("ngSubmit",function(){return S(u),M(o.submit())}),i(3,"mat-card-content")(4,"div",3)(5,"mat-form-field",4)(6,"mat-label"),r(7),c(8,"translate"),a(),i(9,"mat-select",5),ut(10,no,2,2,"mat-option",6,dt),a()(),i(12,"mat-form-field",7),b("click",function(){S(u);let B=w(19);return M(B.open())}),i(13,"mat-label"),r(14),c(15,"translate"),a(),C(16,"input",8)(17,"mat-datepicker-toggle",9)(18,"mat-datepicker",null,0),v(20,io,7,9,"mat-error"),a()()(),i(21,"mat-card-actions",10)(22,"button",11),r(23),c(24,"translate"),a(),i(25,"button",12),r(26),c(27,"translate"),a()()()()()}if(s&2){let u=w(19);n(2),d("formGroup",o.savingsAssignStaffForm),n(5),p(l(8,12,"labels.inputs.To Savings Officer")),n(3),gt(o.fieldOfficerData),n(4),p(l(15,14,"labels.inputs.Assignment Date")),n(2),d("min",o.minDate)("max",o.maxDate)("matDatepicker",u),n(),d("for",u),n(3),_(o.savingsAssignStaffForm.controls.assignmentDate.hasError("required")?20:-1),n(2),d("routerLink",k(20,eo)),n(),f(" ",l(24,16,"labels.buttons.Cancel")," "),n(2),d("disabled",!o.savingsAssignStaffForm.valid),n(),f(" ",l(27,18,"labels.buttons.Confirm")," ")}},dependencies:[P,O,it,et,K,nt,lt,at,ot,q,J,ct,bt,Z,X,mt,vt,st,wt,It,ht,xt,_t,F,y],styles:[".container[_ngcontent-%COMP%]{max-width:37rem}"]})}}return t})();var ao=()=>["../../"];function oo(t,m){t&1&&(i(0,"mat-error"),r(1),c(2,"translate"),c(3,"translate"),i(4,"strong"),r(5),c(6,"translate"),a()()),t&2&&(n(),V(" ",l(2,3,"labels.inputs.Unassignment Date")," ",l(3,5,"labels.commons.is")," "),n(4),p(l(6,7,"labels.commons.required")))}var Tn=(()=>{class t{constructor(){this.formBuilder=g(rt),this.savingsService=g(I),this.dateUtils=g(j),this.route=g(E),this.router=g(z),this.settingsService=g(U),this.minDate=new Date(2e3,0,1),this.maxDate=new Date,this.accountId=this.route.snapshot.params.savingAccountId}ngOnInit(){this.maxDate=this.settingsService.businessDate,this.createSavingsUnassignStaffForm()}createSavingsUnassignStaffForm(){this.savingsUnassignStaffForm=this.formBuilder.group({unassignedDate:["",H.required]})}submit(){let e=this.savingsUnassignStaffForm.value,s=this.settingsService.language.code,o=this.settingsService.dateFormat,u=this.savingsUnassignStaffForm.value.unassignedDate;e.unassignedDate instanceof Date&&(e.unassignedDate=this.dateUtils.formatDate(u,o));let x=Q(G({},e),{dateFormat:o,locale:s});this.savingsService.executeSavingsAccountCommand(this.accountId,"unassignSavingsOfficer",x).subscribe(()=>{this.router.navigate(["../../transactions"],{relativeTo:this.route})})}static{this.\u0275fac=function(s){return new(s||t)}}static{this.\u0275cmp=T({type:t,selectors:[["mifosx-savings-account-unassign-staff"]],decls:20,vars:18,consts:[["unassignedDatePicker",""],[1,"container","mat-elevation-z8"],[3,"ngSubmit","formGroup"],[1,"flex-fill",3,"click"],["matInput","","required","","formControlName","unassignedDate",3,"min","max","matDatepicker"],["matSuffix","",3,"for"],[1,"layout-row","align-center","gap-5px","responsive-column"],["type","button","mat-raised-button","",3,"routerLink"],["mat-raised-button","","color","primary",3,"disabled"]],template:function(s,o){if(s&1){let u=D();i(0,"div",1)(1,"mat-card")(2,"form",2),b("ngSubmit",function(){return S(u),M(o.submit())}),i(3,"mat-card-content")(4,"mat-form-field",3),b("click",function(){S(u);let B=w(11);return M(B.open())}),i(5,"mat-label"),r(6),c(7,"translate"),a(),C(8,"input",4)(9,"mat-datepicker-toggle",5)(10,"mat-datepicker",null,0),v(12,oo,7,9,"mat-error"),a()(),i(13,"mat-card-actions",6)(14,"button",7),r(15),c(16,"translate"),a(),i(17,"button",8),r(18),c(19,"translate"),a()()()()()}if(s&2){let u=w(11);n(2),d("formGroup",o.savingsUnassignStaffForm),n(4),p(l(7,11,"labels.inputs.Unassignment Date")),n(2),d("min",o.minDate)("max",o.maxDate)("matDatepicker",u),n(),d("for",u),n(3),_(o.savingsUnassignStaffForm.controls.unassignedDate.hasError("required")?12:-1),n(2),d("routerLink",k(17,ao)),n(),f(" ",l(16,13,"labels.buttons.Cancel")," "),n(2),d("disabled",!o.savingsUnassignStaffForm.valid),n(),f(" ",l(19,15,"labels.buttons.Confirm")," ")}},dependencies:[P,O,it,et,K,nt,lt,at,ot,q,J,ct,bt,Z,X,mt,vt,st,ht,xt,_t,F,y],styles:[".container[_ngcontent-%COMP%]{max-width:37rem}"]})}}return t})();var ro=()=>["../../"];function co(t,m){t&1&&(i(0,"mat-error"),r(1),c(2,"translate"),c(3,"translate"),i(4,"strong"),r(5),c(6,"translate"),a()()),t&2&&(n(),V(" ",l(2,3,"labels.inputs.Withdrawn On Date")," ",l(3,5,"labels.commons.is")," "),n(4),p(l(6,7,"labels.commons.required")))}var Pn=(()=>{class t{constructor(){this.formBuilder=g(rt),this.savingsService=g(I),this.dateUtils=g(j),this.route=g(E),this.router=g(z),this.settingsService=g(U),this.minDate=new Date(2e3,0,1),this.maxDate=new Date,this.accountId=this.route.snapshot.params.savingAccountId}ngOnInit(){this.maxDate=this.settingsService.businessDate,this.createWithdrawSavingsAccountForm()}createWithdrawSavingsAccountForm(){this.withdrawSavingsAccountForm=this.formBuilder.group({withdrawnOnDate:["",H.required],note:[""]})}submit(){let e=this.withdrawSavingsAccountForm.value,s=this.settingsService.language.code,o=this.settingsService.dateFormat,u=this.withdrawSavingsAccountForm.value.withdrawnOnDate;e.withdrawnOnDate instanceof Date&&(e.withdrawnOnDate=this.dateUtils.formatDate(u,o));let x=Q(G({},e),{dateFormat:o,locale:s});this.savingsService.executeSavingsAccountCommand(this.accountId,"withdrawnByApplicant",x).subscribe(()=>{this.router.navigate(["../../"],{relativeTo:this.route})})}static{this.\u0275fac=function(s){return new(s||t)}}static{this.\u0275cmp=T({type:t,selectors:[["mifosx-withdraw-by-client-savings-account"]],decls:26,vars:21,consts:[["withdrawnOnDatePicker",""],[1,"container","mat-elevation-z8"],[3,"ngSubmit","formGroup"],[1,"layout-column"],[3,"click"],["matInput","","required","","formControlName","withdrawnOnDate",3,"min","max","matDatepicker"],["matSuffix","",3,"for"],["matInput","","formControlName","note","cdkTextareaAutosize","","cdkAutosizeMinRows","2"],[1,"layout-row","align-center","gap-5px","responsive-column"],["type","button","mat-raised-button","",3,"routerLink"],["mat-raised-button","","color","primary",3,"disabled"]],template:function(s,o){if(s&1){let u=D();i(0,"div",1)(1,"mat-card")(2,"form",2),b("ngSubmit",function(){return S(u),M(o.submit())}),i(3,"mat-card-content")(4,"div",3)(5,"mat-form-field",4),b("click",function(){S(u);let B=w(12);return M(B.open())}),i(6,"mat-label"),r(7),c(8,"translate"),a(),C(9,"input",5)(10,"mat-datepicker-toggle",6)(11,"mat-datepicker",null,0),v(13,co,7,9,"mat-error"),a(),i(14,"mat-form-field")(15,"mat-label"),r(16),c(17,"translate"),a(),C(18,"textarea",7),a()()(),i(19,"mat-card-actions",8)(20,"button",9),r(21),c(22,"translate"),a(),i(23,"button",10),r(24),c(25,"translate"),a()()()()()}if(s&2){let u=w(12);n(2),d("formGroup",o.withdrawSavingsAccountForm),n(5),p(l(8,12,"labels.inputs.Withdrawn On Date")),n(2),d("min",o.minDate)("max",o.maxDate)("matDatepicker",u),n(),d("for",u),n(3),_(o.withdrawSavingsAccountForm.controls.withdrawnOnDate.hasError("required")?13:-1),n(3),p(l(17,14,"labels.inputs.Note")),n(4),d("routerLink",k(20,ro)),n(),f(" ",l(22,16,"labels.buttons.Cancel")," "),n(2),d("disabled",!o.withdrawSavingsAccountForm.valid),n(),f(" ",l(25,18,"labels.buttons.Confirm")," ")}},dependencies:[P,O,it,et,K,nt,lt,at,ot,q,J,ct,bt,Z,X,mt,vt,st,ht,xt,_t,F,ae,y],styles:[".container[_ngcontent-%COMP%]{max-width:37rem}"]})}}return t})();var so=()=>["../../transactions"];function lo(t,m){if(t&1&&(i(0,"mat-option",6),r(1),a()),t&2){let e=m.$implicit;d("value",e.id),n(),f(" ",e.name+" ("+e.currency.name+")"," ")}}function mo(t,m){t&1&&(i(0,"mat-error"),r(1),c(2,"translate"),c(3,"translate"),i(4,"strong"),r(5),c(6,"translate"),a()()),t&2&&(n(),V(" ",l(2,3,"labels.inputs.Charge")," ",l(3,5,"labels.commons.is")," "),n(4),p(l(6,7,"labels.commons.required")))}function po(t,m){t&1&&(i(0,"mat-error"),r(1),c(2,"translate"),c(3,"translate"),i(4,"strong"),r(5),c(6,"translate"),a()()),t&2&&(n(),V(" ",l(2,3,"labels.inputs.Amount")," ",l(3,5,"labels.commons.is")," "),n(4),p(l(6,7,"labels.commons.required")))}function uo(t,m){if(t&1&&(i(0,"mat-option",6),r(1),a()),t&2){let e=m.$implicit;d("value",e.id),n(),f(" ",e.value," ")}}function go(t,m){if(t&1&&(i(0,"mat-option",6),r(1),a()),t&2){let e=m.$implicit;d("value",e.id),n(),f(" ",e.value," ")}}function fo(t,m){t&1&&(i(0,"mat-error"),r(1),c(2,"translate"),c(3,"translate"),i(4,"strong"),r(5),c(6,"translate"),a()()),t&2&&(n(),V(" ",l(2,3,"labels.inputs.Due for collection on")," ",l(3,5,"labels.commons.is")," "),n(4),p(l(6,7,"labels.commons.required")))}function Co(t,m){if(t&1){let e=D();i(0,"mat-form-field",13),b("click",function(){S(e);let o=w(7);return M(o.open())}),i(1,"mat-label"),r(2),c(3,"translate"),a(),C(4,"input",14)(5,"mat-datepicker-toggle",15)(6,"mat-datepicker",null,0),v(8,fo,7,9,"mat-error"),a()}if(t&2){let e=w(7),s=h(2);n(2),p(l(3,6,"labels.inputs.Due for collection on")),n(2),d("min",s.minDate)("max",s.maxDate)("matDatepicker",e),n(),d("for",e),n(3),_(s.savingsChargeForm.controls.dueDate.hasError("required")?8:-1)}}function vo(t,m){t&1&&(i(0,"mat-error"),r(1),c(2,"translate"),c(3,"translate"),i(4,"strong"),r(5),c(6,"translate"),a()()),t&2&&(n(),V(" ",l(2,3,"labels.inputs.Due Date")," ",l(3,5,"labels.commons.is")," "),n(4),p(l(6,7,"labels.commons.required")))}function _o(t,m){if(t&1){let e=D();i(0,"mat-form-field",13),b("click",function(){S(e);let o=w(7);return M(o.open())}),i(1,"mat-label"),r(2),c(3,"translate"),a(),C(4,"input",16)(5,"mat-datepicker-toggle",15)(6,"mat-datepicker",null,1),v(8,vo,7,9,"mat-error"),a()}if(t&2){let e=w(7),s=h(2);n(2),p(l(3,6,"labels.inputs.Due On")),n(2),d("min",s.minDate)("max",s.maxDate)("matDatepicker",e),n(),d("for",e),n(3),_(s.savingsChargeForm.controls.feeOnMonthDay.hasError("required")?8:-1)}}function ho(t,m){t&1&&(i(0,"mat-form-field")(1,"mat-label"),r(2),c(3,"translate"),a(),C(4,"input",17),a()),t&2&&(n(2),p(l(3,1,"labels.inputs.Repeats Every")))}function xo(t,m){if(t&1&&(i(0,"div",4)(1,"mat-form-field")(2,"mat-label"),r(3),c(4,"translate"),a(),C(5,"input",10),v(6,po,7,9,"mat-error"),a(),i(7,"mat-form-field")(8,"mat-label"),r(9),c(10,"translate"),a(),i(11,"mat-select",11),ut(12,uo,2,2,"mat-option",6,dt),a()(),i(14,"mat-form-field")(15,"mat-label"),r(16),c(17,"translate"),a(),i(18,"mat-select",12),ut(19,go,2,2,"mat-option",6,dt),a()(),v(21,Co,9,8,"mat-form-field"),v(22,_o,9,8,"mat-form-field"),v(23,ho,5,3,"mat-form-field"),a()),t&2){let e=h();n(3),p(l(4,7,"labels.inputs.Amount")),n(3),_(e.savingsChargeForm.controls.amount.hasError("required")?6:-1),n(3),p(l(10,9,"labels.inputs.Charge Calculation")),n(3),gt(e.chargeDetails.chargeCalculationTypeOptions),n(4),p(l(17,11,"labels.inputs.Charge time type")),n(3),gt(e.chargeDetails.chargeTimeTypeOptions),n(2),_(e.savingsChargeForm.contains("dueDate")?21:-1),n(),_(e.savingsChargeForm.contains("feeOnMonthDay")?22:-1),n(),_(e.savingsChargeForm.contains("feeInterval")?23:-1)}}var On=(()=>{class t{constructor(){this.formBuilder=g(rt),this.route=g(E),this.router=g(z),this.dateUtils=g(j),this.savingsService=g(I),this.settingsService=g(U),this.minDate=new Date(2e3,0,1),this.maxDate=new Date,this.route.data.subscribe(e=>{this.savingsChargeOptions=e.savingsAccountActionData.chargeOptions}),this.savingAccountId=this.route.snapshot.params.savingAccountId}ngOnInit(){this.maxDate=this.settingsService.businessDate,this.createSavingsChargeForm(),this.buildDependencies()}buildDependencies(){this.savingsChargeForm.controls.chargeId.valueChanges.subscribe(e=>{this.savingsService.getChargeTemplate(e).subscribe(s=>{this.chargeDetails=s;let o=s.chargeTimeType.id;(s.chargeTimeType.value==="Withdrawal Fee"||s.chargeTimeType.value==="Saving No Activity Fee")&&(this.chargeDetails.dueDateNotRequired=!0),(s.chargeTimeType.value==="Annual Fee"||s.chargeTimeType.value==="Monthly Fee")&&(this.chargeDetails.chargeTimeTypeAnnualOrMonth=!0),!this.chargeDetails.dueDateNotRequired&&!this.chargeDetails.chargeTimeTypeAnnualOrMonth?this.savingsChargeForm.addControl("dueDate",new Ct("",H.required)):this.savingsChargeForm.removeControl("dueDate"),!this.chargeDetails.dueDateNotRequired&&this.chargeDetails.chargeTimeTypeAnnualOrMonth?this.savingsChargeForm.addControl("feeOnMonthDay",new Ct("",H.required)):this.savingsChargeForm.removeControl("feeOnMonthDay"),o.value==="Monthly Fee"?this.savingsChargeForm.addControl("feeInterval",new Ct(s.feeInterval,H.required)):this.savingsChargeForm.removeControl("feeInterval"),this.savingsChargeForm.patchValue({amount:s.amount,chargeCalculationType:s.chargeCalculationType.id,chargeTimeType:s.chargeTimeType.id})})})}createSavingsChargeForm(){this.savingsChargeForm=this.formBuilder.group({chargeId:["",H.required],amount:["",H.required],chargeCalculationType:[{value:"",disabled:!0}],chargeTimeType:[{value:"",disabled:!0}]})}submit(){let e=this.savingsChargeForm.value;if(e.locale=this.settingsService.language.code,e.feeInterval||(e.feeInterval=this.chargeDetails.feeInterval),this.chargeDetails.dueDateNotRequired!==!0)if(this.chargeDetails.chargeTimeTypeAnnualOrMonth===!0){let s="MMMM-dd";if(e.monthDayFormat=s,e.feeOnMonthDay){let o=this.savingsChargeForm.value.feeOnMonthDay;e.feeOnMonthDay=this.dateUtils.formatDate(o,s)}}else{let s=this.settingsService.dateFormat;if(e.dateFormat=s,e.dueDate){let o=this.savingsChargeForm.value.dueDate;e.dueDate=this.dateUtils.formatDate(o,s)}}this.savingsService.createSavingsCharge(this.savingAccountId,"charges",e).subscribe(()=>{this.router.navigate(["../../transactions"],{relativeTo:this.route})})}static{this.\u0275fac=function(s){return new(s||t)}}static{this.\u0275cmp=T({type:t,selectors:[["mifosx-add-charge-savings-account"]],decls:21,vars:15,consts:[["dueDatePicker",""],["feeOnMonthDayPicker",""],[1,"container","mat-elevation-z8"],[3,"ngSubmit","formGroup"],[1,"layout-column"],["required","","formControlName","chargeId"],[3,"value"],[1,"layout-row","layout-xs-column","layout-align-center","gap-5px"],["type","button","mat-raised-button","",3,"routerLink"],["mat-raised-button","","color","primary",3,"disabled"],["type","number","required","","matInput","","formControlName","amount"],["formControlName","chargeCalculationType"],["formControlName","chargeTimeType"],[3,"click"],["matInput","","required","","formControlName","dueDate",3,"min","max","matDatepicker"],["matSuffix","",3,"for"],["matInput","","required","","formControlName","feeOnMonthDay",3,"min","max","matDatepicker"],["matInput","","formControlName","feeInterval"]],template:function(s,o){s&1&&(i(0,"div",2)(1,"mat-card")(2,"form",3),b("ngSubmit",function(){return o.submit()}),i(3,"mat-card-content")(4,"div",4)(5,"mat-form-field")(6,"mat-label"),r(7),c(8,"translate"),a(),i(9,"mat-select",5),ut(10,lo,2,2,"mat-option",6,dt),a(),v(12,mo,7,9,"mat-error"),a(),v(13,xo,24,13,"div",4),a(),i(14,"mat-card-actions",7)(15,"button",8),r(16),c(17,"translate"),a(),i(18,"button",9),r(19),c(20,"translate"),a()()()()()()),s&2&&(n(2),d("formGroup",o.savingsChargeForm),n(5),p(l(8,8,"labels.inputs.Charge")),n(3),gt(o.savingsChargeOptions),n(2),_(o.savingsChargeForm.controls.chargeId.hasError("required")?12:-1),n(),_(o.chargeDetails?13:-1),n(2),d("routerLink",k(14,so)),n(),f(" ",l(17,10,"labels.buttons.Cancel")," "),n(2),d("disabled",!o.savingsChargeForm.valid),n(),f(" ",l(20,12,"labels.buttons.Submit")," "))},dependencies:[P,O,it,et,ie,K,nt,lt,at,ot,q,J,ct,bt,Z,X,mt,vt,st,wt,It,ht,xt,_t,F,y],styles:[".container[_ngcontent-%COMP%]{width:37rem}"]})}}return t})();var bo=()=>["../../transactions"];function So(t,m){t&1&&(i(0,"h2",2),r(1),c(2,"translate"),a()),t&2&&(n(),f(" ",l(2,1,"labels.heading.Withdraw Money From Saving Account")," "))}function Mo(t,m){t&1&&(i(0,"h2",2),r(1),c(2,"translate"),a()),t&2&&(n(),f(" ",l(2,1,"labels.heading.Deposit Money To Saving Account")," "))}function Ao(t,m){t&1&&(i(0,"mat-error"),r(1),c(2,"translate"),c(3,"translate"),i(4,"strong"),r(5),c(6,"translate"),a()()),t&2&&(n(),V(" ",l(2,3,"labels.inputs.Transaction Date")," ",l(3,5,"labels.commons.is")," "),n(4),p(l(6,7,"labels.commons.required")))}function To(t,m){if(t&1&&(i(0,"mat-option",10),r(1),a()),t&2){let e=m.$implicit;d("value",e.id),n(),f(" ",e.name," ")}}function Po(t,m){t&1&&(i(0,"mat-form-field")(1,"mat-label"),r(2),c(3,"translate"),a(),C(4,"input",19),a()),t&2&&(n(2),p(l(3,1,"labels.inputs.Account Number")))}function Oo(t,m){t&1&&(i(0,"mat-form-field")(1,"mat-label"),r(2),c(3,"translate"),a(),C(4,"input",20),a()),t&2&&(n(2),p(l(3,1,"labels.inputs.Cheque")))}function Do(t,m){t&1&&(i(0,"mat-form-field")(1,"mat-label"),r(2),c(3,"translate"),a(),C(4,"input",21),a()),t&2&&(n(2),p(l(3,1,"labels.inputs.Routing Code")))}function yo(t,m){t&1&&(i(0,"mat-form-field")(1,"mat-label"),r(2),c(3,"translate"),a(),C(4,"input",22),a()),t&2&&(n(2),p(l(3,1,"labels.inputs.Receipt Number")))}function Io(t,m){t&1&&(i(0,"mat-form-field")(1,"mat-label"),r(2),c(3,"translate"),a(),C(4,"input",23),a()),t&2&&(n(2),p(l(3,1,"labels.inputs.Bank")))}var Dn=(()=>{class t{constructor(){this.formBuilder=g(rt),this.route=g(E),this.router=g(z),this.dateUtils=g(j),this.savingsService=g(I),this.settingsService=g(U),this.minDate=new Date(2e3,0,1),this.maxDate=new Date,this.addPaymentDetailsFlag=!1,this.transactionType={deposit:!1,withdrawal:!1},this.currency=null,this.route.data.subscribe(e=>{this.paymentTypeOptions=e.savingsAccountActionData.paymentTypeOptions,e.savingsAccountActionData.currency&&(this.currency=e.savingsAccountActionData.currency)}),this.transactionCommand=this.route.snapshot.params.name.toLowerCase(),this.transactionType[this.transactionCommand]=!0,this.savingAccountId=this.route.snapshot.params.savingAccountId}ngOnInit(){this.maxDate=this.settingsService.businessDate,this.createSavingAccountTransactionForm()}createSavingAccountTransactionForm(){this.savingAccountTransactionForm=this.formBuilder.group({transactionDate:[this.settingsService.businessDate,H.required],transactionAmount:[0,H.required],paymentTypeId:[""],note:[""]})}addPaymentDetails(){this.addPaymentDetailsFlag=!this.addPaymentDetailsFlag,this.addPaymentDetailsFlag?(this.savingAccountTransactionForm.addControl("accountNumber",new Ct("")),this.savingAccountTransactionForm.addControl("checkNumber",new Ct("")),this.savingAccountTransactionForm.addControl("routingCode",new Ct("")),this.savingAccountTransactionForm.addControl("receiptNumber",new Ct("")),this.savingAccountTransactionForm.addControl("bankNumber",new Ct(""))):(this.savingAccountTransactionForm.removeControl("accountNumber"),this.savingAccountTransactionForm.removeControl("checkNumber"),this.savingAccountTransactionForm.removeControl("routingCode"),this.savingAccountTransactionForm.removeControl("receiptNumber"),this.savingAccountTransactionForm.removeControl("bankNumber"))}submit(){let e=this.savingAccountTransactionForm.value,s=this.settingsService.language.code,o=this.settingsService.dateFormat,u=this.savingAccountTransactionForm.value.transactionDate;e.transactionDate instanceof Date&&(e.transactionDate=this.dateUtils.formatDate(u,o));let x=Q(G({},e),{dateFormat:o,locale:s});x.transactionAmount=x.transactionAmount*1,this.savingsService.executeSavingsAccountTransactionsCommand(this.savingAccountId,this.transactionCommand,x).subscribe(B=>{this.router.navigate(["../../transactions"],{relativeTo:this.route})})}static{this.\u0275fac=function(s){return new(s||t)}}static{this.\u0275cmp=T({type:t,selectors:[["mifosx-savings-transactions"]],decls:48,vars:39,consts:[["dueDatePicker",""],[1,"container","mat-elevation-z8"],["mat-title","",1,"m-l-10"],[3,"ngSubmit","formGroup"],[1,"layout-column"],[3,"click"],["matInput","","formControlName","transactionDate","required","",3,"min","max","matDatepicker"],["matSuffix","",3,"for"],[3,"currency","isRequired","inputFormControl","inputLabel"],["required","","formControlName","paymentTypeId"],[3,"value"],[1,"flex-fill"],[1,"expandcollapsebutton","m-l-10","m-t-40","flex-75",3,"click"],[3,"className"],[1,"m-l-10"],["formControlName","note","matInput","","cdkTextareaAutosize","","cdkAutosizeMinRows","2"],[1,"layout-row","layout-xs-column","layout-align-center","gap-5px"],["type","button","mat-raised-button","",3,"routerLink"],["mat-raised-button","","color","primary",3,"disabled"],["type","number","formControlName","accountNumber","matInput",""],["type","number","formControlName","checkNumber","matInput",""],["formControlName","routingCode","matInput",""],["formControlName","receiptNumber","matInput",""],["formControlName","bankNumber","matInput",""]],template:function(s,o){if(s&1){let u=D();i(0,"div",1)(1,"mat-card"),v(2,So,3,3,"h2",2),v(3,Mo,3,3,"h2",2),i(4,"form",3),b("ngSubmit",function(){return S(u),M(o.submit())}),i(5,"mat-card-content")(6,"div",4)(7,"mat-form-field",5),b("click",function(){S(u);let B=w(14);return M(B.open())}),i(8,"mat-label"),r(9),c(10,"translate"),a(),C(11,"input",6)(12,"mat-datepicker-toggle",7)(13,"mat-datepicker",null,0),v(15,Ao,7,9,"mat-error"),a(),C(16,"mifosx-input-amount",8),i(17,"mat-form-field")(18,"mat-label"),r(19),c(20,"translate"),a(),i(21,"mat-select",9),ut(22,To,2,2,"mat-option",10,dt),a()(),i(24,"div",11)(25,"span",12),b("click",function(){return S(u),M(o.addPaymentDetails())}),i(26,"mat-slide-toggle")(27,"div",13)(28,"span",14),r(29),c(30,"translate"),a()()()()(),v(31,Po,5,3,"mat-form-field"),v(32,Oo,5,3,"mat-form-field"),v(33,Do,5,3,"mat-form-field"),v(34,yo,5,3,"mat-form-field"),v(35,Io,5,3,"mat-form-field"),i(36,"mat-form-field")(37,"mat-label"),r(38),c(39,"translate"),a(),C(40,"textarea",15),a(),i(41,"mat-card-actions",16)(42,"button",17),r(43),c(44,"translate"),a(),i(45,"button",18),r(46),c(47,"translate"),a()()()()()()()}if(s&2){let u=w(14);n(2),_(o.transactionType.withdrawal?2:-1),n(),_(o.transactionType.deposit?3:-1),n(),d("formGroup",o.savingAccountTransactionForm),n(5),p(l(10,26,"labels.inputs.Transaction Date")),n(2),d("min",o.minDate)("max",o.maxDate)("matDatepicker",u),n(),d("for",u),n(3),_(o.savingAccountTransactionForm.controls.transactionDate.hasError("required")?15:-1),n(),d("currency",o.currency)("isRequired",!0)("inputFormControl",o.savingAccountTransactionForm.controls.transactionAmount)("inputLabel","Transaction Amount"),n(3),p(l(20,28,"labels.inputs.Payment Type")),n(3),gt(o.paymentTypeOptions),n(5),d("className",o.addPaymentDetailsFlag?"enabled":"disabled"),n(2),p(l(30,30,"labels.inputs.Show Payment Details")),n(2),_(o.addPaymentDetailsFlag?31:-1),n(),_(o.addPaymentDetailsFlag?32:-1),n(),_(o.addPaymentDetailsFlag?33:-1),n(),_(o.addPaymentDetailsFlag?34:-1),n(),_(o.addPaymentDetailsFlag?35:-1),n(3),p(l(39,32,"labels.inputs.Notes")),n(4),d("routerLink",k(38,bo)),n(),f(" ",l(44,34,"labels.buttons.Cancel")," "),n(2),d("disabled",!o.savingAccountTransactionForm.valid),n(),f(" ",l(47,36,"labels.buttons.Submit")," ")}},dependencies:[P,O,it,et,ie,K,nt,lt,at,ot,q,J,ct,bt,Z,X,mt,vt,st,wt,It,ht,xt,_t,F,Re,Ie,ae,y],styles:[".expandcollapsebutton[_ngcontent-%COMP%]{margin-top:-7px}.container[_ngcontent-%COMP%]{max-width:37rem}.right-input[_ngcontent-%COMP%]{text-align:right}.right-label[_ngcontent-%COMP%]{padding-right:25px!important}"]})}}return t})();var wo=()=>["../../"];function Eo(t,m){t&1&&(i(0,"mat-error"),r(1),c(2,"translate"),c(3,"translate"),i(4,"strong"),r(5),c(6,"translate"),a()()),t&2&&(n(),V(" ",l(2,3,"labels.inputs.Closed On Date")," ",l(3,5,"labels.commons.is")," "),n(4),p(l(6,7,"labels.commons.required")))}function Fo(t,m){t&1&&(i(0,"mat-form-field",13)(1,"mat-label"),r(2),c(3,"translate"),a(),C(4,"input",18),a()),t&2&&(n(2),p(l(3,1,"labels.inputs.Transaction Amount")))}function ko(t,m){if(t&1&&(i(0,"mat-option",20),r(1),a()),t&2){let e=m.$implicit;d("value",e.id),n(),f(" ",e.name," ")}}function Bo(t,m){if(t&1&&(i(0,"mat-form-field")(1,"mat-label"),r(2),c(3,"translate"),a(),i(4,"mat-select",19),ut(5,ko,2,2,"mat-option",20,dt),a()()),t&2){let e=h(2);n(2),p(l(3,1,"labels.inputs.Payment Type")),n(3),gt(e.paymentTypeOptions)}}function No(t,m){t&1&&(i(0,"mat-form-field")(1,"mat-label"),r(2),c(3,"translate"),a(),C(4,"input",21),a()),t&2&&(n(2),p(l(3,1,"labels.inputs.Account Number")))}function Ro(t,m){t&1&&(i(0,"mat-form-field")(1,"mat-label"),r(2),c(3,"translate"),a(),C(4,"input",22),a()),t&2&&(n(2),p(l(3,1,"labels.inputs.Cheque")))}function Vo(t,m){t&1&&(i(0,"mat-form-field")(1,"mat-label"),r(2),c(3,"translate"),a(),C(4,"input",23),a()),t&2&&(n(2),p(l(3,1,"labels.inputs.Routing Code")))}function Lo(t,m){t&1&&(i(0,"mat-form-field")(1,"mat-label"),r(2),c(3,"translate"),a(),C(4,"input",24),a()),t&2&&(n(2),p(l(3,1,"labels.inputs.Receipt Number")))}function Go(t,m){t&1&&(i(0,"mat-form-field")(1,"mat-label"),r(2),c(3,"translate"),a(),C(4,"input",25),a()),t&2&&(n(2),p(l(3,1,"labels.inputs.Bank")))}function Uo(t,m){if(t&1){let e=D();i(0,"div",3),v(1,Fo,5,3,"mat-form-field",13),v(2,Bo,7,3,"mat-form-field"),i(3,"div",14)(4,"span",15),b("click",function(){S(e);let o=h();return M(o.addPaymentDetails())}),i(5,"mat-slide-toggle")(6,"div",16)(7,"span",17),r(8),c(9,"translate"),a()()()()(),v(10,No,5,3,"mat-form-field"),v(11,Ro,5,3,"mat-form-field"),v(12,Vo,5,3,"mat-form-field"),v(13,Lo,5,3,"mat-form-field"),v(14,Go,5,3,"mat-form-field"),a()}if(t&2){let e=h();n(),_(e.closeSavingsAccountForm.controls.amount?1:-1),n(),_(e.closeSavingsAccountForm.controls.paymentTypeId?2:-1),n(4),d("className",e.showPaymentDetails?"enabled":"disabled"),n(2),p(l(9,9,"labels.inputs.Show Payment Details")),n(2),_(e.closeSavingsAccountForm.controls.accountNumber?10:-1),n(),_(e.closeSavingsAccountForm.controls.checkNumber?11:-1),n(),_(e.closeSavingsAccountForm.controls.routingCode?12:-1),n(),_(e.closeSavingsAccountForm.controls.receiptNumber?13:-1),n(),_(e.closeSavingsAccountForm.controls.bankNumber?14:-1)}}var yn=(()=>{class t{constructor(){this.formBuilder=g(rt),this.savingsService=g(I),this.dateUtils=g(j),this.route=g(E),this.router=g(z),this.settingsService=g(U),this.minDate=new Date(2e3,0,1),this.maxDate=new Date,this.addPaymentDetailsFlag=!1,this.route.data.subscribe(e=>{this.paymentTypeOptions=e.savingsAccountActionData[0].paymentTypeOptions,this.transactionAmount=e.savingsAccountActionData[1].summary.accountBalance}),this.accountId=this.route.snapshot.params.savingAccountId}ngOnInit(){this.maxDate=this.settingsService.businessDate,this.createCloseSavingsAccountForm(),this.buildDependencies()}createCloseSavingsAccountForm(){this.closeSavingsAccountForm=this.formBuilder.group({closedOnDate:["",H.required],withdrawBalance:[!1],postInterestValidationOnClosure:[!1],note:[""]})}buildDependencies(){this.closeSavingsAccountForm.get("withdrawBalance").valueChanges.subscribe(e=>{e?(this.closeSavingsAccountForm.addControl("amount",new Ct({value:this.transactionAmount,disabled:!0})),this.closeSavingsAccountForm.addControl("paymentTypeId",new Ct(""))):(this.closeSavingsAccountForm.removeControl("amount"),this.closeSavingsAccountForm.removeControl("paymentTypeId"))})}addPaymentDetails(){this.addPaymentDetailsFlag=!this.addPaymentDetailsFlag,this.addPaymentDetailsFlag?(this.closeSavingsAccountForm.addControl("accountNumber",new Ct("")),this.closeSavingsAccountForm.addControl("checkNumber",new Ct("")),this.closeSavingsAccountForm.addControl("routingCode",new Ct("")),this.closeSavingsAccountForm.addControl("receiptNumber",new Ct("")),this.closeSavingsAccountForm.addControl("bankNumber",new Ct(""))):(this.closeSavingsAccountForm.removeControl("accountNumber"),this.closeSavingsAccountForm.removeControl("checkNumber"),this.closeSavingsAccountForm.removeControl("routingCode"),this.closeSavingsAccountForm.removeControl("receiptNumber"),this.closeSavingsAccountForm.removeControl("bankNumber"))}submit(){let e=this.closeSavingsAccountForm.value,s=this.settingsService.language.code,o=this.settingsService.dateFormat,u=this.closeSavingsAccountForm.value.closedOnDate;e.closedOnDate instanceof Date&&(e.closedOnDate=this.dateUtils.formatDate(u,o));let x=Q(G({},e),{dateFormat:o,locale:s});this.savingsService.executeSavingsAccountCommand(this.accountId,"close",x).subscribe(()=>{this.router.navigate(["../../transactions"],{relativeTo:this.route})})}static{this.\u0275fac=function(s){return new(s||t)}}static{this.\u0275cmp=T({type:t,selectors:[["mifosx-close-savings-account"]],decls:33,vars:28,consts:[["closedOnDatePicker",""],[1,"container","mat-elevation-z8"],[3,"ngSubmit","formGroup"],[1,"layout-column"],[3,"click"],["matInput","","required","","formControlName","closedOnDate",3,"min","max","matDatepicker"],["matSuffix","",3,"for"],["formControlName","withdrawBalance",1,"m-b-25","m-t-15"],["formControlName","postInterestValidationOnClosure"],["matInput","","formControlName","note","cdkTextareaAutosize","","cdkAutosizeMinRows","2"],[1,"layout-row","align-center","gap-5px","responsive-column"],["type","button","mat-raised-button","",3,"routerLink"],["mat-raised-button","","color","warn",3,"disabled"],[1,"m-t-20"],[1,"flex-fill"],[1,"expandcollapsebutton","m-l-10","m-t-40","flex-75",3,"click"],[3,"className"],[1,"m-l-10"],["type","number","required","","matInput","","formControlName","amount"],["formControlName","paymentTypeId"],[3,"value"],["type","number","formControlName","accountNumber","matInput",""],["type","number","formControlName","checkNumber","matInput",""],["formControlName","routingCode","matInput",""],["formControlName","receiptNumber","matInput",""],["formControlName","bankNumber","matInput",""]],template:function(s,o){if(s&1){let u=D();i(0,"div",1)(1,"mat-card")(2,"form",2),b("ngSubmit",function(){return S(u),M(o.submit())}),i(3,"mat-card-content")(4,"div",3)(5,"mat-form-field",4),b("click",function(){S(u);let B=w(12);return M(B.open())}),i(6,"mat-label"),r(7),c(8,"translate"),a(),C(9,"input",5)(10,"mat-datepicker-toggle",6)(11,"mat-datepicker",null,0),v(13,Eo,7,9,"mat-error"),a(),i(14,"mat-checkbox",7),r(15),c(16,"translate"),a(),i(17,"mat-checkbox",8),r(18),c(19,"translate"),a(),v(20,Uo,15,11,"div",3),i(21,"mat-form-field")(22,"mat-label"),r(23),c(24,"translate"),a(),C(25,"textarea",9),a()()(),i(26,"mat-card-actions",10)(27,"button",11),r(28),c(29,"translate"),a(),i(30,"button",12),r(31),c(32,"translate"),a()()()()()}if(s&2){let u=w(12);n(2),d("formGroup",o.closeSavingsAccountForm),n(5),p(l(8,15,"labels.inputs.Closed On Date")),n(2),d("min",o.minDate)("max",o.maxDate)("matDatepicker",u),n(),d("for",u),n(3),_(o.closeSavingsAccountForm.controls.closedOnDate.hasError("required")?13:-1),n(2),f(" ",l(16,17,"labels.inputs.Withdraw Balance")," "),n(3),f(" ",l(19,19,"labels.inputs.Is Interest Posting required on closure date"),"? "),n(2),_(o.closeSavingsAccountForm.controls.withdrawBalance.value?20:-1),n(3),p(l(24,21,"labels.inputs.Note")),n(4),d("routerLink",k(27,wo)),n(),f(" ",l(29,23,"labels.buttons.Cancel")," "),n(2),d("disabled",!o.closeSavingsAccountForm.valid),n(),f(" ",l(32,25,"labels.buttons.Confirm")," ")}},dependencies:[P,O,it,et,ie,K,nt,lt,at,ot,q,J,ct,bt,Z,X,mt,vt,st,wt,It,ht,xt,_t,F,Ce,Ie,ae,y],styles:[".container[_ngcontent-%COMP%]{max-width:37rem}"]})}}return t})();var qo=()=>["../../"];function Ho(t,m){t&1&&(i(0,"mat-error"),r(1),c(2,"translate"),c(3,"translate"),i(4,"strong"),r(5),c(6,"translate"),a()()),t&2&&(n(),V(" ",l(2,3,"labels.inputs.Due Date")," ",l(3,5,"labels.commons.is")," "),n(4),p(l(6,7,"labels.commons.required")))}function zo(t,m){t&1&&(i(0,"mat-error"),r(1),c(2,"translate"),c(3,"translate"),i(4,"strong"),r(5),c(6,"translate"),a()()),t&2&&(n(),V(" ",l(2,3,"labels.inputs.Amount")," ",l(3,5,"labels.commons.is")," "),n(4),p(l(6,7,"labels.commons.required")))}var In=(()=>{class t{constructor(){this.formBuilder=g(rt),this.savingsService=g(I),this.dateUtils=g(j),this.route=g(E),this.router=g(z),this.settingsService=g(U),this.minDate=new Date(2e3,0,1),this.maxDate=new Date,this.accountId=this.route.snapshot.params.savingAccountId,this.route.data.subscribe(e=>{this.savingsAccountData=e.savingsAccountActionData})}ngOnInit(){this.maxDate=this.settingsService.businessDate,this.createApplyAnnualFeesForm(),this.applyCharge()}createApplyAnnualFeesForm(){this.applyAnnualFeesForm=this.formBuilder.group({dueDate:["",H.required],amount:[""]})}applyCharge(){this.savingsAccountData.charges.forEach(s=>{s.name==="Annual fee - INR"&&(this.chargeId=s.id,this.applyAnnualFeesForm.get("amount").patchValue(s.amount))})}submit(){let e=this.applyAnnualFeesForm.value,s=this.settingsService.language.code,o=this.settingsService.dateFormat,u=this.applyAnnualFeesForm.value.dueDate;e.dueDate instanceof Date&&(e.dueDate=this.dateUtils.formatDate(u,o));let x=Q(G({},e),{dateFormat:o,locale:s});this.savingsService.executeSavingsAccountChargesCommand(this.accountId,"paycharge",x,this.chargeId).subscribe(()=>{this.router.navigate(["../../"],{relativeTo:this.route})})}static{this.\u0275fac=function(s){return new(s||t)}}static{this.\u0275cmp=T({type:t,selectors:[["mifosx-apply-annual-fees-savings-account"]],decls:27,vars:22,consts:[["dueDatePicker",""],[1,"container","mat-elevation-z8"],[3,"ngSubmit","formGroup"],[1,"layout-column"],[3,"click"],["matInput","","required","","formControlName","dueDate",3,"min","max","matDatepicker"],["matSuffix","",3,"for"],["type","number","formControlName","amount","required","","matInput",""],[1,"layout-row","align-center","gap-5px","responsive-column"],["type","button","mat-raised-button","",3,"routerLink"],["mat-raised-button","","color","primary",3,"disabled"]],template:function(s,o){if(s&1){let u=D();i(0,"div",1)(1,"mat-card")(2,"form",2),b("ngSubmit",function(){return S(u),M(o.submit())}),i(3,"mat-card-content")(4,"div",3)(5,"mat-form-field",4),b("click",function(){S(u);let B=w(12);return M(B.open())}),i(6,"mat-label"),r(7),c(8,"translate"),a(),C(9,"input",5)(10,"mat-datepicker-toggle",6)(11,"mat-datepicker",null,0),v(13,Ho,7,9,"mat-error"),a(),i(14,"mat-form-field")(15,"mat-label"),r(16),c(17,"translate"),a(),C(18,"input",7),v(19,zo,7,9,"mat-error"),a()()(),i(20,"mat-card-actions",8)(21,"button",9),r(22),c(23,"translate"),a(),i(24,"button",10),r(25),c(26,"translate"),a()()()()()}if(s&2){let u=w(12);n(2),d("formGroup",o.applyAnnualFeesForm),n(5),p(l(8,13,"labels.inputs.Annual Fees Transaction Date")),n(2),d("min",o.minDate)("max",o.maxDate)("matDatepicker",u),n(),d("for",u),n(3),_(o.applyAnnualFeesForm.controls.dueDate.hasError("required")?13:-1),n(3),p(l(17,15,"labels.inputs.Amount")),n(3),_(o.applyAnnualFeesForm.controls.amount.hasError("required")?19:-1),n(2),d("routerLink",k(21,qo)),n(),f(" ",l(23,17,"labels.buttons.Cancel")," "),n(2),d("disabled",!o.applyAnnualFeesForm.valid),n(),f(" ",l(26,19,"labels.buttons.Confirm")," ")}},dependencies:[P,O,it,et,ie,K,nt,lt,at,ot,q,J,ct,bt,Z,X,mt,vt,st,ht,xt,_t,F,y],styles:[".container[_ngcontent-%COMP%]{max-width:37rem}"]})}}return t})();var jo=()=>["../../transactions"];function $o(t,m){t&1&&(i(0,"mat-card-title"),r(1),c(2,"translate"),a()),t&2&&(n(),p(l(2,1,"labels.heading.Hold Amount")))}function Wo(t,m){t&1&&(i(0,"mat-card-title"),r(1),c(2,"translate"),a()),t&2&&(n(),p(l(2,1,"labels.heading.Block Savings Account")))}function Qo(t,m){if(t&1&&(i(0,"mat-option",6),r(1),a()),t&2){let e=m.$implicit;d("value",e.id),n(),f(" ",e.name," ")}}function Ko(t,m){t&1&&(i(0,"mat-error"),r(1),c(2,"translate"),c(3,"translate"),i(4,"strong"),r(5),c(6,"translate"),a()()),t&2&&(n(),V(" ",l(2,3,"labels.inputs.Reason")," ",l(3,5,"labels.commons.is")," "),n(4),p(l(6,7,"labels.commons.required")))}function Yo(t,m){t&1&&(i(0,"mat-error"),r(1),c(2,"translate"),c(3,"translate"),i(4,"strong"),r(5),c(6,"translate"),a()()),t&2&&(n(),V(" ",l(2,3,"labels.inputs.Transaction Date")," ",l(3,5,"labels.commons.is")," "),n(4),p(l(6,7,"labels.commons.required")))}function Jo(t,m){if(t&1){let e=D();i(0,"mat-form-field",11),b("click",function(){S(e);let o=w(7);return M(o.open())}),i(1,"mat-label"),r(2),c(3,"translate"),a(),C(4,"input",12)(5,"mat-datepicker-toggle",13)(6,"mat-datepicker",null,0),v(8,Yo,7,9,"mat-error"),a()}if(t&2){let e=w(7),s=h();n(2),p(l(3,6,"labels.inputs.Transaction Date")),n(2),d("min",s.minDate)("max",s.maxDate)("matDatepicker",e),n(),d("for",e),n(3),_(s.manageSavingsAccountForm.controls.transactionDate.hasError("required")?8:-1)}}function Xo(t,m){if(t&1&&C(0,"mifosx-input-amount",7),t&2){let e=h();d("currency",e.currency)("isRequired",!0)("inputFormControl",e.manageSavingsAccountForm.controls.transactionAmount)("inputLabel","Transaction Amount")}}var wn=(()=>{class t{constructor(){this.formBuilder=g(rt),this.savingsService=g(I),this.dateUtils=g(j),this.route=g(E),this.router=g(z),this.systemService=g(Oi),this.settingsService=g(U),this.minDate=new Date(2e3,0,1),this.maxDate=new Date,this.reasonOptions=[],this.transactionType={holdamount:!1,blockaccount:!1,blockdeposit:!1,blockwithdrawal:!1},this.transactionCommand=this.route.snapshot.params.name.toLowerCase().replaceAll(" ",""),this.transactionType[this.transactionCommand]=!0,this.savingAccountId=this.route.snapshot.params.savingAccountId}ngOnInit(){this.maxDate=this.settingsService.businessDate,this.createManageSavingsAccountForm(),(this.transactionType.holdamount||this.transactionType.blockaccount||this.transactionType.blockdeposit||this.transactionType.blockwithdrawal)&&this.getCodeValues()}getCodeValues(){let e="SavingsTransactionFreezeReasons";this.transactionType.blockaccount?e="SavingsAccountBlockReasons":this.transactionType.blockdeposit?e="CreditTransactionFreezeReasons":this.transactionType.blockwithdrawal&&(e="DebitTransactionFreezeReasons"),this.systemService.getCodes().subscribe(s=>{s.some(o=>(o.name===e&&this.systemService.getCodeValues(o.id).subscribe(u=>(this.reasonOptions=u,!0)),!1))})}createManageSavingsAccountForm(){this.transactionType.holdamount?this.manageSavingsAccountForm=this.formBuilder.group({reasonForBlock:["",H.required],transactionDate:["",H.required],transactionAmount:[0,H.required]}):this.manageSavingsAccountForm=this.formBuilder.group({reasonForBlock:["",H.required]})}submit(){let e="",s={};if(this.transactionType.holdamount){let o=this.manageSavingsAccountForm.value,u=this.settingsService.language.code,x=this.settingsService.dateFormat,B=this.manageSavingsAccountForm.value.transactionDate;o.transactionDate instanceof Date&&(o.transactionDate=this.dateUtils.formatDate(B,x)),s=Q(G({},o),{dateFormat:x,locale:u}),e="holdAmount",s.transactionAmount=s.transactionAmount*1,this.savingsService.executeSavingsAccountTransactionsCommand(this.savingAccountId,e,s).subscribe(Yt=>{this.router.navigate(["../../transactions"],{relativeTo:this.route})})}else s=G({},this.manageSavingsAccountForm.value),e="block",this.transactionType.blockdeposit?e="blockCredit":this.transactionType.blockwithdrawal&&(e="blockDebit"),this.savingsService.executeSavingsAccountCommand(this.savingAccountId,e,s).subscribe(o=>{this.router.navigate(["../../transactions"],{relativeTo:this.route})})}static{this.\u0275fac=function(s){return new(s||t)}}static{this.\u0275cmp=T({type:t,selectors:[["mifosx-manage-savings-account"]],inputs:{currency:"currency"},decls:23,vars:18,consts:[["transactionDatePicker",""],[1,"container","mat-elevation-z8"],[3,"ngSubmit","formGroup"],[1,"layout-row"],[1,"flex-100"],["required","","formControlName","reasonForBlock"],[3,"value"],[1,"flex-100",3,"currency","isRequired","inputFormControl","inputLabel"],[1,"layout-row","align-center","gap-5px","responsive-column"],["type","button","mat-raised-button","",3,"routerLink"],["mat-raised-button","","color","primary",3,"disabled"],[1,"flex-100",3,"click"],["matInput","","required","","formControlName","transactionDate",3,"min","max","matDatepicker"],["matSuffix","",3,"for"]],template:function(s,o){s&1&&(i(0,"div",1)(1,"mat-card"),v(2,$o,3,3,"mat-card-title"),v(3,Wo,3,3,"mat-card-title"),i(4,"form",2),b("ngSubmit",function(){return o.submit()}),i(5,"mat-card-content",3)(6,"mat-form-field",4)(7,"mat-label"),r(8),c(9,"translate"),a(),i(10,"mat-select",5),ut(11,Qo,2,2,"mat-option",6,dt),a(),v(13,Ko,7,9,"mat-error"),a(),v(14,Jo,9,8,"mat-form-field",4),v(15,Xo,1,4,"mifosx-input-amount",7),a(),i(16,"mat-card-actions",8)(17,"button",9),r(18),c(19,"translate"),a(),i(20,"button",10),r(21),c(22,"translate"),a()()()()()),s&2&&(n(2),_(o.transactionType.holdamount?2:-1),n(),_(o.transactionType.blockaccount?3:-1),n(),d("formGroup",o.manageSavingsAccountForm),n(4),p(l(9,11,"labels.inputs.Reason")),n(3),gt(o.reasonOptions),n(2),_(o.manageSavingsAccountForm.controls.reasonForBlock.hasError("required")?13:-1),n(),_(o.transactionType.holdamount?14:-1),n(),_(o.transactionType.holdamount?15:-1),n(2),d("routerLink",k(17,jo)),n(),f(" ",l(19,13,"labels.buttons.Cancel")," "),n(2),d("disabled",!o.manageSavingsAccountForm.valid),n(),f(" ",l(22,15,"labels.buttons.Confirm")," "))},dependencies:[P,O,it,et,K,nt,lt,at,ot,q,J,ct,bt,Z,X,mt,vt,st,wt,It,ht,xt,_t,F,Ze,Re,y],styles:[".container[_ngcontent-%COMP%]{width:37rem}"]})}}return t})();function Zo(t,m){t&1&&C(0,"mifosx-approve-savings-account")}function tr(t,m){t&1&&C(0,"mifosx-reject-savings-account")}function er(t,m){t&1&&C(0,"mifosx-activate-savings-account")}function nr(t,m){t&1&&C(0,"mifosx-undo-approval-savings-account")}function ir(t,m){t&1&&C(0,"mifosx-post-interest-as-on-savings-account")}function ar(t,m){t&1&&C(0,"mifosx-savings-account-assign-staff")}function or(t,m){t&1&&C(0,"mifosx-savings-account-unassign-staff")}function rr(t,m){t&1&&C(0,"mifosx-withdraw-by-client-savings-account")}function cr(t,m){t&1&&C(0,"mifosx-add-charge-savings-account")}function sr(t,m){t&1&&C(0,"mifosx-savings-transactions")}function lr(t,m){t&1&&C(0,"mifosx-close-savings-account")}function mr(t,m){t&1&&C(0,"mifosx-apply-annual-fees-savings-account")}function pr(t,m){if(t&1&&C(0,"mifosx-manage-savings-account",0),t&2){let e=h();d("currency",e.currency)}}var En=(()=>{class t{constructor(){this.route=g(E),this.actions={Approve:!1,Reject:!1,Withdrawal:!1,Deposit:!1,Activate:!1,Close:!1,"Undo Approval":!1,"Post Interest As On":!1,"Assign Staff":!1,"Add Charge":!1,"Unassign Staff":!1,"Withdrawn by Client":!1,"Apply Annual Fees":!1,"Hold Amount":!1,"Block Account":!1,"Unblock Account":!1,"Block Deposit":!1,"Unblock Deposit":!1,"Block Withdrawal":!1,"Unblock Withdrawal":!1},this.route.data.subscribe(s=>{s.savingsAccountActionData&&(this.currency=s.savingsAccountActionData.currency)});let e=this.route.snapshot.params.name;e in this.actions&&(this.actions[e]=!0)}static{this.\u0275fac=function(s){return new(s||t)}}static{this.\u0275cmp=T({type:t,selectors:[["mifosx-saving-account-actions"]],decls:13,vars:13,consts:[[3,"currency"]],template:function(s,o){s&1&&(v(0,Zo,1,0,"mifosx-approve-savings-account"),v(1,tr,1,0,"mifosx-reject-savings-account"),v(2,er,1,0,"mifosx-activate-savings-account"),v(3,nr,1,0,"mifosx-undo-approval-savings-account"),v(4,ir,1,0,"mifosx-post-interest-as-on-savings-account"),v(5,ar,1,0,"mifosx-savings-account-assign-staff"),v(6,or,1,0,"mifosx-savings-account-unassign-staff"),v(7,rr,1,0,"mifosx-withdraw-by-client-savings-account"),v(8,cr,1,0,"mifosx-add-charge-savings-account"),v(9,sr,1,0,"mifosx-savings-transactions"),v(10,lr,1,0,"mifosx-close-savings-account"),v(11,mr,1,0,"mifosx-apply-annual-fees-savings-account"),v(12,pr,1,1,"mifosx-manage-savings-account",0)),s&2&&(_(o.actions.Approve?0:-1),n(),_(o.actions.Reject?1:-1),n(),_(o.actions.Activate?2:-1),n(),_(o.actions["Undo Approval"]?3:-1),n(),_(o.actions["Post Interest As On"]?4:-1),n(),_(o.actions["Assign Staff"]?5:-1),n(),_(o.actions["Unassign Staff"]?6:-1),n(),_(o.actions["Withdrawn by Client"]?7:-1),n(),_(o.actions["Add Charge"]?8:-1),n(),_(o.actions.Withdrawal||o.actions.Deposit?9:-1),n(),_(o.actions.Close?10:-1),n(),_(o.actions["Apply Annual Fees"]?11:-1),n(),_(o.actions["Hold Amount"]||o.actions["Block Account"]||o.actions["Block Deposit"]||o.actions["Block Withdrawal"]?12:-1))},dependencies:[P,O,hn,xn,bn,Sn,Mn,An,Tn,Pn,On,Dn,yn,In,wn],encapsulation:2})}}return t})();var dr=()=>({confirm:!0}),Le=(()=>{class t{constructor(){this.dialogRef=g(Xt),this.data=g(De)}static{this.\u0275fac=function(s){return new(s||t)}}static{this.\u0275cmp=T({type:t,selectors:[["mifosx-waive-charge-dialog"]],decls:14,vars:15,consts:[["mat-dialog-title",""],["mat-dialog-content",""],["align","end"],["mat-raised-button","","mat-dialog-close",""],["mat-raised-button","","color","primary",3,"mat-dialog-close"]],template:function(s,o){s&1&&(i(0,"h1",0),r(1),c(2,"translate"),a(),i(3,"div",1)(4,"p"),r(5),c(6,"translate"),a()(),i(7,"mat-dialog-actions",2)(8,"button",3),r(9),c(10,"translate"),a(),i(11,"button",4),r(12),c(13,"translate"),a()()),s&2&&(n(),p(l(2,6,"labels.buttons.Waive Charge")),n(4),V("",l(6,8,"labels.text.Are you sure you want to waive charge with id"),": ",o.data.id," ?"),n(4),p(l(10,10,"labels.buttons.Cancel")),n(2),d("mat-dialog-close",k(14,dr)),n(),f(" ",l(13,12,"labels.buttons.Confirm")," "))},dependencies:[P,O,F,te,ee,ne,Zt,y],encapsulation:2})}}return t})();var ur=()=>({confirm:!0}),Ge=(()=>{class t{constructor(){this.dialogRef=g(Xt),this.data=g(De)}static{this.\u0275fac=function(s){return new(s||t)}}static{this.\u0275cmp=T({type:t,selectors:[["mifosx-inactivate-charge-dialog"]],decls:14,vars:15,consts:[["mat-dialog-title",""],["mat-dialog-content",""],["align","end"],["mat-raised-button","","mat-dialog-close",""],["mat-raised-button","","color","primary",3,"mat-dialog-close"]],template:function(s,o){s&1&&(i(0,"h1",0),r(1),c(2,"translate"),a(),i(3,"div",1)(4,"p"),r(5),c(6,"translate"),a()(),i(7,"mat-dialog-actions",2)(8,"button",3),r(9),c(10,"translate"),a(),i(11,"button",4),r(12),c(13,"translate"),a()()),s&2&&(n(),p(l(2,6,"tooltips.Inactivate Charge")),n(4),V("",l(6,8,"labels.text.Are you sure you want to inactivate charge with id"),": ",o.data.id," ?"),n(4),p(l(10,10,"labels.buttons.Cancel")),n(2),d("mat-dialog-close",k(14,ur)),n(),f(" ",l(13,12,"labels.buttons.Confirm")," "))},dependencies:[P,O,F,te,ee,ne,Zt,y],encapsulation:2})}}return t})();var gr=["chargesTable"],fr=t=>[t];function Cr(t,m){if(t&1){let e=D();i(0,"div",4)(1,"button",22),b("click",function(){S(e);let o=h();return M(o.toggleCharges())}),r(2),a()()}if(t&2){let e=h();n(2),f(" ",e.showInactiveCharges?e.viewAllChargeButtons("View Active Charges"):e.viewAllChargeButtons("View Inactive Charges")," ")}}function vr(t,m){t&1&&(i(0,"th",23),r(1),c(2,"translate"),a()),t&2&&(n(),p(l(2,1,"labels.inputs.Name")))}function _r(t,m){if(t&1&&(i(0,"td",24),r(1),a()),t&2){let e=m.$implicit;n(),p(e.name)}}function hr(t,m){t&1&&(i(0,"th",23),r(1),c(2,"translate"),a()),t&2&&(n(),p(l(2,1,"labels.inputs.Charge Type")))}function xr(t,m){if(t&1&&(i(0,"td",24),r(1),c(2,"translateKey"),a()),t&2){let e=m.$implicit;n(),p(e.penalty?"Penalty":Mt(2,1,"Fee","catalogs"))}}function br(t,m){t&1&&(i(0,"th",23),r(1),c(2,"translate"),a()),t&2&&(n(),p(l(2,1,"labels.inputs.Payment Due At")))}function Sr(t,m){if(t&1&&(i(0,"td",24),r(1),c(2,"translateKey"),a()),t&2){let e=m.$implicit;n(),p(Mt(2,1,e.chargeTimeType.value,"catalogs"))}}function Mr(t,m){t&1&&(i(0,"th",23),r(1),c(2,"translate"),a()),t&2&&(n(),p(l(2,1,"labels.inputs.Due As Of")))}function Ar(t,m){if(t&1&&(i(0,"td",24),r(1),c(2,"dateFormat"),a()),t&2){let e=m.$implicit;n(),p(l(2,1,e.dueDate))}}function Tr(t,m){t&1&&(i(0,"th",23),r(1),c(2,"translate"),a()),t&2&&(n(),p(l(2,1,"labels.inputs.Repeats On (M/d)")))}function Pr(t,m){if(t&1&&(i(0,"td",24),r(1),a()),t&2){let e=m.$implicit;n(),p(e.feeOnMonthDay?e.feeOnMonthDay.join("/"):"")}}function Or(t,m){t&1&&(i(0,"th",23),r(1),c(2,"translate"),a()),t&2&&(n(),p(l(2,1,"labels.inputs.Calculation Type")))}function Dr(t,m){if(t&1&&(i(0,"td",24),r(1),c(2,"translateKey"),a()),t&2){let e=m.$implicit;n(),p(Mt(2,1,e.chargeCalculationType.value,"catalogs"))}}function yr(t,m){t&1&&(i(0,"th",23),r(1),c(2,"translate"),a()),t&2&&(n(),p(l(2,1,"labels.inputs.Due")))}function Ir(t,m){if(t&1&&(i(0,"td",24),r(1),c(2,"currency"),a()),t&2){let e=m.$implicit;n(),f(" ",tt(2,1,e.amount,e.currency.code,"symbol-narrow","1.2-2")," ")}}function wr(t,m){t&1&&(i(0,"th",23),r(1),c(2,"translate"),a()),t&2&&(n(),p(l(2,1,"labels.inputs.Paid")))}function Er(t,m){if(t&1&&(i(0,"td",24),r(1),c(2,"currency"),a()),t&2){let e=m.$implicit;n(),f(" ",tt(2,1,e.amountPaid,e.currency.code,"symbol-narrow","1.2-2")," ")}}function Fr(t,m){t&1&&(i(0,"th",23),r(1),c(2,"translate"),a()),t&2&&(n(),p(l(2,1,"labels.inputs.Waived")))}function kr(t,m){if(t&1&&(i(0,"td",24),r(1),c(2,"currency"),a()),t&2){let e=m.$implicit;n(),f(" ",tt(2,1,e.amountWaived,e.currency.code,"symbol-narrow","1.2-2")," ")}}function Br(t,m){t&1&&(i(0,"th",23),r(1),c(2,"translate"),a()),t&2&&(n(),p(l(2,1,"labels.inputs.Outstanding")))}function Nr(t,m){if(t&1&&(i(0,"td",24),r(1),c(2,"currency"),a()),t&2){let e=m.$implicit;n(),f(" ",tt(2,1,e.amountOutstanding,e.currency.code,"symbol-narrow","1.2-2")," ")}}function Rr(t,m){t&1&&(i(0,"th",23),r(1),c(2,"translate"),a()),t&2&&(n(),p(l(2,1,"labels.inputs.Actions")))}function Vr(t,m){if(t&1){let e=D();i(0,"button",27),c(1,"translate"),b("click",function(o){S(e);let u=h(2).$implicit,x=h();return x.routeEdit(o),M(x.editCharge(u))}),C(2,"i",28),a()}t&2&&d("matTooltip",ft(l(1,2,"tooltips.Edit Charge")))}function Lr(t,m){if(t&1){let e=D();i(0,"button",29),c(1,"translate"),b("click",function(o){S(e);let u=h(2).$implicit,x=h();return x.routeEdit(o),M(x.deleteCharge(u.id))}),C(2,"i",30),a()}t&2&&d("matTooltip",ft(l(1,2,"tooltips.Delete Charge")))}function Gr(t,m){t&1&&(i(0,"span"),A(1,Vr,3,4,"button",25)(2,Lr,3,4,"button",26),a()),t&2&&(n(),d("mifosxHasPermission","UPDATE_SAVINGSACCOUNTCHARGE"),n(),d("mifosxHasPermission","DELETE_SAVINGSACCOUNTCHARGE"))}function Ur(t,m){if(t&1){let e=D();i(0,"button",27),c(1,"translate"),b("click",function(o){S(e);let u=h(2).$implicit,x=h();return x.routeEdit(o),M(x.payCharge(u.id))}),C(2,"i",32),a()}t&2&&d("matTooltip",ft(l(1,2,"tooltips.Pay Charge")))}function qr(t,m){if(t&1){let e=D();i(0,"button",27),c(1,"translate"),b("click",function(o){S(e);let u=h(2).$implicit,x=h();return x.routeEdit(o),M(x.waiveCharge(u.id))}),C(2,"i",33),a()}t&2&&d("matTooltip",ft(l(1,2,"tooltips.Waive Charge")))}function Hr(t,m){if(t&1){let e=D();i(0,"button",27),c(1,"translate"),b("click",function(o){S(e);let u=h(3).$implicit,x=h();return x.routeEdit(o),M(x.inactivateCharge(u.id))}),C(2,"i",34),a()}t&2&&d("matTooltip",ft(l(1,2,"tooltips.Inactivate Charge")))}function zr(t,m){t&1&&A(0,Hr,3,4,"button",25),t&2&&d("mifosxHasPermission","INACTIVATE_SAVINGSACCOUNTCHARGE")}function jr(t,m){if(t&1&&(i(0,"span"),A(1,Ur,3,4,"button",25)(2,qr,3,4,"button",25),v(3,zr,1,1,"button",31),a()),t&2){let e=h().$implicit,s=h();n(),d("mifosxHasPermission","PAY_SAVINGSACCOUNTCHARGE"),n(),d("mifosxHasPermission","WAIVE_SAVINGSACCOUNTCHARGE"),n(),_(s.isRecurringCharge(e)?3:-1)}}function $r(t,m){if(t&1&&(i(0,"td",24),v(1,Gr,3,2,"span"),v(2,jr,4,3,"span"),a()),t&2){let e=m.$implicit,s=h();n(),_(s.savingsAccountData.status.value==="Submitted and pending approval"?1:-1),n(),_(s.savingsAccountData.status.value==="Active"&&e.amountOutstanding!==0?2:-1)}}function Wr(t,m){t&1&&C(0,"tr",35)}function Qr(t,m){if(t&1&&C(0,"tr",36),t&2){let e=m.$implicit;d("routerLink",kt(1,fr,e.id))}}var Fn=(()=>{class t{constructor(){this.savingsService=g(I),this.route=g(E),this.dateUtils=g(j),this.router=g(z),this.dialog=g(yt),this.settingsService=g(U),this.translateService=g(ge),this.showInactiveCharges=!1,this.displayedColumns=["name","feeOrPenalty","paymentDueAt","dueAsOf","repeatsOn","calculationType","due","paid","waived","outstanding","actions"],this.route.parent.data.subscribe(e=>{this.savingsAccountData=e.savingsAccountData,this.chargesData=this.savingsAccountData.charges})}ngOnInit(){let e=this.chargesData?this.chargesData.filter(s=>s.isActive):[];this.dataSource=new Jt(e)}toggleCharges(){if(this.showInactiveCharges=!this.showInactiveCharges,this.showInactiveCharges){let e=this.chargesData.filter(s=>!s.isActive);this.dataSource.data=e}else{let e=this.chargesData.filter(s=>s.isActive);this.dataSource.data=e}this.chargesTableRef.renderRows()}payCharge(e){let s=[new pe({controlName:"amount",label:"Amount",value:"",type:"number",required:!0}),new Ne({controlName:"dueDate",label:"Payment Date",value:"",type:"date",required:!0})],o={title:`Pay Charge ${e}`,layout:{addButtonText:"Confirm"},formfields:s};this.dialog.open(se,{data:o}).afterClosed().subscribe(x=>{if(x.data){let B=this.settingsService.language.code,Yt=this.settingsService.dateFormat,Ue=Q(G({},x.data.value),{dueDate:this.dateUtils.formatDate(x.data.value.dueDate,Yt),dateFormat:Yt,locale:B});this.savingsService.executeSavingsAccountChargesCommand(this.savingsAccountData.id,"paycharge",Ue,e).subscribe(()=>{this.reload()})}})}waiveCharge(e){this.dialog.open(Le,{data:{id:e}}).afterClosed().subscribe(o=>{o.confirm&&this.savingsService.executeSavingsAccountChargesCommand(this.savingsAccountData.id,"waive",{},e).subscribe(()=>{this.reload()})})}inactivateCharge(e){this.dialog.open(Ge,{data:{id:e}}).afterClosed().subscribe(o=>{o.confirm&&this.savingsService.executeSavingsAccountChargesCommand(this.savingsAccountData.id,"inactivate",{},e).subscribe(()=>{this.reload()})})}editCharge(e){let s=[new pe({controlName:"amount",label:"Amount",value:e.amount||e.amountOrPercentage,type:"number",required:!0})],o={title:`Edit Charge ${e.id}`,layout:{addButtonText:"Confirm"},formfields:s};this.dialog.open(se,{data:o}).afterClosed().subscribe(x=>{if(x.data){let B=this.settingsService.language.code,Yt=this.settingsService.dateFormat,Ue=Q(G({},x.data.value),{dateFormat:Yt,locale:B});this.savingsService.editSavingsAccountCharge(this.savingsAccountData.id,Ue,e.id).subscribe(()=>{this.reload()})}})}deleteCharge(e){this.dialog.open(ve,{data:{deleteContext:`charge id:${e}`}}).afterClosed().subscribe(o=>{o.delete&&this.savingsService.deleteSavingsAccountCharge(this.savingsAccountData.id,e).subscribe(()=>{this.reload()})})}isRecurringCharge(e){return e.chargeTimeType.value==="Monthly Fee"||e.chargeTimeType.value==="Annual Fee"||e.chargeTimeType.value==="Weekly Fee"}routeEdit(e){e.stopPropagation()}reload(){let e=this.router.url,s=this.router.url.slice(0,this.router.url.indexOf("savings-accounts")+16);this.router.navigateByUrl(s,{skipLocationChange:!0}).then(()=>this.router.navigate([e]))}viewAllChargeButtons(e){return this.translateService.instant("labels.buttons."+e)}static{this.\u0275fac=function(s){return new(s||t)}}static{this.\u0275cmp=T({type:t,selectors:[["mifosx-charges-tab"]],viewQuery:function(s,o){if(s&1&&Pt(gr,7),s&2){let u;Ot(u=Dt())&&(o.chargesTableRef=u.first)}},decls:45,vars:7,consts:[["chargesTable",""],[1,"tab-container","mat-typography"],[1,"layout-row","align-start"],[1,"m-b-10"],[1,"action-button","m-b-20"],[1,"mat-elevation-z1","m-b-25"],["mat-table","",3,"dataSource"],["matColumnDef","name"],["mat-header-cell","",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","feeOrPenalty"],["matColumnDef","paymentDueAt"],["matColumnDef","dueAsOf"],["matColumnDef","repeatsOn"],["matColumnDef","calculationType"],["matColumnDef","due"],["matColumnDef","paid"],["matColumnDef","waived"],["matColumnDef","outstanding"],["matColumnDef","actions"],["mat-header-row","",4,"matHeaderRowDef"],["mat-row","","class","select-row",3,"routerLink",4,"matRowDef","matRowDefColumns"],["mat-raised-button","","color","primary",3,"click"],["mat-header-cell",""],["mat-cell",""],["class","account-action-button","mat-raised-button","","color","primary",3,"matTooltip","click",4,"mifosxHasPermission"],["class","account-action-button","mat-raised-button","","color","warn",3,"matTooltip","click",4,"mifosxHasPermission"],["mat-raised-button","","color","primary",1,"account-action-button",3,"click","matTooltip"],[1,"fa","fa-pencil"],["mat-raised-button","","color","warn",1,"account-action-button",3,"click","matTooltip"],[1,"fa","fa-trash"],["mat-raised-button","","color","primary",1,"account-action-button",3,"matTooltip"],[1,"fa","fa-dollar"],[1,"fa","fa-flag"],[1,"fa","fa-ban"],["mat-header-row",""],["mat-row","",1,"select-row",3,"routerLink"]],template:function(s,o){s&1&&(i(0,"div",1)(1,"div",2)(2,"div",3)(3,"h3"),r(4),c(5,"translate"),a()(),v(6,Cr,3,1,"div",4),a(),i(7,"div",5)(8,"table",6,0),N(10,7),A(11,vr,3,3,"th",8)(12,_r,2,1,"td",9),R(),N(13,10),A(14,hr,3,3,"th",8)(15,xr,3,4,"td",9),R(),N(16,11),A(17,br,3,3,"th",8)(18,Sr,3,4,"td",9),R(),N(19,12),A(20,Mr,3,3,"th",8)(21,Ar,3,3,"td",9),R(),N(22,13),A(23,Tr,3,3,"th",8)(24,Pr,2,1,"td",9),R(),N(25,14),A(26,Or,3,3,"th",8)(27,Dr,3,4,"td",9),R(),N(28,15),A(29,yr,3,3,"th",8)(30,Ir,3,6,"td",9),R(),N(31,16),A(32,wr,3,3,"th",8)(33,Er,3,6,"td",9),R(),N(34,17),A(35,Fr,3,3,"th",8)(36,kr,3,6,"td",9),R(),N(37,18),A(38,Br,3,3,"th",8)(39,Nr,3,6,"td",9),R(),N(40,19),A(41,Rr,3,3,"th",8)(42,$r,3,2,"td",9),R(),A(43,Wr,1,0,"tr",20)(44,Qr,1,3,"tr",21),a()()()),s&2&&(n(4),p(l(5,5,"labels.inputs.Charges")),n(2),_(o.chargesData?6:-1),n(2),d("dataSource",o.dataSource),n(35),d("matHeaderRowDef",o.displayedColumns),n(),d("matRowDefColumns",o.displayedColumns))},dependencies:[P,O,q,F,Rt,Lt,qt,Ut,Ht,Gt,zt,fe,jt,Wt,$t,Qt,ue,Bt,y,Nt],styles:[".tab-container[_ngcontent-%COMP%]{padding:1%;margin:1%}.tab-container[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{margin:1% auto}.tab-container[_ngcontent-%COMP%] .action-button[_ngcontent-%COMP%]{margin-left:auto}.tab-container[_ngcontent-%COMP%] table[_ngcontent-%COMP%]{width:100%}.tab-container[_ngcontent-%COMP%] table[_ngcontent-%COMP%] .account-action-button[_ngcontent-%COMP%]{min-width:26px;padding:0 6px;margin:4px;line-height:25px}.tab-container[_ngcontent-%COMP%] table[_ngcontent-%COMP%] .select-row[_ngcontent-%COMP%]:hover{cursor:pointer}"]})}}return t})();var Kr=["instructionsTable"];function Yr(t,m){t&1&&(i(0,"th",16),r(1),c(2,"translate"),a()),t&2&&(n(),p(l(2,1,"labels.inputs.Client")))}function Jr(t,m){if(t&1&&(i(0,"td",17),r(1),a()),t&2){let e=m.$implicit;n(),V(" ",e.fromClient.displayName,"-",e.fromClient.id," ")}}function Xr(t,m){t&1&&(i(0,"th",16),r(1),c(2,"translate"),a()),t&2&&(n(),p(l(2,1,"labels.inputs.From Account")))}function Zr(t,m){if(t&1&&(i(0,"td",17),r(1),a()),t&2){let e=m.$implicit;n(),V(" ",e.fromAccount.accountNo," (",e.fromAccountType.value,") ")}}function tc(t,m){t&1&&(i(0,"th",16),r(1),c(2,"translate"),a()),t&2&&(n(),p(l(2,1,"labels.inputs.Beneficiary")))}function ec(t,m){if(t&1&&(i(0,"td",17),r(1),a()),t&2){let e=m.$implicit;n(),p(e.toClient.displayName)}}function nc(t,m){t&1&&(i(0,"th",16),r(1),c(2,"translate"),a()),t&2&&(n(),p(l(2,1,"labels.inputs.To Account")))}function ic(t,m){if(t&1&&(i(0,"td",17),r(1),a()),t&2){let e=m.$implicit;n(),V(" ",e.toAccount.accountNo," (",e.toAccountType.value,") ")}}function ac(t,m){t&1&&(i(0,"th",16),r(1),c(2,"translate"),a()),t&2&&(n(),p(l(2,1,"labels.inputs.Amount")))}function oc(t,m){if(t&1&&(i(0,"td",17),r(1),a()),t&2){let e=m.$implicit;n(),V("",e.instructionType.value,"/",e.amount)}}function rc(t,m){t&1&&(i(0,"th",16),r(1),c(2,"translate"),a()),t&2&&(n(),p(l(2,1,"labels.inputs.Validity")))}function cc(t,m){if(t&1&&(i(0,"td",17),r(1),c(2,"dateFormat"),c(3,"translate"),c(4,"dateFormat"),a()),t&2){let e=m.$implicit;n(),Pe(" ",l(2,3,e.validFrom)," ",l(3,5,"labels.inputs.To")," ",l(4,7,e.validTill)," ")}}function sc(t,m){t&1&&(i(0,"th",16),r(1),c(2,"translate"),a()),t&2&&(n(),p(l(2,1,"labels.inputs.Actions")))}function lc(t,m){t&1&&(i(0,"button",19),c(1,"translate"),C(2,"i",20),a()),t&2&&d("matTooltip",ft(l(1,2,"tooltips.Edit Standing Instruction")))}function mc(t,m){t&1&&(i(0,"span"),A(1,lc,3,4,"button",18),a()),t&2&&(n(),d("mifosxHasPermission","UPDATE_STANDINGINSTRUCTION"))}function pc(t,m){if(t&1){let e=D();i(0,"button",22),c(1,"translate"),b("click",function(){S(e);let o=h(2).$implicit,u=h();return M(u.deleteStandingInstruction(o.id))}),C(2,"i",23),a()}t&2&&d("matTooltip",ft(l(1,2,"tooltips.Delete Standing Instruction")))}function dc(t,m){t&1&&(i(0,"span"),A(1,pc,3,4,"button",21),a()),t&2&&(n(),d("mifosxHasPermission","DELETE_STANDINGINSTRUCTION"))}function uc(t,m){t&1&&(i(0,"button",19),c(1,"translate"),C(2,"i",24),a()),t&2&&d("matTooltip",ft(l(1,2,"tooltips.View Standing Instruction")))}function gc(t,m){if(t&1&&(i(0,"td",17),v(1,mc,2,1,"span"),v(2,dc,2,1,"span"),A(3,uc,3,4,"button",18),a()),t&2){let e=m.$implicit;n(),_(e.status.value!=="Deleted"?1:-1),n(),_(e.status.value!=="Deleted"?2:-1),n(),d("mifosxHasPermission","READ_STANDINGINSTRUCTION")}}function fc(t,m){t&1&&C(0,"tr",25)}function Cc(t,m){t&1&&C(0,"tr",26)}var kn=(()=>{class t{constructor(){this.route=g(E),this.savingsService=g(I),this.dialog=g(yt),this.accountTransfersService=g(Gi),this.settingsService=g(U),this.dataSource=new Jt,this.displayedColumns=["client","fromAccount","beneficiary","toAccount","amount","validity","actions"],this.route.parent.data.subscribe(e=>{this.savingsData=e.savingsAccountData})}ngOnInit(){this.getStandingInstructions()}getStandingInstructions(){let e=this.savingsData.clientId,s=this.savingsData.clientName,o=this.savingsData.id,u=this.settingsService.language.code,x=this.settingsService.dateFormat;this.savingsService.getStandingInstructions(e,s,o,u,x).subscribe(B=>{this.instructionsData=B.pageItems,this.dataSource.data=this.instructionsData,this.instructionTableRef.renderRows()})}deleteStandingInstruction(e){this.dialog.open(ve,{data:{deleteContext:`standing instruction id: ${e}`}}).afterClosed().subscribe(o=>{o.delete&&this.accountTransfersService.deleteStandingInstrucions(e).subscribe(()=>{})})}static{this.\u0275fac=function(s){return new(s||t)}}static{this.\u0275cmp=T({type:t,selectors:[["mifosx-standing-instructions-tab"]],viewQuery:function(s,o){if(s&1&&Pt(Kr,7),s&2){let u;Ot(u=Dt())&&(o.instructionTableRef=u.first)}},decls:31,vars:6,consts:[["instructionsTable",""],[1,"tab-container","mat-typography"],[1,"m-b-10"],[1,"mat-elevation-z1","m-b-25"],["mat-table","",3,"dataSource"],["matColumnDef","client"],["mat-header-cell","",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","fromAccount"],["matColumnDef","beneficiary"],["matColumnDef","toAccount"],["matColumnDef","amount"],["matColumnDef","validity"],["matColumnDef","actions"],["mat-header-row","",4,"matHeaderRowDef"],["mat-row","",4,"matRowDef","matRowDefColumns"],["mat-header-cell",""],["mat-cell",""],["class","account-action-button","mat-raised-button","","color","primary",3,"matTooltip",4,"mifosxHasPermission"],["mat-raised-button","","color","primary",1,"account-action-button",3,"matTooltip"],[1,"fa","fa-edit"],["class","account-action-button","mat-raised-button","","color","warn",3,"matTooltip","click",4,"mifosxHasPermission"],["mat-raised-button","","color","warn",1,"account-action-button",3,"click","matTooltip"],[1,"fa","fa-times"],[1,"fa","fa-eye"],["mat-header-row",""],["mat-row",""]],template:function(s,o){s&1&&(i(0,"div",1)(1,"div",2)(2,"h3"),r(3),c(4,"translate"),a()(),i(5,"div",3)(6,"table",4,0),N(8,5),A(9,Yr,3,3,"th",6)(10,Jr,2,2,"td",7),R(),N(11,8),A(12,Xr,3,3,"th",6)(13,Zr,2,2,"td",7),R(),N(14,9),A(15,tc,3,3,"th",6)(16,ec,2,1,"td",7),R(),N(17,10),A(18,nc,3,3,"th",6)(19,ic,2,2,"td",7),R(),N(20,11),A(21,ac,3,3,"th",6)(22,oc,2,2,"td",7),R(),N(23,12),A(24,rc,3,3,"th",6)(25,cc,5,9,"td",7),R(),N(26,13),A(27,sc,3,3,"th",6)(28,gc,4,3,"td",7),R(),A(29,fc,1,0,"tr",14)(30,Cc,1,0,"tr",15),a()()()),s&2&&(n(3),p(l(4,4,"labels.heading.All Standing Instructions")),n(3),d("dataSource",o.dataSource),n(23),d("matHeaderRowDef",o.displayedColumns),n(),d("matRowDefColumns",o.displayedColumns))},dependencies:[P,O,F,Rt,Lt,qt,Ut,Ht,Gt,zt,fe,jt,Wt,$t,Qt,Bt,y],styles:[".tab-container[_ngcontent-%COMP%]{padding:1%;margin:1%}.tab-container[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{margin:1% auto}.tab-container[_ngcontent-%COMP%] .action-button[_ngcontent-%COMP%]{margin-left:auto}.tab-container[_ngcontent-%COMP%] table[_ngcontent-%COMP%]{width:100%}.tab-container[_ngcontent-%COMP%] table[_ngcontent-%COMP%] .account-action-button[_ngcontent-%COMP%]{min-width:26px;padding:0 6px;margin:4px;line-height:25px}"]})}}return t})();var Bn=(()=>{class t{constructor(){this.route=g(E),this.entityId=this.route.parent.parent.snapshot.paramMap.get("savingAccountId"),this.route.data.subscribe(e=>{this.entityDatatable=e.savingsDatatable,this.multiRowDatatableFlag=this.entityDatatable.columnHeaders[0].columnName==="id"})}static{this.\u0275fac=function(s){return new(s||t)}}static{this.\u0275cmp=T({type:t,selectors:[["mifosx-datatable-tabs"]],decls:2,vars:3,consts:[[1,"tab-container","mat-typography"],["entityType","Savings",3,"entityId","multiRowDatatableFlag","entityDatatable"]],template:function(s,o){s&1&&(i(0,"div",0),C(1,"mifosx-entity-datatable-tab",1),a()),s&2&&(n(),d("entityId",o.entityId)("multiRowDatatableFlag",o.multiRowDatatableFlag)("entityDatatable",o.entityDatatable))},dependencies:[P,O,pn],encapsulation:2})}}return t})();function vc(t,m){if(t&1&&(i(0,"mat-option",5),r(1),a()),t&2){let e=m.$implicit;d("value",e.id),n(),f(" ",e.name," ")}}function _c(t,m){if(t&1){let e=D();i(0,"mat-form-field",11),b("click",function(){S(e);let o=w(7);return M(o.open())}),i(1,"mat-label"),r(2),c(3,"translate"),a(),C(4,"input",12)(5,"mat-datepicker-toggle",13)(6,"mat-datepicker",null,0),i(8,"mat-error"),r(9),c(10,"translate"),c(11,"translate"),i(12,"strong"),r(13),c(14,"translate"),a()()()}if(t&2){let e=w(7),s=h();n(2),p(l(3,8,"labels.inputs.Submitted On")),n(2),d("min",s.minDate)("max",s.maxDate)("matDatepicker",e),n(),d("for",e),n(4),V(" ",l(10,10,"labels.inputs.Submitted On")," ",l(11,12,"labels.commons.is")," "),n(4),p(l(14,14,"labels.commons.required"))}}function hc(t,m){if(t&1&&(i(0,"mat-option",5),r(1),a()),t&2){let e=m.$implicit;d("value",e.id),n(),f(" ",e.displayName," ")}}function xc(t,m){if(t&1&&(i(0,"mat-form-field",3)(1,"mat-label"),r(2),c(3,"translate"),a(),i(4,"mat-select",14),ut(5,hc,2,2,"mat-option",5,dt),a()()),t&2){let e=h();n(2),p(l(3,1,"labels.inputs.Field Officer")),n(3),gt(e.fieldOfficerData)}}function bc(t,m){t&1&&(i(0,"mat-form-field",3)(1,"mat-label"),r(2),c(3,"translate"),a(),C(4,"input",15),a()),t&2&&(n(2),p(l(3,1,"labels.inputs.External ID")))}var oe=(()=>{class t{constructor(){this.formBuilder=g(rt),this.savingsService=g(I),this.settingsService=g(U),this.minDate=new Date(2e3,0,1),this.maxDate=new Date,this.isFieldOfficerPatched=!1,this.savingsProductSelected=!1,this.savingsAccountProductTemplate=new We,this.createSavingsAccountDetailsForm()}ngOnInit(){this.maxDate=this.settingsService.businessDate,this.buildDependencies(),this.savingsAccountTemplate&&(this.productData=this.savingsAccountTemplate.productOptions,this.savingsAccountTemplate.savingsProductId?this.savingsAccountDetailsForm.patchValue({productId:this.savingsAccountTemplate.savingsProductId,submittedOnDate:this.savingsAccountTemplate.timeline.submittedOnDate&&new Date(this.savingsAccountTemplate.timeline.submittedOnDate),externalId:this.savingsAccountTemplate.externalId}):this.savingsAccountDetailsForm.patchValue({submittedOnDate:new Date}))}createSavingsAccountDetailsForm(){this.savingsAccountDetailsForm=this.formBuilder.group({productId:["",H.required],submittedOnDate:["",H.required],fieldOfficerId:[""],externalId:[""]})}buildDependencies(){let e=this.savingsAccountTemplate.groupId||this.savingsAccountTemplate.clientId;this.savingsAccountDetailsForm.get("productId").valueChanges.subscribe(s=>{this.savingsService.getSavingsAccountTemplate(e,s,!!this.savingsAccountTemplate.groupId).subscribe(o=>{this.savingsAccountProductTemplate.emit(o),this.fieldOfficerData=o.fieldOfficerOptions,this.savingsProductSelected=!0,!this.isFieldOfficerPatched&&this.savingsAccountTemplate.fieldOfficerId?(this.savingsAccountDetailsForm.get("fieldOfficerId").patchValue(this.savingsAccountTemplate.fieldOfficerId),this.isFieldOfficerPatched=!0):this.savingsAccountDetailsForm.get("fieldOfficerId").patchValue("")})})}get savingsAccountDetails(){return this.savingsAccountDetailsForm.getRawValue()}static{this.\u0275fac=function(s){return new(s||t)}}static{this.\u0275cmp=T({type:t,selectors:[["mifosx-savings-account-details-step"]],inputs:{savingsAccountTemplate:"savingsAccountTemplate"},outputs:{savingsAccountProductTemplate:"savingsAccountProductTemplate"},decls:28,vars:23,consts:[["submittedOnDatePicker",""],[3,"formGroup"],[1,"layout-row-wrap","gap-2px","responsive-column"],[1,"flex-48"],["formControlName","productId","required",""],[3,"value"],[1,"layout-row","align-center","gap-2percent","margin-t","responsive-column"],["mat-raised-button","","matStepperPrevious","","disabled",""],["icon","arrow-left",1,"m-r-10"],["mat-raised-button","","matStepperNext","",3,"disabled"],["icon","arrow-right",1,"m-l-10"],[1,"flex-48",3,"click"],["matInput","","formControlName","submittedOnDate","required","",3,"min","max","matDatepicker"],["matSuffix","",3,"for"],["formControlName","fieldOfficerId"],["matInput","","formControlName","externalId"]],template:function(s,o){s&1&&(i(0,"form",1)(1,"div",2)(2,"mat-form-field",3)(3,"mat-label"),r(4),c(5,"translate"),a(),i(6,"mat-select",4),ut(7,vc,2,2,"mat-option",5,dt),a(),i(9,"mat-error"),r(10),c(11,"translate"),c(12,"translate"),i(13,"strong"),r(14),c(15,"translate"),a()()(),v(16,_c,15,16,"mat-form-field",3),v(17,xc,7,3,"mat-form-field",3),v(18,bc,5,3,"mat-form-field",3),a(),i(19,"div",6)(20,"button",7),C(21,"fa-icon",8),r(22),c(23,"translate"),a(),i(24,"button",9),r(25),c(26,"translate"),C(27,"fa-icon",10),a()()()),s&2&&(d("formGroup",o.savingsAccountDetailsForm),n(4),p(l(5,11,"labels.inputs.Product Name")),n(3),gt(o.productData),n(3),V(" ",l(11,13,"labels.inputs.Product Name")," ",l(12,15,"labels.commons.is")," "),n(4),p(l(15,17,"labels.commons.required")),n(2),_(o.savingsProductSelected?16:-1),n(),_(o.savingsProductSelected?17:-1),n(),_(o.savingsProductSelected?18:-1),n(4),f(" ",l(23,19,"labels.buttons.Previous")," "),n(2),d("disabled",o.savingsAccountDetailsForm.invalid),n(),f(" ",l(26,21,"labels.buttons.Next")," "))},dependencies:[P,O,it,et,K,nt,lt,at,ot,Z,X,mt,vt,st,wt,It,ht,xt,_t,F,le,St,_e,y],encapsulation:2})}}return t})();function Sc(t,m){if(t&1&&(i(0,"mat-option",7),r(1),c(2,"translateKey"),a()),t&2){let e=m.$implicit;d("value",e.id),n(),f(" ",Mt(2,2,e.value,"catalogs")," ")}}function Mc(t,m){if(t&1&&(i(0,"mat-option",7),r(1),c(2,"translateKey"),a()),t&2){let e=m.$implicit;d("value",e.id),n(),f(" ",Mt(2,2,e.value,"catalogs")," ")}}function Ac(t,m){if(t&1&&(i(0,"mat-option",7),r(1),c(2,"translateKey"),a()),t&2){let e=m.$implicit;d("value",e.id),n(),f(" ",Mt(2,2,e.value,"catalogs")," ")}}function Tc(t,m){if(t&1&&(i(0,"mat-option",7),r(1),c(2,"translateKey"),a()),t&2){let e=m.$implicit;d("value",e.id),n(),f(" ",Mt(2,2,e.value,"catalogs")," ")}}function Pc(t,m){if(t&1&&(i(0,"mat-option",7),r(1),c(2,"translateKey"),a()),t&2){let e=m.$implicit;d("value",e.id),n(),f(" ",Mt(2,2,e.value,"catalogs")," ")}}function Oc(t,m){t&1&&(i(0,"div",19)(1,"mat-form-field",27)(2,"mat-label"),r(3),c(4,"translate"),a(),C(5,"input",28),a(),i(6,"mat-form-field",27)(7,"mat-label"),r(8),c(9,"translate"),a(),C(10,"input",29),a(),i(11,"mat-form-field",27)(12,"mat-label"),r(13),c(14,"translate"),a(),C(15,"input",30),a()()),t&2&&(n(3),p(l(4,3,"labels.inputs.Minimum Overdraft Required for Interest Calculation")),n(5),p(l(9,5,"labels.inputs.Nominal Annual Interest for Overdraft")),n(5),p(l(14,7,"labels.inputs.Maximum Overdraft Amount Limit")))}function Dc(t,m){t&1&&(i(0,"mat-form-field",2)(1,"mat-label"),r(2),c(3,"translate"),a(),C(4,"input",31),a()),t&2&&(n(2),p(l(3,1,"labels.inputs.Balance Required for Interest Calculation")))}var re=(()=>{class t{constructor(){this.formBuilder=g(rt),this.settingsService=g(U),this.minDate=new Date(2e3,0,1),this.maxDate=new Date,this.createSavingsAccountTermsForm(),this.buildDependencies()}ngOnChanges(){this.savingsAccountProductTemplate&&(this.savingsAccountTermsForm.patchValue({currencyCode:this.savingsAccountProductTemplate.currency.code,decimal:this.savingsAccountProductTemplate.currency.decimalPlaces,minBalanceForInterestCalculation:this.savingsAccountProductTemplate.minBalanceForInterestCalculation,nominalAnnualInterestRate:this.savingsAccountProductTemplate.nominalAnnualInterestRate,interestCompoundingPeriodType:this.savingsAccountProductTemplate.interestCompoundingPeriodType.id,interestPostingPeriodType:this.savingsAccountProductTemplate.interestPostingPeriodType.id,interestCalculationType:this.savingsAccountProductTemplate.interestCalculationType.id,interestCalculationDaysInYearType:this.savingsAccountProductTemplate.interestCalculationDaysInYearType.id,minRequiredOpeningBalance:this.savingsAccountProductTemplate.minRequiredOpeningBalance,allowOverdraft:this.savingsAccountProductTemplate.allowOverdraft,overdraftLimit:this.savingsAccountProductTemplate.overdraftLimit,enforceMinRequiredBalance:this.savingsAccountProductTemplate.enforceMinRequiredBalance,minOverdraftForInterestCalculation:this.savingsAccountProductTemplate.minOverdraftForInterestCalculation,nominalAnnualInterestRateOverdraft:this.savingsAccountProductTemplate.nominalAnnualInterestRateOverdraft,minRequiredBalance:this.savingsAccountProductTemplate.minRequiredBalance,withdrawalFeeForTransfers:this.savingsAccountProductTemplate.withdrawalFeeForTransfers}),this.setOptions())}ngOnInit(){this.maxDate=this.settingsService.businessDate,this.savingsAccountTemplate&&this.savingsAccountTermsForm.patchValue({nominalAnnualInterestRate:this.savingsAccountTemplate.nominalAnnualInterestRate,interestCompoundingPeriodType:this.savingsAccountTemplate.interestCompoundingPeriodType.id,interestPostingPeriodType:this.savingsAccountTemplate.interestPostingPeriodType.id,interestCalculationType:this.savingsAccountTemplate.interestCalculationType.id,interestCalculationDaysInYearType:this.savingsAccountTemplate.interestCalculationDaysInYearType.id,minRequiredOpeningBalance:this.savingsAccountTemplate.minRequiredOpeningBalance,withdrawalFeeForTransfers:this.savingsAccountTemplate.withdrawalFeeForTransfers,lockinPeriodFrequency:this.savingsAccountTemplate.lockinPeriodFrequency,lockinPeriodFrequencyType:this.savingsAccountTemplate.lockinPeriodFrequencyType&&this.savingsAccountTemplate.lockinPeriodFrequencyType.id,allowOverdraft:this.savingsAccountTemplate.allowOverdraft,enforceMinRequiredBalance:this.savingsAccountTemplate.enforceMinRequiredBalance,minRequiredBalance:this.savingsAccountTemplate.minRequiredBalance})}createSavingsAccountTermsForm(){this.savingsAccountTermsForm=this.formBuilder.group({currencyCode:[{value:"",disabled:!0}],decimal:[{value:"",disabled:!0}],nominalAnnualInterestRate:["",H.required],interestCompoundingPeriodType:["",H.required],interestPostingPeriodType:["",H.required],interestCalculationType:["",H.required],interestCalculationDaysInYearType:["",H.required],minRequiredOpeningBalance:[""],withdrawalFeeForTransfers:[!1],lockinPeriodFrequency:[""],lockinPeriodFrequencyType:[""],allowOverdraft:[!1],enforceMinRequiredBalance:[!1],minRequiredBalance:[""],minBalanceForInterestCalculation:[{value:"",disabled:!0}]})}setOptions(){this.lockinPeriodFrequencyTypeData=this.savingsAccountProductTemplate.lockinPeriodFrequencyTypeOptions,this.interestCompoundingPeriodTypeData=this.savingsAccountProductTemplate.interestCompoundingPeriodTypeOptions,this.interestPostingPeriodTypeData=this.savingsAccountProductTemplate.interestPostingPeriodTypeOptions,this.interestCalculationTypeData=this.savingsAccountProductTemplate.interestCalculationTypeOptions,this.interestCalculationDaysInYearTypeData=this.savingsAccountProductTemplate.interestCalculationDaysInYearTypeOptions}buildDependencies(){this.savingsAccountTermsForm.get("allowOverdraft").valueChanges.subscribe(e=>{e?(this.savingsAccountTermsForm.addControl("minOverdraftForInterestCalculation",new Ct("")),this.savingsAccountTermsForm.addControl("nominalAnnualInterestRateOverdraft",new Ct("")),this.savingsAccountTermsForm.addControl("overdraftLimit",new Ct(""))):(this.savingsAccountTermsForm.removeControl("minOverdraftForInterestCalculation"),this.savingsAccountTermsForm.removeControl("nominalAnnualInterestRateOverdraft"),this.savingsAccountTermsForm.removeControl("overdraftLimit"))})}get savingsAccountTerms(){let e=this.savingsAccountTermsForm.getRawValue();return delete e.currencyCode,delete e.decimal,delete e.minBalanceForInterestCalculation,e}static{this.\u0275fac=function(s){return new(s||t)}}static{this.\u0275cmp=T({type:t,selectors:[["mifosx-savings-account-terms-step"]],inputs:{savingsAccountProductTemplate:"savingsAccountProductTemplate",savingsAccountTemplate:"savingsAccountTemplate"},features:[Te],decls:130,vars:102,consts:[[3,"formGroup"],[1,"layout-row-wrap","gap-2percent","responsive-column","align-start-center"],[1,"flex-48"],["matInput","","formControlName","currencyCode"],["type","number","matInput","","formControlName","decimal"],["type","number","matInput","","formControlName","nominalAnnualInterestRate","required",""],["formControlName","interestCompoundingPeriodType","required",""],[3,"value"],["formControlName","interestPostingPeriodType","required",""],["formControlName","interestCalculationType","required",""],["formControlName","interestCalculationDaysInYearType","required",""],["type","number","matInput","","formControlName","minRequiredOpeningBalance"],["labelPosition","before","formControlName","withdrawalFeeForTransfers",1,"margin-v","flex-48"],[1,"mat-h4","flex-98"],["type","number","matInput","","formControlName","lockinPeriodFrequency"],["formControlName","lockinPeriodFrequencyType"],[1,"flex-98"],[1,"mat-h3","flex-23"],["labelPosition","before","formControlName","allowOverdraft",1,"flex-73","margin-b"],[1,"flex-fill","layout-row-wrap","gap-2percent","responsive-column"],["labelPosition","before","formControlName","enforceMinRequiredBalance",1,"margin-v","flex-48"],["type","number","matInput","","formControlName","minRequiredBalance"],[1,"layout-row","align-center","gap-2percent","margin-t","responsive-column"],["mat-raised-button","","matStepperPrevious",""],["icon","arrow-left",1,"m-r-10"],["mat-raised-button","","matStepperNext",""],["icon","arrow-right",1,"m-l-10"],[1,"flex-31"],["type","number","matInput","","formControlName","minOverdraftForInterestCalculation"],["type","number","matInput","","formControlName","nominalAnnualInterestRateOverdraft"],["type","number","matInput","","formControlName","overdraftLimit"],["type","number","matInput","","formControlName","minBalanceForInterestCalculation"]],template:function(s,o){s&1&&(i(0,"form",0)(1,"div",1)(2,"mat-form-field",2)(3,"mat-label"),r(4),c(5,"translate"),a(),C(6,"input",3),a(),i(7,"mat-form-field",2)(8,"mat-label"),r(9),c(10,"translate"),a(),C(11,"input",4),a(),i(12,"mat-form-field",2)(13,"mat-label"),r(14),c(15,"translate"),a(),C(16,"input",5),i(17,"mat-error"),r(18),c(19,"translate"),c(20,"translate"),i(21,"strong"),r(22),c(23,"translate"),a()()(),i(24,"mat-form-field",2)(25,"mat-label"),r(26),c(27,"translate"),a(),i(28,"mat-select",6),ut(29,Sc,3,5,"mat-option",7,dt),a(),i(31,"mat-error"),r(32),c(33,"translate"),c(34,"translate"),i(35,"strong"),r(36),c(37,"translate"),a()()(),i(38,"mat-form-field",2)(39,"mat-label"),r(40),c(41,"translate"),a(),i(42,"mat-select",8),ut(43,Mc,3,5,"mat-option",7,dt),a(),i(45,"mat-error"),r(46),c(47,"translate"),c(48,"translate"),i(49,"strong"),r(50),c(51,"translate"),a()()(),i(52,"mat-form-field",2)(53,"mat-label"),r(54),c(55,"translate"),a(),i(56,"mat-select",9),ut(57,Ac,3,5,"mat-option",7,dt),a(),i(59,"mat-error"),r(60),c(61,"translate"),c(62,"translate"),i(63,"strong"),r(64),c(65,"translate"),a()()(),i(66,"mat-form-field",2)(67,"mat-label"),r(68),c(69,"translate"),a(),i(70,"mat-select",10),ut(71,Tc,3,5,"mat-option",7,dt),a(),i(73,"mat-error"),r(74),c(75,"translate"),c(76,"translate"),i(77,"strong"),r(78),c(79,"translate"),a()()(),i(80,"mat-form-field",2)(81,"mat-label"),r(82),c(83,"translate"),a(),C(84,"input",11),a(),i(85,"mat-checkbox",12),r(86),c(87,"translate"),a(),i(88,"h4",13),r(89),c(90,"translate"),a(),i(91,"mat-form-field",2)(92,"mat-label"),r(93),c(94,"translate"),a(),C(95,"input",14),a(),i(96,"mat-form-field",2)(97,"mat-label"),r(98),c(99,"translate"),a(),i(100,"mat-select",15),ut(101,Pc,3,5,"mat-option",7,dt),a()(),C(103,"mat-divider",16),i(104,"h3",17),r(105),c(106,"translate"),a(),i(107,"mat-checkbox",18),r(108),c(109,"translate"),a(),v(110,Oc,16,9,"div",19),C(111,"mat-divider",16),i(112,"mat-checkbox",20),r(113),c(114,"translate"),a(),i(115,"mat-form-field",2)(116,"mat-label"),r(117),c(118,"translate"),a(),C(119,"input",21),a(),v(120,Dc,5,3,"mat-form-field",2),a(),i(121,"div",22)(122,"button",23),C(123,"fa-icon",24),r(124),c(125,"translate"),a(),i(126,"button",25),r(127),c(128,"translate"),C(129,"fa-icon",26),a()()()),s&2&&(d("formGroup",o.savingsAccountTermsForm),n(4),p(l(5,36,"labels.inputs.Currency")),n(5),p(l(10,38,"labels.inputs.Decimal Places")),n(5),p(l(15,40,"labels.inputs.Nominal Annual Interest")),n(4),V(" ",l(19,42,"labels.inputs.Nominal Annual Interest")," ",l(20,44,"labels.commons.is")," "),n(4),p(l(23,46,"labels.commons.required")),n(4),p(l(27,48,"labels.inputs.Interest Compounding Period")),n(3),gt(o.interestCompoundingPeriodTypeData),n(3),V(" ",l(33,50,"labels.inputs.Interest Compounding Period")," ",l(34,52,"labels.commons.is")," "),n(4),p(l(37,54,"labels.commons.required")),n(4),p(l(41,56,"labels.inputs.Interest Posting Period")),n(3),gt(o.interestPostingPeriodTypeData),n(3),V(" ",l(47,58,"labels.inputs.Interest Posting Period")," ",l(48,60,"labels.commons.is")," "),n(4),p(l(51,62,"labels.commons.required")),n(4),p(l(55,64,"labels.inputs.Interest Calculated using")),n(3),gt(o.interestCalculationTypeData),n(3),V(" ",l(61,66,"labels.inputs.Interest Calculated using")," ",l(62,68,"labels.commons.is")," "),n(4),p(l(65,70,"labels.commons.required")),n(4),p(l(69,72,"labels.inputs.Days in Year")),n(3),gt(o.interestCalculationDaysInYearTypeData),n(3),V(" ",l(75,74,"labels.inputs.Days in Year")," ",l(76,76,"labels.commons.is")," "),n(4),p(l(79,78,"labels.commons.required")),n(4),p(l(83,80,"labels.inputs.Minimum Opening Balance")),n(4),f(" ",l(87,82,"labels.inputs.Apply Withdrawal Fee for Transfers")," "),n(3),p(l(90,84,"labels.inputs.Lock-in Period")),n(4),p(l(94,86,"labels.inputs.Frequency")),n(5),p(l(99,88,"labels.inputs.Type")),n(3),gt(o.lockinPeriodFrequencyTypeData),n(4),p(l(106,90,"labels.inputs.Overdraft")),n(3),f(" ",l(109,92,"labels.inputs.Is Overdraft Allowed")," "),n(2),_(o.savingsAccountTermsForm.value.allowOverdraft?110:-1),n(3),f(" ",l(114,94,"labels.inputs.Enforce Minimum Balance")," "),n(4),p(l(118,96,"labels.inputs.Minimum Balance")),n(3),_(o.savingsAccountTermsForm.controls.minBalanceForInterestCalculation.value?120:-1),n(4),f(" ",l(125,98,"labels.buttons.Previous")," "),n(3),f(" ",l(128,100,"labels.buttons.Next")," "))},dependencies:[P,O,it,et,ie,K,nt,lt,at,ot,Z,X,mt,st,wt,It,F,Ce,tn,le,St,_e,y,Nt],styles:["h4[_ngcontent-%COMP%]{font-weight:500;margin:1em 0}h3[_ngcontent-%COMP%]{font-weight:500}mat-divider[_ngcontent-%COMP%]{margin:1em 0 2em}.margin-v[_ngcontent-%COMP%]{margin:1em 0}.margin-b[_ngcontent-%COMP%]{margin:0 0 1em}.margin-t[_ngcontent-%COMP%]{margin-top:1em}"]})}}return t})();function yc(t,m){if(t&1&&(i(0,"mat-option",3),r(1),a()),t&2){let e=m.$implicit;d("value",e),n(),f(" ",e.name," ")}}function Ic(t,m){t&1&&(i(0,"th",24),r(1),c(2,"translate"),a()),t&2&&(n(),p(l(2,1,"labels.inputs.Name")))}function wc(t,m){if(t&1&&(i(0,"td",25),r(1),a()),t&2){let e=m.$implicit;n(),f(" ",e.name+", "+e.currency.displaySymbol," ")}}function Ec(t,m){t&1&&(i(0,"th",24),r(1),c(2,"translate"),a()),t&2&&(n(),p(l(2,1,"labels.inputs.Type")))}function Fc(t,m){if(t&1&&(i(0,"td",25),r(1),a()),t&2){let e=m.$implicit;n(),f(" ",e.chargeCalculationType.value," ")}}function kc(t,m){t&1&&(i(0,"th",24),r(1),c(2,"translate"),a()),t&2&&(n(),p(l(2,1,"labels.inputs.Amount")))}function Bc(t,m){if(t&1){let e=D();i(0,"td",25),r(1),c(2,"formatNumber"),i(3,"button",26),b("click",function(){let o=S(e).$implicit,u=h(2);return M(u.editChargeAmount(o))}),C(4,"fa-icon",27),a()()}if(t&2){let e=m.$implicit;n(),f(" ",l(2,1,e.amount)," ")}}function Nc(t,m){t&1&&(i(0,"th",24),r(1),c(2,"translate"),a()),t&2&&(n(),p(l(2,1,"labels.inputs.Collected On")))}function Rc(t,m){if(t&1&&(i(0,"td",25),r(1),c(2,"translateKey"),a()),t&2){let e=m.$implicit;n(),f(" ",Mt(2,1,e.chargeTimeType.value,"catalogs")," ")}}function Vc(t,m){t&1&&(i(0,"th",24),r(1),c(2,"translate"),a()),t&2&&(n(),p(l(2,1,"labels.inputs.Date")))}function Lc(t,m){if(t&1&&(i(0,"span"),r(1),c(2,"dateFormat"),a()),t&2){let e=h().$implicit;n(),f(" ",l(2,1,e.dueDate)||"Unassigned"," ")}}function Gc(t,m){if(t&1&&(i(0,"span"),r(1),c(2,"dateFormat"),a()),t&2){let e=h().$implicit;n(),f(" ",l(2,1,e.feeOnMonthDay)||"Unassigned"," ")}}function Uc(t,m){t&1&&(i(0,"span"),r(1," N/A "),a())}function qc(t,m){if(t&1){let e=D();i(0,"button",26),b("click",function(){S(e);let o=h().$implicit,u=h(2);return M(u.editChargeDate(o))}),C(1,"fa-icon",27),a()}}function Hc(t,m){if(t&1&&(i(0,"td",25),v(1,Lc,3,3,"span"),v(2,Gc,3,3,"span"),v(3,Uc,2,0,"span"),v(4,qc,2,0,"button",28),a()),t&2){let e=m.$implicit;n(),_(e.chargeTimeType.value==="Specified due date"||e.chargeTimeType.value==="Weekly Fee"?1:-1),n(),_(e.chargeTimeType.value==="Monthly Fee"||e.chargeTimeType.value==="Annual Fee"?2:-1),n(),_(e.chargeTimeType.value==="Monthly Fee"||e.chargeTimeType.value==="Annual Fee"||e.chargeTimeType.value==="Specified due date"||e.chargeTimeType.value==="Weekly Fee"?-1:3),n(),_(e.chargeTimeType.value==="Weekly Fee"||e.chargeTimeType.value==="Monthly Fee"||e.chargeTimeType.value==="Annual Fee"||e.chargeTimeType.value==="Specified due date"?4:-1)}}function zc(t,m){t&1&&(i(0,"th",24),r(1),c(2,"translate"),a()),t&2&&(n(),p(l(2,1,"labels.inputs.Repayments Every")))}function jc(t,m){if(t&1&&(i(0,"span"),r(1),a()),t&2){let e=h().$implicit;n(),p(e.feeInterval)}}function $c(t,m){t&1&&(i(0,"span"),r(1),c(2,"translate"),a()),t&2&&(n(),p(l(2,1,"labels.inputs.Not Provided")))}function Wc(t,m){if(t&1){let e=D();i(0,"button",26),b("click",function(){S(e);let o=h().$implicit,u=h(2);return M(u.editChargeFeeInterval(o))}),C(1,"fa-icon",27),a()}}function Qc(t,m){if(t&1&&(i(0,"td",25),v(1,jc,2,1,"span"),v(2,$c,3,3,"span"),v(3,Wc,2,0,"button",28),a()),t&2){let e=m.$implicit;n(),_(e.feeInterval?1:-1),n(),_(e.feeInterval?-1:2),n(),_(e.chargeTimeType.value==="Weekly Fee"||e.chargeTimeType.value==="Monthly Fee"?3:-1)}}function Kc(t,m){t&1&&(i(0,"th",24),r(1),c(2,"translate"),a()),t&2&&(n(),p(l(2,1,"labels.inputs.Actions")))}function Yc(t,m){if(t&1){let e=D();i(0,"td",25)(1,"button",29),b("click",function(){let o=S(e).$implicit,u=h(2);return M(u.deleteCharge(o))}),C(2,"fa-icon",30),a()()}}function Jc(t,m){t&1&&C(0,"tr",31)}function Xc(t,m){t&1&&C(0,"tr",32)}function Zc(t,m){if(t&1&&(i(0,"table",7),N(1,13),A(2,Ic,3,3,"th",14)(3,wc,2,1,"td",15),R(),N(4,16),A(5,Ec,3,3,"th",14)(6,Fc,2,1,"td",15),R(),N(7,17),A(8,kc,3,3,"th",14)(9,Bc,5,3,"td",15),R(),N(10,18),A(11,Nc,3,3,"th",14)(12,Rc,3,4,"td",15),R(),N(13,19),A(14,Vc,3,3,"th",14)(15,Hc,5,4,"td",15),R(),N(16,20),A(17,zc,3,3,"th",14)(18,Qc,4,3,"td",15),R(),N(19,21),A(20,Kc,3,3,"th",14)(21,Yc,3,0,"td",15),R(),A(22,Jc,1,0,"tr",22)(23,Xc,1,0,"tr",23),a()),t&2){let e=h();d("dataSource",e.chargesDataSource),n(22),d("matHeaderRowDef",e.displayedColumns),n(),d("matRowDefColumns",e.displayedColumns)}}var ce=(()=>{class t{constructor(){this.dialog=g(yt),this.dateUtils=g(j),this.translateService=g(ge),this.chargeData=[],this.chargesDataSource=[],this.pristine=!0,this.isChargesPatched=!1,this.displayedColumns=["name","chargeCalculationType","amount","chargeTimeType","date","repaymentsEvery","action"],this.selectAllItems=!1,this.loanPurposeOptions=[],this.displayedColumn=["check","id","name"]}ngOnInit(){this.savingsAccountTemplate&&(!this.isChargesPatched&&this.savingsAccountTemplate.charges?(this.chargesDataSource=this.savingsAccountProductTemplate.charges.map(e=>Q(G({},e),{id:e.chargeId}))||[],this.isChargesPatched=!0):this.chargesDataSource=[])}ngOnChanges(){this.savingsAccountProductTemplate&&(this.chargeData=this.savingsAccountProductTemplate.chargeOptions,this.chargesDataSource=this.savingsAccountProductTemplate.charges.map(e=>Q(G({},e),{id:e.chargeId}))||[])}addCharge(e){this.chargesDataSource=this.chargesDataSource.concat([e.value]),e.value="",this.pristine=!1}editChargeAmount(e){let s=[new pe({controlName:"amount",label:this.translateService.instant("labels.inputs.Amount"),value:e.amount,type:"number",required:!1})],o={title:this.translateService.instant("labels.heading.Edit Charge Amount"),layout:{addButtonText:"Confirm"},formfields:s};this.dialog.open(se,{data:o}).afterClosed().subscribe(x=>{if(x.data){let B=Q(G({},e),{amount:x.data.value.amount});this.chargesDataSource.splice(this.chargesDataSource.indexOf(e),1,B),this.chargesDataSource=this.chargesDataSource.concat([])}}),this.pristine=!1}editChargeDate(e){let s=[new Ne({controlName:"date",label:this.translateService.instant("labels.inputs.Date"),value:e.dueDate||e.feeOnMonthDay||"",type:"datetime-local",required:!1})],o={title:this.translateService.instant("labels.heading.Edit Charge Date"),layout:{addButtonText:"Confirm"},formfields:s};this.dialog.open(se,{data:o}).afterClosed().subscribe(x=>{if(x.data){let B,Ue=this.dateUtils.formatDate(x.data.value.date,"dd MMMM yyyy");switch(e.chargeTimeType.value){case"Specified due date":case"Weekly Fee":B=Q(G({},e),{dueDate:Ue});break;case"Annual Fee":case"Monthly Fee":let Wi=this.dateUtils.formatDate(x.data.value.date,"dd MMMM");B=Q(G({},e),{feeOnMonthDay:Wi});break}this.chargesDataSource.splice(this.chargesDataSource.indexOf(e),1,B),this.chargesDataSource=this.chargesDataSource.concat([])}}),this.pristine=!1}editChargeFeeInterval(e){let s=[new pe({controlName:"feeInterval",label:"Fee Interval",value:e.feeInterval,type:"text",required:!1})],o={title:"Edit Charge Fee Interval",layout:{addButtonText:"Confirm"},formfields:s};this.dialog.open(se,{data:o}).afterClosed().subscribe(x=>{if(x.data){let B=Q(G({},e),{feeInterval:x.data.value.feeInterval});this.chargesDataSource.splice(this.chargesDataSource.indexOf(e),1,B),this.chargesDataSource=this.chargesDataSource.concat([])}}),this.pristine=!1}deleteCharge(e){this.chargesDataSource.splice(this.chargesDataSource.indexOf(e),1),this.chargesDataSource=this.chargesDataSource.concat([]),this.pristine=!1}get savingsAccountCharges(){return{charges:this.chargesDataSource}}static{this.\u0275fac=function(s){return new(s||t)}}static{this.\u0275cmp=T({type:t,selectors:[["mifosx-savings-account-charges-step"]],inputs:{savingsAccountProductTemplate:"savingsAccountProductTemplate",savingsAccountTemplate:"savingsAccountTemplate",currencyCode:"currencyCode",activeClientMembers:"activeClientMembers"},features:[Te],decls:25,vars:18,consts:[["charge",""],[1,"layout-row-wrap","gap-2px","responsive-column"],[1,"flex-48"],[3,"value"],[1,"flex-48","align-center"],["type","button","mat-raised-button","","color","primary",3,"click","disabled"],["icon","plus",1,"m-r-10"],["mat-table","",1,"flex-98","mat-elevation-z1",3,"dataSource"],[1,"flex-98","layout-row","align-center","gap-2percent","margin-t","responsive-column"],["mat-raised-button","","matStepperPrevious",""],["icon","arrow-left",1,"m-r-10"],["mat-raised-button","","matStepperNext",""],["icon","arrow-right",1,"m-l-10"],["matColumnDef","name"],["mat-header-cell","",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","chargeCalculationType"],["matColumnDef","amount"],["matColumnDef","chargeTimeType"],["matColumnDef","date"],["matColumnDef","repaymentsEvery"],["matColumnDef","action"],["mat-header-row","",4,"matHeaderRowDef"],["mat-row","",4,"matRowDef","matRowDefColumns"],["mat-header-cell",""],["mat-cell",""],["mat-icon-button","","color","primary",3,"click"],["icon","pen"],["mat-icon-button","","color","primary"],["mat-icon-button","","color","warn",3,"click"],["icon","trash"],["mat-header-row",""],["mat-row",""]],template:function(s,o){if(s&1){let u=D();i(0,"div",1)(1,"mat-form-field",2)(2,"mat-label"),r(3),c(4,"translate"),a(),i(5,"mat-select",null,0),ut(7,yc,2,2,"mat-option",3,dt),c(9,"chargesFilter"),a()(),i(10,"div",4)(11,"button",5),b("click",function(){S(u);let B=w(6);return M(o.addCharge(B))}),C(12,"fa-icon",6),r(13),c(14,"translate"),a()(),v(15,Zc,24,3,"table",7),i(16,"div",8)(17,"button",9),C(18,"fa-icon",10),r(19),c(20,"translate"),a(),i(21,"button",11),r(22),c(23,"translate"),C(24,"fa-icon",12),a()()()}if(s&2){let u=w(6);n(3),p(l(4,6,"labels.inputs.Charge")),n(4),gt(hi(9,8,o.chargeData,o.chargesDataSource,o.currencyCode.value)),n(4),d("disabled",!u.value),n(2),f(" ",l(14,12,"labels.buttons.Add")," "),n(2),_(o.chargesDataSource.length>0?15:-1),n(4),f(" ",l(20,14,"labels.buttons.Previous")," "),n(3),f(" ",l(23,16,"labels.buttons.Next")," ")}},dependencies:[P,O,Z,X,wt,It,F,St,Lt,qt,Ut,Ht,Gt,zt,Oe,jt,Wt,$t,Qt,le,_e,Bt,y,Nt,Ii,me],styles:["table[_ngcontent-%COMP%]{width:100%}.mat-elevation-z1[_ngcontent-%COMP%]{margin:1em 0 1.5em}.margin-t[_ngcontent-%COMP%]{margin-top:1em}"]})}}return t})();var ts=()=>["../.."];function es(t,m){if(t&1&&(i(0,"span",6),C(1,"mifosx-external-identifier",14),a()),t&2){let e=h();n(),d("externalId",ft(e.savingsAccount.externalId))}}function ns(t,m){t&1&&(i(0,"span",6),r(1),c(2,"translate"),a()),t&2&&(n(),f(" ",l(2,1,"labels.inputs.Unassigned")," "))}function is(t,m){t&1&&(i(0,"th",22),r(1),c(2,"translate"),a()),t&2&&(n(),p(l(2,1,"labels.inputs.Client ID")))}function as(t,m){if(t&1&&(i(0,"td",23),r(1),a()),t&2){let e=m.$implicit;n(),p(e.id)}}function os(t,m){t&1&&(i(0,"th",22),r(1),c(2,"translate"),a()),t&2&&(n(),p(l(2,1,"labels.inputs.Client Name")))}function rs(t,m){if(t&1&&(i(0,"td",23),r(1),a()),t&2){let e=m.$implicit;n(),p(e.displayName)}}function cs(t,m){t&1&&C(0,"tr",24)}function ss(t,m){t&1&&C(0,"tr",25)}function ls(t,m){if(t&1&&(i(0,"h3",7),r(1),c(2,"translate"),a(),C(3,"mat-divider",3),i(4,"div",6)(5,"table",15,0),N(7,16),A(8,is,3,3,"th",17)(9,as,2,1,"td",18),R(),N(10,19),A(11,os,3,3,"th",17)(12,rs,2,1,"td",18),R(),A(13,cs,1,0,"tr",20)(14,ss,1,0,"tr",21),a()()),t&2){let e=h();n(),p(l(2,4,"labels.heading.Client Members")),n(4),d("dataSource",e.dataSource),n(8),d("matHeaderRowDef",e.membersDisplayedColumns),n(),d("matRowDefColumns",e.membersDisplayedColumns)}}function ms(t,m){if(t&1&&(i(0,"div",4)(1,"span",5),r(2),c(3,"translate"),a(),i(4,"span",6),r(5),c(6,"formatNumber"),a()()),t&2){let e=h();n(2),f("",l(3,2,"labels.inputs.Minimum Opening Balance"),":"),n(3),p(l(6,4,e.savingsAccount.minRequiredOpeningBalance))}}function ps(t,m){if(t&1&&(i(0,"div",4)(1,"span",5),r(2),c(3,"translate"),a(),i(4,"span",6),r(5),c(6,"find"),a()()),t&2){let e=h();n(2),f("",l(3,2,"labels.inputs.Lock-in Period"),":"),n(3),p(e.getCatalogTranslation(e.savingsAccount.lockinPeriodFrequency+" "+tt(6,4,e.savingsAccount.lockinPeriodFrequencyType,e.savingsAccountProductTemplate.lockinPeriodFrequencyTypeOptions,"id","value")))}}function ds(t,m){if(t&1&&(i(0,"div",4)(1,"span",5),r(2),c(3,"translate"),a(),i(4,"span",6),r(5),c(6,"formatNumber"),a()()),t&2){let e=h();n(2),f("",l(3,2,"labels.inputs.Minimum Overdraft Required for Interest Calculation"),":"),n(3),p(l(6,4,e.savingsAccount.minOverdraftForInterestCalculation))}}function us(t,m){if(t&1&&(i(0,"div",4)(1,"span",5),r(2),c(3,"translate"),a(),i(4,"span",6),r(5),c(6,"formatNumber"),a()()),t&2){let e=h();n(2),f("",l(3,2,"labels.inputs.Nominal Annual Interest for Overdraft"),":"),n(3),f("",l(6,4,e.savingsAccount.nominalAnnualInterestRateOverdraft)," %")}}function gs(t,m){if(t&1&&(i(0,"div",4)(1,"span",5),r(2),c(3,"translate"),a(),i(4,"span",6),r(5),c(6,"formatNumber"),a()()),t&2){let e=h();n(2),f("",l(3,2,"labels.inputs.Maximum Overdraft Amount Limit"),":"),n(3),p(l(6,4,e.savingsAccount.overdraftLimit))}}function fs(t,m){if(t&1&&(i(0,"div",4)(1,"span",5),r(2),c(3,"translate"),a(),i(4,"span",6),r(5),a()()),t&2){let e=h();n(2),f("",l(3,2,"labels.inputs.Minimum Balance"),":"),n(3),p(e.savingsAccount.minRequiredBalance)}}function Cs(t,m){t&1&&(i(0,"th",22),r(1),c(2,"translate"),a()),t&2&&(n(),p(l(2,1,"labels.inputs.Name")))}function vs(t,m){if(t&1&&(i(0,"td",23),r(1),a()),t&2){let e=m.$implicit;n(),f(" ",e.name+", "+e.currency.displaySymbol," ")}}function _s(t,m){t&1&&(i(0,"th",22),r(1),c(2,"translate"),a()),t&2&&(n(),p(l(2,1,"labels.inputs.Type")))}function hs(t,m){if(t&1&&(i(0,"td",23),r(1),c(2,"translateKey"),a()),t&2){let e=m.$implicit;n(),f(" ",Mt(2,1,e.chargeCalculationType.value,"catalogs")," ")}}function xs(t,m){t&1&&(i(0,"th",22),r(1),c(2,"translate"),a()),t&2&&(n(),p(l(2,1,"labels.inputs.Amount")))}function bs(t,m){if(t&1&&(i(0,"td",23),r(1),c(2,"formatNumber"),a()),t&2){let e=m.$implicit;n(),f(" ",l(2,1,e.amount)," ")}}function Ss(t,m){t&1&&(i(0,"th",22),r(1),c(2,"translate"),a()),t&2&&(n(),p(l(2,1,"labels.inputs.Date")))}function Ms(t,m){if(t&1&&(i(0,"span"),r(1),c(2,"dateFormat"),a()),t&2){let e=h().$implicit;n(),f(" ",l(2,1,e.dueDate)||"Unassigned"," ")}}function As(t,m){if(t&1&&(i(0,"span"),r(1),c(2,"dateFormat"),a()),t&2){let e=h().$implicit;n(),f(" ",l(2,1,e.feeOnMonthDay)||"Unassigned"," ")}}function Ts(t,m){t&1&&(i(0,"span"),r(1," N/A "),a())}function Ps(t,m){if(t&1&&(i(0,"td",23),v(1,Ms,3,3,"span"),v(2,As,3,3,"span"),v(3,Ts,2,0,"span"),a()),t&2){let e=m.$implicit;n(),_(e.chargeTimeType.value==="Specified due date"||e.chargeTimeType.value==="Weekly Fee"?1:-1),n(),_(e.chargeTimeType.value==="Monthly Fee"||e.chargeTimeType.value==="Annual Fee"?2:-1),n(),_(e.chargeTimeType.value==="Monthly Fee"||e.chargeTimeType.value==="Annual Fee"||e.chargeTimeType.value==="Specified due date"||e.chargeTimeType.value==="Weekly Fee"?-1:3)}}function Os(t,m){t&1&&(i(0,"th",22),r(1),c(2,"translate"),a()),t&2&&(n(),p(l(2,1,"labels.inputs.Repayments Every")))}function Ds(t,m){if(t&1&&(i(0,"td",23),r(1),a()),t&2){let e=m.$implicit;n(),f(" ",e.feeInterval||"Not Provided"," ")}}function ys(t,m){t&1&&(i(0,"th",22),r(1),c(2,"translate"),a()),t&2&&(n(),p(l(2,1,"labels.inputs.Collected On")))}function Is(t,m){if(t&1&&(i(0,"td",23),r(1),a()),t&2){let e=m.$implicit;n(),f(" ",e.chargeTimeType.value," ")}}function ws(t,m){t&1&&C(0,"tr",24)}function Es(t,m){t&1&&C(0,"tr",25)}function Fs(t,m){if(t&1&&(i(0,"div",8)(1,"h3",2),r(2),c(3,"translate"),a(),C(4,"mat-divider",3),i(5,"table",26),N(6,19),A(7,Cs,3,3,"th",17)(8,vs,2,1,"td",18),R(),N(9,27),A(10,_s,3,3,"th",17)(11,hs,3,4,"td",18),R(),N(12,28),A(13,xs,3,3,"th",17)(14,bs,3,3,"td",18),R(),N(15,29),A(16,Ss,3,3,"th",17)(17,Ps,4,3,"td",18),R(),N(18,30),A(19,Os,3,3,"th",17)(20,Ds,2,1,"td",18),R(),N(21,31),A(22,ys,3,3,"th",17)(23,Is,2,1,"td",18),R(),A(24,ws,1,0,"tr",20)(25,Es,1,0,"tr",21),a()()),t&2){let e=h();n(2),p(l(3,4,"labels.inputs.Charges")),n(3),d("dataSource",e.savingsAccount.charges),n(19),d("matHeaderRowDef",e.chargesDisplayedColumns),n(),d("matRowDefColumns",e.chargesDisplayedColumns)}}var be=(()=>{class t{constructor(){this.translateService=g(ge),this.chargesDisplayedColumns=["name","chargeCalculationType","amount","chargeTimeType","date","repaymentsEvery"],this.membersDisplayedColumns=["id","name"],this.submitEvent=new We}ngOnChanges(){this.activeClientMembers?.length>0&&(this.dataSource=new Jt(this.activeClientMembers.filter(e=>e.selected)))}getCatalogTranslation(e){return this.translateService.instant("labels.catalogs."+e)}static{this.\u0275fac=function(s){return new(s||t)}}static{this.\u0275cmp=T({type:t,selectors:[["mifosx-savings-account-preview-step"]],inputs:{savingsAccountProductTemplate:"savingsAccountProductTemplate",savingsAccountTemplate:"savingsAccountTemplate",savingsAccountTermsForm:"savingsAccountTermsForm",savingsAccount:"savingsAccount",activeClientMembers:"activeClientMembers"},outputs:{submitEvent:"submitEvent"},features:[Te],decls:123,vars:122,consts:[["membersTable",""],[1,"responsive-column"],[1,"mat-h3","flex-fill"],[1,"flex-fill"],[1,"flex-fill","layout-row"],[1,"flex-40"],[1,"flex-60"],[1,"mat-h3","margin-t","flex-fill"],[1,"layout-row-wrap","responsive-column","flex-fill"],[1,"layout-row","responsive-column","align-center","gap-2px","margin-t"],["mat-raised-button","","matStepperPrevious",""],["icon","arrow-left",1,"m-r-10"],["mat-raised-button","",3,"routerLink"],["mat-raised-button","","color","primary",3,"click"],[3,"externalId"],["mat-table","",3,"dataSource"],["matColumnDef","id"],["mat-header-cell","",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","name"],["mat-header-row","",4,"matHeaderRowDef"],["mat-row","",4,"matRowDef","matRowDefColumns"],["mat-header-cell",""],["mat-cell",""],["mat-header-row",""],["mat-row",""],["mat-table","",1,"flex-fill","mat-elevation-z1",3,"dataSource"],["matColumnDef","chargeCalculationType"],["matColumnDef","amount"],["matColumnDef","date"],["matColumnDef","repaymentsEvery"],["matColumnDef","chargeTimeType"]],template:function(s,o){s&1&&(i(0,"div",1)(1,"h3",2),r(2),c(3,"translate"),a(),C(4,"mat-divider",3),i(5,"div",4)(6,"span",5),r(7),c(8,"translate"),a(),i(9,"span",6),r(10),c(11,"find"),a()(),i(12,"div",4)(13,"span",5),r(14),c(15,"translate"),a(),i(16,"span",6),r(17),c(18,"dateFormat"),a()(),i(19,"div",4)(20,"span",5),r(21),c(22,"translate"),a(),v(23,es,2,2,"span",6),v(24,ns,3,3,"span",6),a(),i(25,"div",4)(26,"span",5),r(27),c(28,"translate"),a(),i(29,"span",6),r(30),c(31,"find"),a()(),v(32,ls,15,6),i(33,"h3",7),r(34),c(35,"translate"),a(),C(36,"mat-divider",3),i(37,"div",4)(38,"span",5),r(39),c(40,"translate"),a(),i(41,"span",6),r(42),a()(),i(43,"div",4)(44,"span",5),r(45),c(46,"translate"),a(),i(47,"span",6),r(48),a()(),i(49,"div",4)(50,"span",5),r(51),c(52,"translate"),a(),i(53,"span",6),r(54),c(55,"formatNumber"),a()(),i(56,"div",4)(57,"span",5),r(58),c(59,"translate"),a(),i(60,"span",6),r(61),c(62,"find"),a()(),i(63,"div",4)(64,"span",5),r(65),c(66,"translate"),a(),i(67,"span",6),r(68),c(69,"find"),a()(),i(70,"div",4)(71,"span",5),r(72),c(73,"translate"),a(),i(74,"span",6),r(75),c(76,"find"),a()(),i(77,"div",4)(78,"span",5),r(79),c(80,"translate"),a(),i(81,"span",6),r(82),c(83,"find"),a()(),v(84,ms,7,6,"div",4),i(85,"div",4)(86,"span",5),r(87),c(88,"translate"),a(),i(89,"span",6),r(90),c(91,"yesNo"),a()(),v(92,ps,7,9,"div",4),i(93,"div",4)(94,"span",5),r(95),c(96,"translate"),a(),i(97,"span",6),r(98),c(99,"yesNo"),a()(),v(100,ds,7,6,"div",4),v(101,us,7,6,"div",4),v(102,gs,7,6,"div",4),i(103,"div",4)(104,"span",5),r(105),c(106,"translate"),a(),i(107,"span",6),r(108),c(109,"yesNo"),a()(),v(110,fs,6,4,"div",4),v(111,Fs,26,6,"div",8),a(),i(112,"div",9)(113,"button",10),C(114,"fa-icon",11),r(115),c(116,"translate"),a(),i(117,"button",12),r(118),c(119,"translate"),a(),i(120,"button",13),b("click",function(){return o.submitEvent.emit()}),r(121),c(122,"translate"),a()()),s&2&&(n(2),p(l(3,43,"labels.heading.Details")),n(5),p(l(8,45,"labels.inputs.Product")),n(3),p(tt(11,47,o.savingsAccount.productId,o.savingsAccountTemplate.productOptions,"id","name")),n(4),p(l(15,52,"labels.inputs.Submitted On")),n(3),p(l(18,54,o.savingsAccount.submittedOnDate)),n(4),p(l(22,56,"labels.inputs.External Id")),n(2),_(o.savingsAccount.externalId?23:-1),n(),_(o.savingsAccount.externalId?-1:24),n(3),p(l(28,58,"labels.inputs.Field Officer")),n(3),p(tt(31,60,o.savingsAccount.fieldOfficerId,o.savingsAccountProductTemplate.fieldOfficerOptions,"id","displayName")),n(2),_(o.activeClientMembers?32:-1),n(2),p(l(35,65,"labels.heading.Terms")),n(5),p(l(40,67,"labels.inputs.Currency")),n(3),p(o.savingsAccountTermsForm.get("currencyCode").value),n(3),p(l(46,69,"labels.inputs.Decimal Places")),n(3),p(o.savingsAccountTermsForm.get("decimal").value),n(3),f("",l(52,71,"labels.inputs.Nominal Annual Interest"),":"),n(3),f("",l(55,73,o.savingsAccount.nominalAnnualInterestRate)," %"),n(4),f("",l(59,75,"labels.inputs.Interest Compounding Period"),":"),n(3),p(o.getCatalogTranslation(tt(62,77,o.savingsAccount.interestCompoundingPeriodType,o.savingsAccountProductTemplate.interestCompoundingPeriodTypeOptions,"id","value"))),n(4),f("",l(66,82,"labels.inputs.Interest Posting Period"),":"),n(3),p(o.getCatalogTranslation(tt(69,84,o.savingsAccount.interestPostingPeriodType,o.savingsAccountProductTemplate.interestPostingPeriodTypeOptions,"id","value"))),n(4),f("",l(73,89,"labels.inputs.Interest Calculated using"),":"),n(3),p(o.getCatalogTranslation(tt(76,91,o.savingsAccount.interestCalculationType,o.savingsAccountProductTemplate.interestCalculationTypeOptions,"id","value"))),n(4),f("",l(80,96,"labels.inputs.Days in Year"),":"),n(3),p(o.getCatalogTranslation(tt(83,98,o.savingsAccount.interestCalculationDaysInYearType,o.savingsAccountProductTemplate.interestCalculationDaysInYearTypeOptions,"id","value"))),n(2),_(o.savingsAccount.minRequiredOpeningBalance?84:-1),n(3),f("",l(88,103,"labels.inputs.Apply Withdrawal Fee for Transfers"),":"),n(3),p(l(91,105,o.savingsAccount.withdrawalFeeForTransfers)),n(2),_(o.savingsAccount.lockinPeriodFrequency?92:-1),n(3),f("",l(96,107,"labels.inputs.Is Overdraft Allowed"),":"),n(3),p(l(99,109,o.savingsAccount.allowOverdraft)),n(2),_(o.savingsAccount.minOverdraftForInterestCalculation?100:-1),n(),_(o.savingsAccount.nominalAnnualInterestRateOverdraft?101:-1),n(),_(o.savingsAccount.overdraftLimit?102:-1),n(3),f("",l(106,111,"labels.inputs.Enforce Minimum Balance"),":"),n(3),p(l(109,113,o.savingsAccount.enforceMinRequiredBalance)),n(2),_(o.savingsAccount.minRequiredBalance?110:-1),n(),_(o.savingsAccount.charges.length?111:-1),n(4),f(" ",l(116,115,"labels.buttons.Previous")," "),n(2),d("routerLink",k(121,ts)),n(),f(" ",l(119,117,"labels.buttons.Cancel")," "),n(3),f(" ",l(122,119,"labels.buttons.Submit")," "))},dependencies:[P,O,q,F,tn,Be,Lt,qt,Ut,Ht,Gt,zt,jt,Wt,$t,Qt,le,St,Bt,y,Nt,wi,me,mn],styles:["table[_ngcontent-%COMP%]{width:100%}.mat-elevation-z1[_ngcontent-%COMP%]{margin:1em 0 1.5em}h2[_ngcontent-%COMP%], h3[_ngcontent-%COMP%], h4[_ngcontent-%COMP%]{margin:0;font-weight:500}span[_ngcontent-%COMP%]{margin:.5em 0}mat-divider[_ngcontent-%COMP%]{margin:0 0 .5em}.margin-t[_ngcontent-%COMP%]{margin-top:1em}"]})}}return t})();function ks(t,m){t&1&&C(0,"fa-icon",14)}function Bs(t,m){t&1&&C(0,"fa-icon",14)}function Ns(t,m){t&1&&C(0,"fa-icon",15)}function Rs(t,m){t&1&&C(0,"fa-icon",16)}function Vs(t,m){t&1&&C(0,"fa-icon",17)}function Ls(t,m){t&1&&(r(0),c(1,"translate")),t&2&&p(l(1,1,"labels.inputs.DETAILS"))}function Gs(t,m){t&1&&(r(0),c(1,"translate")),t&2&&p(l(1,1,"labels.inputs.TERMS"))}function Us(t,m){t&1&&(r(0),c(1,"translate")),t&2&&p(l(1,1,"labels.inputs.CHARGES"))}function qs(t,m){t&1&&(r(0),c(1,"translate")),t&2&&p(l(1,1,"labels.inputs.PREVIEW"))}function Hs(t,m){if(t&1){let e=D();i(0,"mat-step",13),A(1,qs,2,3,"ng-template",9),i(2,"mifosx-savings-account-preview-step",18),b("submitEvent",function(){S(e);let o=h();return M(o.submit())}),a()()}if(t&2){let e=h();n(2),d("savingsAccountProductTemplate",e.savingsAccountProductTemplate)("savingsAccountTemplate",e.savingsAccountTemplate)("savingsAccountTermsForm",e.savingsAccountTermsForm)("savingsAccount",e.savingsAccount)}}var Nn=(()=>{class t{constructor(){this.route=g(E),this.router=g(z),this.dateUtils=g(j),this.savingsService=g(I),this.settingsService=g(U),this.route.data.subscribe(e=>{this.savingsAccountTemplate=e.savingsAccountTemplate})}setTemplate(e){this.savingsAccountProductTemplate=e}get savingsAccountDetailsForm(){return this.savingsAccountDetailsStep.savingsAccountDetailsForm}get savingsAccountTermsForm(){return this.savingsAccountTermsStep.savingsAccountTermsForm}get savingsAccountFormValid(){return this.savingsAccountDetailsForm.valid&&this.savingsAccountTermsForm.valid}get savingsAccount(){return G(G(G({},this.savingsAccountDetailsStep.savingsAccountDetails),this.savingsAccountTermsStep.savingsAccountTerms),this.savingsAccountChargesStep.savingsAccountCharges)}submit(){let e=this.settingsService.language.code,s=this.settingsService.dateFormat,u=Q(G({},this.savingsAccount),{charges:this.savingsAccount.charges.map(x=>({chargeId:x.id,amount:x.amount,dueDate:x.dueDate,feeOnMonthDay:x.feeOnMonthDay,feeInterval:x.feeInterval})),submittedOnDate:this.dateUtils.formatDate(this.savingsAccount.submittedOnDate,s),dateFormat:s,monthDayFormat:"dd MMMM",locale:e});this.savingsAccountTemplate.clientId?u.clientId=this.savingsAccountTemplate.clientId:u.groupId=this.savingsAccountTemplate.groupId,this.savingsService.createSavingsAccount(u).subscribe(x=>{this.router.navigate(["../",x.resourceId],{relativeTo:this.route})})}static{this.\u0275fac=function(s){return new(s||t)}}static{this.\u0275cmp=T({type:t,selectors:[["mifosx-create-savings-account"]],viewQuery:function(s,o){if(s&1&&(Pt(oe,7),Pt(re,7),Pt(ce,7)),s&2){let u;Ot(u=Dt())&&(o.savingsAccountDetailsStep=u.first),Ot(u=Dt())&&(o.savingsAccountTermsStep=u.first),Ot(u=Dt())&&(o.savingsAccountChargesStep=u.first)}},decls:18,vars:9,consts:[["savingProductStepper",""],[1,"container"],["orientation","vertical","labelPosition","bottom",1,"mat-elevation-z8",3,"linear"],["matStepperIcon","number"],["matStepperIcon","edit"],["matStepperIcon","done"],["matStepperIcon","error"],["matStepperIcon","preview"],[3,"stepControl"],["matStepLabel",""],[3,"savingsAccountProductTemplate","savingsAccountTemplate"],[3,"savingsAccountProductTemplate"],[3,"savingsAccountProductTemplate","savingsAccountTemplate","currencyCode"],["completed",""],["icon","pencil-alt","size","sm"],["icon","check","size","sm"],["icon","exclamation-triangle","size","lg"],["icon","eye","size","sm"],[3,"submitEvent","savingsAccountProductTemplate","savingsAccountTemplate","savingsAccountTermsForm","savingsAccount"]],template:function(s,o){if(s&1){let u=D();i(0,"div",1)(1,"mat-stepper",2,0),A(3,ks,1,0,"ng-template",3)(4,Bs,1,0,"ng-template",4)(5,Ns,1,0,"ng-template",5)(6,Rs,1,0,"ng-template",6)(7,Vs,1,0,"ng-template",7),i(8,"mat-step",8),A(9,Ls,2,3,"ng-template",9),i(10,"mifosx-savings-account-details-step",10),b("savingsAccountProductTemplate",function(B){return S(u),M(o.setTemplate(B))}),a()(),i(11,"mat-step",8),A(12,Gs,2,3,"ng-template",9),C(13,"mifosx-savings-account-terms-step",11),a(),i(14,"mat-step"),A(15,Us,2,3,"ng-template",9),C(16,"mifosx-savings-account-charges-step",12),a(),v(17,Hs,3,4,"mat-step",13),a()()}s&2&&(n(),d("linear",!1),n(7),d("stepControl",o.savingsAccountDetailsForm),n(2),d("savingsAccountTemplate",o.savingsAccountTemplate),n(),d("stepControl",o.savingsAccountTermsForm),n(2),d("savingsAccountProductTemplate",o.savingsAccountProductTemplate),n(3),d("savingsAccountProductTemplate",o.savingsAccountProductTemplate)("savingsAccountTemplate",o.savingsAccountTemplate)("currencyCode",o.savingsAccountTermsForm.get("currencyCode")),n(),_(o.savingsAccountFormValid?17:-1))},dependencies:[P,O,ke,Ee,St,Fe,we,oe,re,ce,be,y],encapsulation:2})}}return t})();function zs(t,m){t&1&&C(0,"fa-icon",13)}function js(t,m){t&1&&C(0,"fa-icon",13)}function $s(t,m){t&1&&C(0,"fa-icon",14)}function Ws(t,m){t&1&&C(0,"fa-icon",15)}function Qs(t,m){t&1&&C(0,"fa-icon",16)}function Ks(t,m){t&1&&(r(0),c(1,"translate")),t&2&&p(l(1,1,"labels.inputs.DETAILS"))}function Ys(t,m){t&1&&(r(0),c(1,"translate")),t&2&&p(l(1,1,"labels.inputs.TERMS"))}function Js(t,m){t&1&&(r(0),c(1,"translate")),t&2&&p(l(1,1,"labels.inputs.CHARGES"))}function Xs(t,m){t&1&&(r(0),c(1,"translate")),t&2&&p(l(1,1,"labels.inputs.PREVIEW"))}function Zs(t,m){if(t&1){let e=D();i(0,"mat-step",12),A(1,Xs,2,3,"ng-template",9),i(2,"mifosx-savings-account-preview-step",17),b("submitEvent",function(){S(e);let o=h();return M(o.submit())}),a()()}if(t&2){let e=h();n(2),d("savingsAccountProductTemplate",e.savingsAccountProductTemplate)("savingsAccountTemplate",e.savingsAccountAndTemplate)("savingsAccountTermsForm",e.savingsAccountTermsForm)("savingsAccount",e.savingsAccount)}}var Rn=(()=>{class t{constructor(){this.route=g(E),this.router=g(z),this.dateUtils=g(j),this.savingsService=g(I),this.settingsService=g(U),this.route.data.subscribe(e=>{this.savingsAccountAndTemplate=e.savingsAccountAndTemplate})}setTemplate(e){this.savingsAccountProductTemplate=e}get savingsAccountDetailsForm(){return this.savingsAccountDetailsStep.savingsAccountDetailsForm}get savingsAccountTermsForm(){return this.savingsAccountTermsStep.savingsAccountTermsForm}get savingsAccountFormValidAndNotPristine(){return this.savingsAccountDetailsForm.valid&&this.savingsAccountTermsForm.valid&&(!this.savingsAccountDetailsForm.pristine||!this.savingsAccountTermsForm.pristine||!this.savingsAccountChargesStep.pristine)}get savingsAccount(){return G(G(G({},this.savingsAccountDetailsStep.savingsAccountDetails),this.savingsAccountTermsStep.savingsAccountTerms),this.savingsAccountChargesStep.savingsAccountCharges)}submit(){let e=this.settingsService.language.code,s=this.settingsService.dateFormat,u=Q(G({},this.savingsAccount),{charges:this.savingsAccount.charges.map(x=>({chargeId:x.id,amount:x.amount,dueDate:this.dateUtils.formatDate(x.dueDate,s),feeOnMonthDay:this.dateUtils.formatDate(x.feeOnMonthDay,s),feeInterval:x.feeInterval})),submittedOnDate:this.dateUtils.formatDate(this.savingsAccount.submittedOnDate,s),dateFormat:s,monthDayFormat:"dd MMMM",locale:e});this.savingsAccountAndTemplate.clientId?u.clientId=this.savingsAccountAndTemplate.clientId:u.groupId=this.savingsAccountAndTemplate.groupId,this.savingsService.updateSavingsAccount(this.savingsAccountAndTemplate.id,u).subscribe(x=>{this.router.navigate(["../"],{relativeTo:this.route})})}static{this.\u0275fac=function(s){return new(s||t)}}static{this.\u0275cmp=T({type:t,selectors:[["mifosx-edit-savings-account"]],viewQuery:function(s,o){if(s&1&&(Pt(oe,7),Pt(re,7),Pt(ce,7)),s&2){let u;Ot(u=Dt())&&(o.savingsAccountDetailsStep=u.first),Ot(u=Dt())&&(o.savingsAccountTermsStep=u.first),Ot(u=Dt())&&(o.savingsAccountChargesStep=u.first)}},decls:18,vars:10,consts:[["savingProductStepper",""],[1,"container"],["orientation","vertical","labelPosition","bottom",1,"mat-elevation-z8",3,"linear"],["matStepperIcon","number"],["matStepperIcon","edit"],["matStepperIcon","done"],["matStepperIcon","error"],["matStepperIcon","preview"],[3,"stepControl"],["matStepLabel",""],[3,"savingsAccountProductTemplate","savingsAccountTemplate"],[3,"savingsAccountProductTemplate","savingsAccountTemplate","currencyCode"],["completed",""],["icon","pencil-alt","size","sm"],["icon","check","size","sm"],["icon","exclamation-triangle","size","lg"],["icon","eye","size","sm"],[3,"submitEvent","savingsAccountProductTemplate","savingsAccountTemplate","savingsAccountTermsForm","savingsAccount"]],template:function(s,o){if(s&1){let u=D();i(0,"div",1)(1,"mat-stepper",2,0),A(3,zs,1,0,"ng-template",3)(4,js,1,0,"ng-template",4)(5,$s,1,0,"ng-template",5)(6,Ws,1,0,"ng-template",6)(7,Qs,1,0,"ng-template",7),i(8,"mat-step",8),A(9,Ks,2,3,"ng-template",9),i(10,"mifosx-savings-account-details-step",10),b("savingsAccountProductTemplate",function(B){return S(u),M(o.setTemplate(B))}),a()(),i(11,"mat-step",8),A(12,Ys,2,3,"ng-template",9),C(13,"mifosx-savings-account-terms-step",10),a(),i(14,"mat-step"),A(15,Js,2,3,"ng-template",9),C(16,"mifosx-savings-account-charges-step",11),a(),v(17,Zs,3,4,"mat-step",12),a()()}s&2&&(n(),d("linear",!1),n(7),d("stepControl",o.savingsAccountDetailsForm),n(2),d("savingsAccountTemplate",o.savingsAccountAndTemplate),n(),d("stepControl",o.savingsAccountTermsForm),n(2),d("savingsAccountProductTemplate",o.savingsAccountProductTemplate)("savingsAccountTemplate",o.savingsAccountAndTemplate),n(3),d("savingsAccountProductTemplate",o.savingsAccountProductTemplate)("savingsAccountTemplate",o.savingsAccountAndTemplate)("currencyCode",o.savingsAccountTermsForm.get("currencyCode")),n(),_(o.savingsAccountFormValidAndNotPristine?17:-1))},dependencies:[P,O,ke,Ee,St,Fe,we,oe,re,ce,be,y],encapsulation:2})}}return t})();var tl=()=>["./general"],el=t=>["./datatables",t];function nl(t,m){if(t&1&&(i(0,"a",5,2),r(2),a()),t&2){let e=w(1),s=h().$implicit;d("routerLink",kt(3,el,s.registeredTableName))("active",e.isActive),n(2),f(" ",s.registeredTableName," ")}}function il(t,m){if(t&1&&A(0,nl,3,5,"a",6),t&2){let e=m.$implicit;d("mifosxHasPermission","READ_"+e.registeredTableName)}}var Vn=(()=>{class t{constructor(){this.route=g(E),this.dialog=g(yt),this.route.data.subscribe(e=>{this.accountId=this.route.snapshot.params.savingAccountId,this.entityDatatables=e.transactionDatatables})}static{this.\u0275fac=function(s){return new(s||t)}}static{this.\u0275cmp=T({type:t,selectors:[["mifosx-view-transaction"]],decls:11,vars:7,consts:[["general","routerLinkActive"],["tabPanel",""],["datatable","routerLinkActive"],[1,"container"],["mat-tab-nav-bar","",1,"navigation-tabs",3,"tabPanel"],["mat-tab-link","","routerLinkActive","",3,"routerLink","active"],["mat-tab-link","","routerLinkActive","",3,"routerLink","active",4,"mifosxHasPermission"]],template:function(s,o){if(s&1&&(i(0,"div",3)(1,"nav",4)(2,"a",5,0),r(4),c(5,"translate"),a(),ut(6,il,1,1,"a",5,dt),a(),i(8,"mat-tab-nav-panel",null,1),C(10,"router-outlet"),a()()),s&2){let u=w(3),x=w(9);n(),d("tabPanel",x),n(),d("routerLink",k(6,tl))("active",u.isActive),n(2),f(" ",l(5,4,"labels.heading.General")," "),n(2),gt(o.entityDatatables)}},dependencies:[P,O,q,Rt,rn,cn,Je,sn,Ye,y],styles:[".container[_ngcontent-%COMP%]{max-width:37rem}.container[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] div[_ngcontent-%COMP%]{margin:1rem 0;word-wrap:break-word}"]})}}return t})();var al=()=>["../"];function ol(t,m){if(t&1){let e=D();i(0,"button",9),b("click",function(){S(e);let o=h(2);return M(o.payCharge())}),C(1,"fa-icon",10),r(2," Pay "),a()}}function rl(t,m){if(t&1){let e=D();i(0,"button",11),b("click",function(){S(e);let o=h(2);return M(o.waiveCharge())}),C(1,"fa-icon",12),r(2," Waive "),a()}}function cl(t,m){if(t&1){let e=D();i(0,"button",14),b("click",function(){S(e);let o=h(3);return M(o.inactivateCharge())}),C(1,"fa-icon",15),r(2," Inactivate "),a()}}function sl(t,m){t&1&&(i(0,"span"),A(1,cl,3,0,"button",13),a()),t&2&&(n(),d("mifosxHasPermission","INACTIVATE_SAVINGSACCOUNTCHARGE"))}function ll(t,m){if(t&1&&(i(0,"div",0),A(1,ol,3,0,"button",7)(2,rl,3,0,"button",8),v(3,sl,2,1,"span"),a()),t&2){let e=h();n(),d("mifosxHasPermission","PAY_SAVINGSACCOUNTCHARGE"),n(),d("mifosxHasPermission","WAIVE_SAVINGSACCOUNTCHARGE"),n(),_(e.isRecurringCharge()?3:-1)}}function ml(t,m){if(t&1){let e=D();i(0,"button",11),b("click",function(){S(e);let o=h(2);return M(o.editCharge())}),C(1,"fa-icon",16),r(2," Edit "),a()}}function pl(t,m){if(t&1){let e=D();i(0,"button",14),b("click",function(){S(e);let o=h(2);return M(o.deleteCharge())}),C(1,"fa-icon",15),r(2," Delete "),a()}}function dl(t,m){t&1&&(i(0,"div",0),A(1,ml,3,0,"button",8)(2,pl,3,0,"button",13),a()),t&2&&(n(),d("mifosxHasPermission","UPDATE_SAVINGSACCOUNTCHARGE"),n(),d("mifosxHasPermission","DELETE_SAVINGSACCOUNTCHARGE"))}var Ln=(()=>{class t{constructor(){this.savingsService=g(I),this.route=g(E),this.dateUtils=g(j),this.router=g(z),this.dialog=g(yt),this.settingsService=g(U),this.route.data.subscribe(e=>{this.chargeData=e.savingsAccountCharge}),this.route.data.subscribe(e=>{this.savingsAccountData=e.savingsAccountData})}payCharge(){let e=[new pe({controlName:"amount",label:"Amount",value:"",type:"number",required:!0}),new Ne({controlName:"dueDate",label:"Payment Date",value:"",type:"date",required:!0})],s={title:"Pay Charge",layout:{addButtonText:"Confirm"},formfields:e};this.dialog.open(se,{data:s}).afterClosed().subscribe(u=>{if(u.data){let x=this.settingsService.language.code,B=this.settingsService.dateFormat,Yt=Q(G({},u.data.value),{dueDate:this.dateUtils.formatDate(u.data.value.dueDate,B),dateFormat:B,locale:x});this.savingsService.executeSavingsAccountChargesCommand(this.chargeData.accountId,"pay",Yt,this.chargeData.id).subscribe(()=>{this.reload()})}})}waiveCharge(){this.dialog.open(Le,{data:{id:this.chargeData.id}}).afterClosed().subscribe(s=>{s.confirm&&this.savingsService.executeSavingsAccountChargesCommand(this.chargeData.accountId,"waive",{},this.chargeData.id).subscribe(()=>{this.reload()})})}inactivateCharge(){this.dialog.open(Ge,{data:{id:this.chargeData.id}}).afterClosed().subscribe(s=>{s.confirm&&this.savingsService.executeSavingsAccountChargesCommand(this.chargeData.accountId,"inactivate",{},this.chargeData.id).subscribe(()=>{this.reload()})})}editCharge(){let e=[new pe({controlName:"amount",label:"Amount",value:this.chargeData.amount||this.chargeData.amountOrPercentage,type:"number",required:!0})],s={title:"Edit Charge",layout:{addButtonText:"Confirm"},formfields:e};this.dialog.open(se,{data:s}).afterClosed().subscribe(u=>{if(u.data){let x=this.settingsService.language.code,B=this.settingsService.dateFormat,Yt=Q(G({},u.data.value),{dateFormat:B,locale:x});this.savingsService.editSavingsAccountCharge(this.chargeData.accountId,Yt,this.chargeData.id).subscribe(()=>{this.reload()})}})}deleteCharge(){this.dialog.open(ve,{data:{deleteContext:`charge id:${this.chargeData.id}`}}).afterClosed().subscribe(s=>{s.delete&&this.savingsService.deleteSavingsAccountCharge(this.chargeData.accountId,this.chargeData.id).subscribe(()=>{this.reload()})})}isRecurringCharge(){let e=this.chargeData.chargeTimeType.value;return e==="Monthly Fee"||e==="Annual Fee"||e==="Weekly Fee"}reload(){let e=this.router.url.replace(`/${this.chargeData.id}`,""),s=this.router.url.slice(0,this.router.url.indexOf("savings-accounts")+16);this.router.navigateByUrl(s,{skipLocationChange:!0}).then(()=>this.router.navigate([e]))}static{this.\u0275fac=function(s){return new(s||t)}}static{this.\u0275cmp=T({type:t,selectors:[["mifosx-view-charge"]],decls:68,vars:66,consts:[[1,"layout-row","align-end","gap-2percent","layout-xs-column","container","m-b-20"],[1,"container"],[1,"layout-row-wrap"],[1,"flex-50","mat-body-strong"],[1,"flex-50"],[1,"layout-row","layout-align-center","gap-2percent","column-on-mobile"],["type","button","mat-raised-button","","color","primary",3,"routerLink"],["mat-raised-button","","color","accent",3,"click",4,"mifosxHasPermission"],["mat-raised-button","","color","primary",3,"click",4,"mifosxHasPermission"],["mat-raised-button","","color","accent",3,"click"],["icon","dollar-sign",1,"m-r-10"],["mat-raised-button","","color","primary",3,"click"],["icon","flag",1,"m-r-10"],["mat-raised-button","","color","warn",3,"click",4,"mifosxHasPermission"],["mat-raised-button","","color","warn",3,"click"],["icon","trash",1,"m-r-10"],["icon","edit",1,"m-r-10"]],template:function(s,o){s&1&&(v(0,ll,4,3,"div",0),v(1,dl,3,2,"div",0),i(2,"div",1)(3,"mat-card")(4,"mat-card-content")(5,"div",2)(6,"div",3),r(7),c(8,"translate"),a(),i(9,"div",4),r(10),a(),i(11,"div",3),r(12),c(13,"translate"),a(),i(14,"div",4),r(15),c(16,"translateKey"),a(),i(17,"div",3),r(18),c(19,"translate"),a(),i(20,"div",4),r(21),a(),i(22,"div",3),r(23),c(24,"translate"),a(),i(25,"div",4),r(26),c(27,"translateKey"),a(),i(28,"div",3),r(29),c(30,"translate"),a(),i(31,"div",4),r(32),c(33,"dateFormat"),a(),i(34,"div",3),r(35),c(36,"translate"),a(),i(37,"div",4),r(38),c(39,"translateKey"),a(),i(40,"div",3),r(41),c(42,"translate"),a(),i(43,"div",4),r(44),c(45,"formatNumber"),a(),i(46,"div",3),r(47),c(48,"translate"),a(),i(49,"div",4),r(50),c(51,"formatNumber"),a(),i(52,"div",3),r(53),c(54,"translate"),a(),i(55,"div",4),r(56),c(57,"formatNumber"),a(),i(58,"div",3),r(59),c(60,"translate"),a(),i(61,"div",4),r(62),c(63,"formatNumber"),a()(),i(64,"div",5)(65,"button",6),r(66),c(67,"translate"),a()()()()()),s&2&&(_(o.savingsAccountData.status.value==="Active"&&o.chargeData.amountOutstanding!==0?0:-1),n(),_(o.savingsAccountData.status.value==="Submitted and pending approval"?1:-1),n(6),f(" ",l(8,24,"labels.inputs.Name")," "),n(3),f(" ",o.chargeData.name," "),n(2),f(" ",l(13,26,"labels.inputs.Charge Type")," "),n(3),f(" ",o.chargeData.penalty?"Penalty":Mt(16,28,"Fee","catalogs")," "),n(3),f(" ",l(19,31,"labels.inputs.Currency")," "),n(3),f(" ",o.chargeData.currency.displayLabel," "),n(2),f(" ",l(24,33,"labels.inputs.Payment due at")," "),n(3),f(" ",Mt(27,35,o.chargeData.chargeTimeType.value,"catalogs")," "),n(3),f(" ",l(30,38,"labels.inputs.Payment due as of")," "),n(3),f(" ",l(33,40,o.chargeData.dueDate)," "),n(3),f(" ",l(36,42,"labels.inputs.Calculation Type")," "),n(3),f(" ",Mt(39,44,o.chargeData.chargeCalculationType.value,"catalogs")," "),n(3),f(" ",l(42,47,"labels.inputs.Due")," "),n(3),f(" ",l(45,49,o.chargeData.amount)," "),n(3),f(" ",l(48,51,"labels.inputs.Paid")," "),n(3),f(" ",l(51,53,o.chargeData.amountPaid)," "),n(3),f(" ",l(54,55,"labels.inputs.Waived")," "),n(3),f(" ",l(57,57,o.chargeData.amountWaived)," "),n(3),f(" ",l(60,59,"labels.inputs.Outstanding")," "),n(3),f(" ",l(63,61,o.chargeData.amountOutstanding)," "),n(3),d("routerLink",k(65,al)),n(),f(" ",l(67,63,"labels.buttons.Back")," "))},dependencies:[P,O,q,J,ct,F,Rt,St,Bt,y,Nt,me],styles:[".container[_ngcontent-%COMP%]{max-width:37rem}.container[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] div[_ngcontent-%COMP%]{margin:1rem 0;word-wrap:break-word}"]})}}return t})();var ul=()=>["../../"],Gn=(()=>{class t{constructor(){this.sanitizer=g(Ke),this.route=g(E),this.route.data.subscribe(e=>{this.transactionRecieptData=e.savingsTransactionReciept})}ngOnInit(){let e=this.transactionRecieptData.headers.get("Content-Type"),s=new Blob([this.transactionRecieptData.body],{type:e}),o=URL.createObjectURL(s);this.pentahoUrl=this.sanitizer.bypassSecurityTrustResourceUrl(o)}static{this.\u0275fac=function(s){return new(s||t)}}static{this.\u0275cmp=T({type:t,selectors:[["mifosx-view-reciept"]],decls:6,vars:3,consts:[[1,"container"],[1,"back-button"],["type","button","color","primary","mat-raised-button","",3,"routerLink"],["icon","arrow-left",1,"m-r-10"],["frameborder","0","width","100%","height","600px;",3,"src"]],template:function(s,o){s&1&&(i(0,"mat-card",0)(1,"div",1)(2,"button",2),C(3,"fa-icon",3),r(4,"Back "),a()(),C(5,"iframe",4),a()),s&2&&(n(2),d("routerLink",k(2,ul)),n(3),d("src",o.pentahoUrl,$e))},dependencies:[P,O,q,J,F,St],styles:[".container[_ngcontent-%COMP%]{max-width:50rem}.container[_ngcontent-%COMP%] .back-button[_ngcontent-%COMP%]{max-height:2%;margin-bottom:2%}"]})}}return t})();var gl=()=>["../"];function fl(t,m){if(t&1&&C(0,"iframe",12),t&2){let e=h();d("src",e.pentahoUrl,$e)}}var Un=(()=>{class t{constructor(){this.sanitizer=g(Ke),this.reportsService=g(dn),this.formBuilder=g(rt),this.dateUtils=g(j),this.route=g(E),this.settingsService=g(U),this.minDate=new Date(2e3,0,1),this.maxDate=new Date,this.hideOutput=!0,this.route.parent.parent.data.subscribe(e=>{this.savingsAccountId=e.savingsAccountData.accountNo})}ngOnInit(){this.maxDate=this.settingsService.businessDate,this.createTransactionsReportForm()}createTransactionsReportForm(){this.transactionsReportForm=this.formBuilder.group({fromDate:["",H.required],toDate:["",H.required]})}generate(){let e={"output-type":"PDF",R_startDate:this.dateUtils.formatDate(this.transactionsReportForm.value.fromDate,this.settingsService.dateFormat),R_endDate:this.dateUtils.formatDate(this.transactionsReportForm.value.toDate,this.settingsService.dateFormat),R_savingsAccountId:this.savingsAccountId};this.reportsService.getPentahoRunReportData("Client Saving Transactions",e,"default",this.settingsService.language.code,this.settingsService.dateFormat).subscribe(s=>{let o=s.headers.get("Content-Type"),u=new Blob([s.body],{type:o}),x=URL.createObjectURL(u);this.pentahoUrl=this.sanitizer.bypassSecurityTrustResourceUrl(x),this.hideOutput=!1})}static{this.\u0275fac=function(s){return new(s||t)}}static{this.\u0275cmp=T({type:t,selectors:[["mifosx-export-transactions"]],decls:41,vars:43,consts:[["fromDatePicker",""],["toDatePicker",""],[1,"m-t-20","layout-column",3,"ngSubmit","formGroup"],[1,"layout-row","layout-align-center","gap-3percent"],[1,"flex-30",3,"click"],["matInput","","required","","formControlName","fromDate",3,"min","max","matDatepicker"],["matSuffix","",3,"for"],["matInput","","required","","formControlName","toDate",3,"min","max","matDatepicker"],[1,"generate-button","layout-row","layout-xs-column","layout-align-center","gap-5percent"],["type","button","mat-raised-button","",3,"routerLink"],["mat-raised-button","","color","primary",3,"disabled"],["icon","cogs",1,"m-r-10"],["frameborder","0","width","100%","height","750px;",3,"src"]],template:function(s,o){if(s&1){let u=D();i(0,"form",2),b("ngSubmit",function(){return S(u),M(o.generate())}),i(1,"div",3)(2,"mat-form-field",4),b("click",function(){S(u);let B=w(9);return M(B.open())}),i(3,"mat-label"),r(4),c(5,"translate"),a(),C(6,"input",5)(7,"mat-datepicker-toggle",6)(8,"mat-datepicker",null,0),i(10,"mat-error"),r(11),c(12,"translate"),c(13,"translate"),i(14,"strong"),r(15),c(16,"translate"),a()()(),i(17,"mat-form-field",4),b("click",function(){S(u);let B=w(24);return M(B.open())}),i(18,"mat-label"),r(19),c(20,"translate"),a(),C(21,"input",7)(22,"mat-datepicker-toggle",6)(23,"mat-datepicker",null,1),i(25,"mat-error"),r(26),c(27,"translate"),c(28,"translate"),i(29,"strong"),r(30),c(31,"translate"),a()()()(),i(32,"div",8)(33,"button",9),r(34),c(35,"translate"),a(),i(36,"button",10),C(37,"fa-icon",11),r(38),c(39,"translate"),a()()(),v(40,fl,1,1,"iframe",12)}if(s&2){let u=w(9),x=w(24);d("formGroup",o.transactionsReportForm),n(4),p(l(5,22,"labels.inputs.From Date")),n(2),d("min",o.minDate)("max",o.maxDate)("matDatepicker",u),n(),d("for",u),n(4),V(" ",l(12,24,"labels.inputs.From Date")," ",l(13,26,"labels.commons.is")," "),n(4),p(l(16,28,"labels.commons.required")),n(4),p(l(20,30,"labels.inputs.To Date")),n(2),d("min",o.minDate)("max",o.maxDate)("matDatepicker",x),n(),d("for",x),n(4),V(" ",l(27,32,"labels.inputs.To Date")," ",l(28,34,"labels.commons.is")," "),n(4),p(l(31,36,"labels.commons.required")),n(3),d("routerLink",k(42,gl)),n(),p(l(35,38,"labels.buttons.Cancel")),n(2),d("disabled",!o.transactionsReportForm.valid),n(2),f("",l(39,40,"labels.buttons.Generate Report")," \xA0 "),n(2),_(o.hideOutput?-1:40)}},dependencies:[P,O,it,et,K,nt,lt,at,ot,q,Z,X,mt,vt,st,ht,xt,_t,F,St,y],styles:[".generate-button[_ngcontent-%COMP%]{max-height:2%;padding:1% 0 2% 6%;align-self:center}"]})}}return t})();var Cl=()=>["../"];function vl(t,m){t&1&&(i(0,"mat-error"),r(1),c(2,"translate"),c(3,"translate"),i(4,"strong"),r(5),c(6,"translate"),a()()),t&2&&(n(),V(" ",l(2,3,"labels.inputs.Transaction Date")," ",l(3,5,"labels.commons.is")," "),n(4),p(l(6,7,"labels.commons.required")))}function _l(t,m){if(t&1&&(i(0,"mat-option",9),r(1),a()),t&2){let e=m.$implicit;d("value",e.id),n(),f(" ",e.name," ")}}function hl(t,m){t&1&&(i(0,"mat-form-field")(1,"mat-label"),r(2),c(3,"translate"),a(),C(4,"input",17),a()),t&2&&(n(2),p(l(3,1,"labels.inputs.Account Number")))}function xl(t,m){t&1&&(i(0,"mat-form-field")(1,"mat-label"),r(2),c(3,"translate"),a(),C(4,"input",18),a()),t&2&&(n(2),p(l(3,1,"labels.inputs.Cheque")))}function bl(t,m){t&1&&(i(0,"mat-form-field")(1,"mat-label"),r(2),c(3,"translate"),a(),C(4,"input",19),a()),t&2&&(n(2),p(l(3,1,"labels.inputs.Routing Code")))}function Sl(t,m){t&1&&(i(0,"mat-form-field")(1,"mat-label"),r(2),c(3,"translate"),a(),C(4,"input",20),a()),t&2&&(n(2),p(l(3,1,"labels.inputs.Receipt Number")))}function Ml(t,m){t&1&&(i(0,"mat-form-field")(1,"mat-label"),r(2),c(3,"translate"),a(),C(4,"input",21),a()),t&2&&(n(2),p(l(3,1,"labels.inputs.Bank")))}var qn=(()=>{class t{constructor(){this.formBuilder=g(rt),this.route=g(E),this.router=g(z),this.dateUtils=g(j),this.savingsService=g(I),this.settingsService=g(U),this.minDate=new Date(2e3,0,1),this.maxDate=new Date,this.showPaymentDetails=!1,this.route.data.subscribe(e=>{this.transactionTemplateData=e.savingsAccountTransactionTemplate,e.savingsAccountTransactionTemplate.currency&&(this.currency=e.savingsAccountTransactionTemplate.currency),this.paymentTypeOptions=this.transactionTemplateData.paymentTypeOptions}),this.savingAccountId=this.route.snapshot.params.savingAccountId}ngOnInit(){this.maxDate=this.settingsService.businessDate,this.createEditTransactionForm(),this.editTransactionForm.patchValue({transactionDate:this.transactionTemplateData.date&&new Date(this.transactionTemplateData.date),transactionAmount:this.transactionTemplateData.amount,paymentTypeId:this.transactionTemplateData.paymentTypeId})}createEditTransactionForm(){this.editTransactionForm=this.formBuilder.group({transactionDate:["",H.required],transactionAmount:["",H.required],paymentTypeId:[""]})}addPaymentDetails(){this.showPaymentDetails=!this.showPaymentDetails,this.showPaymentDetails?(this.editTransactionForm.addControl("accountNumber",new Ct("")),this.editTransactionForm.addControl("checkNumber",new Ct("")),this.editTransactionForm.addControl("routingCode",new Ct("")),this.editTransactionForm.addControl("receiptNumber",new Ct("")),this.editTransactionForm.addControl("bankNumber",new Ct(""))):(this.editTransactionForm.removeControl("accountNumber"),this.editTransactionForm.removeControl("checkNumber"),this.editTransactionForm.removeControl("routingCode"),this.editTransactionForm.removeControl("receiptNumber"),this.editTransactionForm.removeControl("bankNumber"))}submit(){let e=this.editTransactionForm.value,s=this.settingsService.language.code,o=this.settingsService.dateFormat,u=this.editTransactionForm.value.transactionDate;e.transactionDate instanceof Date&&(e.transactionDate=this.dateUtils.formatDate(u,o));let x=Q(G({},e),{dateFormat:o,locale:s});this.savingsService.executeSavingsAccountTransactionsCommand(this.savingAccountId,"modify",x,this.transactionTemplateData.id).subscribe(B=>{this.router.navigate(["../"],{relativeTo:this.route})})}static{this.\u0275fac=function(s){return new(s||t)}}static{this.\u0275cmp=T({type:t,selectors:[["mifosx-edit-transaction"]],decls:40,vars:34,consts:[["dueDatePicker",""],[1,"container"],[3,"ngSubmit","formGroup"],[1,"layout-column"],[3,"click"],["matInput","","formControlName","transactionDate","required","",3,"min","max","matDatepicker"],["matSuffix","",3,"for"],[3,"currency","isRequired","inputFormControl","inputLabel"],["formControlName","paymentTypeId"],[3,"value"],[1,"flex-fill"],[1,"expandcollapsebutton","m-l-10","m-t-40","flex-75",3,"click"],[3,"className"],[1,"m-l-10"],[1,"layout-row","layout-xs-column","layout-align-center","gap-5px"],["type","button","mat-raised-button","",3,"routerLink"],["mat-raised-button","","color","primary",3,"disabled"],["type","number","formControlName","accountNumber","matInput",""],["type","number","formControlName","checkNumber","matInput",""],["formControlName","routingCode","matInput",""],["formControlName","receiptNumber","matInput",""],["formControlName","bankNumber","matInput",""]],template:function(s,o){if(s&1){let u=D();i(0,"div",1)(1,"mat-card")(2,"form",2),b("ngSubmit",function(){return S(u),M(o.submit())}),i(3,"mat-card-content",3)(4,"mat-form-field",4),b("click",function(){S(u);let B=w(11);return M(B.open())}),i(5,"mat-label"),r(6),c(7,"translate"),a(),C(8,"input",5)(9,"mat-datepicker-toggle",6)(10,"mat-datepicker",null,0),v(12,vl,7,9,"mat-error"),a(),C(13,"mifosx-input-amount",7),i(14,"mat-form-field")(15,"mat-label"),r(16),c(17,"translate"),a(),i(18,"mat-select",8),ut(19,_l,2,2,"mat-option",9,dt),a()(),i(21,"div",10)(22,"span",11),b("click",function(){return S(u),M(o.addPaymentDetails())}),i(23,"mat-slide-toggle")(24,"div",12)(25,"span",13),r(26),c(27,"translate"),a()()()()(),v(28,hl,5,3,"mat-form-field"),v(29,xl,5,3,"mat-form-field"),v(30,bl,5,3,"mat-form-field"),v(31,Sl,5,3,"mat-form-field"),v(32,Ml,5,3,"mat-form-field"),i(33,"mat-card-actions",14)(34,"button",15),r(35),c(36,"translate"),a(),i(37,"button",16),r(38),c(39,"translate"),a()()()()()()}if(s&2){let u=w(11);n(2),d("formGroup",o.editTransactionForm),n(4),p(l(7,23,"labels.inputs.Transaction Date")),n(2),d("min",o.minDate)("max",o.maxDate)("matDatepicker",u),n(),d("for",u),n(3),_(o.editTransactionForm.controls.transactionDate.hasError("required")?12:-1),n(),d("currency",o.currency)("isRequired",!0)("inputFormControl",o.editTransactionForm.controls.transactionAmount)("inputLabel","Transaction Amount"),n(3),p(l(17,25,"labels.inputs.Payment Type")),n(3),gt(o.paymentTypeOptions),n(5),d("className",o.showPaymentDetails?"enabled":"disabled"),n(2),p(l(27,27,"labels.inputs.Show Payment Details")),n(2),_(o.editTransactionForm.controls.accountNumber?28:-1),n(),_(o.editTransactionForm.controls.checkNumber?29:-1),n(),_(o.editTransactionForm.controls.routingCode?30:-1),n(),_(o.editTransactionForm.controls.receiptNumber?31:-1),n(),_(o.editTransactionForm.controls.bankNumber?32:-1),n(2),d("routerLink",k(33,Cl)),n(),f(" ",l(36,29,"labels.buttons.Cancel")," "),n(2),d("disabled",!o.editTransactionForm.valid),n(),f(" ",l(39,31,"labels.buttons.Submit")," ")}},dependencies:[P,O,it,et,ie,K,nt,lt,at,ot,q,J,ct,bt,Z,X,mt,vt,st,wt,It,ht,xt,_t,F,Re,Ie,y],styles:[".container[_ngcontent-%COMP%]{width:37rem}"]})}}return t})();function Al(t,m){if(t&1){let e=D();i(0,"th",13)(1,"mat-checkbox",14),b("change",function(){S(e);let o=h(2);return M(o.toggleSelects())}),Zn("ngModelChange",function(o){S(e);let u=h(2);return Xn(u.selectAllItems,o)||(u.selectAllItems=o),M(o)}),a()()}if(t&2){let e=h(2);n(),Jn("ngModel",e.selectAllItems)}}function Tl(t,m){if(t&1){let e=D();i(0,"td",15)(1,"mat-checkbox",14),b("change",function(){S(e);let o=h(2);return M(o.toggleSelect())}),Zn("ngModelChange",function(o){let u=S(e).$implicit;return Xn(u.selected,o)||(u.selected=o),M(o)}),a()()}if(t&2){let e=m.$implicit;n(),Jn("ngModel",e.selected)}}function Pl(t,m){t&1&&(i(0,"th",13),r(1),c(2,"translate"),a()),t&2&&(n(),p(l(2,1,"labels.inputs.Client ID")))}function Ol(t,m){if(t&1&&(i(0,"td",15),r(1),a()),t&2){let e=m.$implicit;n(),p(e.id)}}function Dl(t,m){t&1&&(i(0,"th",13),r(1),c(2,"translate"),a()),t&2&&(n(),p(l(2,1,"labels.inputs.Client Name")))}function yl(t,m){if(t&1&&(i(0,"td",15),r(1),a()),t&2){let e=m.$implicit;n(),p(e.displayName)}}function Il(t,m){t&1&&C(0,"tr",16)}function wl(t,m){t&1&&C(0,"tr",17)}function El(t,m){if(t&1&&(i(0,"div")(1,"table",5),N(2,6),A(3,Al,2,1,"th",7)(4,Tl,2,1,"td",8),R(),N(5,9),A(6,Pl,3,3,"th",7)(7,Ol,2,1,"td",8),R(),N(8,10),A(9,Dl,3,3,"th",7)(10,yl,2,1,"td",8),R(),A(11,Il,1,0,"tr",11)(12,wl,1,0,"tr",12),a()()),t&2){let e=h();n(),d("dataSource",e.dataSource),n(10),d("matHeaderRowDef",e.displayedColumn),n(),d("matRowDefColumns",e.displayedColumn)}}var ze=(()=>{class t{constructor(){this.selectAllItems=!1,this.displayedColumn=["check","id","name"]}ngOnInit(){this.dataSource=new Jt(this.activeClientMembers)}get selectedClientMembers(){return{selectedMembers:this.activeClientMembers.filter(e=>e.selected)}}toggleSelects(){for(let e of this.activeClientMembers)e.selected=this.selectAllItems}toggleSelect(){let e=this.activeClientMembers.length;this.selectAllItems=e===0?!1:this.activeClientMembers.filter(s=>s.selected).length===e}static{this.\u0275fac=function(s){return new(s||t)}}static{this.\u0275cmp=T({type:t,selectors:[["mifosx-savings-active-client-members"]],inputs:{activeClientMembers:"activeClientMembers"},decls:10,vars:8,consts:[[1,"layout-row","responsive-column","align-center","gap-2px","margin-t"],["mat-raised-button","","matStepperPrevious",""],["icon","arrow-left",1,"m-r-10"],["mat-raised-button","","matStepperNext","",3,"disabled"],["icon","arrow-right",1,"m-l-10"],["mat-table","",1,"flex-98",3,"dataSource"],["matColumnDef","check"],["mat-header-cell","",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","id"],["matColumnDef","name"],["mat-header-row","",4,"matHeaderRowDef"],["mat-row","",4,"matRowDef","matRowDefColumns"],["mat-header-cell",""],[3,"change","ngModelChange","ngModel"],["mat-cell",""],["mat-header-row",""],["mat-row",""]],template:function(s,o){s&1&&(v(0,El,13,3,"div"),i(1,"div",0)(2,"button",1),C(3,"fa-icon",2),r(4),c(5,"translate"),a(),i(6,"button",3),r(7),c(8,"translate"),C(9,"fa-icon",4),a()()),s&2&&(_(o.activeClientMembers?0:-1),n(4),f(" ",l(5,4,"labels.buttons.Previous")," "),n(2),d("disabled",o.selectedClientMembers.selectedMembers.length===0),n(),f(" ",l(8,6,"labels.buttons.Next")," "))},dependencies:[P,O,K,F,Ce,Lt,qt,Ut,Ht,Mi,bi,Gt,zt,jt,Wt,$t,Qt,le,St,_e,y],styles:["table[_ngcontent-%COMP%]{width:100%}.mat-elevation-z1[_ngcontent-%COMP%]{margin:1em 0 1.5em}.margin-t[_ngcontent-%COMP%]{margin-top:1em}"]})}}return t})();function Fl(t,m){t&1&&C(0,"fa-icon",15)}function kl(t,m){t&1&&C(0,"fa-icon",15)}function Bl(t,m){t&1&&C(0,"fa-icon",16)}function Nl(t,m){t&1&&C(0,"fa-icon",17)}function Rl(t,m){t&1&&C(0,"fa-icon",18)}function Vl(t,m){t&1&&(r(0),c(1,"translate")),t&2&&p(l(1,1,"labels.inputs.DETAILS"))}function Ll(t,m){t&1&&(r(0),c(1,"translate")),t&2&&p(l(1,1,"labels.inputs.TERMS"))}function Gl(t,m){t&1&&(r(0),c(1,"translate")),t&2&&p(l(1,1,"labels.inputs.CHARGES"))}function Ul(t,m){t&1&&(r(0),c(1,"translate")),t&2&&p(l(1,1,"labels.heading.Active Client Members"))}function ql(t,m){t&1&&(r(0),c(1,"translate")),t&2&&p(l(1,1,"labels.inputs.PREVIEW"))}function Hl(t,m){if(t&1){let e=D();i(0,"mat-step",14),A(1,ql,2,3,"ng-template",9),i(2,"mifosx-savings-account-preview-step",19),b("submitEvent",function(){S(e);let o=h();return M(o.submit())}),a()()}if(t&2){let e=h();n(2),d("savingsAccountProductTemplate",e.savingsAccountProductTemplate)("savingsAccountTemplate",e.savingsAccountTemplate)("savingsAccountTermsForm",e.savingsAccountTermsForm)("savingsAccount",e.savingsAccount)("activeClientMembers",e.activeClientMembers)}}var Hn=(()=>{class t{constructor(){this.route=g(E),this.router=g(z),this.dateUtils=g(j),this.savingsService=g(I),this.settingsService=g(U),this.route.data.subscribe(e=>{this.savingsAccountTemplate=e.savingsAccountTemplate,this.dataSource=e.groupsData.activeClientMembers})}setTemplate(e){this.savingsAccountProductTemplate=e}get savingsAccountDetailsForm(){return this.savingsAccountDetailsStep.savingsAccountDetailsForm}get savingsAccountTermsForm(){return this.savingsAccountTermsStep.savingsAccountTermsForm}get activeClientMembers(){return this.dataSource}get savingsAccountFormValid(){return this.savingsAccountDetailsForm.valid&&this.savingsAccountTermsForm.valid&&this.activeClientMembers.filter(e=>e.selected).length>0}get savingsAccount(){return this.selectedMembers=this.savingsActiveClientMembers.selectedClientMembers,G(G(G({},this.savingsAccountDetailsStep.savingsAccountDetails),this.savingsAccountTermsStep.savingsAccountTerms),this.savingsAccountChargesStep.savingsAccountCharges)}setData(e,s){let o=this.settingsService.language.code,u=this.settingsService.dateFormat,B=Q(G({},this.savingsAccount),{charges:this.savingsAccount.charges.map(Yt=>({chargeId:Yt.id,amount:Yt.amount})),clientId:e.id,isGSIM:!0,isParentAccount:s,submittedOnDate:this.dateUtils.formatDate(this.savingsAccount.submittedOnDate,u),dateFormat:u,monthDayFormat:"dd MMMM",locale:o});return B.groupId=this.savingsAccountTemplate.groupId,B}buildRequestData(){let e=[],s=this.selectedMembers.selectedMembers;for(let o=0;o<1;o++)e.push(this.setData(s[o],!0));for(let o=1;o{this.router.navigate(["../",o.resourceId],{relativeTo:this.route})})}static{this.\u0275fac=function(s){return new(s||t)}}static{this.\u0275cmp=T({type:t,selectors:[["mifosx-create-gsim-account"]],viewQuery:function(s,o){if(s&1&&(Pt(oe,7),Pt(re,7),Pt(ce,7),Pt(ze,7)),s&2){let u;Ot(u=Dt())&&(o.savingsAccountDetailsStep=u.first),Ot(u=Dt())&&(o.savingsAccountTermsStep=u.first),Ot(u=Dt())&&(o.savingsAccountChargesStep=u.first),Ot(u=Dt())&&(o.savingsActiveClientMembers=u.first)}},decls:21,vars:11,consts:[["savingProductStepper",""],[1,"container"],["orientation","vertical","labelPosition","bottom",1,"mat-elevation-z8",3,"linear"],["matStepperIcon","number"],["matStepperIcon","edit"],["matStepperIcon","done"],["matStepperIcon","error"],["matStepperIcon","preview"],[3,"stepControl"],["matStepLabel",""],[3,"savingsAccountProductTemplate","savingsAccountTemplate"],[3,"savingsAccountProductTemplate"],[3,"savingsAccountProductTemplate","savingsAccountTemplate","currencyCode","activeClientMembers"],[3,"activeClientMembers"],["completed",""],["icon","pencil-alt","size","sm"],["icon","check","size","sm"],["icon","exclamation-triangle","size","lg"],["icon","eye","size","sm"],[3,"submitEvent","savingsAccountProductTemplate","savingsAccountTemplate","savingsAccountTermsForm","savingsAccount","activeClientMembers"]],template:function(s,o){if(s&1){let u=D();i(0,"div",1)(1,"mat-stepper",2,0),A(3,Fl,1,0,"ng-template",3)(4,kl,1,0,"ng-template",4)(5,Bl,1,0,"ng-template",5)(6,Nl,1,0,"ng-template",6)(7,Rl,1,0,"ng-template",7),i(8,"mat-step",8),A(9,Vl,2,3,"ng-template",9),i(10,"mifosx-savings-account-details-step",10),b("savingsAccountProductTemplate",function(B){return S(u),M(o.setTemplate(B))}),a()(),i(11,"mat-step",8),A(12,Ll,2,3,"ng-template",9),C(13,"mifosx-savings-account-terms-step",11),a(),i(14,"mat-step"),A(15,Gl,2,3,"ng-template",9),C(16,"mifosx-savings-account-charges-step",12),a(),i(17,"mat-step"),A(18,Ul,2,3,"ng-template",9),C(19,"mifosx-savings-active-client-members",13),a(),v(20,Hl,3,5,"mat-step",14),a()()}s&2&&(n(),d("linear",!1),n(7),d("stepControl",o.savingsAccountDetailsForm),n(2),d("savingsAccountTemplate",o.savingsAccountTemplate),n(),d("stepControl",o.savingsAccountTermsForm),n(2),d("savingsAccountProductTemplate",o.savingsAccountProductTemplate),n(3),d("savingsAccountProductTemplate",o.savingsAccountProductTemplate)("savingsAccountTemplate",o.savingsAccountTemplate)("currencyCode",o.savingsAccountTermsForm.get("currencyCode"))("activeClientMembers",o.activeClientMembers),n(3),d("activeClientMembers",o.activeClientMembers),n(),_(o.savingsAccountFormValid?20:-1))},dependencies:[P,O,ke,Ee,St,Fe,we,oe,re,ce,ze,be,y],encapsulation:2})}}return t})();var zl=()=>[10,20,25],jl=t=>["../","savings-accounts",t,"actions","Deposit"],$l=t=>["../","savings-accounts",t,"actions","Withdrawal"],Wl=t=>["../../../","savings-accounts",t,"actions","Approve"],Ql=t=>["../../../","savings-accounts",t,"actions","Undo Approval"],Kl=t=>["../../",t,"actions","Activate"],Yl=t=>["../../",t,"transactions"];function Jl(t,m){t&1&&(i(0,"th",13),r(1),c(2,"translate"),c(3,"translate"),a()),t&2&&(n(),V(" ",l(2,2,"labels.inputs.Client")," ",l(3,4,"labels.inputs.Details")," "))}function Xl(t,m){if(t&1&&(i(0,"td",14),r(1),a()),t&2){let e=m.$implicit;n(),f(" ",e.displayName," ")}}function Zl(t,m){t&1&&(i(0,"th",13),r(1),c(2,"translate"),a()),t&2&&(n(),p(l(2,1,"labels.inputs.Saving Account")))}function tm(t,m){if(t&1&&(i(0,"td",14),C(1,"i",15),c(2,"statusLookup"),r(3),a()),t&2){let e=m.$implicit;n(),d("ngClass",l(2,3,e.status.code))("matTooltip",e.status.value),n(2),f(" ",e.accountNo," ")}}function em(t,m){t&1&&(i(0,"th",13),r(1),c(2,"translate"),a()),t&2&&(n(),p(l(2,1,"labels.menus.Products")))}function nm(t,m){if(t&1&&(i(0,"td",14),r(1),a()),t&2){let e=m.$implicit;n(),p(e.productName)}}function im(t,m){t&1&&(i(0,"th",13),r(1),c(2,"translate"),a()),t&2&&(n(),p(l(2,1,"labels.inputs.Balance")))}function am(t,m){t&1&&C(0,"td",14)}function om(t,m){t&1&&(i(0,"th",13),r(1),c(2,"translate"),a()),t&2&&(n(),p(l(2,1,"labels.inputs.Actions")))}function rm(t,m){if(t&1){let e=D();i(0,"button",17),b("click",function(o){S(e);let u=h(2);return M(u.routeEdit(o))}),C(1,"i",18),c(2,"translate"),a()}if(t&2){let e=h().$implicit;d("routerLink",kt(5,jl,e.id)),n(),d("matTooltip",ft(l(2,3,"tooltips.Deposit")))}}function cm(t,m){if(t&1){let e=D();i(0,"button",17),b("click",function(o){S(e);let u=h(2);return M(u.routeEdit(o))}),C(1,"i",19),c(2,"translate"),a()}if(t&2){let e=h().$implicit;d("routerLink",kt(5,$l,e.id)),n(),d("matTooltip",ft(l(2,3,"tooltips.Withdraw")))}}function sm(t,m){if(t&1){let e=D();i(0,"button",17),b("click",function(o){S(e);let u=h(2);return M(u.routeEdit(o))}),C(1,"i",20),c(2,"translate"),a()}if(t&2){let e=h().$implicit;d("routerLink",kt(5,Wl,e.id)),n(),d("matTooltip",ft(l(2,3,"tooltips.Approve")))}}function lm(t,m){if(t&1){let e=D();i(0,"button",17),b("click",function(o){S(e);let u=h(2);return M(u.routeEdit(o))}),C(1,"i",21),c(2,"translate"),a()}if(t&2){let e=h().$implicit;d("routerLink",kt(5,Ql,e.id)),n(),d("matTooltip",ft(l(2,3,"tooltips.Undo Approval")))}}function mm(t,m){if(t&1){let e=D();i(0,"button",17),b("click",function(o){S(e);let u=h(2);return M(u.routeEdit(o))}),C(1,"i",22),c(2,"translate"),a()}if(t&2){let e=h().$implicit;d("routerLink",kt(5,Kl,e.id)),n(),d("matTooltip",ft(l(2,3,"tooltips.Activate")))}}function pm(t,m){if(t&1&&(i(0,"td",14),v(1,rm,3,7,"button",16),v(2,cm,3,7,"button",16),v(3,sm,3,7,"button",16),v(4,lm,3,7,"button",16),v(5,mm,3,7,"button",16),a()),t&2){let e=m.$implicit;n(),_(e.status.active?1:-1),n(),_(e.status.active?2:-1),n(),_(e.status.submittedAndPendingApproval?3:-1),n(),_(!e.status.submittedAndPendingApproval&&!e.status.active?4:-1),n(),_(!e.status.submittedAndPendingApproval&&!e.status.active?5:-1)}}function dm(t,m){t&1&&C(0,"tr",23)}function um(t,m){if(t&1&&C(0,"tr",24),t&2){let e=m.$implicit;d("routerLink",kt(1,Yl,e.id))}}var zn=(()=>{class t{constructor(){this.route=g(E),this.dialog=g(yt),this.displayedColumns=["clientDetails","savingsAccount","products","balance","Actions"],this.route.data.subscribe(e=>{this.gsimOverviewData=e.gsimData[0].childGSIMAccounts,this.savingAccountData=e.savingAccountData,this.groupsData=e.groupsData})}ngOnInit(){this.setLoanClientChargeOverview()}setLoanClientChargeOverview(){this.dataSource=new Jt(this.gsimOverviewData)}routeEdit(e){e.stopPropagation()}static{this.\u0275fac=function(s){return new(s||t)}}static{this.\u0275cmp=T({type:t,selectors:[["mifosx-gsim-account"]],viewQuery:function(s,o){if(s&1&&Pt(ye,7),s&2){let u;Ot(u=Dt())&&(o.paginator=u.first)}},decls:24,vars:8,consts:[[1,"tab-container","mat-typography"],[1,"content-container"],["mat-table","",3,"dataSource"],["matColumnDef","clientDetails"],["mat-header-cell","",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","savingsAccount"],["matColumnDef","products"],["matColumnDef","balance"],["matColumnDef","Actions"],["mat-header-row","",4,"matHeaderRowDef"],["mat-row","",3,"routerLink",4,"matRowDef","matRowDefColumns"],["showFirstLastButtons","",3,"pageSizeOptions"],["mat-header-cell",""],["mat-cell",""],[1,"fa","fa-stop",3,"ngClass","matTooltip"],["mat-raised-button","","color","primary",1,"account-action-button",3,"routerLink"],["mat-raised-button","","color","primary",1,"account-action-button",3,"click","routerLink"],[1,"fa","fa-arrow-up",3,"matTooltip"],[1,"fa","fa-arrow-down",3,"matTooltip"],[1,"fa","fa-check",3,"matTooltip"],[1,"fa","fa-undo",3,"matTooltip"],[1,"fa","fa-check-circle",3,"matTooltip"],["mat-header-row",""],["mat-row","",3,"routerLink"]],template:function(s,o){s&1&&(i(0,"div",0)(1,"div",1)(2,"h2"),r(3),c(4,"translate"),a(),i(5,"table",2),N(6,3),A(7,Jl,4,6,"th",4)(8,Xl,2,1,"td",5),R(),N(9,6),A(10,Zl,3,3,"th",4)(11,tm,4,5,"td",5),R(),N(12,7),A(13,em,3,3,"th",4)(14,nm,2,1,"td",5),R(),N(15,8),A(16,im,3,3,"th",4)(17,am,1,0,"td",5),R(),N(18,9),A(19,om,3,3,"th",4)(20,pm,6,5,"td",5),R(),A(21,dm,1,0,"tr",10)(22,um,1,3,"tr",11),a(),C(23,"mat-paginator",12),a()()),s&2&&(n(3),p(l(4,5,"labels.heading.GSIM Account Overview")),n(2),d("dataSource",o.dataSource),n(16),d("matHeaderRowDef",o.displayedColumns),n(),d("matRowDefColumns",o.displayedColumns),n(),d("pageSizeOptions",k(7,zl)))},dependencies:[P,de,O,q,F,Lt,qt,Ut,Ht,Gt,zt,fe,jt,Wt,$t,Qt,ye,y,ln],styles:[".tab-container[_ngcontent-%COMP%]{padding:1%;margin:1%}.tab-container[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{margin:1% auto}.tab-container[_ngcontent-%COMP%] .content-container[_ngcontent-%COMP%]{margin-top:5px}.tab-container[_ngcontent-%COMP%] .group-details-container[_ngcontent-%COMP%]{border:1px solid;padding:1%}.tab-container[_ngcontent-%COMP%] .action-button[_ngcontent-%COMP%]{margin-left:auto}.tab-container[_ngcontent-%COMP%] table[_ngcontent-%COMP%]{width:100%}.tab-container[_ngcontent-%COMP%] table[_ngcontent-%COMP%] .account-action-button[_ngcontent-%COMP%]{min-width:26px;padding:0 6px;margin:4px;line-height:25px}.tab-container[_ngcontent-%COMP%] table[_ngcontent-%COMP%] tr.select-row[_ngcontent-%COMP%]:hover, .tab-container[_ngcontent-%COMP%] i[_ngcontent-%COMP%]:hover, .tab-container[_ngcontent-%COMP%] tr[_ngcontent-%COMP%]:hover{cursor:pointer}"]})}}return t})();var ri=(()=>{class t{constructor(){this.savingsService=g(I)}resolve(e){let s=e.parent.parent.paramMap.get("id"),o=e.paramMap.get("datatableName");return this.savingsService.getSavingsTransactionDatatable(s,o)}static{this.\u0275fac=function(s){return new(s||t)}}static{this.\u0275prov=At({token:t,factory:t.\u0275fac})}}return t})();var ci=(()=>{class t{constructor(){this.savingsService=g(I)}resolve(e){return this.savingsService.getSavingsTransactionDatatables()}static{this.\u0275fac=function(s){return new(s||t)}}static{this.\u0275prov=At({token:t,factory:t.\u0275fac})}}return t})();var jn=(()=>{class t{constructor(){this.savingsService=g(I)}resolve(e){let s=e.paramMap.get("clientId")||e.paramMap.get("groupId")||e.paramMap.get("centerId"),o=!!(e.paramMap.get("groupId")||e.paramMap.get("centerId"));return this.savingsService.getSavingsAccountTemplate(s,void 0,o)}static{this.\u0275fac=function(s){return new(s||t)}}static{this.\u0275prov=At({token:t,factory:t.\u0275fac})}}return t})();var si=(()=>{class t{constructor(){this.savingsService=g(I)}resolve(e){let s=e.paramMap.get("savingAccountId");return this.savingsService.getSavingsAccountAndTemplate(s,!0)}static{this.\u0275fac=function(s){return new(s||t)}}static{this.\u0275prov=At({token:t,factory:t.\u0275fac})}}return t})();var li=(()=>{class t{constructor(){this.savingsService=g(I)}resolve(e){let s=e.parent.paramMap.get("savingAccountId"),o=e.parent.paramMap.get("id");return this.savingsService.getSavingsAccountTransaction(s,o)}static{this.\u0275fac=function(s){return new(s||t)}}static{this.\u0275prov=At({token:t,factory:t.\u0275fac})}}return t})();var mi=(()=>{class t{constructor(){this.savingsService=g(I)}resolve(e){let s=e.parent.paramMap.get("savingAccountId"),o=e.paramMap.get("id");return this.savingsService.getSavingsAccountCharge(s,o)}static{this.\u0275fac=function(s){return new(s||t)}}static{this.\u0275prov=At({token:t,factory:t.\u0275fac})}}return t})();var pi=(()=>{class t{constructor(){this.savingsService=g(I)}resolve(e){let s=e.paramMap.get("name"),o=e.paramMap.get("savingAccountId")||e.parent.parent.paramMap.get("savingAccountId");switch(s){case"Assign Staff":return this.savingsService.getSavingsAccountAndTemplate(o,!0);case"Add Charge":return this.savingsService.getSavingsChargeTemplateResource(o);case"Withdrawal":case"Deposit":case"Hold Amount":return this.savingsService.getSavingsTransactionTemplateResource(o);case"Close":return fi([this.savingsService.getSavingsTransactionTemplateResource(o),this.savingsService.getSavingsAccountData(o)]);case"Apply Annual Fees":return this.savingsService.getSavingsAccountData(o);default:return}}static{this.\u0275fac=function(s){return new(s||t)}}static{this.\u0275prov=At({token:t,factory:t.\u0275fac})}}return t})();var di=(()=>{class t{constructor(){this.reportsService=g(dn),this.settingsService=g(U)}resolve(e){let o={"output-type":"PDF",R_transactionId:e.paramMap.get("id")};return this.reportsService.getPentahoRunReportData("Savings Transaction Receipt",o,"default",this.settingsService.language.code,this.settingsService.dateFormat)}static{this.\u0275fac=function(s){return new(s||t)}}static{this.\u0275prov=At({token:t,factory:t.\u0275fac})}}return t})();var ui=(()=>{class t{constructor(){this.savingsService=g(I)}resolve(e){let s=e.parent.paramMap.get("savingAccountId"),o=e.paramMap.get("id");return this.savingsService.getSavingsAccountTransactionTemplate(s,o)}static{this.\u0275fac=function(s){return new(s||t)}}static{this.\u0275prov=At({token:t,factory:t.\u0275fac})}}return t})();var gi=(()=>{class t{constructor(){this.savingsService=g(I)}resolve(e){let s=e.paramMap.get("groupId"),o=e.paramMap.get("savingAccountId");return this.savingsService.getGSIMAccountData(o,s)}static{this.\u0275fac=function(s){return new(s||t)}}static{this.\u0275prov=At({token:t,factory:t.\u0275fac})}}return t})();var $n=(()=>{class t{constructor(){this.route=g(E),this.savingsService=g(I),this.settingsService=g(U),this.dialog=g(yt),this.entityType="savings",this.route.data.subscribe(e=>{this.setSavingsDocumentsData(e.savingsDocuments)}),this.entityId=this.route.parent.snapshot.paramMap.get("savingAccountId")}setSavingsDocumentsData(e){e.forEach(s=>{s.docUrl=this.settingsService.serverUrl+"/savings/"+s.parentEntityId+"/documents/"+s.id+"/attachment?tenantIdentifier="+Xe.fineractPlatformTenantId,s.fileName&&(s.fileName.toLowerCase().indexOf(".jpg")!==-1||s.fileName.toLowerCase().indexOf(".jpeg")!==-1||s.fileName.toLowerCase().indexOf(".png")!==-1)&&(s.fileIsImage=!0),s.type&&s.type.toLowerCase().indexOf("image")!==-1&&(s.fileIsImage=!0)}),this.entityDocuments=e}uploadDocument(e){return this.savingsService.loadSavingsDocument(this.entityId,e)}deleteDocument(e){this.savingsService.deleteSavingsDocument(this.entityId,e).subscribe(s=>{})}static{this.\u0275fac=function(s){return new(s||t)}}static{this.\u0275cmp=T({type:t,selectors:[["mifosx-savings-documents-tab"]],decls:1,vars:5,consts:[[3,"entityType","entityId","entityDocuments","callbackUpload","callbackDelete"]],template:function(s,o){s&1&&C(0,"mifosx-entity-documents-tab",0),s&2&&d("entityType",o.entityType)("entityId",o.entityId)("entityDocuments",o.entityDocuments)("callbackUpload",o.uploadDocument)("callbackDelete",o.deleteDocument)},dependencies:[P,O,ki],encapsulation:2})}}return t})();var Wn=(()=>{class t{constructor(){this.route=g(E),this.savingsService=g(I),this.authenticationService=g(xi);let e=this.authenticationService.getCredentials();this.username=e.username,this.entityId=this.route.parent.snapshot.params.savingAccountId,this.route.data.subscribe(s=>{this.entityNotes=s.savingAccountNotes})}addNote(e){this.savingsService.createSavingsNote(this.entityId,e).subscribe(s=>{this.entityNotes.push({id:s.resourceId,createdByUsername:this.username,createdOn:new Date,note:e.note})})}editNote(e,s,o){this.savingsService.editSavingsNote(this.entityId,e,s).subscribe(()=>{this.entityNotes[o].note=s.note})}deleteNote(e,s){this.savingsService.deleteSavingsNote(this.entityId,e).subscribe(()=>{this.entityNotes.splice(s,1)})}static{this.\u0275fac=function(s){return new(s||t)}}static{this.\u0275cmp=T({type:t,selectors:[["mifosx-notes-tab"]],decls:1,vars:5,consts:[[3,"entityId","entityNotes","callbackAdd","callbackEdit","callbackDelete"]],template:function(s,o){s&1&&C(0,"mifosx-entity-notes-tab",0),s&2&&d("entityId",o.entityId)("entityNotes",o.entityNotes)("callbackAdd",o.addNote)("callbackEdit",o.editNote)("callbackDelete",o.deleteNote)},dependencies:[P,O,Fi],encapsulation:2})}}return t})();var Hi=(()=>{class t{constructor(){this.savingsService=g(I)}resolve(e){let s=e.parent.paramMap.get("savingAccountId");return this.savingsService.getSavingsNotes(s)}static{this.\u0275fac=function(s){return new(s||t)}}static{this.\u0275prov=At({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();var zi=(()=>{class t{constructor(){this.savingsService=g(I)}resolve(e){let s=e.parent.paramMap.get("savingAccountId");return this.savingsService.getSavingsDocuments(s)}static{this.\u0275fac=function(s){return new(s||t)}}static{this.\u0275prov=At({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();var gm=()=>({confirm:!0}),Qn=(()=>{class t{constructor(){this.dialogRef=g(Xt)}static{this.\u0275fac=function(s){return new(s||t)}}static{this.\u0275cmp=T({type:t,selectors:[["mifosx-release-amount-dialog"]],decls:14,vars:14,consts:[["mat-dialog-title",""],["mat-dialog-content",""],["align","end"],["mat-raised-button","","mat-dialog-close",""],["mat-raised-button","","color","warn",3,"mat-dialog-close"]],template:function(s,o){s&1&&(i(0,"h1",0),r(1),c(2,"translate"),a(),i(3,"div",1)(4,"p"),r(5),c(6,"translate"),a()(),i(7,"mat-dialog-actions",2)(8,"button",3),r(9),c(10,"translate"),a(),i(11,"button",4),r(12),c(13,"translate"),a()()),s&2&&(n(),p(l(2,5,"labels.heading.Release Amount")),n(4),p(l(6,7,"labels.text.Are you sure you want to release this amount")),n(4),p(l(10,9,"labels.buttons.Cancel")),n(2),d("mat-dialog-close",k(13,gm)),n(),f(" ",l(13,11,"labels.buttons.Confirm")," "))},dependencies:[P,O,F,te,ee,ne,Zt,y],encapsulation:2})}}return t})();var fm=()=>["../../"];function Cm(t,m){t&1&&(i(0,"button",10),C(1,"fa-icon",11),r(2),c(3,"translate"),a()),t&2&&(d("routerLink","edit"),n(2),f("",l(3,2,"labels.buttons.Edit")," "))}function vm(t,m){if(t&1&&(i(0,"span"),v(1,Cm,4,4,"button",10),a()),t&2){let e=h(2);n(),_(e.transactionData.transactionType.value==="Transfer"||e.transactionData.reversed==="true"||e.transactionData.transactionType.id===3||e.transactionData.transactionType.id===17?1:-1)}}function _m(t,m){t&1&&(i(0,"span"),A(1,vm,2,1,"span",9),a()),t&2&&(n(),d("mifosxHasPermission","ADJUSTTRANSACTION_SAVINGSACCOUNT"))}function hm(t,m){if(t&1){let e=D();i(0,"button",13),b("click",function(){S(e);let o=h(2);return M(o.releaseAmount())}),C(1,"fa-icon",14),r(2),c(3,"translate"),a()}t&2&&(n(2),f("",l(3,1,"labels.buttons.Release Amount")," "))}function xm(t,m){t&1&&(i(0,"span"),A(1,hm,4,3,"button",12),a()),t&2&&(n(),d("mifosxHasPermission","RELEASEAMOUNT_SAVINGSACCOUNT"))}function bm(t,m){if(t&1){let e=D();i(0,"button",16),b("click",function(){S(e);let o=h(2);return M(o.undoTransaction())}),C(1,"fa-icon",17),r(2),c(3,"translate"),a()}t&2&&(n(2),f("",l(3,1,"labels.buttons.Undo")," "))}function Sm(t,m){t&1&&(i(0,"span"),A(1,bm,4,3,"button",15),a()),t&2&&(n(),d("mifosxHasPermission","UNDOTRANSACTION_SAVINGSACCOUNT"))}function Mm(t,m){t&1&&(i(0,"div",4),r(1),c(2,"translate"),a()),t&2&&(n(),f(" ",l(2,1,"labels.inputs.Note")," "))}function Am(t,m){if(t&1&&(i(0,"div",5),r(1),a()),t&2){let e=h();n(),f(" ",e.transactionData.note," ")}}function Tm(t,m){if(t&1&&C(0,"mifosx-transaction-payment-detail",6),t&2){let e=h();d("paymentDetailData",e.transactionData.paymentDetailData)}}var Kn=(()=>{class t{constructor(){this.savingsService=g(I),this.route=g(E),this.dateUtils=g(j),this.router=g(z),this.dialog=g(yt),this.settingsService=g(U),this.route.data.subscribe(e=>{this.accountId=this.route.parent.snapshot.params.savingAccountId,this.transactionData=e.savingsAccountTransaction})}allowUndo(){return this.transactionData.reversed&&this.transactionData.transactionType.amountHold?!1:!this.transactionData.reversed}releaseAmount(){this.dialog.open(Qn).afterClosed().subscribe(s=>{if(s.confirm){let o={};this.savingsService.executeSavingsAccountTransactionsCommand(this.accountId,"releaseAmount",o,this.transactionData.id).subscribe(()=>{this.router.navigate(["../.."],{relativeTo:this.route})})}})}undoTransaction(){this.dialog.open(Ve).afterClosed().subscribe(s=>{if(s.confirm){let o=this.settingsService.language.code,u=this.settingsService.dateFormat,x={transactionDate:this.dateUtils.formatDate(this.transactionData.date&&new Date(this.transactionData.date),u),transactionAmount:0,dateFormat:u,locale:o};this.savingsService.executeSavingsAccountTransactionsCommand(this.accountId,"undo",x,this.transactionData.id).subscribe(()=>{this.router.navigate(["../.."],{relativeTo:this.route})})}})}transactionColor(){return this.transactionData.reversed?"undo":"active"}static{this.\u0275fac=function(s){return new(s||t)}}static{this.\u0275cmp=T({type:t,selectors:[["mifosx-savings-transaction-general-tab"]],decls:44,vars:42,consts:[["align","end",1,"container","transaction-buttons","m-b-20","align-end-center","gap-2percent"],[1,"container"],[1,"layout-row-wrap","card-content"],[1,"flex-100",3,"ngClass"],[1,"flex-50","mat-body-strong"],[1,"flex-50"],[3,"paymentDetailData"],[1,"layout-row","layout-align-center","gap-2percent","column-on-mobile"],["type","button","mat-raised-button","","color","primary",3,"routerLink"],[4,"mifosxHasPermission"],["mat-raised-button","","color","primary",3,"routerLink"],["icon","edit",1,"m-r-10"],["mat-raised-button","","color","primary",3,"click",4,"mifosxHasPermission"],["mat-raised-button","","color","primary",3,"click"],["icon","lock-open",1,"m-r-10"],["mat-raised-button","","color","warn",3,"click",4,"mifosxHasPermission"],["mat-raised-button","","color","warn",3,"click"],["icon","undo",1,"m-r-10"]],template:function(s,o){s&1&&(i(0,"div",0),v(1,_m,2,1,"span"),v(2,xm,2,1,"span"),v(3,Sm,2,1,"span"),a(),i(4,"div",1)(5,"mat-card")(6,"mat-card-content")(7,"div",2),C(8,"div",3),i(9,"div",4),r(10),c(11,"translate"),a(),i(12,"div",5),r(13),a(),i(14,"div",4),r(15),c(16,"translate"),a(),i(17,"div",5),r(18),c(19,"translateKey"),a(),i(20,"div",4),r(21),c(22,"translate"),a(),i(23,"div",5),r(24),c(25,"dateFormat"),a(),i(26,"div",4),r(27),c(28,"translate"),a(),i(29,"div",5),r(30),a(),i(31,"div",4),r(32),c(33,"translate"),a(),i(34,"div",5),r(35),c(36,"currency"),a(),v(37,Mm,3,3,"div",4),v(38,Am,2,1,"div",5),v(39,Tm,1,1,"mifosx-transaction-payment-detail",6),a(),i(40,"div",7)(41,"button",8),r(42),c(43,"translate"),a()()()()()),s&2&&(n(),_(o.transactionData.interestedPostedAsOn===!1&&(o.transactionData.transactionType.id===17||o.transactionData.transactionType.id===3)?-1:1),n(),_(!o.transactionData.reversed&&o.transactionData.transactionType.amountHold?2:-1),n(),_(o.allowUndo()?3:-1),n(5),d("ngClass",o.transactionColor()),n(2),f(" ",l(11,19,"labels.inputs.Id")," "),n(3),f(" ",o.transactionData.id," "),n(2),f(" ",l(16,21,"labels.inputs.Transaction Type")," "),n(3),f(" ",Mt(19,23,o.transactionData.transactionType.value,"catalogs")," "),n(3),f(" ",l(22,26,"labels.inputs.Transaction Date")," "),n(3),f(" ",l(25,28,o.transactionData.date)," "),n(3),f(" ",l(28,30,"labels.inputs.Currency")," "),n(3),f(" ",o.transactionData.currency.displayLabel," "),n(2),f(" ",l(33,32,"labels.inputs.Amount")," "),n(3),f(" ",tt(36,34,o.transactionData.amount,o.transactionData.currency.code,"symbol-narrow","1.2-2")," "),n(2),_(o.transactionData.note?37:-1),n(),_(o.transactionData.note?38:-1),n(),_(o.transactionData.paymentDetailData?39:-1),n(2),d("routerLink",k(41,fm)),n(),f(" ",l(43,39,"labels.buttons.Back")," "))},dependencies:[P,de,O,q,J,ct,F,Rt,St,Ri,ue,Bt,y,Nt],styles:["body[_ngcontent-%COMP%] table[_ngcontent-%COMP%] tbody[_ngcontent-%COMP%] tr[_ngcontent-%COMP%]:nth-child(2n){background-color:#f2f2f2}.bg-black[_ngcontent-%COMP%]{background-color:#000}.bg-light-grey[_ngcontent-%COMP%]{background-color:#e5e5e5}.bg-medium-grey[_ngcontent-%COMP%]{background-color:#ccc}.bg-grey[_ngcontent-%COMP%]{background-color:#999}.bg-dark-grey[_ngcontent-%COMP%]{background-color:#222}.bg-white[_ngcontent-%COMP%], .bg-fff[_ngcontent-%COMP%]{background-color:#fff}.bg-none[_ngcontent-%COMP%], .no-bg[_ngcontent-%COMP%]{background:none;background-image:none;background-color:transparent}.bg-facebook[_ngcontent-%COMP%]{background-color:#47639e}.bg-twitter[_ngcontent-%COMP%]{background-color:#02a8f3}body[_ngcontent-%COMP%] table[_ngcontent-%COMP%]{border:1px solid rgba(0,0,0,.12)}.no-border[_ngcontent-%COMP%]{border:none}.no-border-t[_ngcontent-%COMP%]{border-top:none}.no-border-r[_ngcontent-%COMP%]{border-right:none}.no-border-b[_ngcontent-%COMP%]{border-bottom:none}.no-border-l[_ngcontent-%COMP%]{border-left:none}.no-border-lr[_ngcontent-%COMP%], .no-border-rl[_ngcontent-%COMP%]{border-left:none;border-right:none}.no-border-tb[_ngcontent-%COMP%], .no-border-bt[_ngcontent-%COMP%]{border-top:none;border-bottom:none}.no-border-tl[_ngcontent-%COMP%], .no-border-lt[_ngcontent-%COMP%]{border-top:none;border-left:none}.no-border-tr[_ngcontent-%COMP%], .no-border-rt[_ngcontent-%COMP%]{border-top:none;border-right:none}.no-border-bl[_ngcontent-%COMP%], .no-border-lb[_ngcontent-%COMP%]{border-bottom:none;border-left:none}.no-border-br[_ngcontent-%COMP%], .no-border-rb[_ngcontent-%COMP%]{border-bottom:none;border-right:none}.border-dashed[_ngcontent-%COMP%], .border-dotted[_ngcontent-%COMP%]{border-style:dashed}.border-black[_ngcontent-%COMP%]{border-color:#000}.border-light-grey[_ngcontent-%COMP%]{border-color:#e5e5e5}.border-medium-grey[_ngcontent-%COMP%]{border-color:#ccc}.border-grey[_ngcontent-%COMP%]{border-color:#999}.border-dark-grey[_ngcontent-%COMP%]{border-color:#2222}.border-white[_ngcontent-%COMP%], .border-fff[_ngcontent-%COMP%]{border-color:#fff}.no-border-radius[_ngcontent-%COMP%]{border-radius:0}.radius3[_ngcontent-%COMP%]{border-radius:3px}.radius5[_ngcontent-%COMP%]{border-radius:5px}.radius10[_ngcontent-%COMP%]{border-radius:10px}.column-mandatory[_ngcontent-%COMP%]{color:#5cb85c;text-align:center}.not-column-mandatory[_ngcontent-%COMP%]{color:#666f73;text-align:center}.cdk-drag-placeholder[_ngcontent-%COMP%]{background:#3498db}.yes[_ngcontent-%COMP%]{color:#5cb85c!important;background-color:#5cb85c;height:4px;cursor:none}.no[_ngcontent-%COMP%]{color:red;background-color:red;height:4px;cursor:none}.strike[_ngcontent-%COMP%]{text-decoration:line-through;color:red}.transfer[_ngcontent-%COMP%]{color:#16a085}.linked[_ngcontent-%COMP%]{color:#4461e2}.accrual[_ngcontent-%COMP%]{color:#999}.fa-question[_ngcontent-%COMP%]{color:#4461e2}.enabled[_ngcontent-%COMP%]{color:#32cd32}.disabled[_ngcontent-%COMP%]{color:#f44366}.v-mid[_ngcontent-%COMP%], .v-m[_ngcontent-%COMP%]{vertical-align:middle}.v-top[_ngcontent-%COMP%], .v-t[_ngcontent-%COMP%]{vertical-align:top}.v-bottom[_ngcontent-%COMP%], .v-b[_ngcontent-%COMP%]{vertical-align:bottom}.v-super[_ngcontent-%COMP%]{vertical-align:super}.r-amount[_ngcontent-%COMP%]{text-align:right!important;padding-right:5px!important}.left[_ngcontent-%COMP%]{text-align:left!important}.right[_ngcontent-%COMP%]{text-align:right!important}.center[_ngcontent-%COMP%]{text-align:center!important}.amount-plus[_ngcontent-%COMP%]{color:#000}.amount-minus[_ngcontent-%COMP%]{color:#4461e2}.block[_ngcontent-%COMP%]{display:block}.inline[_ngcontent-%COMP%]{display:inline}.in-block[_ngcontent-%COMP%]{display:inline-block;zoom:1}.d-none[_ngcontent-%COMP%], .hide[_ngcontent-%COMP%], .hidden[_ngcontent-%COMP%]{display:none}.t-0[_ngcontent-%COMP%]{top:0}.b-0[_ngcontent-%COMP%]{bottom:0}.l-0[_ngcontent-%COMP%]{left:0}.r-0[_ngcontent-%COMP%]{right:0}.tb-0[_ngcontent-%COMP%]{top:0;bottom:0}.lr-0[_ngcontent-%COMP%]{left:0;right:0}.f-left[_ngcontent-%COMP%]{float:left}.f-right[_ngcontent-%COMP%]{float:right}.f-none[_ngcontent-%COMP%]{float:none}textarea[_ngcontent-%COMP%]{resize:both}textarea.vertical[_ngcontent-%COMP%], textarea.horizontal[_ngcontent-%COMP%]{resize:vertical}textarea.noresize[_ngcontent-%COMP%]{resize:none}.full-input[_ngcontent-%COMP%] input[_ngcontent-%COMP%], .full-input[_ngcontent-%COMP%] select[_ngcontent-%COMP%], .full-input[_ngcontent-%COMP%] textarea[_ngcontent-%COMP%]{width:100%}.normal[_ngcontent-%COMP%] input[_ngcontent-%COMP%], .normal[_ngcontent-%COMP%] select[_ngcontent-%COMP%], .normal[_ngcontent-%COMP%] textarea[_ngcontent-%COMP%], .full-input[_ngcontent-%COMP%] [type=checkbox][_ngcontent-%COMP%], .full-input[_ngcontent-%COMP%] [type=radio][_ngcontent-%COMP%]{width:auto}.mat-tab-body-content[_ngcontent-%COMP%]{margin-bottom:20px}.mat-datepicker-input[_ngcontent-%COMP%]{margin-top:5px;margin-bottom:5px}.loader-wrapper[_ngcontent-%COMP%]{height:100vh;width:100vw}.loader-wrapper[_ngcontent-%COMP%] .triangle[_ngcontent-%COMP%]{width:0;height:0;border-style:solid;position:absolute;animation:_ngcontent-%COMP%_rotate .8s infinite .2s}.loader-wrapper[_ngcontent-%COMP%] .bottom[_ngcontent-%COMP%]{border-width:0 90px 90px;border-color:transparent transparent #1fb050;bottom:calc(50% - 100px);left:calc(50% - 90px)}.loader-wrapper[_ngcontent-%COMP%] .top[_ngcontent-%COMP%]{border-width:90px 90px 0;border-color:#b4d575 transparent transparent;top:calc(50% - 100px);left:calc(50% - 90px)}.loader-wrapper[_ngcontent-%COMP%] .left[_ngcontent-%COMP%]{border-width:90px 0 90px 90px;border-color:transparent transparent transparent #1074b9;top:calc(50% - 90px);left:calc(50% - 100px)}.loader-wrapper[_ngcontent-%COMP%] .right[_ngcontent-%COMP%]{border-width:90px 90px 90px 0;border-color:transparent #1daeec transparent transparent;top:calc(50% - 90px);right:calc(50% - 100px)}@keyframes _ngcontent-%COMP%_rotate{0%{transform:rotate(0)}to{transform:rotate(360deg)}}body[_ngcontent-%COMP%]{margin:0}.container[_ngcontent-%COMP%]{margin:0 auto}.mb-05[_ngcontent-%COMP%]{margin-bottom:.5rem}.mr-05[_ngcontent-%COMP%]{margin-right:.5rem}.mb-1[_ngcontent-%COMP%]{margin-bottom:1rem}.mt-1[_ngcontent-%COMP%]{margin-top:1rem}.m-5[_ngcontent-%COMP%]{margin:5px}.m-t-5[_ngcontent-%COMP%]{margin-top:5px}.m-r-5[_ngcontent-%COMP%]{margin-right:5px}.m-b-5[_ngcontent-%COMP%]{margin-bottom:5px}.m-l-5[_ngcontent-%COMP%]{margin-left:5px}.m-v-5[_ngcontent-%COMP%]{margin:5px 0}.m-h-5[_ngcontent-%COMP%]{margin:0 5px}.m-10[_ngcontent-%COMP%]{margin:10px}.m-t-10[_ngcontent-%COMP%]{margin-top:10px}.m-r-10[_ngcontent-%COMP%]{margin-right:10px}.m-b-10[_ngcontent-%COMP%]{margin-bottom:10px}.m-l-10[_ngcontent-%COMP%]{margin-left:10px}.m-v-10[_ngcontent-%COMP%]{margin:10px 0}.m-h-10[_ngcontent-%COMP%]{margin:0 10px}.m-15[_ngcontent-%COMP%]{margin:15px}.m-t-15[_ngcontent-%COMP%]{margin-top:15px}.m-r-15[_ngcontent-%COMP%]{margin-right:15px}.m-b-15[_ngcontent-%COMP%]{margin-bottom:15px}.m-l-15[_ngcontent-%COMP%]{margin-left:15px}.m-v-15[_ngcontent-%COMP%]{margin:15px 0}.m-h-15[_ngcontent-%COMP%]{margin:0 15px}.m-20[_ngcontent-%COMP%]{margin:20px}.m-t-20[_ngcontent-%COMP%]{margin-top:20px}.m-r-20[_ngcontent-%COMP%]{margin-right:20px}.m-b-20[_ngcontent-%COMP%]{margin-bottom:20px}.m-l-20[_ngcontent-%COMP%]{margin-left:20px}.m-v-20[_ngcontent-%COMP%]{margin:20px 0}.m-h-20[_ngcontent-%COMP%]{margin:0 20px}.m-25[_ngcontent-%COMP%]{margin:25px}.m-t-25[_ngcontent-%COMP%]{margin-top:25px}.m-r-25[_ngcontent-%COMP%]{margin-right:25px}.m-b-25[_ngcontent-%COMP%]{margin-bottom:25px}.m-l-25[_ngcontent-%COMP%]{margin-left:25px}.m-v-25[_ngcontent-%COMP%]{margin:25px 0}.m-h-25[_ngcontent-%COMP%]{margin:0 25px}.m-30[_ngcontent-%COMP%]{margin:30px}.m-t-30[_ngcontent-%COMP%]{margin-top:30px}.m-r-30[_ngcontent-%COMP%]{margin-right:30px}.m-b-30[_ngcontent-%COMP%]{margin-bottom:30px}.m-l-30[_ngcontent-%COMP%]{margin-left:30px}.m-v-30[_ngcontent-%COMP%]{margin:30px 0}.m-h-30[_ngcontent-%COMP%]{margin:0 30px}.m-35[_ngcontent-%COMP%]{margin:35px}.m-t-35[_ngcontent-%COMP%]{margin-top:35px}.m-r-35[_ngcontent-%COMP%]{margin-right:35px}.m-b-35[_ngcontent-%COMP%]{margin-bottom:35px}.m-l-35[_ngcontent-%COMP%]{margin-left:35px}.m-v-35[_ngcontent-%COMP%]{margin:35px 0}.m-h-35[_ngcontent-%COMP%]{margin:0 35px}.m-40[_ngcontent-%COMP%]{margin:40px}.m-t-40[_ngcontent-%COMP%]{margin-top:40px}.m-r-40[_ngcontent-%COMP%]{margin-right:40px}.m-b-40[_ngcontent-%COMP%]{margin-bottom:40px}.m-l-40[_ngcontent-%COMP%]{margin-left:40px}.m-v-40[_ngcontent-%COMP%]{margin:40px 0}.m-h-40[_ngcontent-%COMP%]{margin:0 40px}.m-45[_ngcontent-%COMP%]{margin:45px}.m-t-45[_ngcontent-%COMP%]{margin-top:45px}.m-r-45[_ngcontent-%COMP%]{margin-right:45px}.m-b-45[_ngcontent-%COMP%]{margin-bottom:45px}.m-l-45[_ngcontent-%COMP%]{margin-left:45px}.m-v-45[_ngcontent-%COMP%]{margin:45px 0}.m-h-45[_ngcontent-%COMP%]{margin:0 45px}.m-50[_ngcontent-%COMP%]{margin:50px}.m-t-50[_ngcontent-%COMP%]{margin-top:50px}.m-r-50[_ngcontent-%COMP%]{margin-right:50px}.m-b-50[_ngcontent-%COMP%]{margin-bottom:50px}.m-l-50[_ngcontent-%COMP%]{margin-left:50px}.m-v-50[_ngcontent-%COMP%]{margin:50px 0}.m-h-50[_ngcontent-%COMP%]{margin:0 50px}.m-55[_ngcontent-%COMP%]{margin:55px}.m-t-55[_ngcontent-%COMP%]{margin-top:55px}.m-r-55[_ngcontent-%COMP%]{margin-right:55px}.m-b-55[_ngcontent-%COMP%]{margin-bottom:55px}.m-l-55[_ngcontent-%COMP%]{margin-left:55px}.m-v-55[_ngcontent-%COMP%]{margin:55px 0}.m-h-55[_ngcontent-%COMP%]{margin:0 55px}.m-60[_ngcontent-%COMP%]{margin:60px}.m-t-60[_ngcontent-%COMP%]{margin-top:60px}.m-r-60[_ngcontent-%COMP%]{margin-right:60px}.m-b-60[_ngcontent-%COMP%]{margin-bottom:60px}.m-l-60[_ngcontent-%COMP%]{margin-left:60px}.m-v-60[_ngcontent-%COMP%]{margin:60px 0}.m-h-60[_ngcontent-%COMP%]{margin:0 60px}.m-65[_ngcontent-%COMP%]{margin:65px}.m-t-65[_ngcontent-%COMP%]{margin-top:65px}.m-r-65[_ngcontent-%COMP%]{margin-right:65px}.m-b-65[_ngcontent-%COMP%]{margin-bottom:65px}.m-l-65[_ngcontent-%COMP%]{margin-left:65px}.m-v-65[_ngcontent-%COMP%]{margin:65px 0}.m-h-65[_ngcontent-%COMP%]{margin:0 65px}.m-70[_ngcontent-%COMP%]{margin:70px}.m-t-70[_ngcontent-%COMP%]{margin-top:70px}.m-r-70[_ngcontent-%COMP%]{margin-right:70px}.m-b-70[_ngcontent-%COMP%]{margin-bottom:70px}.m-l-70[_ngcontent-%COMP%]{margin-left:70px}.m-v-70[_ngcontent-%COMP%]{margin:70px 0}.m-h-70[_ngcontent-%COMP%]{margin:0 70px}.m-75[_ngcontent-%COMP%]{margin:75px}.m-t-75[_ngcontent-%COMP%]{margin-top:75px}.m-r-75[_ngcontent-%COMP%]{margin-right:75px}.m-b-75[_ngcontent-%COMP%]{margin-bottom:75px}.m-l-75[_ngcontent-%COMP%]{margin-left:75px}.m-v-75[_ngcontent-%COMP%]{margin:75px 0}.m-h-75[_ngcontent-%COMP%]{margin:0 75px}.m-80[_ngcontent-%COMP%]{margin:80px}.m-t-80[_ngcontent-%COMP%]{margin-top:80px}.m-r-80[_ngcontent-%COMP%]{margin-right:80px}.m-b-80[_ngcontent-%COMP%]{margin-bottom:80px}.m-l-80[_ngcontent-%COMP%]{margin-left:80px}.m-v-80[_ngcontent-%COMP%]{margin:80px 0}.m-h-80[_ngcontent-%COMP%]{margin:0 80px}.no-m[_ngcontent-%COMP%]{margin:0}.no-m-t[_ngcontent-%COMP%]{margin-top:0}.no-m-r[_ngcontent-%COMP%]{margin-right:0}.no-m-b[_ngcontent-%COMP%]{margin-bottom:0}.no-m-l[_ngcontent-%COMP%]{margin-left:0}.no-m-v[_ngcontent-%COMP%], .no-m-h[_ngcontent-%COMP%], .no-margin[_ngcontent-%COMP%]{margin:0}.no-m-lr[_ngcontent-%COMP%], .no-m-rl[_ngcontent-%COMP%]{margin-left:0;margin-right:0}.no-m-tb[_ngcontent-%COMP%], .no-m-bt[_ngcontent-%COMP%]{margin-top:0;margin-bottom:0}.m-t-only[_ngcontent-%COMP%]{margin-left:0;margin-right:0;margin-bottom:0}.m-b-only[_ngcontent-%COMP%]{margin-left:0;margin-right:0;margin-top:0}.m-l-only[_ngcontent-%COMP%]{margin-right:0;margin-top:0;margin-bottom:0}.m-r-only[_ngcontent-%COMP%]{margin-left:0;margin-top:0;margin-bottom:0}.m-auto[_ngcontent-%COMP%]{margin-left:auto;margin-right:auto}.ls-0[_ngcontent-%COMP%]{margin-left:10px;margin-right:10px}html[_ngcontent-%COMP%], body[_ngcontent-%COMP%]{-webkit-tap-highlight-color:transparent}div[_ngcontent-%COMP%]{box-sizing:border-box}.color-inherit[_ngcontent-%COMP%]{color:inherit}.no-shadow[_ngcontent-%COMP%]{box-shadow:none}.pointer[_ngcontent-%COMP%]{cursor:pointer}.nolist[_ngcontent-%COMP%]{list-style:none}.actions-menu[_ngcontent-%COMP%]{color:#fff}.alert[_ngcontent-%COMP%]{background-color:#e8f4fd;padding:6px 16px;font-size:.875rem;font-family:Roboto,Helvetica Neue,sans-serif;font-weight:400;line-height:1.43;border-radius:4px;letter-spacing:normal;margin:10px}.alert[_ngcontent-%COMP%] .message[_ngcontent-%COMP%]{padding:8px 0;font-size:18px}.alert[_ngcontent-%COMP%] .alert-check[_ngcontent-%COMP%]{color:#359ff4;margin-right:2px;font-size:1.4rem} .mat-tooltip{font-size:15px;color:#fff!important;background-color:#4461e2b3;border:1px solid rgb(25.7777777778,51.5555555556,166.2222222222);max-width:400px!important;white-space:pre-line!important}.loading[_ngcontent-%COMP%]{position:absolute;min-width:100%;width:100px;height:12px;background:linear-gradient(125deg,#fff,#4461e2,#fff);animation:grow 4s linear infinite,move 4s linear infinite}mat-card-title[_ngcontent-%COMP%]{font-weight:600;font-size:x-large;padding-left:20px;padding-top:20px}html[_ngcontent-%COMP%], body[_ngcontent-%COMP%]{overflow:hidden}.overflow-x-scroll[_ngcontent-%COMP%]{max-width:100%;overflow-x:auto}.overflow-no[_ngcontent-%COMP%]{overflow:hidden}.overflow-auto[_ngcontent-%COMP%]{overflow:auto}.overflow-scroll[_ngcontent-%COMP%]{overflow:scroll}.table-container[_ngcontent-%COMP%]{overflow-x:auto;max-width:100%}body[_ngcontent-%COMP%], .no-p[_ngcontent-%COMP%]{padding:0}.no-p-t[_ngcontent-%COMP%]{padding-top:0}.no-p-r[_ngcontent-%COMP%]{padding-right:0}.no-p-b[_ngcontent-%COMP%]{padding-bottom:0}.no-p-l[_ngcontent-%COMP%]{padding-left:0}.no-p-v[_ngcontent-%COMP%], .no-p-h[_ngcontent-%COMP%]{padding:0}.p-5[_ngcontent-%COMP%]{padding:5px}.p-t-5[_ngcontent-%COMP%]{padding-top:5px}.p-r-5[_ngcontent-%COMP%]{padding-right:5px}.p-b-5[_ngcontent-%COMP%]{padding-bottom:5px}.p-l-5[_ngcontent-%COMP%]{padding-left:5px}.p-v-5[_ngcontent-%COMP%]{padding:5px 0}.p-h-5[_ngcontent-%COMP%]{padding:0 5px}.p-10[_ngcontent-%COMP%]{padding:10px}.p-t-10[_ngcontent-%COMP%]{padding-top:10px}.p-b-10[_ngcontent-%COMP%]{padding-bottom:10px}.p-v-10[_ngcontent-%COMP%]{padding:10px 0}.p-h-10[_ngcontent-%COMP%]{padding:0 10px}.p-15[_ngcontent-%COMP%]{padding:15px}.p-t-15[_ngcontent-%COMP%]{padding-top:15px}.p-r-15[_ngcontent-%COMP%]{padding-right:15px}.p-b-15[_ngcontent-%COMP%]{padding-bottom:15px}.p-l-15[_ngcontent-%COMP%]{padding-left:15px}.p-v-15[_ngcontent-%COMP%]{padding:15px 0}.p-h-15[_ngcontent-%COMP%]{padding:0 15px}.p-20[_ngcontent-%COMP%]{padding:20px}.p-t-20[_ngcontent-%COMP%]{padding-top:20px}.p-r-20[_ngcontent-%COMP%]{padding-right:20px}.p-b-20[_ngcontent-%COMP%]{padding-bottom:20px}.p-l-20[_ngcontent-%COMP%]{padding-left:20px}.p-v-20[_ngcontent-%COMP%]{padding:20px 0}.p-h-20[_ngcontent-%COMP%]{padding:0 20px}.p-25[_ngcontent-%COMP%]{padding:25px}.p-t-25[_ngcontent-%COMP%]{padding-top:25px}.p-r-25[_ngcontent-%COMP%]{padding-right:25px}.p-b-25[_ngcontent-%COMP%]{padding-bottom:25px}.p-l-25[_ngcontent-%COMP%]{padding-left:25px}.p-v-25[_ngcontent-%COMP%]{padding:25px 0}.p-h-25[_ngcontent-%COMP%]{padding:0 25px}.p-30[_ngcontent-%COMP%]{padding:30px}.p-t-30[_ngcontent-%COMP%]{padding-top:30px}.p-r-30[_ngcontent-%COMP%]{padding-right:30px}.p-b-30[_ngcontent-%COMP%]{padding-bottom:30px}.p-l-30[_ngcontent-%COMP%]{padding-left:30px}.p-v-30[_ngcontent-%COMP%]{padding:30px 0}.p-h-30[_ngcontent-%COMP%]{padding:0 30px}.p-35[_ngcontent-%COMP%]{padding:35px}.p-t-35[_ngcontent-%COMP%]{padding-top:35px}.p-r-35[_ngcontent-%COMP%]{padding-right:35px}.p-b-35[_ngcontent-%COMP%]{padding-bottom:35px}.p-l-35[_ngcontent-%COMP%]{padding-left:35px}.p-v-35[_ngcontent-%COMP%]{padding:35px 0}.p-h-35[_ngcontent-%COMP%]{padding:0 35px}.p-40[_ngcontent-%COMP%]{padding:40px}.p-t-40[_ngcontent-%COMP%]{padding-top:40px}.p-r-40[_ngcontent-%COMP%]{padding-right:40px}.p-b-40[_ngcontent-%COMP%]{padding-bottom:40px}.p-l-40[_ngcontent-%COMP%]{padding-left:40px}.p-v-40[_ngcontent-%COMP%]{padding-top:40px;padding-bottom:40px}.p-h-40[_ngcontent-%COMP%]{padding:0 40px}.p-45[_ngcontent-%COMP%]{padding:45px}.p-t-45[_ngcontent-%COMP%]{padding-top:45px}.p-r-45[_ngcontent-%COMP%]{padding-right:45px}.p-b-45[_ngcontent-%COMP%]{padding-bottom:45px}.p-l-45[_ngcontent-%COMP%]{padding-left:45px}.p-v-45[_ngcontent-%COMP%]{padding:45px 0}.p-h-45[_ngcontent-%COMP%]{padding:0 45px}.p-50[_ngcontent-%COMP%]{padding:50px}.p-t-50[_ngcontent-%COMP%]{padding-top:50px}.p-r-50[_ngcontent-%COMP%]{padding-right:50px}.p-b-50[_ngcontent-%COMP%]{padding-bottom:50px}.p-l-50[_ngcontent-%COMP%]{padding-left:50px}.p-v-50[_ngcontent-%COMP%]{padding:50px 0}.p-h-50[_ngcontent-%COMP%]{padding:0 50px}.p-55[_ngcontent-%COMP%]{padding:55px}.p-t-55[_ngcontent-%COMP%]{padding-top:55px}.p-r-55[_ngcontent-%COMP%]{padding-right:55px}.p-b-55[_ngcontent-%COMP%]{padding-bottom:55px}.p-l-55[_ngcontent-%COMP%]{padding-left:55px}.p-v-55[_ngcontent-%COMP%]{padding:55px 0}.p-h-55[_ngcontent-%COMP%]{padding:0 55px}.p-60[_ngcontent-%COMP%]{padding:60px}.p-t-60[_ngcontent-%COMP%]{padding-top:60px}.p-r-60[_ngcontent-%COMP%]{padding-right:60px}.p-b-60[_ngcontent-%COMP%]{padding-bottom:60px}.p-l-60[_ngcontent-%COMP%]{padding-left:60px}.p-v-60[_ngcontent-%COMP%]{padding:60px 0}.p-h-60[_ngcontent-%COMP%]{padding:0 60px}.p-65[_ngcontent-%COMP%]{padding:65px}.p-t-65[_ngcontent-%COMP%]{padding-top:65px}.p-r-65[_ngcontent-%COMP%]{padding-right:65px}.p-b-65[_ngcontent-%COMP%]{padding-bottom:65px}.p-l-65[_ngcontent-%COMP%]{padding-left:65px}.p-v-65[_ngcontent-%COMP%]{padding:65px 0}.p-h-65[_ngcontent-%COMP%]{padding:0 65px}.p-70[_ngcontent-%COMP%]{padding:70px}.p-t-70[_ngcontent-%COMP%]{padding-top:70px}.p-r-70[_ngcontent-%COMP%]{padding-right:70px}.p-b-70[_ngcontent-%COMP%]{padding-bottom:70px}.p-l-70[_ngcontent-%COMP%]{padding-left:70px}.p-v-70[_ngcontent-%COMP%]{padding:70px 0}.p-h-70[_ngcontent-%COMP%]{padding:0 70px}.p-75[_ngcontent-%COMP%]{padding:75px}.p-t-75[_ngcontent-%COMP%]{padding-top:75px}.p-r-75[_ngcontent-%COMP%]{padding-right:75px}.p-b-75[_ngcontent-%COMP%]{padding-bottom:75px}.p-l-75[_ngcontent-%COMP%]{padding-left:75px}.p-v-75[_ngcontent-%COMP%]{padding:75px 0}.p-h-75[_ngcontent-%COMP%]{padding:0 75px}.p-80[_ngcontent-%COMP%]{padding:80px}.p-t-80[_ngcontent-%COMP%]{padding-top:80px}.p-r-80[_ngcontent-%COMP%]{padding-right:80px}.p-b-80[_ngcontent-%COMP%]{padding-bottom:80px}.p-l-80[_ngcontent-%COMP%]{padding-left:80px}.p-v-80[_ngcontent-%COMP%]{padding:80px 0}.p-h-80[_ngcontent-%COMP%]{padding:0 80px}.no-padding[_ngcontent-%COMP%]{padding:0!important}.no-pad-lr[_ngcontent-%COMP%], .no-pad-rl[_ngcontent-%COMP%]{padding-left:0;padding-right:0}.no-pad-tb[_ngcontent-%COMP%], .no-pad-bt[_ngcontent-%COMP%]{padding-top:0;padding-bottom:0}.pad-t-only[_ngcontent-%COMP%]{padding-left:0;padding-right:0;padding-bottom:0}.pad-b-only[_ngcontent-%COMP%]{padding-left:0;padding-right:0;padding-top:0}.pad-l-only[_ngcontent-%COMP%]{padding-right:0;padding-top:0;padding-bottom:0}.pad-r-only[_ngcontent-%COMP%]{padding-left:0;padding-top:0;padding-bottom:0}html[_ngcontent-%COMP%], body[_ngcontent-%COMP%], .rel[_ngcontent-%COMP%], .relative[_ngcontent-%COMP%]{position:relative}.abs[_ngcontent-%COMP%], .absolute[_ngcontent-%COMP%]{position:absolute}.fixed[_ngcontent-%COMP%]{position:fixed}.status-active[_ngcontent-%COMP%]{color:#5cb85c}.status-inactive[_ngcontent-%COMP%]{color:#666f73}.status-deleted[_ngcontent-%COMP%]{color:#000}.status-pending[_ngcontent-%COMP%]{color:orange}.status-approved[_ngcontent-%COMP%]{color:#4461e2}.status-overpaid[_ngcontent-%COMP%]{color:purple}.status-chargeoff[_ngcontent-%COMP%]{color:#f39c12}.status-active-overdue[_ngcontent-%COMP%], .status-block[_ngcontent-%COMP%]{color:red}.status-matured[_ngcontent-%COMP%]{color:#ff4000}.subStatus-contract-termination[_ngcontent-%COMP%]{color:#b3b3b3}.mat-step-header[_ngcontent-%COMP%] .mat-step-icon-state-done[_ngcontent-%COMP%]{background-color:#2af72a}.mat-step-header[_ngcontent-%COMP%] .mat-step-icon-state-done[_ngcontent-%COMP%] .status-transfer-progress[_ngcontent-%COMP%]{color:#ff4000}.mat-step-header[_ngcontent-%COMP%] .mat-step-icon-state-done[_ngcontent-%COMP%] .status-transfer-hold[_ngcontent-%COMP%]{color:#df0101}html[_ngcontent-%COMP%], body[_ngcontent-%COMP%]{-webkit-font-smoothing:antialiased}html[_ngcontent-%COMP%]{font-size:16px}body[_ngcontent-%COMP%]{font-family:Roboto,Helvetica Neue,sans-serif;font-weight:400;font-size:14px;color:#000000de;line-height:1.5;letter-spacing:normal}.mat-h1[_ngcontent-%COMP%], .mat-headline[_ngcontent-%COMP%], .mat-typography[_ngcontent-%COMP%] .mat-h1[_ngcontent-%COMP%], .mat-typography[_ngcontent-%COMP%] .mat-headline[_ngcontent-%COMP%], .mat-typography[_ngcontent-%COMP%] h1[_ngcontent-%COMP%]{font:400 24px/32px Roboto,Helvetica Neue,sans-serif;letter-spacing:normal;margin:0 0 16px}.lh-1[_ngcontent-%COMP%]{line-height:1}.lh-13[_ngcontent-%COMP%]{line-height:1.3}.lh-15[_ngcontent-%COMP%]{line-height:1.5}.bold[_ngcontent-%COMP%], .strong[_ngcontent-%COMP%]{font-weight:700}.no-bold[_ngcontent-%COMP%]{font-weight:400}.italic[_ngcontent-%COMP%], .em[_ngcontent-%COMP%]{font-style:italic}.strike[_ngcontent-%COMP%]{text-decoration:line-through}.normal[_ngcontent-%COMP%]{font-weight:400;font-style:normal}.uppercase[_ngcontent-%COMP%]{text-transform:uppercase}.text-left[_ngcontent-%COMP%]{text-align:left}.text-center[_ngcontent-%COMP%]{text-align:center}.text-right[_ngcontent-%COMP%]{text-align:right}.w100[_ngcontent-%COMP%]{font-weight:100}.w200[_ngcontent-%COMP%]{font-weight:200}.w300[_ngcontent-%COMP%]{font-weight:300}.w400[_ngcontent-%COMP%]{font-weight:400}.w500[_ngcontent-%COMP%]{font-weight:500}.w600[_ngcontent-%COMP%]{font-weight:600}.w700[_ngcontent-%COMP%]{font-weight:700}.w800[_ngcontent-%COMP%]{font-weight:800}.w900[_ngcontent-%COMP%]{font-weight:900}.f9[_ngcontent-%COMP%]{font-size:9px}.f10[_ngcontent-%COMP%]{font-size:10px}.f11[_ngcontent-%COMP%]{font-size:11px}.f12[_ngcontent-%COMP%]{font-size:12px}.f13[_ngcontent-%COMP%]{font-size:13px}.f14[_ngcontent-%COMP%]{font-size:14px}.f15[_ngcontent-%COMP%]{font-size:15px}.f16[_ngcontent-%COMP%]{font-size:16px}.f17[_ngcontent-%COMP%]{font-size:17px}.f18[_ngcontent-%COMP%]{font-size:18px;line-height:30px}.f19[_ngcontent-%COMP%]{font-size:19px}.f20[_ngcontent-%COMP%]{font-size:20px}.f30[_ngcontent-%COMP%]{font-size:30px}.f40[_ngcontent-%COMP%]{font-size:40px}.f50[_ngcontent-%COMP%]{font-size:50px}.f60[_ngcontent-%COMP%]{font-size:60px}.size-small[_ngcontent-%COMP%]{font-size:75%}.size-normal[_ngcontent-%COMP%]{font-size:100%}.size-medium[_ngcontent-%COMP%]{font-size:125%}.size-big[_ngcontent-%COMP%], .size-large[_ngcontent-%COMP%]{font-size:150%}.size-huge[_ngcontent-%COMP%]{font-size:200%}.inherit[_ngcontent-%COMP%]{font:inherit}.text-shadow[_ngcontent-%COMP%]{text-shadow:1px 1px 1px rgba(0,0,0,.4)}.text-rgb-2[_ngcontent-%COMP%]{color:#0003}.text-rgb-3[_ngcontent-%COMP%]{color:#0000004d}.text-rgb-4[_ngcontent-%COMP%]{color:#0006}.text-rgb-5[_ngcontent-%COMP%]{color:#00000080}.no-ul[_ngcontent-%COMP%], .no-ul[_ngcontent-%COMP%]:hover, .no-ul[_ngcontent-%COMP%] a[_ngcontent-%COMP%], .no-ul[_ngcontent-%COMP%] a[_ngcontent-%COMP%]:hover{text-decoration:none}.no-wrap[_ngcontent-%COMP%]{white-space:nowrap}.auto-cell-size[_ngcontent-%COMP%]{white-space:nowrap;width:1%}.ls-0[_ngcontent-%COMP%]{letter-spacing:-3px;white-space:nowrap}.label-field[_ngcontent-%COMP%]{margin-top:32px}.wrap-content[_ngcontent-%COMP%]{overflow-wrap:break-word;word-wrap:break-word}.no-break-content[_ngcontent-%COMP%]{overflow-wrap:anywhere!important}.fit[_ngcontent-%COMP%]{max-width:100%}.half-width[_ngcontent-%COMP%]{width:50%}.full-width[_ngcontent-%COMP%]{width:100%}.full-height[_ngcontent-%COMP%]{height:100%}html[_ngcontent-%COMP%], body[_ngcontent-%COMP%]{width:100%;height:100%;min-height:100%}body[_ngcontent-%COMP%] table[_ngcontent-%COMP%]{width:100%}.container[_ngcontent-%COMP%]{max-width:74rem;width:90%}.mw300[_ngcontent-%COMP%]{max-width:300px}.mw400[_ngcontent-%COMP%]{max-width:400px}.mw500[_ngcontent-%COMP%]{max-width:500px}.mw600[_ngcontent-%COMP%]{max-width:600px}.fullwidth[_ngcontent-%COMP%]{width:100%}.zindex-1[_ngcontent-%COMP%]{z-index:1}.zindex-2[_ngcontent-%COMP%]{z-index:2}.zindex-3[_ngcontent-%COMP%]{z-index:3}.zindex-4[_ngcontent-%COMP%]{z-index:4}.container[_ngcontent-%COMP%]{max-width:37rem}.container[_ngcontent-%COMP%] .card-content[_ngcontent-%COMP%] div[_ngcontent-%COMP%]{margin:1rem 0;word-wrap:break-word}.container[_ngcontent-%COMP%] .card-content[_ngcontent-%COMP%] mifosx-transaction-payment-detail[_ngcontent-%COMP%]{width:100%;margin-bottom:20px}.transaction-buttons[_ngcontent-%COMP%]{margin-top:3%}.active[_ngcontent-%COMP%]{background-color:#5cb85c;height:4px}.linked[_ngcontent-%COMP%]{background-color:#4461e2;height:4px}.undo[_ngcontent-%COMP%]{background-color:red;height:4px}"]})}}return t})();function Pm(t,m){t&1&&(i(0,"div",0),C(1,"div",2),a())}function Om(t,m){if(t&1&&(i(0,"td"),C(1,"mifosx-external-identifier",7),a()),t&2){let e=h(3);n(),d("externalId",ft(e.savingsAccountData.externalId))}}function Dm(t,m){t&1&&(i(0,"td"),r(1),c(2,"translate"),a()),t&2&&(n(),p(l(2,1,"labels.inputs.Not Provided")))}function ym(t,m){if(t&1&&(i(0,"span"),r(1),c(2,"formatNumber"),a()),t&2){let e=h(3);n(),f("",l(2,1,e.savingsAccountData.nominalAnnualInterestRate)," %")}}function Im(t,m){t&1&&(i(0,"span"),r(1,"0 %"),a())}function wm(t,m){if(t&1&&(i(0,"div")(1,"h4",5),r(2),c(3,"translate"),a(),i(4,"table")(5,"tbody")(6,"tr")(7,"td"),r(8),c(9,"translate"),a(),v(10,Om,2,2,"td"),v(11,Dm,3,3,"td"),a(),i(12,"tr")(13,"td"),r(14),c(15,"translate"),a(),i(16,"td"),r(17),c(18,"dateFormat"),a()(),i(19,"tr")(20,"td"),r(21),c(22,"translate"),a(),i(23,"td"),r(24),a()(),i(25,"tr")(26,"td"),r(27),c(28,"translate"),a(),i(29,"td"),r(30),a()(),i(31,"tr")(32,"td"),r(33),c(34,"translate"),a(),i(35,"td",6),v(36,ym,3,3,"span"),v(37,Im,2,0,"span"),a()()()()()),t&2){let e=h(2);n(2),p(l(3,14,"labels.heading.Savings Details")),n(6),p(l(9,16,"labels.inputs.External Id")),n(2),_(e.savingsAccountData.externalId?10:-1),n(),_(e.savingsAccountData.externalId?-1:11),n(3),p(l(15,18,"labels.inputs.Activated On")),n(3),f(" ",e.savingsAccountData.timeline.activatedOnDate?l(18,20,e.savingsAccountData.timeline.activatedOnDate):"Not Activated"," "),n(4),p(l(22,22,"labels.inputs.Field Officer")),n(3),p(e.savingsAccountData.fieldOfficerName?e.savingsAccountData.fieldOfficerName:"Unassigned"),n(3),p(l(28,24,"labels.inputs.Currency")),n(3),V("",e.savingsAccountData.currency.name," [",e.savingsAccountData.currency.code,"]"),n(3),p(l(34,26,"labels.inputs.Nominal Interest Rate")),n(3),_(e.savingsAccountData.nominalAnnualInterestRate?36:-1),n(),_(e.savingsAccountData.nominalAnnualInterestRate?-1:37)}}function Em(t,m){if(t&1&&(i(0,"div")(1,"h4",5),r(2),c(3,"translate"),a(),i(4,"table")(5,"tbody")(6,"tr")(7,"td"),r(8),c(9,"translate"),a(),i(10,"td"),r(11),a()(),i(12,"tr")(13,"td"),r(14),c(15,"translate"),a(),i(16,"td",6),r(17),c(18,"currency"),a()()()()()),t&2){let e=h(2);n(2),p(l(3,5,"labels.heading.Savings Details")),n(6),p(l(9,7,"labels.inputs.Field Officer")),n(3),p(e.savingsAccountData.fieldOfficerName?e.savingsAccountData.fieldOfficerName:"Unassigned"),n(3),p(l(15,9,"labels.inputs.Balance")),n(3),f(" ",tt(18,11,e.savingsAccountData.summary.accountBalance,e.currency.code,"symbol-narrow","1.2-2")," ")}}function Fm(t,m){if(t&1&&(i(0,"tr")(1,"td"),r(2),c(3,"translate"),a(),i(4,"td",6),r(5),c(6,"currency"),a()()),t&2){let e=h(3);n(2),p(l(3,2,"labels.inputs.Total Deposits")),n(3),f(" ",tt(6,4,e.savingsAccountData.summary.totalDeposits,e.currency.code,"symbol-narrow","1.2-2")," ")}}function km(t,m){if(t&1&&(i(0,"tr")(1,"td"),r(2),c(3,"translate"),a(),i(4,"td",6),r(5),c(6,"currency"),a()()),t&2){let e=h(3);n(2),p(l(3,2,"labels.inputs.Total Interest Earned")),n(3),f(" ",tt(6,4,e.savingsAccountData.summary.totalInterestEarned,e.currency.code,"symbol-narrow","1.2-2")," ")}}function Bm(t,m){if(t&1&&(i(0,"div")(1,"h4",5),r(2),c(3,"translate"),a(),i(4,"table")(5,"tbody"),v(6,Fm,7,9,"tr"),v(7,km,7,9,"tr"),a()()()),t&2){let e=h(2);n(2),p(l(3,3,"labels.heading.Performance History")),n(4),_(e.savingsAccountData.summary.totalDeposits?6:-1),n(),_(e.savingsAccountData.summary.totalInterestEarned>=0?7:-1)}}function Nm(t,m){if(t&1&&(i(0,"tr")(1,"td"),r(2),c(3,"translate"),a(),i(4,"td",6),r(5),c(6,"currency"),a()()),t&2){let e=h(3);n(2),p(l(3,2,"labels.inputs.Total Withdrawls")),n(3),f(" ",tt(6,4,e.savingsAccountData.summary.totalWithdrawals,e.currency.code,"symbol-narrow","1.2-2")," ")}}function Rm(t,m){if(t&1&&(i(0,"tr")(1,"td"),r(2),c(3,"translate"),a(),i(4,"td",6),r(5),c(6,"currency"),a()()),t&2){let e=h(3);n(2),p(l(3,2,"labels.inputs.Withdrawals Fees")),n(3),f(" ",tt(6,4,e.savingsAccountData.summary.totalWithdrawalFees,e.currency.code,"symbol-narrow","1.2-2")," ")}}function Vm(t,m){if(t&1&&(i(0,"tr")(1,"td"),r(2),c(3,"translate"),a(),i(4,"td",6),r(5),c(6,"currency"),a()()),t&2){let e=h(3);n(2),p(l(3,2,"labels.inputs.Annual Fees")),n(3),f(" ",tt(6,4,e.savingsAccountData.summary.totalAnnualFees,e.currency.code,"symbol-narrow","1.2-2")," ")}}function Lm(t,m){if(t&1&&(i(0,"tr")(1,"td"),r(2),c(3,"translate"),a(),i(4,"td",6),r(5),c(6,"currency"),a()()),t&2){let e=h(3);n(2),p(l(3,2,"labels.inputs.Interest Earned")),n(3),f(" ",tt(6,4,e.savingsAccountData.summary.totalInterestEarned,e.currency.code,"symbol-narrow","1.2-2")," ")}}function Gm(t,m){if(t&1&&(i(0,"tr")(1,"td"),r(2),c(3,"translate"),a(),i(4,"td",6),r(5),c(6,"currency"),a()()),t&2){let e=h(3);n(2),p(l(3,2,"labels.inputs.Interest Posted")),n(3),f(" ",tt(6,4,e.savingsAccountData.summary.totalInterestPosted,e.currency.code,"symbol-narrow","1.2-2")," ")}}function Um(t,m){if(t&1&&(i(0,"tr")(1,"td"),r(2),c(3,"translate"),a(),i(4,"td",6),r(5),c(6,"currency"),a()()),t&2){let e=h(3);n(2),p(l(3,2,"labels.inputs.Interest Earned Not Posted")),n(3),f(" ",tt(6,4,e.savingsAccountData.summary.interestNotPosted,e.currency.code,"symbol-narrow","1.2-2")," ")}}function qm(t,m){if(t&1&&(i(0,"tr")(1,"td"),r(2),c(3,"translate"),a(),i(4,"td",6),r(5),c(6,"currency"),a()()),t&2){let e=h(3);n(2),p(l(3,2,"labels.inputs.Interest On Overdraft")),n(3),f(" ",tt(6,4,e.savingsAccountData.summary.totalOverdraftInterestDerived,e.currency.code,"symbol-narrow","1.2-2")," ")}}function Hm(t,m){if(t&1&&(i(0,"tr")(1,"td"),r(2),c(3,"translate"),a(),i(4,"td",6),r(5),c(6,"currency"),a()()),t&2){let e=h(3);n(2),p(l(3,2,"labels.inputs.Overdraft Interest Not Posted")),n(3),f(" ",tt(6,4,e.savingsAccountData.summary.interestNotPosted,e.currency.code,"symbol-narrow","1.2-2")," ")}}function zm(t,m){if(t&1&&(i(0,"tr")(1,"td"),r(2),c(3,"translate"),a(),i(4,"td",6),r(5),c(6,"formatNumber"),a()()),t&2){let e=h(3);n(2),p(l(3,2,"labels.inputs.Nominal Interest Rate")),n(3),f("",l(6,4,e.savingsAccountData.nominalAnnualInterestRate)," %")}}function jm(t,m){if(t&1&&(i(0,"tr")(1,"td"),r(2),c(3,"translate"),a(),i(4,"td",6),r(5),c(6,"currency"),a()()),t&2){let e=h(3);n(2),p(l(3,2,"labels.inputs.Withdrawal Fee")),n(3),f(" ",tt(6,4,e.savingsAccountData.withdrawalFee.amount,e.currency.code,"symbol-narrow","1.2-2")," ")}}function $m(t,m){if(t&1&&(i(0,"tr")(1,"td"),r(2),c(3,"translate"),a(),i(4,"td"),r(5),c(6,"dateFormat"),a()()),t&2){let e=h(3);n(2),p(l(3,2,"labels.inputs.Last Active Transaction Date")),n(3),p(l(6,4,e.savingsAccountData.lastActiveTransactionDate))}}function Wm(t,m){if(t&1&&(i(0,"tr")(1,"td"),r(2),c(3,"translate"),a(),i(4,"td"),r(5),a()()),t&2){let e=h(3);n(2),p(l(3,2,"labels.inputs.Substatus")),n(3),p(e.savingsAccountData.subStatus.value)}}function Qm(t,m){if(t&1&&(i(0,"tr")(1,"td"),r(2),c(3,"translate"),a(),i(4,"td"),r(5),a()()),t&2){let e=h(3);n(2),p(l(3,2,"labels.inputs.Days to Inactive")),n(3),p(e.savingsAccountData.daysToInactive)}}function Km(t,m){if(t&1&&(i(0,"tr")(1,"td"),r(2),c(3,"translate"),a(),i(4,"td"),r(5),a()()),t&2){let e=h(3);n(2),p(l(3,2,"labels.inputs.Days to Dormancy")),n(3),p(e.savingsAccountData.daysToDormancy)}}function Ym(t,m){if(t&1&&(i(0,"tr")(1,"td"),r(2),c(3,"translate"),a(),i(4,"td"),r(5),a()()),t&2){let e=h(3);n(2),p(l(3,2,"labels.inputs.Days to Escheat")),n(3),p(e.savingsAccountData.daysToEscheat)}}function Jm(t,m){if(t&1&&(i(0,"tr")(1,"td"),r(2),c(3,"translate"),a(),i(4,"td",6),r(5),c(6,"currency"),a()()),t&2){let e=h(3);n(2),p(l(3,2,"labels.inputs.Annual Fee")),n(3),f(" ",tt(6,4,e.savingsAccountData.annualFee.amount,e.currency.code,"symbol-narrow","1.2-2")," ")}}function Xm(t,m){if(t&1&&(i(0,"tr")(1,"td"),r(2),c(3,"translate"),a(),i(4,"td",6),r(5),c(6,"currency"),a()()),t&2){let e=h(3);n(2),p(l(3,2,"labels.inputs.Overdraft Limit")),n(3),f(" ",tt(6,4,e.savingsAccountData.overdraftLimit,e.currency.code,"symbol-narrow","1.2-2")," ")}}function Zm(t,m){if(t&1&&(i(0,"tr")(1,"td"),r(2),c(3,"translate"),a(),i(4,"td"),r(5),c(6,"currency"),a()()),t&2){let e=h(3);n(2),p(l(3,2,"labels.inputs.Minimum Overdraft Required for Interest Calculation")),n(3),f(" ",tt(6,4,e.savingsAccountData.minOverdraftForInterestCalculation,e.currency.code,"symbol-narrow","1.2-2")," ")}}function tp(t,m){if(t&1&&(i(0,"tr")(1,"td"),r(2),c(3,"translate"),a(),i(4,"td"),r(5),c(6,"formatNumber"),a()()),t&2){let e=h(3);n(2),p(l(3,2,"labels.inputs.Min Balance Required for Interest Calculation")),n(3),p(l(6,4,e.savingsAccountData.minBalanceForInterestCalculation))}}function ep(t,m){if(t&1&&(i(0,"tr")(1,"td"),r(2),c(3,"translate"),a(),i(4,"td"),r(5),c(6,"formatNumber"),a()()),t&2){let e=h(3);n(2),p(l(3,2,"labels.inputs.Minimum Required Balance")),n(3),p(l(6,4,e.savingsAccountData.minRequiredBalance))}}function np(t,m){if(t&1&&(i(0,"tr")(1,"td"),r(2),c(3,"translate"),a(),i(4,"td"),r(5),c(6,"yesNo"),a()()),t&2){let e=h(3);n(2),p(l(3,2,"labels.inputs.Enforce Minimum Required Balance")),n(3),p(l(6,4,e.savingsAccountData.enforceMinRequiredBalance))}}function ip(t,m){if(t&1&&(i(0,"tr")(1,"td"),r(2),c(3,"translate"),a(),i(4,"td"),r(5),c(6,"dateFormat"),a()()),t&2){let e=h(3);n(2),p(l(3,2,"labels.inputs.Interest Recalculation Date")),n(3),p(l(6,4,e.savingsAccountData.summary.lastInterestCalculationDate))}}function ap(t,m){if(t&1&&(i(0,"a"),r(1),c(2,"currency"),a()),t&2){let e=h(4);n(),p(tt(2,1,e.savingsAccountData.onHoldFunds,e.currency.code,"symbol-narrow","1.2-2"))}}function op(t,m){t&1&&(i(0,"tr")(1,"td"),r(2),c(3,"translate"),a(),i(4,"td"),A(5,ap,3,6,"a",8),a()()),t&2&&(n(2),p(l(3,2,"labels.inputs.On Hold Funds")),n(3),d("mifosxHasPermission","READ_SAVINGSACCOUNT"))}function rp(t,m){if(t&1&&(i(0,"tr")(1,"td"),r(2),c(3,"translate"),a(),i(4,"td"),r(5),a()()),t&2){let e=h(3);n(2),p(l(3,2,"labels.inputs.Withhold Tax Group")),n(3),p(e.savingsAccountData.taxGroup.name)}}function cp(t,m){if(t&1&&(i(0,"div",4)(1,"h4",5),r(2),c(3,"translate"),a(),i(4,"table")(5,"tbody"),v(6,Nm,7,9,"tr"),v(7,Rm,7,9,"tr"),v(8,Vm,7,9,"tr"),v(9,Lm,7,9,"tr"),v(10,Gm,7,9,"tr"),v(11,Um,7,9,"tr"),v(12,qm,7,9,"tr"),v(13,Hm,7,9,"tr"),v(14,zm,7,6,"tr"),i(15,"tr")(16,"td"),r(17),c(18,"translate"),a(),i(19,"td"),r(20),c(21,"translateKey"),a()(),i(22,"tr")(23,"td"),r(24),c(25,"translate"),a(),i(26,"td"),r(27),c(28,"translateKey"),a()(),i(29,"tr")(30,"td"),r(31),c(32,"translate"),a(),i(33,"td"),r(34),c(35,"translateKey"),a()(),i(36,"tr")(37,"td"),r(38),c(39,"translate"),a(),i(40,"td"),r(41),c(42,"translateKey"),a()(),v(43,jm,7,9,"tr"),v(44,$m,7,6,"tr"),v(45,Wm,6,4,"tr"),v(46,Qm,6,4,"tr"),v(47,Km,6,4,"tr"),v(48,Ym,6,4,"tr"),v(49,Jm,7,9,"tr"),v(50,Xm,7,9,"tr"),v(51,Zm,7,9,"tr"),v(52,tp,7,6,"tr"),v(53,ep,7,6,"tr"),v(54,np,7,6,"tr"),v(55,ip,7,6,"tr"),v(56,op,6,4,"tr"),v(57,rp,6,4,"tr"),a()()()),t&2){let e=h(2);n(2),p(l(3,33,"labels.heading.Account Summary")),n(4),_(e.savingsAccountData.summary.totalWithdrawals?6:-1),n(),_(e.savingsAccountData.summary.totalWithdrawalFees?7:-1),n(),_(e.savingsAccountData.summary.totalAnnualFees?8:-1),n(),_(e.savingsAccountData.summary.totalInterestEarned>=0?9:-1),n(),_(e.savingsAccountData.summary.totalInterestPosted?10:-1),n(),_(e.savingsAccountData.summary.interestNotPosted>=0?11:-1),n(),_(e.savingsAccountData.summary.totalOverdraftInterestDerived?12:-1),n(),_(e.savingsAccountData.summary.interestNotPosted<0?13:-1),n(),_(e.savingsAccountData.nominalAnnualInterestRate?14:-1),n(3),p(l(18,35,"labels.inputs.Interest Compounding Period")),n(3),p(Mt(21,37,e.savingsAccountData.interestCompoundingPeriodType.value,"catalogs")),n(4),p(l(25,40,"labels.inputs.Interest Posting Period")),n(3),p(Mt(28,42,e.savingsAccountData.interestPostingPeriodType.value,"catalogs")),n(4),p(l(32,45,"labels.inputs.Interest Calculated Using")),n(3),p(Mt(35,47,e.savingsAccountData.interestCalculationType.value,"catalogs")),n(4),p(l(39,50,"labels.inputs.Days in Year")),n(3),p(Mt(42,52,e.savingsAccountData.interestCalculationDaysInYearType.value,"catalogs")),n(2),_(e.savingsAccountData.withdrawalFee?43:-1),n(),_(e.savingsAccountData.lastActiveTransactionDate?44:-1),n(),_(e.savingsAccountData.subStatus.id!==0?45:-1),n(),_(e.savingsAccountData.daysToInactive?46:-1),n(),_(e.savingsAccountData.daysToDormancy?47:-1),n(),_(e.savingsAccountData.daysToEscheat?48:-1),n(),_(e.savingsAccountData.annualFee?49:-1),n(),_(e.savingsAccountData.allowOverdraft?50:-1),n(),_(e.savingsAccountData.allowOverdraft?51:-1),n(),_(e.savingsAccountData.minBalanceForInterestCalculation?52:-1),n(),_(e.savingsAccountData.minRequiredBalance?53:-1),n(),_(e.savingsAccountData.enforceMinRequiredBalance?54:-1),n(),_(e.savingsAccountData.summary.lastInterestCalculationDate?55:-1),n(),_(e.savingsAccountData.onHoldFunds?56:-1),n(),_(e.savingsAccountData.withHoldTax?57:-1)}}function sp(t,m){if(t&1&&(i(0,"td"),C(1,"mifosx-external-identifier",7),a()),t&2){let e=h(3);n(),d("externalId",ft(e.savingsAccountData.externalId))}}function lp(t,m){t&1&&(i(0,"td"),r(1),c(2,"translate"),a()),t&2&&(n(),p(l(2,1,"labels.inputs.Not Provided")))}function mp(t,m){if(t&1&&(i(0,"div",4)(1,"h4",5),r(2),c(3,"translate"),a(),i(4,"table")(5,"tbody")(6,"tr")(7,"td"),r(8),c(9,"translate"),a(),v(10,sp,2,2,"td"),v(11,lp,3,3,"td"),a(),i(12,"tr")(13,"td"),r(14),c(15,"translate"),a(),i(16,"td"),r(17),c(18,"dateFormat"),a()(),i(19,"tr")(20,"td"),r(21),c(22,"translate"),a(),i(23,"td"),r(24),a()()()()()),t&2){let e=h(2);n(2),p(l(3,9,"labels.heading.Account Summary")),n(6),p(l(9,11,"labels.inputs.External Id")),n(2),_(e.savingsAccountData.externalId?10:-1),n(),_(e.savingsAccountData.externalId?-1:11),n(3),p(l(15,13,"labels.inputs.Activated On")),n(3),f(" ",e.savingsAccountData.timeline.activatedOnDate?l(18,15,e.savingsAccountData.timeline.activatedOnDate):"Not Activated"," "),n(4),p(l(22,17,"labels.inputs.Currency")),n(3),V("",e.savingsAccountData.currency.name," [",e.savingsAccountData.currency.code,"]")}}function pp(t,m){if(t&1&&(i(0,"div",1)(1,"div",3),v(2,wm,38,28,"div")(3,Em,19,16,"div"),v(4,Bm,8,5,"div"),a(),v(5,cp,58,55,"div",4)(6,mp,25,19,"div",4),a()),t&2){let e=h();n(2),_(!e.savingsAccountData.status.rejected&&!e.savingsAccountData.status.submittedAndPendingApproval?2:3),n(2),_(!e.savingsAccountData.status.rejected&&!e.savingsAccountData.status.submittedAndPendingApproval?4:-1),n(),_(e.isActive?5:6)}}var Yn=(()=>{class t{constructor(){this.route=g(E),this.router=g(z),this.isLoading=!0,this.isActive=!1,this.route.parent.parent.data.subscribe(e=>{this.savingsAccountData=e.savingsAccountData,this.currency=this.savingsAccountData.currency,this.isLoading=!1;let s=this.savingsAccountData.status.value;this.isActive=s==="Active"}),this.router.url.includes("clients")?this.entityType="Client":this.router.url.includes("groups")?this.entityType="Group":this.router.url.includes("centers")&&(this.entityType="Center")}static{this.\u0275fac=function(s){return new(s||t)}}static{this.\u0275cmp=T({type:t,selectors:[["mifosx-general-tab"]],decls:2,vars:2,consts:[[1,"loader"],[1,"savings-account-tables","layout-row","gap-2percent"],[1,"loading"],[1,"flex-49","layout-column","gap-4percent"],[1,"flex-49"],[1,"table-headers"],[1,"r-amount"],[3,"externalId"],[4,"mifosxHasPermission"]],template:function(s,o){s&1&&(v(0,Pm,2,0,"div",0),v(1,pp,7,3,"div",1)),s&2&&(_(o.isLoading?0:-1),n(),_(o.isLoading?-1:1))},dependencies:[P,O,Rt,Be,ue,Bt,y,Nt,me,mn],styles:[".loader[_ngcontent-%COMP%]{margin-bottom:39px;overflow:auto}.sidenav[_ngcontent-%COMP%]{overflow-x:hidden}@keyframes _ngcontent-%COMP%_move{0%{left:0}16.7%{left:0}33.3%{left:640px}50%{left:1120px}66.7%{left:640px}83.3%{left:0}to{left:0}}@keyframes _ngcontent-%COMP%_grow{0%{width:160px}16.7%{width:640px}33.3%{width:640px}50%{width:160px}66.7%{width:640px}83.3%{width:640px}to{width:160px}}.general-tab-container[_ngcontent-%COMP%]{padding:16px 20px;width:100%;box-sizing:border-box;position:relative;background-color:var(--background-color, #f8f9fa);color:var(--text-color, #333);transition:background-color .3s ease,color .3s ease}.general-tab-container[_ngcontent-%COMP%] .page-header[_ngcontent-%COMP%]{margin-bottom:24px;padding:16px 0;position:relative;border-bottom:1px solid var(--border-color, #e9ecef)}.general-tab-container[_ngcontent-%COMP%] .page-header[_ngcontent-%COMP%] .header-title[_ngcontent-%COMP%]{font-size:1.75rem;font-weight:600;margin:0 0 8px;line-height:1.2;color:var(--primary-color, #007bff);position:relative}.general-tab-container[_ngcontent-%COMP%] .page-header[_ngcontent-%COMP%] .header-subtitle[_ngcontent-%COMP%]{font-size:.95rem;margin:0;line-height:1.4;color:var(--text-secondary, #6c757d);position:relative}.general-tab-container[_ngcontent-%COMP%] .content-wrapper[_ngcontent-%COMP%]{position:relative;width:100%}.general-tab-container[_ngcontent-%COMP%] .account-info-card[_ngcontent-%COMP%]{background:var(--card-background, #fff);border-radius:8px;box-shadow:0 2px 4px #0000001a;overflow:hidden;position:relative;width:100%;max-width:600px;transition:box-shadow .3s ease,background-color .3s ease}.general-tab-container[_ngcontent-%COMP%] .account-info-card[_ngcontent-%COMP%] .card-header[_ngcontent-%COMP%]{padding:16px 20px;background:var(--card-header-bg, #f8f9fa);border-bottom:1px solid var(--border-color, #e9ecef);position:relative}.general-tab-container[_ngcontent-%COMP%] .account-info-card[_ngcontent-%COMP%] .card-header[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{margin:0;font-size:1.1rem;font-weight:600;line-height:1.3;color:var(--text-color, #333)}.general-tab-container[_ngcontent-%COMP%] .account-info-card[_ngcontent-%COMP%] .card-content[_ngcontent-%COMP%]{padding:20px;position:relative}.general-tab-container[_ngcontent-%COMP%] .account-info-card[_ngcontent-%COMP%] .card-content[_ngcontent-%COMP%] .info-row[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:baseline;padding:10px 0;border-bottom:1px solid var(--border-light, #f1f3f4);position:relative;min-height:24px}.general-tab-container[_ngcontent-%COMP%] .account-info-card[_ngcontent-%COMP%] .card-content[_ngcontent-%COMP%] .info-row[_ngcontent-%COMP%]:last-child{border-bottom:none}.general-tab-container[_ngcontent-%COMP%] .account-info-card[_ngcontent-%COMP%] .card-content[_ngcontent-%COMP%] .info-row[_ngcontent-%COMP%] .label[_ngcontent-%COMP%]{font-weight:500;color:var(--text-secondary, #6c757d);flex:0 0 auto;margin-right:16px;white-space:nowrap;line-height:1.4}.general-tab-container[_ngcontent-%COMP%] .account-info-card[_ngcontent-%COMP%] .card-content[_ngcontent-%COMP%] .info-row[_ngcontent-%COMP%] .value[_ngcontent-%COMP%]{font-weight:600;color:var(--text-color, #333);text-align:right;flex:1 1 auto;line-height:1.4}.general-tab-container[_ngcontent-%COMP%] .account-info-card[_ngcontent-%COMP%] .card-content[_ngcontent-%COMP%] .info-row[_ngcontent-%COMP%] .value.currency[_ngcontent-%COMP%]{color:var(--success-color, #28a745);font-size:1.05rem}[data-theme=dark][_ngcontent-%COMP%] .general-tab-container[_ngcontent-%COMP%], .dark-theme[_ngcontent-%COMP%] .general-tab-container[_ngcontent-%COMP%]{--background-color: #1a1a1a;--text-color: #e9ecef;--text-secondary: #adb5bd;--primary-color: #4dabf7;--card-background: #2d3748;--card-header-bg: #374151;--border-color: #4a5568;--border-light: #2d3748;--success-color: #68d391}@media (width <= 768px){.general-tab-container[_ngcontent-%COMP%]{padding:12px 16px}.general-tab-container[_ngcontent-%COMP%] .page-header[_ngcontent-%COMP%]{margin-bottom:20px;padding:12px 0}.general-tab-container[_ngcontent-%COMP%] .page-header[_ngcontent-%COMP%] .header-title[_ngcontent-%COMP%]{font-size:1.5rem}.general-tab-container[_ngcontent-%COMP%] .page-header[_ngcontent-%COMP%] .header-subtitle[_ngcontent-%COMP%]{font-size:.9rem}.general-tab-container[_ngcontent-%COMP%] .account-info-card[_ngcontent-%COMP%] .card-header[_ngcontent-%COMP%]{padding:14px 16px}.general-tab-container[_ngcontent-%COMP%] .account-info-card[_ngcontent-%COMP%] .card-content[_ngcontent-%COMP%]{padding:16px}.general-tab-container[_ngcontent-%COMP%] .account-info-card[_ngcontent-%COMP%] .card-content[_ngcontent-%COMP%] .info-row[_ngcontent-%COMP%]{padding:8px 0}.general-tab-container[_ngcontent-%COMP%] .account-info-card[_ngcontent-%COMP%] .card-content[_ngcontent-%COMP%] .info-row[_ngcontent-%COMP%] .label[_ngcontent-%COMP%]{margin-right:12px}}"]})}}return t})();var dp=[{path:"",data:{title:"All Savings",breadcrumb:"Savings",routeParamBreadcrumb:!1,addBreadcrumbLink:!1},children:[{path:"create",data:{title:"Create Savings Account",breadcrumb:"Create Savings Account"},component:Nn,resolve:{savingsAccountTemplate:jn}},{path:":savingAccountId",data:{title:"Saving Account View",routeParamBreadcrumb:"savingAccountId"},component:Cn,resolve:{savingsAccountData:qe,savingsDatatables:ai},children:[{path:"",redirectTo:"general",pathMatch:"full"},{path:"general",data:{title:"Savings Account Details",breadcrumb:"General",routeParamBreadcrumb:!1},children:[{path:"",component:Yn}]},{path:"transactions",data:{title:"Savings Account Transactions",breadcrumb:"Transactions",routeParamBreadcrumb:!1},children:[{path:"",component:vn},{path:"export",component:Un}]},{path:"charges",component:Fn,data:{title:"Savings Account Charges",breadcrumb:"Charges",routeParamBreadcrumb:!1}},{path:"standing-instructions",component:kn,data:{title:"Savings Account SIH",breadcrumb:"Standing Instructions",routeParamBreadcrumb:!1}},{path:"notes",component:Wn,data:{title:"Savings Account Notes",breadcrumb:"Notes",routeParamBreadcrumb:!1},resolve:{savingAccountNotes:Hi}},{path:"documents",component:$n,data:{title:"Savings Account Documents",breadcrumb:"Documents",routeParamBreadcrumb:!1},resolve:{savingsDocuments:zi}},{path:"datatables",children:[{path:":datatableName",component:Bn,data:{title:"View Data Table",routeParamBreadcrumb:"datatableName"},resolve:{savingsDatatable:ii}}]}]},{path:":savingAccountId/edit",data:{title:"Edit Savings Account",breadcrumb:"Edit",routeParamBreadcrumb:!1},component:Rn,resolve:{savingsAccountAndTemplate:si}},{path:":savingAccountId/transactions/:id",data:{title:"Savings Account Transactions",breadcrumb:"Transactions",routeParamBreadcrumb:!1},children:[{path:"",component:Vn,resolve:{transactionDatatables:ci},children:[{path:"",redirectTo:"general",pathMatch:"full"},{path:"general",component:Kn,resolve:{savingsAccountTransaction:li}},{path:"datatables",children:[{path:":datatableName",component:_n,data:{title:"View Data table",routeParamBreadcrumb:"datatableName"},resolve:{transactionDatatable:ri}}]}]},{path:"edit",component:qn,data:{breadcrumb:"Edit",routeParamBreadcrumb:!1},resolve:{savingsAccountTransactionTemplate:ui}},{path:"reciept",component:Gn,data:{breadcrumb:"Reciept",routeParamBreadcrumb:!1},resolve:{savingsTransactionReciept:di}}]},{path:":savingAccountId/charges",data:{title:"Savings Account Charges",breadcrumb:"Charges",routeParamBreadcrumb:!1},children:[{path:"",redirectTo:"../charges",pathMatch:"prefix"},{path:":id",data:{routeParamBreadcrumb:"id"},component:Ln,resolve:{savingsAccountData:qe,savingsAccountCharge:mi}}]},{path:":savingAccountId/actions/:name",data:{title:"Savings Account Actions",breadcrumb:"Savings Account Actions",routeParamBreadcrumb:"name"},component:En,resolve:{savingsAccountActionData:pi}},{path:":savingAccountId/transfer-funds",loadChildren:()=>import("./account-transfers.module-EE4IYF6L.js").then(t=>t.AccountTransfersModule)},{path:"gsim-account",children:[{path:"create",data:{title:"Create GSIM Application",breadcrumb:"Create GSIM Application"},component:Hn,resolve:{groupsData:qi,savingsAccountTemplate:jn}},{path:":savingAccountId",data:{title:"GSIM Account View",routeParamBreadcrumb:"savingAccountId"},children:[{path:"",component:zn,resolve:{gsimData:gi,savingAccountData:qe,groupsData:ni}}]}]}]}],ji=(()=>{class t{static{this.\u0275fac=function(s){return new(s||t)}}static{this.\u0275mod=Qe({type:t})}static{this.\u0275inj=je({providers:[qe,ai,ii,ri,ci,jn,si,li,mi,pi,di,ui,Ui,ni,gi],imports:[ti.forChild(dp),ti]})}}return t})();var $i=(()=>{class t{constructor(){}static{this.\u0275fac=function(s){return new(s||t)}}static{this.\u0275cmp=T({type:t,selectors:[["mifosx-savings-transaction-datatable-tab"]],decls:3,vars:3,template:function(s,o){s&1&&(vi(0,"p"),r(1),c(2,"translate"),_i()),s&2&&(n(),f("",l(2,1,"labels.heading.savings-transaction-datatable-tab works"),"!"))},dependencies:[P,O,y],encapsulation:2})}}return t})();var l2=(()=>{class t{static{this.\u0275fac=function(s){return new(s||t)}}static{this.\u0275mod=Qe({type:t})}static{this.\u0275inj=je({imports:[Li,Ei,Bi,ji,En,Dn,vn,Cn,Fn,kn,Bn,Nn,oe,ce,re,be,Rn,hn,xn,bn,Sn,Mn,An,Tn,un,gn,Vn,Ve,Ln,Le,Ge,Pn,On,yn,He,Gn,Un,qn,In,zn,Hn,wn,Qn,$n,Wn,_n,Kn,$i,Yn,ze]})}}return t})();export{l2 as SavingsModule}; +import{a as qe}from"./chunk-NRQXHT6M.js";import{a as dn,b as ni,c as Ui,d as qi}from"./chunk-IOMOX4OB.js";import{a as Ve}from"./chunk-AZ6SD2G5.js";import{a as ii,b as ai}from"./chunk-EH6HBK56.js";import{a as Gi}from"./chunk-JZVD6ANS.js";import{$ as $e,$a as Xn,$d as ve,$e as yi,$f as ln,Aa as vi,Ad as Pi,Ba as _i,Bc as Xt,Bd as X,Bg as Ri,Cc as De,Cd as mt,Cf as rn,Da as N,Dc as yt,Df as cn,Ea as R,Eb as ue,Ec as Zt,Ef as sn,Fb as P,Fc as te,Fd as vt,G as At,Ga as D,Gc as ee,Gd as Z,H as je,Hc as ne,Hd as ae,Ia as b,Id as st,Ig as Vi,Ja as h,Jd as It,Jg as Re,K as g,Kg as Li,L as S,Lc as ge,Ld as wt,M,Mc as y,Na as Pt,Nd as fe,Oa as Ot,Oc as Xe,Od as _t,Pa as Dt,Pd as ht,Qa as w,Qd as xt,Qe as ye,Rc as j,Rd as Ce,Sc as U,Sd as Bt,T as Te,Td as Nt,Ua as r,Uc as xi,Ud as Rt,Uf as Be,Va as p,Wa as f,Wb as Ke,Wc as et,Wf as Ii,Xa as V,Xc as H,Xd as St,Ya as Pe,Yc as K,Zc as nt,Ze as Ie,Zf as wi,_ as Ci,_a as Jn,_d as se,_e as ei,_f as me,ab as Zn,ad as Ct,ag as mn,bb as ft,bd as bi,bf as we,bg as Ei,ca as n,cd as it,ce as Oi,cf as Ee,da as We,dd as ie,de as tn,df as Fe,eb as k,ed as Si,ef as ke,fb as kt,fd as at,ff as _e,fg as I,ge as en,gf as le,gg as Fi,hb as c,hc as E,he as nn,hf as Lt,ib as l,ic as Ye,id as ot,ie as an,if as Gt,ja as T,jb as Mt,jf as Ut,ka as Qe,kb as hi,kc as z,lb as tt,lc as q,ld as lt,lf as qt,mc as Je,mf as Ht,n as fi,na as A,nc as ti,ne as on,ng as ki,of as zt,pd as rt,pf as jt,pg as Bi,qb as de,qc as Oe,qd as Mi,qg as Ne,ra as v,rc as F,rd as O,re as Di,rf as $t,rg as pe,sa as _,sd as J,sf as Wt,ta as dt,td as Ze,ua as ut,ud as Ai,uf as Qt,ug as pn,va as gt,vd as ct,wa as d,xa as i,xd as bt,xf as Jt,ya as a,yd as Ti,za as C,zg as Ni}from"./chunk-BQBWZIWL.js";import{a as G,b as Q}from"./chunk-PHUH23IY.js";var Qi=()=>({confirm:!0}),un=(()=>{class t{constructor(){this.dialogRef=g(Xt)}static{this.\u0275fac=function(s){return new(s||t)}}static{this.\u0275cmp=T({type:t,selectors:[["mifosx-calculate-interest-dialog"]],decls:14,vars:14,consts:[["mat-dialog-title",""],["mat-dialog-content",""],["align","end"],["mat-raised-button","","mat-dialog-close",""],["mat-raised-button","","color","primary",3,"mat-dialog-close"]],template:function(s,o){s&1&&(i(0,"h1",0),r(1),c(2,"translate"),a(),i(3,"div",1)(4,"p"),r(5),c(6,"translate"),a()(),i(7,"mat-dialog-actions",2)(8,"button",3),r(9),c(10,"translate"),a(),i(11,"button",4),r(12),c(13,"translate"),a()()),s&2&&(n(),p(l(2,5,"labels.heading.Calculate Interest")),n(4),f("",l(6,7,"labels.text.Are you sure you want to calculate interest")," ?"),n(4),p(l(10,9,"labels.buttons.Cancel")),n(2),d("mat-dialog-close",k(13,Qi)),n(),f(" ",l(13,11,"labels.buttons.Confirm")," "))},dependencies:[P,O,F,te,ee,ne,Zt,y],encapsulation:2})}}return t})();var Ki=()=>({confirm:!0}),gn=(()=>{class t{constructor(){this.dialogRef=g(Xt)}static{this.\u0275fac=function(s){return new(s||t)}}static{this.\u0275cmp=T({type:t,selectors:[["mifosx-post-interest-dialog"]],decls:14,vars:14,consts:[["mat-dialog-title",""],["mat-dialog-content",""],["align","end"],["mat-raised-button","","mat-dialog-close",""],["mat-raised-button","","color","primary",3,"mat-dialog-close"]],template:function(s,o){s&1&&(i(0,"h1",0),r(1),c(2,"translate"),a(),i(3,"div",1)(4,"p"),r(5),c(6,"translate"),a()(),i(7,"mat-dialog-actions",2)(8,"button",3),r(9),c(10,"translate"),a(),i(11,"button",4),r(12),c(13,"translate"),a()()),s&2&&(n(),p(l(2,5,"labels.heading.Post Interest")),n(4),f("",l(6,7,"labels.text.Are you sure you want to post interest")," ?"),n(4),p(l(10,9,"labels.buttons.Cancel")),n(2),d("mat-dialog-close",k(13,Ki)),n(),f(" ",l(13,11,"labels.buttons.Confirm")," "))},dependencies:[P,O,F,te,ee,ne,Zt,y],encapsulation:2})}}return t})();var Yi=()=>({confirm:!0}),He=(()=>{class t{constructor(){this.dialogRef=g(Xt),this.data=g(De)}static{this.\u0275fac=function(s){return new(s||t)}}static{this.\u0275cmp=T({type:t,selectors:[["mifosx-toggle-withhold-tax-dialog"]],decls:17,vars:25,consts:[["mat-dialog-title",""],["mat-dialog-content",""],["align","end"],["mat-raised-button","","mat-dialog-close",""],["mat-raised-button","",3,"color","mat-dialog-close"]],template:function(s,o){s&1&&(i(0,"h1",0),r(1),c(2,"translate"),c(3,"translate"),a(),i(4,"div",1)(5,"p"),r(6),c(7,"translate"),c(8,"translate"),c(9,"translate"),a()(),i(10,"mat-dialog-actions",2)(11,"button",3),r(12),c(13,"translate"),a(),i(14,"button",4),r(15),c(16,"translate"),a()()),s&2&&(n(),V(" ",l(2,10,o.data.isEnable?"labels.heading.Enable":"labels.heading.Disable")," ",l(3,12,"labels.heading.Withhold Tax"),` +`),n(5),Pe(" ",l(7,14,"labels.text.Are you sure you want to")," ",l(8,16,o.data.isEnable?"labels.heading.Enable":"labels.heading.Disable")," ",l(9,18,"labels.text.withhold tax for this account")," ? "),n(6),p(l(13,20,"labels.buttons.Cancel")),n(2),d("color",ft(o.data.isEnable?"accent":"warn"))("mat-dialog-close",k(24,Yi)),n(),f(" ",l(16,22,"labels.buttons.Confirm")," "))},dependencies:[P,O,F,te,ee,ne,Zt,y],encapsulation:2})}}return t})();var fn=class{constructor(m,e){this.setOptions(m),this.setButtons(m,e)}get singleButtons(){return this.buttonsArray}get options(){return this.optionArray}setButtons(m,e){switch(m){case"Active":this.buttonsArray=[],e.block?this.buttonsArray=[{name:"Unblock Account",icon:"lock-open",taskPermissionName:"UNBLOCK_SAVINGSACCOUNT"}]:(e.blockCredit?this.buttonsArray.push({name:"Unblock Deposit",icon:"lock-open",taskPermissionName:"UNBLOCKDEPOSIT_SAVINGSACCOUNT"}):this.buttonsArray.push({name:"Deposit",icon:"arrow-up",taskPermissionName:"DEPOSIT_SAVINGSACCOUNT"},{name:"Block Deposit",icon:"lock",taskPermissionName:"BLOCKDEPOSIT_SAVINGSACCOUNT"}),e.blockDebit?this.buttonsArray.push({name:"Unblock Withdrawal",icon:"lock-open",taskPermissionName:"UNBLOCKWITHDRAWAL_SAVINGSACCOUNT"}):this.buttonsArray.push({name:"Withdrawal",icon:"arrow-down",taskPermissionName:"WITHDRAWAL_SAVINGSACCOUNT"},{name:"Block Withdrawal",icon:"lock",taskPermissionName:"BLOCKWITHDRAWAL_SAVINGSACCOUNT"}),this.buttonsArray=this.buttonsArray.concat([{name:"Block Account",icon:"lock",taskPermissionName:"BLOCK_SAVINGSACCOUNT"},{name:"Hold Amount",icon:"lock",taskPermissionName:"HOLDAMOUNT_SAVINGSACCOUNT"},{name:"Calculate Interest",icon:"table",taskPermissionName:"CALCULATEINTEREST_SAVINGSACCOUNT"},{name:"Post Interest As On",icon:"arrow-right",taskPermissionName:"POSTINTEREST_SAVINGSACCOUNT"}]));break;case"Submitted and pending approval":this.buttonsArray=[{name:"Modify Application",icon:"pen",taskPermissionName:"UPDATE_SAVINGSACCOUNT"},{name:"Approve",icon:"check",taskPermissionName:"APPROVE_SAVINGSACCOUNT"}];break;case"Approved":this.buttonsArray=[{name:"Undo Approval",icon:"undo",taskPermissionName:"APPROVALUNDO_SAVINGSACCOUNT"},{name:"Activate",icon:"check",taskPermissionName:"ACTIVATE_SAVINGSACCOUNT"},{name:"Add Charge",icon:"plus",taskPermissionName:"CREATE_SAVINGSACCOUNTCHARGE"}];break;default:this.buttonsArray=[]}}setOptions(m){switch(m){case"Active":this.optionArray=[{name:"Post Interest",taskPermissionName:"POSTINTEREST_SAVINGSACCOUNT"},{name:"Add Charge",taskPermissionName:"CREATE_SAVINGSACCOUNTCHARGE"},{name:"Close",taskPermissionName:"CLOSE_SAVINGSACCOUNT"}];break;case"Submitted and pending approval":this.optionArray=[{name:"Reject",taskPermissionName:"REJECT_SAVINGSACCOUNT"},{name:"Withdrawn by Client",taskPermissionName:"WITHDRAW_SAVINGSACCOUNT"},{name:"Add Charge",taskPermissionName:"CREATE_SAVINGSACCOUNTCHARGE"},{name:"Delete",taskPermissionName:"DELETE_SAVINGSACCOUNT"}];break;case"Approved":default:this.optionArray=[]}}addOption(m){this.optionArray.push(m)}};var Ji=()=>["./general"],Xi=()=>["./transactions"],Zi=()=>["./charges"],ta=()=>["./documents"],ea=()=>["./notes"],na=()=>["./standing-instructions"],ia=t=>["./datatables",t];function aa(t,m){if(t&1&&(C(0,"i",18),c(1,"statusLookup")),t&2){let e=h();d("ngClass",l(1,2,e.savingsAccountData.status.code))("matTooltip",e.savingsAccountData.status.value)}}function oa(t,m){if(t&1&&(C(0,"i",18),c(1,"statusLookup")),t&2){let e=h();d("ngClass",l(1,2,e.savingsAccountData.subStatus.value))("matTooltip",e.savingsAccountData.subStatus.value)}}function ra(t,m){if(t&1&&(i(0,"span",23),C(1,"mifosx-account-number",32),a()),t&2){let e=h();n(),d("accountNo",ft(e.savingsAccountData.clientAccountNo))}}function ca(t,m){if(t&1&&(i(0,"div",24)(1,"h3"),r(2),c(3,"translate"),a(),i(4,"table",22)(5,"tbody")(6,"tr")(7,"td"),r(8),c(9,"translate"),a(),i(10,"td",33),r(11),c(12,"currency"),a()(),i(13,"tr")(14,"td"),r(15),c(16,"translate"),a(),i(17,"td",33),r(18),c(19,"currency"),a()()()()()),t&2){let e=h();n(2),p(l(3,5,"labels.heading.Account Overview")),n(6),p(l(9,7,"labels.inputs.Current Balance")),n(3),f(" ",tt(12,9,e.savingsAccountData.summary.accountBalance,e.currency.code,"symbol-narrow","1.2-2")," "),n(4),p(l(16,14,"labels.inputs.Available Balance")),n(3),f(" ",tt(19,16,e.savingsAccountData.summary.availableBalance,e.currency.code,"symbol-narrow","1.2-2")," ")}}function sa(t,m){if(t&1){let e=D();i(0,"button",35),b("click",function(){S(e);let o=h().$implicit,u=h();return M(u.doAction(o.name))}),i(1,"mat-icon",36),C(2,"fa-icon",37),a(),i(3,"span"),r(4),c(5,"translate"),a()()}if(t&2){let e=h().$implicit;n(2),d("icon",ft(e.icon)),n(2),f(" ",l(5,3,"labels.menus."+e.name)," ")}}function la(t,m){if(t&1&&A(0,sa,6,5,"button",34),t&2){let e=m.$implicit;d("mifosxHasPermission",e.taskPermissionName)}}function ma(t,m){if(t&1){let e=D();i(0,"button",35),b("click",function(){S(e);let o=h().$implicit,u=h(2);return M(u.doAction(o.name))}),r(1),c(2,"translate"),a()}if(t&2){let e=h().$implicit;n(),f(" ",l(2,1,"labels.menus."+e.name)," ")}}function pa(t,m){if(t&1&&(i(0,"span"),A(1,ma,3,3,"button",34),a()),t&2){let e=m.$implicit;n(),d("mifosxHasPermission",e.taskPermissionName)}}function da(t,m){if(t&1&&(i(0,"button",38),r(1),c(2,"translate"),a(),i(3,"mat-menu",null,2),ut(5,pa,2,1,"span",null,dt),a()),t&2){let e=w(4),s=h();d("matMenuTriggerFor",e),n(),p(l(2,2,"labels.menus.More")),n(4),gt(s.buttonConfig.options)}}function ua(t,m){if(t&1&&(i(0,"a",39,7),r(2),c(3,"translate"),a()),t&2){let e=w(1);d("routerLink",k(5,ea))("active",e.isActive),n(2),f(" ",l(3,3,"labels.inputs.Notes")," ")}}function ga(t,m){if(t&1&&(i(0,"a",39,8),r(2),c(3,"translate"),a()),t&2){let e=w(1);d("routerLink",k(5,na))("active",e.isActive),n(2),f(" ",l(3,3,"labels.inputs.Standing Instructions")," ")}}function fa(t,m){if(t&1&&(N(0),v(1,ga,4,6,"a",39),R()),t&2){let e=h(2);n(),_(e.savingsAccountData.clientId?1:-1)}}function Ca(t,m){if(t&1&&(i(0,"a",39,9),r(2),a()),t&2){let e=w(1),s=h().$implicit;d("routerLink",kt(3,ia,s.registeredTableName))("active",e.isActive),n(2),f(" ",s.registeredTableName," ")}}function va(t,m){if(t&1&&A(0,Ca,3,5,"a",40),t&2){let e=m.$implicit;d("mifosxHasPermission","READ_"+e.registeredTableName)}}function _a(t,m){if(t&1&&(i(0,"nav",31)(1,"a",39,3),r(3),c(4,"translate"),a(),i(5,"a",39,4),r(7),c(8,"translate"),a(),i(9,"a",39,5),r(11),c(12,"translate"),a(),i(13,"a",39,6),r(15),c(16,"translate"),a(),A(17,ua,4,6,"a",40)(18,fa,2,1,"ng-container",41),ut(19,va,1,1,"a",39,dt),a()),t&2){let e=w(2),s=w(6),o=w(10),u=w(14),x=h(),B=w(37);d("tabPanel",B),n(),d("routerLink",k(23,Ji))("active",e.isActive),n(2),f(" ",l(4,15,"labels.inputs.General")," "),n(2),d("routerLink",k(24,Xi))("active",s.isActive),n(2),f(" ",l(8,17,"labels.inputs.Transactions")," "),n(2),d("routerLink",k(25,Zi))("active",o.isActive),n(2),f(" ",l(12,19,"labels.inputs.Charges")," "),n(2),d("routerLink",k(26,ta))("active",u.isActive),n(2),f(" ",l(16,21,"labels.inputs.Documents")," "),n(2),d("mifosxHasPermission","READ_SAVINGSNOTE"),n(),d("mifosxHasPermission","READ_SAVINGSACCOUNTCHARGE"),n(),gt(x.savingsDatatables)}}var Cn=(()=>{class t{constructor(){this.route=g(E),this.router=g(z),this.savingsService=g(I),this.translateService=g(ge),this.dialog=g(yt),this.isActive=!1,this.route.data.subscribe(e=>{this.savingsAccountData=e.savingsAccountData,this.currency=this.savingsAccountData.currency,this.savingsDatatables=e.savingsDatatables}),this.router.url.includes("clients")?this.entityType="Client":this.router.url.includes("groups")?this.entityType="Group":this.router.url.includes("centers")&&(this.entityType="Center")}ngOnInit(){this.setConditionalButtons()}setConditionalButtons(){let e=this.savingsAccountData.status.value;this.isActive=e==="Active";let s=this.savingsAccountData.subStatus;this.buttonConfig=new fn(e,s),this.savingsAccountData.clientId&&this.buttonConfig.addOption({name:"Transfer Funds",taskPermissionName:"CREATE_ACCOUNTTRANSFER"}),this.savingsAccountData.externalId&&Xe.interbankTransfers&&this.buttonConfig.addOption({name:"Interbank Transfer",taskPermissionName:"CREATE_ACCOUNTTRANSFER"}),this.savingsAccountData.fieldOfficerId?this.buttonConfig.addOption({name:"Unassign Staff",taskPermissionName:"REMOVESAVINGSOFFICER_SAVINGSACCOUNT"}):this.buttonConfig.addOption({name:"Assign Staff",taskPermissionName:"UPDATESAVINGSOFFICER_SAVINGSACCOUNT"}),this.savingsAccountData.charges&&this.savingsAccountData.charges.forEach(u=>{u.name==="Annual fee - INR"&&this.buttonConfig.addOption({name:"Apply Annual Fees",taskPermissionName:"APPLYANNUALFEE_SAVINGSACCOUNT"})}),this.savingsAccountData.taxGroup&&(this.savingsAccountData.withHoldTax?this.buttonConfig.addOption({name:"Disable Withhold Tax",taskPermissionName:"UPDATEWITHHOLDTAX_SAVINGSACCOUNT"}):this.buttonConfig.addOption({name:"Enable Withhold Tax",taskPermissionName:"UPDATEWITHHOLDTAX_SAVINGSACCOUNT"}))}reload(){let e=this.router.url,s=this.router.url.slice(0,this.router.url.indexOf("savings-accounts")+16);this.router.navigateByUrl(s,{skipLocationChange:!0}).then(()=>this.router.navigate([e]))}doAction(e){switch(e){case"Approve":case"Reject":case"Deposit":case"Activate":case"Close":case"Undo Approval":case"Post Interest As On":case"Assign Staff":case"Add Charge":case"Hold Amount":case"Block Account":case"Block Deposit":case"Block Withdrawal":case"Unassign Staff":case"Withdrawn by Client":case"Apply Annual Fees":this.router.navigate([`actions/${e}`],{relativeTo:this.route});break;case"Withdrawal":this.router.navigate(["actions/Withdrawal"],{relativeTo:this.route});break;case"Modify Application":this.router.navigate(["edit"],{relativeTo:this.route});break;case"Delete":this.deleteSavingsAccount();break;case"Calculate Interest":this.calculateInterest();break;case"Post Interest":this.postInterest();break;case"Enable Withhold Tax":this.enableWithHoldTax();break;case"Disable Withhold Tax":this.disableWithHoldTax();break;case"Transfer Funds":let s={interbank:!1,savingsId:this.savingsAccountData.id,accountType:"fromsavings"};this.router.navigate(["transfer-funds/make-account-transfer"],{relativeTo:this.route,queryParams:s,state:{balance:this.savingsAccountData.summary.availableBalance}});break;case"Interbank Transfer":{let o={interbank:!0,savingsId:this.savingsAccountData.id,accountType:"interbank"};this.router.navigate(["transfer-funds/make-account-transfer"],{relativeTo:this.route,queryParams:o,state:{balance:this.savingsAccountData.summary.availableBalance}});break}case"Unblock Account":case"Unblock Deposit":case"Unblock Withdrawal":this.unblockSavingsAccount(e);break}}deleteSavingsAccount(){this.dialog.open(ve,{data:{deleteContext:`savings account with id: ${this.savingsAccountData.id}`}}).afterClosed().subscribe(s=>{s.delete&&this.savingsService.deleteSavingsAccount(this.savingsAccountData.id).subscribe(()=>{this.router.navigate(["../../"],{relativeTo:this.route})})})}calculateInterest(){this.dialog.open(un).afterClosed().subscribe(s=>{s.confirm&&this.savingsService.executeSavingsAccountCommand(this.savingsAccountData.id,"calculateInterest",{}).subscribe(()=>{this.reload()})})}postInterest(){this.dialog.open(gn).afterClosed().subscribe(s=>{s.confirm&&this.savingsService.executeSavingsAccountCommand(this.savingsAccountData.id,"postInterest",{}).subscribe(()=>{this.reload()})})}enableWithHoldTax(){this.dialog.open(He,{data:{isEnable:!0}}).afterClosed().subscribe(s=>{s.confirm&&this.savingsService.executeSavingsAccountUpdateCommand(this.savingsAccountData.id,"updateWithHoldTax",{withHoldTax:!0}).subscribe(()=>{this.reload()})})}disableWithHoldTax(){this.dialog.open(He,{data:{isEnable:!1}}).afterClosed().subscribe(s=>{s.confirm&&this.savingsService.executeSavingsAccountUpdateCommand(this.savingsAccountData.id,"updateWithHoldTax",{withHoldTax:!1}).subscribe(()=>{this.reload()})})}unblockSavingsAccount(e){let s=this.dialog.open(Di,{data:{heading:this.translateService.instant("labels.heading.Savings Account"),dialogContext:this.translateService.instant("labels.dialogContext.Are you sure you want")+e+this.translateService.instant("this Savings Account")}}),o="unblock";e==="Unblock Deposit"&&(o="unblockCredit"),e==="Unblock Withdrawal"&&(o="unblockDebit"),s.afterClosed().subscribe(u=>{u.confirm&&this.savingsService.executeSavingsAccountCommand(this.savingsAccountData.id,o,{}).subscribe(()=>{this.reload()})})}static{this.\u0275fac=function(s){return new(s||t)}}static{this.\u0275cmp=T({type:t,selectors:[["mifosx-savings-account-view"]],decls:39,vars:26,consts:[["accountMenu","matMenu"],["tabPanel",""],["More","matMenu"],["general","routerLinkActive"],["transactions","routerLinkActive"],["charges","routerLinkActive"],["savingsDocuments","routerLinkActive"],["notes","routerLinkActive"],["standingInstructions","routerLinkActive"],["datatable","routerLinkActive"],[1,"account-card"],[1,"header","layout-column"],[1,"header-title-group"],[1,"profile-image-container"],["mat-card-md-image","",1,"profile-image",3,"matTooltip","src"],[1,"mat-typography","account-card-title"],[1,"layout-row","layout-lt-md-column"],[1,"flex-60"],[1,"fa","fa-stop",3,"ngClass","matTooltip"],[1,"m-r-5"],[3,"textValue"],["display","left",3,"accountNo"],[1,"account-overview"],[1,"m-l-10"],[1,"flex-30"],[1,"flex-5"],["mat-icon-button","","aria-label","Loan account actions","yPosition","below",3,"matMenuTriggerFor"],["matListIcon","",1,"actions-menu"],["icon","bars","size","sm"],["mat-menu-item",""],[1,"content"],["mat-tab-nav-bar","",1,"navigation-tabs",3,"tabPanel"],[3,"accountNo"],[1,"r-amount"],["mat-menu-item","",3,"click",4,"mifosxHasPermission"],["mat-menu-item","",3,"click"],["matListIcon",""],["size","sm",3,"icon"],["mat-menu-item","",3,"matMenuTriggerFor"],["mat-tab-link","","routerLinkActive","",3,"routerLink","active"],["mat-tab-link","","routerLinkActive","",3,"routerLink","active",4,"mifosxHasPermission"],[4,"mifosxHasPermission"]],template:function(s,o){if(s&1&&(i(0,"mat-card",10)(1,"mat-card-header",11)(2,"mat-card-title-group",12)(3,"div",13)(4,"div"),C(5,"img",14),c(6,"translate"),a()(),i(7,"div",15)(8,"mat-card-title",16)(9,"div",17)(10,"h3"),v(11,aa,2,4,"i",18),v(12,oa,2,4,"i",18),i(13,"span",19),r(14),c(15,"translate"),a(),i(16,"span",19),C(17,"mifosx-long-text",20),a(),C(18,"mifosx-account-number",21),a(),i(19,"span",22),r(20),c(21,"translate"),c(22,"translate"),v(23,ra,2,2,"span",23),a()(),v(24,ca,20,21,"div",24),i(25,"div",25)(26,"button",26)(27,"mat-icon",27),C(28,"fa-icon",28),a()()()()(),i(29,"mat-menu",null,0),ut(31,la,1,1,"button",29,dt),v(33,da,7,4),a()()(),i(34,"mat-card-content",30),v(35,_a,21,27,"nav",31),i(36,"mat-tab-nav-panel",null,1),C(38,"router-outlet"),a()()()),s&2){let u=w(30);n(5),d("matTooltip",ft(l(6,18,"tooltips.Savings Account")))("src","assets/images/savings_account_placeholder.png",Ci),n(6),_(o.savingsAccountData.subStatus.block?-1:11),n(),_(o.savingsAccountData.subStatus.block?12:-1),n(2),f("",l(15,20,"labels.inputs.Savings Product")," :"),n(3),d("textValue",ft(o.savingsAccountData.savingsProductName)),n(),d("accountNo",ft(o.savingsAccountData.accountNo)),n(2),Pe(" ",l(21,22,"labels.text."+o.entityType)," ",l(22,24,"labels.inputs.name"),": ",o.savingsAccountData.clientName||o.savingsAccountData.groupName," "),n(3),_(o.savingsAccountData.clientAccountNo?23:-1),n(),_(!o.savingsAccountData.status.rejected&&!o.savingsAccountData.status.submittedAndPendingApproval?24:-1),n(2),d("matMenuTriggerFor",u),n(5),gt(o.buttonConfig.singleButtons),n(2),_(o.buttonConfig.options&&!o.savingsAccountData.subStatus.block?33:-1),n(2),_(o.isActive?35:-1)}},dependencies:[P,de,O,q,J,ct,Rt,Ti,Ai,Pi,fe,Ze,Vi,Ni,Oe,an,on,St,nn,en,rn,cn,Je,sn,Ye,ue,y,ln],styles:["mat-card-title[_ngcontent-%COMP%]{display:flex}"]})}}return t})();var ha=()=>[50,100,200],xa=()=>["export"],ba=t=>[t,"reciept"],Sa=t=>["/","journal-entry","view",t];function Ma(t,m){if(t&1){let e=D();i(0,"div",4)(1,"mat-checkbox",31),b("click",function(){S(e);let o=h();return M(o.hideReversed())}),r(2),c(3,"translate"),a(),i(4,"mat-checkbox",31),b("click",function(){S(e);let o=h();return M(o.hideAccruals())}),r(5),c(6,"translate"),a(),i(7,"button",32),r(8),c(9,"translate"),a()()}if(t&2){let e=h();n(),d("formControl",e.hideReversedParam),n(),f(" ",l(3,6,"labels.inputs.Hide Reversed")),n(2),d("formControl",e.hideAccrualsParam),n(),f(" ",l(6,8,"labels.inputs.Hide Accruals")),n(2),d("routerLink",k(12,xa)),n(),f(" ",l(9,10,"labels.buttons.Export")," ")}}function Aa(t,m){t&1&&(i(0,"th",33),r(1,"#"),a())}function Ta(t,m){if(t&1){let e=D();i(0,"td",34),b("click",function(){let o=S(e).$implicit,u=h();return M(u.showTransactions(o))}),r(1),a()}if(t&2){let e=m.index;n(),f(" ",e+1," ")}}function Pa(t,m){t&1&&(i(0,"th",33),r(1),c(2,"translate"),a()),t&2&&(n(),p(l(2,1,"labels.inputs.Id")))}function Oa(t,m){if(t&1){let e=D();i(0,"td",35),b("click",function(){let o=S(e).$implicit,u=h();return M(u.showTransactions(o))}),r(1),a()}if(t&2){let e=m.$implicit,s=h();d("ngClass",s.savingsTransactionColor(e)),n(),f(" ",e.id," ")}}function Da(t,m){t&1&&(i(0,"th",36),r(1),c(2,"translate"),a()),t&2&&(n(),f(" ",l(2,1,"labels.inputs.Transaction Date")," "))}function ya(t,m){if(t&1){let e=D();i(0,"td",37),b("click",function(){let o=S(e).$implicit,u=h();return M(u.showTransactions(o))}),r(1),c(2,"dateFormat"),a()}if(t&2){let e=m.$implicit,s=h();d("ngClass",s.savingsTransactionColor(e)),n(),f(" ",l(2,2,e.date)," ")}}function Ia(t,m){t&1&&(i(0,"th",33),r(1),c(2,"translate"),a()),t&2&&(n(),p(l(2,1,"labels.inputs.External Id")))}function wa(t,m){if(t&1&&(i(0,"td",38),C(1,"mifosx-external-identifier",39),a()),t&2){let e=m.$implicit,s=h();d("ngClass",s.savingsTransactionColor(e)),n(),d("externalId",ft(e.externalId))}}function Ea(t,m){t&1&&(i(0,"th",40),r(1),c(2,"translate"),a()),t&2&&(n(),p(l(2,1,"labels.inputs.Transaction Type")))}function Fa(t,m){if(t&1){let e=D();i(0,"td",37),b("click",function(){let o=S(e).$implicit,u=h();return M(u.showTransactions(o))}),r(1),c(2,"translateKey"),a()}if(t&2){let e=m.$implicit,s=h();d("ngClass",s.savingsTransactionColor(e)),n(),f(" ",Mt(2,2,e.transactionType.value,"catalogs")," ")}}function ka(t,m){t&1&&(i(0,"th",41),r(1),c(2,"translate"),a()),t&2&&(n(),p(l(2,1,"labels.inputs.Debit")))}function Ba(t,m){if(t&1){let e=D();i(0,"td",42),b("click",function(){let o=S(e).$implicit,u=h();return M(u.showTransactions(o))}),r(1),c(2,"formatNumber"),a()}if(t&2){let e=m.$implicit,s=h();d("ngClass",s.savingsTransactionColor(e)),n(),f(" ",s.isDebit(e.transactionType)?l(2,2,e.amount):"N/A"," ")}}function Na(t,m){t&1&&(i(0,"th",41),r(1),c(2,"translate"),a()),t&2&&(n(),p(l(2,1,"labels.inputs.Credit")))}function Ra(t,m){if(t&1){let e=D();i(0,"td",42),b("click",function(){let o=S(e).$implicit,u=h();return M(u.showTransactions(o))}),r(1),c(2,"formatNumber"),a()}if(t&2){let e=m.$implicit,s=h();d("ngClass",s.savingsTransactionColor(e)),n(),f(" ",s.isDebit(e.transactionType)?"N/A":l(2,2,e.amount)," ")}}function Va(t,m){t&1&&(i(0,"th",41),r(1),c(2,"translate"),a()),t&2&&(n(),p(l(2,1,"labels.inputs.Balance")))}function La(t,m){if(t&1){let e=D();i(0,"td",42),b("click",function(){let o=S(e).$implicit,u=h();return M(u.showTransactions(o))}),r(1),c(2,"formatNumber"),a()}if(t&2){let e=m.$implicit,s=h();d("ngClass",s.savingsTransactionColor(e)),n(),f(" ",l(2,2,e.runningBalance)," ")}}function Ga(t,m){t&1&&(i(0,"th",40),r(1),c(2,"translate"),a()),t&2&&(n(),p(l(2,1,"labels.inputs.Actions")))}function Ua(t,m){if(t&1){let e=D();i(0,"button",45),b("click",function(o){S(e);let u=h(2).$implicit,x=h();return M(x.undoTransaction(u,o))}),i(1,"mat-icon"),C(2,"fa-icon",52),a(),i(3,"span"),r(4),c(5,"translate"),a()()}t&2&&(n(4),p(l(5,1,"tooltips.Undo Transaction")))}function qa(t,m){t&1&&(i(0,"span"),A(1,Ua,6,3,"button",51),a()),t&2&&(n(),d("mifosxHasPermission","ADJUSTTRANSACTION_SAVINGSACCOUNT"))}function Ha(t,m){if(t&1){let e=D();i(0,"td",43)(1,"button",44)(2,"mat-icon"),r(3),c(4,"translate"),a()(),i(5,"mat-menu",null,0)(7,"button",45),b("click",function(){let o=S(e).$implicit,u=h();return M(u.showTransactions(o))}),i(8,"mat-icon"),C(9,"fa-icon",46),a(),i(10,"span"),r(11),c(12,"translate"),a()(),v(13,qa,2,1,"span"),i(14,"button",47),b("click",function(o){S(e);let u=h();return M(u.routeEdit(o))}),i(15,"mat-icon"),C(16,"fa-icon",48),a(),i(17,"span"),r(18),c(19,"translate"),a()(),i(20,"button",49),b("click",function(o){S(e);let u=h();return M(u.routeEdit(o))}),i(21,"mat-icon"),C(22,"fa-icon",50),a(),i(23,"span"),r(24),c(25,"translate"),a()()()()}if(t&2){let e=m.$implicit,s=w(6);n(),d("matMenuTriggerFor",s),n(2),p(l(4,8,"labels.text.more_vert")),n(8),p(l(12,10,"labels.text.View Transaction")),n(2),_(e.reversed?-1:13),n(),d("routerLink",kt(16,ba,e.id)),n(4),p(l(19,12,"tooltips.View Receipts")),n(2),d("routerLink",kt(18,Sa,"S"+e.id)),n(4),p(l(25,14,"tooltips.View Journal Entries"))}}function za(t,m){t&1&&C(0,"tr",53)}function ja(t,m){t&1&&C(0,"tr",54)}var vn=(()=>{class t{constructor(){this.route=g(E),this.router=g(z),this.savingsService=g(I),this.settingsService=g(U),this.dialog=g(yt),this.dateUtils=g(j),this.transactionsData=[],this.displayedColumns=["row","id","date","externalId","transactionType","debit","credit","balance","actions"],this.accountWithTransactions=!1,this.route.parent.parent.data.subscribe(e=>{this.transactionsData=e.savingsAccountData.transactions,this.status=e.savingsAccountData.status.value}),this.accountId=this.route.parent.parent.snapshot.params.savingAccountId}ngOnInit(){this.hideAccrualsParam=new Ct(!1),this.hideReversedParam=new Ct(!1),this.setTransactions()}setTransactions(){this.dataSource=new Jt(this.transactionsData),this.accountWithTransactions=this.transactionsData&&this.transactionsData.length>0,this.dataSource.paginator=this.paginator,this.dataSource.sort=this.sort}isDebit(e){return e.withdrawal===!0||e.feeDeduction===!0||e.overdraftInterest===!0||e.withholdTax===!0}isAccrual(e){return e.accrual||e.code==="savingsAccountTransactionType.accrual"}checkStatus(){return this.status==="Active"||this.status==="Closed"||this.status==="Transfer in progress"||this.status==="Transfer on hold"||this.status==="Premature Closed"||this.status==="Matured"}showTransactions(e){e.transfer?this.router.navigate([`../transfer-funds/account-transfers/${e.transfer.id}`],{relativeTo:this.route}):this.router.navigate([e.id,"general"],{relativeTo:this.route})}routeEdit(e){e.stopPropagation()}hideAccruals(){this.filterTransactions(this.hideReversedParam.value,this.hideAccrualsParam.value)}hideReversed(){this.filterTransactions(this.hideReversedParam.value,this.hideAccrualsParam.value)}filterTransactions(e,s){let o=this.transactionsData;(s||e)&&(o=this.transactionsData.filter(u=>!(e&&u.reversed)&&!(s&&u.transactionType.accrual))),this.dataSource=new Jt(o),this.dataSource.paginator=this.paginator,this.dataSource.sort=this.sort}savingsTransactionColor(e){return e.reversed?"strike":e.transfer?"transfer":e.transactionType.accrual?"accrual":""}undoTransaction(e){this.dialog.open(Ve).afterClosed().subscribe(o=>{if(o.confirm){let u=this.settingsService.language.code,x=this.settingsService.dateFormat,B={transactionDate:this.dateUtils.parseDate(e.date),transactionAmount:0,dateFormat:x,locale:u};this.savingsService.executeSavingsAccountTransactionsCommand(this.accountId,"undo",B,e.id).subscribe(()=>{this.reload()})}})}reload(){let e=this.route.parent.parent.snapshot.params.clientId,s=this.router.url;this.router.navigateByUrl(`/clients/${e}/savings-accounts`,{skipLocationChange:!0}).then(()=>this.router.navigate([s]))}static{this.\u0275fac=function(s){return new(s||t)}}static{this.\u0275cmp=T({type:t,selectors:[["mifosx-transactions-tab"]],viewQuery:function(s,o){if(s&1&&(Pt(ye,7),Pt(ei,7)),s&2){let u;Ot(u=Dt())&&(o.paginator=u.first),Ot(u=Dt())&&(o.sort=u.first)}},decls:40,vars:12,consts:[["transactionMenu","matMenu"],[1,"container"],[1,"mat-elevation-z1","m-b-25",3,"hidden"],[1,"layout-row","align-end"],[1,"action-button","m-b-20","layout-row","gap-20px"],["mat-table","","matSort","",3,"dataSource"],["matColumnDef","row"],["mat-header-cell","","mat-sort-header","",4,"matHeaderCellDef"],["mat-cell","",3,"click",4,"matCellDef"],["matColumnDef","id"],["mat-cell","","class","td-select",3,"ngClass","click",4,"matCellDef"],["matColumnDef","date"],["mat-header-cell","","class","center","mat-sort-header","",4,"matHeaderCellDef"],["mat-cell","",3,"ngClass","click",4,"matCellDef"],["matColumnDef","externalId"],["mat-cell","",3,"ngClass",4,"matCellDef"],["matColumnDef","transactionType"],["mat-header-cell","","class","center",4,"matHeaderCellDef"],["matColumnDef","debit"],["mat-header-cell","","class","r-amount",4,"matHeaderCellDef"],["mat-cell","","class","r-amount",3,"ngClass","click",4,"matCellDef"],["matColumnDef","credit"],["matColumnDef","balance"],["matColumnDef","actions"],["mat-cell","","class","center",4,"matCellDef"],["mat-header-row","",4,"matHeaderRowDef"],["mat-row","","class","select-row",4,"matRowDef","matRowDefColumns"],["showFirstLastButtons","",3,"pageSize","pageSizeOptions"],[1,"alert",3,"hidden"],[1,"message"],[1,"fa","fa-exclamation-circle","alert-check"],[1,"accruals",3,"click","formControl"],["mat-raised-button","","color","primary",3,"routerLink"],["mat-header-cell","","mat-sort-header",""],["mat-cell","",3,"click"],["mat-cell","",1,"td-select",3,"click","ngClass"],["mat-header-cell","","mat-sort-header","",1,"center"],["mat-cell","",3,"click","ngClass"],["mat-cell","",3,"ngClass"],[3,"externalId"],["mat-header-cell","",1,"center"],["mat-header-cell","",1,"r-amount"],["mat-cell","",1,"r-amount",3,"click","ngClass"],["mat-cell","",1,"center"],["mat-icon-button","","aria-label","",1,"action-button",3,"matMenuTriggerFor"],["mat-menu-item","",3,"click"],["icon","eye","size","sm"],["mat-menu-item","",1,"account-action-button",3,"click","routerLink"],["icon","receipt","size","sm"],["mat-menu-item","",3,"click","routerLink"],["icon","table-cells","size","sm"],["mat-menu-item","",3,"click",4,"mifosxHasPermission"],["icon","undo","size","sm"],["mat-header-row",""],["mat-row","",1,"select-row"]],template:function(s,o){s&1&&(i(0,"div",1)(1,"div",2)(2,"div",3),v(3,Ma,10,13,"div",4),a(),i(4,"table",5),N(5,6),A(6,Aa,2,0,"th",7)(7,Ta,2,1,"td",8),R(),N(8,9),A(9,Pa,3,3,"th",7)(10,Oa,2,2,"td",10),R(),N(11,11),A(12,Da,3,3,"th",12)(13,ya,3,4,"td",13),R(),N(14,14),A(15,Ia,3,3,"th",7)(16,wa,2,3,"td",15),R(),N(17,16),A(18,Ea,3,3,"th",17)(19,Fa,3,5,"td",13),R(),N(20,18),A(21,ka,3,3,"th",19)(22,Ba,3,4,"td",20),R(),N(23,21),A(24,Na,3,3,"th",19)(25,Ra,3,4,"td",20),R(),N(26,22),A(27,Va,3,3,"th",19)(28,La,3,4,"td",20),R(),N(29,23),A(30,Ga,3,3,"th",17)(31,Ha,26,20,"td",24),R(),A(32,za,1,0,"tr",25)(33,ja,1,0,"tr",26),a(),C(34,"mat-paginator",27),a(),i(35,"div",28)(36,"div",29),C(37,"i",30),r(38),c(39,"translate"),a()()()),s&2&&(n(),d("hidden",!o.accountWithTransactions),n(2),_(o.checkStatus()?3:-1),n(),d("dataSource",o.dataSource),n(28),d("matHeaderRowDef",o.displayedColumns),n(),d("matRowDefColumns",o.displayedColumns),n(),d("pageSize",50)("pageSizeOptions",k(11,ha)),n(),d("hidden",o.accountWithTransactions),n(3),f(" ",l(39,9,"labels.text.No transaction was found")," "))},dependencies:[P,de,O,K,Si,q,F,Ce,Rt,Lt,ei,qt,Ut,Ht,yi,Gt,zt,Be,Oe,an,on,nn,en,St,jt,Wt,$t,Qt,ye,Bt,y,Nt,me],styles:["body[_ngcontent-%COMP%] table[_ngcontent-%COMP%] tbody[_ngcontent-%COMP%] tr[_ngcontent-%COMP%]:nth-child(2n){background-color:#f2f2f2}.bg-black[_ngcontent-%COMP%]{background-color:#000}.bg-light-grey[_ngcontent-%COMP%]{background-color:#e5e5e5}.bg-medium-grey[_ngcontent-%COMP%]{background-color:#ccc}.bg-grey[_ngcontent-%COMP%]{background-color:#999}.bg-dark-grey[_ngcontent-%COMP%]{background-color:#222}.bg-white[_ngcontent-%COMP%], .bg-fff[_ngcontent-%COMP%]{background-color:#fff}.bg-none[_ngcontent-%COMP%], .no-bg[_ngcontent-%COMP%]{background:none;background-image:none;background-color:transparent}.bg-facebook[_ngcontent-%COMP%]{background-color:#47639e}.bg-twitter[_ngcontent-%COMP%]{background-color:#02a8f3}body[_ngcontent-%COMP%] table[_ngcontent-%COMP%]{border:1px solid rgba(0,0,0,.12)}.no-border[_ngcontent-%COMP%]{border:none}.no-border-t[_ngcontent-%COMP%]{border-top:none}.no-border-r[_ngcontent-%COMP%]{border-right:none}.no-border-b[_ngcontent-%COMP%]{border-bottom:none}.no-border-l[_ngcontent-%COMP%]{border-left:none}.no-border-lr[_ngcontent-%COMP%], .no-border-rl[_ngcontent-%COMP%]{border-left:none;border-right:none}.no-border-tb[_ngcontent-%COMP%], .no-border-bt[_ngcontent-%COMP%]{border-top:none;border-bottom:none}.no-border-tl[_ngcontent-%COMP%], .no-border-lt[_ngcontent-%COMP%]{border-top:none;border-left:none}.no-border-tr[_ngcontent-%COMP%], .no-border-rt[_ngcontent-%COMP%]{border-top:none;border-right:none}.no-border-bl[_ngcontent-%COMP%], .no-border-lb[_ngcontent-%COMP%]{border-bottom:none;border-left:none}.no-border-br[_ngcontent-%COMP%], .no-border-rb[_ngcontent-%COMP%]{border-bottom:none;border-right:none}.border-dashed[_ngcontent-%COMP%], .border-dotted[_ngcontent-%COMP%]{border-style:dashed}.border-black[_ngcontent-%COMP%]{border-color:#000}.border-light-grey[_ngcontent-%COMP%]{border-color:#e5e5e5}.border-medium-grey[_ngcontent-%COMP%]{border-color:#ccc}.border-grey[_ngcontent-%COMP%]{border-color:#999}.border-dark-grey[_ngcontent-%COMP%]{border-color:#2222}.border-white[_ngcontent-%COMP%], .border-fff[_ngcontent-%COMP%]{border-color:#fff}.no-border-radius[_ngcontent-%COMP%]{border-radius:0}.radius3[_ngcontent-%COMP%]{border-radius:3px}.radius5[_ngcontent-%COMP%]{border-radius:5px}.radius10[_ngcontent-%COMP%]{border-radius:10px}.column-mandatory[_ngcontent-%COMP%]{color:#5cb85c;text-align:center}.not-column-mandatory[_ngcontent-%COMP%]{color:#666f73;text-align:center}.cdk-drag-placeholder[_ngcontent-%COMP%]{background:#3498db}.yes[_ngcontent-%COMP%]{color:#5cb85c!important;background-color:#5cb85c;height:4px;cursor:none}.no[_ngcontent-%COMP%]{color:red;background-color:red;height:4px;cursor:none}.strike[_ngcontent-%COMP%]{text-decoration:line-through;color:red}.transfer[_ngcontent-%COMP%]{color:#16a085}.linked[_ngcontent-%COMP%]{color:#4461e2}.accrual[_ngcontent-%COMP%]{color:#999}.fa-question[_ngcontent-%COMP%]{color:#4461e2}.enabled[_ngcontent-%COMP%]{color:#32cd32}.disabled[_ngcontent-%COMP%]{color:#f44366}.v-mid[_ngcontent-%COMP%], .v-m[_ngcontent-%COMP%]{vertical-align:middle}.v-top[_ngcontent-%COMP%], .v-t[_ngcontent-%COMP%]{vertical-align:top}.v-bottom[_ngcontent-%COMP%], .v-b[_ngcontent-%COMP%]{vertical-align:bottom}.v-super[_ngcontent-%COMP%]{vertical-align:super}.r-amount[_ngcontent-%COMP%]{text-align:right!important;padding-right:5px!important}.left[_ngcontent-%COMP%]{text-align:left!important}.right[_ngcontent-%COMP%]{text-align:right!important}.center[_ngcontent-%COMP%]{text-align:center!important}.amount-plus[_ngcontent-%COMP%]{color:#000}.amount-minus[_ngcontent-%COMP%]{color:#4461e2}.block[_ngcontent-%COMP%]{display:block}.inline[_ngcontent-%COMP%]{display:inline}.in-block[_ngcontent-%COMP%]{display:inline-block;zoom:1}.d-none[_ngcontent-%COMP%], .hide[_ngcontent-%COMP%], .hidden[_ngcontent-%COMP%]{display:none}.t-0[_ngcontent-%COMP%]{top:0}.b-0[_ngcontent-%COMP%]{bottom:0}.l-0[_ngcontent-%COMP%]{left:0}.r-0[_ngcontent-%COMP%]{right:0}.tb-0[_ngcontent-%COMP%]{top:0;bottom:0}.lr-0[_ngcontent-%COMP%]{left:0;right:0}.f-left[_ngcontent-%COMP%]{float:left}.f-right[_ngcontent-%COMP%]{float:right}.f-none[_ngcontent-%COMP%]{float:none}textarea[_ngcontent-%COMP%]{resize:both}textarea.vertical[_ngcontent-%COMP%], textarea.horizontal[_ngcontent-%COMP%]{resize:vertical}textarea.noresize[_ngcontent-%COMP%]{resize:none}.full-input[_ngcontent-%COMP%] input[_ngcontent-%COMP%], .full-input[_ngcontent-%COMP%] select[_ngcontent-%COMP%], .full-input[_ngcontent-%COMP%] textarea[_ngcontent-%COMP%]{width:100%}.normal[_ngcontent-%COMP%] input[_ngcontent-%COMP%], .normal[_ngcontent-%COMP%] select[_ngcontent-%COMP%], .normal[_ngcontent-%COMP%] textarea[_ngcontent-%COMP%], .full-input[_ngcontent-%COMP%] [type=checkbox][_ngcontent-%COMP%], .full-input[_ngcontent-%COMP%] [type=radio][_ngcontent-%COMP%]{width:auto}.mat-tab-body-content[_ngcontent-%COMP%]{margin-bottom:20px}.mat-datepicker-input[_ngcontent-%COMP%]{margin-top:5px;margin-bottom:5px}.loader-wrapper[_ngcontent-%COMP%]{height:100vh;width:100vw}.loader-wrapper[_ngcontent-%COMP%] .triangle[_ngcontent-%COMP%]{width:0;height:0;border-style:solid;position:absolute;animation:_ngcontent-%COMP%_rotate .8s infinite .2s}.loader-wrapper[_ngcontent-%COMP%] .bottom[_ngcontent-%COMP%]{border-width:0 90px 90px;border-color:transparent transparent #1fb050;bottom:calc(50% - 100px);left:calc(50% - 90px)}.loader-wrapper[_ngcontent-%COMP%] .top[_ngcontent-%COMP%]{border-width:90px 90px 0;border-color:#b4d575 transparent transparent;top:calc(50% - 100px);left:calc(50% - 90px)}.loader-wrapper[_ngcontent-%COMP%] .left[_ngcontent-%COMP%]{border-width:90px 0 90px 90px;border-color:transparent transparent transparent #1074b9;top:calc(50% - 90px);left:calc(50% - 100px)}.loader-wrapper[_ngcontent-%COMP%] .right[_ngcontent-%COMP%]{border-width:90px 90px 90px 0;border-color:transparent #1daeec transparent transparent;top:calc(50% - 90px);right:calc(50% - 100px)}@keyframes _ngcontent-%COMP%_rotate{0%{transform:rotate(0)}to{transform:rotate(360deg)}}body[_ngcontent-%COMP%]{margin:0}.container[_ngcontent-%COMP%]{margin:0 auto}.mb-05[_ngcontent-%COMP%]{margin-bottom:.5rem}.mr-05[_ngcontent-%COMP%]{margin-right:.5rem}.mb-1[_ngcontent-%COMP%]{margin-bottom:1rem}.mt-1[_ngcontent-%COMP%]{margin-top:1rem}.m-5[_ngcontent-%COMP%]{margin:5px}.m-t-5[_ngcontent-%COMP%]{margin-top:5px}.m-r-5[_ngcontent-%COMP%]{margin-right:5px}.m-b-5[_ngcontent-%COMP%]{margin-bottom:5px}.m-l-5[_ngcontent-%COMP%]{margin-left:5px}.m-v-5[_ngcontent-%COMP%]{margin:5px 0}.m-h-5[_ngcontent-%COMP%]{margin:0 5px}.m-10[_ngcontent-%COMP%]{margin:10px}.m-t-10[_ngcontent-%COMP%]{margin-top:10px}.m-r-10[_ngcontent-%COMP%]{margin-right:10px}.m-b-10[_ngcontent-%COMP%]{margin-bottom:10px}.m-l-10[_ngcontent-%COMP%]{margin-left:10px}.m-v-10[_ngcontent-%COMP%]{margin:10px 0}.m-h-10[_ngcontent-%COMP%]{margin:0 10px}.m-15[_ngcontent-%COMP%]{margin:15px}.m-t-15[_ngcontent-%COMP%]{margin-top:15px}.m-r-15[_ngcontent-%COMP%]{margin-right:15px}.m-b-15[_ngcontent-%COMP%]{margin-bottom:15px}.m-l-15[_ngcontent-%COMP%]{margin-left:15px}.m-v-15[_ngcontent-%COMP%]{margin:15px 0}.m-h-15[_ngcontent-%COMP%]{margin:0 15px}.m-20[_ngcontent-%COMP%]{margin:20px}.m-t-20[_ngcontent-%COMP%]{margin-top:20px}.m-r-20[_ngcontent-%COMP%]{margin-right:20px}.m-b-20[_ngcontent-%COMP%]{margin-bottom:20px}.m-l-20[_ngcontent-%COMP%]{margin-left:20px}.m-v-20[_ngcontent-%COMP%]{margin:20px 0}.m-h-20[_ngcontent-%COMP%]{margin:0 20px}.m-25[_ngcontent-%COMP%]{margin:25px}.m-t-25[_ngcontent-%COMP%]{margin-top:25px}.m-r-25[_ngcontent-%COMP%]{margin-right:25px}.m-b-25[_ngcontent-%COMP%]{margin-bottom:25px}.m-l-25[_ngcontent-%COMP%]{margin-left:25px}.m-v-25[_ngcontent-%COMP%]{margin:25px 0}.m-h-25[_ngcontent-%COMP%]{margin:0 25px}.m-30[_ngcontent-%COMP%]{margin:30px}.m-t-30[_ngcontent-%COMP%]{margin-top:30px}.m-r-30[_ngcontent-%COMP%]{margin-right:30px}.m-b-30[_ngcontent-%COMP%]{margin-bottom:30px}.m-l-30[_ngcontent-%COMP%]{margin-left:30px}.m-v-30[_ngcontent-%COMP%]{margin:30px 0}.m-h-30[_ngcontent-%COMP%]{margin:0 30px}.m-35[_ngcontent-%COMP%]{margin:35px}.m-t-35[_ngcontent-%COMP%]{margin-top:35px}.m-r-35[_ngcontent-%COMP%]{margin-right:35px}.m-b-35[_ngcontent-%COMP%]{margin-bottom:35px}.m-l-35[_ngcontent-%COMP%]{margin-left:35px}.m-v-35[_ngcontent-%COMP%]{margin:35px 0}.m-h-35[_ngcontent-%COMP%]{margin:0 35px}.m-40[_ngcontent-%COMP%]{margin:40px}.m-t-40[_ngcontent-%COMP%]{margin-top:40px}.m-r-40[_ngcontent-%COMP%]{margin-right:40px}.m-b-40[_ngcontent-%COMP%]{margin-bottom:40px}.m-l-40[_ngcontent-%COMP%]{margin-left:40px}.m-v-40[_ngcontent-%COMP%]{margin:40px 0}.m-h-40[_ngcontent-%COMP%]{margin:0 40px}.m-45[_ngcontent-%COMP%]{margin:45px}.m-t-45[_ngcontent-%COMP%]{margin-top:45px}.m-r-45[_ngcontent-%COMP%]{margin-right:45px}.m-b-45[_ngcontent-%COMP%]{margin-bottom:45px}.m-l-45[_ngcontent-%COMP%]{margin-left:45px}.m-v-45[_ngcontent-%COMP%]{margin:45px 0}.m-h-45[_ngcontent-%COMP%]{margin:0 45px}.m-50[_ngcontent-%COMP%]{margin:50px}.m-t-50[_ngcontent-%COMP%]{margin-top:50px}.m-r-50[_ngcontent-%COMP%]{margin-right:50px}.m-b-50[_ngcontent-%COMP%]{margin-bottom:50px}.m-l-50[_ngcontent-%COMP%]{margin-left:50px}.m-v-50[_ngcontent-%COMP%]{margin:50px 0}.m-h-50[_ngcontent-%COMP%]{margin:0 50px}.m-55[_ngcontent-%COMP%]{margin:55px}.m-t-55[_ngcontent-%COMP%]{margin-top:55px}.m-r-55[_ngcontent-%COMP%]{margin-right:55px}.m-b-55[_ngcontent-%COMP%]{margin-bottom:55px}.m-l-55[_ngcontent-%COMP%]{margin-left:55px}.m-v-55[_ngcontent-%COMP%]{margin:55px 0}.m-h-55[_ngcontent-%COMP%]{margin:0 55px}.m-60[_ngcontent-%COMP%]{margin:60px}.m-t-60[_ngcontent-%COMP%]{margin-top:60px}.m-r-60[_ngcontent-%COMP%]{margin-right:60px}.m-b-60[_ngcontent-%COMP%]{margin-bottom:60px}.m-l-60[_ngcontent-%COMP%]{margin-left:60px}.m-v-60[_ngcontent-%COMP%]{margin:60px 0}.m-h-60[_ngcontent-%COMP%]{margin:0 60px}.m-65[_ngcontent-%COMP%]{margin:65px}.m-t-65[_ngcontent-%COMP%]{margin-top:65px}.m-r-65[_ngcontent-%COMP%]{margin-right:65px}.m-b-65[_ngcontent-%COMP%]{margin-bottom:65px}.m-l-65[_ngcontent-%COMP%]{margin-left:65px}.m-v-65[_ngcontent-%COMP%]{margin:65px 0}.m-h-65[_ngcontent-%COMP%]{margin:0 65px}.m-70[_ngcontent-%COMP%]{margin:70px}.m-t-70[_ngcontent-%COMP%]{margin-top:70px}.m-r-70[_ngcontent-%COMP%]{margin-right:70px}.m-b-70[_ngcontent-%COMP%]{margin-bottom:70px}.m-l-70[_ngcontent-%COMP%]{margin-left:70px}.m-v-70[_ngcontent-%COMP%]{margin:70px 0}.m-h-70[_ngcontent-%COMP%]{margin:0 70px}.m-75[_ngcontent-%COMP%]{margin:75px}.m-t-75[_ngcontent-%COMP%]{margin-top:75px}.m-r-75[_ngcontent-%COMP%]{margin-right:75px}.m-b-75[_ngcontent-%COMP%]{margin-bottom:75px}.m-l-75[_ngcontent-%COMP%]{margin-left:75px}.m-v-75[_ngcontent-%COMP%]{margin:75px 0}.m-h-75[_ngcontent-%COMP%]{margin:0 75px}.m-80[_ngcontent-%COMP%]{margin:80px}.m-t-80[_ngcontent-%COMP%]{margin-top:80px}.m-r-80[_ngcontent-%COMP%]{margin-right:80px}.m-b-80[_ngcontent-%COMP%]{margin-bottom:80px}.m-l-80[_ngcontent-%COMP%]{margin-left:80px}.m-v-80[_ngcontent-%COMP%]{margin:80px 0}.m-h-80[_ngcontent-%COMP%]{margin:0 80px}.no-m[_ngcontent-%COMP%]{margin:0}.no-m-t[_ngcontent-%COMP%]{margin-top:0}.no-m-r[_ngcontent-%COMP%]{margin-right:0}.no-m-b[_ngcontent-%COMP%]{margin-bottom:0}.no-m-l[_ngcontent-%COMP%]{margin-left:0}.no-m-v[_ngcontent-%COMP%], .no-m-h[_ngcontent-%COMP%], .no-margin[_ngcontent-%COMP%]{margin:0}.no-m-lr[_ngcontent-%COMP%], .no-m-rl[_ngcontent-%COMP%]{margin-left:0;margin-right:0}.no-m-tb[_ngcontent-%COMP%], .no-m-bt[_ngcontent-%COMP%]{margin-top:0;margin-bottom:0}.m-t-only[_ngcontent-%COMP%]{margin-left:0;margin-right:0;margin-bottom:0}.m-b-only[_ngcontent-%COMP%]{margin-left:0;margin-right:0;margin-top:0}.m-l-only[_ngcontent-%COMP%]{margin-right:0;margin-top:0;margin-bottom:0}.m-r-only[_ngcontent-%COMP%]{margin-left:0;margin-top:0;margin-bottom:0}.m-auto[_ngcontent-%COMP%]{margin-left:auto;margin-right:auto}.ls-0[_ngcontent-%COMP%]{margin-left:10px;margin-right:10px}html[_ngcontent-%COMP%], body[_ngcontent-%COMP%]{-webkit-tap-highlight-color:transparent}div[_ngcontent-%COMP%]{box-sizing:border-box}.color-inherit[_ngcontent-%COMP%]{color:inherit}.no-shadow[_ngcontent-%COMP%]{box-shadow:none}.pointer[_ngcontent-%COMP%]{cursor:pointer}.nolist[_ngcontent-%COMP%]{list-style:none}.actions-menu[_ngcontent-%COMP%]{color:#fff}.alert[_ngcontent-%COMP%]{background-color:#e8f4fd;padding:6px 16px;font-size:.875rem;font-family:Roboto,Helvetica Neue,sans-serif;font-weight:400;line-height:1.43;border-radius:4px;letter-spacing:normal;margin:10px}.alert[_ngcontent-%COMP%] .message[_ngcontent-%COMP%]{padding:8px 0;font-size:18px}.alert[_ngcontent-%COMP%] .alert-check[_ngcontent-%COMP%]{color:#359ff4;margin-right:2px;font-size:1.4rem} .mat-tooltip{font-size:15px;color:#fff!important;background-color:#4461e2b3;border:1px solid rgb(25.7777777778,51.5555555556,166.2222222222);max-width:400px!important;white-space:pre-line!important}.loading[_ngcontent-%COMP%]{position:absolute;min-width:100%;width:100px;height:12px;background:linear-gradient(125deg,#fff,#4461e2,#fff);animation:grow 4s linear infinite,move 4s linear infinite}mat-card-title[_ngcontent-%COMP%]{font-weight:600;font-size:x-large;padding-left:20px;padding-top:20px}html[_ngcontent-%COMP%], body[_ngcontent-%COMP%]{overflow:hidden}.overflow-x-scroll[_ngcontent-%COMP%]{max-width:100%;overflow-x:auto}.overflow-no[_ngcontent-%COMP%]{overflow:hidden}.overflow-auto[_ngcontent-%COMP%]{overflow:auto}.overflow-scroll[_ngcontent-%COMP%]{overflow:scroll}.table-container[_ngcontent-%COMP%]{overflow-x:auto;max-width:100%}body[_ngcontent-%COMP%], .no-p[_ngcontent-%COMP%]{padding:0}.no-p-t[_ngcontent-%COMP%]{padding-top:0}.no-p-r[_ngcontent-%COMP%]{padding-right:0}.no-p-b[_ngcontent-%COMP%]{padding-bottom:0}.no-p-l[_ngcontent-%COMP%]{padding-left:0}.no-p-v[_ngcontent-%COMP%], .no-p-h[_ngcontent-%COMP%]{padding:0}.p-5[_ngcontent-%COMP%]{padding:5px}.p-t-5[_ngcontent-%COMP%]{padding-top:5px}.p-r-5[_ngcontent-%COMP%]{padding-right:5px}.p-b-5[_ngcontent-%COMP%]{padding-bottom:5px}.p-l-5[_ngcontent-%COMP%]{padding-left:5px}.p-v-5[_ngcontent-%COMP%]{padding:5px 0}.p-h-5[_ngcontent-%COMP%]{padding:0 5px}.p-10[_ngcontent-%COMP%]{padding:10px}.p-t-10[_ngcontent-%COMP%]{padding-top:10px}.p-b-10[_ngcontent-%COMP%]{padding-bottom:10px}.p-v-10[_ngcontent-%COMP%]{padding:10px 0}.p-h-10[_ngcontent-%COMP%]{padding:0 10px}.p-15[_ngcontent-%COMP%]{padding:15px}.p-t-15[_ngcontent-%COMP%]{padding-top:15px}.p-r-15[_ngcontent-%COMP%]{padding-right:15px}.p-b-15[_ngcontent-%COMP%]{padding-bottom:15px}.p-l-15[_ngcontent-%COMP%]{padding-left:15px}.p-v-15[_ngcontent-%COMP%]{padding:15px 0}.p-h-15[_ngcontent-%COMP%]{padding:0 15px}.p-20[_ngcontent-%COMP%]{padding:20px}.p-t-20[_ngcontent-%COMP%]{padding-top:20px}.p-r-20[_ngcontent-%COMP%]{padding-right:20px}.p-b-20[_ngcontent-%COMP%]{padding-bottom:20px}.p-l-20[_ngcontent-%COMP%]{padding-left:20px}.p-v-20[_ngcontent-%COMP%]{padding:20px 0}.p-h-20[_ngcontent-%COMP%]{padding:0 20px}.p-25[_ngcontent-%COMP%]{padding:25px}.p-t-25[_ngcontent-%COMP%]{padding-top:25px}.p-r-25[_ngcontent-%COMP%]{padding-right:25px}.p-b-25[_ngcontent-%COMP%]{padding-bottom:25px}.p-l-25[_ngcontent-%COMP%]{padding-left:25px}.p-v-25[_ngcontent-%COMP%]{padding:25px 0}.p-h-25[_ngcontent-%COMP%]{padding:0 25px}.p-30[_ngcontent-%COMP%]{padding:30px}.p-t-30[_ngcontent-%COMP%]{padding-top:30px}.p-r-30[_ngcontent-%COMP%]{padding-right:30px}.p-b-30[_ngcontent-%COMP%]{padding-bottom:30px}.p-l-30[_ngcontent-%COMP%]{padding-left:30px}.p-v-30[_ngcontent-%COMP%]{padding:30px 0}.p-h-30[_ngcontent-%COMP%]{padding:0 30px}.p-35[_ngcontent-%COMP%]{padding:35px}.p-t-35[_ngcontent-%COMP%]{padding-top:35px}.p-r-35[_ngcontent-%COMP%]{padding-right:35px}.p-b-35[_ngcontent-%COMP%]{padding-bottom:35px}.p-l-35[_ngcontent-%COMP%]{padding-left:35px}.p-v-35[_ngcontent-%COMP%]{padding:35px 0}.p-h-35[_ngcontent-%COMP%]{padding:0 35px}.p-40[_ngcontent-%COMP%]{padding:40px}.p-t-40[_ngcontent-%COMP%]{padding-top:40px}.p-r-40[_ngcontent-%COMP%]{padding-right:40px}.p-b-40[_ngcontent-%COMP%]{padding-bottom:40px}.p-l-40[_ngcontent-%COMP%]{padding-left:40px}.p-v-40[_ngcontent-%COMP%]{padding-top:40px;padding-bottom:40px}.p-h-40[_ngcontent-%COMP%]{padding:0 40px}.p-45[_ngcontent-%COMP%]{padding:45px}.p-t-45[_ngcontent-%COMP%]{padding-top:45px}.p-r-45[_ngcontent-%COMP%]{padding-right:45px}.p-b-45[_ngcontent-%COMP%]{padding-bottom:45px}.p-l-45[_ngcontent-%COMP%]{padding-left:45px}.p-v-45[_ngcontent-%COMP%]{padding:45px 0}.p-h-45[_ngcontent-%COMP%]{padding:0 45px}.p-50[_ngcontent-%COMP%]{padding:50px}.p-t-50[_ngcontent-%COMP%]{padding-top:50px}.p-r-50[_ngcontent-%COMP%]{padding-right:50px}.p-b-50[_ngcontent-%COMP%]{padding-bottom:50px}.p-l-50[_ngcontent-%COMP%]{padding-left:50px}.p-v-50[_ngcontent-%COMP%]{padding:50px 0}.p-h-50[_ngcontent-%COMP%]{padding:0 50px}.p-55[_ngcontent-%COMP%]{padding:55px}.p-t-55[_ngcontent-%COMP%]{padding-top:55px}.p-r-55[_ngcontent-%COMP%]{padding-right:55px}.p-b-55[_ngcontent-%COMP%]{padding-bottom:55px}.p-l-55[_ngcontent-%COMP%]{padding-left:55px}.p-v-55[_ngcontent-%COMP%]{padding:55px 0}.p-h-55[_ngcontent-%COMP%]{padding:0 55px}.p-60[_ngcontent-%COMP%]{padding:60px}.p-t-60[_ngcontent-%COMP%]{padding-top:60px}.p-r-60[_ngcontent-%COMP%]{padding-right:60px}.p-b-60[_ngcontent-%COMP%]{padding-bottom:60px}.p-l-60[_ngcontent-%COMP%]{padding-left:60px}.p-v-60[_ngcontent-%COMP%]{padding:60px 0}.p-h-60[_ngcontent-%COMP%]{padding:0 60px}.p-65[_ngcontent-%COMP%]{padding:65px}.p-t-65[_ngcontent-%COMP%]{padding-top:65px}.p-r-65[_ngcontent-%COMP%]{padding-right:65px}.p-b-65[_ngcontent-%COMP%]{padding-bottom:65px}.p-l-65[_ngcontent-%COMP%]{padding-left:65px}.p-v-65[_ngcontent-%COMP%]{padding:65px 0}.p-h-65[_ngcontent-%COMP%]{padding:0 65px}.p-70[_ngcontent-%COMP%]{padding:70px}.p-t-70[_ngcontent-%COMP%]{padding-top:70px}.p-r-70[_ngcontent-%COMP%]{padding-right:70px}.p-b-70[_ngcontent-%COMP%]{padding-bottom:70px}.p-l-70[_ngcontent-%COMP%]{padding-left:70px}.p-v-70[_ngcontent-%COMP%]{padding:70px 0}.p-h-70[_ngcontent-%COMP%]{padding:0 70px}.p-75[_ngcontent-%COMP%]{padding:75px}.p-t-75[_ngcontent-%COMP%]{padding-top:75px}.p-r-75[_ngcontent-%COMP%]{padding-right:75px}.p-b-75[_ngcontent-%COMP%]{padding-bottom:75px}.p-l-75[_ngcontent-%COMP%]{padding-left:75px}.p-v-75[_ngcontent-%COMP%]{padding:75px 0}.p-h-75[_ngcontent-%COMP%]{padding:0 75px}.p-80[_ngcontent-%COMP%]{padding:80px}.p-t-80[_ngcontent-%COMP%]{padding-top:80px}.p-r-80[_ngcontent-%COMP%]{padding-right:80px}.p-b-80[_ngcontent-%COMP%]{padding-bottom:80px}.p-l-80[_ngcontent-%COMP%]{padding-left:80px}.p-v-80[_ngcontent-%COMP%]{padding:80px 0}.p-h-80[_ngcontent-%COMP%]{padding:0 80px}.no-padding[_ngcontent-%COMP%]{padding:0!important}.no-pad-lr[_ngcontent-%COMP%], .no-pad-rl[_ngcontent-%COMP%]{padding-left:0;padding-right:0}.no-pad-tb[_ngcontent-%COMP%], .no-pad-bt[_ngcontent-%COMP%]{padding-top:0;padding-bottom:0}.pad-t-only[_ngcontent-%COMP%]{padding-left:0;padding-right:0;padding-bottom:0}.pad-b-only[_ngcontent-%COMP%]{padding-left:0;padding-right:0;padding-top:0}.pad-l-only[_ngcontent-%COMP%]{padding-right:0;padding-top:0;padding-bottom:0}.pad-r-only[_ngcontent-%COMP%]{padding-left:0;padding-top:0;padding-bottom:0}html[_ngcontent-%COMP%], body[_ngcontent-%COMP%], .rel[_ngcontent-%COMP%], .relative[_ngcontent-%COMP%]{position:relative}.abs[_ngcontent-%COMP%], .absolute[_ngcontent-%COMP%]{position:absolute}.fixed[_ngcontent-%COMP%]{position:fixed}.status-active[_ngcontent-%COMP%]{color:#5cb85c}.status-inactive[_ngcontent-%COMP%]{color:#666f73}.status-deleted[_ngcontent-%COMP%]{color:#000}.status-pending[_ngcontent-%COMP%]{color:orange}.status-approved[_ngcontent-%COMP%]{color:#4461e2}.status-overpaid[_ngcontent-%COMP%]{color:purple}.status-chargeoff[_ngcontent-%COMP%]{color:#f39c12}.status-active-overdue[_ngcontent-%COMP%], .status-block[_ngcontent-%COMP%]{color:red}.status-matured[_ngcontent-%COMP%]{color:#ff4000}.subStatus-contract-termination[_ngcontent-%COMP%]{color:#b3b3b3}.mat-step-header[_ngcontent-%COMP%] .mat-step-icon-state-done[_ngcontent-%COMP%]{background-color:#2af72a}.mat-step-header[_ngcontent-%COMP%] .mat-step-icon-state-done[_ngcontent-%COMP%] .status-transfer-progress[_ngcontent-%COMP%]{color:#ff4000}.mat-step-header[_ngcontent-%COMP%] .mat-step-icon-state-done[_ngcontent-%COMP%] .status-transfer-hold[_ngcontent-%COMP%]{color:#df0101}html[_ngcontent-%COMP%], body[_ngcontent-%COMP%]{-webkit-font-smoothing:antialiased}html[_ngcontent-%COMP%]{font-size:16px}body[_ngcontent-%COMP%]{font-family:Roboto,Helvetica Neue,sans-serif;font-weight:400;font-size:14px;color:#000000de;line-height:1.5;letter-spacing:normal}.mat-h1[_ngcontent-%COMP%], .mat-headline[_ngcontent-%COMP%], .mat-typography[_ngcontent-%COMP%] .mat-h1[_ngcontent-%COMP%], .mat-typography[_ngcontent-%COMP%] .mat-headline[_ngcontent-%COMP%], .mat-typography[_ngcontent-%COMP%] h1[_ngcontent-%COMP%]{font:400 24px/32px Roboto,Helvetica Neue,sans-serif;letter-spacing:normal;margin:0 0 16px}.lh-1[_ngcontent-%COMP%]{line-height:1}.lh-13[_ngcontent-%COMP%]{line-height:1.3}.lh-15[_ngcontent-%COMP%]{line-height:1.5}.bold[_ngcontent-%COMP%], .strong[_ngcontent-%COMP%]{font-weight:700}.no-bold[_ngcontent-%COMP%]{font-weight:400}.italic[_ngcontent-%COMP%], .em[_ngcontent-%COMP%]{font-style:italic}.strike[_ngcontent-%COMP%]{text-decoration:line-through}.normal[_ngcontent-%COMP%]{font-weight:400;font-style:normal}.uppercase[_ngcontent-%COMP%]{text-transform:uppercase}.text-left[_ngcontent-%COMP%]{text-align:left}.text-center[_ngcontent-%COMP%]{text-align:center}.text-right[_ngcontent-%COMP%]{text-align:right}.w100[_ngcontent-%COMP%]{font-weight:100}.w200[_ngcontent-%COMP%]{font-weight:200}.w300[_ngcontent-%COMP%]{font-weight:300}.w400[_ngcontent-%COMP%]{font-weight:400}.w500[_ngcontent-%COMP%]{font-weight:500}.w600[_ngcontent-%COMP%]{font-weight:600}.w700[_ngcontent-%COMP%]{font-weight:700}.w800[_ngcontent-%COMP%]{font-weight:800}.w900[_ngcontent-%COMP%]{font-weight:900}.f9[_ngcontent-%COMP%]{font-size:9px}.f10[_ngcontent-%COMP%]{font-size:10px}.f11[_ngcontent-%COMP%]{font-size:11px}.f12[_ngcontent-%COMP%]{font-size:12px}.f13[_ngcontent-%COMP%]{font-size:13px}.f14[_ngcontent-%COMP%]{font-size:14px}.f15[_ngcontent-%COMP%]{font-size:15px}.f16[_ngcontent-%COMP%]{font-size:16px}.f17[_ngcontent-%COMP%]{font-size:17px}.f18[_ngcontent-%COMP%]{font-size:18px;line-height:30px}.f19[_ngcontent-%COMP%]{font-size:19px}.f20[_ngcontent-%COMP%]{font-size:20px}.f30[_ngcontent-%COMP%]{font-size:30px}.f40[_ngcontent-%COMP%]{font-size:40px}.f50[_ngcontent-%COMP%]{font-size:50px}.f60[_ngcontent-%COMP%]{font-size:60px}.size-small[_ngcontent-%COMP%]{font-size:75%}.size-normal[_ngcontent-%COMP%]{font-size:100%}.size-medium[_ngcontent-%COMP%]{font-size:125%}.size-big[_ngcontent-%COMP%], .size-large[_ngcontent-%COMP%]{font-size:150%}.size-huge[_ngcontent-%COMP%]{font-size:200%}.inherit[_ngcontent-%COMP%]{font:inherit}.text-shadow[_ngcontent-%COMP%]{text-shadow:1px 1px 1px rgba(0,0,0,.4)}.text-rgb-2[_ngcontent-%COMP%]{color:#0003}.text-rgb-3[_ngcontent-%COMP%]{color:#0000004d}.text-rgb-4[_ngcontent-%COMP%]{color:#0006}.text-rgb-5[_ngcontent-%COMP%]{color:#00000080}.no-ul[_ngcontent-%COMP%], .no-ul[_ngcontent-%COMP%]:hover, .no-ul[_ngcontent-%COMP%] a[_ngcontent-%COMP%], .no-ul[_ngcontent-%COMP%] a[_ngcontent-%COMP%]:hover{text-decoration:none}.no-wrap[_ngcontent-%COMP%]{white-space:nowrap}.auto-cell-size[_ngcontent-%COMP%]{white-space:nowrap;width:1%}.ls-0[_ngcontent-%COMP%]{letter-spacing:-3px;white-space:nowrap}.label-field[_ngcontent-%COMP%]{margin-top:32px}.wrap-content[_ngcontent-%COMP%]{overflow-wrap:break-word;word-wrap:break-word}.no-break-content[_ngcontent-%COMP%]{overflow-wrap:anywhere!important}.fit[_ngcontent-%COMP%]{max-width:100%}.half-width[_ngcontent-%COMP%]{width:50%}.full-width[_ngcontent-%COMP%]{width:100%}.full-height[_ngcontent-%COMP%]{height:100%}html[_ngcontent-%COMP%], body[_ngcontent-%COMP%]{width:100%;height:100%;min-height:100%}body[_ngcontent-%COMP%] table[_ngcontent-%COMP%]{width:100%}.container[_ngcontent-%COMP%]{max-width:74rem;width:90%}.mw300[_ngcontent-%COMP%]{max-width:300px}.mw400[_ngcontent-%COMP%]{max-width:400px}.mw500[_ngcontent-%COMP%]{max-width:500px}.mw600[_ngcontent-%COMP%]{max-width:600px}.fullwidth[_ngcontent-%COMP%]{width:100%}.zindex-1[_ngcontent-%COMP%]{z-index:1}.zindex-2[_ngcontent-%COMP%]{z-index:2}.zindex-3[_ngcontent-%COMP%]{z-index:3}.zindex-4[_ngcontent-%COMP%]{z-index:4}.tab-container[_ngcontent-%COMP%]{padding:1%;margin:1%}.tab-container[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{margin:1% auto}.tab-container[_ngcontent-%COMP%] .action-button[_ngcontent-%COMP%]{margin-left:auto}.tab-container[_ngcontent-%COMP%] table[_ngcontent-%COMP%]{width:100%}.tab-container[_ngcontent-%COMP%] table[_ngcontent-%COMP%] .account-action-button[_ngcontent-%COMP%]{min-width:26px;padding:0 0 3px;margin:0 10%;line-height:25px}.tab-container[_ngcontent-%COMP%] table[_ngcontent-%COMP%] .account-action-button[_ngcontent-%COMP%] .accruals[_ngcontent-%COMP%]{padding-top:1%}.select-row[_ngcontent-%COMP%]:hover{cursor:pointer;font-weight:800}"]})}}return t})();var _n=(()=>{class t{constructor(){this.route=g(E),this.entityId=this.route.parent.parent.snapshot.paramMap.get("id"),this.route.data.subscribe(e=>{this.entityDatatable=e.transactionDatatable,this.multiRowDatatableFlag=this.entityDatatable.columnHeaders[0].columnName==="id"})}static{this.\u0275fac=function(s){return new(s||t)}}static{this.\u0275cmp=T({type:t,selectors:[["mifosx-datatable-transaction-tab"]],decls:2,vars:3,consts:[[1,"tab-container","mat-typography"],["entityType","Saving Account Transaction",3,"entityId","multiRowDatatableFlag","entityDatatable"]],template:function(s,o){s&1&&(i(0,"div",0),C(1,"mifosx-entity-datatable-tab",1),a()),s&2&&(n(),d("entityId",o.entityId)("multiRowDatatableFlag",o.multiRowDatatableFlag)("entityDatatable",o.entityDatatable))},dependencies:[P,O,pn],encapsulation:2})}}return t})();var $a=()=>["../../"];function Wa(t,m){t&1&&(i(0,"mat-error"),r(1),c(2,"translate"),c(3,"translate"),i(4,"strong"),r(5),c(6,"translate"),a()()),t&2&&(n(),V(" ",l(2,3,"labels.inputs.Approved On Date")," ",l(3,5,"labels.commons.is")," "),n(4),p(l(6,7,"labels.commons.required")))}var hn=(()=>{class t{constructor(){this.formBuilder=g(rt),this.savingsService=g(I),this.dateUtils=g(j),this.route=g(E),this.router=g(z),this.settingsService=g(U),this.minDate=new Date(2e3,0,1),this.maxDate=new Date,this.accountId=this.route.snapshot.params.savingAccountId}ngOnInit(){this.maxDate=this.settingsService.businessDate,this.createApproveSavingsAccountForm()}createApproveSavingsAccountForm(){this.approveSavingsAccountForm=this.formBuilder.group({approvedOnDate:["",H.required],note:[""]})}submit(){let e=this.approveSavingsAccountForm.value,s=this.settingsService.language.code,o=this.settingsService.dateFormat,u=this.approveSavingsAccountForm.value.approvedOnDate;e.approvedOnDate instanceof Date&&(e.approvedOnDate=this.dateUtils.formatDate(u,o));let x=Q(G({},e),{dateFormat:o,locale:s});this.savingsService.executeSavingsAccountCommand(this.accountId,"approve",x).subscribe(()=>{this.router.navigate(["../../transactions"],{relativeTo:this.route})})}static{this.\u0275fac=function(s){return new(s||t)}}static{this.\u0275cmp=T({type:t,selectors:[["mifosx-approve-savings-account"]],decls:26,vars:21,consts:[["approvedOnDatePicker",""],[1,"container","mat-elevation-z8"],[3,"ngSubmit","formGroup"],[1,"layout-column"],[3,"click"],["matInput","","required","","formControlName","approvedOnDate",3,"min","max","matDatepicker"],["matSuffix","",3,"for"],["matInput","","formControlName","note","cdkTextareaAutosize","","cdkAutosizeMinRows","2"],[1,"layout-row","align-center","gap-5px","responsive-column"],["type","button","mat-raised-button","",3,"routerLink"],["mat-raised-button","","color","primary",3,"disabled"]],template:function(s,o){if(s&1){let u=D();i(0,"div",1)(1,"mat-card")(2,"form",2),b("ngSubmit",function(){return S(u),M(o.submit())}),i(3,"mat-card-content")(4,"div",3)(5,"mat-form-field",4),b("click",function(){S(u);let B=w(12);return M(B.open())}),i(6,"mat-label"),r(7),c(8,"translate"),a(),C(9,"input",5)(10,"mat-datepicker-toggle",6)(11,"mat-datepicker",null,0),v(13,Wa,7,9,"mat-error"),a(),i(14,"mat-form-field")(15,"mat-label"),r(16),c(17,"translate"),a(),C(18,"textarea",7),a()()(),i(19,"mat-card-actions",8)(20,"button",9),r(21),c(22,"translate"),a(),i(23,"button",10),r(24),c(25,"translate"),a()()()()()}if(s&2){let u=w(12);n(2),d("formGroup",o.approveSavingsAccountForm),n(5),p(l(8,12,"labels.inputs.Approved On Date")),n(2),d("min",o.minDate)("max",o.maxDate)("matDatepicker",u),n(),d("for",u),n(3),_(o.approveSavingsAccountForm.controls.approvedOnDate.hasError("required")?13:-1),n(3),p(l(17,14,"labels.inputs.Note")),n(4),d("routerLink",k(20,$a)),n(),f(" ",l(22,16,"labels.buttons.Cancel")," "),n(2),d("disabled",!o.approveSavingsAccountForm.valid),n(),f(" ",l(25,18,"labels.buttons.Confirm")," ")}},dependencies:[P,O,it,et,K,nt,lt,at,ot,q,J,ct,bt,Z,X,mt,vt,st,ht,xt,_t,F,ae,y],styles:[".container[_ngcontent-%COMP%]{max-width:37rem}"]})}}return t})();var Qa=()=>["../../"];function Ka(t,m){t&1&&(i(0,"mat-error"),r(1),c(2,"translate"),c(3,"translate"),i(4,"strong"),r(5),c(6,"translate"),a()()),t&2&&(n(),V(" ",l(2,3,"labels.inputs.Rejected On Date")," ",l(3,5,"labels.commons.is")," "),n(4),p(l(6,7,"labels.commons.required")))}var xn=(()=>{class t{constructor(){this.formBuilder=g(rt),this.savingsService=g(I),this.dateUtils=g(j),this.route=g(E),this.router=g(z),this.settingsService=g(U),this.minDate=new Date(2e3,0,1),this.maxDate=new Date,this.accountId=this.route.snapshot.params.savingAccountId}ngOnInit(){this.maxDate=this.settingsService.businessDate,this.createRejectSavingsAccountForm()}createRejectSavingsAccountForm(){this.rejectSavingsAccountForm=this.formBuilder.group({rejectedOnDate:["",H.required],note:[""]})}submit(){let e=this.rejectSavingsAccountForm.value,s=this.settingsService.language.code,o=this.settingsService.dateFormat,u=this.rejectSavingsAccountForm.value.rejectedOnDate;e.rejectedOnDate instanceof Date&&(e.rejectedOnDate=this.dateUtils.formatDate(u,o));let x=Q(G({},e),{dateFormat:o,locale:s});this.savingsService.executeSavingsAccountCommand(this.accountId,"reject",x).subscribe(()=>{this.router.navigate(["../../"],{relativeTo:this.route})})}static{this.\u0275fac=function(s){return new(s||t)}}static{this.\u0275cmp=T({type:t,selectors:[["mifosx-reject-savings-account"]],decls:26,vars:21,consts:[["rejectedOnDatePicker",""],[1,"container","mat-elevation-z8"],[3,"ngSubmit","formGroup"],[1,"layout-column"],[3,"click"],["matInput","","required","","formControlName","rejectedOnDate",3,"min","max","matDatepicker"],["matSuffix","",3,"for"],["matInput","","formControlName","note","cdkTextareaAutosize","","cdkAutosizeMinRows","2"],[1,"layout-row","align-center","gap-5px","responsive-column"],["type","button","mat-raised-button","",3,"routerLink"],["mat-raised-button","","color","warn",3,"disabled"]],template:function(s,o){if(s&1){let u=D();i(0,"div",1)(1,"mat-card")(2,"form",2),b("ngSubmit",function(){return S(u),M(o.submit())}),i(3,"mat-card-content")(4,"div",3)(5,"mat-form-field",4),b("click",function(){S(u);let B=w(12);return M(B.open())}),i(6,"mat-label"),r(7),c(8,"translate"),a(),C(9,"input",5)(10,"mat-datepicker-toggle",6)(11,"mat-datepicker",null,0),v(13,Ka,7,9,"mat-error"),a(),i(14,"mat-form-field")(15,"mat-label"),r(16),c(17,"translate"),a(),C(18,"textarea",7),a()()(),i(19,"mat-card-actions",8)(20,"button",9),r(21),c(22,"translate"),a(),i(23,"button",10),r(24),c(25,"translate"),a()()()()()}if(s&2){let u=w(12);n(2),d("formGroup",o.rejectSavingsAccountForm),n(5),p(l(8,12,"labels.inputs.Rejected On Date")),n(2),d("min",o.minDate)("max",o.maxDate)("matDatepicker",u),n(),d("for",u),n(3),_(o.rejectSavingsAccountForm.controls.rejectedOnDate.hasError("required")?13:-1),n(3),p(l(17,14,"labels.inputs.Note")),n(4),d("routerLink",k(20,Qa)),n(),f(" ",l(22,16,"labels.buttons.Cancel")," "),n(2),d("disabled",!o.rejectSavingsAccountForm.valid),n(),f(" ",l(25,18,"labels.buttons.Confirm")," ")}},dependencies:[P,O,it,et,K,nt,lt,at,ot,q,J,ct,bt,Z,X,mt,vt,st,ht,xt,_t,F,ae,y],styles:[".container[_ngcontent-%COMP%]{max-width:37rem}"]})}}return t})();var Ya=()=>["../../transactions"];function Ja(t,m){t&1&&(i(0,"mat-error"),r(1),c(2,"translate"),c(3,"translate"),i(4,"strong"),r(5),c(6,"translate"),a()()),t&2&&(n(),V(" ",l(2,3,"labels.inputs.Activated On Date")," ",l(3,5,"labels.commons.is")," "),n(4),p(l(6,7,"labels.commons.required")))}var bn=(()=>{class t{constructor(){this.formBuilder=g(rt),this.savingsService=g(I),this.dateUtils=g(j),this.route=g(E),this.router=g(z),this.settingsService=g(U),this.minDate=new Date(2e3,0,1),this.maxDate=new Date,this.accountId=this.route.snapshot.params.savingAccountId}ngOnInit(){this.maxDate=this.settingsService.businessDate,this.createActivateSavingsAccountForm()}createActivateSavingsAccountForm(){this.activateSavingsAccountForm=this.formBuilder.group({activatedOnDate:["",H.required]})}submit(){let e=this.activateSavingsAccountForm.value,s=this.settingsService.language.code,o=this.settingsService.dateFormat,u=this.activateSavingsAccountForm.value.activatedOnDate;e.activatedOnDate instanceof Date&&(e.activatedOnDate=this.dateUtils.formatDate(u,o));let x=Q(G({},e),{dateFormat:o,locale:s});this.savingsService.executeSavingsAccountCommand(this.accountId,"activate",x).subscribe(()=>{this.router.navigate(["../../transactions"],{relativeTo:this.route})})}static{this.\u0275fac=function(s){return new(s||t)}}static{this.\u0275cmp=T({type:t,selectors:[["mifosx-activate-savings-account"]],decls:21,vars:18,consts:[["activatedOnDatePicker",""],[1,"container","mat-elevation-z8"],[3,"ngSubmit","formGroup"],[1,"layout-column"],[1,"flex-fill",3,"click"],["matInput","","required","","formControlName","activatedOnDate",3,"min","max","matDatepicker"],["matSuffix","",3,"for"],[1,"layout-row","align-center","gap-5px","responsive-column"],["type","button","mat-raised-button","",3,"routerLink"],["mat-raised-button","","color","primary",3,"disabled"]],template:function(s,o){if(s&1){let u=D();i(0,"div",1)(1,"mat-card")(2,"form",2),b("ngSubmit",function(){return S(u),M(o.submit())}),i(3,"mat-card-content")(4,"div",3)(5,"mat-form-field",4),b("click",function(){S(u);let B=w(12);return M(B.open())}),i(6,"mat-label"),r(7),c(8,"translate"),a(),C(9,"input",5)(10,"mat-datepicker-toggle",6)(11,"mat-datepicker",null,0),v(13,Ja,7,9,"mat-error"),a()()(),i(14,"mat-card-actions",7)(15,"button",8),r(16),c(17,"translate"),a(),i(18,"button",9),r(19),c(20,"translate"),a()()()()()}if(s&2){let u=w(12);n(2),d("formGroup",o.activateSavingsAccountForm),n(5),p(l(8,11,"labels.inputs.Activated On Date")),n(2),d("min",o.minDate)("max",o.maxDate)("matDatepicker",u),n(),d("for",u),n(3),_(o.activateSavingsAccountForm.controls.activatedOnDate.hasError("required")?13:-1),n(2),d("routerLink",k(17,Ya)),n(),f(" ",l(17,13,"labels.buttons.Cancel")," "),n(2),d("disabled",!o.activateSavingsAccountForm.valid),n(),f(" ",l(20,15,"labels.buttons.Confirm")," ")}},dependencies:[P,O,it,et,K,nt,lt,at,ot,q,J,ct,bt,Z,X,mt,vt,st,ht,xt,_t,F,y],styles:[".container[_ngcontent-%COMP%]{max-width:37rem}"]})}}return t})();var Xa=()=>["../../"],Sn=(()=>{class t{constructor(){this.formBuilder=g(rt),this.savingsService=g(I),this.route=g(E),this.router=g(z),this.accountId=this.route.snapshot.params.savingAccountId}ngOnInit(){this.createUndoApprovalSavingsAccountForm()}createUndoApprovalSavingsAccountForm(){this.undoApprovalSavingsAccountForm=this.formBuilder.group({note:[""]})}submit(){let e=G({},this.undoApprovalSavingsAccountForm.value);this.savingsService.executeSavingsAccountCommand(this.accountId,"undoapproval",e).subscribe(()=>{this.router.navigate(["../../transactions"],{relativeTo:this.route})})}static{this.\u0275fac=function(s){return new(s||t)}}static{this.\u0275cmp=T({type:t,selectors:[["mifosx-undo-approval-savings-account"]],decls:16,vars:13,consts:[[1,"container","mat-elevation-z8"],[3,"ngSubmit","formGroup"],[1,"flex-fill"],["matInput","","formControlName","note","cdkTextareaAutosize","","cdkAutosizeMinRows","2"],[1,"layout-row","align-center","gap-5px","responsive-column"],["type","button","mat-raised-button","",3,"routerLink"],["mat-raised-button","","color","warn",3,"disabled"]],template:function(s,o){s&1&&(i(0,"div",0)(1,"mat-card")(2,"form",1),b("ngSubmit",function(){return o.submit()}),i(3,"mat-card-content")(4,"mat-form-field",2)(5,"mat-label"),r(6),c(7,"translate"),a(),C(8,"textarea",3),a()(),i(9,"mat-card-actions",4)(10,"button",5),r(11),c(12,"translate"),a(),i(13,"button",6),r(14),c(15,"translate"),a()()()()()),s&2&&(n(2),d("formGroup",o.undoApprovalSavingsAccountForm),n(4),p(l(7,6,"labels.inputs.Note")),n(4),d("routerLink",k(12,Xa)),n(),f(" ",l(12,8,"labels.buttons.Cancel")," "),n(2),d("disabled",!o.undoApprovalSavingsAccountForm.valid),n(),f(" ",l(15,10,"labels.buttons.Confirm")," "))},dependencies:[P,O,it,et,K,nt,at,ot,q,J,ct,bt,Z,X,st,F,ae,y],styles:[".container[_ngcontent-%COMP%]{max-width:37rem}"]})}}return t})();var Za=()=>["../../"];function to(t,m){t&1&&(i(0,"mat-error"),r(1),c(2,"translate"),c(3,"translate"),i(4,"strong"),r(5),c(6,"translate"),a()()),t&2&&(n(),V(" ",l(2,3,"labels.inputs.Transaction Date")," ",l(3,5,"labels.commons.is")," "),n(4),p(l(6,7,"labels.commons.required")))}var Mn=(()=>{class t{constructor(){this.formBuilder=g(rt),this.savingsService=g(I),this.dateUtils=g(j),this.route=g(E),this.router=g(z),this.settingsService=g(U),this.minDate=new Date(2e3,0,1),this.maxDate=new Date,this.accountId=this.route.snapshot.params.savingAccountId}ngOnInit(){this.maxDate=this.settingsService.businessDate,this.createPostInterestSavingsAccountForm()}createPostInterestSavingsAccountForm(){this.postInterestSavingsAccountForm=this.formBuilder.group({transactionDate:["",H.required]})}submit(){let e=this.postInterestSavingsAccountForm.value,s=this.settingsService.language.code,o=this.settingsService.dateFormat,u=this.postInterestSavingsAccountForm.value.transactionDate;e.transactionDate instanceof Date&&(e.transactionDate=this.dateUtils.formatDate(u,o));let x=Q(G({},e),{IsPostInterestAsOn:!0,dateFormat:o,locale:s});this.savingsService.executeSavingsAccountTransactionsCommand(this.accountId,"postInterestAsOn",x).subscribe(()=>{this.router.navigate(["../../transactions"],{relativeTo:this.route})})}static{this.\u0275fac=function(s){return new(s||t)}}static{this.\u0275cmp=T({type:t,selectors:[["mifosx-post-interest-as-on-savings-account"]],decls:20,vars:18,consts:[["transactionDatePicker",""],[1,"container","mat-elevation-z8"],[3,"ngSubmit","formGroup"],[1,"flex-100",3,"click"],["matInput","","required","","formControlName","transactionDate",3,"min","max","matDatepicker"],["matSuffix","",3,"for"],[1,"layout-row","align-center","gap-5px","responsive-column"],["type","button","mat-raised-button","",3,"routerLink"],["mat-raised-button","","color","primary",3,"disabled"]],template:function(s,o){if(s&1){let u=D();i(0,"div",1)(1,"mat-card")(2,"form",2),b("ngSubmit",function(){return S(u),M(o.submit())}),i(3,"mat-card-content")(4,"mat-form-field",3),b("click",function(){S(u);let B=w(11);return M(B.open())}),i(5,"mat-label"),r(6),c(7,"translate"),a(),C(8,"input",4)(9,"mat-datepicker-toggle",5)(10,"mat-datepicker",null,0),v(12,to,7,9,"mat-error"),a()(),i(13,"mat-card-actions",6)(14,"button",7),r(15),c(16,"translate"),a(),i(17,"button",8),r(18),c(19,"translate"),a()()()()()}if(s&2){let u=w(11);n(2),d("formGroup",o.postInterestSavingsAccountForm),n(4),p(l(7,11,"labels.inputs.Transaction Date")),n(2),d("min",o.minDate)("max",o.maxDate)("matDatepicker",u),n(),d("for",u),n(3),_(o.postInterestSavingsAccountForm.controls.transactionDate.hasError("required")?12:-1),n(2),d("routerLink",k(17,Za)),n(),f(" ",l(16,13,"labels.buttons.Cancel")," "),n(2),d("disabled",!o.postInterestSavingsAccountForm.valid),n(),f(" ",l(19,15,"labels.buttons.Confirm")," ")}},dependencies:[P,O,it,et,K,nt,lt,at,ot,q,J,ct,bt,Z,X,mt,vt,st,ht,xt,_t,F,y],styles:[".container[_ngcontent-%COMP%]{max-width:37rem}"]})}}return t})();var eo=()=>["../../"];function no(t,m){if(t&1&&(i(0,"mat-option",6),r(1),a()),t&2){let e=m.$implicit;d("value",e.id),n(),f(" ",e.displayName," ")}}function io(t,m){t&1&&(i(0,"mat-error"),r(1),c(2,"translate"),c(3,"translate"),i(4,"strong"),r(5),c(6,"translate"),a()()),t&2&&(n(),V(" ",l(2,3,"labels.inputs.Assignment Date")," ",l(3,5,"labels.commons.is")," "),n(4),p(l(6,7,"labels.commons.required")))}var An=(()=>{class t{constructor(){this.formBuilder=g(rt),this.savingsService=g(I),this.dateUtils=g(j),this.route=g(E),this.router=g(z),this.settingsService=g(U),this.minDate=new Date(2e3,0,1),this.maxDate=new Date,this.accountId=this.route.snapshot.params.savingAccountId,this.route.data.subscribe(e=>{this.savingsAccountData=e.savingsAccountActionData})}ngOnInit(){this.maxDate=this.settingsService.businessDate,this.fieldOfficerData=this.savingsAccountData.fieldOfficerOptions,this.createSavingsAssignStaffForm()}createSavingsAssignStaffForm(){this.savingsAssignStaffForm=this.formBuilder.group({toSavingsOfficerId:[""],assignmentDate:["",H.required]})}submit(){let e=this.savingsAssignStaffForm.value,s=this.settingsService.language.code,o=this.settingsService.dateFormat,u=this.savingsAssignStaffForm.value.assignmentDate;e.assignmentDate instanceof Date&&(e.assignmentDate=this.dateUtils.formatDate(u,o));let x=Q(G({},e),{fromSavingsOfficerId:"",dateFormat:o,locale:s});this.savingsService.executeSavingsAccountCommand(this.accountId,"assignSavingsOfficer",x).subscribe(()=>{this.router.navigate(["../../transactions"],{relativeTo:this.route})})}static{this.\u0275fac=function(s){return new(s||t)}}static{this.\u0275cmp=T({type:t,selectors:[["mifosx-savings-account-assign-staff"]],decls:28,vars:21,consts:[["assignmentDatePicker",""],[1,"container","mat-elevation-z8"],[3,"ngSubmit","formGroup"],[1,"layout-column"],[1,"flex-48"],["formControlName","toSavingsOfficerId"],[3,"value"],[3,"click"],["matInput","","required","","formControlName","assignmentDate",3,"min","max","matDatepicker"],["matSuffix","",3,"for"],[1,"layout-row","align-center","gap-5px","responsive-column"],["type","button","mat-raised-button","",3,"routerLink"],["mat-raised-button","","color","primary",3,"disabled"]],template:function(s,o){if(s&1){let u=D();i(0,"div",1)(1,"mat-card")(2,"form",2),b("ngSubmit",function(){return S(u),M(o.submit())}),i(3,"mat-card-content")(4,"div",3)(5,"mat-form-field",4)(6,"mat-label"),r(7),c(8,"translate"),a(),i(9,"mat-select",5),ut(10,no,2,2,"mat-option",6,dt),a()(),i(12,"mat-form-field",7),b("click",function(){S(u);let B=w(19);return M(B.open())}),i(13,"mat-label"),r(14),c(15,"translate"),a(),C(16,"input",8)(17,"mat-datepicker-toggle",9)(18,"mat-datepicker",null,0),v(20,io,7,9,"mat-error"),a()()(),i(21,"mat-card-actions",10)(22,"button",11),r(23),c(24,"translate"),a(),i(25,"button",12),r(26),c(27,"translate"),a()()()()()}if(s&2){let u=w(19);n(2),d("formGroup",o.savingsAssignStaffForm),n(5),p(l(8,12,"labels.inputs.To Savings Officer")),n(3),gt(o.fieldOfficerData),n(4),p(l(15,14,"labels.inputs.Assignment Date")),n(2),d("min",o.minDate)("max",o.maxDate)("matDatepicker",u),n(),d("for",u),n(3),_(o.savingsAssignStaffForm.controls.assignmentDate.hasError("required")?20:-1),n(2),d("routerLink",k(20,eo)),n(),f(" ",l(24,16,"labels.buttons.Cancel")," "),n(2),d("disabled",!o.savingsAssignStaffForm.valid),n(),f(" ",l(27,18,"labels.buttons.Confirm")," ")}},dependencies:[P,O,it,et,K,nt,lt,at,ot,q,J,ct,bt,Z,X,mt,vt,st,wt,It,ht,xt,_t,F,y],styles:[".container[_ngcontent-%COMP%]{max-width:37rem}"]})}}return t})();var ao=()=>["../../"];function oo(t,m){t&1&&(i(0,"mat-error"),r(1),c(2,"translate"),c(3,"translate"),i(4,"strong"),r(5),c(6,"translate"),a()()),t&2&&(n(),V(" ",l(2,3,"labels.inputs.Unassignment Date")," ",l(3,5,"labels.commons.is")," "),n(4),p(l(6,7,"labels.commons.required")))}var Tn=(()=>{class t{constructor(){this.formBuilder=g(rt),this.savingsService=g(I),this.dateUtils=g(j),this.route=g(E),this.router=g(z),this.settingsService=g(U),this.minDate=new Date(2e3,0,1),this.maxDate=new Date,this.accountId=this.route.snapshot.params.savingAccountId}ngOnInit(){this.maxDate=this.settingsService.businessDate,this.createSavingsUnassignStaffForm()}createSavingsUnassignStaffForm(){this.savingsUnassignStaffForm=this.formBuilder.group({unassignedDate:["",H.required]})}submit(){let e=this.savingsUnassignStaffForm.value,s=this.settingsService.language.code,o=this.settingsService.dateFormat,u=this.savingsUnassignStaffForm.value.unassignedDate;e.unassignedDate instanceof Date&&(e.unassignedDate=this.dateUtils.formatDate(u,o));let x=Q(G({},e),{dateFormat:o,locale:s});this.savingsService.executeSavingsAccountCommand(this.accountId,"unassignSavingsOfficer",x).subscribe(()=>{this.router.navigate(["../../transactions"],{relativeTo:this.route})})}static{this.\u0275fac=function(s){return new(s||t)}}static{this.\u0275cmp=T({type:t,selectors:[["mifosx-savings-account-unassign-staff"]],decls:20,vars:18,consts:[["unassignedDatePicker",""],[1,"container","mat-elevation-z8"],[3,"ngSubmit","formGroup"],[1,"flex-fill",3,"click"],["matInput","","required","","formControlName","unassignedDate",3,"min","max","matDatepicker"],["matSuffix","",3,"for"],[1,"layout-row","align-center","gap-5px","responsive-column"],["type","button","mat-raised-button","",3,"routerLink"],["mat-raised-button","","color","primary",3,"disabled"]],template:function(s,o){if(s&1){let u=D();i(0,"div",1)(1,"mat-card")(2,"form",2),b("ngSubmit",function(){return S(u),M(o.submit())}),i(3,"mat-card-content")(4,"mat-form-field",3),b("click",function(){S(u);let B=w(11);return M(B.open())}),i(5,"mat-label"),r(6),c(7,"translate"),a(),C(8,"input",4)(9,"mat-datepicker-toggle",5)(10,"mat-datepicker",null,0),v(12,oo,7,9,"mat-error"),a()(),i(13,"mat-card-actions",6)(14,"button",7),r(15),c(16,"translate"),a(),i(17,"button",8),r(18),c(19,"translate"),a()()()()()}if(s&2){let u=w(11);n(2),d("formGroup",o.savingsUnassignStaffForm),n(4),p(l(7,11,"labels.inputs.Unassignment Date")),n(2),d("min",o.minDate)("max",o.maxDate)("matDatepicker",u),n(),d("for",u),n(3),_(o.savingsUnassignStaffForm.controls.unassignedDate.hasError("required")?12:-1),n(2),d("routerLink",k(17,ao)),n(),f(" ",l(16,13,"labels.buttons.Cancel")," "),n(2),d("disabled",!o.savingsUnassignStaffForm.valid),n(),f(" ",l(19,15,"labels.buttons.Confirm")," ")}},dependencies:[P,O,it,et,K,nt,lt,at,ot,q,J,ct,bt,Z,X,mt,vt,st,ht,xt,_t,F,y],styles:[".container[_ngcontent-%COMP%]{max-width:37rem}"]})}}return t})();var ro=()=>["../../"];function co(t,m){t&1&&(i(0,"mat-error"),r(1),c(2,"translate"),c(3,"translate"),i(4,"strong"),r(5),c(6,"translate"),a()()),t&2&&(n(),V(" ",l(2,3,"labels.inputs.Withdrawn On Date")," ",l(3,5,"labels.commons.is")," "),n(4),p(l(6,7,"labels.commons.required")))}var Pn=(()=>{class t{constructor(){this.formBuilder=g(rt),this.savingsService=g(I),this.dateUtils=g(j),this.route=g(E),this.router=g(z),this.settingsService=g(U),this.minDate=new Date(2e3,0,1),this.maxDate=new Date,this.accountId=this.route.snapshot.params.savingAccountId}ngOnInit(){this.maxDate=this.settingsService.businessDate,this.createWithdrawSavingsAccountForm()}createWithdrawSavingsAccountForm(){this.withdrawSavingsAccountForm=this.formBuilder.group({withdrawnOnDate:["",H.required],note:[""]})}submit(){let e=this.withdrawSavingsAccountForm.value,s=this.settingsService.language.code,o=this.settingsService.dateFormat,u=this.withdrawSavingsAccountForm.value.withdrawnOnDate;e.withdrawnOnDate instanceof Date&&(e.withdrawnOnDate=this.dateUtils.formatDate(u,o));let x=Q(G({},e),{dateFormat:o,locale:s});this.savingsService.executeSavingsAccountCommand(this.accountId,"withdrawnByApplicant",x).subscribe(()=>{this.router.navigate(["../../"],{relativeTo:this.route})})}static{this.\u0275fac=function(s){return new(s||t)}}static{this.\u0275cmp=T({type:t,selectors:[["mifosx-withdraw-by-client-savings-account"]],decls:26,vars:21,consts:[["withdrawnOnDatePicker",""],[1,"container","mat-elevation-z8"],[3,"ngSubmit","formGroup"],[1,"layout-column"],[3,"click"],["matInput","","required","","formControlName","withdrawnOnDate",3,"min","max","matDatepicker"],["matSuffix","",3,"for"],["matInput","","formControlName","note","cdkTextareaAutosize","","cdkAutosizeMinRows","2"],[1,"layout-row","align-center","gap-5px","responsive-column"],["type","button","mat-raised-button","",3,"routerLink"],["mat-raised-button","","color","primary",3,"disabled"]],template:function(s,o){if(s&1){let u=D();i(0,"div",1)(1,"mat-card")(2,"form",2),b("ngSubmit",function(){return S(u),M(o.submit())}),i(3,"mat-card-content")(4,"div",3)(5,"mat-form-field",4),b("click",function(){S(u);let B=w(12);return M(B.open())}),i(6,"mat-label"),r(7),c(8,"translate"),a(),C(9,"input",5)(10,"mat-datepicker-toggle",6)(11,"mat-datepicker",null,0),v(13,co,7,9,"mat-error"),a(),i(14,"mat-form-field")(15,"mat-label"),r(16),c(17,"translate"),a(),C(18,"textarea",7),a()()(),i(19,"mat-card-actions",8)(20,"button",9),r(21),c(22,"translate"),a(),i(23,"button",10),r(24),c(25,"translate"),a()()()()()}if(s&2){let u=w(12);n(2),d("formGroup",o.withdrawSavingsAccountForm),n(5),p(l(8,12,"labels.inputs.Withdrawn On Date")),n(2),d("min",o.minDate)("max",o.maxDate)("matDatepicker",u),n(),d("for",u),n(3),_(o.withdrawSavingsAccountForm.controls.withdrawnOnDate.hasError("required")?13:-1),n(3),p(l(17,14,"labels.inputs.Note")),n(4),d("routerLink",k(20,ro)),n(),f(" ",l(22,16,"labels.buttons.Cancel")," "),n(2),d("disabled",!o.withdrawSavingsAccountForm.valid),n(),f(" ",l(25,18,"labels.buttons.Confirm")," ")}},dependencies:[P,O,it,et,K,nt,lt,at,ot,q,J,ct,bt,Z,X,mt,vt,st,ht,xt,_t,F,ae,y],styles:[".container[_ngcontent-%COMP%]{max-width:37rem}"]})}}return t})();var so=()=>["../../transactions"];function lo(t,m){if(t&1&&(i(0,"mat-option",6),r(1),a()),t&2){let e=m.$implicit;d("value",e.id),n(),f(" ",e.name+" ("+e.currency.name+")"," ")}}function mo(t,m){t&1&&(i(0,"mat-error"),r(1),c(2,"translate"),c(3,"translate"),i(4,"strong"),r(5),c(6,"translate"),a()()),t&2&&(n(),V(" ",l(2,3,"labels.inputs.Charge")," ",l(3,5,"labels.commons.is")," "),n(4),p(l(6,7,"labels.commons.required")))}function po(t,m){t&1&&(i(0,"mat-error"),r(1),c(2,"translate"),c(3,"translate"),i(4,"strong"),r(5),c(6,"translate"),a()()),t&2&&(n(),V(" ",l(2,3,"labels.inputs.Amount")," ",l(3,5,"labels.commons.is")," "),n(4),p(l(6,7,"labels.commons.required")))}function uo(t,m){if(t&1&&(i(0,"mat-option",6),r(1),a()),t&2){let e=m.$implicit;d("value",e.id),n(),f(" ",e.value," ")}}function go(t,m){if(t&1&&(i(0,"mat-option",6),r(1),a()),t&2){let e=m.$implicit;d("value",e.id),n(),f(" ",e.value," ")}}function fo(t,m){t&1&&(i(0,"mat-error"),r(1),c(2,"translate"),c(3,"translate"),i(4,"strong"),r(5),c(6,"translate"),a()()),t&2&&(n(),V(" ",l(2,3,"labels.inputs.Due for collection on")," ",l(3,5,"labels.commons.is")," "),n(4),p(l(6,7,"labels.commons.required")))}function Co(t,m){if(t&1){let e=D();i(0,"mat-form-field",13),b("click",function(){S(e);let o=w(7);return M(o.open())}),i(1,"mat-label"),r(2),c(3,"translate"),a(),C(4,"input",14)(5,"mat-datepicker-toggle",15)(6,"mat-datepicker",null,0),v(8,fo,7,9,"mat-error"),a()}if(t&2){let e=w(7),s=h(2);n(2),p(l(3,6,"labels.inputs.Due for collection on")),n(2),d("min",s.minDate)("max",s.maxDate)("matDatepicker",e),n(),d("for",e),n(3),_(s.savingsChargeForm.controls.dueDate.hasError("required")?8:-1)}}function vo(t,m){t&1&&(i(0,"mat-error"),r(1),c(2,"translate"),c(3,"translate"),i(4,"strong"),r(5),c(6,"translate"),a()()),t&2&&(n(),V(" ",l(2,3,"labels.inputs.Due Date")," ",l(3,5,"labels.commons.is")," "),n(4),p(l(6,7,"labels.commons.required")))}function _o(t,m){if(t&1){let e=D();i(0,"mat-form-field",13),b("click",function(){S(e);let o=w(7);return M(o.open())}),i(1,"mat-label"),r(2),c(3,"translate"),a(),C(4,"input",16)(5,"mat-datepicker-toggle",15)(6,"mat-datepicker",null,1),v(8,vo,7,9,"mat-error"),a()}if(t&2){let e=w(7),s=h(2);n(2),p(l(3,6,"labels.inputs.Due On")),n(2),d("min",s.minDate)("max",s.maxDate)("matDatepicker",e),n(),d("for",e),n(3),_(s.savingsChargeForm.controls.feeOnMonthDay.hasError("required")?8:-1)}}function ho(t,m){t&1&&(i(0,"mat-form-field")(1,"mat-label"),r(2),c(3,"translate"),a(),C(4,"input",17),a()),t&2&&(n(2),p(l(3,1,"labels.inputs.Repeats Every")))}function xo(t,m){if(t&1&&(i(0,"div",4)(1,"mat-form-field")(2,"mat-label"),r(3),c(4,"translate"),a(),C(5,"input",10),v(6,po,7,9,"mat-error"),a(),i(7,"mat-form-field")(8,"mat-label"),r(9),c(10,"translate"),a(),i(11,"mat-select",11),ut(12,uo,2,2,"mat-option",6,dt),a()(),i(14,"mat-form-field")(15,"mat-label"),r(16),c(17,"translate"),a(),i(18,"mat-select",12),ut(19,go,2,2,"mat-option",6,dt),a()(),v(21,Co,9,8,"mat-form-field"),v(22,_o,9,8,"mat-form-field"),v(23,ho,5,3,"mat-form-field"),a()),t&2){let e=h();n(3),p(l(4,7,"labels.inputs.Amount")),n(3),_(e.savingsChargeForm.controls.amount.hasError("required")?6:-1),n(3),p(l(10,9,"labels.inputs.Charge Calculation")),n(3),gt(e.chargeDetails.chargeCalculationTypeOptions),n(4),p(l(17,11,"labels.inputs.Charge time type")),n(3),gt(e.chargeDetails.chargeTimeTypeOptions),n(2),_(e.savingsChargeForm.contains("dueDate")?21:-1),n(),_(e.savingsChargeForm.contains("feeOnMonthDay")?22:-1),n(),_(e.savingsChargeForm.contains("feeInterval")?23:-1)}}var On=(()=>{class t{constructor(){this.formBuilder=g(rt),this.route=g(E),this.router=g(z),this.dateUtils=g(j),this.savingsService=g(I),this.settingsService=g(U),this.minDate=new Date(2e3,0,1),this.maxDate=new Date,this.route.data.subscribe(e=>{this.savingsChargeOptions=e.savingsAccountActionData.chargeOptions}),this.savingAccountId=this.route.snapshot.params.savingAccountId}ngOnInit(){this.maxDate=this.settingsService.businessDate,this.createSavingsChargeForm(),this.buildDependencies()}buildDependencies(){this.savingsChargeForm.controls.chargeId.valueChanges.subscribe(e=>{this.savingsService.getChargeTemplate(e).subscribe(s=>{this.chargeDetails=s;let o=s.chargeTimeType.id;(s.chargeTimeType.value==="Withdrawal Fee"||s.chargeTimeType.value==="Saving No Activity Fee")&&(this.chargeDetails.dueDateNotRequired=!0),(s.chargeTimeType.value==="Annual Fee"||s.chargeTimeType.value==="Monthly Fee")&&(this.chargeDetails.chargeTimeTypeAnnualOrMonth=!0),!this.chargeDetails.dueDateNotRequired&&!this.chargeDetails.chargeTimeTypeAnnualOrMonth?this.savingsChargeForm.addControl("dueDate",new Ct("",H.required)):this.savingsChargeForm.removeControl("dueDate"),!this.chargeDetails.dueDateNotRequired&&this.chargeDetails.chargeTimeTypeAnnualOrMonth?this.savingsChargeForm.addControl("feeOnMonthDay",new Ct("",H.required)):this.savingsChargeForm.removeControl("feeOnMonthDay"),o.value==="Monthly Fee"?this.savingsChargeForm.addControl("feeInterval",new Ct(s.feeInterval,H.required)):this.savingsChargeForm.removeControl("feeInterval"),this.savingsChargeForm.patchValue({amount:s.amount,chargeCalculationType:s.chargeCalculationType.id,chargeTimeType:s.chargeTimeType.id})})})}createSavingsChargeForm(){this.savingsChargeForm=this.formBuilder.group({chargeId:["",H.required],amount:["",H.required],chargeCalculationType:[{value:"",disabled:!0}],chargeTimeType:[{value:"",disabled:!0}]})}submit(){let e=this.savingsChargeForm.value;if(e.locale=this.settingsService.language.code,e.feeInterval||(e.feeInterval=this.chargeDetails.feeInterval),this.chargeDetails.dueDateNotRequired!==!0)if(this.chargeDetails.chargeTimeTypeAnnualOrMonth===!0){let s="MMMM-dd";if(e.monthDayFormat=s,e.feeOnMonthDay){let o=this.savingsChargeForm.value.feeOnMonthDay;e.feeOnMonthDay=this.dateUtils.formatDate(o,s)}}else{let s=this.settingsService.dateFormat;if(e.dateFormat=s,e.dueDate){let o=this.savingsChargeForm.value.dueDate;e.dueDate=this.dateUtils.formatDate(o,s)}}this.savingsService.createSavingsCharge(this.savingAccountId,"charges",e).subscribe(()=>{this.router.navigate(["../../transactions"],{relativeTo:this.route})})}static{this.\u0275fac=function(s){return new(s||t)}}static{this.\u0275cmp=T({type:t,selectors:[["mifosx-add-charge-savings-account"]],decls:21,vars:15,consts:[["dueDatePicker",""],["feeOnMonthDayPicker",""],[1,"container","mat-elevation-z8"],[3,"ngSubmit","formGroup"],[1,"layout-column"],["required","","formControlName","chargeId"],[3,"value"],[1,"layout-row","layout-xs-column","layout-align-center","gap-5px"],["type","button","mat-raised-button","",3,"routerLink"],["mat-raised-button","","color","primary",3,"disabled"],["type","number","required","","matInput","","formControlName","amount"],["formControlName","chargeCalculationType"],["formControlName","chargeTimeType"],[3,"click"],["matInput","","required","","formControlName","dueDate",3,"min","max","matDatepicker"],["matSuffix","",3,"for"],["matInput","","required","","formControlName","feeOnMonthDay",3,"min","max","matDatepicker"],["matInput","","formControlName","feeInterval"]],template:function(s,o){s&1&&(i(0,"div",2)(1,"mat-card")(2,"form",3),b("ngSubmit",function(){return o.submit()}),i(3,"mat-card-content")(4,"div",4)(5,"mat-form-field")(6,"mat-label"),r(7),c(8,"translate"),a(),i(9,"mat-select",5),ut(10,lo,2,2,"mat-option",6,dt),a(),v(12,mo,7,9,"mat-error"),a(),v(13,xo,24,13,"div",4),a(),i(14,"mat-card-actions",7)(15,"button",8),r(16),c(17,"translate"),a(),i(18,"button",9),r(19),c(20,"translate"),a()()()()()()),s&2&&(n(2),d("formGroup",o.savingsChargeForm),n(5),p(l(8,8,"labels.inputs.Charge")),n(3),gt(o.savingsChargeOptions),n(2),_(o.savingsChargeForm.controls.chargeId.hasError("required")?12:-1),n(),_(o.chargeDetails?13:-1),n(2),d("routerLink",k(14,so)),n(),f(" ",l(17,10,"labels.buttons.Cancel")," "),n(2),d("disabled",!o.savingsChargeForm.valid),n(),f(" ",l(20,12,"labels.buttons.Submit")," "))},dependencies:[P,O,it,et,ie,K,nt,lt,at,ot,q,J,ct,bt,Z,X,mt,vt,st,wt,It,ht,xt,_t,F,y],styles:[".container[_ngcontent-%COMP%]{width:37rem}"]})}}return t})();var bo=()=>["../../transactions"];function So(t,m){t&1&&(i(0,"h2",2),r(1),c(2,"translate"),a()),t&2&&(n(),f(" ",l(2,1,"labels.heading.Withdraw Money From Saving Account")," "))}function Mo(t,m){t&1&&(i(0,"h2",2),r(1),c(2,"translate"),a()),t&2&&(n(),f(" ",l(2,1,"labels.heading.Deposit Money To Saving Account")," "))}function Ao(t,m){t&1&&(i(0,"mat-error"),r(1),c(2,"translate"),c(3,"translate"),i(4,"strong"),r(5),c(6,"translate"),a()()),t&2&&(n(),V(" ",l(2,3,"labels.inputs.Transaction Date")," ",l(3,5,"labels.commons.is")," "),n(4),p(l(6,7,"labels.commons.required")))}function To(t,m){if(t&1&&(i(0,"mat-option",10),r(1),a()),t&2){let e=m.$implicit;d("value",e.id),n(),f(" ",e.name," ")}}function Po(t,m){t&1&&(i(0,"mat-form-field")(1,"mat-label"),r(2),c(3,"translate"),a(),C(4,"input",19),a()),t&2&&(n(2),p(l(3,1,"labels.inputs.Account Number")))}function Oo(t,m){t&1&&(i(0,"mat-form-field")(1,"mat-label"),r(2),c(3,"translate"),a(),C(4,"input",20),a()),t&2&&(n(2),p(l(3,1,"labels.inputs.Cheque")))}function Do(t,m){t&1&&(i(0,"mat-form-field")(1,"mat-label"),r(2),c(3,"translate"),a(),C(4,"input",21),a()),t&2&&(n(2),p(l(3,1,"labels.inputs.Routing Code")))}function yo(t,m){t&1&&(i(0,"mat-form-field")(1,"mat-label"),r(2),c(3,"translate"),a(),C(4,"input",22),a()),t&2&&(n(2),p(l(3,1,"labels.inputs.Receipt Number")))}function Io(t,m){t&1&&(i(0,"mat-form-field")(1,"mat-label"),r(2),c(3,"translate"),a(),C(4,"input",23),a()),t&2&&(n(2),p(l(3,1,"labels.inputs.Bank")))}var Dn=(()=>{class t{constructor(){this.formBuilder=g(rt),this.route=g(E),this.router=g(z),this.dateUtils=g(j),this.savingsService=g(I),this.settingsService=g(U),this.minDate=new Date(2e3,0,1),this.maxDate=new Date,this.addPaymentDetailsFlag=!1,this.transactionType={deposit:!1,withdrawal:!1},this.currency=null,this.route.data.subscribe(e=>{this.paymentTypeOptions=e.savingsAccountActionData.paymentTypeOptions,e.savingsAccountActionData.currency&&(this.currency=e.savingsAccountActionData.currency)}),this.transactionCommand=this.route.snapshot.params.name.toLowerCase(),this.transactionType[this.transactionCommand]=!0,this.savingAccountId=this.route.snapshot.params.savingAccountId}ngOnInit(){this.maxDate=this.settingsService.businessDate,this.createSavingAccountTransactionForm()}createSavingAccountTransactionForm(){this.savingAccountTransactionForm=this.formBuilder.group({transactionDate:[this.settingsService.businessDate,H.required],transactionAmount:[0,H.required],paymentTypeId:[""],note:[""]})}addPaymentDetails(){this.addPaymentDetailsFlag=!this.addPaymentDetailsFlag,this.addPaymentDetailsFlag?(this.savingAccountTransactionForm.addControl("accountNumber",new Ct("")),this.savingAccountTransactionForm.addControl("checkNumber",new Ct("")),this.savingAccountTransactionForm.addControl("routingCode",new Ct("")),this.savingAccountTransactionForm.addControl("receiptNumber",new Ct("")),this.savingAccountTransactionForm.addControl("bankNumber",new Ct(""))):(this.savingAccountTransactionForm.removeControl("accountNumber"),this.savingAccountTransactionForm.removeControl("checkNumber"),this.savingAccountTransactionForm.removeControl("routingCode"),this.savingAccountTransactionForm.removeControl("receiptNumber"),this.savingAccountTransactionForm.removeControl("bankNumber"))}submit(){let e=this.savingAccountTransactionForm.value,s=this.settingsService.language.code,o=this.settingsService.dateFormat,u=this.savingAccountTransactionForm.value.transactionDate;e.transactionDate instanceof Date&&(e.transactionDate=this.dateUtils.formatDate(u,o));let x=Q(G({},e),{dateFormat:o,locale:s});x.transactionAmount=x.transactionAmount*1,this.savingsService.executeSavingsAccountTransactionsCommand(this.savingAccountId,this.transactionCommand,x).subscribe(B=>{this.router.navigate(["../../transactions"],{relativeTo:this.route})})}static{this.\u0275fac=function(s){return new(s||t)}}static{this.\u0275cmp=T({type:t,selectors:[["mifosx-savings-transactions"]],decls:48,vars:39,consts:[["dueDatePicker",""],[1,"container","mat-elevation-z8"],["mat-title","",1,"m-l-10"],[3,"ngSubmit","formGroup"],[1,"layout-column"],[3,"click"],["matInput","","formControlName","transactionDate","required","",3,"min","max","matDatepicker"],["matSuffix","",3,"for"],[3,"currency","isRequired","inputFormControl","inputLabel"],["required","","formControlName","paymentTypeId"],[3,"value"],[1,"flex-fill"],[1,"expandcollapsebutton","m-l-10","m-t-40","flex-75",3,"click"],[3,"className"],[1,"m-l-10"],["formControlName","note","matInput","","cdkTextareaAutosize","","cdkAutosizeMinRows","2"],[1,"layout-row","layout-xs-column","layout-align-center","gap-5px"],["type","button","mat-raised-button","",3,"routerLink"],["mat-raised-button","","color","primary",3,"disabled"],["type","number","formControlName","accountNumber","matInput",""],["type","number","formControlName","checkNumber","matInput",""],["formControlName","routingCode","matInput",""],["formControlName","receiptNumber","matInput",""],["formControlName","bankNumber","matInput",""]],template:function(s,o){if(s&1){let u=D();i(0,"div",1)(1,"mat-card"),v(2,So,3,3,"h2",2),v(3,Mo,3,3,"h2",2),i(4,"form",3),b("ngSubmit",function(){return S(u),M(o.submit())}),i(5,"mat-card-content")(6,"div",4)(7,"mat-form-field",5),b("click",function(){S(u);let B=w(14);return M(B.open())}),i(8,"mat-label"),r(9),c(10,"translate"),a(),C(11,"input",6)(12,"mat-datepicker-toggle",7)(13,"mat-datepicker",null,0),v(15,Ao,7,9,"mat-error"),a(),C(16,"mifosx-input-amount",8),i(17,"mat-form-field")(18,"mat-label"),r(19),c(20,"translate"),a(),i(21,"mat-select",9),ut(22,To,2,2,"mat-option",10,dt),a()(),i(24,"div",11)(25,"span",12),b("click",function(){return S(u),M(o.addPaymentDetails())}),i(26,"mat-slide-toggle")(27,"div",13)(28,"span",14),r(29),c(30,"translate"),a()()()()(),v(31,Po,5,3,"mat-form-field"),v(32,Oo,5,3,"mat-form-field"),v(33,Do,5,3,"mat-form-field"),v(34,yo,5,3,"mat-form-field"),v(35,Io,5,3,"mat-form-field"),i(36,"mat-form-field")(37,"mat-label"),r(38),c(39,"translate"),a(),C(40,"textarea",15),a(),i(41,"mat-card-actions",16)(42,"button",17),r(43),c(44,"translate"),a(),i(45,"button",18),r(46),c(47,"translate"),a()()()()()()()}if(s&2){let u=w(14);n(2),_(o.transactionType.withdrawal?2:-1),n(),_(o.transactionType.deposit?3:-1),n(),d("formGroup",o.savingAccountTransactionForm),n(5),p(l(10,26,"labels.inputs.Transaction Date")),n(2),d("min",o.minDate)("max",o.maxDate)("matDatepicker",u),n(),d("for",u),n(3),_(o.savingAccountTransactionForm.controls.transactionDate.hasError("required")?15:-1),n(),d("currency",o.currency)("isRequired",!0)("inputFormControl",o.savingAccountTransactionForm.controls.transactionAmount)("inputLabel","Transaction Amount"),n(3),p(l(20,28,"labels.inputs.Payment Type")),n(3),gt(o.paymentTypeOptions),n(5),d("className",o.addPaymentDetailsFlag?"enabled":"disabled"),n(2),p(l(30,30,"labels.inputs.Show Payment Details")),n(2),_(o.addPaymentDetailsFlag?31:-1),n(),_(o.addPaymentDetailsFlag?32:-1),n(),_(o.addPaymentDetailsFlag?33:-1),n(),_(o.addPaymentDetailsFlag?34:-1),n(),_(o.addPaymentDetailsFlag?35:-1),n(3),p(l(39,32,"labels.inputs.Notes")),n(4),d("routerLink",k(38,bo)),n(),f(" ",l(44,34,"labels.buttons.Cancel")," "),n(2),d("disabled",!o.savingAccountTransactionForm.valid),n(),f(" ",l(47,36,"labels.buttons.Submit")," ")}},dependencies:[P,O,it,et,ie,K,nt,lt,at,ot,q,J,ct,bt,Z,X,mt,vt,st,wt,It,ht,xt,_t,F,Re,Ie,ae,y],styles:[".expandcollapsebutton[_ngcontent-%COMP%]{margin-top:-7px}.container[_ngcontent-%COMP%]{max-width:37rem}.right-input[_ngcontent-%COMP%]{text-align:right}.right-label[_ngcontent-%COMP%]{padding-right:25px!important}"]})}}return t})();var wo=()=>["../../"];function Eo(t,m){t&1&&(i(0,"mat-error"),r(1),c(2,"translate"),c(3,"translate"),i(4,"strong"),r(5),c(6,"translate"),a()()),t&2&&(n(),V(" ",l(2,3,"labels.inputs.Closed On Date")," ",l(3,5,"labels.commons.is")," "),n(4),p(l(6,7,"labels.commons.required")))}function Fo(t,m){t&1&&(i(0,"mat-form-field",13)(1,"mat-label"),r(2),c(3,"translate"),a(),C(4,"input",18),a()),t&2&&(n(2),p(l(3,1,"labels.inputs.Transaction Amount")))}function ko(t,m){if(t&1&&(i(0,"mat-option",20),r(1),a()),t&2){let e=m.$implicit;d("value",e.id),n(),f(" ",e.name," ")}}function Bo(t,m){if(t&1&&(i(0,"mat-form-field")(1,"mat-label"),r(2),c(3,"translate"),a(),i(4,"mat-select",19),ut(5,ko,2,2,"mat-option",20,dt),a()()),t&2){let e=h(2);n(2),p(l(3,1,"labels.inputs.Payment Type")),n(3),gt(e.paymentTypeOptions)}}function No(t,m){t&1&&(i(0,"mat-form-field")(1,"mat-label"),r(2),c(3,"translate"),a(),C(4,"input",21),a()),t&2&&(n(2),p(l(3,1,"labels.inputs.Account Number")))}function Ro(t,m){t&1&&(i(0,"mat-form-field")(1,"mat-label"),r(2),c(3,"translate"),a(),C(4,"input",22),a()),t&2&&(n(2),p(l(3,1,"labels.inputs.Cheque")))}function Vo(t,m){t&1&&(i(0,"mat-form-field")(1,"mat-label"),r(2),c(3,"translate"),a(),C(4,"input",23),a()),t&2&&(n(2),p(l(3,1,"labels.inputs.Routing Code")))}function Lo(t,m){t&1&&(i(0,"mat-form-field")(1,"mat-label"),r(2),c(3,"translate"),a(),C(4,"input",24),a()),t&2&&(n(2),p(l(3,1,"labels.inputs.Receipt Number")))}function Go(t,m){t&1&&(i(0,"mat-form-field")(1,"mat-label"),r(2),c(3,"translate"),a(),C(4,"input",25),a()),t&2&&(n(2),p(l(3,1,"labels.inputs.Bank")))}function Uo(t,m){if(t&1){let e=D();i(0,"div",3),v(1,Fo,5,3,"mat-form-field",13),v(2,Bo,7,3,"mat-form-field"),i(3,"div",14)(4,"span",15),b("click",function(){S(e);let o=h();return M(o.addPaymentDetails())}),i(5,"mat-slide-toggle")(6,"div",16)(7,"span",17),r(8),c(9,"translate"),a()()()()(),v(10,No,5,3,"mat-form-field"),v(11,Ro,5,3,"mat-form-field"),v(12,Vo,5,3,"mat-form-field"),v(13,Lo,5,3,"mat-form-field"),v(14,Go,5,3,"mat-form-field"),a()}if(t&2){let e=h();n(),_(e.closeSavingsAccountForm.controls.amount?1:-1),n(),_(e.closeSavingsAccountForm.controls.paymentTypeId?2:-1),n(4),d("className",e.showPaymentDetails?"enabled":"disabled"),n(2),p(l(9,9,"labels.inputs.Show Payment Details")),n(2),_(e.closeSavingsAccountForm.controls.accountNumber?10:-1),n(),_(e.closeSavingsAccountForm.controls.checkNumber?11:-1),n(),_(e.closeSavingsAccountForm.controls.routingCode?12:-1),n(),_(e.closeSavingsAccountForm.controls.receiptNumber?13:-1),n(),_(e.closeSavingsAccountForm.controls.bankNumber?14:-1)}}var yn=(()=>{class t{constructor(){this.formBuilder=g(rt),this.savingsService=g(I),this.dateUtils=g(j),this.route=g(E),this.router=g(z),this.settingsService=g(U),this.minDate=new Date(2e3,0,1),this.maxDate=new Date,this.addPaymentDetailsFlag=!1,this.route.data.subscribe(e=>{this.paymentTypeOptions=e.savingsAccountActionData[0].paymentTypeOptions,this.transactionAmount=e.savingsAccountActionData[1].summary.accountBalance}),this.accountId=this.route.snapshot.params.savingAccountId}ngOnInit(){this.maxDate=this.settingsService.businessDate,this.createCloseSavingsAccountForm(),this.buildDependencies()}createCloseSavingsAccountForm(){this.closeSavingsAccountForm=this.formBuilder.group({closedOnDate:["",H.required],withdrawBalance:[!1],postInterestValidationOnClosure:[!1],note:[""]})}buildDependencies(){this.closeSavingsAccountForm.get("withdrawBalance").valueChanges.subscribe(e=>{e?(this.closeSavingsAccountForm.addControl("amount",new Ct({value:this.transactionAmount,disabled:!0})),this.closeSavingsAccountForm.addControl("paymentTypeId",new Ct(""))):(this.closeSavingsAccountForm.removeControl("amount"),this.closeSavingsAccountForm.removeControl("paymentTypeId"))})}addPaymentDetails(){this.addPaymentDetailsFlag=!this.addPaymentDetailsFlag,this.addPaymentDetailsFlag?(this.closeSavingsAccountForm.addControl("accountNumber",new Ct("")),this.closeSavingsAccountForm.addControl("checkNumber",new Ct("")),this.closeSavingsAccountForm.addControl("routingCode",new Ct("")),this.closeSavingsAccountForm.addControl("receiptNumber",new Ct("")),this.closeSavingsAccountForm.addControl("bankNumber",new Ct(""))):(this.closeSavingsAccountForm.removeControl("accountNumber"),this.closeSavingsAccountForm.removeControl("checkNumber"),this.closeSavingsAccountForm.removeControl("routingCode"),this.closeSavingsAccountForm.removeControl("receiptNumber"),this.closeSavingsAccountForm.removeControl("bankNumber"))}submit(){let e=this.closeSavingsAccountForm.value,s=this.settingsService.language.code,o=this.settingsService.dateFormat,u=this.closeSavingsAccountForm.value.closedOnDate;e.closedOnDate instanceof Date&&(e.closedOnDate=this.dateUtils.formatDate(u,o));let x=Q(G({},e),{dateFormat:o,locale:s});this.savingsService.executeSavingsAccountCommand(this.accountId,"close",x).subscribe(()=>{this.router.navigate(["../../transactions"],{relativeTo:this.route})})}static{this.\u0275fac=function(s){return new(s||t)}}static{this.\u0275cmp=T({type:t,selectors:[["mifosx-close-savings-account"]],decls:33,vars:28,consts:[["closedOnDatePicker",""],[1,"container","mat-elevation-z8"],[3,"ngSubmit","formGroup"],[1,"layout-column"],[3,"click"],["matInput","","required","","formControlName","closedOnDate",3,"min","max","matDatepicker"],["matSuffix","",3,"for"],["formControlName","withdrawBalance",1,"m-b-25","m-t-15"],["formControlName","postInterestValidationOnClosure"],["matInput","","formControlName","note","cdkTextareaAutosize","","cdkAutosizeMinRows","2"],[1,"layout-row","align-center","gap-5px","responsive-column"],["type","button","mat-raised-button","",3,"routerLink"],["mat-raised-button","","color","warn",3,"disabled"],[1,"m-t-20"],[1,"flex-fill"],[1,"expandcollapsebutton","m-l-10","m-t-40","flex-75",3,"click"],[3,"className"],[1,"m-l-10"],["type","number","required","","matInput","","formControlName","amount"],["formControlName","paymentTypeId"],[3,"value"],["type","number","formControlName","accountNumber","matInput",""],["type","number","formControlName","checkNumber","matInput",""],["formControlName","routingCode","matInput",""],["formControlName","receiptNumber","matInput",""],["formControlName","bankNumber","matInput",""]],template:function(s,o){if(s&1){let u=D();i(0,"div",1)(1,"mat-card")(2,"form",2),b("ngSubmit",function(){return S(u),M(o.submit())}),i(3,"mat-card-content")(4,"div",3)(5,"mat-form-field",4),b("click",function(){S(u);let B=w(12);return M(B.open())}),i(6,"mat-label"),r(7),c(8,"translate"),a(),C(9,"input",5)(10,"mat-datepicker-toggle",6)(11,"mat-datepicker",null,0),v(13,Eo,7,9,"mat-error"),a(),i(14,"mat-checkbox",7),r(15),c(16,"translate"),a(),i(17,"mat-checkbox",8),r(18),c(19,"translate"),a(),v(20,Uo,15,11,"div",3),i(21,"mat-form-field")(22,"mat-label"),r(23),c(24,"translate"),a(),C(25,"textarea",9),a()()(),i(26,"mat-card-actions",10)(27,"button",11),r(28),c(29,"translate"),a(),i(30,"button",12),r(31),c(32,"translate"),a()()()()()}if(s&2){let u=w(12);n(2),d("formGroup",o.closeSavingsAccountForm),n(5),p(l(8,15,"labels.inputs.Closed On Date")),n(2),d("min",o.minDate)("max",o.maxDate)("matDatepicker",u),n(),d("for",u),n(3),_(o.closeSavingsAccountForm.controls.closedOnDate.hasError("required")?13:-1),n(2),f(" ",l(16,17,"labels.inputs.Withdraw Balance")," "),n(3),f(" ",l(19,19,"labels.inputs.Is Interest Posting required on closure date"),"? "),n(2),_(o.closeSavingsAccountForm.controls.withdrawBalance.value?20:-1),n(3),p(l(24,21,"labels.inputs.Note")),n(4),d("routerLink",k(27,wo)),n(),f(" ",l(29,23,"labels.buttons.Cancel")," "),n(2),d("disabled",!o.closeSavingsAccountForm.valid),n(),f(" ",l(32,25,"labels.buttons.Confirm")," ")}},dependencies:[P,O,it,et,ie,K,nt,lt,at,ot,q,J,ct,bt,Z,X,mt,vt,st,wt,It,ht,xt,_t,F,Ce,Ie,ae,y],styles:[".container[_ngcontent-%COMP%]{max-width:37rem}"]})}}return t})();var qo=()=>["../../"];function Ho(t,m){t&1&&(i(0,"mat-error"),r(1),c(2,"translate"),c(3,"translate"),i(4,"strong"),r(5),c(6,"translate"),a()()),t&2&&(n(),V(" ",l(2,3,"labels.inputs.Due Date")," ",l(3,5,"labels.commons.is")," "),n(4),p(l(6,7,"labels.commons.required")))}function zo(t,m){t&1&&(i(0,"mat-error"),r(1),c(2,"translate"),c(3,"translate"),i(4,"strong"),r(5),c(6,"translate"),a()()),t&2&&(n(),V(" ",l(2,3,"labels.inputs.Amount")," ",l(3,5,"labels.commons.is")," "),n(4),p(l(6,7,"labels.commons.required")))}var In=(()=>{class t{constructor(){this.formBuilder=g(rt),this.savingsService=g(I),this.dateUtils=g(j),this.route=g(E),this.router=g(z),this.settingsService=g(U),this.minDate=new Date(2e3,0,1),this.maxDate=new Date,this.accountId=this.route.snapshot.params.savingAccountId,this.route.data.subscribe(e=>{this.savingsAccountData=e.savingsAccountActionData})}ngOnInit(){this.maxDate=this.settingsService.businessDate,this.createApplyAnnualFeesForm(),this.applyCharge()}createApplyAnnualFeesForm(){this.applyAnnualFeesForm=this.formBuilder.group({dueDate:["",H.required],amount:[""]})}applyCharge(){this.savingsAccountData.charges.forEach(s=>{s.name==="Annual fee - INR"&&(this.chargeId=s.id,this.applyAnnualFeesForm.get("amount").patchValue(s.amount))})}submit(){let e=this.applyAnnualFeesForm.value,s=this.settingsService.language.code,o=this.settingsService.dateFormat,u=this.applyAnnualFeesForm.value.dueDate;e.dueDate instanceof Date&&(e.dueDate=this.dateUtils.formatDate(u,o));let x=Q(G({},e),{dateFormat:o,locale:s});this.savingsService.executeSavingsAccountChargesCommand(this.accountId,"paycharge",x,this.chargeId).subscribe(()=>{this.router.navigate(["../../"],{relativeTo:this.route})})}static{this.\u0275fac=function(s){return new(s||t)}}static{this.\u0275cmp=T({type:t,selectors:[["mifosx-apply-annual-fees-savings-account"]],decls:27,vars:22,consts:[["dueDatePicker",""],[1,"container","mat-elevation-z8"],[3,"ngSubmit","formGroup"],[1,"layout-column"],[3,"click"],["matInput","","required","","formControlName","dueDate",3,"min","max","matDatepicker"],["matSuffix","",3,"for"],["type","number","formControlName","amount","required","","matInput",""],[1,"layout-row","align-center","gap-5px","responsive-column"],["type","button","mat-raised-button","",3,"routerLink"],["mat-raised-button","","color","primary",3,"disabled"]],template:function(s,o){if(s&1){let u=D();i(0,"div",1)(1,"mat-card")(2,"form",2),b("ngSubmit",function(){return S(u),M(o.submit())}),i(3,"mat-card-content")(4,"div",3)(5,"mat-form-field",4),b("click",function(){S(u);let B=w(12);return M(B.open())}),i(6,"mat-label"),r(7),c(8,"translate"),a(),C(9,"input",5)(10,"mat-datepicker-toggle",6)(11,"mat-datepicker",null,0),v(13,Ho,7,9,"mat-error"),a(),i(14,"mat-form-field")(15,"mat-label"),r(16),c(17,"translate"),a(),C(18,"input",7),v(19,zo,7,9,"mat-error"),a()()(),i(20,"mat-card-actions",8)(21,"button",9),r(22),c(23,"translate"),a(),i(24,"button",10),r(25),c(26,"translate"),a()()()()()}if(s&2){let u=w(12);n(2),d("formGroup",o.applyAnnualFeesForm),n(5),p(l(8,13,"labels.inputs.Annual Fees Transaction Date")),n(2),d("min",o.minDate)("max",o.maxDate)("matDatepicker",u),n(),d("for",u),n(3),_(o.applyAnnualFeesForm.controls.dueDate.hasError("required")?13:-1),n(3),p(l(17,15,"labels.inputs.Amount")),n(3),_(o.applyAnnualFeesForm.controls.amount.hasError("required")?19:-1),n(2),d("routerLink",k(21,qo)),n(),f(" ",l(23,17,"labels.buttons.Cancel")," "),n(2),d("disabled",!o.applyAnnualFeesForm.valid),n(),f(" ",l(26,19,"labels.buttons.Confirm")," ")}},dependencies:[P,O,it,et,ie,K,nt,lt,at,ot,q,J,ct,bt,Z,X,mt,vt,st,ht,xt,_t,F,y],styles:[".container[_ngcontent-%COMP%]{max-width:37rem}"]})}}return t})();var jo=()=>["../../transactions"];function $o(t,m){t&1&&(i(0,"mat-card-title"),r(1),c(2,"translate"),a()),t&2&&(n(),p(l(2,1,"labels.heading.Hold Amount")))}function Wo(t,m){t&1&&(i(0,"mat-card-title"),r(1),c(2,"translate"),a()),t&2&&(n(),p(l(2,1,"labels.heading.Block Savings Account")))}function Qo(t,m){if(t&1&&(i(0,"mat-option",6),r(1),a()),t&2){let e=m.$implicit;d("value",e.id),n(),f(" ",e.name," ")}}function Ko(t,m){t&1&&(i(0,"mat-error"),r(1),c(2,"translate"),c(3,"translate"),i(4,"strong"),r(5),c(6,"translate"),a()()),t&2&&(n(),V(" ",l(2,3,"labels.inputs.Reason")," ",l(3,5,"labels.commons.is")," "),n(4),p(l(6,7,"labels.commons.required")))}function Yo(t,m){t&1&&(i(0,"mat-error"),r(1),c(2,"translate"),c(3,"translate"),i(4,"strong"),r(5),c(6,"translate"),a()()),t&2&&(n(),V(" ",l(2,3,"labels.inputs.Transaction Date")," ",l(3,5,"labels.commons.is")," "),n(4),p(l(6,7,"labels.commons.required")))}function Jo(t,m){if(t&1){let e=D();i(0,"mat-form-field",11),b("click",function(){S(e);let o=w(7);return M(o.open())}),i(1,"mat-label"),r(2),c(3,"translate"),a(),C(4,"input",12)(5,"mat-datepicker-toggle",13)(6,"mat-datepicker",null,0),v(8,Yo,7,9,"mat-error"),a()}if(t&2){let e=w(7),s=h();n(2),p(l(3,6,"labels.inputs.Transaction Date")),n(2),d("min",s.minDate)("max",s.maxDate)("matDatepicker",e),n(),d("for",e),n(3),_(s.manageSavingsAccountForm.controls.transactionDate.hasError("required")?8:-1)}}function Xo(t,m){if(t&1&&C(0,"mifosx-input-amount",7),t&2){let e=h();d("currency",e.currency)("isRequired",!0)("inputFormControl",e.manageSavingsAccountForm.controls.transactionAmount)("inputLabel","Transaction Amount")}}var wn=(()=>{class t{constructor(){this.formBuilder=g(rt),this.savingsService=g(I),this.dateUtils=g(j),this.route=g(E),this.router=g(z),this.systemService=g(Oi),this.settingsService=g(U),this.minDate=new Date(2e3,0,1),this.maxDate=new Date,this.reasonOptions=[],this.transactionType={holdamount:!1,blockaccount:!1,blockdeposit:!1,blockwithdrawal:!1},this.transactionCommand=this.route.snapshot.params.name.toLowerCase().replaceAll(" ",""),this.transactionType[this.transactionCommand]=!0,this.savingAccountId=this.route.snapshot.params.savingAccountId}ngOnInit(){this.maxDate=this.settingsService.businessDate,this.createManageSavingsAccountForm(),(this.transactionType.holdamount||this.transactionType.blockaccount||this.transactionType.blockdeposit||this.transactionType.blockwithdrawal)&&this.getCodeValues()}getCodeValues(){let e="SavingsTransactionFreezeReasons";this.transactionType.blockaccount?e="SavingsAccountBlockReasons":this.transactionType.blockdeposit?e="CreditTransactionFreezeReasons":this.transactionType.blockwithdrawal&&(e="DebitTransactionFreezeReasons"),this.systemService.getCodes().subscribe(s=>{s.some(o=>(o.name===e&&this.systemService.getCodeValues(o.id).subscribe(u=>(this.reasonOptions=u,!0)),!1))})}createManageSavingsAccountForm(){this.transactionType.holdamount?this.manageSavingsAccountForm=this.formBuilder.group({reasonForBlock:["",H.required],transactionDate:["",H.required],transactionAmount:[0,H.required]}):this.manageSavingsAccountForm=this.formBuilder.group({reasonForBlock:["",H.required]})}submit(){let e="",s={};if(this.transactionType.holdamount){let o=this.manageSavingsAccountForm.value,u=this.settingsService.language.code,x=this.settingsService.dateFormat,B=this.manageSavingsAccountForm.value.transactionDate;o.transactionDate instanceof Date&&(o.transactionDate=this.dateUtils.formatDate(B,x)),s=Q(G({},o),{dateFormat:x,locale:u}),e="holdAmount",s.transactionAmount=s.transactionAmount*1,this.savingsService.executeSavingsAccountTransactionsCommand(this.savingAccountId,e,s).subscribe(Yt=>{this.router.navigate(["../../transactions"],{relativeTo:this.route})})}else s=G({},this.manageSavingsAccountForm.value),e="block",this.transactionType.blockdeposit?e="blockCredit":this.transactionType.blockwithdrawal&&(e="blockDebit"),this.savingsService.executeSavingsAccountCommand(this.savingAccountId,e,s).subscribe(o=>{this.router.navigate(["../../transactions"],{relativeTo:this.route})})}static{this.\u0275fac=function(s){return new(s||t)}}static{this.\u0275cmp=T({type:t,selectors:[["mifosx-manage-savings-account"]],inputs:{currency:"currency"},decls:23,vars:18,consts:[["transactionDatePicker",""],[1,"container","mat-elevation-z8"],[3,"ngSubmit","formGroup"],[1,"layout-row"],[1,"flex-100"],["required","","formControlName","reasonForBlock"],[3,"value"],[1,"flex-100",3,"currency","isRequired","inputFormControl","inputLabel"],[1,"layout-row","align-center","gap-5px","responsive-column"],["type","button","mat-raised-button","",3,"routerLink"],["mat-raised-button","","color","primary",3,"disabled"],[1,"flex-100",3,"click"],["matInput","","required","","formControlName","transactionDate",3,"min","max","matDatepicker"],["matSuffix","",3,"for"]],template:function(s,o){s&1&&(i(0,"div",1)(1,"mat-card"),v(2,$o,3,3,"mat-card-title"),v(3,Wo,3,3,"mat-card-title"),i(4,"form",2),b("ngSubmit",function(){return o.submit()}),i(5,"mat-card-content",3)(6,"mat-form-field",4)(7,"mat-label"),r(8),c(9,"translate"),a(),i(10,"mat-select",5),ut(11,Qo,2,2,"mat-option",6,dt),a(),v(13,Ko,7,9,"mat-error"),a(),v(14,Jo,9,8,"mat-form-field",4),v(15,Xo,1,4,"mifosx-input-amount",7),a(),i(16,"mat-card-actions",8)(17,"button",9),r(18),c(19,"translate"),a(),i(20,"button",10),r(21),c(22,"translate"),a()()()()()),s&2&&(n(2),_(o.transactionType.holdamount?2:-1),n(),_(o.transactionType.blockaccount?3:-1),n(),d("formGroup",o.manageSavingsAccountForm),n(4),p(l(9,11,"labels.inputs.Reason")),n(3),gt(o.reasonOptions),n(2),_(o.manageSavingsAccountForm.controls.reasonForBlock.hasError("required")?13:-1),n(),_(o.transactionType.holdamount?14:-1),n(),_(o.transactionType.holdamount?15:-1),n(2),d("routerLink",k(17,jo)),n(),f(" ",l(19,13,"labels.buttons.Cancel")," "),n(2),d("disabled",!o.manageSavingsAccountForm.valid),n(),f(" ",l(22,15,"labels.buttons.Confirm")," "))},dependencies:[P,O,it,et,K,nt,lt,at,ot,q,J,ct,bt,Z,X,mt,vt,st,wt,It,ht,xt,_t,F,Ze,Re,y],styles:[".container[_ngcontent-%COMP%]{width:37rem}"]})}}return t})();function Zo(t,m){t&1&&C(0,"mifosx-approve-savings-account")}function tr(t,m){t&1&&C(0,"mifosx-reject-savings-account")}function er(t,m){t&1&&C(0,"mifosx-activate-savings-account")}function nr(t,m){t&1&&C(0,"mifosx-undo-approval-savings-account")}function ir(t,m){t&1&&C(0,"mifosx-post-interest-as-on-savings-account")}function ar(t,m){t&1&&C(0,"mifosx-savings-account-assign-staff")}function or(t,m){t&1&&C(0,"mifosx-savings-account-unassign-staff")}function rr(t,m){t&1&&C(0,"mifosx-withdraw-by-client-savings-account")}function cr(t,m){t&1&&C(0,"mifosx-add-charge-savings-account")}function sr(t,m){t&1&&C(0,"mifosx-savings-transactions")}function lr(t,m){t&1&&C(0,"mifosx-close-savings-account")}function mr(t,m){t&1&&C(0,"mifosx-apply-annual-fees-savings-account")}function pr(t,m){if(t&1&&C(0,"mifosx-manage-savings-account",0),t&2){let e=h();d("currency",e.currency)}}var En=(()=>{class t{constructor(){this.route=g(E),this.actions={Approve:!1,Reject:!1,Withdrawal:!1,Deposit:!1,Activate:!1,Close:!1,"Undo Approval":!1,"Post Interest As On":!1,"Assign Staff":!1,"Add Charge":!1,"Unassign Staff":!1,"Withdrawn by Client":!1,"Apply Annual Fees":!1,"Hold Amount":!1,"Block Account":!1,"Unblock Account":!1,"Block Deposit":!1,"Unblock Deposit":!1,"Block Withdrawal":!1,"Unblock Withdrawal":!1},this.route.data.subscribe(s=>{s.savingsAccountActionData&&(this.currency=s.savingsAccountActionData.currency)});let e=this.route.snapshot.params.name;e in this.actions&&(this.actions[e]=!0)}static{this.\u0275fac=function(s){return new(s||t)}}static{this.\u0275cmp=T({type:t,selectors:[["mifosx-saving-account-actions"]],decls:13,vars:13,consts:[[3,"currency"]],template:function(s,o){s&1&&(v(0,Zo,1,0,"mifosx-approve-savings-account"),v(1,tr,1,0,"mifosx-reject-savings-account"),v(2,er,1,0,"mifosx-activate-savings-account"),v(3,nr,1,0,"mifosx-undo-approval-savings-account"),v(4,ir,1,0,"mifosx-post-interest-as-on-savings-account"),v(5,ar,1,0,"mifosx-savings-account-assign-staff"),v(6,or,1,0,"mifosx-savings-account-unassign-staff"),v(7,rr,1,0,"mifosx-withdraw-by-client-savings-account"),v(8,cr,1,0,"mifosx-add-charge-savings-account"),v(9,sr,1,0,"mifosx-savings-transactions"),v(10,lr,1,0,"mifosx-close-savings-account"),v(11,mr,1,0,"mifosx-apply-annual-fees-savings-account"),v(12,pr,1,1,"mifosx-manage-savings-account",0)),s&2&&(_(o.actions.Approve?0:-1),n(),_(o.actions.Reject?1:-1),n(),_(o.actions.Activate?2:-1),n(),_(o.actions["Undo Approval"]?3:-1),n(),_(o.actions["Post Interest As On"]?4:-1),n(),_(o.actions["Assign Staff"]?5:-1),n(),_(o.actions["Unassign Staff"]?6:-1),n(),_(o.actions["Withdrawn by Client"]?7:-1),n(),_(o.actions["Add Charge"]?8:-1),n(),_(o.actions.Withdrawal||o.actions.Deposit?9:-1),n(),_(o.actions.Close?10:-1),n(),_(o.actions["Apply Annual Fees"]?11:-1),n(),_(o.actions["Hold Amount"]||o.actions["Block Account"]||o.actions["Block Deposit"]||o.actions["Block Withdrawal"]?12:-1))},dependencies:[P,O,hn,xn,bn,Sn,Mn,An,Tn,Pn,On,Dn,yn,In,wn],encapsulation:2})}}return t})();var dr=()=>({confirm:!0}),Le=(()=>{class t{constructor(){this.dialogRef=g(Xt),this.data=g(De)}static{this.\u0275fac=function(s){return new(s||t)}}static{this.\u0275cmp=T({type:t,selectors:[["mifosx-waive-charge-dialog"]],decls:14,vars:15,consts:[["mat-dialog-title",""],["mat-dialog-content",""],["align","end"],["mat-raised-button","","mat-dialog-close",""],["mat-raised-button","","color","primary",3,"mat-dialog-close"]],template:function(s,o){s&1&&(i(0,"h1",0),r(1),c(2,"translate"),a(),i(3,"div",1)(4,"p"),r(5),c(6,"translate"),a()(),i(7,"mat-dialog-actions",2)(8,"button",3),r(9),c(10,"translate"),a(),i(11,"button",4),r(12),c(13,"translate"),a()()),s&2&&(n(),p(l(2,6,"labels.buttons.Waive Charge")),n(4),V("",l(6,8,"labels.text.Are you sure you want to waive charge with id"),": ",o.data.id," ?"),n(4),p(l(10,10,"labels.buttons.Cancel")),n(2),d("mat-dialog-close",k(14,dr)),n(),f(" ",l(13,12,"labels.buttons.Confirm")," "))},dependencies:[P,O,F,te,ee,ne,Zt,y],encapsulation:2})}}return t})();var ur=()=>({confirm:!0}),Ge=(()=>{class t{constructor(){this.dialogRef=g(Xt),this.data=g(De)}static{this.\u0275fac=function(s){return new(s||t)}}static{this.\u0275cmp=T({type:t,selectors:[["mifosx-inactivate-charge-dialog"]],decls:14,vars:15,consts:[["mat-dialog-title",""],["mat-dialog-content",""],["align","end"],["mat-raised-button","","mat-dialog-close",""],["mat-raised-button","","color","primary",3,"mat-dialog-close"]],template:function(s,o){s&1&&(i(0,"h1",0),r(1),c(2,"translate"),a(),i(3,"div",1)(4,"p"),r(5),c(6,"translate"),a()(),i(7,"mat-dialog-actions",2)(8,"button",3),r(9),c(10,"translate"),a(),i(11,"button",4),r(12),c(13,"translate"),a()()),s&2&&(n(),p(l(2,6,"tooltips.Inactivate Charge")),n(4),V("",l(6,8,"labels.text.Are you sure you want to inactivate charge with id"),": ",o.data.id," ?"),n(4),p(l(10,10,"labels.buttons.Cancel")),n(2),d("mat-dialog-close",k(14,ur)),n(),f(" ",l(13,12,"labels.buttons.Confirm")," "))},dependencies:[P,O,F,te,ee,ne,Zt,y],encapsulation:2})}}return t})();var gr=["chargesTable"],fr=t=>[t];function Cr(t,m){if(t&1){let e=D();i(0,"div",4)(1,"button",22),b("click",function(){S(e);let o=h();return M(o.toggleCharges())}),r(2),a()()}if(t&2){let e=h();n(2),f(" ",e.showInactiveCharges?e.viewAllChargeButtons("View Active Charges"):e.viewAllChargeButtons("View Inactive Charges")," ")}}function vr(t,m){t&1&&(i(0,"th",23),r(1),c(2,"translate"),a()),t&2&&(n(),p(l(2,1,"labels.inputs.Name")))}function _r(t,m){if(t&1&&(i(0,"td",24),r(1),a()),t&2){let e=m.$implicit;n(),p(e.name)}}function hr(t,m){t&1&&(i(0,"th",23),r(1),c(2,"translate"),a()),t&2&&(n(),p(l(2,1,"labels.inputs.Charge Type")))}function xr(t,m){if(t&1&&(i(0,"td",24),r(1),c(2,"translateKey"),a()),t&2){let e=m.$implicit;n(),p(e.penalty?"Penalty":Mt(2,1,"Fee","catalogs"))}}function br(t,m){t&1&&(i(0,"th",23),r(1),c(2,"translate"),a()),t&2&&(n(),p(l(2,1,"labels.inputs.Payment Due At")))}function Sr(t,m){if(t&1&&(i(0,"td",24),r(1),c(2,"translateKey"),a()),t&2){let e=m.$implicit;n(),p(Mt(2,1,e.chargeTimeType.value,"catalogs"))}}function Mr(t,m){t&1&&(i(0,"th",23),r(1),c(2,"translate"),a()),t&2&&(n(),p(l(2,1,"labels.inputs.Due As Of")))}function Ar(t,m){if(t&1&&(i(0,"td",24),r(1),c(2,"dateFormat"),a()),t&2){let e=m.$implicit;n(),p(l(2,1,e.dueDate))}}function Tr(t,m){t&1&&(i(0,"th",23),r(1),c(2,"translate"),a()),t&2&&(n(),p(l(2,1,"labels.inputs.Repeats On (M/d)")))}function Pr(t,m){if(t&1&&(i(0,"td",24),r(1),a()),t&2){let e=m.$implicit;n(),p(e.feeOnMonthDay?e.feeOnMonthDay.join("/"):"")}}function Or(t,m){t&1&&(i(0,"th",23),r(1),c(2,"translate"),a()),t&2&&(n(),p(l(2,1,"labels.inputs.Calculation Type")))}function Dr(t,m){if(t&1&&(i(0,"td",24),r(1),c(2,"translateKey"),a()),t&2){let e=m.$implicit;n(),p(Mt(2,1,e.chargeCalculationType.value,"catalogs"))}}function yr(t,m){t&1&&(i(0,"th",23),r(1),c(2,"translate"),a()),t&2&&(n(),p(l(2,1,"labels.inputs.Due")))}function Ir(t,m){if(t&1&&(i(0,"td",24),r(1),c(2,"currency"),a()),t&2){let e=m.$implicit;n(),f(" ",tt(2,1,e.amount,e.currency.code,"symbol-narrow","1.2-2")," ")}}function wr(t,m){t&1&&(i(0,"th",23),r(1),c(2,"translate"),a()),t&2&&(n(),p(l(2,1,"labels.inputs.Paid")))}function Er(t,m){if(t&1&&(i(0,"td",24),r(1),c(2,"currency"),a()),t&2){let e=m.$implicit;n(),f(" ",tt(2,1,e.amountPaid,e.currency.code,"symbol-narrow","1.2-2")," ")}}function Fr(t,m){t&1&&(i(0,"th",23),r(1),c(2,"translate"),a()),t&2&&(n(),p(l(2,1,"labels.inputs.Waived")))}function kr(t,m){if(t&1&&(i(0,"td",24),r(1),c(2,"currency"),a()),t&2){let e=m.$implicit;n(),f(" ",tt(2,1,e.amountWaived,e.currency.code,"symbol-narrow","1.2-2")," ")}}function Br(t,m){t&1&&(i(0,"th",23),r(1),c(2,"translate"),a()),t&2&&(n(),p(l(2,1,"labels.inputs.Outstanding")))}function Nr(t,m){if(t&1&&(i(0,"td",24),r(1),c(2,"currency"),a()),t&2){let e=m.$implicit;n(),f(" ",tt(2,1,e.amountOutstanding,e.currency.code,"symbol-narrow","1.2-2")," ")}}function Rr(t,m){t&1&&(i(0,"th",23),r(1),c(2,"translate"),a()),t&2&&(n(),p(l(2,1,"labels.inputs.Actions")))}function Vr(t,m){if(t&1){let e=D();i(0,"button",27),c(1,"translate"),b("click",function(o){S(e);let u=h(2).$implicit,x=h();return x.routeEdit(o),M(x.editCharge(u))}),C(2,"i",28),a()}t&2&&d("matTooltip",ft(l(1,2,"tooltips.Edit Charge")))}function Lr(t,m){if(t&1){let e=D();i(0,"button",29),c(1,"translate"),b("click",function(o){S(e);let u=h(2).$implicit,x=h();return x.routeEdit(o),M(x.deleteCharge(u.id))}),C(2,"i",30),a()}t&2&&d("matTooltip",ft(l(1,2,"tooltips.Delete Charge")))}function Gr(t,m){t&1&&(i(0,"span"),A(1,Vr,3,4,"button",25)(2,Lr,3,4,"button",26),a()),t&2&&(n(),d("mifosxHasPermission","UPDATE_SAVINGSACCOUNTCHARGE"),n(),d("mifosxHasPermission","DELETE_SAVINGSACCOUNTCHARGE"))}function Ur(t,m){if(t&1){let e=D();i(0,"button",27),c(1,"translate"),b("click",function(o){S(e);let u=h(2).$implicit,x=h();return x.routeEdit(o),M(x.payCharge(u.id))}),C(2,"i",32),a()}t&2&&d("matTooltip",ft(l(1,2,"tooltips.Pay Charge")))}function qr(t,m){if(t&1){let e=D();i(0,"button",27),c(1,"translate"),b("click",function(o){S(e);let u=h(2).$implicit,x=h();return x.routeEdit(o),M(x.waiveCharge(u.id))}),C(2,"i",33),a()}t&2&&d("matTooltip",ft(l(1,2,"tooltips.Waive Charge")))}function Hr(t,m){if(t&1){let e=D();i(0,"button",27),c(1,"translate"),b("click",function(o){S(e);let u=h(3).$implicit,x=h();return x.routeEdit(o),M(x.inactivateCharge(u.id))}),C(2,"i",34),a()}t&2&&d("matTooltip",ft(l(1,2,"tooltips.Inactivate Charge")))}function zr(t,m){t&1&&A(0,Hr,3,4,"button",25),t&2&&d("mifosxHasPermission","INACTIVATE_SAVINGSACCOUNTCHARGE")}function jr(t,m){if(t&1&&(i(0,"span"),A(1,Ur,3,4,"button",25)(2,qr,3,4,"button",25),v(3,zr,1,1,"button",31),a()),t&2){let e=h().$implicit,s=h();n(),d("mifosxHasPermission","PAY_SAVINGSACCOUNTCHARGE"),n(),d("mifosxHasPermission","WAIVE_SAVINGSACCOUNTCHARGE"),n(),_(s.isRecurringCharge(e)?3:-1)}}function $r(t,m){if(t&1&&(i(0,"td",24),v(1,Gr,3,2,"span"),v(2,jr,4,3,"span"),a()),t&2){let e=m.$implicit,s=h();n(),_(s.savingsAccountData.status.value==="Submitted and pending approval"?1:-1),n(),_(s.savingsAccountData.status.value==="Active"&&e.amountOutstanding!==0?2:-1)}}function Wr(t,m){t&1&&C(0,"tr",35)}function Qr(t,m){if(t&1&&C(0,"tr",36),t&2){let e=m.$implicit;d("routerLink",kt(1,fr,e.id))}}var Fn=(()=>{class t{constructor(){this.savingsService=g(I),this.route=g(E),this.dateUtils=g(j),this.router=g(z),this.dialog=g(yt),this.settingsService=g(U),this.translateService=g(ge),this.showInactiveCharges=!1,this.displayedColumns=["name","feeOrPenalty","paymentDueAt","dueAsOf","repeatsOn","calculationType","due","paid","waived","outstanding","actions"],this.route.parent.data.subscribe(e=>{this.savingsAccountData=e.savingsAccountData,this.chargesData=this.savingsAccountData.charges})}ngOnInit(){let e=this.chargesData?this.chargesData.filter(s=>s.isActive):[];this.dataSource=new Jt(e)}toggleCharges(){if(this.showInactiveCharges=!this.showInactiveCharges,this.showInactiveCharges){let e=this.chargesData.filter(s=>!s.isActive);this.dataSource.data=e}else{let e=this.chargesData.filter(s=>s.isActive);this.dataSource.data=e}this.chargesTableRef.renderRows()}payCharge(e){let s=[new pe({controlName:"amount",label:"Amount",value:"",type:"number",required:!0}),new Ne({controlName:"dueDate",label:"Payment Date",value:"",type:"date",required:!0})],o={title:`Pay Charge ${e}`,layout:{addButtonText:"Confirm"},formfields:s};this.dialog.open(se,{data:o}).afterClosed().subscribe(x=>{if(x.data){let B=this.settingsService.language.code,Yt=this.settingsService.dateFormat,Ue=Q(G({},x.data.value),{dueDate:this.dateUtils.formatDate(x.data.value.dueDate,Yt),dateFormat:Yt,locale:B});this.savingsService.executeSavingsAccountChargesCommand(this.savingsAccountData.id,"paycharge",Ue,e).subscribe(()=>{this.reload()})}})}waiveCharge(e){this.dialog.open(Le,{data:{id:e}}).afterClosed().subscribe(o=>{o.confirm&&this.savingsService.executeSavingsAccountChargesCommand(this.savingsAccountData.id,"waive",{},e).subscribe(()=>{this.reload()})})}inactivateCharge(e){this.dialog.open(Ge,{data:{id:e}}).afterClosed().subscribe(o=>{o.confirm&&this.savingsService.executeSavingsAccountChargesCommand(this.savingsAccountData.id,"inactivate",{},e).subscribe(()=>{this.reload()})})}editCharge(e){let s=[new pe({controlName:"amount",label:"Amount",value:e.amount||e.amountOrPercentage,type:"number",required:!0})],o={title:`Edit Charge ${e.id}`,layout:{addButtonText:"Confirm"},formfields:s};this.dialog.open(se,{data:o}).afterClosed().subscribe(x=>{if(x.data){let B=this.settingsService.language.code,Yt=this.settingsService.dateFormat,Ue=Q(G({},x.data.value),{dateFormat:Yt,locale:B});this.savingsService.editSavingsAccountCharge(this.savingsAccountData.id,Ue,e.id).subscribe(()=>{this.reload()})}})}deleteCharge(e){this.dialog.open(ve,{data:{deleteContext:`charge id:${e}`}}).afterClosed().subscribe(o=>{o.delete&&this.savingsService.deleteSavingsAccountCharge(this.savingsAccountData.id,e).subscribe(()=>{this.reload()})})}isRecurringCharge(e){return e.chargeTimeType.value==="Monthly Fee"||e.chargeTimeType.value==="Annual Fee"||e.chargeTimeType.value==="Weekly Fee"}routeEdit(e){e.stopPropagation()}reload(){let e=this.router.url,s=this.router.url.slice(0,this.router.url.indexOf("savings-accounts")+16);this.router.navigateByUrl(s,{skipLocationChange:!0}).then(()=>this.router.navigate([e]))}viewAllChargeButtons(e){return this.translateService.instant("labels.buttons."+e)}static{this.\u0275fac=function(s){return new(s||t)}}static{this.\u0275cmp=T({type:t,selectors:[["mifosx-charges-tab"]],viewQuery:function(s,o){if(s&1&&Pt(gr,7),s&2){let u;Ot(u=Dt())&&(o.chargesTableRef=u.first)}},decls:45,vars:7,consts:[["chargesTable",""],[1,"tab-container","mat-typography"],[1,"layout-row","align-start"],[1,"m-b-10"],[1,"action-button","m-b-20"],[1,"mat-elevation-z1","m-b-25"],["mat-table","",3,"dataSource"],["matColumnDef","name"],["mat-header-cell","",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","feeOrPenalty"],["matColumnDef","paymentDueAt"],["matColumnDef","dueAsOf"],["matColumnDef","repeatsOn"],["matColumnDef","calculationType"],["matColumnDef","due"],["matColumnDef","paid"],["matColumnDef","waived"],["matColumnDef","outstanding"],["matColumnDef","actions"],["mat-header-row","",4,"matHeaderRowDef"],["mat-row","","class","select-row",3,"routerLink",4,"matRowDef","matRowDefColumns"],["mat-raised-button","","color","primary",3,"click"],["mat-header-cell",""],["mat-cell",""],["class","account-action-button","mat-raised-button","","color","primary",3,"matTooltip","click",4,"mifosxHasPermission"],["class","account-action-button","mat-raised-button","","color","warn",3,"matTooltip","click",4,"mifosxHasPermission"],["mat-raised-button","","color","primary",1,"account-action-button",3,"click","matTooltip"],[1,"fa","fa-pencil"],["mat-raised-button","","color","warn",1,"account-action-button",3,"click","matTooltip"],[1,"fa","fa-trash"],["mat-raised-button","","color","primary",1,"account-action-button",3,"matTooltip"],[1,"fa","fa-dollar"],[1,"fa","fa-flag"],[1,"fa","fa-ban"],["mat-header-row",""],["mat-row","",1,"select-row",3,"routerLink"]],template:function(s,o){s&1&&(i(0,"div",1)(1,"div",2)(2,"div",3)(3,"h3"),r(4),c(5,"translate"),a()(),v(6,Cr,3,1,"div",4),a(),i(7,"div",5)(8,"table",6,0),N(10,7),A(11,vr,3,3,"th",8)(12,_r,2,1,"td",9),R(),N(13,10),A(14,hr,3,3,"th",8)(15,xr,3,4,"td",9),R(),N(16,11),A(17,br,3,3,"th",8)(18,Sr,3,4,"td",9),R(),N(19,12),A(20,Mr,3,3,"th",8)(21,Ar,3,3,"td",9),R(),N(22,13),A(23,Tr,3,3,"th",8)(24,Pr,2,1,"td",9),R(),N(25,14),A(26,Or,3,3,"th",8)(27,Dr,3,4,"td",9),R(),N(28,15),A(29,yr,3,3,"th",8)(30,Ir,3,6,"td",9),R(),N(31,16),A(32,wr,3,3,"th",8)(33,Er,3,6,"td",9),R(),N(34,17),A(35,Fr,3,3,"th",8)(36,kr,3,6,"td",9),R(),N(37,18),A(38,Br,3,3,"th",8)(39,Nr,3,6,"td",9),R(),N(40,19),A(41,Rr,3,3,"th",8)(42,$r,3,2,"td",9),R(),A(43,Wr,1,0,"tr",20)(44,Qr,1,3,"tr",21),a()()()),s&2&&(n(4),p(l(5,5,"labels.inputs.Charges")),n(2),_(o.chargesData?6:-1),n(2),d("dataSource",o.dataSource),n(35),d("matHeaderRowDef",o.displayedColumns),n(),d("matRowDefColumns",o.displayedColumns))},dependencies:[P,O,q,F,Rt,Lt,qt,Ut,Ht,Gt,zt,fe,jt,Wt,$t,Qt,ue,Bt,y,Nt],styles:[".tab-container[_ngcontent-%COMP%]{padding:1%;margin:1%}.tab-container[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{margin:1% auto}.tab-container[_ngcontent-%COMP%] .action-button[_ngcontent-%COMP%]{margin-left:auto}.tab-container[_ngcontent-%COMP%] table[_ngcontent-%COMP%]{width:100%}.tab-container[_ngcontent-%COMP%] table[_ngcontent-%COMP%] .account-action-button[_ngcontent-%COMP%]{min-width:26px;padding:0 6px;margin:4px;line-height:25px}.tab-container[_ngcontent-%COMP%] table[_ngcontent-%COMP%] .select-row[_ngcontent-%COMP%]:hover{cursor:pointer}"]})}}return t})();var Kr=["instructionsTable"];function Yr(t,m){t&1&&(i(0,"th",16),r(1),c(2,"translate"),a()),t&2&&(n(),p(l(2,1,"labels.inputs.Client")))}function Jr(t,m){if(t&1&&(i(0,"td",17),r(1),a()),t&2){let e=m.$implicit;n(),V(" ",e.fromClient.displayName,"-",e.fromClient.id," ")}}function Xr(t,m){t&1&&(i(0,"th",16),r(1),c(2,"translate"),a()),t&2&&(n(),p(l(2,1,"labels.inputs.From Account")))}function Zr(t,m){if(t&1&&(i(0,"td",17),r(1),a()),t&2){let e=m.$implicit;n(),V(" ",e.fromAccount.accountNo," (",e.fromAccountType.value,") ")}}function tc(t,m){t&1&&(i(0,"th",16),r(1),c(2,"translate"),a()),t&2&&(n(),p(l(2,1,"labels.inputs.Beneficiary")))}function ec(t,m){if(t&1&&(i(0,"td",17),r(1),a()),t&2){let e=m.$implicit;n(),p(e.toClient.displayName)}}function nc(t,m){t&1&&(i(0,"th",16),r(1),c(2,"translate"),a()),t&2&&(n(),p(l(2,1,"labels.inputs.To Account")))}function ic(t,m){if(t&1&&(i(0,"td",17),r(1),a()),t&2){let e=m.$implicit;n(),V(" ",e.toAccount.accountNo," (",e.toAccountType.value,") ")}}function ac(t,m){t&1&&(i(0,"th",16),r(1),c(2,"translate"),a()),t&2&&(n(),p(l(2,1,"labels.inputs.Amount")))}function oc(t,m){if(t&1&&(i(0,"td",17),r(1),a()),t&2){let e=m.$implicit;n(),V("",e.instructionType.value,"/",e.amount)}}function rc(t,m){t&1&&(i(0,"th",16),r(1),c(2,"translate"),a()),t&2&&(n(),p(l(2,1,"labels.inputs.Validity")))}function cc(t,m){if(t&1&&(i(0,"td",17),r(1),c(2,"dateFormat"),c(3,"translate"),c(4,"dateFormat"),a()),t&2){let e=m.$implicit;n(),Pe(" ",l(2,3,e.validFrom)," ",l(3,5,"labels.inputs.To")," ",l(4,7,e.validTill)," ")}}function sc(t,m){t&1&&(i(0,"th",16),r(1),c(2,"translate"),a()),t&2&&(n(),p(l(2,1,"labels.inputs.Actions")))}function lc(t,m){t&1&&(i(0,"button",19),c(1,"translate"),C(2,"i",20),a()),t&2&&d("matTooltip",ft(l(1,2,"tooltips.Edit Standing Instruction")))}function mc(t,m){t&1&&(i(0,"span"),A(1,lc,3,4,"button",18),a()),t&2&&(n(),d("mifosxHasPermission","UPDATE_STANDINGINSTRUCTION"))}function pc(t,m){if(t&1){let e=D();i(0,"button",22),c(1,"translate"),b("click",function(){S(e);let o=h(2).$implicit,u=h();return M(u.deleteStandingInstruction(o.id))}),C(2,"i",23),a()}t&2&&d("matTooltip",ft(l(1,2,"tooltips.Delete Standing Instruction")))}function dc(t,m){t&1&&(i(0,"span"),A(1,pc,3,4,"button",21),a()),t&2&&(n(),d("mifosxHasPermission","DELETE_STANDINGINSTRUCTION"))}function uc(t,m){t&1&&(i(0,"button",19),c(1,"translate"),C(2,"i",24),a()),t&2&&d("matTooltip",ft(l(1,2,"tooltips.View Standing Instruction")))}function gc(t,m){if(t&1&&(i(0,"td",17),v(1,mc,2,1,"span"),v(2,dc,2,1,"span"),A(3,uc,3,4,"button",18),a()),t&2){let e=m.$implicit;n(),_(e.status.value!=="Deleted"?1:-1),n(),_(e.status.value!=="Deleted"?2:-1),n(),d("mifosxHasPermission","READ_STANDINGINSTRUCTION")}}function fc(t,m){t&1&&C(0,"tr",25)}function Cc(t,m){t&1&&C(0,"tr",26)}var kn=(()=>{class t{constructor(){this.route=g(E),this.savingsService=g(I),this.dialog=g(yt),this.accountTransfersService=g(Gi),this.settingsService=g(U),this.dataSource=new Jt,this.displayedColumns=["client","fromAccount","beneficiary","toAccount","amount","validity","actions"],this.route.parent.data.subscribe(e=>{this.savingsData=e.savingsAccountData})}ngOnInit(){this.getStandingInstructions()}getStandingInstructions(){let e=this.savingsData.clientId,s=this.savingsData.clientName,o=this.savingsData.id,u=this.settingsService.language.code,x=this.settingsService.dateFormat;this.savingsService.getStandingInstructions(e,s,o,u,x).subscribe(B=>{this.instructionsData=B.pageItems,this.dataSource.data=this.instructionsData,this.instructionTableRef.renderRows()})}deleteStandingInstruction(e){this.dialog.open(ve,{data:{deleteContext:`standing instruction id: ${e}`}}).afterClosed().subscribe(o=>{o.delete&&this.accountTransfersService.deleteStandingInstrucions(e).subscribe(()=>{})})}static{this.\u0275fac=function(s){return new(s||t)}}static{this.\u0275cmp=T({type:t,selectors:[["mifosx-standing-instructions-tab"]],viewQuery:function(s,o){if(s&1&&Pt(Kr,7),s&2){let u;Ot(u=Dt())&&(o.instructionTableRef=u.first)}},decls:31,vars:6,consts:[["instructionsTable",""],[1,"tab-container","mat-typography"],[1,"m-b-10"],[1,"mat-elevation-z1","m-b-25"],["mat-table","",3,"dataSource"],["matColumnDef","client"],["mat-header-cell","",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","fromAccount"],["matColumnDef","beneficiary"],["matColumnDef","toAccount"],["matColumnDef","amount"],["matColumnDef","validity"],["matColumnDef","actions"],["mat-header-row","",4,"matHeaderRowDef"],["mat-row","",4,"matRowDef","matRowDefColumns"],["mat-header-cell",""],["mat-cell",""],["class","account-action-button","mat-raised-button","","color","primary",3,"matTooltip",4,"mifosxHasPermission"],["mat-raised-button","","color","primary",1,"account-action-button",3,"matTooltip"],[1,"fa","fa-edit"],["class","account-action-button","mat-raised-button","","color","warn",3,"matTooltip","click",4,"mifosxHasPermission"],["mat-raised-button","","color","warn",1,"account-action-button",3,"click","matTooltip"],[1,"fa","fa-times"],[1,"fa","fa-eye"],["mat-header-row",""],["mat-row",""]],template:function(s,o){s&1&&(i(0,"div",1)(1,"div",2)(2,"h3"),r(3),c(4,"translate"),a()(),i(5,"div",3)(6,"table",4,0),N(8,5),A(9,Yr,3,3,"th",6)(10,Jr,2,2,"td",7),R(),N(11,8),A(12,Xr,3,3,"th",6)(13,Zr,2,2,"td",7),R(),N(14,9),A(15,tc,3,3,"th",6)(16,ec,2,1,"td",7),R(),N(17,10),A(18,nc,3,3,"th",6)(19,ic,2,2,"td",7),R(),N(20,11),A(21,ac,3,3,"th",6)(22,oc,2,2,"td",7),R(),N(23,12),A(24,rc,3,3,"th",6)(25,cc,5,9,"td",7),R(),N(26,13),A(27,sc,3,3,"th",6)(28,gc,4,3,"td",7),R(),A(29,fc,1,0,"tr",14)(30,Cc,1,0,"tr",15),a()()()),s&2&&(n(3),p(l(4,4,"labels.heading.All Standing Instructions")),n(3),d("dataSource",o.dataSource),n(23),d("matHeaderRowDef",o.displayedColumns),n(),d("matRowDefColumns",o.displayedColumns))},dependencies:[P,O,F,Rt,Lt,qt,Ut,Ht,Gt,zt,fe,jt,Wt,$t,Qt,Bt,y],styles:[".tab-container[_ngcontent-%COMP%]{padding:1%;margin:1%}.tab-container[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{margin:1% auto}.tab-container[_ngcontent-%COMP%] .action-button[_ngcontent-%COMP%]{margin-left:auto}.tab-container[_ngcontent-%COMP%] table[_ngcontent-%COMP%]{width:100%}.tab-container[_ngcontent-%COMP%] table[_ngcontent-%COMP%] .account-action-button[_ngcontent-%COMP%]{min-width:26px;padding:0 6px;margin:4px;line-height:25px}"]})}}return t})();var Bn=(()=>{class t{constructor(){this.route=g(E),this.entityId=this.route.parent.parent.snapshot.paramMap.get("savingAccountId"),this.route.data.subscribe(e=>{this.entityDatatable=e.savingsDatatable,this.multiRowDatatableFlag=this.entityDatatable.columnHeaders[0].columnName==="id"})}static{this.\u0275fac=function(s){return new(s||t)}}static{this.\u0275cmp=T({type:t,selectors:[["mifosx-datatable-tabs"]],decls:2,vars:3,consts:[[1,"tab-container","mat-typography"],["entityType","Savings",3,"entityId","multiRowDatatableFlag","entityDatatable"]],template:function(s,o){s&1&&(i(0,"div",0),C(1,"mifosx-entity-datatable-tab",1),a()),s&2&&(n(),d("entityId",o.entityId)("multiRowDatatableFlag",o.multiRowDatatableFlag)("entityDatatable",o.entityDatatable))},dependencies:[P,O,pn],encapsulation:2})}}return t})();function vc(t,m){if(t&1&&(i(0,"mat-option",5),r(1),a()),t&2){let e=m.$implicit;d("value",e.id),n(),f(" ",e.name," ")}}function _c(t,m){if(t&1){let e=D();i(0,"mat-form-field",11),b("click",function(){S(e);let o=w(7);return M(o.open())}),i(1,"mat-label"),r(2),c(3,"translate"),a(),C(4,"input",12)(5,"mat-datepicker-toggle",13)(6,"mat-datepicker",null,0),i(8,"mat-error"),r(9),c(10,"translate"),c(11,"translate"),i(12,"strong"),r(13),c(14,"translate"),a()()()}if(t&2){let e=w(7),s=h();n(2),p(l(3,8,"labels.inputs.Submitted On")),n(2),d("min",s.minDate)("max",s.maxDate)("matDatepicker",e),n(),d("for",e),n(4),V(" ",l(10,10,"labels.inputs.Submitted On")," ",l(11,12,"labels.commons.is")," "),n(4),p(l(14,14,"labels.commons.required"))}}function hc(t,m){if(t&1&&(i(0,"mat-option",5),r(1),a()),t&2){let e=m.$implicit;d("value",e.id),n(),f(" ",e.displayName," ")}}function xc(t,m){if(t&1&&(i(0,"mat-form-field",3)(1,"mat-label"),r(2),c(3,"translate"),a(),i(4,"mat-select",14),ut(5,hc,2,2,"mat-option",5,dt),a()()),t&2){let e=h();n(2),p(l(3,1,"labels.inputs.Field Officer")),n(3),gt(e.fieldOfficerData)}}function bc(t,m){t&1&&(i(0,"mat-form-field",3)(1,"mat-label"),r(2),c(3,"translate"),a(),C(4,"input",15),a()),t&2&&(n(2),p(l(3,1,"labels.inputs.External ID")))}var oe=(()=>{class t{constructor(){this.formBuilder=g(rt),this.savingsService=g(I),this.settingsService=g(U),this.minDate=new Date(2e3,0,1),this.maxDate=new Date,this.isFieldOfficerPatched=!1,this.savingsProductSelected=!1,this.savingsAccountProductTemplate=new We,this.createSavingsAccountDetailsForm()}ngOnInit(){this.maxDate=this.settingsService.businessDate,this.buildDependencies(),this.savingsAccountTemplate&&(this.productData=this.savingsAccountTemplate.productOptions,this.savingsAccountTemplate.savingsProductId?this.savingsAccountDetailsForm.patchValue({productId:this.savingsAccountTemplate.savingsProductId,submittedOnDate:this.savingsAccountTemplate.timeline.submittedOnDate&&new Date(this.savingsAccountTemplate.timeline.submittedOnDate),externalId:this.savingsAccountTemplate.externalId}):this.savingsAccountDetailsForm.patchValue({submittedOnDate:new Date}))}createSavingsAccountDetailsForm(){this.savingsAccountDetailsForm=this.formBuilder.group({productId:["",H.required],submittedOnDate:["",H.required],fieldOfficerId:[""],externalId:[""]})}buildDependencies(){let e=this.savingsAccountTemplate.groupId||this.savingsAccountTemplate.clientId;this.savingsAccountDetailsForm.get("productId").valueChanges.subscribe(s=>{this.savingsService.getSavingsAccountTemplate(e,s,!!this.savingsAccountTemplate.groupId).subscribe(o=>{this.savingsAccountProductTemplate.emit(o),this.fieldOfficerData=o.fieldOfficerOptions,this.savingsProductSelected=!0,!this.isFieldOfficerPatched&&this.savingsAccountTemplate.fieldOfficerId?(this.savingsAccountDetailsForm.get("fieldOfficerId").patchValue(this.savingsAccountTemplate.fieldOfficerId),this.isFieldOfficerPatched=!0):this.savingsAccountDetailsForm.get("fieldOfficerId").patchValue("")})})}get savingsAccountDetails(){return this.savingsAccountDetailsForm.getRawValue()}static{this.\u0275fac=function(s){return new(s||t)}}static{this.\u0275cmp=T({type:t,selectors:[["mifosx-savings-account-details-step"]],inputs:{savingsAccountTemplate:"savingsAccountTemplate"},outputs:{savingsAccountProductTemplate:"savingsAccountProductTemplate"},decls:28,vars:23,consts:[["submittedOnDatePicker",""],[3,"formGroup"],[1,"layout-row-wrap","gap-2px","responsive-column"],[1,"flex-48"],["formControlName","productId","required",""],[3,"value"],[1,"layout-row","align-center","gap-2percent","margin-t","responsive-column"],["mat-raised-button","","matStepperPrevious","","disabled",""],["icon","arrow-left",1,"m-r-10"],["mat-raised-button","","matStepperNext","",3,"disabled"],["icon","arrow-right",1,"m-l-10"],[1,"flex-48",3,"click"],["matInput","","formControlName","submittedOnDate","required","",3,"min","max","matDatepicker"],["matSuffix","",3,"for"],["formControlName","fieldOfficerId"],["matInput","","formControlName","externalId"]],template:function(s,o){s&1&&(i(0,"form",1)(1,"div",2)(2,"mat-form-field",3)(3,"mat-label"),r(4),c(5,"translate"),a(),i(6,"mat-select",4),ut(7,vc,2,2,"mat-option",5,dt),a(),i(9,"mat-error"),r(10),c(11,"translate"),c(12,"translate"),i(13,"strong"),r(14),c(15,"translate"),a()()(),v(16,_c,15,16,"mat-form-field",3),v(17,xc,7,3,"mat-form-field",3),v(18,bc,5,3,"mat-form-field",3),a(),i(19,"div",6)(20,"button",7),C(21,"fa-icon",8),r(22),c(23,"translate"),a(),i(24,"button",9),r(25),c(26,"translate"),C(27,"fa-icon",10),a()()()),s&2&&(d("formGroup",o.savingsAccountDetailsForm),n(4),p(l(5,11,"labels.inputs.Product Name")),n(3),gt(o.productData),n(3),V(" ",l(11,13,"labels.inputs.Product Name")," ",l(12,15,"labels.commons.is")," "),n(4),p(l(15,17,"labels.commons.required")),n(2),_(o.savingsProductSelected?16:-1),n(),_(o.savingsProductSelected?17:-1),n(),_(o.savingsProductSelected?18:-1),n(4),f(" ",l(23,19,"labels.buttons.Previous")," "),n(2),d("disabled",o.savingsAccountDetailsForm.invalid),n(),f(" ",l(26,21,"labels.buttons.Next")," "))},dependencies:[P,O,it,et,K,nt,lt,at,ot,Z,X,mt,vt,st,wt,It,ht,xt,_t,F,le,St,_e,y],encapsulation:2})}}return t})();function Sc(t,m){if(t&1&&(i(0,"mat-option",7),r(1),c(2,"translateKey"),a()),t&2){let e=m.$implicit;d("value",e.id),n(),f(" ",Mt(2,2,e.value,"catalogs")," ")}}function Mc(t,m){if(t&1&&(i(0,"mat-option",7),r(1),c(2,"translateKey"),a()),t&2){let e=m.$implicit;d("value",e.id),n(),f(" ",Mt(2,2,e.value,"catalogs")," ")}}function Ac(t,m){if(t&1&&(i(0,"mat-option",7),r(1),c(2,"translateKey"),a()),t&2){let e=m.$implicit;d("value",e.id),n(),f(" ",Mt(2,2,e.value,"catalogs")," ")}}function Tc(t,m){if(t&1&&(i(0,"mat-option",7),r(1),c(2,"translateKey"),a()),t&2){let e=m.$implicit;d("value",e.id),n(),f(" ",Mt(2,2,e.value,"catalogs")," ")}}function Pc(t,m){if(t&1&&(i(0,"mat-option",7),r(1),c(2,"translateKey"),a()),t&2){let e=m.$implicit;d("value",e.id),n(),f(" ",Mt(2,2,e.value,"catalogs")," ")}}function Oc(t,m){t&1&&(i(0,"div",19)(1,"mat-form-field",27)(2,"mat-label"),r(3),c(4,"translate"),a(),C(5,"input",28),a(),i(6,"mat-form-field",27)(7,"mat-label"),r(8),c(9,"translate"),a(),C(10,"input",29),a(),i(11,"mat-form-field",27)(12,"mat-label"),r(13),c(14,"translate"),a(),C(15,"input",30),a()()),t&2&&(n(3),p(l(4,3,"labels.inputs.Minimum Overdraft Required for Interest Calculation")),n(5),p(l(9,5,"labels.inputs.Nominal Annual Interest for Overdraft")),n(5),p(l(14,7,"labels.inputs.Maximum Overdraft Amount Limit")))}function Dc(t,m){t&1&&(i(0,"mat-form-field",2)(1,"mat-label"),r(2),c(3,"translate"),a(),C(4,"input",31),a()),t&2&&(n(2),p(l(3,1,"labels.inputs.Balance Required for Interest Calculation")))}var re=(()=>{class t{constructor(){this.formBuilder=g(rt),this.settingsService=g(U),this.minDate=new Date(2e3,0,1),this.maxDate=new Date,this.createSavingsAccountTermsForm(),this.buildDependencies()}ngOnChanges(){this.savingsAccountProductTemplate&&(this.savingsAccountTermsForm.patchValue({currencyCode:this.savingsAccountProductTemplate.currency.code,decimal:this.savingsAccountProductTemplate.currency.decimalPlaces,minBalanceForInterestCalculation:this.savingsAccountProductTemplate.minBalanceForInterestCalculation,nominalAnnualInterestRate:this.savingsAccountProductTemplate.nominalAnnualInterestRate,interestCompoundingPeriodType:this.savingsAccountProductTemplate.interestCompoundingPeriodType.id,interestPostingPeriodType:this.savingsAccountProductTemplate.interestPostingPeriodType.id,interestCalculationType:this.savingsAccountProductTemplate.interestCalculationType.id,interestCalculationDaysInYearType:this.savingsAccountProductTemplate.interestCalculationDaysInYearType.id,minRequiredOpeningBalance:this.savingsAccountProductTemplate.minRequiredOpeningBalance,allowOverdraft:this.savingsAccountProductTemplate.allowOverdraft,overdraftLimit:this.savingsAccountProductTemplate.overdraftLimit,enforceMinRequiredBalance:this.savingsAccountProductTemplate.enforceMinRequiredBalance,minOverdraftForInterestCalculation:this.savingsAccountProductTemplate.minOverdraftForInterestCalculation,nominalAnnualInterestRateOverdraft:this.savingsAccountProductTemplate.nominalAnnualInterestRateOverdraft,minRequiredBalance:this.savingsAccountProductTemplate.minRequiredBalance,withdrawalFeeForTransfers:this.savingsAccountProductTemplate.withdrawalFeeForTransfers}),this.setOptions())}ngOnInit(){this.maxDate=this.settingsService.businessDate,this.savingsAccountTemplate&&this.savingsAccountTermsForm.patchValue({nominalAnnualInterestRate:this.savingsAccountTemplate.nominalAnnualInterestRate,interestCompoundingPeriodType:this.savingsAccountTemplate.interestCompoundingPeriodType.id,interestPostingPeriodType:this.savingsAccountTemplate.interestPostingPeriodType.id,interestCalculationType:this.savingsAccountTemplate.interestCalculationType.id,interestCalculationDaysInYearType:this.savingsAccountTemplate.interestCalculationDaysInYearType.id,minRequiredOpeningBalance:this.savingsAccountTemplate.minRequiredOpeningBalance,withdrawalFeeForTransfers:this.savingsAccountTemplate.withdrawalFeeForTransfers,lockinPeriodFrequency:this.savingsAccountTemplate.lockinPeriodFrequency,lockinPeriodFrequencyType:this.savingsAccountTemplate.lockinPeriodFrequencyType&&this.savingsAccountTemplate.lockinPeriodFrequencyType.id,allowOverdraft:this.savingsAccountTemplate.allowOverdraft,enforceMinRequiredBalance:this.savingsAccountTemplate.enforceMinRequiredBalance,minRequiredBalance:this.savingsAccountTemplate.minRequiredBalance})}createSavingsAccountTermsForm(){this.savingsAccountTermsForm=this.formBuilder.group({currencyCode:[{value:"",disabled:!0}],decimal:[{value:"",disabled:!0}],nominalAnnualInterestRate:["",H.required],interestCompoundingPeriodType:["",H.required],interestPostingPeriodType:["",H.required],interestCalculationType:["",H.required],interestCalculationDaysInYearType:["",H.required],minRequiredOpeningBalance:[""],withdrawalFeeForTransfers:[!1],lockinPeriodFrequency:[""],lockinPeriodFrequencyType:[""],allowOverdraft:[!1],enforceMinRequiredBalance:[!1],minRequiredBalance:[""],minBalanceForInterestCalculation:[{value:"",disabled:!0}]})}setOptions(){this.lockinPeriodFrequencyTypeData=this.savingsAccountProductTemplate.lockinPeriodFrequencyTypeOptions,this.interestCompoundingPeriodTypeData=this.savingsAccountProductTemplate.interestCompoundingPeriodTypeOptions,this.interestPostingPeriodTypeData=this.savingsAccountProductTemplate.interestPostingPeriodTypeOptions,this.interestCalculationTypeData=this.savingsAccountProductTemplate.interestCalculationTypeOptions,this.interestCalculationDaysInYearTypeData=this.savingsAccountProductTemplate.interestCalculationDaysInYearTypeOptions}buildDependencies(){this.savingsAccountTermsForm.get("allowOverdraft").valueChanges.subscribe(e=>{e?(this.savingsAccountTermsForm.addControl("minOverdraftForInterestCalculation",new Ct("")),this.savingsAccountTermsForm.addControl("nominalAnnualInterestRateOverdraft",new Ct("")),this.savingsAccountTermsForm.addControl("overdraftLimit",new Ct(""))):(this.savingsAccountTermsForm.removeControl("minOverdraftForInterestCalculation"),this.savingsAccountTermsForm.removeControl("nominalAnnualInterestRateOverdraft"),this.savingsAccountTermsForm.removeControl("overdraftLimit"))})}get savingsAccountTerms(){let e=this.savingsAccountTermsForm.getRawValue();return delete e.currencyCode,delete e.decimal,delete e.minBalanceForInterestCalculation,e}static{this.\u0275fac=function(s){return new(s||t)}}static{this.\u0275cmp=T({type:t,selectors:[["mifosx-savings-account-terms-step"]],inputs:{savingsAccountProductTemplate:"savingsAccountProductTemplate",savingsAccountTemplate:"savingsAccountTemplate"},features:[Te],decls:130,vars:102,consts:[[3,"formGroup"],[1,"layout-row-wrap","gap-2percent","responsive-column","align-start-center"],[1,"flex-48"],["matInput","","formControlName","currencyCode"],["type","number","matInput","","formControlName","decimal"],["type","number","matInput","","formControlName","nominalAnnualInterestRate","required",""],["formControlName","interestCompoundingPeriodType","required",""],[3,"value"],["formControlName","interestPostingPeriodType","required",""],["formControlName","interestCalculationType","required",""],["formControlName","interestCalculationDaysInYearType","required",""],["type","number","matInput","","formControlName","minRequiredOpeningBalance"],["labelPosition","before","formControlName","withdrawalFeeForTransfers",1,"margin-v","flex-48"],[1,"mat-h4","flex-98"],["type","number","matInput","","formControlName","lockinPeriodFrequency"],["formControlName","lockinPeriodFrequencyType"],[1,"flex-98"],[1,"mat-h3","flex-23"],["labelPosition","before","formControlName","allowOverdraft",1,"flex-73","margin-b"],[1,"flex-fill","layout-row-wrap","gap-2percent","responsive-column"],["labelPosition","before","formControlName","enforceMinRequiredBalance",1,"margin-v","flex-48"],["type","number","matInput","","formControlName","minRequiredBalance"],[1,"layout-row","align-center","gap-2percent","margin-t","responsive-column"],["mat-raised-button","","matStepperPrevious",""],["icon","arrow-left",1,"m-r-10"],["mat-raised-button","","matStepperNext",""],["icon","arrow-right",1,"m-l-10"],[1,"flex-31"],["type","number","matInput","","formControlName","minOverdraftForInterestCalculation"],["type","number","matInput","","formControlName","nominalAnnualInterestRateOverdraft"],["type","number","matInput","","formControlName","overdraftLimit"],["type","number","matInput","","formControlName","minBalanceForInterestCalculation"]],template:function(s,o){s&1&&(i(0,"form",0)(1,"div",1)(2,"mat-form-field",2)(3,"mat-label"),r(4),c(5,"translate"),a(),C(6,"input",3),a(),i(7,"mat-form-field",2)(8,"mat-label"),r(9),c(10,"translate"),a(),C(11,"input",4),a(),i(12,"mat-form-field",2)(13,"mat-label"),r(14),c(15,"translate"),a(),C(16,"input",5),i(17,"mat-error"),r(18),c(19,"translate"),c(20,"translate"),i(21,"strong"),r(22),c(23,"translate"),a()()(),i(24,"mat-form-field",2)(25,"mat-label"),r(26),c(27,"translate"),a(),i(28,"mat-select",6),ut(29,Sc,3,5,"mat-option",7,dt),a(),i(31,"mat-error"),r(32),c(33,"translate"),c(34,"translate"),i(35,"strong"),r(36),c(37,"translate"),a()()(),i(38,"mat-form-field",2)(39,"mat-label"),r(40),c(41,"translate"),a(),i(42,"mat-select",8),ut(43,Mc,3,5,"mat-option",7,dt),a(),i(45,"mat-error"),r(46),c(47,"translate"),c(48,"translate"),i(49,"strong"),r(50),c(51,"translate"),a()()(),i(52,"mat-form-field",2)(53,"mat-label"),r(54),c(55,"translate"),a(),i(56,"mat-select",9),ut(57,Ac,3,5,"mat-option",7,dt),a(),i(59,"mat-error"),r(60),c(61,"translate"),c(62,"translate"),i(63,"strong"),r(64),c(65,"translate"),a()()(),i(66,"mat-form-field",2)(67,"mat-label"),r(68),c(69,"translate"),a(),i(70,"mat-select",10),ut(71,Tc,3,5,"mat-option",7,dt),a(),i(73,"mat-error"),r(74),c(75,"translate"),c(76,"translate"),i(77,"strong"),r(78),c(79,"translate"),a()()(),i(80,"mat-form-field",2)(81,"mat-label"),r(82),c(83,"translate"),a(),C(84,"input",11),a(),i(85,"mat-checkbox",12),r(86),c(87,"translate"),a(),i(88,"h4",13),r(89),c(90,"translate"),a(),i(91,"mat-form-field",2)(92,"mat-label"),r(93),c(94,"translate"),a(),C(95,"input",14),a(),i(96,"mat-form-field",2)(97,"mat-label"),r(98),c(99,"translate"),a(),i(100,"mat-select",15),ut(101,Pc,3,5,"mat-option",7,dt),a()(),C(103,"mat-divider",16),i(104,"h3",17),r(105),c(106,"translate"),a(),i(107,"mat-checkbox",18),r(108),c(109,"translate"),a(),v(110,Oc,16,9,"div",19),C(111,"mat-divider",16),i(112,"mat-checkbox",20),r(113),c(114,"translate"),a(),i(115,"mat-form-field",2)(116,"mat-label"),r(117),c(118,"translate"),a(),C(119,"input",21),a(),v(120,Dc,5,3,"mat-form-field",2),a(),i(121,"div",22)(122,"button",23),C(123,"fa-icon",24),r(124),c(125,"translate"),a(),i(126,"button",25),r(127),c(128,"translate"),C(129,"fa-icon",26),a()()()),s&2&&(d("formGroup",o.savingsAccountTermsForm),n(4),p(l(5,36,"labels.inputs.Currency")),n(5),p(l(10,38,"labels.inputs.Decimal Places")),n(5),p(l(15,40,"labels.inputs.Nominal Annual Interest")),n(4),V(" ",l(19,42,"labels.inputs.Nominal Annual Interest")," ",l(20,44,"labels.commons.is")," "),n(4),p(l(23,46,"labels.commons.required")),n(4),p(l(27,48,"labels.inputs.Interest Compounding Period")),n(3),gt(o.interestCompoundingPeriodTypeData),n(3),V(" ",l(33,50,"labels.inputs.Interest Compounding Period")," ",l(34,52,"labels.commons.is")," "),n(4),p(l(37,54,"labels.commons.required")),n(4),p(l(41,56,"labels.inputs.Interest Posting Period")),n(3),gt(o.interestPostingPeriodTypeData),n(3),V(" ",l(47,58,"labels.inputs.Interest Posting Period")," ",l(48,60,"labels.commons.is")," "),n(4),p(l(51,62,"labels.commons.required")),n(4),p(l(55,64,"labels.inputs.Interest Calculated using")),n(3),gt(o.interestCalculationTypeData),n(3),V(" ",l(61,66,"labels.inputs.Interest Calculated using")," ",l(62,68,"labels.commons.is")," "),n(4),p(l(65,70,"labels.commons.required")),n(4),p(l(69,72,"labels.inputs.Days in Year")),n(3),gt(o.interestCalculationDaysInYearTypeData),n(3),V(" ",l(75,74,"labels.inputs.Days in Year")," ",l(76,76,"labels.commons.is")," "),n(4),p(l(79,78,"labels.commons.required")),n(4),p(l(83,80,"labels.inputs.Minimum Opening Balance")),n(4),f(" ",l(87,82,"labels.inputs.Apply Withdrawal Fee for Transfers")," "),n(3),p(l(90,84,"labels.inputs.Lock-in Period")),n(4),p(l(94,86,"labels.inputs.Frequency")),n(5),p(l(99,88,"labels.inputs.Type")),n(3),gt(o.lockinPeriodFrequencyTypeData),n(4),p(l(106,90,"labels.inputs.Overdraft")),n(3),f(" ",l(109,92,"labels.inputs.Is Overdraft Allowed")," "),n(2),_(o.savingsAccountTermsForm.value.allowOverdraft?110:-1),n(3),f(" ",l(114,94,"labels.inputs.Enforce Minimum Balance")," "),n(4),p(l(118,96,"labels.inputs.Minimum Balance")),n(3),_(o.savingsAccountTermsForm.controls.minBalanceForInterestCalculation.value?120:-1),n(4),f(" ",l(125,98,"labels.buttons.Previous")," "),n(3),f(" ",l(128,100,"labels.buttons.Next")," "))},dependencies:[P,O,it,et,ie,K,nt,lt,at,ot,Z,X,mt,st,wt,It,F,Ce,tn,le,St,_e,y,Nt],styles:["h4[_ngcontent-%COMP%]{font-weight:500;margin:1em 0}h3[_ngcontent-%COMP%]{font-weight:500}mat-divider[_ngcontent-%COMP%]{margin:1em 0 2em}.margin-v[_ngcontent-%COMP%]{margin:1em 0}.margin-b[_ngcontent-%COMP%]{margin:0 0 1em}.margin-t[_ngcontent-%COMP%]{margin-top:1em}"]})}}return t})();function yc(t,m){if(t&1&&(i(0,"mat-option",3),r(1),a()),t&2){let e=m.$implicit;d("value",e),n(),f(" ",e.name," ")}}function Ic(t,m){t&1&&(i(0,"th",24),r(1),c(2,"translate"),a()),t&2&&(n(),p(l(2,1,"labels.inputs.Name")))}function wc(t,m){if(t&1&&(i(0,"td",25),r(1),a()),t&2){let e=m.$implicit;n(),f(" ",e.name+", "+e.currency.displaySymbol," ")}}function Ec(t,m){t&1&&(i(0,"th",24),r(1),c(2,"translate"),a()),t&2&&(n(),p(l(2,1,"labels.inputs.Type")))}function Fc(t,m){if(t&1&&(i(0,"td",25),r(1),a()),t&2){let e=m.$implicit;n(),f(" ",e.chargeCalculationType.value," ")}}function kc(t,m){t&1&&(i(0,"th",24),r(1),c(2,"translate"),a()),t&2&&(n(),p(l(2,1,"labels.inputs.Amount")))}function Bc(t,m){if(t&1){let e=D();i(0,"td",25),r(1),c(2,"formatNumber"),i(3,"button",26),b("click",function(){let o=S(e).$implicit,u=h(2);return M(u.editChargeAmount(o))}),C(4,"fa-icon",27),a()()}if(t&2){let e=m.$implicit;n(),f(" ",l(2,1,e.amount)," ")}}function Nc(t,m){t&1&&(i(0,"th",24),r(1),c(2,"translate"),a()),t&2&&(n(),p(l(2,1,"labels.inputs.Collected On")))}function Rc(t,m){if(t&1&&(i(0,"td",25),r(1),c(2,"translateKey"),a()),t&2){let e=m.$implicit;n(),f(" ",Mt(2,1,e.chargeTimeType.value,"catalogs")," ")}}function Vc(t,m){t&1&&(i(0,"th",24),r(1),c(2,"translate"),a()),t&2&&(n(),p(l(2,1,"labels.inputs.Date")))}function Lc(t,m){if(t&1&&(i(0,"span"),r(1),c(2,"dateFormat"),a()),t&2){let e=h().$implicit;n(),f(" ",l(2,1,e.dueDate)||"Unassigned"," ")}}function Gc(t,m){if(t&1&&(i(0,"span"),r(1),c(2,"dateFormat"),a()),t&2){let e=h().$implicit;n(),f(" ",l(2,1,e.feeOnMonthDay)||"Unassigned"," ")}}function Uc(t,m){t&1&&(i(0,"span"),r(1," N/A "),a())}function qc(t,m){if(t&1){let e=D();i(0,"button",26),b("click",function(){S(e);let o=h().$implicit,u=h(2);return M(u.editChargeDate(o))}),C(1,"fa-icon",27),a()}}function Hc(t,m){if(t&1&&(i(0,"td",25),v(1,Lc,3,3,"span"),v(2,Gc,3,3,"span"),v(3,Uc,2,0,"span"),v(4,qc,2,0,"button",28),a()),t&2){let e=m.$implicit;n(),_(e.chargeTimeType.value==="Specified due date"||e.chargeTimeType.value==="Weekly Fee"?1:-1),n(),_(e.chargeTimeType.value==="Monthly Fee"||e.chargeTimeType.value==="Annual Fee"?2:-1),n(),_(e.chargeTimeType.value==="Monthly Fee"||e.chargeTimeType.value==="Annual Fee"||e.chargeTimeType.value==="Specified due date"||e.chargeTimeType.value==="Weekly Fee"?-1:3),n(),_(e.chargeTimeType.value==="Weekly Fee"||e.chargeTimeType.value==="Monthly Fee"||e.chargeTimeType.value==="Annual Fee"||e.chargeTimeType.value==="Specified due date"?4:-1)}}function zc(t,m){t&1&&(i(0,"th",24),r(1),c(2,"translate"),a()),t&2&&(n(),p(l(2,1,"labels.inputs.Repayments Every")))}function jc(t,m){if(t&1&&(i(0,"span"),r(1),a()),t&2){let e=h().$implicit;n(),p(e.feeInterval)}}function $c(t,m){t&1&&(i(0,"span"),r(1),c(2,"translate"),a()),t&2&&(n(),p(l(2,1,"labels.inputs.Not Provided")))}function Wc(t,m){if(t&1){let e=D();i(0,"button",26),b("click",function(){S(e);let o=h().$implicit,u=h(2);return M(u.editChargeFeeInterval(o))}),C(1,"fa-icon",27),a()}}function Qc(t,m){if(t&1&&(i(0,"td",25),v(1,jc,2,1,"span"),v(2,$c,3,3,"span"),v(3,Wc,2,0,"button",28),a()),t&2){let e=m.$implicit;n(),_(e.feeInterval?1:-1),n(),_(e.feeInterval?-1:2),n(),_(e.chargeTimeType.value==="Weekly Fee"||e.chargeTimeType.value==="Monthly Fee"?3:-1)}}function Kc(t,m){t&1&&(i(0,"th",24),r(1),c(2,"translate"),a()),t&2&&(n(),p(l(2,1,"labels.inputs.Actions")))}function Yc(t,m){if(t&1){let e=D();i(0,"td",25)(1,"button",29),b("click",function(){let o=S(e).$implicit,u=h(2);return M(u.deleteCharge(o))}),C(2,"fa-icon",30),a()()}}function Jc(t,m){t&1&&C(0,"tr",31)}function Xc(t,m){t&1&&C(0,"tr",32)}function Zc(t,m){if(t&1&&(i(0,"table",7),N(1,13),A(2,Ic,3,3,"th",14)(3,wc,2,1,"td",15),R(),N(4,16),A(5,Ec,3,3,"th",14)(6,Fc,2,1,"td",15),R(),N(7,17),A(8,kc,3,3,"th",14)(9,Bc,5,3,"td",15),R(),N(10,18),A(11,Nc,3,3,"th",14)(12,Rc,3,4,"td",15),R(),N(13,19),A(14,Vc,3,3,"th",14)(15,Hc,5,4,"td",15),R(),N(16,20),A(17,zc,3,3,"th",14)(18,Qc,4,3,"td",15),R(),N(19,21),A(20,Kc,3,3,"th",14)(21,Yc,3,0,"td",15),R(),A(22,Jc,1,0,"tr",22)(23,Xc,1,0,"tr",23),a()),t&2){let e=h();d("dataSource",e.chargesDataSource),n(22),d("matHeaderRowDef",e.displayedColumns),n(),d("matRowDefColumns",e.displayedColumns)}}var ce=(()=>{class t{constructor(){this.dialog=g(yt),this.dateUtils=g(j),this.translateService=g(ge),this.chargeData=[],this.chargesDataSource=[],this.pristine=!0,this.isChargesPatched=!1,this.displayedColumns=["name","chargeCalculationType","amount","chargeTimeType","date","repaymentsEvery","action"],this.selectAllItems=!1,this.loanPurposeOptions=[],this.displayedColumn=["check","id","name"]}ngOnInit(){this.savingsAccountTemplate&&(!this.isChargesPatched&&this.savingsAccountTemplate.charges?(this.chargesDataSource=this.savingsAccountProductTemplate.charges.map(e=>Q(G({},e),{id:e.chargeId}))||[],this.isChargesPatched=!0):this.chargesDataSource=[])}ngOnChanges(){this.savingsAccountProductTemplate&&(this.chargeData=this.savingsAccountProductTemplate.chargeOptions,this.chargesDataSource=this.savingsAccountProductTemplate.charges.map(e=>Q(G({},e),{id:e.chargeId}))||[])}addCharge(e){this.chargesDataSource=this.chargesDataSource.concat([e.value]),e.value="",this.pristine=!1}editChargeAmount(e){let s=[new pe({controlName:"amount",label:this.translateService.instant("labels.inputs.Amount"),value:e.amount,type:"number",required:!1})],o={title:this.translateService.instant("labels.heading.Edit Charge Amount"),layout:{addButtonText:"Confirm"},formfields:s};this.dialog.open(se,{data:o}).afterClosed().subscribe(x=>{if(x.data){let B=Q(G({},e),{amount:x.data.value.amount});this.chargesDataSource.splice(this.chargesDataSource.indexOf(e),1,B),this.chargesDataSource=this.chargesDataSource.concat([])}}),this.pristine=!1}editChargeDate(e){let s=[new Ne({controlName:"date",label:this.translateService.instant("labels.inputs.Date"),value:e.dueDate||e.feeOnMonthDay||"",type:"datetime-local",required:!1})],o={title:this.translateService.instant("labels.heading.Edit Charge Date"),layout:{addButtonText:"Confirm"},formfields:s};this.dialog.open(se,{data:o}).afterClosed().subscribe(x=>{if(x.data){let B,Ue=this.dateUtils.formatDate(x.data.value.date,"dd MMMM yyyy");switch(e.chargeTimeType.value){case"Specified due date":case"Weekly Fee":B=Q(G({},e),{dueDate:Ue});break;case"Annual Fee":case"Monthly Fee":let Wi=this.dateUtils.formatDate(x.data.value.date,"dd MMMM");B=Q(G({},e),{feeOnMonthDay:Wi});break}this.chargesDataSource.splice(this.chargesDataSource.indexOf(e),1,B),this.chargesDataSource=this.chargesDataSource.concat([])}}),this.pristine=!1}editChargeFeeInterval(e){let s=[new pe({controlName:"feeInterval",label:"Fee Interval",value:e.feeInterval,type:"text",required:!1})],o={title:"Edit Charge Fee Interval",layout:{addButtonText:"Confirm"},formfields:s};this.dialog.open(se,{data:o}).afterClosed().subscribe(x=>{if(x.data){let B=Q(G({},e),{feeInterval:x.data.value.feeInterval});this.chargesDataSource.splice(this.chargesDataSource.indexOf(e),1,B),this.chargesDataSource=this.chargesDataSource.concat([])}}),this.pristine=!1}deleteCharge(e){this.chargesDataSource.splice(this.chargesDataSource.indexOf(e),1),this.chargesDataSource=this.chargesDataSource.concat([]),this.pristine=!1}get savingsAccountCharges(){return{charges:this.chargesDataSource}}static{this.\u0275fac=function(s){return new(s||t)}}static{this.\u0275cmp=T({type:t,selectors:[["mifosx-savings-account-charges-step"]],inputs:{savingsAccountProductTemplate:"savingsAccountProductTemplate",savingsAccountTemplate:"savingsAccountTemplate",currencyCode:"currencyCode",activeClientMembers:"activeClientMembers"},features:[Te],decls:25,vars:18,consts:[["charge",""],[1,"layout-row-wrap","gap-2px","responsive-column"],[1,"flex-48"],[3,"value"],[1,"flex-48","align-center"],["type","button","mat-raised-button","","color","primary",3,"click","disabled"],["icon","plus",1,"m-r-10"],["mat-table","",1,"flex-98","mat-elevation-z1",3,"dataSource"],[1,"flex-98","layout-row","align-center","gap-2percent","margin-t","responsive-column"],["mat-raised-button","","matStepperPrevious",""],["icon","arrow-left",1,"m-r-10"],["mat-raised-button","","matStepperNext",""],["icon","arrow-right",1,"m-l-10"],["matColumnDef","name"],["mat-header-cell","",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","chargeCalculationType"],["matColumnDef","amount"],["matColumnDef","chargeTimeType"],["matColumnDef","date"],["matColumnDef","repaymentsEvery"],["matColumnDef","action"],["mat-header-row","",4,"matHeaderRowDef"],["mat-row","",4,"matRowDef","matRowDefColumns"],["mat-header-cell",""],["mat-cell",""],["mat-icon-button","","color","primary",3,"click"],["icon","pen"],["mat-icon-button","","color","primary"],["mat-icon-button","","color","warn",3,"click"],["icon","trash"],["mat-header-row",""],["mat-row",""]],template:function(s,o){if(s&1){let u=D();i(0,"div",1)(1,"mat-form-field",2)(2,"mat-label"),r(3),c(4,"translate"),a(),i(5,"mat-select",null,0),ut(7,yc,2,2,"mat-option",3,dt),c(9,"chargesFilter"),a()(),i(10,"div",4)(11,"button",5),b("click",function(){S(u);let B=w(6);return M(o.addCharge(B))}),C(12,"fa-icon",6),r(13),c(14,"translate"),a()(),v(15,Zc,24,3,"table",7),i(16,"div",8)(17,"button",9),C(18,"fa-icon",10),r(19),c(20,"translate"),a(),i(21,"button",11),r(22),c(23,"translate"),C(24,"fa-icon",12),a()()()}if(s&2){let u=w(6);n(3),p(l(4,6,"labels.inputs.Charge")),n(4),gt(hi(9,8,o.chargeData,o.chargesDataSource,o.currencyCode.value)),n(4),d("disabled",!u.value),n(2),f(" ",l(14,12,"labels.buttons.Add")," "),n(2),_(o.chargesDataSource.length>0?15:-1),n(4),f(" ",l(20,14,"labels.buttons.Previous")," "),n(3),f(" ",l(23,16,"labels.buttons.Next")," ")}},dependencies:[P,O,Z,X,wt,It,F,St,Lt,qt,Ut,Ht,Gt,zt,Oe,jt,Wt,$t,Qt,le,_e,Bt,y,Nt,Ii,me],styles:["table[_ngcontent-%COMP%]{width:100%}.mat-elevation-z1[_ngcontent-%COMP%]{margin:1em 0 1.5em}.margin-t[_ngcontent-%COMP%]{margin-top:1em}"]})}}return t})();var ts=()=>["../.."];function es(t,m){if(t&1&&(i(0,"span",6),C(1,"mifosx-external-identifier",14),a()),t&2){let e=h();n(),d("externalId",ft(e.savingsAccount.externalId))}}function ns(t,m){t&1&&(i(0,"span",6),r(1),c(2,"translate"),a()),t&2&&(n(),f(" ",l(2,1,"labels.inputs.Unassigned")," "))}function is(t,m){t&1&&(i(0,"th",22),r(1),c(2,"translate"),a()),t&2&&(n(),p(l(2,1,"labels.inputs.Client ID")))}function as(t,m){if(t&1&&(i(0,"td",23),r(1),a()),t&2){let e=m.$implicit;n(),p(e.id)}}function os(t,m){t&1&&(i(0,"th",22),r(1),c(2,"translate"),a()),t&2&&(n(),p(l(2,1,"labels.inputs.Client Name")))}function rs(t,m){if(t&1&&(i(0,"td",23),r(1),a()),t&2){let e=m.$implicit;n(),p(e.displayName)}}function cs(t,m){t&1&&C(0,"tr",24)}function ss(t,m){t&1&&C(0,"tr",25)}function ls(t,m){if(t&1&&(i(0,"h3",7),r(1),c(2,"translate"),a(),C(3,"mat-divider",3),i(4,"div",6)(5,"table",15,0),N(7,16),A(8,is,3,3,"th",17)(9,as,2,1,"td",18),R(),N(10,19),A(11,os,3,3,"th",17)(12,rs,2,1,"td",18),R(),A(13,cs,1,0,"tr",20)(14,ss,1,0,"tr",21),a()()),t&2){let e=h();n(),p(l(2,4,"labels.heading.Client Members")),n(4),d("dataSource",e.dataSource),n(8),d("matHeaderRowDef",e.membersDisplayedColumns),n(),d("matRowDefColumns",e.membersDisplayedColumns)}}function ms(t,m){if(t&1&&(i(0,"div",4)(1,"span",5),r(2),c(3,"translate"),a(),i(4,"span",6),r(5),c(6,"formatNumber"),a()()),t&2){let e=h();n(2),f("",l(3,2,"labels.inputs.Minimum Opening Balance"),":"),n(3),p(l(6,4,e.savingsAccount.minRequiredOpeningBalance))}}function ps(t,m){if(t&1&&(i(0,"div",4)(1,"span",5),r(2),c(3,"translate"),a(),i(4,"span",6),r(5),c(6,"find"),a()()),t&2){let e=h();n(2),f("",l(3,2,"labels.inputs.Lock-in Period"),":"),n(3),p(e.getCatalogTranslation(e.savingsAccount.lockinPeriodFrequency+" "+tt(6,4,e.savingsAccount.lockinPeriodFrequencyType,e.savingsAccountProductTemplate.lockinPeriodFrequencyTypeOptions,"id","value")))}}function ds(t,m){if(t&1&&(i(0,"div",4)(1,"span",5),r(2),c(3,"translate"),a(),i(4,"span",6),r(5),c(6,"formatNumber"),a()()),t&2){let e=h();n(2),f("",l(3,2,"labels.inputs.Minimum Overdraft Required for Interest Calculation"),":"),n(3),p(l(6,4,e.savingsAccount.minOverdraftForInterestCalculation))}}function us(t,m){if(t&1&&(i(0,"div",4)(1,"span",5),r(2),c(3,"translate"),a(),i(4,"span",6),r(5),c(6,"formatNumber"),a()()),t&2){let e=h();n(2),f("",l(3,2,"labels.inputs.Nominal Annual Interest for Overdraft"),":"),n(3),f("",l(6,4,e.savingsAccount.nominalAnnualInterestRateOverdraft)," %")}}function gs(t,m){if(t&1&&(i(0,"div",4)(1,"span",5),r(2),c(3,"translate"),a(),i(4,"span",6),r(5),c(6,"formatNumber"),a()()),t&2){let e=h();n(2),f("",l(3,2,"labels.inputs.Maximum Overdraft Amount Limit"),":"),n(3),p(l(6,4,e.savingsAccount.overdraftLimit))}}function fs(t,m){if(t&1&&(i(0,"div",4)(1,"span",5),r(2),c(3,"translate"),a(),i(4,"span",6),r(5),a()()),t&2){let e=h();n(2),f("",l(3,2,"labels.inputs.Minimum Balance"),":"),n(3),p(e.savingsAccount.minRequiredBalance)}}function Cs(t,m){t&1&&(i(0,"th",22),r(1),c(2,"translate"),a()),t&2&&(n(),p(l(2,1,"labels.inputs.Name")))}function vs(t,m){if(t&1&&(i(0,"td",23),r(1),a()),t&2){let e=m.$implicit;n(),f(" ",e.name+", "+e.currency.displaySymbol," ")}}function _s(t,m){t&1&&(i(0,"th",22),r(1),c(2,"translate"),a()),t&2&&(n(),p(l(2,1,"labels.inputs.Type")))}function hs(t,m){if(t&1&&(i(0,"td",23),r(1),c(2,"translateKey"),a()),t&2){let e=m.$implicit;n(),f(" ",Mt(2,1,e.chargeCalculationType.value,"catalogs")," ")}}function xs(t,m){t&1&&(i(0,"th",22),r(1),c(2,"translate"),a()),t&2&&(n(),p(l(2,1,"labels.inputs.Amount")))}function bs(t,m){if(t&1&&(i(0,"td",23),r(1),c(2,"formatNumber"),a()),t&2){let e=m.$implicit;n(),f(" ",l(2,1,e.amount)," ")}}function Ss(t,m){t&1&&(i(0,"th",22),r(1),c(2,"translate"),a()),t&2&&(n(),p(l(2,1,"labels.inputs.Date")))}function Ms(t,m){if(t&1&&(i(0,"span"),r(1),c(2,"dateFormat"),a()),t&2){let e=h().$implicit;n(),f(" ",l(2,1,e.dueDate)||"Unassigned"," ")}}function As(t,m){if(t&1&&(i(0,"span"),r(1),c(2,"dateFormat"),a()),t&2){let e=h().$implicit;n(),f(" ",l(2,1,e.feeOnMonthDay)||"Unassigned"," ")}}function Ts(t,m){t&1&&(i(0,"span"),r(1," N/A "),a())}function Ps(t,m){if(t&1&&(i(0,"td",23),v(1,Ms,3,3,"span"),v(2,As,3,3,"span"),v(3,Ts,2,0,"span"),a()),t&2){let e=m.$implicit;n(),_(e.chargeTimeType.value==="Specified due date"||e.chargeTimeType.value==="Weekly Fee"?1:-1),n(),_(e.chargeTimeType.value==="Monthly Fee"||e.chargeTimeType.value==="Annual Fee"?2:-1),n(),_(e.chargeTimeType.value==="Monthly Fee"||e.chargeTimeType.value==="Annual Fee"||e.chargeTimeType.value==="Specified due date"||e.chargeTimeType.value==="Weekly Fee"?-1:3)}}function Os(t,m){t&1&&(i(0,"th",22),r(1),c(2,"translate"),a()),t&2&&(n(),p(l(2,1,"labels.inputs.Repayments Every")))}function Ds(t,m){if(t&1&&(i(0,"td",23),r(1),a()),t&2){let e=m.$implicit;n(),f(" ",e.feeInterval||"Not Provided"," ")}}function ys(t,m){t&1&&(i(0,"th",22),r(1),c(2,"translate"),a()),t&2&&(n(),p(l(2,1,"labels.inputs.Collected On")))}function Is(t,m){if(t&1&&(i(0,"td",23),r(1),a()),t&2){let e=m.$implicit;n(),f(" ",e.chargeTimeType.value," ")}}function ws(t,m){t&1&&C(0,"tr",24)}function Es(t,m){t&1&&C(0,"tr",25)}function Fs(t,m){if(t&1&&(i(0,"div",8)(1,"h3",2),r(2),c(3,"translate"),a(),C(4,"mat-divider",3),i(5,"table",26),N(6,19),A(7,Cs,3,3,"th",17)(8,vs,2,1,"td",18),R(),N(9,27),A(10,_s,3,3,"th",17)(11,hs,3,4,"td",18),R(),N(12,28),A(13,xs,3,3,"th",17)(14,bs,3,3,"td",18),R(),N(15,29),A(16,Ss,3,3,"th",17)(17,Ps,4,3,"td",18),R(),N(18,30),A(19,Os,3,3,"th",17)(20,Ds,2,1,"td",18),R(),N(21,31),A(22,ys,3,3,"th",17)(23,Is,2,1,"td",18),R(),A(24,ws,1,0,"tr",20)(25,Es,1,0,"tr",21),a()()),t&2){let e=h();n(2),p(l(3,4,"labels.inputs.Charges")),n(3),d("dataSource",e.savingsAccount.charges),n(19),d("matHeaderRowDef",e.chargesDisplayedColumns),n(),d("matRowDefColumns",e.chargesDisplayedColumns)}}var be=(()=>{class t{constructor(){this.translateService=g(ge),this.chargesDisplayedColumns=["name","chargeCalculationType","amount","chargeTimeType","date","repaymentsEvery"],this.membersDisplayedColumns=["id","name"],this.submitEvent=new We}ngOnChanges(){this.activeClientMembers?.length>0&&(this.dataSource=new Jt(this.activeClientMembers.filter(e=>e.selected)))}getCatalogTranslation(e){return this.translateService.instant("labels.catalogs."+e)}static{this.\u0275fac=function(s){return new(s||t)}}static{this.\u0275cmp=T({type:t,selectors:[["mifosx-savings-account-preview-step"]],inputs:{savingsAccountProductTemplate:"savingsAccountProductTemplate",savingsAccountTemplate:"savingsAccountTemplate",savingsAccountTermsForm:"savingsAccountTermsForm",savingsAccount:"savingsAccount",activeClientMembers:"activeClientMembers"},outputs:{submitEvent:"submitEvent"},features:[Te],decls:123,vars:122,consts:[["membersTable",""],[1,"responsive-column"],[1,"mat-h3","flex-fill"],[1,"flex-fill"],[1,"flex-fill","layout-row"],[1,"flex-40"],[1,"flex-60"],[1,"mat-h3","margin-t","flex-fill"],[1,"layout-row-wrap","responsive-column","flex-fill"],[1,"layout-row","responsive-column","align-center","gap-2px","margin-t"],["mat-raised-button","","matStepperPrevious",""],["icon","arrow-left",1,"m-r-10"],["mat-raised-button","",3,"routerLink"],["mat-raised-button","","color","primary",3,"click"],[3,"externalId"],["mat-table","",3,"dataSource"],["matColumnDef","id"],["mat-header-cell","",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","name"],["mat-header-row","",4,"matHeaderRowDef"],["mat-row","",4,"matRowDef","matRowDefColumns"],["mat-header-cell",""],["mat-cell",""],["mat-header-row",""],["mat-row",""],["mat-table","",1,"flex-fill","mat-elevation-z1",3,"dataSource"],["matColumnDef","chargeCalculationType"],["matColumnDef","amount"],["matColumnDef","date"],["matColumnDef","repaymentsEvery"],["matColumnDef","chargeTimeType"]],template:function(s,o){s&1&&(i(0,"div",1)(1,"h3",2),r(2),c(3,"translate"),a(),C(4,"mat-divider",3),i(5,"div",4)(6,"span",5),r(7),c(8,"translate"),a(),i(9,"span",6),r(10),c(11,"find"),a()(),i(12,"div",4)(13,"span",5),r(14),c(15,"translate"),a(),i(16,"span",6),r(17),c(18,"dateFormat"),a()(),i(19,"div",4)(20,"span",5),r(21),c(22,"translate"),a(),v(23,es,2,2,"span",6),v(24,ns,3,3,"span",6),a(),i(25,"div",4)(26,"span",5),r(27),c(28,"translate"),a(),i(29,"span",6),r(30),c(31,"find"),a()(),v(32,ls,15,6),i(33,"h3",7),r(34),c(35,"translate"),a(),C(36,"mat-divider",3),i(37,"div",4)(38,"span",5),r(39),c(40,"translate"),a(),i(41,"span",6),r(42),a()(),i(43,"div",4)(44,"span",5),r(45),c(46,"translate"),a(),i(47,"span",6),r(48),a()(),i(49,"div",4)(50,"span",5),r(51),c(52,"translate"),a(),i(53,"span",6),r(54),c(55,"formatNumber"),a()(),i(56,"div",4)(57,"span",5),r(58),c(59,"translate"),a(),i(60,"span",6),r(61),c(62,"find"),a()(),i(63,"div",4)(64,"span",5),r(65),c(66,"translate"),a(),i(67,"span",6),r(68),c(69,"find"),a()(),i(70,"div",4)(71,"span",5),r(72),c(73,"translate"),a(),i(74,"span",6),r(75),c(76,"find"),a()(),i(77,"div",4)(78,"span",5),r(79),c(80,"translate"),a(),i(81,"span",6),r(82),c(83,"find"),a()(),v(84,ms,7,6,"div",4),i(85,"div",4)(86,"span",5),r(87),c(88,"translate"),a(),i(89,"span",6),r(90),c(91,"yesNo"),a()(),v(92,ps,7,9,"div",4),i(93,"div",4)(94,"span",5),r(95),c(96,"translate"),a(),i(97,"span",6),r(98),c(99,"yesNo"),a()(),v(100,ds,7,6,"div",4),v(101,us,7,6,"div",4),v(102,gs,7,6,"div",4),i(103,"div",4)(104,"span",5),r(105),c(106,"translate"),a(),i(107,"span",6),r(108),c(109,"yesNo"),a()(),v(110,fs,6,4,"div",4),v(111,Fs,26,6,"div",8),a(),i(112,"div",9)(113,"button",10),C(114,"fa-icon",11),r(115),c(116,"translate"),a(),i(117,"button",12),r(118),c(119,"translate"),a(),i(120,"button",13),b("click",function(){return o.submitEvent.emit()}),r(121),c(122,"translate"),a()()),s&2&&(n(2),p(l(3,43,"labels.heading.Details")),n(5),p(l(8,45,"labels.inputs.Product")),n(3),p(tt(11,47,o.savingsAccount.productId,o.savingsAccountTemplate.productOptions,"id","name")),n(4),p(l(15,52,"labels.inputs.Submitted On")),n(3),p(l(18,54,o.savingsAccount.submittedOnDate)),n(4),p(l(22,56,"labels.inputs.External Id")),n(2),_(o.savingsAccount.externalId?23:-1),n(),_(o.savingsAccount.externalId?-1:24),n(3),p(l(28,58,"labels.inputs.Field Officer")),n(3),p(tt(31,60,o.savingsAccount.fieldOfficerId,o.savingsAccountProductTemplate.fieldOfficerOptions,"id","displayName")),n(2),_(o.activeClientMembers?32:-1),n(2),p(l(35,65,"labels.heading.Terms")),n(5),p(l(40,67,"labels.inputs.Currency")),n(3),p(o.savingsAccountTermsForm.get("currencyCode").value),n(3),p(l(46,69,"labels.inputs.Decimal Places")),n(3),p(o.savingsAccountTermsForm.get("decimal").value),n(3),f("",l(52,71,"labels.inputs.Nominal Annual Interest"),":"),n(3),f("",l(55,73,o.savingsAccount.nominalAnnualInterestRate)," %"),n(4),f("",l(59,75,"labels.inputs.Interest Compounding Period"),":"),n(3),p(o.getCatalogTranslation(tt(62,77,o.savingsAccount.interestCompoundingPeriodType,o.savingsAccountProductTemplate.interestCompoundingPeriodTypeOptions,"id","value"))),n(4),f("",l(66,82,"labels.inputs.Interest Posting Period"),":"),n(3),p(o.getCatalogTranslation(tt(69,84,o.savingsAccount.interestPostingPeriodType,o.savingsAccountProductTemplate.interestPostingPeriodTypeOptions,"id","value"))),n(4),f("",l(73,89,"labels.inputs.Interest Calculated using"),":"),n(3),p(o.getCatalogTranslation(tt(76,91,o.savingsAccount.interestCalculationType,o.savingsAccountProductTemplate.interestCalculationTypeOptions,"id","value"))),n(4),f("",l(80,96,"labels.inputs.Days in Year"),":"),n(3),p(o.getCatalogTranslation(tt(83,98,o.savingsAccount.interestCalculationDaysInYearType,o.savingsAccountProductTemplate.interestCalculationDaysInYearTypeOptions,"id","value"))),n(2),_(o.savingsAccount.minRequiredOpeningBalance?84:-1),n(3),f("",l(88,103,"labels.inputs.Apply Withdrawal Fee for Transfers"),":"),n(3),p(l(91,105,o.savingsAccount.withdrawalFeeForTransfers)),n(2),_(o.savingsAccount.lockinPeriodFrequency?92:-1),n(3),f("",l(96,107,"labels.inputs.Is Overdraft Allowed"),":"),n(3),p(l(99,109,o.savingsAccount.allowOverdraft)),n(2),_(o.savingsAccount.minOverdraftForInterestCalculation?100:-1),n(),_(o.savingsAccount.nominalAnnualInterestRateOverdraft?101:-1),n(),_(o.savingsAccount.overdraftLimit?102:-1),n(3),f("",l(106,111,"labels.inputs.Enforce Minimum Balance"),":"),n(3),p(l(109,113,o.savingsAccount.enforceMinRequiredBalance)),n(2),_(o.savingsAccount.minRequiredBalance?110:-1),n(),_(o.savingsAccount.charges.length?111:-1),n(4),f(" ",l(116,115,"labels.buttons.Previous")," "),n(2),d("routerLink",k(121,ts)),n(),f(" ",l(119,117,"labels.buttons.Cancel")," "),n(3),f(" ",l(122,119,"labels.buttons.Submit")," "))},dependencies:[P,O,q,F,tn,Be,Lt,qt,Ut,Ht,Gt,zt,jt,Wt,$t,Qt,le,St,Bt,y,Nt,wi,me,mn],styles:["table[_ngcontent-%COMP%]{width:100%}.mat-elevation-z1[_ngcontent-%COMP%]{margin:1em 0 1.5em}h2[_ngcontent-%COMP%], h3[_ngcontent-%COMP%], h4[_ngcontent-%COMP%]{margin:0;font-weight:500}span[_ngcontent-%COMP%]{margin:.5em 0}mat-divider[_ngcontent-%COMP%]{margin:0 0 .5em}.margin-t[_ngcontent-%COMP%]{margin-top:1em}"]})}}return t})();function ks(t,m){t&1&&C(0,"fa-icon",14)}function Bs(t,m){t&1&&C(0,"fa-icon",14)}function Ns(t,m){t&1&&C(0,"fa-icon",15)}function Rs(t,m){t&1&&C(0,"fa-icon",16)}function Vs(t,m){t&1&&C(0,"fa-icon",17)}function Ls(t,m){t&1&&(r(0),c(1,"translate")),t&2&&p(l(1,1,"labels.inputs.DETAILS"))}function Gs(t,m){t&1&&(r(0),c(1,"translate")),t&2&&p(l(1,1,"labels.inputs.TERMS"))}function Us(t,m){t&1&&(r(0),c(1,"translate")),t&2&&p(l(1,1,"labels.inputs.CHARGES"))}function qs(t,m){t&1&&(r(0),c(1,"translate")),t&2&&p(l(1,1,"labels.inputs.PREVIEW"))}function Hs(t,m){if(t&1){let e=D();i(0,"mat-step",13),A(1,qs,2,3,"ng-template",9),i(2,"mifosx-savings-account-preview-step",18),b("submitEvent",function(){S(e);let o=h();return M(o.submit())}),a()()}if(t&2){let e=h();n(2),d("savingsAccountProductTemplate",e.savingsAccountProductTemplate)("savingsAccountTemplate",e.savingsAccountTemplate)("savingsAccountTermsForm",e.savingsAccountTermsForm)("savingsAccount",e.savingsAccount)}}var Nn=(()=>{class t{constructor(){this.route=g(E),this.router=g(z),this.dateUtils=g(j),this.savingsService=g(I),this.settingsService=g(U),this.route.data.subscribe(e=>{this.savingsAccountTemplate=e.savingsAccountTemplate})}setTemplate(e){this.savingsAccountProductTemplate=e}get savingsAccountDetailsForm(){return this.savingsAccountDetailsStep.savingsAccountDetailsForm}get savingsAccountTermsForm(){return this.savingsAccountTermsStep.savingsAccountTermsForm}get savingsAccountFormValid(){return this.savingsAccountDetailsForm.valid&&this.savingsAccountTermsForm.valid}get savingsAccount(){return G(G(G({},this.savingsAccountDetailsStep.savingsAccountDetails),this.savingsAccountTermsStep.savingsAccountTerms),this.savingsAccountChargesStep.savingsAccountCharges)}submit(){let e=this.settingsService.language.code,s=this.settingsService.dateFormat,u=Q(G({},this.savingsAccount),{charges:this.savingsAccount.charges.map(x=>({chargeId:x.id,amount:x.amount,dueDate:x.dueDate,feeOnMonthDay:x.feeOnMonthDay,feeInterval:x.feeInterval})),submittedOnDate:this.dateUtils.formatDate(this.savingsAccount.submittedOnDate,s),dateFormat:s,monthDayFormat:"dd MMMM",locale:e});this.savingsAccountTemplate.clientId?u.clientId=this.savingsAccountTemplate.clientId:u.groupId=this.savingsAccountTemplate.groupId,this.savingsService.createSavingsAccount(u).subscribe(x=>{this.router.navigate(["../",x.resourceId],{relativeTo:this.route})})}static{this.\u0275fac=function(s){return new(s||t)}}static{this.\u0275cmp=T({type:t,selectors:[["mifosx-create-savings-account"]],viewQuery:function(s,o){if(s&1&&(Pt(oe,7),Pt(re,7),Pt(ce,7)),s&2){let u;Ot(u=Dt())&&(o.savingsAccountDetailsStep=u.first),Ot(u=Dt())&&(o.savingsAccountTermsStep=u.first),Ot(u=Dt())&&(o.savingsAccountChargesStep=u.first)}},decls:18,vars:9,consts:[["savingProductStepper",""],[1,"container"],["orientation","vertical","labelPosition","bottom",1,"mat-elevation-z8",3,"linear"],["matStepperIcon","number"],["matStepperIcon","edit"],["matStepperIcon","done"],["matStepperIcon","error"],["matStepperIcon","preview"],[3,"stepControl"],["matStepLabel",""],[3,"savingsAccountProductTemplate","savingsAccountTemplate"],[3,"savingsAccountProductTemplate"],[3,"savingsAccountProductTemplate","savingsAccountTemplate","currencyCode"],["completed",""],["icon","pencil-alt","size","sm"],["icon","check","size","sm"],["icon","exclamation-triangle","size","lg"],["icon","eye","size","sm"],[3,"submitEvent","savingsAccountProductTemplate","savingsAccountTemplate","savingsAccountTermsForm","savingsAccount"]],template:function(s,o){if(s&1){let u=D();i(0,"div",1)(1,"mat-stepper",2,0),A(3,ks,1,0,"ng-template",3)(4,Bs,1,0,"ng-template",4)(5,Ns,1,0,"ng-template",5)(6,Rs,1,0,"ng-template",6)(7,Vs,1,0,"ng-template",7),i(8,"mat-step",8),A(9,Ls,2,3,"ng-template",9),i(10,"mifosx-savings-account-details-step",10),b("savingsAccountProductTemplate",function(B){return S(u),M(o.setTemplate(B))}),a()(),i(11,"mat-step",8),A(12,Gs,2,3,"ng-template",9),C(13,"mifosx-savings-account-terms-step",11),a(),i(14,"mat-step"),A(15,Us,2,3,"ng-template",9),C(16,"mifosx-savings-account-charges-step",12),a(),v(17,Hs,3,4,"mat-step",13),a()()}s&2&&(n(),d("linear",!1),n(7),d("stepControl",o.savingsAccountDetailsForm),n(2),d("savingsAccountTemplate",o.savingsAccountTemplate),n(),d("stepControl",o.savingsAccountTermsForm),n(2),d("savingsAccountProductTemplate",o.savingsAccountProductTemplate),n(3),d("savingsAccountProductTemplate",o.savingsAccountProductTemplate)("savingsAccountTemplate",o.savingsAccountTemplate)("currencyCode",o.savingsAccountTermsForm.get("currencyCode")),n(),_(o.savingsAccountFormValid?17:-1))},dependencies:[P,O,ke,Ee,St,Fe,we,oe,re,ce,be,y],encapsulation:2})}}return t})();function zs(t,m){t&1&&C(0,"fa-icon",13)}function js(t,m){t&1&&C(0,"fa-icon",13)}function $s(t,m){t&1&&C(0,"fa-icon",14)}function Ws(t,m){t&1&&C(0,"fa-icon",15)}function Qs(t,m){t&1&&C(0,"fa-icon",16)}function Ks(t,m){t&1&&(r(0),c(1,"translate")),t&2&&p(l(1,1,"labels.inputs.DETAILS"))}function Ys(t,m){t&1&&(r(0),c(1,"translate")),t&2&&p(l(1,1,"labels.inputs.TERMS"))}function Js(t,m){t&1&&(r(0),c(1,"translate")),t&2&&p(l(1,1,"labels.inputs.CHARGES"))}function Xs(t,m){t&1&&(r(0),c(1,"translate")),t&2&&p(l(1,1,"labels.inputs.PREVIEW"))}function Zs(t,m){if(t&1){let e=D();i(0,"mat-step",12),A(1,Xs,2,3,"ng-template",9),i(2,"mifosx-savings-account-preview-step",17),b("submitEvent",function(){S(e);let o=h();return M(o.submit())}),a()()}if(t&2){let e=h();n(2),d("savingsAccountProductTemplate",e.savingsAccountProductTemplate)("savingsAccountTemplate",e.savingsAccountAndTemplate)("savingsAccountTermsForm",e.savingsAccountTermsForm)("savingsAccount",e.savingsAccount)}}var Rn=(()=>{class t{constructor(){this.route=g(E),this.router=g(z),this.dateUtils=g(j),this.savingsService=g(I),this.settingsService=g(U),this.route.data.subscribe(e=>{this.savingsAccountAndTemplate=e.savingsAccountAndTemplate})}setTemplate(e){this.savingsAccountProductTemplate=e}get savingsAccountDetailsForm(){return this.savingsAccountDetailsStep.savingsAccountDetailsForm}get savingsAccountTermsForm(){return this.savingsAccountTermsStep.savingsAccountTermsForm}get savingsAccountFormValidAndNotPristine(){return this.savingsAccountDetailsForm.valid&&this.savingsAccountTermsForm.valid&&(!this.savingsAccountDetailsForm.pristine||!this.savingsAccountTermsForm.pristine||!this.savingsAccountChargesStep.pristine)}get savingsAccount(){return G(G(G({},this.savingsAccountDetailsStep.savingsAccountDetails),this.savingsAccountTermsStep.savingsAccountTerms),this.savingsAccountChargesStep.savingsAccountCharges)}submit(){let e=this.settingsService.language.code,s=this.settingsService.dateFormat,u=Q(G({},this.savingsAccount),{charges:this.savingsAccount.charges.map(x=>({chargeId:x.id,amount:x.amount,dueDate:this.dateUtils.formatDate(x.dueDate,s),feeOnMonthDay:this.dateUtils.formatDate(x.feeOnMonthDay,s),feeInterval:x.feeInterval})),submittedOnDate:this.dateUtils.formatDate(this.savingsAccount.submittedOnDate,s),dateFormat:s,monthDayFormat:"dd MMMM",locale:e});this.savingsAccountAndTemplate.clientId?u.clientId=this.savingsAccountAndTemplate.clientId:u.groupId=this.savingsAccountAndTemplate.groupId,this.savingsService.updateSavingsAccount(this.savingsAccountAndTemplate.id,u).subscribe(x=>{this.router.navigate(["../"],{relativeTo:this.route})})}static{this.\u0275fac=function(s){return new(s||t)}}static{this.\u0275cmp=T({type:t,selectors:[["mifosx-edit-savings-account"]],viewQuery:function(s,o){if(s&1&&(Pt(oe,7),Pt(re,7),Pt(ce,7)),s&2){let u;Ot(u=Dt())&&(o.savingsAccountDetailsStep=u.first),Ot(u=Dt())&&(o.savingsAccountTermsStep=u.first),Ot(u=Dt())&&(o.savingsAccountChargesStep=u.first)}},decls:18,vars:10,consts:[["savingProductStepper",""],[1,"container"],["orientation","vertical","labelPosition","bottom",1,"mat-elevation-z8",3,"linear"],["matStepperIcon","number"],["matStepperIcon","edit"],["matStepperIcon","done"],["matStepperIcon","error"],["matStepperIcon","preview"],[3,"stepControl"],["matStepLabel",""],[3,"savingsAccountProductTemplate","savingsAccountTemplate"],[3,"savingsAccountProductTemplate","savingsAccountTemplate","currencyCode"],["completed",""],["icon","pencil-alt","size","sm"],["icon","check","size","sm"],["icon","exclamation-triangle","size","lg"],["icon","eye","size","sm"],[3,"submitEvent","savingsAccountProductTemplate","savingsAccountTemplate","savingsAccountTermsForm","savingsAccount"]],template:function(s,o){if(s&1){let u=D();i(0,"div",1)(1,"mat-stepper",2,0),A(3,zs,1,0,"ng-template",3)(4,js,1,0,"ng-template",4)(5,$s,1,0,"ng-template",5)(6,Ws,1,0,"ng-template",6)(7,Qs,1,0,"ng-template",7),i(8,"mat-step",8),A(9,Ks,2,3,"ng-template",9),i(10,"mifosx-savings-account-details-step",10),b("savingsAccountProductTemplate",function(B){return S(u),M(o.setTemplate(B))}),a()(),i(11,"mat-step",8),A(12,Ys,2,3,"ng-template",9),C(13,"mifosx-savings-account-terms-step",10),a(),i(14,"mat-step"),A(15,Js,2,3,"ng-template",9),C(16,"mifosx-savings-account-charges-step",11),a(),v(17,Zs,3,4,"mat-step",12),a()()}s&2&&(n(),d("linear",!1),n(7),d("stepControl",o.savingsAccountDetailsForm),n(2),d("savingsAccountTemplate",o.savingsAccountAndTemplate),n(),d("stepControl",o.savingsAccountTermsForm),n(2),d("savingsAccountProductTemplate",o.savingsAccountProductTemplate)("savingsAccountTemplate",o.savingsAccountAndTemplate),n(3),d("savingsAccountProductTemplate",o.savingsAccountProductTemplate)("savingsAccountTemplate",o.savingsAccountAndTemplate)("currencyCode",o.savingsAccountTermsForm.get("currencyCode")),n(),_(o.savingsAccountFormValidAndNotPristine?17:-1))},dependencies:[P,O,ke,Ee,St,Fe,we,oe,re,ce,be,y],encapsulation:2})}}return t})();var tl=()=>["./general"],el=t=>["./datatables",t];function nl(t,m){if(t&1&&(i(0,"a",5,2),r(2),a()),t&2){let e=w(1),s=h().$implicit;d("routerLink",kt(3,el,s.registeredTableName))("active",e.isActive),n(2),f(" ",s.registeredTableName," ")}}function il(t,m){if(t&1&&A(0,nl,3,5,"a",6),t&2){let e=m.$implicit;d("mifosxHasPermission","READ_"+e.registeredTableName)}}var Vn=(()=>{class t{constructor(){this.route=g(E),this.dialog=g(yt),this.route.data.subscribe(e=>{this.accountId=this.route.snapshot.params.savingAccountId,this.entityDatatables=e.transactionDatatables})}static{this.\u0275fac=function(s){return new(s||t)}}static{this.\u0275cmp=T({type:t,selectors:[["mifosx-view-transaction"]],decls:11,vars:7,consts:[["general","routerLinkActive"],["tabPanel",""],["datatable","routerLinkActive"],[1,"container"],["mat-tab-nav-bar","",1,"navigation-tabs",3,"tabPanel"],["mat-tab-link","","routerLinkActive","",3,"routerLink","active"],["mat-tab-link","","routerLinkActive","",3,"routerLink","active",4,"mifosxHasPermission"]],template:function(s,o){if(s&1&&(i(0,"div",3)(1,"nav",4)(2,"a",5,0),r(4),c(5,"translate"),a(),ut(6,il,1,1,"a",5,dt),a(),i(8,"mat-tab-nav-panel",null,1),C(10,"router-outlet"),a()()),s&2){let u=w(3),x=w(9);n(),d("tabPanel",x),n(),d("routerLink",k(6,tl))("active",u.isActive),n(2),f(" ",l(5,4,"labels.heading.General")," "),n(2),gt(o.entityDatatables)}},dependencies:[P,O,q,Rt,rn,cn,Je,sn,Ye,y],styles:[".container[_ngcontent-%COMP%]{max-width:37rem}.container[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] div[_ngcontent-%COMP%]{margin:1rem 0;word-wrap:break-word}"]})}}return t})();var al=()=>["../"];function ol(t,m){if(t&1){let e=D();i(0,"button",9),b("click",function(){S(e);let o=h(2);return M(o.payCharge())}),C(1,"fa-icon",10),r(2," Pay "),a()}}function rl(t,m){if(t&1){let e=D();i(0,"button",11),b("click",function(){S(e);let o=h(2);return M(o.waiveCharge())}),C(1,"fa-icon",12),r(2," Waive "),a()}}function cl(t,m){if(t&1){let e=D();i(0,"button",14),b("click",function(){S(e);let o=h(3);return M(o.inactivateCharge())}),C(1,"fa-icon",15),r(2," Inactivate "),a()}}function sl(t,m){t&1&&(i(0,"span"),A(1,cl,3,0,"button",13),a()),t&2&&(n(),d("mifosxHasPermission","INACTIVATE_SAVINGSACCOUNTCHARGE"))}function ll(t,m){if(t&1&&(i(0,"div",0),A(1,ol,3,0,"button",7)(2,rl,3,0,"button",8),v(3,sl,2,1,"span"),a()),t&2){let e=h();n(),d("mifosxHasPermission","PAY_SAVINGSACCOUNTCHARGE"),n(),d("mifosxHasPermission","WAIVE_SAVINGSACCOUNTCHARGE"),n(),_(e.isRecurringCharge()?3:-1)}}function ml(t,m){if(t&1){let e=D();i(0,"button",11),b("click",function(){S(e);let o=h(2);return M(o.editCharge())}),C(1,"fa-icon",16),r(2," Edit "),a()}}function pl(t,m){if(t&1){let e=D();i(0,"button",14),b("click",function(){S(e);let o=h(2);return M(o.deleteCharge())}),C(1,"fa-icon",15),r(2," Delete "),a()}}function dl(t,m){t&1&&(i(0,"div",0),A(1,ml,3,0,"button",8)(2,pl,3,0,"button",13),a()),t&2&&(n(),d("mifosxHasPermission","UPDATE_SAVINGSACCOUNTCHARGE"),n(),d("mifosxHasPermission","DELETE_SAVINGSACCOUNTCHARGE"))}var Ln=(()=>{class t{constructor(){this.savingsService=g(I),this.route=g(E),this.dateUtils=g(j),this.router=g(z),this.dialog=g(yt),this.settingsService=g(U),this.route.data.subscribe(e=>{this.chargeData=e.savingsAccountCharge}),this.route.data.subscribe(e=>{this.savingsAccountData=e.savingsAccountData})}payCharge(){let e=[new pe({controlName:"amount",label:"Amount",value:"",type:"number",required:!0}),new Ne({controlName:"dueDate",label:"Payment Date",value:"",type:"date",required:!0})],s={title:"Pay Charge",layout:{addButtonText:"Confirm"},formfields:e};this.dialog.open(se,{data:s}).afterClosed().subscribe(u=>{if(u.data){let x=this.settingsService.language.code,B=this.settingsService.dateFormat,Yt=Q(G({},u.data.value),{dueDate:this.dateUtils.formatDate(u.data.value.dueDate,B),dateFormat:B,locale:x});this.savingsService.executeSavingsAccountChargesCommand(this.chargeData.accountId,"pay",Yt,this.chargeData.id).subscribe(()=>{this.reload()})}})}waiveCharge(){this.dialog.open(Le,{data:{id:this.chargeData.id}}).afterClosed().subscribe(s=>{s.confirm&&this.savingsService.executeSavingsAccountChargesCommand(this.chargeData.accountId,"waive",{},this.chargeData.id).subscribe(()=>{this.reload()})})}inactivateCharge(){this.dialog.open(Ge,{data:{id:this.chargeData.id}}).afterClosed().subscribe(s=>{s.confirm&&this.savingsService.executeSavingsAccountChargesCommand(this.chargeData.accountId,"inactivate",{},this.chargeData.id).subscribe(()=>{this.reload()})})}editCharge(){let e=[new pe({controlName:"amount",label:"Amount",value:this.chargeData.amount||this.chargeData.amountOrPercentage,type:"number",required:!0})],s={title:"Edit Charge",layout:{addButtonText:"Confirm"},formfields:e};this.dialog.open(se,{data:s}).afterClosed().subscribe(u=>{if(u.data){let x=this.settingsService.language.code,B=this.settingsService.dateFormat,Yt=Q(G({},u.data.value),{dateFormat:B,locale:x});this.savingsService.editSavingsAccountCharge(this.chargeData.accountId,Yt,this.chargeData.id).subscribe(()=>{this.reload()})}})}deleteCharge(){this.dialog.open(ve,{data:{deleteContext:`charge id:${this.chargeData.id}`}}).afterClosed().subscribe(s=>{s.delete&&this.savingsService.deleteSavingsAccountCharge(this.chargeData.accountId,this.chargeData.id).subscribe(()=>{this.reload()})})}isRecurringCharge(){let e=this.chargeData.chargeTimeType.value;return e==="Monthly Fee"||e==="Annual Fee"||e==="Weekly Fee"}reload(){let e=this.router.url.replace(`/${this.chargeData.id}`,""),s=this.router.url.slice(0,this.router.url.indexOf("savings-accounts")+16);this.router.navigateByUrl(s,{skipLocationChange:!0}).then(()=>this.router.navigate([e]))}static{this.\u0275fac=function(s){return new(s||t)}}static{this.\u0275cmp=T({type:t,selectors:[["mifosx-view-charge"]],decls:68,vars:66,consts:[[1,"layout-row","align-end","gap-2percent","layout-xs-column","container","m-b-20"],[1,"container"],[1,"layout-row-wrap"],[1,"flex-50","mat-body-strong"],[1,"flex-50"],[1,"layout-row","layout-align-center","gap-2percent","column-on-mobile"],["type","button","mat-raised-button","","color","primary",3,"routerLink"],["mat-raised-button","","color","accent",3,"click",4,"mifosxHasPermission"],["mat-raised-button","","color","primary",3,"click",4,"mifosxHasPermission"],["mat-raised-button","","color","accent",3,"click"],["icon","dollar-sign",1,"m-r-10"],["mat-raised-button","","color","primary",3,"click"],["icon","flag",1,"m-r-10"],["mat-raised-button","","color","warn",3,"click",4,"mifosxHasPermission"],["mat-raised-button","","color","warn",3,"click"],["icon","trash",1,"m-r-10"],["icon","edit",1,"m-r-10"]],template:function(s,o){s&1&&(v(0,ll,4,3,"div",0),v(1,dl,3,2,"div",0),i(2,"div",1)(3,"mat-card")(4,"mat-card-content")(5,"div",2)(6,"div",3),r(7),c(8,"translate"),a(),i(9,"div",4),r(10),a(),i(11,"div",3),r(12),c(13,"translate"),a(),i(14,"div",4),r(15),c(16,"translateKey"),a(),i(17,"div",3),r(18),c(19,"translate"),a(),i(20,"div",4),r(21),a(),i(22,"div",3),r(23),c(24,"translate"),a(),i(25,"div",4),r(26),c(27,"translateKey"),a(),i(28,"div",3),r(29),c(30,"translate"),a(),i(31,"div",4),r(32),c(33,"dateFormat"),a(),i(34,"div",3),r(35),c(36,"translate"),a(),i(37,"div",4),r(38),c(39,"translateKey"),a(),i(40,"div",3),r(41),c(42,"translate"),a(),i(43,"div",4),r(44),c(45,"formatNumber"),a(),i(46,"div",3),r(47),c(48,"translate"),a(),i(49,"div",4),r(50),c(51,"formatNumber"),a(),i(52,"div",3),r(53),c(54,"translate"),a(),i(55,"div",4),r(56),c(57,"formatNumber"),a(),i(58,"div",3),r(59),c(60,"translate"),a(),i(61,"div",4),r(62),c(63,"formatNumber"),a()(),i(64,"div",5)(65,"button",6),r(66),c(67,"translate"),a()()()()()),s&2&&(_(o.savingsAccountData.status.value==="Active"&&o.chargeData.amountOutstanding!==0?0:-1),n(),_(o.savingsAccountData.status.value==="Submitted and pending approval"?1:-1),n(6),f(" ",l(8,24,"labels.inputs.Name")," "),n(3),f(" ",o.chargeData.name," "),n(2),f(" ",l(13,26,"labels.inputs.Charge Type")," "),n(3),f(" ",o.chargeData.penalty?"Penalty":Mt(16,28,"Fee","catalogs")," "),n(3),f(" ",l(19,31,"labels.inputs.Currency")," "),n(3),f(" ",o.chargeData.currency.displayLabel," "),n(2),f(" ",l(24,33,"labels.inputs.Payment due at")," "),n(3),f(" ",Mt(27,35,o.chargeData.chargeTimeType.value,"catalogs")," "),n(3),f(" ",l(30,38,"labels.inputs.Payment due as of")," "),n(3),f(" ",l(33,40,o.chargeData.dueDate)," "),n(3),f(" ",l(36,42,"labels.inputs.Calculation Type")," "),n(3),f(" ",Mt(39,44,o.chargeData.chargeCalculationType.value,"catalogs")," "),n(3),f(" ",l(42,47,"labels.inputs.Due")," "),n(3),f(" ",l(45,49,o.chargeData.amount)," "),n(3),f(" ",l(48,51,"labels.inputs.Paid")," "),n(3),f(" ",l(51,53,o.chargeData.amountPaid)," "),n(3),f(" ",l(54,55,"labels.inputs.Waived")," "),n(3),f(" ",l(57,57,o.chargeData.amountWaived)," "),n(3),f(" ",l(60,59,"labels.inputs.Outstanding")," "),n(3),f(" ",l(63,61,o.chargeData.amountOutstanding)," "),n(3),d("routerLink",k(65,al)),n(),f(" ",l(67,63,"labels.buttons.Back")," "))},dependencies:[P,O,q,J,ct,F,Rt,St,Bt,y,Nt,me],styles:[".container[_ngcontent-%COMP%]{max-width:37rem}.container[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] div[_ngcontent-%COMP%]{margin:1rem 0;word-wrap:break-word}"]})}}return t})();var ul=()=>["../../"],Gn=(()=>{class t{constructor(){this.sanitizer=g(Ke),this.route=g(E),this.route.data.subscribe(e=>{this.transactionRecieptData=e.savingsTransactionReciept})}ngOnInit(){let e=this.transactionRecieptData.headers.get("Content-Type"),s=new Blob([this.transactionRecieptData.body],{type:e}),o=URL.createObjectURL(s);this.pentahoUrl=this.sanitizer.bypassSecurityTrustResourceUrl(o)}static{this.\u0275fac=function(s){return new(s||t)}}static{this.\u0275cmp=T({type:t,selectors:[["mifosx-view-reciept"]],decls:6,vars:3,consts:[[1,"container"],[1,"back-button"],["type","button","color","primary","mat-raised-button","",3,"routerLink"],["icon","arrow-left",1,"m-r-10"],["frameborder","0","width","100%","height","600px;",3,"src"]],template:function(s,o){s&1&&(i(0,"mat-card",0)(1,"div",1)(2,"button",2),C(3,"fa-icon",3),r(4,"Back "),a()(),C(5,"iframe",4),a()),s&2&&(n(2),d("routerLink",k(2,ul)),n(3),d("src",o.pentahoUrl,$e))},dependencies:[P,O,q,J,F,St],styles:[".container[_ngcontent-%COMP%]{max-width:50rem}.container[_ngcontent-%COMP%] .back-button[_ngcontent-%COMP%]{max-height:2%;margin-bottom:2%}"]})}}return t})();var gl=()=>["../"];function fl(t,m){if(t&1&&C(0,"iframe",12),t&2){let e=h();d("src",e.pentahoUrl,$e)}}var Un=(()=>{class t{constructor(){this.sanitizer=g(Ke),this.reportsService=g(dn),this.formBuilder=g(rt),this.dateUtils=g(j),this.route=g(E),this.settingsService=g(U),this.minDate=new Date(2e3,0,1),this.maxDate=new Date,this.hideOutput=!0,this.route.parent.parent.data.subscribe(e=>{this.savingsAccountId=e.savingsAccountData.accountNo})}ngOnInit(){this.maxDate=this.settingsService.businessDate,this.createTransactionsReportForm()}createTransactionsReportForm(){this.transactionsReportForm=this.formBuilder.group({fromDate:["",H.required],toDate:["",H.required]})}generate(){let e={"output-type":"PDF",R_startDate:this.dateUtils.formatDate(this.transactionsReportForm.value.fromDate,this.settingsService.dateFormat),R_endDate:this.dateUtils.formatDate(this.transactionsReportForm.value.toDate,this.settingsService.dateFormat),R_savingsAccountId:this.savingsAccountId};this.reportsService.getPentahoRunReportData("Client Saving Transactions",e,"default",this.settingsService.language.code,this.settingsService.dateFormat).subscribe(s=>{let o=s.headers.get("Content-Type"),u=new Blob([s.body],{type:o}),x=URL.createObjectURL(u);this.pentahoUrl=this.sanitizer.bypassSecurityTrustResourceUrl(x),this.hideOutput=!1})}static{this.\u0275fac=function(s){return new(s||t)}}static{this.\u0275cmp=T({type:t,selectors:[["mifosx-export-transactions"]],decls:41,vars:43,consts:[["fromDatePicker",""],["toDatePicker",""],[1,"m-t-20","layout-column",3,"ngSubmit","formGroup"],[1,"layout-row","layout-align-center","gap-3percent"],[1,"flex-30",3,"click"],["matInput","","required","","formControlName","fromDate",3,"min","max","matDatepicker"],["matSuffix","",3,"for"],["matInput","","required","","formControlName","toDate",3,"min","max","matDatepicker"],[1,"generate-button","layout-row","layout-xs-column","layout-align-center","gap-5percent"],["type","button","mat-raised-button","",3,"routerLink"],["mat-raised-button","","color","primary",3,"disabled"],["icon","cogs",1,"m-r-10"],["frameborder","0","width","100%","height","750px;",3,"src"]],template:function(s,o){if(s&1){let u=D();i(0,"form",2),b("ngSubmit",function(){return S(u),M(o.generate())}),i(1,"div",3)(2,"mat-form-field",4),b("click",function(){S(u);let B=w(9);return M(B.open())}),i(3,"mat-label"),r(4),c(5,"translate"),a(),C(6,"input",5)(7,"mat-datepicker-toggle",6)(8,"mat-datepicker",null,0),i(10,"mat-error"),r(11),c(12,"translate"),c(13,"translate"),i(14,"strong"),r(15),c(16,"translate"),a()()(),i(17,"mat-form-field",4),b("click",function(){S(u);let B=w(24);return M(B.open())}),i(18,"mat-label"),r(19),c(20,"translate"),a(),C(21,"input",7)(22,"mat-datepicker-toggle",6)(23,"mat-datepicker",null,1),i(25,"mat-error"),r(26),c(27,"translate"),c(28,"translate"),i(29,"strong"),r(30),c(31,"translate"),a()()()(),i(32,"div",8)(33,"button",9),r(34),c(35,"translate"),a(),i(36,"button",10),C(37,"fa-icon",11),r(38),c(39,"translate"),a()()(),v(40,fl,1,1,"iframe",12)}if(s&2){let u=w(9),x=w(24);d("formGroup",o.transactionsReportForm),n(4),p(l(5,22,"labels.inputs.From Date")),n(2),d("min",o.minDate)("max",o.maxDate)("matDatepicker",u),n(),d("for",u),n(4),V(" ",l(12,24,"labels.inputs.From Date")," ",l(13,26,"labels.commons.is")," "),n(4),p(l(16,28,"labels.commons.required")),n(4),p(l(20,30,"labels.inputs.To Date")),n(2),d("min",o.minDate)("max",o.maxDate)("matDatepicker",x),n(),d("for",x),n(4),V(" ",l(27,32,"labels.inputs.To Date")," ",l(28,34,"labels.commons.is")," "),n(4),p(l(31,36,"labels.commons.required")),n(3),d("routerLink",k(42,gl)),n(),p(l(35,38,"labels.buttons.Cancel")),n(2),d("disabled",!o.transactionsReportForm.valid),n(2),f("",l(39,40,"labels.buttons.Generate Report")," \xA0 "),n(2),_(o.hideOutput?-1:40)}},dependencies:[P,O,it,et,K,nt,lt,at,ot,q,Z,X,mt,vt,st,ht,xt,_t,F,St,y],styles:[".generate-button[_ngcontent-%COMP%]{max-height:2%;padding:1% 0 2% 6%;align-self:center}"]})}}return t})();var Cl=()=>["../"];function vl(t,m){t&1&&(i(0,"mat-error"),r(1),c(2,"translate"),c(3,"translate"),i(4,"strong"),r(5),c(6,"translate"),a()()),t&2&&(n(),V(" ",l(2,3,"labels.inputs.Transaction Date")," ",l(3,5,"labels.commons.is")," "),n(4),p(l(6,7,"labels.commons.required")))}function _l(t,m){if(t&1&&(i(0,"mat-option",9),r(1),a()),t&2){let e=m.$implicit;d("value",e.id),n(),f(" ",e.name," ")}}function hl(t,m){t&1&&(i(0,"mat-form-field")(1,"mat-label"),r(2),c(3,"translate"),a(),C(4,"input",17),a()),t&2&&(n(2),p(l(3,1,"labels.inputs.Account Number")))}function xl(t,m){t&1&&(i(0,"mat-form-field")(1,"mat-label"),r(2),c(3,"translate"),a(),C(4,"input",18),a()),t&2&&(n(2),p(l(3,1,"labels.inputs.Cheque")))}function bl(t,m){t&1&&(i(0,"mat-form-field")(1,"mat-label"),r(2),c(3,"translate"),a(),C(4,"input",19),a()),t&2&&(n(2),p(l(3,1,"labels.inputs.Routing Code")))}function Sl(t,m){t&1&&(i(0,"mat-form-field")(1,"mat-label"),r(2),c(3,"translate"),a(),C(4,"input",20),a()),t&2&&(n(2),p(l(3,1,"labels.inputs.Receipt Number")))}function Ml(t,m){t&1&&(i(0,"mat-form-field")(1,"mat-label"),r(2),c(3,"translate"),a(),C(4,"input",21),a()),t&2&&(n(2),p(l(3,1,"labels.inputs.Bank")))}var qn=(()=>{class t{constructor(){this.formBuilder=g(rt),this.route=g(E),this.router=g(z),this.dateUtils=g(j),this.savingsService=g(I),this.settingsService=g(U),this.minDate=new Date(2e3,0,1),this.maxDate=new Date,this.showPaymentDetails=!1,this.route.data.subscribe(e=>{this.transactionTemplateData=e.savingsAccountTransactionTemplate,e.savingsAccountTransactionTemplate.currency&&(this.currency=e.savingsAccountTransactionTemplate.currency),this.paymentTypeOptions=this.transactionTemplateData.paymentTypeOptions}),this.savingAccountId=this.route.snapshot.params.savingAccountId}ngOnInit(){this.maxDate=this.settingsService.businessDate,this.createEditTransactionForm(),this.editTransactionForm.patchValue({transactionDate:this.transactionTemplateData.date&&new Date(this.transactionTemplateData.date),transactionAmount:this.transactionTemplateData.amount,paymentTypeId:this.transactionTemplateData.paymentTypeId})}createEditTransactionForm(){this.editTransactionForm=this.formBuilder.group({transactionDate:["",H.required],transactionAmount:["",H.required],paymentTypeId:[""]})}addPaymentDetails(){this.showPaymentDetails=!this.showPaymentDetails,this.showPaymentDetails?(this.editTransactionForm.addControl("accountNumber",new Ct("")),this.editTransactionForm.addControl("checkNumber",new Ct("")),this.editTransactionForm.addControl("routingCode",new Ct("")),this.editTransactionForm.addControl("receiptNumber",new Ct("")),this.editTransactionForm.addControl("bankNumber",new Ct(""))):(this.editTransactionForm.removeControl("accountNumber"),this.editTransactionForm.removeControl("checkNumber"),this.editTransactionForm.removeControl("routingCode"),this.editTransactionForm.removeControl("receiptNumber"),this.editTransactionForm.removeControl("bankNumber"))}submit(){let e=this.editTransactionForm.value,s=this.settingsService.language.code,o=this.settingsService.dateFormat,u=this.editTransactionForm.value.transactionDate;e.transactionDate instanceof Date&&(e.transactionDate=this.dateUtils.formatDate(u,o));let x=Q(G({},e),{dateFormat:o,locale:s});this.savingsService.executeSavingsAccountTransactionsCommand(this.savingAccountId,"modify",x,this.transactionTemplateData.id).subscribe(B=>{this.router.navigate(["../"],{relativeTo:this.route})})}static{this.\u0275fac=function(s){return new(s||t)}}static{this.\u0275cmp=T({type:t,selectors:[["mifosx-edit-transaction"]],decls:40,vars:34,consts:[["dueDatePicker",""],[1,"container"],[3,"ngSubmit","formGroup"],[1,"layout-column"],[3,"click"],["matInput","","formControlName","transactionDate","required","",3,"min","max","matDatepicker"],["matSuffix","",3,"for"],[3,"currency","isRequired","inputFormControl","inputLabel"],["formControlName","paymentTypeId"],[3,"value"],[1,"flex-fill"],[1,"expandcollapsebutton","m-l-10","m-t-40","flex-75",3,"click"],[3,"className"],[1,"m-l-10"],[1,"layout-row","layout-xs-column","layout-align-center","gap-5px"],["type","button","mat-raised-button","",3,"routerLink"],["mat-raised-button","","color","primary",3,"disabled"],["type","number","formControlName","accountNumber","matInput",""],["type","number","formControlName","checkNumber","matInput",""],["formControlName","routingCode","matInput",""],["formControlName","receiptNumber","matInput",""],["formControlName","bankNumber","matInput",""]],template:function(s,o){if(s&1){let u=D();i(0,"div",1)(1,"mat-card")(2,"form",2),b("ngSubmit",function(){return S(u),M(o.submit())}),i(3,"mat-card-content",3)(4,"mat-form-field",4),b("click",function(){S(u);let B=w(11);return M(B.open())}),i(5,"mat-label"),r(6),c(7,"translate"),a(),C(8,"input",5)(9,"mat-datepicker-toggle",6)(10,"mat-datepicker",null,0),v(12,vl,7,9,"mat-error"),a(),C(13,"mifosx-input-amount",7),i(14,"mat-form-field")(15,"mat-label"),r(16),c(17,"translate"),a(),i(18,"mat-select",8),ut(19,_l,2,2,"mat-option",9,dt),a()(),i(21,"div",10)(22,"span",11),b("click",function(){return S(u),M(o.addPaymentDetails())}),i(23,"mat-slide-toggle")(24,"div",12)(25,"span",13),r(26),c(27,"translate"),a()()()()(),v(28,hl,5,3,"mat-form-field"),v(29,xl,5,3,"mat-form-field"),v(30,bl,5,3,"mat-form-field"),v(31,Sl,5,3,"mat-form-field"),v(32,Ml,5,3,"mat-form-field"),i(33,"mat-card-actions",14)(34,"button",15),r(35),c(36,"translate"),a(),i(37,"button",16),r(38),c(39,"translate"),a()()()()()()}if(s&2){let u=w(11);n(2),d("formGroup",o.editTransactionForm),n(4),p(l(7,23,"labels.inputs.Transaction Date")),n(2),d("min",o.minDate)("max",o.maxDate)("matDatepicker",u),n(),d("for",u),n(3),_(o.editTransactionForm.controls.transactionDate.hasError("required")?12:-1),n(),d("currency",o.currency)("isRequired",!0)("inputFormControl",o.editTransactionForm.controls.transactionAmount)("inputLabel","Transaction Amount"),n(3),p(l(17,25,"labels.inputs.Payment Type")),n(3),gt(o.paymentTypeOptions),n(5),d("className",o.showPaymentDetails?"enabled":"disabled"),n(2),p(l(27,27,"labels.inputs.Show Payment Details")),n(2),_(o.editTransactionForm.controls.accountNumber?28:-1),n(),_(o.editTransactionForm.controls.checkNumber?29:-1),n(),_(o.editTransactionForm.controls.routingCode?30:-1),n(),_(o.editTransactionForm.controls.receiptNumber?31:-1),n(),_(o.editTransactionForm.controls.bankNumber?32:-1),n(2),d("routerLink",k(33,Cl)),n(),f(" ",l(36,29,"labels.buttons.Cancel")," "),n(2),d("disabled",!o.editTransactionForm.valid),n(),f(" ",l(39,31,"labels.buttons.Submit")," ")}},dependencies:[P,O,it,et,ie,K,nt,lt,at,ot,q,J,ct,bt,Z,X,mt,vt,st,wt,It,ht,xt,_t,F,Re,Ie,y],styles:[".container[_ngcontent-%COMP%]{width:37rem}"]})}}return t})();function Al(t,m){if(t&1){let e=D();i(0,"th",13)(1,"mat-checkbox",14),b("change",function(){S(e);let o=h(2);return M(o.toggleSelects())}),Zn("ngModelChange",function(o){S(e);let u=h(2);return Xn(u.selectAllItems,o)||(u.selectAllItems=o),M(o)}),a()()}if(t&2){let e=h(2);n(),Jn("ngModel",e.selectAllItems)}}function Tl(t,m){if(t&1){let e=D();i(0,"td",15)(1,"mat-checkbox",14),b("change",function(){S(e);let o=h(2);return M(o.toggleSelect())}),Zn("ngModelChange",function(o){let u=S(e).$implicit;return Xn(u.selected,o)||(u.selected=o),M(o)}),a()()}if(t&2){let e=m.$implicit;n(),Jn("ngModel",e.selected)}}function Pl(t,m){t&1&&(i(0,"th",13),r(1),c(2,"translate"),a()),t&2&&(n(),p(l(2,1,"labels.inputs.Client ID")))}function Ol(t,m){if(t&1&&(i(0,"td",15),r(1),a()),t&2){let e=m.$implicit;n(),p(e.id)}}function Dl(t,m){t&1&&(i(0,"th",13),r(1),c(2,"translate"),a()),t&2&&(n(),p(l(2,1,"labels.inputs.Client Name")))}function yl(t,m){if(t&1&&(i(0,"td",15),r(1),a()),t&2){let e=m.$implicit;n(),p(e.displayName)}}function Il(t,m){t&1&&C(0,"tr",16)}function wl(t,m){t&1&&C(0,"tr",17)}function El(t,m){if(t&1&&(i(0,"div")(1,"table",5),N(2,6),A(3,Al,2,1,"th",7)(4,Tl,2,1,"td",8),R(),N(5,9),A(6,Pl,3,3,"th",7)(7,Ol,2,1,"td",8),R(),N(8,10),A(9,Dl,3,3,"th",7)(10,yl,2,1,"td",8),R(),A(11,Il,1,0,"tr",11)(12,wl,1,0,"tr",12),a()()),t&2){let e=h();n(),d("dataSource",e.dataSource),n(10),d("matHeaderRowDef",e.displayedColumn),n(),d("matRowDefColumns",e.displayedColumn)}}var ze=(()=>{class t{constructor(){this.selectAllItems=!1,this.displayedColumn=["check","id","name"]}ngOnInit(){this.dataSource=new Jt(this.activeClientMembers)}get selectedClientMembers(){return{selectedMembers:this.activeClientMembers.filter(e=>e.selected)}}toggleSelects(){for(let e of this.activeClientMembers)e.selected=this.selectAllItems}toggleSelect(){let e=this.activeClientMembers.length;this.selectAllItems=e===0?!1:this.activeClientMembers.filter(s=>s.selected).length===e}static{this.\u0275fac=function(s){return new(s||t)}}static{this.\u0275cmp=T({type:t,selectors:[["mifosx-savings-active-client-members"]],inputs:{activeClientMembers:"activeClientMembers"},decls:10,vars:8,consts:[[1,"layout-row","responsive-column","align-center","gap-2px","margin-t"],["mat-raised-button","","matStepperPrevious",""],["icon","arrow-left",1,"m-r-10"],["mat-raised-button","","matStepperNext","",3,"disabled"],["icon","arrow-right",1,"m-l-10"],["mat-table","",1,"flex-98",3,"dataSource"],["matColumnDef","check"],["mat-header-cell","",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","id"],["matColumnDef","name"],["mat-header-row","",4,"matHeaderRowDef"],["mat-row","",4,"matRowDef","matRowDefColumns"],["mat-header-cell",""],[3,"change","ngModelChange","ngModel"],["mat-cell",""],["mat-header-row",""],["mat-row",""]],template:function(s,o){s&1&&(v(0,El,13,3,"div"),i(1,"div",0)(2,"button",1),C(3,"fa-icon",2),r(4),c(5,"translate"),a(),i(6,"button",3),r(7),c(8,"translate"),C(9,"fa-icon",4),a()()),s&2&&(_(o.activeClientMembers?0:-1),n(4),f(" ",l(5,4,"labels.buttons.Previous")," "),n(2),d("disabled",o.selectedClientMembers.selectedMembers.length===0),n(),f(" ",l(8,6,"labels.buttons.Next")," "))},dependencies:[P,O,K,F,Ce,Lt,qt,Ut,Ht,Mi,bi,Gt,zt,jt,Wt,$t,Qt,le,St,_e,y],styles:["table[_ngcontent-%COMP%]{width:100%}.mat-elevation-z1[_ngcontent-%COMP%]{margin:1em 0 1.5em}.margin-t[_ngcontent-%COMP%]{margin-top:1em}"]})}}return t})();function Fl(t,m){t&1&&C(0,"fa-icon",15)}function kl(t,m){t&1&&C(0,"fa-icon",15)}function Bl(t,m){t&1&&C(0,"fa-icon",16)}function Nl(t,m){t&1&&C(0,"fa-icon",17)}function Rl(t,m){t&1&&C(0,"fa-icon",18)}function Vl(t,m){t&1&&(r(0),c(1,"translate")),t&2&&p(l(1,1,"labels.inputs.DETAILS"))}function Ll(t,m){t&1&&(r(0),c(1,"translate")),t&2&&p(l(1,1,"labels.inputs.TERMS"))}function Gl(t,m){t&1&&(r(0),c(1,"translate")),t&2&&p(l(1,1,"labels.inputs.CHARGES"))}function Ul(t,m){t&1&&(r(0),c(1,"translate")),t&2&&p(l(1,1,"labels.heading.Active Client Members"))}function ql(t,m){t&1&&(r(0),c(1,"translate")),t&2&&p(l(1,1,"labels.inputs.PREVIEW"))}function Hl(t,m){if(t&1){let e=D();i(0,"mat-step",14),A(1,ql,2,3,"ng-template",9),i(2,"mifosx-savings-account-preview-step",19),b("submitEvent",function(){S(e);let o=h();return M(o.submit())}),a()()}if(t&2){let e=h();n(2),d("savingsAccountProductTemplate",e.savingsAccountProductTemplate)("savingsAccountTemplate",e.savingsAccountTemplate)("savingsAccountTermsForm",e.savingsAccountTermsForm)("savingsAccount",e.savingsAccount)("activeClientMembers",e.activeClientMembers)}}var Hn=(()=>{class t{constructor(){this.route=g(E),this.router=g(z),this.dateUtils=g(j),this.savingsService=g(I),this.settingsService=g(U),this.route.data.subscribe(e=>{this.savingsAccountTemplate=e.savingsAccountTemplate,this.dataSource=e.groupsData.activeClientMembers})}setTemplate(e){this.savingsAccountProductTemplate=e}get savingsAccountDetailsForm(){return this.savingsAccountDetailsStep.savingsAccountDetailsForm}get savingsAccountTermsForm(){return this.savingsAccountTermsStep.savingsAccountTermsForm}get activeClientMembers(){return this.dataSource}get savingsAccountFormValid(){return this.savingsAccountDetailsForm.valid&&this.savingsAccountTermsForm.valid&&this.activeClientMembers.filter(e=>e.selected).length>0}get savingsAccount(){return this.selectedMembers=this.savingsActiveClientMembers.selectedClientMembers,G(G(G({},this.savingsAccountDetailsStep.savingsAccountDetails),this.savingsAccountTermsStep.savingsAccountTerms),this.savingsAccountChargesStep.savingsAccountCharges)}setData(e,s){let o=this.settingsService.language.code,u=this.settingsService.dateFormat,B=Q(G({},this.savingsAccount),{charges:this.savingsAccount.charges.map(Yt=>({chargeId:Yt.id,amount:Yt.amount})),clientId:e.id,isGSIM:!0,isParentAccount:s,submittedOnDate:this.dateUtils.formatDate(this.savingsAccount.submittedOnDate,u),dateFormat:u,monthDayFormat:"dd MMMM",locale:o});return B.groupId=this.savingsAccountTemplate.groupId,B}buildRequestData(){let e=[],s=this.selectedMembers.selectedMembers;for(let o=0;o<1;o++)e.push(this.setData(s[o],!0));for(let o=1;o{this.router.navigate(["../",o.resourceId],{relativeTo:this.route})})}static{this.\u0275fac=function(s){return new(s||t)}}static{this.\u0275cmp=T({type:t,selectors:[["mifosx-create-gsim-account"]],viewQuery:function(s,o){if(s&1&&(Pt(oe,7),Pt(re,7),Pt(ce,7),Pt(ze,7)),s&2){let u;Ot(u=Dt())&&(o.savingsAccountDetailsStep=u.first),Ot(u=Dt())&&(o.savingsAccountTermsStep=u.first),Ot(u=Dt())&&(o.savingsAccountChargesStep=u.first),Ot(u=Dt())&&(o.savingsActiveClientMembers=u.first)}},decls:21,vars:11,consts:[["savingProductStepper",""],[1,"container"],["orientation","vertical","labelPosition","bottom",1,"mat-elevation-z8",3,"linear"],["matStepperIcon","number"],["matStepperIcon","edit"],["matStepperIcon","done"],["matStepperIcon","error"],["matStepperIcon","preview"],[3,"stepControl"],["matStepLabel",""],[3,"savingsAccountProductTemplate","savingsAccountTemplate"],[3,"savingsAccountProductTemplate"],[3,"savingsAccountProductTemplate","savingsAccountTemplate","currencyCode","activeClientMembers"],[3,"activeClientMembers"],["completed",""],["icon","pencil-alt","size","sm"],["icon","check","size","sm"],["icon","exclamation-triangle","size","lg"],["icon","eye","size","sm"],[3,"submitEvent","savingsAccountProductTemplate","savingsAccountTemplate","savingsAccountTermsForm","savingsAccount","activeClientMembers"]],template:function(s,o){if(s&1){let u=D();i(0,"div",1)(1,"mat-stepper",2,0),A(3,Fl,1,0,"ng-template",3)(4,kl,1,0,"ng-template",4)(5,Bl,1,0,"ng-template",5)(6,Nl,1,0,"ng-template",6)(7,Rl,1,0,"ng-template",7),i(8,"mat-step",8),A(9,Vl,2,3,"ng-template",9),i(10,"mifosx-savings-account-details-step",10),b("savingsAccountProductTemplate",function(B){return S(u),M(o.setTemplate(B))}),a()(),i(11,"mat-step",8),A(12,Ll,2,3,"ng-template",9),C(13,"mifosx-savings-account-terms-step",11),a(),i(14,"mat-step"),A(15,Gl,2,3,"ng-template",9),C(16,"mifosx-savings-account-charges-step",12),a(),i(17,"mat-step"),A(18,Ul,2,3,"ng-template",9),C(19,"mifosx-savings-active-client-members",13),a(),v(20,Hl,3,5,"mat-step",14),a()()}s&2&&(n(),d("linear",!1),n(7),d("stepControl",o.savingsAccountDetailsForm),n(2),d("savingsAccountTemplate",o.savingsAccountTemplate),n(),d("stepControl",o.savingsAccountTermsForm),n(2),d("savingsAccountProductTemplate",o.savingsAccountProductTemplate),n(3),d("savingsAccountProductTemplate",o.savingsAccountProductTemplate)("savingsAccountTemplate",o.savingsAccountTemplate)("currencyCode",o.savingsAccountTermsForm.get("currencyCode"))("activeClientMembers",o.activeClientMembers),n(3),d("activeClientMembers",o.activeClientMembers),n(),_(o.savingsAccountFormValid?20:-1))},dependencies:[P,O,ke,Ee,St,Fe,we,oe,re,ce,ze,be,y],encapsulation:2})}}return t})();var zl=()=>[10,20,25],jl=t=>["../","savings-accounts",t,"actions","Deposit"],$l=t=>["../","savings-accounts",t,"actions","Withdrawal"],Wl=t=>["../../../","savings-accounts",t,"actions","Approve"],Ql=t=>["../../../","savings-accounts",t,"actions","Undo Approval"],Kl=t=>["../../",t,"actions","Activate"],Yl=t=>["../../",t,"transactions"];function Jl(t,m){t&1&&(i(0,"th",13),r(1),c(2,"translate"),c(3,"translate"),a()),t&2&&(n(),V(" ",l(2,2,"labels.inputs.Client")," ",l(3,4,"labels.inputs.Details")," "))}function Xl(t,m){if(t&1&&(i(0,"td",14),r(1),a()),t&2){let e=m.$implicit;n(),f(" ",e.displayName," ")}}function Zl(t,m){t&1&&(i(0,"th",13),r(1),c(2,"translate"),a()),t&2&&(n(),p(l(2,1,"labels.inputs.Saving Account")))}function tm(t,m){if(t&1&&(i(0,"td",14),C(1,"i",15),c(2,"statusLookup"),r(3),a()),t&2){let e=m.$implicit;n(),d("ngClass",l(2,3,e.status.code))("matTooltip",e.status.value),n(2),f(" ",e.accountNo," ")}}function em(t,m){t&1&&(i(0,"th",13),r(1),c(2,"translate"),a()),t&2&&(n(),p(l(2,1,"labels.menus.Products")))}function nm(t,m){if(t&1&&(i(0,"td",14),r(1),a()),t&2){let e=m.$implicit;n(),p(e.productName)}}function im(t,m){t&1&&(i(0,"th",13),r(1),c(2,"translate"),a()),t&2&&(n(),p(l(2,1,"labels.inputs.Balance")))}function am(t,m){t&1&&C(0,"td",14)}function om(t,m){t&1&&(i(0,"th",13),r(1),c(2,"translate"),a()),t&2&&(n(),p(l(2,1,"labels.inputs.Actions")))}function rm(t,m){if(t&1){let e=D();i(0,"button",17),b("click",function(o){S(e);let u=h(2);return M(u.routeEdit(o))}),C(1,"i",18),c(2,"translate"),a()}if(t&2){let e=h().$implicit;d("routerLink",kt(5,jl,e.id)),n(),d("matTooltip",ft(l(2,3,"tooltips.Deposit")))}}function cm(t,m){if(t&1){let e=D();i(0,"button",17),b("click",function(o){S(e);let u=h(2);return M(u.routeEdit(o))}),C(1,"i",19),c(2,"translate"),a()}if(t&2){let e=h().$implicit;d("routerLink",kt(5,$l,e.id)),n(),d("matTooltip",ft(l(2,3,"tooltips.Withdraw")))}}function sm(t,m){if(t&1){let e=D();i(0,"button",17),b("click",function(o){S(e);let u=h(2);return M(u.routeEdit(o))}),C(1,"i",20),c(2,"translate"),a()}if(t&2){let e=h().$implicit;d("routerLink",kt(5,Wl,e.id)),n(),d("matTooltip",ft(l(2,3,"tooltips.Approve")))}}function lm(t,m){if(t&1){let e=D();i(0,"button",17),b("click",function(o){S(e);let u=h(2);return M(u.routeEdit(o))}),C(1,"i",21),c(2,"translate"),a()}if(t&2){let e=h().$implicit;d("routerLink",kt(5,Ql,e.id)),n(),d("matTooltip",ft(l(2,3,"tooltips.Undo Approval")))}}function mm(t,m){if(t&1){let e=D();i(0,"button",17),b("click",function(o){S(e);let u=h(2);return M(u.routeEdit(o))}),C(1,"i",22),c(2,"translate"),a()}if(t&2){let e=h().$implicit;d("routerLink",kt(5,Kl,e.id)),n(),d("matTooltip",ft(l(2,3,"tooltips.Activate")))}}function pm(t,m){if(t&1&&(i(0,"td",14),v(1,rm,3,7,"button",16),v(2,cm,3,7,"button",16),v(3,sm,3,7,"button",16),v(4,lm,3,7,"button",16),v(5,mm,3,7,"button",16),a()),t&2){let e=m.$implicit;n(),_(e.status.active?1:-1),n(),_(e.status.active?2:-1),n(),_(e.status.submittedAndPendingApproval?3:-1),n(),_(!e.status.submittedAndPendingApproval&&!e.status.active?4:-1),n(),_(!e.status.submittedAndPendingApproval&&!e.status.active?5:-1)}}function dm(t,m){t&1&&C(0,"tr",23)}function um(t,m){if(t&1&&C(0,"tr",24),t&2){let e=m.$implicit;d("routerLink",kt(1,Yl,e.id))}}var zn=(()=>{class t{constructor(){this.route=g(E),this.dialog=g(yt),this.displayedColumns=["clientDetails","savingsAccount","products","balance","Actions"],this.route.data.subscribe(e=>{this.gsimOverviewData=e.gsimData[0].childGSIMAccounts,this.savingAccountData=e.savingAccountData,this.groupsData=e.groupsData})}ngOnInit(){this.setLoanClientChargeOverview()}setLoanClientChargeOverview(){this.dataSource=new Jt(this.gsimOverviewData)}routeEdit(e){e.stopPropagation()}static{this.\u0275fac=function(s){return new(s||t)}}static{this.\u0275cmp=T({type:t,selectors:[["mifosx-gsim-account"]],viewQuery:function(s,o){if(s&1&&Pt(ye,7),s&2){let u;Ot(u=Dt())&&(o.paginator=u.first)}},decls:24,vars:8,consts:[[1,"tab-container","mat-typography"],[1,"content-container"],["mat-table","",3,"dataSource"],["matColumnDef","clientDetails"],["mat-header-cell","",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","savingsAccount"],["matColumnDef","products"],["matColumnDef","balance"],["matColumnDef","Actions"],["mat-header-row","",4,"matHeaderRowDef"],["mat-row","",3,"routerLink",4,"matRowDef","matRowDefColumns"],["showFirstLastButtons","",3,"pageSizeOptions"],["mat-header-cell",""],["mat-cell",""],[1,"fa","fa-stop",3,"ngClass","matTooltip"],["mat-raised-button","","color","primary",1,"account-action-button",3,"routerLink"],["mat-raised-button","","color","primary",1,"account-action-button",3,"click","routerLink"],[1,"fa","fa-arrow-up",3,"matTooltip"],[1,"fa","fa-arrow-down",3,"matTooltip"],[1,"fa","fa-check",3,"matTooltip"],[1,"fa","fa-undo",3,"matTooltip"],[1,"fa","fa-check-circle",3,"matTooltip"],["mat-header-row",""],["mat-row","",3,"routerLink"]],template:function(s,o){s&1&&(i(0,"div",0)(1,"div",1)(2,"h2"),r(3),c(4,"translate"),a(),i(5,"table",2),N(6,3),A(7,Jl,4,6,"th",4)(8,Xl,2,1,"td",5),R(),N(9,6),A(10,Zl,3,3,"th",4)(11,tm,4,5,"td",5),R(),N(12,7),A(13,em,3,3,"th",4)(14,nm,2,1,"td",5),R(),N(15,8),A(16,im,3,3,"th",4)(17,am,1,0,"td",5),R(),N(18,9),A(19,om,3,3,"th",4)(20,pm,6,5,"td",5),R(),A(21,dm,1,0,"tr",10)(22,um,1,3,"tr",11),a(),C(23,"mat-paginator",12),a()()),s&2&&(n(3),p(l(4,5,"labels.heading.GSIM Account Overview")),n(2),d("dataSource",o.dataSource),n(16),d("matHeaderRowDef",o.displayedColumns),n(),d("matRowDefColumns",o.displayedColumns),n(),d("pageSizeOptions",k(7,zl)))},dependencies:[P,de,O,q,F,Lt,qt,Ut,Ht,Gt,zt,fe,jt,Wt,$t,Qt,ye,y,ln],styles:[".tab-container[_ngcontent-%COMP%]{padding:1%;margin:1%}.tab-container[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{margin:1% auto}.tab-container[_ngcontent-%COMP%] .content-container[_ngcontent-%COMP%]{margin-top:5px}.tab-container[_ngcontent-%COMP%] .group-details-container[_ngcontent-%COMP%]{border:1px solid;padding:1%}.tab-container[_ngcontent-%COMP%] .action-button[_ngcontent-%COMP%]{margin-left:auto}.tab-container[_ngcontent-%COMP%] table[_ngcontent-%COMP%]{width:100%}.tab-container[_ngcontent-%COMP%] table[_ngcontent-%COMP%] .account-action-button[_ngcontent-%COMP%]{min-width:26px;padding:0 6px;margin:4px;line-height:25px}.tab-container[_ngcontent-%COMP%] table[_ngcontent-%COMP%] tr.select-row[_ngcontent-%COMP%]:hover, .tab-container[_ngcontent-%COMP%] i[_ngcontent-%COMP%]:hover, .tab-container[_ngcontent-%COMP%] tr[_ngcontent-%COMP%]:hover{cursor:pointer}"]})}}return t})();var ri=(()=>{class t{constructor(){this.savingsService=g(I)}resolve(e){let s=e.parent.parent.paramMap.get("id"),o=e.paramMap.get("datatableName");return this.savingsService.getSavingsTransactionDatatable(s,o)}static{this.\u0275fac=function(s){return new(s||t)}}static{this.\u0275prov=At({token:t,factory:t.\u0275fac})}}return t})();var ci=(()=>{class t{constructor(){this.savingsService=g(I)}resolve(e){return this.savingsService.getSavingsTransactionDatatables()}static{this.\u0275fac=function(s){return new(s||t)}}static{this.\u0275prov=At({token:t,factory:t.\u0275fac})}}return t})();var jn=(()=>{class t{constructor(){this.savingsService=g(I)}resolve(e){let s=e.paramMap.get("clientId")||e.paramMap.get("groupId")||e.paramMap.get("centerId"),o=!!(e.paramMap.get("groupId")||e.paramMap.get("centerId"));return this.savingsService.getSavingsAccountTemplate(s,void 0,o)}static{this.\u0275fac=function(s){return new(s||t)}}static{this.\u0275prov=At({token:t,factory:t.\u0275fac})}}return t})();var si=(()=>{class t{constructor(){this.savingsService=g(I)}resolve(e){let s=e.paramMap.get("savingAccountId");return this.savingsService.getSavingsAccountAndTemplate(s,!0)}static{this.\u0275fac=function(s){return new(s||t)}}static{this.\u0275prov=At({token:t,factory:t.\u0275fac})}}return t})();var li=(()=>{class t{constructor(){this.savingsService=g(I)}resolve(e){let s=e.parent.paramMap.get("savingAccountId"),o=e.parent.paramMap.get("id");return this.savingsService.getSavingsAccountTransaction(s,o)}static{this.\u0275fac=function(s){return new(s||t)}}static{this.\u0275prov=At({token:t,factory:t.\u0275fac})}}return t})();var mi=(()=>{class t{constructor(){this.savingsService=g(I)}resolve(e){let s=e.parent.paramMap.get("savingAccountId"),o=e.paramMap.get("id");return this.savingsService.getSavingsAccountCharge(s,o)}static{this.\u0275fac=function(s){return new(s||t)}}static{this.\u0275prov=At({token:t,factory:t.\u0275fac})}}return t})();var pi=(()=>{class t{constructor(){this.savingsService=g(I)}resolve(e){let s=e.paramMap.get("name"),o=e.paramMap.get("savingAccountId")||e.parent.parent.paramMap.get("savingAccountId");switch(s){case"Assign Staff":return this.savingsService.getSavingsAccountAndTemplate(o,!0);case"Add Charge":return this.savingsService.getSavingsChargeTemplateResource(o);case"Withdrawal":case"Deposit":case"Hold Amount":return this.savingsService.getSavingsTransactionTemplateResource(o);case"Close":return fi([this.savingsService.getSavingsTransactionTemplateResource(o),this.savingsService.getSavingsAccountData(o)]);case"Apply Annual Fees":return this.savingsService.getSavingsAccountData(o);default:return}}static{this.\u0275fac=function(s){return new(s||t)}}static{this.\u0275prov=At({token:t,factory:t.\u0275fac})}}return t})();var di=(()=>{class t{constructor(){this.reportsService=g(dn),this.settingsService=g(U)}resolve(e){let o={"output-type":"PDF",R_transactionId:e.paramMap.get("id")};return this.reportsService.getPentahoRunReportData("Savings Transaction Receipt",o,"default",this.settingsService.language.code,this.settingsService.dateFormat)}static{this.\u0275fac=function(s){return new(s||t)}}static{this.\u0275prov=At({token:t,factory:t.\u0275fac})}}return t})();var ui=(()=>{class t{constructor(){this.savingsService=g(I)}resolve(e){let s=e.parent.paramMap.get("savingAccountId"),o=e.paramMap.get("id");return this.savingsService.getSavingsAccountTransactionTemplate(s,o)}static{this.\u0275fac=function(s){return new(s||t)}}static{this.\u0275prov=At({token:t,factory:t.\u0275fac})}}return t})();var gi=(()=>{class t{constructor(){this.savingsService=g(I)}resolve(e){let s=e.paramMap.get("groupId"),o=e.paramMap.get("savingAccountId");return this.savingsService.getGSIMAccountData(o,s)}static{this.\u0275fac=function(s){return new(s||t)}}static{this.\u0275prov=At({token:t,factory:t.\u0275fac})}}return t})();var $n=(()=>{class t{constructor(){this.route=g(E),this.savingsService=g(I),this.settingsService=g(U),this.dialog=g(yt),this.entityType="savings",this.route.data.subscribe(e=>{this.setSavingsDocumentsData(e.savingsDocuments)}),this.entityId=this.route.parent.snapshot.paramMap.get("savingAccountId")}setSavingsDocumentsData(e){e.forEach(s=>{s.docUrl=this.settingsService.serverUrl+"/savings/"+s.parentEntityId+"/documents/"+s.id+"/attachment?tenantIdentifier="+Xe.fineractPlatformTenantId,s.fileName&&(s.fileName.toLowerCase().indexOf(".jpg")!==-1||s.fileName.toLowerCase().indexOf(".jpeg")!==-1||s.fileName.toLowerCase().indexOf(".png")!==-1)&&(s.fileIsImage=!0),s.type&&s.type.toLowerCase().indexOf("image")!==-1&&(s.fileIsImage=!0)}),this.entityDocuments=e}uploadDocument(e){return this.savingsService.loadSavingsDocument(this.entityId,e)}deleteDocument(e){this.savingsService.deleteSavingsDocument(this.entityId,e).subscribe(s=>{})}static{this.\u0275fac=function(s){return new(s||t)}}static{this.\u0275cmp=T({type:t,selectors:[["mifosx-savings-documents-tab"]],decls:1,vars:5,consts:[[3,"entityType","entityId","entityDocuments","callbackUpload","callbackDelete"]],template:function(s,o){s&1&&C(0,"mifosx-entity-documents-tab",0),s&2&&d("entityType",o.entityType)("entityId",o.entityId)("entityDocuments",o.entityDocuments)("callbackUpload",o.uploadDocument)("callbackDelete",o.deleteDocument)},dependencies:[P,O,ki],encapsulation:2})}}return t})();var Wn=(()=>{class t{constructor(){this.route=g(E),this.savingsService=g(I),this.authenticationService=g(xi);let e=this.authenticationService.getCredentials();this.username=e.username,this.entityId=this.route.parent.snapshot.params.savingAccountId,this.route.data.subscribe(s=>{this.entityNotes=s.savingAccountNotes})}addNote(e){this.savingsService.createSavingsNote(this.entityId,e).subscribe(s=>{this.entityNotes.push({id:s.resourceId,createdByUsername:this.username,createdOn:new Date,note:e.note})})}editNote(e,s,o){this.savingsService.editSavingsNote(this.entityId,e,s).subscribe(()=>{this.entityNotes[o].note=s.note})}deleteNote(e,s){this.savingsService.deleteSavingsNote(this.entityId,e).subscribe(()=>{this.entityNotes.splice(s,1)})}static{this.\u0275fac=function(s){return new(s||t)}}static{this.\u0275cmp=T({type:t,selectors:[["mifosx-notes-tab"]],decls:1,vars:5,consts:[[3,"entityId","entityNotes","callbackAdd","callbackEdit","callbackDelete"]],template:function(s,o){s&1&&C(0,"mifosx-entity-notes-tab",0),s&2&&d("entityId",o.entityId)("entityNotes",o.entityNotes)("callbackAdd",o.addNote)("callbackEdit",o.editNote)("callbackDelete",o.deleteNote)},dependencies:[P,O,Fi],encapsulation:2})}}return t})();var Hi=(()=>{class t{constructor(){this.savingsService=g(I)}resolve(e){let s=e.parent.paramMap.get("savingAccountId");return this.savingsService.getSavingsNotes(s)}static{this.\u0275fac=function(s){return new(s||t)}}static{this.\u0275prov=At({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();var zi=(()=>{class t{constructor(){this.savingsService=g(I)}resolve(e){let s=e.parent.paramMap.get("savingAccountId");return this.savingsService.getSavingsDocuments(s)}static{this.\u0275fac=function(s){return new(s||t)}}static{this.\u0275prov=At({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();var gm=()=>({confirm:!0}),Qn=(()=>{class t{constructor(){this.dialogRef=g(Xt)}static{this.\u0275fac=function(s){return new(s||t)}}static{this.\u0275cmp=T({type:t,selectors:[["mifosx-release-amount-dialog"]],decls:14,vars:14,consts:[["mat-dialog-title",""],["mat-dialog-content",""],["align","end"],["mat-raised-button","","mat-dialog-close",""],["mat-raised-button","","color","warn",3,"mat-dialog-close"]],template:function(s,o){s&1&&(i(0,"h1",0),r(1),c(2,"translate"),a(),i(3,"div",1)(4,"p"),r(5),c(6,"translate"),a()(),i(7,"mat-dialog-actions",2)(8,"button",3),r(9),c(10,"translate"),a(),i(11,"button",4),r(12),c(13,"translate"),a()()),s&2&&(n(),p(l(2,5,"labels.heading.Release Amount")),n(4),p(l(6,7,"labels.text.Are you sure you want to release this amount")),n(4),p(l(10,9,"labels.buttons.Cancel")),n(2),d("mat-dialog-close",k(13,gm)),n(),f(" ",l(13,11,"labels.buttons.Confirm")," "))},dependencies:[P,O,F,te,ee,ne,Zt,y],encapsulation:2})}}return t})();var fm=()=>["../../"];function Cm(t,m){t&1&&(i(0,"button",10),C(1,"fa-icon",11),r(2),c(3,"translate"),a()),t&2&&(d("routerLink","edit"),n(2),f("",l(3,2,"labels.buttons.Edit")," "))}function vm(t,m){if(t&1&&(i(0,"span"),v(1,Cm,4,4,"button",10),a()),t&2){let e=h(2);n(),_(e.transactionData.transactionType.value==="Transfer"||e.transactionData.reversed==="true"||e.transactionData.transactionType.id===3||e.transactionData.transactionType.id===17?1:-1)}}function _m(t,m){t&1&&(i(0,"span"),A(1,vm,2,1,"span",9),a()),t&2&&(n(),d("mifosxHasPermission","ADJUSTTRANSACTION_SAVINGSACCOUNT"))}function hm(t,m){if(t&1){let e=D();i(0,"button",13),b("click",function(){S(e);let o=h(2);return M(o.releaseAmount())}),C(1,"fa-icon",14),r(2),c(3,"translate"),a()}t&2&&(n(2),f("",l(3,1,"labels.buttons.Release Amount")," "))}function xm(t,m){t&1&&(i(0,"span"),A(1,hm,4,3,"button",12),a()),t&2&&(n(),d("mifosxHasPermission","RELEASEAMOUNT_SAVINGSACCOUNT"))}function bm(t,m){if(t&1){let e=D();i(0,"button",16),b("click",function(){S(e);let o=h(2);return M(o.undoTransaction())}),C(1,"fa-icon",17),r(2),c(3,"translate"),a()}t&2&&(n(2),f("",l(3,1,"labels.buttons.Undo")," "))}function Sm(t,m){t&1&&(i(0,"span"),A(1,bm,4,3,"button",15),a()),t&2&&(n(),d("mifosxHasPermission","UNDOTRANSACTION_SAVINGSACCOUNT"))}function Mm(t,m){t&1&&(i(0,"div",4),r(1),c(2,"translate"),a()),t&2&&(n(),f(" ",l(2,1,"labels.inputs.Note")," "))}function Am(t,m){if(t&1&&(i(0,"div",5),r(1),a()),t&2){let e=h();n(),f(" ",e.transactionData.note," ")}}function Tm(t,m){if(t&1&&C(0,"mifosx-transaction-payment-detail",6),t&2){let e=h();d("paymentDetailData",e.transactionData.paymentDetailData)}}var Kn=(()=>{class t{constructor(){this.savingsService=g(I),this.route=g(E),this.dateUtils=g(j),this.router=g(z),this.dialog=g(yt),this.settingsService=g(U),this.route.data.subscribe(e=>{this.accountId=this.route.parent.snapshot.params.savingAccountId,this.transactionData=e.savingsAccountTransaction})}allowUndo(){return this.transactionData.reversed&&this.transactionData.transactionType.amountHold?!1:!this.transactionData.reversed}releaseAmount(){this.dialog.open(Qn).afterClosed().subscribe(s=>{if(s.confirm){let o={};this.savingsService.executeSavingsAccountTransactionsCommand(this.accountId,"releaseAmount",o,this.transactionData.id).subscribe(()=>{this.router.navigate(["../.."],{relativeTo:this.route})})}})}undoTransaction(){this.dialog.open(Ve).afterClosed().subscribe(s=>{if(s.confirm){let o=this.settingsService.language.code,u=this.settingsService.dateFormat,x={transactionDate:this.dateUtils.formatDate(this.transactionData.date&&new Date(this.transactionData.date),u),transactionAmount:0,dateFormat:u,locale:o};this.savingsService.executeSavingsAccountTransactionsCommand(this.accountId,"undo",x,this.transactionData.id).subscribe(()=>{this.router.navigate(["../.."],{relativeTo:this.route})})}})}transactionColor(){return this.transactionData.reversed?"undo":"active"}static{this.\u0275fac=function(s){return new(s||t)}}static{this.\u0275cmp=T({type:t,selectors:[["mifosx-savings-transaction-general-tab"]],decls:44,vars:42,consts:[["align","end",1,"container","transaction-buttons","m-b-20","align-end-center","gap-2percent"],[1,"container"],[1,"layout-row-wrap","card-content"],[1,"flex-100",3,"ngClass"],[1,"flex-50","mat-body-strong"],[1,"flex-50"],[3,"paymentDetailData"],[1,"layout-row","layout-align-center","gap-2percent","column-on-mobile"],["type","button","mat-raised-button","","color","primary",3,"routerLink"],[4,"mifosxHasPermission"],["mat-raised-button","","color","primary",3,"routerLink"],["icon","edit",1,"m-r-10"],["mat-raised-button","","color","primary",3,"click",4,"mifosxHasPermission"],["mat-raised-button","","color","primary",3,"click"],["icon","lock-open",1,"m-r-10"],["mat-raised-button","","color","warn",3,"click",4,"mifosxHasPermission"],["mat-raised-button","","color","warn",3,"click"],["icon","undo",1,"m-r-10"]],template:function(s,o){s&1&&(i(0,"div",0),v(1,_m,2,1,"span"),v(2,xm,2,1,"span"),v(3,Sm,2,1,"span"),a(),i(4,"div",1)(5,"mat-card")(6,"mat-card-content")(7,"div",2),C(8,"div",3),i(9,"div",4),r(10),c(11,"translate"),a(),i(12,"div",5),r(13),a(),i(14,"div",4),r(15),c(16,"translate"),a(),i(17,"div",5),r(18),c(19,"translateKey"),a(),i(20,"div",4),r(21),c(22,"translate"),a(),i(23,"div",5),r(24),c(25,"dateFormat"),a(),i(26,"div",4),r(27),c(28,"translate"),a(),i(29,"div",5),r(30),a(),i(31,"div",4),r(32),c(33,"translate"),a(),i(34,"div",5),r(35),c(36,"currency"),a(),v(37,Mm,3,3,"div",4),v(38,Am,2,1,"div",5),v(39,Tm,1,1,"mifosx-transaction-payment-detail",6),a(),i(40,"div",7)(41,"button",8),r(42),c(43,"translate"),a()()()()()),s&2&&(n(),_(o.transactionData.interestedPostedAsOn===!1&&(o.transactionData.transactionType.id===17||o.transactionData.transactionType.id===3)?-1:1),n(),_(!o.transactionData.reversed&&o.transactionData.transactionType.amountHold?2:-1),n(),_(o.allowUndo()?3:-1),n(5),d("ngClass",o.transactionColor()),n(2),f(" ",l(11,19,"labels.inputs.Id")," "),n(3),f(" ",o.transactionData.id," "),n(2),f(" ",l(16,21,"labels.inputs.Transaction Type")," "),n(3),f(" ",Mt(19,23,o.transactionData.transactionType.value,"catalogs")," "),n(3),f(" ",l(22,26,"labels.inputs.Transaction Date")," "),n(3),f(" ",l(25,28,o.transactionData.date)," "),n(3),f(" ",l(28,30,"labels.inputs.Currency")," "),n(3),f(" ",o.transactionData.currency.displayLabel," "),n(2),f(" ",l(33,32,"labels.inputs.Amount")," "),n(3),f(" ",tt(36,34,o.transactionData.amount,o.transactionData.currency.code,"symbol-narrow","1.2-2")," "),n(2),_(o.transactionData.note?37:-1),n(),_(o.transactionData.note?38:-1),n(),_(o.transactionData.paymentDetailData?39:-1),n(2),d("routerLink",k(41,fm)),n(),f(" ",l(43,39,"labels.buttons.Back")," "))},dependencies:[P,de,O,q,J,ct,F,Rt,St,Ri,ue,Bt,y,Nt],styles:["body[_ngcontent-%COMP%] table[_ngcontent-%COMP%] tbody[_ngcontent-%COMP%] tr[_ngcontent-%COMP%]:nth-child(2n){background-color:#f2f2f2}.bg-black[_ngcontent-%COMP%]{background-color:#000}.bg-light-grey[_ngcontent-%COMP%]{background-color:#e5e5e5}.bg-medium-grey[_ngcontent-%COMP%]{background-color:#ccc}.bg-grey[_ngcontent-%COMP%]{background-color:#999}.bg-dark-grey[_ngcontent-%COMP%]{background-color:#222}.bg-white[_ngcontent-%COMP%], .bg-fff[_ngcontent-%COMP%]{background-color:#fff}.bg-none[_ngcontent-%COMP%], .no-bg[_ngcontent-%COMP%]{background:none;background-image:none;background-color:transparent}.bg-facebook[_ngcontent-%COMP%]{background-color:#47639e}.bg-twitter[_ngcontent-%COMP%]{background-color:#02a8f3}body[_ngcontent-%COMP%] table[_ngcontent-%COMP%]{border:1px solid rgba(0,0,0,.12)}.no-border[_ngcontent-%COMP%]{border:none}.no-border-t[_ngcontent-%COMP%]{border-top:none}.no-border-r[_ngcontent-%COMP%]{border-right:none}.no-border-b[_ngcontent-%COMP%]{border-bottom:none}.no-border-l[_ngcontent-%COMP%]{border-left:none}.no-border-lr[_ngcontent-%COMP%], .no-border-rl[_ngcontent-%COMP%]{border-left:none;border-right:none}.no-border-tb[_ngcontent-%COMP%], .no-border-bt[_ngcontent-%COMP%]{border-top:none;border-bottom:none}.no-border-tl[_ngcontent-%COMP%], .no-border-lt[_ngcontent-%COMP%]{border-top:none;border-left:none}.no-border-tr[_ngcontent-%COMP%], .no-border-rt[_ngcontent-%COMP%]{border-top:none;border-right:none}.no-border-bl[_ngcontent-%COMP%], .no-border-lb[_ngcontent-%COMP%]{border-bottom:none;border-left:none}.no-border-br[_ngcontent-%COMP%], .no-border-rb[_ngcontent-%COMP%]{border-bottom:none;border-right:none}.border-dashed[_ngcontent-%COMP%], .border-dotted[_ngcontent-%COMP%]{border-style:dashed}.border-black[_ngcontent-%COMP%]{border-color:#000}.border-light-grey[_ngcontent-%COMP%]{border-color:#e5e5e5}.border-medium-grey[_ngcontent-%COMP%]{border-color:#ccc}.border-grey[_ngcontent-%COMP%]{border-color:#999}.border-dark-grey[_ngcontent-%COMP%]{border-color:#2222}.border-white[_ngcontent-%COMP%], .border-fff[_ngcontent-%COMP%]{border-color:#fff}.no-border-radius[_ngcontent-%COMP%]{border-radius:0}.radius3[_ngcontent-%COMP%]{border-radius:3px}.radius5[_ngcontent-%COMP%]{border-radius:5px}.radius10[_ngcontent-%COMP%]{border-radius:10px}.column-mandatory[_ngcontent-%COMP%]{color:#5cb85c;text-align:center}.not-column-mandatory[_ngcontent-%COMP%]{color:#666f73;text-align:center}.cdk-drag-placeholder[_ngcontent-%COMP%]{background:#3498db}.yes[_ngcontent-%COMP%]{color:#5cb85c!important;background-color:#5cb85c;height:4px;cursor:none}.no[_ngcontent-%COMP%]{color:red;background-color:red;height:4px;cursor:none}.strike[_ngcontent-%COMP%]{text-decoration:line-through;color:red}.transfer[_ngcontent-%COMP%]{color:#16a085}.linked[_ngcontent-%COMP%]{color:#4461e2}.accrual[_ngcontent-%COMP%]{color:#999}.fa-question[_ngcontent-%COMP%]{color:#4461e2}.enabled[_ngcontent-%COMP%]{color:#32cd32}.disabled[_ngcontent-%COMP%]{color:#f44366}.v-mid[_ngcontent-%COMP%], .v-m[_ngcontent-%COMP%]{vertical-align:middle}.v-top[_ngcontent-%COMP%], .v-t[_ngcontent-%COMP%]{vertical-align:top}.v-bottom[_ngcontent-%COMP%], .v-b[_ngcontent-%COMP%]{vertical-align:bottom}.v-super[_ngcontent-%COMP%]{vertical-align:super}.r-amount[_ngcontent-%COMP%]{text-align:right!important;padding-right:5px!important}.left[_ngcontent-%COMP%]{text-align:left!important}.right[_ngcontent-%COMP%]{text-align:right!important}.center[_ngcontent-%COMP%]{text-align:center!important}.amount-plus[_ngcontent-%COMP%]{color:#000}.amount-minus[_ngcontent-%COMP%]{color:#4461e2}.block[_ngcontent-%COMP%]{display:block}.inline[_ngcontent-%COMP%]{display:inline}.in-block[_ngcontent-%COMP%]{display:inline-block;zoom:1}.d-none[_ngcontent-%COMP%], .hide[_ngcontent-%COMP%], .hidden[_ngcontent-%COMP%]{display:none}.t-0[_ngcontent-%COMP%]{top:0}.b-0[_ngcontent-%COMP%]{bottom:0}.l-0[_ngcontent-%COMP%]{left:0}.r-0[_ngcontent-%COMP%]{right:0}.tb-0[_ngcontent-%COMP%]{top:0;bottom:0}.lr-0[_ngcontent-%COMP%]{left:0;right:0}.f-left[_ngcontent-%COMP%]{float:left}.f-right[_ngcontent-%COMP%]{float:right}.f-none[_ngcontent-%COMP%]{float:none}textarea[_ngcontent-%COMP%]{resize:both}textarea.vertical[_ngcontent-%COMP%], textarea.horizontal[_ngcontent-%COMP%]{resize:vertical}textarea.noresize[_ngcontent-%COMP%]{resize:none}.full-input[_ngcontent-%COMP%] input[_ngcontent-%COMP%], .full-input[_ngcontent-%COMP%] select[_ngcontent-%COMP%], .full-input[_ngcontent-%COMP%] textarea[_ngcontent-%COMP%]{width:100%}.normal[_ngcontent-%COMP%] input[_ngcontent-%COMP%], .normal[_ngcontent-%COMP%] select[_ngcontent-%COMP%], .normal[_ngcontent-%COMP%] textarea[_ngcontent-%COMP%], .full-input[_ngcontent-%COMP%] [type=checkbox][_ngcontent-%COMP%], .full-input[_ngcontent-%COMP%] [type=radio][_ngcontent-%COMP%]{width:auto}.mat-tab-body-content[_ngcontent-%COMP%]{margin-bottom:20px}.mat-datepicker-input[_ngcontent-%COMP%]{margin-top:5px;margin-bottom:5px}.loader-wrapper[_ngcontent-%COMP%]{height:100vh;width:100vw}.loader-wrapper[_ngcontent-%COMP%] .triangle[_ngcontent-%COMP%]{width:0;height:0;border-style:solid;position:absolute;animation:_ngcontent-%COMP%_rotate .8s infinite .2s}.loader-wrapper[_ngcontent-%COMP%] .bottom[_ngcontent-%COMP%]{border-width:0 90px 90px;border-color:transparent transparent #1fb050;bottom:calc(50% - 100px);left:calc(50% - 90px)}.loader-wrapper[_ngcontent-%COMP%] .top[_ngcontent-%COMP%]{border-width:90px 90px 0;border-color:#b4d575 transparent transparent;top:calc(50% - 100px);left:calc(50% - 90px)}.loader-wrapper[_ngcontent-%COMP%] .left[_ngcontent-%COMP%]{border-width:90px 0 90px 90px;border-color:transparent transparent transparent #1074b9;top:calc(50% - 90px);left:calc(50% - 100px)}.loader-wrapper[_ngcontent-%COMP%] .right[_ngcontent-%COMP%]{border-width:90px 90px 90px 0;border-color:transparent #1daeec transparent transparent;top:calc(50% - 90px);right:calc(50% - 100px)}@keyframes _ngcontent-%COMP%_rotate{0%{transform:rotate(0)}to{transform:rotate(360deg)}}body[_ngcontent-%COMP%]{margin:0}.container[_ngcontent-%COMP%]{margin:0 auto}.mb-05[_ngcontent-%COMP%]{margin-bottom:.5rem}.mr-05[_ngcontent-%COMP%]{margin-right:.5rem}.mb-1[_ngcontent-%COMP%]{margin-bottom:1rem}.mt-1[_ngcontent-%COMP%]{margin-top:1rem}.m-5[_ngcontent-%COMP%]{margin:5px}.m-t-5[_ngcontent-%COMP%]{margin-top:5px}.m-r-5[_ngcontent-%COMP%]{margin-right:5px}.m-b-5[_ngcontent-%COMP%]{margin-bottom:5px}.m-l-5[_ngcontent-%COMP%]{margin-left:5px}.m-v-5[_ngcontent-%COMP%]{margin:5px 0}.m-h-5[_ngcontent-%COMP%]{margin:0 5px}.m-10[_ngcontent-%COMP%]{margin:10px}.m-t-10[_ngcontent-%COMP%]{margin-top:10px}.m-r-10[_ngcontent-%COMP%]{margin-right:10px}.m-b-10[_ngcontent-%COMP%]{margin-bottom:10px}.m-l-10[_ngcontent-%COMP%]{margin-left:10px}.m-v-10[_ngcontent-%COMP%]{margin:10px 0}.m-h-10[_ngcontent-%COMP%]{margin:0 10px}.m-15[_ngcontent-%COMP%]{margin:15px}.m-t-15[_ngcontent-%COMP%]{margin-top:15px}.m-r-15[_ngcontent-%COMP%]{margin-right:15px}.m-b-15[_ngcontent-%COMP%]{margin-bottom:15px}.m-l-15[_ngcontent-%COMP%]{margin-left:15px}.m-v-15[_ngcontent-%COMP%]{margin:15px 0}.m-h-15[_ngcontent-%COMP%]{margin:0 15px}.m-20[_ngcontent-%COMP%]{margin:20px}.m-t-20[_ngcontent-%COMP%]{margin-top:20px}.m-r-20[_ngcontent-%COMP%]{margin-right:20px}.m-b-20[_ngcontent-%COMP%]{margin-bottom:20px}.m-l-20[_ngcontent-%COMP%]{margin-left:20px}.m-v-20[_ngcontent-%COMP%]{margin:20px 0}.m-h-20[_ngcontent-%COMP%]{margin:0 20px}.m-25[_ngcontent-%COMP%]{margin:25px}.m-t-25[_ngcontent-%COMP%]{margin-top:25px}.m-r-25[_ngcontent-%COMP%]{margin-right:25px}.m-b-25[_ngcontent-%COMP%]{margin-bottom:25px}.m-l-25[_ngcontent-%COMP%]{margin-left:25px}.m-v-25[_ngcontent-%COMP%]{margin:25px 0}.m-h-25[_ngcontent-%COMP%]{margin:0 25px}.m-30[_ngcontent-%COMP%]{margin:30px}.m-t-30[_ngcontent-%COMP%]{margin-top:30px}.m-r-30[_ngcontent-%COMP%]{margin-right:30px}.m-b-30[_ngcontent-%COMP%]{margin-bottom:30px}.m-l-30[_ngcontent-%COMP%]{margin-left:30px}.m-v-30[_ngcontent-%COMP%]{margin:30px 0}.m-h-30[_ngcontent-%COMP%]{margin:0 30px}.m-35[_ngcontent-%COMP%]{margin:35px}.m-t-35[_ngcontent-%COMP%]{margin-top:35px}.m-r-35[_ngcontent-%COMP%]{margin-right:35px}.m-b-35[_ngcontent-%COMP%]{margin-bottom:35px}.m-l-35[_ngcontent-%COMP%]{margin-left:35px}.m-v-35[_ngcontent-%COMP%]{margin:35px 0}.m-h-35[_ngcontent-%COMP%]{margin:0 35px}.m-40[_ngcontent-%COMP%]{margin:40px}.m-t-40[_ngcontent-%COMP%]{margin-top:40px}.m-r-40[_ngcontent-%COMP%]{margin-right:40px}.m-b-40[_ngcontent-%COMP%]{margin-bottom:40px}.m-l-40[_ngcontent-%COMP%]{margin-left:40px}.m-v-40[_ngcontent-%COMP%]{margin:40px 0}.m-h-40[_ngcontent-%COMP%]{margin:0 40px}.m-45[_ngcontent-%COMP%]{margin:45px}.m-t-45[_ngcontent-%COMP%]{margin-top:45px}.m-r-45[_ngcontent-%COMP%]{margin-right:45px}.m-b-45[_ngcontent-%COMP%]{margin-bottom:45px}.m-l-45[_ngcontent-%COMP%]{margin-left:45px}.m-v-45[_ngcontent-%COMP%]{margin:45px 0}.m-h-45[_ngcontent-%COMP%]{margin:0 45px}.m-50[_ngcontent-%COMP%]{margin:50px}.m-t-50[_ngcontent-%COMP%]{margin-top:50px}.m-r-50[_ngcontent-%COMP%]{margin-right:50px}.m-b-50[_ngcontent-%COMP%]{margin-bottom:50px}.m-l-50[_ngcontent-%COMP%]{margin-left:50px}.m-v-50[_ngcontent-%COMP%]{margin:50px 0}.m-h-50[_ngcontent-%COMP%]{margin:0 50px}.m-55[_ngcontent-%COMP%]{margin:55px}.m-t-55[_ngcontent-%COMP%]{margin-top:55px}.m-r-55[_ngcontent-%COMP%]{margin-right:55px}.m-b-55[_ngcontent-%COMP%]{margin-bottom:55px}.m-l-55[_ngcontent-%COMP%]{margin-left:55px}.m-v-55[_ngcontent-%COMP%]{margin:55px 0}.m-h-55[_ngcontent-%COMP%]{margin:0 55px}.m-60[_ngcontent-%COMP%]{margin:60px}.m-t-60[_ngcontent-%COMP%]{margin-top:60px}.m-r-60[_ngcontent-%COMP%]{margin-right:60px}.m-b-60[_ngcontent-%COMP%]{margin-bottom:60px}.m-l-60[_ngcontent-%COMP%]{margin-left:60px}.m-v-60[_ngcontent-%COMP%]{margin:60px 0}.m-h-60[_ngcontent-%COMP%]{margin:0 60px}.m-65[_ngcontent-%COMP%]{margin:65px}.m-t-65[_ngcontent-%COMP%]{margin-top:65px}.m-r-65[_ngcontent-%COMP%]{margin-right:65px}.m-b-65[_ngcontent-%COMP%]{margin-bottom:65px}.m-l-65[_ngcontent-%COMP%]{margin-left:65px}.m-v-65[_ngcontent-%COMP%]{margin:65px 0}.m-h-65[_ngcontent-%COMP%]{margin:0 65px}.m-70[_ngcontent-%COMP%]{margin:70px}.m-t-70[_ngcontent-%COMP%]{margin-top:70px}.m-r-70[_ngcontent-%COMP%]{margin-right:70px}.m-b-70[_ngcontent-%COMP%]{margin-bottom:70px}.m-l-70[_ngcontent-%COMP%]{margin-left:70px}.m-v-70[_ngcontent-%COMP%]{margin:70px 0}.m-h-70[_ngcontent-%COMP%]{margin:0 70px}.m-75[_ngcontent-%COMP%]{margin:75px}.m-t-75[_ngcontent-%COMP%]{margin-top:75px}.m-r-75[_ngcontent-%COMP%]{margin-right:75px}.m-b-75[_ngcontent-%COMP%]{margin-bottom:75px}.m-l-75[_ngcontent-%COMP%]{margin-left:75px}.m-v-75[_ngcontent-%COMP%]{margin:75px 0}.m-h-75[_ngcontent-%COMP%]{margin:0 75px}.m-80[_ngcontent-%COMP%]{margin:80px}.m-t-80[_ngcontent-%COMP%]{margin-top:80px}.m-r-80[_ngcontent-%COMP%]{margin-right:80px}.m-b-80[_ngcontent-%COMP%]{margin-bottom:80px}.m-l-80[_ngcontent-%COMP%]{margin-left:80px}.m-v-80[_ngcontent-%COMP%]{margin:80px 0}.m-h-80[_ngcontent-%COMP%]{margin:0 80px}.no-m[_ngcontent-%COMP%]{margin:0}.no-m-t[_ngcontent-%COMP%]{margin-top:0}.no-m-r[_ngcontent-%COMP%]{margin-right:0}.no-m-b[_ngcontent-%COMP%]{margin-bottom:0}.no-m-l[_ngcontent-%COMP%]{margin-left:0}.no-m-v[_ngcontent-%COMP%], .no-m-h[_ngcontent-%COMP%], .no-margin[_ngcontent-%COMP%]{margin:0}.no-m-lr[_ngcontent-%COMP%], .no-m-rl[_ngcontent-%COMP%]{margin-left:0;margin-right:0}.no-m-tb[_ngcontent-%COMP%], .no-m-bt[_ngcontent-%COMP%]{margin-top:0;margin-bottom:0}.m-t-only[_ngcontent-%COMP%]{margin-left:0;margin-right:0;margin-bottom:0}.m-b-only[_ngcontent-%COMP%]{margin-left:0;margin-right:0;margin-top:0}.m-l-only[_ngcontent-%COMP%]{margin-right:0;margin-top:0;margin-bottom:0}.m-r-only[_ngcontent-%COMP%]{margin-left:0;margin-top:0;margin-bottom:0}.m-auto[_ngcontent-%COMP%]{margin-left:auto;margin-right:auto}.ls-0[_ngcontent-%COMP%]{margin-left:10px;margin-right:10px}html[_ngcontent-%COMP%], body[_ngcontent-%COMP%]{-webkit-tap-highlight-color:transparent}div[_ngcontent-%COMP%]{box-sizing:border-box}.color-inherit[_ngcontent-%COMP%]{color:inherit}.no-shadow[_ngcontent-%COMP%]{box-shadow:none}.pointer[_ngcontent-%COMP%]{cursor:pointer}.nolist[_ngcontent-%COMP%]{list-style:none}.actions-menu[_ngcontent-%COMP%]{color:#fff}.alert[_ngcontent-%COMP%]{background-color:#e8f4fd;padding:6px 16px;font-size:.875rem;font-family:Roboto,Helvetica Neue,sans-serif;font-weight:400;line-height:1.43;border-radius:4px;letter-spacing:normal;margin:10px}.alert[_ngcontent-%COMP%] .message[_ngcontent-%COMP%]{padding:8px 0;font-size:18px}.alert[_ngcontent-%COMP%] .alert-check[_ngcontent-%COMP%]{color:#359ff4;margin-right:2px;font-size:1.4rem} .mat-tooltip{font-size:15px;color:#fff!important;background-color:#4461e2b3;border:1px solid rgb(25.7777777778,51.5555555556,166.2222222222);max-width:400px!important;white-space:pre-line!important}.loading[_ngcontent-%COMP%]{position:absolute;min-width:100%;width:100px;height:12px;background:linear-gradient(125deg,#fff,#4461e2,#fff);animation:grow 4s linear infinite,move 4s linear infinite}mat-card-title[_ngcontent-%COMP%]{font-weight:600;font-size:x-large;padding-left:20px;padding-top:20px}html[_ngcontent-%COMP%], body[_ngcontent-%COMP%]{overflow:hidden}.overflow-x-scroll[_ngcontent-%COMP%]{max-width:100%;overflow-x:auto}.overflow-no[_ngcontent-%COMP%]{overflow:hidden}.overflow-auto[_ngcontent-%COMP%]{overflow:auto}.overflow-scroll[_ngcontent-%COMP%]{overflow:scroll}.table-container[_ngcontent-%COMP%]{overflow-x:auto;max-width:100%}body[_ngcontent-%COMP%], .no-p[_ngcontent-%COMP%]{padding:0}.no-p-t[_ngcontent-%COMP%]{padding-top:0}.no-p-r[_ngcontent-%COMP%]{padding-right:0}.no-p-b[_ngcontent-%COMP%]{padding-bottom:0}.no-p-l[_ngcontent-%COMP%]{padding-left:0}.no-p-v[_ngcontent-%COMP%], .no-p-h[_ngcontent-%COMP%]{padding:0}.p-5[_ngcontent-%COMP%]{padding:5px}.p-t-5[_ngcontent-%COMP%]{padding-top:5px}.p-r-5[_ngcontent-%COMP%]{padding-right:5px}.p-b-5[_ngcontent-%COMP%]{padding-bottom:5px}.p-l-5[_ngcontent-%COMP%]{padding-left:5px}.p-v-5[_ngcontent-%COMP%]{padding:5px 0}.p-h-5[_ngcontent-%COMP%]{padding:0 5px}.p-10[_ngcontent-%COMP%]{padding:10px}.p-t-10[_ngcontent-%COMP%]{padding-top:10px}.p-b-10[_ngcontent-%COMP%]{padding-bottom:10px}.p-v-10[_ngcontent-%COMP%]{padding:10px 0}.p-h-10[_ngcontent-%COMP%]{padding:0 10px}.p-15[_ngcontent-%COMP%]{padding:15px}.p-t-15[_ngcontent-%COMP%]{padding-top:15px}.p-r-15[_ngcontent-%COMP%]{padding-right:15px}.p-b-15[_ngcontent-%COMP%]{padding-bottom:15px}.p-l-15[_ngcontent-%COMP%]{padding-left:15px}.p-v-15[_ngcontent-%COMP%]{padding:15px 0}.p-h-15[_ngcontent-%COMP%]{padding:0 15px}.p-20[_ngcontent-%COMP%]{padding:20px}.p-t-20[_ngcontent-%COMP%]{padding-top:20px}.p-r-20[_ngcontent-%COMP%]{padding-right:20px}.p-b-20[_ngcontent-%COMP%]{padding-bottom:20px}.p-l-20[_ngcontent-%COMP%]{padding-left:20px}.p-v-20[_ngcontent-%COMP%]{padding:20px 0}.p-h-20[_ngcontent-%COMP%]{padding:0 20px}.p-25[_ngcontent-%COMP%]{padding:25px}.p-t-25[_ngcontent-%COMP%]{padding-top:25px}.p-r-25[_ngcontent-%COMP%]{padding-right:25px}.p-b-25[_ngcontent-%COMP%]{padding-bottom:25px}.p-l-25[_ngcontent-%COMP%]{padding-left:25px}.p-v-25[_ngcontent-%COMP%]{padding:25px 0}.p-h-25[_ngcontent-%COMP%]{padding:0 25px}.p-30[_ngcontent-%COMP%]{padding:30px}.p-t-30[_ngcontent-%COMP%]{padding-top:30px}.p-r-30[_ngcontent-%COMP%]{padding-right:30px}.p-b-30[_ngcontent-%COMP%]{padding-bottom:30px}.p-l-30[_ngcontent-%COMP%]{padding-left:30px}.p-v-30[_ngcontent-%COMP%]{padding:30px 0}.p-h-30[_ngcontent-%COMP%]{padding:0 30px}.p-35[_ngcontent-%COMP%]{padding:35px}.p-t-35[_ngcontent-%COMP%]{padding-top:35px}.p-r-35[_ngcontent-%COMP%]{padding-right:35px}.p-b-35[_ngcontent-%COMP%]{padding-bottom:35px}.p-l-35[_ngcontent-%COMP%]{padding-left:35px}.p-v-35[_ngcontent-%COMP%]{padding:35px 0}.p-h-35[_ngcontent-%COMP%]{padding:0 35px}.p-40[_ngcontent-%COMP%]{padding:40px}.p-t-40[_ngcontent-%COMP%]{padding-top:40px}.p-r-40[_ngcontent-%COMP%]{padding-right:40px}.p-b-40[_ngcontent-%COMP%]{padding-bottom:40px}.p-l-40[_ngcontent-%COMP%]{padding-left:40px}.p-v-40[_ngcontent-%COMP%]{padding-top:40px;padding-bottom:40px}.p-h-40[_ngcontent-%COMP%]{padding:0 40px}.p-45[_ngcontent-%COMP%]{padding:45px}.p-t-45[_ngcontent-%COMP%]{padding-top:45px}.p-r-45[_ngcontent-%COMP%]{padding-right:45px}.p-b-45[_ngcontent-%COMP%]{padding-bottom:45px}.p-l-45[_ngcontent-%COMP%]{padding-left:45px}.p-v-45[_ngcontent-%COMP%]{padding:45px 0}.p-h-45[_ngcontent-%COMP%]{padding:0 45px}.p-50[_ngcontent-%COMP%]{padding:50px}.p-t-50[_ngcontent-%COMP%]{padding-top:50px}.p-r-50[_ngcontent-%COMP%]{padding-right:50px}.p-b-50[_ngcontent-%COMP%]{padding-bottom:50px}.p-l-50[_ngcontent-%COMP%]{padding-left:50px}.p-v-50[_ngcontent-%COMP%]{padding:50px 0}.p-h-50[_ngcontent-%COMP%]{padding:0 50px}.p-55[_ngcontent-%COMP%]{padding:55px}.p-t-55[_ngcontent-%COMP%]{padding-top:55px}.p-r-55[_ngcontent-%COMP%]{padding-right:55px}.p-b-55[_ngcontent-%COMP%]{padding-bottom:55px}.p-l-55[_ngcontent-%COMP%]{padding-left:55px}.p-v-55[_ngcontent-%COMP%]{padding:55px 0}.p-h-55[_ngcontent-%COMP%]{padding:0 55px}.p-60[_ngcontent-%COMP%]{padding:60px}.p-t-60[_ngcontent-%COMP%]{padding-top:60px}.p-r-60[_ngcontent-%COMP%]{padding-right:60px}.p-b-60[_ngcontent-%COMP%]{padding-bottom:60px}.p-l-60[_ngcontent-%COMP%]{padding-left:60px}.p-v-60[_ngcontent-%COMP%]{padding:60px 0}.p-h-60[_ngcontent-%COMP%]{padding:0 60px}.p-65[_ngcontent-%COMP%]{padding:65px}.p-t-65[_ngcontent-%COMP%]{padding-top:65px}.p-r-65[_ngcontent-%COMP%]{padding-right:65px}.p-b-65[_ngcontent-%COMP%]{padding-bottom:65px}.p-l-65[_ngcontent-%COMP%]{padding-left:65px}.p-v-65[_ngcontent-%COMP%]{padding:65px 0}.p-h-65[_ngcontent-%COMP%]{padding:0 65px}.p-70[_ngcontent-%COMP%]{padding:70px}.p-t-70[_ngcontent-%COMP%]{padding-top:70px}.p-r-70[_ngcontent-%COMP%]{padding-right:70px}.p-b-70[_ngcontent-%COMP%]{padding-bottom:70px}.p-l-70[_ngcontent-%COMP%]{padding-left:70px}.p-v-70[_ngcontent-%COMP%]{padding:70px 0}.p-h-70[_ngcontent-%COMP%]{padding:0 70px}.p-75[_ngcontent-%COMP%]{padding:75px}.p-t-75[_ngcontent-%COMP%]{padding-top:75px}.p-r-75[_ngcontent-%COMP%]{padding-right:75px}.p-b-75[_ngcontent-%COMP%]{padding-bottom:75px}.p-l-75[_ngcontent-%COMP%]{padding-left:75px}.p-v-75[_ngcontent-%COMP%]{padding:75px 0}.p-h-75[_ngcontent-%COMP%]{padding:0 75px}.p-80[_ngcontent-%COMP%]{padding:80px}.p-t-80[_ngcontent-%COMP%]{padding-top:80px}.p-r-80[_ngcontent-%COMP%]{padding-right:80px}.p-b-80[_ngcontent-%COMP%]{padding-bottom:80px}.p-l-80[_ngcontent-%COMP%]{padding-left:80px}.p-v-80[_ngcontent-%COMP%]{padding:80px 0}.p-h-80[_ngcontent-%COMP%]{padding:0 80px}.no-padding[_ngcontent-%COMP%]{padding:0!important}.no-pad-lr[_ngcontent-%COMP%], .no-pad-rl[_ngcontent-%COMP%]{padding-left:0;padding-right:0}.no-pad-tb[_ngcontent-%COMP%], .no-pad-bt[_ngcontent-%COMP%]{padding-top:0;padding-bottom:0}.pad-t-only[_ngcontent-%COMP%]{padding-left:0;padding-right:0;padding-bottom:0}.pad-b-only[_ngcontent-%COMP%]{padding-left:0;padding-right:0;padding-top:0}.pad-l-only[_ngcontent-%COMP%]{padding-right:0;padding-top:0;padding-bottom:0}.pad-r-only[_ngcontent-%COMP%]{padding-left:0;padding-top:0;padding-bottom:0}html[_ngcontent-%COMP%], body[_ngcontent-%COMP%], .rel[_ngcontent-%COMP%], .relative[_ngcontent-%COMP%]{position:relative}.abs[_ngcontent-%COMP%], .absolute[_ngcontent-%COMP%]{position:absolute}.fixed[_ngcontent-%COMP%]{position:fixed}.status-active[_ngcontent-%COMP%]{color:#5cb85c}.status-inactive[_ngcontent-%COMP%]{color:#666f73}.status-deleted[_ngcontent-%COMP%]{color:#000}.status-pending[_ngcontent-%COMP%]{color:orange}.status-approved[_ngcontent-%COMP%]{color:#4461e2}.status-overpaid[_ngcontent-%COMP%]{color:purple}.status-chargeoff[_ngcontent-%COMP%]{color:#f39c12}.status-active-overdue[_ngcontent-%COMP%], .status-block[_ngcontent-%COMP%]{color:red}.status-matured[_ngcontent-%COMP%]{color:#ff4000}.subStatus-contract-termination[_ngcontent-%COMP%]{color:#b3b3b3}.mat-step-header[_ngcontent-%COMP%] .mat-step-icon-state-done[_ngcontent-%COMP%]{background-color:#2af72a}.mat-step-header[_ngcontent-%COMP%] .mat-step-icon-state-done[_ngcontent-%COMP%] .status-transfer-progress[_ngcontent-%COMP%]{color:#ff4000}.mat-step-header[_ngcontent-%COMP%] .mat-step-icon-state-done[_ngcontent-%COMP%] .status-transfer-hold[_ngcontent-%COMP%]{color:#df0101}html[_ngcontent-%COMP%], body[_ngcontent-%COMP%]{-webkit-font-smoothing:antialiased}html[_ngcontent-%COMP%]{font-size:16px}body[_ngcontent-%COMP%]{font-family:Roboto,Helvetica Neue,sans-serif;font-weight:400;font-size:14px;color:#000000de;line-height:1.5;letter-spacing:normal}.mat-h1[_ngcontent-%COMP%], .mat-headline[_ngcontent-%COMP%], .mat-typography[_ngcontent-%COMP%] .mat-h1[_ngcontent-%COMP%], .mat-typography[_ngcontent-%COMP%] .mat-headline[_ngcontent-%COMP%], .mat-typography[_ngcontent-%COMP%] h1[_ngcontent-%COMP%]{font:400 24px/32px Roboto,Helvetica Neue,sans-serif;letter-spacing:normal;margin:0 0 16px}.lh-1[_ngcontent-%COMP%]{line-height:1}.lh-13[_ngcontent-%COMP%]{line-height:1.3}.lh-15[_ngcontent-%COMP%]{line-height:1.5}.bold[_ngcontent-%COMP%], .strong[_ngcontent-%COMP%]{font-weight:700}.no-bold[_ngcontent-%COMP%]{font-weight:400}.italic[_ngcontent-%COMP%], .em[_ngcontent-%COMP%]{font-style:italic}.strike[_ngcontent-%COMP%]{text-decoration:line-through}.normal[_ngcontent-%COMP%]{font-weight:400;font-style:normal}.uppercase[_ngcontent-%COMP%]{text-transform:uppercase}.text-left[_ngcontent-%COMP%]{text-align:left}.text-center[_ngcontent-%COMP%]{text-align:center}.text-right[_ngcontent-%COMP%]{text-align:right}.w100[_ngcontent-%COMP%]{font-weight:100}.w200[_ngcontent-%COMP%]{font-weight:200}.w300[_ngcontent-%COMP%]{font-weight:300}.w400[_ngcontent-%COMP%]{font-weight:400}.w500[_ngcontent-%COMP%]{font-weight:500}.w600[_ngcontent-%COMP%]{font-weight:600}.w700[_ngcontent-%COMP%]{font-weight:700}.w800[_ngcontent-%COMP%]{font-weight:800}.w900[_ngcontent-%COMP%]{font-weight:900}.f9[_ngcontent-%COMP%]{font-size:9px}.f10[_ngcontent-%COMP%]{font-size:10px}.f11[_ngcontent-%COMP%]{font-size:11px}.f12[_ngcontent-%COMP%]{font-size:12px}.f13[_ngcontent-%COMP%]{font-size:13px}.f14[_ngcontent-%COMP%]{font-size:14px}.f15[_ngcontent-%COMP%]{font-size:15px}.f16[_ngcontent-%COMP%]{font-size:16px}.f17[_ngcontent-%COMP%]{font-size:17px}.f18[_ngcontent-%COMP%]{font-size:18px;line-height:30px}.f19[_ngcontent-%COMP%]{font-size:19px}.f20[_ngcontent-%COMP%]{font-size:20px}.f30[_ngcontent-%COMP%]{font-size:30px}.f40[_ngcontent-%COMP%]{font-size:40px}.f50[_ngcontent-%COMP%]{font-size:50px}.f60[_ngcontent-%COMP%]{font-size:60px}.size-small[_ngcontent-%COMP%]{font-size:75%}.size-normal[_ngcontent-%COMP%]{font-size:100%}.size-medium[_ngcontent-%COMP%]{font-size:125%}.size-big[_ngcontent-%COMP%], .size-large[_ngcontent-%COMP%]{font-size:150%}.size-huge[_ngcontent-%COMP%]{font-size:200%}.inherit[_ngcontent-%COMP%]{font:inherit}.text-shadow[_ngcontent-%COMP%]{text-shadow:1px 1px 1px rgba(0,0,0,.4)}.text-rgb-2[_ngcontent-%COMP%]{color:#0003}.text-rgb-3[_ngcontent-%COMP%]{color:#0000004d}.text-rgb-4[_ngcontent-%COMP%]{color:#0006}.text-rgb-5[_ngcontent-%COMP%]{color:#00000080}.no-ul[_ngcontent-%COMP%], .no-ul[_ngcontent-%COMP%]:hover, .no-ul[_ngcontent-%COMP%] a[_ngcontent-%COMP%], .no-ul[_ngcontent-%COMP%] a[_ngcontent-%COMP%]:hover{text-decoration:none}.no-wrap[_ngcontent-%COMP%]{white-space:nowrap}.auto-cell-size[_ngcontent-%COMP%]{white-space:nowrap;width:1%}.ls-0[_ngcontent-%COMP%]{letter-spacing:-3px;white-space:nowrap}.label-field[_ngcontent-%COMP%]{margin-top:32px}.wrap-content[_ngcontent-%COMP%]{overflow-wrap:break-word;word-wrap:break-word}.no-break-content[_ngcontent-%COMP%]{overflow-wrap:anywhere!important}.fit[_ngcontent-%COMP%]{max-width:100%}.half-width[_ngcontent-%COMP%]{width:50%}.full-width[_ngcontent-%COMP%]{width:100%}.full-height[_ngcontent-%COMP%]{height:100%}html[_ngcontent-%COMP%], body[_ngcontent-%COMP%]{width:100%;height:100%;min-height:100%}body[_ngcontent-%COMP%] table[_ngcontent-%COMP%]{width:100%}.container[_ngcontent-%COMP%]{max-width:74rem;width:90%}.mw300[_ngcontent-%COMP%]{max-width:300px}.mw400[_ngcontent-%COMP%]{max-width:400px}.mw500[_ngcontent-%COMP%]{max-width:500px}.mw600[_ngcontent-%COMP%]{max-width:600px}.fullwidth[_ngcontent-%COMP%]{width:100%}.zindex-1[_ngcontent-%COMP%]{z-index:1}.zindex-2[_ngcontent-%COMP%]{z-index:2}.zindex-3[_ngcontent-%COMP%]{z-index:3}.zindex-4[_ngcontent-%COMP%]{z-index:4}.container[_ngcontent-%COMP%]{max-width:37rem}.container[_ngcontent-%COMP%] .card-content[_ngcontent-%COMP%] div[_ngcontent-%COMP%]{margin:1rem 0;word-wrap:break-word}.container[_ngcontent-%COMP%] .card-content[_ngcontent-%COMP%] mifosx-transaction-payment-detail[_ngcontent-%COMP%]{width:100%;margin-bottom:20px}.transaction-buttons[_ngcontent-%COMP%]{margin-top:3%}.active[_ngcontent-%COMP%]{background-color:#5cb85c;height:4px}.linked[_ngcontent-%COMP%]{background-color:#4461e2;height:4px}.undo[_ngcontent-%COMP%]{background-color:red;height:4px}"]})}}return t})();function Pm(t,m){t&1&&(i(0,"div",0),C(1,"div",2),a())}function Om(t,m){if(t&1&&(i(0,"td"),C(1,"mifosx-external-identifier",7),a()),t&2){let e=h(3);n(),d("externalId",ft(e.savingsAccountData.externalId))}}function Dm(t,m){t&1&&(i(0,"td"),r(1),c(2,"translate"),a()),t&2&&(n(),p(l(2,1,"labels.inputs.Not Provided")))}function ym(t,m){if(t&1&&(i(0,"span"),r(1),c(2,"formatNumber"),a()),t&2){let e=h(3);n(),f("",l(2,1,e.savingsAccountData.nominalAnnualInterestRate)," %")}}function Im(t,m){t&1&&(i(0,"span"),r(1,"0 %"),a())}function wm(t,m){if(t&1&&(i(0,"div")(1,"h4",5),r(2),c(3,"translate"),a(),i(4,"table")(5,"tbody")(6,"tr")(7,"td"),r(8),c(9,"translate"),a(),v(10,Om,2,2,"td"),v(11,Dm,3,3,"td"),a(),i(12,"tr")(13,"td"),r(14),c(15,"translate"),a(),i(16,"td"),r(17),c(18,"dateFormat"),a()(),i(19,"tr")(20,"td"),r(21),c(22,"translate"),a(),i(23,"td"),r(24),a()(),i(25,"tr")(26,"td"),r(27),c(28,"translate"),a(),i(29,"td"),r(30),a()(),i(31,"tr")(32,"td"),r(33),c(34,"translate"),a(),i(35,"td",6),v(36,ym,3,3,"span"),v(37,Im,2,0,"span"),a()()()()()),t&2){let e=h(2);n(2),p(l(3,14,"labels.heading.Savings Details")),n(6),p(l(9,16,"labels.inputs.External Id")),n(2),_(e.savingsAccountData.externalId?10:-1),n(),_(e.savingsAccountData.externalId?-1:11),n(3),p(l(15,18,"labels.inputs.Activated On")),n(3),f(" ",e.savingsAccountData.timeline.activatedOnDate?l(18,20,e.savingsAccountData.timeline.activatedOnDate):"Not Activated"," "),n(4),p(l(22,22,"labels.inputs.Field Officer")),n(3),p(e.savingsAccountData.fieldOfficerName?e.savingsAccountData.fieldOfficerName:"Unassigned"),n(3),p(l(28,24,"labels.inputs.Currency")),n(3),V("",e.savingsAccountData.currency.name," [",e.savingsAccountData.currency.code,"]"),n(3),p(l(34,26,"labels.inputs.Nominal Interest Rate")),n(3),_(e.savingsAccountData.nominalAnnualInterestRate?36:-1),n(),_(e.savingsAccountData.nominalAnnualInterestRate?-1:37)}}function Em(t,m){if(t&1&&(i(0,"div")(1,"h4",5),r(2),c(3,"translate"),a(),i(4,"table")(5,"tbody")(6,"tr")(7,"td"),r(8),c(9,"translate"),a(),i(10,"td"),r(11),a()(),i(12,"tr")(13,"td"),r(14),c(15,"translate"),a(),i(16,"td",6),r(17),c(18,"currency"),a()()()()()),t&2){let e=h(2);n(2),p(l(3,5,"labels.heading.Savings Details")),n(6),p(l(9,7,"labels.inputs.Field Officer")),n(3),p(e.savingsAccountData.fieldOfficerName?e.savingsAccountData.fieldOfficerName:"Unassigned"),n(3),p(l(15,9,"labels.inputs.Balance")),n(3),f(" ",tt(18,11,e.savingsAccountData.summary.accountBalance,e.currency.code,"symbol-narrow","1.2-2")," ")}}function Fm(t,m){if(t&1&&(i(0,"tr")(1,"td"),r(2),c(3,"translate"),a(),i(4,"td",6),r(5),c(6,"currency"),a()()),t&2){let e=h(3);n(2),p(l(3,2,"labels.inputs.Total Deposits")),n(3),f(" ",tt(6,4,e.savingsAccountData.summary.totalDeposits,e.currency.code,"symbol-narrow","1.2-2")," ")}}function km(t,m){if(t&1&&(i(0,"tr")(1,"td"),r(2),c(3,"translate"),a(),i(4,"td",6),r(5),c(6,"currency"),a()()),t&2){let e=h(3);n(2),p(l(3,2,"labels.inputs.Total Interest Earned")),n(3),f(" ",tt(6,4,e.savingsAccountData.summary.totalInterestEarned,e.currency.code,"symbol-narrow","1.2-2")," ")}}function Bm(t,m){if(t&1&&(i(0,"div")(1,"h4",5),r(2),c(3,"translate"),a(),i(4,"table")(5,"tbody"),v(6,Fm,7,9,"tr"),v(7,km,7,9,"tr"),a()()()),t&2){let e=h(2);n(2),p(l(3,3,"labels.heading.Performance History")),n(4),_(e.savingsAccountData.summary.totalDeposits?6:-1),n(),_(e.savingsAccountData.summary.totalInterestEarned>=0?7:-1)}}function Nm(t,m){if(t&1&&(i(0,"tr")(1,"td"),r(2),c(3,"translate"),a(),i(4,"td",6),r(5),c(6,"currency"),a()()),t&2){let e=h(3);n(2),p(l(3,2,"labels.inputs.Total Withdrawls")),n(3),f(" ",tt(6,4,e.savingsAccountData.summary.totalWithdrawals,e.currency.code,"symbol-narrow","1.2-2")," ")}}function Rm(t,m){if(t&1&&(i(0,"tr")(1,"td"),r(2),c(3,"translate"),a(),i(4,"td",6),r(5),c(6,"currency"),a()()),t&2){let e=h(3);n(2),p(l(3,2,"labels.inputs.Withdrawals Fees")),n(3),f(" ",tt(6,4,e.savingsAccountData.summary.totalWithdrawalFees,e.currency.code,"symbol-narrow","1.2-2")," ")}}function Vm(t,m){if(t&1&&(i(0,"tr")(1,"td"),r(2),c(3,"translate"),a(),i(4,"td",6),r(5),c(6,"currency"),a()()),t&2){let e=h(3);n(2),p(l(3,2,"labels.inputs.Annual Fees")),n(3),f(" ",tt(6,4,e.savingsAccountData.summary.totalAnnualFees,e.currency.code,"symbol-narrow","1.2-2")," ")}}function Lm(t,m){if(t&1&&(i(0,"tr")(1,"td"),r(2),c(3,"translate"),a(),i(4,"td",6),r(5),c(6,"currency"),a()()),t&2){let e=h(3);n(2),p(l(3,2,"labels.inputs.Interest Earned")),n(3),f(" ",tt(6,4,e.savingsAccountData.summary.totalInterestEarned,e.currency.code,"symbol-narrow","1.2-2")," ")}}function Gm(t,m){if(t&1&&(i(0,"tr")(1,"td"),r(2),c(3,"translate"),a(),i(4,"td",6),r(5),c(6,"currency"),a()()),t&2){let e=h(3);n(2),p(l(3,2,"labels.inputs.Interest Posted")),n(3),f(" ",tt(6,4,e.savingsAccountData.summary.totalInterestPosted,e.currency.code,"symbol-narrow","1.2-2")," ")}}function Um(t,m){if(t&1&&(i(0,"tr")(1,"td"),r(2),c(3,"translate"),a(),i(4,"td",6),r(5),c(6,"currency"),a()()),t&2){let e=h(3);n(2),p(l(3,2,"labels.inputs.Interest Earned Not Posted")),n(3),f(" ",tt(6,4,e.savingsAccountData.summary.interestNotPosted,e.currency.code,"symbol-narrow","1.2-2")," ")}}function qm(t,m){if(t&1&&(i(0,"tr")(1,"td"),r(2),c(3,"translate"),a(),i(4,"td",6),r(5),c(6,"currency"),a()()),t&2){let e=h(3);n(2),p(l(3,2,"labels.inputs.Interest On Overdraft")),n(3),f(" ",tt(6,4,e.savingsAccountData.summary.totalOverdraftInterestDerived,e.currency.code,"symbol-narrow","1.2-2")," ")}}function Hm(t,m){if(t&1&&(i(0,"tr")(1,"td"),r(2),c(3,"translate"),a(),i(4,"td",6),r(5),c(6,"currency"),a()()),t&2){let e=h(3);n(2),p(l(3,2,"labels.inputs.Overdraft Interest Not Posted")),n(3),f(" ",tt(6,4,e.savingsAccountData.summary.interestNotPosted,e.currency.code,"symbol-narrow","1.2-2")," ")}}function zm(t,m){if(t&1&&(i(0,"tr")(1,"td"),r(2),c(3,"translate"),a(),i(4,"td",6),r(5),c(6,"formatNumber"),a()()),t&2){let e=h(3);n(2),p(l(3,2,"labels.inputs.Nominal Interest Rate")),n(3),f("",l(6,4,e.savingsAccountData.nominalAnnualInterestRate)," %")}}function jm(t,m){if(t&1&&(i(0,"tr")(1,"td"),r(2),c(3,"translate"),a(),i(4,"td",6),r(5),c(6,"currency"),a()()),t&2){let e=h(3);n(2),p(l(3,2,"labels.inputs.Withdrawal Fee")),n(3),f(" ",tt(6,4,e.savingsAccountData.withdrawalFee.amount,e.currency.code,"symbol-narrow","1.2-2")," ")}}function $m(t,m){if(t&1&&(i(0,"tr")(1,"td"),r(2),c(3,"translate"),a(),i(4,"td"),r(5),c(6,"dateFormat"),a()()),t&2){let e=h(3);n(2),p(l(3,2,"labels.inputs.Last Active Transaction Date")),n(3),p(l(6,4,e.savingsAccountData.lastActiveTransactionDate))}}function Wm(t,m){if(t&1&&(i(0,"tr")(1,"td"),r(2),c(3,"translate"),a(),i(4,"td"),r(5),a()()),t&2){let e=h(3);n(2),p(l(3,2,"labels.inputs.Substatus")),n(3),p(e.savingsAccountData.subStatus.value)}}function Qm(t,m){if(t&1&&(i(0,"tr")(1,"td"),r(2),c(3,"translate"),a(),i(4,"td"),r(5),a()()),t&2){let e=h(3);n(2),p(l(3,2,"labels.inputs.Days to Inactive")),n(3),p(e.savingsAccountData.daysToInactive)}}function Km(t,m){if(t&1&&(i(0,"tr")(1,"td"),r(2),c(3,"translate"),a(),i(4,"td"),r(5),a()()),t&2){let e=h(3);n(2),p(l(3,2,"labels.inputs.Days to Dormancy")),n(3),p(e.savingsAccountData.daysToDormancy)}}function Ym(t,m){if(t&1&&(i(0,"tr")(1,"td"),r(2),c(3,"translate"),a(),i(4,"td"),r(5),a()()),t&2){let e=h(3);n(2),p(l(3,2,"labels.inputs.Days to Escheat")),n(3),p(e.savingsAccountData.daysToEscheat)}}function Jm(t,m){if(t&1&&(i(0,"tr")(1,"td"),r(2),c(3,"translate"),a(),i(4,"td",6),r(5),c(6,"currency"),a()()),t&2){let e=h(3);n(2),p(l(3,2,"labels.inputs.Annual Fee")),n(3),f(" ",tt(6,4,e.savingsAccountData.annualFee.amount,e.currency.code,"symbol-narrow","1.2-2")," ")}}function Xm(t,m){if(t&1&&(i(0,"tr")(1,"td"),r(2),c(3,"translate"),a(),i(4,"td",6),r(5),c(6,"currency"),a()()),t&2){let e=h(3);n(2),p(l(3,2,"labels.inputs.Overdraft Limit")),n(3),f(" ",tt(6,4,e.savingsAccountData.overdraftLimit,e.currency.code,"symbol-narrow","1.2-2")," ")}}function Zm(t,m){if(t&1&&(i(0,"tr")(1,"td"),r(2),c(3,"translate"),a(),i(4,"td"),r(5),c(6,"currency"),a()()),t&2){let e=h(3);n(2),p(l(3,2,"labels.inputs.Minimum Overdraft Required for Interest Calculation")),n(3),f(" ",tt(6,4,e.savingsAccountData.minOverdraftForInterestCalculation,e.currency.code,"symbol-narrow","1.2-2")," ")}}function tp(t,m){if(t&1&&(i(0,"tr")(1,"td"),r(2),c(3,"translate"),a(),i(4,"td"),r(5),c(6,"formatNumber"),a()()),t&2){let e=h(3);n(2),p(l(3,2,"labels.inputs.Min Balance Required for Interest Calculation")),n(3),p(l(6,4,e.savingsAccountData.minBalanceForInterestCalculation))}}function ep(t,m){if(t&1&&(i(0,"tr")(1,"td"),r(2),c(3,"translate"),a(),i(4,"td"),r(5),c(6,"formatNumber"),a()()),t&2){let e=h(3);n(2),p(l(3,2,"labels.inputs.Minimum Required Balance")),n(3),p(l(6,4,e.savingsAccountData.minRequiredBalance))}}function np(t,m){if(t&1&&(i(0,"tr")(1,"td"),r(2),c(3,"translate"),a(),i(4,"td"),r(5),c(6,"yesNo"),a()()),t&2){let e=h(3);n(2),p(l(3,2,"labels.inputs.Enforce Minimum Required Balance")),n(3),p(l(6,4,e.savingsAccountData.enforceMinRequiredBalance))}}function ip(t,m){if(t&1&&(i(0,"tr")(1,"td"),r(2),c(3,"translate"),a(),i(4,"td"),r(5),c(6,"dateFormat"),a()()),t&2){let e=h(3);n(2),p(l(3,2,"labels.inputs.Interest Recalculation Date")),n(3),p(l(6,4,e.savingsAccountData.summary.lastInterestCalculationDate))}}function ap(t,m){if(t&1&&(i(0,"a"),r(1),c(2,"currency"),a()),t&2){let e=h(4);n(),p(tt(2,1,e.savingsAccountData.onHoldFunds,e.currency.code,"symbol-narrow","1.2-2"))}}function op(t,m){t&1&&(i(0,"tr")(1,"td"),r(2),c(3,"translate"),a(),i(4,"td"),A(5,ap,3,6,"a",8),a()()),t&2&&(n(2),p(l(3,2,"labels.inputs.On Hold Funds")),n(3),d("mifosxHasPermission","READ_SAVINGSACCOUNT"))}function rp(t,m){if(t&1&&(i(0,"tr")(1,"td"),r(2),c(3,"translate"),a(),i(4,"td"),r(5),a()()),t&2){let e=h(3);n(2),p(l(3,2,"labels.inputs.Withhold Tax Group")),n(3),p(e.savingsAccountData.taxGroup.name)}}function cp(t,m){if(t&1&&(i(0,"div",4)(1,"h4",5),r(2),c(3,"translate"),a(),i(4,"table")(5,"tbody"),v(6,Nm,7,9,"tr"),v(7,Rm,7,9,"tr"),v(8,Vm,7,9,"tr"),v(9,Lm,7,9,"tr"),v(10,Gm,7,9,"tr"),v(11,Um,7,9,"tr"),v(12,qm,7,9,"tr"),v(13,Hm,7,9,"tr"),v(14,zm,7,6,"tr"),i(15,"tr")(16,"td"),r(17),c(18,"translate"),a(),i(19,"td"),r(20),c(21,"translateKey"),a()(),i(22,"tr")(23,"td"),r(24),c(25,"translate"),a(),i(26,"td"),r(27),c(28,"translateKey"),a()(),i(29,"tr")(30,"td"),r(31),c(32,"translate"),a(),i(33,"td"),r(34),c(35,"translateKey"),a()(),i(36,"tr")(37,"td"),r(38),c(39,"translate"),a(),i(40,"td"),r(41),c(42,"translateKey"),a()(),v(43,jm,7,9,"tr"),v(44,$m,7,6,"tr"),v(45,Wm,6,4,"tr"),v(46,Qm,6,4,"tr"),v(47,Km,6,4,"tr"),v(48,Ym,6,4,"tr"),v(49,Jm,7,9,"tr"),v(50,Xm,7,9,"tr"),v(51,Zm,7,9,"tr"),v(52,tp,7,6,"tr"),v(53,ep,7,6,"tr"),v(54,np,7,6,"tr"),v(55,ip,7,6,"tr"),v(56,op,6,4,"tr"),v(57,rp,6,4,"tr"),a()()()),t&2){let e=h(2);n(2),p(l(3,33,"labels.heading.Account Summary")),n(4),_(e.savingsAccountData.summary.totalWithdrawals?6:-1),n(),_(e.savingsAccountData.summary.totalWithdrawalFees?7:-1),n(),_(e.savingsAccountData.summary.totalAnnualFees?8:-1),n(),_(e.savingsAccountData.summary.totalInterestEarned>=0?9:-1),n(),_(e.savingsAccountData.summary.totalInterestPosted?10:-1),n(),_(e.savingsAccountData.summary.interestNotPosted>=0?11:-1),n(),_(e.savingsAccountData.summary.totalOverdraftInterestDerived?12:-1),n(),_(e.savingsAccountData.summary.interestNotPosted<0?13:-1),n(),_(e.savingsAccountData.nominalAnnualInterestRate?14:-1),n(3),p(l(18,35,"labels.inputs.Interest Compounding Period")),n(3),p(Mt(21,37,e.savingsAccountData.interestCompoundingPeriodType.value,"catalogs")),n(4),p(l(25,40,"labels.inputs.Interest Posting Period")),n(3),p(Mt(28,42,e.savingsAccountData.interestPostingPeriodType.value,"catalogs")),n(4),p(l(32,45,"labels.inputs.Interest Calculated Using")),n(3),p(Mt(35,47,e.savingsAccountData.interestCalculationType.value,"catalogs")),n(4),p(l(39,50,"labels.inputs.Days in Year")),n(3),p(Mt(42,52,e.savingsAccountData.interestCalculationDaysInYearType.value,"catalogs")),n(2),_(e.savingsAccountData.withdrawalFee?43:-1),n(),_(e.savingsAccountData.lastActiveTransactionDate?44:-1),n(),_(e.savingsAccountData.subStatus.id!==0?45:-1),n(),_(e.savingsAccountData.daysToInactive?46:-1),n(),_(e.savingsAccountData.daysToDormancy?47:-1),n(),_(e.savingsAccountData.daysToEscheat?48:-1),n(),_(e.savingsAccountData.annualFee?49:-1),n(),_(e.savingsAccountData.allowOverdraft?50:-1),n(),_(e.savingsAccountData.allowOverdraft?51:-1),n(),_(e.savingsAccountData.minBalanceForInterestCalculation?52:-1),n(),_(e.savingsAccountData.minRequiredBalance?53:-1),n(),_(e.savingsAccountData.enforceMinRequiredBalance?54:-1),n(),_(e.savingsAccountData.summary.lastInterestCalculationDate?55:-1),n(),_(e.savingsAccountData.onHoldFunds?56:-1),n(),_(e.savingsAccountData.withHoldTax?57:-1)}}function sp(t,m){if(t&1&&(i(0,"td"),C(1,"mifosx-external-identifier",7),a()),t&2){let e=h(3);n(),d("externalId",ft(e.savingsAccountData.externalId))}}function lp(t,m){t&1&&(i(0,"td"),r(1),c(2,"translate"),a()),t&2&&(n(),p(l(2,1,"labels.inputs.Not Provided")))}function mp(t,m){if(t&1&&(i(0,"div",4)(1,"h4",5),r(2),c(3,"translate"),a(),i(4,"table")(5,"tbody")(6,"tr")(7,"td"),r(8),c(9,"translate"),a(),v(10,sp,2,2,"td"),v(11,lp,3,3,"td"),a(),i(12,"tr")(13,"td"),r(14),c(15,"translate"),a(),i(16,"td"),r(17),c(18,"dateFormat"),a()(),i(19,"tr")(20,"td"),r(21),c(22,"translate"),a(),i(23,"td"),r(24),a()()()()()),t&2){let e=h(2);n(2),p(l(3,9,"labels.heading.Account Summary")),n(6),p(l(9,11,"labels.inputs.External Id")),n(2),_(e.savingsAccountData.externalId?10:-1),n(),_(e.savingsAccountData.externalId?-1:11),n(3),p(l(15,13,"labels.inputs.Activated On")),n(3),f(" ",e.savingsAccountData.timeline.activatedOnDate?l(18,15,e.savingsAccountData.timeline.activatedOnDate):"Not Activated"," "),n(4),p(l(22,17,"labels.inputs.Currency")),n(3),V("",e.savingsAccountData.currency.name," [",e.savingsAccountData.currency.code,"]")}}function pp(t,m){if(t&1&&(i(0,"div",1)(1,"div",3),v(2,wm,38,28,"div")(3,Em,19,16,"div"),v(4,Bm,8,5,"div"),a(),v(5,cp,58,55,"div",4)(6,mp,25,19,"div",4),a()),t&2){let e=h();n(2),_(!e.savingsAccountData.status.rejected&&!e.savingsAccountData.status.submittedAndPendingApproval?2:3),n(2),_(!e.savingsAccountData.status.rejected&&!e.savingsAccountData.status.submittedAndPendingApproval?4:-1),n(),_(e.isActive?5:6)}}var Yn=(()=>{class t{constructor(){this.route=g(E),this.router=g(z),this.isLoading=!0,this.isActive=!1,this.route.parent.parent.data.subscribe(e=>{this.savingsAccountData=e.savingsAccountData,this.currency=this.savingsAccountData.currency,this.isLoading=!1;let s=this.savingsAccountData.status.value;this.isActive=s==="Active"}),this.router.url.includes("clients")?this.entityType="Client":this.router.url.includes("groups")?this.entityType="Group":this.router.url.includes("centers")&&(this.entityType="Center")}static{this.\u0275fac=function(s){return new(s||t)}}static{this.\u0275cmp=T({type:t,selectors:[["mifosx-general-tab"]],decls:2,vars:2,consts:[[1,"loader"],[1,"savings-account-tables","layout-row","gap-2percent"],[1,"loading"],[1,"flex-49","layout-column","gap-4percent"],[1,"flex-49"],[1,"table-headers"],[1,"r-amount"],[3,"externalId"],[4,"mifosxHasPermission"]],template:function(s,o){s&1&&(v(0,Pm,2,0,"div",0),v(1,pp,7,3,"div",1)),s&2&&(_(o.isLoading?0:-1),n(),_(o.isLoading?-1:1))},dependencies:[P,O,Rt,Be,ue,Bt,y,Nt,me,mn],styles:[".loader[_ngcontent-%COMP%]{margin-bottom:39px;overflow:auto}.sidenav[_ngcontent-%COMP%]{overflow-x:hidden}@keyframes _ngcontent-%COMP%_move{0%{left:0}16.7%{left:0}33.3%{left:640px}50%{left:1120px}66.7%{left:640px}83.3%{left:0}to{left:0}}@keyframes _ngcontent-%COMP%_grow{0%{width:160px}16.7%{width:640px}33.3%{width:640px}50%{width:160px}66.7%{width:640px}83.3%{width:640px}to{width:160px}}.general-tab-container[_ngcontent-%COMP%]{padding:16px 20px;width:100%;box-sizing:border-box;position:relative;background-color:var(--background-color, #f8f9fa);color:var(--text-color, #333);transition:background-color .3s ease,color .3s ease}.general-tab-container[_ngcontent-%COMP%] .page-header[_ngcontent-%COMP%]{margin-bottom:24px;padding:16px 0;position:relative;border-bottom:1px solid var(--border-color, #e9ecef)}.general-tab-container[_ngcontent-%COMP%] .page-header[_ngcontent-%COMP%] .header-title[_ngcontent-%COMP%]{font-size:1.75rem;font-weight:600;margin:0 0 8px;line-height:1.2;color:var(--primary-color, #007bff);position:relative}.general-tab-container[_ngcontent-%COMP%] .page-header[_ngcontent-%COMP%] .header-subtitle[_ngcontent-%COMP%]{font-size:.95rem;margin:0;line-height:1.4;color:var(--text-secondary, #6c757d);position:relative}.general-tab-container[_ngcontent-%COMP%] .content-wrapper[_ngcontent-%COMP%]{position:relative;width:100%}.general-tab-container[_ngcontent-%COMP%] .account-info-card[_ngcontent-%COMP%]{background:var(--card-background, #fff);border-radius:8px;box-shadow:0 2px 4px #0000001a;overflow:hidden;position:relative;width:100%;max-width:600px;transition:box-shadow .3s ease,background-color .3s ease}.general-tab-container[_ngcontent-%COMP%] .account-info-card[_ngcontent-%COMP%] .card-header[_ngcontent-%COMP%]{padding:16px 20px;background:var(--card-header-bg, #f8f9fa);border-bottom:1px solid var(--border-color, #e9ecef);position:relative}.general-tab-container[_ngcontent-%COMP%] .account-info-card[_ngcontent-%COMP%] .card-header[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{margin:0;font-size:1.1rem;font-weight:600;line-height:1.3;color:var(--text-color, #333)}.general-tab-container[_ngcontent-%COMP%] .account-info-card[_ngcontent-%COMP%] .card-content[_ngcontent-%COMP%]{padding:20px;position:relative}.general-tab-container[_ngcontent-%COMP%] .account-info-card[_ngcontent-%COMP%] .card-content[_ngcontent-%COMP%] .info-row[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:baseline;padding:10px 0;border-bottom:1px solid var(--border-light, #f1f3f4);position:relative;min-height:24px}.general-tab-container[_ngcontent-%COMP%] .account-info-card[_ngcontent-%COMP%] .card-content[_ngcontent-%COMP%] .info-row[_ngcontent-%COMP%]:last-child{border-bottom:none}.general-tab-container[_ngcontent-%COMP%] .account-info-card[_ngcontent-%COMP%] .card-content[_ngcontent-%COMP%] .info-row[_ngcontent-%COMP%] .label[_ngcontent-%COMP%]{font-weight:500;color:var(--text-secondary, #6c757d);flex:0 0 auto;margin-right:16px;white-space:nowrap;line-height:1.4}.general-tab-container[_ngcontent-%COMP%] .account-info-card[_ngcontent-%COMP%] .card-content[_ngcontent-%COMP%] .info-row[_ngcontent-%COMP%] .value[_ngcontent-%COMP%]{font-weight:600;color:var(--text-color, #333);text-align:right;flex:1 1 auto;line-height:1.4}.general-tab-container[_ngcontent-%COMP%] .account-info-card[_ngcontent-%COMP%] .card-content[_ngcontent-%COMP%] .info-row[_ngcontent-%COMP%] .value.currency[_ngcontent-%COMP%]{color:var(--success-color, #28a745);font-size:1.05rem}[data-theme=dark][_ngcontent-%COMP%] .general-tab-container[_ngcontent-%COMP%], .dark-theme[_ngcontent-%COMP%] .general-tab-container[_ngcontent-%COMP%]{--background-color: #1a1a1a;--text-color: #e9ecef;--text-secondary: #adb5bd;--primary-color: #4dabf7;--card-background: #2d3748;--card-header-bg: #374151;--border-color: #4a5568;--border-light: #2d3748;--success-color: #68d391}@media (width <= 768px){.general-tab-container[_ngcontent-%COMP%]{padding:12px 16px}.general-tab-container[_ngcontent-%COMP%] .page-header[_ngcontent-%COMP%]{margin-bottom:20px;padding:12px 0}.general-tab-container[_ngcontent-%COMP%] .page-header[_ngcontent-%COMP%] .header-title[_ngcontent-%COMP%]{font-size:1.5rem}.general-tab-container[_ngcontent-%COMP%] .page-header[_ngcontent-%COMP%] .header-subtitle[_ngcontent-%COMP%]{font-size:.9rem}.general-tab-container[_ngcontent-%COMP%] .account-info-card[_ngcontent-%COMP%] .card-header[_ngcontent-%COMP%]{padding:14px 16px}.general-tab-container[_ngcontent-%COMP%] .account-info-card[_ngcontent-%COMP%] .card-content[_ngcontent-%COMP%]{padding:16px}.general-tab-container[_ngcontent-%COMP%] .account-info-card[_ngcontent-%COMP%] .card-content[_ngcontent-%COMP%] .info-row[_ngcontent-%COMP%]{padding:8px 0}.general-tab-container[_ngcontent-%COMP%] .account-info-card[_ngcontent-%COMP%] .card-content[_ngcontent-%COMP%] .info-row[_ngcontent-%COMP%] .label[_ngcontent-%COMP%]{margin-right:12px}}"]})}}return t})();var dp=[{path:"",data:{title:"All Savings",breadcrumb:"Savings",routeParamBreadcrumb:!1,addBreadcrumbLink:!1},children:[{path:"create",data:{title:"Create Savings Account",breadcrumb:"Create Savings Account"},component:Nn,resolve:{savingsAccountTemplate:jn}},{path:":savingAccountId",data:{title:"Saving Account View",routeParamBreadcrumb:"savingAccountId"},component:Cn,resolve:{savingsAccountData:qe,savingsDatatables:ai},children:[{path:"",redirectTo:"general",pathMatch:"full"},{path:"general",data:{title:"Savings Account Details",breadcrumb:"General",routeParamBreadcrumb:!1},children:[{path:"",component:Yn}]},{path:"transactions",data:{title:"Savings Account Transactions",breadcrumb:"Transactions",routeParamBreadcrumb:!1},children:[{path:"",component:vn},{path:"export",component:Un}]},{path:"charges",component:Fn,data:{title:"Savings Account Charges",breadcrumb:"Charges",routeParamBreadcrumb:!1}},{path:"standing-instructions",component:kn,data:{title:"Savings Account SIH",breadcrumb:"Standing Instructions",routeParamBreadcrumb:!1}},{path:"notes",component:Wn,data:{title:"Savings Account Notes",breadcrumb:"Notes",routeParamBreadcrumb:!1},resolve:{savingAccountNotes:Hi}},{path:"documents",component:$n,data:{title:"Savings Account Documents",breadcrumb:"Documents",routeParamBreadcrumb:!1},resolve:{savingsDocuments:zi}},{path:"datatables",children:[{path:":datatableName",component:Bn,data:{title:"View Data Table",routeParamBreadcrumb:"datatableName"},resolve:{savingsDatatable:ii}}]}]},{path:":savingAccountId/edit",data:{title:"Edit Savings Account",breadcrumb:"Edit",routeParamBreadcrumb:!1},component:Rn,resolve:{savingsAccountAndTemplate:si}},{path:":savingAccountId/transactions/:id",data:{title:"Savings Account Transactions",breadcrumb:"Transactions",routeParamBreadcrumb:!1},children:[{path:"",component:Vn,resolve:{transactionDatatables:ci},children:[{path:"",redirectTo:"general",pathMatch:"full"},{path:"general",component:Kn,resolve:{savingsAccountTransaction:li}},{path:"datatables",children:[{path:":datatableName",component:_n,data:{title:"View Data table",routeParamBreadcrumb:"datatableName"},resolve:{transactionDatatable:ri}}]}]},{path:"edit",component:qn,data:{breadcrumb:"Edit",routeParamBreadcrumb:!1},resolve:{savingsAccountTransactionTemplate:ui}},{path:"reciept",component:Gn,data:{breadcrumb:"Reciept",routeParamBreadcrumb:!1},resolve:{savingsTransactionReciept:di}}]},{path:":savingAccountId/charges",data:{title:"Savings Account Charges",breadcrumb:"Charges",routeParamBreadcrumb:!1},children:[{path:"",redirectTo:"../charges",pathMatch:"prefix"},{path:":id",data:{routeParamBreadcrumb:"id"},component:Ln,resolve:{savingsAccountData:qe,savingsAccountCharge:mi}}]},{path:":savingAccountId/actions/:name",data:{title:"Savings Account Actions",breadcrumb:"Savings Account Actions",routeParamBreadcrumb:"name"},component:En,resolve:{savingsAccountActionData:pi}},{path:":savingAccountId/transfer-funds",loadChildren:()=>import("./account-transfers.module-IS46QWMU.js").then(t=>t.AccountTransfersModule)},{path:"gsim-account",children:[{path:"create",data:{title:"Create GSIM Application",breadcrumb:"Create GSIM Application"},component:Hn,resolve:{groupsData:qi,savingsAccountTemplate:jn}},{path:":savingAccountId",data:{title:"GSIM Account View",routeParamBreadcrumb:"savingAccountId"},children:[{path:"",component:zn,resolve:{gsimData:gi,savingAccountData:qe,groupsData:ni}}]}]}]}],ji=(()=>{class t{static{this.\u0275fac=function(s){return new(s||t)}}static{this.\u0275mod=Qe({type:t})}static{this.\u0275inj=je({providers:[qe,ai,ii,ri,ci,jn,si,li,mi,pi,di,ui,Ui,ni,gi],imports:[ti.forChild(dp),ti]})}}return t})();var $i=(()=>{class t{constructor(){}static{this.\u0275fac=function(s){return new(s||t)}}static{this.\u0275cmp=T({type:t,selectors:[["mifosx-savings-transaction-datatable-tab"]],decls:3,vars:3,template:function(s,o){s&1&&(vi(0,"p"),r(1),c(2,"translate"),_i()),s&2&&(n(),f("",l(2,1,"labels.heading.savings-transaction-datatable-tab works"),"!"))},dependencies:[P,O,y],encapsulation:2})}}return t})();var l2=(()=>{class t{static{this.\u0275fac=function(s){return new(s||t)}}static{this.\u0275mod=Qe({type:t})}static{this.\u0275inj=je({imports:[Li,Ei,Bi,ji,En,Dn,vn,Cn,Fn,kn,Bn,Nn,oe,ce,re,be,Rn,hn,xn,bn,Sn,Mn,An,Tn,un,gn,Vn,Ve,Ln,Le,Ge,Pn,On,yn,He,Gn,Un,qn,In,zn,Hn,wn,Qn,$n,Wn,_n,Kn,$i,Yn,ze]})}}return t})();export{l2 as SavingsModule}; diff --git a/browser/shares.module-TB7CSVYK.js b/browser/shares.module-7U5BMOVV.js similarity index 99% rename from browser/shares.module-TB7CSVYK.js rename to browser/shares.module-7U5BMOVV.js index 0673d5d7b..f59035263 100644 --- a/browser/shares.module-TB7CSVYK.js +++ b/browser/shares.module-7U5BMOVV.js @@ -1 +1 @@ -import{$c as li,$d as bt,$e as xt,$f as ot,Ad as Ci,Bc as ft,Bd as X,Cc as St,Cd as ue,Cf as Di,Da as y,Dc as He,Df as yi,Ea as E,Eb as Xe,Ec as Ct,Ef as Ei,Fb as T,Fc as vt,Fd as he,G as Oe,Ga as R,Gc as _t,Gd as Z,H as mt,Hc as At,Hd as Ze,Ia as b,Id as fe,Ig as Bi,Ja as A,Jd as et,K as f,Kg as ki,L as I,Lc as pi,Ld as tt,M,Mc as P,Na as ee,Nd as je,Oa as te,Ob as ut,Od as Se,Pa as ie,Pd as Ce,Qa as F,Qd as ve,Qe as it,Rb as si,Rc as ne,Rd as vi,Sc as j,Sd as Fe,T as pt,Td as Ve,Ua as s,Ud as gt,Uf as It,Va as l,Wa as S,Wc as re,Wf as Ii,Xa as w,Xc as G,Xd as be,Yc as oe,Zc as Y,Zf as Mi,_d as _i,_e as at,_f as rt,ag as Pi,bb as L,bf as Tt,bg as wi,ca as t,cd as J,cf as Dt,da as lt,dd as di,de as Ai,df as yt,eb as O,ef as Et,fb as ri,fd as se,ff as nt,ge as gi,gf as Le,hb as o,hc as B,he as bi,hf as xe,ib as c,ic as ci,id as ce,ie as xi,if as Te,ja as x,jb as ae,jf as De,ka as dt,kb as oi,kc as Q,lb as _e,lc as W,ld as me,lf as ye,mc as mi,mf as Ee,na as C,nc as ti,ne as Ti,of as Ie,pd as pe,pf as Me,pg as Ri,qb as Je,qc as ht,qd as ui,ra as v,rc as N,rd as D,rf as Pe,rg as Fi,sa as _,sd as le,sf as we,ta as Be,td as hi,ua as ke,ud as fi,uf as Re,va as Ne,vd as de,wa as d,xa as a,xd as ge,xf as qe,ya as n,yd as Si,za as h,zg as Mt}from"./chunk-OX7PN44D.js";import{a as H,b as K}from"./chunk-PHUH23IY.js";var k=(()=>{class e{constructor(){this.http=f(si)}getSharesAccountData(i,m){let r=new ut().set("template",m.toString());return this.http.get(`/accounts/share/${i}`,{params:r})}getSharesAccountTemplate(i,m){let r=new ut().set("clientId",i);return r=m?r.set("productId",m):r,this.http.get("/accounts/share/template",{params:r})}createSharesAccount(i){return this.http.post("/accounts/share",i)}updateSharesAccount(i,m){return this.http.put(`/accounts/share/${i}`,m)}deleteSharesAccount(i){return this.http.delete(`/accounts/share/${i}`)}executeSharesAccountCommand(i,m,r){let u=new ut().set("command",m);return this.http.post(`/accounts/share/${i}`,r,{params:u})}static{this.\u0275fac=function(m){return new(m||e)}}static{this.\u0275prov=Oe({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();var Pt=class{constructor(p){this.setOptions(p),this.setButtons(p)}get singleButtons(){return this.buttonsArray}get options(){return this.optionArray}setButtons(p){switch(p){case"Active":this.buttonsArray=[{name:"Apply Additional Shares",icon:"arrow-right",taskPermissionName:"APPLYADDITIONAL_SHAREACCOUNT"},{name:"Approve Additional Shares",icon:"arrow-right",taskPermissionName:"APPROVEADDITIONAL_SHAREACCOUNT"},{name:"Reject Additional Shares",icon:"arrow-left",taskPermissionName:"REJECTADDITIONAL_SHAREACCOUNT"},{name:"Redeem Shares",icon:"arrow-left",taskPermissionName:"WITHDRAW_SAVINGSACCOUNT"}];break;case"Submitted and pending approval":this.buttonsArray=[{name:"Modify Application",icon:"pencil",taskPermissionName:"UPDATE_SHAREACCOUNT"},{name:"Approve",icon:"check",taskPermissionName:"APPROVE_SHAREACCOUNT"}];break;case"Approved":this.buttonsArray=[{name:"Undo Approval",icon:"undo",taskPermissionName:"APPROVALUNDO_SHAREACCOUNT"},{name:"Activate",icon:"check",taskPermissionName:"ACTIVATE_SHAREACCOUNT"}];break;default:this.buttonsArray=[]}}setOptions(p){switch(p){case"Active":this.optionArray=[{name:"Close",taskPermissionName:"CLOSE_SHAREACCOUNT"}];break;case"Submitted and pending approval":this.optionArray=[{name:"Reject",taskPermissionName:"REJECT_SHAREACCOUNT"},{name:"Delete",taskPermissionName:"DELETE_SHAREACCOUNT"}];break;case"Approved":default:this.optionArray=[]}}addOption(p){this.optionArray.push(p)}removeButton(p){let m=this.buttonsArray.map(r=>r.name).indexOf(p);this.buttonsArray.splice(m,1)}};var Hi=()=>["./general"],ji=()=>["./transactions"],Li=()=>["./charges"],Ui=()=>["./dividends"];function $i(e,p){if(e&1&&(a(0,"span",21),h(1,"mifosx-account-number",30),n()),e&2){let i=A();t(),d("accountNo",L(i.sharesAccountData.clientAccountNo))}}function Gi(e,p){if(e&1&&(a(0,"tr")(1,"td"),s(2),o(3,"translate"),n(),a(4,"td"),s(5),o(6,"translateKey"),n()()),e&2){let i=A();t(2),S("",c(3,3,"labels.inputs.Lockin Period")," :"),t(3),w(" ",i.sharesAccountData.lockinPeriod," ",ae(6,5,i.sharesAccountData.lockPeriodTypeEnum.value,"catalogs")," ")}}function zi(e,p){if(e&1&&(a(0,"button",25)(1,"mat-icon",31),h(2,"fa-icon",32),n()()),e&2){A();let i=F(42);d("matMenuTriggerFor",i)}}function Qi(e,p){if(e&1){let i=R();a(0,"button",34),b("click",function(){I(i);let r=A().$implicit,u=A();return M(u.doAction(r.name))}),a(1,"mat-icon",35),h(2,"fa-icon",36),n(),a(3,"span"),s(4),o(5,"translate"),n()()}if(e&2){let i=A().$implicit;t(2),d("icon",L(i.icon)),t(2),l(c(5,3,"labels.menus."+i.name))}}function Ki(e,p){if(e&1&&C(0,Qi,6,5,"button",33),e&2){let i=p.$implicit;d("mifosxHasPermission",i.taskPermissionName)}}function Wi(e,p){if(e&1){let i=R();a(0,"button",34),b("click",function(){I(i);let r=A().$implicit,u=A(2);return M(u.doAction(r.name))}),s(1),o(2,"translate"),n()}if(e&2){let i=A().$implicit;t(),S(" ",c(2,1,"labels.menus."+i.name)," ")}}function Yi(e,p){if(e&1&&(a(0,"span"),C(1,Wi,3,3,"button",33),n()),e&2){let i=p.$implicit;t(),d("mifosxHasPermission",i.taskPermissionName)}}function Ji(e,p){if(e&1&&(a(0,"button",37),s(1),o(2,"translate"),n(),a(3,"mat-menu",null,2),ke(5,Yi,2,1,"span",null,Be),n()),e&2){let i=F(4),m=A();d("matMenuTriggerFor",i),t(),l(c(2,2,"labels.menus.More")),t(4),Ne(m.buttonConfig.options)}}function Xi(e,p){if(e&1&&(a(0,"a",38,3),s(2),o(3,"translate"),n()),e&2){let i=F(1);d("routerLink",O(5,Hi))("active",i.isActive),t(2),S(" ",c(3,3,"labels.inputs.General")," ")}}function Zi(e,p){if(e&1&&(a(0,"a",38,4),s(2),o(3,"translate"),n()),e&2){let i=F(1);d("routerLink",O(5,ji))("active",i.isActive),t(2),S(" ",c(3,3,"labels.inputs.Transactions")," ")}}function ea(e,p){if(e&1&&(a(0,"a",38,5),s(2),o(3,"translate"),n()),e&2){let i=F(1);d("routerLink",O(5,Li))("active",i.isActive),t(2),S(" ",c(3,3,"labels.inputs.Charges")," ")}}function ta(e,p){if(e&1&&(a(0,"a",38,6),s(2),o(3,"translate"),n()),e&2){let i=F(1);d("routerLink",O(5,Ui))("active",i.isActive),t(2),S(" ",c(3,3,"labels.inputs.Dividends")," ")}}var Rt=(()=>{class e{constructor(){this.route=f(B),this.router=f(Q),this.sharesService=f(k),this.dialog=f(He),this.route.data.subscribe(i=>{this.sharesAccountData=i.sharesAccountData})}ngOnInit(){this.setConditionalButtons(),this.router.url.includes("clients")?this.entityType="Client":this.router.url.includes("groups")?this.entityType="Group":this.router.url.includes("centers")&&(this.entityType="Center")}setConditionalButtons(){let i=this.sharesAccountData.status.value;if(this.buttonConfig=new Pt(i),this.sharesAccountData.charges&&this.sharesAccountData.charges.forEach(r=>{r.name==="Annual fee - INR"&&this.buttonConfig.addOption({name:"Apply Anuual Fees",taskPermissionName:"APPLYANNUALFEE_SAVINGSACCOUNT"})}),i==="Active"){let m=this.sharesAccountData.purchasedShares,r=!1;m.forEach(u=>{u.status.code==="purchasedSharesStatusType.applied"&&u.type.code==="purchasedSharesType.purchased"&&(r=!0)}),r||(this.buttonConfig.removeButton("Approve Additional Shares"),this.buttonConfig.removeButton("Reject Additional Shares"))}}doAction(i){switch(i){case"Approve":case"Reject":case"Close":case"Activate":case"Undo Approval":case"Apply Additional Shares":case"Redeem Shares":case"Approve Additional Shares":case"Reject Additional Shares":this.router.navigate([`actions/${i}`],{relativeTo:this.route});break;case"Modify Application":this.router.navigate(["edit"],{relativeTo:this.route});break;case"Delete":this.deleteSharesAccount();break}}deleteSharesAccount(){this.dialog.open(bt,{data:{deleteContext:`shares account with id: ${this.sharesAccountData.id}`}}).afterClosed().subscribe(m=>{m.delete&&this.sharesService.deleteSharesAccount(this.sharesAccountData.id).subscribe(()=>{this.router.navigate(["../../"],{relativeTo:this.route})})})}static{this.\u0275fac=function(m){return new(m||e)}}static{this.\u0275cmp=x({type:e,selectors:[["mifosx-shares-account-view"]],decls:55,vars:37,consts:[["accountMenu","matMenu"],["tabPanel",""],["More","matMenu"],["general","routerLinkActive"],["transactions","routerLinkActive"],["charges","routerLinkActive"],["dividends","routerLinkActive"],[1,"account-card"],[1,"header","layout-column"],[1,"header-title-group"],[1,"profile-image-container"],["mat-card-md-image","","src","assets/images/shares_account_placeholder.png",1,"profile-image",3,"matTooltip"],[1,"mat-typography","account-card-title"],[1,"layout-row","responsive-column"],[1,"flex-60"],[1,"fa","fa-stop",3,"ngClass","matTooltip"],[1,"m-r-5"],[3,"textValue"],["display","left",3,"accountNo"],[1,"shares-overview"],[1,"m-r-10"],[1,"m-l-10"],[1,"account-overview"],[1,"flex-auto"],[1,"flex-40"],["mat-icon-button","","aria-label","Share account actions","yPosition","below",3,"matMenuTriggerFor"],["mat-menu-item",""],[1,"content"],["mat-tab-nav-bar","",1,"navigation-tabs",3,"tabPanel"],["mat-tab-link","","routerLinkActive","",3,"routerLink","active",4,"mifosxHasPermission"],[3,"accountNo"],["matListIcon","",1,"actions-menu"],["icon","bars","size","sm"],["mat-menu-item","",3,"click",4,"mifosxHasPermission"],["mat-menu-item","",3,"click"],["matListIcon",""],["size","sm",3,"icon"],["mat-menu-item","",3,"matMenuTriggerFor"],["mat-tab-link","","routerLinkActive","",3,"routerLink","active"]],template:function(m,r){if(m&1&&(a(0,"mat-card",7)(1,"mat-card-header",8)(2,"mat-card-title-group",9)(3,"div",10)(4,"div"),h(5,"img",11),o(6,"translate"),n()(),a(7,"div",12)(8,"mat-card-title")(9,"div",13)(10,"div",14)(11,"h3"),h(12,"i",15),o(13,"statusLookup"),a(14,"span",16),s(15),o(16,"translate"),n(),a(17,"span",16),h(18,"mifosx-long-text",17),n(),h(19,"mifosx-account-number",18),n(),a(20,"span",19)(21,"span",20),s(22),o(23,"translate"),o(24,"translate"),n(),s(25),v(26,$i,2,2,"span",21),n(),a(27,"div")(28,"table",22)(29,"tbody")(30,"tr")(31,"td"),s(32),o(33,"translate"),n(),a(34,"td"),s(35),o(36,"formatNumber"),n()(),v(37,Gi,7,8,"tr"),n()()()(),h(38,"span",23),a(39,"div",24),v(40,zi,3,1,"button",25),n()()()()(),a(41,"mat-menu",null,0),ke(43,Ki,1,1,"button",26,Be),v(45,Ji,7,4),n()(),a(46,"mat-card-content",27)(47,"nav",28),C(48,Xi,4,6,"a",29)(49,Zi,4,6,"a",29)(50,ea,4,6,"a",29)(51,ta,4,6,"a",29),n(),a(52,"mat-tab-nav-panel",null,1),h(54,"router-outlet"),n()()()),m&2){let u=F(53);t(5),d("matTooltip",L(c(6,23,"tooltips.Shares Account"))),t(7),d("ngClass",c(13,25,r.sharesAccountData.status.code))("matTooltip",r.sharesAccountData.status.value),t(3),S("",c(16,27,"labels.inputs.Share Product")," :"),t(3),d("textValue",L(r.sharesAccountData.productName)),t(),d("accountNo",L(r.sharesAccountData.accountNo)),t(3),w("",c(23,29,"labels.text."+r.entityType)," ",c(24,31,"labels.inputs.name")," :"),t(3),S("",r.sharesAccountData.clientName||r.sharesAccountData.groupName," "),t(),_(r.sharesAccountData.clientAccountNo?26:-1),t(6),S("",c(33,33,"labels.inputs.Current Market Price")," :"),t(3),l(c(36,35,r.sharesAccountData.currentMarketPrice)),t(2),_(r.sharesAccountData.lockinPeriod?37:-1),t(3),_(r.buttonConfig.singleButtons.length>0?40:-1),t(3),Ne(r.buttonConfig.singleButtons),t(2),_(r.buttonConfig.options.length?45:-1),t(2),d("tabPanel",u),t(),d("mifosxHasPermission","READ_SHAREACCOUNTPURCHASE"),t(),d("mifosxHasPermission","READ_SHAREACCOUNTPURCHASE"),t(),d("mifosxHasPermission","READ_SHAREACCOUNTCHARGE"),t(),d("mifosxHasPermission","READ_SHAREACCOUNTDIVIDENDS")}},dependencies:[T,Je,D,W,le,de,gt,Si,fi,Ci,je,hi,Bi,Mt,ht,xi,Ti,be,bi,gi,Di,yi,mi,Ei,ci,P,Ve,ot,rt],styles:[".shares-overview[_ngcontent-%COMP%]{font-size:14px}.account-overview[_ngcontent-%COMP%]{min-width:60%;font-weight:400}"]})}}return e})();function ia(e,p){e&1&&(a(0,"th",14),s(1),o(2,"translate"),n()),e&2&&(t(),l(c(2,1,"labels.inputs.Transaction Date")))}function aa(e,p){if(e&1&&(a(0,"td",15),s(1),o(2,"dateFormat"),n()),e&2){let i=p.$implicit;t(),l(c(2,1,i.purchasedDate))}}function na(e,p){e&1&&(a(0,"th",14),s(1),o(2,"translate"),n()),e&2&&(t(),l(c(2,1,"labels.inputs.Transaction Type")))}function ra(e,p){if(e&1&&(a(0,"td",15),s(1),n()),e&2){let i=p.$implicit;t(),w(" ",i.type.value," ",i.type.value!=="Charge Payment"?"("+i.status.value+")":""," ")}}function oa(e,p){e&1&&(a(0,"th",14),s(1),o(2,"translate"),n()),e&2&&(t(),l(c(2,1,"labels.inputs.Total Shares")))}function sa(e,p){if(e&1&&(a(0,"td",15),s(1),n()),e&2){let i=p.$implicit;t(),l(i.numberOfShares)}}function ca(e,p){e&1&&(a(0,"th",14),s(1),o(2,"translate"),n()),e&2&&(t(),l(c(2,1,"labels.inputs.Purhcased/Redeemed Price")))}function ma(e,p){if(e&1&&(a(0,"td",15),s(1),n()),e&2){let i=p.$implicit,m=A();t(),w(" ",m.shareAccountData.currency.displaySymbol,"\xA0",i.purchasedPrice," ")}}function pa(e,p){e&1&&(a(0,"th",14),s(1),o(2,"translate"),n()),e&2&&(t(),l(c(2,1,"labels.inputs.Charge Amount")))}function la(e,p){if(e&1&&(a(0,"td",15),s(1),n()),e&2){let i=p.$implicit,m=A();t(),w(" ",m.shareAccountData.currency.displaySymbol,"\xA0",i.type.value==="Charge Payment"?i.amount:i.chargeAmount," ")}}function da(e,p){e&1&&(a(0,"th",14),s(1),o(2,"translate"),n()),e&2&&(t(),l(c(2,1,"labels.inputs.Amount Recieved/Returned")))}function ua(e,p){if(e&1&&(a(0,"td",15),s(1),n()),e&2){let i=p.$implicit,m=A();t(),w(" ",m.shareAccountData.currency.displaySymbol,"\xA0",i.amount," ")}}function ha(e,p){e&1&&h(0,"tr",16)}function fa(e,p){e&1&&h(0,"tr",17)}var Ft=(()=>{class e{constructor(){this.route=f(B),this.displayedColumns=["transactionDate","transactionType","totalShares","purchasedOrRedeemedPrice","chargeAmount","amountRecievedOrReturned"],this.route.parent.data.subscribe(i=>{this.shareAccountData=i.sharesAccountData,this.transactionsData=this.shareAccountData.purchasedShares})}ngOnInit(){this.dataSource=new qe(this.transactionsData)}static{this.\u0275fac=function(m){return new(m||e)}}static{this.\u0275cmp=x({type:e,selectors:[["mifosx-transactions-tab"]],decls:27,vars:6,consts:[[1,"tab-container","mat-typography"],[1,"m-b-10"],[1,"mat-elevation-z1","m-b-25"],["mat-table","",3,"dataSource"],["matColumnDef","transactionDate"],["mat-header-cell","",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","transactionType"],["matColumnDef","totalShares"],["matColumnDef","purchasedOrRedeemedPrice"],["matColumnDef","chargeAmount"],["matColumnDef","amountRecievedOrReturned"],["mat-header-row","",4,"matHeaderRowDef"],["mat-row","",4,"matRowDef","matRowDefColumns"],["mat-header-cell",""],["mat-cell",""],["mat-header-row",""],["mat-row",""]],template:function(m,r){m&1&&(a(0,"div",0)(1,"div",1)(2,"h3"),s(3),o(4,"translate"),n()(),a(5,"div",2)(6,"table",3),y(7,4),C(8,ia,3,3,"th",5)(9,aa,3,3,"td",6),E(),y(10,7),C(11,na,3,3,"th",5)(12,ra,2,2,"td",6),E(),y(13,8),C(14,oa,3,3,"th",5)(15,sa,2,1,"td",6),E(),y(16,9),C(17,ca,3,3,"th",5)(18,ma,2,2,"td",6),E(),y(19,10),C(20,pa,3,3,"th",5)(21,la,2,2,"td",6),E(),y(22,11),C(23,da,3,3,"th",5)(24,ua,2,2,"td",6),E(),C(25,ha,1,0,"tr",12)(26,fa,1,0,"tr",13),n()()()),m&2&&(t(3),l(c(4,4,"labels.heading.All Transactions")),t(3),d("dataSource",r.dataSource),t(19),d("matHeaderRowDef",r.displayedColumns),t(),d("matRowDefColumns",r.displayedColumns))},dependencies:[T,D,xe,ye,De,Ee,Te,Ie,Me,we,Pe,Re,Fe,P],styles:[".tab-container[_ngcontent-%COMP%]{padding:1%;margin:1%}.tab-container[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{margin:1% auto}.tab-container[_ngcontent-%COMP%] table[_ngcontent-%COMP%]{width:100%}"]})}}return e})();function Sa(e,p){e&1&&(a(0,"th",17),s(1),o(2,"translate"),n()),e&2&&(t(),l(c(2,1,"labels.inputs.name")))}function Ca(e,p){if(e&1&&(a(0,"td",18),s(1),n()),e&2){let i=p.$implicit;t(),l(i.name)}}function va(e,p){e&1&&(a(0,"th",17),s(1),o(2,"translate"),n()),e&2&&(t(),l(c(2,1,"labels.inputs.Fee/Penalty")))}function _a(e,p){if(e&1&&(a(0,"td",18),s(1),n()),e&2){let i=p.$implicit;t(),l(i.penalty===!0?"Penalty":"Fee")}}function Aa(e,p){e&1&&(a(0,"th",17),s(1),o(2,"translate"),n()),e&2&&(t(),l(c(2,1,"labels.inputs.Payment Due At")))}function ga(e,p){if(e&1&&(a(0,"td",18),s(1),o(2,"translateKey"),n()),e&2){let i=p.$implicit;t(),l(ae(2,1,i.chargeTimeType.value,"catalogs"))}}function ba(e,p){e&1&&(a(0,"th",17),s(1),o(2,"translate"),n()),e&2&&(t(),l(c(2,1,"labels.inputs.Calculation Type")))}function xa(e,p){if(e&1&&(a(0,"td",18),s(1),o(2,"translateKey"),n()),e&2){let i=p.$implicit;t(),l(ae(2,1,i.chargeCalculationType.value,"catalogs"))}}function Ta(e,p){e&1&&(a(0,"th",17),s(1),o(2,"translate"),n()),e&2&&(t(),l(c(2,1,"labels.inputs.Due")))}function Da(e,p){if(e&1&&(a(0,"td",18),s(1),o(2,"currency"),n()),e&2){let i=p.$implicit;t(),S(" ",_e(2,1,i.amount,i.currency.code,"symbol-narrow","1.2-2")," ")}}function ya(e,p){e&1&&(a(0,"th",17),s(1),o(2,"translate"),n()),e&2&&(t(),l(c(2,1,"labels.inputs.Paid")))}function Ea(e,p){if(e&1&&(a(0,"td",18),s(1),o(2,"currency"),n()),e&2){let i=p.$implicit;t(),S(" ",_e(2,1,i.amountPaid,i.currency.code,"symbol-narrow","1.2-2")," ")}}function Ia(e,p){e&1&&(a(0,"th",17),s(1),o(2,"translate"),n()),e&2&&(t(),l(c(2,1,"labels.inputs.Waived")))}function Ma(e,p){if(e&1&&(a(0,"td",18),s(1),o(2,"currency"),n()),e&2){let i=p.$implicit;t(),S(" ",_e(2,1,i.amountWaived,i.currency.code,"symbol-narrow","1.2-2")," ")}}function Pa(e,p){e&1&&(a(0,"th",17),s(1),o(2,"translate"),n()),e&2&&(t(),l(c(2,1,"labels.inputs.Outstanding")))}function wa(e,p){if(e&1&&(a(0,"td",18),s(1),o(2,"currency"),n()),e&2){let i=p.$implicit;t(),S(" ",_e(2,1,i.amountOutstanding,i.currency.code,"symbol-narrow","1.2-2")," ")}}function Ra(e,p){e&1&&(a(0,"th",17),s(1),o(2,"translate"),n()),e&2&&(t(),l(c(2,1,"labels.inputs.Actions")))}function Fa(e,p){if(e&1){let i=R();a(0,"button",21),o(1,"translate"),b("click",function(r){I(i);let u=A(2).$implicit,g=A();return g.routeEdit(r),M(g.editCharge(u))}),h(2,"i",22),n()}e&2&&d("matTooltip",L(c(1,2,"tooltips.Edit Charge")))}function Ba(e,p){if(e&1){let i=R();a(0,"button",23),o(1,"translate"),b("click",function(r){I(i);let u=A(2).$implicit,g=A();return g.routeEdit(r),M(g.deleteCharge(u.id))}),h(2,"i",24),n()}e&2&&d("matTooltip",L(c(1,2,"tooltips.Delete Charge")))}function ka(e,p){e&1&&(a(0,"span"),C(1,Fa,3,4,"button",19)(2,Ba,3,4,"button",20),n()),e&2&&(t(),d("mifosxHasPermission","UPDATE_SHARESACCOUNTCHARGE"),t(),d("mifosxHasPermission","DELETE_SHARESACCOUNTCHARGE"))}function Na(e,p){if(e&1){let i=R();a(0,"button",21),o(1,"translate"),b("click",function(r){I(i);let u=A(2).$implicit,g=A();return g.routeEdit(r),M(g.payCharge(u.id))}),h(2,"i",25),n()}e&2&&d("matTooltip",L(c(1,2,"tooltips.Pay Charge")))}function Oa(e,p){if(e&1){let i=R();a(0,"button",21),o(1,"translate"),b("click",function(r){I(i);let u=A(2).$implicit,g=A();return g.routeEdit(r),M(g.waiveCharge(u.id))}),h(2,"i",26),n()}e&2&&d("matTooltip",L(c(1,2,"tooltips.Waive Charge")))}function Va(e,p){e&1&&(a(0,"span"),C(1,Na,3,4,"button",19)(2,Oa,3,4,"button",19),n()),e&2&&(t(),d("mifosxHasPermission","PAY_SHARESACCOUNTCHARGE"),t(),d("mifosxHasPermission","WAIVE_SHARESACCOUNTCHARGE"))}function qa(e,p){if(e&1&&(a(0,"td",18),v(1,ka,3,2,"span"),v(2,Va,3,2,"span"),n()),e&2){let i=A();t(),_(i.sharesAccountData.status.value==="Submitted and pending approval"?1:-1),t(),_(i.sharesAccountData.status.value==="Active"?2:-1)}}function Ha(e,p){e&1&&h(0,"tr",27)}function ja(e,p){e&1&&h(0,"tr",28)}var Bt=(()=>{class e{constructor(){this.route=f(B),this.displayedColumns=["name","feeOrPenalty","paymentDueAt","calculationType","due","paid","waived","outstanding","actions"],this.route.parent.data.subscribe(i=>{this.sharesAccountData=i.sharesAccountData,this.chargesData=this.sharesAccountData.charges})}ngOnInit(){let i=this.chargesData?this.chargesData.filter(m=>m.isActive):[];this.dataSource=new qe(i)}static{this.\u0275fac=function(m){return new(m||e)}}static{this.\u0275cmp=x({type:e,selectors:[["mifosx-charges-tab"]],decls:36,vars:6,consts:[[1,"tab-container","mat-typography"],[1,"m-b-10"],[1,"mat-elevation-z1","m-b-25"],["mat-table","",3,"dataSource"],["matColumnDef","name"],["mat-header-cell","",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","feeOrPenalty"],["matColumnDef","paymentDueAt"],["matColumnDef","calculationType"],["matColumnDef","due"],["matColumnDef","paid"],["matColumnDef","waived"],["matColumnDef","outstanding"],["matColumnDef","actions"],["mat-header-row","",4,"matHeaderRowDef"],["mat-row","",4,"matRowDef","matRowDefColumns"],["mat-header-cell",""],["mat-cell",""],["class","account-action-button","mat-raised-button","","color","primary",3,"matTooltip","click",4,"mifosxHasPermission"],["class","account-action-button","mat-raised-button","","color","warn",3,"matTooltip","click",4,"mifosxHasPermission"],["mat-raised-button","","color","primary",1,"account-action-button",3,"click","matTooltip"],[1,"fa","fa-pencil"],["mat-raised-button","","color","warn",1,"account-action-button",3,"click","matTooltip"],[1,"fa","fa-trash"],[1,"fa","fa-dollar"],[1,"fa","fa-flag"],["mat-header-row",""],["mat-row",""]],template:function(m,r){m&1&&(a(0,"div",0)(1,"div",1)(2,"h3"),s(3),o(4,"translate"),n()(),a(5,"div",2)(6,"table",3),y(7,4),C(8,Sa,3,3,"th",5)(9,Ca,2,1,"td",6),E(),y(10,7),C(11,va,3,3,"th",5)(12,_a,2,1,"td",6),E(),y(13,8),C(14,Aa,3,3,"th",5)(15,ga,3,4,"td",6),E(),y(16,9),C(17,ba,3,3,"th",5)(18,xa,3,4,"td",6),E(),y(19,10),C(20,Ta,3,3,"th",5)(21,Da,3,6,"td",6),E(),y(22,11),C(23,ya,3,3,"th",5)(24,Ea,3,6,"td",6),E(),y(25,12),C(26,Ia,3,3,"th",5)(27,Ma,3,6,"td",6),E(),y(28,13),C(29,Pa,3,3,"th",5)(30,wa,3,6,"td",6),E(),y(31,14),C(32,Ra,3,3,"th",5)(33,qa,3,2,"td",6),E(),C(34,Ha,1,0,"tr",15)(35,ja,1,0,"tr",16),n()()()),m&2&&(t(3),l(c(4,4,"labels.heading.All Charges")),t(3),d("dataSource",r.dataSource),t(28),d("matHeaderRowDef",r.displayedColumns),t(),d("matRowDefColumns",r.displayedColumns))},dependencies:[T,D,N,gt,xe,ye,De,Ee,Te,Ie,je,Me,we,Pe,Re,Xe,P,Ve],styles:[".tab-container[_ngcontent-%COMP%]{padding:1%;margin:1%}.tab-container[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{margin:1% auto}.tab-container[_ngcontent-%COMP%] .action-button[_ngcontent-%COMP%]{margin-left:auto}.tab-container[_ngcontent-%COMP%] table[_ngcontent-%COMP%]{width:100%}.tab-container[_ngcontent-%COMP%] table[_ngcontent-%COMP%] .account-action-button[_ngcontent-%COMP%]{min-width:26px;padding:0 6px;margin:4px;line-height:25px}.tab-container[_ngcontent-%COMP%] table[_ngcontent-%COMP%] .select-row[_ngcontent-%COMP%]:hover{cursor:pointer}"]})}}return e})();function La(e,p){e&1&&(a(0,"th",12),s(1),o(2,"translate"),n()),e&2&&(t(),l(c(2,1,"labels.inputs.Transaction Date")))}function Ua(e,p){if(e&1&&(a(0,"td",13),s(1),o(2,"dateFormat"),n()),e&2){let i=p.$implicit;t(),l(c(2,1,i.postedDate))}}function $a(e,p){e&1&&(a(0,"th",12),s(1),o(2,"translate"),n()),e&2&&(t(),l(c(2,1,"labels.inputs.Amount")))}function Ga(e,p){if(e&1&&(a(0,"td",13),s(1),o(2,"currency"),n()),e&2){let i=p.$implicit,m=A();t(),S(" ",_e(2,1,i.amount,m.shareAccountData.currency.code,"symbol-narrow","1.2-2")," ")}}function za(e,p){e&1&&(a(0,"th",12),s(1),o(2,"translate"),n()),e&2&&(t(),l(c(2,1,"labels.inputs.Transaction Reference")))}function Qa(e,p){if(e&1&&(a(0,"td",13),s(1),n()),e&2){let i=p.$implicit;t(),l(i.savingsTransactionId)}}function Ka(e,p){e&1&&(a(0,"th",12),s(1),o(2,"translate"),n()),e&2&&(t(),l(c(2,1,"labels.inputs.Status")))}function Wa(e,p){if(e&1&&(a(0,"td",13),s(1),o(2,"translate"),n()),e&2){let i=p.$implicit;t(),l(c(2,1,"labels.status."+i.status.value))}}function Ya(e,p){e&1&&h(0,"tr",14)}function Ja(e,p){e&1&&h(0,"tr",15)}var kt=(()=>{class e{constructor(){this.route=f(B),this.displayedColumns=["transactionDate","amount","transactionReference","status"],this.route.parent.data.subscribe(i=>{this.shareAccountData=i.sharesAccountData,this.dividendsData=this.shareAccountData.dividends})}ngOnInit(){this.dataSource=new qe(this.dividendsData)}static{this.\u0275fac=function(m){return new(m||e)}}static{this.\u0275cmp=x({type:e,selectors:[["mifosx-dividends-tab"]],decls:21,vars:6,consts:[[1,"tab-container","mat-typography"],[1,"m-b-10"],[1,"mat-elevation-z1","m-b-25"],["mat-table","",3,"dataSource"],["matColumnDef","transactionDate"],["mat-header-cell","",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","amount"],["matColumnDef","transactionReference"],["matColumnDef","status"],["mat-header-row","",4,"matHeaderRowDef"],["mat-row","",4,"matRowDef","matRowDefColumns"],["mat-header-cell",""],["mat-cell",""],["mat-header-row",""],["mat-row",""]],template:function(m,r){m&1&&(a(0,"div",0)(1,"div",1)(2,"h3"),s(3),o(4,"translate"),n()(),a(5,"div",2)(6,"table",3),y(7,4),C(8,La,3,3,"th",5)(9,Ua,3,3,"td",6),E(),y(10,7),C(11,$a,3,3,"th",5)(12,Ga,3,6,"td",6),E(),y(13,8),C(14,za,3,3,"th",5)(15,Qa,2,1,"td",6),E(),y(16,9),C(17,Ka,3,3,"th",5)(18,Wa,3,3,"td",6),E(),C(19,Ya,1,0,"tr",10)(20,Ja,1,0,"tr",11),n()()()),m&2&&(t(3),l(c(4,4,"labels.inputs.Dividends")),t(3),d("dataSource",r.dataSource),t(13),d("matHeaderRowDef",r.displayedColumns),t(),d("matRowDefColumns",r.displayedColumns))},dependencies:[T,D,xe,ye,De,Ee,Te,Ie,Me,we,Pe,Re,Xe,Fe,P],styles:[".tab-container[_ngcontent-%COMP%]{padding:1%;margin:1%}.tab-container[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{margin:1% auto}.tab-container[_ngcontent-%COMP%] table[_ngcontent-%COMP%]{width:100%}"]})}}return e})();function Xa(e,p){if(e&1&&(a(0,"mat-option",5),s(1),n()),e&2){let i=p.$implicit;d("value",i.id),t(),S(" ",i.name," ")}}var Ge=(()=>{class e{constructor(){this.formBuilder=f(pe),this.sharesService=f(k),this.settingsService=f(j),this.minDate=new Date(2e3,0,1),this.maxDate=new Date,this.sharesAccountProductTemplate=new lt,this.createSharesAccountDetailsForm()}ngOnInit(){this.maxDate=this.settingsService.businessDate,this.buildDependencies(),this.sharesAccountTemplate&&(this.productData=this.sharesAccountTemplate.productOptions,this.sharesAccountTemplate.productId&&this.sharesAccountDetailsForm.patchValue({productId:this.sharesAccountTemplate.productId,submittedDate:this.sharesAccountTemplate.timeline.submittedOnDate&&new Date(this.sharesAccountTemplate.timeline.submittedOnDate),externalId:this.sharesAccountTemplate.externalId}))}createSharesAccountDetailsForm(){this.sharesAccountDetailsForm=this.formBuilder.group({productId:["",G.required],submittedDate:["",G.required],externalId:[""]})}buildDependencies(){let i=this.sharesAccountTemplate.clientId;this.sharesAccountDetailsForm.get("productId").valueChanges.subscribe(m=>{this.sharesService.getSharesAccountTemplate(i,m).subscribe(r=>{this.sharesAccountProductTemplate.emit(r)})})}get sharesAccountDetails(){return this.sharesAccountDetailsForm.value}static{this.\u0275fac=function(m){return new(m||e)}}static{this.\u0275cmp=x({type:e,selectors:[["mifosx-shares-account-details-step"]],inputs:{sharesAccountTemplate:"sharesAccountTemplate"},outputs:{sharesAccountProductTemplate:"sharesAccountProductTemplate"},decls:45,vars:39,consts:[["submittedOnDatePicker",""],[3,"formGroup"],[1,"layout-row-wrap","gap-2px","responsive-column"],[1,"flex-48"],["formControlName","productId","required",""],[3,"value"],[1,"flex-48",3,"click"],["matInput","","formControlName","submittedDate","required","",3,"min","max","matDatepicker"],["matSuffix","",3,"for"],["matInput","","formControlName","externalId"],[1,"layout-row","align-center","gap-2percent","margin-t","responsive-column"],["mat-raised-button","","matStepperPrevious","","disabled",""],["icon","arrow-left",1,"m-r-10"],["mat-raised-button","","matStepperNext","",3,"disabled"],["icon","arrow-right",1,"m-l-10"]],template:function(m,r){if(m&1){let u=R();a(0,"form",1)(1,"div",2)(2,"mat-form-field",3)(3,"mat-label"),s(4),o(5,"translate"),n(),a(6,"mat-select",4),ke(7,Xa,2,2,"mat-option",5,Be),n(),a(9,"mat-error"),s(10),o(11,"translate"),o(12,"translate"),a(13,"strong"),s(14),o(15,"translate"),n()()(),a(16,"mat-form-field",6),b("click",function(){I(u);let q=F(23);return M(q.open())}),a(17,"mat-label"),s(18),o(19,"translate"),n(),h(20,"input",7)(21,"mat-datepicker-toggle",8)(22,"mat-datepicker",null,0),a(24,"mat-error"),s(25),o(26,"translate"),o(27,"translate"),a(28,"strong"),s(29),o(30,"translate"),n()()(),a(31,"mat-form-field",3)(32,"mat-label"),s(33),o(34,"translate"),n(),h(35,"input",9),n()(),a(36,"div",10)(37,"button",11),h(38,"fa-icon",12),s(39),o(40,"translate"),n(),a(41,"button",13),s(42),o(43,"translate"),h(44,"fa-icon",14),n()()()}if(m&2){let u,g=F(23);d("formGroup",r.sharesAccountDetailsForm),t(4),l(c(5,17,"labels.inputs.Product Name")),t(3),Ne(r.productData),t(3),w(" ",c(11,19,"labels.inputs.Product Name")," ",c(12,21,"labels.commons.is")," "),t(4),l(c(15,23,"labels.commons.required")),t(4),l(c(19,25,"labels.inputs.Submitted On")),t(2),d("min",r.minDate)("max",r.maxDate)("matDatepicker",g),t(),d("for",g),t(4),w(" ",c(26,27,"labels.inputs.Submission Date")," ",c(27,29,"labels.commons.is")," "),t(4),l(c(30,31,"labels.commons.required")),t(4),l(c(34,33,"labels.inputs.External ID")),t(6),S(" ",c(40,35,"labels.buttons.Previous")," "),t(2),d("disabled",!((u=r.sharesAccountDetailsForm.get("productId"))!=null&&u.value&&((u=r.sharesAccountDetailsForm.get("submittedDate"))!=null&&u.value))),t(),S(" ",c(43,37,"labels.buttons.Next")," ")}},dependencies:[T,D,J,re,oe,Y,me,se,ce,Z,X,ue,he,fe,tt,et,Ce,ve,Se,N,Le,be,nt,P],encapsulation:2})}}return e})();function Za(e,p){if(e&1&&(a(0,"span",3),s(1),o(2,"currency"),n()),e&2){let i=A();t(),l(_e(2,1,i.calculateCurrenValue(),i.currency.code,"symbol-narrow","1.2-2"))}}function en(e,p){if(e&1&&(a(0,"mat-option",8),s(1),n()),e&2){let i=p.$implicit;d("value",i.id),t(),w(" ",i.accountNo," - ",i.savingsProductName," ")}}function tn(e,p){if(e&1&&(a(0,"mat-option",8),s(1),o(2,"translateKey"),n()),e&2){let i=p.$implicit;d("value",i.id),t(),S(" ",ae(2,2,i.value,"catalogs")," ")}}function an(e,p){if(e&1&&(a(0,"mat-option",8),s(1),o(2,"translateKey"),n()),e&2){let i=p.$implicit;d("value",i.id),t(),S(" ",ae(2,2,i.value,"catalogs")," ")}}var ze=(()=>{class e{constructor(){this.formBuilder=f(pe),this.settingsService=f(j),this.minDate=new Date(2e3,0,1),this.maxDate=new Date,this.isSavingsPatched=!1,this.currency=null,this.createSharesAccountTermsForm()}ngOnChanges(){this.sharesAccountProductTemplate&&(this.currency=this.sharesAccountProductTemplate.currency,this.sharesAccountTermsForm.patchValue({currencyCode:this.sharesAccountProductTemplate.currency.code,decimal:this.sharesAccountProductTemplate.currency.decimalPlaces,currencyMultiple:this.sharesAccountProductTemplate.currency.inMultiplesOf,unitPrice:this.sharesAccountProductTemplate.currentMarketPrice,savingsAccountId:""}),this.setOptions(),this.sharesAccountTemplate&&!this.isSavingsPatched&&this.sharesAccountTemplate.savingsAccountId&&(this.sharesAccountTermsForm.get("savingsAccountId").patchValue(this.sharesAccountTemplate.savingsAccountId),this.isSavingsPatched=!0))}ngOnInit(){this.maxDate=this.settingsService.businessDate,this.sharesAccountTemplate&&this.sharesAccountTermsForm.patchValue({requestedShares:this.sharesAccountTemplate.summary.totalPendingForApprovalShares,minimumActivePeriod:this.sharesAccountTemplate.minimumActivePeriod,minimumActivePeriodFrequencyType:this.sharesAccountTemplate.minimumActivePeriod&&this.sharesAccountTemplate.minimumActivePeriodTypeEnum.id,lockinPeriodFrequency:this.sharesAccountTemplate.lockinPeriod,lockinPeriodFrequencyType:this.sharesAccountTemplate.lockinPeriod&&this.sharesAccountTemplate.lockPeriodTypeEnum.id,applicationDate:this.sharesAccountTemplate.purchasedShares[0].purchasedDate&&new Date(this.sharesAccountTemplate.purchasedShares[0].purchasedDate),allowDividendCalculationForInactiveClients:this.sharesAccountTemplate.allowDividendCalculationForInactiveClients})}createSharesAccountTermsForm(){this.sharesAccountTermsForm=this.formBuilder.group({currencyCode:[{value:"",disabled:!0}],decimal:[{value:"",disabled:!0}],requestedShares:["",G.required],unitPrice:[{value:"",disabled:!0}],currencyMultiple:[{value:"",disabled:!0}],savingsAccountId:["",G.required],minimumActivePeriod:[""],minimumActivePeriodFrequencyType:[""],lockinPeriodFrequency:[""],lockinPeriodFrequencyType:[""],applicationDate:["",G.required],allowDividendCalculationForInactiveClients:[!1]})}setOptions(){this.minimumActivePeriodFrequencyTypeData=this.sharesAccountProductTemplate.minimumActivePeriodFrequencyTypeOptions,this.lockinPeriodFrequencyTypeData=this.sharesAccountProductTemplate.lockinPeriodFrequencyTypeOptions,this.savingsAccountsData=this.sharesAccountProductTemplate.clientSavingsAccounts}get sharesAccountTerms(){return this.sharesAccountTermsForm.value}calculateCurrenValue(){return this.sharesAccountTermsForm.value.requestedShares&&this.sharesAccountProductTemplate.currentMarketPrice?this.sharesAccountProductTemplate.currentMarketPrice*this.sharesAccountTermsForm.value.requestedShares:0}static{this.\u0275fac=function(m){return new(m||e)}}static{this.\u0275cmp=x({type:e,selectors:[["mifosx-shares-account-terms-step"]],inputs:{sharesAccountProductTemplate:"sharesAccountProductTemplate",sharesAccountTemplate:"sharesAccountTemplate"},features:[pt],decls:96,vars:75,consts:[["applicationDatePicker",""],[3,"formGroup"],[1,"layout-row-wrap","gap-2percent","responsive-column","align-start-center"],[1,"flex-48"],["matInput","","formControlName","currencyCode"],["type","number","matInput","","formControlName","unitPrice"],["type","number","matInput","","formControlName","requestedShares","required",""],["formControlName","savingsAccountId","required",""],[3,"value"],[1,"flex-48",3,"click"],["matInput","","formControlName","applicationDate","required","",3,"min","max","matDatepicker"],["matSuffix","",3,"for"],["labelPosition","before","formControlName","allowDividendCalculationForInactiveClients",1,"flex-48"],[1,"mat-h4","flex-98"],["type","number","matInput","","formControlName","minimumActivePeriod"],["formControlName","minimumActivePeriodFrequencyType"],["type","number","matInput","","formControlName","lockinPeriodFrequency"],["formControlName","lockinPeriodFrequencyType"],[1,"layout-row","align-center","gap-2percent","margin-t","responsive-column"],["mat-raised-button","","matStepperPrevious",""],["icon","arrow-left",1,"m-r-10"],["mat-raised-button","","matStepperNext",""],["icon","arrow-right",1,"m-l-10"]],template:function(m,r){if(m&1){let u=R();a(0,"form",1)(1,"div",2)(2,"mat-form-field",3)(3,"mat-label"),s(4),o(5,"translate"),n(),h(6,"input",4),n(),a(7,"mat-form-field",3)(8,"mat-label"),s(9),o(10,"translate"),n(),h(11,"input",5),n(),a(12,"mat-form-field",3)(13,"mat-label"),s(14),o(15,"translate"),n(),h(16,"input",6),a(17,"mat-error"),s(18),o(19,"translate"),o(20,"translate"),a(21,"strong"),s(22),o(23,"translate"),n()()(),v(24,Za,3,6,"span",3),a(25,"mat-form-field",3)(26,"mat-label"),s(27),o(28,"translate"),n(),a(29,"mat-select",7),ke(30,en,2,3,"mat-option",8,Be),n(),a(32,"mat-error"),s(33),o(34,"translate"),o(35,"translate"),a(36,"strong"),s(37),o(38,"translate"),n()()(),a(39,"mat-form-field",9),b("click",function(){I(u);let q=F(46);return M(q.open())}),a(40,"mat-label"),s(41),o(42,"translate"),n(),h(43,"input",10)(44,"mat-datepicker-toggle",11)(45,"mat-datepicker",null,0),a(47,"mat-error"),s(48),o(49,"translate"),o(50,"translate"),a(51,"strong"),s(52),o(53,"translate"),n()()(),a(54,"mat-checkbox",12),s(55),o(56,"translate"),n(),a(57,"h4",13),s(58),o(59,"translate"),n(),a(60,"mat-form-field",3)(61,"mat-label"),s(62),o(63,"translate"),n(),h(64,"input",14),n(),a(65,"mat-form-field",3)(66,"mat-label"),s(67),o(68,"translate"),n(),a(69,"mat-select",15),ke(70,tn,3,5,"mat-option",8,Be),n()(),a(72,"h4",13),s(73),o(74,"translate"),n(),a(75,"mat-form-field",3)(76,"mat-label"),s(77),o(78,"translate"),n(),h(79,"input",16),n(),a(80,"mat-form-field",3)(81,"mat-label"),s(82),o(83,"translate"),n(),a(84,"mat-select",17),ke(85,an,3,5,"mat-option",8,Be),n()()(),a(87,"div",18)(88,"button",19),h(89,"fa-icon",20),s(90),o(91,"translate"),n(),a(92,"button",21),s(93),o(94,"translate"),h(95,"fa-icon",22),n()()()}if(m&2){let u=F(46);d("formGroup",r.sharesAccountTermsForm),t(4),l(c(5,29,"labels.inputs.Currency")),t(5),l(c(10,31,"labels.inputs.Current Price")),t(5),l(c(15,33,"labels.inputs.Total Number of Shares")),t(4),w(" ",c(19,35,"labels.inputs.Total Number of Shares")," ",c(20,37,"labels.commons.is")," "),t(4),l(c(23,39,"labels.commons.required")),t(2),_(r.currency?24:-1),t(3),l(c(28,41,"labels.inputs.Default Savings Account")),t(3),Ne(r.savingsAccountsData),t(3),w(" ",c(34,43,"labels.inputs.Default Savings Account")," ",c(35,45,"labels.commons.is")," "),t(4),l(c(38,47,"labels.commons.required")),t(4),l(c(42,49,"labels.inputs.Application Date")),t(2),d("min",r.minDate)("max",r.maxDate)("matDatepicker",u),t(),d("for",u),t(4),w(" ",c(49,51,"labels.inputs.Application Date")," ",c(50,53,"labels.commons.is")," "),t(4),l(c(53,55,"labels.commons.required")),t(3),S(" ",c(56,57,"labels.inputs.Allow dividends for inactive clients")," "),t(3),l(c(59,59,"labels.heading.Minimum Active Period")),t(4),l(c(63,61,"labels.inputs.Frequency")),t(5),l(c(68,63,"labels.inputs.Type")),t(3),Ne(r.minimumActivePeriodFrequencyTypeData),t(3),l(c(74,65,"labels.heading.Lock-in Period")),t(4),l(c(78,67,"labels.inputs.Frequency")),t(5),l(c(83,69,"labels.inputs.Type")),t(3),Ne(r.lockinPeriodFrequencyTypeData),t(5),S(" ",c(91,71,"labels.buttons.Previous")," "),t(3),S(" ",c(94,73,"labels.buttons.Next")," ")}},dependencies:[T,D,J,re,di,oe,Y,me,se,ce,Z,X,ue,he,fe,tt,et,Ce,ve,Se,N,vi,Le,be,nt,Xe,P,Ve],styles:["h4[_ngcontent-%COMP%]{font-weight:500;margin:1em 0}.margin-t[_ngcontent-%COMP%]{margin-top:1em}"]})}}return e})();function nn(e,p){if(e&1&&(a(0,"mat-option",3),s(1),n()),e&2){let i=p.$implicit;d("value",i),t(),S(" ",i.name," ")}}function rn(e,p){e&1&&(a(0,"th",22),s(1),o(2,"translate"),n()),e&2&&(t(),l(c(2,1,"labels.inputs.name")))}function on(e,p){if(e&1&&(a(0,"td",23),s(1),n()),e&2){let i=p.$implicit;t(),S(" ",i.name+", "+i.currency.displaySymbol," ")}}function sn(e,p){e&1&&(a(0,"th",22),s(1),o(2,"translate"),n()),e&2&&(t(),l(c(2,1,"labels.inputs.Type")))}function cn(e,p){if(e&1&&(a(0,"td",23),s(1),o(2,"translateKey"),n()),e&2){let i=p.$implicit;t(),S(" ",ae(2,1,i.chargeCalculationType.value,"catalogs")," ")}}function mn(e,p){e&1&&(a(0,"th",22),s(1),o(2,"translate"),n()),e&2&&(t(),l(c(2,1,"labels.inputs.Amount")))}function pn(e,p){if(e&1){let i=R();a(0,"td",23),s(1),a(2,"button",24),b("click",function(){let r=I(i).$implicit,u=A();return M(u.editCharge(r))}),h(3,"fa-icon",25),n()()}if(e&2){let i=p.$implicit;t(),S(" ",i.amount||i.amountOrPercentage," ")}}function ln(e,p){e&1&&(a(0,"th",22),s(1),o(2,"translate"),n()),e&2&&(t(),l(c(2,1,"labels.inputs.Collected On")))}function dn(e,p){if(e&1&&(a(0,"td",23),s(1),o(2,"translateKey"),n()),e&2){let i=p.$implicit;t(),S(" ",ae(2,1,i.chargeTimeType.value,"catalogs")," ")}}function un(e,p){e&1&&(a(0,"th",22),s(1),o(2,"translate"),n()),e&2&&(t(),l(c(2,1,"labels.inputs.Actions")))}function hn(e,p){if(e&1){let i=R();a(0,"td",23)(1,"button",26),b("click",function(){let r=I(i).$implicit,u=A();return M(u.deleteCharge(r))}),h(2,"fa-icon",27),n()()}}function fn(e,p){e&1&&h(0,"tr",28)}function Sn(e,p){e&1&&h(0,"tr",29)}var Qe=(()=>{class e{constructor(){this.dialog=f(He),this.translateService=f(pi),this.chargeData=[],this.chargesDataSource=[],this.pristine=!0,this.isChargesPatched=!1,this.displayedColumns=["name","chargeCalculationType","amount","chargeTimeType","action"]}ngOnInit(){this.currencyCode.valueChanges.subscribe(()=>{!this.isChargesPatched&&this.sharesAccountTemplate.charges?(this.chargesDataSource=this.sharesAccountTemplate.charges,this.isChargesPatched=!0):this.chargesDataSource=[]})}ngOnChanges(){this.sharesAccountProductTemplate&&(this.chargeData=this.sharesAccountTemplate.chargeOptions,this.chargesDataSource=this.sharesAccountProductTemplate.charges)}addCharge(i){this.chargesDataSource=this.chargesDataSource.concat([i.value]),i.value="",this.pristine=!1}editCharge(i){let m=[new Fi({controlName:"amount",label:this.translateService.instant("labels.inputs.Amount"),value:i.amount||i.amountOrPercentage,type:"number",required:!1})],r={title:this.translateService.instant("labels.heading.Edit Charge"),layout:{addButtonText:"Submit"},formfields:m};this.dialog.open(_i,{data:r}).afterClosed().subscribe(g=>{if(g.data){let q=K(H({},i),{amount:g.data.value.amount});this.chargesDataSource.splice(this.chargesDataSource.indexOf(i),1,q),this.chargesDataSource=this.chargesDataSource.concat([])}}),this.pristine=!1}deleteCharge(i){this.dialog.open(bt,{data:{deleteContext:`charge ${i.name}`}}).afterClosed().subscribe(r=>{r.delete&&(this.chargesDataSource.splice(this.chargesDataSource.indexOf(i),1),this.chargesDataSource=this.chargesDataSource.concat([]))}),this.pristine=!1}get sharesAccountCharges(){return{charges:this.chargesDataSource}}static{this.\u0275fac=function(m){return new(m||e)}}static{this.\u0275cmp=x({type:e,selectors:[["mifosx-shares-account-charges-step"]],inputs:{sharesAccountProductTemplate:"sharesAccountProductTemplate",sharesAccountTemplate:"sharesAccountTemplate",currencyCode:"currencyCode"},features:[pt],decls:42,vars:21,consts:[["charge",""],[1,"layout-row-wrap","gap-2px","responsive-column"],[1,"flex-48"],[3,"value"],[1,"flex-48","align-center"],["type","button","mat-raised-button","","color","primary",3,"click","disabled"],["icon","plus",1,"m-r-10"],["mat-table","",1,"flex-98","mat-elevation-z1",3,"dataSource","hidden"],["matColumnDef","name"],["mat-header-cell","",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","chargeCalculationType"],["matColumnDef","amount"],["matColumnDef","chargeTimeType"],["matColumnDef","action"],["mat-header-row","",4,"matHeaderRowDef"],["mat-row","",4,"matRowDef","matRowDefColumns"],[1,"layout-row","responsive-column","align-center","gap-2px","margin-t"],["mat-raised-button","","matStepperPrevious",""],["icon","arrow-left",1,"m-r-10"],["mat-raised-button","","matStepperNext",""],["icon","arrow-right",1,"m-l-10"],["mat-header-cell",""],["mat-cell",""],["mat-icon-button","","color","primary",3,"click"],["icon","pen"],["mat-icon-button","","color","warn",3,"click"],["icon","trash"],["mat-header-row",""],["mat-row",""]],template:function(m,r){if(m&1){let u=R();a(0,"div",1)(1,"mat-form-field",2)(2,"mat-label"),s(3),o(4,"translate"),n(),a(5,"mat-select",null,0),ke(7,nn,2,2,"mat-option",3,Be),o(9,"chargesFilter"),n()(),a(10,"div",4)(11,"button",5),b("click",function(){I(u);let q=F(6);return M(r.addCharge(q))}),h(12,"fa-icon",6),s(13),o(14,"translate"),n()(),a(15,"table",7),y(16,8),C(17,rn,3,3,"th",9)(18,on,2,1,"td",10),E(),y(19,11),C(20,sn,3,3,"th",9)(21,cn,3,4,"td",10),E(),y(22,12),C(23,mn,3,3,"th",9)(24,pn,4,1,"td",10),E(),y(25,13),C(26,ln,3,3,"th",9)(27,dn,3,4,"td",10),E(),y(28,14),C(29,un,3,3,"th",9)(30,hn,3,0,"td",10),E(),C(31,fn,1,0,"tr",15)(32,Sn,1,0,"tr",16),n()(),a(33,"div",17)(34,"button",18),h(35,"fa-icon",19),s(36),o(37,"translate"),n(),a(38,"button",20),s(39),o(40,"translate"),h(41,"fa-icon",21),n()()}if(m&2){let u=F(6);t(3),l(c(4,9,"labels.inputs.Charge")),t(4),Ne(oi(9,11,r.chargeData,r.chargesDataSource,r.currencyCode.value)),t(4),d("disabled",!u.value),t(2),S(" ",c(14,15,"labels.buttons.Add")," "),t(2),d("dataSource",r.chargesDataSource)("hidden",r.chargesDataSource.length===0),t(16),d("matHeaderRowDef",r.displayedColumns),t(),d("matRowDefColumns",r.displayedColumns),t(4),S(" ",c(37,17,"labels.buttons.Previous")," "),t(3),S(" ",c(40,19,"labels.buttons.Next")," ")}},dependencies:[T,D,Z,X,tt,et,N,be,xe,ye,De,Ee,Te,Ie,ht,Me,we,Pe,Re,Le,nt,P,Ve,Ii],styles:["table[_ngcontent-%COMP%]{width:100%}.mat-elevation-z1[_ngcontent-%COMP%]{margin:1em 0 1.5em}.margin-t[_ngcontent-%COMP%]{margin-top:1em}"]})}}return e})();var Cn=e=>[e],vn=()=>["../"];function _n(e,p){if(e&1&&(a(0,"span",4),h(1,"mifosx-external-identifier",11),n()),e&2){let i=A();t(),d("externalId",L(i.sharesAccount.externalId))}}function An(e,p){e&1&&(a(0,"span",4),s(1),o(2,"translate"),n()),e&2&&(t(),S(" ",c(2,1,"labels.inputs.Unassigned")," "))}function gn(e,p){if(e&1&&(a(0,"div",2)(1,"span",3),s(2),o(3,"translate"),n(),a(4,"span",4),s(5),o(6,"find"),o(7,"translateKey"),n()()),e&2){let i=A();t(2),l(c(3,3,"labels.inputs.Minimum Active Period")),t(3),w("",i.sharesAccount.minimumActivePeriod,"\xA0",ae(7,10,_e(6,5,i.sharesAccount.minimumActivePeriodFrequencyType,i.sharesAccountProductTemplate.minimumActivePeriodFrequencyTypeOptions,"id","value"),"catalogs"))}}function bn(e,p){if(e&1&&(a(0,"div",2)(1,"span",3),s(2),o(3,"translate"),n(),a(4,"span",4),s(5),o(6,"find"),o(7,"translateKey"),n()()),e&2){let i=A();t(2),l(c(3,3,"labels.inputs.Lock-in Period")),t(3),w("",i.sharesAccount.lockinPeriodFrequency,"\xA0",ae(7,10,_e(6,5,i.sharesAccount.lockinPeriodFrequencyType,i.sharesAccountProductTemplate.lockinPeriodFrequencyTypeOptions,"id","value"),"catalogs"))}}function xn(e,p){e&1&&(a(0,"th",21),s(1),o(2,"translate"),n()),e&2&&(t(),l(c(2,1,"labels.inputs.name")))}function Tn(e,p){if(e&1&&(a(0,"td",22),s(1),n()),e&2){let i=p.$implicit;t(),S(" ",i.name+", "+i.currency.displaySymbol," ")}}function Dn(e,p){e&1&&(a(0,"th",21),s(1),o(2,"translate"),n()),e&2&&(t(),l(c(2,1,"labels.inputs.Type")))}function yn(e,p){if(e&1&&(a(0,"td",22),s(1),o(2,"translateKey"),n()),e&2){let i=p.$implicit;t(),S(" ",ae(2,1,i.chargeCalculationType.value,"catalogs")," ")}}function En(e,p){e&1&&(a(0,"th",21),s(1),o(2,"translate"),n()),e&2&&(t(),l(c(2,1,"labels.inputs.Amount")))}function In(e,p){if(e&1&&(a(0,"td",22),s(1),n()),e&2){let i=p.$implicit;t(),S(" ",i.amount||i.amountOrPercentage," ")}}function Mn(e,p){e&1&&(a(0,"th",21),s(1),o(2,"translate"),n()),e&2&&(t(),l(c(2,1,"labels.inputs.Collected On")))}function Pn(e,p){if(e&1&&(a(0,"td",22),s(1),o(2,"translateKey"),n()),e&2){let i=p.$implicit;t(),S(" ",ae(2,1,i.chargeTimeType.value,"catalogs")," ")}}function wn(e,p){e&1&&h(0,"tr",23)}function Rn(e,p){e&1&&h(0,"tr",24)}function Fn(e,p){if(e&1&&(a(0,"div",5)(1,"h3",1),s(2),o(3,"translate"),n(),h(4,"mat-divider",2),a(5,"table",12),y(6,13),C(7,xn,3,3,"th",14)(8,Tn,2,1,"td",15),E(),y(9,16),C(10,Dn,3,3,"th",14)(11,yn,3,4,"td",15),E(),y(12,17),C(13,En,3,3,"th",14)(14,In,2,1,"td",15),E(),y(15,18),C(16,Mn,3,3,"th",14)(17,Pn,3,4,"td",15),E(),C(18,wn,1,0,"tr",19)(19,Rn,1,0,"tr",20),n()()),e&2){let i=A();t(2),l(c(3,4,"labels.heading.Charges")),t(3),d("dataSource",i.sharesAccount.charges),t(13),d("matHeaderRowDef",i.chargesDisplayedColumns),t(),d("matRowDefColumns",i.chargesDisplayedColumns)}}var st=(()=>{class e{constructor(){this.chargesDisplayedColumns=["name","chargeCalculationType","amount","chargeTimeType"],this.submitEvent=new lt}static{this.\u0275fac=function(m){return new(m||e)}}static{this.\u0275cmp=x({type:e,selectors:[["mifosx-shares-account-preview-step"]],inputs:{sharesAccountProductTemplate:"sharesAccountProductTemplate",sharesAccountTemplate:"sharesAccountTemplate",sharesAccountTermsForm:"sharesAccountTermsForm",sharesAccount:"sharesAccount"},outputs:{submitEvent:"submitEvent"},decls:92,vars:90,consts:[[1,"layout-row-wrap","responsive-column"],[1,"mat-h3","flex-fill"],[1,"flex-fill"],[1,"flex-40"],[1,"flex-60"],[1,"layout-row-wrap","responsive-column","flex-fill"],[1,"layout-row","responsive-column","align-center","gap-2px","margin-t"],["mat-raised-button","","matStepperPrevious",""],["icon","arrow-left",1,"m-r-10"],["mat-raised-button","",3,"routerLink"],["mat-raised-button","","color","primary",3,"click"],[3,"externalId"],["mat-table","",1,"flex-fill","mat-elevation-z1",3,"dataSource"],["matColumnDef","name"],["mat-header-cell","",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","chargeCalculationType"],["matColumnDef","amount"],["matColumnDef","chargeTimeType"],["mat-header-row","",4,"matHeaderRowDef"],["mat-row","",4,"matRowDef","matRowDefColumns"],["mat-header-cell",""],["mat-cell",""],["mat-header-row",""],["mat-row",""]],template:function(m,r){m&1&&(a(0,"div",0)(1,"h3",1),s(2),o(3,"translate"),n(),h(4,"mat-divider",2),a(5,"div",2)(6,"span",3),s(7),o(8,"translate"),n(),a(9,"span",4),s(10),o(11,"find"),n()(),a(12,"div",2)(13,"span",3),s(14),o(15,"translate"),n(),a(16,"span",4),s(17),o(18,"dateFormat"),n()(),a(19,"div",2)(20,"span",3),s(21),o(22,"translate"),n(),v(23,_n,2,2,"span",4),v(24,An,3,3,"span",4),n(),a(25,"h3",1),s(26),o(27,"translate"),n(),h(28,"mat-divider",2),a(29,"div",2)(30,"span",3),s(31),o(32,"translate"),n(),a(33,"span",4),s(34),o(35,"find"),n()(),a(36,"div",2)(37,"span",3),s(38),o(39,"translate"),n(),a(40,"span",4),s(41),o(42,"formatNumber"),n()(),a(43,"div",2)(44,"span",3),s(45),o(46,"translate"),n(),a(47,"span",4),s(48),o(49,"formatNumber"),n()(),a(50,"div",2)(51,"span",3),s(52),o(53,"translate"),n(),a(54,"span",4),s(55),o(56,"formatNumber"),n()(),a(57,"div",2)(58,"span",3),s(59),o(60,"translate"),n(),a(61,"span",4),s(62),o(63,"find"),n()(),v(64,gn,8,13,"div",2),v(65,bn,8,13,"div",2),a(66,"div",2)(67,"span",3),s(68),o(69,"translate"),n(),a(70,"span",4),s(71),o(72,"dateFormat"),n()(),a(73,"div",2)(74,"span",3),s(75),o(76,"translate"),n(),a(77,"span",4),s(78),o(79,"yesNo"),n()(),v(80,Fn,20,6,"div",5),n(),a(81,"div",6)(82,"button",7),h(83,"fa-icon",8),s(84),o(85,"translate"),n(),a(86,"button",9),s(87),o(88,"translate"),n(),a(89,"button",10),b("click",function(){return r.submitEvent.emit()}),s(90),o(91,"translate"),n()()),m&2&&(t(2),l(c(3,30,"labels.heading.Details")),t(5),l(c(8,32,"labels.inputs.Product")),t(3),l(_e(11,34,r.sharesAccount.productId,r.sharesAccountTemplate.productOptions,"id","name")),t(4),l(c(15,39,"labels.inputs.Submitted On")),t(3),l(c(18,41,r.sharesAccount.submittedDate)),t(4),l(c(22,43,"labels.inputs.External Id")),t(2),_(r.sharesAccount.externalId?23:-1),t(),_(r.sharesAccount.externalId?-1:24),t(2),l(c(27,45,"labels.heading.Terms")),t(5),l(c(32,47,"labels.inputs.Currency")),t(3),l(_e(35,49,r.sharesAccountTermsForm.get("currencyCode").value,ri(87,Cn,r.sharesAccountProductTemplate.currency),"code","displayLabel")),t(4),l(c(39,54,"labels.inputs.Total Number of Shares")),t(3),l(c(42,56,r.sharesAccount.requestedShares)),t(4),l(c(46,58,"labels.inputs.Current Price")),t(3),l(c(49,60,r.sharesAccountTermsForm.get("unitPrice").value)),t(4),l(c(53,62,"labels.inputs.Amount")),t(3),l(c(56,64,r.sharesAccount.requestedShares*r.sharesAccountTermsForm.get("unitPrice").value)),t(4),l(c(60,66,"labels.inputs.Default Savings Account")),t(3),l(_e(63,68,r.sharesAccount.savingsAccountId,r.sharesAccountProductTemplate.clientSavingsAccounts,"id","accountNo")),t(2),_(r.sharesAccount.minimumActivePeriod?64:-1),t(),_(r.sharesAccount.lockinPeriodFrequency?65:-1),t(3),l(c(69,73,"labels.inputs.Application Date")),t(3),l(c(72,75,r.sharesAccount.applicationDate)),t(4),l(c(76,77,"labels.inputs.Allow dividends for inactive clients")),t(3),l(c(79,79,r.sharesAccount.allowDividendCalculationForInactiveClients)),t(2),_(r.sharesAccount.charges.length?80:-1),t(4),S(" ",c(85,81,"labels.buttons.Previous")," "),t(2),d("routerLink",O(89,vn)),t(),S(" ",c(88,83,"labels.buttons.Cancel")," "),t(3),S(" ",c(91,85,"labels.buttons.Submit")," "))},dependencies:[T,D,W,N,Ai,It,xe,ye,De,Ee,Te,Ie,Me,we,Pe,Re,Le,be,Fe,P,Ve,Mi,rt,Pi],styles:["table[_ngcontent-%COMP%]{width:100%}.mat-elevation-z1[_ngcontent-%COMP%]{margin:1em 0 1.5em}h2[_ngcontent-%COMP%], h3[_ngcontent-%COMP%], h4[_ngcontent-%COMP%]{margin:0;font-weight:500}span[_ngcontent-%COMP%]{margin:.5em 0}mat-divider[_ngcontent-%COMP%]{margin:0 0 .5em}.margin-t[_ngcontent-%COMP%]{margin-top:1em}"]})}}return e})();function Bn(e,p){e&1&&h(0,"fa-icon",14)}function kn(e,p){e&1&&h(0,"fa-icon",14)}function Nn(e,p){e&1&&h(0,"fa-icon",15)}function On(e,p){e&1&&h(0,"fa-icon",16)}function Vn(e,p){e&1&&h(0,"fa-icon",17)}function qn(e,p){e&1&&(s(0),o(1,"translate")),e&2&&l(c(1,1,"labels.inputs.DETAILS"))}function Hn(e,p){e&1&&(s(0),o(1,"translate")),e&2&&l(c(1,1,"labels.inputs.TERMS"))}function jn(e,p){e&1&&(s(0),o(1,"translate")),e&2&&l(c(1,1,"labels.inputs.CHARGES"))}function Ln(e,p){e&1&&(s(0),o(1,"translate")),e&2&&l(c(1,1,"labels.inputs.PREVIEW"))}function Un(e,p){if(e&1){let i=R();a(0,"mat-step",13),C(1,Ln,2,3,"ng-template",9),a(2,"mifosx-shares-account-preview-step",18),b("submitEvent",function(){I(i);let r=A();return M(r.submit())}),n()()}if(e&2){let i=A();t(2),d("sharesAccountProductTemplate",i.sharesAccountProductTemplate)("sharesAccountTemplate",i.sharesAccountTemplate)("sharesAccountTermsForm",i.sharesAccountTermsForm)("sharesAccount",i.sharesAccount)}}var Nt=(()=>{class e{constructor(){this.route=f(B),this.router=f(Q),this.dateUtils=f(ne),this.sharesService=f(k),this.settingsService=f(j),this.route.data.subscribe(i=>{this.sharesAccountTemplate=i.sharesAccountTemplate})}setTemplate(i){this.sharesAccountProductTemplate=i}get sharesAccountDetailsForm(){return this.sharesAccountDetailsStep.sharesAccountDetailsForm}get sharesAccountTermsForm(){return this.sharesAccountTermsStep.sharesAccountTermsForm}get sharesAccountFormValid(){return this.sharesAccountDetailsForm.valid&&this.sharesAccountTermsForm.valid}get sharesAccount(){return H(H(H({},this.sharesAccountDetailsStep.sharesAccountDetails),this.sharesAccountTermsStep.sharesAccountTerms),this.sharesAccountChargesStep.sharesAccountCharges)}submit(){let i=this.settingsService.language.code,m=this.settingsService.dateFormat,r=K(H({},this.sharesAccount),{clientId:this.sharesAccountTemplate.clientId,charges:this.sharesAccount.charges.map(u=>({chargeId:u.id,amount:u.amount})),applicationDate:this.dateUtils.formatDate(this.sharesAccount.applicationDate,m),submittedDate:this.dateUtils.formatDate(this.sharesAccount.submittedDate,m),unitPrice:this.sharesAccountTermsForm.get("unitPrice").value,dateFormat:m,locale:i});this.sharesService.createSharesAccount(r).subscribe(u=>{this.router.navigate(["../",u.resourceId],{relativeTo:this.route})})}static{this.\u0275fac=function(m){return new(m||e)}}static{this.\u0275cmp=x({type:e,selectors:[["mifosx-create-shares-account"]],viewQuery:function(m,r){if(m&1&&(ee(Ge,7),ee(ze,7),ee(Qe,7)),m&2){let u;te(u=ie())&&(r.sharesAccountDetailsStep=u.first),te(u=ie())&&(r.sharesAccountTermsStep=u.first),te(u=ie())&&(r.sharesAccountChargesStep=u.first)}},decls:18,vars:9,consts:[["shareProductStepper",""],[1,"container"],["orientation","vertical","labelPosition","bottom",1,"mat-elevation-z8",3,"linear"],["matStepperIcon","number"],["matStepperIcon","edit"],["matStepperIcon","done"],["matStepperIcon","error"],["matStepperIcon","preview"],[3,"stepControl"],["matStepLabel",""],[3,"sharesAccountProductTemplate","sharesAccountTemplate"],[3,"sharesAccountProductTemplate"],[3,"sharesAccountProductTemplate","sharesAccountTemplate","currencyCode"],["completed",""],["icon","pencil-alt","size","sm"],["icon","check","size","sm"],["icon","exclamation-triangle","size","lg"],["icon","eye","size","sm"],[3,"submitEvent","sharesAccountProductTemplate","sharesAccountTemplate","sharesAccountTermsForm","sharesAccount"]],template:function(m,r){if(m&1){let u=R();a(0,"div",1)(1,"mat-stepper",2,0),C(3,Bn,1,0,"ng-template",3)(4,kn,1,0,"ng-template",4)(5,Nn,1,0,"ng-template",5)(6,On,1,0,"ng-template",6)(7,Vn,1,0,"ng-template",7),a(8,"mat-step",8),C(9,qn,2,3,"ng-template",9),a(10,"mifosx-shares-account-details-step",10),b("sharesAccountProductTemplate",function(q){return I(u),M(r.setTemplate(q))}),n()(),a(11,"mat-step",8),C(12,Hn,2,3,"ng-template",9),h(13,"mifosx-shares-account-terms-step",11),n(),a(14,"mat-step"),C(15,jn,2,3,"ng-template",9),h(16,"mifosx-shares-account-charges-step",12),n(),v(17,Un,3,4,"mat-step",13),n()()}m&2&&(t(),d("linear",!1),t(7),d("stepControl",r.sharesAccountDetailsForm),t(2),d("sharesAccountTemplate",r.sharesAccountTemplate),t(),d("stepControl",r.sharesAccountTermsForm),t(2),d("sharesAccountProductTemplate",r.sharesAccountProductTemplate),t(3),d("sharesAccountProductTemplate",r.sharesAccountProductTemplate)("sharesAccountTemplate",r.sharesAccountTemplate)("currencyCode",r.sharesAccountTermsForm.get("currencyCode")),t(),_(r.sharesAccountFormValid?17:-1))},dependencies:[T,D,Et,Dt,be,yt,Tt,Ge,ze,Qe,st,P],encapsulation:2})}}return e})();function $n(e,p){e&1&&h(0,"fa-icon",13)}function Gn(e,p){e&1&&h(0,"fa-icon",13)}function zn(e,p){e&1&&h(0,"fa-icon",14)}function Qn(e,p){e&1&&h(0,"fa-icon",15)}function Kn(e,p){e&1&&h(0,"fa-icon",16)}function Wn(e,p){e&1&&(s(0),o(1,"translate")),e&2&&l(c(1,1,"labels.inputs.DETAILS"))}function Yn(e,p){e&1&&(s(0),o(1,"translate")),e&2&&l(c(1,1,"labels.inputs.TERMS"))}function Jn(e,p){e&1&&(s(0),o(1,"translate")),e&2&&l(c(1,1,"labels.inputs.CHARGES"))}function Xn(e,p){e&1&&(s(0),o(1,"translate")),e&2&&l(c(1,1,"labels.inputs.PREVIEW"))}function Zn(e,p){if(e&1){let i=R();a(0,"mat-step",12),C(1,Xn,2,3,"ng-template",9),a(2,"mifosx-shares-account-preview-step",17),b("submitEvent",function(){I(i);let r=A();return M(r.submit())}),n()()}if(e&2){let i=A();t(2),d("sharesAccountProductTemplate",i.sharesAccountProductTemplate)("sharesAccountTemplate",i.sharesAccountAndTemplate)("sharesAccountTermsForm",i.sharesAccountTermsForm)("sharesAccount",i.sharesAccount)}}var Ot=(()=>{class e{constructor(){this.route=f(B),this.router=f(Q),this.dateUtils=f(ne),this.sharesService=f(k),this.settingsService=f(j),this.route.data.subscribe(i=>{this.sharesAccountAndTemplate=i.sharesAccountAndTemplate})}setTemplate(i){this.sharesAccountProductTemplate=i}get sharesAccountDetailsForm(){return this.sharesAccountDetailsStep.sharesAccountDetailsForm}get sharesAccountTermsForm(){return this.sharesAccountTermsStep.sharesAccountTermsForm}get sharesAccountFormValidAndNotPristine(){return this.sharesAccountDetailsForm.valid&&this.sharesAccountTermsForm.valid&&(!this.sharesAccountDetailsForm.pristine||!this.sharesAccountTermsForm.pristine||!this.sharesAccountChargesStep.pristine)}get sharesAccount(){return H(H(H({},this.sharesAccountDetailsStep.sharesAccountDetails),this.sharesAccountTermsStep.sharesAccountTerms),this.sharesAccountChargesStep.sharesAccountCharges)}submit(){let i=this.settingsService.language.code,m=this.settingsService.dateFormat,r=K(H({},this.sharesAccount),{clientId:this.sharesAccountAndTemplate.clientId,charges:this.sharesAccount.charges.map(u=>({chargeId:u.id,amount:u.amount})),applicationDate:this.dateUtils.formatDate(this.sharesAccount.applicationDate,m),submittedDate:this.dateUtils.formatDate(this.sharesAccount.submittedDate,m),unitPrice:this.sharesAccountTermsForm.get("unitPrice").value,dateFormat:m,locale:i});this.sharesService.updateSharesAccount(this.sharesAccountAndTemplate.id,r).subscribe(u=>{this.router.navigate(["../"],{relativeTo:this.route})})}static{this.\u0275fac=function(m){return new(m||e)}}static{this.\u0275cmp=x({type:e,selectors:[["mifosx-edit-shares-account"]],viewQuery:function(m,r){if(m&1&&(ee(Ge,7),ee(ze,7),ee(Qe,7)),m&2){let u;te(u=ie())&&(r.sharesAccountDetailsStep=u.first),te(u=ie())&&(r.sharesAccountTermsStep=u.first),te(u=ie())&&(r.sharesAccountChargesStep=u.first)}},decls:18,vars:10,consts:[["shareProductStepper",""],[1,"container"],["orientation","vertical","labelPosition","bottom",1,"mat-elevation-z8",3,"linear"],["matStepperIcon","number"],["matStepperIcon","edit"],["matStepperIcon","done"],["matStepperIcon","error"],["matStepperIcon","preview"],[3,"stepControl"],["matStepLabel",""],[3,"sharesAccountProductTemplate","sharesAccountTemplate"],[3,"sharesAccountProductTemplate","sharesAccountTemplate","currencyCode"],["completed",""],["icon","pencil-alt","size","sm"],["icon","check","size","sm"],["icon","exclamation-triangle","size","lg"],["icon","eye","size","sm"],[3,"submitEvent","sharesAccountProductTemplate","sharesAccountTemplate","sharesAccountTermsForm","sharesAccount"]],template:function(m,r){if(m&1){let u=R();a(0,"div",1)(1,"mat-stepper",2,0),C(3,$n,1,0,"ng-template",3)(4,Gn,1,0,"ng-template",4)(5,zn,1,0,"ng-template",5)(6,Qn,1,0,"ng-template",6)(7,Kn,1,0,"ng-template",7),a(8,"mat-step",8),C(9,Wn,2,3,"ng-template",9),a(10,"mifosx-shares-account-details-step",10),b("sharesAccountProductTemplate",function(q){return I(u),M(r.setTemplate(q))}),n()(),a(11,"mat-step",8),C(12,Yn,2,3,"ng-template",9),h(13,"mifosx-shares-account-terms-step",10),n(),a(14,"mat-step"),C(15,Jn,2,3,"ng-template",9),h(16,"mifosx-shares-account-charges-step",11),n(),v(17,Zn,3,4,"mat-step",12),n()()}m&2&&(t(),d("linear",!1),t(7),d("stepControl",r.sharesAccountDetailsForm),t(2),d("sharesAccountTemplate",r.sharesAccountAndTemplate),t(),d("stepControl",r.sharesAccountTermsForm),t(2),d("sharesAccountProductTemplate",r.sharesAccountProductTemplate)("sharesAccountTemplate",r.sharesAccountAndTemplate),t(3),d("sharesAccountProductTemplate",r.sharesAccountProductTemplate)("sharesAccountTemplate",r.sharesAccountAndTemplate)("currencyCode",r.sharesAccountTermsForm.get("currencyCode")),t(),_(r.sharesAccountFormValidAndNotPristine?17:-1))},dependencies:[T,D,Et,Dt,be,yt,Tt,Ge,ze,Qe,st,P],encapsulation:2})}}return e})();var er=()=>["../../"];function tr(e,p){e&1&&(a(0,"mat-error"),s(1),o(2,"translate"),o(3,"translate"),a(4,"strong"),s(5),o(6,"translate"),n()()),e&2&&(t(),w(" ",c(2,3,"labels.inputs.Approved On Date")," ",c(3,5,"labels.commons.is")," "),t(4),l(c(6,7,"labels.commons.required")))}var Vt=(()=>{class e{constructor(){this.formBuilder=f(pe),this.sharesService=f(k),this.dateUtils=f(ne),this.route=f(B),this.router=f(Q),this.settingsService=f(j),this.minDate=new Date(2e3,0,1),this.maxDate=new Date,this.accountId=this.route.parent.snapshot.params.shareAccountId}ngOnInit(){this.maxDate=this.settingsService.businessDate,this.createApproveSharesAccountForm()}createApproveSharesAccountForm(){this.approveSharesAccountForm=this.formBuilder.group({approvedDate:["",G.required],note:[""]})}submit(){let i=this.approveSharesAccountForm.value,m=this.settingsService.language.code,r=this.settingsService.dateFormat,u=this.approveSharesAccountForm.value.approvedDate;i.approvedDate instanceof Date&&(i.approvedDate=this.dateUtils.formatDate(u,r));let g=K(H({},i),{dateFormat:r,locale:m});this.sharesService.executeSharesAccountCommand(this.accountId,"approve",g).subscribe(()=>{this.router.navigate(["../../"],{relativeTo:this.route})})}static{this.\u0275fac=function(m){return new(m||e)}}static{this.\u0275cmp=x({type:e,selectors:[["mifosx-approve-shares-account"]],decls:26,vars:21,consts:[["approvedDatePicker",""],[1,"container"],[3,"ngSubmit","formGroup"],[1,"layout-column"],[3,"click"],["matInput","","required","","formControlName","approvedDate",3,"min","max","matDatepicker"],["matSuffix","",3,"for"],["matInput","","formControlName","note","cdkTextareaAutosize","","cdkAutosizeMinRows","2"],[1,"layout-row","align-center","gap-5px","responsive-column"],["type","button","mat-raised-button","",3,"routerLink"],["mat-raised-button","","color","primary",3,"disabled"]],template:function(m,r){if(m&1){let u=R();a(0,"div",1)(1,"mat-card")(2,"form",2),b("ngSubmit",function(){return I(u),M(r.submit())}),a(3,"mat-card-content")(4,"div",3)(5,"mat-form-field",4),b("click",function(){I(u);let q=F(12);return M(q.open())}),a(6,"mat-label"),s(7),o(8,"translate"),n(),h(9,"input",5)(10,"mat-datepicker-toggle",6)(11,"mat-datepicker",null,0),v(13,tr,7,9,"mat-error"),n(),a(14,"mat-form-field")(15,"mat-label"),s(16),o(17,"translate"),n(),h(18,"textarea",7),n()()(),a(19,"mat-card-actions",8)(20,"button",9),s(21),o(22,"translate"),n(),a(23,"button",10),s(24),o(25,"translate"),n()()()()()}if(m&2){let u=F(12);t(2),d("formGroup",r.approveSharesAccountForm),t(5),l(c(8,12,"labels.inputs.Approved On Date")),t(2),d("min",r.minDate)("max",r.maxDate)("matDatepicker",u),t(),d("for",u),t(3),_(r.approveSharesAccountForm.controls.approvedDate.hasError("required")?13:-1),t(3),l(c(17,14,"labels.inputs.Note")),t(4),d("routerLink",O(20,er)),t(),S(" ",c(22,16,"labels.buttons.Cancel")," "),t(2),d("disabled",!r.approveSharesAccountForm.valid),t(),S(" ",c(25,18,"labels.buttons.Submit")," ")}},dependencies:[T,D,J,re,oe,Y,me,se,ce,W,le,de,ge,Z,X,ue,he,fe,Ce,ve,Se,N,Ze,P],styles:[".container[_ngcontent-%COMP%]{max-width:37rem}"]})}}return e})();var ir=()=>["../../"];function ar(e,p){e&1&&(a(0,"mat-error"),s(1),o(2,"translate"),o(3,"translate"),a(4,"strong"),s(5),o(6,"translate"),n()()),e&2&&(t(),w(" ",c(2,3,"labels.inputs.Rejected On Date")," ",c(3,5,"labels.commons.is")," "),t(4),l(c(6,7,"labels.commons.required")))}var qt=(()=>{class e{constructor(){this.formBuilder=f(pe),this.sharesService=f(k),this.dateUtils=f(ne),this.route=f(B),this.router=f(Q),this.settingsService=f(j),this.minDate=new Date(2e3,0,1),this.maxDate=new Date,this.accountId=this.route.parent.snapshot.params.shareAccountId}ngOnInit(){this.maxDate=this.settingsService.businessDate,this.createRejectSharesAccountForm()}createRejectSharesAccountForm(){this.rejectSharesAccountForm=this.formBuilder.group({rejectedDate:["",G.required],note:[""]})}submit(){let i=this.rejectSharesAccountForm.value,m=this.settingsService.language.code,r=this.settingsService.dateFormat,u=this.rejectSharesAccountForm.value.rejectedDate;i.rejectedDate instanceof Date&&(i.rejectedDate=this.dateUtils.formatDate(u,r));let g=K(H({},i),{dateFormat:r,locale:m});this.sharesService.executeSharesAccountCommand(this.accountId,"reject",g).subscribe(()=>{this.router.navigate(["../../"],{relativeTo:this.route})})}static{this.\u0275fac=function(m){return new(m||e)}}static{this.\u0275cmp=x({type:e,selectors:[["mifosx-reject-shares-account"]],decls:26,vars:21,consts:[["rejectedDatePicker",""],[1,"container"],[3,"ngSubmit","formGroup"],[1,"layout-column"],[3,"click"],["matInput","","required","","formControlName","rejectedDate",3,"min","max","matDatepicker"],["matSuffix","",3,"for"],["matInput","","formControlName","note","cdkTextareaAutosize","","cdkAutosizeMinRows","2"],[1,"layout-row","align-center","gap-5px","responsive-column"],["type","button","mat-raised-button","",3,"routerLink"],["mat-raised-button","","color","warn",3,"disabled"]],template:function(m,r){if(m&1){let u=R();a(0,"div",1)(1,"mat-card")(2,"form",2),b("ngSubmit",function(){return I(u),M(r.submit())}),a(3,"mat-card-content")(4,"div",3)(5,"mat-form-field",4),b("click",function(){I(u);let q=F(12);return M(q.open())}),a(6,"mat-label"),s(7),o(8,"translate"),n(),h(9,"input",5)(10,"mat-datepicker-toggle",6)(11,"mat-datepicker",null,0),v(13,ar,7,9,"mat-error"),n(),a(14,"mat-form-field")(15,"mat-label"),s(16),o(17,"translate"),n(),h(18,"textarea",7),n()()(),a(19,"mat-card-actions",8)(20,"button",9),s(21),o(22,"translate"),n(),a(23,"button",10),s(24),o(25,"translate"),n()()()()()}if(m&2){let u=F(12);t(2),d("formGroup",r.rejectSharesAccountForm),t(5),l(c(8,12,"labels.inputs.Rejected On Date")),t(2),d("min",r.minDate)("max",r.maxDate)("matDatepicker",u),t(),d("for",u),t(3),_(r.rejectSharesAccountForm.controls.rejectedDate.hasError("required")?13:-1),t(3),l(c(17,14,"labels.inputs.Note")),t(4),d("routerLink",O(20,ir)),t(),S(" ",c(22,16,"labels.buttons.Cancel")," "),t(2),d("disabled",!r.rejectSharesAccountForm.valid),t(),S(" ",c(25,18,"labels.buttons.Submit")," ")}},dependencies:[T,D,J,re,oe,Y,me,se,ce,W,le,de,ge,Z,X,ue,he,fe,Ce,ve,Se,N,Ze,P],styles:[".container[_ngcontent-%COMP%]{max-width:37rem}"]})}}return e})();var nr=()=>["../../"];function rr(e,p){e&1&&(a(0,"mat-error"),s(1),o(2,"translate"),o(3,"translate"),a(4,"strong"),s(5),o(6,"translate"),n()()),e&2&&(t(),w(" ",c(2,3,"labels.inputs.Closed On Date")," ",c(3,5,"labels.commons.is")," "),t(4),l(c(6,7,"labels.commons.required")))}var Ht=(()=>{class e{constructor(){this.formBuilder=f(pe),this.sharesService=f(k),this.dateUtils=f(ne),this.route=f(B),this.router=f(Q),this.settingsService=f(j),this.minDate=new Date(2e3,0,1),this.maxDate=new Date,this.accountId=this.route.parent.snapshot.params.shareAccountId}ngOnInit(){this.maxDate=this.settingsService.businessDate,this.createCloseSharesAccountForm()}createCloseSharesAccountForm(){this.closeSharesAccountForm=this.formBuilder.group({closedDate:["",G.required],note:[""]})}submit(){let i=this.closeSharesAccountForm.value,m=this.settingsService.language.code,r=this.settingsService.dateFormat,u=this.closeSharesAccountForm.value.closedDate;i.closedDate instanceof Date&&(i.closedDate=this.dateUtils.formatDate(u,r));let g=K(H({},i),{dateFormat:r,locale:m});this.sharesService.executeSharesAccountCommand(this.accountId,"close",g).subscribe(()=>{this.router.navigate(["../../"],{relativeTo:this.route})})}static{this.\u0275fac=function(m){return new(m||e)}}static{this.\u0275cmp=x({type:e,selectors:[["mifosx-close-shares-account"]],decls:26,vars:21,consts:[["closedDatePicker",""],[1,"container"],[3,"ngSubmit","formGroup"],[1,"layout-column"],[3,"click"],["matInput","","required","","formControlName","closedDate",3,"min","max","matDatepicker"],["matSuffix","",3,"for"],["matInput","","formControlName","note","cdkTextareaAutosize","","cdkAutosizeMinRows","2"],[1,"layout-row","align-center","gap-5px","responsive-column"],["type","button","mat-raised-button","",3,"routerLink"],["mat-raised-button","","color","warn",3,"disabled"]],template:function(m,r){if(m&1){let u=R();a(0,"div",1)(1,"mat-card")(2,"form",2),b("ngSubmit",function(){return I(u),M(r.submit())}),a(3,"mat-card-content")(4,"div",3)(5,"mat-form-field",4),b("click",function(){I(u);let q=F(12);return M(q.open())}),a(6,"mat-label"),s(7),o(8,"translate"),n(),h(9,"input",5)(10,"mat-datepicker-toggle",6)(11,"mat-datepicker",null,0),v(13,rr,7,9,"mat-error"),n(),a(14,"mat-form-field")(15,"mat-label"),s(16),o(17,"translate"),n(),h(18,"textarea",7),n()()(),a(19,"mat-card-actions",8)(20,"button",9),s(21),o(22,"translate"),n(),a(23,"button",10),s(24),o(25,"translate"),n()()()()()}if(m&2){let u=F(12);t(2),d("formGroup",r.closeSharesAccountForm),t(5),l(c(8,12,"labels.inputs.Closed On Date")),t(2),d("min",r.minDate)("max",r.maxDate)("matDatepicker",u),t(),d("for",u),t(3),_(r.closeSharesAccountForm.controls.closedDate.hasError("required")?13:-1),t(3),l(c(17,14,"labels.inputs.Note")),t(4),d("routerLink",O(20,nr)),t(),S(" ",c(22,16,"labels.buttons.Cancel")," "),t(2),d("disabled",!r.closeSharesAccountForm.valid),t(),S(" ",c(25,18,"labels.buttons.Submit")," ")}},dependencies:[T,D,J,re,oe,Y,me,se,ce,W,le,de,ge,Z,X,ue,he,fe,Ce,ve,Se,N,Ze,P],styles:[".container[_ngcontent-%COMP%]{max-width:37rem}"]})}}return e})();var or=()=>["../../"];function sr(e,p){e&1&&(a(0,"mat-error"),s(1),o(2,"translate"),o(3,"translate"),a(4,"strong"),s(5),o(6,"translate"),n()()),e&2&&(t(),w(" ",c(2,3,"labels.inputs.Activated On Date")," ",c(3,5,"labels.commons.is")," "),t(4),l(c(6,7,"labels.commons.required")))}var jt=(()=>{class e{constructor(){this.formBuilder=f(pe),this.sharesService=f(k),this.dateUtils=f(ne),this.route=f(B),this.router=f(Q),this.settingsService=f(j),this.minDate=new Date(2e3,0,1),this.maxDate=new Date,this.accountId=this.route.parent.snapshot.params.shareAccountId}ngOnInit(){this.maxDate=this.settingsService.businessDate,this.createActivateSharesAccountForm()}createActivateSharesAccountForm(){this.activateSharesAccountForm=this.formBuilder.group({activatedDate:["",G.required]})}submit(){let i=this.activateSharesAccountForm.value,m=this.settingsService.language.code,r=this.settingsService.dateFormat,u=this.activateSharesAccountForm.value.activatedDate;i.activatedDate instanceof Date&&(i.activatedDate=this.dateUtils.formatDate(u,r));let g=K(H({},i),{dateFormat:r,locale:m});this.sharesService.executeSharesAccountCommand(this.accountId,"activate",g).subscribe(()=>{this.router.navigate(["../../"],{relativeTo:this.route})})}static{this.\u0275fac=function(m){return new(m||e)}}static{this.\u0275cmp=x({type:e,selectors:[["mifosx-activate-shares-account"]],decls:20,vars:18,consts:[["activatedDatePicker",""],[1,"container"],[3,"ngSubmit","formGroup"],[1,"flex-fill",3,"click"],["matInput","","required","","formControlName","activatedDate",3,"min","max","matDatepicker"],["matSuffix","",3,"for"],[1,"layout-row","align-center","gap-5px","responsive-column"],["type","button","mat-raised-button","",3,"routerLink"],["mat-raised-button","","color","primary",3,"disabled"]],template:function(m,r){if(m&1){let u=R();a(0,"div",1)(1,"mat-card")(2,"form",2),b("ngSubmit",function(){return I(u),M(r.submit())}),a(3,"mat-card-content")(4,"mat-form-field",3),b("click",function(){I(u);let q=F(11);return M(q.open())}),a(5,"mat-label"),s(6),o(7,"translate"),n(),h(8,"input",4)(9,"mat-datepicker-toggle",5)(10,"mat-datepicker",null,0),v(12,sr,7,9,"mat-error"),n()(),a(13,"mat-card-actions",6)(14,"button",7),s(15),o(16,"translate"),n(),a(17,"button",8),s(18),o(19,"translate"),n()()()()()}if(m&2){let u=F(11);t(2),d("formGroup",r.activateSharesAccountForm),t(4),l(c(7,11,"labels.inputs.Activated On Date")),t(2),d("min",r.minDate)("max",r.maxDate)("matDatepicker",u),t(),d("for",u),t(3),_(r.activateSharesAccountForm.controls.activatedDate.hasError("required")?12:-1),t(2),d("routerLink",O(17,or)),t(),S(" ",c(16,13,"labels.buttons.Cancel")," "),t(2),d("disabled",!r.activateSharesAccountForm.valid),t(),S(" ",c(19,15,"labels.buttons.Submit")," ")}},dependencies:[T,D,J,re,oe,Y,me,se,ce,W,le,de,ge,Z,X,ue,he,fe,Ce,ve,Se,N,P],styles:[".container[_ngcontent-%COMP%]{max-width:37rem}"]})}}return e})();var cr=()=>["../../"],Lt=(()=>{class e{constructor(){this.sharesService=f(k),this.route=f(B),this.router=f(Q),this.accountId=this.route.parent.snapshot.params.shareAccountId}submit(){this.sharesService.executeSharesAccountCommand(this.accountId,"undoapproval",{}).subscribe(()=>{this.router.navigate(["../../"],{relativeTo:this.route})})}static{this.\u0275fac=function(m){return new(m||e)}}static{this.\u0275cmp=x({type:e,selectors:[["mifosx-undo-approval-shares-account"]],decls:15,vars:12,consts:[[1,"container"],[3,"ngSubmit"],[1,"mat-typography","confirm-text"],[1,"layout-row","align-center","gap-5px","responsive-column"],["type","button","mat-raised-button","",3,"routerLink"],["mat-raised-button","","color","warn"]],template:function(m,r){m&1&&(a(0,"div",0)(1,"mat-card")(2,"form",1),b("ngSubmit",function(){return r.submit()}),a(3,"mat-card-content")(4,"div")(5,"p",2),s(6),o(7,"translate"),n()()(),a(8,"mat-card-actions",3)(9,"button",4),s(10),o(11,"translate"),n(),a(12,"button",5),s(13),o(14,"translate"),n()()()()()),m&2&&(t(6),w(" ",c(7,5,"labels.text.Undo approval of shares account with ID"),": ",r.accountId," ? "),t(3),d("routerLink",O(11,cr)),t(),S(" ",c(11,7,"labels.buttons.Cancel")," "),t(3),l(c(14,9,"labels.buttons.Submit")))},dependencies:[T,D,J,Y,W,le,de,ge,N,ui,li,P],styles:[".container[_ngcontent-%COMP%]{max-width:37rem}.container[_ngcontent-%COMP%] .confirm-text[_ngcontent-%COMP%]{font-size:16px;text-align:center}"]})}}return e})();var mr=()=>["../../"];function pr(e,p){e&1&&(a(0,"mat-error"),s(1),o(2,"translate"),o(3,"translate"),a(4,"strong"),s(5),o(6,"translate"),n()()),e&2&&(t(),w(" ",c(2,3,"labels.inputs.Request Date")," ",c(3,5,"labels.commons.is")," "),t(4),l(c(6,7,"labels.commons.required")))}function lr(e,p){e&1&&(a(0,"mat-error"),s(1),o(2,"translate"),o(3,"translate"),a(4,"strong"),s(5),o(6,"translate"),n()()),e&2&&(t(),w(" ",c(2,3,"labels.inputs.Requested Shares")," ",c(3,5,"labels.commons.is")," "),t(4),l(c(6,7,"labels.commons.required")))}var Ut=(()=>{class e{constructor(){this.formBuilder=f(pe),this.sharesService=f(k),this.dateUtils=f(ne),this.route=f(B),this.router=f(Q),this.settingsService=f(j),this.minDate=new Date(2e3,0,1),this.maxDate=new Date,this.accountId=this.route.parent.snapshot.params.shareAccountId,this.route.data.subscribe(i=>{this.sharesAccountData=i.shareAccountActionData})}ngOnInit(){this.maxDate=this.settingsService.businessDate,this.createApplySharesAccountForm(),this.applySharesForm.get("unitPrice").patchValue(this.sharesAccountData.currentMarketPrice||"")}createApplySharesAccountForm(){this.applySharesForm=this.formBuilder.group({requestedDate:["",G.required],requestedShares:["",G.required],unitPrice:[{value:"",disabled:!0}]})}submit(){let i=this.applySharesForm.value,m=this.settingsService.language.code,r=this.settingsService.dateFormat,u=this.applySharesForm.value.requestedDate;i.requestedDate instanceof Date&&(i.requestedDate=this.dateUtils.formatDate(u,r));let g=K(H({},i),{unitPrice:this.applySharesForm.get("unitPrice").value,dateFormat:r,locale:m});this.sharesService.executeSharesAccountCommand(this.accountId,"applyadditionalshares",g).subscribe(()=>{this.router.navigate(["../../"],{relativeTo:this.route})})}static{this.\u0275fac=function(m){return new(m||e)}}static{this.\u0275cmp=x({type:e,selectors:[["mifosx-apply-shares"]],decls:32,vars:25,consts:[["requestedDatePicker",""],[1,"container"],[3,"ngSubmit","formGroup"],[1,"layout-column"],[3,"click"],["matInput","","required","","formControlName","requestedDate",3,"min","max","matDatepicker"],["matSuffix","",3,"for"],["matInput","","required","","formControlName","requestedShares"],["matInput","","required","","formControlName","unitPrice"],[1,"layout-row","align-center","gap-5px","responsive-column"],["type","button","mat-raised-button","",3,"routerLink"],["mat-raised-button","","color","primary",3,"disabled"]],template:function(m,r){if(m&1){let u=R();a(0,"div",1)(1,"mat-card")(2,"form",2),b("ngSubmit",function(){return I(u),M(r.submit())}),a(3,"mat-card-content")(4,"div",3)(5,"mat-form-field",4),b("click",function(){I(u);let q=F(12);return M(q.open())}),a(6,"mat-label"),s(7),o(8,"translate"),n(),h(9,"input",5)(10,"mat-datepicker-toggle",6)(11,"mat-datepicker",null,0),v(13,pr,7,9,"mat-error"),n(),a(14,"mat-form-field")(15,"mat-label"),s(16),o(17,"translate"),n(),h(18,"input",7),v(19,lr,7,9,"mat-error"),n(),a(20,"mat-form-field")(21,"mat-label"),s(22),o(23,"translate"),n(),h(24,"input",8),n()()(),a(25,"mat-card-actions",9)(26,"button",10),s(27),o(28,"translate"),n(),a(29,"button",11),s(30),o(31,"translate"),n()()()()()}if(m&2){let u=F(12);t(2),d("formGroup",r.applySharesForm),t(5),l(c(8,14,"labels.inputs.Request Date")),t(2),d("min",r.minDate)("max",r.maxDate)("matDatepicker",u),t(),d("for",u),t(3),_(r.applySharesForm.controls.requestedDate.hasError("required")?13:-1),t(3),l(c(17,16,"labels.inputs.Total No. of Shares")),t(3),_(r.applySharesForm.controls.requestedShares.hasError("required")?19:-1),t(3),l(c(23,18,"labels.inputs.Current Price")),t(4),d("routerLink",O(24,mr)),t(),S(" ",c(28,20,"labels.buttons.Cancel")," "),t(2),d("disabled",!r.applySharesForm.valid),t(),S(" ",c(31,22,"labels.buttons.Submit")," ")}},dependencies:[T,D,J,re,oe,Y,me,se,ce,W,le,de,ge,Z,X,ue,he,fe,Ce,ve,Se,N,P],styles:[".container[_ngcontent-%COMP%]{max-width:37rem}"]})}}return e})();var dr=()=>["../../"];function ur(e,p){e&1&&(a(0,"mat-error"),s(1),o(2,"translate"),o(3,"translate"),a(4,"strong"),s(5),o(6,"translate"),n()()),e&2&&(t(),w(" ",c(2,3,"labels.inputs.Request Date")," ",c(3,5,"labels.commons.is")," "),t(4),l(c(6,7,"labels.commons.required")))}function hr(e,p){e&1&&(a(0,"mat-error"),s(1),o(2,"translate"),o(3,"translate"),a(4,"strong"),s(5),o(6,"translate"),n()()),e&2&&(t(),w(" ",c(2,3,"labels.inputs.Requested Shares")," ",c(3,5,"labels.commons.is")," "),t(4),l(c(6,7,"labels.commons.required")))}var $t=(()=>{class e{constructor(){this.formBuilder=f(pe),this.sharesService=f(k),this.dateUtils=f(ne),this.route=f(B),this.router=f(Q),this.settingsService=f(j),this.minDate=new Date(2e3,0,1),this.maxDate=new Date,this.accountId=this.route.parent.snapshot.params.shareAccountId,this.route.data.subscribe(i=>{this.sharesAccountData=i.shareAccountActionData})}ngOnInit(){this.maxDate=this.settingsService.businessDate,this.createRedeemSharesAccountForm(),this.redeemSharesForm.get("unitPrice").patchValue(this.sharesAccountData.currentMarketPrice||"")}createRedeemSharesAccountForm(){this.redeemSharesForm=this.formBuilder.group({requestedDate:["",G.required],requestedShares:["",G.required],unitPrice:[{value:"",disabled:!0}]})}submit(){let i=this.redeemSharesForm.value,m=this.settingsService.language.code,r=this.settingsService.dateFormat,u=this.redeemSharesForm.value.requestedDate;i.requestedDate instanceof Date&&(i.requestedDate=this.dateUtils.formatDate(u,r));let g=K(H({},i),{unitPrice:this.redeemSharesForm.get("unitPrice").value,dateFormat:r,locale:m});this.sharesService.executeSharesAccountCommand(this.accountId,"redeemshares",g).subscribe(()=>{this.router.navigate(["../../"],{relativeTo:this.route})})}static{this.\u0275fac=function(m){return new(m||e)}}static{this.\u0275cmp=x({type:e,selectors:[["mifosx-redeem-shares"]],decls:32,vars:25,consts:[["requestedDatePicker",""],[1,"container"],[3,"ngSubmit","formGroup"],[1,"layout-column"],[3,"click"],["matInput","","required","","formControlName","requestedDate",3,"min","max","matDatepicker"],["matSuffix","",3,"for"],["matInput","","required","","formControlName","requestedShares"],["matInput","","required","","formControlName","unitPrice"],[1,"layout-row","align-center","gap-5px","responsive-column"],["type","button","mat-raised-button","",3,"routerLink"],["mat-raised-button","","color","warn",3,"disabled"]],template:function(m,r){if(m&1){let u=R();a(0,"div",1)(1,"mat-card")(2,"form",2),b("ngSubmit",function(){return I(u),M(r.submit())}),a(3,"mat-card-content")(4,"div",3)(5,"mat-form-field",4),b("click",function(){I(u);let q=F(12);return M(q.open())}),a(6,"mat-label"),s(7),o(8,"translate"),n(),h(9,"input",5)(10,"mat-datepicker-toggle",6)(11,"mat-datepicker",null,0),v(13,ur,7,9,"mat-error"),n(),a(14,"mat-form-field")(15,"mat-label"),s(16),o(17,"translate"),n(),h(18,"input",7),v(19,hr,7,9,"mat-error"),n(),a(20,"mat-form-field")(21,"mat-label"),s(22),o(23,"translate"),n(),h(24,"input",8),n()()(),a(25,"mat-card-actions",9)(26,"button",10),s(27),o(28,"translate"),n(),a(29,"button",11),s(30),o(31,"translate"),n()()()()()}if(m&2){let u=F(12);t(2),d("formGroup",r.redeemSharesForm),t(5),l(c(8,14,"labels.inputs.Request Date")),t(2),d("min",r.minDate)("max",r.maxDate)("matDatepicker",u),t(),d("for",u),t(3),_(r.redeemSharesForm.controls.requestedDate.hasError("required")?13:-1),t(3),l(c(17,16,"labels.inputs.Total No. of Shares")),t(3),_(r.redeemSharesForm.controls.requestedShares.hasError("required")?19:-1),t(3),l(c(23,18,"labels.inputs.Current Price")),t(4),d("routerLink",O(24,dr)),t(),S(" ",c(28,20,"labels.buttons.Cancel")," "),t(2),d("disabled",!r.redeemSharesForm.valid),t(),S(" ",c(31,22,"labels.buttons.Submit")," ")}},dependencies:[T,D,J,re,oe,Y,me,se,ce,W,le,de,ge,Z,X,ue,he,fe,Ce,ve,Se,N,P],styles:[".container[_ngcontent-%COMP%]{max-width:37rem}"]})}}return e})();var fr=()=>({approve:!0}),Gt=(()=>{class e{constructor(){this.dialogRef=f(ft),this.data=f(St)}static{this.\u0275fac=function(m){return new(m||e)}}static{this.\u0275cmp=x({type:e,selectors:[["mifosx-approve-share-dialog"]],decls:14,vars:15,consts:[["mat-dialog-title",""],["mat-dialog-content",""],["align","end"],["mat-raised-button","","mat-dialog-close",""],["mat-raised-button","","color","primary",3,"mat-dialog-close"]],template:function(m,r){m&1&&(a(0,"h1",0),s(1),o(2,"translate"),n(),a(3,"div",1)(4,"p"),s(5),o(6,"translate"),n()(),a(7,"mat-dialog-actions",2)(8,"button",3),s(9),o(10,"translate"),n(),a(11,"button",4),s(12),o(13,"translate"),n()()),m&2&&(t(),l(c(2,6,"labels.heading.Approve Share")),t(4),w("",c(6,8,"labels.text.Are you sure you want to approve share with id"),": ",r.data.shareId," ?"),t(4),l(c(10,10,"labels.buttons.Cancel")),t(2),d("mat-dialog-close",O(14,fr)),t(),S(" ",c(13,12,"labels.buttons.Submit")," "))},dependencies:[T,D,N,vt,_t,At,Ct,P],encapsulation:2})}}return e})();var Sr=["sharesTable"],Cr=()=>[10,25,50,100];function vr(e,p){e&1&&(a(0,"th",15),s(1),o(2,"translate"),n()),e&2&&(t(),l(c(2,1,"labels.inputs.Transaction Date")))}function _r(e,p){if(e&1&&(a(0,"td",16),s(1),o(2,"dateFormat"),n()),e&2){let i=p.$implicit;t(),l(c(2,1,i.purchasedDate))}}function Ar(e,p){e&1&&(a(0,"th",15),s(1),o(2,"translate"),n()),e&2&&(t(),l(c(2,1,"labels.inputs.Total Shares")))}function gr(e,p){if(e&1&&(a(0,"td",16),s(1),n()),e&2){let i=p.$implicit;t(),l(i.numberOfShares)}}function br(e,p){e&1&&(a(0,"th",15),s(1),o(2,"translate"),n()),e&2&&(t(),S(" ",c(2,1,"labels.inputs.Purchased/Redeemed Price")," "))}function xr(e,p){if(e&1&&(a(0,"td",16),s(1),n()),e&2){let i=p.$implicit;t(),l(i.purchasedPrice)}}function Tr(e,p){e&1&&(a(0,"th",17),s(1),o(2,"translate"),n()),e&2&&(t(),l(c(2,1,"labels.inputs.Status")))}function Dr(e,p){if(e&1&&(a(0,"td",16),h(1,"i",18),o(2,"statusLookup"),n()),e&2){let i=p.$implicit;t(),d("ngClass",c(2,2,i.status.code))("matTooltip",i.status.value)}}function yr(e,p){e&1&&(a(0,"th",15),s(1),o(2,"translate"),n()),e&2&&(t(),l(c(2,1,"labels.inputs.Confirm Approve")))}function Er(e,p){if(e&1){let i=R();a(0,"td",16)(1,"button",19),o(2,"translate"),b("click",function(){let r=I(i).$implicit,u=A();return M(u.approve(r.id))}),h(3,"i",20),n()()}e&2&&(t(),d("matTooltip",L(c(2,2,"tooltips.Approve Share"))))}function Ir(e,p){e&1&&h(0,"tr",21)}function Mr(e,p){e&1&&h(0,"tr",22)}var zt=(()=>{class e{constructor(){this.sharesService=f(k),this.route=f(B),this.dialog=f(He),this.settingsService=f(j),this.displayedColumns=["transactionDate","totalShares","redeemedPrice","status","approve"],this.accountId=this.route.parent.snapshot.params.shareAccountId,this.route.data.subscribe(i=>{this.sharesAccountData=i.shareAccountActionData})}ngOnInit(){this.sharesData=this.sharesAccountData.purchasedShares.filter(i=>i.status.value==="Pending Approval"),this.setShares()}setShares(){this.dataSource=new qe(this.sharesData),this.dataSource.paginator=this.paginator,this.dataSource.sort=this.sort}approve(i){this.dialog.open(Gt,{data:{shareId:i}}).afterClosed().subscribe(r=>{if(r.approve){let u=this.settingsService.language.code,g=this.settingsService.dateFormat,q={requestedShares:[{id:i}],dateFormat:g,locale:u};this.sharesService.executeSharesAccountCommand(this.accountId,"approveadditionalshares",q).subscribe(()=>{let Xt=this.sharesData.find(ei=>ei.id===i),Zt=this.sharesData.indexOf(Xt);this.sharesData.splice(Zt,1),this.dataSource.data=this.sharesData,this.sharesTableRef.renderRows()})}})}static{this.\u0275fac=function(m){return new(m||e)}}static{this.\u0275cmp=x({type:e,selectors:[["mifosx-approve-shares"]],viewQuery:function(m,r){if(m&1&&(ee(it,7),ee(at,7),ee(Sr,7)),m&2){let u;te(u=ie())&&(r.paginator=u.first),te(u=ie())&&(r.sort=u.first),te(u=ie())&&(r.sharesTableRef=u.first)}},decls:22,vars:5,consts:[["sharesTable",""],[1,"container"],[1,"mat-elevation-z8"],["mat-table","","matSort","",3,"dataSource"],["matColumnDef","transactionDate"],["mat-header-cell","","mat-sort-header","",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","totalShares"],["matColumnDef","redeemedPrice"],["matColumnDef","status"],["mat-header-cell","",4,"matHeaderCellDef"],["matColumnDef","approve"],["mat-header-row","",4,"matHeaderRowDef"],["mat-row","",4,"matRowDef","matRowDefColumns"],["showFirstLastButtons","",3,"pageSizeOptions"],["mat-header-cell","","mat-sort-header",""],["mat-cell",""],["mat-header-cell",""],[1,"fa","fa-stop",3,"ngClass","matTooltip"],["mat-raised-button","","color","accent",1,"share-action-button",3,"click","matTooltip"],[1,"fa","fa-check"],["mat-header-row",""],["mat-row",""]],template:function(m,r){m&1&&(a(0,"div",1)(1,"div",2)(2,"table",3,0),y(4,4),C(5,vr,3,3,"th",5)(6,_r,3,3,"td",6),E(),y(7,7),C(8,Ar,3,3,"th",5)(9,gr,2,1,"td",6),E(),y(10,8),C(11,br,3,3,"th",5)(12,xr,2,1,"td",6),E(),y(13,9),C(14,Tr,3,3,"th",10)(15,Dr,3,4,"td",6),E(),y(16,11),C(17,yr,3,3,"th",5)(18,Er,4,4,"td",6),E(),C(19,Ir,1,0,"tr",12)(20,Mr,1,0,"tr",13),n(),h(21,"mat-paginator",14),n()()),m&2&&(t(2),d("dataSource",r.dataSource),t(17),d("matHeaderRowDef",r.displayedColumns),t(),d("matRowDefColumns",r.displayedColumns),t(),d("pageSizeOptions",O(4,Cr)))},dependencies:[T,Je,D,N,xe,at,ye,De,Ee,xt,Te,Ie,je,Me,we,Pe,Re,it,Fe,P,ot],styles:["table[_ngcontent-%COMP%]{width:100%}table[_ngcontent-%COMP%] i[_ngcontent-%COMP%]:hover{cursor:pointer}table[_ngcontent-%COMP%] .share-action-button[_ngcontent-%COMP%]{min-width:26px;padding:0 6px;margin:4px;line-height:25px}"]})}}return e})();var Pr=()=>({reject:!0}),Qt=(()=>{class e{constructor(){this.dialogRef=f(ft),this.data=f(St)}static{this.\u0275fac=function(m){return new(m||e)}}static{this.\u0275cmp=x({type:e,selectors:[["mifosx-reject-share-dialog"]],decls:14,vars:15,consts:[["mat-dialog-title",""],["mat-dialog-content",""],["align","end"],["mat-raised-button","","mat-dialog-close",""],["mat-raised-button","","color","warn",3,"mat-dialog-close"]],template:function(m,r){m&1&&(a(0,"h1",0),s(1),o(2,"translate"),n(),a(3,"div",1)(4,"p"),s(5),o(6,"translate"),n()(),a(7,"mat-dialog-actions",2)(8,"button",3),s(9),o(10,"translate"),n(),a(11,"button",4),s(12),o(13,"translate"),n()()),m&2&&(t(),l(c(2,6,"labels.heading.Reject Share")),t(4),w("",c(6,8,"labels.text.Are you sure you want to reject share with id"),": ",r.data.shareId," ?"),t(4),l(c(10,10,"labels.buttons.Cancel")),t(2),d("mat-dialog-close",O(14,Pr)),t(),S(" ",c(13,12,"labels.buttons.Submit")," "))},dependencies:[T,D,N,vt,_t,At,Ct,P],encapsulation:2})}}return e})();var wr=["sharesTable"],Rr=()=>[10,25,50,100];function Fr(e,p){e&1&&(a(0,"th",15),s(1),o(2,"translate"),n()),e&2&&(t(),l(c(2,1,"labels.inputs.Transaction Date")))}function Br(e,p){if(e&1&&(a(0,"td",16),s(1),o(2,"dateFormat"),n()),e&2){let i=p.$implicit;t(),l(c(2,1,i.purchasedDate))}}function kr(e,p){e&1&&(a(0,"th",15),s(1),o(2,"translate"),n()),e&2&&(t(),l(c(2,1,"labels.inputs.Total Shares")))}function Nr(e,p){if(e&1&&(a(0,"td",16),s(1),n()),e&2){let i=p.$implicit;t(),l(i.numberOfShares)}}function Or(e,p){e&1&&(a(0,"th",15),s(1),o(2,"translate"),n()),e&2&&(t(),S(" ",c(2,1,"labels.inputs.Purchased/Redeemed Price")," "))}function Vr(e,p){if(e&1&&(a(0,"td",16),s(1),n()),e&2){let i=p.$implicit;t(),l(i.purchasedPrice)}}function qr(e,p){e&1&&(a(0,"th",17),s(1),o(2,"translate"),n()),e&2&&(t(),l(c(2,1,"labels.inputs.Status")))}function Hr(e,p){if(e&1&&(a(0,"td",16),h(1,"i",18),o(2,"statusLookup"),n()),e&2){let i=p.$implicit;t(),d("ngClass",c(2,2,i.status.code))("matTooltip",i.status.value)}}function jr(e,p){e&1&&(a(0,"th",15),s(1),o(2,"translate"),n()),e&2&&(t(),S("",c(2,1,"labels.inputs.Confirm Reject"),"t"))}function Lr(e,p){if(e&1){let i=R();a(0,"td",16)(1,"button",19),o(2,"translate"),b("click",function(){let r=I(i).$implicit,u=A();return M(u.reject(r.id))}),h(3,"i",20),n()()}e&2&&(t(),d("matTooltip",L(c(2,2,"tooltips.Reject Share"))))}function Ur(e,p){e&1&&h(0,"tr",21)}function $r(e,p){e&1&&h(0,"tr",22)}var Kt=(()=>{class e{constructor(){this.sharesService=f(k),this.route=f(B),this.dialog=f(He),this.settingsService=f(j),this.displayedColumns=["transactionDate","totalShares","redeemedPrice","status","reject"],this.accountId=this.route.parent.snapshot.params.shareAccountId,this.route.data.subscribe(i=>{this.sharesAccountData=i.shareAccountActionData})}ngOnInit(){this.sharesData=this.sharesAccountData.purchasedShares.filter(i=>i.status.value==="Pending Approval"),this.setShares()}setShares(){this.dataSource=new qe(this.sharesData),this.dataSource.paginator=this.paginator,this.dataSource.sort=this.sort}reject(i){this.dialog.open(Qt,{data:{shareId:i}}).afterClosed().subscribe(r=>{if(r.reject){let u=this.settingsService.language.code,g=this.settingsService.dateFormat,q={requestedShares:[{id:i}],dateFormat:g,locale:u};this.sharesService.executeSharesAccountCommand(this.accountId,"rejectadditionalshares",q).subscribe(()=>{let Xt=this.sharesData.find(ei=>ei.id===i),Zt=this.sharesData.indexOf(Xt);this.sharesData.splice(Zt,1),this.dataSource.data=this.sharesData,this.sharesTableRef.renderRows()})}})}static{this.\u0275fac=function(m){return new(m||e)}}static{this.\u0275cmp=x({type:e,selectors:[["mifosx-reject-shares"]],viewQuery:function(m,r){if(m&1&&(ee(it,7),ee(at,7),ee(wr,7)),m&2){let u;te(u=ie())&&(r.paginator=u.first),te(u=ie())&&(r.sort=u.first),te(u=ie())&&(r.sharesTableRef=u.first)}},decls:22,vars:5,consts:[["sharesTable",""],[1,"container"],[1,"mat-elevation-z8"],["mat-table","","matSort","",3,"dataSource"],["matColumnDef","transactionDate"],["mat-header-cell","","mat-sort-header","",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","totalShares"],["matColumnDef","redeemedPrice"],["matColumnDef","status"],["mat-header-cell","",4,"matHeaderCellDef"],["matColumnDef","reject"],["mat-header-row","",4,"matHeaderRowDef"],["mat-row","",4,"matRowDef","matRowDefColumns"],["showFirstLastButtons","",3,"pageSizeOptions"],["mat-header-cell","","mat-sort-header",""],["mat-cell",""],["mat-header-cell",""],[1,"fa","fa-stop",3,"ngClass","matTooltip"],["mat-raised-button","","color","warn",1,"share-action-button",3,"click","matTooltip"],[1,"fa","fa-times"],["mat-header-row",""],["mat-row",""]],template:function(m,r){m&1&&(a(0,"div",1)(1,"div",2)(2,"table",3,0),y(4,4),C(5,Fr,3,3,"th",5)(6,Br,3,3,"td",6),E(),y(7,7),C(8,kr,3,3,"th",5)(9,Nr,2,1,"td",6),E(),y(10,8),C(11,Or,3,3,"th",5)(12,Vr,2,1,"td",6),E(),y(13,9),C(14,qr,3,3,"th",10)(15,Hr,3,4,"td",6),E(),y(16,11),C(17,jr,3,3,"th",5)(18,Lr,4,4,"td",6),E(),C(19,Ur,1,0,"tr",12)(20,$r,1,0,"tr",13),n(),h(21,"mat-paginator",14),n()()),m&2&&(t(2),d("dataSource",r.dataSource),t(17),d("matHeaderRowDef",r.displayedColumns),t(),d("matRowDefColumns",r.displayedColumns),t(),d("pageSizeOptions",O(4,Rr)))},dependencies:[T,Je,D,N,xe,at,ye,De,Ee,xt,Te,Ie,je,Me,we,Pe,Re,it,Fe,P,ot],styles:["table[_ngcontent-%COMP%]{width:100%}table[_ngcontent-%COMP%] i[_ngcontent-%COMP%]:hover{cursor:pointer}table[_ngcontent-%COMP%] .share-action-button[_ngcontent-%COMP%]{min-width:26px;padding:0 6px;margin:4px;line-height:25px}"]})}}return e})();function Gr(e,p){e&1&&h(0,"mifosx-approve-shares-account")}function zr(e,p){e&1&&h(0,"mifosx-reject-shares-account")}function Qr(e,p){e&1&&h(0,"mifosx-close-shares-account")}function Kr(e,p){e&1&&h(0,"mifosx-activate-shares-account")}function Wr(e,p){e&1&&h(0,"mifosx-undo-approval-shares-account")}function Yr(e,p){e&1&&h(0,"mifosx-apply-shares")}function Jr(e,p){e&1&&h(0,"mifosx-redeem-shares")}function Xr(e,p){e&1&&h(0,"mifosx-approve-shares")}function Zr(e,p){e&1&&h(0,"mifosx-reject-shares")}var Wt=(()=>{class e{constructor(){this.route=f(B),this.actions={Approve:!1,Reject:!1,Close:!1,Activate:!1,"Undo Approval":!1,"Apply Additional Shares":!1,"Redeem Shares":!1,"Approve Additional Shares":!1,"Reject Additional Shares":!1};let i=this.route.snapshot.params.name;i&&i in this.actions&&(this.actions[i]=!0)}static{this.\u0275fac=function(m){return new(m||e)}}static{this.\u0275cmp=x({type:e,selectors:[["mifosx-shares-account-actions"]],decls:9,vars:9,template:function(m,r){m&1&&(v(0,Gr,1,0,"mifosx-approve-shares-account"),v(1,zr,1,0,"mifosx-reject-shares-account"),v(2,Qr,1,0,"mifosx-close-shares-account"),v(3,Kr,1,0,"mifosx-activate-shares-account"),v(4,Wr,1,0,"mifosx-undo-approval-shares-account"),v(5,Yr,1,0,"mifosx-apply-shares"),v(6,Jr,1,0,"mifosx-redeem-shares"),v(7,Xr,1,0,"mifosx-approve-shares"),v(8,Zr,1,0,"mifosx-reject-shares")),m&2&&(_(r.actions.Approve?0:-1),t(),_(r.actions.Reject?1:-1),t(),_(r.actions.Close?2:-1),t(),_(r.actions.Activate?3:-1),t(),_(r.actions["Undo Approval"]?4:-1),t(),_(r.actions["Apply Additional Shares"]?5:-1),t(),_(r.actions["Redeem Shares"]?6:-1),t(),_(r.actions["Approve Additional Shares"]?7:-1),t(),_(r.actions["Reject Additional Shares"]?8:-1))},dependencies:[T,D,Vt,qt,Ht,jt,Lt,Ut,$t,zt,Kt],encapsulation:2})}}return e})();var Yt=(()=>{class e{constructor(){this.sharesService=f(k)}resolve(i){let m=i.paramMap.get("shareAccountId")||i.parent.paramMap.get("shareAccountId");return this.sharesService.getSharesAccountData(m,!1)}static{this.\u0275fac=function(m){return new(m||e)}}static{this.\u0275prov=Oe({token:e,factory:e.\u0275fac})}}return e})();var ii=(()=>{class e{constructor(){this.sharesService=f(k)}resolve(i){let m=i.paramMap.get("name"),r=i.paramMap.get("shareAccountId")||i.parent.parent.paramMap.get("shareAccountId");switch(m){case"Apply Additional Shares":case"Redeem Shares":case"Approve Additional Shares":case"Reject Additional Shares":return this.sharesService.getSharesAccountData(r,!0);default:return}}static{this.\u0275fac=function(m){return new(m||e)}}static{this.\u0275prov=Oe({token:e,factory:e.\u0275fac})}}return e})();var ai=(()=>{class e{constructor(){this.sharesService=f(k)}resolve(i){let m=i.parent.parent.paramMap.get("clientId");return this.sharesService.getSharesAccountTemplate(m)}static{this.\u0275fac=function(m){return new(m||e)}}static{this.\u0275prov=Oe({token:e,factory:e.\u0275fac})}}return e})();var ni=(()=>{class e{constructor(){this.sharesService=f(k)}resolve(i){let m=i.paramMap.get("shareAccountId");return this.sharesService.getSharesAccountData(m,!0)}static{this.\u0275fac=function(m){return new(m||e)}}static{this.\u0275prov=Oe({token:e,factory:e.\u0275fac})}}return e})();function eo(e,p){if(e&1&&(a(0,"td"),s(1),o(2,"dateFormat"),n()),e&2){let i=A();t(),S(" ",c(2,1,i.sharesAccountData.timeline.activatedDate)," ")}}function to(e,p){e&1&&(a(0,"td"),s(1),o(2,"translate"),n()),e&2&&(t(),S(" ",c(2,1,"labels.text.Not Activated")," "))}function io(e,p){if(e&1&&(a(0,"td"),h(1,"mifosx-external-identifier",5),n()),e&2){let i=A();t(),d("externalId",L(i.sharesAccountData.externalId))}}function ao(e,p){e&1&&(a(0,"td"),s(1),o(2,"translate"),n()),e&2&&(t(),S(" ",c(2,1,"labels.inputs.Unassigned")," "))}function no(e,p){if(e&1&&(a(0,"td"),h(1,"mifosx-account-number",6),n()),e&2){let i=A();t(),d("clientId",L(i.sharesAccountData.clientId))("accountId",L(i.sharesAccountData.savingsAccountId))("accountNo",L(i.sharesAccountData.savingsAccountNumber))}}function ro(e,p){e&1&&(a(0,"td"),s(1),o(2,"translate"),n()),e&2&&(t(),S(" ",c(2,1,"labels.inputs.Unassigned")," "))}var Jt=(()=>{class e{constructor(){this.route=f(B),this.route.data.subscribe(i=>{this.sharesAccountData=i.sharesAccountData})}static{this.\u0275fac=function(m){return new(m||e)}}static{this.\u0275cmp=x({type:e,selectors:[["mifosx-general-tab"]],decls:52,vars:38,consts:[[1,"tab-container","mat-typography"],[1,"shares-account-tables","layout-row","gap-2percent"],[1,"flex-49"],[1,"table-headers"],[1,"r-amount"],[3,"externalId"],["accountType","2",3,"clientId","accountId","accountNo"]],template:function(m,r){m&1&&(a(0,"div",0)(1,"div",1)(2,"div",2)(3,"h4",3),s(4),o(5,"translate"),n(),a(6,"table")(7,"tbody")(8,"tr")(9,"td"),s(10),o(11,"translate"),n(),v(12,eo,3,3,"td"),v(13,to,3,3,"td"),n(),a(14,"tr")(15,"td"),s(16),o(17,"translate"),n(),a(18,"td"),s(19),n()(),a(20,"tr")(21,"td"),s(22),o(23,"translate"),n(),v(24,io,2,2,"td"),v(25,ao,3,3,"td"),n(),a(26,"tr")(27,"td"),s(28),o(29,"translate"),n(),v(30,no,2,6,"td"),v(31,ro,3,3,"td"),n()()()(),a(32,"div",2)(33,"h4",3),s(34),o(35,"translate"),n(),a(36,"table")(37,"tbody")(38,"tr")(39,"td"),s(40),o(41,"translate"),n(),a(42,"td",4),s(43),o(44,"formatNumber"),n()(),a(45,"tr")(46,"td"),s(47),o(48,"translate"),n(),a(49,"td",4),s(50),o(51,"formatNumber"),n()()()()()()()),m&2&&(t(4),l(c(5,18,"labels.heading.Shares Details")),t(6),l(c(11,20,"labels.inputs.Activated On")),t(2),_(r.sharesAccountData.timeline.activatedDate?12:-1),t(),_(r.sharesAccountData.timeline.activatedDate?-1:13),t(3),l(c(17,22,"labels.inputs.Currency")),t(3),w("",r.sharesAccountData.currency.name," [",r.sharesAccountData.currency.code,"]"),t(3),l(c(23,24,"labels.inputs.External Id")),t(2),_(r.sharesAccountData.externalId?24:-1),t(),_(r.sharesAccountData.externalId?-1:25),t(3),l(c(29,26,"labels.inputs.Linked Savings Account(Dividend Posting)")),t(2),_(r.sharesAccountData.savingsAccountNumber?30:-1),t(),_(r.sharesAccountData.savingsAccountNumber?-1:31),t(3),l(c(35,28,"labels.heading.Account Summary")),t(6),l(c(41,30,"labels.inputs.Pending for Approval Shares")),t(3),l(c(44,32,r.sharesAccountData.summary.totalPendingForApprovalShares)),t(4),l(c(48,34,"labels.inputs.Approved Shares")),t(3),l(c(51,36,r.sharesAccountData.summary.totalApprovedShares)))},dependencies:[T,D,It,Mt,Fe,P,rt],styles:[".tab-container[_ngcontent-%COMP%]{padding:1%;margin:1%}.tab-container[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{margin:1% auto}.tab-container[_ngcontent-%COMP%] .performance-history-container[_ngcontent-%COMP%]{border:1px solid;padding:1%;margin-bottom:20px}.tab-container[_ngcontent-%COMP%] table[_ngcontent-%COMP%]{width:100%;margin-bottom:20px}span[_ngcontent-%COMP%]{margin:.5em 0}"]})}}return e})();var oo=[{path:"",data:{title:"Shares",breadcrumb:"Shares",routeParamBreadcrumb:!1,addBreadcrumbLink:!1},children:[{path:"create",data:{title:"Create Shares Account",breadcrumb:"Create Shares Account"},component:Nt,resolve:{sharesAccountTemplate:ai}},{path:":shareAccountId",data:{title:"Shares Account View",routeParamBreadcrumb:"shareAccountId"},children:[{path:"",component:Rt,resolve:{sharesAccountData:Yt},children:[{path:"",redirectTo:"general",pathMatch:"full"},{path:"general",component:Jt,data:{title:"Shares Account General",breadcrumb:"General",routeParamBreadcrumb:!1},resolve:{sharesAccountData:Yt}},{path:"transactions",component:Ft,data:{title:"Shares Account Transactions",breadcrumb:"Transactions",routeParamBreadcrumb:!1}},{path:"charges",component:Bt,data:{title:"Shares Account Charges",breadcrumb:"Charges",routeParamBreadcrumb:!1}},{path:"dividends",component:kt,data:{title:"Shares Account Dividends",breadcrumb:"Dividends",routeParamBreadcrumb:!1}}]},{path:"edit",data:{title:"Edit Shares Account",breadcrumb:"Edit",routeParamBreadcrumb:!1},component:Ot,resolve:{sharesAccountAndTemplate:ni}},{path:"actions/:name",data:{title:"Shares Account Actions",breadcrumb:"Actions",routeParamBreadcrumb:"name"},component:Wt,resolve:{shareAccountActionData:ii}}]}]}],Vi=(()=>{class e{static{this.\u0275fac=function(m){return new(m||e)}}static{this.\u0275mod=dt({type:e})}static{this.\u0275inj=mt({providers:[Yt,ai,ni,ii],imports:[ti.forChild(oo),ti]})}}return e})();var O0=(()=>{class e{static{this.\u0275fac=function(m){return new(m||e)}}static{this.\u0275mod=dt({type:e})}static{this.\u0275inj=mt({imports:[ki,wi,Ri,Vi,Rt,Ft,kt,Bt,Nt,Ge,ze,Qe,st,Ot,Wt,Vt,qt,Ht,jt,Lt,Ut,$t,zt,Gt,Kt,Qt,Jt]})}}return e})();export{O0 as SharesModule}; +import{$c as li,$d as bt,$e as xt,$f as ot,Ad as Ci,Bc as ft,Bd as X,Cc as St,Cd as ue,Cf as Di,Da as y,Dc as He,Df as yi,Ea as E,Eb as Xe,Ec as Ct,Ef as Ei,Fb as T,Fc as vt,Fd as he,G as Oe,Ga as R,Gc as _t,Gd as Z,H as mt,Hc as At,Hd as Ze,Ia as b,Id as fe,Ig as Bi,Ja as A,Jd as et,K as f,Kg as ki,L as I,Lc as pi,Ld as tt,M,Mc as P,Na as ee,Nd as je,Oa as te,Ob as ut,Od as Se,Pa as ie,Pd as Ce,Qa as F,Qd as ve,Qe as it,Rb as si,Rc as ne,Rd as vi,Sc as j,Sd as Fe,T as pt,Td as Ve,Ua as s,Ud as gt,Uf as It,Va as l,Wa as S,Wc as re,Wf as Ii,Xa as w,Xc as G,Xd as be,Yc as oe,Zc as Y,Zf as Mi,_d as _i,_e as at,_f as rt,ag as Pi,bb as L,bf as Tt,bg as wi,ca as t,cd as J,cf as Dt,da as lt,dd as di,de as Ai,df as yt,eb as O,ef as Et,fb as ri,fd as se,ff as nt,ge as gi,gf as Le,hb as o,hc as B,he as bi,hf as xe,ib as c,ic as ci,id as ce,ie as xi,if as Te,ja as x,jb as ae,jf as De,ka as dt,kb as oi,kc as Q,lb as _e,lc as W,ld as me,lf as ye,mc as mi,mf as Ee,na as C,nc as ti,ne as Ti,of as Ie,pd as pe,pf as Me,pg as Ri,qb as Je,qc as ht,qd as ui,ra as v,rc as N,rd as D,rf as Pe,rg as Fi,sa as _,sd as le,sf as we,ta as Be,td as hi,ua as ke,ud as fi,uf as Re,va as Ne,vd as de,wa as d,xa as a,xd as ge,xf as qe,ya as n,yd as Si,za as h,zg as Mt}from"./chunk-BQBWZIWL.js";import{a as H,b as K}from"./chunk-PHUH23IY.js";var k=(()=>{class e{constructor(){this.http=f(si)}getSharesAccountData(i,m){let r=new ut().set("template",m.toString());return this.http.get(`/accounts/share/${i}`,{params:r})}getSharesAccountTemplate(i,m){let r=new ut().set("clientId",i);return r=m?r.set("productId",m):r,this.http.get("/accounts/share/template",{params:r})}createSharesAccount(i){return this.http.post("/accounts/share",i)}updateSharesAccount(i,m){return this.http.put(`/accounts/share/${i}`,m)}deleteSharesAccount(i){return this.http.delete(`/accounts/share/${i}`)}executeSharesAccountCommand(i,m,r){let u=new ut().set("command",m);return this.http.post(`/accounts/share/${i}`,r,{params:u})}static{this.\u0275fac=function(m){return new(m||e)}}static{this.\u0275prov=Oe({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();var Pt=class{constructor(p){this.setOptions(p),this.setButtons(p)}get singleButtons(){return this.buttonsArray}get options(){return this.optionArray}setButtons(p){switch(p){case"Active":this.buttonsArray=[{name:"Apply Additional Shares",icon:"arrow-right",taskPermissionName:"APPLYADDITIONAL_SHAREACCOUNT"},{name:"Approve Additional Shares",icon:"arrow-right",taskPermissionName:"APPROVEADDITIONAL_SHAREACCOUNT"},{name:"Reject Additional Shares",icon:"arrow-left",taskPermissionName:"REJECTADDITIONAL_SHAREACCOUNT"},{name:"Redeem Shares",icon:"arrow-left",taskPermissionName:"WITHDRAW_SAVINGSACCOUNT"}];break;case"Submitted and pending approval":this.buttonsArray=[{name:"Modify Application",icon:"pencil",taskPermissionName:"UPDATE_SHAREACCOUNT"},{name:"Approve",icon:"check",taskPermissionName:"APPROVE_SHAREACCOUNT"}];break;case"Approved":this.buttonsArray=[{name:"Undo Approval",icon:"undo",taskPermissionName:"APPROVALUNDO_SHAREACCOUNT"},{name:"Activate",icon:"check",taskPermissionName:"ACTIVATE_SHAREACCOUNT"}];break;default:this.buttonsArray=[]}}setOptions(p){switch(p){case"Active":this.optionArray=[{name:"Close",taskPermissionName:"CLOSE_SHAREACCOUNT"}];break;case"Submitted and pending approval":this.optionArray=[{name:"Reject",taskPermissionName:"REJECT_SHAREACCOUNT"},{name:"Delete",taskPermissionName:"DELETE_SHAREACCOUNT"}];break;case"Approved":default:this.optionArray=[]}}addOption(p){this.optionArray.push(p)}removeButton(p){let m=this.buttonsArray.map(r=>r.name).indexOf(p);this.buttonsArray.splice(m,1)}};var Hi=()=>["./general"],ji=()=>["./transactions"],Li=()=>["./charges"],Ui=()=>["./dividends"];function $i(e,p){if(e&1&&(a(0,"span",21),h(1,"mifosx-account-number",30),n()),e&2){let i=A();t(),d("accountNo",L(i.sharesAccountData.clientAccountNo))}}function Gi(e,p){if(e&1&&(a(0,"tr")(1,"td"),s(2),o(3,"translate"),n(),a(4,"td"),s(5),o(6,"translateKey"),n()()),e&2){let i=A();t(2),S("",c(3,3,"labels.inputs.Lockin Period")," :"),t(3),w(" ",i.sharesAccountData.lockinPeriod," ",ae(6,5,i.sharesAccountData.lockPeriodTypeEnum.value,"catalogs")," ")}}function zi(e,p){if(e&1&&(a(0,"button",25)(1,"mat-icon",31),h(2,"fa-icon",32),n()()),e&2){A();let i=F(42);d("matMenuTriggerFor",i)}}function Qi(e,p){if(e&1){let i=R();a(0,"button",34),b("click",function(){I(i);let r=A().$implicit,u=A();return M(u.doAction(r.name))}),a(1,"mat-icon",35),h(2,"fa-icon",36),n(),a(3,"span"),s(4),o(5,"translate"),n()()}if(e&2){let i=A().$implicit;t(2),d("icon",L(i.icon)),t(2),l(c(5,3,"labels.menus."+i.name))}}function Ki(e,p){if(e&1&&C(0,Qi,6,5,"button",33),e&2){let i=p.$implicit;d("mifosxHasPermission",i.taskPermissionName)}}function Wi(e,p){if(e&1){let i=R();a(0,"button",34),b("click",function(){I(i);let r=A().$implicit,u=A(2);return M(u.doAction(r.name))}),s(1),o(2,"translate"),n()}if(e&2){let i=A().$implicit;t(),S(" ",c(2,1,"labels.menus."+i.name)," ")}}function Yi(e,p){if(e&1&&(a(0,"span"),C(1,Wi,3,3,"button",33),n()),e&2){let i=p.$implicit;t(),d("mifosxHasPermission",i.taskPermissionName)}}function Ji(e,p){if(e&1&&(a(0,"button",37),s(1),o(2,"translate"),n(),a(3,"mat-menu",null,2),ke(5,Yi,2,1,"span",null,Be),n()),e&2){let i=F(4),m=A();d("matMenuTriggerFor",i),t(),l(c(2,2,"labels.menus.More")),t(4),Ne(m.buttonConfig.options)}}function Xi(e,p){if(e&1&&(a(0,"a",38,3),s(2),o(3,"translate"),n()),e&2){let i=F(1);d("routerLink",O(5,Hi))("active",i.isActive),t(2),S(" ",c(3,3,"labels.inputs.General")," ")}}function Zi(e,p){if(e&1&&(a(0,"a",38,4),s(2),o(3,"translate"),n()),e&2){let i=F(1);d("routerLink",O(5,ji))("active",i.isActive),t(2),S(" ",c(3,3,"labels.inputs.Transactions")," ")}}function ea(e,p){if(e&1&&(a(0,"a",38,5),s(2),o(3,"translate"),n()),e&2){let i=F(1);d("routerLink",O(5,Li))("active",i.isActive),t(2),S(" ",c(3,3,"labels.inputs.Charges")," ")}}function ta(e,p){if(e&1&&(a(0,"a",38,6),s(2),o(3,"translate"),n()),e&2){let i=F(1);d("routerLink",O(5,Ui))("active",i.isActive),t(2),S(" ",c(3,3,"labels.inputs.Dividends")," ")}}var Rt=(()=>{class e{constructor(){this.route=f(B),this.router=f(Q),this.sharesService=f(k),this.dialog=f(He),this.route.data.subscribe(i=>{this.sharesAccountData=i.sharesAccountData})}ngOnInit(){this.setConditionalButtons(),this.router.url.includes("clients")?this.entityType="Client":this.router.url.includes("groups")?this.entityType="Group":this.router.url.includes("centers")&&(this.entityType="Center")}setConditionalButtons(){let i=this.sharesAccountData.status.value;if(this.buttonConfig=new Pt(i),this.sharesAccountData.charges&&this.sharesAccountData.charges.forEach(r=>{r.name==="Annual fee - INR"&&this.buttonConfig.addOption({name:"Apply Anuual Fees",taskPermissionName:"APPLYANNUALFEE_SAVINGSACCOUNT"})}),i==="Active"){let m=this.sharesAccountData.purchasedShares,r=!1;m.forEach(u=>{u.status.code==="purchasedSharesStatusType.applied"&&u.type.code==="purchasedSharesType.purchased"&&(r=!0)}),r||(this.buttonConfig.removeButton("Approve Additional Shares"),this.buttonConfig.removeButton("Reject Additional Shares"))}}doAction(i){switch(i){case"Approve":case"Reject":case"Close":case"Activate":case"Undo Approval":case"Apply Additional Shares":case"Redeem Shares":case"Approve Additional Shares":case"Reject Additional Shares":this.router.navigate([`actions/${i}`],{relativeTo:this.route});break;case"Modify Application":this.router.navigate(["edit"],{relativeTo:this.route});break;case"Delete":this.deleteSharesAccount();break}}deleteSharesAccount(){this.dialog.open(bt,{data:{deleteContext:`shares account with id: ${this.sharesAccountData.id}`}}).afterClosed().subscribe(m=>{m.delete&&this.sharesService.deleteSharesAccount(this.sharesAccountData.id).subscribe(()=>{this.router.navigate(["../../"],{relativeTo:this.route})})})}static{this.\u0275fac=function(m){return new(m||e)}}static{this.\u0275cmp=x({type:e,selectors:[["mifosx-shares-account-view"]],decls:55,vars:37,consts:[["accountMenu","matMenu"],["tabPanel",""],["More","matMenu"],["general","routerLinkActive"],["transactions","routerLinkActive"],["charges","routerLinkActive"],["dividends","routerLinkActive"],[1,"account-card"],[1,"header","layout-column"],[1,"header-title-group"],[1,"profile-image-container"],["mat-card-md-image","","src","assets/images/shares_account_placeholder.png",1,"profile-image",3,"matTooltip"],[1,"mat-typography","account-card-title"],[1,"layout-row","responsive-column"],[1,"flex-60"],[1,"fa","fa-stop",3,"ngClass","matTooltip"],[1,"m-r-5"],[3,"textValue"],["display","left",3,"accountNo"],[1,"shares-overview"],[1,"m-r-10"],[1,"m-l-10"],[1,"account-overview"],[1,"flex-auto"],[1,"flex-40"],["mat-icon-button","","aria-label","Share account actions","yPosition","below",3,"matMenuTriggerFor"],["mat-menu-item",""],[1,"content"],["mat-tab-nav-bar","",1,"navigation-tabs",3,"tabPanel"],["mat-tab-link","","routerLinkActive","",3,"routerLink","active",4,"mifosxHasPermission"],[3,"accountNo"],["matListIcon","",1,"actions-menu"],["icon","bars","size","sm"],["mat-menu-item","",3,"click",4,"mifosxHasPermission"],["mat-menu-item","",3,"click"],["matListIcon",""],["size","sm",3,"icon"],["mat-menu-item","",3,"matMenuTriggerFor"],["mat-tab-link","","routerLinkActive","",3,"routerLink","active"]],template:function(m,r){if(m&1&&(a(0,"mat-card",7)(1,"mat-card-header",8)(2,"mat-card-title-group",9)(3,"div",10)(4,"div"),h(5,"img",11),o(6,"translate"),n()(),a(7,"div",12)(8,"mat-card-title")(9,"div",13)(10,"div",14)(11,"h3"),h(12,"i",15),o(13,"statusLookup"),a(14,"span",16),s(15),o(16,"translate"),n(),a(17,"span",16),h(18,"mifosx-long-text",17),n(),h(19,"mifosx-account-number",18),n(),a(20,"span",19)(21,"span",20),s(22),o(23,"translate"),o(24,"translate"),n(),s(25),v(26,$i,2,2,"span",21),n(),a(27,"div")(28,"table",22)(29,"tbody")(30,"tr")(31,"td"),s(32),o(33,"translate"),n(),a(34,"td"),s(35),o(36,"formatNumber"),n()(),v(37,Gi,7,8,"tr"),n()()()(),h(38,"span",23),a(39,"div",24),v(40,zi,3,1,"button",25),n()()()()(),a(41,"mat-menu",null,0),ke(43,Ki,1,1,"button",26,Be),v(45,Ji,7,4),n()(),a(46,"mat-card-content",27)(47,"nav",28),C(48,Xi,4,6,"a",29)(49,Zi,4,6,"a",29)(50,ea,4,6,"a",29)(51,ta,4,6,"a",29),n(),a(52,"mat-tab-nav-panel",null,1),h(54,"router-outlet"),n()()()),m&2){let u=F(53);t(5),d("matTooltip",L(c(6,23,"tooltips.Shares Account"))),t(7),d("ngClass",c(13,25,r.sharesAccountData.status.code))("matTooltip",r.sharesAccountData.status.value),t(3),S("",c(16,27,"labels.inputs.Share Product")," :"),t(3),d("textValue",L(r.sharesAccountData.productName)),t(),d("accountNo",L(r.sharesAccountData.accountNo)),t(3),w("",c(23,29,"labels.text."+r.entityType)," ",c(24,31,"labels.inputs.name")," :"),t(3),S("",r.sharesAccountData.clientName||r.sharesAccountData.groupName," "),t(),_(r.sharesAccountData.clientAccountNo?26:-1),t(6),S("",c(33,33,"labels.inputs.Current Market Price")," :"),t(3),l(c(36,35,r.sharesAccountData.currentMarketPrice)),t(2),_(r.sharesAccountData.lockinPeriod?37:-1),t(3),_(r.buttonConfig.singleButtons.length>0?40:-1),t(3),Ne(r.buttonConfig.singleButtons),t(2),_(r.buttonConfig.options.length?45:-1),t(2),d("tabPanel",u),t(),d("mifosxHasPermission","READ_SHAREACCOUNTPURCHASE"),t(),d("mifosxHasPermission","READ_SHAREACCOUNTPURCHASE"),t(),d("mifosxHasPermission","READ_SHAREACCOUNTCHARGE"),t(),d("mifosxHasPermission","READ_SHAREACCOUNTDIVIDENDS")}},dependencies:[T,Je,D,W,le,de,gt,Si,fi,Ci,je,hi,Bi,Mt,ht,xi,Ti,be,bi,gi,Di,yi,mi,Ei,ci,P,Ve,ot,rt],styles:[".shares-overview[_ngcontent-%COMP%]{font-size:14px}.account-overview[_ngcontent-%COMP%]{min-width:60%;font-weight:400}"]})}}return e})();function ia(e,p){e&1&&(a(0,"th",14),s(1),o(2,"translate"),n()),e&2&&(t(),l(c(2,1,"labels.inputs.Transaction Date")))}function aa(e,p){if(e&1&&(a(0,"td",15),s(1),o(2,"dateFormat"),n()),e&2){let i=p.$implicit;t(),l(c(2,1,i.purchasedDate))}}function na(e,p){e&1&&(a(0,"th",14),s(1),o(2,"translate"),n()),e&2&&(t(),l(c(2,1,"labels.inputs.Transaction Type")))}function ra(e,p){if(e&1&&(a(0,"td",15),s(1),n()),e&2){let i=p.$implicit;t(),w(" ",i.type.value," ",i.type.value!=="Charge Payment"?"("+i.status.value+")":""," ")}}function oa(e,p){e&1&&(a(0,"th",14),s(1),o(2,"translate"),n()),e&2&&(t(),l(c(2,1,"labels.inputs.Total Shares")))}function sa(e,p){if(e&1&&(a(0,"td",15),s(1),n()),e&2){let i=p.$implicit;t(),l(i.numberOfShares)}}function ca(e,p){e&1&&(a(0,"th",14),s(1),o(2,"translate"),n()),e&2&&(t(),l(c(2,1,"labels.inputs.Purhcased/Redeemed Price")))}function ma(e,p){if(e&1&&(a(0,"td",15),s(1),n()),e&2){let i=p.$implicit,m=A();t(),w(" ",m.shareAccountData.currency.displaySymbol,"\xA0",i.purchasedPrice," ")}}function pa(e,p){e&1&&(a(0,"th",14),s(1),o(2,"translate"),n()),e&2&&(t(),l(c(2,1,"labels.inputs.Charge Amount")))}function la(e,p){if(e&1&&(a(0,"td",15),s(1),n()),e&2){let i=p.$implicit,m=A();t(),w(" ",m.shareAccountData.currency.displaySymbol,"\xA0",i.type.value==="Charge Payment"?i.amount:i.chargeAmount," ")}}function da(e,p){e&1&&(a(0,"th",14),s(1),o(2,"translate"),n()),e&2&&(t(),l(c(2,1,"labels.inputs.Amount Recieved/Returned")))}function ua(e,p){if(e&1&&(a(0,"td",15),s(1),n()),e&2){let i=p.$implicit,m=A();t(),w(" ",m.shareAccountData.currency.displaySymbol,"\xA0",i.amount," ")}}function ha(e,p){e&1&&h(0,"tr",16)}function fa(e,p){e&1&&h(0,"tr",17)}var Ft=(()=>{class e{constructor(){this.route=f(B),this.displayedColumns=["transactionDate","transactionType","totalShares","purchasedOrRedeemedPrice","chargeAmount","amountRecievedOrReturned"],this.route.parent.data.subscribe(i=>{this.shareAccountData=i.sharesAccountData,this.transactionsData=this.shareAccountData.purchasedShares})}ngOnInit(){this.dataSource=new qe(this.transactionsData)}static{this.\u0275fac=function(m){return new(m||e)}}static{this.\u0275cmp=x({type:e,selectors:[["mifosx-transactions-tab"]],decls:27,vars:6,consts:[[1,"tab-container","mat-typography"],[1,"m-b-10"],[1,"mat-elevation-z1","m-b-25"],["mat-table","",3,"dataSource"],["matColumnDef","transactionDate"],["mat-header-cell","",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","transactionType"],["matColumnDef","totalShares"],["matColumnDef","purchasedOrRedeemedPrice"],["matColumnDef","chargeAmount"],["matColumnDef","amountRecievedOrReturned"],["mat-header-row","",4,"matHeaderRowDef"],["mat-row","",4,"matRowDef","matRowDefColumns"],["mat-header-cell",""],["mat-cell",""],["mat-header-row",""],["mat-row",""]],template:function(m,r){m&1&&(a(0,"div",0)(1,"div",1)(2,"h3"),s(3),o(4,"translate"),n()(),a(5,"div",2)(6,"table",3),y(7,4),C(8,ia,3,3,"th",5)(9,aa,3,3,"td",6),E(),y(10,7),C(11,na,3,3,"th",5)(12,ra,2,2,"td",6),E(),y(13,8),C(14,oa,3,3,"th",5)(15,sa,2,1,"td",6),E(),y(16,9),C(17,ca,3,3,"th",5)(18,ma,2,2,"td",6),E(),y(19,10),C(20,pa,3,3,"th",5)(21,la,2,2,"td",6),E(),y(22,11),C(23,da,3,3,"th",5)(24,ua,2,2,"td",6),E(),C(25,ha,1,0,"tr",12)(26,fa,1,0,"tr",13),n()()()),m&2&&(t(3),l(c(4,4,"labels.heading.All Transactions")),t(3),d("dataSource",r.dataSource),t(19),d("matHeaderRowDef",r.displayedColumns),t(),d("matRowDefColumns",r.displayedColumns))},dependencies:[T,D,xe,ye,De,Ee,Te,Ie,Me,we,Pe,Re,Fe,P],styles:[".tab-container[_ngcontent-%COMP%]{padding:1%;margin:1%}.tab-container[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{margin:1% auto}.tab-container[_ngcontent-%COMP%] table[_ngcontent-%COMP%]{width:100%}"]})}}return e})();function Sa(e,p){e&1&&(a(0,"th",17),s(1),o(2,"translate"),n()),e&2&&(t(),l(c(2,1,"labels.inputs.name")))}function Ca(e,p){if(e&1&&(a(0,"td",18),s(1),n()),e&2){let i=p.$implicit;t(),l(i.name)}}function va(e,p){e&1&&(a(0,"th",17),s(1),o(2,"translate"),n()),e&2&&(t(),l(c(2,1,"labels.inputs.Fee/Penalty")))}function _a(e,p){if(e&1&&(a(0,"td",18),s(1),n()),e&2){let i=p.$implicit;t(),l(i.penalty===!0?"Penalty":"Fee")}}function Aa(e,p){e&1&&(a(0,"th",17),s(1),o(2,"translate"),n()),e&2&&(t(),l(c(2,1,"labels.inputs.Payment Due At")))}function ga(e,p){if(e&1&&(a(0,"td",18),s(1),o(2,"translateKey"),n()),e&2){let i=p.$implicit;t(),l(ae(2,1,i.chargeTimeType.value,"catalogs"))}}function ba(e,p){e&1&&(a(0,"th",17),s(1),o(2,"translate"),n()),e&2&&(t(),l(c(2,1,"labels.inputs.Calculation Type")))}function xa(e,p){if(e&1&&(a(0,"td",18),s(1),o(2,"translateKey"),n()),e&2){let i=p.$implicit;t(),l(ae(2,1,i.chargeCalculationType.value,"catalogs"))}}function Ta(e,p){e&1&&(a(0,"th",17),s(1),o(2,"translate"),n()),e&2&&(t(),l(c(2,1,"labels.inputs.Due")))}function Da(e,p){if(e&1&&(a(0,"td",18),s(1),o(2,"currency"),n()),e&2){let i=p.$implicit;t(),S(" ",_e(2,1,i.amount,i.currency.code,"symbol-narrow","1.2-2")," ")}}function ya(e,p){e&1&&(a(0,"th",17),s(1),o(2,"translate"),n()),e&2&&(t(),l(c(2,1,"labels.inputs.Paid")))}function Ea(e,p){if(e&1&&(a(0,"td",18),s(1),o(2,"currency"),n()),e&2){let i=p.$implicit;t(),S(" ",_e(2,1,i.amountPaid,i.currency.code,"symbol-narrow","1.2-2")," ")}}function Ia(e,p){e&1&&(a(0,"th",17),s(1),o(2,"translate"),n()),e&2&&(t(),l(c(2,1,"labels.inputs.Waived")))}function Ma(e,p){if(e&1&&(a(0,"td",18),s(1),o(2,"currency"),n()),e&2){let i=p.$implicit;t(),S(" ",_e(2,1,i.amountWaived,i.currency.code,"symbol-narrow","1.2-2")," ")}}function Pa(e,p){e&1&&(a(0,"th",17),s(1),o(2,"translate"),n()),e&2&&(t(),l(c(2,1,"labels.inputs.Outstanding")))}function wa(e,p){if(e&1&&(a(0,"td",18),s(1),o(2,"currency"),n()),e&2){let i=p.$implicit;t(),S(" ",_e(2,1,i.amountOutstanding,i.currency.code,"symbol-narrow","1.2-2")," ")}}function Ra(e,p){e&1&&(a(0,"th",17),s(1),o(2,"translate"),n()),e&2&&(t(),l(c(2,1,"labels.inputs.Actions")))}function Fa(e,p){if(e&1){let i=R();a(0,"button",21),o(1,"translate"),b("click",function(r){I(i);let u=A(2).$implicit,g=A();return g.routeEdit(r),M(g.editCharge(u))}),h(2,"i",22),n()}e&2&&d("matTooltip",L(c(1,2,"tooltips.Edit Charge")))}function Ba(e,p){if(e&1){let i=R();a(0,"button",23),o(1,"translate"),b("click",function(r){I(i);let u=A(2).$implicit,g=A();return g.routeEdit(r),M(g.deleteCharge(u.id))}),h(2,"i",24),n()}e&2&&d("matTooltip",L(c(1,2,"tooltips.Delete Charge")))}function ka(e,p){e&1&&(a(0,"span"),C(1,Fa,3,4,"button",19)(2,Ba,3,4,"button",20),n()),e&2&&(t(),d("mifosxHasPermission","UPDATE_SHARESACCOUNTCHARGE"),t(),d("mifosxHasPermission","DELETE_SHARESACCOUNTCHARGE"))}function Na(e,p){if(e&1){let i=R();a(0,"button",21),o(1,"translate"),b("click",function(r){I(i);let u=A(2).$implicit,g=A();return g.routeEdit(r),M(g.payCharge(u.id))}),h(2,"i",25),n()}e&2&&d("matTooltip",L(c(1,2,"tooltips.Pay Charge")))}function Oa(e,p){if(e&1){let i=R();a(0,"button",21),o(1,"translate"),b("click",function(r){I(i);let u=A(2).$implicit,g=A();return g.routeEdit(r),M(g.waiveCharge(u.id))}),h(2,"i",26),n()}e&2&&d("matTooltip",L(c(1,2,"tooltips.Waive Charge")))}function Va(e,p){e&1&&(a(0,"span"),C(1,Na,3,4,"button",19)(2,Oa,3,4,"button",19),n()),e&2&&(t(),d("mifosxHasPermission","PAY_SHARESACCOUNTCHARGE"),t(),d("mifosxHasPermission","WAIVE_SHARESACCOUNTCHARGE"))}function qa(e,p){if(e&1&&(a(0,"td",18),v(1,ka,3,2,"span"),v(2,Va,3,2,"span"),n()),e&2){let i=A();t(),_(i.sharesAccountData.status.value==="Submitted and pending approval"?1:-1),t(),_(i.sharesAccountData.status.value==="Active"?2:-1)}}function Ha(e,p){e&1&&h(0,"tr",27)}function ja(e,p){e&1&&h(0,"tr",28)}var Bt=(()=>{class e{constructor(){this.route=f(B),this.displayedColumns=["name","feeOrPenalty","paymentDueAt","calculationType","due","paid","waived","outstanding","actions"],this.route.parent.data.subscribe(i=>{this.sharesAccountData=i.sharesAccountData,this.chargesData=this.sharesAccountData.charges})}ngOnInit(){let i=this.chargesData?this.chargesData.filter(m=>m.isActive):[];this.dataSource=new qe(i)}static{this.\u0275fac=function(m){return new(m||e)}}static{this.\u0275cmp=x({type:e,selectors:[["mifosx-charges-tab"]],decls:36,vars:6,consts:[[1,"tab-container","mat-typography"],[1,"m-b-10"],[1,"mat-elevation-z1","m-b-25"],["mat-table","",3,"dataSource"],["matColumnDef","name"],["mat-header-cell","",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","feeOrPenalty"],["matColumnDef","paymentDueAt"],["matColumnDef","calculationType"],["matColumnDef","due"],["matColumnDef","paid"],["matColumnDef","waived"],["matColumnDef","outstanding"],["matColumnDef","actions"],["mat-header-row","",4,"matHeaderRowDef"],["mat-row","",4,"matRowDef","matRowDefColumns"],["mat-header-cell",""],["mat-cell",""],["class","account-action-button","mat-raised-button","","color","primary",3,"matTooltip","click",4,"mifosxHasPermission"],["class","account-action-button","mat-raised-button","","color","warn",3,"matTooltip","click",4,"mifosxHasPermission"],["mat-raised-button","","color","primary",1,"account-action-button",3,"click","matTooltip"],[1,"fa","fa-pencil"],["mat-raised-button","","color","warn",1,"account-action-button",3,"click","matTooltip"],[1,"fa","fa-trash"],[1,"fa","fa-dollar"],[1,"fa","fa-flag"],["mat-header-row",""],["mat-row",""]],template:function(m,r){m&1&&(a(0,"div",0)(1,"div",1)(2,"h3"),s(3),o(4,"translate"),n()(),a(5,"div",2)(6,"table",3),y(7,4),C(8,Sa,3,3,"th",5)(9,Ca,2,1,"td",6),E(),y(10,7),C(11,va,3,3,"th",5)(12,_a,2,1,"td",6),E(),y(13,8),C(14,Aa,3,3,"th",5)(15,ga,3,4,"td",6),E(),y(16,9),C(17,ba,3,3,"th",5)(18,xa,3,4,"td",6),E(),y(19,10),C(20,Ta,3,3,"th",5)(21,Da,3,6,"td",6),E(),y(22,11),C(23,ya,3,3,"th",5)(24,Ea,3,6,"td",6),E(),y(25,12),C(26,Ia,3,3,"th",5)(27,Ma,3,6,"td",6),E(),y(28,13),C(29,Pa,3,3,"th",5)(30,wa,3,6,"td",6),E(),y(31,14),C(32,Ra,3,3,"th",5)(33,qa,3,2,"td",6),E(),C(34,Ha,1,0,"tr",15)(35,ja,1,0,"tr",16),n()()()),m&2&&(t(3),l(c(4,4,"labels.heading.All Charges")),t(3),d("dataSource",r.dataSource),t(28),d("matHeaderRowDef",r.displayedColumns),t(),d("matRowDefColumns",r.displayedColumns))},dependencies:[T,D,N,gt,xe,ye,De,Ee,Te,Ie,je,Me,we,Pe,Re,Xe,P,Ve],styles:[".tab-container[_ngcontent-%COMP%]{padding:1%;margin:1%}.tab-container[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{margin:1% auto}.tab-container[_ngcontent-%COMP%] .action-button[_ngcontent-%COMP%]{margin-left:auto}.tab-container[_ngcontent-%COMP%] table[_ngcontent-%COMP%]{width:100%}.tab-container[_ngcontent-%COMP%] table[_ngcontent-%COMP%] .account-action-button[_ngcontent-%COMP%]{min-width:26px;padding:0 6px;margin:4px;line-height:25px}.tab-container[_ngcontent-%COMP%] table[_ngcontent-%COMP%] .select-row[_ngcontent-%COMP%]:hover{cursor:pointer}"]})}}return e})();function La(e,p){e&1&&(a(0,"th",12),s(1),o(2,"translate"),n()),e&2&&(t(),l(c(2,1,"labels.inputs.Transaction Date")))}function Ua(e,p){if(e&1&&(a(0,"td",13),s(1),o(2,"dateFormat"),n()),e&2){let i=p.$implicit;t(),l(c(2,1,i.postedDate))}}function $a(e,p){e&1&&(a(0,"th",12),s(1),o(2,"translate"),n()),e&2&&(t(),l(c(2,1,"labels.inputs.Amount")))}function Ga(e,p){if(e&1&&(a(0,"td",13),s(1),o(2,"currency"),n()),e&2){let i=p.$implicit,m=A();t(),S(" ",_e(2,1,i.amount,m.shareAccountData.currency.code,"symbol-narrow","1.2-2")," ")}}function za(e,p){e&1&&(a(0,"th",12),s(1),o(2,"translate"),n()),e&2&&(t(),l(c(2,1,"labels.inputs.Transaction Reference")))}function Qa(e,p){if(e&1&&(a(0,"td",13),s(1),n()),e&2){let i=p.$implicit;t(),l(i.savingsTransactionId)}}function Ka(e,p){e&1&&(a(0,"th",12),s(1),o(2,"translate"),n()),e&2&&(t(),l(c(2,1,"labels.inputs.Status")))}function Wa(e,p){if(e&1&&(a(0,"td",13),s(1),o(2,"translate"),n()),e&2){let i=p.$implicit;t(),l(c(2,1,"labels.status."+i.status.value))}}function Ya(e,p){e&1&&h(0,"tr",14)}function Ja(e,p){e&1&&h(0,"tr",15)}var kt=(()=>{class e{constructor(){this.route=f(B),this.displayedColumns=["transactionDate","amount","transactionReference","status"],this.route.parent.data.subscribe(i=>{this.shareAccountData=i.sharesAccountData,this.dividendsData=this.shareAccountData.dividends})}ngOnInit(){this.dataSource=new qe(this.dividendsData)}static{this.\u0275fac=function(m){return new(m||e)}}static{this.\u0275cmp=x({type:e,selectors:[["mifosx-dividends-tab"]],decls:21,vars:6,consts:[[1,"tab-container","mat-typography"],[1,"m-b-10"],[1,"mat-elevation-z1","m-b-25"],["mat-table","",3,"dataSource"],["matColumnDef","transactionDate"],["mat-header-cell","",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","amount"],["matColumnDef","transactionReference"],["matColumnDef","status"],["mat-header-row","",4,"matHeaderRowDef"],["mat-row","",4,"matRowDef","matRowDefColumns"],["mat-header-cell",""],["mat-cell",""],["mat-header-row",""],["mat-row",""]],template:function(m,r){m&1&&(a(0,"div",0)(1,"div",1)(2,"h3"),s(3),o(4,"translate"),n()(),a(5,"div",2)(6,"table",3),y(7,4),C(8,La,3,3,"th",5)(9,Ua,3,3,"td",6),E(),y(10,7),C(11,$a,3,3,"th",5)(12,Ga,3,6,"td",6),E(),y(13,8),C(14,za,3,3,"th",5)(15,Qa,2,1,"td",6),E(),y(16,9),C(17,Ka,3,3,"th",5)(18,Wa,3,3,"td",6),E(),C(19,Ya,1,0,"tr",10)(20,Ja,1,0,"tr",11),n()()()),m&2&&(t(3),l(c(4,4,"labels.inputs.Dividends")),t(3),d("dataSource",r.dataSource),t(13),d("matHeaderRowDef",r.displayedColumns),t(),d("matRowDefColumns",r.displayedColumns))},dependencies:[T,D,xe,ye,De,Ee,Te,Ie,Me,we,Pe,Re,Xe,Fe,P],styles:[".tab-container[_ngcontent-%COMP%]{padding:1%;margin:1%}.tab-container[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{margin:1% auto}.tab-container[_ngcontent-%COMP%] table[_ngcontent-%COMP%]{width:100%}"]})}}return e})();function Xa(e,p){if(e&1&&(a(0,"mat-option",5),s(1),n()),e&2){let i=p.$implicit;d("value",i.id),t(),S(" ",i.name," ")}}var Ge=(()=>{class e{constructor(){this.formBuilder=f(pe),this.sharesService=f(k),this.settingsService=f(j),this.minDate=new Date(2e3,0,1),this.maxDate=new Date,this.sharesAccountProductTemplate=new lt,this.createSharesAccountDetailsForm()}ngOnInit(){this.maxDate=this.settingsService.businessDate,this.buildDependencies(),this.sharesAccountTemplate&&(this.productData=this.sharesAccountTemplate.productOptions,this.sharesAccountTemplate.productId&&this.sharesAccountDetailsForm.patchValue({productId:this.sharesAccountTemplate.productId,submittedDate:this.sharesAccountTemplate.timeline.submittedOnDate&&new Date(this.sharesAccountTemplate.timeline.submittedOnDate),externalId:this.sharesAccountTemplate.externalId}))}createSharesAccountDetailsForm(){this.sharesAccountDetailsForm=this.formBuilder.group({productId:["",G.required],submittedDate:["",G.required],externalId:[""]})}buildDependencies(){let i=this.sharesAccountTemplate.clientId;this.sharesAccountDetailsForm.get("productId").valueChanges.subscribe(m=>{this.sharesService.getSharesAccountTemplate(i,m).subscribe(r=>{this.sharesAccountProductTemplate.emit(r)})})}get sharesAccountDetails(){return this.sharesAccountDetailsForm.value}static{this.\u0275fac=function(m){return new(m||e)}}static{this.\u0275cmp=x({type:e,selectors:[["mifosx-shares-account-details-step"]],inputs:{sharesAccountTemplate:"sharesAccountTemplate"},outputs:{sharesAccountProductTemplate:"sharesAccountProductTemplate"},decls:45,vars:39,consts:[["submittedOnDatePicker",""],[3,"formGroup"],[1,"layout-row-wrap","gap-2px","responsive-column"],[1,"flex-48"],["formControlName","productId","required",""],[3,"value"],[1,"flex-48",3,"click"],["matInput","","formControlName","submittedDate","required","",3,"min","max","matDatepicker"],["matSuffix","",3,"for"],["matInput","","formControlName","externalId"],[1,"layout-row","align-center","gap-2percent","margin-t","responsive-column"],["mat-raised-button","","matStepperPrevious","","disabled",""],["icon","arrow-left",1,"m-r-10"],["mat-raised-button","","matStepperNext","",3,"disabled"],["icon","arrow-right",1,"m-l-10"]],template:function(m,r){if(m&1){let u=R();a(0,"form",1)(1,"div",2)(2,"mat-form-field",3)(3,"mat-label"),s(4),o(5,"translate"),n(),a(6,"mat-select",4),ke(7,Xa,2,2,"mat-option",5,Be),n(),a(9,"mat-error"),s(10),o(11,"translate"),o(12,"translate"),a(13,"strong"),s(14),o(15,"translate"),n()()(),a(16,"mat-form-field",6),b("click",function(){I(u);let q=F(23);return M(q.open())}),a(17,"mat-label"),s(18),o(19,"translate"),n(),h(20,"input",7)(21,"mat-datepicker-toggle",8)(22,"mat-datepicker",null,0),a(24,"mat-error"),s(25),o(26,"translate"),o(27,"translate"),a(28,"strong"),s(29),o(30,"translate"),n()()(),a(31,"mat-form-field",3)(32,"mat-label"),s(33),o(34,"translate"),n(),h(35,"input",9),n()(),a(36,"div",10)(37,"button",11),h(38,"fa-icon",12),s(39),o(40,"translate"),n(),a(41,"button",13),s(42),o(43,"translate"),h(44,"fa-icon",14),n()()()}if(m&2){let u,g=F(23);d("formGroup",r.sharesAccountDetailsForm),t(4),l(c(5,17,"labels.inputs.Product Name")),t(3),Ne(r.productData),t(3),w(" ",c(11,19,"labels.inputs.Product Name")," ",c(12,21,"labels.commons.is")," "),t(4),l(c(15,23,"labels.commons.required")),t(4),l(c(19,25,"labels.inputs.Submitted On")),t(2),d("min",r.minDate)("max",r.maxDate)("matDatepicker",g),t(),d("for",g),t(4),w(" ",c(26,27,"labels.inputs.Submission Date")," ",c(27,29,"labels.commons.is")," "),t(4),l(c(30,31,"labels.commons.required")),t(4),l(c(34,33,"labels.inputs.External ID")),t(6),S(" ",c(40,35,"labels.buttons.Previous")," "),t(2),d("disabled",!((u=r.sharesAccountDetailsForm.get("productId"))!=null&&u.value&&((u=r.sharesAccountDetailsForm.get("submittedDate"))!=null&&u.value))),t(),S(" ",c(43,37,"labels.buttons.Next")," ")}},dependencies:[T,D,J,re,oe,Y,me,se,ce,Z,X,ue,he,fe,tt,et,Ce,ve,Se,N,Le,be,nt,P],encapsulation:2})}}return e})();function Za(e,p){if(e&1&&(a(0,"span",3),s(1),o(2,"currency"),n()),e&2){let i=A();t(),l(_e(2,1,i.calculateCurrenValue(),i.currency.code,"symbol-narrow","1.2-2"))}}function en(e,p){if(e&1&&(a(0,"mat-option",8),s(1),n()),e&2){let i=p.$implicit;d("value",i.id),t(),w(" ",i.accountNo," - ",i.savingsProductName," ")}}function tn(e,p){if(e&1&&(a(0,"mat-option",8),s(1),o(2,"translateKey"),n()),e&2){let i=p.$implicit;d("value",i.id),t(),S(" ",ae(2,2,i.value,"catalogs")," ")}}function an(e,p){if(e&1&&(a(0,"mat-option",8),s(1),o(2,"translateKey"),n()),e&2){let i=p.$implicit;d("value",i.id),t(),S(" ",ae(2,2,i.value,"catalogs")," ")}}var ze=(()=>{class e{constructor(){this.formBuilder=f(pe),this.settingsService=f(j),this.minDate=new Date(2e3,0,1),this.maxDate=new Date,this.isSavingsPatched=!1,this.currency=null,this.createSharesAccountTermsForm()}ngOnChanges(){this.sharesAccountProductTemplate&&(this.currency=this.sharesAccountProductTemplate.currency,this.sharesAccountTermsForm.patchValue({currencyCode:this.sharesAccountProductTemplate.currency.code,decimal:this.sharesAccountProductTemplate.currency.decimalPlaces,currencyMultiple:this.sharesAccountProductTemplate.currency.inMultiplesOf,unitPrice:this.sharesAccountProductTemplate.currentMarketPrice,savingsAccountId:""}),this.setOptions(),this.sharesAccountTemplate&&!this.isSavingsPatched&&this.sharesAccountTemplate.savingsAccountId&&(this.sharesAccountTermsForm.get("savingsAccountId").patchValue(this.sharesAccountTemplate.savingsAccountId),this.isSavingsPatched=!0))}ngOnInit(){this.maxDate=this.settingsService.businessDate,this.sharesAccountTemplate&&this.sharesAccountTermsForm.patchValue({requestedShares:this.sharesAccountTemplate.summary.totalPendingForApprovalShares,minimumActivePeriod:this.sharesAccountTemplate.minimumActivePeriod,minimumActivePeriodFrequencyType:this.sharesAccountTemplate.minimumActivePeriod&&this.sharesAccountTemplate.minimumActivePeriodTypeEnum.id,lockinPeriodFrequency:this.sharesAccountTemplate.lockinPeriod,lockinPeriodFrequencyType:this.sharesAccountTemplate.lockinPeriod&&this.sharesAccountTemplate.lockPeriodTypeEnum.id,applicationDate:this.sharesAccountTemplate.purchasedShares[0].purchasedDate&&new Date(this.sharesAccountTemplate.purchasedShares[0].purchasedDate),allowDividendCalculationForInactiveClients:this.sharesAccountTemplate.allowDividendCalculationForInactiveClients})}createSharesAccountTermsForm(){this.sharesAccountTermsForm=this.formBuilder.group({currencyCode:[{value:"",disabled:!0}],decimal:[{value:"",disabled:!0}],requestedShares:["",G.required],unitPrice:[{value:"",disabled:!0}],currencyMultiple:[{value:"",disabled:!0}],savingsAccountId:["",G.required],minimumActivePeriod:[""],minimumActivePeriodFrequencyType:[""],lockinPeriodFrequency:[""],lockinPeriodFrequencyType:[""],applicationDate:["",G.required],allowDividendCalculationForInactiveClients:[!1]})}setOptions(){this.minimumActivePeriodFrequencyTypeData=this.sharesAccountProductTemplate.minimumActivePeriodFrequencyTypeOptions,this.lockinPeriodFrequencyTypeData=this.sharesAccountProductTemplate.lockinPeriodFrequencyTypeOptions,this.savingsAccountsData=this.sharesAccountProductTemplate.clientSavingsAccounts}get sharesAccountTerms(){return this.sharesAccountTermsForm.value}calculateCurrenValue(){return this.sharesAccountTermsForm.value.requestedShares&&this.sharesAccountProductTemplate.currentMarketPrice?this.sharesAccountProductTemplate.currentMarketPrice*this.sharesAccountTermsForm.value.requestedShares:0}static{this.\u0275fac=function(m){return new(m||e)}}static{this.\u0275cmp=x({type:e,selectors:[["mifosx-shares-account-terms-step"]],inputs:{sharesAccountProductTemplate:"sharesAccountProductTemplate",sharesAccountTemplate:"sharesAccountTemplate"},features:[pt],decls:96,vars:75,consts:[["applicationDatePicker",""],[3,"formGroup"],[1,"layout-row-wrap","gap-2percent","responsive-column","align-start-center"],[1,"flex-48"],["matInput","","formControlName","currencyCode"],["type","number","matInput","","formControlName","unitPrice"],["type","number","matInput","","formControlName","requestedShares","required",""],["formControlName","savingsAccountId","required",""],[3,"value"],[1,"flex-48",3,"click"],["matInput","","formControlName","applicationDate","required","",3,"min","max","matDatepicker"],["matSuffix","",3,"for"],["labelPosition","before","formControlName","allowDividendCalculationForInactiveClients",1,"flex-48"],[1,"mat-h4","flex-98"],["type","number","matInput","","formControlName","minimumActivePeriod"],["formControlName","minimumActivePeriodFrequencyType"],["type","number","matInput","","formControlName","lockinPeriodFrequency"],["formControlName","lockinPeriodFrequencyType"],[1,"layout-row","align-center","gap-2percent","margin-t","responsive-column"],["mat-raised-button","","matStepperPrevious",""],["icon","arrow-left",1,"m-r-10"],["mat-raised-button","","matStepperNext",""],["icon","arrow-right",1,"m-l-10"]],template:function(m,r){if(m&1){let u=R();a(0,"form",1)(1,"div",2)(2,"mat-form-field",3)(3,"mat-label"),s(4),o(5,"translate"),n(),h(6,"input",4),n(),a(7,"mat-form-field",3)(8,"mat-label"),s(9),o(10,"translate"),n(),h(11,"input",5),n(),a(12,"mat-form-field",3)(13,"mat-label"),s(14),o(15,"translate"),n(),h(16,"input",6),a(17,"mat-error"),s(18),o(19,"translate"),o(20,"translate"),a(21,"strong"),s(22),o(23,"translate"),n()()(),v(24,Za,3,6,"span",3),a(25,"mat-form-field",3)(26,"mat-label"),s(27),o(28,"translate"),n(),a(29,"mat-select",7),ke(30,en,2,3,"mat-option",8,Be),n(),a(32,"mat-error"),s(33),o(34,"translate"),o(35,"translate"),a(36,"strong"),s(37),o(38,"translate"),n()()(),a(39,"mat-form-field",9),b("click",function(){I(u);let q=F(46);return M(q.open())}),a(40,"mat-label"),s(41),o(42,"translate"),n(),h(43,"input",10)(44,"mat-datepicker-toggle",11)(45,"mat-datepicker",null,0),a(47,"mat-error"),s(48),o(49,"translate"),o(50,"translate"),a(51,"strong"),s(52),o(53,"translate"),n()()(),a(54,"mat-checkbox",12),s(55),o(56,"translate"),n(),a(57,"h4",13),s(58),o(59,"translate"),n(),a(60,"mat-form-field",3)(61,"mat-label"),s(62),o(63,"translate"),n(),h(64,"input",14),n(),a(65,"mat-form-field",3)(66,"mat-label"),s(67),o(68,"translate"),n(),a(69,"mat-select",15),ke(70,tn,3,5,"mat-option",8,Be),n()(),a(72,"h4",13),s(73),o(74,"translate"),n(),a(75,"mat-form-field",3)(76,"mat-label"),s(77),o(78,"translate"),n(),h(79,"input",16),n(),a(80,"mat-form-field",3)(81,"mat-label"),s(82),o(83,"translate"),n(),a(84,"mat-select",17),ke(85,an,3,5,"mat-option",8,Be),n()()(),a(87,"div",18)(88,"button",19),h(89,"fa-icon",20),s(90),o(91,"translate"),n(),a(92,"button",21),s(93),o(94,"translate"),h(95,"fa-icon",22),n()()()}if(m&2){let u=F(46);d("formGroup",r.sharesAccountTermsForm),t(4),l(c(5,29,"labels.inputs.Currency")),t(5),l(c(10,31,"labels.inputs.Current Price")),t(5),l(c(15,33,"labels.inputs.Total Number of Shares")),t(4),w(" ",c(19,35,"labels.inputs.Total Number of Shares")," ",c(20,37,"labels.commons.is")," "),t(4),l(c(23,39,"labels.commons.required")),t(2),_(r.currency?24:-1),t(3),l(c(28,41,"labels.inputs.Default Savings Account")),t(3),Ne(r.savingsAccountsData),t(3),w(" ",c(34,43,"labels.inputs.Default Savings Account")," ",c(35,45,"labels.commons.is")," "),t(4),l(c(38,47,"labels.commons.required")),t(4),l(c(42,49,"labels.inputs.Application Date")),t(2),d("min",r.minDate)("max",r.maxDate)("matDatepicker",u),t(),d("for",u),t(4),w(" ",c(49,51,"labels.inputs.Application Date")," ",c(50,53,"labels.commons.is")," "),t(4),l(c(53,55,"labels.commons.required")),t(3),S(" ",c(56,57,"labels.inputs.Allow dividends for inactive clients")," "),t(3),l(c(59,59,"labels.heading.Minimum Active Period")),t(4),l(c(63,61,"labels.inputs.Frequency")),t(5),l(c(68,63,"labels.inputs.Type")),t(3),Ne(r.minimumActivePeriodFrequencyTypeData),t(3),l(c(74,65,"labels.heading.Lock-in Period")),t(4),l(c(78,67,"labels.inputs.Frequency")),t(5),l(c(83,69,"labels.inputs.Type")),t(3),Ne(r.lockinPeriodFrequencyTypeData),t(5),S(" ",c(91,71,"labels.buttons.Previous")," "),t(3),S(" ",c(94,73,"labels.buttons.Next")," ")}},dependencies:[T,D,J,re,di,oe,Y,me,se,ce,Z,X,ue,he,fe,tt,et,Ce,ve,Se,N,vi,Le,be,nt,Xe,P,Ve],styles:["h4[_ngcontent-%COMP%]{font-weight:500;margin:1em 0}.margin-t[_ngcontent-%COMP%]{margin-top:1em}"]})}}return e})();function nn(e,p){if(e&1&&(a(0,"mat-option",3),s(1),n()),e&2){let i=p.$implicit;d("value",i),t(),S(" ",i.name," ")}}function rn(e,p){e&1&&(a(0,"th",22),s(1),o(2,"translate"),n()),e&2&&(t(),l(c(2,1,"labels.inputs.name")))}function on(e,p){if(e&1&&(a(0,"td",23),s(1),n()),e&2){let i=p.$implicit;t(),S(" ",i.name+", "+i.currency.displaySymbol," ")}}function sn(e,p){e&1&&(a(0,"th",22),s(1),o(2,"translate"),n()),e&2&&(t(),l(c(2,1,"labels.inputs.Type")))}function cn(e,p){if(e&1&&(a(0,"td",23),s(1),o(2,"translateKey"),n()),e&2){let i=p.$implicit;t(),S(" ",ae(2,1,i.chargeCalculationType.value,"catalogs")," ")}}function mn(e,p){e&1&&(a(0,"th",22),s(1),o(2,"translate"),n()),e&2&&(t(),l(c(2,1,"labels.inputs.Amount")))}function pn(e,p){if(e&1){let i=R();a(0,"td",23),s(1),a(2,"button",24),b("click",function(){let r=I(i).$implicit,u=A();return M(u.editCharge(r))}),h(3,"fa-icon",25),n()()}if(e&2){let i=p.$implicit;t(),S(" ",i.amount||i.amountOrPercentage," ")}}function ln(e,p){e&1&&(a(0,"th",22),s(1),o(2,"translate"),n()),e&2&&(t(),l(c(2,1,"labels.inputs.Collected On")))}function dn(e,p){if(e&1&&(a(0,"td",23),s(1),o(2,"translateKey"),n()),e&2){let i=p.$implicit;t(),S(" ",ae(2,1,i.chargeTimeType.value,"catalogs")," ")}}function un(e,p){e&1&&(a(0,"th",22),s(1),o(2,"translate"),n()),e&2&&(t(),l(c(2,1,"labels.inputs.Actions")))}function hn(e,p){if(e&1){let i=R();a(0,"td",23)(1,"button",26),b("click",function(){let r=I(i).$implicit,u=A();return M(u.deleteCharge(r))}),h(2,"fa-icon",27),n()()}}function fn(e,p){e&1&&h(0,"tr",28)}function Sn(e,p){e&1&&h(0,"tr",29)}var Qe=(()=>{class e{constructor(){this.dialog=f(He),this.translateService=f(pi),this.chargeData=[],this.chargesDataSource=[],this.pristine=!0,this.isChargesPatched=!1,this.displayedColumns=["name","chargeCalculationType","amount","chargeTimeType","action"]}ngOnInit(){this.currencyCode.valueChanges.subscribe(()=>{!this.isChargesPatched&&this.sharesAccountTemplate.charges?(this.chargesDataSource=this.sharesAccountTemplate.charges,this.isChargesPatched=!0):this.chargesDataSource=[]})}ngOnChanges(){this.sharesAccountProductTemplate&&(this.chargeData=this.sharesAccountTemplate.chargeOptions,this.chargesDataSource=this.sharesAccountProductTemplate.charges)}addCharge(i){this.chargesDataSource=this.chargesDataSource.concat([i.value]),i.value="",this.pristine=!1}editCharge(i){let m=[new Fi({controlName:"amount",label:this.translateService.instant("labels.inputs.Amount"),value:i.amount||i.amountOrPercentage,type:"number",required:!1})],r={title:this.translateService.instant("labels.heading.Edit Charge"),layout:{addButtonText:"Submit"},formfields:m};this.dialog.open(_i,{data:r}).afterClosed().subscribe(g=>{if(g.data){let q=K(H({},i),{amount:g.data.value.amount});this.chargesDataSource.splice(this.chargesDataSource.indexOf(i),1,q),this.chargesDataSource=this.chargesDataSource.concat([])}}),this.pristine=!1}deleteCharge(i){this.dialog.open(bt,{data:{deleteContext:`charge ${i.name}`}}).afterClosed().subscribe(r=>{r.delete&&(this.chargesDataSource.splice(this.chargesDataSource.indexOf(i),1),this.chargesDataSource=this.chargesDataSource.concat([]))}),this.pristine=!1}get sharesAccountCharges(){return{charges:this.chargesDataSource}}static{this.\u0275fac=function(m){return new(m||e)}}static{this.\u0275cmp=x({type:e,selectors:[["mifosx-shares-account-charges-step"]],inputs:{sharesAccountProductTemplate:"sharesAccountProductTemplate",sharesAccountTemplate:"sharesAccountTemplate",currencyCode:"currencyCode"},features:[pt],decls:42,vars:21,consts:[["charge",""],[1,"layout-row-wrap","gap-2px","responsive-column"],[1,"flex-48"],[3,"value"],[1,"flex-48","align-center"],["type","button","mat-raised-button","","color","primary",3,"click","disabled"],["icon","plus",1,"m-r-10"],["mat-table","",1,"flex-98","mat-elevation-z1",3,"dataSource","hidden"],["matColumnDef","name"],["mat-header-cell","",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","chargeCalculationType"],["matColumnDef","amount"],["matColumnDef","chargeTimeType"],["matColumnDef","action"],["mat-header-row","",4,"matHeaderRowDef"],["mat-row","",4,"matRowDef","matRowDefColumns"],[1,"layout-row","responsive-column","align-center","gap-2px","margin-t"],["mat-raised-button","","matStepperPrevious",""],["icon","arrow-left",1,"m-r-10"],["mat-raised-button","","matStepperNext",""],["icon","arrow-right",1,"m-l-10"],["mat-header-cell",""],["mat-cell",""],["mat-icon-button","","color","primary",3,"click"],["icon","pen"],["mat-icon-button","","color","warn",3,"click"],["icon","trash"],["mat-header-row",""],["mat-row",""]],template:function(m,r){if(m&1){let u=R();a(0,"div",1)(1,"mat-form-field",2)(2,"mat-label"),s(3),o(4,"translate"),n(),a(5,"mat-select",null,0),ke(7,nn,2,2,"mat-option",3,Be),o(9,"chargesFilter"),n()(),a(10,"div",4)(11,"button",5),b("click",function(){I(u);let q=F(6);return M(r.addCharge(q))}),h(12,"fa-icon",6),s(13),o(14,"translate"),n()(),a(15,"table",7),y(16,8),C(17,rn,3,3,"th",9)(18,on,2,1,"td",10),E(),y(19,11),C(20,sn,3,3,"th",9)(21,cn,3,4,"td",10),E(),y(22,12),C(23,mn,3,3,"th",9)(24,pn,4,1,"td",10),E(),y(25,13),C(26,ln,3,3,"th",9)(27,dn,3,4,"td",10),E(),y(28,14),C(29,un,3,3,"th",9)(30,hn,3,0,"td",10),E(),C(31,fn,1,0,"tr",15)(32,Sn,1,0,"tr",16),n()(),a(33,"div",17)(34,"button",18),h(35,"fa-icon",19),s(36),o(37,"translate"),n(),a(38,"button",20),s(39),o(40,"translate"),h(41,"fa-icon",21),n()()}if(m&2){let u=F(6);t(3),l(c(4,9,"labels.inputs.Charge")),t(4),Ne(oi(9,11,r.chargeData,r.chargesDataSource,r.currencyCode.value)),t(4),d("disabled",!u.value),t(2),S(" ",c(14,15,"labels.buttons.Add")," "),t(2),d("dataSource",r.chargesDataSource)("hidden",r.chargesDataSource.length===0),t(16),d("matHeaderRowDef",r.displayedColumns),t(),d("matRowDefColumns",r.displayedColumns),t(4),S(" ",c(37,17,"labels.buttons.Previous")," "),t(3),S(" ",c(40,19,"labels.buttons.Next")," ")}},dependencies:[T,D,Z,X,tt,et,N,be,xe,ye,De,Ee,Te,Ie,ht,Me,we,Pe,Re,Le,nt,P,Ve,Ii],styles:["table[_ngcontent-%COMP%]{width:100%}.mat-elevation-z1[_ngcontent-%COMP%]{margin:1em 0 1.5em}.margin-t[_ngcontent-%COMP%]{margin-top:1em}"]})}}return e})();var Cn=e=>[e],vn=()=>["../"];function _n(e,p){if(e&1&&(a(0,"span",4),h(1,"mifosx-external-identifier",11),n()),e&2){let i=A();t(),d("externalId",L(i.sharesAccount.externalId))}}function An(e,p){e&1&&(a(0,"span",4),s(1),o(2,"translate"),n()),e&2&&(t(),S(" ",c(2,1,"labels.inputs.Unassigned")," "))}function gn(e,p){if(e&1&&(a(0,"div",2)(1,"span",3),s(2),o(3,"translate"),n(),a(4,"span",4),s(5),o(6,"find"),o(7,"translateKey"),n()()),e&2){let i=A();t(2),l(c(3,3,"labels.inputs.Minimum Active Period")),t(3),w("",i.sharesAccount.minimumActivePeriod,"\xA0",ae(7,10,_e(6,5,i.sharesAccount.minimumActivePeriodFrequencyType,i.sharesAccountProductTemplate.minimumActivePeriodFrequencyTypeOptions,"id","value"),"catalogs"))}}function bn(e,p){if(e&1&&(a(0,"div",2)(1,"span",3),s(2),o(3,"translate"),n(),a(4,"span",4),s(5),o(6,"find"),o(7,"translateKey"),n()()),e&2){let i=A();t(2),l(c(3,3,"labels.inputs.Lock-in Period")),t(3),w("",i.sharesAccount.lockinPeriodFrequency,"\xA0",ae(7,10,_e(6,5,i.sharesAccount.lockinPeriodFrequencyType,i.sharesAccountProductTemplate.lockinPeriodFrequencyTypeOptions,"id","value"),"catalogs"))}}function xn(e,p){e&1&&(a(0,"th",21),s(1),o(2,"translate"),n()),e&2&&(t(),l(c(2,1,"labels.inputs.name")))}function Tn(e,p){if(e&1&&(a(0,"td",22),s(1),n()),e&2){let i=p.$implicit;t(),S(" ",i.name+", "+i.currency.displaySymbol," ")}}function Dn(e,p){e&1&&(a(0,"th",21),s(1),o(2,"translate"),n()),e&2&&(t(),l(c(2,1,"labels.inputs.Type")))}function yn(e,p){if(e&1&&(a(0,"td",22),s(1),o(2,"translateKey"),n()),e&2){let i=p.$implicit;t(),S(" ",ae(2,1,i.chargeCalculationType.value,"catalogs")," ")}}function En(e,p){e&1&&(a(0,"th",21),s(1),o(2,"translate"),n()),e&2&&(t(),l(c(2,1,"labels.inputs.Amount")))}function In(e,p){if(e&1&&(a(0,"td",22),s(1),n()),e&2){let i=p.$implicit;t(),S(" ",i.amount||i.amountOrPercentage," ")}}function Mn(e,p){e&1&&(a(0,"th",21),s(1),o(2,"translate"),n()),e&2&&(t(),l(c(2,1,"labels.inputs.Collected On")))}function Pn(e,p){if(e&1&&(a(0,"td",22),s(1),o(2,"translateKey"),n()),e&2){let i=p.$implicit;t(),S(" ",ae(2,1,i.chargeTimeType.value,"catalogs")," ")}}function wn(e,p){e&1&&h(0,"tr",23)}function Rn(e,p){e&1&&h(0,"tr",24)}function Fn(e,p){if(e&1&&(a(0,"div",5)(1,"h3",1),s(2),o(3,"translate"),n(),h(4,"mat-divider",2),a(5,"table",12),y(6,13),C(7,xn,3,3,"th",14)(8,Tn,2,1,"td",15),E(),y(9,16),C(10,Dn,3,3,"th",14)(11,yn,3,4,"td",15),E(),y(12,17),C(13,En,3,3,"th",14)(14,In,2,1,"td",15),E(),y(15,18),C(16,Mn,3,3,"th",14)(17,Pn,3,4,"td",15),E(),C(18,wn,1,0,"tr",19)(19,Rn,1,0,"tr",20),n()()),e&2){let i=A();t(2),l(c(3,4,"labels.heading.Charges")),t(3),d("dataSource",i.sharesAccount.charges),t(13),d("matHeaderRowDef",i.chargesDisplayedColumns),t(),d("matRowDefColumns",i.chargesDisplayedColumns)}}var st=(()=>{class e{constructor(){this.chargesDisplayedColumns=["name","chargeCalculationType","amount","chargeTimeType"],this.submitEvent=new lt}static{this.\u0275fac=function(m){return new(m||e)}}static{this.\u0275cmp=x({type:e,selectors:[["mifosx-shares-account-preview-step"]],inputs:{sharesAccountProductTemplate:"sharesAccountProductTemplate",sharesAccountTemplate:"sharesAccountTemplate",sharesAccountTermsForm:"sharesAccountTermsForm",sharesAccount:"sharesAccount"},outputs:{submitEvent:"submitEvent"},decls:92,vars:90,consts:[[1,"layout-row-wrap","responsive-column"],[1,"mat-h3","flex-fill"],[1,"flex-fill"],[1,"flex-40"],[1,"flex-60"],[1,"layout-row-wrap","responsive-column","flex-fill"],[1,"layout-row","responsive-column","align-center","gap-2px","margin-t"],["mat-raised-button","","matStepperPrevious",""],["icon","arrow-left",1,"m-r-10"],["mat-raised-button","",3,"routerLink"],["mat-raised-button","","color","primary",3,"click"],[3,"externalId"],["mat-table","",1,"flex-fill","mat-elevation-z1",3,"dataSource"],["matColumnDef","name"],["mat-header-cell","",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","chargeCalculationType"],["matColumnDef","amount"],["matColumnDef","chargeTimeType"],["mat-header-row","",4,"matHeaderRowDef"],["mat-row","",4,"matRowDef","matRowDefColumns"],["mat-header-cell",""],["mat-cell",""],["mat-header-row",""],["mat-row",""]],template:function(m,r){m&1&&(a(0,"div",0)(1,"h3",1),s(2),o(3,"translate"),n(),h(4,"mat-divider",2),a(5,"div",2)(6,"span",3),s(7),o(8,"translate"),n(),a(9,"span",4),s(10),o(11,"find"),n()(),a(12,"div",2)(13,"span",3),s(14),o(15,"translate"),n(),a(16,"span",4),s(17),o(18,"dateFormat"),n()(),a(19,"div",2)(20,"span",3),s(21),o(22,"translate"),n(),v(23,_n,2,2,"span",4),v(24,An,3,3,"span",4),n(),a(25,"h3",1),s(26),o(27,"translate"),n(),h(28,"mat-divider",2),a(29,"div",2)(30,"span",3),s(31),o(32,"translate"),n(),a(33,"span",4),s(34),o(35,"find"),n()(),a(36,"div",2)(37,"span",3),s(38),o(39,"translate"),n(),a(40,"span",4),s(41),o(42,"formatNumber"),n()(),a(43,"div",2)(44,"span",3),s(45),o(46,"translate"),n(),a(47,"span",4),s(48),o(49,"formatNumber"),n()(),a(50,"div",2)(51,"span",3),s(52),o(53,"translate"),n(),a(54,"span",4),s(55),o(56,"formatNumber"),n()(),a(57,"div",2)(58,"span",3),s(59),o(60,"translate"),n(),a(61,"span",4),s(62),o(63,"find"),n()(),v(64,gn,8,13,"div",2),v(65,bn,8,13,"div",2),a(66,"div",2)(67,"span",3),s(68),o(69,"translate"),n(),a(70,"span",4),s(71),o(72,"dateFormat"),n()(),a(73,"div",2)(74,"span",3),s(75),o(76,"translate"),n(),a(77,"span",4),s(78),o(79,"yesNo"),n()(),v(80,Fn,20,6,"div",5),n(),a(81,"div",6)(82,"button",7),h(83,"fa-icon",8),s(84),o(85,"translate"),n(),a(86,"button",9),s(87),o(88,"translate"),n(),a(89,"button",10),b("click",function(){return r.submitEvent.emit()}),s(90),o(91,"translate"),n()()),m&2&&(t(2),l(c(3,30,"labels.heading.Details")),t(5),l(c(8,32,"labels.inputs.Product")),t(3),l(_e(11,34,r.sharesAccount.productId,r.sharesAccountTemplate.productOptions,"id","name")),t(4),l(c(15,39,"labels.inputs.Submitted On")),t(3),l(c(18,41,r.sharesAccount.submittedDate)),t(4),l(c(22,43,"labels.inputs.External Id")),t(2),_(r.sharesAccount.externalId?23:-1),t(),_(r.sharesAccount.externalId?-1:24),t(2),l(c(27,45,"labels.heading.Terms")),t(5),l(c(32,47,"labels.inputs.Currency")),t(3),l(_e(35,49,r.sharesAccountTermsForm.get("currencyCode").value,ri(87,Cn,r.sharesAccountProductTemplate.currency),"code","displayLabel")),t(4),l(c(39,54,"labels.inputs.Total Number of Shares")),t(3),l(c(42,56,r.sharesAccount.requestedShares)),t(4),l(c(46,58,"labels.inputs.Current Price")),t(3),l(c(49,60,r.sharesAccountTermsForm.get("unitPrice").value)),t(4),l(c(53,62,"labels.inputs.Amount")),t(3),l(c(56,64,r.sharesAccount.requestedShares*r.sharesAccountTermsForm.get("unitPrice").value)),t(4),l(c(60,66,"labels.inputs.Default Savings Account")),t(3),l(_e(63,68,r.sharesAccount.savingsAccountId,r.sharesAccountProductTemplate.clientSavingsAccounts,"id","accountNo")),t(2),_(r.sharesAccount.minimumActivePeriod?64:-1),t(),_(r.sharesAccount.lockinPeriodFrequency?65:-1),t(3),l(c(69,73,"labels.inputs.Application Date")),t(3),l(c(72,75,r.sharesAccount.applicationDate)),t(4),l(c(76,77,"labels.inputs.Allow dividends for inactive clients")),t(3),l(c(79,79,r.sharesAccount.allowDividendCalculationForInactiveClients)),t(2),_(r.sharesAccount.charges.length?80:-1),t(4),S(" ",c(85,81,"labels.buttons.Previous")," "),t(2),d("routerLink",O(89,vn)),t(),S(" ",c(88,83,"labels.buttons.Cancel")," "),t(3),S(" ",c(91,85,"labels.buttons.Submit")," "))},dependencies:[T,D,W,N,Ai,It,xe,ye,De,Ee,Te,Ie,Me,we,Pe,Re,Le,be,Fe,P,Ve,Mi,rt,Pi],styles:["table[_ngcontent-%COMP%]{width:100%}.mat-elevation-z1[_ngcontent-%COMP%]{margin:1em 0 1.5em}h2[_ngcontent-%COMP%], h3[_ngcontent-%COMP%], h4[_ngcontent-%COMP%]{margin:0;font-weight:500}span[_ngcontent-%COMP%]{margin:.5em 0}mat-divider[_ngcontent-%COMP%]{margin:0 0 .5em}.margin-t[_ngcontent-%COMP%]{margin-top:1em}"]})}}return e})();function Bn(e,p){e&1&&h(0,"fa-icon",14)}function kn(e,p){e&1&&h(0,"fa-icon",14)}function Nn(e,p){e&1&&h(0,"fa-icon",15)}function On(e,p){e&1&&h(0,"fa-icon",16)}function Vn(e,p){e&1&&h(0,"fa-icon",17)}function qn(e,p){e&1&&(s(0),o(1,"translate")),e&2&&l(c(1,1,"labels.inputs.DETAILS"))}function Hn(e,p){e&1&&(s(0),o(1,"translate")),e&2&&l(c(1,1,"labels.inputs.TERMS"))}function jn(e,p){e&1&&(s(0),o(1,"translate")),e&2&&l(c(1,1,"labels.inputs.CHARGES"))}function Ln(e,p){e&1&&(s(0),o(1,"translate")),e&2&&l(c(1,1,"labels.inputs.PREVIEW"))}function Un(e,p){if(e&1){let i=R();a(0,"mat-step",13),C(1,Ln,2,3,"ng-template",9),a(2,"mifosx-shares-account-preview-step",18),b("submitEvent",function(){I(i);let r=A();return M(r.submit())}),n()()}if(e&2){let i=A();t(2),d("sharesAccountProductTemplate",i.sharesAccountProductTemplate)("sharesAccountTemplate",i.sharesAccountTemplate)("sharesAccountTermsForm",i.sharesAccountTermsForm)("sharesAccount",i.sharesAccount)}}var Nt=(()=>{class e{constructor(){this.route=f(B),this.router=f(Q),this.dateUtils=f(ne),this.sharesService=f(k),this.settingsService=f(j),this.route.data.subscribe(i=>{this.sharesAccountTemplate=i.sharesAccountTemplate})}setTemplate(i){this.sharesAccountProductTemplate=i}get sharesAccountDetailsForm(){return this.sharesAccountDetailsStep.sharesAccountDetailsForm}get sharesAccountTermsForm(){return this.sharesAccountTermsStep.sharesAccountTermsForm}get sharesAccountFormValid(){return this.sharesAccountDetailsForm.valid&&this.sharesAccountTermsForm.valid}get sharesAccount(){return H(H(H({},this.sharesAccountDetailsStep.sharesAccountDetails),this.sharesAccountTermsStep.sharesAccountTerms),this.sharesAccountChargesStep.sharesAccountCharges)}submit(){let i=this.settingsService.language.code,m=this.settingsService.dateFormat,r=K(H({},this.sharesAccount),{clientId:this.sharesAccountTemplate.clientId,charges:this.sharesAccount.charges.map(u=>({chargeId:u.id,amount:u.amount})),applicationDate:this.dateUtils.formatDate(this.sharesAccount.applicationDate,m),submittedDate:this.dateUtils.formatDate(this.sharesAccount.submittedDate,m),unitPrice:this.sharesAccountTermsForm.get("unitPrice").value,dateFormat:m,locale:i});this.sharesService.createSharesAccount(r).subscribe(u=>{this.router.navigate(["../",u.resourceId],{relativeTo:this.route})})}static{this.\u0275fac=function(m){return new(m||e)}}static{this.\u0275cmp=x({type:e,selectors:[["mifosx-create-shares-account"]],viewQuery:function(m,r){if(m&1&&(ee(Ge,7),ee(ze,7),ee(Qe,7)),m&2){let u;te(u=ie())&&(r.sharesAccountDetailsStep=u.first),te(u=ie())&&(r.sharesAccountTermsStep=u.first),te(u=ie())&&(r.sharesAccountChargesStep=u.first)}},decls:18,vars:9,consts:[["shareProductStepper",""],[1,"container"],["orientation","vertical","labelPosition","bottom",1,"mat-elevation-z8",3,"linear"],["matStepperIcon","number"],["matStepperIcon","edit"],["matStepperIcon","done"],["matStepperIcon","error"],["matStepperIcon","preview"],[3,"stepControl"],["matStepLabel",""],[3,"sharesAccountProductTemplate","sharesAccountTemplate"],[3,"sharesAccountProductTemplate"],[3,"sharesAccountProductTemplate","sharesAccountTemplate","currencyCode"],["completed",""],["icon","pencil-alt","size","sm"],["icon","check","size","sm"],["icon","exclamation-triangle","size","lg"],["icon","eye","size","sm"],[3,"submitEvent","sharesAccountProductTemplate","sharesAccountTemplate","sharesAccountTermsForm","sharesAccount"]],template:function(m,r){if(m&1){let u=R();a(0,"div",1)(1,"mat-stepper",2,0),C(3,Bn,1,0,"ng-template",3)(4,kn,1,0,"ng-template",4)(5,Nn,1,0,"ng-template",5)(6,On,1,0,"ng-template",6)(7,Vn,1,0,"ng-template",7),a(8,"mat-step",8),C(9,qn,2,3,"ng-template",9),a(10,"mifosx-shares-account-details-step",10),b("sharesAccountProductTemplate",function(q){return I(u),M(r.setTemplate(q))}),n()(),a(11,"mat-step",8),C(12,Hn,2,3,"ng-template",9),h(13,"mifosx-shares-account-terms-step",11),n(),a(14,"mat-step"),C(15,jn,2,3,"ng-template",9),h(16,"mifosx-shares-account-charges-step",12),n(),v(17,Un,3,4,"mat-step",13),n()()}m&2&&(t(),d("linear",!1),t(7),d("stepControl",r.sharesAccountDetailsForm),t(2),d("sharesAccountTemplate",r.sharesAccountTemplate),t(),d("stepControl",r.sharesAccountTermsForm),t(2),d("sharesAccountProductTemplate",r.sharesAccountProductTemplate),t(3),d("sharesAccountProductTemplate",r.sharesAccountProductTemplate)("sharesAccountTemplate",r.sharesAccountTemplate)("currencyCode",r.sharesAccountTermsForm.get("currencyCode")),t(),_(r.sharesAccountFormValid?17:-1))},dependencies:[T,D,Et,Dt,be,yt,Tt,Ge,ze,Qe,st,P],encapsulation:2})}}return e})();function $n(e,p){e&1&&h(0,"fa-icon",13)}function Gn(e,p){e&1&&h(0,"fa-icon",13)}function zn(e,p){e&1&&h(0,"fa-icon",14)}function Qn(e,p){e&1&&h(0,"fa-icon",15)}function Kn(e,p){e&1&&h(0,"fa-icon",16)}function Wn(e,p){e&1&&(s(0),o(1,"translate")),e&2&&l(c(1,1,"labels.inputs.DETAILS"))}function Yn(e,p){e&1&&(s(0),o(1,"translate")),e&2&&l(c(1,1,"labels.inputs.TERMS"))}function Jn(e,p){e&1&&(s(0),o(1,"translate")),e&2&&l(c(1,1,"labels.inputs.CHARGES"))}function Xn(e,p){e&1&&(s(0),o(1,"translate")),e&2&&l(c(1,1,"labels.inputs.PREVIEW"))}function Zn(e,p){if(e&1){let i=R();a(0,"mat-step",12),C(1,Xn,2,3,"ng-template",9),a(2,"mifosx-shares-account-preview-step",17),b("submitEvent",function(){I(i);let r=A();return M(r.submit())}),n()()}if(e&2){let i=A();t(2),d("sharesAccountProductTemplate",i.sharesAccountProductTemplate)("sharesAccountTemplate",i.sharesAccountAndTemplate)("sharesAccountTermsForm",i.sharesAccountTermsForm)("sharesAccount",i.sharesAccount)}}var Ot=(()=>{class e{constructor(){this.route=f(B),this.router=f(Q),this.dateUtils=f(ne),this.sharesService=f(k),this.settingsService=f(j),this.route.data.subscribe(i=>{this.sharesAccountAndTemplate=i.sharesAccountAndTemplate})}setTemplate(i){this.sharesAccountProductTemplate=i}get sharesAccountDetailsForm(){return this.sharesAccountDetailsStep.sharesAccountDetailsForm}get sharesAccountTermsForm(){return this.sharesAccountTermsStep.sharesAccountTermsForm}get sharesAccountFormValidAndNotPristine(){return this.sharesAccountDetailsForm.valid&&this.sharesAccountTermsForm.valid&&(!this.sharesAccountDetailsForm.pristine||!this.sharesAccountTermsForm.pristine||!this.sharesAccountChargesStep.pristine)}get sharesAccount(){return H(H(H({},this.sharesAccountDetailsStep.sharesAccountDetails),this.sharesAccountTermsStep.sharesAccountTerms),this.sharesAccountChargesStep.sharesAccountCharges)}submit(){let i=this.settingsService.language.code,m=this.settingsService.dateFormat,r=K(H({},this.sharesAccount),{clientId:this.sharesAccountAndTemplate.clientId,charges:this.sharesAccount.charges.map(u=>({chargeId:u.id,amount:u.amount})),applicationDate:this.dateUtils.formatDate(this.sharesAccount.applicationDate,m),submittedDate:this.dateUtils.formatDate(this.sharesAccount.submittedDate,m),unitPrice:this.sharesAccountTermsForm.get("unitPrice").value,dateFormat:m,locale:i});this.sharesService.updateSharesAccount(this.sharesAccountAndTemplate.id,r).subscribe(u=>{this.router.navigate(["../"],{relativeTo:this.route})})}static{this.\u0275fac=function(m){return new(m||e)}}static{this.\u0275cmp=x({type:e,selectors:[["mifosx-edit-shares-account"]],viewQuery:function(m,r){if(m&1&&(ee(Ge,7),ee(ze,7),ee(Qe,7)),m&2){let u;te(u=ie())&&(r.sharesAccountDetailsStep=u.first),te(u=ie())&&(r.sharesAccountTermsStep=u.first),te(u=ie())&&(r.sharesAccountChargesStep=u.first)}},decls:18,vars:10,consts:[["shareProductStepper",""],[1,"container"],["orientation","vertical","labelPosition","bottom",1,"mat-elevation-z8",3,"linear"],["matStepperIcon","number"],["matStepperIcon","edit"],["matStepperIcon","done"],["matStepperIcon","error"],["matStepperIcon","preview"],[3,"stepControl"],["matStepLabel",""],[3,"sharesAccountProductTemplate","sharesAccountTemplate"],[3,"sharesAccountProductTemplate","sharesAccountTemplate","currencyCode"],["completed",""],["icon","pencil-alt","size","sm"],["icon","check","size","sm"],["icon","exclamation-triangle","size","lg"],["icon","eye","size","sm"],[3,"submitEvent","sharesAccountProductTemplate","sharesAccountTemplate","sharesAccountTermsForm","sharesAccount"]],template:function(m,r){if(m&1){let u=R();a(0,"div",1)(1,"mat-stepper",2,0),C(3,$n,1,0,"ng-template",3)(4,Gn,1,0,"ng-template",4)(5,zn,1,0,"ng-template",5)(6,Qn,1,0,"ng-template",6)(7,Kn,1,0,"ng-template",7),a(8,"mat-step",8),C(9,Wn,2,3,"ng-template",9),a(10,"mifosx-shares-account-details-step",10),b("sharesAccountProductTemplate",function(q){return I(u),M(r.setTemplate(q))}),n()(),a(11,"mat-step",8),C(12,Yn,2,3,"ng-template",9),h(13,"mifosx-shares-account-terms-step",10),n(),a(14,"mat-step"),C(15,Jn,2,3,"ng-template",9),h(16,"mifosx-shares-account-charges-step",11),n(),v(17,Zn,3,4,"mat-step",12),n()()}m&2&&(t(),d("linear",!1),t(7),d("stepControl",r.sharesAccountDetailsForm),t(2),d("sharesAccountTemplate",r.sharesAccountAndTemplate),t(),d("stepControl",r.sharesAccountTermsForm),t(2),d("sharesAccountProductTemplate",r.sharesAccountProductTemplate)("sharesAccountTemplate",r.sharesAccountAndTemplate),t(3),d("sharesAccountProductTemplate",r.sharesAccountProductTemplate)("sharesAccountTemplate",r.sharesAccountAndTemplate)("currencyCode",r.sharesAccountTermsForm.get("currencyCode")),t(),_(r.sharesAccountFormValidAndNotPristine?17:-1))},dependencies:[T,D,Et,Dt,be,yt,Tt,Ge,ze,Qe,st,P],encapsulation:2})}}return e})();var er=()=>["../../"];function tr(e,p){e&1&&(a(0,"mat-error"),s(1),o(2,"translate"),o(3,"translate"),a(4,"strong"),s(5),o(6,"translate"),n()()),e&2&&(t(),w(" ",c(2,3,"labels.inputs.Approved On Date")," ",c(3,5,"labels.commons.is")," "),t(4),l(c(6,7,"labels.commons.required")))}var Vt=(()=>{class e{constructor(){this.formBuilder=f(pe),this.sharesService=f(k),this.dateUtils=f(ne),this.route=f(B),this.router=f(Q),this.settingsService=f(j),this.minDate=new Date(2e3,0,1),this.maxDate=new Date,this.accountId=this.route.parent.snapshot.params.shareAccountId}ngOnInit(){this.maxDate=this.settingsService.businessDate,this.createApproveSharesAccountForm()}createApproveSharesAccountForm(){this.approveSharesAccountForm=this.formBuilder.group({approvedDate:["",G.required],note:[""]})}submit(){let i=this.approveSharesAccountForm.value,m=this.settingsService.language.code,r=this.settingsService.dateFormat,u=this.approveSharesAccountForm.value.approvedDate;i.approvedDate instanceof Date&&(i.approvedDate=this.dateUtils.formatDate(u,r));let g=K(H({},i),{dateFormat:r,locale:m});this.sharesService.executeSharesAccountCommand(this.accountId,"approve",g).subscribe(()=>{this.router.navigate(["../../"],{relativeTo:this.route})})}static{this.\u0275fac=function(m){return new(m||e)}}static{this.\u0275cmp=x({type:e,selectors:[["mifosx-approve-shares-account"]],decls:26,vars:21,consts:[["approvedDatePicker",""],[1,"container"],[3,"ngSubmit","formGroup"],[1,"layout-column"],[3,"click"],["matInput","","required","","formControlName","approvedDate",3,"min","max","matDatepicker"],["matSuffix","",3,"for"],["matInput","","formControlName","note","cdkTextareaAutosize","","cdkAutosizeMinRows","2"],[1,"layout-row","align-center","gap-5px","responsive-column"],["type","button","mat-raised-button","",3,"routerLink"],["mat-raised-button","","color","primary",3,"disabled"]],template:function(m,r){if(m&1){let u=R();a(0,"div",1)(1,"mat-card")(2,"form",2),b("ngSubmit",function(){return I(u),M(r.submit())}),a(3,"mat-card-content")(4,"div",3)(5,"mat-form-field",4),b("click",function(){I(u);let q=F(12);return M(q.open())}),a(6,"mat-label"),s(7),o(8,"translate"),n(),h(9,"input",5)(10,"mat-datepicker-toggle",6)(11,"mat-datepicker",null,0),v(13,tr,7,9,"mat-error"),n(),a(14,"mat-form-field")(15,"mat-label"),s(16),o(17,"translate"),n(),h(18,"textarea",7),n()()(),a(19,"mat-card-actions",8)(20,"button",9),s(21),o(22,"translate"),n(),a(23,"button",10),s(24),o(25,"translate"),n()()()()()}if(m&2){let u=F(12);t(2),d("formGroup",r.approveSharesAccountForm),t(5),l(c(8,12,"labels.inputs.Approved On Date")),t(2),d("min",r.minDate)("max",r.maxDate)("matDatepicker",u),t(),d("for",u),t(3),_(r.approveSharesAccountForm.controls.approvedDate.hasError("required")?13:-1),t(3),l(c(17,14,"labels.inputs.Note")),t(4),d("routerLink",O(20,er)),t(),S(" ",c(22,16,"labels.buttons.Cancel")," "),t(2),d("disabled",!r.approveSharesAccountForm.valid),t(),S(" ",c(25,18,"labels.buttons.Submit")," ")}},dependencies:[T,D,J,re,oe,Y,me,se,ce,W,le,de,ge,Z,X,ue,he,fe,Ce,ve,Se,N,Ze,P],styles:[".container[_ngcontent-%COMP%]{max-width:37rem}"]})}}return e})();var ir=()=>["../../"];function ar(e,p){e&1&&(a(0,"mat-error"),s(1),o(2,"translate"),o(3,"translate"),a(4,"strong"),s(5),o(6,"translate"),n()()),e&2&&(t(),w(" ",c(2,3,"labels.inputs.Rejected On Date")," ",c(3,5,"labels.commons.is")," "),t(4),l(c(6,7,"labels.commons.required")))}var qt=(()=>{class e{constructor(){this.formBuilder=f(pe),this.sharesService=f(k),this.dateUtils=f(ne),this.route=f(B),this.router=f(Q),this.settingsService=f(j),this.minDate=new Date(2e3,0,1),this.maxDate=new Date,this.accountId=this.route.parent.snapshot.params.shareAccountId}ngOnInit(){this.maxDate=this.settingsService.businessDate,this.createRejectSharesAccountForm()}createRejectSharesAccountForm(){this.rejectSharesAccountForm=this.formBuilder.group({rejectedDate:["",G.required],note:[""]})}submit(){let i=this.rejectSharesAccountForm.value,m=this.settingsService.language.code,r=this.settingsService.dateFormat,u=this.rejectSharesAccountForm.value.rejectedDate;i.rejectedDate instanceof Date&&(i.rejectedDate=this.dateUtils.formatDate(u,r));let g=K(H({},i),{dateFormat:r,locale:m});this.sharesService.executeSharesAccountCommand(this.accountId,"reject",g).subscribe(()=>{this.router.navigate(["../../"],{relativeTo:this.route})})}static{this.\u0275fac=function(m){return new(m||e)}}static{this.\u0275cmp=x({type:e,selectors:[["mifosx-reject-shares-account"]],decls:26,vars:21,consts:[["rejectedDatePicker",""],[1,"container"],[3,"ngSubmit","formGroup"],[1,"layout-column"],[3,"click"],["matInput","","required","","formControlName","rejectedDate",3,"min","max","matDatepicker"],["matSuffix","",3,"for"],["matInput","","formControlName","note","cdkTextareaAutosize","","cdkAutosizeMinRows","2"],[1,"layout-row","align-center","gap-5px","responsive-column"],["type","button","mat-raised-button","",3,"routerLink"],["mat-raised-button","","color","warn",3,"disabled"]],template:function(m,r){if(m&1){let u=R();a(0,"div",1)(1,"mat-card")(2,"form",2),b("ngSubmit",function(){return I(u),M(r.submit())}),a(3,"mat-card-content")(4,"div",3)(5,"mat-form-field",4),b("click",function(){I(u);let q=F(12);return M(q.open())}),a(6,"mat-label"),s(7),o(8,"translate"),n(),h(9,"input",5)(10,"mat-datepicker-toggle",6)(11,"mat-datepicker",null,0),v(13,ar,7,9,"mat-error"),n(),a(14,"mat-form-field")(15,"mat-label"),s(16),o(17,"translate"),n(),h(18,"textarea",7),n()()(),a(19,"mat-card-actions",8)(20,"button",9),s(21),o(22,"translate"),n(),a(23,"button",10),s(24),o(25,"translate"),n()()()()()}if(m&2){let u=F(12);t(2),d("formGroup",r.rejectSharesAccountForm),t(5),l(c(8,12,"labels.inputs.Rejected On Date")),t(2),d("min",r.minDate)("max",r.maxDate)("matDatepicker",u),t(),d("for",u),t(3),_(r.rejectSharesAccountForm.controls.rejectedDate.hasError("required")?13:-1),t(3),l(c(17,14,"labels.inputs.Note")),t(4),d("routerLink",O(20,ir)),t(),S(" ",c(22,16,"labels.buttons.Cancel")," "),t(2),d("disabled",!r.rejectSharesAccountForm.valid),t(),S(" ",c(25,18,"labels.buttons.Submit")," ")}},dependencies:[T,D,J,re,oe,Y,me,se,ce,W,le,de,ge,Z,X,ue,he,fe,Ce,ve,Se,N,Ze,P],styles:[".container[_ngcontent-%COMP%]{max-width:37rem}"]})}}return e})();var nr=()=>["../../"];function rr(e,p){e&1&&(a(0,"mat-error"),s(1),o(2,"translate"),o(3,"translate"),a(4,"strong"),s(5),o(6,"translate"),n()()),e&2&&(t(),w(" ",c(2,3,"labels.inputs.Closed On Date")," ",c(3,5,"labels.commons.is")," "),t(4),l(c(6,7,"labels.commons.required")))}var Ht=(()=>{class e{constructor(){this.formBuilder=f(pe),this.sharesService=f(k),this.dateUtils=f(ne),this.route=f(B),this.router=f(Q),this.settingsService=f(j),this.minDate=new Date(2e3,0,1),this.maxDate=new Date,this.accountId=this.route.parent.snapshot.params.shareAccountId}ngOnInit(){this.maxDate=this.settingsService.businessDate,this.createCloseSharesAccountForm()}createCloseSharesAccountForm(){this.closeSharesAccountForm=this.formBuilder.group({closedDate:["",G.required],note:[""]})}submit(){let i=this.closeSharesAccountForm.value,m=this.settingsService.language.code,r=this.settingsService.dateFormat,u=this.closeSharesAccountForm.value.closedDate;i.closedDate instanceof Date&&(i.closedDate=this.dateUtils.formatDate(u,r));let g=K(H({},i),{dateFormat:r,locale:m});this.sharesService.executeSharesAccountCommand(this.accountId,"close",g).subscribe(()=>{this.router.navigate(["../../"],{relativeTo:this.route})})}static{this.\u0275fac=function(m){return new(m||e)}}static{this.\u0275cmp=x({type:e,selectors:[["mifosx-close-shares-account"]],decls:26,vars:21,consts:[["closedDatePicker",""],[1,"container"],[3,"ngSubmit","formGroup"],[1,"layout-column"],[3,"click"],["matInput","","required","","formControlName","closedDate",3,"min","max","matDatepicker"],["matSuffix","",3,"for"],["matInput","","formControlName","note","cdkTextareaAutosize","","cdkAutosizeMinRows","2"],[1,"layout-row","align-center","gap-5px","responsive-column"],["type","button","mat-raised-button","",3,"routerLink"],["mat-raised-button","","color","warn",3,"disabled"]],template:function(m,r){if(m&1){let u=R();a(0,"div",1)(1,"mat-card")(2,"form",2),b("ngSubmit",function(){return I(u),M(r.submit())}),a(3,"mat-card-content")(4,"div",3)(5,"mat-form-field",4),b("click",function(){I(u);let q=F(12);return M(q.open())}),a(6,"mat-label"),s(7),o(8,"translate"),n(),h(9,"input",5)(10,"mat-datepicker-toggle",6)(11,"mat-datepicker",null,0),v(13,rr,7,9,"mat-error"),n(),a(14,"mat-form-field")(15,"mat-label"),s(16),o(17,"translate"),n(),h(18,"textarea",7),n()()(),a(19,"mat-card-actions",8)(20,"button",9),s(21),o(22,"translate"),n(),a(23,"button",10),s(24),o(25,"translate"),n()()()()()}if(m&2){let u=F(12);t(2),d("formGroup",r.closeSharesAccountForm),t(5),l(c(8,12,"labels.inputs.Closed On Date")),t(2),d("min",r.minDate)("max",r.maxDate)("matDatepicker",u),t(),d("for",u),t(3),_(r.closeSharesAccountForm.controls.closedDate.hasError("required")?13:-1),t(3),l(c(17,14,"labels.inputs.Note")),t(4),d("routerLink",O(20,nr)),t(),S(" ",c(22,16,"labels.buttons.Cancel")," "),t(2),d("disabled",!r.closeSharesAccountForm.valid),t(),S(" ",c(25,18,"labels.buttons.Submit")," ")}},dependencies:[T,D,J,re,oe,Y,me,se,ce,W,le,de,ge,Z,X,ue,he,fe,Ce,ve,Se,N,Ze,P],styles:[".container[_ngcontent-%COMP%]{max-width:37rem}"]})}}return e})();var or=()=>["../../"];function sr(e,p){e&1&&(a(0,"mat-error"),s(1),o(2,"translate"),o(3,"translate"),a(4,"strong"),s(5),o(6,"translate"),n()()),e&2&&(t(),w(" ",c(2,3,"labels.inputs.Activated On Date")," ",c(3,5,"labels.commons.is")," "),t(4),l(c(6,7,"labels.commons.required")))}var jt=(()=>{class e{constructor(){this.formBuilder=f(pe),this.sharesService=f(k),this.dateUtils=f(ne),this.route=f(B),this.router=f(Q),this.settingsService=f(j),this.minDate=new Date(2e3,0,1),this.maxDate=new Date,this.accountId=this.route.parent.snapshot.params.shareAccountId}ngOnInit(){this.maxDate=this.settingsService.businessDate,this.createActivateSharesAccountForm()}createActivateSharesAccountForm(){this.activateSharesAccountForm=this.formBuilder.group({activatedDate:["",G.required]})}submit(){let i=this.activateSharesAccountForm.value,m=this.settingsService.language.code,r=this.settingsService.dateFormat,u=this.activateSharesAccountForm.value.activatedDate;i.activatedDate instanceof Date&&(i.activatedDate=this.dateUtils.formatDate(u,r));let g=K(H({},i),{dateFormat:r,locale:m});this.sharesService.executeSharesAccountCommand(this.accountId,"activate",g).subscribe(()=>{this.router.navigate(["../../"],{relativeTo:this.route})})}static{this.\u0275fac=function(m){return new(m||e)}}static{this.\u0275cmp=x({type:e,selectors:[["mifosx-activate-shares-account"]],decls:20,vars:18,consts:[["activatedDatePicker",""],[1,"container"],[3,"ngSubmit","formGroup"],[1,"flex-fill",3,"click"],["matInput","","required","","formControlName","activatedDate",3,"min","max","matDatepicker"],["matSuffix","",3,"for"],[1,"layout-row","align-center","gap-5px","responsive-column"],["type","button","mat-raised-button","",3,"routerLink"],["mat-raised-button","","color","primary",3,"disabled"]],template:function(m,r){if(m&1){let u=R();a(0,"div",1)(1,"mat-card")(2,"form",2),b("ngSubmit",function(){return I(u),M(r.submit())}),a(3,"mat-card-content")(4,"mat-form-field",3),b("click",function(){I(u);let q=F(11);return M(q.open())}),a(5,"mat-label"),s(6),o(7,"translate"),n(),h(8,"input",4)(9,"mat-datepicker-toggle",5)(10,"mat-datepicker",null,0),v(12,sr,7,9,"mat-error"),n()(),a(13,"mat-card-actions",6)(14,"button",7),s(15),o(16,"translate"),n(),a(17,"button",8),s(18),o(19,"translate"),n()()()()()}if(m&2){let u=F(11);t(2),d("formGroup",r.activateSharesAccountForm),t(4),l(c(7,11,"labels.inputs.Activated On Date")),t(2),d("min",r.minDate)("max",r.maxDate)("matDatepicker",u),t(),d("for",u),t(3),_(r.activateSharesAccountForm.controls.activatedDate.hasError("required")?12:-1),t(2),d("routerLink",O(17,or)),t(),S(" ",c(16,13,"labels.buttons.Cancel")," "),t(2),d("disabled",!r.activateSharesAccountForm.valid),t(),S(" ",c(19,15,"labels.buttons.Submit")," ")}},dependencies:[T,D,J,re,oe,Y,me,se,ce,W,le,de,ge,Z,X,ue,he,fe,Ce,ve,Se,N,P],styles:[".container[_ngcontent-%COMP%]{max-width:37rem}"]})}}return e})();var cr=()=>["../../"],Lt=(()=>{class e{constructor(){this.sharesService=f(k),this.route=f(B),this.router=f(Q),this.accountId=this.route.parent.snapshot.params.shareAccountId}submit(){this.sharesService.executeSharesAccountCommand(this.accountId,"undoapproval",{}).subscribe(()=>{this.router.navigate(["../../"],{relativeTo:this.route})})}static{this.\u0275fac=function(m){return new(m||e)}}static{this.\u0275cmp=x({type:e,selectors:[["mifosx-undo-approval-shares-account"]],decls:15,vars:12,consts:[[1,"container"],[3,"ngSubmit"],[1,"mat-typography","confirm-text"],[1,"layout-row","align-center","gap-5px","responsive-column"],["type","button","mat-raised-button","",3,"routerLink"],["mat-raised-button","","color","warn"]],template:function(m,r){m&1&&(a(0,"div",0)(1,"mat-card")(2,"form",1),b("ngSubmit",function(){return r.submit()}),a(3,"mat-card-content")(4,"div")(5,"p",2),s(6),o(7,"translate"),n()()(),a(8,"mat-card-actions",3)(9,"button",4),s(10),o(11,"translate"),n(),a(12,"button",5),s(13),o(14,"translate"),n()()()()()),m&2&&(t(6),w(" ",c(7,5,"labels.text.Undo approval of shares account with ID"),": ",r.accountId," ? "),t(3),d("routerLink",O(11,cr)),t(),S(" ",c(11,7,"labels.buttons.Cancel")," "),t(3),l(c(14,9,"labels.buttons.Submit")))},dependencies:[T,D,J,Y,W,le,de,ge,N,ui,li,P],styles:[".container[_ngcontent-%COMP%]{max-width:37rem}.container[_ngcontent-%COMP%] .confirm-text[_ngcontent-%COMP%]{font-size:16px;text-align:center}"]})}}return e})();var mr=()=>["../../"];function pr(e,p){e&1&&(a(0,"mat-error"),s(1),o(2,"translate"),o(3,"translate"),a(4,"strong"),s(5),o(6,"translate"),n()()),e&2&&(t(),w(" ",c(2,3,"labels.inputs.Request Date")," ",c(3,5,"labels.commons.is")," "),t(4),l(c(6,7,"labels.commons.required")))}function lr(e,p){e&1&&(a(0,"mat-error"),s(1),o(2,"translate"),o(3,"translate"),a(4,"strong"),s(5),o(6,"translate"),n()()),e&2&&(t(),w(" ",c(2,3,"labels.inputs.Requested Shares")," ",c(3,5,"labels.commons.is")," "),t(4),l(c(6,7,"labels.commons.required")))}var Ut=(()=>{class e{constructor(){this.formBuilder=f(pe),this.sharesService=f(k),this.dateUtils=f(ne),this.route=f(B),this.router=f(Q),this.settingsService=f(j),this.minDate=new Date(2e3,0,1),this.maxDate=new Date,this.accountId=this.route.parent.snapshot.params.shareAccountId,this.route.data.subscribe(i=>{this.sharesAccountData=i.shareAccountActionData})}ngOnInit(){this.maxDate=this.settingsService.businessDate,this.createApplySharesAccountForm(),this.applySharesForm.get("unitPrice").patchValue(this.sharesAccountData.currentMarketPrice||"")}createApplySharesAccountForm(){this.applySharesForm=this.formBuilder.group({requestedDate:["",G.required],requestedShares:["",G.required],unitPrice:[{value:"",disabled:!0}]})}submit(){let i=this.applySharesForm.value,m=this.settingsService.language.code,r=this.settingsService.dateFormat,u=this.applySharesForm.value.requestedDate;i.requestedDate instanceof Date&&(i.requestedDate=this.dateUtils.formatDate(u,r));let g=K(H({},i),{unitPrice:this.applySharesForm.get("unitPrice").value,dateFormat:r,locale:m});this.sharesService.executeSharesAccountCommand(this.accountId,"applyadditionalshares",g).subscribe(()=>{this.router.navigate(["../../"],{relativeTo:this.route})})}static{this.\u0275fac=function(m){return new(m||e)}}static{this.\u0275cmp=x({type:e,selectors:[["mifosx-apply-shares"]],decls:32,vars:25,consts:[["requestedDatePicker",""],[1,"container"],[3,"ngSubmit","formGroup"],[1,"layout-column"],[3,"click"],["matInput","","required","","formControlName","requestedDate",3,"min","max","matDatepicker"],["matSuffix","",3,"for"],["matInput","","required","","formControlName","requestedShares"],["matInput","","required","","formControlName","unitPrice"],[1,"layout-row","align-center","gap-5px","responsive-column"],["type","button","mat-raised-button","",3,"routerLink"],["mat-raised-button","","color","primary",3,"disabled"]],template:function(m,r){if(m&1){let u=R();a(0,"div",1)(1,"mat-card")(2,"form",2),b("ngSubmit",function(){return I(u),M(r.submit())}),a(3,"mat-card-content")(4,"div",3)(5,"mat-form-field",4),b("click",function(){I(u);let q=F(12);return M(q.open())}),a(6,"mat-label"),s(7),o(8,"translate"),n(),h(9,"input",5)(10,"mat-datepicker-toggle",6)(11,"mat-datepicker",null,0),v(13,pr,7,9,"mat-error"),n(),a(14,"mat-form-field")(15,"mat-label"),s(16),o(17,"translate"),n(),h(18,"input",7),v(19,lr,7,9,"mat-error"),n(),a(20,"mat-form-field")(21,"mat-label"),s(22),o(23,"translate"),n(),h(24,"input",8),n()()(),a(25,"mat-card-actions",9)(26,"button",10),s(27),o(28,"translate"),n(),a(29,"button",11),s(30),o(31,"translate"),n()()()()()}if(m&2){let u=F(12);t(2),d("formGroup",r.applySharesForm),t(5),l(c(8,14,"labels.inputs.Request Date")),t(2),d("min",r.minDate)("max",r.maxDate)("matDatepicker",u),t(),d("for",u),t(3),_(r.applySharesForm.controls.requestedDate.hasError("required")?13:-1),t(3),l(c(17,16,"labels.inputs.Total No. of Shares")),t(3),_(r.applySharesForm.controls.requestedShares.hasError("required")?19:-1),t(3),l(c(23,18,"labels.inputs.Current Price")),t(4),d("routerLink",O(24,mr)),t(),S(" ",c(28,20,"labels.buttons.Cancel")," "),t(2),d("disabled",!r.applySharesForm.valid),t(),S(" ",c(31,22,"labels.buttons.Submit")," ")}},dependencies:[T,D,J,re,oe,Y,me,se,ce,W,le,de,ge,Z,X,ue,he,fe,Ce,ve,Se,N,P],styles:[".container[_ngcontent-%COMP%]{max-width:37rem}"]})}}return e})();var dr=()=>["../../"];function ur(e,p){e&1&&(a(0,"mat-error"),s(1),o(2,"translate"),o(3,"translate"),a(4,"strong"),s(5),o(6,"translate"),n()()),e&2&&(t(),w(" ",c(2,3,"labels.inputs.Request Date")," ",c(3,5,"labels.commons.is")," "),t(4),l(c(6,7,"labels.commons.required")))}function hr(e,p){e&1&&(a(0,"mat-error"),s(1),o(2,"translate"),o(3,"translate"),a(4,"strong"),s(5),o(6,"translate"),n()()),e&2&&(t(),w(" ",c(2,3,"labels.inputs.Requested Shares")," ",c(3,5,"labels.commons.is")," "),t(4),l(c(6,7,"labels.commons.required")))}var $t=(()=>{class e{constructor(){this.formBuilder=f(pe),this.sharesService=f(k),this.dateUtils=f(ne),this.route=f(B),this.router=f(Q),this.settingsService=f(j),this.minDate=new Date(2e3,0,1),this.maxDate=new Date,this.accountId=this.route.parent.snapshot.params.shareAccountId,this.route.data.subscribe(i=>{this.sharesAccountData=i.shareAccountActionData})}ngOnInit(){this.maxDate=this.settingsService.businessDate,this.createRedeemSharesAccountForm(),this.redeemSharesForm.get("unitPrice").patchValue(this.sharesAccountData.currentMarketPrice||"")}createRedeemSharesAccountForm(){this.redeemSharesForm=this.formBuilder.group({requestedDate:["",G.required],requestedShares:["",G.required],unitPrice:[{value:"",disabled:!0}]})}submit(){let i=this.redeemSharesForm.value,m=this.settingsService.language.code,r=this.settingsService.dateFormat,u=this.redeemSharesForm.value.requestedDate;i.requestedDate instanceof Date&&(i.requestedDate=this.dateUtils.formatDate(u,r));let g=K(H({},i),{unitPrice:this.redeemSharesForm.get("unitPrice").value,dateFormat:r,locale:m});this.sharesService.executeSharesAccountCommand(this.accountId,"redeemshares",g).subscribe(()=>{this.router.navigate(["../../"],{relativeTo:this.route})})}static{this.\u0275fac=function(m){return new(m||e)}}static{this.\u0275cmp=x({type:e,selectors:[["mifosx-redeem-shares"]],decls:32,vars:25,consts:[["requestedDatePicker",""],[1,"container"],[3,"ngSubmit","formGroup"],[1,"layout-column"],[3,"click"],["matInput","","required","","formControlName","requestedDate",3,"min","max","matDatepicker"],["matSuffix","",3,"for"],["matInput","","required","","formControlName","requestedShares"],["matInput","","required","","formControlName","unitPrice"],[1,"layout-row","align-center","gap-5px","responsive-column"],["type","button","mat-raised-button","",3,"routerLink"],["mat-raised-button","","color","warn",3,"disabled"]],template:function(m,r){if(m&1){let u=R();a(0,"div",1)(1,"mat-card")(2,"form",2),b("ngSubmit",function(){return I(u),M(r.submit())}),a(3,"mat-card-content")(4,"div",3)(5,"mat-form-field",4),b("click",function(){I(u);let q=F(12);return M(q.open())}),a(6,"mat-label"),s(7),o(8,"translate"),n(),h(9,"input",5)(10,"mat-datepicker-toggle",6)(11,"mat-datepicker",null,0),v(13,ur,7,9,"mat-error"),n(),a(14,"mat-form-field")(15,"mat-label"),s(16),o(17,"translate"),n(),h(18,"input",7),v(19,hr,7,9,"mat-error"),n(),a(20,"mat-form-field")(21,"mat-label"),s(22),o(23,"translate"),n(),h(24,"input",8),n()()(),a(25,"mat-card-actions",9)(26,"button",10),s(27),o(28,"translate"),n(),a(29,"button",11),s(30),o(31,"translate"),n()()()()()}if(m&2){let u=F(12);t(2),d("formGroup",r.redeemSharesForm),t(5),l(c(8,14,"labels.inputs.Request Date")),t(2),d("min",r.minDate)("max",r.maxDate)("matDatepicker",u),t(),d("for",u),t(3),_(r.redeemSharesForm.controls.requestedDate.hasError("required")?13:-1),t(3),l(c(17,16,"labels.inputs.Total No. of Shares")),t(3),_(r.redeemSharesForm.controls.requestedShares.hasError("required")?19:-1),t(3),l(c(23,18,"labels.inputs.Current Price")),t(4),d("routerLink",O(24,dr)),t(),S(" ",c(28,20,"labels.buttons.Cancel")," "),t(2),d("disabled",!r.redeemSharesForm.valid),t(),S(" ",c(31,22,"labels.buttons.Submit")," ")}},dependencies:[T,D,J,re,oe,Y,me,se,ce,W,le,de,ge,Z,X,ue,he,fe,Ce,ve,Se,N,P],styles:[".container[_ngcontent-%COMP%]{max-width:37rem}"]})}}return e})();var fr=()=>({approve:!0}),Gt=(()=>{class e{constructor(){this.dialogRef=f(ft),this.data=f(St)}static{this.\u0275fac=function(m){return new(m||e)}}static{this.\u0275cmp=x({type:e,selectors:[["mifosx-approve-share-dialog"]],decls:14,vars:15,consts:[["mat-dialog-title",""],["mat-dialog-content",""],["align","end"],["mat-raised-button","","mat-dialog-close",""],["mat-raised-button","","color","primary",3,"mat-dialog-close"]],template:function(m,r){m&1&&(a(0,"h1",0),s(1),o(2,"translate"),n(),a(3,"div",1)(4,"p"),s(5),o(6,"translate"),n()(),a(7,"mat-dialog-actions",2)(8,"button",3),s(9),o(10,"translate"),n(),a(11,"button",4),s(12),o(13,"translate"),n()()),m&2&&(t(),l(c(2,6,"labels.heading.Approve Share")),t(4),w("",c(6,8,"labels.text.Are you sure you want to approve share with id"),": ",r.data.shareId," ?"),t(4),l(c(10,10,"labels.buttons.Cancel")),t(2),d("mat-dialog-close",O(14,fr)),t(),S(" ",c(13,12,"labels.buttons.Submit")," "))},dependencies:[T,D,N,vt,_t,At,Ct,P],encapsulation:2})}}return e})();var Sr=["sharesTable"],Cr=()=>[10,25,50,100];function vr(e,p){e&1&&(a(0,"th",15),s(1),o(2,"translate"),n()),e&2&&(t(),l(c(2,1,"labels.inputs.Transaction Date")))}function _r(e,p){if(e&1&&(a(0,"td",16),s(1),o(2,"dateFormat"),n()),e&2){let i=p.$implicit;t(),l(c(2,1,i.purchasedDate))}}function Ar(e,p){e&1&&(a(0,"th",15),s(1),o(2,"translate"),n()),e&2&&(t(),l(c(2,1,"labels.inputs.Total Shares")))}function gr(e,p){if(e&1&&(a(0,"td",16),s(1),n()),e&2){let i=p.$implicit;t(),l(i.numberOfShares)}}function br(e,p){e&1&&(a(0,"th",15),s(1),o(2,"translate"),n()),e&2&&(t(),S(" ",c(2,1,"labels.inputs.Purchased/Redeemed Price")," "))}function xr(e,p){if(e&1&&(a(0,"td",16),s(1),n()),e&2){let i=p.$implicit;t(),l(i.purchasedPrice)}}function Tr(e,p){e&1&&(a(0,"th",17),s(1),o(2,"translate"),n()),e&2&&(t(),l(c(2,1,"labels.inputs.Status")))}function Dr(e,p){if(e&1&&(a(0,"td",16),h(1,"i",18),o(2,"statusLookup"),n()),e&2){let i=p.$implicit;t(),d("ngClass",c(2,2,i.status.code))("matTooltip",i.status.value)}}function yr(e,p){e&1&&(a(0,"th",15),s(1),o(2,"translate"),n()),e&2&&(t(),l(c(2,1,"labels.inputs.Confirm Approve")))}function Er(e,p){if(e&1){let i=R();a(0,"td",16)(1,"button",19),o(2,"translate"),b("click",function(){let r=I(i).$implicit,u=A();return M(u.approve(r.id))}),h(3,"i",20),n()()}e&2&&(t(),d("matTooltip",L(c(2,2,"tooltips.Approve Share"))))}function Ir(e,p){e&1&&h(0,"tr",21)}function Mr(e,p){e&1&&h(0,"tr",22)}var zt=(()=>{class e{constructor(){this.sharesService=f(k),this.route=f(B),this.dialog=f(He),this.settingsService=f(j),this.displayedColumns=["transactionDate","totalShares","redeemedPrice","status","approve"],this.accountId=this.route.parent.snapshot.params.shareAccountId,this.route.data.subscribe(i=>{this.sharesAccountData=i.shareAccountActionData})}ngOnInit(){this.sharesData=this.sharesAccountData.purchasedShares.filter(i=>i.status.value==="Pending Approval"),this.setShares()}setShares(){this.dataSource=new qe(this.sharesData),this.dataSource.paginator=this.paginator,this.dataSource.sort=this.sort}approve(i){this.dialog.open(Gt,{data:{shareId:i}}).afterClosed().subscribe(r=>{if(r.approve){let u=this.settingsService.language.code,g=this.settingsService.dateFormat,q={requestedShares:[{id:i}],dateFormat:g,locale:u};this.sharesService.executeSharesAccountCommand(this.accountId,"approveadditionalshares",q).subscribe(()=>{let Xt=this.sharesData.find(ei=>ei.id===i),Zt=this.sharesData.indexOf(Xt);this.sharesData.splice(Zt,1),this.dataSource.data=this.sharesData,this.sharesTableRef.renderRows()})}})}static{this.\u0275fac=function(m){return new(m||e)}}static{this.\u0275cmp=x({type:e,selectors:[["mifosx-approve-shares"]],viewQuery:function(m,r){if(m&1&&(ee(it,7),ee(at,7),ee(Sr,7)),m&2){let u;te(u=ie())&&(r.paginator=u.first),te(u=ie())&&(r.sort=u.first),te(u=ie())&&(r.sharesTableRef=u.first)}},decls:22,vars:5,consts:[["sharesTable",""],[1,"container"],[1,"mat-elevation-z8"],["mat-table","","matSort","",3,"dataSource"],["matColumnDef","transactionDate"],["mat-header-cell","","mat-sort-header","",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","totalShares"],["matColumnDef","redeemedPrice"],["matColumnDef","status"],["mat-header-cell","",4,"matHeaderCellDef"],["matColumnDef","approve"],["mat-header-row","",4,"matHeaderRowDef"],["mat-row","",4,"matRowDef","matRowDefColumns"],["showFirstLastButtons","",3,"pageSizeOptions"],["mat-header-cell","","mat-sort-header",""],["mat-cell",""],["mat-header-cell",""],[1,"fa","fa-stop",3,"ngClass","matTooltip"],["mat-raised-button","","color","accent",1,"share-action-button",3,"click","matTooltip"],[1,"fa","fa-check"],["mat-header-row",""],["mat-row",""]],template:function(m,r){m&1&&(a(0,"div",1)(1,"div",2)(2,"table",3,0),y(4,4),C(5,vr,3,3,"th",5)(6,_r,3,3,"td",6),E(),y(7,7),C(8,Ar,3,3,"th",5)(9,gr,2,1,"td",6),E(),y(10,8),C(11,br,3,3,"th",5)(12,xr,2,1,"td",6),E(),y(13,9),C(14,Tr,3,3,"th",10)(15,Dr,3,4,"td",6),E(),y(16,11),C(17,yr,3,3,"th",5)(18,Er,4,4,"td",6),E(),C(19,Ir,1,0,"tr",12)(20,Mr,1,0,"tr",13),n(),h(21,"mat-paginator",14),n()()),m&2&&(t(2),d("dataSource",r.dataSource),t(17),d("matHeaderRowDef",r.displayedColumns),t(),d("matRowDefColumns",r.displayedColumns),t(),d("pageSizeOptions",O(4,Cr)))},dependencies:[T,Je,D,N,xe,at,ye,De,Ee,xt,Te,Ie,je,Me,we,Pe,Re,it,Fe,P,ot],styles:["table[_ngcontent-%COMP%]{width:100%}table[_ngcontent-%COMP%] i[_ngcontent-%COMP%]:hover{cursor:pointer}table[_ngcontent-%COMP%] .share-action-button[_ngcontent-%COMP%]{min-width:26px;padding:0 6px;margin:4px;line-height:25px}"]})}}return e})();var Pr=()=>({reject:!0}),Qt=(()=>{class e{constructor(){this.dialogRef=f(ft),this.data=f(St)}static{this.\u0275fac=function(m){return new(m||e)}}static{this.\u0275cmp=x({type:e,selectors:[["mifosx-reject-share-dialog"]],decls:14,vars:15,consts:[["mat-dialog-title",""],["mat-dialog-content",""],["align","end"],["mat-raised-button","","mat-dialog-close",""],["mat-raised-button","","color","warn",3,"mat-dialog-close"]],template:function(m,r){m&1&&(a(0,"h1",0),s(1),o(2,"translate"),n(),a(3,"div",1)(4,"p"),s(5),o(6,"translate"),n()(),a(7,"mat-dialog-actions",2)(8,"button",3),s(9),o(10,"translate"),n(),a(11,"button",4),s(12),o(13,"translate"),n()()),m&2&&(t(),l(c(2,6,"labels.heading.Reject Share")),t(4),w("",c(6,8,"labels.text.Are you sure you want to reject share with id"),": ",r.data.shareId," ?"),t(4),l(c(10,10,"labels.buttons.Cancel")),t(2),d("mat-dialog-close",O(14,Pr)),t(),S(" ",c(13,12,"labels.buttons.Submit")," "))},dependencies:[T,D,N,vt,_t,At,Ct,P],encapsulation:2})}}return e})();var wr=["sharesTable"],Rr=()=>[10,25,50,100];function Fr(e,p){e&1&&(a(0,"th",15),s(1),o(2,"translate"),n()),e&2&&(t(),l(c(2,1,"labels.inputs.Transaction Date")))}function Br(e,p){if(e&1&&(a(0,"td",16),s(1),o(2,"dateFormat"),n()),e&2){let i=p.$implicit;t(),l(c(2,1,i.purchasedDate))}}function kr(e,p){e&1&&(a(0,"th",15),s(1),o(2,"translate"),n()),e&2&&(t(),l(c(2,1,"labels.inputs.Total Shares")))}function Nr(e,p){if(e&1&&(a(0,"td",16),s(1),n()),e&2){let i=p.$implicit;t(),l(i.numberOfShares)}}function Or(e,p){e&1&&(a(0,"th",15),s(1),o(2,"translate"),n()),e&2&&(t(),S(" ",c(2,1,"labels.inputs.Purchased/Redeemed Price")," "))}function Vr(e,p){if(e&1&&(a(0,"td",16),s(1),n()),e&2){let i=p.$implicit;t(),l(i.purchasedPrice)}}function qr(e,p){e&1&&(a(0,"th",17),s(1),o(2,"translate"),n()),e&2&&(t(),l(c(2,1,"labels.inputs.Status")))}function Hr(e,p){if(e&1&&(a(0,"td",16),h(1,"i",18),o(2,"statusLookup"),n()),e&2){let i=p.$implicit;t(),d("ngClass",c(2,2,i.status.code))("matTooltip",i.status.value)}}function jr(e,p){e&1&&(a(0,"th",15),s(1),o(2,"translate"),n()),e&2&&(t(),S("",c(2,1,"labels.inputs.Confirm Reject"),"t"))}function Lr(e,p){if(e&1){let i=R();a(0,"td",16)(1,"button",19),o(2,"translate"),b("click",function(){let r=I(i).$implicit,u=A();return M(u.reject(r.id))}),h(3,"i",20),n()()}e&2&&(t(),d("matTooltip",L(c(2,2,"tooltips.Reject Share"))))}function Ur(e,p){e&1&&h(0,"tr",21)}function $r(e,p){e&1&&h(0,"tr",22)}var Kt=(()=>{class e{constructor(){this.sharesService=f(k),this.route=f(B),this.dialog=f(He),this.settingsService=f(j),this.displayedColumns=["transactionDate","totalShares","redeemedPrice","status","reject"],this.accountId=this.route.parent.snapshot.params.shareAccountId,this.route.data.subscribe(i=>{this.sharesAccountData=i.shareAccountActionData})}ngOnInit(){this.sharesData=this.sharesAccountData.purchasedShares.filter(i=>i.status.value==="Pending Approval"),this.setShares()}setShares(){this.dataSource=new qe(this.sharesData),this.dataSource.paginator=this.paginator,this.dataSource.sort=this.sort}reject(i){this.dialog.open(Qt,{data:{shareId:i}}).afterClosed().subscribe(r=>{if(r.reject){let u=this.settingsService.language.code,g=this.settingsService.dateFormat,q={requestedShares:[{id:i}],dateFormat:g,locale:u};this.sharesService.executeSharesAccountCommand(this.accountId,"rejectadditionalshares",q).subscribe(()=>{let Xt=this.sharesData.find(ei=>ei.id===i),Zt=this.sharesData.indexOf(Xt);this.sharesData.splice(Zt,1),this.dataSource.data=this.sharesData,this.sharesTableRef.renderRows()})}})}static{this.\u0275fac=function(m){return new(m||e)}}static{this.\u0275cmp=x({type:e,selectors:[["mifosx-reject-shares"]],viewQuery:function(m,r){if(m&1&&(ee(it,7),ee(at,7),ee(wr,7)),m&2){let u;te(u=ie())&&(r.paginator=u.first),te(u=ie())&&(r.sort=u.first),te(u=ie())&&(r.sharesTableRef=u.first)}},decls:22,vars:5,consts:[["sharesTable",""],[1,"container"],[1,"mat-elevation-z8"],["mat-table","","matSort","",3,"dataSource"],["matColumnDef","transactionDate"],["mat-header-cell","","mat-sort-header","",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","totalShares"],["matColumnDef","redeemedPrice"],["matColumnDef","status"],["mat-header-cell","",4,"matHeaderCellDef"],["matColumnDef","reject"],["mat-header-row","",4,"matHeaderRowDef"],["mat-row","",4,"matRowDef","matRowDefColumns"],["showFirstLastButtons","",3,"pageSizeOptions"],["mat-header-cell","","mat-sort-header",""],["mat-cell",""],["mat-header-cell",""],[1,"fa","fa-stop",3,"ngClass","matTooltip"],["mat-raised-button","","color","warn",1,"share-action-button",3,"click","matTooltip"],[1,"fa","fa-times"],["mat-header-row",""],["mat-row",""]],template:function(m,r){m&1&&(a(0,"div",1)(1,"div",2)(2,"table",3,0),y(4,4),C(5,Fr,3,3,"th",5)(6,Br,3,3,"td",6),E(),y(7,7),C(8,kr,3,3,"th",5)(9,Nr,2,1,"td",6),E(),y(10,8),C(11,Or,3,3,"th",5)(12,Vr,2,1,"td",6),E(),y(13,9),C(14,qr,3,3,"th",10)(15,Hr,3,4,"td",6),E(),y(16,11),C(17,jr,3,3,"th",5)(18,Lr,4,4,"td",6),E(),C(19,Ur,1,0,"tr",12)(20,$r,1,0,"tr",13),n(),h(21,"mat-paginator",14),n()()),m&2&&(t(2),d("dataSource",r.dataSource),t(17),d("matHeaderRowDef",r.displayedColumns),t(),d("matRowDefColumns",r.displayedColumns),t(),d("pageSizeOptions",O(4,Rr)))},dependencies:[T,Je,D,N,xe,at,ye,De,Ee,xt,Te,Ie,je,Me,we,Pe,Re,it,Fe,P,ot],styles:["table[_ngcontent-%COMP%]{width:100%}table[_ngcontent-%COMP%] i[_ngcontent-%COMP%]:hover{cursor:pointer}table[_ngcontent-%COMP%] .share-action-button[_ngcontent-%COMP%]{min-width:26px;padding:0 6px;margin:4px;line-height:25px}"]})}}return e})();function Gr(e,p){e&1&&h(0,"mifosx-approve-shares-account")}function zr(e,p){e&1&&h(0,"mifosx-reject-shares-account")}function Qr(e,p){e&1&&h(0,"mifosx-close-shares-account")}function Kr(e,p){e&1&&h(0,"mifosx-activate-shares-account")}function Wr(e,p){e&1&&h(0,"mifosx-undo-approval-shares-account")}function Yr(e,p){e&1&&h(0,"mifosx-apply-shares")}function Jr(e,p){e&1&&h(0,"mifosx-redeem-shares")}function Xr(e,p){e&1&&h(0,"mifosx-approve-shares")}function Zr(e,p){e&1&&h(0,"mifosx-reject-shares")}var Wt=(()=>{class e{constructor(){this.route=f(B),this.actions={Approve:!1,Reject:!1,Close:!1,Activate:!1,"Undo Approval":!1,"Apply Additional Shares":!1,"Redeem Shares":!1,"Approve Additional Shares":!1,"Reject Additional Shares":!1};let i=this.route.snapshot.params.name;i&&i in this.actions&&(this.actions[i]=!0)}static{this.\u0275fac=function(m){return new(m||e)}}static{this.\u0275cmp=x({type:e,selectors:[["mifosx-shares-account-actions"]],decls:9,vars:9,template:function(m,r){m&1&&(v(0,Gr,1,0,"mifosx-approve-shares-account"),v(1,zr,1,0,"mifosx-reject-shares-account"),v(2,Qr,1,0,"mifosx-close-shares-account"),v(3,Kr,1,0,"mifosx-activate-shares-account"),v(4,Wr,1,0,"mifosx-undo-approval-shares-account"),v(5,Yr,1,0,"mifosx-apply-shares"),v(6,Jr,1,0,"mifosx-redeem-shares"),v(7,Xr,1,0,"mifosx-approve-shares"),v(8,Zr,1,0,"mifosx-reject-shares")),m&2&&(_(r.actions.Approve?0:-1),t(),_(r.actions.Reject?1:-1),t(),_(r.actions.Close?2:-1),t(),_(r.actions.Activate?3:-1),t(),_(r.actions["Undo Approval"]?4:-1),t(),_(r.actions["Apply Additional Shares"]?5:-1),t(),_(r.actions["Redeem Shares"]?6:-1),t(),_(r.actions["Approve Additional Shares"]?7:-1),t(),_(r.actions["Reject Additional Shares"]?8:-1))},dependencies:[T,D,Vt,qt,Ht,jt,Lt,Ut,$t,zt,Kt],encapsulation:2})}}return e})();var Yt=(()=>{class e{constructor(){this.sharesService=f(k)}resolve(i){let m=i.paramMap.get("shareAccountId")||i.parent.paramMap.get("shareAccountId");return this.sharesService.getSharesAccountData(m,!1)}static{this.\u0275fac=function(m){return new(m||e)}}static{this.\u0275prov=Oe({token:e,factory:e.\u0275fac})}}return e})();var ii=(()=>{class e{constructor(){this.sharesService=f(k)}resolve(i){let m=i.paramMap.get("name"),r=i.paramMap.get("shareAccountId")||i.parent.parent.paramMap.get("shareAccountId");switch(m){case"Apply Additional Shares":case"Redeem Shares":case"Approve Additional Shares":case"Reject Additional Shares":return this.sharesService.getSharesAccountData(r,!0);default:return}}static{this.\u0275fac=function(m){return new(m||e)}}static{this.\u0275prov=Oe({token:e,factory:e.\u0275fac})}}return e})();var ai=(()=>{class e{constructor(){this.sharesService=f(k)}resolve(i){let m=i.parent.parent.paramMap.get("clientId");return this.sharesService.getSharesAccountTemplate(m)}static{this.\u0275fac=function(m){return new(m||e)}}static{this.\u0275prov=Oe({token:e,factory:e.\u0275fac})}}return e})();var ni=(()=>{class e{constructor(){this.sharesService=f(k)}resolve(i){let m=i.paramMap.get("shareAccountId");return this.sharesService.getSharesAccountData(m,!0)}static{this.\u0275fac=function(m){return new(m||e)}}static{this.\u0275prov=Oe({token:e,factory:e.\u0275fac})}}return e})();function eo(e,p){if(e&1&&(a(0,"td"),s(1),o(2,"dateFormat"),n()),e&2){let i=A();t(),S(" ",c(2,1,i.sharesAccountData.timeline.activatedDate)," ")}}function to(e,p){e&1&&(a(0,"td"),s(1),o(2,"translate"),n()),e&2&&(t(),S(" ",c(2,1,"labels.text.Not Activated")," "))}function io(e,p){if(e&1&&(a(0,"td"),h(1,"mifosx-external-identifier",5),n()),e&2){let i=A();t(),d("externalId",L(i.sharesAccountData.externalId))}}function ao(e,p){e&1&&(a(0,"td"),s(1),o(2,"translate"),n()),e&2&&(t(),S(" ",c(2,1,"labels.inputs.Unassigned")," "))}function no(e,p){if(e&1&&(a(0,"td"),h(1,"mifosx-account-number",6),n()),e&2){let i=A();t(),d("clientId",L(i.sharesAccountData.clientId))("accountId",L(i.sharesAccountData.savingsAccountId))("accountNo",L(i.sharesAccountData.savingsAccountNumber))}}function ro(e,p){e&1&&(a(0,"td"),s(1),o(2,"translate"),n()),e&2&&(t(),S(" ",c(2,1,"labels.inputs.Unassigned")," "))}var Jt=(()=>{class e{constructor(){this.route=f(B),this.route.data.subscribe(i=>{this.sharesAccountData=i.sharesAccountData})}static{this.\u0275fac=function(m){return new(m||e)}}static{this.\u0275cmp=x({type:e,selectors:[["mifosx-general-tab"]],decls:52,vars:38,consts:[[1,"tab-container","mat-typography"],[1,"shares-account-tables","layout-row","gap-2percent"],[1,"flex-49"],[1,"table-headers"],[1,"r-amount"],[3,"externalId"],["accountType","2",3,"clientId","accountId","accountNo"]],template:function(m,r){m&1&&(a(0,"div",0)(1,"div",1)(2,"div",2)(3,"h4",3),s(4),o(5,"translate"),n(),a(6,"table")(7,"tbody")(8,"tr")(9,"td"),s(10),o(11,"translate"),n(),v(12,eo,3,3,"td"),v(13,to,3,3,"td"),n(),a(14,"tr")(15,"td"),s(16),o(17,"translate"),n(),a(18,"td"),s(19),n()(),a(20,"tr")(21,"td"),s(22),o(23,"translate"),n(),v(24,io,2,2,"td"),v(25,ao,3,3,"td"),n(),a(26,"tr")(27,"td"),s(28),o(29,"translate"),n(),v(30,no,2,6,"td"),v(31,ro,3,3,"td"),n()()()(),a(32,"div",2)(33,"h4",3),s(34),o(35,"translate"),n(),a(36,"table")(37,"tbody")(38,"tr")(39,"td"),s(40),o(41,"translate"),n(),a(42,"td",4),s(43),o(44,"formatNumber"),n()(),a(45,"tr")(46,"td"),s(47),o(48,"translate"),n(),a(49,"td",4),s(50),o(51,"formatNumber"),n()()()()()()()),m&2&&(t(4),l(c(5,18,"labels.heading.Shares Details")),t(6),l(c(11,20,"labels.inputs.Activated On")),t(2),_(r.sharesAccountData.timeline.activatedDate?12:-1),t(),_(r.sharesAccountData.timeline.activatedDate?-1:13),t(3),l(c(17,22,"labels.inputs.Currency")),t(3),w("",r.sharesAccountData.currency.name," [",r.sharesAccountData.currency.code,"]"),t(3),l(c(23,24,"labels.inputs.External Id")),t(2),_(r.sharesAccountData.externalId?24:-1),t(),_(r.sharesAccountData.externalId?-1:25),t(3),l(c(29,26,"labels.inputs.Linked Savings Account(Dividend Posting)")),t(2),_(r.sharesAccountData.savingsAccountNumber?30:-1),t(),_(r.sharesAccountData.savingsAccountNumber?-1:31),t(3),l(c(35,28,"labels.heading.Account Summary")),t(6),l(c(41,30,"labels.inputs.Pending for Approval Shares")),t(3),l(c(44,32,r.sharesAccountData.summary.totalPendingForApprovalShares)),t(4),l(c(48,34,"labels.inputs.Approved Shares")),t(3),l(c(51,36,r.sharesAccountData.summary.totalApprovedShares)))},dependencies:[T,D,It,Mt,Fe,P,rt],styles:[".tab-container[_ngcontent-%COMP%]{padding:1%;margin:1%}.tab-container[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{margin:1% auto}.tab-container[_ngcontent-%COMP%] .performance-history-container[_ngcontent-%COMP%]{border:1px solid;padding:1%;margin-bottom:20px}.tab-container[_ngcontent-%COMP%] table[_ngcontent-%COMP%]{width:100%;margin-bottom:20px}span[_ngcontent-%COMP%]{margin:.5em 0}"]})}}return e})();var oo=[{path:"",data:{title:"Shares",breadcrumb:"Shares",routeParamBreadcrumb:!1,addBreadcrumbLink:!1},children:[{path:"create",data:{title:"Create Shares Account",breadcrumb:"Create Shares Account"},component:Nt,resolve:{sharesAccountTemplate:ai}},{path:":shareAccountId",data:{title:"Shares Account View",routeParamBreadcrumb:"shareAccountId"},children:[{path:"",component:Rt,resolve:{sharesAccountData:Yt},children:[{path:"",redirectTo:"general",pathMatch:"full"},{path:"general",component:Jt,data:{title:"Shares Account General",breadcrumb:"General",routeParamBreadcrumb:!1},resolve:{sharesAccountData:Yt}},{path:"transactions",component:Ft,data:{title:"Shares Account Transactions",breadcrumb:"Transactions",routeParamBreadcrumb:!1}},{path:"charges",component:Bt,data:{title:"Shares Account Charges",breadcrumb:"Charges",routeParamBreadcrumb:!1}},{path:"dividends",component:kt,data:{title:"Shares Account Dividends",breadcrumb:"Dividends",routeParamBreadcrumb:!1}}]},{path:"edit",data:{title:"Edit Shares Account",breadcrumb:"Edit",routeParamBreadcrumb:!1},component:Ot,resolve:{sharesAccountAndTemplate:ni}},{path:"actions/:name",data:{title:"Shares Account Actions",breadcrumb:"Actions",routeParamBreadcrumb:"name"},component:Wt,resolve:{shareAccountActionData:ii}}]}]}],Vi=(()=>{class e{static{this.\u0275fac=function(m){return new(m||e)}}static{this.\u0275mod=dt({type:e})}static{this.\u0275inj=mt({providers:[Yt,ai,ni,ii],imports:[ti.forChild(oo),ti]})}}return e})();var O0=(()=>{class e{static{this.\u0275fac=function(m){return new(m||e)}}static{this.\u0275mod=dt({type:e})}static{this.\u0275inj=mt({imports:[ki,wi,Ri,Vi,Rt,Ft,kt,Bt,Nt,Ge,ze,Qe,st,Ot,Wt,Vt,qt,Ht,jt,Lt,Ut,$t,zt,Gt,Kt,Qt,Jt]})}}return e})();export{O0 as SharesModule};